!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 c=function(t,e){return(c=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}c(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var p=function(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1},w=new function(){this.browser=new p,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?(w.wxa=!0,w.touchEventsSupported=!0):"undefined"==typeof document&&"undefined"!=typeof self?w.worker=!0:"undefined"==typeof navigator||0===navigator.userAgent.indexOf("Node.js")?(w.node=!0,w.svgSupported=!0):(J=navigator.userAgent,ne=(Vt=w).browser,rt=J.match(/Firefox\/([\d.]+)/),A=J.match(/MSIE\s([\d.]+)/)||J.match(/Trident\/.+?rv:(([\d.]+))/),Q=J.match(/Edge?\/([\d.]+)/),J=/micromessenger/i.test(J),rt&&(ne.firefox=!0,ne.version=rt[1]),A&&(ne.ie=!0,ne.version=A[1]),Q&&(ne.edge=!0,ne.version=Q[1],ne.newEdge=18<+Q[1].split(".")[0]),J&&(ne.weChat=!0),Vt.svgSupported="undefined"!=typeof SVGRect,Vt.touchEventsSupported="ontouchstart"in window&&!ne.ie&&!ne.edge,Vt.pointerEventsSupported="onpointerdown"in window&&(ne.edge||ne.ie&&11<=+ne.version),Vt.domSupported="undefined"!=typeof document,rt=document.documentElement.style,Vt.transform3dSupported=(ne.ie&&"transition"in rt||ne.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in rt)&&!("OTransition"in rt),Vt.transformSupported=Vt.transform3dSupported||ne.ie&&9<=+ne.version);var j="12px sans-serif";var y,m,v=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",o[u]+":0",i[1-l]+":auto",o[1-u]+":auto",""].join("!important;"),t.appendChild(a),n.push(a)}}return n}(e,r),r,o);if(e)return e(t,n,i),!0}return!1}function fe(t){return"CANVAS"===t.nodeName.toUpperCase()}var ge=/([&<>"'])/g,ye={"&":"&","<":"<",">":">",'"':""","'":"'"};function me(t){return null==t?"":(t+"").replace(ge,function(t,e){return ye[e]})}var ve=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,_e=[],xe=w.browser.firefox&&+w.browser.version.split(".")[0]<39;function be(t,e,n,i){return n=n||{},i?we(t,e,n):xe&&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):we(t,e,n),n}function we(t,e,n){if(w.domSupported&&t.getBoundingClientRect){var i,o=e.clientX,e=e.clientY;if(fe(t))return i=t.getBoundingClientRect(),n.zrX=o-i.left,void(n.zrY=e-i.top);if(de(_e,t,o,e))return n.zrX=_e[0],void(n.zrY=_e[1])}n.zrX=n.zrY=0}function Se(t){return t||window.event}function Me(t,e,n){var i;return null==(e=Se(e)).zrX&&((i=e.type)&&0<=i.indexOf("touch")?(i=("touchend"!==i?e.targetTouches:e.changedTouches)[0])&&be(t,i,e,n):(be(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,o,r,a;n?n[1]<1e-5&&-1e-5t.getWidth()||n<0||n>t.getHeight()}W(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(a){sn.prototype[a]=function(t){var e,n,i=t.zrX,o=t.zrY,r=hn(this,i,o);if("mouseup"===a&&r||(n=(e=this.findHover(i,o)).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=r:s=1+r;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);r(t,e[n+h])<0?l=h:a=h+1}return l}function mn(A,L){var P,O,R=pn,z=0,N=[];function e(t){var e=P[t],n=O[t],i=P[t+1],o=O[t+1],t=(O[t]=n+o,t===z-3&&(P[t+1]=P[t+2],O[t+1]=O[t+2]),z--,yn(A[i],A,e,n,0,L));if(e+=t,0!=(n-=t)&&0!==(o=gn(A[e+n-1],A,i,o,o-1,L)))if(n<=o){var r=e,a=n,t=i,s=o,l=0;for(l=0;lO[t+1])break;e(t)}},forceMergeRuns:function(){for(;1>=1;return t+e}(o);do{}while((r=dn(t,n,i,e))=this._maxSize&&0>4|(3840&o)>>8,240&o|(240&o)>>4,15&o|(15&o)<<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<=(o=parseInt(n.slice(1,7),16))&&o<=16777215?(ci(e,(16711680&o)>>16,(65280&o)>>8,255&o,9===i?parseInt(n.slice(7),16)/255:1),gi(t,e),e):void ci(e,0,0,0,1):void 0;var o=n.indexOf("("),r=n.indexOf(")");if(-1!==o&&r+1===i){var i=n.substr(0,o),a=n.substr(o+1,r-(o+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]),o=li(t[2]),i=o<=.5?o*(i+1):o+i-o*i,o=2*o-i;return ci(e=e||[],ri(255*ui(o,i,n+1/3)),ri(255*ui(o,i,n)),ri(255*ui(o,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,o=0==d?1:f((e-n.percent)/d,1),i.easingFunc&&(o=i.easingFunc(o)),f=a?this._additiveValue:p?Ei:t[c],(Ni(l)||p)&&(f=f||(this._additiveValue=[])),this.discrete?t[c]=(o<1?n:i).rawValue:Ni(l)?(1===l?Ai:function(t,e,n,i){for(var o=e.length,r=o&&e[0].length,a=0;athis._sleepAfterStill)&&this.animation.stop()},$o.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},$o.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},$o.prototype.refreshHover=function(){this._needsRefreshHover=!0},$o.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&"canvas"===this.painter.getType()&&this.painter.refreshHover())},$o.prototype.resize=function(t){this._disposed||(this.painter.resize((t=t||{}).width,t.height),this.handler.resize())},$o.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},$o.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},$o.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},$o.prototype.setCursorStyle=function(t){this._disposed||this.handler.setCursorStyle(t)},$o.prototype.findHover=function(t,e){if(!this._disposed)return this.handler.findHover(t,e)},$o.prototype.on=function(t,e,n){return this._disposed||this.handler.on(t,e,n),this},$o.prototype.off=function(t,e){this._disposed||this.handler.off(t,e)},$o.prototype.trigger=function(t,e){this._disposed||this.handler.trigger(t,e)},$o.prototype.clear=function(){if(!this._disposed){for(var t=this.storage.getRoots(),e=0;el&&(l=s[h],u=h);++r[u],s[u]=0,++a}return B(r,function(t){return t/i})}function hr(t){var e=2*Math.PI;return(t%e+e)%e}function cr(t){return-1e-4=e.maxIterations){t+=e.ellipsis;break}var s=0===a?function(t,e,n,i){for(var o=0,r=0,a=t.length;rr){0i.width&&(r=e.split("\n"),c=!0),i.accumWidth=t):(t=_a(e,h,i.width,i.breakAll,i.accumWidth),i.accumWidth=t.accumWidth+n,a=t.linesWidths,r=t.lines)):r=e.split("\n");for(var p=0;pthis._ux||i>this._uy;return this.addData(Ha.L,t,e),this._ctx&&o&&this._ctx.lineTo(t,e),o?(this._xi=t,this._yi=e,this._pendingPtDist=0):(o=n*n+i*i)>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=e,this._pendingPtDist=o),this},o.prototype.bezierCurveTo=function(t,e,n,i,o,r){return this._drawPendingPt(),this.addData(Ha.C,t,e,n,i,o,r),this._ctx&&this._ctx.bezierCurveTo(t,e,n,i,o,r),this._xi=o,this._yi=r,this},o.prototype.quadraticCurveTo=function(t,e,n,i){return this._drawPendingPt(),this.addData(Ha.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,o,r){return this._drawPendingPt(),ns[0]=i,ns[1]=o,os(ns,r),this.addData(Ha.A,t,e,n,n,i=ns[0],(o=ns[1])-i,0,r?0:1),this._ctx&&this._ctx.arc(t,e,n,i,o,r),this._xi=Ka(o)*n+t,this._yi=$a(o)*n+e,this},o.prototype.arcTo=function(t,e,n,i,o){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(t,e,n,i,o),this},o.prototype.rect=function(t,e,n,i){return this._drawPendingPt(),this._ctx&&this._ctx.rect(t,e,n,i),this.addData(Ha.R,t,e,n,i),this},o.prototype.closePath=function(){this._drawPendingPt(),this.addData(Ha.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||!es||(this.data=new Float32Array(e));for(var n=0;nu.length&&(this._expandData(),u=this.data);for(var h=0;hn||Qa(y)>i||c===e-1)&&(f=Math.sqrt(T*T+y*y),o=g,r=_);break;case Ha.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,o,r,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,o,a,f),f=Bn(e,i,r,s,f),y=g-u,m=f-h;c+=Math.sqrt(y*y+m*m),u=g,h=f}return c}(o,r,m,v,g,_,x,b,10),o=x,r=b;break;case Ha.Q:f=function(t,e,n,i,o,r,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,o,p),p=Un(e,i,r,p),f=d-s,g=p-l;u+=Math.sqrt(f*f+g*g),s=d,l=p}return u}(o,r,m=t[c++],v=t[c++],g=t[c++],_=t[c++],10),o=g,r=_;break;case Ha.A:var x=t[c++],b=t[c++],w=t[c++],S=t[c++],M=t[c++],I=t[c++],C=I+M;c+=1,d&&(a=Ka(M)*w+x,s=$a(M)*S+b),f=ja(w,S)*qa(ts,Math.abs(I)),o=Ka(C)*w+x,r=$a(C)*S+b;break;case Ha.R:a=o=t[c++],s=r=t[c++];f=2*t[c++]+2*t[c++];break;case Ha.Z:var T=a-o,y=s-r;f=Math.sqrt(T*T+y*y),o=a,r=s}0<=f&&(u+=l[h++]=f)}return this._pathLen=u},o.prototype.rebuildPath=function(t,e){var n,i,o,r,a,s,l,u,h=this.data,N=this._ux,E=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=fs[i=0]+t&&a<=fs[1]+t?h:0;oMath.PI/2&&c<1.5*Math.PI?-h:h)}return l}(y,m,_,x,x+b,w,I,o);u=Math.cos(x+b)*v+y,h=Math.sin(x+b)*_+m;break;case cs.R:c=u=a[d++],p=h=a[d++];if(S=c+a[d++],M=p+a[d++],n){if(as(c,p,S,p,e,i,o)||as(S,p,S,M,e,i,o)||as(S,M,c,M,e,i,o)||as(c,M,c,p,e,i,o))return!0}else l=(l+=hs(S,p,S,M,i,o))+hs(c,M,c,p,i,o);break;case cs.Z:if(n){if(as(u,h,c,p,e,i,o))return!0}else l+=hs(u,h,c,p,i,o);u=c,h=p}}return n||(t=h,r=p,Math.abs(t-r)i.len()&&(uMath.abs(i[1])?0':'':{renderMode:o,content:"{"+(t.markerId||"markerX")+"|} ",style:"subItem"===i?{width:4,height:4,borderRadius:2,backgroundColor:n}:{width:10,height:10,borderRadius:5,backgroundColor:n}}:""}function Wp(t,e){return e=e||"transparent",U(t)?t:P(t)&&t.colorStops&&(t.colorStops[0]||{}).color||e}function Gp(t,e){var n;"_blank"===e||"blank"===e?((n=window.open()).opener=null,n.location.href=t):window.open(t,e)}var Up=W,Xp=["left","right","top","bottom","width","height"],Yp=[["width","left","right"],["height","top","bottom"]];function Zp(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,o,r=t.getBoundingRect(),e=s.childAt(e+1),e=e&&e.getBoundingRect();d="horizontal"===a?(i=r.width+(e?-e.x+r.x:0),u<(n=c+i)||t.newline?(c=0,n=i,p+=d+l,r.height):Math.max(d,r.height)):(i=r.height+(e?-e.y+r.y:0),h<(o=p+i)||t.newline?(c+=d+l,p=0,o=i,r.width):Math.max(d,r.width)),t.newline||(t.x=c,t.y=p,t.markRedraw(),"horizontal"===a?c=n+l:p=o+l)})}var qp=Zp;function jp(t,e,n){n=Np(n||0);var i=e.width,o=e.height,r=Z(t.left,i),a=Z(t.top,o),e=Z(t.right,i),s=Z(t.bottom,o),l=Z(t.width,i),u=Z(t.height,o),h=n[2]+n[0],c=n[1]+n[3],p=t.aspect;switch(isNaN(l)&&(l=i-e-c-r),isNaN(u)&&(u=o-s-h-a),null!=p&&(isNaN(l)&&isNaN(u)&&(i/oe)return t[i];return t[n-1]}var Od,Rd="\0_ec_inner",zd=(u(Nd,Od=jc),Nd.prototype.init=function(t,e,n,i,o,r){i=i||{},this.option=null,this._theme=new jc(i),this._locale=new jc(o),this._optionManager=r},Nd.prototype.setOption=function(t,e,n){e=Vd(e);this._optionManager.setOption(t,n,e),this._resetOption(null,e)},Nd.prototype.resetOption=function(t,e){return this._resetOption(t,Vd(e))},Nd.prototype._resetOption=function(t,e){var n,i=!1,o=this._optionManager;return t&&"recreate"!==t||(n=o.mountOption("recreate"===t),this.option&&"recreate"!==t?(this.restoreData(),this._mergeOption(n,e)):Dd(this,n),i=!0),"timeline"!==t&&"media"!==t||this.restoreData(),t&&"recreate"!==t&&"timeline"!==t||(n=o.getTimelineOption(this))&&(i=!0,this._mergeOption(n,e)),t&&"recreate"!==t&&"media"!==t||(n=o.getMediaOption(this)).length&&W(n,function(t){i=!0,this._mergeOption(t,e)},this),i},Nd.prototype.mergeOption=function(t){this._mergeOption(t,null)},Nd.prototype._mergeOption=function(i,t){var o=this.option,h=this._componentsMap,c=this._componentsCount,n=[],r=R(),p=t&&t.replaceMergeMainTypeMap;_d(this).datasetMap=R(),W(i,function(t,e){null!=t&&(g.hasClass(e)?e&&(n.push(e),r.set(e,!0)):o[e]=null==o[e]?S(t):d(o[e],t,!0))}),p&&p.each(function(t,e){g.hasClass(e)&&!r.get(e)&&(n.push(e),r.set(e,!0))}),g.topologicalTravel(n,g.getAllClassMainTypes(),function(r){var a,t=function(t,e,n){return(e=(e=Id.get(e))&&e(t))?n.concat(e):n}(this,r,Ir(i[r])),e=h.get(r),n=e?p&&p.get(r)?"replaceMerge":"normalMerge":"replaceAll",e=kr(e,t,n),s=(zr(e,r,g),o[r]=null,h.set(r,null),c.set(r,0),[]),l=[],u=0;W(e,function(t,e){var n=t.existing,i=t.newOption;if(i){var o=g.getClass(r,t.keyInfo.subType,!("series"===r));if(!o)return;if("tooltip"===r){if(a)return;a=!0}n&&n.constructor===o?(n.name=t.keyInfo.name,n.mergeOption(i,this),n.optionUpdated(i,!1)):(e=F({componentIndex:e},t.keyInfo),F(n=new o(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),o[r]=s,h.set(r,l),c.set(r,u),"series"===r&&Cd(this)},this),this._seriesIndices||Cd(this)},Nd.prototype.getOption=function(){var a=S(this.option);return W(a,function(t,e){if(g.hasClass(e)){for(var n=Ir(t),i=n.length,o=!1,r=i-1;0<=r;r--)n[r]&&!Rr(n[r])?o=!0:(n[r]=null,o||i--);n.length=i,a[e]=n}}),delete a[Rd],a},Nd.prototype.getTheme=function(){return this._theme},Nd.prototype.getLocaleModel=function(){return this._locale},Nd.prototype.setUpdatePayload=function(t){this._payload=t},Nd.prototype.getUpdatePayload=function(){return this._payload},Nd.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,o=this._chunks,r=this._dimensions,a=r.length,s=this._rawExtent,l=B(r,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 r;o=r-1}}}return-1},l.prototype.indicesOfNearest=function(t,e,n){var i=this._chunks[t],o=[];if(i){null==n&&(n=1/0);for(var r=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),o=i._chunks[t],r=this.count(),a=0,s=Math.floor(1/e),l=this.getRawIndex(0),u=new(Dg(this._rawCount))(Math.min(2*(Math.ceil(r/s)+2),r));u[a++]=l;for(var h=1;hh[1]&&(h[1]=y),c[p++]=m}return o._count=p,o._indices=c,o._updateGetRawIdx(),o},l.prototype.each=function(t,e){if(this._count)for(var n=t.length,i=this._chunks,o=0,r=this.count();o'+me(u)+""+h,t))}function Yg(t,e,n,i){var o,r,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=V(t)?t:[t],function(t,e){return Ep(t,V(r)?r[e]:r,d)})};if(!u||!h)return o=c?"":t.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||"#333",l),p=u?"":Ep(p,"ordinal",d),r=e.valueType,f=h?[]:f(e.value,e.dataIndex),e=!c||!u,a=!c&&u,i=Vg(i,l),s=i.nameStyle,i=i.valueStyle,"richText"===l?(c?"":o)+(u?"":jg(t,p,s))+(h?"":function(t,e,n,i,o){o=[o],i=i?10:20;return n&&o.push({padding:[0,0,0,i],align:"right"}),t.markupStyleCreator.wrapRichTextStyle(V(e)?e.join(" "):e,o)}(t,f,e,a,i)):qg((c?"":o)+(u?"":''+me(p)+"")+(h?"":function(t,e,n,i){n=n?"10px":"20px",e=e?"float:right;margin-left:"+n:"";return t=V(t)?t:[t],''+B(t,me).join("  ")+""}(f,e,a,i)),n)}function Zg(t,e,n,i,o,r){if(t)return Ug(t)({useUTC:o,renderMode:n,orderMode:i,markupStyleCreator:e,valueFormatter:t.valueFormatter},t,0,r)}function qg(t,e){return'
'+t+'
'}function jg(t,e,n){return t.markupStyleCreator.wrapRichTextStyle(e,n)}function Kg(t,e){t=t.get("padding");return null!=t?t:"richText"===e?[8,10]:10}Qg.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},Qg.prototype.makeTooltipMarker=function(t,e,n){var i="richText"===n?this._generateStyleName():null,e=Hp({color:e,type:t,renderMode:n,markerId:i});return U(e)?e:(this.richTextStyles[i]=e.style,e.content)},Qg.prototype.wrapRichTextStyle=function(t,e){var n={},e=(V(e)?W(e,function(t){return F(n,t)}):F(n,e),this._generateStyleName());return this.richTextStyles[e]=n,"{"+e+"|"+t+"}"};var $g=Qg;function Qg(){this.richTextStyles={},this._nextStyleNameId=xr()}function Jg(t){var e,n,i,o,r,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=V(m),_=(_=d,Wp((b=p).getData().getItemVisual(_,"style")[b.visualDrawType]));function x(t,e){e=s.getDimensionInfo(e);e&&!1!==e.otherDims.tooltip&&(l?c.push(Wg("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)},r.prototype.restoreData=function(){this.dataTask.dirty()},r.prototype.getColorFromPalette=function(t,e,n){var i=this.ecModel;return Ad.prototype.getColorFromPalette.call(this,t,e,n)||i.getColorFromPalette(t,e,n)},r.prototype.coordDimToDataDim=function(t){return this.getRawData().mapDimensionsAll(t)},r.prototype.getProgressive=function(){return this.get("progressive")},r.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},r.prototype.select=function(t,e){this._innerSelect(this.getData(e),t)},r.prototype.unselect=function(t,e){var n=this.option.selectedMap;if(n){var i=this.option.selectedMode,o=this.getData(e);if("series"===i||"all"===n)this.option.selectedMap={},this._selectedDataIndicesMap={};else for(var r=0;re.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function ly(e,n){W(Rt(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(t){e.wrapMethod(t,I(uy,n))})}function uy(t,e){t=hy(t);return t&&t.setOutputEnd((e||this).count()),e}function hy(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}st(iy,Gf),st(iy,Ad),Kr(iy,g);py.prototype.init=function(t,e){},py.prototype.render=function(t,e,n,i){},py.prototype.dispose=function(t,e){},py.prototype.updateView=function(t,e,n,i){},py.prototype.updateLayout=function(t,e,n,i){},py.prototype.updateVisual=function(t,e,n,i){},py.prototype.toggleBlurSeries=function(t,e,n){},py.prototype.eachRendered=function(t){var e=this.group;e&&e.traverse(t)};var cy=py;function py(){this.group=new D,this.uid=Qc("viewComponent")}function dy(){var r=i();return function(t){var e=r(t),t=t.pipelineContext,n=!!e.large,i=!!e.progressiveRender,o=e.large=!(!t||!t.large),e=e.progressiveRender=!(!t||!t.progressiveRender);return!(n==o&&i==e)&&"reset"}}jr(cy),ta(cy);var fy=i(),gy=dy(),yy=(my.prototype.init=function(t,e){},my.prototype.render=function(t,e,n,i){},my.prototype.highlight=function(t,e,n,i){t=t.getData(i&&i.dataType);t&&_y(t,i,"emphasis")},my.prototype.downplay=function(t,e,n,i){t=t.getData(i&&i.dataType);t&&_y(t,i,"normal")},my.prototype.remove=function(t,e){this.group.removeAll()},my.prototype.dispose=function(t,e){},my.prototype.updateView=function(t,e,n,i){this.render(t,e,n,i)},my.prototype.updateLayout=function(t,e,n,i){this.render(t,e,n,i)},my.prototype.updateVisual=function(t,e,n,i){this.render(t,e,n,i)},my.prototype.eachRendered=function(t){xc(this.group,t)},my.markUpdateMethod=function(t,e){fy(t).updateMethod=e},my.protoInitialize=void(my.prototype.type="chart"),my);function my(){this.group=new D,this.uid=Qc("viewChart"),this.renderTask=Yf({plan:xy,reset:by}),this.renderTask.context={view:this}}function vy(t,e,n){t&&$l(t)&&("emphasis"===e?Ol:Rl)(t,n)}function _y(e,t,n){var i,o=Nr(e,t),r=t&&null!=t.highlightKey?(t=t.highlightKey,i=null==(i=ol[t])&&il<=32?ol[t]=il++:i):null;null!=o?W(Ir(o),function(t){vy(e.getItemGraphicEl(t),n,r)}):e.eachItemGraphicEl(function(t){vy(t,n,r)})}function xy(t){return gy(t.model)}function by(t){var e=t.model,n=t.ecModel,i=t.api,o=t.payload,r=e.pipelineContext.progressiveRender,t=t.view,a=o&&fy(o).updateMethod,r=r?"incrementalPrepareRender":a&&t[a]?a:"render";return"render"!==r&&t[r](e,n,i,o),wy[r]}jr(yy),ta(yy);var wy={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)}}},Sy="\0__throttleOriginMethod",My="\0__throttleRate",Iy="\0__throttleType";function Cy(t,o,r){var a,s,l,u,h,c=0,p=0,d=null;function f(){p=(new Date).getTime(),d=null,t.apply(l,u||[])}o=o||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}},Ey.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},Ey.prototype.updateStreamModes=function(t,e){var n=this._pipelineMap.get(t.uid),i=t.getData().count(),e=n.progressiveEnabled&&e.incrementalPrepareRender&&i>=n.threshold,o=t.get("large")&&i>=t.get("largeThreshold"),i="mod"===t.get("progressiveChunkMode")?i:null;t.pipelineContext=n.context={progressiveRender:e,modDataCount:i,large:o}},Ey.prototype.restorePipelines=function(t){var i=this,o=i._pipelineMap=R();t.eachSeries(function(t){var e=t.getProgressive(),n=t.uid;o.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)})},Ey.prototype.prepareStageTasks=function(){var n=this._stageTaskMap,i=this.api.getModel(),o=this.api;W(this._allHandlers,function(t){var e=n.get(t.uid)||n.set(t.uid,{});Mt(!(t.reset&&t.overallReset),""),t.reset&&this._createSeriesStageTask(t,e,i,o),t.overallReset&&this._createOverallStageTask(t,e,i,o)},this)},Ey.prototype.prepareView=function(t,e,n,i){var o=t.renderTask,r=o.context;r.model=e,r.ecModel=n,r.api=i,o.__block=!t.incrementalPrepareRender,this._pipe(e,o)},Ey.prototype.performDataProcessorTasks=function(t,e){this._performStageTasks(this._dataProcessorHandlers,t,e,{block:!0})},Ey.prototype.performVisualTasks=function(t,e,n){this._performStageTasks(this._visualHandlers,t,e,n)},Ey.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))}W(t,function(i,t){var e,n,o,r,a;u.visualType&&u.visualType!==i.visualType||(e=(n=c._stageTaskMap.get(i.uid)).seriesTaskMap,(n=n.overallTask)?((r=n.agentStubMap).each(function(t){p(u,t)&&(t.dirty(),o=!0)}),o&&n.dirty(),c.updatePayload(n,l),a=c.getPerformArgs(n,u.block),r.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},Ey.prototype.performSeriesTasks=function(t){var e;t.eachSeries(function(t){e=t.dataTask.perform()||e}),this.unfinished=e||this.unfinished},Ey.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())})},Ey.prototype.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)},Ey.prototype._createSeriesStageTask=function(n,t,i,o){var r=this,a=t.seriesTaskMap,s=t.seriesTaskMap=R(),t=n.seriesType,e=n.getTargetSeries;function l(t){var e=t.uid,e=s.set(e,a&&a.get(e)||Yf({plan:Wy,reset:Gy,count:Yy}));e.context={model:t,ecModel:i,api:o,useClearVisual:n.isVisual&&!n.isLayout,plan:n.plan,reset:n.reset,scheduler:r},r._pipe(t,e)}n.createOnAllSeries?i.eachRawSeries(l):t?i.eachRawSeriesByType(t,l):e&&e(i,o).each(l)},Ey.prototype._createOverallStageTask=function(t,e,n,i){var o=this,r=e.overallTask=e.overallTask||Yf({reset:By}),a=(r.context={ecModel:n,api:i,overallReset:t.overallReset,scheduler:o},r.agentStubMap),s=r.agentStubMap=R(),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,Yf({reset:Vy,onDirty:Hy})));e.context={model:t,overallProgress:u},e.agent=r,e.__block=u,o._pipe(t,e)}Mt(!t.createOnAllSeries,""),e?n.eachRawSeriesByType(e,c):l?l(n,i).each(c):(u=!1,W(n.getSeries(),c)),h&&r.dirty()},Ey.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},Ey.wrapStageHandler=function(t,e){return(t=T(t)?{overallReset:t,seriesType:function(t){Zy=null;try{t(qy,jy)}catch(t){}return Zy}(t)}:t).uid=Qc("stageHandler"),e&&(t.visualType=e),t};var Ny=Ey;function Ey(t,e,n,i){this._stageTaskMap=R(),this.ecInstance=t,this.api=e,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}function By(t){t.overallReset(t.ecModel,t.api,t.payload)}function Vy(t){return t.overallProgress&&Fy}function Fy(){this.agent.dirty(),this.getDownstream().dirty()}function Hy(){this.agent&&this.agent.dirty()}function Wy(t){return t.plan?t.plan(t.model,t.ecModel,t.api,t.payload):null}function Gy(t){t.useClearVisual&&t.data.clearAllVisual();t=t.resetDefines=Ir(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 Fs({shape:{x:0,y:0,width:t,height:n},style:{fill:i.connectedBackgroundColor}})),W(p,function(t){t=new Ls({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},s.prototype.convertToPixel=function(t,e){return m0(this,"convertToPixel",t,e)},s.prototype.convertFromPixel=function(t,e){return m0(this,"convertFromPixel",t,e)},s.prototype.containPixel=function(t,i){var o;if(!this._disposed)return W(Br(this._model,t),function(t,n){0<=n.indexOf("Models")&&W(t,function(t){var e=t.coordinateSystem;e&&e.containPoint?o=o||!!e.containPoint(i):"seriesModels"===n&&(e=this._chartsMap[t.__viewId])&&e.containPoint&&(o=o||e.containPoint(i,t))},this)},this),!!o;this.id},s.prototype.getVisual=function(t,e){var t=Br(this._model,t,{defaultMainType:"series"}),n=t.seriesModel.getData(),t=t.hasOwnProperty("dataIndexInside")?t.dataIndexInside:t.hasOwnProperty("dataIndex")?n.indexOfRawIndex(t.dataIndex):null;return null!=t?im(n,t,e):om(n,e)},s.prototype.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},s.prototype.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]},s.prototype._initEvents=function(){var t,n,i,s=this;W(B0,function(a){function t(t){var n,e,i,o=s.getModel(),r=t.target;"globalout"===a?n={}:r&&lm(r,function(t){var e,t=k(t);return t&&null!=t.dataIndex?(e=t.dataModel||o.getSeriesByIndex(t.seriesIndex),n=e&&e.getDataParams(t.dataIndex,t.dataType,r)||{},1):t.eventData&&(n=F({},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&&o.getComponent(e,i))&&s["series"===e.mainType?"_chartsMap":"_componentsMap"][e.__viewId],n.event=t,n.type=a,s._$eventProcessor.eventInfo={targetEl:r,packedEvent:n,model:e,view:i},s.trigger(a,n))}t.zrEventfulCallAtLast=!0,s._zr.on(a,t,s)}),W(F0,function(t,e){s._messageCenter.on(e,function(t){this.trigger(e,t)},s)}),W(["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?(sm("map","selectchanged",n,e,t),sm("pie","selectchanged",n,e,t)):"select"===t.fromAction?(sm("map","selected",n,e,t),sm("pie","selected",n,e,t)):"unselect"===t.fromAction&&(sm("map","unselected",n,e,t),sm("pie","unselected",n,e,t))})},s.prototype.isDisposed=function(){return this._disposed},s.prototype.clear=function(){this._disposed?this.id:this.setOption({series:[]},!0)},s.prototype.dispose=function(){var t,e,n;this._disposed?this.id:(this._disposed=!0,this.getDom()&&Gr(this.getDom(),K0,""),e=(t=this)._api,n=t._model,W(t._componentsViews,function(t){t.dispose(n,e)}),W(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])},s.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:F({duration:0},t&&t.animation)})}catch(t){throw this[n0]=!1,t}this[n0]=!1,x0.call(this,n),b0.call(this,n)}}},s.prototype.showLoading=function(t,e){this._disposed?this.id:(P(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)))},s.prototype.hideLoading=function(){this._disposed?this.id:(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},s.prototype.makeActionFromEvent=function(t){var e=F({},t);return e.type=F0[t.type],e},s.prototype.dispatchAction=function(t,e){var n;this._disposed?this.id:(P(e)||(e={silent:!!e}),V0[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&&w.browser.weChat&&this._throttledZrFlush(),x0.call(this,n),b0.call(this,n))))},s.prototype.updateLabelLayout=function(){t0.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},s.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())},s.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,o){for(var r=t._model,a=t._scheduler,s=o?t._componentsViews:t._chartsViews,l=o?t._componentsMap:t._chartsMap,u=t._zr,h=t._api,e=0;es.get("hoverLayerThreshold")&&!w.node&&!w.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)},k0=function(t){t[o0]=!0,t.getZr().wakeUp()},A0=function(t){t[o0]&&(t.getZr().storage.traverse(function(t){Wh(t)||R0(t)}),t[o0]=!1)},T0=function(n){return u(t,e=Fd),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){Ol(t,e),k0(n)},t.prototype.leaveEmphasis=function(t,e){Rl(t,e),k0(n)},t.prototype.enterBlur=function(t){zl(t),k0(n)},t.prototype.leaveBlur=function(t){Nl(t),k0(n)},t.prototype.enterSelect=function(t){El(t),k0(n)},t.prototype.leaveSelect=function(t){Bl(t),k0(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(D0=function(i){function o(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]}ta($v);var Jv=0,t1=(e1.createByAxisModel=function(t){var t=t.option,e=t.data,e=e&&B(e,n1);return new e1({categories:e,needCollect:!e,deduplication:!1!==t.dedplication})},e1.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},e1.prototype.parseAndCollect=function(t){var e,n,i=this._needCollect;return U(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},e1.prototype._getOrCreateMap=function(){return this._map||(this._map=R(this.categories))},e1);function e1(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++Jv}function n1(t){return P(t)&&null!=t.value?t.value:t+""}function i1(t){return"interval"===t.type||"log"===t.type}function o1(t,e,n,i){var o={},r=t[1]-t[0],r=o.interval=yr(r/e,!0),e=(null!=n&&ri[1]&&(i[0]=i[1]),o}function r1(t){var e=Math.pow(10,gr(t)),t=t/e;return t?2===t?t=3:3===t?t=5:t*=2:t=1,or(t*e)}function a1(t){return ar(t)+2}function s1(t,e,n){t[e]=Math.max(Math.min(t[e],n[1]),n[0])}function l1(t,e){return t>=e[0]&&t<=e[1]}function u1(t,e){return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])}function h1(t,e){return t*(e[1]-e[0])+e[0]}u(d1,c1=$v),d1.prototype.parse=function(t){return null==t?NaN:U(t)?this._ordinalMeta.getOrdinal(t):Math.round(t)},d1.prototype.contain=function(t){return l1(t=this.parse(t),this._extent)&&null!=this._ordinalMeta.categories[t]},d1.prototype.normalize=function(t){return u1(t=this._getTickNumber(this.parse(t)),this._extent)},d1.prototype.scale=function(t){return t=Math.round(h1(t,this._extent)),this.getRawOrdinalNumber(t)},d1.prototype.getTicks=function(){for(var t=[],e=this._extent,n=e[0];n<=e[1];)t.push({value:n}),n++;return t},d1.prototype.getMinorTicks=function(t){},d1.prototype.setSortInfo=function(t){if(null==t)this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;else{for(var e=t.ordinalNumbers,n=this._ordinalNumbersByTick=[],i=this._ticksByOrdinalNumber=[],o=0,r=this._ordinalMeta.categories.length,a=Math.min(r,e.length);o=t},d1.prototype.getOrdinalMeta=function(){return this._ordinalMeta},d1.prototype.calcNiceTicks=function(){},d1.prototype.calcNiceExtent=function(){},d1.type="ordinal";var c1,p1=d1;function d1(t){var t=c1.call(this,t)||this,e=(t.type="ordinal",t.getSetting("ordinalMeta"));return V(e=e||new t1({}))&&(e=new t1({categories:B(e,function(t){return P(t)?t.value:t})})),t._ordinalMeta=e,t._extent=t.getSetting("extent")||[0,e.categories.length-1],t}$v.registerClass(p1);var f1,g1=or,y1=(u(m1,f1=$v),m1.prototype.parse=function(t){return t},m1.prototype.contain=function(t){return l1(t,this._extent)},m1.prototype.normalize=function(t){return u1(t,this._extent)},m1.prototype.scale=function(t){return h1(t,this._extent)},m1.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=parseFloat(t)),isNaN(e)||(n[1]=parseFloat(e))},m1.prototype.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1]),this.setExtent(e[0],e[1])},m1.prototype.getInterval=function(){return this._interval},m1.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=a1(t)},m1.prototype.getTicks=function(t){var e=this._interval,n=this._extent,i=this._niceExtent,o=this._intervalPrecision,r=[];if(e){n[0]s&&r.push(t?{value:g1(s+e,o)}:{value:n[1]})}return r},m1.prototype.getMinorTicks=function(t){for(var e=this.getTicks(!0),n=[],i=this.getExtent(),o=1;oi[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),R1.length),t=Math.min(function(t,e,n,i){for(;n>>1;t[o][1]>1^-(1&s),l=(l=t.charCodeAt(a+1)-64)>>1^-(1&l);i.push([(o=s+=o)/n,(r=l+=r)/n])}return i}function k_(t,r){var e,n,o;return B(ht((t=(e=t).UTF8Encoding?(null==(o=(n=e).UTF8Scale)&&(o=1024),W(n.features,function(t){var e=t.geometry,n=e.encodeOffsets,i=e.coordinates;if(n)switch(e.type){case"LineString":e.coordinates=D_(i,n,o);break;case"Polygon":case"MultiLineString":T_(i,n,o);break;case"MultiPolygon":W(i,function(t,e){return T_(t,n[e],o)})}}),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},H_.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 r,a=this.__startIndex;ao[0]){for(l=0;lt);l++);s=i[o[l]]}o.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)}},Lx.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=o.r0?"endArc":"startArc":o.endAngle>=o.startAngle?"endAngle":"startAngle":a?0<=o.height?"bottom":"top":0<=o.width?"right":"left"),h=Cc(i),l=(Ic(t,h,{labelFetcher:r,labelDataIndex:n,defaultText:eb(r.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(pt(i))t.setTextConfig({rotation:i});else if(V(e))t.setTextConfig({rotation:0});else{var o,i=t.shape,r=i.clockwise?i.startAngle:i.endAngle,a=i.clockwise?i.endAngle:i.startAngle,s=(r+a)/2,i=n(e);switch(i){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":o=s;break;case"startAngle":case"insideStartAngle":o=r;break;case"endAngle":case"insideEndAngle":o=a;break;default:return t.setTextConfig({rotation:0})}n=1.5*Math.PI-o;"middle"===i&&n>Math.PI/2&&n<1.5*Math.PI&&(n-=Math.PI),t.setTextConfig({rotation:n})}}(t,"outside"===s?u:s,_b(a),i.get(["label","rotate"]))),u=l,s=h,a=r.getRawValue(n),l=function(t){return nb(e,t)},u&&((u=Rc(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"]));Yl(t,h.get("focus"),h.get("blurScope"),h.get("disabled")),jl(t,i),null!=(r=o).startAngle&&null!=r.endAngle&&r.startAngle===r.endAngle&&(t.style.fill="none",t.style.stroke="none",W(t.states,function(t){t.style&&(t.style.fill=t.style.stroke="none")}))}var bb,wb=function(){},Sb=(u(Mb,bb=Ss),Mb.prototype.getDefaultShape=function(){return new wb},Mb.prototype.buildPath=function(t,e){for(var n=e.points,i=this.baseDimIdx,o=1-this.baseDimIdx,r=[],a=[],s=this.barWidth,l=0;le[u-1].coord&&(e.reverse(),h.reverse()),function(t,e){var n,i,o=[],r=t.length;function a(t,e,n){var i=t.coord;return{coord:n,color:bi((n-i)/(e.coord-i),[t.color,e.color])}}for(var s=0;si)return;return 1}(a,e))return o=e.mapDimension(a.dim),r={},W(a.getViewLabels(),function(t){t=a.scale.getRawOrdinalNumber(t.tickValue);r[t]=1}),function(t){return!r.hasOwnProperty(e.get(o,t))}}}function uw(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(),o.width=u.width,e=(i.style.margin||0)+2.1,o.height=u.height+e,o.y-=(o.height-a)/2)}function Cw(t){return"center"===t.position}function Tw(t){var S,M,I=t.getData(),C=[],T=!1,D=(t.get("minShowLabelAngle")||0)*Sw,e=I.getLayout("viewRect"),k=I.getLayout("r"),A=e.width,L=e.x,n=e.y,e=e.height;function P(t){t.ignore=!0}if(I.each(function(t){var e,n,i,o,r,a,s,l,u,h,c=I.getItemGraphicEl(t),p=c.shape,d=c.getTextContent(),f=c.getTextGuideLine(),t=I.getItemModel(t),g=t.getModel("label"),y=g.get("position")||t.get(["emphasis","label","position"]),m=g.get("distanceToLabelLine"),v=g.get("alignTo"),_=Z(g.get("edgeDistance"),A),x=g.get("bleedMargin"),t=t.getModel("labelLine"),b=Z(t.get("length"),A),w=Z(t.get("length2"),A);Math.abs(p.endAngle-p.startAngle)=e.r0},Ow.type="pie";var Lw,Pw=Ow;function Ow(){var t=null!==Lw&&Lw.apply(this,arguments)||this;return t.ignoreLabelLineUpdate=!0,t}zw.prototype.getAllNames=function(){var t=this._getRawData();return t.mapArray(t.getName)},zw.prototype.containName=function(t){return 0<=this._getRawData().indexOfName(t)},zw.prototype.indexOfName=function(t){return this._getDataWithEncodedVisual().indexOfName(t)},zw.prototype.getItemVisual=function(t,e){return this._getDataWithEncodedVisual().getItemVisual(t,e)};var Rw=zw;function zw(t,e){this._getDataWithEncodedVisual=t,this._getRawData=e}var Nw,Ew=i(),Bw=(u(Vw,Nw=iy),Vw.prototype.init=function(t){Nw.prototype.init.apply(this,arguments),this.legendVisualProvider=new Rw(M(this.getData,this),M(this.getRawData,this)),this._defaultLabelLine(t)},Vw.prototype.mergeOption=function(){Nw.prototype.mergeOption.apply(this,arguments)},Vw.prototype.getInitialData=function(){return e=V(e={coordDimensions:["value"],encodeDefaulter:I(bd,t=this)})?{coordDimensions:e}:F({encodeDefine:t.getEncode()},e),i=t.getSource(),e=Gv(i,e).dimensions,(e=new Wv(e,t)).initData(i,n),e;var t,e,n,i},Vw.prototype.getDataParams=function(t){var e,n=this.getData(),i=Ew(n),o=i.seats,i=(o||(e=[],n.each(n.mapDimension("value"),function(t){e.push(t)}),o=i.seats=ur(e,n.hostModel.get("percentPrecision"))),Nw.prototype.getDataParams.call(this,t));return i.percent=o[t]||0,i.$vars.push("percent"),i},Vw.prototype._defaultLabelLine=function(t){Cr(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},Vw.type="series.pie",Vw.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"},Vw);function Vw(){return null!==Nw&&Nw.apply(this,arguments)||this}p_(function(t){t.registerChartView(Pw),t.registerSeriesModel(Bw),am("pie",t.registerAction),t.registerLayout(I(bw,"pie")),t.registerProcessor({seriesType:"pie",reset:function(t,e){var i,o=e.findComponents({mainType:"legend"});o&&o.length&&(i=t.getData()).filterSelf(function(t){for(var e=i.getName(t),n=0;nthis.getProgressiveThreshold()?this.id:""},Ww.type="series.scatter",Ww.dependencies=["grid","polar","geo","singleAxis","calendar"],Ww.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:"#212121"}},universalTransition:{divideShape:"clone"}};var Fw,Hw=Ww;function Ww(){var t=null!==Fw&&Fw.apply(this,arguments)||this;return t.type=Ww.type,t.hasSymbolVisual=!0,t}var Gw,Uw=function(){},Xw=(u(Yw,Gw=Ss),Yw.prototype.getDefaultShape=function(){return new Uw},Yw.prototype.reset=function(){this.notClear=!1,this._off=0},Yw.prototype.buildPath=function(t,e){var n,i=e.points,o=e.size,r=this.symbolProxy,a=r.shape,e=t.getContext?t.getContext():t,s=e&&o[0]<4,l=this.softClipShape;if(s)this._ctx=e;else{for(this._ctx=null,n=this._off;ne[1]&&e.reverse(),e},yS.prototype.pointToData=function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},yS.prototype.setCategorySortInfo=function(t){if("category"!==this.type)return!1;this.model.option.categorySortInfo=t,this.scale.setSortInfo(t)};var fS,gS=yS;function yS(t,e,n,i,o){t=fS.call(this,t,e,n)||this;return t.index=0,t.type=i||"value",t.position=o||"bottom",t}function mS(t,e,n){n=n||{};var t=t.coordinateSystem,i=e.axis,o={},r=i.getAxesOnZeroOf()[0],a=i.position,s=r?"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=(r&&(h=r.toGlobalCoord(r.dataToCoord(0)),u[l.onZero]=Math.max(Math.min(h,u[1]),u[0])),o.position=["y"===i?u[l[s]]:t[0],"x"===i?u[l[s]]:t[3]],o.rotation=Math.PI/2*("x"===i?0:1),o.labelDirection=o.tickDirection=o.nameDirection={top:-1,bottom:1,left:-1,right:1}[a],o.labelOffset=r?u[l[a]]-u[l.onZero]:0,e.get(["axisTick","inside"])&&(o.tickDirection=-o.tickDirection),xt(n.labelInside,e.get(["axisLabel","inside"]))&&(o.labelDirection=-o.labelDirection),e.get(["axisLabel","rotate"]));return o.labelRotate="top"===s?-h:h,o.z2=1,o}function vS(t){return"cartesian2d"===t.get("coordinateSystem")}function _S(i){var o={xAxisModel:null,yAxisModel:null};return W(o,function(t,e){var n=e.replace(/Model$/,""),n=i.getReferringComponents(n,Fr).models[0];o[e]=n}),o}var xS=Math.log;wS.prototype.getRect=function(){return this._rect},wS.prototype.update=function(t,e){var n=this._axesMap;function i(t){var d,e=G(t),n=e.length;if(n){for(var i=[],o=n-1;0<=o;o--){var r=t[+e[o]],a=r.model,s=r.scale;i1(s)&&a.get("alignTicks")&&null==a.get("interval")?i.push(r):(t_(s,a),i1(s)&&(d=r))}i.length&&(d||t_((d=i.pop()).scale,d.model),W(i,function(t){var e=t.scale,t=t.model,n=d.scale,i=y1.prototype,o=i.getTicks.call(n),r=i.getTicks.call(n,!0),a=o.length-1,n=i.getInterval.call(n),s=(t=J1(e,t)).extent,l=t.fixMin,t=t.fixMax,u=("log"===e.type&&(u=xS(e.base),s=[xS(s[0])/u,xS(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=r1(h),c=s[1]-h*a;else{u=(h=ah[1]?-1:1,r=["start"===c?h[0]-r*u:"end"===c?h[1]+r*u:(h[0]+h[1])/2,PS(c)?t.labelOffset+l*u:0],null!=(u=e.get("nameRotate"))&&(u=u*CS/180),PS(c)?a=TS.innerTextLayout(t.rotation,null!=u?u:t.rotation,l):(a=function(t,e,n,i){var o,n=hr(n-t),t=i[0]>i[1],i="start"===e&&!t||"start"!==e&&t;e=cr(n-CS/2)?(o=i?"bottom":"top","center"):cr(n-1.5*CS)?(o=i?"top":"bottom","center"):(o="middle",n<1.5*CS&&CS/2u[1]&&u.reverse(),(s=null==s||s>u[1]?u[1]:s)t[1]&&t.reverse(),{coordSys:{type:"polar",cx:i.cx,cy:i.cy,r:t[1],r0:t[0]},api:{coord:function(t){var e=o.dataToRadius(t[0]),t=r.dataToAngle(t[1]),n=i.coordToPoint([e,t]);return n.push(e,t*Math.PI/180),n},size:M(gM,i)}}},calendar:function(n){var t=n.getRect(),e=n.getRangeInfo();return{coordSys:{type:"calendar",x:t.x,y:t.y,width:t.width,height:t.height,cellWidth:n.getCellWidth(),cellHeight:n.getCellHeight(),rangeInfo:{start:e.start,end:e.end,weeks:e.weeks,dayCount:e.allDay}},api:{coord:function(t,e){return n.dataToPoint(t,e)}}}}};function qM(t){return t instanceof Ss}function jM(t){return t instanceof Ca}u(QM,KM=yy),QM.prototype.render=function(n,t,i,o){this._progressiveEls=null;var r=this._data,a=n.getData(),s=this.group,l=i2(n,a,t,i),t=(r||s.removeAll(),a.diff(r).add(function(t){o2(i,null,t,l(t,o),n,s,a)}).remove(function(t){t=r.getItemGraphicEl(t);t&&DM(t,uM(t).option,n)}).update(function(t,e){e=r.getItemGraphicEl(e);o2(i,e,t,l(t,o),n,s,a)}).execute(),n.get("clip",!0)?jx(n.coordinateSystem,!1,n):null);t?s.setClipPath(t):s.removeClipPath(),this._data=a},QM.prototype.incrementalPrepareRender=function(t,e,n){this.group.removeAll(),this._data=null},QM.prototype.incrementalRender=function(t,e,n,i,o){var r=e.getData(),a=i2(e,r,n,i),s=this._progressiveEls=[];function l(t){t.isGroup||(t.incremental=!0,t.ensureState("emphasis").hoverLayer=!0)}for(var u=t.start;un[o],f=[-c.x,-c.y],e=(e||(f[i]=l[s]),[0,0]),s=[-p.x,-p.y],g=O(t.get("pageButtonGap",!0),t.get("itemGap",!0)),f=(d&&("end"===t.get("pageButtonPosition",!0)?s[i]+=n[o]-p[o]:e[i]+=p[o]+g),s[1-i]+=c[r]/2-p[r]/2,l.setPosition(f),u.setPosition(e),h.setPosition(s),{x:0,y:0}),c=(f[o]=(d?n:c)[o],f[r]=Math.max(c[r],p[r]),f[a]=Math.min(0,p[a]+s[1-i]),u.__rectSize=n[o],d?((e={x:0,y:0})[o]=Math.max(n[o]-p[o]-g,0),e[r]=f[r],u.setClipPath(new Fs({shape:e})),u.__rectSize=e[o]):h.eachChild(function(t){t.attr({invisible:!0,silent:!0})}),this._getPageInfo(t));return null!=c.pageIndex&&Fh(l,{x:c.contentPosition[0],y:c.contentPosition[1]},d?t:null),this._updatePageInfoView(t,c),f},Y2.prototype._pageGo=function(t,e,n){t=this._getPageInfo(e)[t];null!=t&&n.dispatchAction({type:"legendScroll",scrollDataIndex:t,legendId:e.id})},Y2.prototype._updatePageInfoView=function(n,i){var o=this._controllerGroup,t=(W(["pagePrev","pageNext"],function(t){var e=null!=i[t+"DataIndex"],t=o.childOfName(t);t&&(t.setStyle("fill",e?n.get("pageIconColor",!0):n.get("pageIconInactiveColor",!0)),t.cursor=e?"pointer":"default")}),o.childOfName("pageText")),e=n.get("pageFormatter"),r=i.pageIndex,r=null!=r?r+1:0,a=i.pageCount;t&&e&&t.setStyle("text",U(e)?e.replace("{current}",null==r?"":r+"").replace("{total}",null==a?"":a+""):e({current:r,total:a}))},Y2.prototype._getPageInfo=function(t){var e=t.get("scrollDataIndex",!0),n=this.getContentGroup(),i=this._containerGroup.__rectSize,t=t.getOrient().index,o=G2[t],r=U2[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}},Y2.prototype._findTargetItemIndex=function(n){var i,o;return this._showController?(this.getContentGroup().eachChild(function(t,e){t=t.__legendDataIndex;null==o&&null!=t&&(o=e),t===n&&(i=e)}),null!=i?i:o):0},Y2.type="legend.scroll",Y2);function Y2(){var t=null!==H2&&H2.apply(this,arguments)||this;return t.type=Y2.type,t.newlineDisabled=!0,t._currentIndex=0,t}p_(function(t){p_(N2),t.registerComponentModel(B2),t.registerComponentView(X2),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 Z2=i(),q2=S,j2=M;function K2(){this._dragging=!1,this.animationThreshold=15}function $2(t,e,n,i){!function n(i,t){{var o;return P(i)&&P(t)?(o=!0,W(t,function(t,e){o=o&&n(i[e],t)}),!!o):i===t}}(Z2(n).lastProp,i)&&(Z2(n).lastProp=i,e?Fh(n,i,t):(n.stopAnimation(),n.attr(i)))}function Q2(t,e){t[e.get(["label","show"])?"show":"hide"]()}function J2(t){return{x:t.x||0,y:t.y||0,rotation:t.rotation||0}}function tI(t,e,n){var i=e.get("z"),o=e.get("zlevel");t&&t.traverse(function(t){"group"!==t.type&&(null!=i&&(t.z=i),null!=o&&(t.zlevel=o),t.silent=n)})}function eI(t,e,n,i,o){var r=nI(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=Np(n.get("padding")||0),s=n.getFont(),l=Do(r,s),u=o.position,h=l.width+a[1]+a[3],l=l.height+a[0]+a[2],c=o.align,c=("right"===c&&(u[0]-=h),"center"===c&&(u[0]-=h/2),o.verticalAlign),i=("bottom"===c&&(u[1]-=l),"middle"===c&&(u[1]-=l/2),o=u,c=h,h=l,i=(l=i).getWidth(),l=l.getHeight(),o[0]=Math.min(o[0]+c,i)-c,o[1]=Math.min(o[1]+h,l)-h,o[0]=Math.max(o[0],0),o[1]=Math.max(o[1],0),n.get("backgroundColor"));i&&"auto"!==i||(i=e.get(["axisLine","lineStyle","color"])),t.label={x:u[0],y:u[1],style:Tc(n,{text:r,font:s,fill:n.getTextColor(),padding:a,backgroundColor:i}),z2:10}}function nI(t,e,n,i,o){t=e.scale.parse(t);var r,a=e.scale.getLabel({value:t},{precision:o.precision}),o=o.formatter;return o&&(r={value:i_(e,{value:t}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]},W(i,function(t){var e=n.getSeriesByIndex(t.seriesIndex),t=t.dataIndexInside,e=e&&e.getDataParams(t);e&&r.seriesData.push(e)}),U(o)?a=o.replace("{value}",a):T(o)&&(a=o(r))),a}function iI(t,e,n){var i=Pe();return Ee(i,i,n.rotation),Ne(i,i,n.position),uc([t.dataToCoord(e),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],i)}K2.prototype.render=function(t,e,n,i){var o,r,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,o=this._handle,s&&"hide"!==s?(i&&i.show(),o&&o.show(),this.makeElOption(s={},a,t,e,n),(r=s.graphicKey)!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=r,r=this._moveAnimation=this.determineAnimation(t,e),i?(r=I($2,e,r),this.updatePointerEl(i,s,r),this.updateLabelEl(i,s,r,e)):(i=this._group=new D,this.createPointerEl(i,s,t,e),this.createLabelEl(i,s,t,e),n.getZr().add(i)),tI(i,e,!0),this._renderHandle(a)):(i&&i.hide(),o&&o.hide()))},K2.prototype.remove=function(t){this.clear(t)},K2.prototype.dispose=function(t){this.clear(t)},K2.prototype.determineAnimation=function(t,e){var n,i=e.get("animation"),o=t.axis,r="category"===o.type,e=e.get("snap");return!(!e&&!r)&&("auto"===i||null==i?(n=this.animationThreshold,r&&o.getBandWidth()>n||!!e&&(r=NS(t).seriesDataCount,e=o.getExtent(),Math.abs(e[0]-e[1])/r>n)):!0===i)},K2.prototype.makeElOption=function(t,e,n,i,o){},K2.prototype.createPointerEl=function(t,e,n,i){var o=e.pointer;o&&(o=Z2(t).pointerEl=new bc[o.type](q2(e.pointer)),t.add(o))},K2.prototype.createLabelEl=function(t,e,n,i){e.label&&(e=Z2(t).labelEl=new Xs(q2(e.label)),t.add(e),Q2(e,i))},K2.prototype.updatePointerEl=function(t,e,n){t=Z2(t).pointerEl;t&&e.pointer&&(t.setStyle(e.pointer.style),n(t,{shape:e.pointer.shape}))},K2.prototype.updateLabelEl=function(t,e,n,i){t=Z2(t).labelEl;t&&(t.setStyle(e.label.style),n(t,{x:e.label.x,y:e.label.y}),Q2(t,i))},K2.prototype._renderHandle=function(t){var e,n,i,o,r,a;!this._dragging&&this.updateHandleTransform&&(e=this._axisPointerModel,n=this._api.getZr(),i=this._handle,o=e.getModel("handle"),a=e.get("status"),o.get("show")&&a&&"hide"!==a?(this._handle||(r=!0,i=this._handle=gc(o.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){Ce(t.event)},onmousedown:j2(this._onHandleDragMove,this,0,0),drift:j2(this._onHandleDragMove,this),ondragend:j2(this._onHandleDragEnd,this)}),n.add(i)),tI(i,e,!1),i.setStyle(o.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"])),V(a=o.get("size"))||(a=[a,a]),i.scaleX=a[0]/2,i.scaleY=a[1]/2,Ty(this,"_doDispatchAxisPointer",o.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,r)):(i&&n.remove(i),this._handle=null))},K2.prototype._moveHandleToValue=function(t,e){$2(this._axisPointerModel,!e&&this._moveAnimation,this._handle,J2(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},K2.prototype._onHandleDragMove=function(t,e){var n=this._handle;n&&(this._dragging=!0,t=this.updateHandleTransform(J2(n),[t,e],this._axisModel,this._axisPointerModel),this._payloadInfo=t,n.stopAnimation(),n.attr(J2(t)),Z2(n).lastProp=null,this._doDispatchAxisPointer())},K2.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}]}))},K2.prototype._onHandleDragEnd=function(){var t;this._dragging=!1,this._handle&&(t=this._axisPointerModel.get("value"),this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"}))},K2.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),Dy(this,"_doDispatchAxisPointer")},K2.prototype.doClear=function(){},K2.prototype.buildLabel=function(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}};u(aI,oI=K2),aI.prototype.makeElOption=function(t,e,n,i,o){var r,a,s=n.axis,l=s.grid,u=i.get("type"),h=sI(l,s).getOtherAxis(s).getGlobalExtent(),c=s.toGlobalCoord(s.dataToCoord(e,!0)),p=(u&&"none"!==u&&(r=(a=i).get("type"),a=a.getModel(r+"Style"),"line"===r?(p=a.getLineStyle()).fill=null:"shadow"===r&&((p=a.getAreaStyle()).stroke=null),r=p,(a=lI[u](s,c,h)).style=r,t.graphicKey=a.type,t.pointer=a),mS(l.model,n));u=e,s=t,c=p,h=n,r=i,a=o,l=TS.innerTextLayout(c.rotation,0,c.labelDirection),c.labelMargin=r.get(["label","margin"]),eI(s,h,r,a,{position:iI(h.axis,u,c),align:l.textAlign,verticalAlign:l.textVerticalAlign})},aI.prototype.getHandleTransform=function(t,e,n){var i=mS(e.axis.grid.model,e,{labelInside:!1}),n=(i.labelMargin=n.get(["handle","margin"]),iI(e.axis,t,i));return{x:n[0],y:n[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},aI.prototype.updateHandleTransform=function(t,e,n,i){var n=n.axis,o=n.grid,r=n.getGlobalExtent(!0),o=sI(o,n).getOtherAxis(n).getGlobalExtent(),n="x"===n.dim?0:1,a=[t.x,t.y],e=(a[n]+=e[n],a[n]=Math.min(r[1],a[n]),a[n]=Math.max(r[0],a[n]),(o[1]+o[0])/2),r=[e,e];r[n]=a[n];return{x:a[0],y:a[1],rotation:t.rotation,cursorPoint:r,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][n]}};var oI,rI=aI;function aI(){return null!==oI&&oI.apply(this,arguments)||this}function sI(t,e){var n={};return n[e.dim+"AxisIndex"]=e.index,t.getCartesian(n)}var lI={line:function(t,e,n){var i;return i=[e,n[0]],e=[e,n[1]],n=uI(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()),o=n[1]-n[0];return{type:"Rect",shape:(e=[e-i/2,n[0]],n=[i,o],i=uI(t),{x:e[i=i||0],y:e[1-i],width:n[i],height:n[1-i]})}}};function uI(t){return"x"===t.dim?0:1}u(pI,hI=g),pI.type="axisPointer",pI.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 hI,cI=pI;function pI(){var t=null!==hI&&hI.apply(this,arguments)||this;return t.type=pI.type,t}var dI=i(),fI=W;function gI(t,e,n){var i,c,p;function o(t,h){c.on(t,function(e){n=p;var n,i,o={dispatchAction:r,pendings:i={showTip:[],hideTip:[]}};function r(t){var e=i[t.type];e?e.push(t):(t.dispatchAction=r,n.dispatchAction(t))}fI(dI(c).records,function(t){t&&h(t,e,o.dispatchAction)});var t,a=o.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))})}w.node||(i=e.getZr(),dI(i).records||(dI(i).records={}),p=e,dI(c=i).initialized||(dI(c).initialized=!0,o("click",I(mI,"click")),o("mousemove",I(mI,"mousemove")),o("globalout",yI)),(dI(i).records[t]||(dI(i).records[t]={})).handler=n)}function yI(t,e,n){t.handler("leave",null,n)}function mI(t,e,n,i){e.handler(t,n,i)}function vI(t,e){w.node||(e=e.getZr(),(dI(e).records||{})[t]&&(dI(e).records[t]=null))}u(bI,_I=cy),bI.prototype.render=function(t,e,n){var e=e.getComponent("tooltip"),i=t.get("triggerOn")||e&&e.get("triggerOn")||"mousemove|click";gI("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})})},bI.prototype.remove=function(t,e){vI("axisPointer",e)},bI.prototype.dispose=function(t,e){vI("axisPointer",e)},bI.type="axisPointer";var _I,xI=bI;function bI(){var t=null!==_I&&_I.apply(this,arguments)||this;return t.type=bI.type,t}function wI(t,e){var n,i,o,r,a=[],s=t.seriesIndex;return null==s||!(e=e.getSeriesByIndex(s))||null==(s=Nr(n=e.getData(),t))||s<0||V(s)?{point:[]}:(i=n.getItemGraphicEl(s),o=e.coordinateSystem,e.getTooltipPosition?a=e.getTooltipPosition(s)||[]:o&&o.dataToPoint?a=t.isStacked?(e=o.getBaseAxis(),t=o.getOtherAxis(e).dim,e=e.dim,t="x"===t||"radius"===t?1:0,e=n.mapDimension(e),(r=[])[t]=n.get(e,s),r[1-t]=n.get(n.getCalculationInfo("stackResultDimension"),s),o.dataToPoint(r)||[]):o.dataToPoint(n.getValues(B(o.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 SI=i();function MI(t,e,n){var r,a,i,s,l,o,u,h,c,p,d,f,g,y,m=t.currTrigger,v=[t.x,t.y],_=t,x=t.dispatchAction||M(n.dispatchAction,n),b=e.getComponent("axisPointer").coordSysAxesInfo;if(b)return kI(v)&&(v=wI({seriesIndex:_.seriesIndex,dataIndex:_.dataIndex},e).point),r=kI(v),a=_.axesInfo,i=b.axesInfo,s="leave"===m||kI(v),l={},e={list:[],map:{}},u={showPointer:I(CI,o={}),showTooltip:I(TI,e)},W(b.coordSysMap,function(t,e){var o=r||t.containPoint(v);W(b.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||!o||a&&!i||null!=(i=null!=(i=i&&i.value)||r?i:n.pointToData(v))&&II(t,i,u,!1,l)})}),h={},W(i,function(n,t){var i=n.linkGroup;i&&!o[t]&&W(i.axesInfo,function(t,e){var e=o[e];t!==n&&e&&(e=e.value,i.mapper&&(e=n.axis.scale.parse(i.mapper(e,DI(t),DI(n)))),h[n.key]=e)})}),W(h,function(t,e){II(i[e],t,u,!0,l)}),c=o,_=i,p=l.axesInfo=[],W(_,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,kI(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=SI(_)[x]||{},f=SI(_)[x]={},W(e,function(t,e){var n=t.axisPointerModel.option;"show"===n.status&&t.triggerEmphasis&&W(n.seriesDataIndices,function(t){var e=t.seriesIndex+" | "+t.dataIndex;f[e]=t})}),g=[],y=[],W(d,function(t,e){f[e]||y.push(t)}),W(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 II(t,e,n,i,o){var r,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,W(t.seriesModels,function(e,t){var n,i=e.getData().mapDimensionsAll(l);if(e.getAxisTooltipData)var o=e.getAxisTooltipData(i,a,s),r=o.dataIndices,o=o.nestestValue;else{if(!(r=e.getData().indicesOfNearest(i[0],a,"category"===s.type?.5:null)).length)return;o=e.getData().get(i[0],r[0])}null!=o&&isFinite(o)&&(i=a-o,(n=Math.abs(i))<=c)&&((n'):""),U(t))r.innerHTML=t+c;else if(t){r.innerHTML="",V(t)||(t=[t]);for(var p,d=0;d"),r=f.join(e);this._showOrMove(i,function(){this._updateContentNotChangedOnAxis(t,p)?this._updatePosition(i,o,n[0],n[1],this._tooltipContent,p):this._showTooltipContent(i,r,p,Math.random()+"",n[0],n[1],o,null,g)})},tC.prototype._showSeriesItemTooltip=function(t,e,n){var i,o,r,a,s,l=this._ecModel,e=k(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=eC([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),o=new $g,i.marker=o.makeTooltipMarker("item",Wp(i.color),f),g=Xf(c.formatTooltip(p,!1,e)),h=y.get("order"),e=y.get("valueFormatter"),r=g.frag,a=r?Zg(e?F({valueFormatter:e},r):r,o,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,o)}),n({type:"showTip",dataIndexInside:p,dataIndex:d.getRawIndex(p),seriesIndex:u,from:this.uid}))},tC.prototype._showComponentItemTooltip=function(e,n,t){var i="html"===this._renderMode,o=k(n),r=o.tooltipConfig.option||{},a=r.encodeHTMLContent,a=(U(r)&&(r={content:r,formatter:r},a=!0),a&&i&&r.content&&((r=S(r)).content=me(r.content)),[r]),i=this._ecModel.getComponent(o.componentMainType,o.componentIndex),o=(i&&a.push(i),a.push({formatter:r.content}),e.positionDefault),s=eC(a,this._tooltipModel,o?{position:o}:null),l=s.get("content"),u=Math.random()+"",h=new $g;this._showOrMove(s,function(){var t=S(s.get("formatterParams")||{});this._showTooltipContent(s,l,t,u,e.offsetX,e.offsetY,e.position,n,h)}),t({type:"showTip",from:this.uid})},tC.prototype._showTooltipContent=function(n,t,i,e,o,r,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([o,r],i,n.get("trigger"),n.get("borderColor")).color,h&&(t=U(h)?(p=n.ecModel.get("useUTC"),t=h,Fp(t=(d=V(i)?i[0]:i)&&d.axisType&&0<=d.axisType.indexOf("time")?vp(d.axisValue,t,p):t,i,!0)):T(h)?(d=M(function(t,e){t===this._ticket&&(u.setContent(e,l,n,c,a),this._updatePosition(n,a,o,r,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,o,r,u,i,s))},tC.prototype._getNearestPoint=function(t,e,n,i){return"axis"===n||V(e)?{color:i||("html"===this._renderMode?"#fff":"none")}:V(e)?void 0:{color:i||e.color||e.borderColor}},tC.prototype._updatePosition=function(t,e,n,i,o,r,a){var s,l=this._api.getWidth(),u=this._api.getHeight(),h=(e=e||t.get("position"),o.getSize()),c=t.get("align"),p=t.get("verticalAlign"),d=a&&a.getBoundingRect().clone();a&&d.applyTransform(a.transform),V(e=T(e)?e([n,i],r,o.el,d,{viewSize:[l,u],contentSize:h.slice()}):e)?(n=Z(e[0],l),i=Z(e[1],u)):P(e)?((r=e).width=h[0],r.height=h[1],n=(r=jp(r,{width:l,height:u})).x,i=r.y,p=c=null):i=(n=(s=U(e)&&a?function(t,e,n,i){var o=n[0],r=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-o/2,l=e.y+h/2-r/2;break;case"top":s=e.x+u/2-o/2,l=e.y-r-a;break;case"bottom":s=e.x+u/2-o/2,l=e.y+h+a;break;case"left":s=e.x-o-a,l=e.y+h/2-r/2;break;case"right":s=e.x+u+a,l=e.y+h/2-r/2}return[s,l]}(e,d,h,t.get("borderWidth")):function(t,e,n,i,o,r,a){var n=n.getSize(),s=n[0],n=n[1];null!=r&&(ih[0]?s:o)[0]:r[0]=(a[0]>h[0]?o:s)[0],"y0"===n[1]?r[1]=(a[1]>h[1]?s:o)[1]:r[1]=(a[1]>h[1]?o:s)[1],i.getMarkerPosition(r,n,!0)):(a=[l=t.get(n[0],e),u=t.get(n[1],e)],c.clampData&&c.clampData(a,a),c.dataToPoint(a,!0)),tb(c,"cartesian2d")&&(o=c.getAxis("x"),s=c.getAxis("y"),l=t.get(n[0],e),u=t.get(n[1],e),dT(l)?h[0]=o.toGlobalCoord(o.getExtent()["x0"===n[0]?0:1]):dT(u)&&(h[1]=s.toGlobalCoord(s.getExtent()["y0"===n[1]?0:1]))),isNaN(d)||(h[0]=d),isNaN(p)||(h[1]=p)):h=[d,p],h}var mT,vT=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],_T=(u(xT,mT=zh),xT.prototype.updateTransform=function(t,e,o){e.eachSeries(function(n){var i,t=lC.getMarkerModelFromSeries(n,"markArea");t&&(i=t.getData()).each(function(e){var t=B(vT,function(t){return yT(i,e,t,n,o)});i.setItemLayout(e,t),i.getItemGraphicEl(e).setShape("points",t)})},this)},xT.prototype.renderSeries=function(a,o,t,s){var l=a.coordinateSystem,e=a.id,u=a.getData(),n=this.markerGroupMap,i=n.get(e)||n.set(e,{group:new D}),h=(this.group.add(i.group),this.markKeep(i),function(t,n,e){var i,o;{var r;i=t?(r=B(t&&t.dimensions,function(t){var e=n.getData();return F(F({},e.getDimensionInfo(e.mapDimension(t))||{}),{name:t,ordinalMeta:null})}),o=B(["x0","y0","x1","y1"],function(t,e){return{name:t,type:r[e%2].type}}),new Wv(o,e)):new Wv(o=[{name:"value",type:"float"}],e)}e=B(e.get("data"),I(cT,n,t,e));t&&(e=ht(e,I(gT,t)));t=t?function(t,e,n,i){return og(t.coord[Math.floor(i/2)][i%2],o[i])}:function(t,e,n,i){return og(t.value,o[i])};return i.initData(e,null,t),i.hasItemOption=!0,i}(l,a,o));o.setData(h),h.each(function(e){var t=B(vT,function(t){return yT(h,e,t,a,s)}),n=l.getAxis("x").scale,i=l.getAxis("y").scale,o=n.getExtent(),r=i.getExtent(),n=[n.parse(h.get("x0",e)),n.parse(h.get("x1",e))],i=[i.parse(h.get("y0",e)),i.parse(h.get("y1",e))],o=(rr(n),rr(i),!(o[0]>n[1]||o[1]i[1]||r[1]=this._data.count()-1},wT.prototype.setPlayState=function(t){this.option.autoPlay=!!t},wT.prototype.getPlayState=function(){return!!this.option.autoPlay},wT.prototype._initData=function(){var o,t=this.option,e=t.data||[],t=t.axisType,r=this._names=[],e=("category"===t?(o=[],W(e,function(t,e){var n,i=Pr(Dr(t),"");P(t)?(n=S(t)).value=e:n=e,o.push(n),r.push(i)})):o=e,{category:"ordinal",time:"time",value:"number"}[t]||"number");(this._data=new Wv([{name:"value",type:e}],this)).initData(o,r)},wT.prototype.getData=function(){return this._data},wT.prototype.getCategories=function(){if("category"===this.get("axisType"))return this._names.slice()},wT.type="timeline",wT.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]};var bT,xh=wT;function wT(){var t=null!==bT&&bT.apply(this,arguments)||this;return t.type=wT.type,t.layoutMode="box",t}u(IT,ST=xh),IT.type="timeline.slider",IT.defaultOption=Jc(xh.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:"#DAE1F5"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#A4B1D7"},itemStyle:{color:"#A4B1D7",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:15,color:"#316bf3",borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0, 0, 0, 0.3)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"M2,18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3,18.08A1.5,1.5,0,0,1,2,18.5Z",prevIcon:"M10,.5A1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1,10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z",prevBtnSize:18,nextBtnSize:18,color:"#A4B1D7",borderColor:"#A4B1D7",borderWidth:1},emphasis:{label:{show:!0,color:"#6f778d"},itemStyle:{color:"#316BF3"},controlStyle:{color:"#316BF3",borderColor:"#316BF3",borderWidth:2}},progress:{lineStyle:{color:"#316BF3"},itemStyle:{color:"#316BF3"},label:{color:"#6f778d"}},data:[]});var ST,MT=IT;function IT(){var t=null!==ST&&ST.apply(this,arguments)||this;return t.type=IT.type,t}st(MT,Gf.prototype);u(TT,CT=cy),TT.type="timeline";var CT,Xu=TT;function TT(){var t=null!==CT&&CT.apply(this,arguments)||this;return t.type=TT.type,t}u(AT,DT=pp),AT.prototype.getLabelModel=function(){return this.model.getModel("label")},AT.prototype.isHorizontal=function(){return"horizontal"===this.model.get("orient")};var DT,kT=AT;function AT(t,e,n,i){t=DT.call(this,t,e,n)||this;return t.type=i||"value",t}var LT,PT=Math.PI,OT=i(),RT=(u(zT,LT=Xu),zT.prototype.init=function(t,e){this.api=e},zT.prototype.render=function(e,t,n){var i,o,r;this.model=e,this.api=n,this.ecModel=t,this.group.removeAll(),e.get("show",!0)&&(i=this._layout(e,n),o=this._createGroup("_mainGroup"),t=this._createGroup("_labelGroup"),r=this._axis=this._createAxis(i,e),e.formatTooltip=function(t){return Wg("nameValue",{noName:!0,value:r.scale.getLabel({value:t})})},W(["AxisLine","AxisTick","Control","CurrentPointer"],function(t){this["_render"+t](i,o,r,e)},this),this._renderAxisLabel(i,t,r,e),this._position(i,e)),this._doPlayStop(),this._updateTicksStatus()},zT.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},zT.prototype.dispose=function(){this._clearTimer()},zT.prototype._layout=function(t,e){var n,i,o,r=t.get(["label","position"]),a=t.get("orient"),s=(s=e,jp((l=t).getBoxLayoutParams(),{width:s.getWidth(),height:s.getHeight()},l.get("padding"))),l=null==r||"auto"===r?"horizontal"===a?s.y+s.height/2n[1]?n[1]:t)r&&(e[1-i]=e[i]+n.sign*r),e}function iD(t,e){t=t[e]-t[1-e];return{span:Math.abs(t),sign:0e[1]&&(e[1]=t[1])})}),[(e=$1((n=e.getAxisModel()).axis.scale,n,o).calculate()).min,e.max]),this._updateMinMaxSpan(),n=this.calculateDataWindow(t.settledOption),this._valueWindow=n.valueWindow,this._percentWindow=n.percentWindow,this._setAxisModel())},DD.prototype.filterData=function(t,e){var o,n,r,c;t===this._dataZoomModel&&(o=this._dimName,n=this.getTargetSeriesModels(),r=t.get("filterMode"),c=this._valueWindow,"none"!==r)&&ID(n,function(n){var l,u,i=n.getData(),h=i.mapDimensionsAll(o);h.length&&("weakFilter"===r?(l=i.getStore(),u=B(h,function(t){return i.getDimensionIndex(t)},i),i.filterSelf(function(t){for(var e,n,i,o=0;oc[1];if(a&&!s&&!r)return!0;a&&(i=!0),s&&(e=!0),r&&(n=!0)}return i&&e&&n})):ID(h,function(t){var e;"empty"===r?n.setData(i=i.map(t,function(t){return(e=t)>=c[0]&&e<=c[1]?t:NaN;var e})):((e={})[t]=c,i.selectRange(e))}),ID(h,function(t){i.setApproximateExtent(c,t)}))})},DD.prototype._updateMinMaxSpan=function(){var i=this._minMaxSpan={},o=this._dataZoomModel,r=this._dataExtent;ID(["min","max"],function(t){var e=o.get(t+"Span"),n=o.get(t+"ValueSpan");null!=(n=null!=n?this.getAxisModel().axis.scale.parse(n):n)?e=ir(r[0]+n,r,[0,100],!0):null!=e&&(n=ir(e,[0,100],r,!0)-r[0]),i[t+"Span"]=e,i[t+"ValueSpan"]=n},this)},DD.prototype._setAxisModel=function(){var t,e=this.getAxisModel(),n=this._percentWindow,i=this._valueWindow;n&&(t=lr(i,[0,500]),t=Math.min(t,20),e=e.axis.scale.rawExtentInfo,0!==n[0]&&e.setDeterminedMinMax("min",+i[0].toFixed(t)),100!==n[1]&&e.setDeterminedMinMax("max",+i[1].toFixed(t)),e.freeze())},DD);function DD(t,e,n,i){this._dimName=t,this._axisIndex=e,this.ecModel=i,this._dataZoomModel=n}var kD={getTargetSeries:function(r){function t(o){r.eachComponent("dataZoom",function(i){i.eachTargetAxis(function(t,e){var n=r.getComponent(GT(t),e);o(t,e,n,i)})})}t(function(t,e,n,i){n.__dzAxisProxy=null});var o=[],e=(t(function(t,e,n,i){n.__dzAxisProxy||(n.__dzAxisProxy=new TD(t,e,i,r),o.push(n.__dzAxisProxy))}),R());return W(o,function(t){W(t.getTargetSeriesModels(),function(t){e.set(t.uid,t)})}),e},overallReset:function(t,i){t.eachComponent("dataZoom",function(n){n.eachTargetAxis(function(t,e){n.getAxisProxy(t,e).reset(n)}),n.eachTargetAxis(function(t,e){n.getAxisProxy(t,e).filterData(n,i)})}),t.eachComponent("dataZoom",function(t){var e,n=t.findRepresentativeAxisProxy();n&&(e=n.getDataPercentWindow(),n=n.getDataValueWindow(),t.setCalculatedRange({start:e[0],end:e[1],startValue:n[0],endValue:n[1]}))})}};var AD=!1;function LD(t){AD||(AD=!0,t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,kD),t.registerAction("dataZoom",function(e,t){W(UT(t,e),function(t){t.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})}),t.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function PD(t){LD(t),t.registerComponentModel(QT),t.registerComponentView(xD),vD(t)}u(zD,OD=sc),zD.type="dataZoom.slider",zD.layoutMode="box",zD.defaultOption=Jc(sc.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:"#fff",borderColor:"#ACB8D1"},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}});var OD,RD=zD;function zD(){var t=null!==OD&&OD.apply(this,arguments)||this;return t.type=zD.type,t}var ND,ED=Fs,BD="horizontal",VD="vertical",FD=["line","bar","candlestick","scatter"],HD={easing:"cubicOut",duration:100,delay:0},WD=(u(GD,ND=$r),GD.prototype.init=function(t,e){this.api=e,this._onBrush=M(this._onBrush,this),this._onBrushEnd=M(this._onBrushEnd,this)},GD.prototype.render=function(t,e,n,i){ND.prototype.render.apply(this,arguments),Ty(this,"_dispatchZoomAction",t.get("throttle"),"fixRate"),this._orient=t.getOrient(),!1===t.get("show")?this.group.removeAll():t.noTarget()?(this._clear(),this.group.removeAll()):(i&&"dataZoom"===i.type&&i.from===this.uid||this._buildView(),this._updateView())},GD.prototype.dispose=function(){this._clear(),ND.prototype.dispose.apply(this,arguments)},GD.prototype._clear=function(){Dy(this,"_dispatchZoomAction");var t=this.api.getZr();t.off("mousemove",this._onBrush),t.off("mouseup",this._onBrushEnd)},GD.prototype._buildView=function(){var t=this.group,e=(t.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval(),this._displayables.sliderGroup=new D);this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(e),this._positionGroup()},GD.prototype._resetLocation=function(){var t=this.dataZoomModel,e=this.api,n=t.get("brushSelect")?7:0,i=this._findCoordRect(),e={width:e.getWidth(),height:e.getHeight()},o=this._orient===BD?{right:e.width-i.x-i.width,top:e.height-30-7-n,width:i.width,height:30}:{right:7,top:i.y,width:30,height:i.height},r=Jp(t.option),n=(W(["right","top","width","height"],function(t){"ph"===r[t]&&(r[t]=o[t])}),jp(r,e));this._location={x:n.x,y:n.y},this._size=[n.width,n.height],this._orient===VD&&this._size.reverse()},GD.prototype._positionGroup=function(){var t=this.group,e=this._location,n=this._orient,i=this.dataZoomModel.getFirstTargetAxisModel(),i=i&&i.get("inverse"),o=this._displayables.sliderGroup,r=(this._dataShadowInfo||{}).otherAxisInverse,n=(o.attr(n!==BD||i?n===BD&&i?{scaleY:r?1:-1,scaleX:-1}:n!==VD||i?{scaleY:r?-1:1,scaleX:-1,rotation:Math.PI/2}:{scaleY:r?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:r?1:-1,scaleX:1}),t.getBoundingRect([o]));t.x=e.x-n.x,t.y=e.y-n.y,t.markRedraw()},GD.prototype._getViewExtent=function(){return[0,this._size[0]]},GD.prototype._renderBackground=function(){var t=this.dataZoomModel,e=this._size,n=this._displayables.sliderGroup,i=t.get("brushSelect"),t=(n.add(new ED({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundColor")},z2:-40})),new ED({shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:"transparent"},z2:0,onclick:M(this._onClickPanel,this)})),e=this.api.getZr();i?(t.on("mousedown",this._onBrushStart,this),t.cursor="crosshair",e.on("mousemove",this._onBrush),e.on("mouseup",this._onBrushEnd)):(e.off("mousemove",this._onBrush),e.off("mouseup",this._onBrushEnd)),n.add(t)},GD.prototype._renderDataShadow=function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],t){var e=this._size,n=this._shadowSize||[],i=t.series,o=i.getRawData(),r=i.getShadowDim&&i.getShadowDim(),r=r&&o.getDimensionInfo(r)?i.getShadowDim():t.otherDim;if(null!=r)for(var a,s,l,u,h,c,p,d,f,g,y=this._shadowPolygonPts,m=this._shadowPolylinePts,v=(o===this._shadowData&&r===this._shadowDim&&e[0]===n[0]&&e[1]===n[1]||(i=.3*((a=o.getDataExtent(r))[1]-a[0]),a=[a[0]-i,a[1]+i],s=[0,e[1]],t=[0,e[0]],l=[[e[0],0],[0,0]],u=[],h=t[1]/(o.count()-1),c=0,p=Math.round(o.count()/e[0]),o.each([r],function(t,e){var n;0e[0]||t[1]<0||t[1]>e[1]||(e=((e=this._handleEnds)[0]+e[1])/2,t=this._updateInterval("all",t[0]-e),this._updateView(),t&&this._dispatchZoomAction(!1))},GD.prototype._onBrushStart=function(t){var e=t.offsetX,t=t.offsetY;this._brushStart=new N(e,t),this._brushing=!0,this._brushStartTime=+new Date},GD.prototype._onBrushEnd=function(t){var e,n,i;this._brushing&&(e=this._displayables.brushRect,this._brushing=!1,e)&&(e.attr("ignore",!0),e=e.shape,+new Date-this._brushStartTime<200&&Math.abs(e.width)<5||(n=this._getViewExtent(),this._range=rr([ir(e.x,n,i=[0,100],!0),ir(e.x+e.width,n,i,!0)]),this._handleEnds=[e.x,e.x+e.width],this._updateView(),this._dispatchZoomAction(!1)))},GD.prototype._onBrush=function(t){this._brushing&&(Ce(t.event),this._updateBrushRect(t.offsetX,t.offsetY))},GD.prototype._updateBrushRect=function(t,e){var n=this._displayables,i=this.dataZoomModel,o=n.brushRect,i=(o||(o=n.brushRect=new ED({silent:!0,style:i.getModel("brushStyle").getItemStyle()}),n.sliderGroup.add(o)),o.attr("ignore",!1),this._brushStart),n=this._displayables.sliderGroup,t=n.transformCoordToLocal(t,e),e=n.transformCoordToLocal(i.x,i.y),n=this._size;t[0]=Math.max(Math.min(n[0],t[0]),0),o.setShape({x:e[0],y:0,width:t[0]-e[0],height:n[1]})},GD.prototype._dispatchZoomAction=function(t){var e=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:t?HD:null,start:e[0],end:e[1]})},GD.prototype._findCoordRect=function(){var t,e,n=XT(this.dataZoomModel).infoList;return t=(t=!t&&n.length?(n=n[0].model.coordinateSystem).getRect&&n.getRect():t)?t:{x:.2*(n=this.api.getWidth()),y:.2*(e=this.api.getHeight()),width:.6*n,height:.6*e}},GD.type="dataZoom.slider",GD);function GD(){var t=null!==ND&&ND.apply(this,arguments)||this;return t.type=GD.type,t._displayables={},t}function UD(t){return"vertical"===t?"ns-resize":"ew-resize"}function XD(t){t.registerComponentModel(RD),t.registerComponentView(WD),LD(t)}p_(function(t){p_(PD),p_(XD)});var YD=["rect","polygon","keep","clear"];function ZD(t,e){var n,i,o,r=Ir(t?t.brush:[]);r.length&&(n=[],W(r,function(t){t=t.hasOwnProperty("toolbox")?t.toolbox:[];t instanceof Array&&(n=n.concat(t))}),(r=V(r=t&&t.toolbox)?r[0]:r)||(t.toolbox=[r={feature:{}}]),r=(t=r.feature||(r.feature={})).brush||(t.brush={}),(t=r.type||(r.type=[])).push.apply(t,n),o={},W(i=t,function(t){o[t]=1}),i.length=0,W(o,function(t,e){i.push(e)}),e)&&!t.length&&t.push.apply(t,YD)}var qD,jD=!0,KD=Math.min,$D=Math.max,QD=Math.pow,JD=1e4,tk=6,ek=6,nk="globalPan",ik={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},ok={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},rk={brushStyle:{lineWidth:2,stroke:"rgba(210,219,238,0.3)",fill:"#D2DBEE"},transformable:!0,brushMode:"single",removeOnClick:!1},ak=0,sk=(u(lk,qD=ae),lk.prototype.enableBrush=function(t){return this._brushType&&this._doDisableBrush(),t.brushType&&this._doEnableBrush(t),this},lk.prototype._doEnableBrush=function(t){var e,n,i=this._zr;this._enableGlobalPan||(e=nk,n=this._uid,sD(i)[e]=n),W(this._handlers,function(t,e){i.on(e,t)}),this._brushType=t.brushType,this._brushOption=d(S(rk),t,!0)},lk.prototype._doDisableBrush=function(){var t,e,n,i=this._zr;t=i,e=nk,n=this._uid,(t=sD(t))[e]===n&&(t[e]=null),W(this._handlers,function(t,e){i.off(e,t)}),this._brushType=this._brushOption=null},lk.prototype.setPanels=function(t){var e;return t&&t.length?(e=this._panels={},W(t,function(t){e[t.panelId]=S(t)})):this._panels=null,this},lk.prototype.mount=function(t){this._enableGlobalPan=(t=t||{}).enableGlobalPan;var e=this.group;return this._zr.add(e),e.attr({x:t.x||0,y:t.y||0,rotation:t.rotation||0,scaleX:t.scaleX||1,scaleY:t.scaleY||1}),this._transform=e.getLocalTransform(),this},lk.prototype.updateCovers=function(i){i=B(i,function(t){return d(S(rk),t,!0)});var n="\0-brush-index-",o=this._covers,r=this._covers=[],a=this,s=this._creatingCover;return new yv(o,i,function(t,e){return l(t.__brushOption,e)},l).add(t).update(t).remove(function(t){o[t]!==s&&a.group.remove(o[t])}).execute(),this;function l(t,e){return(null!=t.id?t.id:n+e)+"-"+t.brushType}function t(t,e){var n=i[t];null!=e&&o[e]===s?r[t]=o[e]:(t=r[t]=null!=e?(o[e].__brushOption=n,o[e]):hk(a,uk(a,n)),dk(a,t))}},lk.prototype.unmount=function(){return this.enableBrush(!1),mk(this),this._zr.remove(this.group),this},lk.prototype.dispose=function(){this.unmount(),this.off()},lk);function lk(t){var e=qD.call(this)||this;return e._track=[],e._covers=[],e._handlers={},e._zr=t,e.group=new D,e._uid="brushController_"+ak++,W(Nk,function(t,e){this._handlers[e]=M(t,this)},e),e}function uk(t,e){var n=Bk[e.brushType].createCover(t,e);return n.__brushOption=e,pk(n,e),t.group.add(n),n}function hk(t,e){var n=fk(e);return n.endCreating&&(n.endCreating(t,e),pk(e,e.__brushOption)),e}function ck(t,e){var n=e.__brushOption;fk(e).updateCoverShape(t,e,n.range,n)}function pk(t,e){var n=e.z;null==n&&(n=JD),t.traverse(function(t){t.z=n,t.z2=n})}function dk(t,e){fk(e).updateCommon(t,e),ck(t,e)}function fk(t){return Bk[t.__brushOption.brushType]}function gk(t,e,n){var i,o,r=t._panels;return r?(o=t._transform,W(r,function(t){t.isTargetByCursor(e,n,o)&&(i=t)}),i):jD}function yk(t,e){t=t._panels;return t&&null!=(e=e.__brushOption.panelId)?t[e]:jD}function mk(e){var t=e._covers,n=t.length;return W(t,function(t){e.group.remove(t)},e),t.length=0,n}function vk(t,e){var n=B(t._covers,function(t){var t=t.__brushOption,e=S(t.range);return{brushType:t.brushType,panelId:t.panelId,range:e}});t.trigger("brush",{areas:n,isEnd:!!e.isEnd,removeOnClick:!!e.removeOnClick})}function _k(t){var e=t.length-1;return[t[0],t[e=e<0?0:e]]}function xk(e,n,t,i){var o=new D;return o.add(new Fs({name:"main",style:Mk(t),silent:!0,draggable:!0,cursor:"move",drift:I(Tk,e,n,o,["n","s","w","e"]),ondragend:I(vk,n,{isEnd:!0})})),W(i,function(t){o.add(new Fs({name:t.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:I(Tk,e,n,o,t),ondragend:I(vk,n,{isEnd:!0})}))}),o}function bk(t,e,n,i){var o=i.brushStyle.lineWidth||0,r=$D(o,ek),a=n[0][0],s=n[1][0],l=a-o/2,u=s-o/2,h=n[0][1],n=n[1][1],c=h-r+o/2,p=n-r+o/2,h=h-a,n=n-s,d=h+o,o=n+o;Sk(t,e,"main",a,s,h,n),i.transformable&&(Sk(t,e,"w",l,u,r,o),Sk(t,e,"e",c,u,r,o),Sk(t,e,"n",l,u,d,r),Sk(t,e,"s",l,p,d,r),Sk(t,e,"nw",l,u,r,r),Sk(t,e,"ne",c,u,r,r),Sk(t,e,"sw",l,p,r,r),Sk(t,e,"se",c,p,r,r))}function wk(n,i){var t=i.__brushOption,o=t.transformable,e=i.childAt(0);e.useStyle(Mk(t)),e.attr({silent:!o,cursor:o?"move":"default"}),W([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(t){var e=i.childOfName(t.join("")),t=1===t.length?Ck(n,t[0]):function(t,e){t=[Ck(t,e[0]),Ck(t,e[1])];return"e"!==t[0]&&"w"!==t[0]||t.reverse(),t.join("")}(n,t);e&&e.attr({silent:!o,invisible:!o,cursor:o?ok[t]+"-resize":null})})}function Sk(t,e,n,i,o,r,a){var n=e.childOfName(n);n&&n.setShape((n=Ak(t,e,[[i,o],[i+r,o+a]]),t=KD(n[0][0],n[1][0]),e=KD(n[0][1],n[1][1]),i=$D(n[0][0],n[1][0]),n=$D(n[0][1],n[1][1]),{x:t,y:e,width:i-t,height:n-e}))}function Mk(t){return E({strokeNoScale:!0},t.brushStyle)}function Ik(t,e,n,i){var o=[KD(t,n),KD(e,i)],t=[$D(t,n),$D(e,i)];return[[o[0],t[0]],[o[1],t[1]]]}function Ck(t,e){return{left:"w",right:"e",top:"n",bottom:"s"}[hc({w:"left",e:"right",n:"top",s:"bottom"}[e],lc(t.group))]}function Tk(t,e,n,i,o,r){var a=n.__brushOption,s=t.toRectRange(a.range),l=kk(e,o,r);W(i,function(t){t=ik[t];s[t[0]][t[1]]+=l[t[0]]}),a.range=t.fromRectRange(Ik(s[0][0],s[1][0],s[0][1],s[1][1])),dk(e,n),vk(e,{isEnd:!1})}function Dk(t,e,n,i){var o=e.__brushOption.range,r=kk(t,n,i);W(o,function(t){t[0]+=r[0],t[1]+=r[1]}),dk(t,e),vk(t,{isEnd:!1})}function kk(t,e,n){t=t.group,e=t.transformCoordToLocal(e,n),n=t.transformCoordToLocal(0,0);return[e[0]-n[0],e[1]-n[1]]}function Ak(t,e,n){e=yk(t,e);return e&&e!==jD?e.clipPath(n,t._transform):S(n)}function Lk(t,e,n){if(t._brushType&&!function(t,e,n){t=t._zr;return e<0||e>t.getWidth()||n<0||n>t.getHeight()}(t,e.offsetX,e.offsetY)){var i=t._zr,o=t._covers,r=gk(t,e,n);if(!t._dragging)for(var a=0;at[1]&&t.reverse(),t}function yA(t,e){return Br(t,e,{includeMainTypes:pA})}var mA={grid:function(t,i){var o=t.xAxisModels,r=t.yAxisModels,t=t.gridModels,e=R(),a={},s={};(o||r||t)&&(W(o,function(t){t=t.axis.grid.model;e.set(t.id,t),a[t.id]=!0}),W(r,function(t){t=t.axis.grid.model;e.set(t.id,t),s[t.id]=!0}),W(t,function(t){e.set(t.id,t),a[t.id]=!0,s[t.id]=!0}),e.each(function(t){var e=t.coordinateSystem,n=[];W(e.getCartesians(),function(t,e){(0<=H(o,t.getAxis("x").model)||0<=H(r,t.getAxis("y").model))&&n.push(t)}),i.push({panelId:"grid--"+t.id,gridModel:t,coordSysModel:t,coordSys:n[0],coordSyses:n,getPanelRect:_A.grid,xAxisDeclared:a[t.id],yAxisDeclared:s[t.id]})}))},geo:function(t,n){W(t.geoModels,function(t){var e=t.coordinateSystem;n.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:e,coordSyses:[e],getPanelRect:_A.geo})})}},vA=[function(t,e){var n=t.xAxisModel,i=t.yAxisModel,t=t.gridModel;return(t=!(t=!t&&n?n.axis.grid.model:t)&&i?i.axis.grid.model:t)&&t===e.gridModel},function(t,e){t=t.geoModel;return t&&t===e.geoModel}],_A={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(lc(t)),e}},xA={lineX:I(bA,0),lineY:I(bA,1),rect:function(t,e,n,i){var o=t?e.pointToData([n[0][0],n[1][0]],i):e.dataToPoint([n[0][0],n[1][0]],i),t=t?e.pointToData([n[0][1],n[1][1]],i):e.dataToPoint([n[0][1],n[1][1]],i),e=[gA([o[0],t[0]]),gA([o[1],t[1]])];return{values:e,xyMinMax:e}},polygon:function(e,n,t,i){var o=[[1/0,-1/0],[1/0,-1/0]];return{values:B(t,function(t){t=e?n.pointToData(t,i):n.dataToPoint(t,i);return o[0][0]=Math.min(o[0][0],t[0]),o[1][0]=Math.min(o[1][0],t[1]),o[0][1]=Math.max(o[0][1],t[0]),o[1][1]=Math.max(o[1][1],t[1]),t}),xyMinMax:o}}};function bA(t,e,n,i){var o=n.getAxis(["x","y"][t]),n=gA(B([0,1],function(t){return e?o.coordToData(o.toLocalCoord(i[t]),!0):o.toGlobalCoord(o.dataToCoord(i[t]))})),r=[];return r[t]=n,r[1-t]=[NaN,NaN],{values:n,xyMinMax:r}}var wA={lineX:I(SA,0),lineY:I(SA,1),rect:function(t,e,n){return[[t[0][0]-n[0]*e[0][0],t[0][1]-n[0]*e[0][1]],[t[1][0]-n[1]*e[1][0],t[1][1]-n[1]*e[1][1]]]},polygon:function(t,n,i){return B(t,function(t,e){return[t[0]-i[0]*n[e][0],t[1]-i[1]*n[e][1]]})}};function SA(t,e,n,i){return[e[0]-i[t]*n[0],e[1]-i[t]*n[1]]}function MA(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}var IA=["inBrush","outOfBrush"],CA="__ecBrushSelect",TA="__ecInBrushSelectEvent";function DA(e){e.eachComponent({mainType:"brush"},function(t){(t.brushTargetManager=new dA(t.option,e)).setInputRanges(t.areas,e)})}function kA(c,t,e){var o,r,n,i,a,s,l=[];c.eachComponent({mainType:"brush"},function(t){e&&"takeGlobalCursor"===e.type&&t.setBrushOption("brush"===e.key?e.brushOption:{brushType:!1})}),DA(c),c.eachComponent({mainType:"brush"},function(u,t){var y={brushId:u.id,brushIndex:t,brushName:u.name,areas:S(u.areas),selected:[]},e=(l.push(y),u.option),n=e.brushLink,i=[],m=[],v=[],_=!1,h=(t||(o=e.throttleType,r=e.throttleDelay),B(u.areas,function(t){var e,n,i,o=PA[t.brushType],o=E({boundingRect:o?o(t):void 0},t);return o.selectors=(n=(e=o).brushType,i={point:function(t){return aA[n].point(t,i,e)},rect:function(t){return aA[n].rect(t,i,e)}}),o})),x=oA(u.option,IA,function(t){t.mappingMethod="fixed"});function b(t){return"all"===n||i[t]}function w(t){return!!t.length}V(n)&&W(n,function(t){i[t]=1}),c.eachSeries(function(t,e){var n,i,o,r,a,s,l=v[e]=[];"parallel"===t.subType?(a=e,s=(r=t).coordinateSystem,_=_||s.hasAxisBrushed(),b(a)&&s.eachActiveState(r.getData(),function(t,e){"active"===t&&(m[e]=1)})):(a=e,i=l,(n=t).brushSelector&&!function(t,e){t=t.option.seriesIndex;return null!=t&&"all"!==t&&(V(t)?H(t,e)<0:e!==t)}(u,a)&&(W(h,function(t){u.brushTargetManager.controlSeries(t,n,c)&&i.push(t),_=_||w(i)}),b(a))&&w(i)&&(o=n.getData()).each(function(t){LA(n,i,o,t)&&(m[t]=1)}))}),c.eachSeries(function(e,t){var s,l,u,h,c,p,d,n={seriesId:e.id,seriesIndex:t,seriesName:e.name,dataIndex:[]},i=(y.selected.push(n),v[t]),o=e.getData(),r=b(t)?function(t){return m[t]?(n.dataIndex.push(o.getRawIndex(t)),"inBrush"):"outOfBrush"}:function(t){return LA(e,i,o,t)?(n.dataIndex.push(o.getRawIndex(t)),"inBrush"):"outOfBrush"};function f(t){return im(l,p,t)}function g(t,e){rm(l,p,t,e)}function a(t,e){p=null==c?t:e;e=l.getRawDataItem(p);if(!e||!1!==e.visualMap)for(var e=u.call(h,t),n=s[e],i=d[e],o=0,r=i.length;oo[0][1]&&(o[0][1]=r[0]),r[1]o[1][1]&&(o[1][1]=r[1])}return o&&OA(o)}};function OA(t){return new Y(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}u(NA,RA=cy),NA.prototype.init=function(t,e){this.ecModel=t,this.api=e,this.model,(this._brushController=new sk(e.getZr())).on("brush",M(this._onBrush,this)).mount()},NA.prototype.render=function(t,e,n,i){this.model=t,this._updateController(t,e,n,i)},NA.prototype.updateTransform=function(t,e,n,i){DA(e),this._updateController(t,e,n,i)},NA.prototype.updateVisual=function(t,e,n,i){this.updateTransform(t,e,n,i)},NA.prototype.updateView=function(t,e,n,i){this._updateController(t,e,n,i)},NA.prototype._updateController=function(t,e,n,i){i&&i.$from===t.id||this._brushController.setPanels(t.brushTargetManager.makePanelOpts(n)).enableBrush(t.brushOption).updateCovers(t.areas.slice())},NA.prototype.dispose=function(){this._brushController.dispose()},NA.prototype._onBrush=function(t){var e=this.model.id,n=this.model.brushTargetManager.setOutputRanges(t.areas,this.ecModel);t.isEnd&&!t.removeOnClick||this.api.dispatchAction({type:"brush",brushId:e,areas:S(n),$from:e}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:e,areas:S(n),$from:e})},NA.type="brush";var RA,zA=NA;function NA(){var t=null!==RA&&RA.apply(this,arguments)||this;return t.type=NA.type,t}u(VA,EA=g),VA.prototype.optionUpdated=function(t,e){var n=this.option,e=(e||rA(n,t,["inBrush","outOfBrush"]),n.inBrush=n.inBrush||{});n.outOfBrush=n.outOfBrush||{color:"#ddd"},e.hasOwnProperty("liftZ")||(e.liftZ=5)},VA.prototype.setAreas=function(t){t&&(this.areas=B(t,function(t){return FA(this.option,t)},this))},VA.prototype.setBrushOption=function(t){this.brushOption=FA(this.option,t),this.brushType=this.brushOption.brushType},VA.type="brush",VA.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],VA.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(210,219,238,0.3)",borderColor:"#D2DBEE"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4};var EA,BA=VA;function VA(){var t=null!==EA&&EA.apply(this,arguments)||this;return t.type=VA.type,t.areas=[],t.brushOption={},t}function FA(t,e){return d({brushType:t.brushType,brushMode:t.brushMode,transformable:t.transformable,brushStyle:new jc(t.brushStyle).getItemStyle(),removeOnClick:t.removeOnClick,z:t.z},e,!0)}function HA(){}var WA={};function GA(t,e){WA[t]=e}function UA(t){return WA[t]}var XA,YA=["rect","polygon","lineX","lineY","keep","clear"],ZA=(u(qA,XA=HA),qA.prototype.render=function(e,t,n){var i,o,r;t.eachComponent({mainType:"brush"},function(t){i=t.brushType,o=t.brushOption.brushMode||"single",r=r||!!t.areas.length}),this._brushType=i,this._brushMode=o,W(e.get("type",!0),function(t){e.setIconStatus(t,("keep"===t?"multiple"===o:"clear"===t?r:t===i)?"emphasis":"normal")})},qA.prototype.updateView=function(t,e,n){this.render(t,e,n)},qA.prototype.getIcons=function(){var t=this.model,e=t.get("icon",!0),n={};return W(t.get("type",!0),function(t){e[t]&&(n[t]=e[t])}),n},qA.prototype.onclick=function(t,e,n){var i=this._brushType,o=this._brushMode;"clear"===n?(e.dispatchAction({type:"axisAreaSelect",intervals:[]}),e.dispatchAction({type:"brush",command:"clear",areas:[]})):e.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===n?i:i!==n&&n,brushMode:"keep"===n?"multiple"===o?"single":"multiple":o}})},qA.getDefaultOption=function(t){return{show:!0,type:YA.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:t.getLocaleModel().get(["toolbox","brush","title"])}},qA);function qA(){return null!==XA&&XA.apply(this,arguments)||this}p_(function(t){t.registerComponentView(zA),t.registerComponentModel(BA),t.registerPreprocessor(ZD),t.registerVisual(t.PRIORITY.VISUAL.BRUSH,kA),t.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(e,t){t.eachComponent({mainType:"brush",query:e},function(t){t.setAreas(e.areas)})}),t.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},Et),t.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},Et),GA("brush",ZA)});var jA,KA=function(t,e,n){t=S(($A[t]||{})[e]);return n&&V(t)?t[t.length-1]:t},$A={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},QA=Gk.mapVisual,JA=Gk.eachVisual,tL=V,eL=W,nL=rr,iL=ir,cm=(u(oL,jA=g),oL.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n)},oL.prototype.optionUpdated=function(t,e){var n=this.option;e||rA(n,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},oL.prototype.resetVisual=function(t){var e=this.stateList;t=M(t,this),this.controllerVisuals=oA(this.option.controller,e,t),this.targetVisuals=oA(this.option.target,e,t)},oL.prototype.getItemSymbol=function(){return null},oL.prototype.getTargetSeriesIndices=function(){var t=this.option.seriesIndex,n=[];return null==t||"all"===t?this.ecModel.eachSeries(function(t,e){n.push(e)}):n=Ir(t),n},oL.prototype.eachTargetSeries=function(e,n){W(this.getTargetSeriesIndices(),function(t){t=this.ecModel.getSeriesByIndex(t);t&&e.call(n,t)},this)},oL.prototype.isTargetSeries=function(e){var n=!1;return this.eachTargetSeries(function(t){t===e&&(n=!0)}),n},oL.prototype.formatValueText=function(t,e,n){var i,o=this.option,r=o.precision,a=this.dataBound,o=o.formatter,e=(n=n||["<",">"],V(t)&&(t=t.slice(),i=!0),e?t:i?[s(t[0]),s(t[1])]:s(t));return U(o)?o.replace("{value}",i?e[0]:e).replace("{value2}",i?e[1]:e):T(o)?i?o(t[0],t[1]):o(t):i?t[0]===a[0]?n[0]+" "+e[1]:t[1]===a[1]?n[1]+" "+e[0]:e[0]+" - "+e[1]:e;function s(t){return t===a[0]?"min":t===a[1]?"max":(+t).toFixed(Math.min(r,20))}},oL.prototype.resetExtent=function(){var t=this.option,t=nL([t.min,t.max]);this._dataExtent=t},oL.prototype.getDataDimensionIndex=function(t){var e=this.option.dimension;if(null!=e)return t.getDimensionIndex(e);for(var n=t.dimensions,i=n.length-1;0<=i;i--){var o=n[i],o=t.getDimensionInfo(o);if(!o.isCalculationCoord)return o.storeDimIndex}},oL.prototype.getExtent=function(){return this._dataExtent.slice()},oL.prototype.completeVisualOption=function(){var e=this.ecModel,n=this.option,t={inRange:n.inRange,outOfRange:n.outOfRange},i=n.target||(n.target={}),o=n.controller||(n.controller={}),u=(d(i,t),d(o,t),this.isCategory());function r(t){tL(n.color)&&!t.inRange&&(t.inRange={color:n.color.slice().reverse()}),t.inRange=t.inRange||{color:e.get("gradientColor")}}r.call(this,i),r.call(this,o),function(t,e,n){var e=t[e],i=t[n];e&&!i&&(i=t[n]={},eL(e,function(t,e){var n;Gk.isValidType(e)&&null!=(n=KA(e,"inactive",u))&&(i[e]=n,"color"!==e||i.hasOwnProperty("opacity")||i.hasOwnProperty("colorAlpha")||(i.opacity=[0,0]))}))}.call(this,i,"inRange","outOfRange"),function(o){var r=(o.inRange||{}).symbol||(o.outOfRange||{}).symbol,a=(o.inRange||{}).symbolSize||(o.outOfRange||{}).symbolSize,s=this.get("inactiveColor"),l=this.getItemSymbol()||"roundRect";eL(this.stateList,function(t){var e,n=this.itemSize,i=o[t],t=(null==(i=i||(o[t]={color:u?s:[s]})).symbol&&(i.symbol=r&&S(r)||(u?l:[l])),null==i.symbolSize&&(i.symbolSize=a&&S(a)||(u?n[0]:[n[0],n[0]])),i.symbol=QA(i.symbol,function(t){return"none"===t?l:t}),i.symbolSize);null!=t&&(e=-1/0,JA(t,function(t){ee[1]&&e.reverse(),e[0]=Math.max(e[0],t[0]),e[1]=Math.min(e[1],t[1]))},lL.prototype.completeVisualOption=function(){rL.prototype.completeVisualOption.apply(this,arguments),W(this.stateList,function(t){t=this.option.controller[t].symbolSize;t&&t[0]!==t[1]&&(t[0]=t[1]/3)},this)},lL.prototype.setSelected=function(t){this.option.range=t.slice(),this._resetRange()},lL.prototype.getSelected=function(){var t=this.getExtent(),e=rr((this.get("range")||[]).slice());return e[0]>t[1]&&(e[0]=t[1]),e[1]>t[1]&&(e[1]=t[1]),e[0]=n[1]||t<=e[1])?"inRange":"outOfRange"},lL.prototype.findTargetDataIndices=function(i){var o=[];return this.eachTargetSeries(function(t){var n=[],e=t.getData();e.each(this.getDataDimensionIndex(e),function(t,e){i[0]<=t&&t<=i[1]&&n.push(e)},this),o.push({seriesId:t.id,dataIndex:n})},this),o},lL.prototype.getVisualMeta=function(n){var t=uL(0,0,this.getExtent()),e=uL(0,0,this.option.range.slice()),i=[];function o(t,e){i.push({value:t,color:n(t,e)})}for(var r=0,a=0,s=e.length,l=t.length;at[1])break;n.push({color:this.getControllerVisual(r,"color",e),offset:o/100})}return n.push({color:this.getControllerVisual(t[1],"color",e),offset:1}),n},bL.prototype._createBarPoints=function(t,e){var n=this.visualMapModel.itemSize;return[[n[0]-e[0],t[0]],[n[0],t[0]],[n[0],t[1]],[n[0]-e[1],t[1]]]},bL.prototype._createBarGroup=function(t){var e=this._orient,n=this.visualMapModel.get("inverse");return new D("horizontal"!==e||n?"horizontal"===e&&n?{scaleX:"bottom"===t?-1:1,rotation:-Math.PI/2}:"vertical"!==e||n?{scaleX:"left"===t?1:-1}:{scaleX:"left"===t?1:-1,scaleY:-1}:{scaleX:"bottom"===t?1:-1,rotation:Math.PI/2})},bL.prototype._updateHandle=function(i,o){var r,a,s,l,u,h;this._useHandle&&(r=this._shapes,a=this.visualMapModel,s=r.handleThumbs,l=r.handleLabels,u=a.itemSize,h=a.getExtent(),mL([0,1],function(t){var e=s[t],n=(e.setStyle("fill",o.handlesColor[t]),e.y=i[t],yL(i[t],[0,u[1]],h,!0)),n=this.getControllerVisual(n,"symbolSize"),n=(e.scaleX=e.scaleY=n/u[0],e.x=u[0]-n/2,uc(r.handleLabelPoints[t],lc(e,this.group)));l[t].setStyle({x:n[0],y:n[1],text:a.formatValueText(this._dataInterval[t]),verticalAlign:"middle",align:"vertical"===this._orient?this._applyTransform("left",r.mainGroup):"center"})},this))},bL.prototype._showIndicator=function(t,e,n,i){var o=this.visualMapModel,r=o.getExtent(),a=o.itemSize,s=[0,a[1]],l=this._shapes,u=l.indicator;if(u){u.attr("invisible",!1);var h=this.getControllerVisual(t,"color",{convertOpacityToAlpha:!0}),c=this.getControllerVisual(t,"symbolSize"),t=yL(t,r,s,!0),r=a[0]-c/2,s={x:u.x,y:u.y},a=(u.y=t,u.x=r,uc(l.indicatorLabelPoint,lc(u,this.group))),c=l.indicatorLabel,l=(c.attr("invisible",!1),this._applyTransform("left",l.mainGroup)),p="horizontal"===this._orient,n=(c.setStyle({text:(n||"")+o.formatValueText(e),verticalAlign:p?l:"middle",align:p?"center":l}),{x:r,y:t,style:{fill:h}}),e={style:{x:a[0],y:a[1]}},d=(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator?(p={duration:100,easing:"cubicInOut",additive:!0},u.x=s.x,u.y=s.y,u.animateTo(n,p),c.animateTo(e,p)):(u.attr(n),c.attr(e)),this._firstShowIndicator=!1,this._shapes.handleLabels);if(d)for(var f=0;f ",o):this._showIndicator(t,t,"≈ ",o)),a=this._hoverLinkDataIndices,n=[],(e||SL(r))&&(n=this._hoverLinkDataIndices=r.findTargetDataIndices(i)),t=n,o={},s(a||[],e={}),s(t||[],o,e),i=[l(e),l(o)],this._dispatchHighDown("downplay",fL(i[0],r)),this._dispatchHighDown("highlight",fL(i[1],r)))},bL.prototype._hoverLinkFromSeriesMouseOver=function(t){var e,n;lm(t.target,function(t){t=k(t);return null!=t.dataIndex&&(e=t,1)},!0),e&&(t=this.ecModel.getSeriesByIndex(e.seriesIndex),(n=this.visualMapModel).isTargetSeries(t))&&(n=(t=t.getData(e.dataType)).getStore().get(n.getDataDimensionIndex(t),e.dataIndex),isNaN(n)||this._showIndicator(n,n))},bL.prototype._hideIndicator=function(){var t=this._shapes,e=(t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0),this._shapes.handleLabels);if(e)for(var n=0;nn&&s([n,t[0]],"outOfRange"),s(t.slice()),n=t[1])},this),{stops:o,outerColors:r};function s(t,e){var n=a.getRepresentValue({interval:t}),n=(e=e||a.getValueState(n),i(n,e));t[0]===-1/0?r[0]=n:t[1]===1/0?r[1]=n:o.push({value:t[0],color:n},{value:t[1],color:n})}},EL.type="visualMap.piecewise",EL.defaultOption=Jc(cm.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0});var zL,NL=EL;function EL(){var t=null!==zL&&zL.apply(this,arguments)||this;return t.type=EL.type,t._pieceList=[],t}var BL={splitNumber:function(t){var e=this.option,n=Math.min(e.precision,20),i=this.getExtent(),o=e.splitNumber,o=Math.max(parseInt(o,10),1);e.splitNumber=o;for(var r=(i[1]-i[0])/o;+r.toFixed(n)!==r&&n<5;)n++;e.precision=n,r=+r.toFixed(n),e.minOpen&&t.push({interval:[-1/0,i[0]],close:[0,0]});for(var a=0,s=i[0];a","≥"][e[0]]];t.text=t.text||this.formatValueText(null!=t.value?t.value:t.interval,!1,e)},this)}};function VL(t,e){var n=t.inverse;("vertical"===t.orient?!n:n)&&e.reverse()}u(WL,FL=ym),WL.prototype.doRender=function(){var i=this.group,o=(i.removeAll(),this.visualMapModel),r=o.get("textGap"),t=o.textStyleModel,a=t.getFont(),s=t.getTextColor(),l=this._getItemAlign(),u=o.itemSize,t=this._getViewData(),e=t.endsText,h=xt(o.get("showLabel",!0),!e);e&&this._renderEndsText(i,e[0],u,h,l),W(t.viewPieceList,function(t){var e=t.piece,n=new D,t=(n.onclick=M(this._onItemClick,this,e),this._enableHoverLink(n,t.indexInModelPieceList),o.getRepresentValue(e));this._createItemSymbol(n,t,[0,0,u[0],u[1]]),h&&(t=this.visualMapModel.getValueState(t),n.add(new Xs({style:{x:"right"===l?-r:u[0]+r,y:u[1]/2,text:e.text,verticalAlign:"middle",align:l,font:a,fill:s,opacity:"outOfRange"===t?.5:1}}))),i.add(n)},this),e&&this._renderEndsText(i,e[1],u,h,l),qp(o.get("orient"),i,o.get("itemGap")),this.renderBackground(i),this.positionGroup(i)},WL.prototype._enableHoverLink=function(t,n){var i=this,e=(t.on("mouseover",function(){return e("highlight")}).on("mouseout",function(){return e("downplay")}),function(t){var e=i.visualMapModel;e.option.hoverLink&&i.api.dispatchAction({type:t,batch:fL(e.findTargetDataIndices(n),e)})})},WL.prototype._getItemAlign=function(){var t=this.visualMapModel,e=t.option;return"vertical"===e.orient?dL(t,this.api,t.itemSize):(t=e.align)&&"auto"!==t?t:"left"},WL.prototype._renderEndsText=function(t,e,n,i,o){var r,a;e&&(r=new D,a=this.visualMapModel.textStyleModel,r.add(new Xs({style:Tc(a,{x:i?"right"===o?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:"middle",align:i?o:"center",text:e})})),t.add(r))},WL.prototype._getViewData=function(){var t=this.visualMapModel,e=B(t.getPieceList(),function(t,e){return{piece:t,indexInModelPieceList:e}}),n=t.get("text"),i=t.get("orient"),t=t.get("inverse");return("horizontal"===i?t:!t)?e.reverse():n=n&&n.slice().reverse(),{viewPieceList:e,endsText:n}},WL.prototype._createItemSymbol=function(t,e,n){t.add(bm(this.getControllerVisual(e,"symbol"),n[0],n[1],n[2],n[3],this.getControllerVisual(e,"color")))},WL.prototype._onItemClick=function(t){var n,i,e=this.visualMapModel,o=e.option,r=o.selectedMode;r&&(n=S(o.selected),i=e.getSelectedMapKey(t),"single"===r||!0===r?(n[i]=!0,W(n,function(t,e){n[e]=e===i})):n[i]=!n[i],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:n}))},WL.type="visualMap.piecewise";var FL,HL=WL;function WL(){var t=null!==FL&&FL.apply(this,arguments)||this;return t.type=WL.type,t}function GL(t){t.registerComponentModel(NL),t.registerComponentView(HL),OL(t)}p_(function(t){p_(RL),p_(GL)});u(YL,UL=sc),YL.type="dataZoom.select";var UL,XL=YL;function YL(){var t=null!==UL&&UL.apply(this,arguments)||this;return t.type=YL.type,t}u(jL,ZL=$r),jL.type="dataZoom.select";var ZL,qL=jL;function jL(){var t=null!==ZL&&ZL.apply(this,arguments)||this;return t.type=jL.type,t}function KL(t){t.registerComponentModel(XL),t.registerComponentView(qL),LD(t)}u(JL,$L=g),JL.prototype.optionUpdated=function(){$L.prototype.optionUpdated.apply(this,arguments);var n=this.ecModel;W(this.option.feature,function(t,e){e=UA(e);e&&(e.getDefaultOption&&(e.defaultOption=e.getDefaultOption(n)),d(t,e.defaultOption))})},JL.type="toolbox",JL.layoutMode={type:"box",ignoreSize:!0},JL.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1,position:"bottom"}};var $L,QL=JL;function JL(){var t=null!==$L&&$L.apply(this,arguments)||this;return t.type=JL.type,t}u(nP,tP=cy),nP.prototype.render=function(p,d,f,g){var y,m,v,_,x,t,e,n,i,o,r,b=this.group;function a(t,e){var n,t=x[t],e=x[e],i=v[t],o=new jc(i,p,p.ecModel);if(g&&null!=g.newTitle&&g.featureName===t&&(i.title=g.newTitle),t&&!e){if(0===t.indexOf("my"))n={onclick:o.option.onclick,featureName:t};else{i=UA(t);if(!i)return;n=new i}_[t]=n}else if(!(n=_[e]))return;n.uid=Qc("toolbox-feature"),n.model=o,n.ecModel=d,n.api=f;var r,a,s,l,u,h,c,i=n instanceof HA;!t&&e?i&&n.dispose&&n.dispose(d,f):!o.get("show")||i&&n.unusable?i&&n.remove&&n.remove(d,f):(a=n,e=t,u=(r=o).getModel("iconStyle"),h=r.getModel(["emphasis","iconStyle"]),i=a instanceof HA&&a.getIcons?a.getIcons():r.get("icon"),t=r.get("title")||{},U(i)?(s={})[e]=i:s=i,U(t)?(l={})[e]=t:l=t,c=r.iconPaths={},W(s,function(t,e){var n=gc(t,{},{x:-y/2,y:-y/2,width:y,height:y});n.setStyle(u.getItemStyle());n.ensureState("emphasis").style=h.getItemStyle();var i=new Xs({style:{text:l[e],align:h.get("textAlign"),borderRadius:h.get("textBorderRadius"),padding:h.get("textPadding"),fill:null,font:Oc({fontStyle:h.get("textFontStyle"),fontFamily:h.get("textFontFamily"),fontSize:h.get("textFontSize"),fontWeight:h.get("textFontWeight")},d)},ignore:!0});n.setTextContent(i),vc({el:n,componentModel:p,itemName:e,formatterParamsExtra:{title:l[e]}}),n.__title=l[e],n.on("mouseover",function(){var t=h.getItemStyle(),e=m?null==p.get("right")&&"right"!==p.get("left")?"right":"left":null==p.get("bottom")&&"bottom"!==p.get("top")?"bottom":"top";i.setStyle({fill:h.get("textFill")||t.fill||t.stroke||"#000",backgroundColor:h.get("textBackgroundColor")}),n.setTextConfig({position:h.get("textPosition")||e}),i.ignore=!p.get("showTitle"),f.enterEmphasis(this)}).on("mouseout",function(){"emphasis"!==r.get(["iconStatus",e])&&f.leaveEmphasis(this),i.hide()}),("emphasis"===r.get(["iconStatus",e])?Ol:Rl)(n),b.add(n),n.on("click",M(a.onclick,a,d,f,e)),c[e]=n}),o.setIconStatus=function(t,e){var n=this.option,i=this.iconPaths;n.iconStatus=n.iconStatus||{},n.iconStatus[t]=e,i[t]&&("emphasis"===e?Ol:Rl)(i[t])},n instanceof HA&&n.render&&n.render(o,d,f,g))}b.removeAll(),p.get("show")&&(y=+p.get("itemSize"),m="vertical"===p.get("orient"),v=p.get("feature")||{},_=this._features||(this._features={}),x=[],W(v,function(t,e){x.push(e)}),new yv(this._featureNames||[],x).add(a).update(a).remove(I(a,null)).execute(),this._featureNames=x,t=b,n=f,i=(e=p).getBoxLayoutParams(),o=e.get("padding"),n={width:n.getWidth(),height:n.getHeight()},r=jp(i,n,o),qp(e.get("orient"),t,e.get("itemGap"),r.width,r.height),Kp(t,i,n,o),b.add(S2(b.getBoundingRect(),p)),m||b.eachChild(function(t){var e,n,i=t.__title,o=t.ensureState("emphasis"),o=o.textConfig||(o.textConfig={}),r=t.getTextContent(),r=r&&r.ensureState("emphasis");r&&!T(r)&&i&&(r=r.style||(r.style={}),i=Do(i,Xs.makeFont(r)),e=t.x+b.x,n=!1,t.y+b.y+y+i.height>f.getHeight()&&(o.position="top",n=!0),t=n?-5-i.height:y+10,e+i.width/2>f.getWidth()?(o.position=["100%",t],r.align="right"):e-i.width/2<0&&(o.position=[0,t],r.align="left"))}))},nP.prototype.updateView=function(t,e,n,i){W(this._features,function(t){t instanceof HA&&t.updateView&&t.updateView(t.model,e,n,i)})},nP.prototype.remove=function(e,n){W(this._features,function(t){t instanceof HA&&t.remove&&t.remove(e,n)}),this.group.removeAll()},nP.prototype.dispose=function(e,n){W(this._features,function(t){t instanceof HA&&t.dispose&&t.dispose(e,n)})},nP.type="toolbox";var tP,eP=nP;function nP(){return null!==tP&&tP.apply(this,arguments)||this}u(rP,iP=HA),rP.prototype.onclick=function(t,e){var n=this.model,i=n.get("name")||t.get("title.0.text")||"echarts",o="svg"===e.getZr().painter.getType(),r=o?"svg":n.get("type",!0)||"png",e=e.getConnectedDataURL({type:r,backgroundColor:n.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:n.get("connectedBackgroundColor"),excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")}),t=w.browser;if("function"!=typeof MouseEvent||!t.newEdge&&(t.ie||t.edge))if(window.navigator.msSaveOrOpenBlob||o){var t=e.split(","),a=-1',o=window.open();o.document.write(h),o.document.title=i}else{a=document.createElement("a"),n=(a.download=i+"."+r,a.target="_blank",a.href=e,new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1}));a.dispatchEvent(n)}},rP.getDefaultOption=function(t){return{show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:t.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],lang:t.getLocaleModel().get(["toolbox","saveAsImage","lang"])}};var iP,oP=rP;function rP(){return null!==iP&&iP.apply(this,arguments)||this}var aP,sP="__ec_magicType_stack__",lP=[["line","bar"],["stack"]],uP=(u(hP,aP=HA),hP.prototype.getIcons=function(){var t=this.model,e=t.get("icon"),n={};return W(t.get("type"),function(t){e[t]&&(n[t]=e[t])}),n},hP.getDefaultOption=function(t){return{show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:t.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}}},hP.prototype.onclick=function(t,e,a){var s,n,l=this.model,i=l.get(["seriesIndex",a]);cP[a]&&(s={series:[]},W(lP,function(t){0<=H(t,a)&&W(t,function(t){l.setIconStatus(t,"normal")})}),l.setIconStatus(a,"emphasis"),t.eachComponent({mainType:"series",query:null==i?null:{seriesIndex:i}},function(t){var e=t.subType,n=t.id,e=cP[a](e,n,t,l),n=(e&&(E(e,t.option),s.series.push(e)),t.coordinateSystem);if(n&&"cartesian2d"===n.type&&("line"===a||"bar"===a)){e=n.getAxesByScale("ordinal")[0];if(e){var i=e.dim+"Axis",o=t.getReferringComponents(i,Fr).models[0].componentIndex;s[i]=s[i]||[];for(var r=0;r<=o;r++)s[i][o]=s[i][o]||{};s[i][o].boundaryGap="bar"===a}}}),"stack"===(t=a)&&(n=d({stack:l.option.title.tiled,tiled:l.option.title.stack},l.option.title),"emphasis"!==l.get(["iconStatus",a]))&&(t="tiled"),e.dispatchAction({type:"changeMagicType",currentType:t,newOption:s,newTitle:n,featureName:"magicType"}))},hP);function hP(){return null!==aP&&aP.apply(this,arguments)||this}var cP={line:function(t,e,n,i){if("bar"===t)return d({id:e,type:"line",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},i.get(["option","line"])||{},!0)},bar:function(t,e,n,i){if("line"===t)return d({id:e,type:"bar",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},i.get(["option","bar"])||{},!0)},stack:function(t,e,n,i){n=n.get("stack")===sP;if("line"===t||"bar"===t)return i.setIconStatus("stack",n?"normal":"emphasis"),d({id:e,stack:n?"":sP},i.get(["option","stack"])||{},!0)}},pP=(rv({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(t,e){e.mergeOption(t.newOption)}),new Array(60).join("-")),dP="\t";function fP(t){o={},r=[],a=[],t.eachRawSeries(function(t){var e,n,i=t.coordinateSystem;(i&&("cartesian2d"===i.type||"polar"===i.type)&&"category"===(e=i.getBaseAxis()).type?(n=e.dim+"_"+e.index,o[n]||(o[n]={categoryAxis:e,valueAxis:i.getOtherAxis(e),series:[]},a.push({axisDim:e.dim,axisIndex:e.index})),o[n].series):r).push(t)});var o,r,a,h,t={seriesGroupByCategoryAxis:o,other:r,meta:a};return{value:ht([(h=[],W(t.seriesGroupByCategoryAxis,function(t,e){for(var n=t.categoryAxis,i=t.valueAxis.dim,o=[" "].concat(B(t.series,function(t){return t.name})),r=[n.model.getCategories()],a=(W(t.series,function(t){var e=t.getRawData();r.push(t.getRawData().mapArray(e.mapDimension(i),function(t){return t}))}),[o.join(dP)]),s=0;s":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},KP=($P.prototype.evaluate=function(t){var e=typeof t;return U(e)?this._condVal.test(t):!!pt(e)&&this._condVal.test(t+"")},$P);function $P(t){null==(this._condVal=U(t)?new RegExp(t):vt(t)?t:null)&&f("")}JP.prototype.evaluate=function(){return this.value};var QP=JP;function JP(){}eO.prototype.evaluate=function(){for(var t=this.children,e=0;e