!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).echarts={})}(this,function(t){"use strict";var b=function(t,e){return(b=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}))(t,e)};function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}b(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var S=function(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1},p=new function(){this.browser=new S,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow="undefined"!=typeof window};"object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?(p.wxa=!0,p.touchEventsSupported=!0):"undefined"==typeof document&&"undefined"!=typeof self?p.worker=!0:"undefined"==typeof navigator||0===navigator.userAgent.indexOf("Node.js")?(p.node=!0,p.svgSupported=!0):(Q=navigator.userAgent,le=(Ut=p).browser,st=Q.match(/Firefox\/([\d.]+)/),W=Q.match(/MSIE\s([\d.]+)/)||Q.match(/Trident\/.+?rv:(([\d.]+))/),$=Q.match(/Edge?\/([\d.]+)/),Q=/micromessenger/i.test(Q),st&&(le.firefox=!0,le.version=st[1]),W&&(le.ie=!0,le.version=W[1]),$&&(le.edge=!0,le.version=$[1],le.newEdge=18<+$[1].split(".")[0]),Q&&(le.weChat=!0),Ut.svgSupported="undefined"!=typeof SVGRect,Ut.touchEventsSupported="ontouchstart"in window&&!le.ie&&!le.edge,Ut.pointerEventsSupported="onpointerdown"in window&&(le.edge||le.ie&&11<=+le.version),Ut.domSupported="undefined"!=typeof document,st=document.documentElement.style,Ut.transform3dSupported=(le.ie&&"transition"in st||le.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in st)&&!("OTransition"in st),Ut.transformSupported=Ut.transform3dSupported||le.ie&&9<=+le.version);var K="12px sans-serif";var T,C,I=function(t){var e={};if("undefined"!=typeof JSON)for(var n=0;n>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",i[l]+":0",r[u]+":0",i[1-l]+":auto",r[1-u]+":auto",""].join("!important;"),t.appendChild(a),n.push(a)}}return n}(e,o),o,r);if(e)return e(t,n,i),1}}function _e(t){return"CANVAS"===t.nodeName.toUpperCase()}var xe=/([&<>"'])/g,we={"&":"&","<":"<",">":">",'"':""","'":"'"};function be(t){return null==t?"":(t+"").replace(xe,function(t,e){return we[e]})}var Se=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Me=[],Te=p.browser.firefox&&+p.browser.version.split(".")[0]<39;function Ce(t,e,n,i){return n=n||{},i?De(t,e,n):Te&&null!=e.layerX&&e.layerX!==e.offsetX?(n.zrX=e.layerX,n.zrY=e.layerY):null!=e.offsetX?(n.zrX=e.offsetX,n.zrY=e.offsetY):De(t,e,n),n}function De(t,e,n){if(p.domSupported&&t.getBoundingClientRect){var i,r=e.clientX,e=e.clientY;if(_e(t))return i=t.getBoundingClientRect(),n.zrX=r-i.left,void(n.zrY=e-i.top);if(ve(Me,t,r,e))return n.zrX=Me[0],void(n.zrY=Me[1])}n.zrX=n.zrY=0}function ke(t){return t||window.event}function Ie(t,e,n){var i;return null==(e=ke(e)).zrX&&((i=e.type)&&0<=i.indexOf("touch")?(i=("touchend"!==i?e.targetTouches:e.changedTouches)[0])&&Ce(t,i,e,n):(Ce(t,e,e,n),i=function(t){var e=t.wheelDelta;if(e)return e;var n=t.deltaX,t=t.deltaY;return null!=n&&null!=t?3*(0!==t?Math.abs(t):Math.abs(n))*(0=n.x&&t<=n.x+n.width&&e>=n.y&&e<=n.y+n.height},Qe.prototype.clone=function(){return new Qe(this.x,this.y,this.width,this.height)},Qe.prototype.copy=function(t){Qe.copy(this,t)},Qe.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},Qe.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},Qe.prototype.isZero=function(){return 0===this.width||0===this.height},Qe.create=function(t){return new Qe(t.x,t.y,t.width,t.height)},Qe.copy=function(t,e){t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height},Qe.applyTransform=function(t,e,n){var i,r,o,a;n?n[1]<1e-5&&-1e-5t.getWidth()||n<0||n>t.getHeight()}O(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(a){hn.prototype[a]=function(t){var e,n,i=t.zrX,r=t.zrY,o=dn(this,i,r);if("mouseup"===a&&o||(n=(e=this.findHover(i,r)).target),"mousedown"===a)this._downEl=n,this._downPoint=[t.zrX,t.zrY],this._upEl=n;else if("mouseup"===a)this._upEl=n;else if("click"===a){if(this._downEl!==this._upEl||!this._downPoint||4>>1])<0?l=o:s=1+o;var u=i-s;switch(u){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;0>>1);0>>1);o(t,e[n+h])<0?l=h:a=h+1}return l}function xn(A,P){var L,O,R=gn,N=0,F=[];function e(t){var e=L[t],n=O[t],i=L[t+1],r=O[t+1],t=(O[t]=n+r,t===N-3&&(L[t+1]=L[t+2],O[t+1]=O[t+2]),N--,_n(A[i],A,e,n,0,P));if(e+=t,0!=(n-=t)&&0!==(r=vn(A[e+n-1],A,i,r,r-1,P)))if(n<=r){var o=e,a=n,t=i,s=r,l=0;for(l=0;lO[t+1])break;e(t)}},forceMergeRuns:function(){for(;1>=1;return t+e}(r);do{}while((o=yn(t,n,i,e))=this._maxSize&&0>4|(3840&r)>>8,240&r|(240&r)>>4,15&r|(15&r)<<4,5===i?parseInt(n.slice(4),16)/15:1),vi(t,e),e):void fi(e,0,0,0,1):7===i||9===i?0<=(r=parseInt(n.slice(1,7),16))&&r<=16777215?(fi(e,(16711680&r)>>16,(65280&r)>>8,255&r,9===i?parseInt(n.slice(7),16)/255:1),vi(t,e),e):void fi(e,0,0,0,1):void 0;var r=n.indexOf("("),o=n.indexOf(")");if(-1!==r&&o+1===i){var i=n.substr(0,r),a=n.substr(r+1,o-(r+1)).split(","),s=1;switch(i){case"rgba":if(4!==a.length)return 3===a.length?fi(e,+a[0],+a[1],+a[2],1):fi(e,0,0,0,1);s=ci(a.pop());case"rgb":return 3<=a.length?(fi(e,hi(a[0]),hi(a[1]),hi(a[2]),3===a.length?s:ci(a[3])),vi(t,e),e):void fi(e,0,0,0,1);case"hsla":return 4!==a.length?void fi(e,0,0,0,1):(a[3]=ci(a[3]),xi(a,e),vi(t,e),e);case"hsl":return 3!==a.length?void fi(e,0,0,0,1):(xi(a,e),vi(t,e),e);default:return}}fi(e,0,0,0,1)}}function xi(t,e){var n=(parseFloat(t[0])%360+360)%360/360,i=ci(t[1]),r=ci(t[2]),i=r<=.5?r*(i+1):r+i-r*i,r=2*r-i;return fi(e=e||[],li(255*pi(r,i,n+1/3)),li(255*pi(r,i,n)),li(255*pi(r,i,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}function wi(t,e){var n=_i(t);if(n){for(var i=0;i<3;i++)n[i]=e<0?n[i]*(1-e)|0:(255-n[i])*e+n[i]|0,255e);g++);g=f(g-1,h-2)}i=u[g+1],n=u[g]}n&&i&&(this._lastFr=g,this._lastFrP=e,d=i.percent-n.percent,r=0==d?1:f((e-n.percent)/d,1),i.easingFunc&&(r=i.easingFunc(r)),f=a?this._additiveValue:p?zi:t[c],(Bi(l)||p)&&(f=f||(this._additiveValue=[])),this.discrete?t[c]=(r<1?n:i).rawValue:Bi(l)?(1===l?Pi:function(t,e,n,i){for(var r=e.length,o=r&&e[0].length,a=0;athis._sleepAfterStill)&&this.animation.stop()},o.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},o.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},o.prototype.refreshHover=function(){this._needsRefreshHover=!0},o.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&"canvas"===this.painter.getType()&&this.painter.refreshHover())},o.prototype.resize=function(t){this._disposed||(this.painter.resize((t=t||{}).width,t.height),this.handler.resize())},o.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},o.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},o.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},o.prototype.setCursorStyle=function(t){this._disposed||this.handler.setCursorStyle(t)},o.prototype.findHover=function(t,e){if(!this._disposed)return this.handler.findHover(t,e)},o.prototype.on=function(t,e,n){return this._disposed||this.handler.on(t,e,n),this},o.prototype.off=function(t,e){this._disposed||this.handler.off(t,e)},o.prototype.trigger=function(t,e){this._disposed||this.handler.trigger(t,e)},o.prototype.clear=function(){if(!this._disposed){for(var t=this.storage.getRoots(),e=0;e=e.maxIterations){t+=e.ellipsis;break}var s=0===a?function(t,e,n,i){for(var r=0,o=0,a=t.length;oo){0i.width&&(o=e.split("\n"),c=!0),i.accumWidth=t):(t=pa(e,h,i.width,i.breakAll,i.accumWidth),i.accumWidth=t.accumWidth+n,a=t.linesWidths,o=t.lines)):o=e.split("\n");for(var p=0;pthis._ux||i>this._uy;return this.addData(Y.L,t,e),this._ctx&&r&&this._ctx.lineTo(t,e),r?(this._xi=t,this._yi=e,this._pendingPtDist=0):(r=n*n+i*i)>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=e,this._pendingPtDist=r),this},l.prototype.bezierCurveTo=function(t,e,n,i,r,o){return this._drawPendingPt(),this.addData(Y.C,t,e,n,i,r,o),this._ctx&&this._ctx.bezierCurveTo(t,e,n,i,r,o),this._xi=r,this._yi=o,this},l.prototype.quadraticCurveTo=function(t,e,n,i){return this._drawPendingPt(),this.addData(Y.Q,t,e,n,i),this._ctx&&this._ctx.quadraticCurveTo(t,e,n,i),this._xi=n,this._yi=i,this},l.prototype.arc=function(t,e,n,i,r,o){this._drawPendingPt(),qa[0]=i,qa[1]=r,s=o,(l=ja((a=qa)[0]))<0&&(l+=Xa),h=l-a[0],u=a[1],u+=h,!s&&Xa<=u-l?u=l+Xa:s&&Xa<=l-u?u=l-Xa:!s&&uu.length&&(this._expandData(),u=this.data);for(var h=0;hn||Wa(y)>i||c===e-1)&&(f=Math.sqrt(D*D+y*y),r=g,o=_);break;case Y.C:var m=t[c++],v=t[c++],g=t[c++],_=t[c++],x=t[c++],w=t[c++],f=function(t,e,n,i,r,o,a,s,l){for(var u=t,h=e,c=0,p=1/l,d=1;d<=l;d++){var f=d*p,g=Hn(t,n,r,a,f),f=Hn(e,i,o,s,f),y=g-u,m=f-h;c+=Math.sqrt(y*y+m*m),u=g,h=f}return c}(r,o,m,v,g,_,x,w,10),r=x,o=w;break;case Y.Q:f=function(t,e,n,i,r,o,a){for(var s=t,l=e,u=0,h=1/a,c=1;c<=a;c++){var p=c*h,d=qn(t,n,r,p),p=qn(e,i,o,p),f=d-s,g=p-l;u+=Math.sqrt(f*f+g*g),s=d,l=p}return u}(r,o,m=t[c++],v=t[c++],g=t[c++],_=t[c++],10),r=g,o=_;break;case Y.A:var x=t[c++],w=t[c++],b=t[c++],S=t[c++],M=t[c++],T=t[c++],C=T+M;c+=1,d&&(a=Ha(M)*b+x,s=Ga(M)*S+w),f=Va(b,S)*Ea(Xa,Math.abs(T)),r=Ha(C)*b+x,o=Ga(C)*S+w;break;case Y.R:a=r=t[c++],s=o=t[c++];f=2*t[c++]+2*t[c++];break;case Y.Z:var D=a-r,y=s-o;f=Math.sqrt(D*D+y*y),r=a,o=s}0<=f&&(u+=l[h++]=f)}return this._pathLen=u},l.prototype.rebuildPath=function(t,e){var n,i,r,o,a,s,l,u,h=this.data,F=this._ux,B=this._uy,z=this._len,c=e<1,p=0,d=0,f=0;if(!c||(this._pathSegLen||this._calculateLength(),a=this._pathSegLen,s=e*this._pathLen))t:for(var g=0;g=rs[i=0]+t&&a<=rs[1]+t?h:0;rMath.PI/2&&c<1.5*Math.PI?-h:h)}return l}(y,m,_,x,x+w,b,T,r);u=Math.cos(x+w)*v+y,h=Math.sin(x+w)*_+m;break;case es.R:c=u=a[d++],p=h=a[d++];if(S=c+a[d++],M=p+a[d++],n){if(Ka(c,p,S,p,e,i,r)||Ka(S,p,S,M,e,i,r)||Ka(S,M,c,M,e,i,r)||Ka(c,M,c,p,e,i,r))return!0}else l=(l+=ts(S,p,S,M,i,r))+ts(c,M,c,p,i,r);break;case es.Z:if(n){if(Ka(u,h,c,p,e,i,r))return!0}else l+=ts(u,h,c,p,i,r);u=c,h=p}}return n||(t=h,o=p,Math.abs(t-o)i.len()&&(ue)return t[i];return t[n-1]}var Bp,zp="\0_ec_inner",Ep=(a(c,Bp=lc),c.prototype.init=function(t,e,n,i,r,o){i=i||{},this.option=null,this._theme=new lc(i),this._locale=new lc(r),this._optionManager=o},c.prototype.setOption=function(t,e,n){e=Gp(e);this._optionManager.setOption(t,n,e),this._resetOption(null,e)},c.prototype.resetOption=function(t,e){return this._resetOption(t,Gp(e))},c.prototype._resetOption=function(t,e){var n,i=!1,r=this._optionManager;return t&&"recreate"!==t||(n=r.mountOption("recreate"===t),this.option&&"recreate"!==t?(this.restoreData(),this._mergeOption(n,e)):Lp(this,n),i=!0),"timeline"!==t&&"media"!==t||this.restoreData(),t&&"recreate"!==t&&"timeline"!==t||(n=r.getTimelineOption(this))&&(i=!0,this._mergeOption(n,e)),t&&"recreate"!==t&&"media"!==t||(n=r.getMediaOption(this)).length&&O(n,function(t){i=!0,this._mergeOption(t,e)},this),i},c.prototype.mergeOption=function(t){this._mergeOption(t,null)},c.prototype._mergeOption=function(i,t){var r=this.option,h=this._componentsMap,c=this._componentsCount,n=[],o=F(),p=t&&t.replaceMergeMainTypeMap;Sp(this).datasetMap=F(),O(i,function(t,e){null!=t&&(d.hasClass(e)?e&&(n.push(e),o.set(e,!0)):r[e]=null==r[e]?y(t):rt(r[e],t,!0))}),p&&p.each(function(t,e){d.hasClass(e)&&!o.get(e)&&(n.push(e),o.set(e,!0))}),d.topologicalTravel(n,d.getAllClassMainTypes(),function(o){var a,t=function(t,e,n){return(e=(e=Ip.get(e))&&e(t))?n.concat(e):n}(this,o,_o(i[o])),e=h.get(o),n=e?p&&p.get(o)?"replaceMerge":"normalMerge":"replaceAll",e=So(e,t,n),s=(Io(e,o,d),r[o]=null,h.set(o,null),c.set(o,0),[]),l=[],u=0;O(e,function(t,e){var n=t.existing,i=t.newOption;if(i){var r=d.getClass(o,t.keyInfo.subType,!("series"===o));if(!r)return;if("tooltip"===o){if(a)return;a=!0}n&&n.constructor===r?(n.name=t.keyInfo.name,n.mergeOption(i,this),n.optionUpdated(i,!1)):(e=L({componentIndex:e},t.keyInfo),L(n=new r(i,this,this,e),e),t.brandNew&&(n.__requireNewView=!0),n.init(i,this,this),n.optionUpdated(null,!0))}else n&&(n.mergeOption({},this),n.optionUpdated({},!1));n?(s.push(n.option),l.push(n),u++):(s.push(void 0),l.push(void 0))},this),r[o]=s,h.set(o,l),c.set(o,u),"series"===o&&Ap(this)},this),this._seriesIndices||Ap(this)},c.prototype.getOption=function(){var a=y(this.option);return O(a,function(t,e){if(d.hasClass(e)){for(var n=_o(t),i=n.length,r=!1,o=i-1;0<=o;o--)n[o]&&!ko(n[o])?r=!0:(n[o]=null,r||i--);n.length=i,a[e]=n}}),delete a[zp],a},c.prototype.getTheme=function(){return this._theme},c.prototype.getLocaleModel=function(){return this._locale},c.prototype.setUpdatePayload=function(t){this._payload=t},c.prototype.getUpdatePayload=function(){return this._payload},c.prototype.getComponent=function(t,e){var n=this._componentsMap.get(t);if(n){t=n[e||0];if(t)return t;if(null==e)for(var i=0;ig[1]&&(g[1]=f)}return{start:a,end:this._rawCount=this._count=s}},g.prototype._initDataFromProvider=function(t,e,n){for(var i=this._provider,r=this._chunks,o=this._dimensions,a=o.length,s=this._rawExtent,l=B(o,function(t){return t.property}),u=0;uf[1]&&(f[1]=g)}!i.persistent&&i.clean&&i.clean(),this._rawCount=this._count=e,this._extent=[]},g.prototype.count=function(){return this._count},g.prototype.get=function(t,e){return 0<=e&&e=this._rawCount||t<0)){if(!this._indices)return t;var e=this._indices,n=e[t];if(null!=n&&nt))return o;r=o-1}}}return-1},g.prototype.indicesOfNearest=function(t,e,n){var i=this._chunks[t],r=[];if(i){null==n&&(n=1/0);for(var o=1/0,a=-1,s=0,l=0,u=this.count();lt[S][1])&&(w=!1)}w&&(a[s++]=e.getRawIndex(f))}return sy[1]&&(y[1]=g)}}}},g.prototype.lttbDownSample=function(t,e){var n,i=this.clone([t],!0),r=i._chunks[t],o=this.count(),a=0,s=Math.floor(1/e),l=this.getRawIndex(0),u=new(If(this._rawCount))(Math.min(2*(Math.ceil(o/s)+2),o));u[a++]=l;for(var h=1;hh[1]&&(h[1]=y),c[p++]=m}return r._count=p,r._indices=c,r._updateGetRawIdx(),r},g.prototype.each=function(t,e){if(this._count)for(var n=t.length,i=this._chunks,r=0,o=this.count();rthis.getShallow("animationThreshold")?!1:t)},v.prototype.restoreData=function(){this.dataTask.dirty()},v.prototype.getColorFromPalette=function(t,e,n){var i=this.ecModel;return Rp.prototype.getColorFromPalette.call(this,t,e,n)||i.getColorFromPalette(t,e,n)},v.prototype.coordDimToDataDim=function(t){return this.getRawData().mapDimensionsAll(t)},v.prototype.getProgressive=function(){return this.get("progressive")},v.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},v.prototype.select=function(t,e){this._innerSelect(this.getData(e),t)},v.prototype.unselect=function(t,e){var n=this.option.selectedMap;if(n){var i=this.option.selectedMode,r=this.getData(e);if("series"===i||"all"===n)this.option.selectedMap={},this._selectedDataIndicesMap={};else for(var o=0;oe.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function Kf(e,n){O(zt(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(t){e.wrapMethod(t,ft(Jf,n))})}function Jf(t,e){t=$f(t);return t&&t.setOutputEnd((e||this).count()),e}function $f(t){var e,n=(t.ecModel||{}).scheduler,n=n&&n.getPipeline(t.uid);if(n)return(n=n.currentTask)&&(e=n.agentStubMap)?e.get(t.uid):n}ut(Xf,oc),ut(Xf,Rp),Wo(Xf,d);tg.prototype.init=function(t,e){},tg.prototype.render=function(t,e,n,i){},tg.prototype.dispose=function(t,e){},tg.prototype.updateView=function(t,e,n,i){},tg.prototype.updateLayout=function(t,e,n,i){},tg.prototype.updateVisual=function(t,e,n,i){},tg.prototype.toggleBlurSeries=function(t,e,n){},tg.prototype.eachRendered=function(t){var e=this.group;e&&e.traverse(t)};var Qf=tg;function tg(){this.group=new Xr,this.uid=cc("viewComponent")}Go(Qf),qo(Qf);var eg,ng=Po(),ig=(eg=Po(),function(t){var e=eg(t),t=t.pipelineContext,n=!!e.large,i=!!e.progressiveRender,r=e.large=!(!t||!t.large),e=e.progressiveRender=!(!t||!t.progressiveRender);return!(n==r&&i==e)&&"reset"}),rg=(og.prototype.init=function(t,e){},og.prototype.render=function(t,e,n,i){},og.prototype.highlight=function(t,e,n,i){t=t.getData(i&&i.dataType);t&&sg(t,i,"emphasis")},og.prototype.downplay=function(t,e,n,i){t=t.getData(i&&i.dataType);t&&sg(t,i,"normal")},og.prototype.remove=function(t,e){this.group.removeAll()},og.prototype.dispose=function(t,e){},og.prototype.updateView=function(t,e,n,i){this.render(t,e,n,i)},og.prototype.updateLayout=function(t,e,n,i){this.render(t,e,n,i)},og.prototype.updateVisual=function(t,e,n,i){this.render(t,e,n,i)},og.prototype.eachRendered=function(t){var e=this.group,n=t;if(e)if(z(e))for(var i=0;in.blockIndex?n.step:null,modBy:null!=(t=i&&i.modDataCount)?Math.ceil(t/e):null,modDataCount:t}},xg.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},xg.prototype.updateStreamModes=function(t,e){var n=this._pipelineMap.get(t.uid),i=t.getData().count(),e=n.progressiveEnabled&&e.incrementalPrepareRender&&i>=n.threshold,r=t.get("large")&&i>=t.get("largeThreshold"),i="mod"===t.get("progressiveChunkMode")?i:null;t.pipelineContext=n.context={progressiveRender:e,modDataCount:i,large:r}},xg.prototype.restorePipelines=function(t){var i=this,r=i._pipelineMap=F();t.eachSeries(function(t){var e=t.getProgressive(),n=t.uid;r.set(n,{id:n,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:e&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(e||700),count:0}),i._pipe(t,t.dataTask)})},xg.prototype.prepareStageTasks=function(){var n=this._stageTaskMap,i=this.api.getModel(),r=this.api;O(this._allHandlers,function(t){var e=n.get(t.uid)||n.set(t.uid,{});kt(!(t.reset&&t.overallReset),""),t.reset&&this._createSeriesStageTask(t,e,i,r),t.overallReset&&this._createOverallStageTask(t,e,i,r)},this)},xg.prototype.prepareView=function(t,e,n,i){var r=t.renderTask,o=r.context;o.model=e,o.ecModel=n,o.api=i,r.__block=!t.incrementalPrepareRender,this._pipe(e,r)},xg.prototype.performDataProcessorTasks=function(t,e){this._performStageTasks(this._dataProcessorHandlers,t,e,{block:!0})},xg.prototype.performVisualTasks=function(t,e,n){this._performStageTasks(this._visualHandlers,t,e,n)},xg.prototype._performStageTasks=function(t,s,l,u){u=u||{};var h=!1,c=this;function p(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}O(t,function(i,t){var e,n,r,o,a;u.visualType&&u.visualType!==i.visualType||(e=(n=c._stageTaskMap.get(i.uid)).seriesTaskMap,(n=n.overallTask)?((o=n.agentStubMap).each(function(t){p(u,t)&&(t.dirty(),r=!0)}),r&&n.dirty(),c.updatePayload(n,l),a=c.getPerformArgs(n,u.block),o.each(function(t){t.perform(a)}),n.perform(a)&&(h=!0)):e&&e.each(function(t,e){p(u,t)&&t.dirty();var n=c.getPerformArgs(t,u.block);n.skip=!i.performRawSeries&&s.isSeriesFiltered(t.context.model),c.updatePayload(t,l),t.perform(n)&&(h=!0)}))}),this.unfinished=h||this.unfinished},xg.prototype.performSeriesTasks=function(t){var e;t.eachSeries(function(t){e=t.dataTask.perform()||e}),this.unfinished=e||this.unfinished},xg.prototype.plan=function(){this._pipelineMap.each(function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}}while(e=e.getUpstream())})},xg.prototype.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)},xg.prototype._createSeriesStageTask=function(n,t,i,r){var o=this,a=t.seriesTaskMap,s=t.seriesTaskMap=F(),t=n.seriesType,e=n.getTargetSeries;function l(t){var e=t.uid,e=s.set(e,a&&a.get(e)||Yd({plan:Tg,reset:Cg,count:Ig}));e.context={model:t,ecModel:i,api:r,useClearVisual:n.isVisual&&!n.isLayout,plan:n.plan,reset:n.reset,scheduler:o},o._pipe(t,e)}n.createOnAllSeries?i.eachRawSeries(l):t?i.eachRawSeriesByType(t,l):e&&e(i,r).each(l)},xg.prototype._createOverallStageTask=function(t,e,n,i){var r=this,o=e.overallTask=e.overallTask||Yd({reset:wg}),a=(o.context={ecModel:n,api:i,overallReset:t.overallReset,scheduler:r},o.agentStubMap),s=o.agentStubMap=F(),e=t.seriesType,l=t.getTargetSeries,u=!0,h=!1;function c(t){var e=t.uid,e=s.set(e,a&&a.get(e)||(h=!0,Yd({reset:bg,onDirty:Mg})));e.context={model:t,overallProgress:u},e.agent=o,e.__block=u,r._pipe(t,e)}kt(!t.createOnAllSeries,""),e?n.eachRawSeriesByType(e,c):l?l(n,i).each(c):(u=!1,O(n.getSeries(),c)),h&&o.dirty()},xg.prototype._pipe=function(t,e){t=t.uid,t=this._pipelineMap.get(t);t.head||(t.head=e),t.tail&&t.tail.pipe(e),(t.tail=e).__idxInPipeline=t.count++,e.__pipeline=t},xg.wrapStageHandler=function(t,e){return(t=m(t)?{overallReset:t,seriesType:function(t){Ag=null;try{t(Pg,Lg)}catch(t){}return Ag}(t)}:t).uid=cc("stageHandler"),e&&(t.visualType=e),t};var _g=xg;function xg(t,e,n,i){this._stageTaskMap=F(),this.ecInstance=t,this.api=e,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}function wg(t){t.overallReset(t.ecModel,t.api,t.payload)}function bg(t){return t.overallProgress&&Sg}function Sg(){this.agent.dirty(),this.getDownstream().dirty()}function Mg(){this.agent&&this.agent.dirty()}function Tg(t){return t.plan?t.plan(t.model,t.ecModel,t.api,t.payload):null}function Cg(t){t.useClearVisual&&t.data.clearAllVisual();t=t.resetDefines=_o(t.reset(t.model,t.ecModel,t.api,t.payload));return 1'+t.dom+""}),f.painter.getSvgRoot().innerHTML=g,i.connectedBackgroundColor&&f.painter.setBackgroundColor(i.connectedBackgroundColor),f.refreshImmediately(),f.painter.toDataURL()):(i.connectedBackgroundColor&&f.add(new Ds({shape:{x:0,y:0,width:t,height:n},style:{fill:i.connectedBackgroundColor}})),O(p,function(t){t=new xs({style:{x:t.left*e-l,y:t.top*e-u,image:t.dom}});f.add(t)}),f.refreshImmediately(),d.toDataURL("image/"+(i&&i.type||"png")))):this.getDataURL(i);this.id},_.prototype.convertToPixel=function(t,e){return Zy(this,"convertToPixel",t,e)},_.prototype.convertFromPixel=function(t,e){return Zy(this,"convertFromPixel",t,e)},_.prototype.containPixel=function(t,i){var r;if(!this._disposed)return O(Oo(this._model,t),function(t,n){0<=n.indexOf("Models")&&O(t,function(t){var e=t.coordinateSystem;e&&e.containPoint?r=r||!!e.containPoint(i):"seriesModels"===n&&(e=this._chartsMap[t.__viewId])&&e.containPoint&&(r=r||e.containPoint(i,t))},this)},this),!!r;this.id},_.prototype.getVisual=function(t,e){var t=Oo(this._model,t,{defaultMainType:"series"}),n=t.seriesModel.getData(),t=t.hasOwnProperty("dataIndexInside")?t.dataIndexInside:t.hasOwnProperty("dataIndex")?n.indexOfRawIndex(t.dataIndex):null;if(null!=t){var i=n,r=t,o=e;switch(o){case"color":return i.getItemVisual(r,"style")[i.getVisual("drawType")];case"opacity":return i.getItemVisual(r,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return i.getItemVisual(r,o)}}else{var a=n,s=e;switch(s){case"color":return a.getVisual("style")[a.getVisual("drawType")];case"opacity":return a.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return a.getVisual(s)}}},_.prototype.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},_.prototype.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]},_.prototype._initEvents=function(){var t,n,i,s=this;O(ym,function(a){function t(t){var n,e,i,r=s.getModel(),o=t.target;"globalout"===a?n={}:o&&Gg(o,function(t){var e,t=Us(t);return t&&null!=t.dataIndex?(e=t.dataModel||r.getSeriesByIndex(t.seriesIndex),n=e&&e.getDataParams(t.dataIndex,t.dataType,o)||{},1):t.eventData&&(n=L({},t.eventData),1)},!0),n&&(e=n.componentType,i=n.componentIndex,"markLine"!==e&&"markPoint"!==e&&"markArea"!==e||(e="series",i=n.seriesIndex),i=(e=e&&null!=i&&r.getComponent(e,i))&&s["series"===e.mainType?"_chartsMap":"_componentsMap"][e.__viewId],n.event=t,n.type=a,s._$eventProcessor.eventInfo={targetEl:o,packedEvent:n,model:e,view:i},s.trigger(a,n))}t.zrEventfulCallAtLast=!0,s._zr.on(a,t,s)}),O(vm,function(t,e){s._messageCenter.on(e,function(t){this.trigger(e,t)},s)}),O(["selectchanged"],function(e){s._messageCenter.on(e,function(t){this.trigger(e,t)},s)}),t=this._messageCenter,i=(n=this)._api,t.on("selectchanged",function(t){var e=i.getModel();t.isFromClick?(Hg("map","selectchanged",n,e,t),Hg("pie","selectchanged",n,e,t)):"select"===t.fromAction?(Hg("map","selected",n,e,t),Hg("pie","selected",n,e,t)):"unselect"===t.fromAction&&(Hg("map","unselected",n,e,t),Hg("pie","unselected",n,e,t))})},_.prototype.isDisposed=function(){return this._disposed},_.prototype.clear=function(){this._disposed?this.id:this.setOption({series:[]},!0)},_.prototype.dispose=function(){var t,e,n;this._disposed?this.id:(this._disposed=!0,this.getDom()&&Bo(this.getDom(),km,""),e=(t=this)._api,n=t._model,O(t._componentsViews,function(t){t.dispose(n,e)}),O(t._chartsViews,function(t){t.dispose(n,e)}),t._zr.dispose(),t._dom=t._model=t._chartsMap=t._componentsMap=t._chartsViews=t._componentsViews=t._scheduler=t._api=t._zr=t._throttledZrFlush=t._theme=t._coordSysMgr=t._messageCenter=null,delete Mm[t.id])},_.prototype.resize=function(t){if(!this[Ry])if(this._disposed)this.id;else{this._zr.resize(t);var e=this._model;if(this._loadingFX&&this._loadingFX.resize(),e){var e=e.resetOption("media"),n=t&&t.silent;this[Ny]&&(null==n&&(n=this[Ny].silent),e=!0,this[Ny]=null),this[Ry]=!0;try{e&&Xy(this),jy.update.call(this,{type:"resize",animation:L({duration:0},t&&t.animation)})}catch(t){throw this[Ry]=!1,t}this[Ry]=!1,$y.call(this,n),Qy.call(this,n)}}},_.prototype.showLoading=function(t,e){this._disposed?this.id:(R(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),Sm[t]&&(t=Sm[t](this._api,e),e=this._zr,this._loadingFX=t,e.add(t)))},_.prototype.hideLoading=function(){this._disposed?this.id:(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},_.prototype.makeActionFromEvent=function(t){var e=L({},t);return e.type=vm[t.type],e},_.prototype.dispatchAction=function(t,e){var n;this._disposed?this.id:(R(e)||(e={silent:!!e}),mm[t.type]&&this._model&&(this[Ry]?this._pendingActions.push(t):(n=e.silent,Jy.call(this,t,n),(t=e.flush)?this._zr.flush():!1!==t&&p.browser.weChat&&this._throttledZrFlush(),$y.call(this,n),Qy.call(this,n))))},_.prototype.updateLabelLayout=function(){Ly.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},_.prototype.appendData=function(t){var e;this._disposed?this.id:(e=t.seriesIndex,this.getModel().getSeriesByIndex(e).appendData(t),this._scheduler.unfinished=!0,this.getZr().wakeUp())},_.internalField=(Xy=function(t){var e=t._scheduler;e.restorePipelines(t._model),e.prepareStageTasks(),Yy(t,!0),Yy(t,!1),e.plan()},Yy=function(t,r){for(var o=t._model,a=t._scheduler,s=r?t._componentsViews:t._chartsViews,l=r?t._componentsMap:t._chartsMap,u=t._zr,h=t._api,e=0;es.get("hoverLayerThreshold")&&!p.node&&!p.worker&&s.eachSeries(function(t){t.preventUsingHoverLayer||(t=i._chartsMap[t.__viewId]).__alive&&t.eachRendered(function(t){t.states.emphasis&&(t.states.emphasis.hoverLayer=!0)})}),Ly.trigger("series:afterupdate",t,e,n)},sm=function(t){t[Fy]=!0,t.getZr().wakeUp()},lm=function(t){t[Fy]&&(t.getZr().storage.traverse(function(t){Mh(t)||pm(t)}),t[Fy]=!1)},om=function(n){return a(t,e=Wp),t.prototype.getCoordinateSystems=function(){return n._coordSysMgr.getCoordinateSystems()},t.prototype.getComponentByElement=function(t){for(;t;){var e=t.__ecComponentInfo;if(null!=e)return n._model.getComponent(e.mainType,e.index);t=t.parent}},t.prototype.enterEmphasis=function(t,e){xl(t,e),sm(n)},t.prototype.leaveEmphasis=function(t,e){wl(t,e),sm(n)},t.prototype.enterBlur=function(t){fl(t,ul),sm(n)},t.prototype.leaveBlur=function(t){bl(t),sm(n)},t.prototype.enterSelect=function(t){Sl(t),sm(n)},t.prototype.leaveSelect=function(t){Ml(t),sm(n)},t.prototype.getModel=function(){return n.getModel()},t.prototype.getViewOfComponentModel=function(t){return n.getViewOfComponentModel(t)},t.prototype.getViewOfSeriesModel=function(t){return n.getViewOfSeriesModel(t)},new t(n);function t(){return null!==e&&e.apply(this,arguments)||this}var e},void(am=function(i){function r(t,e){for(var n=0;ne[1]&&(e[1]=t[1])},I0.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},I0.prototype.getExtent=function(){return this._extent.slice()},I0.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(e)||(n[1]=e)},I0.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},I0.prototype.isBlank=function(){return this._isBlank},I0.prototype.setBlank=function(t){this._isBlank=t};var k0=I0;function I0(t){this._setting=t||{},this._extent=[1/0,-1/0]}qo(k0);var A0=0,P0=(L0.createByAxisModel=function(t){var t=t.option,e=t.data,e=e&&B(e,O0);return new L0({categories:e,needCollect:!e,deduplication:!1!==t.dedplication})},L0.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},L0.prototype.parseAndCollect=function(t){var e,n,i=this._needCollect;return E(t)||i?(i&&!this._deduplication?(n=this.categories.length,this.categories[n]=t):null==(n=(e=this._getOrCreateMap()).get(t))&&(i?(n=this.categories.length,this.categories[n]=t,e.set(t,n)):n=NaN),n):t},L0.prototype._getOrCreateMap=function(){return this._map||(this._map=F(this.categories))},L0);function L0(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++A0}function O0(t){return R(t)&&null!=t.value?t.value:t+""}function R0(t,e,n,i){var r={},o=t[1]-t[0],o=r.interval=po(o/e,!0),e=(null!=n&&oi[1]&&(i[0]=i[1]),r}function N0(t){return oo(t)+2}function F0(t,e,n){t[e]=Math.max(Math.min(t[e],n[1]),n[0])}function B0(t,e){return t>=e[0]&&t<=e[1]}function z0(t,e){return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])}function E0(t,e){return t*(e[1]-e[0])+e[0]}a(G0,V0=k0),G0.prototype.parse=function(t){return null==t?NaN:E(t)?this._ordinalMeta.getOrdinal(t):Math.round(t)},G0.prototype.contain=function(t){return B0(t=this.parse(t),this._extent)&&null!=this._ordinalMeta.categories[t]},G0.prototype.normalize=function(t){return z0(t=this._getTickNumber(this.parse(t)),this._extent)},G0.prototype.scale=function(t){return t=Math.round(E0(t,this._extent)),this.getRawOrdinalNumber(t)},G0.prototype.getTicks=function(){for(var t=[],e=this._extent,n=e[0];n<=e[1];)t.push({value:n}),n++;return t},G0.prototype.getMinorTicks=function(t){},G0.prototype.setSortInfo=function(t){if(null==t)this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;else{for(var e=t.ordinalNumbers,n=this._ordinalNumbersByTick=[],i=this._ticksByOrdinalNumber=[],r=0,o=this._ordinalMeta.categories.length,a=Math.min(o,e.length);r=t},G0.prototype.getOrdinalMeta=function(){return this._ordinalMeta},G0.prototype.calcNiceTicks=function(){},G0.prototype.calcNiceExtent=function(){},G0.type="ordinal";var V0,H0=G0;function G0(t){var t=V0.call(this,t)||this,e=(t.type="ordinal",t.getSetting("ordinalMeta"));return z(e=e||new P0({}))&&(e=new P0({categories:B(e,function(t){return R(t)?t.value:t})})),t._ordinalMeta=e,t._extent=t.getSetting("extent")||[0,e.categories.length-1],t}k0.registerClass(H0);var W0,U0=ro,X0=(a(Y0,W0=k0),Y0.prototype.parse=function(t){return t},Y0.prototype.contain=function(t){return B0(t,this._extent)},Y0.prototype.normalize=function(t){return z0(t,this._extent)},Y0.prototype.scale=function(t){return E0(t,this._extent)},Y0.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=parseFloat(t)),isNaN(e)||(n[1]=parseFloat(e))},Y0.prototype.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1]),this.setExtent(e[0],e[1])},Y0.prototype.getInterval=function(){return this._interval},Y0.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=N0(t)},Y0.prototype.getTicks=function(t){var e=this._interval,n=this._extent,i=this._niceExtent,r=this._intervalPrecision,o=[];if(e){n[0]s&&o.push(t?{value:U0(s+e,r)}:{value:n[1]})}return o},Y0.prototype.getMinorTicks=function(t){for(var e=this.getTicks(!0),n=[],i=this.getExtent(),r=1;ri[0]&&h=M[0]&&d<=M[1]&&a++)}u=(M[1]-M[0])/b;if(1.5*u=M[0]&&t.value<=M[1]&&!t.notAdd})}),function(t){return 0n&&(this._approxInterval=n),tv.length),t=Math.min(function(t,e,n,i){for(;n>>1;t[r][1]>1^-(1&s),l=(l=t.charCodeAt(a+1)-64)>>1^-(1&l);i.push([(r=s+=r)/n,(o=l+=o)/n])}return i}function Wv(t,o){var e,n,r;return B(pt((t=(e=t).UTF8Encoding?(null==(r=(n=e).UTF8Scale)&&(r=1024),O(n.features,function(t){var e=t.geometry,n=e.encodeOffsets,i=e.coordinates;if(n)switch(e.type){case"LineString":e.coordinates=Gv(i,n,r);break;case"Polygon":case"MultiLineString":Hv(i,n,r);break;case"MultiPolygon":O(i,function(t,e){return Hv(t,n[e],r)})}}),n.UTF8Encoding=!1,n):e).features,function(t){return t.geometry&&t.properties&&0l&&(l=s[h],u=h);++o[u],s[u]=0,++a}return B(o,function(t){return t/i})}(t,n)[e]||0},getPixelPrecision:so,getPrecision:oo,getPrecisionSafe:ao,isNumeric:go,isRadianAroundZero:function(t){return-1e-4':'':{renderMode:r,content:"{"+(t.markerId||"markerX")+"|} ",style:"subItem"===i?{width:4,height:4,borderRadius:2,backgroundColor:n}:{width:10,height:10,borderRadius:5,backgroundColor:n}}:""},normalizeCssArray:jc,toCamelCase:function(t,e){return t=(t||"").toLowerCase().replace(/-(.)/g,function(t,e){return e.toUpperCase()}),t=e?t&&t.charAt(0).toUpperCase()+t.slice(1):t},truncateText:ia}),tc=Object.freeze({__proto__:null,bind:dt,clone:y,curry:ft,defaults:at,each:O,extend:L,filter:pt,indexOf:D,inherits:lt,isArray:z,isFunction:m,isObject:R,isString:E,map:B,merge:rt,reduce:ct}),Uv=Po();function Xv(e,t){t=B(t,function(t){return e.scale.parse(t)});return"time"===e.type&&0l[1],h(n[0].coord,l[0])&&(t?n[0].coord=l[0]:n.shift()),t&&h(l[0],n[0].coord)&&n.unshift({coord:l[0]}),h(l[1],i.coord)&&(t?i.coord=l[1]:n.pop()),t)&&h(i.coord,l[1])&&n.push({coord:l[1]}),u},e_.prototype.getMinorTicksCoords=function(){var t;return"ordinal"===this.scale.type?[]:(t=this.model.getModel("minorTick").get("splitNumber"),B(this.scale.getMinorTicks(t=0=u}}for(var o,a=this.__startIndex;ar[0]){for(l=0;lt);l++);s=i[r[l]]}r.splice(l+1,0,t),(i[t]=e).virtual||(s?(n=s.dom).nextSibling?a.insertBefore(e.dom,n.nextSibling):a.appendChild(e.dom):a.firstChild?a.insertBefore(e.dom,a.firstChild):a.appendChild(e.dom)),e.painter||(e.painter=this)}},w.prototype.eachLayer=function(t,e){for(var n=this._zlevelList,i=0;i":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},kx=(Ix.prototype.evaluate=function(t){var e=typeof t;return E(e)?this._condVal.test(t):!!yt(e)&&this._condVal.test(t+"")},Ix);function Ix(t){null==(this._condVal=E(t)?new RegExp(t):bt(t)?t:null)&&f("")}Px.prototype.evaluate=function(){return this.value};var Ax=Px;function Px(){}Ox.prototype.evaluate=function(){for(var t=this.children,e=0;e