!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 _=function(t,e){return(_=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 u(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}_(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var x=function(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1},p=new function(){this.browser=new x,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:!p.hasGlobalWindow||"Deno"in window?(p.node=!0,p.svgSupported=!0):(J=navigator.userAgent,re=(Gt=p).browser,rt=J.match(/Firefox\/([\d.]+)/),L=J.match(/MSIE\s([\d.]+)/)||J.match(/Trident\/.+?rv:(([\d.]+))/),Q=J.match(/Edge?\/([\d.]+)/),J=/micromessenger/i.test(J),rt&&(re.firefox=!0,re.version=rt[1]),L&&(re.ie=!0,re.version=L[1]),Q&&(re.edge=!0,re.version=Q[1],re.newEdge=18<+Q[1].split(".")[0]),J&&(re.weChat=!0),Gt.svgSupported="undefined"!=typeof SVGRect,Gt.touchEventsSupported="ontouchstart"in window&&!re.ie&&!re.edge,Gt.pointerEventsSupported="onpointerdown"in window&&(re.edge||re.ie&&11<=+re.version),Gt.domSupported="undefined"!=typeof document,rt=document.documentElement.style,Gt.transform3dSupported=(re.ie&&"transition"in rt||re.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in rt)&&!("OTransition"in rt),Gt.transformSupported=Gt.transform3dSupported||re.ie&&9<=+re.version);var j="12px sans-serif";var b,w,S=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 ge(t){return"CANVAS"===t.nodeName.toUpperCase()}var ye=/([&<>"'])/g,me={"&":"&","<":"<",">":">",'"':""","'":"'"};function ve(t){return null==t?"":(t+"").replace(ye,function(t,e){return me[e]})}var _e=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,xe=[],be=p.browser.firefox&&+p.browser.version.split(".")[0]<39;function we(t,e,n,i){return n=n||{},i?Se(t,e,n):be&&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):Se(t,e,n),n}function Se(t,e,n){if(p.domSupported&&t.getBoundingClientRect){var i,r=e.clientX,e=e.clientY;if(ge(t))return i=t.getBoundingClientRect(),n.zrX=r-i.left,void(n.zrY=e-i.top);if(fe(xe,t,r,e))return n.zrX=xe[0],void(n.zrY=xe[1])}n.zrX=n.zrY=0}function Me(t){return t||window.event}function Te(t,e,n){var i;return null==(e=Me(e)).zrX&&((i=e.type)&&0<=i.indexOf("touch")?(i=("touchend"!==i?e.targetTouches:e.changedTouches)[0])&&we(t,i,e,n):(we(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},Ze.prototype.clone=function(){return new Ze(this.x,this.y,this.width,this.height)},Ze.prototype.copy=function(t){Ze.copy(this,t)},Ze.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},Ze.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},Ze.prototype.isZero=function(){return 0===this.width||0===this.height},Ze.create=function(t){return new Ze(t.x,t.y,t.width,t.height)},Ze.copy=function(t,e){t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height},Ze.applyTransform=function(t,e,n){var i,r,o,a;n?n[1]<1e-5&&-1e-5t.getWidth()||n<0||n>t.getHeight()}E(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(a){on.prototype[a]=function(t){var e,n,i=t.zrX,r=t.zrY,o=ln(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<$t(this._downPoint,[t.zrX,t.zrY]))return;this._downPoint=null}this.dispatchToElement(e,a,t)}});var un=32,hn=7;function cn(t,e,n,i){var r=e+1;if(r===n)return 1;if(i(t[r++],t[e])<0){for(;r>>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 gn(A,L){var P,O,R=hn,N=0,E=[];function e(t){var e=P[t],n=O[t],i=P[t+1],r=O[t+1],t=(O[t]=n+r,t===N-3&&(P[t+1]=P[t+2],O[t+1]=O[t+2]),N--,fn(A[i],A,e,n,0,L));if(e+=t,0!=(n-=t)&&0!==(r=dn(A[e+n-1],A,i,r,r-1,L)))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=cn(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),di(t,e),e):void ui(e,0,0,0,1):7===i||9===i?0<=(r=parseInt(n.slice(1,7),16))&&r<=16777215?(ui(e,(16711680&r)>>16,(65280&r)>>8,255&r,9===i?parseInt(n.slice(7),16)/255:1),di(t,e),e):void ui(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?ui(e,+a[0],+a[1],+a[2],1):ui(e,0,0,0,1);s=ai(a.pop());case"rgb":return 3<=a.length?(ui(e,oi(a[0]),oi(a[1]),oi(a[2]),3===a.length?s:ai(a[3])),di(t,e),e):void ui(e,0,0,0,1);case"hsla":return 4!==a.length?void ui(e,0,0,0,1):(a[3]=ai(a[3]),gi(a,e),di(t,e),e);case"hsl":return 3!==a.length?void ui(e,0,0,0,1):(gi(a,e),di(t,e),e);default:return}}ui(e,0,0,0,1)}}function gi(t,e){var n=(parseFloat(t[0])%360+360)%360/360,i=ai(t[1]),r=ai(t[2]),i=r<=.5?r*(i+1):r+i-r*i,r=2*r-i;return ui(e=e||[],ii(255*si(r,i,n+1/3)),ii(255*si(r,i,n)),ii(255*si(r,i,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}function yi(t,e){var n=fi(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?Oi:t[c],(Pi(l)||p)&&(f=f||(this._additiveValue=[])),this.discrete?t[c]=(r<1?n:i).rawValue:Pi(l)?(1===l?Ci:function(t,e,n,i){for(var r=e.length,o=r&&e[0].length,a=0;athis._sleepAfterStill)&&this.animation.stop()},qr.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},qr.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},qr.prototype.refreshHover=function(){this._needsRefreshHover=!0},qr.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&"canvas"===this.painter.getType()&&this.painter.refreshHover())},qr.prototype.resize=function(t){this._disposed||(this.painter.resize((t=t||{}).width,t.height),this.handler.resize())},qr.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},qr.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},qr.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},qr.prototype.setCursorStyle=function(t){this._disposed||this.handler.setCursorStyle(t)},qr.prototype.findHover=function(t,e){if(!this._disposed)return this.handler.findHover(t,e)},qr.prototype.on=function(t,e,n){return this._disposed||this.handler.on(t,e,n),this},qr.prototype.off=function(t,e){this._disposed||this.handler.off(t,e)},qr.prototype.trigger=function(t,e){this._disposed||this.handler.trigger(t,e)},qr.prototype.clear=function(){if(!this._disposed){for(var t=this.storage.getRoots(),e=0;el&&(l=s[h],u=h);++o[u],s[u]=0,++a}return B(o,function(t){return t/i})}function ao(t){var e=2*Math.PI;return(t%e+e)%e}function so(t){return-1e-4=n.maxIterations){e+=n.ellipsis;break}var s=0===a?function(t,e,n,i){for(var r=0,o=0,a=t.length;oo){M=n.lines.length;0i.width&&(o=e.split("\n"),c=!0),i.accumWidth=t):(t=da(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},o.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},o.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},o.prototype.arc=function(t,e,n,i,r,o){return this._drawPendingPt(),qa[0]=i,qa[1]=r,ja(qa,o),this.addData(Y.A,t,e,n,n,i=qa[0],(r=qa[1])-i,0,o?0:1),this._ctx&&this._ctx.arc(t,e,n,i,r,o),this._xi=Ga(r)*n+t,this._yi=Wa(r)*n+e,this},o.prototype.arcTo=function(t,e,n,i,r){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(t,e,n,i,r),this},o.prototype.rect=function(t,e,n,i){return this._drawPendingPt(),this._ctx&&this._ctx.rect(t,e,n,i),this.addData(Y.R,t,e,n,i),this},o.prototype.closePath=function(){this._drawPendingPt(),this.addData(Y.Z);var t=this._ctx,e=this._x0,n=this._y0;return t&&t.closePath(),this._xi=e,this._yi=n,this},o.prototype.fill=function(t){t&&t.fill(),this.toStatic()},o.prototype.stroke=function(t){t&&t.stroke(),this.toStatic()},o.prototype.len=function(){return this._len},o.prototype.setData=function(t){var e=t.length;this.data&&this.data.length===e||!Ya||(this.data=new Float32Array(e));for(var n=0;nu.length&&(this._expandData(),u=this.data);for(var h=0;hn||Ha(y)>i||c===e-1)&&(f=Math.sqrt(I*I+y*y),r=g,o=_);break;case Y.C:var m=t[c++],v=t[c++],g=t[c++],_=t[c++],x=t[c++],b=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=En(t,n,r,a,f),f=En(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,b,10),r=x,o=b;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=Wn(t,n,r,p),p=Wn(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++],b=t[c++],w=t[c++],S=t[c++],M=t[c++],T=t[c++],C=T+M;c+=1,d&&(a=Ga(M)*w+x,s=Wa(M)*S+b),f=Va(w,S)*Fa(Xa,Math.abs(T)),r=Ga(C)*w+x,o=Wa(C)*S+b;break;case Y.R:a=r=t[c++],s=o=t[c++];f=2*t[c++]+2*t[c++];break;case Y.Z:var I=a-r,y=s-o;f=Math.sqrt(I*I+y*y),r=a,o=s}0<=f&&(u+=l[h++]=f)}return this._pathLen=u},o.prototype.rebuildPath=function(t,e){var n,i,r,o,a,s,l,u,h=this.data,E=this._ux,z=this._uy,B=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=os[i=0]+t&&a<=os[1]+t?h:0;rMath.PI/2&&c<1.5*Math.PI?-h:h)}return l}(y,m,_,x,x+b,w,T,r);u=Math.cos(x+b)*v+y,h=Math.sin(x+b)*_+m;break;case ns.R:c=u=a[d++],p=h=a[d++];if(S=c+a[d++],M=p+a[d++],n){if($a(c,p,S,p,e,i,r)||$a(S,p,S,M,e,i,r)||$a(S,M,c,M,e,i,r)||$a(c,M,c,p,e,i,r))return!0}else l=(l+=es(S,p,S,M,i,r))+es(c,M,c,p,i,r);break;case ns.Z:if(n){if($a(u,h,c,p,e,i,r))return!0}else l+=es(u,h,c,p,i,r);u=c,h=p}}return n||(t=h,o=p,Math.abs(t-o)h,n=n.slice(0,h)),t&&a&&null!=p)for(var f=oa(p,o,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),g={},y=0;yi.len()&&(ue)return t[i];return t[n-1]}var id,rd="\0_ec_inner",od=(u(s,id=Mc),s.prototype.init=function(t,e,n,i,r,o){i=i||{},this.option=null,this._theme=new Mc(i),this._locale=new Mc(r),this._optionManager=o},s.prototype.setOption=function(t,e,n){e=ld(e);this._optionManager.setOption(t,n,e),this._resetOption(null,e)},s.prototype.resetOption=function(t,e){return this._resetOption(t,ld(e))},s.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)):Qp(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&&E(n,function(t){i=!0,this._mergeOption(t,e)},this),i},s.prototype.mergeOption=function(t){this._mergeOption(t,null)},s.prototype._mergeOption=function(i,t){var r=this.option,h=this._componentsMap,c=this._componentsCount,n=[],o=N(),p=t&&t.replaceMergeMainTypeMap;Hp(this).datasetMap=N(),E(i,function(t,e){null!=t&&(g.hasClass(e)?e&&(n.push(e),o.set(e,!0)):r[e]=null==r[e]?y(t):d(r[e],t,!0))}),p&&p.each(function(t,e){g.hasClass(e)&&!o.get(e)&&(n.push(e),o.set(e,!0))}),g.topologicalTravel(n,g.getAllClassMainTypes(),function(o){var a,t=function(t,e,n){return(e=(e=jp.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=(Do(e,o,g),r[o]=null,h.set(o,null),c.set(o,0),[]),l=[],u=0;E(e,function(t,e){var n=t.existing,i=t.newOption;if(i){var r=g.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=P({componentIndex:e},t.keyInfo),P(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&&Kp(this)},this),this._seriesIndices||Kp(this)},s.prototype.getOption=function(){var a=y(this.option);return E(a,function(t,e){if(g.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[rd],a},s.prototype.getTheme=function(){return this._theme},s.prototype.getLocaleModel=function(){return this._locale},s.prototype.setUpdatePayload=function(t){this._payload=t},s.prototype.getUpdatePayload=function(){return this._payload},s.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}},l.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=[]},l.prototype.count=function(){return this._count},l.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},l.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])&&(b=!1)}b&&(a[s++]=e.getRawIndex(f))}return sy[1]&&(y[1]=g)}}}},l.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(jf(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},l.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)},h.prototype.restoreData=function(){this.dataTask.dirty()},h.prototype.getColorFromPalette=function(t,e,n){var i=this.ecModel;return td.prototype.getColorFromPalette.call(this,t,e,n)||i.getColorFromPalette(t,e,n)},h.prototype.coordDimToDataDim=function(t){return this.getRawData().mapDimensionsAll(t)},h.prototype.getProgressive=function(){return this.get("progressive")},h.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},h.prototype.select=function(t,e){this._innerSelect(this.getData(e),t)},h.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 gg(e,n){E(Nt(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(t){e.wrapMethod(t,pt(yg,n))})}function yg(t,e){t=mg(t);return t&&t.setOutputEnd((e||this).count()),e}function mg(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}at(hg,bc),at(hg,td),Uo(hg,g);_g.prototype.init=function(t,e){},_g.prototype.render=function(t,e,n,i){},_g.prototype.dispose=function(t,e){},_g.prototype.updateView=function(t,e,n,i){},_g.prototype.updateLayout=function(t,e,n,i){},_g.prototype.updateVisual=function(t,e,n,i){},_g.prototype.toggleBlurSeries=function(t,e,n){},_g.prototype.eachRendered=function(t){var e=this.group;e&&e.traverse(t)};var vg=_g;function _g(){this.group=new Gr,this.uid=Ic("viewComponent")}function xg(){var o=Lo();return function(t){var e=o(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"}}Ho(vg),Zo(vg);var bg=Lo(),wg=xg(),Sg=(Mg.prototype.init=function(t,e){},Mg.prototype.render=function(t,e,n,i){},Mg.prototype.highlight=function(t,e,n,i){t=t.getData(i&&i.dataType);t&&Cg(t,i,"emphasis")},Mg.prototype.downplay=function(t,e,n,i){t=t.getData(i&&i.dataType);t&&Cg(t,i,"normal")},Mg.prototype.remove=function(t,e){this.group.removeAll()},Mg.prototype.dispose=function(t,e){},Mg.prototype.updateView=function(t,e,n,i){this.render(t,e,n,i)},Mg.prototype.updateLayout=function(t,e,n,i){this.render(t,e,n,i)},Mg.prototype.updateVisual=function(t,e,n,i){this.render(t,e,n,i)},Mg.prototype.eachRendered=function(t){Kh(this.group,t)},Mg.markUpdateMethod=function(t,e){bg(t).updateMethod=e},Mg.protoInitialize=void(Mg.prototype.type="chart"),Mg);function Mg(){this.group=new Gr,this.uid=Ic("viewChart"),this.renderTask=df({plan:Ig,reset:kg}),this.renderTask.context={view:this}}function Tg(t,e,n){t&&Vl(t)&&("emphasis"===e?Sl:Ml)(t,n)}function Cg(e,t,n){var i,r=Ao(e,t),o=t&&null!=t.highlightKey?(t=t.highlightKey,i=null==(i=Zs[t])&&qs<=32?Zs[t]=qs++:i):null;null!=r?E(_o(r),function(t){Tg(e.getItemGraphicEl(t),n,o)}):e.eachItemGraphicEl(function(t){Tg(t,n,o)})}function Ig(t){return wg(t.model)}function kg(t){var e=t.model,n=t.ecModel,i=t.api,r=t.payload,o=e.pipelineContext.progressiveRender,t=t.view,a=r&&bg(r).updateMethod,o=o?"incrementalPrepareRender":a&&t[a]?a:"render";return"render"!==o&&t[o](e,n,i,r),Dg[o]}Ho(Sg),Zo(Sg);var Dg={incrementalPrepareRender:{progress:function(t,e){e.view.incrementalRender(t,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(t,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}};function Ag(t,r,o){var a,s,l,u,h,c=0,p=0,d=null;function f(){p=(new Date).getTime(),d=null,t.apply(l,u||[])}r=r||0;function e(){for(var t=[],e=0;en.blockIndex?n.step:null,modBy:null!=(t=i&&i.modDataCount)?Math.ceil(t/e):null,modDataCount:t}},Fg.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},Fg.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}},Fg.prototype.restorePipelines=function(t){var i=this,r=i._pipelineMap=N();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)})},Fg.prototype.prepareStageTasks=function(){var n=this._stageTaskMap,i=this.api.getModel(),r=this.api;E(this._allHandlers,function(t){var e=n.get(t.uid)||n.set(t.uid,{});Tt(!(t.reset&&t.overallReset),""),t.reset&&this._createSeriesStageTask(t,e,i,r),t.overallReset&&this._createOverallStageTask(t,e,i,r)},this)},Fg.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)},Fg.prototype.performDataProcessorTasks=function(t,e){this._performStageTasks(this._dataProcessorHandlers,t,e,{block:!0})},Fg.prototype.performVisualTasks=function(t,e,n){this._performStageTasks(this._visualHandlers,t,e,n)},Fg.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))}E(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},Fg.prototype.performSeriesTasks=function(t){var e;t.eachSeries(function(t){e=t.dataTask.perform()||e}),this.unfinished=e||this.unfinished},Fg.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())})},Fg.prototype.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)},Fg.prototype._createSeriesStageTask=function(n,t,i,r){var o=this,a=t.seriesTaskMap,s=t.seriesTaskMap=N(),t=n.seriesType,e=n.getTargetSeries;function l(t){var e=t.uid,e=s.set(e,a&&a.get(e)||df({plan:Ug,reset:Xg,count:Zg}));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)},Fg.prototype._createOverallStageTask=function(t,e,n,i){var r=this,o=e.overallTask=e.overallTask||df({reset:Vg}),a=(o.context={ecModel:n,api:i,overallReset:t.overallReset,scheduler:r},o.agentStubMap),s=o.agentStubMap=N(),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,df({reset:Gg,onDirty:Hg})));e.context={model:t,overallProgress:u},e.agent=o,e.__block=u,r._pipe(t,e)}Tt(!t.createOnAllSeries,""),e?n.eachRawSeriesByType(e,c):l?l(n,i).each(c):(u=!1,E(n.getSeries(),c)),h&&o.dirty()},Fg.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},Fg.wrapStageHandler=function(t,e){return(t=k(t)?{overallReset:t,seriesType:function(t){jg=null;try{t(Kg,$g)}catch(t){}return jg}(t)}:t).uid=Ic("stageHandler"),e&&(t.visualType=e),t};var Bg=Fg;function Fg(t,e,n,i){this._stageTaskMap=N(),this.ecInstance=t,this.api=e,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}function Vg(t){t.overallReset(t.ecModel,t.api,t.payload)}function Gg(t){return t.overallProgress&&Wg}function Wg(){this.agent.dirty(),this.getDownstream().dirty()}function Hg(){this.agent&&this.agent.dirty()}function Ug(t){return t.plan?t.plan(t.model,t.ecModel,t.api,t.payload):null}function Xg(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 As({shape:{x:0,y:0,width:t,height:n},style:{fill:i.connectedBackgroundColor}})),E(p,function(t){t=new ws({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},c.prototype.convertToPixel=function(t,e){return g0(this,"convertToPixel",t,e)},c.prototype.convertFromPixel=function(t,e){return g0(this,"convertFromPixel",t,e)},c.prototype.containPixel=function(t,i){var r;if(!this._disposed)return E(Oo(this._model,t),function(t,n){0<=n.indexOf("Models")&&E(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},c.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)}}},c.prototype.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},c.prototype.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]},c.prototype._initEvents=function(){var t,n,i,s=this;E(E0,function(a){function t(t){var n,e,i,r=s.getModel(),o=t.target;"globalout"===a?n={}:o&&sy(o,function(t){var e,t=D(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=P({},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)}),E(B0,function(t,e){s._messageCenter.on(e,function(t){this.trigger(e,t)},s)}),E(["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?(ay("map","selectchanged",n,e,t),ay("pie","selectchanged",n,e,t)):"select"===t.fromAction?(ay("map","selected",n,e,t),ay("pie","selected",n,e,t)):"unselect"===t.fromAction&&(ay("map","unselected",n,e,t),ay("pie","unselected",n,e,t))})},c.prototype.isDisposed=function(){return this._disposed},c.prototype.clear=function(){this._disposed?this.id:this.setOption({series:[]},!0)},c.prototype.dispose=function(){var t,e,n;this._disposed?this.id:(this._disposed=!0,this.getDom()&&zo(this.getDom(),Z0,""),e=(t=this)._api,n=t._model,E(t._componentsViews,function(t){t.dispose(n,e)}),E(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 U0[t.id])},c.prototype.resize=function(t){if(!this[t0])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[e0]&&(null==n&&(n=this[e0].silent),e=!0,this[e0]=null),this[t0]=!0;try{e&&c0(this),f0.update.call(this,{type:"resize",animation:P({duration:0},t&&t.animation)})}catch(t){throw this[t0]=!1,t}this[t0]=!1,v0.call(this,n),_0.call(this,n)}}},c.prototype.showLoading=function(t,e){this._disposed?this.id:(O(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),H0[t]&&(t=H0[t](this._api,e),e=this._zr,this._loadingFX=t,e.add(t)))},c.prototype.hideLoading=function(){this._disposed?this.id:(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},c.prototype.makeActionFromEvent=function(t){var e=P({},t);return e.type=B0[t.type],e},c.prototype.dispatchAction=function(t,e){var n;this._disposed?this.id:(O(e)||(e={silent:!!e}),z0[t.type]&&this._model&&(this[t0]?this._pendingActions.push(t):(n=e.silent,m0.call(this,t,n),(t=e.flush)?this._zr.flush():!1!==t&&p.browser.weChat&&this._throttledZrFlush(),v0.call(this,n),_0.call(this,n))))},c.prototype.updateLabelLayout=function(){Qy.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},c.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())},c.internalField=(c0=function(t){var e=t._scheduler;e.restorePipelines(t._model),e.prepareStageTasks(),p0(t,!0),p0(t,!1),e.plan()},p0=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)})}),Qy.trigger("series:afterupdate",t,e,n)},I0=function(t){t[n0]=!0,t.getZr().wakeUp()},k0=function(t){t[n0]&&(t.getZr().storage.traverse(function(t){Ah(t)||P0(t)}),t[n0]=!1)},T0=function(n){return u(t,e=ud),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){Sl(t,e),I0(n)},t.prototype.leaveEmphasis=function(t,e){Ml(t,e),I0(n)},t.prototype.enterBlur=function(t){yl(t,cl),I0(n)},t.prototype.leaveBlur=function(t){Tl(t),I0(n)},t.prototype.enterSelect=function(t){Cl(t),I0(n)},t.prototype.leaveSelect=function(t){Il(t),I0(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(C0=function(i){function r(t,e){for(var n=0;ne[1]&&(e[1]=t[1])},Km.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},Km.prototype.getExtent=function(){return this._extent.slice()},Km.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(e)||(n[1]=e)},Km.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},Km.prototype.isBlank=function(){return this._isBlank},Km.prototype.setBlank=function(t){this._isBlank=t};var jm=Km;function Km(t){this._setting=t||{},this._extent=[1/0,-1/0]}Zo(jm);var $m=0,Qm=(Jm.createByAxisModel=function(t){var t=t.option,e=t.data,e=e&&B(e,tv);return new Jm({categories:e,needCollect:!e,deduplication:!1!==t.dedplication})},Jm.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},Jm.prototype.parseAndCollect=function(t){var e,n,i=this._needCollect;return V(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},Jm.prototype._getOrCreateMap=function(){return this._map||(this._map=N(this.categories))},Jm);function Jm(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++$m}function tv(t){return O(t)&&null!=t.value?t.value:t+""}function ev(t){return"interval"===t.type||"log"===t.type}function nv(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 iv(t){var e=Math.pow(10,co(t)),t=t/e;return t?2===t?t=3:3===t?t=5:t*=2:t=1,eo(t*e)}function rv(t){return no(t)+2}function ov(t,e,n){t[e]=Math.max(Math.min(t[e],n[1]),n[0])}function av(t,e){return t>=e[0]&&t<=e[1]}function sv(t,e){return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])}function lv(t,e){return t*(e[1]-e[0])+e[0]}u(cv,uv=jm),cv.prototype.parse=function(t){return null==t?NaN:V(t)?this._ordinalMeta.getOrdinal(t):Math.round(t)},cv.prototype.contain=function(t){return av(t=this.parse(t),this._extent)&&null!=this._ordinalMeta.categories[t]},cv.prototype.normalize=function(t){return sv(t=this._getTickNumber(this.parse(t)),this._extent)},cv.prototype.scale=function(t){return t=Math.round(lv(t,this._extent)),this.getRawOrdinalNumber(t)},cv.prototype.getTicks=function(){for(var t=[],e=this._extent,n=e[0];n<=e[1];)t.push({value:n}),n++;return t},cv.prototype.getMinorTicks=function(t){},cv.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},cv.prototype.getOrdinalMeta=function(){return this._ordinalMeta},cv.prototype.calcNiceTicks=function(){},cv.prototype.calcNiceExtent=function(){},cv.type="ordinal";var uv,hv=cv;function cv(t){var t=uv.call(this,t)||this,e=(t.type="ordinal",t.getSetting("ordinalMeta"));return F(e=e||new Qm({}))&&(e=new Qm({categories:B(e,function(t){return O(t)?t.value:t})})),t._ordinalMeta=e,t._extent=t.getSetting("extent")||[0,e.categories.length-1],t}jm.registerClass(hv);var pv,dv=eo,fv=(u(gv,pv=jm),gv.prototype.parse=function(t){return t},gv.prototype.contain=function(t){return av(t,this._extent)},gv.prototype.normalize=function(t){return sv(t,this._extent)},gv.prototype.scale=function(t){return lv(t,this._extent)},gv.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=parseFloat(t)),isNaN(e)||(n[1]=parseFloat(e))},gv.prototype.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1]),this.setExtent(e[0],e[1])},gv.prototype.getInterval=function(){return this._interval},gv.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=rv(t)},gv.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:dv(s+e,r)}:{value:n[1]})}return o},gv.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])/w;if(1.5*u=M[0]&&t.value<=M[1]&&!t.notAdd})}),function(t){return 0n&&(this._approxInterval=n),Lv.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 S_(t,o){var e,n,r;return B(ut((t=(e=t).UTF8Encoding?(null==(r=(n=e).UTF8Scale)&&(r=1024),E(n.features,function(t){var e=t.geometry,n=e.encodeOffsets,i=e.coordinates;if(n)switch(e.type){case"LineString":e.coordinates=w_(i,n,r);break;case"Polygon":case"MultiLineString":b_(i,n,r);break;case"MultiPolygon":E(i,function(t,e){return b_(t,n[e],r)})}}),n.UTF8Encoding=!1,n):e).features,function(t){return t.geometry&&t.properties&&0':'':{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:cp,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:function(t,e,n,i,r){var o={};return ra(o,t,e,n,i,r),o.text}}),gc=Object.freeze({__proto__:null,bind:ct,clone:y,curry:pt,defaults:z,each:E,extend:P,filter:ut,indexOf:I,inherits:ot,isArray:F,isFunction:k,isObject:O,isString:V,map:B,merge:d,reduce:lt}),M_=Lo();function T_(e,t){t=B(t,function(t){return e.scale.parse(t)});return"time"===e.type&&0=e[0]&&t<=e[1]}),function(t){var e={value:t};return{formattedLabel:i(e),rawLabel:n.scale.getLabel(e),tickValue:t}})}):"category"===n.type?(t=(s=n).getLabelModel(),a=k_(s,t),!t.get("show")||s.scale.isBlank()?{labels:[],labelCategoryInterval:a.labelCategoryInterval}:a):(t=(r=n).scale.getTicks(),o=Qv(r),{labels:B(t,function(t,e){return{level:t.level,formattedLabel:o(t,e),rawLabel:r.scale.getLabel(t),tickValue:t.value}})})}function I_(t,e){var n,i,r,o,a,s,l=t.getTickModel().get("customValues");return l?(n=t.scale.getExtent(),{ticks:ut(T_(t,l),function(t){return t>=n[0]&&t<=n[1]})}):"category"===t.type?(l=e,o=D_(e=t,"ticks"),a=t_(l),(s=A_(o,a))||(l.get("show")&&!e.scale.isBlank()||(i=[]),i=k(a)?O_(e,a,!0):"auto"===a?(s=k_(e,e.getLabelModel()),r=s.labelCategoryInterval,B(s.labels,function(t){return t.tickValue})):P_(e,r=a,!0),L_(o,a,{ticks:i,tickCategoryInterval:r}))):{ticks:B(t.scale.getTicks(),function(t){return t.value})}}function k_(t,e){var n,i=D_(t,"labels"),e=t_(e),r=A_(i,e);return r||L_(i,e,{labels:k(e)?O_(t,e):P_(t,n="auto"===e?null!=(i=M_(r=t).autoInterval)?i:M_(r).autoInterval=r.calculateCategoryInterval():e),labelCategoryInterval:n})}function D_(t,e){return M_(t)[e]||(M_(t)[e]=[])}function A_(t,e){for(var n=0;nl[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},N_.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)}},v.prototype.eachLayer=function(t,e){for(var n=this._zlevelList,i=0;ie&&(e=t[n]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,n=0;n=r.r0?"endArc":"startArc":r.endAngle>=r.startAngle?"endAngle":"startAngle":a?0<=r.height?"bottom":"top":0<=r.width?"right":"left"),h=ec(i),l=(tc(t,h,{labelFetcher:o,labelDataIndex:n,defaultText:X1(o.getData(),n),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:u}),t.getTextContent()),h=(s&&l&&(s=i.get(["label","position"]),t.textConfig.inside="middle"===s||null,function(t,e,n,i){if(G(i))t.setTextConfig({rotation:i});else if(F(e))t.setTextConfig({rotation:0});else{var r,i=t.shape,o=i.clockwise?i.startAngle:i.endAngle,a=i.clockwise?i.endAngle:i.startAngle,s=(o+a)/2,i=n(e);switch(i){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":r=s;break;case"startAngle":case"insideStartAngle":r=o;break;case"endAngle":case"insideEndAngle":r=a;break;default:return t.setTextConfig({rotation:0})}n=1.5*Math.PI-r;"middle"===i&&n>Math.PI/2&&n<1.5*Math.PI&&(n-=Math.PI),t.setTextConfig({rotation:n})}}(t,"outside"===s?u:s,ux(a),i.get(["label","rotate"]))),u=l,s=h,a=o.getRawValue(n),l=function(t){return Y1(e,t)},u&&((u=lc(u)).prevValue=u.value,u.value=a,a=s.normal,u.valueAnimation=a.get("valueAnimation"),u.valueAnimation)&&(u.precision=a.get("precision"),u.defaultInterpolatedText=l,u.statesModels=s),i.getModel(["emphasis"]));Nl(t,h.get("focus"),h.get("blurScope"),h.get("disabled")),Bl(t,i),null!=(o=r).startAngle&&null!=o.endAngle&&o.startAngle===o.endAngle&&(t.style.fill="none",t.style.stroke="none",E(t.states,function(t){t.style&&(t.style.fill=t.style.stroke="none")}))}var cx,px=function(){},dx=(u(fx,cx=fs),fx.prototype.getDefaultShape=function(){return new px},fx.prototype.buildPath=function(t,e){for(var n=e.points,i=this.baseDimIdx,r=1-this.baseDimIdx,o=[],a=[],s=this.barWidth,l=0;le[u-1].coord&&(e.reverse(),h.reverse()),function(t,e){var n,i,r=[],o=t.length;function a(t,e,n){var i=t.coord;return{coord:n,color:_i((n-i)/(e.coord-i),[t.color,e.color])}}for(var s=0;si)return;return 1}(a,e))return r=e.mapDimension(a.dim),o={},E(a.getViewLabels(),function(t){t=a.scale.getRawOrdinalNumber(t.tickValue);o[t]=1}),function(t){return!o.hasOwnProperty(e.get(r,t))}}}function tb(t){for(var e,n,i=t.length/2;0l?x:_,(g=Math.abs(d.label.y-l))>=f.maxY&&(m=d.label.x-s-d.len2*h,y=u+d.len,m=Math.abs(m)t.unconstrainedWidth)?null:s,i.setStyle("width",l)),u=i.getBoundingRect(),r.width=u.width,e=(i.style.margin||0)+2.1,r.height=u.height+e,r.y-=(r.height-a)/2)}function yb(t){return"center"===t.position}function mb(t){var S,M,T=t.getData(),C=[],I=!1,k=(t.get("minShowLabelAngle")||0)*db,e=T.getLayout("viewRect"),D=T.getLayout("r"),A=e.width,L=e.x,n=e.y,e=e.height;function P(t){t.ignore=!0}if(T.each(function(t){var e,n,i,r,o,a,s,l,u,h,c=T.getItemGraphicEl(t),p=c.shape,d=c.getTextContent(),f=c.getTextGuideLine(),t=T.getItemModel(t),g=t.getModel("label"),y=g.get("position")||t.get(["emphasis","label","position"]),m=g.get("distanceToLabelLine"),v=g.get("alignTo"),_=to(g.get("edgeDistance"),A),x=g.get("bleedMargin"),t=t.getModel("labelLine"),b=to(t.get("length"),A),w=to(t.get("length2"),A);Math.abs(p.endAngle-p.startAngle)=e.r0},Sb.type="pie";var bb,wb=Sb;function Sb(){var t=null!==bb&&bb.apply(this,arguments)||this;return t.ignoreLabelLineUpdate=!0,t}Tb.prototype.getAllNames=function(){var t=this._getRawData();return t.mapArray(t.getName)},Tb.prototype.containName=function(t){return 0<=this._getRawData().indexOfName(t)},Tb.prototype.indexOfName=function(t){return this._getDataWithEncodedVisual().indexOfName(t)},Tb.prototype.getItemVisual=function(t,e){return this._getDataWithEncodedVisual().getItemVisual(t,e)};var Mb=Tb;function Tb(t,e){this._getDataWithEncodedVisual=t,this._getRawData=e}var Cb,Ib=Lo(),kb=(u(Db,Cb=hg),Db.prototype.init=function(t){Cb.prototype.init.apply(this,arguments),this.legendVisualProvider=new Mb(ct(this.getData,this),ct(this.getRawData,this)),this._defaultLabelLine(t)},Db.prototype.mergeOption=function(){Cb.prototype.mergeOption.apply(this,arguments)},Db.prototype.getInitialData=function(){return e=F(e={coordDimensions:["value"],encodeDefaulter:pt(Xp,t=this)})?{coordDimensions:e}:P({encodeDefine:t.getEncode()},e),i=t.getSource(),e=Gm(i,e).dimensions,(e=new Vm(e,t)).initData(i,n),e;var t,e,n,i},Db.prototype.getDataParams=function(t){var e,n=this.getData(),i=Ib(n),r=i.seats,i=(r||(e=[],n.each(n.mapDimension("value"),function(t){e.push(t)}),r=i.seats=oo(e,n.hostModel.get("percentPrecision"))),Cb.prototype.getDataParams.call(this,t));return i.percent=r[t]||0,i.$vars.push("percent"),i},Db.prototype._defaultLabelLine=function(t){xo(t,"labelLine",["show"]);var e=t.labelLine,n=t.emphasis.labelLine;e.show=e.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},Db.type="series.pie",Db.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},Db);function Db(){return null!==Cb&&Cb.apply(this,arguments)||this}a_(function(t){t.registerChartView(wb),t.registerSeriesModel(kb),oy("pie",t.registerAction),t.registerLayout(pt(cb,"pie")),t.registerProcessor({seriesType:"pie",reset:function(t,e){var i,r=e.findComponents({mainType:"legend"});r&&r.length&&(i=t.getData()).filterSelf(function(t){for(var e=i.getName(t),n=0;ne[1]&&e.reverse(),e},Zb.prototype.pointToData=function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},Zb.prototype.setCategorySortInfo=function(t){if("category"!==this.type)return!1;this.model.option.categorySortInfo=t,this.scale.setSortInfo(t)};var Yb,qb=Zb;function Zb(t,e,n,i,r){t=Yb.call(this,t,e,n)||this;return t.index=0,t.type=i||"value",t.position=r||"bottom",t}function jb(t){return"cartesian2d"===t.get("coordinateSystem")}function Kb(i){var r={xAxisModel:null,yAxisModel:null};return E(r,function(t,e){var n=e.replace(/Model$/,""),n=i.getReferringComponents(n,No).models[0];r[e]=n}),r}var $b=Math.log;Jb.prototype.getRect=function(){return this._rect},Jb.prototype.update=function(t,e){var n=this._axesMap;function i(t){var d,e=ht(t),n=e.length;if(n){for(var i=[],r=n-1;0<=r;r--){var o=t[+e[r]],a=o.model,s=o.scale;ev(s)&&a.get("alignTicks")&&null==a.get("interval")?i.push(o):(Kv(s,a),ev(s)&&(d=o))}i.length&&(d||Kv((d=i.pop()).scale,d.model),E(i,function(t){var e=t.scale,t=t.model,n=d.scale,i=fv.prototype,r=i.getTicks.call(n),o=i.getTicks.call(n,!0),a=r.length-1,n=i.getInterval.call(n),s=(t=jv(e,t)).extent,l=t.fixMin,t=t.fixMax,u=("log"===e.type&&(u=$b(e.base),s=[$b(s[0])/u,$b(s[1])/u]),e.setExtent(s[0],s[1]),e.calcNiceExtent({splitNumber:a,fixMin:l,fixMax:t}),i.getExtent.call(e)),h=(l&&(s[0]=u[0]),t&&(s[1]=u[1]),i.getInterval.call(e)),c=s[0],p=s[1];if(l&&t)h=(p-c)/a;else if(l)for(p=s[0]+h*a;ps[0]&&isFinite(c)&&isFinite(s[0]);)h=iv(h),c=s[1]-h*a;else{u=(h=ah[1]?-1:1,o=["start"===c?h[0]-o*u:"end"===c?h[1]+o*u:(h[0]+h[1])/2,uw(c)?t.labelOffset+l*u:0],null!=(u=e.get("nameRotate"))&&(u=u*iw/180),uw(c)?a=rw.innerTextLayout(t.rotation,null!=u?u:t.rotation,l):(a=function(t,e,n,i){var r,n=ao(n-t),t=i[0]>i[1],i="start"===e&&!t||"start"!==e&&t;e=so(n-iw/2)?(r=i?"bottom":"top","center"):so(n-1.5*iw)?(r=i?"top":"bottom","center"):(r="middle",n<1.5*iw&&iw/2u[1]&&u.reverse(),(s=null==s||s>u[1]?u[1]:s)n[r],f=[-c.x,-c.y],e=(e||(f[i]=l[s]),[0,0]),s=[-p.x,-p.y],g=R(t.get("pageButtonGap",!0),t.get("itemGap",!0)),f=(d&&("end"===t.get("pageButtonPosition",!0)?s[i]+=n[r]-p[r]:e[i]+=p[r]+g),s[1-i]+=c[o]/2-p[o]/2,l.setPosition(f),u.setPosition(e),h.setPosition(s),{x:0,y:0}),c=(f[r]=(d?n:c)[r],f[o]=Math.max(c[o],p[o]),f[a]=Math.min(0,p[a]+s[1-i]),u.__rectSize=n[r],d?((e={x:0,y:0})[r]=Math.max(n[r]-p[r]-g,0),e[o]=f[o],u.setClipPath(new As({shape:e})),u.__rectSize=e[r]):h.eachChild(function(t){t.attr({invisible:!0,silent:!0})}),this._getPageInfo(t));return null!=c.pageIndex&&kh(l,{x:c.contentPosition[0],y:c.contentPosition[1]},d?t:null),this._updatePageInfoView(t,c),f},uS.prototype._pageGo=function(t,e,n){t=this._getPageInfo(e)[t];null!=t&&n.dispatchAction({type:"legendScroll",scrollDataIndex:t,legendId:e.id})},uS.prototype._updatePageInfoView=function(n,i){var r=this._controllerGroup,t=(E(["pagePrev","pageNext"],function(t){var e=null!=i[t+"DataIndex"],t=r.childOfName(t);t&&(t.setStyle("fill",e?n.get("pageIconColor",!0):n.get("pageIconInactiveColor",!0)),t.cursor=e?"pointer":"default")}),r.childOfName("pageText")),e=n.get("pageFormatter"),o=i.pageIndex,o=null!=o?o+1:0,a=i.pageCount;t&&e&&t.setStyle("text",V(e)?e.replace("{current}",null==o?"":o+"").replace("{total}",null==a?"":a+""):e({current:o,total:a}))},uS.prototype._getPageInfo=function(t){var e=t.get("scrollDataIndex",!0),n=this.getContentGroup(),i=this._containerGroup.__rectSize,t=t.getOrient().index,r=aS[t],o=sS[t],e=this._findTargetItemIndex(e),a=n.children(),s=a[e],l=a.length,u=l?1:0,h={contentPosition:[n.x,n.y],pageCount:u,pageIndex:u-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(s){n=g(s);h.contentPosition[t]=-n.s;for(var c=e+1,p=n,d=n,f=null;c<=l;++c)(!(f=g(a[c]))&&d.e>p.s+i||f&&!y(f,p.s))&&(p=d.i>p.i?d:f)&&(null==h.pageNextDataIndex&&(h.pageNextDataIndex=p.i),++h.pageCount),d=f;for(c=e-1,p=n,d=n,f=null;-1<=c;--c)(f=g(a[c]))&&y(d,f.s)||!(p.i=e&&t.s<=e+i}},uS.prototype._findTargetItemIndex=function(n){var i,r;return this._showController?(this.getContentGroup().eachChild(function(t,e){t=t.__legendDataIndex;null==r&&null!=t&&(r=e),t===n&&(i=e)}),null!=i?i:r):0},uS.type="legend.scroll",uS);function uS(){var t=null!==rS&&rS.apply(this,arguments)||this;return t.type=uS.type,t.newlineDisabled=!0,t._currentIndex=0,t}a_(function(t){a_(Jw),t.registerComponentModel(eS),t.registerComponentView(lS),t.registerAction("legendScroll","legendscroll",function(t,e){var n=t.scrollDataIndex;null!=n&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(t){t.setScrollDataIndex(n)})})}),a_(D1);var hS={value:"eq","<":"lt","<=":"lte",">":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},cS=(pS.prototype.evaluate=function(t){var e=typeof t;return V(e)?this._condVal.test(t):!!G(e)&&this._condVal.test(t+"")},pS);function pS(t){null==(this._condVal=V(t)?new RegExp(t):_t(t)?t:null)&&f("")}fS.prototype.evaluate=function(){return this.value};var dS=fS;function fS(){}yS.prototype.evaluate=function(){for(var t=this.children,e=0;e