!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 m=function(t,e){return(m=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}m(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var v=function(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1},b=new function(){this.browser=new v,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?(b.wxa=!0,b.touchEventsSupported=!0):"undefined"==typeof document&&"undefined"!=typeof self?b.worker=!0:"undefined"==typeof navigator||0===navigator.userAgent.indexOf("Node.js")?(b.node=!0,b.svgSupported=!0):(et=navigator.userAgent,oe=(Gt=b).browser,at=et.match(/Firefox\/([\d.]+)/),q=et.match(/MSIE\s([\d.]+)/)||et.match(/Trident\/.+?rv:(([\d.]+))/),tt=et.match(/Edge?\/([\d.]+)/),et=/micromessenger/i.test(et),at&&(oe.firefox=!0,oe.version=at[1]),q&&(oe.ie=!0,oe.version=q[1]),tt&&(oe.edge=!0,oe.version=tt[1],oe.newEdge=18<+tt[1].split(".")[0]),et&&(oe.weChat=!0),Gt.svgSupported="undefined"!=typeof SVGRect,Gt.touchEventsSupported="ontouchstart"in window&&!oe.ie&&!oe.edge,Gt.pointerEventsSupported="onpointerdown"in window&&(oe.edge||oe.ie&&11<=+oe.version),Gt.domSupported="undefined"!=typeof document,at=document.documentElement.style,Gt.transform3dSupported=(oe.ie&&"transition"in at||oe.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in at)&&!("OTransition"in at),Gt.transformSupported=Gt.transform3dSupported||oe.ie&&9<=+oe.version);var x=12,w="sans-serif",K=x+"px "+w;var S,M,T=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),!0}return!1}function me(t){return"CANVAS"===t.nodeName.toUpperCase()}var ve=/([&<>"'])/g,_e={"&":"&","<":"<",">":">",'"':""","'":"'"};function xe(t){return null==t?"":(t+"").replace(ve,function(t,e){return _e[e]})}var we=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,be=[],Se=b.browser.firefox&&+b.browser.version.split(".")[0]<39;function Me(t,e,n,i){return n=n||{},i?Te(t,e,n):Se&&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):Te(t,e,n),n}function Te(t,e,n){if(b.domSupported&&t.getBoundingClientRect){var i,r=e.clientX,e=e.clientY;if(me(t))return i=t.getBoundingClientRect(),n.zrX=r-i.left,void(n.zrY=e-i.top);if(ye(be,t,r,e))return n.zrX=be[0],void(n.zrY=be[1])}n.zrX=n.zrY=0}function Ce(t){return t||window.event}function Ie(t,e,n){var i;return null==(e=Ce(e)).zrX&&((i=e.type)&&0<=i.indexOf("touch")?(i=("touchend"!==i?e.targetTouches:e.changedTouches)[0])&&Me(t,i,e,n):(Me(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},Ke.prototype.clone=function(){return new Ke(this.x,this.y,this.width,this.height)},Ke.prototype.copy=function(t){Ke.copy(this,t)},Ke.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},Ke.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},Ke.prototype.isZero=function(){return 0===this.width||0===this.height},Ke.create=function(t){return new Ke(t.x,t.y,t.width,t.height)},Ke.copy=function(t,e){t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height},Ke.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){sn.prototype[a]=function(t){var e,n,i=t.zrX,r=t.zrY,o=hn(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 mn(A,P){var L,O,R=pn,N=0,E=[];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--,yn(A[i],A,e,n,0,P));if(e+=t,0!=(n-=t)&&0!==(r=gn(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=dn(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),gi(t,e),e):void ci(e,0,0,0,1):7===i||9===i?0<=(r=parseInt(n.slice(1,7),16))&&r<=16777215?(ci(e,(16711680&r)>>16,(65280&r)>>8,255&r,9===i?parseInt(n.slice(7),16)/255:1),gi(t,e),e):void ci(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?ci(e,+a[0],+a[1],+a[2],1):ci(e,0,0,0,1);s=li(a.pop());case"rgb":return 3<=a.length?(ci(e,si(a[0]),si(a[1]),si(a[2]),3===a.length?s:li(a[3])),gi(t,e),e):void ci(e,0,0,0,1);case"hsla":return 4!==a.length?void ci(e,0,0,0,1):(a[3]=li(a[3]),mi(a,e),gi(t,e),e);case"hsl":return 3!==a.length?void ci(e,0,0,0,1):(mi(a,e),gi(t,e),e);default:return}}ci(e,0,0,0,1)}}function mi(t,e){var n=(parseFloat(t[0])%360+360)%360/360,i=li(t[1]),r=li(t[2]),i=r<=.5?r*(i+1):r+i-r*i,r=2*r-i;return ci(e=e||[],oi(255*ui(r,i,n+1/3)),oi(255*ui(r,i,n)),oi(255*ui(r,i,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}function vi(t,e){var n=yi(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?Ki:t[c],(Zi(l)||p)&&(f=f||(this._additiveValue=[])),this.discrete?t[c]=(r<1?n:i).rawValue:Zi(l)?(1===l?Wi:function(t,e,n,i){for(var r=e.length,o=r&&e[0].length,a=0;athis._sleepAfterStill)&&this.animation.stop()},co.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},co.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},co.prototype.refreshHover=function(){this._needsRefreshHover=!0},co.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&"canvas"===this.painter.getType()&&this.painter.refreshHover())},co.prototype.resize=function(t){this._disposed||(this.painter.resize((t=t||{}).width,t.height),this.handler.resize())},co.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},co.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},co.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},co.prototype.setCursorStyle=function(t){this._disposed||this.handler.setCursorStyle(t)},co.prototype.findHover=function(t,e){if(!this._disposed)return this.handler.findHover(t,e)},co.prototype.on=function(t,e,n){return this._disposed||this.handler.on(t,e,n),this},co.prototype.off=function(t,e){this._disposed||this.handler.off(t,e)},co.prototype.trigger=function(t,e){this._disposed||this.handler.trigger(t,e)},co.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 Co(t){var e=2*Math.PI;return(t%e+e)%e}function Io(t){return-1e-4=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=Oa(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(Ja.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(Ja.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(Ja.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(),fs[0]=i,fs[1]=r,ys(fs,o),this.addData(Ja.A,t,e,n,n,i=fs[0],(r=fs[1])-i,0,o?0:1),this._ctx&&this._ctx.arc(t,e,n,i,r,o),this._xi=ls(r)*n+t,this._yi=us(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(Ja.R,t,e,n,i),this},o.prototype.closePath=function(){this._drawPendingPt(),this.addData(Ja.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||!ds||(this.data=new Float32Array(e));for(var n=0;nu.length&&(this._expandData(),u=this.data);for(var h=0;hn||hs(y)>i||c===e-1)&&(f=Math.sqrt(I*I+y*y),r=g,o=_);break;case Ja.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=Bn(t,n,r,a,f),f=Bn(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 Ja.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=Un(t,n,r,p),p=Un(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 Ja.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=ls(M)*b+x,s=us(M)*S+w),f=ss(b,S)*as(ps,Math.abs(T)),r=ls(C)*b+x,o=us(C)*S+w;break;case Ja.R:a=r=t[c++],s=o=t[c++];f=2*t[c++]+2*t[c++];break;case Ja.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=Cs[i=0]+t&&a<=Cs[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 Ss.R:c=u=a[d++],p=h=a[d++];if(S=c+a[d++],M=p+a[d++],n){if(vs(c,p,S,p,e,i,r)||vs(S,p,S,M,e,i,r)||vs(S,M,c,M,e,i,r)||vs(c,M,c,p,e,i,r))return!0}else l=(l+=bs(S,p,S,M,i,r))+bs(c,M,c,p,i,r);break;case Ss.Z:if(n){if(vs(u,h,c,p,e,i,r))return!0}else l+=bs(u,h,c,p,i,r);u=c,h=p}}return n||(t=h,o=p,Math.abs(t-o)i.len()&&(uMath.abs(i[1])?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}}:""}function Kp(t,e){return e=e||"transparent",V(t)?t:L(t)&&t.colorStops&&(t.colorStops[0]||{}).color||e}function $p(t,e){var n;"_blank"===e||"blank"===e?((n=window.open()).opener=null,n.location.href=t):window.open(t,e)}var Qp=E,Jp=["left","right","top","bottom","width","height"],td=[["width","left","right"],["height","top","bottom"]];function ed(a,s,l,u,h){var c=0,p=0,d=(null==u&&(u=1/0),null==h&&(h=1/0),0);s.eachChild(function(t,e){var n,i,r,o=t.getBoundingRect(),e=s.childAt(e+1),e=e&&e.getBoundingRect();d="horizontal"===a?(i=o.width+(e?-e.x+o.x:0),u<(n=c+i)||t.newline?(c=0,n=i,p+=d+l,o.height):Math.max(d,o.height)):(i=o.height+(e?-e.y+o.y:0),h<(r=p+i)||t.newline?(c+=d+l,p=0,r=i,o.width):Math.max(d,o.width)),t.newline||(t.x=c,t.y=p,t.markRedraw(),"horizontal"===a?c=n+l:p=r+l)})}var nd=ed;function id(t,e,n){n=Up(n||0);var i=e.width,r=e.height,o=xo(t.left,i),a=xo(t.top,r),e=xo(t.right,i),s=xo(t.bottom,r),l=xo(t.width,i),u=xo(t.height,r),h=n[2]+n[0],c=n[1]+n[3],p=t.aspect;switch(isNaN(l)&&(l=i-e-c-o),isNaN(u)&&(u=r-s-h-a),null!=p&&(isNaN(l)&&isNaN(u)&&(i/re)return t[i];return t[n-1]}var Fd,Vd="\0_ec_inner",Hd=(u(s,Fd=ip),s.prototype.init=function(t,e,n,i,r,o){i=i||{},this.option=null,this._theme=new ip(i),this._locale=new ip(r),this._optionManager=o},s.prototype.setOption=function(t,e,n){e=Ud(e);this._optionManager.setOption(t,n,e),this._resetOption(null,e)},s.prototype.resetOption=function(t,e){return this._resetOption(t,Ud(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)):Rd(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=G(),p=t&&t.replaceMergeMainTypeMap;Td(this).datasetMap=G(),E(i,function(t,e){null!=t&&(g.hasClass(e)?e&&(n.push(e),o.set(e,!0)):r[e]=null==r[e]?_(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=Pd.get(e))&&e(t))?n.concat(e):n}(this,o,Fo(i[o])),e=h.get(o),n=e?p&&p.get(o)?"replaceMerge":"normalMerge":"replaceAll",e=Wo(e,t,n),s=(Zo(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=O({componentIndex:e},t.keyInfo),O(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&&Ld(this)},this),this._seriesIndices||Ld(this)},s.prototype.getOption=function(){var a=_(this.option);return E(a,function(t,e){if(g.hasClass(e)){for(var n=Fo(t),i=n.length,r=!1,o=i-1;0<=o;o--)n[o]&&!jo(n[o])?r=!0:(n[o]=null,r||i--);n.length=i,a[e]=n}}),delete a[Vd],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])&&(w=!1)}w&&(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(Lg(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();r'+xe(u)+""+h,t))}function Kg(t,e,n,i){var r,o,a,s,l=t.renderMode,u=e.noName,h=e.noValue,c=!e.markerType,p=e.name,d=t.useUTC,f=e.valueFormatter||t.valueFormatter||function(t){return B(t=F(t)?t:[t],function(t,e){return Xp(t,F(o)?o[e]:o,d)})};if(!u||!h)return r=c?"":t.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||"#333",l),p=u?"":Xp(p,"ordinal",d),o=e.valueType,f=h?[]:f(e.value,e.dataIndex),e=!c||!u,a=!c&&u,i=Wg(i,l),s=i.nameStyle,i=i.valueStyle,"richText"===l?(c?"":r)+(u?"":Jg(t,p,s))+(h?"":function(t,e,n,i,r){r=[r],i=i?10:20;return n&&r.push({padding:[0,0,0,i],align:"right"}),t.markupStyleCreator.wrapRichTextStyle(F(e)?e.join(" "):e,r)}(t,f,e,a,i)):Qg((c?"":r)+(u?"":''+xe(p)+"")+(h?"":function(t,e,n,i){n=n?"10px":"20px",e=e?"float:right;margin-left:"+n:"";return t=F(t)?t:[t],''+B(t,xe).join("  ")+""}(f,e,a,i)),n)}function $g(t,e,n,i,r,o){if(t)return jg(t)({useUTC:r,renderMode:n,orderMode:i,markupStyleCreator:e,valueFormatter:t.valueFormatter},t,0,o)}function Qg(t,e){return'
'+t+'
'}function Jg(t,e,n){return t.markupStyleCreator.wrapRichTextStyle(e,n)}function ty(t,e){t=t.get("padding");return null!=t?t:"richText"===e?[8,10]:10}ny.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},ny.prototype.makeTooltipMarker=function(t,e,n){var i="richText"===n?this._generateStyleName():null,e=Zp({color:e,type:t,renderMode:n,markerId:i});return V(e)?e:(this.richTextStyles[i]=e.style,e.content)},ny.prototype.wrapRichTextStyle=function(t,e){var n={},e=(F(e)?E(e,function(t){return O(n,t)}):O(n,e),this._generateStyleName());return this.richTextStyles[e]=n,"{"+e+"|"+t+"}"};var ey=ny;function ny(){this.richTextStyles={},this._nextStyleNameId=No()}function iy(t){var e,n,i,r,o,a,s,l,u,h,c,p=t.series,d=t.dataIndex,t=t.multipleSeries,f=p.getData(),g=f.mapDimensionsAll("defaultedTooltip"),y=g.length,m=p.getRawValue(d),v=F(m),_=(_=d,Kp((w=p).getData().getItemVisual(_,"style")[w.visualDrawType]));function x(t,e){e=s.getDimensionInfo(e);e&&!1!==e.otherDims.tooltip&&(l?c.push(Yg("nameValue",{markerType:"subItem",markerColor:a,name:e.displayName,value:t,valueType:e.type})):(u.push(t),h.push(e.type)))}1this.getShallow("animationThreshold")?!1:t)},h.prototype.restoreData=function(){this.dataTask.dirty()},h.prototype.getColorFromPalette=function(t,e,n){var i=this.ecModel;return Ed.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 py(e,n){E(Et(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(t){e.wrapMethod(t,dt(dy,n))})}function dy(t,e){t=fy(t);return t&&t.setOutputEnd((e||this).count()),e}function fy(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}lt(sy,tp),lt(sy,Ed),ha(sy,g);yy.prototype.init=function(t,e){},yy.prototype.render=function(t,e,n,i){},yy.prototype.dispose=function(t,e){},yy.prototype.updateView=function(t,e,n,i){},yy.prototype.updateLayout=function(t,e,n,i){},yy.prototype.updateVisual=function(t,e,n,i){},yy.prototype.toggleBlurSeries=function(t,e,n){},yy.prototype.eachRendered=function(t){var e=this.group;e&&e.traverse(t)};var gy=yy;function yy(){this.group=new oo,this.uid=ap("viewComponent")}function my(){var o=$o();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"}}ua(gy),fa(gy);var vy=$o(),_y=my(),xy=(wy.prototype.init=function(t,e){},wy.prototype.render=function(t,e,n,i){},wy.prototype.highlight=function(t,e,n,i){t=t.getData(i&&i.dataType);t&&Sy(t,i,"emphasis")},wy.prototype.downplay=function(t,e,n,i){t=t.getData(i&&i.dataType);t&&Sy(t,i,"normal")},wy.prototype.remove=function(t,e){this.group.removeAll()},wy.prototype.dispose=function(t,e){},wy.prototype.updateView=function(t,e,n,i){this.render(t,e,n,i)},wy.prototype.updateLayout=function(t,e,n,i){this.render(t,e,n,i)},wy.prototype.updateVisual=function(t,e,n,i){this.render(t,e,n,i)},wy.prototype.eachRendered=function(t){Dc(this.group,t)},wy.markUpdateMethod=function(t,e){vy(t).updateMethod=e},wy.protoInitialize=void(wy.prototype.type="chart"),wy);function wy(){this.group=new oo,this.uid=ap("viewChart"),this.renderTask=Kf({plan:My,reset:Ty}),this.renderTask.context={view:this}}function by(t,e,n){t&&uu(t)&&("emphasis"===e?Yl:ql)(t,n)}function Sy(e,t,n){var i,r=Ko(e,t),o=t&&null!=t.highlightKey?(t=t.highlightKey,i=null==(i=ml[t])&&yl<=32?ml[t]=yl++:i):null;null!=r?E(Fo(r),function(t){by(e.getItemGraphicEl(t),n,o)}):e.eachItemGraphicEl(function(t){by(t,n,o)})}function My(t){return _y(t.model)}function Ty(t){var e=t.model,n=t.ecModel,i=t.api,r=t.payload,o=e.pipelineContext.progressiveRender,t=t.view,a=r&&vy(r).updateMethod,o=o?"incrementalPrepareRender":a&&t[a]?a:"render";return"render"!==o&&t[o](e,n,i,r),Cy[o]}ua(xy),fa(xy);var Cy={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)}}},Iy="\0__throttleOriginMethod",ky="\0__throttleRate",Dy="\0__throttleType";function Ay(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}},Hy.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},Hy.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}},Hy.prototype.restorePipelines=function(t){var i=this,r=i._pipelineMap=G();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)})},Hy.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,{});Ct(!(t.reset&&t.overallReset),""),t.reset&&this._createSeriesStageTask(t,e,i,r),t.overallReset&&this._createOverallStageTask(t,e,i,r)},this)},Hy.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)},Hy.prototype.performDataProcessorTasks=function(t,e){this._performStageTasks(this._dataProcessorHandlers,t,e,{block:!0})},Hy.prototype.performVisualTasks=function(t,e,n){this._performStageTasks(this._visualHandlers,t,e,n)},Hy.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},Hy.prototype.performSeriesTasks=function(t){var e;t.eachSeries(function(t){e=t.dataTask.perform()||e}),this.unfinished=e||this.unfinished},Hy.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())})},Hy.prototype.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)},Hy.prototype._createSeriesStageTask=function(n,t,i,r){var o=this,a=t.seriesTaskMap,s=t.seriesTaskMap=G(),t=n.seriesType,e=n.getTargetSeries;function l(t){var e=t.uid,e=s.set(e,a&&a.get(e)||Kf({plan:Yy,reset:qy,count:Ky}));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)},Hy.prototype._createOverallStageTask=function(t,e,n,i){var r=this,o=e.overallTask=e.overallTask||Kf({reset:Gy}),a=(o.context={ecModel:n,api:i,overallReset:t.overallReset,scheduler:r},o.agentStubMap),s=o.agentStubMap=G(),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,Kf({reset:Wy,onDirty:Xy})));e.context={model:t,overallProgress:u},e.agent=o,e.__block=u,r._pipe(t,e)}Ct(!t.createOnAllSeries,""),e?n.eachRawSeriesByType(e,c):l?l(n,i).each(c):(u=!1,E(n.getSeries(),c)),h&&o.dirty()},Hy.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},Hy.wrapStageHandler=function(t,e){return(t=k(t)?{overallReset:t,seriesType:function(t){$y=null;try{t(Qy,Jy)}catch(t){}return $y}(t)}:t).uid=ap("stageHandler"),e&&(t.visualType=e),t};var Vy=Hy;function Hy(t,e,n,i){this._stageTaskMap=G(),this.ecInstance=t,this.api=e,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}function Gy(t){t.overallReset(t.ecModel,t.api,t.payload)}function Wy(t){return t.overallProgress&&Uy}function Uy(){this.agent.dirty(),this.getDownstream().dirty()}function Xy(){this.agent&&this.agent.dirty()}function Yy(t){return t.plan?t.plan(t.model,t.ecModel,t.api,t.payload):null}function qy(t){t.useClearVisual&&t.data.clearAllVisual();t=t.resetDefines=Fo(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 $s({shape:{x:0,y:0,width:t,height:n},style:{fill:i.connectedBackgroundColor}})),E(p,function(t){t=new Gs({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 m0(this,"convertToPixel",t,e)},c.prototype.convertFromPixel=function(t,e){return m0(this,"convertFromPixel",t,e)},c.prototype.containPixel=function(t,i){var r;if(!this._disposed)return E(Jo(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=Jo(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(B0,function(a){function t(t){var n,e,i,r=s.getModel(),o=t.target;"globalout"===a?n={}:o&&um(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=O({},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(V0,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?(lm("map","selectchanged",n,e,t),lm("pie","selectchanged",n,e,t)):"select"===t.fromAction?(lm("map","selected",n,e,t),lm("pie","selected",n,e,t)):"unselect"===t.fromAction&&(lm("map","unselected",n,e,t),lm("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()&&ia(this.getDom(),K0,""),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 Y0[t.id])},c.prototype.resize=function(t){if(!this[n0])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[i0]&&(null==n&&(n=this[i0].silent),e=!0,this[i0]=null),this[n0]=!0;try{e&&d0(this),y0.update.call(this,{type:"resize",animation:O({duration:0},t&&t.animation)})}catch(t){throw this[n0]=!1,t}this[n0]=!1,x0.call(this,n),w0.call(this,n)}}},c.prototype.showLoading=function(t,e){this._disposed?this.id:(L(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),X0[t]&&(t=X0[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=O({},t);return e.type=V0[t.type],e},c.prototype.dispatchAction=function(t,e){var n;this._disposed?this.id:(L(e)||(e={silent:!!e}),F0[t.type]&&this._model&&(this[n0]?this._pendingActions.push(t):(n=e.silent,_0.call(this,t,n),(t=e.flush)?this._zr.flush():!1!==t&&b.browser.weChat&&this._throttledZrFlush(),x0.call(this,n),w0.call(this,n))))},c.prototype.updateLabelLayout=function(){t0.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=(d0=function(t){var e=t._scheduler;e.restorePipelines(t._model),e.prepareStageTasks(),f0(t,!0),f0(t,!1),e.plan()},f0=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")&&!b.node&&!b.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)})}),t0.trigger("series:afterupdate",t,e,n)},D0=function(t){t[r0]=!0,t.getZr().wakeUp()},A0=function(t){t[r0]&&(t.getZr().storage.traverse(function(t){Jh(t)||R0(t)}),t[r0]=!1)},I0=function(n){return u(t,e=Xd),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){Yl(t,e),D0(n)},t.prototype.leaveEmphasis=function(t,e){ql(t,e),D0(n)},t.prototype.enterBlur=function(t){Fl(t,Rl),D0(n)},t.prototype.leaveBlur=function(t){jl(t),D0(n)},t.prototype.enterSelect=function(t){Zl(t),D0(n)},t.prototype.leaveSelect=function(t){Kl(t),D0(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(k0=function(i){function r(t,e){for(var n=0;ne[1]&&(e[1]=t[1])},Qv.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},Qv.prototype.getExtent=function(){return this._extent.slice()},Qv.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(e)||(n[1]=e)},Qv.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},Qv.prototype.isBlank=function(){return this._isBlank},Qv.prototype.setBlank=function(t){this._isBlank=t};var $v=Qv;function Qv(t){this._setting=t||{},this._extent=[1/0,-1/0]}fa($v);var Jv=0,t_=(e_.createByAxisModel=function(t){var t=t.option,e=t.data,e=e&&B(e,n_);return new e_({categories:e,needCollect:!e,deduplication:!1!==t.dedplication})},e_.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},e_.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},e_.prototype._getOrCreateMap=function(){return this._map||(this._map=G(this.categories))},e_);function e_(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++Jv}function n_(t){return L(t)&&null!=t.value?t.value:t+""}function i_(t){return"interval"===t.type||"log"===t.type}function r_(t,e,n,i){var r={},o=t[1]-t[0],o=r.interval=Lo(o/e,!0),e=(null!=n&&oi[1]&&(i[0]=i[1]),r}function o_(t){var e=Math.pow(10,Po(t)),t=t/e;return t?2===t?t=3:3===t?t=5:t*=2:t=1,wo(t*e)}function a_(t){return bo(t)+2}function s_(t,e,n){t[e]=Math.max(Math.min(t[e],n[1]),n[0])}function l_(t,e){return t>=e[0]&&t<=e[1]}function u_(t,e){return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])}function h_(t,e){return t*(e[1]-e[0])+e[0]}u(d_,c_=$v),d_.prototype.parse=function(t){return null==t?NaN:V(t)?this._ordinalMeta.getOrdinal(t):Math.round(t)},d_.prototype.contain=function(t){return l_(t=this.parse(t),this._extent)&&null!=this._ordinalMeta.categories[t]},d_.prototype.normalize=function(t){return u_(t=this._getTickNumber(this.parse(t)),this._extent)},d_.prototype.scale=function(t){return t=Math.round(h_(t,this._extent)),this.getRawOrdinalNumber(t)},d_.prototype.getTicks=function(){for(var t=[],e=this._extent,n=e[0];n<=e[1];)t.push({value:n}),n++;return t},d_.prototype.getMinorTicks=function(t){},d_.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},d_.prototype.getOrdinalMeta=function(){return this._ordinalMeta},d_.prototype.calcNiceTicks=function(){},d_.prototype.calcNiceExtent=function(){},d_.type="ordinal";var c_,p_=d_;function d_(t){var t=c_.call(this,t)||this,e=(t.type="ordinal",t.getSetting("ordinalMeta"));return F(e=e||new t_({}))&&(e=new t_({categories:B(e,function(t){return L(t)?t.value:t})})),t._ordinalMeta=e,t._extent=t.getSetting("extent")||[0,e.categories.length-1],t}$v.registerClass(p_);var f_,g_=wo,y_=(u(m_,f_=$v),m_.prototype.parse=function(t){return t},m_.prototype.contain=function(t){return l_(t,this._extent)},m_.prototype.normalize=function(t){return u_(t,this._extent)},m_.prototype.scale=function(t){return h_(t,this._extent)},m_.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=parseFloat(t)),isNaN(e)||(n[1]=parseFloat(e))},m_.prototype.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1]),this.setExtent(e[0],e[1])},m_.prototype.getInterval=function(){return this._interval},m_.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=a_(t)},m_.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:g_(s+e,r)}:{value:n[1]})}return o},m_.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),L_.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 T1(t,o){var e,n,r;return B(ct((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=M1(i,n,r);break;case"Polygon":case"MultiLineString":S1(i,n,r);break;case"MultiPolygon":E(i,function(t,e){return S1(t,n[e],r)})}}),n.UTF8Encoding=!1,n):e).features,function(t){return t.geometry&&t.properties&&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},E1.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)}},y.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=Nc(i),l=(Rc(t,h,{labelFetcher:o,labelDataIndex:n,defaultText:jx(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(H(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,pw(a),i.get(["label","rotate"]))),u=l,s=h,a=o.getRawValue(n),l=function(t){return Zx(e,t)},u&&((u=Gc(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"]));ru(t,h.get("focus"),h.get("blurScope"),h.get("disabled")),su(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 fw,gw=function(){},yw=(u(mw,fw=Z),mw.prototype.getDefaultShape=function(){return new gw},mw.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:wi((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 nb(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 mb(t){return"center"===t.position}function vb(t){var S,M,T=t.getData(),C=[],I=!1,k=(t.get("minShowLabelAngle")||0)*fb,e=T.getLayout("viewRect"),D=T.getLayout("r"),A=e.width,P=e.x,n=e.y,e=e.height;function L(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"),_=xo(g.get("edgeDistance"),A),x=g.get("bleedMargin"),t=t.getModel("labelLine"),w=xo(t.get("length"),A),b=xo(t.get("length2"),A);Math.abs(p.endAngle-p.startAngle)=e.r0},Mb.type="pie";var bb,Sb=Mb;function Mb(){var t=null!==bb&&bb.apply(this,arguments)||this;return t.ignoreLabelLineUpdate=!0,t}Cb.prototype.getAllNames=function(){var t=this._getRawData();return t.mapArray(t.getName)},Cb.prototype.containName=function(t){return 0<=this._getRawData().indexOfName(t)},Cb.prototype.indexOfName=function(t){return this._getDataWithEncodedVisual().indexOfName(t)},Cb.prototype.getItemVisual=function(t,e){return this._getDataWithEncodedVisual().getItemVisual(t,e)};var Tb=Cb;function Cb(t,e){this._getDataWithEncodedVisual=t,this._getRawData=e}var Ib,kb=$o(),Db=(u(Ab,Ib=sy),Ab.prototype.init=function(t){Ib.prototype.init.apply(this,arguments),this.legendVisualProvider=new Tb(pt(this.getData,this),pt(this.getRawData,this)),this._defaultLabelLine(t)},Ab.prototype.mergeOption=function(){Ib.prototype.mergeOption.apply(this,arguments)},Ab.prototype.getInitialData=function(){return e=F(e={coordDimensions:["value"],encodeDefaulter:dt(Id,t=this)})?{coordDimensions:e}:O({encodeDefine:t.getEncode()},e),i=t.getSource(),e=Wv(i,e).dimensions,(e=new Gv(e,t)).initData(i,n),e;var t,e,n,i},Ab.prototype.getDataParams=function(t){var e,n=this.getData(),i=kb(n),r=i.seats,i=(r||(e=[],n.each(n.mapDimension("value"),function(t){e.push(t)}),r=i.seats=To(e,n.hostModel.get("percentPrecision"))),Ib.prototype.getDataParams.call(this,t));return i.percent=r[t]||0,i.$vars.push("percent"),i},Ab.prototype._defaultLabelLine=function(t){Vo(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},Ab.type="series.pie",Ab.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"},Ab);function Ab(){return null!==Ib&&Ib.apply(this,arguments)||this}l1(function(t){t.registerChartView(Sb),t.registerSeriesModel(Db),sm("pie",t.registerAction),t.registerLayout(dt(db,"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 qb,jb=Zb;function Zb(t,e,n,i,r){t=qb.call(this,t,e,n)||this;return t.index=0,t.type=i||"value",t.position=r||"bottom",t}function Kb(t,e,n){n=n||{};var t=t.coordinateSystem,i=e.axis,r={},o=i.getAxesOnZeroOf()[0],a=i.position,s=o?"onZero":a,i=i.dim,t=t.getRect(),t=[t.x,t.x+t.width,t.y,t.y+t.height],l={left:0,right:1,top:0,bottom:1,onZero:2},u=e.get("offset")||0,u="x"===i?[t[2]-u,t[3]+u]:[t[0]-u,t[1]+u],h=(o&&(h=o.toGlobalCoord(o.dataToCoord(0)),u[l.onZero]=Math.max(Math.min(h,u[1]),u[0])),r.position=["y"===i?u[l[s]]:t[0],"x"===i?u[l[s]]:t[3]],r.rotation=Math.PI/2*("x"===i?0:1),r.labelDirection=r.tickDirection=r.nameDirection={top:-1,bottom:1,left:-1,right:1}[a],r.labelOffset=o?u[l[a]]-u[l.onZero]:0,e.get(["axisTick","inside"])&&(r.tickDirection=-r.tickDirection),bt(n.labelInside,e.get(["axisLabel","inside"]))&&(r.labelDirection=-r.labelDirection),e.get(["axisLabel","rotate"]));return r.labelRotate="top"===s?-h:h,r.z2=1,r}function $b(t){return"cartesian2d"===t.get("coordinateSystem")}function Qb(i){var r={xAxisModel:null,yAxisModel:null};return E(r,function(t,e){var n=e.replace(/Model$/,""),n=i.getReferringComponents(n,ea).models[0];r[e]=n}),r}var Jb=Math.log;eS.prototype.getRect=function(){return this._rect},eS.prototype.update=function(t,e){var n=this._axesMap;function i(t){var d,e=R(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;i_(s)&&a.get("alignTicks")&&null==a.get("interval")?i.push(o):($_(s,a),i_(s)&&(d=o))}i.length&&(d||$_((d=i.pop()).scale,d.model),E(i,function(t){var e=t.scale,t=t.model,n=d.scale,i=y_.prototype,r=i.getTicks.call(n),o=i.getTicks.call(n,!0),a=r.length-1,n=i.getInterval.call(n),s=(t=K_(e,t)).extent,l=t.fixMin,t=t.fixMax,u=("log"===e.type&&(u=Jb(e.base),s=[Jb(s[0])/u,Jb(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=o_(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,cS(c)?t.labelOffset+l*u:0],null!=(u=e.get("nameRotate"))&&(u=u*oS/180),cS(c)?a=aS.innerTextLayout(t.rotation,null!=u?u:t.rotation,l):(a=function(t,e,n,i){var r,n=Co(n-t),t=i[0]>i[1],i="start"===e&&!t||"start"!==e&&t;e=Io(n-oS/2)?(r=i?"bottom":"top","center"):Io(n-1.5*oS)?(r=i?"top":"bottom","center"):(r="middle",n<1.5*oS&&oS/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=N(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 $s({shape:e})),u.__rectSize=e[r]):h.eachChild(function(t){t.attr({invisible:!0,silent:!0})}),this._getPageInfo(t));return null!=c.pageIndex&&$h(l,{x:c.contentPosition[0],y:c.contentPosition[1]},d?t:null),this._updatePageInfoView(t,c),f},gM.prototype._pageGo=function(t,e,n){t=this._getPageInfo(e)[t];null!=t&&n.dispatchAction({type:"legendScroll",scrollDataIndex:t,legendId:e.id})},gM.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}))},gM.prototype._getPageInfo=function(t){var e=t.get("scrollDataIndex",!0),n=this.getContentGroup(),i=this._containerGroup.__rectSize,t=t.getOrient().index,r=pM[t],o=dM[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}},gM.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},gM.type="legend.scroll",gM);function gM(){var t=null!==hM&&hM.apply(this,arguments)||this;return t.type=gM.type,t.newlineDisabled=!0,t._currentIndex=0,t}l1(function(t){l1(oM),t.registerComponentModel(sM),t.registerComponentView(fM),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)})})});var yM=$o(),mM=_,vM=pt;function _M(){this._dragging=!1,this.animationThreshold=15}function xM(t,e,n,i){!function n(i,t){{var r;return L(i)&&L(t)?(r=!0,E(t,function(t,e){r=r&&n(i[e],t)}),!!r):i===t}}(yM(n).lastProp,i)&&(yM(n).lastProp=i,e?$h(n,i,t):(n.stopAnimation(),n.attr(i)))}function wM(t,e){t[e.get(["label","show"])?"show":"hide"]()}function bM(t){return{x:t.x||0,y:t.y||0,rotation:t.rotation||0}}function SM(t,e,n){var i=e.get("z"),r=e.get("zlevel");t&&t.traverse(function(t){"group"!==t.type&&(null!=i&&(t.z=i),null!=r&&(t.zlevel=r),t.silent=n)})}function MM(t,e,n,i,r){var o=TM(n.get("value"),e.axis,e.ecModel,n.get("seriesDataIndices"),{precision:n.get(["label","precision"]),formatter:n.get(["label","formatter"])}),n=n.getModel("label"),a=Up(n.get("padding")||0),s=n.getFont(),l=Hr(o,s),u=r.position,h=l.width+a[1]+a[3],l=l.height+a[0]+a[2],c=r.align,c=("right"===c&&(u[0]-=h),"center"===c&&(u[0]-=h/2),r.verticalAlign),i=("bottom"===c&&(u[1]-=l),"middle"===c&&(u[1]-=l/2),r=u,c=h,h=l,i=(l=i).getWidth(),l=l.getHeight(),r[0]=Math.min(r[0]+c,i)-c,r[1]=Math.min(r[1]+h,l)-h,r[0]=Math.max(r[0],0),r[1]=Math.max(r[1],0),n.get("backgroundColor"));i&&"auto"!==i||(i=e.get(["axisLine","lineStyle","color"])),t.label={x:u[0],y:u[1],style:Ec(n,{text:o,font:s,fill:n.getTextColor(),padding:a,backgroundColor:i}),z2:10}}function TM(t,e,n,i,r){t=e.scale.parse(t);var o,a=e.scale.getLabel({value:t},{precision:r.precision}),r=r.formatter;return r&&(o={value:t1(e,{value:t}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]},E(i,function(t){var e=n.getSeriesByIndex(t.seriesIndex),t=t.dataIndexInside,e=e&&e.getDataParams(t);e&&o.seriesData.push(e)}),V(r)?a=r.replace("{value}",a):k(r)&&(a=r(o))),a}function CM(t,e,n){var i=Oe();return Be(i,i,n.rotation),ze(i,i,n.position),xc([t.dataToCoord(e),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],i)}_M.prototype.render=function(t,e,n,i){var r,o,a=e.get("value"),s=e.get("status");this._axisModel=t,this._axisPointerModel=e,this._api=n,!i&&this._lastValue===a&&this._lastStatus===s||(this._lastValue=a,this._lastStatus=s,i=this._group,r=this._handle,s&&"hide"!==s?(i&&i.show(),r&&r.show(),this.makeElOption(s={},a,t,e,n),(o=s.graphicKey)!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=o,o=this._moveAnimation=this.determineAnimation(t,e),i?(o=dt(xM,e,o),this.updatePointerEl(i,s,o),this.updateLabelEl(i,s,o,e)):(i=this._group=new oo,this.createPointerEl(i,s,t,e),this.createLabelEl(i,s,t,e),n.getZr().add(i)),SM(i,e,!0),this._renderHandle(a)):(i&&i.hide(),r&&r.hide()))},_M.prototype.remove=function(t){this.clear(t)},_M.prototype.dispose=function(t){this.clear(t)},_M.prototype.determineAnimation=function(t,e){var n,i=e.get("animation"),r=t.axis,o="category"===r.type,e=e.get("snap");return!(!e&&!o)&&("auto"===i||null==i?(n=this.animationThreshold,o&&r.getBandWidth()>n||!!e&&(o=gS(t).seriesDataCount,e=r.getExtent(),Math.abs(e[0]-e[1])/o>n)):!0===i)},_M.prototype.makeElOption=function(t,e,n,i,r){},_M.prototype.createPointerEl=function(t,e,n,i){var r=e.pointer;r&&(r=yM(t).pointerEl=new Ac[r.type](mM(e.pointer)),t.add(r))},_M.prototype.createLabelEl=function(t,e,n,i){e.label&&(e=yM(t).labelEl=new nl(mM(e.label)),t.add(e),wM(e,i))},_M.prototype.updatePointerEl=function(t,e,n){t=yM(t).pointerEl;t&&e.pointer&&(t.setStyle(e.pointer.style),n(t,{shape:e.pointer.shape}))},_M.prototype.updateLabelEl=function(t,e,n,i){t=yM(t).labelEl;t&&(t.setStyle(e.label.style),n(t,{x:e.label.x,y:e.label.y}),wM(t,i))},_M.prototype._renderHandle=function(t){var e,n,i,r,o,a;!this._dragging&&this.updateHandleTransform&&(e=this._axisPointerModel,n=this._api.getZr(),i=this._handle,r=e.getModel("handle"),a=e.get("status"),r.get("show")&&a&&"hide"!==a?(this._handle||(o=!0,i=this._handle=Tc(r.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){ke(t.event)},onmousedown:vM(this._onHandleDragMove,this,0,0),drift:vM(this._onHandleDragMove,this),ondragend:vM(this._onHandleDragEnd,this)}),n.add(i)),SM(i,e,!1),i.setStyle(r.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"])),F(a=r.get("size"))||(a=[a,a]),i.scaleX=a[0]/2,i.scaleY=a[1]/2,Py(this,"_doDispatchAxisPointer",r.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,o)):(i&&n.remove(i),this._handle=null))},_M.prototype._moveHandleToValue=function(t,e){xM(this._axisPointerModel,!e&&this._moveAnimation,this._handle,bM(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},_M.prototype._onHandleDragMove=function(t,e){var n=this._handle;n&&(this._dragging=!0,t=this.updateHandleTransform(bM(n),[t,e],this._axisModel,this._axisPointerModel),this._payloadInfo=t,n.stopAnimation(),n.attr(bM(t)),yM(n).lastProp=null,this._doDispatchAxisPointer())},_M.prototype._doDispatchAxisPointer=function(){var t,e;this._handle&&(t=this._payloadInfo,e=this._axisModel,this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:e.axis.dim,axisIndex:e.componentIndex}]}))},_M.prototype._onHandleDragEnd=function(){var t;this._dragging=!1,this._handle&&(t=this._axisPointerModel.get("value"),this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"}))},_M.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var t=t.getZr(),e=this._group,n=this._handle;t&&e&&(this._lastGraphicKey=null,e&&t.remove(e),n&&t.remove(n),this._group=null,this._handle=null,this._payloadInfo=null),Ly(this,"_doDispatchAxisPointer")},_M.prototype.doClear=function(){},_M.prototype.buildLabel=function(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}};u(DM,IM=_M),DM.prototype.makeElOption=function(t,e,n,i,r){var o,a,s=n.axis,l=s.grid,u=i.get("type"),h=AM(l,s).getOtherAxis(s).getGlobalExtent(),c=s.toGlobalCoord(s.dataToCoord(e,!0)),p=(u&&"none"!==u&&(o=(a=i).get("type"),a=a.getModel(o+"Style"),"line"===o?(p=a.getLineStyle()).fill=null:"shadow"===o&&((p=a.getAreaStyle()).stroke=null),o=p,(a=PM[u](s,c,h)).style=o,t.graphicKey=a.type,t.pointer=a),Kb(l.model,n));u=e,s=t,c=p,h=n,o=i,a=r,l=aS.innerTextLayout(c.rotation,0,c.labelDirection),c.labelMargin=o.get(["label","margin"]),MM(s,h,o,a,{position:CM(h.axis,u,c),align:l.textAlign,verticalAlign:l.textVerticalAlign})},DM.prototype.getHandleTransform=function(t,e,n){var i=Kb(e.axis.grid.model,e,{labelInside:!1}),n=(i.labelMargin=n.get(["handle","margin"]),CM(e.axis,t,i));return{x:n[0],y:n[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},DM.prototype.updateHandleTransform=function(t,e,n,i){var n=n.axis,r=n.grid,o=n.getGlobalExtent(!0),r=AM(r,n).getOtherAxis(n).getGlobalExtent(),n="x"===n.dim?0:1,a=[t.x,t.y],e=(a[n]+=e[n],a[n]=Math.min(o[1],a[n]),a[n]=Math.max(o[0],a[n]),(r[1]+r[0])/2),o=[e,e];o[n]=a[n];return{x:a[0],y:a[1],rotation:t.rotation,cursorPoint:o,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][n]}};var IM,kM=DM;function DM(){return null!==IM&&IM.apply(this,arguments)||this}function AM(t,e){var n={};return n[e.dim+"AxisIndex"]=e.index,t.getCartesian(n)}var PM={line:function(t,e,n){var i;return i=[e,n[0]],e=[e,n[1]],n=LM(t),{type:"Line",subPixelOptimize:!0,shape:{x1:i[n=n||0],y1:i[1-n],x2:e[n],y2:e[1-n]}}},shadow:function(t,e,n){var i=Math.max(1,t.getBandWidth()),r=n[1]-n[0];return{type:"Rect",shape:(e=[e-i/2,n[0]],n=[i,r],i=LM(t),{x:e[i=i||0],y:e[1-i],width:n[i],height:n[1-i]})}}};function LM(t){return"x"===t.dim?0:1}u(NM,OM=g),NM.type="axisPointer",NM.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}};var OM,RM=NM;function NM(){var t=null!==OM&&OM.apply(this,arguments)||this;return t.type=NM.type,t}var EM=$o(),zM=E;function BM(t,e,n){var i,c,p;function r(t,h){c.on(t,function(e){n=p;var n,i,r={dispatchAction:o,pendings:i={showTip:[],hideTip:[]}};function o(t){var e=i[t.type];e?e.push(t):(t.dispatchAction=o,n.dispatchAction(t))}zM(EM(c).records,function(t){t&&h(t,e,r.dispatchAction)});var t,a=r.pendings,s=p,l=a.showTip.length,u=a.hideTip.length;l?t=a.showTip[l-1]:u&&(t=a.hideTip[u-1]),t&&(t.dispatchAction=null,s.dispatchAction(t))})}b.node||(i=e.getZr(),EM(i).records||(EM(i).records={}),p=e,EM(c=i).initialized||(EM(c).initialized=!0,r("click",dt(VM,"click")),r("mousemove",dt(VM,"mousemove")),r("globalout",FM)),(EM(i).records[t]||(EM(i).records[t]={})).handler=n)}function FM(t,e,n){t.handler("leave",null,n)}function VM(t,e,n,i){e.handler(t,n,i)}function HM(t,e){b.node||(e=e.getZr(),(EM(e).records||{})[t]&&(EM(e).records[t]=null))}u(UM,GM=gy),UM.prototype.render=function(t,e,n){var e=e.getComponent("tooltip"),i=t.get("triggerOn")||e&&e.get("triggerOn")||"mousemove|click";BM("axisPointer",n,function(t,e,n){"none"!==i&&("leave"===t||0<=i.indexOf(t))&&n({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})})},UM.prototype.remove=function(t,e){HM("axisPointer",e)},UM.prototype.dispose=function(t,e){HM("axisPointer",e)},UM.type="axisPointer";var GM,WM=UM;function UM(){var t=null!==GM&&GM.apply(this,arguments)||this;return t.type=UM.type,t}function XM(t,e){var n,i,r,o,a=[],s=t.seriesIndex;return null==s||!(e=e.getSeriesByIndex(s))||null==(s=Ko(n=e.getData(),t))||s<0||F(s)?{point:[]}:(i=n.getItemGraphicEl(s),r=e.coordinateSystem,e.getTooltipPosition?a=e.getTooltipPosition(s)||[]:r&&r.dataToPoint?a=t.isStacked?(e=r.getBaseAxis(),t=r.getOtherAxis(e).dim,e=e.dim,t="x"===t||"radius"===t?1:0,e=n.mapDimension(e),(o=[])[t]=n.get(e,s),o[1-t]=n.get(n.getCalculationInfo("stackResultDimension"),s),r.dataToPoint(o)||[]):r.dataToPoint(n.getValues(B(r.dimensions,function(t){return n.mapDimension(t)}),s))||[]:i&&((e=i.getBoundingRect().clone()).applyTransform(i.transform),a=[e.x+e.width/2,e.y+e.height/2]),{point:a,el:i})}var YM=$o();function qM(t,e,n){var o,a,i,s,l,r,u,h,c,p,d,f,g,y,m=t.currTrigger,v=[t.x,t.y],_=t,x=t.dispatchAction||pt(n.dispatchAction,n),w=e.getComponent("axisPointer").coordSysAxesInfo;if(w)return QM(v)&&(v=XM({seriesIndex:_.seriesIndex,dataIndex:_.dataIndex},e).point),o=QM(v),a=_.axesInfo,i=w.axesInfo,s="leave"===m||QM(v),l={},e={list:[],map:{}},u={showPointer:dt(ZM,r={}),showTooltip:dt(KM,e)},E(w.coordSysMap,function(t,e){var r=o||t.containPoint(v);E(w.coordSysAxesInfo[e],function(t,e){var n=t.axis,i=function(t,e){for(var n=0;n<(t||[]).length;n++){var i=t[n];if(e.axis.dim===i.axisDim&&e.axis.model.componentIndex===i.axisIndex)return i}}(a,t);s||!r||a&&!i||null!=(i=null!=(i=i&&i.value)||o?i:n.pointToData(v))&&jM(t,i,u,!1,l)})}),h={},E(i,function(n,t){var i=n.linkGroup;i&&!r[t]&&E(i.axesInfo,function(t,e){var e=r[e];t!==n&&e&&(e=e.value,i.mapper&&(e=n.axis.scale.parse(i.mapper(e,$M(t),$M(n)))),h[n.key]=e)})}),E(h,function(t,e){jM(i[e],t,u,!0,l)}),c=r,_=i,p=l.axesInfo=[],E(_,function(t,e){var n=t.axisPointerModel.option,e=c[e];e?(t.useHandle||(n.status="show"),n.value=e.value,n.seriesDataIndices=(e.payloadBatch||[]).slice()):t.useHandle||(n.status="hide"),"show"===n.status&&p.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:n.value})}),m=e,_=t,e=x,QM(t=v)||!m.list.length?e({type:"hideTip"}):(x=((m.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{},e({type:"showTip",escapeConnect:!0,x:t[0],y:t[1],tooltipOption:_.tooltipOption,position:_.position,dataIndexInside:x.dataIndexInside,dataIndex:x.dataIndex,seriesIndex:x.seriesIndex,dataByCoordSys:m.list})),e=i,_=(t=n).getZr(),x="axisPointerLastHighlights",d=YM(_)[x]||{},f=YM(_)[x]={},E(e,function(t,e){var n=t.axisPointerModel.option;"show"===n.status&&t.triggerEmphasis&&E(n.seriesDataIndices,function(t){var e=t.seriesIndex+" | "+t.dataIndex;f[e]=t})}),g=[],y=[],E(d,function(t,e){f[e]||y.push(t)}),E(f,function(t,e){d[e]||g.push(t)}),y.length&&t.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:y}),g.length&&t.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:g}),l}function jM(t,e,n,i,r){var o,a,s,l,u,h,c,p,d,f,g=t.axis;!g.scale.isBlank()&&g.containData(e)&&(t.involveSeries?(a=e,s=t.axis,l=s.dim,u=a,h=[],c=Number.MAX_VALUE,p=-1,E(t.seriesModels,function(e,t){var n,i=e.getData().mapDimensionsAll(l);if(e.getAxisTooltipData)var r=e.getAxisTooltipData(i,a,s),o=r.dataIndices,r=r.nestestValue;else{if(!(o=e.getData().indicesOfNearest(i[0],a,"category"===s.type?.5:null)).length)return;r=e.getData().get(i[0],o[0])}null!=r&&isFinite(r)&&(i=a-r,(n=Math.abs(i))<=c)&&((n'):""),V(t))o.innerHTML=t+c;else if(t){o.innerHTML="",F(t)||(t=[t]);for(var p,d=0;d"),o=f.join(e);this._showOrMove(i,function(){this._updateContentNotChangedOnAxis(t,p)?this._updatePosition(i,r,n[0],n[1],this._tooltipContent,p):this._showTooltipContent(i,o,p,Math.random()+"",n[0],n[1],r,null,g)})},ST.prototype._showSeriesItemTooltip=function(t,e,n){var i,r,o,a,s,l=this._ecModel,e=D(e),u=e.seriesIndex,h=l.getSeriesByIndex(u),c=e.dataModel||h,p=e.dataIndex,e=e.dataType,d=c.getData(e),f=this._renderMode,g=t.positionDefault,y=MT([d.getItemModel(p),c,h&&(h.coordinateSystem||{}).model],this._tooltipModel,g?{position:g}:null),h=y.get("trigger");null!=h&&"item"!==h||(i=c.getDataParams(p,e),r=new ey,i.marker=r.makeTooltipMarker("item",Kp(i.color),f),g=Zf(c.formatTooltip(p,!1,e)),h=y.get("order"),e=y.get("valueFormatter"),o=g.frag,a=o?$g(e?O({valueFormatter:e},o):o,r,f,h,l.get("useUTC"),y.get("textStyle")):g.text,s="item_"+c.name+"_"+p,this._showOrMove(y,function(){this._showTooltipContent(y,a,i,s,t.offsetX,t.offsetY,t.position,t.target,r)}),n({type:"showTip",dataIndexInside:p,dataIndex:d.getRawIndex(p),seriesIndex:u,from:this.uid}))},ST.prototype._showComponentItemTooltip=function(e,n,t){var i=D(n),r=i.tooltipConfig.option||{},o=[r=V(r)?{content:r,formatter:r}:r],i=this._ecModel.getComponent(i.componentMainType,i.componentIndex),i=(i&&o.push(i),o.push({formatter:r.content}),e.positionDefault),a=MT(o,this._tooltipModel,i?{position:i}:null),s=a.get("content"),l=Math.random()+"",u=new ey;this._showOrMove(a,function(){var t=_(a.get("formatterParams")||{});this._showTooltipContent(a,s,t,l,e.offsetX,e.offsetY,e.position,n,u)}),t({type:"showTip",from:this.uid})},ST.prototype._showTooltipContent=function(n,t,i,e,r,o,a,s,l){var u,h,c,p,d;this._ticket="",n.get("showContent")&&n.get("show")&&((u=this._tooltipContent).setEnterable(n.get("enterable")),h=n.get("formatter"),a=a||n.get("position"),t=t,c=this._getNearestPoint([r,o],i,n.get("trigger"),n.get("borderColor")).color,h&&(t=V(h)?(p=n.ecModel.get("useUTC"),t=h,jp(t=(d=F(i)?i[0]:i)&&d.axisType&&0<=d.axisType.indexOf("time")?Cp(d.axisValue,t,p):t,i,!0)):k(h)?(d=pt(function(t,e){t===this._ticket&&(u.setContent(e,l,n,c,a),this._updatePosition(n,a,r,o,u,i,s))},this),this._ticket=e,h(i,e,d)):h),u.setContent(t,l,n,c,a),u.show(n,c),this._updatePosition(n,a,r,o,u,i,s))},ST.prototype._getNearestPoint=function(t,e,n,i){return"axis"===n||F(e)?{color:i||("html"===this._renderMode?"#fff":"none")}:F(e)?void 0:{color:i||e.color||e.borderColor}},ST.prototype._updatePosition=function(t,e,n,i,r,o,a){var s,l=this._api.getWidth(),u=this._api.getHeight(),h=(e=e||t.get("position"),r.getSize()),c=t.get("align"),p=t.get("verticalAlign"),d=a&&a.getBoundingRect().clone();a&&d.applyTransform(a.transform),F(e=k(e)?e([n,i],o,r.el,d,{viewSize:[l,u],contentSize:h.slice()}):e)?(n=xo(e[0],l),i=xo(e[1],u)):L(e)?((o=e).width=h[0],o.height=h[1],n=(o=id(o,{width:l,height:u})).x,i=o.y,p=c=null):i=(n=(s=V(e)&&a?function(t,e,n,i){var r=n[0],o=n[1],a=Math.ceil(Math.SQRT2*i)+8,s=0,l=0,u=e.width,h=e.height;switch(t){case"inside":s=e.x+u/2-r/2,l=e.y+h/2-o/2;break;case"top":s=e.x+u/2-r/2,l=e.y-o-a;break;case"bottom":s=e.x+u/2-r/2,l=e.y+h+a;break;case"left":s=e.x-r-a,l=e.y+h/2-o/2;break;case"right":s=e.x+u+a,l=e.y+h/2-o/2}return[s,l]}(e,d,h,t.get("borderWidth")):function(t,e,n,i,r,o,a){var n=n.getSize(),s=n[0],n=n[1];null!=o&&(i":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},kT=(DT.prototype.evaluate=function(t){var e=typeof t;return V(e)?this._condVal.test(t):!!H(e)&&this._condVal.test(t+"")},DT);function DT(t){null==(this._condVal=V(t)?new RegExp(t):xt(t)?t:null)&&f("")}PT.prototype.evaluate=function(){return this.value};var AT=PT;function PT(){}OT.prototype.evaluate=function(){for(var t=this.children,e=0;e"}(i,r)+("style"!==i?xe(e):e||"")+(n?o+B(n,t).join(o)+o:"")+""}(t)}function dC(t){return{zrId:t,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function fC(t,e,n,i){return cC("svg","root",{width:t,height:e,xmlns:oC,"xmlns:xlink":aC,version:"1.1",baseProfile:"full",viewBox:!!i&&"0 0 "+t+" "+e},n)}var gC=0;var yC={cubicIn:"0.32,0,0.67,0",cubicOut:"0.33,1,0.68,1",cubicInOut:"0.65,0,0.35,1",quadraticIn:"0.11,0,0.5,0",quadraticOut:"0.5,1,0.89,1",quadraticInOut:"0.45,0,0.55,1",quarticIn:"0.5,0,0.75,0",quarticOut:"0.25,1,0.5,1",quarticInOut:"0.76,0,0.24,1",quinticIn:"0.64,0,0.78,0",quinticOut:"0.22,1,0.36,1",quinticInOut:"0.83,0,0.17,1",sinusoidalIn:"0.12,0,0.39,0",sinusoidalOut:"0.61,1,0.88,1",sinusoidalInOut:"0.37,0,0.63,1",exponentialIn:"0.7,0,0.84,0",exponentialOut:"0.16,1,0.3,1",exponentialInOut:"0.87,0,0.13,1",circularIn:"0.55,0,1,0.45",circularOut:"0,0.55,0.45,1",circularInOut:"0.85,0,0.15,1"},mC="transform-origin";var vC={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function _C(t,e){var n=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[n]=t,n}function xC(t){return V(t)?yC[t]?"cubic-bezier("+yC[t]+")":Kn(t)?t:"":""}function wC(D,A,P,L){var t=D.animators,e=t.length,n=[];if(D instanceof Ph){if(r=function(t,e,u){var h,c,t=t.shape.paths,p={};if(E(t,function(t){var e=dC(u.zrId),t=(e.animation=!0,wC(t,{},e,!0),e.cssAnims),n=e.cssNodes,e=R(t),i=e.length;if(i){var r,o,a=t[c=e[i-1]];for(r in a){var s=a[r];p[r]=p[r]||{d:""},p[r].d+=s.d||""}for(o in n){var l=n[o].animation;0<=l.indexOf(c)&&(h=l)}}}),h)return e.d=!1,t=_C(p,u),h.replace(c,t)}(D,A,P))n.push(r);else if(!e)return}else if(!e)return;for(var i,r,o,a={},s=0;s"].join(o):"")&&(e=cC("style","stl",{},[],c),h.push(e)),fC(i,l,h,t.useViewBox)},rI.prototype.renderToString=function(t){return pC(this.renderToVNode({animation:N((t=t||{}).cssAnimation,!0),emphasis:N(t.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:N(t.useViewBox,!0)}),{newline:!0})},rI.prototype.setBackgroundColor=function(t){this._backgroundColor=t},rI.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},rI.prototype._paintList=function(t,e,n){for(var i,r,o,a,s,l,u,h=t.length,c=[],p=0,d=0,f=0;f