var _u=function(n,t){return _u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,i){e.__proto__=i}||function(e,i){for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(e[r]=i[r])},_u(n,t)};function F(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function e(){this.constructor=n}_u(n,t),n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}var gw=function(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1},fe=new function(){this.browser=new gw,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=typeof window<"u"};typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(fe.wxa=!0,fe.touchEventsSupported=!0):typeof document>"u"&&typeof self<"u"?fe.worker=!0:typeof navigator>"u"||navigator.userAgent.indexOf("Node.js")===0?(fe.node=!0,fe.svgSupported=!0):function(n,t){var e=t.browser,i=n.match(/Firefox\/([\d.]+)/),r=n.match(/MSIE\s([\d.]+)/)||n.match(/Trident\/.+?rv:(([\d.]+))/),o=n.match(/Edge?\/([\d.]+)/),a=/micromessenger/i.test(n);i&&(e.firefox=!0,e.version=i[1]),r&&(e.ie=!0,e.version=r[1]),o&&(e.edge=!0,e.version=o[1],e.newEdge=+o[1].split(".")[0]>18),a&&(e.weChat=!0),t.svgSupported=typeof SVGRect<"u",t.touchEventsSupported="ontouchstart"in window&&!e.ie&&!e.edge,t.pointerEventsSupported="onpointerdown"in window&&(e.edge||e.ie&&+e.version>=11),t.domSupported=typeof document<"u";var s=document.documentElement.style;t.transform3dSupported=(e.ie&&"transition"in s||e.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),t.transformSupported=t.transform3dSupported||e.ie&&+e.version>=9}(navigator.userAgent,fe);var co,af,bi="12px sans-serif",yw=function(n){var t={};if(typeof JSON>"u")return t;for(var e=0;e<95;e++){var i=String.fromCharCode(e+32),r=(n.charCodeAt(e)-20)/100;t[i]=r}return t}("007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N"),Bn={createCanvas:function(){return typeof document<"u"&&document.createElement("canvas")},measureText:function(n,t){if(!co){var e=Bn.createCanvas();co=e&&e.getContext("2d")}if(co)return af!==t&&(af=co.font=t||bi),co.measureText(n);n=n||"";var i=/((?:\d+)?\.?\d*)px/.exec(t=t||bi),r=i&&+i[1]||12,o=0;if(t.indexOf("mono")>=0)o=r*n.length;else for(var a=0;a>1)%2;f.style.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",h[g]+":0",p[y]+":0",h[1-g]+":auto",p[1-y]+":auto",""].join("!important;"),l.appendChild(f),c.push(f)}return c}(t,o),s=function(l,u,c){for(var h=c?"invTrans":"trans",p=u[h],d=u.srcCoords,f=[],g=[],y=!0,v=0;v<4;v++){var m=l[v].getBoundingClientRect(),_=2*v,x=m.left,b=m.top;f.push(x,b),y=y&&d&&x===d[_]&&b===d[_+1],g.push(l[v].offsetLeft,l[v].offsetTop)}return y&&p?p:(u.srcCoords=f,u[h]=c?Mf(g,f):Mf(f,g))}(a,o,r);if(s)return s(n,e,i),!0}return!1}function Cf(n){return n.nodeName.toUpperCase()==="CANVAS"}var Dw=/([&<>"'])/g,kw={"&":"&","<":"<",">":">",'"':""","'":"'"};function wt(n){return n==null?"":(n+"").replace(Dw,function(t,e){return kw[e]})}var Lw=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ou=[],Pw=fe.browser.firefox&&+fe.browser.version.split(".")[0]<39;function Ru(n,t,e,i){return e=e||{},i?If(n,t,e):Pw&&t.layerX!=null&&t.layerX!==t.offsetX?(e.zrX=t.layerX,e.zrY=t.layerY):t.offsetX!=null?(e.zrX=t.offsetX,e.zrY=t.offsetY):If(n,t,e),e}function If(n,t,e){if(fe.domSupported&&n.getBoundingClientRect){var i=t.clientX,r=t.clientY;if(Cf(n)){var o=n.getBoundingClientRect();return e.zrX=i-o.left,void(e.zrY=r-o.top)}if(Pu(Ou,n,i,r))return e.zrX=Ou[0],void(e.zrY=Ou[1])}e.zrX=e.zrY=0}function Nu(n){return n||window.event}function Ft(n,t,e){if((t=Nu(t)).zrX!=null)return t;var i=t.type;if(i&&i.indexOf("touch")>=0){var r=i!=="touchend"?t.targetTouches[0]:t.changedTouches[0];r&&Ru(n,r,t,e)}else{Ru(n,t,t,e);var o=function(s){var l=s.wheelDelta;if(l)return l;var u=s.deltaX,c=s.deltaY;return u==null||c==null?l:3*Math.abs(c!==0?c:u)*(c>0?-1:c<0?1:u>0?-1:1)}(t);t.zrDelta=o?o/120:-(t.detail||0)/3}var a=t.button;return t.which==null&&a!==void 0&&Lw.test(t.type)&&(t.which=1&a?1:2&a?3:4&a?2:0),t}function Eu(n,t,e,i){n.addEventListener(t,e,i)}var Ti=function(n){n.preventDefault(),n.stopPropagation(),n.cancelBubble=!0};function Af(n){return n.which===2||n.which===3}var Ow=function(){function n(){this._track=[]}return n.prototype.recognize=function(t,e,i){return this._doTrack(t,e,i),this._recognize(t)},n.prototype.clear=function(){return this._track.length=0,this},n.prototype._doTrack=function(t,e,i){var r=t.touches;if(r){for(var o={points:[],touches:[],target:e,event:t},a=0,s=r.length;a1&&r&&r.length>1){var a=Df(r)/Df(o);!isFinite(a)&&(a=1),t.pinchScale=a;var s=[((i=r)[0][0]+i[1][0])/2,(i[0][1]+i[1][1])/2];return t.pinchX=s[0],t.pinchY=s[1],{type:"pinch",target:n[0].target,event:t}}}}};function yo(n){return n[0]=1,n[1]=0,n[2]=0,n[3]=1,n[4]=0,n[5]=0,n}function ts(n,t){return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4],n[5]=t[5],n}function _n(n,t,e){var i=t[0]*e[0]+t[2]*e[1],r=t[1]*e[0]+t[3]*e[1],o=t[0]*e[2]+t[2]*e[3],a=t[1]*e[2]+t[3]*e[3],s=t[0]*e[4]+t[2]*e[5]+t[4],l=t[1]*e[4]+t[3]*e[5]+t[5];return n[0]=i,n[1]=r,n[2]=o,n[3]=a,n[4]=s,n[5]=l,n}function Ci(n,t,e){return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4]+e[0],n[5]=t[5]+e[1],n}function Ii(n,t,e,i){i===void 0&&(i=[0,0]);var r=t[0],o=t[2],a=t[4],s=t[1],l=t[3],u=t[5],c=Math.sin(e),h=Math.cos(e);return n[0]=r*h+s*c,n[1]=-r*c+s*h,n[2]=o*h+l*c,n[3]=-o*c+h*l,n[4]=h*(a-i[0])+c*(u-i[1])+i[0],n[5]=h*(u-i[1])-c*(a-i[0])+i[1],n}function Bu(n,t,e){var i=e[0],r=e[1];return n[0]=t[0]*i,n[1]=t[1]*r,n[2]=t[2]*i,n[3]=t[3]*r,n[4]=t[4]*i,n[5]=t[5]*r,n}function Ai(n,t){var e=t[0],i=t[2],r=t[4],o=t[1],a=t[3],s=t[5],l=e*a-o*i;return l?(l=1/l,n[0]=a*l,n[1]=-o*l,n[2]=-i*l,n[3]=e*l,n[4]=(i*s-a*r)*l,n[5]=(o*r-e*s)*l,n):null}const Rw=Object.freeze(Object.defineProperty({__proto__:null,clone:function(n){var t=[1,0,0,1,0,0];return ts(t,n),t},copy:ts,create:function(){return[1,0,0,1,0,0]},identity:yo,invert:Ai,mul:_n,rotate:Ii,scale:Bu,translate:Ci},Symbol.toStringTag,{value:"Module"}));var ge=function(){function n(t,e){this.x=t||0,this.y=e||0}return n.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},n.prototype.clone=function(){return new n(this.x,this.y)},n.prototype.set=function(t,e){return this.x=t,this.y=e,this},n.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},n.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},n.prototype.scale=function(t){this.x*=t,this.y*=t},n.prototype.scaleAndAdd=function(t,e){this.x+=t.x*e,this.y+=t.y*e},n.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},n.prototype.dot=function(t){return this.x*t.x+this.y*t.y},n.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},n.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},n.prototype.normalize=function(){var t=this.len();return this.x/=t,this.y/=t,this},n.prototype.distance=function(t){var e=this.x-t.x,i=this.y-t.y;return Math.sqrt(e*e+i*i)},n.prototype.distanceSquare=function(t){var e=this.x-t.x,i=this.y-t.y;return e*e+i*i},n.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},n.prototype.transform=function(t){if(t){var e=this.x,i=this.y;return this.x=t[0]*e+t[2]*i+t[4],this.y=t[1]*e+t[3]*i+t[5],this}},n.prototype.toArray=function(t){return t[0]=this.x,t[1]=this.y,t},n.prototype.fromArray=function(t){this.x=t[0],this.y=t[1]},n.set=function(t,e,i){t.x=e,t.y=i},n.copy=function(t,e){t.x=e.x,t.y=e.y},n.len=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},n.lenSquare=function(t){return t.x*t.x+t.y*t.y},n.dot=function(t,e){return t.x*e.x+t.y*e.y},n.add=function(t,e,i){t.x=e.x+i.x,t.y=e.y+i.y},n.sub=function(t,e,i){t.x=e.x-i.x,t.y=e.y-i.y},n.scale=function(t,e,i){t.x=e.x*i,t.y=e.y*i},n.scaleAndAdd=function(t,e,i,r){t.x=e.x+i.x*r,t.y=e.y+i.y*r},n.lerp=function(t,e,i,r){var o=1-r;t.x=o*e.x+r*i.x,t.y=o*e.y+r*i.y},n}(),ns=Math.min,is=Math.max,Di=new ge,ki=new ge,Li=new ge,Pi=new ge,vo=new ge,mo=new ge,me=function(){function n(t,e,i,r){i<0&&(t+=i,i=-i),r<0&&(e+=r,r=-r),this.x=t,this.y=e,this.width=i,this.height=r}return n.prototype.union=function(t){var e=ns(t.x,this.x),i=ns(t.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=is(t.x+t.width,this.x+this.width)-e:this.width=t.width,isFinite(this.y)&&isFinite(this.height)?this.height=is(t.y+t.height,this.y+this.height)-i:this.height=t.height,this.x=e,this.y=i},n.prototype.applyTransform=function(t){n.applyTransform(this,this,t)},n.prototype.calculateTransform=function(t){var e=this,i=t.width/e.width,r=t.height/e.height,o=[1,0,0,1,0,0];return Ci(o,o,[-e.x,-e.y]),Bu(o,o,[i,r]),Ci(o,o,[t.x,t.y]),o},n.prototype.intersect=function(t,e){if(!t)return!1;t instanceof n||(t=n.create(t));var i=this,r=i.x,o=i.x+i.width,a=i.y,s=i.y+i.height,l=t.x,u=t.x+t.width,c=t.y,h=t.y+t.height,p=!(of&&(f=_,gf&&(f=x,v=i.x&&t<=i.x+i.width&&e>=i.y&&e<=i.y+i.height},n.prototype.clone=function(){return new n(this.x,this.y,this.width,this.height)},n.prototype.copy=function(t){n.copy(this,t)},n.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},n.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},n.prototype.isZero=function(){return this.width===0||this.height===0},n.create=function(t){return new n(t.x,t.y,t.width,t.height)},n.copy=function(t,e){t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height},n.applyTransform=function(t,e,i){if(i){if(i[1]<1e-5&&i[1]>-1e-5&&i[2]<1e-5&&i[2]>-1e-5){var r=i[0],o=i[3],a=i[4],s=i[5];return t.x=e.x*r+a,t.y=e.y*o+s,t.width=e.width*r,t.height=e.height*o,t.width<0&&(t.x+=t.width,t.width=-t.width),void(t.height<0&&(t.y+=t.height,t.height=-t.height))}Di.x=Li.x=e.x,Di.y=Pi.y=e.y,ki.x=Pi.x=e.x+e.width,ki.y=Li.y=e.y+e.height,Di.transform(i),Pi.transform(i),ki.transform(i),Li.transform(i),t.x=ns(Di.x,ki.x,Li.x,Pi.x),t.y=ns(Di.y,ki.y,Li.y,Pi.y);var l=is(Di.x,ki.x,Li.x,Pi.x),u=is(Di.y,ki.y,Li.y,Pi.y);t.width=l-t.x,t.height=u-t.y}else t!==e&&n.copy(t,e)},n}(),kf="silent";function Nw(){Ti(this.event)}var Ew=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.handler=null,e}return F(t,n),t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t}(Vt),_o=function(n,t){this.x=n,this.y=t},zw=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Vu=new me(0,0,0,0),Lf=function(n){function t(e,i,r,o,a){var s=n.call(this)||this;return s._hovered=new _o(0,0),s.storage=e,s.painter=i,s.painterRoot=o,s._pointerSize=a,r=r||new Ew,s.proxy=null,s.setHandlerProxy(r),s._draggingMgr=new Iw(s),s}return F(t,n),t.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(D(zw,function(i){e.on&&e.on(i,this[i],this)},this),e.handler=this),this.proxy=e},t.prototype.mousemove=function(e){var i=e.zrX,r=e.zrY,o=Of(this,i,r),a=this._hovered,s=a.target;s&&!s.__zr&&(s=(a=this.findHover(a.x,a.y)).target);var l=this._hovered=o?new _o(i,r):this.findHover(i,r),u=l.target,c=this.proxy;c.setCursor&&c.setCursor(u?u.cursor:"default"),s&&u!==s&&this.dispatchToElement(a,"mouseout",e),this.dispatchToElement(l,"mousemove",e),u&&u!==s&&this.dispatchToElement(l,"mouseover",e)},t.prototype.mouseout=function(e){var i=e.zrEventControl;i!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",e),i!=="no_globalout"&&this.trigger("globalout",{type:"globalout",event:e})},t.prototype.resize=function(){this._hovered=new _o(0,0)},t.prototype.dispatch=function(e,i){var r=this[e];r&&r.call(this,i)},t.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},t.prototype.setCursorStyle=function(e){var i=this.proxy;i.setCursor&&i.setCursor(e)},t.prototype.dispatchToElement=function(e,i,r){var o=(e=e||{}).target;if(!o||!o.silent){for(var a="on"+i,s=function(l,u,c){return{type:l,event:c,target:u.target,topTarget:u.topTarget,cancelBubble:!1,offsetX:c.zrX,offsetY:c.zrY,gestureEvent:c.gestureEvent,pinchX:c.pinchX,pinchY:c.pinchY,pinchScale:c.pinchScale,wheelDelta:c.zrDelta,zrByTouch:c.zrByTouch,which:c.which,stop:Nw}}(i,e,r);o&&(o[a]&&(s.cancelBubble=!!o[a].call(o,s)),o.trigger(i,s),o=o.__hostTarget?o.__hostTarget:o.parent,!s.cancelBubble););s.cancelBubble||(this.trigger(i,s),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(l){typeof l[a]=="function"&&l[a].call(l,s),l.trigger&&l.trigger(i,s)}))}},t.prototype.findHover=function(e,i,r){var o=this.storage.getDisplayList(),a=new _o(e,i);if(Pf(o,a,e,i,r),this._pointerSize&&!a.target){for(var s=[],l=this._pointerSize,u=l/2,c=new me(e-u,i-u,l,l),h=o.length-1;h>=0;h--){var p=o[h];p===r||p.ignore||p.ignoreCoarsePointer||p.parent&&p.parent.ignoreCoarsePointer||(Vu.copy(p.getBoundingRect()),p.transform&&Vu.applyTransform(p.transform),Vu.intersect(c)&&s.push(p))}if(s.length){for(var d=Math.PI/12,f=2*Math.PI,g=0;g=0;o--){var a=n[o],s=void 0;if(a!==r&&!a.ignore&&(s=Bw(a,e,i))&&(!t.topTarget&&(t.topTarget=a),s!==kf)){t.target=a;break}}}function Of(n,t,e){var i=n.painter;return t<0||t>i.getWidth()||e<0||e>i.getHeight()}function Rf(n,t,e,i){var r=t+1;if(r===e)return 1;if(i(n[r++],n[t])<0){for(;r=0;)r++;return r-t}function Nf(n,t,e,i,r){for(i===t&&i++;i>>1])<0?l=o:s=o+1;var u=i-s;switch(u){case 3:n[s+3]=n[s+2];case 2:n[s+2]=n[s+1];case 1:n[s+1]=n[s];break;default:for(;u>0;)n[s+u]=n[s+u-1],u--}n[s]=a}}function Fu(n,t,e,i,r,o){var a=0,s=0,l=1;if(o(n,t[e+r])>0){for(s=i-r;l0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=r,l+=r}else{for(s=r+1;ls&&(l=s);var u=a;a=r-l,l=r-u}for(a++;a>>1);o(n,t[e+c])>0?a=c+1:l=c}return l}function Gu(n,t,e,i,r,o){var a=0,s=0,l=1;if(o(n,t[e+r])<0){for(s=r+1;ls&&(l=s);var u=a;a=r-l,l=r-u}else{for(s=i-r;l=0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=r,l+=r}for(a++;a>>1);o(n,t[e+c])<0?l=c:a=c+1}return l}function rs(n,t,e,i){e||(e=0),i||(i=n.length);var r=i-e;if(!(r<2)){var o=0;if(r<32)Nf(n,e,i,e+(o=Rf(n,e,i,t)),t);else{var a=function(u,c){var h,p,d=7,f=0,g=[];function y(v){var m=h[v],_=p[v],x=h[v+1],b=p[v+1];p[v]=_+b,v===f-3&&(h[v+1]=h[v+2],p[v+1]=p[v+2]),f--;var w=Gu(u[x],u,m,_,0,c);m+=w,(_-=w)!=0&&(b=Fu(u[m+_-1],u,x,b,b-1,c))!==0&&(_<=b?function(M,S,C,I){var T=0;for(T=0;T=7||P>=7);if(R)break;N<0&&(N=0),N+=2}if((d=N)<1&&(d=1),S===1){for(T=0;T=0;T--)u[P+T]=u[O+T];if(S===0){z=!0;break}}if(u[L--]=g[k--],--I==1){z=!0;break}if((E=I-Fu(u[A],g,0,I,I-1,c))!=0){for(I-=E,P=1+(L-=E),O=1+(k-=E),T=0;T=7||E>=7);if(z)break;R<0&&(R=0),R+=2}if((d=R)<1&&(d=1),I===1){for(P=1+(L-=S),O=1+(A-=S),T=S-1;T>=0;T--)u[P+T]=u[O+T];u[L]=g[k]}else{if(I===0)throw new Error;for(O=L-(I-1),T=0;T=0;T--)u[P+T]=u[O+T];u[L]=g[k]}else for(O=L-(I-1),T=0;T1;){var v=f-2;if(v>=1&&p[v-1]<=p[v]+p[v+1]||v>=2&&p[v-2]<=p[v]+p[v-1])p[v-1]p[v+1])break;y(v)}},forceMergeRuns:function(){for(;f>1;){var v=f-2;v>0&&p[v-1]=32;)c|=1&u,u>>=1;return u+c}(r);do{if((o=Rf(n,e,i,t))s&&(l=s),Nf(n,e,e+l,e+o,t),o=l}a.pushRun(e,o),a.mergeRuns(),r-=o,e+=o}while(r!==0);a.forceMergeRuns()}}}D(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(n){Lf.prototype[n]=function(t){var e,i,r=t.zrX,o=t.zrY,a=Of(this,r,o);if(n==="mouseup"&&a||(i=(e=this.findHover(r,o)).target),n==="mousedown")this._downEl=i,this._downPoint=[t.zrX,t.zrY],this._upEl=i;else if(n==="mouseup")this._upEl=i;else if(n==="click"){if(this._downEl!==this._upEl||!this._downPoint||Qa(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(e,n,t)}});var Ef=!1;function Hu(){Ef||(Ef=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function zf(n,t){return n.zlevel===t.zlevel?n.z===t.z?n.z2-t.z2:n.z-t.z:n.zlevel-t.zlevel}var os,Vw=function(){function n(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=zf}return n.prototype.traverse=function(t,e){for(var i=0;i0&&(c.__clipPaths=[]),isNaN(c.z)&&(Hu(),c.z=0),isNaN(c.z2)&&(Hu(),c.z2=0),isNaN(c.zlevel)&&(Hu(),c.zlevel=0),this._displayList[this._displayListLen++]=c}var h=t.getDecalElement&&t.getDecalElement();h&&this._updateAndAddDisplayable(h,e,i);var p=t.getTextGuideLine();p&&this._updateAndAddDisplayable(p,e,i);var d=t.getTextContent();d&&this._updateAndAddDisplayable(d,e,i)}},n.prototype.addRoot=function(t){t.__zr&&t.__zr.storage===this||this._roots.push(t)},n.prototype.delRoot=function(t){if(t instanceof Array)for(var e=0,i=t.length;e=0&&this._roots.splice(r,1)}},n.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},n.prototype.getRoots=function(){return this._roots},n.prototype.dispose=function(){this._displayList=null,this._roots=null},n}();os=fe.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(n){return setTimeout(n,16)};var xo={linear:function(n){return n},quadraticIn:function(n){return n*n},quadraticOut:function(n){return n*(2-n)},quadraticInOut:function(n){return(n*=2)<1?.5*n*n:-.5*(--n*(n-2)-1)},cubicIn:function(n){return n*n*n},cubicOut:function(n){return--n*n*n+1},cubicInOut:function(n){return(n*=2)<1?.5*n*n*n:.5*((n-=2)*n*n+2)},quarticIn:function(n){return n*n*n*n},quarticOut:function(n){return 1- --n*n*n*n},quarticInOut:function(n){return(n*=2)<1?.5*n*n*n*n:-.5*((n-=2)*n*n*n-2)},quinticIn:function(n){return n*n*n*n*n},quinticOut:function(n){return--n*n*n*n*n+1},quinticInOut:function(n){return(n*=2)<1?.5*n*n*n*n*n:.5*((n-=2)*n*n*n*n+2)},sinusoidalIn:function(n){return 1-Math.cos(n*Math.PI/2)},sinusoidalOut:function(n){return Math.sin(n*Math.PI/2)},sinusoidalInOut:function(n){return .5*(1-Math.cos(Math.PI*n))},exponentialIn:function(n){return n===0?0:Math.pow(1024,n-1)},exponentialOut:function(n){return n===1?1:1-Math.pow(2,-10*n)},exponentialInOut:function(n){return n===0?0:n===1?1:(n*=2)<1?.5*Math.pow(1024,n-1):.5*(2-Math.pow(2,-10*(n-1)))},circularIn:function(n){return 1-Math.sqrt(1-n*n)},circularOut:function(n){return Math.sqrt(1- --n*n)},circularInOut:function(n){return(n*=2)<1?-.5*(Math.sqrt(1-n*n)-1):.5*(Math.sqrt(1-(n-=2)*n)+1)},elasticIn:function(n){var t,e=.1;return n===0?0:n===1?1:(!e||e<1?(e=1,t=.1):t=.4*Math.asin(1/e)/(2*Math.PI),-e*Math.pow(2,10*(n-=1))*Math.sin((n-t)*(2*Math.PI)/.4))},elasticOut:function(n){var t,e=.1;return n===0?0:n===1?1:(!e||e<1?(e=1,t=.1):t=.4*Math.asin(1/e)/(2*Math.PI),e*Math.pow(2,-10*n)*Math.sin((n-t)*(2*Math.PI)/.4)+1)},elasticInOut:function(n){var t,e=.1;return n===0?0:n===1?1:(!e||e<1?(e=1,t=.1):t=.4*Math.asin(1/e)/(2*Math.PI),(n*=2)<1?e*Math.pow(2,10*(n-=1))*Math.sin((n-t)*(2*Math.PI)/.4)*-.5:e*Math.pow(2,-10*(n-=1))*Math.sin((n-t)*(2*Math.PI)/.4)*.5+1)},backIn:function(n){var t=1.70158;return n*n*((t+1)*n-t)},backOut:function(n){var t=1.70158;return--n*n*((t+1)*n+t)+1},backInOut:function(n){var t=2.5949095;return(n*=2)<1?n*n*((t+1)*n-t)*.5:.5*((n-=2)*n*((t+1)*n+t)+2)},bounceIn:function(n){return 1-xo.bounceOut(1-n)},bounceOut:function(n){return n<1/2.75?7.5625*n*n:n<2/2.75?7.5625*(n-=1.5/2.75)*n+.75:n<2.5/2.75?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375},bounceInOut:function(n){return n<.5?.5*xo.bounceIn(2*n):.5*xo.bounceOut(2*n-1)+.5}},as=Math.pow,ei=Math.sqrt,Bf=1e-4,Vf=ei(3),ss=1/3,xn=Si(),Gt=Si(),xr=Si();function ti(n){return n>-1e-8&&n<1e-8}function Ff(n){return n>1e-8||n<-1e-8}function $e(n,t,e,i,r){var o=1-r;return o*o*(o*n+3*r*t)+r*r*(r*i+3*o*e)}function Gf(n,t,e,i,r){var o=1-r;return 3*(((t-n)*o+2*(e-t)*r)*o+(i-e)*r*r)}function ls(n,t,e,i,r,o){var a=i+3*(t-e)-n,s=3*(e-2*t+n),l=3*(t-n),u=n-r,c=s*s-3*a*l,h=s*l-9*a*u,p=l*l-3*s*u,d=0;if(ti(c)&&ti(h))ti(s)?o[0]=0:(S=-l/s)>=0&&S<=1&&(o[d++]=S);else{var f=h*h-4*c*p;if(ti(f)){var g=h/c,y=-g/2;(S=-s/a+g)>=0&&S<=1&&(o[d++]=S),y>=0&&y<=1&&(o[d++]=y)}else if(f>0){var v=ei(f),m=c*s+1.5*a*(-h+v),_=c*s+1.5*a*(-h-v);(S=(-s-((m=m<0?-as(-m,ss):as(m,ss))+(_=_<0?-as(-_,ss):as(_,ss))))/(3*a))>=0&&S<=1&&(o[d++]=S)}else{var x=(2*c*s-3*a*h)/(2*ei(c*c*c)),b=Math.acos(x)/3,w=ei(c),M=Math.cos(b),S=(-s-2*w*M)/(3*a),C=(y=(-s+w*(M+Vf*Math.sin(b)))/(3*a),(-s+w*(M-Vf*Math.sin(b)))/(3*a));S>=0&&S<=1&&(o[d++]=S),y>=0&&y<=1&&(o[d++]=y),C>=0&&C<=1&&(o[d++]=C)}}return d}function Hf(n,t,e,i,r){var o=6*e-12*t+6*n,a=9*t+3*i-3*n-9*e,s=3*t-3*n,l=0;if(ti(a))Ff(o)&&(c=-s/o)>=0&&c<=1&&(r[l++]=c);else{var u=o*o-4*a*s;if(ti(u))r[0]=-o/(2*a);else if(u>0){var c,h=ei(u),p=(-o-h)/(2*a);(c=(-o+h)/(2*a))>=0&&c<=1&&(r[l++]=c),p>=0&&p<=1&&(r[l++]=p)}}return l}function us(n,t,e,i,r,o){var a=(t-n)*r+n,s=(e-t)*r+t,l=(i-e)*r+e,u=(s-a)*r+a,c=(l-s)*r+s,h=(c-u)*r+u;o[0]=n,o[1]=a,o[2]=u,o[3]=h,o[4]=h,o[5]=c,o[6]=l,o[7]=i}function Wf(n,t,e,i,r,o,a,s,l,u,c){var h,p,d,f,g,y=.005,v=1/0;xn[0]=l,xn[1]=u;for(var m=0;m<1;m+=.05)Gt[0]=$e(n,e,r,a,m),Gt[1]=$e(t,i,o,s,m),(f=Mi(xn,Gt))=0&&f=0&&y=1?1:ls(0,i,o,1,l,s)&&$e(0,r,a,1,s[0])}}}var Ww=function(){function n(t){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=t.life||1e3,this._delay=t.delay||0,this.loop=t.loop||!1,this.onframe=t.onframe||rt,this.ondestroy=t.ondestroy||rt,this.onrestart=t.onrestart||rt,t.easing&&this.setEasing(t.easing)}return n.prototype.step=function(t,e){if(this._inited||(this._startTime=t+this._delay,this._inited=!0),!this._paused){var i=this._life,r=t-this._startTime-this._pausedTime,o=r/i;o<0&&(o=0),o=Math.min(o,1);var a=this.easingFunc,s=a?a(o):o;if(this.onframe(s),o===1){if(!this.loop)return!0;var l=r%i;this._startTime=t-l,this._pausedTime=0,this.onrestart()}return!1}this._pausedTime+=e},n.prototype.pause=function(){this._paused=!0},n.prototype.resume=function(){this._paused=!1},n.prototype.setEasing=function(t){this.easing=t,this.easingFunc=ue(t)?t:xo[t]||Zf(t)},n}(),qf=function(n){this.value=n},Xw=function(){function n(){this._len=0}return n.prototype.insert=function(t){var e=new qf(t);return this.insertEntry(e),e},n.prototype.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},n.prototype.remove=function(t){var e=t.prev,i=t.next;e?e.next=i:this.head=i,i?i.prev=e:this.tail=e,t.next=t.prev=null,this._len--},n.prototype.len=function(){return this._len},n.prototype.clear=function(){this.head=this.tail=null,this._len=0},n}(),bo=function(){function n(t){this._list=new Xw,this._maxSize=10,this._map={},this._maxSize=t}return n.prototype.put=function(t,e){var i=this._list,r=this._map,o=null;if(r[t]==null){var a=i.len(),s=this._lastRemovedEntry;if(a>=this._maxSize&&a>0){var l=i.head;i.remove(l),delete r[l.key],o=l.value,this._lastRemovedEntry=l}s?s.value=e:s=new qf(e),s.key=t,i.insertEntry(s),r[t]=s}return o},n.prototype.get=function(t){var e=this._map[t],i=this._list;if(e!=null)return e!==i.tail&&(i.remove(e),i.insertEntry(e)),e.value},n.prototype.clear=function(){this._list.clear(),this._map={}},n.prototype.len=function(){return this._list.len()},n}(),jf={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function rn(n){return(n=Math.round(n))<0?0:n>255?255:n}function wo(n){return n<0?0:n>1?1:n}function Wu(n){var t=n;return t.length&&t.charAt(t.length-1)==="%"?rn(parseFloat(t)/100*255):rn(parseInt(t,10))}function Oi(n){var t=n;return t.length&&t.charAt(t.length-1)==="%"?wo(parseFloat(t)/100):wo(parseFloat(t))}function Xu(n,t,e){return e<0?e+=1:e>1&&(e-=1),6*e<1?n+(t-n)*e*6:2*e<1?t:3*e<2?n+(t-n)*(2/3-e)*6:n}function ni(n,t,e){return n+(t-n)*e}function Ht(n,t,e,i,r){return n[0]=t,n[1]=e,n[2]=i,n[3]=r,n}function Uu(n,t){return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n}var Kf=new bo(20),hs=null;function br(n,t){hs&&Uu(hs,t),hs=Kf.put(n,hs||t.slice())}function St(n,t){if(n){t=t||[];var e=Kf.get(n);if(e)return Uu(t,e);var i=(n+="").replace(/ /g,"").toLowerCase();if(i in jf)return Uu(t,jf[i]),br(n,t),t;var r,o=i.length;if(i.charAt(0)==="#")return o===4||o===5?(r=parseInt(i.slice(1,4),16))>=0&&r<=4095?(Ht(t,(3840&r)>>4|(3840&r)>>8,240&r|(240&r)>>4,15&r|(15&r)<<4,o===5?parseInt(i.slice(4),16)/15:1),br(n,t),t):void Ht(t,0,0,0,1):o===7||o===9?(r=parseInt(i.slice(1,7),16))>=0&&r<=16777215?(Ht(t,(16711680&r)>>16,(65280&r)>>8,255&r,o===9?parseInt(i.slice(7),16)/255:1),br(n,t),t):void Ht(t,0,0,0,1):void 0;var a=i.indexOf("("),s=i.indexOf(")");if(a!==-1&&s+1===o){var l=i.substr(0,a),u=i.substr(a+1,s-(a+1)).split(","),c=1;switch(l){case"rgba":if(u.length!==4)return u.length===3?Ht(t,+u[0],+u[1],+u[2],1):Ht(t,0,0,0,1);c=Oi(u.pop());case"rgb":return u.length>=3?(Ht(t,Wu(u[0]),Wu(u[1]),Wu(u[2]),u.length===3?c:Oi(u[3])),br(n,t),t):void Ht(t,0,0,0,1);case"hsla":return u.length!==4?void Ht(t,0,0,0,1):(u[3]=Oi(u[3]),Yu(u,t),br(n,t),t);case"hsl":return u.length!==3?void Ht(t,0,0,0,1):(Yu(u,t),br(n,t),t);default:return}}Ht(t,0,0,0,1)}}function Yu(n,t){var e=(parseFloat(n[0])%360+360)%360/360,i=Oi(n[1]),r=Oi(n[2]),o=r<=.5?r*(i+1):r+i-r*i,a=2*r-o;return Ht(t=t||[],rn(255*Xu(a,o,e+1/3)),rn(255*Xu(a,o,e)),rn(255*Xu(a,o,e-1/3)),1),n.length===4&&(t[3]=n[3]),t}function Zu(n,t){var e=St(n);if(e){for(var i=0;i<3;i++)e[i]=t<0?e[i]*(1-t)|0:(255-e[i])*t+e[i]|0,e[i]>255?e[i]=255:e[i]<0&&(e[i]=0);return on(e,e.length===4?"rgba":"rgb")}}function So(n,t,e){if(t&&t.length&&n>=0&&n<=1){e=e||[];var i=n*(t.length-1),r=Math.floor(i),o=Math.ceil(i),a=t[r],s=t[o],l=i-r;return e[0]=rn(ni(a[0],s[0],l)),e[1]=rn(ni(a[1],s[1],l)),e[2]=rn(ni(a[2],s[2],l)),e[3]=wo(ni(a[3],s[3],l)),e}}var Uw=So;function qu(n,t,e){if(t&&t.length&&n>=0&&n<=1){var i=n*(t.length-1),r=Math.floor(i),o=Math.ceil(i),a=St(t[r]),s=St(t[o]),l=i-r,u=on([rn(ni(a[0],s[0],l)),rn(ni(a[1],s[1],l)),rn(ni(a[2],s[2],l)),wo(ni(a[3],s[3],l))],"rgba");return e?{color:u,leftIndex:r,rightIndex:o,value:i}:u}}var Yw=qu;function ps(n,t,e,i){var r=St(n);if(n)return r=function(o){if(o){var a,s,l=o[0]/255,u=o[1]/255,c=o[2]/255,h=Math.min(l,u,c),p=Math.max(l,u,c),d=p-h,f=(p+h)/2;if(d===0)a=0,s=0;else{s=f<.5?d/(p+h):d/(2-p-h);var g=((p-l)/6+d/2)/d,y=((p-u)/6+d/2)/d,v=((p-c)/6+d/2)/d;l===p?a=v-y:u===p?a=1/3+g-v:c===p&&(a=2/3+y-g),a<0&&(a+=1),a>1&&(a-=1)}var m=[360*a,s,f];return o[3]!=null&&m.push(o[3]),m}}(r),t!=null&&(r[0]=function(o){return(o=Math.round(o))<0?0:o>360?360:o}(t)),e!=null&&(r[1]=Oi(e)),i!=null&&(r[2]=Oi(i)),on(Yu(r),"rgba")}function Jf(n,t){var e=St(n);if(e&&t!=null)return e[3]=wo(t),on(e,"rgba")}function on(n,t){if(n&&n.length){var e=n[0]+","+n[1]+","+n[2];return t!=="rgba"&&t!=="hsva"&&t!=="hsla"||(e+=","+n[3]),t+"("+e+")"}}function Mo(n,t){var e=St(n);return e?(.299*e[0]+.587*e[1]+.114*e[2])*e[3]/255+(1-e[3])*t:0}var $f=new bo(100);function ju(n){if(Q(n)){var t=$f.get(n);return t||(t=Zu(n,-.1),$f.put(n,t)),t}if(ho(n)){var e=H({},n);return e.colorStops=j(n.colorStops,function(i){return{offset:i.offset,color:Zu(i.color,-.1)}}),e}return n}const Zw=Object.freeze(Object.defineProperty({__proto__:null,fastLerp:So,fastMapToColor:Uw,lerp:qu,lift:Zu,liftColor:ju,lum:Mo,mapToColor:Yw,modifyAlpha:Jf,modifyHSL:ps,parse:St,random:function(){return on([Math.round(255*Math.random()),Math.round(255*Math.random()),Math.round(255*Math.random())],"rgb")},stringify:on,toHex:function(n){var t=St(n);if(t)return((1<<24)+(t[0]<<16)+(t[1]<<8)+ +t[2]).toString(16).slice(1)}},Symbol.toStringTag,{value:"Module"}));fe.hasGlobalWindow&&ue(window.btoa);var Ku=Array.prototype.slice;function Hn(n,t,e){return(t-n)*e+n}function Ju(n,t,e,i){for(var r=t.length,o=0;oi?t:n,o=Math.min(e,i),a=r[o-1]||{color:[0,0,0,0],offset:0},s=o;sa)i.length=a;else for(var s=o;s=1},n.prototype.getAdditiveTrack=function(){return this._additiveTrack},n.prototype.addKeyframe=function(t,e,i){this._needsSort=!0;var r=this.keyframes,o=r.length,a=!1,s=6,l=e;if(ft(e)){var u=function(d){return ft(d&&d[0])?2:1}(e);s=u,(u===1&&!Ae(e[0])||u===2&&!Ae(e[0][0]))&&(a=!0)}else if(Ae(e)&&!po(e))s=0;else if(Q(e))if(isNaN(+e)){var c=St(e);c&&(l=c,s=3)}else s=0;else if(ho(e)){var h=H({},l);h.colorStops=j(e.colorStops,function(d){return{offset:d.offset,color:St(d.color)}}),e.type==="linear"?s=4:e.type==="radial"&&(s=5),l=h}o===0?this.valType=s:s===this.valType&&s!==6||(a=!0),this.discrete=this.discrete||a;var p={time:t,value:l,rawValue:e,percent:0};return i&&(p.easing=i,p.easingFunc=ue(i)?i:xo[i]||Zf(i)),r.push(p),p},n.prototype.prepare=function(t,e){var i=this.keyframes;this._needsSort&&i.sort(function(g,y){return g.time-y.time});for(var r=this.valType,o=i.length,a=i[o-1],s=this.discrete,l=ys(r),u=eg(r),c=0;c=0&&!(u[i].percent<=e);i--);i=f(i,c-2)}else{for(i=d;ie);i++);i=f(i-1,c-2)}o=u[i+1],r=u[i]}if(r&&o){this._lastFr=i,this._lastFrP=e;var g=o.percent-r.percent,y=g===0?1:f((e-r.percent)/g,1);o.easingFunc&&(y=o.easingFunc(y));var v=a?this._additiveValue:p?To:t[h];if(!ys(l)&&!p||v||(v=this._additiveValue=[]),this.discrete)t[h]=y<1?r.rawValue:o.rawValue;else if(ys(l))l===1?Ju(v,r[s],o[s],y):function(w,M,S,C){for(var I=M.length,T=I&&M[0].length,A=0;A0&&l.addKeyframe(0,fs(u),r),this._trackKeys.push(s)}l.addKeyframe(t,fs(e[s]),r)}return this._maxTime=Math.max(this._maxTime,t),this},n.prototype.pause=function(){this._clip.pause(),this._paused=!0},n.prototype.resume=function(){this._clip.resume(),this._paused=!1},n.prototype.isPaused=function(){return!!this._paused},n.prototype.duration=function(t){return this._maxTime=t,this._force=!0,this},n.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var t=this._doneCbs;if(t)for(var e=t.length,i=0;i0)){this._started=1;for(var e=this,i=[],r=this._maxTime||0,o=0;o1){var s=a.pop();o.addKeyframe(s.time,t[r]),o.prepare(this._maxTime,o.getAdditiveTrack())}}}},n}();function wr(){return new Date().getTime()}var tg,ng,Jw=function(n){function t(e){var i=n.call(this)||this;return i._running=!1,i._time=0,i._pausedTime=0,i._pauseStart=0,i._paused=!1,e=e||{},i.stage=e.stage||{},i}return F(t,n),t.prototype.addClip=function(e){e.animation&&this.removeClip(e),this._head?(this._tail.next=e,e.prev=this._tail,e.next=null,this._tail=e):this._head=this._tail=e,e.animation=this},t.prototype.addAnimator=function(e){e.animation=this;var i=e.getClip();i&&this.addClip(i)},t.prototype.removeClip=function(e){if(e.animation){var i=e.prev,r=e.next;i?i.next=r:this._head=r,r?r.prev=i:this._tail=i,e.next=e.prev=e.animation=null}},t.prototype.removeAnimator=function(e){var i=e.getClip();i&&this.removeClip(i),e.animation=null},t.prototype.update=function(e){for(var i=wr()-this._pausedTime,r=i-this._time,o=this._head;o;){var a=o.next;o.step(i,r)&&(o.ondestroy(),this.removeClip(o)),o=a}this._time=i,e||(this.trigger("frame",r),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0,os(function i(){e._running&&(os(i),!e._paused&&e.update())})},t.prototype.start=function(){this._running||(this._time=wr(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||(this._pauseStart=wr(),this._paused=!0)},t.prototype.resume=function(){this._paused&&(this._pausedTime+=wr()-this._pauseStart,this._paused=!1)},t.prototype.clear=function(){for(var e=this._head;e;){var i=e.next;e.prev=e.next=e.animation=null,e=i}this._head=this._tail=null},t.prototype.isFinished=function(){return this._head==null},t.prototype.animate=function(e,i){i=i||{},this.start();var r=new $u(e,i.loop);return this.addAnimator(r),r},t}(Vt),Qu=fe.domSupported,ec=(ng={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},{mouse:tg=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],touch:["touchstart","touchend","touchmove"],pointer:j(tg,function(n){var t=n.replace("mouse","pointer");return ng.hasOwnProperty(t)?t:n})}),$w=["mousemove","mouseup"],Qw=["pointermove","pointerup"],ig=!1;function tc(n){var t=n.pointerType;return t==="pen"||t==="touch"}function nc(n){n&&(n.zrByTouch=!0)}function rg(n,t){for(var e=t,i=!1;e&&e.nodeType!==9&&!(i=e.domBelongToZr||e!==t&&e===n.painterRoot);)e=e.parentNode;return i}var eS=function(n,t){this.stopPropagation=rt,this.stopImmediatePropagation=rt,this.preventDefault=rt,this.type=t.type,this.target=this.currentTarget=n.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY},an={mousedown:function(n){n=Ft(this.dom,n),this.__mayPointerCapture=[n.zrX,n.zrY],this.trigger("mousedown",n)},mousemove:function(n){n=Ft(this.dom,n);var t=this.__mayPointerCapture;!t||n.zrX===t[0]&&n.zrY===t[1]||this.__togglePointerCapture(!0),this.trigger("mousemove",n)},mouseup:function(n){n=Ft(this.dom,n),this.__togglePointerCapture(!1),this.trigger("mouseup",n)},mouseout:function(n){rg(this,(n=Ft(this.dom,n)).toElement||n.relatedTarget)||(this.__pointerCapturing&&(n.zrEventControl="no_globalout"),this.trigger("mouseout",n))},wheel:function(n){ig=!0,n=Ft(this.dom,n),this.trigger("mousewheel",n)},mousewheel:function(n){ig||(n=Ft(this.dom,n),this.trigger("mousewheel",n))},touchstart:function(n){nc(n=Ft(this.dom,n)),this.__lastTouchMoment=new Date,this.handler.processGesture(n,"start"),an.mousemove.call(this,n),an.mousedown.call(this,n)},touchmove:function(n){nc(n=Ft(this.dom,n)),this.handler.processGesture(n,"change"),an.mousemove.call(this,n)},touchend:function(n){nc(n=Ft(this.dom,n)),this.handler.processGesture(n,"end"),an.mouseup.call(this,n),+new Date-+this.__lastTouchMoment<300&&an.click.call(this,n)},pointerdown:function(n){an.mousedown.call(this,n)},pointermove:function(n){tc(n)||an.mousemove.call(this,n)},pointerup:function(n){an.mouseup.call(this,n)},pointerout:function(n){tc(n)||an.mouseout.call(this,n)}};D(["click","dblclick","contextmenu"],function(n){an[n]=function(t){t=Ft(this.dom,t),this.trigger(n,t)}});var ic={pointermove:function(n){tc(n)||ic.mousemove.call(this,n)},pointerup:function(n){ic.mouseup.call(this,n)},mousemove:function(n){this.trigger("mousemove",n)},mouseup:function(n){var t=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",n),t&&(n.zrEventControl="only_globalout",this.trigger("mouseout",n))}};function vs(n,t,e,i){n.mounted[t]=e,n.listenerOpts[t]=i,Eu(n.domTarget,t,e,i)}function rc(n){var t,e,i,r,o=n.mounted;for(var a in o)o.hasOwnProperty(a)&&(t=n.domTarget,e=a,i=o[a],r=n.listenerOpts[a],t.removeEventListener(e,i,r));n.mounted={}}var og=function(n,t){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=n,this.domHandlers=t},tS=function(n){function t(e,i){var r,o,a,s=n.call(this)||this;return s.__pointerCapturing=!1,s.dom=e,s.painterRoot=i,s._localHandlerScope=new og(e,an),Qu&&(s._globalHandlerScope=new og(document,ic)),r=s,o=s._localHandlerScope,a=o.domHandlers,fe.pointerEventsSupported?D(ec.pointer,function(l){vs(o,l,function(u){a[l].call(r,u)})}):(fe.touchEventsSupported&&D(ec.touch,function(l){vs(o,l,function(u){a[l].call(r,u),function(c){c.touching=!0,c.touchTimer!=null&&(clearTimeout(c.touchTimer),c.touchTimer=null),c.touchTimer=setTimeout(function(){c.touching=!1,c.touchTimer=null},700)}(o)})}),D(ec.mouse,function(l){vs(o,l,function(u){u=Nu(u),o.touching||a[l].call(r,u)})})),s}return F(t,n),t.prototype.dispose=function(){rc(this._localHandlerScope),Qu&&rc(this._globalHandlerScope)},t.prototype.setCursor=function(e){this.dom.style&&(this.dom.style.cursor=e||"default")},t.prototype.__togglePointerCapture=function(e){if(this.__mayPointerCapture=null,Qu&&+this.__pointerCapturing^+e){this.__pointerCapturing=e;var i=this._globalHandlerScope;e?function(r,o){function a(s){vs(o,s,function(l){l=Nu(l),rg(r,l.target)||(l=function(u,c){return Ft(u.dom,new eS(u,c),!0)}(r,l),o.domHandlers[s].call(r,l))},{capture:!0})}fe.pointerEventsSupported?D(Qw,a):fe.touchEventsSupported||D($w,a)}(this,i):rc(i)}},t}(Vt),ag=1;fe.hasGlobalWindow&&(ag=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var ms=ag,oc="#333",ac="#ccc",sg=yo;function Ri(n){return n>5e-5||n<-5e-5}var Ni=[],Sr=[],sc=[1,0,0,1,0,0],lc=Math.abs,ii=function(){function n(){}return n.prototype.getLocalTransform=function(t){return n.getLocalTransform(this,t)},n.prototype.setPosition=function(t){this.x=t[0],this.y=t[1]},n.prototype.setScale=function(t){this.scaleX=t[0],this.scaleY=t[1]},n.prototype.setSkew=function(t){this.skewX=t[0],this.skewY=t[1]},n.prototype.setOrigin=function(t){this.originX=t[0],this.originY=t[1]},n.prototype.needLocalTransform=function(){return Ri(this.rotation)||Ri(this.x)||Ri(this.y)||Ri(this.scaleX-1)||Ri(this.scaleY-1)||Ri(this.skewX)||Ri(this.skewY)},n.prototype.updateTransform=function(){var t=this.parent&&this.parent.transform,e=this.needLocalTransform(),i=this.transform;e||t?(i=i||[1,0,0,1,0,0],e?this.getLocalTransform(i):sg(i),t&&(e?_n(i,t,i):ts(i,t)),this.transform=i,this._resolveGlobalScaleRatio(i)):i&&(sg(i),this.invTransform=null)},n.prototype._resolveGlobalScaleRatio=function(t){var e=this.globalScaleRatio;if(e!=null&&e!==1){this.getGlobalScale(Ni);var i=Ni[0]<0?-1:1,r=Ni[1]<0?-1:1,o=((Ni[0]-i)*e+i)/Ni[0]||0,a=((Ni[1]-r)*e+r)/Ni[1]||0;t[0]*=o,t[1]*=o,t[2]*=a,t[3]*=a}this.invTransform=this.invTransform||[1,0,0,1,0,0],Ai(this.invTransform,t)},n.prototype.getComputedTransform=function(){for(var t=this,e=[];t;)e.push(t),t=t.parent;for(;t=e.pop();)t.updateTransform();return this.transform},n.prototype.setLocalTransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],i=t[2]*t[2]+t[3]*t[3],r=Math.atan2(t[1],t[0]),o=Math.PI/2+r-Math.atan2(t[3],t[2]);i=Math.sqrt(i)*Math.cos(o),e=Math.sqrt(e),this.skewX=o,this.skewY=0,this.rotation=-r,this.x=+t[4],this.y=+t[5],this.scaleX=e,this.scaleY=i,this.originX=0,this.originY=0}},n.prototype.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(t.invTransform=t.invTransform||[1,0,0,1,0,0],_n(Sr,t.invTransform,e),e=Sr);var i=this.originX,r=this.originY;(i||r)&&(sc[4]=i,sc[5]=r,_n(Sr,e,sc),Sr[4]-=i,Sr[5]-=r,e=Sr),this.setLocalTransform(e)}},n.prototype.getGlobalScale=function(t){var e=this.transform;return t=t||[],e?(t[0]=Math.sqrt(e[0]*e[0]+e[1]*e[1]),t[1]=Math.sqrt(e[2]*e[2]+e[3]*e[3]),e[0]<0&&(t[0]=-t[0]),e[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},n.prototype.transformCoordToLocal=function(t,e){var i=[t,e],r=this.invTransform;return r&&tt(i,i,r),i},n.prototype.transformCoordToGlobal=function(t,e){var i=[t,e],r=this.transform;return r&&tt(i,i,r),i},n.prototype.getLineScale=function(){var t=this.transform;return t&&lc(t[0]-1)>1e-10&&lc(t[3]-1)>1e-10?Math.sqrt(lc(t[0]*t[3]-t[2]*t[1])):1},n.prototype.copyTransform=function(t){(function(e,i){for(var r=0;r=0?parseFloat(n)/100*t:parseFloat(n):n}function _s(n,t,e){var i=t.position||"inside",r=t.distance!=null?t.distance:5,o=e.height,a=e.width,s=o/2,l=e.x,u=e.y,c="left",h="top";if(i instanceof Array)l+=bn(i[0],e.width),u+=bn(i[1],e.height),c=null,h=null;else switch(i){case"left":l-=r,u+=s,c="right",h="middle";break;case"right":l+=r+a,u+=s,h="middle";break;case"top":l+=a/2,u-=r,c="center",h="bottom";break;case"bottom":l+=a/2,u+=o+r,c="center";break;case"inside":l+=a/2,u+=s,c="center",h="middle";break;case"insideLeft":l+=r,u+=s,h="middle";break;case"insideRight":l+=a-r,u+=s,c="right",h="middle";break;case"insideTop":l+=a/2,u+=r,c="center";break;case"insideBottom":l+=a/2,u+=o-r,c="center",h="bottom";break;case"insideTopLeft":l+=r,u+=r;break;case"insideTopRight":l+=a-r,u+=r,c="right";break;case"insideBottomLeft":l+=r,u+=o-r,h="bottom";break;case"insideBottomRight":l+=a-r,u+=o-r,c="right",h="bottom"}return(n=n||{}).x=l,n.y=u,n.align=c,n.verticalAlign=h,n}var cc="__zr_normal__",hc=Co.concat(["ignore"]),nS=nn(Co,function(n,t){return n[t]=!0,n},{ignore:!1}),Tr={},iS=new me(0,0,0,0),xs=function(){function n(t){this.id=wu(),this.animators=[],this.currentStates=[],this.states={},this._init(t)}return n.prototype._init=function(t){this.attr(t)},n.prototype.drift=function(t,e,i){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0}var r=this.transform;r||(r=this.transform=[1,0,0,1,0,0]),r[4]+=t,r[5]+=e,this.decomposeTransform(),this.markRedraw()},n.prototype.beforeUpdate=function(){},n.prototype.afterUpdate=function(){},n.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},n.prototype.updateInnerText=function(t){var e=this._textContent;if(e&&(!e.ignore||t)){this.textConfig||(this.textConfig={});var i=this.textConfig,r=i.local,o=e.innerTransformable,a=void 0,s=void 0,l=!1;o.parent=r?this:null;var u=!1;if(o.copyTransform(e),i.position!=null){var c=iS;i.layoutRect?c.copy(i.layoutRect):c.copy(this.getBoundingRect()),r||c.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(Tr,i,c):_s(Tr,i,c),o.x=Tr.x,o.y=Tr.y,a=Tr.align,s=Tr.verticalAlign;var h=i.origin;if(h&&i.rotation!=null){var p=void 0,d=void 0;h==="center"?(p=.5*c.width,d=.5*c.height):(p=bn(h[0],c.width),d=bn(h[1],c.height)),u=!0,o.originX=-o.x+p+(r?0:c.x),o.originY=-o.y+d+(r?0:c.y)}}i.rotation!=null&&(o.rotation=i.rotation);var f=i.offset;f&&(o.x+=f[0],o.y+=f[1],u||(o.originX=-f[0],o.originY=-f[1]));var g=i.inside==null?typeof i.position=="string"&&i.position.indexOf("inside")>=0:i.inside,y=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),v=void 0,m=void 0,_=void 0;g&&this.canBeInsideText()?(v=i.insideFill,m=i.insideStroke,v!=null&&v!=="auto"||(v=this.getInsideTextFill()),m!=null&&m!=="auto"||(m=this.getInsideTextStroke(v),_=!0)):(v=i.outsideFill,m=i.outsideStroke,v!=null&&v!=="auto"||(v=this.getOutsideFill()),m!=null&&m!=="auto"||(m=this.getOutsideStroke(v),_=!0)),(v=v||"#000")===y.fill&&m===y.stroke&&_===y.autoStroke&&a===y.align&&s===y.verticalAlign||(l=!0,y.fill=v,y.stroke=m,y.autoStroke=_,y.align=a,y.verticalAlign=s,e.setDefaultTextStyle(y)),e.__dirty|=1,l&&e.dirtyStyle(!0)}},n.prototype.canBeInsideText=function(){return!0},n.prototype.getInsideTextFill=function(){return"#fff"},n.prototype.getInsideTextStroke=function(t){return"#000"},n.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?ac:oc},n.prototype.getOutsideStroke=function(t){var e=this.__zr&&this.__zr.getBackgroundColor(),i=typeof e=="string"&&St(e);i||(i=[255,255,255,1]);for(var r=i[3],o=this.__zr.isDarkMode(),a=0;a<3;a++)i[a]=i[a]*r+(o?0:255)*(1-r);return i[3]=1,on(i,"rgba")},n.prototype.traverse=function(t,e){},n.prototype.attrKV=function(t,e){t==="textConfig"?this.setTextConfig(e):t==="textContent"?this.setTextContent(e):t==="clipPath"?this.setClipPath(e):t==="extra"?(this.extra=this.extra||{},H(this.extra,e)):this[t]=e},n.prototype.hide=function(){this.ignore=!0,this.markRedraw()},n.prototype.show=function(){this.ignore=!1,this.markRedraw()},n.prototype.attr=function(t,e){if(typeof t=="string")this.attrKV(t,e);else if(ne(t))for(var i=Oe(t),r=0;r0},n.prototype.getState=function(t){return this.states[t]},n.prototype.ensureState=function(t){var e=this.states;return e[t]||(e[t]={}),e[t]},n.prototype.clearStates=function(t){this.useState(cc,!1,t)},n.prototype.useState=function(t,e,i,r){var o=t===cc;if(this.hasState()||!o){var a=this.currentStates,s=this.stateTransition;if(!(we(a,t)>=0)||!e&&a.length!==1){var l;if(this.stateProxy&&!o&&(l=this.stateProxy(t)),l||(l=this.states&&this.states[t]),l||o){o||this.saveCurrentToNormalState(l);var u=!!(l&&l.hoverLayer||r);u&&this._toggleHoverLayerFlag(!0),this._applyStateObj(t,l,this._normalState,e,!i&&!this.__inHover&&s&&s.duration>0,s);var c=this._textContent,h=this._textGuide;return c&&c.useState(t,e,i,u),h&&h.useState(t,e,i,u),o?(this.currentStates=[],this._normalState={}):e?this.currentStates.push(t):this.currentStates=[t],this._updateAnimationTargets(),this.markRedraw(),!u&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=-2),l}qa("State "+t+" not exists.")}}},n.prototype.useStates=function(t,e,i){if(t.length){var r=[],o=this.currentStates,a=t.length,s=a===o.length;if(s){for(var l=0;l0,f);var g=this._textContent,y=this._textGuide;g&&g.useStates(t,e,p),y&&y.useStates(t,e,p),this._updateAnimationTargets(),this.currentStates=t.slice(),this.markRedraw(),!p&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=-2)}else this.clearStates()},n.prototype.isSilent=function(){for(var t=this.silent,e=this.parent;!t&&e;){if(e.silent){t=!0;break}e=e.parent}return t},n.prototype._updateAnimationTargets=function(){for(var t=0;t=0){var i=this.currentStates.slice();i.splice(e,1),this.useStates(i)}},n.prototype.replaceState=function(t,e,i){var r=this.currentStates.slice(),o=we(r,t),a=we(r,e)>=0;o>=0?a?r.splice(o,1):r[o]=e:i&&!a&&r.push(e),this.useStates(r)},n.prototype.toggleState=function(t,e){e?this.useState(t,!0):this.removeState(t)},n.prototype._mergeStates=function(t){for(var e,i={},r=0;r=0&&o.splice(a,1)}),this.animators.push(t),i&&i.animation.addAnimator(t),i&&i.wakeUp()},n.prototype.updateDuringAnimation=function(t){this.markRedraw()},n.prototype.stopAnimation=function(t,e){for(var i=this.animators,r=i.length,o=[],a=0;a0&&e.during&&o[0].during(function(f,g){e.during(g)});for(var p=0;p0||r.force&&!a.length){var w,M=void 0,S=void 0,C=void 0;if(s)for(S={},p&&(M={}),x=0;x<_;x++)S[v=g[x]]=e[v],p?M[v]=i[v]:e[v]=i[v];else if(p)for(C={},x=0;x<_;x++)C[v=g[x]]=fs(e[v]),rS(e,i,v);(w=new $u(e,!1,!1,h?He(f,function(I){return I.targetName===t}):null)).targetName=t,r.scope&&(w.scope=r.scope),p&&M&&w.whenWithKeys(0,M,g),C&&w.whenWithKeys(0,C,g),w.whenWithKeys(u??500,s?S:i,g).delay(c||0),n.addAnimator(w,t),a.push(w)}}at(xs,Vt),at(xs,ii);var _e=function(n){function t(e){var i=n.call(this)||this;return i.isGroup=!0,i._children=[],i.attr(e),i}return F(t,n),t.prototype.childrenRef=function(){return this._children},t.prototype.children=function(){return this._children.slice()},t.prototype.childAt=function(e){return this._children[e]},t.prototype.childOfName=function(e){for(var i=this._children,r=0;r=0&&(r.splice(o,0,e),this._doAdd(e))}return this},t.prototype.replace=function(e,i){var r=we(this._children,e);return r>=0&&this.replaceAt(i,r),this},t.prototype.replaceAt=function(e,i){var r=this._children,o=r[i];if(e&&e!==this&&e.parent!==this&&e!==o){r[i]=e,o.parent=null;var a=this.__zr;a&&o.removeSelfFromZr(a),this._doAdd(e)}return this},t.prototype._doAdd=function(e){e.parent&&e.parent.remove(e),e.parent=this;var i=this.__zr;i&&i!==e.__zr&&e.addSelfToZr(i),i&&i.refresh()},t.prototype.remove=function(e){var i=this.__zr,r=this._children,o=we(r,e);return o<0||(r.splice(o,1),e.parent=null,i&&e.removeSelfFromZr(i),i&&i.refresh()),this},t.prototype.removeAll=function(){for(var e=this._children,i=this.__zr,r=0;r0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},n.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},n.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},n.prototype.refreshHover=function(){this._needsRefreshHover=!0},n.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover())},n.prototype.resize=function(t){this._disposed||(t=t||{},this.painter.resize(t.width,t.height),this.handler.resize())},n.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},n.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},n.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},n.prototype.setCursorStyle=function(t){this._disposed||this.handler.setCursorStyle(t)},n.prototype.findHover=function(t,e){if(!this._disposed)return this.handler.findHover(t,e)},n.prototype.on=function(t,e,i){return this._disposed||this.handler.on(t,e,i),this},n.prototype.off=function(t,e){this._disposed||this.handler.off(t,e)},n.prototype.trigger=function(t,e){this._disposed||this.handler.trigger(t,e)},n.prototype.clear=function(){if(!this._disposed){for(var t=this.storage.getRoots(),e=0;e0){if(n<=r)return a;if(n>=o)return s}else{if(n>=r)return a;if(n<=o)return s}else{if(n===r)return a;if(n===o)return s}return(n-r)/l*u+a}function ee(n,t){switch(n){case"center":case"middle":n="50%";break;case"left":case"top":n="0%";break;case"right":case"bottom":n="100%"}return Q(n)?(e=n,e.replace(/^\s+|\s+$/g,"")).match(/%$/)?parseFloat(n)/100*t:parseFloat(n):n==null?NaN:+n;var e}function We(n,t,e){return t==null&&(t=10),t=Math.min(Math.max(0,t),20),n=(+n).toFixed(t),e?n:+n}function Do(n){return n.sort(function(t,e){return t-e}),n}function wn(n){if(n=+n,isNaN(n))return 0;if(n>1e-14){for(var t=1,e=0;e<15;e++,t*=10)if(Math.round(n*t)/t===n)return e}return dg(n)}function dg(n){var t=n.toString().toLowerCase(),e=t.indexOf("e"),i=e>0?+t.slice(e+1):0,r=e>0?e:t.length,o=t.indexOf("."),a=o<0?0:r-1-o;return Math.max(0,a-i)}function yc(n,t){var e=Math.log,i=Math.LN10,r=Math.floor(e(n[1]-n[0])/i),o=Math.round(e(Math.abs(t[1]-t[0]))/i),a=Math.min(Math.max(-r+o,0),20);return isFinite(a)?a:20}function fg(n,t){var e=nn(n,function(d,f){return d+(isNaN(f)?0:f)},0);if(e===0)return[];for(var i=Math.pow(10,t),r=j(n,function(d){return(isNaN(d)?0:d)/e*i*100}),o=100*i,a=j(r,function(d){return Math.floor(d)}),s=nn(a,function(d,f){return d+f},0),l=j(r,function(d,f){return d-a[f]});su&&(u=l[h],c=h);++a[c],l[c]=0,++s}return j(a,function(d){return d/i})}function sS(n,t){var e=Math.max(wn(n),wn(t)),i=n+t;return e>20?i:We(i,e)}function vc(n){var t=2*Math.PI;return(n%t+t)%t}function ko(n){return n>-1e-4&&n<1e-4}var lS=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d{1,2})(?::(\d{1,2})(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function Wt(n){if(n instanceof Date)return n;if(Q(n)){var t=lS.exec(n);if(!t)return new Date(NaN);if(t[8]){var e=+t[4]||0;return t[8].toUpperCase()!=="Z"&&(e-=+t[8].slice(0,3)),new Date(Date.UTC(+t[1],+(t[2]||1)-1,+t[3]||1,e,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0))}return new Date(+t[1],+(t[2]||1)-1,+t[3]||1,+t[4]||0,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0)}return n==null?new Date(NaN):new Date(Math.round(n))}function gg(n){return Math.pow(10,ws(n))}function ws(n){if(n===0)return 0;var t=Math.floor(Math.log(n)/Math.LN10);return n/Math.pow(10,t)>=10&&t++,t}function mc(n,t){var e=ws(n),i=Math.pow(10,e),r=n/i;return n=(t?r<1.5?1:r<2.5?2:r<4?3:r<7?5:10:r<1?1:r<2?2:r<3?3:r<5?5:10)*i,e>=-20?+n.toFixed(e<0?-e:0):n}function _c(n){n.sort(function(l,u){return s(l,u,0)?-1:1});for(var t=-1/0,e=1,i=0;i=0||o&&we(o,l)<0)){var u=i.getShallow(l,t);u!=null&&(a[n[s][0]]=u)}}return a}}var gS=Cr([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),yS=function(){function n(){}return n.prototype.getAreaStyle=function(t,e){return gS(this,t,e)},n}(),Mc=new bo(50);function vS(n){if(typeof n=="string"){var t=Mc.get(n);return t&&t.image}return n}function Ag(n,t,e,i,r){if(n){if(typeof n=="string"){if(t&&t.__zrImageSrc===n||!e)return t;var o=Mc.get(n),a={hostEl:e,cb:i,cbPayload:r};return o?!Ms(t=o.image)&&o.pending.push(a):((t=Bn.loadImage(n,Dg,Dg)).__zrImageSrc=n,Mc.put(n,t.__cachedImgObj={image:t,pending:[a]})),t}return n}return t}function Dg(){var n=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t=a;l++)s-=a;var u=Rt(e,t);return u>s&&(e="",u=0),s=n-u,r.ellipsis=e,r.ellipsisWidth=u,r.contentWidth=s,r.containerWidth=n,r}function Pg(n,t){var e=t.containerWidth,i=t.font,r=t.contentWidth;if(!e)return"";var o=Rt(n,i);if(o<=e)return n;for(var a=0;;a++){if(o<=r||a>=t.maxIterations){n+=t.ellipsis;break}var s=a===0?mS(n,r,t.ascCharWidth,t.cnCharWidth):o>0?Math.floor(n.length*r/o):0;o=Rt(n=n.substr(0,s),i)}return n===""&&(n=t.placeholder),n}function mS(n,t,e,i){for(var r=0,o=0,a=n.length;o0&&f+i.accumWidth>i.width&&(o=t.split(` `),h=!0),i.accumWidth=f}else{var g=Rg(t,c,i.width,i.breakAll,i.accumWidth);i.accumWidth=g.accumWidth+d,a=g.linesWidths,o=g.lines}}else o=t.split(` `);for(var y=0;y=32&&e<=591||e>=880&&e<=4351||e>=4608&&e<=5119||e>=7680&&e<=8303}(n)||!!bS[n]}function Rg(n,t,e,i,r){for(var o=[],a=[],s="",l="",u=0,c=0,h=0;he:r+c+d>e)?c?(s||l)&&(f?(s||(s=l,l="",c=u=0),o.push(s),a.push(c-u),l+=p,s="",c=u+=d):(l&&(s+=l,l="",u=0),o.push(s),a.push(c),s=p,c=d)):f?(o.push(l),a.push(u),l=p,u=d):(o.push(p),a.push(d)):(c+=d,f?(l+=p,u+=d):(l&&(s+=l,l="",u=0),s+=p))}else l&&(s+=l,c+=u),o.push(s),a.push(c),s="",l="",u=0,c=0}return o.length||s||(s=n,l="",u=0),l&&(s+=l),s&&(o.push(s),a.push(c)),o.length===1&&(c+=r),{accumWidth:c,lines:o,linesWidths:a}}var Ic="__zr_style_"+Math.round(10*Math.random()),Vi={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},Ts={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};Vi[Ic]=!0;var Ng=["z","z2","invisible"],SS=["invisible"],Fi=function(n){function t(i){return n.call(this,i)||this}var e;return F(t,n),t.prototype._init=function(i){for(var r=Oe(i),o=0;o1e-4)return s[0]=n-e,s[1]=t-i,l[0]=n+e,void(l[1]=t+i);if(Cs[0]=Lc(r)*e+n,Cs[1]=kc(r)*i+t,Is[0]=Lc(o)*e+n,Is[1]=kc(o)*i+t,u(s,Cs,Is),c(l,Cs,Is),(r%=Gi)<0&&(r+=Gi),(o%=Gi)<0&&(o+=Gi),r>o&&!a?o+=Gi:rr&&(As[0]=Lc(d)*e+n,As[1]=kc(d)*i+t,u(s,As,s),c(l,As,l))}var De={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Hi=[],Wi=[],Mn=[],ri=[],Tn=[],Cn=[],Pc=Math.min,Oc=Math.max,Xi=Math.cos,Ui=Math.sin,Wn=Math.abs,Rc=Math.PI,oi=2*Rc,Nc=typeof Float32Array<"u",Bo=[];function Ec(n){return Math.round(n/Rc*1e8)/1e8%2*Rc}function zc(n,t){var e=Ec(n[0]);e<0&&(e+=oi);var i=e-n[0],r=n[1];r+=i,!t&&r-e>=oi?r=e+oi:t&&e-r>=oi?r=e-oi:!t&&e>r?r=e+(oi-Ec(e-r)):t&&e0&&(this._ux=Wn(i/ms/t)||0,this._uy=Wn(i/ms/e)||0)},n.prototype.setDPR=function(t){this.dpr=t},n.prototype.setContext=function(t){this._ctx=t},n.prototype.getContext=function(){return this._ctx},n.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},n.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},n.prototype.moveTo=function(t,e){return this._drawPendingPt(),this.addData(De.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},n.prototype.lineTo=function(t,e){var i=Wn(t-this._xi),r=Wn(e-this._yi),o=i>this._ux||r>this._uy;if(this.addData(De.L,t,e),this._ctx&&o&&this._ctx.lineTo(t,e),o)this._xi=t,this._yi=e,this._pendingPtDist=0;else{var a=i*i+r*r;a>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=e,this._pendingPtDist=a)}return this},n.prototype.bezierCurveTo=function(t,e,i,r,o,a){return this._drawPendingPt(),this.addData(De.C,t,e,i,r,o,a),this._ctx&&this._ctx.bezierCurveTo(t,e,i,r,o,a),this._xi=o,this._yi=a,this},n.prototype.quadraticCurveTo=function(t,e,i,r){return this._drawPendingPt(),this.addData(De.Q,t,e,i,r),this._ctx&&this._ctx.quadraticCurveTo(t,e,i,r),this._xi=i,this._yi=r,this},n.prototype.arc=function(t,e,i,r,o,a){this._drawPendingPt(),Bo[0]=r,Bo[1]=o,zc(Bo,a),r=Bo[0];var s=(o=Bo[1])-r;return this.addData(De.A,t,e,i,i,r,s,0,a?0:1),this._ctx&&this._ctx.arc(t,e,i,r,o,a),this._xi=Xi(o)*i+t,this._yi=Ui(o)*i+e,this},n.prototype.arcTo=function(t,e,i,r,o){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(t,e,i,r,o),this},n.prototype.rect=function(t,e,i,r){return this._drawPendingPt(),this._ctx&&this._ctx.rect(t,e,i,r),this.addData(De.R,t,e,i,r),this},n.prototype.closePath=function(){this._drawPendingPt(),this.addData(De.Z);var t=this._ctx,e=this._x0,i=this._y0;return t&&t.closePath(),this._xi=e,this._yi=i,this},n.prototype.fill=function(t){t&&t.fill(),this.toStatic()},n.prototype.stroke=function(t){t&&t.stroke(),this.toStatic()},n.prototype.len=function(){return this._len},n.prototype.setData=function(t){var e=t.length;this.data&&this.data.length===e||!Nc||(this.data=new Float32Array(e));for(var i=0;ic.length&&(this._expandData(),c=this.data);for(var h=0;h0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},n.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var t=[],e=0;e11&&(this.data=new Float32Array(t)))}},n.prototype.getBoundingRect=function(){Mn[0]=Mn[1]=Tn[0]=Tn[1]=Number.MAX_VALUE,ri[0]=ri[1]=Cn[0]=Cn[1]=-Number.MAX_VALUE;var t,e=this.data,i=0,r=0,o=0,a=0;for(t=0;ti||Wn(v)>r||p===e-1)&&(g=Math.sqrt(L*L+v*v),o=y,a=x);break;case De.C:var m=t[p++],_=t[p++],x=(y=t[p++],t[p++]),b=t[p++],w=t[p++];g=Fw(o,a,m,_,y,x,b,w,10),o=b,a=w;break;case De.Q:g=Gw(o,a,m=t[p++],_=t[p++],y=t[p++],x=t[p++],10),o=y,a=x;break;case De.A:var M=t[p++],S=t[p++],C=t[p++],I=t[p++],T=t[p++],A=t[p++],k=A+T;p+=1,f&&(s=Xi(T)*C+M,l=Ui(T)*I+S),g=Oc(C,I)*Pc(oi,Math.abs(A)),o=Xi(k)*C+M,a=Ui(k)*I+S;break;case De.R:s=o=t[p++],l=a=t[p++],g=2*t[p++]+2*t[p++];break;case De.Z:var L=s-o;v=l-a,g=Math.sqrt(L*L+v*v),o=s,a=l}g>=0&&(u[h++]=g,c+=g)}return this._pathLen=c,c},n.prototype.rebuildPath=function(t,e){var i,r,o,a,s,l,u,c,h,p,d=this.data,f=this._ux,g=this._uy,y=this._len,v=e<1,m=0,_=0,x=0;if(!v||(this._pathSegLen||this._calculateLength(),u=this._pathSegLen,c=e*this._pathLen))e:for(var b=0;b0&&(t.lineTo(h,p),x=0),w){case De.M:i=o=d[b++],r=a=d[b++],t.moveTo(o,a);break;case De.L:s=d[b++],l=d[b++];var S=Wn(s-o),C=Wn(l-a);if(S>f||C>g){if(v){if(m+($=u[_++])>c){var I=(c-m)/$;t.lineTo(o*(1-I)+s*I,a*(1-I)+l*I);break e}m+=$}t.lineTo(s,l),o=s,a=l,x=0}else{var T=S*S+C*C;T>x&&(h=s,p=l,x=T)}break;case De.C:var A=d[b++],k=d[b++],L=d[b++],O=d[b++],P=d[b++],R=d[b++];if(v){if(m+($=u[_++])>c){us(o,A,L,P,I=(c-m)/$,Hi),us(a,k,O,R,I,Wi),t.bezierCurveTo(Hi[1],Wi[1],Hi[2],Wi[2],Hi[3],Wi[3]);break e}m+=$}t.bezierCurveTo(A,k,L,O,P,R),o=P,a=R;break;case De.Q:if(A=d[b++],k=d[b++],L=d[b++],O=d[b++],v){if(m+($=u[_++])>c){cs(o,A,L,I=(c-m)/$,Hi),cs(a,k,O,I,Wi),t.quadraticCurveTo(Hi[1],Wi[1],Hi[2],Wi[2]);break e}m+=$}t.quadraticCurveTo(A,k,L,O),o=L,a=O;break;case De.A:var N=d[b++],E=d[b++],z=d[b++],B=d[b++],G=d[b++],K=d[b++],V=d[b++],X=!d[b++],Z=z>B?z:B,W=Wn(z-B)>.001,te=G+K,oe=!1;if(v&&(m+($=u[_++])>c&&(te=G+K*(c-m)/$,oe=!0),m+=$),W&&t.ellipse?t.ellipse(N,E,z,B,V,G,te,X):t.arc(N,E,Z,G,te,X),oe)break e;M&&(i=Xi(G)*z+N,r=Ui(G)*B+E),o=Xi(te)*z+N,a=Ui(te)*B+E;break;case De.R:i=o=d[b],r=a=d[b+1],s=d[b++],l=d[b++];var se=d[b++],ie=d[b++];if(v){if(m+($=u[_++])>c){var J=c-m;t.moveTo(s,l),t.lineTo(s+Pc(J,se),l),(J-=se)>0&&t.lineTo(s+se,l+Pc(J,ie)),(J-=ie)>0&&t.lineTo(s+Oc(se-J,0),l+ie),(J-=se)>0&&t.lineTo(s,l+Oc(ie-J,0));break e}m+=$}t.rect(s,l,se,ie);break;case De.Z:if(v){var $;if(m+($=u[_++])>c){I=(c-m)/$,t.lineTo(o*(1-I)+i*I,a*(1-I)+r*I);break e}m+=$}t.closePath(),o=i,a=r}}},n.prototype.clone=function(){var t=new n,e=this.data;return t.data=e.slice?e.slice():Array.prototype.slice.call(e),t._len=this._len,t},n.CMD=De,n.initDefaultProps=function(){var t=n.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0}(),n}();function Ir(n,t,e,i,r,o,a){if(r===0)return!1;var s,l=r;if(a>t+l&&a>i+l||an+l&&o>e+l||ot+h&&c>i+h&&c>o+h&&c>s+h||cn+h&&u>e+h&&u>r+h&&u>a+h||ut+u&&l>i+u&&l>o+u||ln+u&&s>e+u&&s>r+u||se||c+ur&&(r+=Vo);var p=Math.atan2(l,s);return p<0&&(p+=Vo),p>=i&&p<=r||p+Vo>=i&&p+Vo<=r}function Un(n,t,e,i,r,o){if(o>t&&o>i||or?s:0}var si=ai.CMD,Yi=2*Math.PI,yt=[-1,-1,-1],Yt=[-1,-1];function kS(n,t,e,i,r,o,a,s,l,u){if(u>t&&u>i&&u>o&&u>s||u1&&(c=Yt[0],Yt[0]=Yt[1],Yt[1]=c),f=$e(t,i,o,s,Yt[0]),d>1&&(g=$e(t,i,o,s,Yt[1]))),d===2?vt&&s>i&&s>o||s=0&&S<=1&&(m[w++]=S);else{var M=x*x-4*_*b;if(ti(M))(S=-x/(2*_))>=0&&S<=1&&(m[w++]=S);else if(M>0){var S,C=ei(M),I=(-x-C)/(2*_);(S=(-x+C)/(2*_))>=0&&S<=1&&(m[w++]=S),I>=0&&I<=1&&(m[w++]=I)}}return w}(t,i,o,s,yt);if(l===0)return 0;var u=Uf(t,i,o);if(u>=0&&u<=1){for(var c=0,h=st(t,i,o,u),p=0;pe||s<-e)return 0;var l=Math.sqrt(e*e-s*s);yt[0]=-l,yt[1]=l;var u=Math.abs(i-r);if(u<1e-4)return 0;if(u>=Yi-1e-4){i=0,r=Yi;var c=o?1:-1;return a>=yt[0]+n&&a<=yt[1]+n?c:0}if(i>r){var h=i;i=r,r=h}i<0&&(i+=Yi,r+=Yi);for(var p=0,d=0;d<2;d++){var f=yt[d];if(f+n>a){var g=Math.atan2(s,f);c=o?1:-1,g<0&&(g=Yi+g),(g>=i&&g<=r||g+Yi>=i&&g+Yi<=r)&&(g>Math.PI/2&&g<1.5*Math.PI&&(c=-c),p+=c)}}return p}function Fg(n,t,e,i,r){for(var o,a,s,l,u=n.data,c=n.len(),h=0,p=0,d=0,f=0,g=0,y=0;y1&&(e||(h+=Un(p,d,f,g,i,r))),m&&(f=p=u[y],g=d=u[y+1]),v){case si.M:p=f=u[y++],d=g=u[y++];break;case si.L:if(e){if(Ir(p,d,u[y],u[y+1],t,i,r))return!0}else h+=Un(p,d,u[y],u[y+1],i,r)||0;p=u[y++],d=u[y++];break;case si.C:if(e){if(IS(p,d,u[y++],u[y++],u[y++],u[y++],u[y],u[y+1],t,i,r))return!0}else h+=kS(p,d,u[y++],u[y++],u[y++],u[y++],u[y],u[y+1],i,r)||0;p=u[y++],d=u[y++];break;case si.Q:if(e){if(AS(p,d,u[y++],u[y++],u[y],u[y+1],t,i,r))return!0}else h+=LS(p,d,u[y++],u[y++],u[y],u[y+1],i,r)||0;p=u[y++],d=u[y++];break;case si.A:var _=u[y++],x=u[y++],b=u[y++],w=u[y++],M=u[y++],S=u[y++];y+=1;var C=!!(1-u[y++]);o=Math.cos(M)*b+_,a=Math.sin(M)*w+x,m?(f=o,g=a):h+=Un(p,d,o,a,i,r);var I=(i-_)*w/b+_;if(e){if(DS(_,x,w,M,M+S,C,t,I,r))return!0}else h+=PS(_,x,w,M,M+S,C,I,r);p=Math.cos(M+S)*b+_,d=Math.sin(M+S)*w+x;break;case si.R:if(f=p=u[y++],g=d=u[y++],o=f+u[y++],a=g+u[y++],e){if(Ir(f,g,o,g,t,i,r)||Ir(o,g,o,a,t,i,r)||Ir(o,a,f,a,t,i,r)||Ir(f,a,f,g,t,i,r))return!0}else h+=Un(o,g,o,a,i,r),h+=Un(f,a,f,g,i,r);break;case si.Z:if(e){if(Ir(p,d,f,g,t,i,r))return!0}else h+=Un(p,d,f,g,i,r);p=f,d=g}}return e||(s=d,l=g,Math.abs(s-l)<1e-4)||(h+=Un(p,d,f,g,i,r)||0),h!==0}var Gg=ce({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},Vi),OS={style:ce({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},Ts.style)},Bc=Co.concat(["invisible","culling","z","z2","zlevel","parent"]),Ie=function(n){function t(i){return n.call(this,i)||this}var e;return F(t,n),t.prototype.update=function(){var i=this;n.prototype.update.call(this);var r=this.style;if(r.decal){var o=this._decalEl=this._decalEl||new t;o.buildPath===t.prototype.buildPath&&(o.buildPath=function(u){i.buildPath(u,i.shape)}),o.silent=!0;var a=o.style;for(var s in r)a[s]!==r[s]&&(a[s]=r[s]);a.fill=r.fill?r.decal:null,a.decal=null,a.shadowColor=null,r.strokeFirst&&(a.stroke=null);for(var l=0;l.5?oc:r>.2?"#eee":ac}if(i)return ac}return oc},t.prototype.getInsideTextStroke=function(i){var r=this.style.fill;if(Q(r)){var o=this.__zr;if(!(!o||!o.isDarkMode())==Mo(i,0)<.4)return r}},t.prototype.buildPath=function(i,r,o){},t.prototype.pathUpdated=function(){this.__dirty&=-5},t.prototype.getUpdatedPathProxy=function(i){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,i),this.path},t.prototype.createPathProxy=function(){this.path=new ai(!1)},t.prototype.hasStroke=function(){var i=this.style,r=i.stroke;return!(r==null||r==="none"||!(i.lineWidth>0))},t.prototype.hasFill=function(){var i=this.style.fill;return i!=null&&i!=="none"},t.prototype.getBoundingRect=function(){var i=this._rect,r=this.style,o=!i;if(o){var a=!1;this.path||(a=!0,this.createPathProxy());var s=this.path;(a||4&this.__dirty)&&(s.beginPath(),this.buildPath(s,this.shape,!1),this.pathUpdated()),i=s.getBoundingRect()}if(this._rect=i,this.hasStroke()&&this.path&&this.path.len()>0){var l=this._rectStroke||(this._rectStroke=i.clone());if(this.__dirty||o){l.copy(i);var u=r.strokeNoScale?this.getLineScale():1,c=r.lineWidth;if(!this.hasFill()){var h=this.strokeContainThreshold;c=Math.max(c,h??4)}u>1e-10&&(l.width+=c/u,l.height+=c/u,l.x-=c/u/2,l.y-=c/u/2)}return l}return i},t.prototype.contain=function(i,r){var o=this.transformCoordToLocal(i,r),a=this.getBoundingRect(),s=this.style;if(i=o[0],r=o[1],a.contain(i,r)){var l=this.path;if(this.hasStroke()){var u=s.lineWidth,c=s.strokeNoScale?this.getLineScale():1;if(c>1e-10&&(this.hasFill()||(u=Math.max(u,this.strokeContainThreshold)),function(h,p,d,f){return Fg(h,p,!0,d,f)}(l,u/c,i,r)))return!0}if(this.hasFill())return function(h,p,d){return Fg(h,0,!1,p,d)}(l,i,r)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=4,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},t.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},t.prototype.animateShape=function(i){return this.animate("shape",i)},t.prototype.updateDuringAnimation=function(i){i==="style"?this.dirtyStyle():i==="shape"?this.dirtyShape():this.markRedraw()},t.prototype.attrKV=function(i,r){i==="shape"?this.setShape(r):n.prototype.attrKV.call(this,i,r)},t.prototype.setShape=function(i,r){var o=this.shape;return o||(o=this.shape={}),typeof i=="string"?o[i]=r:H(o,i),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(4&this.__dirty)},t.prototype.createStyle=function(i){return go(Gg,i)},t.prototype._innerSaveToNormal=function(i){n.prototype._innerSaveToNormal.call(this,i);var r=this._normalState;i.shape&&!r.shape&&(r.shape=H({},this.shape))},t.prototype._applyStateObj=function(i,r,o,a,s,l){n.prototype._applyStateObj.call(this,i,r,o,a,s,l);var u,c=!(r&&a);if(r&&r.shape?s?a?u=r.shape:(u=H({},o.shape),H(u,r.shape)):(u=H({},a?this.shape:o.shape),H(u,r.shape)):c&&(u=o.shape),u)if(s){this.shape=H({},this.shape);for(var h={},p=Oe(u),d=0;d0},t.prototype.hasFill=function(){var e=this.style.fill;return e!=null&&e!=="none"},t.prototype.createStyle=function(e){return go(RS,e)},t.prototype.setBoundingRect=function(e){this._rect=e},t.prototype.getBoundingRect=function(){var e=this.style;if(!this._rect){var i=e.text;i!=null?i+="":i="";var r=Io(i,e.font,e.textAlign,e.textBaseline);if(r.x+=e.x||0,r.y+=e.y||0,this.hasStroke()){var o=e.lineWidth;r.x-=o/2,r.y-=o/2,r.width+=o,r.height+=o}this._rect=r}return this._rect},t.initDefaultProps=void(t.prototype.dirtyRectTolerance=10),t}(Fi);Fo.prototype.type="tspan";var NS=ce({x:0,y:0},Vi),ES={style:ce({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},Ts.style)},Tt=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return F(t,n),t.prototype.createStyle=function(e){return go(NS,e)},t.prototype._getSize=function(e){var i=this.style,r=i[e];if(r!=null)return r;var o,a=(o=i.image)&&typeof o!="string"&&o.width&&o.height?i.image:this.__image;if(!a)return 0;var s=e==="width"?"height":"width",l=i[s];return l==null?a[e]:a[e]/a[s]*l},t.prototype.getWidth=function(){return this._getSize("width")},t.prototype.getHeight=function(){return this._getSize("height")},t.prototype.getAnimationStyleProps=function(){return ES},t.prototype.getBoundingRect=function(){var e=this.style;return this._rect||(this._rect=new me(e.x||0,e.y||0,this.getWidth(),this.getHeight())),this._rect},t}(Fi);Tt.prototype.type="image";var Ar=Math.round;function Hg(n,t,e){if(t){var i=t.x1,r=t.x2,o=t.y1,a=t.y2;n.x1=i,n.x2=r,n.y1=o,n.y2=a;var s=e&&e.lineWidth;return s&&(Ar(2*i)===Ar(2*r)&&(n.x1=n.x2=Zi(i,s,!0)),Ar(2*o)===Ar(2*a)&&(n.y1=n.y2=Zi(o,s,!0))),n}}function Wg(n,t,e){if(t){var i=t.x,r=t.y,o=t.width,a=t.height;n.x=i,n.y=r,n.width=o,n.height=a;var s=e&&e.lineWidth;return s&&(n.x=Zi(i,s,!0),n.y=Zi(r,s,!0),n.width=Math.max(Zi(i+o,s,!1)-n.x,o===0?0:1),n.height=Math.max(Zi(r+a,s,!1)-n.y,a===0?0:1)),n}}function Zi(n,t,e){if(!t)return n;var i=Ar(2*n);return(i+Ar(t))%2==0?i/2:(i+(e?1:-1))/2}var zS=function(){this.x=0,this.y=0,this.width=0,this.height=0},BS={},ke=function(n){function t(e){return n.call(this,e)||this}return F(t,n),t.prototype.getDefaultShape=function(){return new zS},t.prototype.buildPath=function(e,i){var r,o,a,s;if(this.subPixelOptimize){var l=Wg(BS,i,this.style);r=l.x,o=l.y,a=l.width,s=l.height,l.r=i.r,i=l}else r=i.x,o=i.y,a=i.width,s=i.height;i.r?function(u,c){var h,p,d,f,g,y=c.x,v=c.y,m=c.width,_=c.height,x=c.r;m<0&&(y+=m,m=-m),_<0&&(v+=_,_=-_),typeof x=="number"?h=p=d=f=x:x instanceof Array?x.length===1?h=p=d=f=x[0]:x.length===2?(h=d=x[0],p=f=x[1]):x.length===3?(h=x[0],p=f=x[1],d=x[2]):(h=x[0],p=x[1],d=x[2],f=x[3]):h=p=d=f=0,h+p>m&&(h*=m/(g=h+p),p*=m/g),d+f>m&&(d*=m/(g=d+f),f*=m/g),p+d>_&&(p*=_/(g=p+d),d*=_/g),h+f>_&&(h*=_/(g=h+f),f*=_/g),u.moveTo(y+h,v),u.lineTo(y+m-p,v),p!==0&&u.arc(y+m-p,v+p,p,-Math.PI/2,0),u.lineTo(y+m,v+_-d),d!==0&&u.arc(y+m-d,v+_-d,d,0,Math.PI/2),u.lineTo(y+f,v+_),f!==0&&u.arc(y+f,v+_-f,f,Math.PI/2,Math.PI),u.lineTo(y,v+h),h!==0&&u.arc(y+h,v+h,h,Math.PI,1.5*Math.PI)}(e,i):e.rect(r,o,a,s)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t}(Ie);ke.prototype.type="rect";var Xg={fill:"#000"},VS={style:ce({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},Ts.style)},Me=function(n){function t(e){var i=n.call(this)||this;return i.type="text",i._children=[],i._defaultStyle=Xg,i.attr(e),i}return F(t,n),t.prototype.childrenRef=function(){return this._children},t.prototype.update=function(){n.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var e=0;eoe&&Z){var se=Math.floor(oe/V);N=N.slice(0,se)}if(P&&G&&W!=null)for(var ie=Lg(W,B,R.ellipsis,{minChar:R.truncateMinChar,placeholder:R.placeholder}),J=0;J0,T=e.width!=null&&(e.overflow==="truncate"||e.overflow==="break"||e.overflow==="breakAll"),A=o.calculatedLineHeight,k=0;kG&&Cc(P,L.substring(G,K),O,B),Cc(P,R[2],O,B,R[1]),G=Tc.lastIndex}GE){U>0?(J.tokens=J.tokens.slice(0,U),se(J,q,$),P.lines=P.lines.slice(0,ie+1)):P.lines=P.lines.slice(0,ie);break e}var Be=le.width,qe=Be==null||Be==="auto";if(typeof Be=="string"&&Be.charAt(Be.length-1)==="%")pe.percentWidth=Be,V.push(pe),pe.contentWidth=Rt(pe.text,Ce);else{if(qe){var dt=le.backgroundColor,Ne=dt&&dt.image;Ne&&Ms(Ne=vS(Ne))&&(pe.width=Math.max(pe.width,Ne.width*Pe/Ne.height))}var Ge=te&&N!=null?N-q:null;Ge!=null&&Ge=0&&(k=b[A]).align==="right";)this._placeToken(k,e,M,y,T,"right",m),S-=k.width,T-=k.width,A--;for(I+=(r-(I-g)-(v-T)-S)/2;C<=A;)k=b[C],this._placeToken(k,e,M,y,I+k.width/2,"center",m),I+=k.width,C++;y+=M}},t.prototype._placeToken=function(e,i,r,o,a,s,l){var u=i.rich[e.styleName]||{};u.text=e.text;var c=e.verticalAlign,h=o+r/2;c==="top"?h=o+e.height/2:c==="bottom"&&(h=o+r-e.height/2),!e.isLineHolder&&Vc(u)&&this._renderBackground(u,i,s==="right"?a-e.width:s==="center"?a-e.width/2:a,h-e.height/2,e.width,e.height);var p=!!u.backgroundColor,d=e.textPadding;d&&(a=Kg(a,s,d),h-=e.height/2-d[0]-e.innerHeight/2);var f=this._getOrCreateChild(Fo),g=f.createStyle();f.useStyle(g);var y=this._defaultStyle,v=!1,m=0,_=jg("fill"in u?u.fill:"fill"in i?i.fill:(v=!0,y.fill)),x=qg("stroke"in u?u.stroke:"stroke"in i?i.stroke:p||l||y.autoStroke&&!v?null:(m=2,y.stroke)),b=u.textShadowBlur>0||i.textShadowBlur>0;g.text=e.text,g.x=a,g.y=h,b&&(g.shadowBlur=u.textShadowBlur||i.textShadowBlur||0,g.shadowColor=u.textShadowColor||i.textShadowColor||"transparent",g.shadowOffsetX=u.textShadowOffsetX||i.textShadowOffsetX||0,g.shadowOffsetY=u.textShadowOffsetY||i.textShadowOffsetY||0),g.textAlign=s,g.textBaseline="middle",g.font=e.font||bi,g.opacity=vr(u.opacity,i.opacity,1),Yg(g,u),x&&(g.lineWidth=vr(u.lineWidth,i.lineWidth,m),g.lineDash=xe(u.lineDash,i.lineDash),g.lineDashOffset=i.lineDashOffset||0,g.stroke=x),_&&(g.fill=_);var w=e.contentWidth,M=e.contentHeight;f.setBoundingRect(new me(Ao(g.x,w,g.textAlign),Mr(g.y,M,g.textBaseline),w,M))},t.prototype._renderBackground=function(e,i,r,o,a,s){var l,u,c,h=e.backgroundColor,p=e.borderWidth,d=e.borderColor,f=h&&h.image,g=h&&!f,y=e.borderRadius,v=this;if(g||e.lineHeight||p&&d){(l=this._getOrCreateChild(ke)).useStyle(l.createStyle()),l.style.fill=null;var m=l.shape;m.x=r,m.y=o,m.width=a,m.height=s,m.r=y,l.dirtyShape()}if(g)(c=l.style).fill=h||null,c.fillOpacity=xe(e.fillOpacity,1);else if(f){(u=this._getOrCreateChild(Tt)).onload=function(){v.dirtyStyle()};var _=u.style;_.image=h.image,_.x=r,_.y=o,_.width=a,_.height=s}p&&d&&((c=l.style).lineWidth=p,c.stroke=d,c.strokeOpacity=xe(e.strokeOpacity,1),c.lineDash=e.borderDash,c.lineDashOffset=e.borderDashOffset||0,l.strokeContainThreshold=0,l.hasFill()&&l.hasStroke()&&(c.strokeFirst=!0,c.lineWidth*=2));var x=(l||u).style;x.shadowBlur=e.shadowBlur||0,x.shadowColor=e.shadowColor||"transparent",x.shadowOffsetX=e.shadowOffsetX||0,x.shadowOffsetY=e.shadowOffsetY||0,x.opacity=vr(e.opacity,i.opacity,1)},t.makeFont=function(e){var i,r="";return function(o){return o.fontSize!=null||o.fontFamily||o.fontWeight}(e)&&(r=[e.fontStyle,e.fontWeight,(i=e.fontSize,typeof i!="string"||i.indexOf("px")===-1&&i.indexOf("rem")===-1&&i.indexOf("em")===-1?isNaN(+i)?"12px":i+"px":i),e.fontFamily||"sans-serif"].join(" ")),r&&zt(r)||e.textFont||e.font},t}(Fi),FS={left:!0,right:1,center:1},GS={top:1,bottom:1,middle:1},Ug=["fontStyle","fontWeight","fontSize","fontFamily"];function Yg(n,t){for(var e=0;e=0,l=!1;if(i instanceof Ie){var u=ey(i),c=s&&u.selectFill||u.normalFill,h=s&&u.selectStroke||u.normalStroke;if(Dr(c)||Dr(h)){var p=(a=a||{}).style||{};p.fill==="inherit"?(l=!0,a=H({},a),(p=H({},p)).fill=c):!Dr(p.fill)&&Dr(c)?(l=!0,a=H({},a),(p=H({},p)).fill=ju(c)):!Dr(p.stroke)&&Dr(h)&&(l||(a=H({},a),p=H({},p)),p.stroke=ju(h)),a.style=p}}if(a&&a.z2==null){l||(a=H({},a));var d=i.z2EmphasisLift;a.z2=i.z2+(d??10)}return a}(this,0,t,e);if(n==="blur")return function(i,r,o){var a=we(i.currentStates,r)>=0,s=i.style.opacity,l=a?null:function(c,h,p,d){for(var f=c.style,g={},y=0;y0){var a={dataIndex:o,seriesIndex:e.seriesIndex};r!=null&&(a.dataType=r),t.push(a)}})}),t}function Wo(n,t,e){jc(n,!0),Yn(n,Uc),function(i,r,o){var a=ye(i);r!=null?(a.focus=r,a.blurScope=o):a.focus&&(a.focus=null)}(n,t,e)}function ln(n,t,e,i){i?function(r){jc(r,!1)}(n):Wo(n,t,e)}var dy=["emphasis","blur","select"],US={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function Zn(n,t,e,i){e=e||"itemStyle";for(var r=0;r1&&(a*=$c(f),s*=$c(f));var g=(r===o?-1:1)*$c((a*a*(s*s)-a*a*(d*d)-s*s*(p*p))/(a*a*(d*d)+s*s*(p*p)))||0,y=g*a*d/s,v=g*-s*p/a,m=(n+e)/2+Rs(h)*y-Os(h)*v,_=(t+i)/2+Os(h)*y+Rs(h)*v,x=vy([1,0],[(p-y)/a,(d-v)/s]),b=[(p-y)/a,(d-v)/s],w=[(-1*p-y)/a,(-1*d-v)/s],M=vy(b,w);if(Qc(b,w)<=-1&&(M=Xo),Qc(b,w)>=1&&(M=0),M<0){var S=Math.round(M/Xo*1e6)/1e6;M=2*Xo+S%2*Xo}c.addData(u,m,_,a,s,x,M,h,o)}var qS=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,jS=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g,_y=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return F(t,n),t.prototype.applyTransform=function(e){},t}(Ie);function xy(n){return n.setData!=null}function by(n,t){var e=function(r){var o=new ai;if(!r)return o;var a,s=0,l=0,u=s,c=l,h=ai.CMD,p=r.match(qS);if(!p)return o;for(var d=0;dL*L+O*O&&(S=I,C=T),{cx:S,cy:C,x0:-c,y0:-h,x1:S*(r/b-1),y1:C*(r/b-1)}}var QS=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0,this.cornerRadius=0},Nt=function(n){function t(e){return n.call(this,e)||this}return F(t,n),t.prototype.getDefaultShape=function(){return new QS},t.prototype.buildPath=function(e,i){(function(r,o){var a,s=Zo(o.r,0),l=Zo(o.r0||0,0),u=s>0;if(u||l>0){if(u||(s=l,l=0),l>s){var c=s;s=l,l=c}var h=o.startAngle,p=o.endAngle;if(!isNaN(h)&&!isNaN(p)){var d=o.cx,f=o.cy,g=!!o.clockwise,y=My(p-h),v=y>eh&&y%eh;if(v>un&&(y=v),s>un)if(y>eh-un)r.moveTo(d+s*Or(h),f+s*ji(h)),r.arc(d,f,s,h,p,!g),l>un&&(r.moveTo(d+l*Or(p),f+l*ji(p)),r.arc(d,f,l,p,h,g));else{var m=void 0,_=void 0,x=void 0,b=void 0,w=void 0,M=void 0,S=void 0,C=void 0,I=void 0,T=void 0,A=void 0,k=void 0,L=void 0,O=void 0,P=void 0,R=void 0,N=s*Or(h),E=s*ji(h),z=l*Or(p),B=l*ji(p),G=y>un;if(G){var K=o.cornerRadius;K&&(a=function(le){var ve;if(Y(le)){var Te=le.length;if(!Te)return le;ve=Te===1?[le[0],le[0],0,0]:Te===2?[le[0],le[0],le[1],le[1]]:Te===3?le.concat(le[2]):le}else ve=[le,le,le,le];return ve}(K),m=a[0],_=a[1],x=a[2],b=a[3]);var V=My(s-l)/2;if(w=An(V,x),M=An(V,b),S=An(V,m),C=An(V,_),A=I=Zo(w,M),k=T=Zo(S,C),(I>un||T>un)&&(L=s*Or(p),O=s*ji(p),P=l*Or(h),R=l*ji(h),yun){var J=An(x,A),$=An(b,A),q=Ns(P,R,N,E,s,J,g),U=Ns(L,O,z,B,s,$,g);r.moveTo(d+q.cx+q.x0,f+q.cy+q.y0),A0&&r.arc(d+q.cx,f+q.cy,J,lt(q.y0,q.x0),lt(q.y1,q.x1),!g),r.arc(d,f,s,lt(q.cy+q.y1,q.cx+q.x1),lt(U.cy+U.y1,U.cx+U.x1),!g),$>0&&r.arc(d+U.cx,f+U.cy,$,lt(U.y1,U.x1),lt(U.y0,U.x0),!g))}else r.moveTo(d+N,f+E),r.arc(d,f,s,h,p,!g);else r.moveTo(d+N,f+E);l>un&&G?k>un?(J=An(m,k),q=Ns(z,B,L,O,l,-($=An(_,k)),g),U=Ns(N,E,P,R,l,-J,g),r.lineTo(d+q.cx+q.x0,f+q.cy+q.y0),k0&&r.arc(d+q.cx,f+q.cy,$,lt(q.y0,q.x0),lt(q.y1,q.x1),!g),r.arc(d,f,l,lt(q.cy+q.y1,q.cx+q.x1),lt(U.cy+U.y1,U.cx+U.x1),g),J>0&&r.arc(d+U.cx,f+U.cy,J,lt(U.y1,U.x1),lt(U.y0,U.x0),!g))):(r.lineTo(d+z,f+B),r.arc(d,f,l,p,h,g)):r.lineTo(d+z,f+B)}else r.moveTo(d,f);r.closePath()}}})(e,i)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t}(Ie);Nt.prototype.type="sector";var eM=function(){this.cx=0,this.cy=0,this.r=0,this.r0=0},Rr=function(n){function t(e){return n.call(this,e)||this}return F(t,n),t.prototype.getDefaultShape=function(){return new eM},t.prototype.buildPath=function(e,i){var r=i.cx,o=i.cy,a=2*Math.PI;e.moveTo(r+i.r,o),e.arc(r,o,i.r,0,a,!1),e.moveTo(r+i.r0,o),e.arc(r,o,i.r0,0,a,!0)},t}(Ie);function Ty(n,t,e){var i=t.smooth,r=t.points;if(r&&r.length>=2){if(i){var o=function(p,d,f,g){var y,v,m,_,x=[],b=[],w=[],M=[];if(g){m=[1/0,1/0],_=[-1/0,-1/0];for(var S=0,C=p.length;SJi[1]){if(s=!1,o)return s;var c=Math.abs(Ji[0]-Ki[1]),h=Math.abs(Ki[0]-Ji[1]);Math.min(c,h)>r.len()&&(c0){var h={duration:c.duration,delay:c.delay||0,easing:c.easing,done:o,force:!!o||!!a,setToFinal:!u,scope:n,during:a};l?t.animateFrom(e,h):t.animateTo(e,h)}else t.stopAnimation(),!l&&t.attr(e),a&&a(1),o&&o()}function ze(n,t,e,i,r,o){ih("update",n,t,e,i,r,o)}function Ye(n,t,e,i,r,o){ih("enter",n,t,e,i,r,o)}function Nr(n){if(!n.__zr)return!0;for(var t=0;tMath.abs(o[1])?o[0]>0?"right":"left":o[1]>0?"bottom":"top"}function Ry(n){return!n.isGroup}function Ws(n,t,e){if(n&&t){var i,r=(i={},n.traverse(function(a){Ry(a)&&a.anid&&(i[a.anid]=a)}),i);t.traverse(function(a){if(Ry(a)&&a.anid){var s=r[a.anid];if(s){var l=o(a);a.attr(o(s)),ze(a,l,e,ye(a).dataIndex)}}})}function o(a){var s={x:a.x,y:a.y,rotation:a.rotation};return function(l){return l.shape!=null}(a)&&(s.shape=H({},a.shape)),s}}function lh(n,t){return j(n,function(e){var i=e[0];i=Fs(i,t.x),i=Gs(i,t.x+t.width);var r=e[1];return r=Fs(r,t.y),[i,r=Gs(r,t.y+t.height)]})}function Ny(n,t){var e=Fs(n.x,t.x),i=Gs(n.x+n.width,t.x+t.width),r=Fs(n.y,t.y),o=Gs(n.y+n.height,t.y+t.height);if(i>=e&&o>=r)return{x:e,y:r,width:i-e,height:o-r}}function Qo(n,t,e){var i=H({rectHover:!0},t),r=i.style={strokeNoScale:!0};if(e=e||{x:-1,y:-1,width:2,height:2},n)return n.indexOf("image://")===0?(r.image=n.slice(8),ce(r,e),new Tt(i)):Hs(n.replace("path://",""),i,e,"center")}function Ey(n,t,e,i,r,o,a,s){var l,u=e-n,c=i-t,h=a-r,p=s-o,d=uh(h,p,u,c);if((l=d)<=1e-6&&l>=-1e-6)return!1;var f=n-r,g=t-o,y=uh(f,g,u,c)/d;if(y<0||y>1)return!1;var v=uh(f,g,h,p)/d;return!(v<0||v>1)}function uh(n,t,e,i){return n*i-e*t}function ea(n){var t=n.itemTooltipOption,e=n.componentModel,i=n.itemName,r=Q(t)?{formatter:t}:t,o=e.mainType,a=e.componentIndex,s={componentType:o,name:i,$vars:["name"]};s[o+"Index"]=a;var l=n.formatterParamsExtra;l&&D(Oe(l),function(c){Bt(s,c)||(s[c]=l[c],s.$vars.push(c))});var u=ye(n.el);u.componentMainType=o,u.componentIndex=a,u.tooltipConfig={name:i,option:ce({content:i,encodeHTMLContent:!0,formatterParams:s},r)}}function zy(n,t){var e;n.isGroup&&(e=t(n)),e||n.traverse(t)}function Xs(n,t){if(n)if(Y(n))for(var e=0;e-1?Ys:na;function vh(n,t){n=n.toUpperCase(),yh[n]=new Le(t),Zs[n]=t}vh(gh,{time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst",custom:"Custom chart",chart:"Chart"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}}),vh(Ys,{time:{month:["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708"],monthAbbr:["1\u6708","2\u6708","3\u6708","4\u6708","5\u6708","6\u6708","7\u6708","8\u6708","9\u6708","10\u6708","11\u6708","12\u6708"],dayOfWeek:["\u661F\u671F\u65E5","\u661F\u671F\u4E00","\u661F\u671F\u4E8C","\u661F\u671F\u4E09","\u661F\u671F\u56DB","\u661F\u671F\u4E94","\u661F\u671F\u516D"],dayOfWeekAbbr:["\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"]},legend:{selector:{all:"\u5168\u9009",inverse:"\u53CD\u9009"}},toolbox:{brush:{title:{rect:"\u77E9\u5F62\u9009\u62E9",polygon:"\u5708\u9009",lineX:"\u6A2A\u5411\u9009\u62E9",lineY:"\u7EB5\u5411\u9009\u62E9",keep:"\u4FDD\u6301\u9009\u62E9",clear:"\u6E05\u9664\u9009\u62E9"}},dataView:{title:"\u6570\u636E\u89C6\u56FE",lang:["\u6570\u636E\u89C6\u56FE","\u5173\u95ED","\u5237\u65B0"]},dataZoom:{title:{zoom:"\u533A\u57DF\u7F29\u653E",back:"\u533A\u57DF\u7F29\u653E\u8FD8\u539F"}},magicType:{title:{line:"\u5207\u6362\u4E3A\u6298\u7EBF\u56FE",bar:"\u5207\u6362\u4E3A\u67F1\u72B6\u56FE",stack:"\u5207\u6362\u4E3A\u5806\u53E0",tiled:"\u5207\u6362\u4E3A\u5E73\u94FA"}},restore:{title:"\u8FD8\u539F"},saveAsImage:{title:"\u4FDD\u5B58\u4E3A\u56FE\u7247",lang:["\u53F3\u952E\u53E6\u5B58\u4E3A\u56FE\u7247"]}},series:{typeNames:{pie:"\u997C\u56FE",bar:"\u67F1\u72B6\u56FE",line:"\u6298\u7EBF\u56FE",scatter:"\u6563\u70B9\u56FE",effectScatter:"\u6D9F\u6F2A\u6563\u70B9\u56FE",radar:"\u96F7\u8FBE\u56FE",tree:"\u6811\u56FE",treemap:"\u77E9\u5F62\u6811\u56FE",boxplot:"\u7BB1\u578B\u56FE",candlestick:"K\u7EBF\u56FE",k:"K\u7EBF\u56FE",heatmap:"\u70ED\u529B\u56FE",map:"\u5730\u56FE",parallel:"\u5E73\u884C\u5750\u6807\u56FE",lines:"\u7EBF\u56FE",graph:"\u5173\u7CFB\u56FE",sankey:"\u6851\u57FA\u56FE",funnel:"\u6F0F\u6597\u56FE",gauge:"\u4EEA\u8868\u76D8\u56FE",pictorialBar:"\u8C61\u5F62\u67F1\u56FE",themeRiver:"\u4E3B\u9898\u6CB3\u6D41\u56FE",sunburst:"\u65ED\u65E5\u56FE",custom:"\u81EA\u5B9A\u4E49\u56FE\u8868",chart:"\u56FE\u8868"}},aria:{general:{withTitle:"\u8FD9\u662F\u4E00\u4E2A\u5173\u4E8E\u201C{title}\u201D\u7684\u56FE\u8868\u3002",withoutTitle:"\u8FD9\u662F\u4E00\u4E2A\u56FE\u8868\uFF0C"},series:{single:{prefix:"",withName:"\u56FE\u8868\u7C7B\u578B\u662F{seriesType}\uFF0C\u8868\u793A{seriesName}\u3002",withoutName:"\u56FE\u8868\u7C7B\u578B\u662F{seriesType}\u3002"},multiple:{prefix:"\u5B83\u7531{seriesCount}\u4E2A\u56FE\u8868\u7CFB\u5217\u7EC4\u6210\u3002",withName:"\u7B2C{seriesId}\u4E2A\u7CFB\u5217\u662F\u4E00\u4E2A\u8868\u793A{seriesName}\u7684{seriesType}\uFF0C",withoutName:"\u7B2C{seriesId}\u4E2A\u7CFB\u5217\u662F\u4E00\u4E2A{seriesType}\uFF0C",separator:{middle:"\uFF1B",end:"\u3002"}}},data:{allData:"\u5176\u6570\u636E\u662F\u2014\u2014",partialData:"\u5176\u4E2D\uFF0C\u524D{displayCnt}\u9879\u662F\u2014\u2014",withName:"{name}\u7684\u6570\u636E\u662F{value}",withoutName:"{value}",separator:{middle:"\uFF0C",end:""}}}});var Ky=36e5,ia=864e5,Jy=31536e6,ra={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}",none:"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}"},qs="{yyyy}-{MM}-{dd}",$y={year:"{yyyy}",month:"{yyyy}-{MM}",day:qs,hour:qs+" "+ra.hour,minute:qs+" "+ra.minute,second:qs+" "+ra.second,millisecond:ra.none},mh=["year","month","day","hour","minute","second","millisecond"],Qy=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function vt(n,t){return"0000".substr(0,t-(n+="").length)+n}function Fr(n){switch(n){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return n}}function oa(n,t,e,i){var r=Wt(n),o=r[_h(e)](),a=r[Gr(e)]()+1,s=Math.floor((a-1)/3)+1,l=r[js(e)](),u=r["get"+(e?"UTC":"")+"Day"](),c=r[aa(e)](),h=(c-1)%12+1,p=r[Ks(e)](),d=r[Js(e)](),f=r[$s(e)](),g=c>=12?"pm":"am",y=g.toUpperCase(),v=i instanceof Le?i:function(M){return yh[M]}(i||jy)||yh[na],m=v.getModel("time"),_=m.get("month"),x=m.get("monthAbbr"),b=m.get("dayOfWeek"),w=m.get("dayOfWeekAbbr");return(t||"").replace(/{a}/g,g+"").replace(/{A}/g,y+"").replace(/{yyyy}/g,o+"").replace(/{yy}/g,vt(o%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,_[a-1]).replace(/{MMM}/g,x[a-1]).replace(/{MM}/g,vt(a,2)).replace(/{M}/g,a+"").replace(/{dd}/g,vt(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,b[u]).replace(/{ee}/g,w[u]).replace(/{e}/g,u+"").replace(/{HH}/g,vt(c,2)).replace(/{H}/g,c+"").replace(/{hh}/g,vt(h+"",2)).replace(/{h}/g,h+"").replace(/{mm}/g,vt(p,2)).replace(/{m}/g,p+"").replace(/{ss}/g,vt(d,2)).replace(/{s}/g,d+"").replace(/{SSS}/g,vt(f,3)).replace(/{S}/g,f+"")}function ev(n,t){var e=Wt(n),i=e[Gr(t)]()+1,r=e[js(t)](),o=e[aa(t)](),a=e[Ks(t)](),s=e[Js(t)](),l=e[$s(t)]()===0,u=l&&s===0,c=u&&a===0,h=c&&o===0,p=h&&r===1;return p&&i===1?"year":p?"month":h?"day":c?"hour":u?"minute":l?"second":"millisecond"}function tv(n,t,e){var i=Ae(n)?Wt(n):n;switch(t=t||ev(n,e)){case"year":return i[_h(e)]();case"half-year":return i[Gr(e)]()>=6?1:0;case"quarter":return Math.floor((i[Gr(e)]()+1)/4);case"month":return i[Gr(e)]();case"day":return i[js(e)]();case"half-day":return i[aa(e)]()/24;case"hour":return i[aa(e)]();case"minute":return i[Ks(e)]();case"second":return i[Js(e)]();case"millisecond":return i[$s(e)]()}}function _h(n){return n?"getUTCFullYear":"getFullYear"}function Gr(n){return n?"getUTCMonth":"getMonth"}function js(n){return n?"getUTCDate":"getDate"}function aa(n){return n?"getUTCHours":"getHours"}function Ks(n){return n?"getUTCMinutes":"getMinutes"}function Js(n){return n?"getUTCSeconds":"getSeconds"}function $s(n){return n?"getUTCMilliseconds":"getMilliseconds"}function vM(n){return n?"setUTCFullYear":"setFullYear"}function nv(n){return n?"setUTCMonth":"setMonth"}function iv(n){return n?"setUTCDate":"setDate"}function rv(n){return n?"setUTCHours":"setHours"}function ov(n){return n?"setUTCMinutes":"setMinutes"}function av(n){return n?"setUTCSeconds":"setSeconds"}function sv(n){return n?"setUTCMilliseconds":"setMilliseconds"}function xh(n){if(!xc(n))return Q(n)?n:"-";var t=(n+"").split(".");return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function bh(n,t){return n=(n||"").toLowerCase().replace(/-(.)/g,function(e,i){return i.toUpperCase()}),t&&n&&(n=n.charAt(0).toUpperCase()+n.slice(1)),n}var Hr=Tu;function wh(n,t,e){function i(u){return u&&zt(u)?u:"-"}function r(u){return!(u==null||isNaN(u)||!isFinite(u))}var o=t==="time",a=n instanceof Date;if(o||a){var s=o?Wt(n):n;if(!isNaN(+s))return oa(s,"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}",e);if(a)return"-"}if(t==="ordinal")return ja(n)?i(n):Ae(n)&&r(n)?n+"":"-";var l=Lo(n);return r(l)?xh(l):ja(n)?i(n):typeof n=="boolean"?n+"":"-"}var lv=["a","b","c","d","e","f","g"],Sh=function(n,t){return"{"+n+(t??"")+"}"};function Mh(n,t,e){Y(t)||(t=[t]);var i=t.length;if(!i)return"";for(var r=t[0].$vars||[],o=0;o':'':{renderMode:o,content:"{"+(e.markerId||"markerX")+"|} ",style:r==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:i}:{width:10,height:10,borderRadius:5,backgroundColor:i}}:""}function cv(n){return n&&n.charAt(0).toUpperCase()+n.substr(1)}function Qi(n,t){return t=t||"transparent",Q(n)?n:ne(n)&&n.colorStops&&(n.colorStops[0]||{}).color||t}function hv(n,t){if(t==="_blank"||t==="blank"){var e=window.open();e.opener=null,e.location.href=n}else window.open(n,t)}var Qs=D,mM=["left","right","top","bottom","width","height"],el=[["width","left","right"],["height","top","bottom"]];function Th(n,t,e,i,r){var o=0,a=0;i==null&&(i=1/0),r==null&&(r=1/0);var s=0;t.eachChild(function(l,u){var c,h,p=l.getBoundingRect(),d=t.childAt(u+1),f=d&&d.getBoundingRect();if(n==="horizontal"){var g=p.width+(f?-f.x+p.x:0);(c=o+g)>i||l.newline?(o=0,c=g,a+=s+e,s=p.height):s=Math.max(s,p.height)}else{var y=p.height+(f?-f.y+p.y:0);(h=a+y)>r||l.newline?(o+=s+e,a=0,h=y,s=p.width):s=Math.max(s,p.width)}l.newline||(l.x=o,l.y=a,l.markRedraw(),n==="horizontal"?o=c+e:a=h+e)})}var er=Th;function It(n,t,e){e=Hr(e||0);var i=t.width,r=t.height,o=ee(n.left,i),a=ee(n.top,r),s=ee(n.right,i),l=ee(n.bottom,r),u=ee(n.width,i),c=ee(n.height,r),h=e[2]+e[0],p=e[1]+e[3],d=n.aspect;switch(isNaN(u)&&(u=i-s-p-o),isNaN(c)&&(c=r-l-h-a),d!=null&&(isNaN(u)&&isNaN(c)&&(d>i/r?u=.8*i:c=.8*r),isNaN(u)&&(u=d*c),isNaN(c)&&(c=u/d)),isNaN(o)&&(o=i-s-u-p),isNaN(a)&&(a=r-l-c-h),n.left||n.right){case"center":o=i/2-u/2-e[3];break;case"right":o=i-u-p}switch(n.top||n.bottom){case"middle":case"center":a=r/2-c/2-e[0];break;case"bottom":a=r-c-h}o=o||0,a=a||0,isNaN(u)&&(u=i-p-o-(s||0)),isNaN(c)&&(c=r-h-a-(l||0));var f=new me(o+e[3],a+e[0],u,c);return f.margin=e,f}function pv(n,t,e,i,r,o){var a;if((o=o||n).x=n.x,o.y=n.y,a=n.getBoundingRect(),n.needLocalTransform()){var s=n.getLocalTransform();(a=a.clone()).applyTransform(s)}var l=It(ce({width:a.width,height:a.height},t),e,i),u=l.x-a.x,c=l.y-a.y;return o.x+=u,o.y+=c,o===n&&n.markRedraw(),!0}function sa(n){var t=n.layoutMode||n.constructor.layoutMode;return ne(t)?t:t?{type:t}:null}function Wr(n,t,e){var i=e&&e.ignoreSize;!Y(i)&&(i=[i,i]);var r=a(el[0],0),o=a(el[1],1);function a(c,h){var p={},d=0,f={},g=0;if(Qs(c,function(m){f[m]=n[m]}),Qs(c,function(m){s(t,m)&&(p[m]=f[m]=t[m]),l(p,m)&&d++,l(f,m)&&g++}),i[h])return l(t,c[1])?f[c[2]]=null:l(t,c[2])&&(f[c[1]]=null),f;if(g!==2&&d){if(d>=2)return p;for(var y=0;y=0;l--)s=de(s,r[l],!0);i.defaultOption=s}return i.defaultOption},t.prototype.getReferringComponents=function(e,i){var r=e+"Index",o=e+"Id";return zo(this.ecModel,e,{index:this.get(r,!0),id:this.get(o,!0)},i)},t.prototype.getBoxLayoutParams=function(){var e=this;return{left:e.get("left"),top:e.get("top"),right:e.get("right"),bottom:e.get("bottom"),width:e.get("width"),height:e.get("height")}},t.prototype.getZLevelKey=function(){return""},t.prototype.setZLevel=function(e){this.option.zlevel=e},t.protoInitialize=function(){var e=t.prototype;e.type="component",e.id="",e.name="",e.mainType="",e.subType="",e.componentIndex=0}(),t}(Le);Ig(be,Le),Ss(be),function(n){var t={};n.registerSubTypeDefaulter=function(e,i){var r=Sn(e);t[r.main]=i},n.determineSubType=function(e,i){var r=i.type;if(!r){var o=Sn(e).main;n.hasSubTypes(e)&&t[o]&&(r=t[o](i))}return r}}(be),function(){function n(t,e){return t[e]||(t[e]={predecessor:[],successor:[]}),t[e]}be.topologicalTravel=function(t,e,i,r){if(t.length){var o=function(f){var g={},y=[];return D(f,function(v){var m,_,x=n(g,v),b=function(w,M){var S=[];return D(w,function(C){we(M,C)>=0&&S.push(C)}),S}(x.originalDeps=(m=v,_=[],D(be.getClassesByMainType(m),function(w){_=_.concat(w.dependencies||w.prototype.dependencies||[])}),_=j(_,function(w){return Sn(w).main}),m!=="dataset"&&we(_,"dataset")<=0&&_.unshift("dataset"),_),f);x.entryCount=b.length,x.entryCount===0&&y.push(v),D(b,function(w){we(x.predecessor,w)<0&&x.predecessor.push(w);var M=n(g,w);we(M.successor,w)<0&&M.successor.push(v)})}),{graph:g,noEntryList:y}}(e),a=o.graph,s=o.noEntryList,l={};for(D(t,function(f){l[f]=!0});s.length;){var u=s.pop(),c=a[u],h=!!l[u];h&&(i.call(r,u,c.originalDeps.slice()),delete l[u]),D(c.successor,h?d:p)}D(l,function(){throw new Error("")})}function p(f){a[f].entryCount--,a[f].entryCount===0&&s.push(f)}function d(f){l[f]=!0,p(f)}}}();var dv="";typeof navigator<"u"&&(dv=navigator.platform||"");var Xr="rgba(0, 0, 0, 0.2)";const xM={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:Xr,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:Xr,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:Xr,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:Xr,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:Xr,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:Xr,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:dv.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1};var fv=re(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),Jt="original",At="arrayRows",hn="objectRows",Ln="keyedColumns",ui="typedArray",gv="unknown",Pn="column",Ur="row",yv=Ee();function bM(n,t,e){var i={},r=Ih(t);if(!r||!n)return i;var o,a,s=[],l=[],u=t.ecModel,c=yv(u).datasetMap,h=r.uid+"_"+e.seriesLayoutBy;D(n=n.slice(),function(g,y){var v=ne(g)?g:n[y]={name:g};v.type==="ordinal"&&o==null&&(o=y,a=f(v)),i[v.name]=[]});var p=c.get(h)||c.set(h,{categoryWayDim:a,valueWayDim:0});function d(g,y,v){for(var m=0;md)return p[g];return p[f-1]}(i,a):e;if((c=c||e)&&c.length){var h=c[l];return r&&(u[r]=h),s.paletteIdx=(l+1)%c.length,h}}var Sv="\0_ec_inner",kh=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return F(t,n),t.prototype.init=function(e,i,r,o,a,s){o=o||{},this.option=null,this._theme=new Le(o),this._locale=new Le(a),this._optionManager=s},t.prototype.setOption=function(e,i,r){var o=Cv(i);this._optionManager.setOption(e,r,o),this._resetOption(null,o)},t.prototype.resetOption=function(e,i){return this._resetOption(e,Cv(i))},t.prototype._resetOption=function(e,i){var r=!1,o=this._optionManager;if(!e||e==="recreate"){var a=o.mountOption(e==="recreate");this.option&&e!=="recreate"?(this.restoreData(),this._mergeOption(a,i)):_v(this,a),r=!0}if(e!=="timeline"&&e!=="media"||this.restoreData(),!e||e==="recreate"||e==="timeline"){var s=o.getTimelineOption(this);s&&(r=!0,this._mergeOption(s,i))}if(!e||e==="recreate"||e==="media"){var l=o.getMediaOption(this);l.length&&D(l,function(u){r=!0,this._mergeOption(u,i)},this)}return r},t.prototype.mergeOption=function(e){this._mergeOption(e,null)},t.prototype._mergeOption=function(e,i){var r=this.option,o=this._componentsMap,a=this._componentsCount,s=[],l=re(),u=i&&i.replaceMergeMainTypeMap;yv(this).datasetMap=re(),D(e,function(c,h){c!=null&&(be.hasClass(h)?h&&(s.push(h),l.set(h,!0)):r[h]=r[h]==null?ae(c):de(r[h],c,!0))}),u&&u.each(function(c,h){be.hasClass(h)&&!l.get(h)&&(s.push(h),l.set(h,!0))}),be.topologicalTravel(s,be.getAllClassMainTypes(),function(c){var h=function(m,_,x){var b=Ah.get(_);if(!b)return x;var w=b(m);return w?x.concat(w):x}(this,c,Ke(e[c])),p=o.get(c),d=function(m,_,x){var b=x==="normalMerge",w=x==="replaceMerge",M=x==="replaceAll";m=m||[],_=(_||[]).slice();var S=re();D(_,function(A,k){ne(A)||(_[k]=null)});var C,I,T=function(A,k,L){var O=[];if(L==="replaceAll")return O;for(var P=0;P=0;l--)o[l]&&!No(o[l])?s=!0:(o[l]=null,!s&&a--);o.length=a,e[r]=o}}),delete e[Sv],e},t.prototype.getTheme=function(){return this._theme},t.prototype.getLocaleModel=function(){return this._locale},t.prototype.setUpdatePayload=function(e){this._payload=e},t.prototype.getUpdatePayload=function(){return this._payload},t.prototype.getComponent=function(e,i){var r=this._componentsMap.get(e);if(r){var o=r[i||0];if(o)return o;if(i==null){for(var a=0;a=h:p==="max"?c<=h:c===h})(i[u],o,l)||(r=!1)}}),r}var pn=D,ua=ne,Av=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function Ph(n){var t=n&&n.itemStyle;if(t)for(var e=0,i=Av.length;e=0;y--){var v=n[y];if(s||(d=v.data.rawIndexOf(v.stackedByDimension,p)),d>=0){var m=v.data.getByRawIndex(v.stackResultDimension,d);if(l==="all"||l==="positive"&&m>0||l==="negative"&&m<0||l==="samesign"&&f>=0&&m>0||l==="samesign"&&f<=0&&m<0){f=sS(f,m),g=m;break}}}return i[0]=f,i[1]=g,i})})}var Yr,Zr,qr,Nv,Ev,rl=function(){return function(n){this.data=n.data||(n.sourceFormat===Ln?{}:[]),this.sourceFormat=n.sourceFormat||gv,this.seriesLayoutBy=n.seriesLayoutBy||Pn,this.startIndex=n.startIndex||0,this.dimensionsDetectedCount=n.dimensionsDetectedCount,this.metaRawOption=n.metaRawOption;var t=this.dimensionsDefine=n.dimensionsDefine;if(t)for(var e=0;eg&&(g=_)}d[0]=f,d[1]=g}},r=function(){return this._data?this._data.length/this._dimSize:0};function o(a){for(var s=0;s=0&&(d=a.interpolatedValue[f])}return d!=null?d+"":""}):void 0},n.prototype.getRawValue=function(t,e){return jr(this.getData(e),t)},n.prototype.formatTooltip=function(t,e,i){},n}();function qv(n){var t,e;return ne(n)?n.type&&(e=n):t=n,{text:t,frag:e}}function pa(n){return new NM(n)}var NM=function(){function n(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0}return n.prototype.perform=function(t){var e,i=this._upstream,r=t&&t.skip;if(this._dirty&&i){var o=this.context;o.data=o.outputData=i.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!r&&(e=this._plan(this.context));var a,s=h(this._modBy),l=this._modDataCount||0,u=h(t&&t.modBy),c=t&&t.modDataCount||0;function h(m){return!(m>=1)&&(m=1),m}s===u&&l===c||(e="reset"),(this._dirty||e==="reset")&&(this._dirty=!1,a=this._doReset(r)),this._modBy=u,this._modDataCount=c;var p=t&&t.step;if(this._dueEnd=i?i._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var d=this._dueIndex,f=Math.min(p!=null?this._dueIndex+p:1/0,this._dueEnd);if(!r&&(a||d1&&i>0?s:a}};return o;function a(){return t=n?null:lr?-this._resultLT:0},n}(),zM=function(){function n(){}return n.prototype.getRawData=function(){throw new Error("not supported")},n.prototype.getRawDataItem=function(t){throw new Error("not supported")},n.prototype.cloneRawData=function(){},n.prototype.getDimensionInfo=function(t){},n.prototype.cloneAllDimensionInfo=function(){},n.prototype.count=function(){},n.prototype.retrieveValue=function(t,e){},n.prototype.retrieveValueFromItem=function(t,e){},n.prototype.convertValue=function(t,e){return ol(t,e)},n}();function BM(n){return Bh(n.sourceFormat)||Mt(""),n.data}function VM(n){var t=n.sourceFormat,e=n.data;if(Bh(t)||Mt(""),t===At){for(var i=[],r=0,o=e.length;r65535?WM:XM}function em(n,t,e,i,r){var o=Qv[e||"float"];if(r){var a=n[t],s=a&&a.length;if(s!==i){for(var l=new o(i),u=0;uy[1]&&(y[1]=g)}return this._rawCount=this._count=l,{start:s,end:l}},n.prototype._initDataFromProvider=function(t,e,i){for(var r=this._provider,o=this._chunks,a=this._dimensions,s=a.length,l=this._rawExtent,u=j(a,function(m){return m.property}),c=0;cv[1]&&(v[1]=y)}}!r.persistent&&r.clean&&r.clean(),this._rawCount=this._count=e,this._extent=[]},n.prototype.count=function(){return this._count},n.prototype.get=function(t,e){if(!(e>=0&&e=0&&e=this._rawCount||t<0)return-1;if(!this._indices)return t;var e=this._indices,i=e[t];if(i!=null&&it))return a;o=a-1}}return-1},n.prototype.indicesOfNearest=function(t,e,i){var r=this._chunks[t],o=[];if(!r)return o;i==null&&(i=1/0);for(var a=1/0,s=-1,l=0,u=0,c=this.count();u=0&&s<0)&&(a=p,s=h,l=0),h===s&&(o[l++]=u))}return o.length=l,o},n.prototype.getIndices=function(){var t,e=this._indices;if(e){var i=e.constructor,r=this._count;if(i===Array){t=new i(r);for(var o=0;o=c&&x<=h||isNaN(x))&&(s[l++]=f),f++;d=!0}else if(o===2){g=p[r[0]];var v=p[r[1]],m=t[r[1]][0],_=t[r[1]][1];for(y=0;y=c&&x<=h||isNaN(x))&&(b>=m&&b<=_||isNaN(b))&&(s[l++]=f),f++}d=!0}}if(!d)if(o===1)for(y=0;y=c&&x<=h||isNaN(x))&&(s[l++]=w)}else for(y=0;yt[C][1])&&(M=!1)}M&&(s[l++]=e.getRawIndex(y))}return lv[1]&&(v[1]=y)}}},n.prototype.lttbDownSample=function(t,e){var i,r,o,a=this.clone([t],!0),s=a._chunks[t],l=this.count(),u=0,c=Math.floor(1/e),h=this.getRawIndex(0),p=new(da(this._rawCount))(Math.min(2*(Math.ceil(l/c)+2),l));p[u++]=h;for(var d=1;di&&(i=r,o=I)}C>0&&Cc-f&&(l=c-f,s.length=l);for(var g=0;gh[1]&&(h[1]=v),p[d++]=m}return o._count=d,o._indices=p,o._updateGetRawIdx(),o},n.prototype.each=function(t,e){if(this._count)for(var i=t.length,r=this._chunks,o=0,a=this.count();os&&(s=u)}return r=[a,s],this._extent[t]=r,r},n.prototype.getRawDataItem=function(t){var e=this.getRawIndex(t);if(this._provider.persistent)return this._provider.getItem(e);for(var i=[],r=this._chunks,o=0;o=0?this._indices[t]:-1},n.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},n.internalField=function(){function t(e,i,r,o){return ol(e[o],this._dimensions[o])}Vh={arrayRows:t,objectRows:function(e,i,r,o){return ol(e[i],this._dimensions[o])},keyedColumns:t,original:function(e,i,r,o){var a=e&&(e.value==null?e:e.value);return ol(a instanceof Array?a[o]:a,this._dimensions[o])},typedArray:function(e,i,r,o){return e[o]}}}(),n}(),tm=function(){function n(t){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=t}return n.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},n.prototype._setLocalSource=function(t,e){this._sourceList=t,this._upstreamSignList=e,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},n.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},n.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},n.prototype._createSource=function(){this._setLocalSource([],[]);var t,e,i=this._sourceHost,r=this._getUpstreamSourceManagers(),o=!!r.length;if(sl(i)){var a=i,s=void 0,l=void 0,u=void 0;if(o){var c=r[0];c.prepareSource(),s=(u=c.getSource()).data,l=u.sourceFormat,e=[c._getVersionSign()]}else l=gt(s=a.get("data",!0))?ui:Jt,e=[];var h=this._getSourceMetaRawOption()||{},p=u&&u.metaRawOption||{},d=xe(h.seriesLayoutBy,p.seriesLayoutBy)||null,f=xe(h.sourceHeader,p.sourceHeader),g=xe(h.dimensions,p.dimensions);t=d!==p.seriesLayoutBy||!!f!=!!p.sourceHeader||g?[Nh(s,{seriesLayoutBy:d,sourceHeader:f,dimensions:g},l)]:[]}else{var y=i;if(o){var v=this._applyTransform(r);t=v.sourceList,e=v.upstreamSignList}else t=[Nh(y.get("source",!0),this._getSourceMetaRawOption(),null)],e=[]}this._setLocalSource(t,e)},n.prototype._applyTransform=function(t){var e,i=this._sourceHost,r=i.get("transform",!0),o=i.get("fromTransformResult",!0);o!=null&&t.length!==1&&im("");var a,s=[],l=[];return D(t,function(u){u.prepareSource();var c=u.getSource(o||0);o==null||c||im(""),s.push(c),l.push(u._getVersionSign())}),r?e=function(u,c){var h=Ke(u),p=h.length;p||Mt("");for(var d=0,f=p;d1||e>0&&!n.noHeader;return D(n.blocks,function(r){var o=sm(r);o>=t&&(t=o+ +(i&&(!o||Gh(r)&&!r.noHeader)))}),t}return 0}function ZM(n,t,e,i){var r,o=t.noHeader,a=(r=sm(t),{html:UM[r],richText:YM[r]}),s=[],l=t.blocks||[];Ot(!l||Y(l)),l=l||[];var u=n.orderMode;if(t.sortBlocks&&u){l=l.slice();var c={valueAsc:"asc",valueDesc:"desc"};if(Bt(c,u)){var h=new EM(c[u],null);l.sort(function(g,y){return h.evaluate(g.sortParam,y.sortParam)})}else u==="seriesDesc"&&l.reverse()}D(l,function(g,y){var v=t.valueFormatter,m=am(g)(v?H(H({},n),{valueFormatter:v}):n,g,y>0?a.html:0,i);m!=null&&s.push(m)});var p=n.renderMode==="richText"?s.join(a.richText):Hh(s.join(""),o?e:a.html);if(o)return p;var d=wh(t.header,"ordinal",n.useUTC),f=om(i,n.renderMode).nameStyle;return n.renderMode==="richText"?um(n,d,f)+a.richText+p:Hh('
'+wt(d)+"
"+p,e)}function qM(n,t,e,i){var r=n.renderMode,o=t.noName,a=t.noValue,s=!t.markerType,l=t.name,u=n.useUTC,c=t.valueFormatter||n.valueFormatter||function(x){return j(x=Y(x)?x:[x],function(b,w){return wh(b,Y(d)?d[w]:d,u)})};if(!o||!a){var h=s?"":n.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||"#333",r),p=o?"":wh(l,"ordinal",u),d=t.valueType,f=a?[]:c(t.value,t.dataIndex),g=!s||!o,y=!s&&o,v=om(i,r),m=v.nameStyle,_=v.valueStyle;return r==="richText"?(s?"":h)+(o?"":um(n,p,m))+(a?"":function(x,b,w,M,S){var C=[S],I=M?10:20;return w&&C.push({padding:[0,0,0,I],align:"right"}),x.markupStyleCreator.wrapRichTextStyle(Y(b)?b.join(" "):b,C)}(n,f,g,y,_)):Hh((s?"":h)+(o?"":function(x,b,w){return''+wt(x)+""}(p,!s,m))+(a?"":function(x,b,w,M){return''+j(x=Y(x)?x:[x],function(S){return wt(S)}).join("  ")+""}(f,g,y,_)),e)}}function lm(n,t,e,i,r,o){if(n)return am(n)({useUTC:r,renderMode:e,orderMode:i,markupStyleCreator:t,valueFormatter:n.valueFormatter},n,0,o)}function Hh(n,t){return'
'+n+'
'}function um(n,t,e){return n.markupStyleCreator.wrapRichTextStyle(t,e)}function cm(n,t){return Qi(n.getData().getItemVisual(t,"style")[n.visualDrawType])}function hm(n,t){var e=n.get("padding");return e??(t==="richText"?[8,10]:10)}var Wh=function(){function n(){this.richTextStyles={},this._nextStyleNameId=yg()}return n.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},n.prototype.makeTooltipMarker=function(t,e,i){var r=i==="richText"?this._generateStyleName():null,o=uv({color:e,type:t,renderMode:i,markerId:r});return Q(o)?o:(this.richTextStyles[r]=o.style,o.content)},n.prototype.wrapRichTextStyle=function(t,e){var i={};Y(e)?D(e,function(o){return H(i,o)}):H(i,e);var r=this._generateStyleName();return this.richTextStyles[r]=i,"{"+r+"|"+t+"}"},n}(),ci=Ee();function ll(n,t){return n.getName(t)||n.getId(t)}var it=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e._selectedDataIndicesMap={},e}return F(t,n),t.prototype.init=function(e,i,r){this.seriesIndex=this.componentIndex,this.dataTask=pa({count:jM,reset:KM}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,r),(ci(this).sourceManager=new tm(this)).prepareSource();var o=this.getInitialData(e,r);dm(o,this),this.dataTask.context.data=o,ci(this).dataBeforeProcessed=o,pm(this),this._initSelectedMapFromData(o)},t.prototype.mergeDefaultAndTheme=function(e,i){var r=sa(this),o=r?tl(e):{},a=this.subType;be.hasClass(a)&&(a+="Series"),de(e,i.getTheme().get(this.subType)),de(e,this.getDefaultOption()),Po(e,"label",["show"]),this.fillDataTextStyle(e.data),r&&Wr(e,o,r)},t.prototype.mergeOption=function(e,i){e=de(this.option,e,!0),this.fillDataTextStyle(e.data);var r=sa(this);r&&Wr(this.option,e,r);var o=ci(this).sourceManager;o.dirty(),o.prepareSource();var a=this.getInitialData(e,i);dm(a,this),this.dataTask.dirty(),this.dataTask.context.data=a,ci(this).dataBeforeProcessed=a,pm(this),this._initSelectedMapFromData(a)},t.prototype.fillDataTextStyle=function(e){if(e&&!gt(e))for(var i=["show"],r=0;r1||v&&!g){var _=function(C,I,T,A,k){var L=I.getData(),O=nn(C,function(z,B,G){var K=L.getDimensionInfo(G);return z||K&&K.tooltip!==!1&&K.displayName!=null},!1),P=[],R=[],N=[];function E(z,B){var G=L.getDimensionInfo(B);G&&G.otherDims.tooltip!==!1&&(O?N.push(jn("nameValue",{markerType:"subItem",markerColor:k,name:G.displayName,value:z,valueType:G.type})):(P.push(z),R.push(G.type)))}return A.length?D(A,function(z){E(jr(L,T,z),z)}):D(C,E),{inlineValues:P,inlineValueTypes:R,blocks:N}}(y,c,h,f,m);a=_.inlineValues,s=_.inlineValueTypes,l=_.blocks,u=_.inlineValues[0]}else if(g){var x=d.getDimensionInfo(f[0]);u=a=jr(d,h,f[0]),s=x.type}else u=a=v?y[0]:y;var b=bc(c),w=b&&c.name||"",M=d.getName(h),S=p?w:M;return jn("section",{header:w,noHeader:p||!b,sortParam:u,blocks:[jn("nameValue",{markerType:"item",markerColor:m,name:S,noName:!zt(S),value:a,valueType:s,dataIndex:h})].concat(l||[])})}({series:this,dataIndex:e,multipleSeries:i})},t.prototype.isAnimationEnabled=function(){var e=this.ecModel;if(fe.node&&(!e||!e.ssr))return!1;var i=this.getShallow("animation");return i&&this.getData().count()>this.getShallow("animationThreshold")&&(i=!1),!!i},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(e,i,r){var o=this.ecModel,a=Dh.prototype.getColorFromPalette.call(this,e,i,r);return a||(a=o.getColorFromPalette(e,i,r)),a},t.prototype.coordDimToDataDim=function(e){return this.getRawData().mapDimensionsAll(e)},t.prototype.getProgressive=function(){return this.get("progressive")},t.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},t.prototype.select=function(e,i){this._innerSelect(this.getData(i),e)},t.prototype.unselect=function(e,i){var r=this.option.selectedMap;if(r){var o=this.option.selectedMode,a=this.getData(i);if(o==="series"||r==="all")return this.option.selectedMap={},void(this._selectedDataIndicesMap={});for(var s=0;s=0&&r.push(a)}return r},t.prototype.isSelected=function(e,i){var r=this.option.selectedMap;if(!r)return!1;var o=this.getData(i);return(r==="all"||r[ll(o,e)])&&!o.getItemModel(e).get(["select","disabled"])},t.prototype.isUniversalTransitionEnabled=function(){if(this.__universalTransitionEnabled)return!0;var e=this.option.universalTransition;return!!e&&(e===!0||e&&e.enabled)},t.prototype._innerSelect=function(e,i){var r,o,a=this.option,s=a.selectedMode,l=i.length;if(s&&l){if(s==="series")a.selectedMap="all";else if(s==="multiple"){ne(a.selectedMap)||(a.selectedMap={});for(var u=a.selectedMap,c=0;c0&&this._innerSelect(e,i)}},t.registerClass=function(e){return be.registerClass(e)},t.protoInitialize=function(){var e=t.prototype;e.type="series.__base__",e.seriesIndex=0,e.ignoreStyleOnData=!1,e.hasSymbolVisual=!1,e.defaultSymbol="circle",e.visualStyleAccessPath="itemStyle",e.visualDrawType="fill"}(),t}(be);function pm(n){var t=n.name;bc(n)||(n.name=function(e){var i=e.getRawData(),r=i.mapDimensionsAll("seriesName"),o=[];return D(r,function(a){var s=i.getDimensionInfo(a);s.displayName&&o.push(s.displayName)}),o.join(" ")}(n)||t)}function jM(n){return n.model.getRawData().count()}function KM(n){var t=n.model;return t.setData(t.getRawData().cloneShallow()),JM}function JM(n,t){t.outputData&&n.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function dm(n,t){D(vf(n.CHANGABLE_METHODS,n.DOWNSAMPLE_METHODS),function(e){n.wrapMethod(e,Se($M,t))})}function $M(n,t){var e=Xh(n);return e&&e.setOutputEnd((t||this).count()),t}function Xh(n){var t=(n.ecModel||{}).scheduler,e=t&&t.getPipeline(n.uid);if(e){var i=e.currentTask;if(i){var r=i.agentStubMap;r&&(i=r.get(n.uid))}return i}}at(it,RM),at(it,Dh),Ig(it,be);var Xe=function(){function n(){this.group=new _e,this.uid=Vr("viewComponent")}return n.prototype.init=function(t,e){},n.prototype.render=function(t,e,i,r){},n.prototype.dispose=function(t,e){},n.prototype.updateView=function(t,e,i,r){},n.prototype.updateLayout=function(t,e,i,r){},n.prototype.updateVisual=function(t,e,i,r){},n.prototype.toggleBlurSeries=function(t,e,i){},n.prototype.eachRendered=function(t){var e=this.group;e&&e.traverse(t)},n}();function Uh(){var n=Ee();return function(t){var e=n(t),i=t.pipelineContext,r=!!e.large,o=!!e.progressiveRender,a=e.large=!(!i||!i.large),s=e.progressiveRender=!(!i||!i.progressiveRender);return!(r===a&&o===s)&&"reset"}}Sc(Xe),Ss(Xe);var fm=Ee(),QM=Uh(),Je=function(){function n(){this.group=new _e,this.uid=Vr("viewChart"),this.renderTask=pa({plan:eT,reset:tT}),this.renderTask.context={view:this}}return n.prototype.init=function(t,e){},n.prototype.render=function(t,e,i,r){},n.prototype.highlight=function(t,e,i,r){var o=t.getData(r&&r.dataType);o&&ym(o,r,"emphasis")},n.prototype.downplay=function(t,e,i,r){var o=t.getData(r&&r.dataType);o&&ym(o,r,"normal")},n.prototype.remove=function(t,e){this.group.removeAll()},n.prototype.dispose=function(t,e){},n.prototype.updateView=function(t,e,i,r){this.render(t,e,i,r)},n.prototype.updateLayout=function(t,e,i,r){this.render(t,e,i,r)},n.prototype.updateVisual=function(t,e,i,r){this.render(t,e,i,r)},n.prototype.eachRendered=function(t){Xs(this.group,t)},n.markUpdateMethod=function(t,e){fm(t).updateMethod=e},n.protoInitialize=void(n.prototype.type="chart"),n}();function gm(n,t,e){n&&Kc(n)&&(t==="emphasis"?kr:Lr)(n,e)}function ym(n,t,e){var i=zi(n,t),r=t&&t.highlightKey!=null?function(o){var a=Qg[o];return a==null&&$g<=32&&(a=Qg[o]=$g++),a}(t.highlightKey):null;i!=null?D(Ke(i),function(o){gm(n.getItemGraphicEl(o),e,r)}):n.eachItemGraphicEl(function(o){gm(o,e,r)})}function eT(n){return QM(n.model)}function tT(n){var t=n.model,e=n.ecModel,i=n.api,r=n.payload,o=t.pipelineContext.progressiveRender,a=n.view,s=r&&fm(r).updateMethod,l=o?"incrementalPrepareRender":s&&a[s]?s:"render";return l!=="render"&&a[l](t,e,i,r),nT[l]}Sc(Je),Ss(Je);var nT={incrementalPrepareRender:{progress:function(n,t){t.view.incrementalRender(n,t.model,t.ecModel,t.api,t.payload)}},render:{forceFirstProgress:!0,progress:function(n,t){t.view.render(t.model,t.ecModel,t.api,t.payload)}}},ul="\0__throttleOriginMethod",vm="\0__throttleRate",mm="\0__throttleType";function cl(n,t,e){var i,r,o,a,s,l=0,u=0,c=null;function h(){u=new Date().getTime(),c=null,n.apply(o,a||[])}t=t||0;var p=function(){for(var d=[],f=0;f=0?h():c=setTimeout(h,-r),l=i};return p.clear=function(){c&&(clearTimeout(c),c=null)},p.debounceNextCall=function(d){s=d},p}function Yh(n,t,e,i){var r=n[t];if(r){var o=r[ul]||r,a=r[mm];if(r[vm]!==e||a!==i){if(e==null||!i)return n[t]=o;(r=n[t]=cl(o,e,i==="debounce"))[ul]=o,r[mm]=i,r[vm]=e}return r}}function hl(n,t){var e=n[t];e&&e[ul]&&(e.clear&&e.clear(),n[t]=e[ul])}var _m=Ee(),xm={itemStyle:Cr(qy,!0),lineStyle:Cr(Zy,!0)},iT={lineStyle:"stroke",itemStyle:"fill"};function bm(n,t){return n.visualStyleMapper||xm[t]||(console.warn("Unknown style type '"+t+"'."),xm.itemStyle)}function wm(n,t){return n.visualDrawType||iT[t]||(console.warn("Unknown style type '"+t+"'."),"fill")}var rT={createOnAllSeries:!0,performRawSeries:!0,reset:function(n,t){var e=n.getData(),i=n.visualStyleAccessPath||"itemStyle",r=n.getModel(i),o=bm(n,i)(r),a=r.getShallow("decal");a&&(e.setVisual("decal",a),a.dirty=!0);var s=wm(n,i),l=o[s],u=ue(l)?l:null,c=o.fill==="auto"||o.stroke==="auto";if(!o[s]||u||c){var h=n.getColorFromPalette(n.name,null,t.getSeriesCount());o[s]||(o[s]=h,e.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||ue(o.fill)?h:o.fill,o.stroke=o.stroke==="auto"||ue(o.stroke)?h:o.stroke}if(e.setVisual("style",o),e.setVisual("drawType",s),!t.isSeriesFiltered(n)&&u)return e.setVisual("colorFromPalette",!1),{dataEach:function(p,d){var f=n.getDataParams(d),g=H({},o);g[s]=u(f),p.setItemVisual(d,"style",g)}}}},fa=new Le,oT={createOnAllSeries:!0,performRawSeries:!0,reset:function(n,t){if(!n.ignoreStyleOnData&&!t.isSeriesFiltered(n)){var e=n.getData(),i=n.visualStyleAccessPath||"itemStyle",r=bm(n,i),o=e.getVisual("drawType");return{dataEach:e.hasItemOption?function(a,s){var l=a.getRawDataItem(s);if(l&&l[i]){fa.option=l[i];var u=r(fa);H(a.ensureUniqueItemVisual(s,"style"),u),fa.option.decal&&(a.setItemVisual(s,"decal",fa.option.decal),fa.option.decal.dirty=!0),o in u&&a.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},aT={performRawSeries:!0,overallReset:function(n){var t=re();n.eachSeries(function(e){var i=e.getColorBy();if(!e.isColorBySeries()){var r=e.type+"-"+i,o=t.get(r);o||(o={},t.set(r,o)),_m(e).scope=o}}),n.eachSeries(function(e){if(!e.isColorBySeries()&&!n.isSeriesFiltered(e)){var i=e.getRawData(),r={},o=e.getData(),a=_m(e).scope,s=e.visualStyleAccessPath||"itemStyle",l=wm(e,s);o.each(function(u){var c=o.getRawIndex(u);r[c]=u}),i.each(function(u){var c=r[u];if(o.getItemVisual(c,"colorFromPalette")){var h=o.ensureUniqueItemVisual(c,"style"),p=i.getName(u)||u+"",d=i.count();h[l]=e.getColorFromPalette(p,a,d)}})}})}},pl=Math.PI,Sm=function(){function n(t,e,i,r){this._stageTaskMap=re(),this.ecInstance=t,this.api=e,i=this._dataProcessorHandlers=i.slice(),r=this._visualHandlers=r.slice(),this._allHandlers=i.concat(r)}return n.prototype.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each(function(i){var r=i.overallTask;r&&r.dirty()})},n.prototype.getPerformArgs=function(t,e){if(t.__pipeline){var i=this._pipelineMap.get(t.__pipeline.id),r=i.context,o=!e&&i.progressiveEnabled&&(!r||r.progressiveRender)&&t.__idxInPipeline>i.blockIndex?i.step:null,a=r&&r.modDataCount;return{step:o,modBy:a!=null?Math.ceil(a/o):null,modDataCount:a}}},n.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},n.prototype.updateStreamModes=function(t,e){var i=this._pipelineMap.get(t.uid),r=t.getData().count(),o=i.progressiveEnabled&&e.incrementalPrepareRender&&r>=i.threshold,a=t.get("large")&&r>=t.get("largeThreshold"),s=t.get("progressiveChunkMode")==="mod"?r:null;t.pipelineContext=i.context={progressiveRender:o,modDataCount:s,large:a}},n.prototype.restorePipelines=function(t){var e=this,i=e._pipelineMap=re();t.eachSeries(function(r){var o=r.getProgressive(),a=r.uid;i.set(a,{id:a,head:null,tail:null,threshold:r.getProgressiveThreshold(),progressiveEnabled:o&&!(r.preventIncremental&&r.preventIncremental()),blockIndex:-1,step:Math.round(o||700),count:0}),e._pipe(r,r.dataTask)})},n.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.api.getModel(),i=this.api;D(this._allHandlers,function(r){var o=t.get(r.uid)||t.set(r.uid,{});Ot(!(r.reset&&r.overallReset),""),r.reset&&this._createSeriesStageTask(r,o,e,i),r.overallReset&&this._createOverallStageTask(r,o,e,i)},this)},n.prototype.prepareView=function(t,e,i,r){var o=t.renderTask,a=o.context;a.model=e,a.ecModel=i,a.api=r,o.__block=!t.incrementalPrepareRender,this._pipe(e,o)},n.prototype.performDataProcessorTasks=function(t,e){this._performStageTasks(this._dataProcessorHandlers,t,e,{block:!0})},n.prototype.performVisualTasks=function(t,e,i){this._performStageTasks(this._visualHandlers,t,e,i)},n.prototype._performStageTasks=function(t,e,i,r){r=r||{};var o=!1,a=this;function s(l,u){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(u.__pipeline.id))}D(t,function(l,u){if(!r.visualType||r.visualType===l.visualType){var c=a._stageTaskMap.get(l.uid),h=c.seriesTaskMap,p=c.overallTask;if(p){var d,f=p.agentStubMap;f.each(function(y){s(r,y)&&(y.dirty(),d=!0)}),d&&p.dirty(),a.updatePayload(p,i);var g=a.getPerformArgs(p,r.block);f.each(function(y){y.perform(g)}),p.perform(g)&&(o=!0)}else h&&h.each(function(y,v){s(r,y)&&y.dirty();var m=a.getPerformArgs(y,r.block);m.skip=!l.performRawSeries&&e.isSeriesFiltered(y.context.model),a.updatePayload(y,i),y.perform(m)&&(o=!0)})}}),this.unfinished=o||this.unfinished},n.prototype.performSeriesTasks=function(t){var e;t.eachSeries(function(i){e=i.dataTask.perform()||e}),this.unfinished=e||this.unfinished},n.prototype.plan=function(){this._pipelineMap.each(function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)})},n.prototype.updatePayload=function(t,e){e!=="remain"&&(t.context.payload=e)},n.prototype._createSeriesStageTask=function(t,e,i,r){var o=this,a=e.seriesTaskMap,s=e.seriesTaskMap=re(),l=t.seriesType,u=t.getTargetSeries;function c(h){var p=h.uid,d=s.set(p,a&&a.get(p)||pa({plan:hT,reset:pT,count:fT}));d.context={model:h,ecModel:i,api:r,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:o},o._pipe(h,d)}t.createOnAllSeries?i.eachRawSeries(c):l?i.eachRawSeriesByType(l,c):u&&u(i,r).each(c)},n.prototype._createOverallStageTask=function(t,e,i,r){var o=this,a=e.overallTask=e.overallTask||pa({reset:sT});a.context={ecModel:i,api:r,overallReset:t.overallReset,scheduler:o};var s=a.agentStubMap,l=a.agentStubMap=re(),u=t.seriesType,c=t.getTargetSeries,h=!0,p=!1;function d(f){var g=f.uid,y=l.set(g,s&&s.get(g)||(p=!0,pa({reset:lT,onDirty:cT})));y.context={model:f,overallProgress:h},y.agent=a,y.__block=h,o._pipe(f,y)}Ot(!t.createOnAllSeries,""),u?i.eachRawSeriesByType(u,d):c?c(i,r).each(d):(h=!1,D(i.getSeries(),d)),p&&a.dirty()},n.prototype._pipe=function(t,e){var i=t.uid,r=this._pipelineMap.get(i);!r.head&&(r.head=e),r.tail&&r.tail.pipe(e),r.tail=e,e.__idxInPipeline=r.count++,e.__pipeline=r},n.wrapStageHandler=function(t,e){return ue(t)&&(t={overallReset:t,seriesType:gT(t)}),t.uid=Vr("stageHandler"),e&&(t.visualType=e),t},n}();function sT(n){n.overallReset(n.ecModel,n.api,n.payload)}function lT(n){return n.overallProgress&&uT}function uT(){this.agent.dirty(),this.getDownstream().dirty()}function cT(){this.agent&&this.agent.dirty()}function hT(n){return n.plan?n.plan(n.model,n.ecModel,n.api,n.payload):null}function pT(n){n.useClearVisual&&n.data.clearAllVisual();var t=n.resetDefines=Ke(n.reset(n.model,n.ecModel,n.api,n.payload));return t.length>1?j(t,function(e,i){return Mm(i)}):dT}var dT=Mm(0);function Mm(n){return function(t,e){var i=e.data,r=e.resetDefines[n];if(r&&r.dataEach)for(var o=t.start;o0&&d===u.length-p.length){var f=u.slice(0,d);f!=="data"&&(e.mainType=f,e[p.toLowerCase()]=l,c=!0)}}s.hasOwnProperty(u)&&(i[u]=l,c=!0),c||(r[u]=l)})}return{cptQuery:e,dataQuery:i,otherQuery:r}},n.prototype.filter=function(t,e){var i=this.eventInfo;if(!i)return!0;var r=i.targetEl,o=i.packedEvent,a=i.model,s=i.view;if(!a||!s)return!0;var l=e.cptQuery,u=e.dataQuery;return c(l,a,"mainType")&&c(l,a,"subType")&&c(l,a,"index","componentIndex")&&c(l,a,"name")&&c(l,a,"id")&&c(u,o,"name")&&c(u,o,"dataIndex")&&c(u,o,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(t,e.otherQuery,r,o));function c(h,p,d,f){return h[d]==null||p[f||d]===h[d]}},n.prototype.afterTrigger=function(){this.eventInfo=null},n}(),Zh=["symbol","symbolSize","symbolRotate","symbolOffset"],Lm=Zh.concat(["symbolKeepAspect"]),mT={createOnAllSeries:!0,performRawSeries:!0,reset:function(n,t){var e=n.getData();if(n.legendIcon&&e.setVisual("legendIcon",n.legendIcon),n.hasSymbolVisual){for(var i={},r={},o=!1,a=0;a=0&&nr(f)?f:.5,a.createRadialGradient(p,d,0,p,d,f)}(n,t,e):function(a,s,l){var u=s.x==null?0:s.x,c=s.x2==null?1:s.x2,h=s.y==null?0:s.y,p=s.y2==null?0:s.y2;return s.global||(u=u*l.width+l.x,c=c*l.width+l.x,h=h*l.height+l.y,p=p*l.height+l.y),u=nr(u)?u:0,c=nr(c)?c:1,h=nr(h)?h:0,p=nr(p)?p:0,a.createLinearGradient(u,h,c,p)}(n,t,e),r=t.colorStops,o=0;o0&&(t=i.lineDash,e=i.lineWidth,t&&t!=="solid"&&e>0?t==="dashed"?[4*e,2*e]:t==="dotted"?[e]:Ae(t)?[t]:Y(t)?t:null:null),o=i.lineDashOffset;if(r){var a=i.strokeNoScale&&n.getLineScale?n.getLineScale():1;a&&a!==1&&(r=j(r,function(s){return s/a}),o/=a)}return[r,o]}var kT=new ai(!0);function vl(n){var t=n.stroke;return!(t==null||t==="none"||!(n.lineWidth>0))}function zm(n){return typeof n=="string"&&n!=="none"}function ml(n){var t=n.fill;return t!=null&&t!=="none"}function Bm(n,t){if(t.fillOpacity!=null&&t.fillOpacity!==1){var e=n.globalAlpha;n.globalAlpha=t.fillOpacity*t.opacity,n.fill(),n.globalAlpha=e}else n.fill()}function Vm(n,t){if(t.strokeOpacity!=null&&t.strokeOpacity!==1){var e=n.globalAlpha;n.globalAlpha=t.strokeOpacity*t.opacity,n.stroke(),n.globalAlpha=e}else n.stroke()}function Jh(n,t,e){var i=Ag(t.image,t.__image,e);if(Ms(i)){var r=n.createPattern(i,t.repeat||"repeat");if(typeof DOMMatrix=="function"&&r&&r.setTransform){var o=new DOMMatrix;o.translateSelf(t.x||0,t.y||0),o.rotateSelf(0,0,(t.rotation||0)*mf),o.scaleSelf(t.scaleX||1,t.scaleY||1),r.setTransform(o)}return r}}var Fm=["shadowBlur","shadowOffsetX","shadowOffsetY"],Gm=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function Hm(n,t,e,i,r){var o=!1;if(!i&&t===(e=e||{}))return!1;if(i||t.opacity!==e.opacity){Dt(n,r),o=!0;var a=Math.max(Math.min(t.opacity,1),0);n.globalAlpha=isNaN(a)?Vi.opacity:a}(i||t.blend!==e.blend)&&(o||(Dt(n,r),o=!0),n.globalCompositeOperation=t.blend||Vi.blend);for(var s=0;s0&&e.unfinished);e.unfinished||this._zr.flush()}}},t.prototype.getDom=function(){return this._dom},t.prototype.getId=function(){return this.id},t.prototype.getZr=function(){return this._zr},t.prototype.isSSR=function(){return this._ssr},t.prototype.setOption=function(e,i,r){if(!this[ht])if(this._disposed)this.id;else{var o,a,s;if(ne(i)&&(r=i.lazyUpdate,o=i.silent,a=i.replaceMerge,s=i.transition,i=i.notMerge),this[ht]=!0,!this._model||i){var l=new TM(this._api),u=this._theme,c=this._model=new kh;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,u,this._locale,l)}this._model.setOption(e,{replaceMerge:a},cp);var h={seriesTransition:s,optionChanged:!0};if(r)this[kt]={silent:o,updateParams:h},this[ht]=!1,this.getZr().wakeUp();else{try{Jr(this),hi.update.call(this,null,h)}catch(p){throw this[kt]=null,this[ht]=!1,p}this._ssr||this._zr.flush(),this[kt]=null,this[ht]=!1,va.call(this,o),ma.call(this,o)}}},t.prototype.setTheme=function(){},t.prototype.getModel=function(){return this._model},t.prototype.getOption=function(){return this._model&&this._model.getOption()},t.prototype.getWidth=function(){return this._zr.getWidth()},t.prototype.getHeight=function(){return this._zr.getHeight()},t.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||fe.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(e){return this.renderToCanvas(e)},t.prototype.renderToCanvas=function(e){return e=e||{},this._zr.painter.getRenderedCanvas({backgroundColor:e.backgroundColor||this._model.get("backgroundColor"),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(e){return e=e||{},this._zr.painter.renderToString({useViewBox:e.useViewBox})},t.prototype.getSvgDataURL=function(){if(fe.svgSupported){var e=this._zr;return D(e.storage.getDisplayList(),function(i){i.stopAnimation(null,!0)}),e.painter.toDataURL()}},t.prototype.getDataURL=function(e){if(!this._disposed){var i=(e=e||{}).excludeComponents,r=this._model,o=[],a=this;D(i,function(l){r.eachComponent({mainType:l},function(u){var c=a._componentsMap[u.__viewId];c.group.ignore||(o.push(c),c.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(e).toDataURL("image/"+(e&&e.type||"png"));return D(o,function(l){l.group.ignore=!1}),s}this.id},t.prototype.getConnectedDataURL=function(e){if(!this._disposed){var i=e.type==="svg",r=this.group,o=Math.min,a=Math.max,s=1/0;if(Cl[r]){var l=s,u=s,c=-1/0,h=-1/0,p=[],d=e&&e.pixelRatio||this.getDevicePixelRatio();D(rr,function(_,x){if(_.group===r){var b=i?_.getZr().painter.getSvgDom().innerHTML:_.renderToCanvas(ae(e)),w=_.getDom().getBoundingClientRect();l=o(w.left,l),u=o(w.top,u),c=a(w.right,c),h=a(w.bottom,h),p.push({dom:b,left:w.left,top:w.top})}});var f=(c*=d)-(l*=d),g=(h*=d)-(u*=d),y=Bn.createCanvas(),v=gc(y,{renderer:i?"svg":"canvas"});if(v.resize({width:f,height:g}),i){var m="";return D(p,function(_){var x=_.left-l,b=_.top-u;m+=''+_.dom+""}),v.painter.getSvgRoot().innerHTML=m,e.connectedBackgroundColor&&v.painter.setBackgroundColor(e.connectedBackgroundColor),v.refreshImmediately(),v.painter.toDataURL()}return e.connectedBackgroundColor&&v.add(new ke({shape:{x:0,y:0,width:f,height:g},style:{fill:e.connectedBackgroundColor}})),D(p,function(_){var x=new Tt({style:{x:_.left*d-l,y:_.top*d-u,image:_.dom}});v.add(x)}),v.refreshImmediately(),y.toDataURL("image/"+(e&&e.type||"png"))}return this.getDataURL(e)}this.id},t.prototype.convertToPixel=function(e,i){return rp(this,"convertToPixel",e,i)},t.prototype.convertFromPixel=function(e,i){return rp(this,"convertFromPixel",e,i)},t.prototype.containPixel=function(e,i){var r;if(!this._disposed)return D(Eo(this._model,e),function(o,a){a.indexOf("Models")>=0&&D(o,function(s){var l=s.coordinateSystem;if(l&&l.containPoint)r=r||!!l.containPoint(i);else if(a==="seriesModels"){var u=this._chartsMap[s.__viewId];u&&u.containPoint&&(r=r||u.containPoint(i,s))}},this)},this),!!r;this.id},t.prototype.getVisual=function(e,i){var r=Eo(this._model,e,{defaultMainType:"series"}),o=r.seriesModel.getData(),a=r.hasOwnProperty("dataIndexInside")?r.dataIndexInside:r.hasOwnProperty("dataIndex")?o.indexOfRawIndex(r.dataIndex):null;return a!=null?Pm(o,a,i):Om(o,i)},t.prototype.getViewOfComponentModel=function(e){return this._componentsMap[e.__viewId]},t.prototype.getViewOfSeriesModel=function(e){return this._chartsMap[e.__viewId]},t.prototype._initEvents=function(){var e,i,r,o=this;D(OT,function(a){var s=function(l){var u,c=o.getModel(),h=l.target;if(a==="globalout"?u={}:h&&tr(h,function(y){var v=ye(y);if(v&&v.dataIndex!=null){var m=v.dataModel||c.getSeriesByIndex(v.seriesIndex);return u=m&&m.getDataParams(v.dataIndex,v.dataType,h)||{},!0}if(v.eventData)return u=H({},v.eventData),!0},!0),u){var p=u.componentType,d=u.componentIndex;p!=="markLine"&&p!=="markPoint"&&p!=="markArea"||(p="series",d=u.seriesIndex);var f=p&&d!=null&&c.getComponent(p,d),g=f&&o[f.mainType==="series"?"_chartsMap":"_componentsMap"][f.__viewId];u.event=l,u.type=a,o._$eventProcessor.eventInfo={targetEl:h,packedEvent:u,model:f,view:g},o.trigger(a,u)}};s.zrEventfulCallAtLast=!0,o._zr.on(a,s,o)}),D(_a,function(a,s){o._messageCenter.on(s,function(l){this.trigger(s,l)},o)}),D(["selectchanged"],function(a){o._messageCenter.on(a,function(s){this.trigger(a,s)},o)}),e=this._messageCenter,i=this,r=this._api,e.on("selectchanged",function(a){var s=r.getModel();a.isFromClick?(Kr("map","selectchanged",i,s,a),Kr("pie","selectchanged",i,s,a)):a.fromAction==="select"?(Kr("map","selected",i,s,a),Kr("pie","selected",i,s,a)):a.fromAction==="unselect"&&(Kr("map","unselected",i,s,a),Kr("pie","unselected",i,s,a))})},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){this._disposed?this.id:this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed)this.id;else{this._disposed=!0,this.getDom()&&Mg(this.getDom(),pp,"");var e=this,i=e._api,r=e._model;D(e._componentsViews,function(o){o.dispose(r,i)}),D(e._chartsViews,function(o){o.dispose(r,i)}),e._zr.dispose(),e._dom=e._model=e._chartsMap=e._componentsMap=e._chartsViews=e._componentsViews=e._scheduler=e._api=e._zr=e._throttledZrFlush=e._theme=e._coordSysMgr=e._messageCenter=null,delete rr[e.id]}},t.prototype.resize=function(e){if(!this[ht])if(this._disposed)this.id;else{this._zr.resize(e);var i=this._model;if(this._loadingFX&&this._loadingFX.resize(),i){var r=i.resetOption("media"),o=e&&e.silent;this[kt]&&(o==null&&(o=this[kt].silent),r=!0,this[kt]=null),this[ht]=!0;try{r&&Jr(this),hi.update.call(this,{type:"resize",animation:H({duration:0},e&&e.animation)})}catch(a){throw this[ht]=!1,a}this[ht]=!1,va.call(this,o),ma.call(this,o)}}},t.prototype.showLoading=function(e,i){if(this._disposed)this.id;else if(ne(e)&&(i=e,e=""),e=e||"default",this.hideLoading(),hp[e]){var r=hp[e](this._api,i),o=this._zr;this._loadingFX=r,o.add(r)}},t.prototype.hideLoading=function(){this._disposed?this.id:(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},t.prototype.makeActionFromEvent=function(e){var i=H({},e);return i.type=_a[e.type],i},t.prototype.dispatchAction=function(e,i){if(this._disposed)this.id;else if(ne(i)||(i={silent:!!i}),Ml[e.type]&&this._model)if(this[ht])this._pendingActions.push(e);else{var r=i.silent;ap.call(this,e,r);var o=i.flush;o?this._zr.flush():o!==!1&&fe.browser.weChat&&this._throttledZrFlush(),va.call(this,r),ma.call(this,r)}},t.prototype.updateLabelLayout=function(){dn.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed)this.id;else{var i=e.seriesIndex;this.getModel().getSeriesByIndex(i).appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()}},t.internalField=function(){function e(l){l.clearColorPalette(),l.eachSeries(function(u){u.clearColorPalette()})}function i(l){for(var u=[],c=l.currentStates,h=0;h0?{duration:p,delay:c.get("delay"),easing:c.get("easing")}:null;u.eachRendered(function(f){if(f.states&&f.states.emphasis){if(Nr(f))return;if(f instanceof Ie&&function(m){var _=ey(m);_.normalFill=m.style.fill,_.normalStroke=m.style.stroke;var x=m.states.select||{};_.selectFill=x.style&&x.style.fill||null,_.selectStroke=x.style&&x.style.stroke||null}(f),f.__dirty){var g=f.prevStates;g&&f.useStates(g)}if(h){f.stateTransition=d;var y=f.getTextContent(),v=f.getTextGuideLine();y&&(y.stateTransition=d),v&&(v.stateTransition=d)}f.__dirty&&i(f)}})}Jr=function(l){var u=l._scheduler;u.restorePipelines(l._model),u.prepareStageTasks(),ip(l,!0),ip(l,!1),u.plan()},ip=function(l,u){for(var c=l._model,h=l._scheduler,p=u?l._componentsViews:l._chartsViews,d=u?l._componentsMap:l._chartsMap,f=l._zr,g=l._api,y=0;yv.get("hoverLayerThreshold")&&!fe.node&&!fe.worker&&v.eachSeries(function(x){if(!x.preventUsingHoverLayer){var b=y._chartsMap[x.__viewId];b.__alive&&b.eachRendered(function(w){w.states.emphasis&&(w.states.emphasis.hoverLayer=!0)})}})}(l,u),dn.trigger("series:afterupdate",u,c,p)},Qt=function(l){l[tp]=!0,l.getZr().wakeUp()},l0=function(l){l[tp]&&(l.getZr().storage.traverse(function(u){Nr(u)||i(u)}),l[tp]=!1)},a0=function(l){return new(function(u){function c(){return u!==null&&u.apply(this,arguments)||this}return F(c,u),c.prototype.getCoordinateSystems=function(){return l._coordSysMgr.getCoordinateSystems()},c.prototype.getComponentByElement=function(h){for(;h;){var p=h.__ecComponentInfo;if(p!=null)return l._model.getComponent(p.mainType,p.index);h=h.parent}},c.prototype.enterEmphasis=function(h,p){kr(h,p),Qt(l)},c.prototype.leaveEmphasis=function(h,p){Lr(h,p),Qt(l)},c.prototype.enterBlur=function(h){(function(p){Yn(p,Hc)})(h),Qt(l)},c.prototype.leaveBlur=function(h){sy(h),Qt(l)},c.prototype.enterSelect=function(h){ly(h),Qt(l)},c.prototype.leaveSelect=function(h){uy(h),Qt(l)},c.prototype.getModel=function(){return l.getModel()},c.prototype.getViewOfComponentModel=function(h){return l.getViewOfComponentModel(h)},c.prototype.getViewOfSeriesModel=function(h){return l.getViewOfSeriesModel(h)},c}(Iv))(l)},s0=function(l){function u(c,h){for(var p=0;p=0)){v0.push(e);var o=Sm.wrapStageHandler(e,r);o.__prio=t,o.__raw=e,n.push(o)}}function mp(n,t){hp[n]=t}function HT(n){sf({createCanvas:n})}function m0(n,t,e){var i=Jm("registerMap");i&&i(n,t,e)}function WT(n){var t=Jm("getMap");return t&&t(n)}var _0=function(n){var t=(n=ae(n)).type;t||Mt("");var e=t.split(":");e.length!==2&&Mt("");var i=!1;e[0]==="echarts"&&(t=e[1],i=!0),n.__isBuiltIn=i,Kv.set(t,n)};pi(ep,rT),pi(xl,oT),pi(xl,aT),pi(ep,mT),pi(xl,_T),pi(7e3,function(n,t){n.eachRawSeries(function(e){if(!n.isSeriesFiltered(e)){var i=e.getData();i.hasItemVisual()&&i.each(function(o){var a=i.getItemVisual(o,"decal");a&&(i.ensureUniqueItemVisual(o,"style").decal=_l(a,t))});var r=i.getVisual("decal");r&&(i.getVisual("style").decal=_l(r,t))}})}),gp(Rv),yp(900,function(n){var t=re();n.eachSeries(function(e){var i=e.get("stack");if(i){var r=t.get(i)||t.set(i,[]),o=e.getData(),a={stackResultDimension:o.getCalculationInfo("stackResultDimension"),stackedOverDimension:o.getCalculationInfo("stackedOverDimension"),stackedDimension:o.getCalculationInfo("stackedDimension"),stackedByDimension:o.getCalculationInfo("stackedByDimension"),isStackedByIndex:o.getCalculationInfo("isStackedByIndex"),data:o,seriesModel:e};if(!a.stackedDimension||!a.isStackedByIndex&&!a.stackedByDimension)return;r.length&&o.setCalculationInfo("stackedOnSeries",r[r.length-1].seriesModel),r.push(a)}}),t.each(DM)}),mp("default",function(n,t){ce(t=t||{},{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var e=new _e,i=new ke({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});e.add(i);var r,o=new Me({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),a=new ke({style:{fill:"none"},textContent:o,textConfig:{position:"right",distance:10},zlevel:t.zlevel,z:10001});return e.add(a),t.showSpinner&&((r=new qo({shape:{startAngle:-pl/2,endAngle:-pl/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:"round",lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001})).animateShape(!0).when(1e3,{endAngle:3*pl/2}).start("circularInOut"),r.animateShape(!0).when(1e3,{startAngle:3*pl/2}).delay(300).start("circularInOut"),e.add(r)),e.resize=function(){var s=o.getBoundingRect().width,l=t.showSpinner?t.spinnerRadius:0,u=(n.getWidth()-2*l-(t.showSpinner&&s?10:0)-s)/2-(t.showSpinner&&s?0:5+s/2)+(t.showSpinner?0:s/2)+(s?0:l),c=n.getHeight()/2;t.showSpinner&&r.setShape({cx:u,cy:c}),a.setShape({x:u-l,y:c-l,width:2*l,height:2*l}),i.setShape({x:0,y:0,width:n.getWidth(),height:n.getHeight()})},e.resize(),e}),fn({type:qi,event:qi,update:qi},rt),fn({type:ks,event:ks,update:ks},rt),fn({type:Go,event:Go,update:Go},rt),fn({type:Ls,event:Ls,update:Ls},rt),fn({type:Ho,event:Ho,update:Ho},rt),fp("light",yT),fp("dark",km);var XT={};function xa(n){return n==null?0:n.length||1}function x0(n){return n}var _p=function(){function n(t,e,i,r,o,a){this._old=t,this._new=e,this._oldKeyGetter=i||x0,this._newKeyGetter=r||x0,this.context=o,this._diffModeMultiple=a==="multiple"}return n.prototype.add=function(t){return this._add=t,this},n.prototype.update=function(t){return this._update=t,this},n.prototype.updateManyToOne=function(t){return this._updateManyToOne=t,this},n.prototype.updateOneToMany=function(t){return this._updateOneToMany=t,this},n.prototype.updateManyToMany=function(t){return this._updateManyToMany=t,this},n.prototype.remove=function(t){return this._remove=t,this},n.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},n.prototype._executeOneToOne=function(){var t=this._old,e=this._new,i={},r=new Array(t.length),o=new Array(e.length);this._initIndexMap(t,null,r,"_oldKeyGetter"),this._initIndexMap(e,i,o,"_newKeyGetter");for(var a=0;a1){var c=l.shift();l.length===1&&(i[s]=l[0]),this._update&&this._update(c,a)}else u===1?(i[s]=null,this._update&&this._update(l,a)):this._remove&&this._remove(a)}this._performRestAdd(o,i)},n.prototype._executeMultiple=function(){var t=this._old,e=this._new,i={},r={},o=[],a=[];this._initIndexMap(t,i,o,"_oldKeyGetter"),this._initIndexMap(e,r,a,"_newKeyGetter");for(var s=0;s1&&p===1)this._updateManyToOne&&this._updateManyToOne(c,u),r[l]=null;else if(h===1&&p>1)this._updateOneToMany&&this._updateOneToMany(c,u),r[l]=null;else if(h===1&&p===1)this._update&&this._update(c,u),r[l]=null;else if(h>1&&p>1)this._updateManyToMany&&this._updateManyToMany(c,u),r[l]=null;else if(h>1)for(var d=0;d1)for(var s=0;s30}var C0,Dl,ba,wa,bp,kl,wp,Sa=ne,di=j,qT=typeof Int32Array>"u"?Array:Int32Array,jT=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],KT=["_approximateExtent"],Sp=function(){function n(t,e){var i;this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","lttbDownSample"];var r=!1;w0(t)?(i=t.dimensions,this._dimOmitted=t.isDimensionOmitted(),this._schema=t):(r=!0,i=t),i=i||["x","y"];for(var o={},a=[],s={},l=!1,u={},c=0;c=e)){var i=this._store.getProvider();this._updateOrdinalMeta();var r=this._nameList,o=this._idList;if(i.getSource().sourceFormat===Jt&&!i.pure)for(var a=[],s=t;s0},n.prototype.ensureUniqueItemVisual=function(t,e){var i=this._itemVisuals,r=i[t];r||(r=i[t]={});var o=r[e];return o==null&&(Y(o=this.getVisual(e))?o=o.slice():Sa(o)&&(o=H({},o)),r[e]=o),o},n.prototype.setItemVisual=function(t,e,i){var r=this._itemVisuals[t]||{};this._itemVisuals[t]=r,Sa(e)?H(r,e):r[e]=i},n.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},n.prototype.setLayout=function(t,e){Sa(t)?H(this._layout,t):this._layout[t]=e},n.prototype.getLayout=function(t){return this._layout[t]},n.prototype.getItemLayout=function(t){return this._itemLayouts[t]},n.prototype.setItemLayout=function(t,e,i){this._itemLayouts[t]=i?H(this._itemLayouts[t]||{},e):e},n.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},n.prototype.setItemGraphicEl=function(t,e){var i=this.hostModel&&this.hostModel.seriesIndex;Fc(i,this.dataType,t,e),this._graphicEls[t]=e},n.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},n.prototype.eachItemGraphicEl=function(t,e){D(this._graphicEls,function(i,r){i&&t&&t.call(e,i,r)})},n.prototype.cloneShallow=function(t){return t||(t=new n(this._schema?this._schema:di(this.dimensions,this._getDimInfo,this),this.hostModel)),bp(t,this),t._store=this._store,t},n.prototype.wrapMethod=function(t,e){var i=this[t];ue(i)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var r=i.apply(this,arguments);return e.apply(this,[r].concat(Ka(arguments)))})},n.internalField=(C0=function(t){var e=t._invertedIndicesMap;D(e,function(i,r){var o=t._dimInfos[r],a=o.ordinalMeta,s=t._store;if(a){i=e[r]=new qT(a.categories.length);for(var l=0;l1&&(l+="__ec__"+c),r[e]=l}})),n}();function I0(n,t){return Mp(n,t).dimensions}function Mp(n,t){Rh(n)||(n=zv(n));var e=(t=t||{}).coordDimensions||[],i=t.dimensionsDefine||n.dimensionsDefine||[],r=re(),o=[],a=function(S,C,I,T){var A=Math.max(S.dimensionsDetectedCount||1,C.length,I.length,T||0);return D(C,function(k){var L;ne(k)&&(L=k.dimsDef)&&(A=Math.max(A,L.length))}),A}(n,e,i,t.dimensionsCount),s=t.canOmitUnusedDimensions&&T0(a),l=i===n.dimensionsDefine,u=l?M0(n):S0(i),c=t.encodeDefine;!c&&t.encodeDefaulter&&(c=t.encodeDefaulter(n,a));for(var h=re(c),p=new Jv(a),d=0;d0&&(T.name=A+(k-1)),k++,C.set(A,k)}}(o),new b0({source:n,dimensions:o,fullDimensionCount:a,dimensionOmitted:s})}function JT(n,t,e){if(e||t.hasKey(n)){for(var i=0;t.hasKey(n+i);)i++;n+=i}return t.set(n,!0),n}var $T=function(){return function(n){this.coordSysDims=[],this.axisMap=re(),this.categoryAxisMap=re(),this.coordSysName=n}}(),QT={cartesian2d:function(n,t,e,i){var r=n.getReferringComponents("xAxis",Qe).models[0],o=n.getReferringComponents("yAxis",Qe).models[0];t.coordSysDims=["x","y"],e.set("x",r),e.set("y",o),$r(r)&&(i.set("x",r),t.firstCategoryDimIndex=0),$r(o)&&(i.set("y",o),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},singleAxis:function(n,t,e,i){var r=n.getReferringComponents("singleAxis",Qe).models[0];t.coordSysDims=["single"],e.set("single",r),$r(r)&&(i.set("single",r),t.firstCategoryDimIndex=0)},polar:function(n,t,e,i){var r=n.getReferringComponents("polar",Qe).models[0],o=r.findAxisModel("radiusAxis"),a=r.findAxisModel("angleAxis");t.coordSysDims=["radius","angle"],e.set("radius",o),e.set("angle",a),$r(o)&&(i.set("radius",o),t.firstCategoryDimIndex=0),$r(a)&&(i.set("angle",a),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},geo:function(n,t,e,i){t.coordSysDims=["lng","lat"]},parallel:function(n,t,e,i){var r=n.ecModel,o=r.getComponent("parallel",n.get("parallelIndex")),a=t.coordSysDims=o.dimensions.slice();D(o.parallelAxisIndex,function(s,l){var u=r.getComponent("parallelAxis",s),c=a[l];e.set(c,u),$r(u)&&(i.set(c,u),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=l))})}};function $r(n){return n.get("type")==="category"}function A0(n,t,e){var i,r,o,a=(e=e||{}).byIndex,s=e.stackedCoordDimension;(function(m){return!w0(m.schema)})(t)?i=t:(r=t.schema,i=r.dimensions,o=t.store);var l,u,c,h,p=!(!n||!n.get("stack"));if(D(i,function(m,_){Q(m)&&(i[_]=m={name:m}),p&&!m.isExtraCoord&&(a||l||!m.ordinalMeta||(l=m),u||m.type==="ordinal"||m.type==="time"||s&&s!==m.coordDim||(u=m))}),!u||a||l||(a=!0),u){c="__\0ecstackresult_"+n.id,h="__\0ecstackedover_"+n.id,l&&(l.createInvertedIndices=!0);var d=u.coordDim,f=u.type,g=0;D(i,function(m){m.coordDim===d&&g++});var y={name:c,coordDim:d,coordDimIndex:g,type:f,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length},v={name:h,coordDim:h,coordDimIndex:g+1,type:f,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length+1};r?(o&&(y.storeDimIndex=o.ensureCalculationDimension(h,f),v.storeDimIndex=o.ensureCalculationDimension(c,f)),r.appendCalculationDimension(y),r.appendCalculationDimension(v)):(i.push(y),i.push(v))}return{stackedDimension:u&&u.name,stackedByDimension:l&&l.name,isStackedByIndex:a,stackedOverDimension:h,stackResultDimension:c}}function fi(n,t){return!!t&&t===n.getCalculationInfo("stackedDimension")}function D0(n,t){return fi(n,t)?n.getCalculationInfo("stackResultDimension"):t}function Ll(n,t,e){e=e||{};var i,r,o=t.getSourceManager();r=(i=o.getSource()).sourceFormat===Jt;var a=function(y){var v=y.get("coordinateSystem"),m=new $T(v),_=QT[v];if(_)return _(y,m,m.axisMap,m.categoryAxisMap),m}(t),s=function(y,v){var m,_=y.get("coordinateSystem"),x=il.get(_);return v&&v.coordSysDims&&(m=j(v.coordSysDims,function(b){var w={name:b},M=v.axisMap.get(b);if(M){var S=M.get("type");w.type=function(C){return C==="category"?"ordinal":C==="time"?"time":"float"}(S)}return w})),m||(m=x&&(x.getDimensionsInfo?x.getDimensionsInfo():x.dimensions.slice())||["x","y"]),m}(t,a),l=e.useEncodeDefaulter,u=ue(l)?l:l?Se(bM,s,t):null,c=Mp(i,{coordDimensions:s,generateCoord:e.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!r}),h=function(y,v,m){var _,x;return m&&D(y,function(b,w){var M=b.coordDim,S=m.categoryAxisMap.get(M);S&&(_==null&&(_=w),b.ordinalMeta=S.getOrdinalMeta(),v&&(b.createInvertedIndices=!0)),b.otherDims.itemName!=null&&(x=!0)}),x||_==null||(y[_].otherDims.itemName=0),_}(c.dimensions,e.createInvertedIndices,a),p=r?null:o.getSharedDataStore(c),d=A0(t,{schema:c,store:p}),f=new Sp(c,t);f.setCalculationInfo(d);var g=h!=null&&function(y){if(y.sourceFormat===Jt){var v=function(m){for(var _=0;_e[1]&&(e[1]=t[1])},n.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},n.prototype.getExtent=function(){return this._extent.slice()},n.prototype.setExtent=function(t,e){var i=this._extent;isNaN(t)||(i[0]=t),isNaN(e)||(i[1]=e)},n.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},n.prototype.isBlank=function(){return this._isBlank},n.prototype.setBlank=function(t){this._isBlank=t},n}();Ss(On);var eC=0,Tp=function(){function n(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++eC}return n.createByAxisModel=function(t){var e=t.option,i=e.data,r=i&&j(i,tC);return new n({categories:r,needCollect:!r,deduplication:e.dedplication!==!1})},n.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},n.prototype.parseAndCollect=function(t){var e,i=this._needCollect;if(!Q(t)&&!i)return t;if(i&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var r=this._getOrCreateMap();return(e=r.get(t))==null&&(i?(e=this.categories.length,this.categories[e]=t,r.set(t,e)):e=NaN),e},n.prototype._getOrCreateMap=function(){return this._map||(this._map=re(this.categories))},n}();function tC(n){return ne(n)&&n.value!=null?n.value:n+""}function Cp(n){return n.type==="interval"||n.type==="log"}function Ip(n){var t=Math.pow(10,ws(n)),e=n/t;return e?e===2?e=3:e===3?e=5:e*=2:e=1,We(e*t)}function k0(n){return wn(n)+2}function L0(n,t,e){n[t]=Math.max(Math.min(n[t],e[1]),e[0])}function Pl(n,t){return n>=t[0]&&n<=t[1]}function Ol(n,t){return t[1]===t[0]?.5:(n-t[0])/(t[1]-t[0])}function Rl(n,t){return n*(t[1]-t[0])+t[0]}var Ap=function(n){function t(e){var i=n.call(this,e)||this;i.type="ordinal";var r=i.getSetting("ordinalMeta");return r||(r=new Tp({})),Y(r)&&(r=new Tp({categories:j(r,function(o){return ne(o)?o.value:o})})),i._ordinalMeta=r,i._extent=i.getSetting("extent")||[0,r.categories.length-1],i}return F(t,n),t.prototype.parse=function(e){return e==null?NaN:Q(e)?this._ordinalMeta.getOrdinal(e):Math.round(e)},t.prototype.contain=function(e){return Pl(e=this.parse(e),this._extent)&&this._ordinalMeta.categories[e]!=null},t.prototype.normalize=function(e){return Ol(e=this._getTickNumber(this.parse(e)),this._extent)},t.prototype.scale=function(e){return e=Math.round(Rl(e,this._extent)),this.getRawOrdinalNumber(e)},t.prototype.getTicks=function(){for(var e=[],i=this._extent,r=i[0];r<=i[1];)e.push({value:r}),r++;return e},t.prototype.getMinorTicks=function(e){},t.prototype.setSortInfo=function(e){if(e!=null){for(var i=e.ordinalNumbers,r=this._ordinalNumbersByTick=[],o=this._ticksByOrdinalNumber=[],a=0,s=this._ordinalMeta.categories.length,l=Math.min(s,i.length);a=0&&e=0&&e=e},t.prototype.getOrdinalMeta=function(){return this._ordinalMeta},t.prototype.calcNiceTicks=function(){},t.prototype.calcNiceExtent=function(){},t.type="ordinal",t}(On);On.registerClass(Ap);var or=We,gi=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type="interval",e._interval=0,e._intervalPrecision=2,e}return F(t,n),t.prototype.parse=function(e){return e},t.prototype.contain=function(e){return Pl(e,this._extent)},t.prototype.normalize=function(e){return Ol(e,this._extent)},t.prototype.scale=function(e){return Rl(e,this._extent)},t.prototype.setExtent=function(e,i){var r=this._extent;isNaN(e)||(r[0]=parseFloat(e)),isNaN(i)||(r[1]=parseFloat(i))},t.prototype.unionExtent=function(e){var i=this._extent;e[0]i[1]&&(i[1]=e[1]),this.setExtent(i[0],i[1])},t.prototype.getInterval=function(){return this._interval},t.prototype.setInterval=function(e){this._interval=e,this._niceExtent=this._extent.slice(),this._intervalPrecision=k0(e)},t.prototype.getTicks=function(e){var i=this._interval,r=this._extent,o=this._niceExtent,a=this._intervalPrecision,s=[];if(!i)return s;r[0]1e4)return[];var u=s.length?s[s.length-1].value:o[1];return r[1]>u&&(e?s.push({value:or(u+i,a)}):s.push({value:r[1]})),s},t.prototype.getMinorTicks=function(e){for(var i=this.getTicks(!0),r=[],o=this.getExtent(),a=1;ao[0]&&ph&&(f=p.interval=h);var g=p.intervalPrecision=k0(f);return function(y,v){!isFinite(y[0])&&(y[0]=v[0]),!isFinite(y[1])&&(y[1]=v[1]),L0(y,0,v),L0(y,1,v),y[0]>y[1]&&(y[0]=y[1])}(p.niceTickExtent=[We(Math.ceil(l[0]/f)*f,g),We(Math.floor(l[1]/f)*f,g)],l),p}(o,e,i,r);this._intervalPrecision=s.intervalPrecision,this._interval=s.interval,this._niceExtent=s.niceTickExtent}},t.prototype.calcNiceExtent=function(e){var i=this._extent;if(i[0]===i[1])if(i[0]!==0){var r=Math.abs(i[0]);e.fixMax||(i[1]+=r/2),i[0]-=r/2}else i[1]=1;var o=i[1]-i[0];isFinite(o)||(i[0]=0,i[1]=1),this.calcNiceTicks(e.splitNumber,e.minInterval,e.maxInterval);var a=this._interval;e.fixMin||(i[0]=or(Math.floor(i[0]/a)*a)),e.fixMax||(i[1]=or(Math.ceil(i[1]/a)*a))},t.prototype.setNiceExtent=function(e,i){this._niceExtent=[e,i]},t.type="interval",t}(On);On.registerClass(gi);var P0=typeof Float32Array<"u",nC=P0?Float32Array:Array;function Kn(n){return Y(n)?P0?new Float32Array(n):n:new nC(n)}function O0(n){return n.get("stack")||"__ec_stack_"+n.seriesIndex}function Dp(n){return n.dim+n.index}function R0(n,t){var e=[];return t.eachSeriesByType(n,function(i){B0(i)&&e.push(i)}),e}function N0(n){var t=function(i){var r={};D(i,function(h){var p=h.coordinateSystem.getBaseAxis();if(p.type==="time"||p.type==="value")for(var d=h.getData(),f=p.dim+"_"+p.index,g=d.getDimensionIndex(d.mapDimension(p.dim)),y=d.getStore(),v=0,m=y.count();v0&&(l=l===null?c:Math.min(l,c))}o[a]=l}}return o}(n),e=[];return D(n,function(i){var r,o=i.coordinateSystem.getBaseAxis(),a=o.getExtent();if(o.type==="category")r=o.getBandWidth();else if(o.type==="value"||o.type==="time"){var s=o.dim+"_"+o.index,l=t[s],u=Math.abs(a[1]-a[0]),c=o.scale.getExtent(),h=Math.abs(c[1]-c[0]);r=l?u/h*l:u}else{var p=i.getData();r=Math.abs(a[1]-a[0])/p.count()}var d=ee(i.get("barWidth"),r),f=ee(i.get("barMaxWidth"),r),g=ee(i.get("barMinWidth")||(V0(i)?.5:1),r),y=i.get("barGap"),v=i.get("barCategoryGap");e.push({bandWidth:r,barWidth:d,barMaxWidth:f,barMinWidth:g,barGap:y,barCategoryGap:v,axisKey:Dp(o),stackId:O0(i)})}),function(i){var r={};D(i,function(a,s){var l=a.axisKey,u=a.bandWidth,c=r[l]||{bandWidth:u,remainedWidth:u,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},h=c.stacks;r[l]=c;var p=a.stackId;h[p]||c.autoWidthCount++,h[p]=h[p]||{width:0,maxWidth:0};var d=a.barWidth;d&&!h[p].width&&(h[p].width=d,d=Math.min(c.remainedWidth,d),c.remainedWidth-=d);var f=a.barMaxWidth;f&&(h[p].maxWidth=f);var g=a.barMinWidth;g&&(h[p].minWidth=g);var y=a.barGap;y!=null&&(c.gap=y);var v=a.barCategoryGap;v!=null&&(c.categoryGap=v)});var o={};return D(r,function(a,s){o[s]={};var l=a.stacks,u=a.bandWidth,c=a.categoryGap;if(c==null){var h=Oe(l).length;c=Math.max(35-4*h,15)+"%"}var p=ee(c,u),d=ee(a.gap,1),f=a.remainedWidth,g=a.autoWidthCount,y=(f-p)/(g+(g-1)*d);y=Math.max(y,0),D(l,function(x){var b=x.maxWidth,w=x.minWidth;if(x.width)M=x.width,b&&(M=Math.min(M,b)),w&&(M=Math.max(M,w)),x.width=M,f-=M+d*M,g--;else{var M=y;b&&bM&&(M=w),M!==y&&(x.width=M,f-=M+d*M,g--)}}),y=(f-p)/(g+(g-1)*d),y=Math.max(y,0);var v,m=0;D(l,function(x,b){x.width||(x.width=y),v=x,m+=x.width*(1+d)}),v&&(m-=v.width*d);var _=-m/2;D(l,function(x,b){o[s][b]=o[s][b]||{bandWidth:u,offset:_,width:x.width},_+=x.width*(1+d)})}),o}(e)}function E0(n,t){var e=R0(n,t),i=N0(e);D(e,function(r){var o=r.getData(),a=r.coordinateSystem.getBaseAxis(),s=O0(r),l=i[Dp(a)][s],u=l.offset,c=l.width;o.setLayout({bandWidth:l.bandWidth,offset:u,size:c})})}function z0(n){return{seriesType:n,plan:Uh(),reset:function(t){if(B0(t)){var e=t.getData(),i=t.coordinateSystem,r=i.getBaseAxis(),o=i.getOtherAxis(r),a=e.getDimensionIndex(e.mapDimension(o.dim)),s=e.getDimensionIndex(e.mapDimension(r.dim)),l=t.get("showBackground",!0),u=e.mapDimension(o.dim),c=e.getCalculationInfo("stackResultDimension"),h=fi(e,u)&&!!e.getCalculationInfo("stackedOnSeries"),p=o.isHorizontal(),d=function(_,x){var b=x.model.get("startValue");return b||(b=0),x.toGlobalCoord(x.dataToCoord(x.type==="log"?b>0?b:1:b))}(0,o),f=V0(t),g=t.get("barMinHeight")||0,y=c&&e.getDimensionIndex(c),v=e.getLayout("size"),m=e.getLayout("offset");return{progress:function(_,x){for(var b,w=_.count,M=f&&Kn(3*w),S=f&&l&&Kn(3*w),C=f&&Kn(w),I=i.master.getRect(),T=p?I.width:I.height,A=x.getStore(),k=0;(b=_.next())!=null;){var L=A.get(h?y:a,b),O=A.get(s,b),P=d,R=void 0;h&&(R=+L-A.get(a,b));var N=void 0,E=void 0,z=void 0,B=void 0;if(p){var G=i.dataToPoint([L,O]);h&&(P=i.dataToPoint([R,O])[0]),N=P,E=G[1]+m,z=G[0]-P,B=v,Math.abs(z)0)for(var d=0;d=0;--d)if(f[g]){h=f[g];break}h=h||p.none}if(Y(h)){var y=a.level==null?0:a.level>=0?a.level:h.length+a.level;h=h[y=Math.min(y,h.length-1)]}}return oa(new Date(a.value),h,c,u)}(e,i,r,this.getSetting("locale"),o)},t.prototype.getTicks=function(){var e=this._interval,i=this._extent,r=[];if(!e)return r;r.push({value:i[0],level:0});var o=this.getSetting("useUTC"),a=function(s,l,u,c){var h,p=Qy,d=0;function f(P,R,N,E,z,B,G){for(var K=new Date(R),V=R,X=K[E]();V1&&B===0&&N.unshift({value:N[0].value-V})}}for(B=0;B=c[0]&&S<=c[1]&&m++)}var C=(c[1]-c[0])/l;if(m>1.5*C&&_>C/1.5||(y.push(w),m>C||s===p[x]))break}v=[]}}var I=He(j(y,function(P){return He(P,function(R){return R.value>=c[0]&&R.value<=c[1]&&!R.notAdd})}),function(P){return P.length>0}),T=[],A=I.length-1;for(x=0;xr&&(this._approxInterval=r);var s=Nl.length,l=Math.min(function(u,c,h,p){for(;h>>1;u[d][1]16?16:n>7.5?7:n>3.5?4:n>1.5?2:1}function rC(n){return(n/=2592e6)>6?6:n>3?3:n>2?2:1}function oC(n){return(n/=Ky)>12?12:n>6?6:n>3.5?4:n>2?2:1}function G0(n,t){return(n/=t?6e4:1e3)>30?30:n>20?20:n>15?15:n>10?10:n>5?5:n>2?2:1}function aC(n){return mc(n,!0)}function sC(n,t,e){var i=new Date(n);switch(Fr(t)){case"year":case"month":i[nv(e)](0);case"day":i[iv(e)](1);case"hour":i[rv(e)](0);case"minute":i[ov(e)](0);case"second":i[av(e)](0),i[sv(e)](0)}return i.getTime()}On.registerClass(F0);var H0=On.prototype,Ma=gi.prototype,lC=We,uC=Math.floor,cC=Math.ceil,El=Math.pow,gn=Math.log,kp=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type="log",e.base=10,e._originalScale=new gi,e._interval=0,e}return F(t,n),t.prototype.getTicks=function(e){var i=this._originalScale,r=this._extent,o=i.getExtent();return j(Ma.getTicks.call(this,e),function(a){var s=a.value,l=We(El(this.base,s));return l=s===r[0]&&this._fixMin?zl(l,o[0]):l,{value:l=s===r[1]&&this._fixMax?zl(l,o[1]):l}},this)},t.prototype.setExtent=function(e,i){var r=gn(this.base);e=gn(Math.max(0,e))/r,i=gn(Math.max(0,i))/r,Ma.setExtent.call(this,e,i)},t.prototype.getExtent=function(){var e=this.base,i=H0.getExtent.call(this);i[0]=El(e,i[0]),i[1]=El(e,i[1]);var r=this._originalScale.getExtent();return this._fixMin&&(i[0]=zl(i[0],r[0])),this._fixMax&&(i[1]=zl(i[1],r[1])),i},t.prototype.unionExtent=function(e){this._originalScale.unionExtent(e);var i=this.base;e[0]=gn(e[0])/gn(i),e[1]=gn(e[1])/gn(i),H0.unionExtent.call(this,e)},t.prototype.unionExtentFromData=function(e,i){this.unionExtent(e.getApproximateExtent(i))},t.prototype.calcNiceTicks=function(e){e=e||10;var i=this._extent,r=i[1]-i[0];if(!(r===1/0||r<=0)){var o=gg(r);for(e/r*o<=.5&&(o*=10);!isNaN(o)&&Math.abs(o)<1&&Math.abs(o)>0;)o*=10;var a=[We(cC(i[0]/o)*o),We(uC(i[1]/o)*o)];this._interval=o,this._niceExtent=a}},t.prototype.calcNiceExtent=function(e){Ma.calcNiceExtent.call(this,e),this._fixMin=e.fixMin,this._fixMax=e.fixMax},t.prototype.parse=function(e){return e},t.prototype.contain=function(e){return Pl(e=gn(e)/gn(this.base),this._extent)},t.prototype.normalize=function(e){return Ol(e=gn(e)/gn(this.base),this._extent)},t.prototype.scale=function(e){return e=Rl(e,this._extent),El(this.base,e)},t.type="log",t}(On),W0=kp.prototype;function zl(n,t){return lC(n,wn(t))}W0.getMinorTicks=Ma.getMinorTicks,W0.getLabel=Ma.getLabel,On.registerClass(kp);var hC=function(){function n(t,e,i){this._prepareParams(t,e,i)}return n.prototype._prepareParams=function(t,e,i){i[1]0&&l>0&&!u&&(s=0),s<0&&l<0&&!c&&(l=0));var p=this._determinedMin,d=this._determinedMax;return p!=null&&(s=p,u=!0),d!=null&&(l=d,c=!0),{min:s,max:l,minFixed:u,maxFixed:c,isBlank:h}},n.prototype.modifyDataMinMax=function(t,e){this[dC[t]]=e},n.prototype.setDeterminedMinMax=function(t,e){this[pC[t]]=e},n.prototype.freeze=function(){this.frozen=!0},n}(),pC={min:"_determinedMin",max:"_determinedMax"},dC={min:"_dataMin",max:"_dataMax"};function X0(n,t,e){var i=n.rawExtentInfo;return i||(i=new hC(n,t,e),n.rawExtentInfo=i,i)}function Bl(n,t){return t==null?null:po(t)?NaN:n.parse(t)}function U0(n,t){var e=n.type,i=X0(n,t,n.getExtent()).calculate();n.setBlank(i.isBlank);var r=i.min,o=i.max,a=t.ecModel;if(a&&e==="time"){var s=R0("bar",a),l=!1;if(D(s,function(h){l=l||h.getBaseAxis()===t.axis}),l){var u=N0(s),c=function(h,p,d,f){var g=d.axis.getExtent(),y=g[1]-g[0],v=function(M,S){if(M&&S){var C=M[Dp(S)];return C}}(f,d.axis);if(v===void 0)return{min:h,max:p};var m=1/0;D(v,function(M){m=Math.min(M.offset,m)});var _=-1/0;D(v,function(M){_=Math.max(M.offset+M.width,_)}),m=Math.abs(m),_=Math.abs(_);var x=m+_,b=p-h,w=b/(1-(m+_)/y)-b;return{min:h-=w*(m/x),max:p+=w*(_/x)}}(r,o,t,u);r=c.min,o=c.max}}return{extent:[r,o],fixMin:i.minFixed,fixMax:i.maxFixed}}function Qr(n,t){var e=t,i=U0(n,e),r=i.extent,o=e.get("splitNumber");n instanceof kp&&(n.base=e.get("logBase"));var a=n.type,s=e.get("interval"),l=a==="interval"||a==="time";n.setExtent(r[0],r[1]),n.calcNiceExtent({splitNumber:o,fixMin:i.fixMin,fixMax:i.fixMax,minInterval:l?e.get("minInterval"):null,maxInterval:l?e.get("maxInterval"):null}),s!=null&&n.setInterval&&n.setInterval(s)}function Vl(n,t){if(t=t||n.get("type"))switch(t){case"category":return new Ap({ordinalMeta:n.getOrdinalMeta?n.getOrdinalMeta():n.getCategories(),extent:[1/0,-1/0]});case"time":return new F0({locale:n.ecModel.getLocaleModel(),useUTC:n.ecModel.get("useUTC")});default:return new(On.getClass(t)||gi)}}function eo(n){var t,e,i=n.getLabelModel().get("formatter"),r=n.type==="category"?n.scale.getExtent()[0]:null;return n.scale.type==="time"?(e=i,function(o,a){return n.scale.getFormattedLabel(o,a,e)}):Q(i)?function(o){return function(a){var s=n.scale.getLabel(a);return o.replace("{value}",s??"")}}(i):ue(i)?(t=i,function(o,a){return r!=null&&(a=o.value-r),t(Lp(n,o),a,o.level!=null?{level:o.level}:null)}):function(o){return n.scale.getLabel(o)}}function Lp(n,t){return n.type==="category"?n.scale.getLabel(t):t.value}function fC(n,t){var e=t*Math.PI/180,i=n.width,r=n.height,o=i*Math.abs(Math.cos(e))+Math.abs(r*Math.sin(e)),a=i*Math.abs(Math.sin(e))+Math.abs(r*Math.cos(e));return new me(n.x,n.y,o,a)}function Pp(n){return n.get("interval")??"auto"}function Y0(n){return n.type==="category"&&Pp(n.getLabelModel())===0}function Fl(n,t){var e={};return D(n.mapDimensionsAll(t),function(i){e[D0(n,i)]=!0}),Oe(e)}var Ta=function(){function n(){}return n.prototype.getNeedCrossZero=function(){return!this.option.scale},n.prototype.getCoordSysModel=function(){},n}(),gC={isDimensionStacked:fi,enableDataStack:A0,getStackedDimension:D0};function Z0(n,t){return nt(n,null,null,(t=t||{}).state!=="normal")}const yC=Object.freeze(Object.defineProperty({__proto__:null,createDimensions:I0,createList:function(n){return Ll(0,n)},createScale:function(n,t){var e=t;t instanceof Le||(e=new Le(t));var i=Vl(e);return i.setExtent(n[0],n[1]),Qr(i,e),i},createSymbol:_t,createTextStyle:Z0,dataStack:gC,enableHoverEmphasis:Wo,getECData:ye,getLayoutRect:It,mixinAxisModelCommonMethods:function(n){at(n,Ta)}},Symbol.toStringTag,{value:"Module"}));var q0=[],vC={registerPreprocessor:gp,registerProcessor:yp,registerPostInit:d0,registerPostUpdate:f0,registerUpdateLifecycle:Il,registerAction:fn,registerCoordinateSystem:g0,registerLayout:y0,registerVisual:pi,registerTransform:_0,registerLoading:mp,registerMap:m0,registerImpl:function(n,t){Km[n]=t},PRIORITY:$m,ComponentModel:be,ComponentView:Xe,SeriesModel:it,ChartView:Je,registerComponentModel:function(n){be.registerClass(n)},registerComponentView:function(n){Xe.registerClass(n)},registerSeriesModel:function(n){it.registerClass(n)},registerChartView:function(n){Je.registerClass(n)},registerSubTypeDefaulter:function(n,t){be.registerSubTypeDefaulter(n,t)},registerPainter:function(n,t){hg(n,t)}};function Lt(n){Y(n)?D(n,function(t){Lt(t)}):we(q0,n)>=0||(q0.push(n),ue(n)&&(n={install:n}),n.install(vC))}function j0(n,t){return Math.abs(n-t)<1e-8}function K0(n,t,e){var i=0,r=n[0];if(!r)return!1;for(var o=1;or&&(e=a,r=l)}if(e)return function(c){for(var h=0,p=0,d=0,f=c.length,g=c[f-1][0],y=c[f-1][1],v=0;v>1^-(1&s),l=l>>1^-(1&l),r=s+=r,o=l+=o,i.push([s/e,l/e])}return i}function r_(n,t){return j(He((n=function(e){if(!e.UTF8Encoding)return e;var i=e,r=i.UTF8Scale;return r==null&&(r=1024),D(i.features,function(o){var a=o.geometry,s=a.encodeOffsets,l=a.coordinates;if(s)switch(a.type){case"LineString":a.coordinates=i_(l,s,r);break;case"Polygon":case"MultiLineString":n_(l,s,r);break;case"MultiPolygon":D(l,function(u,c){return n_(u,s[c],r)})}}),i.UTF8Encoding=!1,i}(n)).features,function(e){return e.geometry&&e.properties&&e.geometry.coordinates.length>0}),function(e){var i=e.properties,r=e.geometry,o=[];switch(r.type){case"Polygon":var a=r.coordinates;o.push(new Q0(a[0],a.slice(1)));break;case"MultiPolygon":D(r.coordinates,function(l){l[0]&&o.push(new Q0(l[0],l.slice(1)))});break;case"LineString":o.push(new e_([r.coordinates]));break;case"MultiLineString":o.push(new e_(r.coordinates))}var s=new t_(i[t||"name"],o,i.cp);return s.properties=i,s})}const xC=Object.freeze(Object.defineProperty({__proto__:null,MAX_SAFE_INTEGER:9007199254740991,asc:Do,getPercentWithPrecision:function(n,t,e){return n[t]&&fg(n,e)[t]||0},getPixelPrecision:yc,getPrecision:wn,getPrecisionSafe:dg,isNumeric:xc,isRadianAroundZero:ko,linearMap:Fe,nice:mc,numericToNumber:Lo,parseDate:Wt,quantile:function(n,t){var e=(n.length-1)*t+1,i=Math.floor(e),r=+n[i-1],o=e-i;return o?r+o*(n[i]-r):r},quantity:gg,quantityExponent:ws,reformIntervals:_c,remRadian:vc,round:We},Symbol.toStringTag,{value:"Module"})),bC=Object.freeze(Object.defineProperty({__proto__:null,format:oa,parse:Wt},Symbol.toStringTag,{value:"Module"})),wC=Object.freeze(Object.defineProperty({__proto__:null,Arc:qo,BezierCurve:Es,BoundingRect:me,Circle:In,CompoundPath:th,Ellipse:Uo,Group:_e,Image:Tt,IncrementalDisplayable:Ay,Line:ut,LinearGradient:jo,Polygon:cn,Polyline:qt,RadialGradient:nh,Rect:ke,Ring:Rr,Sector:Nt,Text:Me,clipPointsByRect:lh,clipRectByRect:Ny,createIcon:Qo,extendPath:Ly,extendShape:ky,getShapeClass:Py,getTransform:$i,initProps:Ye,makeImage:oh,makePath:Hs,mergePath:Kt,registerShape:jt,resizePath:ah,updateProps:ze},Symbol.toStringTag,{value:"Module"})),SC=Object.freeze(Object.defineProperty({__proto__:null,addCommas:xh,capitalFirst:cv,encodeHTML:wt,formatTime:function(n,t,e){n!=="week"&&n!=="month"&&n!=="quarter"&&n!=="half-year"&&n!=="year"||(n=`MM-dd yyyy`);var i=Wt(t),r=e?"getUTC":"get",o=i[r+"FullYear"](),a=i[r+"Month"]()+1,s=i[r+"Date"](),l=i[r+"Hours"](),u=i[r+"Minutes"](),c=i[r+"Seconds"](),h=i[r+"Milliseconds"]();return n.replace("MM",vt(a,2)).replace("M",a).replace("yyyy",o).replace("yy",vt(o%100+"",2)).replace("dd",vt(s,2)).replace("d",s).replace("hh",vt(l,2)).replace("h",l).replace("mm",vt(u,2)).replace("m",u).replace("ss",vt(c,2)).replace("s",c).replace("SSS",vt(h,3))},formatTpl:Mh,getTextRect:function(n,t,e,i,r,o,a,s){return new Me({style:{text:n,font:t,align:e,verticalAlign:i,padding:r,rich:o,overflow:a?"truncate":null,lineHeight:s}}).getBoundingRect()},getTooltipMarker:uv,normalizeCssArray:Hr,toCamelCase:bh,truncateText:kg},Symbol.toStringTag,{value:"Module"})),MC=Object.freeze(Object.defineProperty({__proto__:null,bind:he,clone:ae,curry:Se,defaults:ce,each:D,extend:H,filter:He,indexOf:we,inherits:Su,isArray:Y,isFunction:ue,isObject:ne,isString:Q,map:j,merge:de,reduce:nn},Symbol.toStringTag,{value:"Module"}));var Ca=Ee();function o_(n,t){var e=j(t,function(i){return n.scale.parse(i)});return n.type==="time"&&e.length>0&&(e.sort(),e.unshift(e[0]),e.push(e[e.length-1])),e}function a_(n,t){var e,i,r=s_(n,"labels"),o=Pp(t);return l_(r,o)||(ue(o)?e=h_(n,o):(i=o==="auto"?function(a){var s=Ca(a).autoInterval;return s??(Ca(a).autoInterval=a.calculateCategoryInterval())}(n):o,e=c_(n,i)),u_(r,o,{labels:e,labelCategoryInterval:i}))}function s_(n,t){return Ca(n)[t]||(Ca(n)[t]=[])}function l_(n,t){for(var e=0;e1&&c/l>2&&(u=Math.round(Math.ceil(u/l)*l));var h=Y0(n),p=a.get("showMinLabel")||h,d=a.get("showMaxLabel")||h;p&&u!==o[0]&&g(o[0]);for(var f=u;f<=o[1];f+=l)g(f);function g(y){var v={value:y};s.push(e?y:{formattedLabel:i(v),rawLabel:r.getLabel(v),tickValue:y})}return d&&f-l!==o[1]&&g(o[1]),s}function h_(n,t,e){var i=n.scale,r=eo(n),o=[];return D(i.getTicks(),function(a){var s=i.getLabel(a),l=a.value;t(a.value,s)&&o.push(e?l:{formattedLabel:r(a),rawLabel:s,tickValue:l})}),o}var p_=[0,1],Rn=function(){function n(t,e,i){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=e,this._extent=i||[0,0]}return n.prototype.contain=function(t){var e=this._extent,i=Math.min(e[0],e[1]),r=Math.max(e[0],e[1]);return t>=i&&t<=r},n.prototype.containData=function(t){return this.scale.contain(t)},n.prototype.getExtent=function(){return this._extent.slice()},n.prototype.getPixelPrecision=function(t){return yc(t||this.scale.getExtent(),this._extent)},n.prototype.setExtent=function(t,e){var i=this._extent;i[0]=t,i[1]=e},n.prototype.dataToCoord=function(t,e){var i=this._extent,r=this.scale;return t=r.normalize(t),this.onBand&&r.type==="ordinal"&&d_(i=i.slice(),r.count()),Fe(t,p_,i,e)},n.prototype.coordToData=function(t,e){var i=this._extent,r=this.scale;this.onBand&&r.type==="ordinal"&&d_(i=i.slice(),r.count());var o=Fe(t,i,p_,e);return this.scale.scale(o)},n.prototype.pointToData=function(t,e){},n.prototype.getTicksCoords=function(t){var e=(t=t||{}).tickModel||this.getTickModel(),i=j(function(r,o){var a=r.getTickModel().get("customValues");return a?{ticks:o_(r,a)}:r.type==="category"?function(s,l){var u,c,h=s_(s,"ticks"),p=Pp(l),d=l_(h,p);if(d)return d;if(l.get("show")&&!s.scale.isBlank()||(u=[]),ue(p))u=h_(s,p,!0);else if(p==="auto"){var f=a_(s,s.getLabelModel());c=f.labelCategoryInterval,u=j(f.labels,function(g){return g.tickValue})}else u=c_(s,c=p,!0);return u_(h,p,{ticks:u,tickCategoryInterval:c})}(r,o):{ticks:j(r.scale.getTicks(),function(s){return s.value})}}(this,e).ticks,function(r){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(r):r),tickValue:r}},this);return function(r,o,a,s){var l=o.length;if(r.onBand&&!a&&l){var u,c,h=r.getExtent();if(l===1)o[0].coord=h[0],u=o[1]={coord:h[1]};else{var p=o[l-1].tickValue-o[0].tickValue,d=(o[l-1].coord-o[0].coord)/p;D(o,function(y){y.coord-=d/2}),c=1+r.scale.getExtent()[1]-o[l-1].tickValue,u={coord:o[l-1].coord+d*c},o.push(u)}var f=h[0]>h[1];g(o[0].coord,h[0])&&(s?o[0].coord=h[0]:o.shift()),s&&g(h[0],o[0].coord)&&o.unshift({coord:h[0]}),g(h[1],u.coord)&&(s?u.coord=h[1]:o.pop()),s&&g(u.coord,h[1])&&o.push({coord:h[1]})}function g(y,v){return y=We(y),v=We(v),f?y>v:y0&&t<100||(t=5),j(this.scale.getMinorTicks(t),function(e){return j(e,function(i){return{coord:this.dataToCoord(i),tickValue:i}},this)},this)},n.prototype.getViewLabels=function(){return function(t){var e=t.getLabelModel().get("customValues");if(e){var i=eo(t);return{labels:o_(t,e).map(function(r){var o={value:r};return{formattedLabel:i(o),rawLabel:t.scale.getLabel(o),tickValue:r}})}}return t.type==="category"?function(r){var o=r.getLabelModel(),a=a_(r,o);return!o.get("show")||r.scale.isBlank()?{labels:[],labelCategoryInterval:a.labelCategoryInterval}:a}(t):function(r){var o=r.scale.getTicks(),a=eo(r);return{labels:j(o,function(s,l){return{level:s.level,formattedLabel:a(s,l),rawLabel:r.scale.getLabel(s),tickValue:s.value}})}}(t)}(this).labels},n.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},n.prototype.getTickModel=function(){return this.model.getModel("axisTick")},n.prototype.getBandWidth=function(){var t=this._extent,e=this.scale.getExtent(),i=e[1]-e[0]+(this.onBand?1:0);i===0&&(i=1);var r=Math.abs(t[1]-t[0]);return Math.abs(r)/i},n.prototype.calculateCategoryInterval=function(){return function(t){var e=function(C){var I=C.getLabelModel();return{axisRotate:C.getRotate?C.getRotate():C.isHorizontal&&!C.isHorizontal()?90:0,labelRotate:I.get("rotate")||0,font:I.getFont()}}(t),i=eo(t),r=(e.axisRotate-e.labelRotate)/180*Math.PI,o=t.scale,a=o.getExtent(),s=o.count();if(a[1]-a[0]<1)return 0;var l=1;s>40&&(l=Math.max(1,Math.floor(s/40)));for(var u=a[0],c=t.dataToCoord(u+1)-t.dataToCoord(u),h=Math.abs(c*Math.cos(r)),p=Math.abs(c*Math.sin(r)),d=0,f=0;u<=a[1];u+=l){var g,y,v=Io(i({value:u}),e.font,"center","top");g=1.3*v.width,y=1.3*v.height,d=Math.max(d,g,7),f=Math.max(f,y,7)}var m=d/h,_=f/p;isNaN(m)&&(m=1/0),isNaN(_)&&(_=1/0);var x=Math.max(0,Math.floor(Math.min(m,_))),b=Ca(t.model),w=t.getExtent(),M=b.lastAutoInterval,S=b.lastTickCount;return M!=null&&S!=null&&Math.abs(M-x)<=1&&Math.abs(S-s)<=1&&M>x&&b.axisExtent0===w[0]&&b.axisExtent1===w[1]?x=M:(b.lastTickCount=s,b.lastAutoInterval=x,b.axisExtent0=w[0],b.axisExtent1=w[1]),x}(this)},n}();function d_(n,t){var e=(n[1]-n[0])/t/2;n[0]+=e,n[1]-=e}function TC(n){var t=be.extend(n);return be.registerClass(t),t}function CC(n){var t=Xe.extend(n);return Xe.registerClass(t),t}function IC(n){var t=it.extend(n);return it.registerClass(t),t}function AC(n){var t=Je.extend(n);return Je.registerClass(t),t}var Ia=2*Math.PI,ar=ai.CMD,DC=["top","right","bottom","left"];function kC(n,t,e,i,r){var o=e.width,a=e.height;switch(n){case"top":i.set(e.x+o/2,e.y-t),r.set(0,-1);break;case"bottom":i.set(e.x+o/2,e.y+a+t),r.set(0,1);break;case"left":i.set(e.x-t,e.y+a/2),r.set(-1,0);break;case"right":i.set(e.x+o+t,e.y+a/2),r.set(1,0)}}function LC(n,t,e,i,r,o,a,s,l){a-=n,s-=t;var u=Math.sqrt(a*a+s*s),c=(a/=u)*e+n,h=(s/=u)*e+t;if(Math.abs(i-r)%Ia<1e-4)return l[0]=c,l[1]=h,u-e;if(o){var p=i;i=Xn(r),r=Xn(p)}else i=Xn(i),r=Xn(r);i>r&&(r+=Ia);var d=Math.atan2(s,a);if(d<0&&(d+=Ia),d>=i&&d<=r||d+Ia>=i&&d+Ia<=r)return l[0]=c,l[1]=h,u-e;var f=e*Math.cos(i)+n,g=e*Math.sin(i)+t,y=e*Math.cos(r)+n,v=e*Math.sin(r)+t,m=(f-a)*(f-a)+(g-s)*(g-s),_=(y-a)*(y-a)+(v-s)*(v-s);return m<_?(l[0]=f,l[1]=g,Math.sqrt(m)):(l[0]=y,l[1]=v,Math.sqrt(_))}function Gl(n,t,e,i,r,o,a,s){var l=r-n,u=o-t,c=e-n,h=i-t,p=Math.sqrt(c*c+h*h),d=(l*(c/=p)+u*(h/=p))/p;s&&(d=Math.min(Math.max(d,0),1)),d*=p;var f=a[0]=n+d*c,g=a[1]=t+d*h;return Math.sqrt((f-r)*(f-r)+(g-o)*(g-o))}function f_(n,t,e,i,r,o,a){e<0&&(n+=e,e=-e),i<0&&(t+=i,i=-i);var s=n+e,l=t+i,u=a[0]=Math.min(Math.max(r,n),s),c=a[1]=Math.min(Math.max(o,t),l);return Math.sqrt((u-r)*(u-r)+(c-o)*(c-o))}var yn=[];function PC(n,t,e){var i=f_(t.x,t.y,t.width,t.height,n.x,n.y,yn);return e.set(yn[0],yn[1]),i}function OC(n,t,e){for(var i,r,o=0,a=0,s=0,l=0,u=1/0,c=t.data,h=n.x,p=n.y,d=0;d0){t=t/180*Math.PI,vn.fromArray(n[0]),Re.fromArray(n[1]),Ue.fromArray(n[2]),ge.sub(Nn,vn,Re),ge.sub(En,Ue,Re);var e=Nn.len(),i=En.len();if(!(e<.001||i<.001)){Nn.scale(1/e),En.scale(1/i);var r=Nn.dot(En);if(Math.cos(t)1&&ge.copy(xt,Ue),xt.toArray(n[1])}}}}function RC(n,t,e){if(e<=180&&e>0){e=e/180*Math.PI,vn.fromArray(n[0]),Re.fromArray(n[1]),Ue.fromArray(n[2]),ge.sub(Nn,Re,vn),ge.sub(En,Ue,Re);var i=Nn.len(),r=En.len();if(!(i<.001||r<.001)&&(Nn.scale(1/i),En.scale(1/r),Nn.dot(t)=a)ge.copy(xt,Ue);else{xt.scaleAndAdd(En,o/Math.tan(Math.PI/2-s));var l=Ue.x!==Re.x?(xt.x-Re.x)/(Ue.x-Re.x):(xt.y-Re.y)/(Ue.y-Re.y);if(isNaN(l))return;l<0?ge.copy(xt,Re):l>1&&ge.copy(xt,Ue)}xt.toArray(n[1])}}}function Rp(n,t,e,i){var r=e==="normal",o=r?n:n.ensureState(e);o.ignore=t;var a=i.get("smooth");a&&a===!0&&(a=.3),o.shape=o.shape||{},a>0&&(o.shape.smooth=a);var s=i.getModel("lineStyle").getLineStyle();r?n.useStyle(s):o.style=s}function NC(n,t){var e=t.smooth,i=t.points;if(i)if(n.moveTo(i[0][0],i[0][1]),e>0&&i.length>=3){var r=Qa(i[0],i[1]),o=Qa(i[1],i[2]);if(!r||!o)return n.lineTo(i[1][0],i[1][1]),void n.lineTo(i[2][0],i[2][1]);var a=Math.min(r,o)*e,s=es([],i[1],i[0],a/r),l=es([],i[1],i[2],a/o),u=es([],s,l,.5);n.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),n.bezierCurveTo(l[0],l[1],l[0],l[1],i[2][0],i[2][1])}else for(var c=1;c0&&o&&x(-c/a,0,a);var f,g,y=n[0],v=n[a-1];return m(),f<0&&b(-f,.8),g<0&&b(g,.8),m(),_(f,g,1),_(g,f,-1),m(),f<0&&w(-f),g<0&&w(g),u}function m(){f=y.rect[t]-i,g=r-v.rect[t]-v.rect[e]}function _(M,S,C){if(M<0){var I=Math.min(S,-M);if(I>0){x(I*C,0,a);var T=I+M;T<0&&b(-T*C,1)}else b(-M*C,1)}}function x(M,S,C){M!==0&&(u=!0);for(var I=S;I0)for(T=0;T0;T--)x(-C[T-1]*L,T,a)}}function w(M){var S=M<0?-1:1;M=Math.abs(M);for(var C=Math.ceil(M/(a-1)),I=0;I0?x(C,0,I+1):x(-C,a-I-1,a),(M-=C)<=0)return}}function __(n,t,e,i){return m_(n,"y","height",t,e,i)}function x_(n){var t=[];n.sort(function(g,y){return y.priority-g.priority});var e=new me(0,0,0,0);function i(g){if(!g.ignore){var y=g.ensureState("emphasis");y.ignore==null&&(y.ignore=!1)}g.ignore=!0}for(var r=0;r=0&&i.attr(f.oldLayoutSelect),we(c,"emphasis")>=0&&i.attr(f.oldLayoutEmphasis)),ze(i,l,e,s)}else if(i.attr(l),!Br(i).valueAnimation){var h=xe(i.style.opacity,1);i.style.opacity=0,Ye(i,{style:{opacity:h}},e,s)}if(f.oldLayout=l,i.states.select){var p=f.oldLayoutSelect={};Wl(p,l,Xl),Wl(p,i.states.select,Xl)}if(i.states.emphasis){var d=f.oldLayoutEmphasis={};Wl(d,l,Xl),Wl(d,i.states.emphasis,Xl)}Yy(i,s,u,e,e)}if(r&&!r.ignore&&!r.invisible){o=(f=BC(r)).oldLayout;var f,g={points:r.shape.points};o?(r.attr({shape:o}),ze(r,{shape:g},e)):(r.setShape(g),r.style.strokePercent=0,Ye(r,{style:{strokePercent:1}},e)),f.oldLayout=g}},n}(),Bp=Ee();function FC(n){n.registerUpdateLifecycle("series:beforeupdate",function(t,e,i){var r=Bp(e).labelManager;r||(r=Bp(e).labelManager=new VC),r.clearLabels()}),n.registerUpdateLifecycle("series:layoutlabels",function(t,e,i){var r=Bp(e).labelManager;i.updatedSeries.forEach(function(o){r.addLabelsOfSeries(e.getViewOfSeriesModel(o))}),r.updateLayoutConfig(e),r.layout(e),r.processLabelsOverall()})}var GC=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e.hasSymbolVisual=!0,e}return F(t,n),t.prototype.getInitialData=function(e){return Ll(0,this,{useEncodeDefaulter:!0})},t.prototype.getLegendIcon=function(e){var i=new _e,r=_t("line",0,e.itemHeight/2,e.itemWidth,0,e.lineStyle.stroke,!1);i.add(r),r.setStyle(e.lineStyle);var o=this.getData().getVisual("symbol"),a=this.getData().getVisual("symbolRotate"),s=o==="none"?"circle":o,l=.8*e.itemHeight,u=_t(s,(e.itemWidth-l)/2,(e.itemHeight-l)/2,l,l,e.itemStyle.fill);i.add(u),u.setStyle(e.itemStyle);var c=e.iconRotate==="inherit"?a:e.iconRotate||0;return u.rotation=c*Math.PI/180,u.setOrigin([e.itemWidth/2,e.itemHeight/2]),s.indexOf("empty")>-1&&(u.style.stroke=u.style.fill,u.style.fill="#fff",u.style.lineWidth=2),i},t.type="series.line",t.dependencies=["grid","polar"],t.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},t}(it);function Ul(n,t){var e=n.mapDimensionsAll("defaultedLabel"),i=e.length;if(i===1){var r=jr(n,t,e[0]);return r!=null?r+"":null}if(i){for(var o=[],a=0;a=0&&i.push(t[o])}return i.join(" ")}var Vp=function(n){function t(e,i,r,o){var a=n.call(this)||this;return a.updateData(e,i,r,o),a}return F(t,n),t.prototype._createSymbol=function(e,i,r,o,a){this.removeAll();var s=_t(e,-1,-1,2,2,null,a);s.attr({z2:100,culling:!0,scaleX:o[0]/2,scaleY:o[1]/2}),s.drift=HC,this._symbolType=e,this.add(s)},t.prototype.stopSymbolAnimation=function(e){this.childAt(0).stopAnimation(null,e)},t.prototype.getSymbolType=function(){return this._symbolType},t.prototype.getSymbolPath=function(){return this.childAt(0)},t.prototype.highlight=function(){kr(this.childAt(0))},t.prototype.downplay=function(){Lr(this.childAt(0))},t.prototype.setZ=function(e,i){var r=this.childAt(0);r.zlevel=e,r.z=i},t.prototype.setDraggable=function(e,i){var r=this.childAt(0);r.draggable=e,r.cursor=!i&&e?"move":r.cursor},t.prototype.updateData=function(e,i,r,o){this.silent=!1;var a=e.getItemVisual(i,"symbol")||"circle",s=e.hostModel,l=t.getSymbolSize(e,i),u=a!==this._symbolType,c=o&&o.disableAnimation;if(u){var h=e.getItemVisual(i,"symbolKeepAspect");this._createSymbol(a,e,i,l,h)}else{(d=this.childAt(0)).silent=!1;var p={scaleX:l[0]/2,scaleY:l[1]/2};c?d.attr(p):ze(d,p,s,i),Er(d)}if(this._updateCommon(e,i,l,r,o),u){var d=this.childAt(0);c||(p={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:d.style.opacity}},d.scaleX=d.scaleY=0,d.style.opacity=0,Ye(d,p,s,i))}c&&this.childAt(0).stopAnimation("leave")},t.prototype._updateCommon=function(e,i,r,o,a){var s,l,u,c,h,p,d,f,g,y=this.childAt(0),v=e.hostModel;if(o&&(s=o.emphasisItemStyle,l=o.blurItemStyle,u=o.selectItemStyle,c=o.focus,h=o.blurScope,d=o.labelStatesModels,f=o.hoverScale,g=o.cursorStyle,p=o.emphasisDisabled),!o||e.hasItemOption){var m=o&&o.itemModel?o.itemModel:e.getItemModel(i),_=m.getModel("emphasis");s=_.getModel("itemStyle").getItemStyle(),u=m.getModel(["select","itemStyle"]).getItemStyle(),l=m.getModel(["blur","itemStyle"]).getItemStyle(),c=_.get("focus"),h=_.get("blurScope"),p=_.get("disabled"),d=kn(m),f=_.getShallow("scale"),g=m.getShallow("cursor")}var x=e.getItemVisual(i,"symbolRotate");y.attr("rotation",(x||0)*Math.PI/180||0);var b=jh(e.getItemVisual(i,"symbolOffset"),r);b&&(y.x=b[0],y.y=b[1]),g&&y.attr("cursor",g);var w=e.getItemVisual(i,"style"),M=w.fill;if(y instanceof Tt){var S=y.style;y.useStyle(H({image:S.image,x:S.x,y:S.y,width:S.width,height:S.height},w))}else y.__isEmptyBrush?y.useStyle(H({},w)):y.useStyle(w),y.style.decal=null,y.setColor(M,a&&a.symbolInnerColor),y.style.strokeNoScale=!0;var C=e.getItemVisual(i,"liftZ"),I=this._z2;C!=null?I==null&&(this._z2=y.z2,y.z2+=C):I!=null&&(y.z2=I,this._z2=null);var T=a&&a.useNameLabel;Dn(y,d,{labelFetcher:v,labelDataIndex:i,defaultText:function(L){return T?e.getName(L):Ul(e,L)},inheritColor:M,defaultOpacity:w.opacity}),this._sizeX=r[0]/2,this._sizeY=r[1]/2;var A=y.ensureState("emphasis");A.style=s,y.ensureState("select").style=u,y.ensureState("blur").style=l;var k=f==null||f===!0?Math.max(1.1,3/this._sizeY):isFinite(f)&&f>0?+f:1;A.scaleX=this._sizeX*k,A.scaleY=this._sizeY*k,this.setSymbolScale(1),ln(this,c,h,p)},t.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},t.prototype.fadeOut=function(e,i,r){var o=this.childAt(0),a=ye(this).dataIndex,s=r&&r.animation;if(this.silent=o.silent=!0,r&&r.fadeLabel){var l=o.getTextContent();l&&Ko(l,{style:{opacity:0}},i,{dataIndex:a,removeOpt:s,cb:function(){o.removeTextContent()}})}else o.removeTextContent();Ko(o,{style:{opacity:0},scaleX:0,scaleY:0},i,{dataIndex:a,cb:e,removeOpt:s})},t.getSymbolSize=function(e,i){return Nm(e.getItemVisual(i,"symbolSize"))},t}(_e);function HC(n,t){this.parent.drift(n,t)}function Fp(n,t,e,i){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(i.isIgnore&&i.isIgnore(e))&&!(i.clipShape&&!i.clipShape.contain(t[0],t[1]))&&n.getItemVisual(e,"symbol")!=="none"}function S_(n){return n==null||ne(n)||(n={isIgnore:n}),n||{}}function M_(n){var t=n.hostModel,e=t.getModel("emphasis");return{emphasisItemStyle:e.getModel("itemStyle").getItemStyle(),blurItemStyle:t.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:t.getModel(["select","itemStyle"]).getItemStyle(),focus:e.get("focus"),blurScope:e.get("blurScope"),emphasisDisabled:e.get("disabled"),hoverScale:e.get("scale"),labelStatesModels:kn(t),cursorStyle:t.get("cursor")}}var WC=function(){function n(t){this.group=new _e,this._SymbolCtor=t||Vp}return n.prototype.updateData=function(t,e){this._progressiveEls=null,e=S_(e);var i=this.group,r=t.hostModel,o=this._data,a=this._SymbolCtor,s=e.disableAnimation,l=M_(t),u={disableAnimation:s},c=e.getSymbolPoint||function(h){return t.getItemLayout(h)};o||i.removeAll(),t.diff(o).add(function(h){var p=c(h);if(Fp(t,p,h,e)){var d=new a(t,h,l,u);d.setPosition(p),t.setItemGraphicEl(h,d),i.add(d)}}).update(function(h,p){var d=o.getItemGraphicEl(p),f=c(h);if(Fp(t,f,h,e)){var g=t.getItemVisual(h,"symbol")||"circle",y=d&&d.getSymbolType&&d.getSymbolType();if(!d||y&&y!==g)i.remove(d),(d=new a(t,h,l,u)).setPosition(f);else{d.updateData(t,h,l,u);var v={x:f[0],y:f[1]};s?d.attr(v):ze(d,v,r)}i.add(d),t.setItemGraphicEl(h,d)}else i.remove(d)}).remove(function(h){var p=o.getItemGraphicEl(h);p&&p.fadeOut(function(){i.remove(p)},r)}).execute(),this._getSymbolPoint=c,this._data=t},n.prototype.updateLayout=function(){var t=this,e=this._data;e&&e.eachItemGraphicEl(function(i,r){var o=t._getSymbolPoint(r);i.setPosition(o),i.markRedraw()})},n.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=M_(t),this._data=null,this.group.removeAll()},n.prototype.incrementalUpdate=function(t,e,i){function r(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}this._progressiveEls=[],i=S_(i);for(var o=t.start;o0?y=v[0]:v[1]<0&&(y=v[1]),y}(r,e),a=i.dim,s=r.dim,l=t.mapDimension(s),u=t.mapDimension(a),c=s==="x"||s==="radius"?1:0,h=j(n.dimensions,function(f){return t.mapDimension(f)}),p=!1,d=t.getCalculationInfo("stackResultDimension");return fi(t,h[0])&&(p=!0,h[0]=d),fi(t,h[1])&&(p=!0,h[1]=d),{dataDimsForPoint:h,valueStart:o,valueAxisDim:s,baseAxisDim:a,stacked:!!p,valueDim:l,baseDim:u,baseDataOffset:c,stackedOverDimension:t.getCalculationInfo("stackedOverDimension")}}function C_(n,t,e,i){var r=NaN;n.stacked&&(r=e.get(e.getCalculationInfo("stackedOverDimension"),i)),isNaN(r)&&(r=n.valueStart);var o=n.baseDataOffset,a=[];return a[o]=e.get(n.baseDim,i),a[1-o]=r,t.dataToPoint(a)}var yi=Math.min,vi=Math.max;function sr(n,t){return isNaN(n)||isNaN(t)}function Gp(n,t,e,i,r,o,a,s,l){for(var u,c,h,p,d,f,g=e,y=0;y=r||g<0)break;if(sr(v,m)){if(l){g+=o;continue}break}if(g===e)n[o>0?"moveTo":"lineTo"](v,m),h=v,p=m;else{var _=v-u,x=m-c;if(_*_+x*x<.5){g+=o;continue}if(a>0){for(var b=g+o,w=t[2*b],M=t[2*b+1];w===v&&M===m&&y=i||sr(w,M))d=v,f=m;else{I=w-u,T=M-c;var L=v-u,O=w-v,P=m-c,R=M-m,N=void 0,E=void 0;if(s==="x"){var z=I>0?1:-1;d=v-z*(N=Math.abs(L))*a,f=m,A=v+z*(E=Math.abs(O))*a,k=m}else if(s==="y"){var B=T>0?1:-1;d=v,f=m-B*(N=Math.abs(P))*a,A=v,k=m+B*(E=Math.abs(R))*a}else N=Math.sqrt(L*L+P*P),d=v-I*a*(1-(C=(E=Math.sqrt(O*O+R*R))/(E+N))),f=m-T*a*(1-C),k=m+T*a*C,A=yi(A=v+I*a*C,vi(w,v)),k=yi(k,vi(M,m)),A=vi(A,yi(w,v)),f=m-(T=(k=vi(k,yi(M,m)))-m)*N/E,d=yi(d=v-(I=A-v)*N/E,vi(u,v)),f=yi(f,vi(c,m)),A=v+(I=v-(d=vi(d,yi(u,v))))*E/N,k=m+(T=m-(f=vi(f,yi(c,m))))*E/N}n.bezierCurveTo(h,p,d,f,v,m),h=A,p=k}else n.lineTo(v,m)}u=v,c=m,g+=o}return y}var I_=function(){this.smooth=0,this.smoothConstraint=!0},XC=function(n){function t(e){var i=n.call(this,e)||this;return i.type="ec-polyline",i}return F(t,n),t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new I_},t.prototype.buildPath=function(e,i){var r=i.points,o=0,a=r.length/2;if(i.connectNulls){for(;a>0&&sr(r[2*a-2],r[2*a-1]);a--);for(;o=0){var m=l?(p-o)*v+o:(h-r)*v+r;return l?[e,m]:[m,e]}r=h,o=p;break;case s.C:h=a[c++],p=a[c++],d=a[c++],f=a[c++],g=a[c++],y=a[c++];var _=l?ls(r,h,d,g,e,u):ls(o,p,f,y,e,u);if(_>0)for(var x=0;x<_;x++){var b=u[x];if(b<=1&&b>=0)return m=l?$e(o,p,f,y,b):$e(r,h,d,g,b),l?[e,m]:[m,e]}r=g,o=y}}},t}(Ie),UC=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return F(t,n),t}(I_),YC=function(n){function t(e){var i=n.call(this,e)||this;return i.type="ec-polygon",i}return F(t,n),t.prototype.getDefaultShape=function(){return new UC},t.prototype.buildPath=function(e,i){var r=i.points,o=i.stackedOnPoints,a=0,s=r.length/2,l=i.smoothMonotone;if(i.connectNulls){for(;s>0&&sr(r[2*s-2],r[2*s-1]);s--);for(;aU)return!1;return!0}(oe,X))){var se=X.mapDimension(oe.dim),ie={};return D(oe.getViewLabels(),function(J){var $=oe.scale.getRawOrdinalNumber(J.tickValue);ie[$]=1}),function(J){return!ie.hasOwnProperty(X.get(se,J))}}}}(e,l,a),I=this._data;I&&I.eachItemGraphicEl(function(V,X){V.__temp&&(s.remove(V),I.setItemGraphicEl(X,null))}),M||f.remove(),s.add(v);var T,A=!p&&e.get("step");a&&a.getArea&&e.get("clip",!0)&&((T=a.getArea()).width!=null?(T.x-=.1,T.y-=.1,T.width+=.2,T.height+=.2):T.r0&&(T.r0-=.5,T.r+=.5)),this._clipShapeForSymbol=T;var k=function(V,X,Z){var W=V.getVisual("visualMeta");if(W&&W.length&&V.count()&&X.type==="cartesian2d"){for(var te,oe,se=W.length-1;se>=0;se--){var ie=V.getDimensionInfo(W[se].dimension);if((te=ie&&ie.coordDim)==="x"||te==="y"){oe=W[se];break}}if(oe){var J=X.getAxis(te),$=j(oe.stops,function(qe){return{coord:J.toGlobalCoord(J.dataToCoord(qe.value)),color:qe.color}}),q=$.length,U=oe.outerColors.slice();q&&$[0].coord>$[q-1].coord&&($.reverse(),U.reverse());var le=function(qe,dt){var Ne,Ge,pe=[],ot=qe.length;function Ve(Qn,uo,gr){var Ua=Qn.coord;return{coord:gr,color:qu((gr-Ua)/(uo.coord-Ua),[Qn.color,uo.color])}}for(var et=0;etdt){Ge?pe.push(Ve(Ge,je,dt)):Ne&&pe.push(Ve(Ne,je,0),Ve(Ne,je,dt));break}Ne&&(pe.push(Ve(Ne,je,0)),Ne=null),pe.push(je),Ge=je}}return pe}($,te==="x"?Z.getWidth():Z.getHeight()),ve=le.length;if(!ve&&q)return $[0].coord<0?U[1]?U[1]:$[q-1].color:U[0]?U[0]:$[0].color;var Te=le[0].coord-10,Ce=le[ve-1].coord+10,Pe=Ce-Te;if(Pe<.001)return"transparent";D(le,function(qe){qe.offset=(qe.coord-Te)/Pe}),le.push({offset:ve?le[ve-1].offset:.5,color:U[1]||"transparent"}),le.unshift({offset:ve?le[0].offset:.5,color:U[0]||"transparent"});var Be=new jo(0,0,0,0,le,!0);return Be[te]=Te,Be[te+"2"]=Ce,Be}}}(l,a,r)||l.getVisual("style")[l.getVisual("drawType")];if(g&&d.type===a.type&&A===this._step){_&&!y?y=this._newPolygon(h,w):y&&!_&&(v.remove(y),y=this._polygon=null),p||this._initOrUpdateEndLabel(e,a,Qi(k));var L=v.getClipPath();L?Ye(L,{shape:Wp(this,a,!1,e).shape},e):v.setClipPath(Wp(this,a,!0,e)),M&&f.updateData(l,{isIgnore:C,clipShape:T,disableAnimation:!0,getSymbolPoint:function(V){return[h[2*V],h[2*V+1]]}}),L_(this._stackedOnPoints,w)&&L_(this._points,h)||(m?this._doUpdateAnimation(l,w,a,r,A,x,S):(A&&(h=mi(h,a,A,S),w&&(w=mi(w,a,A,S))),g.setShape({points:h}),y&&y.setShape({points:h,stackedOnPoints:w})))}else M&&f.updateData(l,{isIgnore:C,clipShape:T,disableAnimation:!0,getSymbolPoint:function(V){return[h[2*V],h[2*V+1]]}}),m&&this._initSymbolLabelAnimation(l,a,T),A&&(h=mi(h,a,A,S),w&&(w=mi(w,a,A,S))),g=this._newPolyline(h),_?y=this._newPolygon(h,w):y&&(v.remove(y),y=this._polygon=null),p||this._initOrUpdateEndLabel(e,a,Qi(k)),v.setClipPath(Wp(this,a,!0,e));var O=e.getModel("emphasis"),P=O.get("focus"),R=O.get("blurScope"),N=O.get("disabled");g.useStyle(ce(u.getLineStyle(),{fill:"none",stroke:k,lineJoin:"bevel"})),Zn(g,e,"lineStyle"),g.style.lineWidth>0&&e.get(["emphasis","lineStyle","width"])==="bolder"&&(g.getState("emphasis").style.lineWidth=+g.style.lineWidth+1),ye(g).seriesIndex=e.seriesIndex,ln(g,P,R,N);var E=R_(e.get("smooth")),z=e.get("smoothMonotone");if(g.setShape({smooth:E,smoothMonotone:z,connectNulls:S}),y){var B=l.getCalculationInfo("stackedOnSeries"),G=0;y.useStyle(ce(c.getAreaStyle(),{fill:k,opacity:.7,lineJoin:"bevel",decal:l.getVisual("style").decal})),B&&(G=R_(B.get("smooth"))),y.setShape({smooth:E,stackedOnSmooth:G,smoothMonotone:z,connectNulls:S}),Zn(y,e,"areaStyle"),ye(y).seriesIndex=e.seriesIndex,ln(y,P,R,N)}var K=function(V){o._changePolyState(V)};l.eachItemGraphicEl(function(V){V&&(V.onHoverStateChange=K)}),this._polyline.onHoverStateChange=K,this._data=l,this._coordSys=a,this._stackedOnPoints=w,this._points=h,this._step=A,this._valueOrigin=x,e.get("triggerLineEvent")&&(this.packEventData(e,g),y&&this.packEventData(e,y))},t.prototype.packEventData=function(e,i){ye(i).eventData={componentType:"series",componentSubType:"line",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"line"}},t.prototype.highlight=function(e,i,r,o){var a=e.getData(),s=zi(a,o);if(this._changePolyState("emphasis"),!(s instanceof Array)&&s!=null&&s>=0){var l=a.getLayout("points"),u=a.getItemGraphicEl(s);if(!u){var c=l[2*s],h=l[2*s+1];if(isNaN(c)||isNaN(h)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(c,h))return;var p=e.get("zlevel")||0,d=e.get("z")||0;(u=new Vp(a,s)).x=c,u.y=h,u.setZ(p,d);var f=u.getSymbolPath().getTextContent();f&&(f.zlevel=p,f.z=d,f.z2=this._polyline.z2+1),u.__temp=!0,a.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else Je.prototype.highlight.call(this,e,i,r,o)},t.prototype.downplay=function(e,i,r,o){var a=e.getData(),s=zi(a,o);if(this._changePolyState("normal"),s!=null&&s>=0){var l=a.getItemGraphicEl(s);l&&(l.__temp?(a.setItemGraphicEl(s,null),this.group.remove(l)):l.downplay())}else Je.prototype.downplay.call(this,e,i,r,o)},t.prototype._changePolyState=function(e){var i=this._polygon;Wc(this._polyline,e),i&&Wc(i,e)},t.prototype._newPolyline=function(e){var i=this._polyline;return i&&this._lineGroup.remove(i),i=new XC({shape:{points:e},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(i),this._polyline=i,i},t.prototype._newPolygon=function(e,i){var r=this._polygon;return r&&this._lineGroup.remove(r),r=new YC({shape:{points:e,stackedOnPoints:i},segmentIgnoreThreshold:2}),this._lineGroup.add(r),this._polygon=r,r},t.prototype._initSymbolLabelAnimation=function(e,i,r){var o,a,s=i.getBaseAxis(),l=s.inverse;i.type==="cartesian2d"?(o=s.isHorizontal(),a=!1):i.type==="polar"&&(o=s.dim==="angle",a=!0);var u=e.hostModel,c=u.get("animationDuration");ue(c)&&(c=c(null));var h=u.get("animationDelay")||0,p=ue(h)?h(null):h;e.eachItemGraphicEl(function(d,f){var g=d;if(g){var y=[d.x,d.y],v=void 0,m=void 0,_=void 0;if(r)if(a){var x=r,b=i.pointToCoord(y);o?(v=x.startAngle,m=x.endAngle,_=-b[1]/180*Math.PI):(v=x.r0,m=x.r,_=b[0])}else{var w=r;o?(v=w.x,m=w.x+w.width,_=d.x):(v=w.y+w.height,m=w.y,_=d.y)}var M=m===v?0:(_-v)/(m-v);l&&(M=1-M);var S=ue(h)?h(f):c*M+p,C=g.getSymbolPath(),I=C.getTextContent();g.attr({scaleX:0,scaleY:0}),g.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:S}),I&&I.animateFrom({style:{opacity:0}},{duration:300,delay:S}),C.disableLabelAnimation=!0}})},t.prototype._initOrUpdateEndLabel=function(e,i,r){var o=e.getModel("endLabel");if(E_(e)){var a=e.getData(),s=this._polyline,l=a.getLayout("points");if(!l)return s.removeTextContent(),void(this._endLabel=null);var u=this._endLabel;u||((u=this._endLabel=new Me({z2:200})).ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var c=function(h){for(var p,d,f=h.length/2;f>0&&(p=h[2*f-2],d=h[2*f-1],isNaN(p)||isNaN(d));f--);return f-1}(l);c>=0&&(Dn(s,kn(e,"endLabel"),{inheritColor:r,labelFetcher:e,labelDataIndex:c,defaultText:function(h,p,d){return d!=null?w_(a,d):Ul(a,h)},enableTextSetter:!0},function(h,p){var d=p.getBaseAxis(),f=d.isHorizontal(),g=d.inverse,y=f?g?"right":"left":"center",v=f?"middle":g?"top":"bottom";return{normal:{align:h.get("align")||y,verticalAlign:h.get("verticalAlign")||v}}}(o,i)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},t.prototype._endLabelOnDuring=function(e,i,r,o,a,s,l){var u=this._endLabel,c=this._polyline;if(u){e<1&&o.originalX==null&&(o.originalX=u.x,o.originalY=u.y);var h=r.getLayout("points"),p=r.hostModel,d=p.get("connectNulls"),f=s.get("precision"),g=s.get("distance")||0,y=l.getBaseAxis(),v=y.isHorizontal(),m=y.inverse,_=i.shape,x=m?v?_.x:_.y+_.height:v?_.x+_.width:_.y,b=(v?g:0)*(m?-1:1),w=(v?0:-g)*(m?-1:1),M=v?"x":"y",S=function(R,N,E){for(var z,B,G=R.length/2,K=E==="x"?0:1,V=0,X=-1,Z=0;Z=N||z>=N&&B<=N){X=Z;break}V=Z,z=B}else z=B;return{range:[V,X],t:(N-z)/(B-z)}}(h,x,M),C=S.range,I=C[1]-C[0],T=void 0;if(I>=1){if(I>1&&!d){var A=N_(h,C[0]);u.attr({x:A[0]+b,y:A[1]+w}),a&&(T=p.getRawValue(C[0]))}else{(A=c.getPointOn(x,M))&&u.attr({x:A[0]+b,y:A[1]+w});var k=p.getRawValue(C[0]),L=p.getRawValue(C[1]);a&&(T=Tg(r,f,k,L,S.t))}o.lastFrameIndex=C[0]}else{var O=e===1||o.lastFrameIndex>0?C[0]:0;A=N_(h,O),a&&(T=p.getRawValue(O)),u.attr({x:A[0]+b,y:A[1]+w})}if(a){var P=Br(u);typeof P.setLabelText=="function"&&P.setLabelText(T)}}},t.prototype._doUpdateAnimation=function(e,i,r,o,a,s,l){var u=this._polyline,c=this._polygon,h=e.hostModel,p=function(w,M,S,C,I,T,A){for(var k=function(pe,ot){var Ve=[];return ot.diff(pe).add(function(et){Ve.push({cmd:"+",idx:et})}).update(function(et,je){Ve.push({cmd:"=",idx:je,idx1:et})}).remove(function(et){Ve.push({cmd:"-",idx:et})}).execute(),Ve}(w,M),L=[],O=[],P=[],R=[],N=[],E=[],z=[],B=T_(I,M,A),G=w.getLayout("points")||[],K=M.getLayout("points")||[],V=0;V3e3||c&&O_(f,y)>3e3)return u.stopAnimation(),u.setShape({points:g}),void(c&&(c.stopAnimation(),c.setShape({points:g,stackedOnPoints:y})));u.shape.__points=p.current,u.shape.points=d;var v={shape:{points:g}};p.current!==d&&(v.shape.__points=p.next),u.stopAnimation(),ze(u,v,h),c&&(c.setShape({points:d,stackedOnPoints:f}),c.stopAnimation(),ze(c,{shape:{stackedOnPoints:y}},h),u.shape.points!==c.shape.points&&(c.shape.points=u.shape.points));for(var m=[],_=p.status,x=0;x<_.length;x++)if(_[x].cmd==="="){var b=e.getItemGraphicEl(_[x].idx1);b&&m.push({el:b,ptIdx:x})}u.animators&&u.animators.length&&u.animators[0].during(function(){c&&c.dirtyShape();for(var w=u.shape.__points,M=0;Mt&&(t=n[e]);return isFinite(t)?t:NaN},min:function(n){for(var t=1/0,e=0;et&&(t=o,e=r)}return isFinite(e)?e:NaN},nearest:function(n){return n[0]}},jC=function(n){return Math.round(n.length/2)};function z_(n){return{seriesType:n,reset:function(t,e,i){var r=t.getData(),o=t.get("sampling"),a=t.coordinateSystem,s=r.count();if(s>10&&a.type==="cartesian2d"&&o){var l=a.getBaseAxis(),u=a.getOtherAxis(l),c=l.getExtent(),h=i.getDevicePixelRatio(),p=Math.abs(c[1]-c[0])*(h||1),d=Math.round(s/p);if(isFinite(d)&&d>1){o==="lttb"&&t.setData(r.lttbDownSample(r.mapDimension(u.dim),1/d));var f=void 0;Q(o)?f=qC[o]:ue(o)&&(f=o),f&&t.setData(r.downSample(r.mapDimension(u.dim),1/d,f,jC))}}}}}function KC(n){n.registerChartView(ZC),n.registerSeriesModel(GC),n.registerLayout({seriesType:"line",plan:Uh(),reset:function(t){var e=t.getData(),i=t.coordinateSystem;if(t.pipelineContext,i){var r=j(i.dimensions,function(c){return e.mapDimension(c)}).slice(0,2),o=r.length,a=e.getCalculationInfo("stackResultDimension");fi(e,r[0])&&(r[0]=a),fi(e,r[1])&&(r[1]=a);var s=e.getStore(),l=e.getDimensionIndex(r[0]),u=e.getDimensionIndex(r[1]);return o&&{progress:function(c,h){for(var p=Kn((c.end-c.start)*o),d=[],f=[],g=c.start,y=0;gy){_=(w+m)/2;break}b===1&&(x=M-f[0].tickValue)}_==null&&(m?m&&(_=f[f.length-1].coord):_=f[0].coord),s[d]=p.toGlobalCoord(_)}});else{var l=this.getData(),u=l.getLayout("offset"),c=l.getLayout("size"),h=o.getBaseAxis().isHorizontal()?0:1;s[h]+=u+c/2}return s}return[NaN,NaN]},t.type="series.__base_bar__",t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},t}(it);it.registerClass(Aa);var JC=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return F(t,n),t.prototype.getInitialData=function(){return Ll(0,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},t.prototype.getProgressive=function(){return!!this.get("large")&&this.get("progressive")},t.prototype.getProgressiveThreshold=function(){var e=this.get("progressiveThreshold"),i=this.get("largeThreshold");return i>e&&(e=i),e},t.prototype.brushSelector=function(e,i,r){return r.rect(i.getItemLayout(e))},t.type="series.bar",t.dependencies=["grid","polar"],t.defaultOption=ta(Aa.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),t}(Aa),$C=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},Yl=function(n){function t(e){var i=n.call(this,e)||this;return i.type="sausage",i}return F(t,n),t.prototype.getDefaultShape=function(){return new $C},t.prototype.buildPath=function(e,i){var r=i.cx,o=i.cy,a=Math.max(i.r0||0,0),s=Math.max(i.r,0),l=.5*(s-a),u=a+l,c=i.startAngle,h=i.endAngle,p=i.clockwise,d=2*Math.PI,f=p?h-cs)return!0;s=h}return!1},t.prototype._isOrderDifferentInView=function(e,i){for(var r=i.scale,o=r.getExtent(),a=Math.max(0,o[0]),s=Math.min(o[1],r.getOrdinalMeta().categories.length-1);a<=s;++a)if(e.ordinalNumbers[a]!==r.getRawOrdinalNumber(a))return!0},t.prototype._updateSortWithinSameData=function(e,i,r,o){if(this._isOrderChangedWithinSameData(e,i,r)){var a=this._dataSort(e,r,i);this._isOrderDifferentInView(a,r)&&(this._removeOnRenderedListener(o),o.dispatchAction({type:"changeAxisOrder",componentType:r.dim+"Axis",axisId:r.index,sortInfo:a}))}},t.prototype._dispatchInitSort=function(e,i,r){var o=i.baseAxis,a=this._dataSort(e,o,function(s){return e.get(e.mapDimension(i.otherAxis.dim),s)});r.dispatchAction({type:"changeAxisOrder",componentType:o.dim+"Axis",isInitSort:!0,axisId:o.index,sortInfo:a})},t.prototype.remove=function(e,i){this._clear(this._model),this._removeOnRenderedListener(i)},t.prototype.dispose=function(e,i){this._removeOnRenderedListener(i)},t.prototype._removeOnRenderedListener=function(e){this._onRendered&&(e.getZr().off("rendered",this._onRendered),this._onRendered=null)},t.prototype._clear=function(e){var i=this.group,r=this._data;e&&e.isAnimationEnabled()&&r&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],r.eachItemGraphicEl(function(o){Jo(o,e,ye(o).dataIndex)})):i.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type="bar",t}(Je),B_={cartesian2d:function(n,t){var e=t.width<0?-1:1,i=t.height<0?-1:1;e<0&&(t.x+=t.width,t.width=-t.width),i<0&&(t.y+=t.height,t.height=-t.height);var r=n.x+n.width,o=n.y+n.height,a=Xp(t.x,n.x),s=Up(t.x+t.width,r),l=Xp(t.y,n.y),u=Up(t.y+t.height,o),c=sr?s:a,t.y=h&&l>o?u:l,t.width=c?0:s-a,t.height=h?0:u-l,e<0&&(t.x+=t.width,t.width=-t.width),i<0&&(t.y+=t.height,t.height=-t.height),c||h},polar:function(n,t){var e=t.r0<=t.r?1:-1;if(e<0){var i=t.r;t.r=t.r0,t.r0=i}var r=Up(t.r,n.r),o=Xp(t.r0,n.r0);t.r=r,t.r0=o;var a=r-o<0;return e<0&&(i=t.r,t.r=t.r0,t.r0=i),a}},V_={cartesian2d:function(n,t,e,i,r,o,a,s,l){var u=new ke({shape:H({},i),z2:1});return u.__dataIndex=e,u.name="item",o&&(u.shape[r?"height":"width"]=0),u},polar:function(n,t,e,i,r,o,a,s,l){var u=!r&&l?Yl:Nt,c=new u({shape:i,z2:1});c.name="item";var h,p,d=W_(r);if(c.calculateTextPosition=(h=d,p=u===Yl,function(y,v,m){var _=v.position;if(!_||_ instanceof Array)return _s(y,v,m);var x=h(_),b=v.distance!=null?v.distance:5,w=this.shape,M=w.cx,S=w.cy,C=w.r,I=w.r0,T=(C+I)/2,A=w.startAngle,k=w.endAngle,L=(A+k)/2,O=p?Math.abs(C-I)/2:0,P=Math.cos,R=Math.sin,N=M+C*P(A),E=S+C*R(A),z="left",B="top";switch(x){case"startArc":N=M+(I-b)*P(L),E=S+(I-b)*R(L),z="center",B="top";break;case"insideStartArc":N=M+(I+b)*P(L),E=S+(I+b)*R(L),z="center",B="bottom";break;case"startAngle":N=M+T*P(A)+Zl(A,b+O,!1),E=S+T*R(A)+ql(A,b+O,!1),z="right",B="middle";break;case"insideStartAngle":N=M+T*P(A)+Zl(A,-b+O,!1),E=S+T*R(A)+ql(A,-b+O,!1),z="left",B="middle";break;case"middle":N=M+T*P(L),E=S+T*R(L),z="center",B="middle";break;case"endArc":N=M+(C+b)*P(L),E=S+(C+b)*R(L),z="center",B="bottom";break;case"insideEndArc":N=M+(C-b)*P(L),E=S+(C-b)*R(L),z="center",B="top";break;case"endAngle":N=M+T*P(k)+Zl(k,b+O,!0),E=S+T*R(k)+ql(k,b+O,!0),z="left",B="middle";break;case"insideEndAngle":N=M+T*P(k)+Zl(k,-b+O,!0),E=S+T*R(k)+ql(k,-b+O,!0),z="right",B="middle";break;default:return _s(y,v,m)}return(y=y||{}).x=N,y.y=E,y.align=z,y.verticalAlign=B,y}),o){var f=r?"r":"endAngle",g={};c.shape[f]=r?i.r0:i.startAngle,g[f]=i[f],(s?ze:Ye)(c,{shape:g},o)}return c}};function F_(n,t,e,i,r,o,a,s){var l,u;o?(u={x:i.x,width:i.width},l={y:i.y,height:i.height}):(u={y:i.y,height:i.height},l={x:i.x,width:i.width}),s||(a?ze:Ye)(e,{shape:l},t,r,null),(a?ze:Ye)(e,{shape:u},t?n.baseAxis.model:null,r)}function G_(n,t){for(var e=0;e0?1:-1,a=i.height>0?1:-1;return{x:i.x+o*r/2,y:i.y+a*r/2,width:i.width-o*r,height:i.height-a*r}},polar:function(n,t,e){var i=n.getItemLayout(t);return{cx:i.cx,cy:i.cy,r0:i.r0,r:i.r,startAngle:i.startAngle,endAngle:i.endAngle,clockwise:i.clockwise}}};function W_(n){return function(t){var e=t?"Arc":"Angle";return function(i){switch(i){case"start":case"insideStart":case"end":case"insideEnd":return i+e;default:return i}}}(n)}function X_(n,t,e,i,r,o,a,s){var l=t.getItemVisual(e,"style");if(s){if(!o.get("roundCap")){var u=n.shape;H(u,Da(i.getModel("itemStyle"),u,!0)),n.setShape(u)}}else{var c=i.get(["itemStyle","borderRadius"])||0;n.setShape("r",c)}n.useStyle(l);var h=i.getShallow("cursor");h&&n.attr("cursor",h);var p=s?a?r.r>=r.r0?"endArc":"startArc":r.endAngle>=r.startAngle?"endAngle":"startAngle":a?r.height>=0?"bottom":"top":r.width>=0?"right":"left",d=kn(i);Dn(n,d,{labelFetcher:o,labelDataIndex:e,defaultText:Ul(o.getData(),e),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:p});var f=n.getTextContent();if(s&&f){var g=i.get(["label","position"]);n.textConfig.inside=g==="middle"||null,function(v,m,_,x){if(Ae(x))v.setTextConfig({rotation:x});else if(Y(m))v.setTextConfig({rotation:0});else{var b,w=v.shape,M=w.clockwise?w.startAngle:w.endAngle,S=w.clockwise?w.endAngle:w.startAngle,C=(M+S)/2,I=_(m);switch(I){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":b=C;break;case"startAngle":case"insideStartAngle":b=M;break;case"endAngle":case"insideEndAngle":b=S;break;default:return void v.setTextConfig({rotation:0})}var T=1.5*Math.PI-b;I==="middle"&&T>Math.PI/2&&T<1.5*Math.PI&&(T-=Math.PI),v.setTextConfig({rotation:T})}}(n,g==="outside"?p:g,W_(a),i.get(["label","rotate"]))}Uy(f,d,o.getRawValue(e),function(v){return w_(t,v)});var y=i.getModel(["emphasis"]);ln(n,y.get("focus"),y.get("blurScope"),y.get("disabled")),Zn(n,i),function(v){return v.startAngle!=null&&v.endAngle!=null&&v.startAngle===v.endAngle}(r)&&(n.style.fill="none",n.style.stroke="none",D(n.states,function(v){v.style&&(v.style.fill=v.style.stroke="none")}))}var nI=function(){return function(){}}(),U_=function(n){function t(e){var i=n.call(this,e)||this;return i.type="largeBar",i}return F(t,n),t.prototype.getDefaultShape=function(){return new nI},t.prototype.buildPath=function(e,i){for(var r=i.points,o=this.baseDimIdx,a=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,c=0;c=u[0]&&i<=u[0]+c[0]&&r>=u[1]&&r<=u[1]+c[1])return l[p]}return-1}(this,n.offsetX,n.offsetY);ye(this).dataIndex=t>=0?t:null},30,!1);function q_(n,t,e){if(Hp(e,"cartesian2d")){var i=t,r=e.getArea();return{x:n?i.x:r.x,y:n?r.y:i.y,width:n?i.width:r.width,height:n?r.height:i.height}}var o=t;return{cx:(r=e.getArea()).cx,cy:r.cy,r0:n?r.r0:o.r0,r:n?r.r:o.r,startAngle:n?o.startAngle:0,endAngle:n?o.endAngle:2*Math.PI}}function iI(n){n.registerChartView(QC),n.registerSeriesModel(JC),n.registerLayout(n.PRIORITY.VISUAL.LAYOUT,Se(E0,"bar")),n.registerLayout(n.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,z0("bar")),n.registerProcessor(n.PRIORITY.PROCESSOR.STATISTIC,z_("bar")),n.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(t,e){var i=t.componentType||"series";e.eachComponent({mainType:i,query:t},function(r){t.sortInfo&&r.axis.setCategorySortInfo(t.sortInfo)})})}var j_=2*Math.PI,Kl=Math.PI/180;function K_(n,t){return It(n.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function J_(n,t){var e=K_(n,t),i=n.get("center"),r=n.get("radius");Y(r)||(r=[0,r]);var o,a,s=ee(e.width,t.getWidth()),l=ee(e.height,t.getHeight()),u=Math.min(s,l),c=ee(r[0],u/2),h=ee(r[1],u/2),p=n.coordinateSystem;if(p){var d=p.dataToPoint(i);o=d[0]||0,a=d[1]||0}else Y(i)||(i=[i,i]),o=ee(i[0],s)+e.x,a=ee(i[1],l)+e.y;return{cx:o,cy:a,r0:c,r:h}}function rI(n,t,e){t.eachSeriesByType(n,function(i){var r=i.getData(),o=r.mapDimension("value"),a=K_(i,e),s=J_(i,e),l=s.cx,u=s.cy,c=s.r,h=s.r0,p=-i.get("startAngle")*Kl,d=i.get("endAngle"),f=i.get("padAngle")*Kl;d=d==="auto"?p-j_:-d*Kl;var g=i.get("minAngle")*Kl+f,y=0;r.each(o,function(P){!isNaN(P)&&y++});var v=r.getSum(o),m=Math.PI/(v||y)*2,_=i.get("clockwise"),x=i.get("roseType"),b=i.get("stillShowZeroSum"),w=r.getDataExtent(o);w[0]=0;var M=_?1:-1,S=[p,d],C=M*f/2;zc(S,!_),p=S[0],d=S[1];var I=$_(i);I.startAngle=p,I.endAngle=d,I.clockwise=_;var T=Math.abs(d-p),A=T,k=0,L=p;if(r.setLayout({viewRect:a,r:c}),r.each(o,function(P,R){var N;if(isNaN(P))r.setItemLayout(R,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:_,cx:l,cy:u,r0:h,r:x?NaN:c});else{(N=x!=="area"?v===0&&b?m:P*m:T/y)N?B=z=L+M*N/2:(z=L+C,B=E-C),r.setItemLayout(R,{angle:N,startAngle:z,endAngle:B,clockwise:_,cx:l,cy:u,r0:h,r:x?Fe(P,w,[h,c]):c}),L=E}}),Ae?y:g,x=Math.abs(m.label.y-e);if(x>=_.maxY){var b=m.label.x-t-m.len2*r,w=i+m.len,M=Math.abs(b)n.unconstrainedWidth?null:d:null;i.setStyle("width",f)}var g=i.getBoundingRect();o.width=g.width;var y=(i.style.margin||0)+2.1;o.height=g.height+y,o.y-=(o.height-h)/2}}}function Zp(n){return n.position==="center"}var aI=function(n){function t(e,i,r){var o=n.call(this)||this;o.z2=2;var a=new Me;return o.setTextContent(a),o.updateData(e,i,r,!0),o}return F(t,n),t.prototype.updateData=function(e,i,r,o){var a=this,s=e.hostModel,l=e.getItemModel(i),u=l.getModel("emphasis"),c=e.getItemLayout(i),h=H(Da(l.getModel("itemStyle"),c,!0),c);if(isNaN(h.startAngle))a.setShape(h);else{if(o){a.setShape(h);var p=s.getShallow("animationType");s.ecModel.ssr?(Ye(a,{scaleX:0,scaleY:0},s,{dataIndex:i,isFrom:!0}),a.originX=h.cx,a.originY=h.cy):p==="scale"?(a.shape.r=c.r0,Ye(a,{shape:{r:c.r}},s,i)):r!=null?(a.setShape({startAngle:r,endAngle:r}),Ye(a,{shape:{startAngle:c.startAngle,endAngle:c.endAngle}},s,i)):(a.shape.endAngle=c.startAngle,ze(a,{shape:{endAngle:c.endAngle}},s,i))}else Er(a),ze(a,{shape:h},s,i);a.useStyle(e.getItemVisual(i,"style")),Zn(a,l);var d=(c.startAngle+c.endAngle)/2,f=s.get("selectedOffset"),g=Math.cos(d)*f,y=Math.sin(d)*f,v=l.getShallow("cursor");v&&a.attr("cursor",v),this._updateLabel(s,e,i),a.ensureState("emphasis").shape=H({r:c.r+(u.get("scale")&&u.get("scaleSize")||0)},Da(u.getModel("itemStyle"),c)),H(a.ensureState("select"),{x:g,y,shape:Da(l.getModel(["select","itemStyle"]),c)}),H(a.ensureState("blur"),{shape:Da(l.getModel(["blur","itemStyle"]),c)});var m=a.getTextGuideLine(),_=a.getTextContent();m&&H(m.ensureState("select"),{x:g,y}),H(_.ensureState("select"),{x:g,y}),ln(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))}},t.prototype._updateLabel=function(e,i,r){var o=this,a=i.getItemModel(r),s=a.getModel("labelLine"),l=i.getItemVisual(r,"style"),u=l&&l.fill,c=l&&l.opacity;Dn(o,kn(a),{labelFetcher:i.hostModel,labelDataIndex:r,inheritColor:u,defaultOpacity:c,defaultText:e.getFormattedLabel(r,"normal")||i.getName(r)});var h=o.getTextContent();o.setTextConfig({position:null,rotation:null}),h.attr({z2:10});var p=e.get(["label","position"]);if(p!=="outside"&&p!=="outer")o.removeTextGuideLine();else{var d=this.getTextGuideLine();d||(d=new qt,this.setTextGuideLine(d)),Np(this,Ep(a),{stroke:u,opacity:vr(s.get(["lineStyle","opacity"]),c,1)})}},t}(Nt),sI=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.ignoreLabelLineUpdate=!0,e}return F(t,n),t.prototype.render=function(e,i,r,o){var a,s=e.getData(),l=this._data,u=this.group;if(!l&&s.count()>0){for(var c=s.getItemLayout(0),h=1;isNaN(c&&c.startAngle)&&h0?"right":"left":Ce>0?"left":"right"}var ot=Math.PI,Ve=0,et=X.get("rotate");if(Ae(et))Ve=et*(ot/180);else if(Z==="center")Ve=0;else if(et==="radial"||et===!0)Ve=Ce<0?-Te+ot:-Te;else if(et==="tangential"&&Z!=="outside"&&Z!=="outer"){var je=Math.atan2(Ce,Pe);je<0&&(je=2*ot+je),Pe>0&&(je=ot+je),Ve=je-ot}if(_=!!Ve,G.x=q,G.y=U,G.rotation=Ve,G.setStyle({verticalAlign:"middle"}),Be){G.setStyle({align:ve});var fr=G.states.select;fr&&(fr.x+=G.x,fr.y+=G.y)}else{var Qn=G.getBoundingRect().clone();Qn.applyTransform(G.getComputedTransform());var uo=(G.style.margin||0)+2.1;Qn.y-=uo/2,Qn.height+=uo,m.push({label:G,labelLine:K,position:Z,len:J,len2:$,minTurnAngle:ie.get("minTurnAngle"),maxSurfaceAngle:ie.get("maxSurfaceAngle"),surfaceNormal:new ge(Ce,Pe),linePoints:le,textAlign:ve,labelDistance:W,labelAlignTo:te,edgeDistance:oe,bleedMargin:se,rect:Qn,unconstrainedWidth:Qn.width,labelStyleWidth:G.style.width})}z.setTextConfig({inside:Be})}}),!_&&f.get("avoidLabelOverlap")&&function(E,z,B,G,K,V,X,Z){for(var W=[],te=[],oe=Number.MAX_VALUE,se=-Number.MAX_VALUE,ie=0;ie=r.r0}},t.type="pie",t}(Je);function ka(n,t,e){t=Y(t)&&{coordDimensions:t}||H({encodeDefine:n.getEncode()},t);var i=n.getSource(),r=Mp(i,t).dimensions,o=new Sp(r,n);return o.initData(i,e),o}var qp=function(){function n(t,e){this._getDataWithEncodedVisual=t,this._getRawData=e}return n.prototype.getAllNames=function(){var t=this._getRawData();return t.mapArray(t.getName)},n.prototype.containName=function(t){return this._getRawData().indexOfName(t)>=0},n.prototype.indexOfName=function(t){return this._getDataWithEncodedVisual().indexOfName(t)},n.prototype.getItemVisual=function(t,e){return this._getDataWithEncodedVisual().getItemVisual(t,e)},n}(),lI=Ee(),uI=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return F(t,n),t.prototype.init=function(e){n.prototype.init.apply(this,arguments),this.legendVisualProvider=new qp(he(this.getData,this),he(this.getRawData,this)),this._defaultLabelLine(e)},t.prototype.mergeOption=function(){n.prototype.mergeOption.apply(this,arguments)},t.prototype.getInitialData=function(){return ka(this,{coordDimensions:["value"],encodeDefaulter:Se(Ch,this)})},t.prototype.getDataParams=function(e){var i=this.getData(),r=lI(i),o=r.seats;if(!o){var a=[];i.each(i.mapDimension("value"),function(l){a.push(l)}),o=r.seats=fg(a,i.hostModel.get("percentPrecision"))}var s=n.prototype.getDataParams.call(this,e);return s.percent=o[e]||0,s.$vars.push("percent"),s},t.prototype._defaultLabelLine=function(e){Po(e,"labelLine",["show"]);var i=e.labelLine,r=e.emphasis.labelLine;i.show=i.show&&e.label.show,r.show=r.show&&e.emphasis.label.show},t.type="series.pie",t.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"},t}(it);function cI(n){n.registerChartView(sI),n.registerSeriesModel(uI),Rm("pie",n.registerAction),n.registerLayout(Se(rI,"pie")),n.registerProcessor(Yp("pie")),n.registerProcessor({seriesType:"pie",reset:function(t,e){var i=t.getData();i.filterSelf(function(r){var o=i.mapDimension("value"),a=i.get(o,r);return!(Ae(a)&&!isNaN(a)&&a<0)})}})}var hI=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return F(t,n),t.type="grid",t.dependencies=["xAxis","yAxis"],t.layoutMode="box",t.defaultOption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},t}(be),jp=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return F(t,n),t.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Qe).models[0]},t.type="cartesian2dAxis",t}(be);at(jp,Ta);var t1={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},pI=de({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},t1),Kp=de({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},t1);const n1={category:pI,value:Kp,time:de({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},Kp),log:ce({logBase:10},Kp)};var dI={value:1,category:1,time:1,log:1};function La(n,t,e,i){D(dI,function(r,o){var a=de(de({},n1[o],!0),i,!0),s=function(l){function u(){var c=l!==null&&l.apply(this,arguments)||this;return c.type=t+"Axis."+o,c}return F(u,l),u.prototype.mergeDefaultAndTheme=function(c,h){var p=sa(this),d=p?tl(c):{};de(c,h.getTheme().get(o+"Axis")),de(c,this.getDefaultOption()),c.type=i1(c),p&&Wr(c,d,p)},u.prototype.optionUpdated=function(){this.option.type==="category"&&(this.__ordinalMeta=Tp.createByAxisModel(this))},u.prototype.getCategories=function(c){var h=this.option;if(h.type==="category")return c?h.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.type=t+"Axis."+o,u.defaultOption=a,u}(e);n.registerComponentModel(s)}),n.registerSubTypeDefaulter(t+"Axis",i1)}function i1(n){return n.type||(n.data?"category":"value")}var fI=function(){function n(t){this.type="cartesian",this._dimList=[],this._axes={},this.name=t||""}return n.prototype.getAxis=function(t){return this._axes[t]},n.prototype.getAxes=function(){return j(this._dimList,function(t){return this._axes[t]},this)},n.prototype.getAxesByScale=function(t){return t=t.toLowerCase(),He(this.getAxes(),function(e){return e.scale.type===t})},n.prototype.addAxis=function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},n}(),Jp=["x","y"];function r1(n){return n.type==="interval"||n.type==="time"}var gI=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type="cartesian2d",e.dimensions=Jp,e}return F(t,n),t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis("x").scale,i=this.getAxis("y").scale;if(r1(e)&&r1(i)){var r=e.getExtent(),o=i.getExtent(),a=this.dataToPoint([r[0],o[0]]),s=this.dataToPoint([r[1],o[1]]),l=r[1]-r[0],u=o[1]-o[0];if(l&&u){var c=(s[0]-a[0])/l,h=(s[1]-a[1])/u,p=a[0]-r[0]*c,d=a[1]-o[0]*h,f=this._transform=[c,0,0,h,p,d];this._invTransform=Ai([],f)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},t.prototype.containPoint=function(e){var i=this.getAxis("x"),r=this.getAxis("y");return i.contain(i.toLocalCoord(e[0]))&&r.contain(r.toLocalCoord(e[1]))},t.prototype.containData=function(e){return this.getAxis("x").containData(e[0])&&this.getAxis("y").containData(e[1])},t.prototype.containZone=function(e,i){var r=this.dataToPoint(e),o=this.dataToPoint(i),a=this.getArea(),s=new me(r[0],r[1],o[0]-r[0],o[1]-r[1]);return a.intersect(s)},t.prototype.dataToPoint=function(e,i,r){r=r||[];var o=e[0],a=e[1];if(this._transform&&o!=null&&isFinite(o)&&a!=null&&isFinite(a))return tt(r,e,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return r[0]=s.toGlobalCoord(s.dataToCoord(o,i)),r[1]=l.toGlobalCoord(l.dataToCoord(a,i)),r},t.prototype.clampData=function(e,i){var r=this.getAxis("x").scale,o=this.getAxis("y").scale,a=r.getExtent(),s=o.getExtent(),l=r.parse(e[0]),u=o.parse(e[1]);return(i=i||[])[0]=Math.min(Math.max(Math.min(a[0],a[1]),l),Math.max(a[0],a[1])),i[1]=Math.min(Math.max(Math.min(s[0],s[1]),u),Math.max(s[0],s[1])),i},t.prototype.pointToData=function(e,i){var r=[];if(this._invTransform)return tt(r,e,this._invTransform);var o=this.getAxis("x"),a=this.getAxis("y");return r[0]=o.coordToData(o.toLocalCoord(e[0]),i),r[1]=a.coordToData(a.toLocalCoord(e[1]),i),r},t.prototype.getOtherAxis=function(e){return this.getAxis(e.dim==="x"?"y":"x")},t.prototype.getArea=function(e){e=e||0;var i=this.getAxis("x").getGlobalExtent(),r=this.getAxis("y").getGlobalExtent(),o=Math.min(i[0],i[1])-e,a=Math.min(r[0],r[1])-e,s=Math.max(i[0],i[1])-o+e,l=Math.max(r[0],r[1])-a+e;return new me(o,a,s,l)},t}(fI),yI=function(n){function t(e,i,r,o,a){var s=n.call(this,e,i,r)||this;return s.index=0,s.type=o||"value",s.position=a||"bottom",s}return F(t,n),t.prototype.isHorizontal=function(){var e=this.position;return e==="top"||e==="bottom"},t.prototype.getGlobalExtent=function(e){var i=this.getExtent();return i[0]=this.toGlobalCoord(i[0]),i[1]=this.toGlobalCoord(i[1]),e&&i[0]>i[1]&&i.reverse(),i},t.prototype.pointToData=function(e,i){return this.coordToData(this.toLocalCoord(e[this.dim==="x"?0:1]),i)},t.prototype.setCategorySortInfo=function(e){if(this.type!=="category")return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)},t}(Rn);function $p(n,t,e){e=e||{};var i=n.coordinateSystem,r=t.axis,o={},a=r.getAxesOnZeroOf()[0],s=r.position,l=a?"onZero":s,u=r.dim,c=i.getRect(),h=[c.x,c.x+c.width,c.y,c.y+c.height],p={left:0,right:1,top:0,bottom:1,onZero:2},d=t.get("offset")||0,f=u==="x"?[h[2]-d,h[3]+d]:[h[0]-d,h[1]+d];if(a){var g=a.toGlobalCoord(a.dataToCoord(0));f[p.onZero]=Math.max(Math.min(g,f[1]),f[0])}o.position=[u==="y"?f[p[l]]:h[0],u==="x"?f[p[l]]:h[3]],o.rotation=Math.PI/2*(u==="x"?0:1),o.labelDirection=o.tickDirection=o.nameDirection={top:-1,bottom:1,left:-1,right:1}[s],o.labelOffset=a?f[p[s]]-f[p.onZero]:0,t.get(["axisTick","inside"])&&(o.tickDirection=-o.tickDirection),Vn(e.labelInside,t.get(["axisLabel","inside"]))&&(o.labelDirection=-o.labelDirection);var y=t.get(["axisLabel","rotate"]);return o.labelRotate=l==="top"?-y:y,o.z2=1,o}function o1(n){return n.get("coordinateSystem")==="cartesian2d"}function a1(n){var t={xAxisModel:null,yAxisModel:null};return D(t,function(e,i){var r=i.replace(/Model$/,""),o=n.getReferringComponents(r,Qe).models[0];t[i]=o}),t}var Qp=Math.log;function s1(n,t,e){var i=gi.prototype,r=i.getTicks.call(e),o=i.getTicks.call(e,!0),a=r.length-1,s=i.getInterval.call(e),l=U0(n,t),u=l.extent,c=l.fixMin,h=l.fixMax;if(n.type==="log"){var p=Qp(n.base);u=[Qp(u[0])/p,Qp(u[1])/p]}n.setExtent(u[0],u[1]),n.calcNiceExtent({splitNumber:a,fixMin:c,fixMax:h});var d=i.getExtent.call(n);c&&(u[0]=d[0]),h&&(u[1]=d[1]);var f=i.getInterval.call(n),g=u[0],y=u[1];if(c&&h)f=(y-g)/a;else if(c)for(y=u[0]+f*a;yu[0]&&isFinite(g)&&isFinite(u[0]);)f=Ip(f),g=u[1]-f*a;else{n.getTicks().length-1>a&&(f=Ip(f));var v=f*a;(g=We((y=Math.ceil(u[1]/f)*f)-v))<0&&u[0]>=0?(g=0,y=We(v)):y>0&&u[1]<=0&&(y=0,g=-We(v))}var m=(r[0].value-o[0].value)/s,_=(r[a].value-o[a].value)/s;i.setExtent.call(n,g+f*m,y+f*_),i.setInterval.call(n,f),(m||_)&&i.setNiceExtent.call(n,g+f,y-f)}var vI=function(){function n(t,e,i){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=Jp,this._initCartesian(t,e,i),this.model=t}return n.prototype.getRect=function(){return this._rect},n.prototype.update=function(t,e){var i=this._axesMap;function r(a){var s,l=Oe(a),u=l.length;if(u){for(var c=[],h=u-1;h>=0;h--){var p=a[+l[h]],d=p.model,f=p.scale;Cp(f)&&d.get("alignTicks")&&d.get("interval")==null?c.push(p):(Qr(f,d),Cp(f)&&(s=p))}c.length&&(s||Qr((s=c.pop()).scale,s.model),D(c,function(g){s1(g.scale,g.model,s.scale)}))}}this._updateScale(t,this.model),r(i.x),r(i.y);var o={};D(i.x,function(a){l1(i,"y",a,o)}),D(i.y,function(a){l1(i,"x",a,o)}),this.resize(this.model,e)},n.prototype.resize=function(t,e,i){var r=t.getBoxLayoutParams(),o=!i&&t.get("containLabel"),a=It(r,{width:e.getWidth(),height:e.getHeight()});this._rect=a;var s=this._axesList;function l(){D(s,function(u){var c=u.isHorizontal(),h=c?[0,a.width]:[0,a.height],p=u.inverse?1:0;u.setExtent(h[p],h[1-p]),function(d,f){var g=d.getExtent(),y=g[0]+g[1];d.toGlobalCoord=d.dim==="x"?function(v){return v+f}:function(v){return y-v+f},d.toLocalCoord=d.dim==="x"?function(v){return v-f}:function(v){return y-v+f}}(u,c?a.x:a.y)})}l(),o&&(D(s,function(u){if(!u.model.get(["axisLabel","inside"])){var c=function(d){var f=d.model,g=d.scale;if(f.get(["axisLabel","show"])&&!g.isBlank()){var y,v,m=g.getExtent();v=g instanceof Ap?g.count():(y=g.getTicks()).length;var _,x=d.getLabelModel(),b=eo(d),w=1;v>40&&(w=Math.ceil(v/40));for(var M=0;M0&&r>0||i<0&&r<0)}(n)}var _i=Math.PI,Pt=function(){function n(t,e){this.group=new _e,this.opt=e,this.axisModel=t,ce(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});var i=new _e({x:e.position[0],y:e.position[1],rotation:e.rotation});i.updateTransform(),this._transformGroup=i}return n.prototype.hasBuilder=function(t){return!!c1[t]},n.prototype.add=function(t){c1[t](this.opt,this.axisModel,this.group,this._transformGroup)},n.prototype.getGroup=function(){return this.group},n.innerTextLayout=function(t,e,i){var r,o,a=vc(e-t);return ko(a)?(o=i>0?"top":"bottom",r="center"):ko(a-_i)?(o=i>0?"bottom":"top",r="center"):(o="middle",r=a>0&&a<_i?i>0?"right":"left":i>0?"left":"right"),{rotation:a,textAlign:r,textVerticalAlign:o}},n.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},n.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)},n}(),c1={axisLine:function(n,t,e,i){var r=t.get(["axisLine","show"]);if(r==="auto"&&n.handleAutoShown&&(r=n.handleAutoShown("axisLine")),r){var o=t.axis.getExtent(),a=i.transform,s=[o[0],0],l=[o[1],0],u=s[0]>l[0];a&&(tt(s,s,a),tt(l,l,a));var c=H({lineCap:"round"},t.getModel(["axisLine","lineStyle"]).getLineStyle()),h=new ut({shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:c,strokeContainThreshold:n.strokeContainThreshold||5,silent:!0,z2:1});$o(h.shape,h.style.lineWidth),h.anid="line",e.add(h);var p=t.get(["axisLine","symbol"]);if(p!=null){var d=t.get(["axisLine","symbolSize"]);Q(p)&&(p=[p,p]),(Q(d)||Ae(d))&&(d=[d,d]);var f=jh(t.get(["axisLine","symbolOffset"])||0,d),g=d[0],y=d[1];D([{rotate:n.rotation+Math.PI/2,offset:f[0],r:0},{rotate:n.rotation-Math.PI/2,offset:f[1],r:Math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],function(v,m){if(p[m]!=="none"&&p[m]!=null){var _=_t(p[m],-g/2,-y/2,g,y,c.stroke,!0),x=v.r+v.offset,b=u?l:s;_.attr({rotation:v.rotate,x:b[0]+x*Math.cos(n.rotation),y:b[1]-x*Math.sin(n.rotation),silent:!0,z2:11}),e.add(_)}})}}},axisTickLabel:function(n,t,e,i){var r=function(a,s,l,u){var c=l.axis,h=l.getModel("axisTick"),p=h.get("show");if(p==="auto"&&u.handleAutoShown&&(p=u.handleAutoShown("axisTick")),p&&!c.scale.isBlank()){for(var d=h.getModel("lineStyle"),f=u.tickDirection*h.get("length"),g=d1(c.getTicksCoords(),s.transform,f,ce(d.getLineStyle(),{stroke:l.get(["axisLine","lineStyle","color"])}),"ticks"),y=0;yh[1]?-1:1,d=[s==="start"?h[0]-p*c:s==="end"?h[1]+p*c:(h[0]+h[1])/2,p1(s)?n.labelOffset+l*c:0],f=t.get("nameRotate");f!=null&&(f=f*_i/180),p1(s)?o=Pt.innerTextLayout(n.rotation,f??n.rotation,l):(o=function(b,w,M,S){var C,I,T=vc(M-b),A=S[0]>S[1],k=w==="start"&&!A||w!=="start"&&A;return ko(T-_i/2)?(I=k?"bottom":"top",C="center"):ko(T-1.5*_i)?(I=k?"top":"bottom",C="center"):(I="middle",C=T<1.5*_i&&T>_i/2?k?"left":"right":k?"right":"left"),{rotation:T,textAlign:C,textVerticalAlign:I}}(n.rotation,s,f||0,h),(a=n.axisNameAvailableWidth)!=null&&(a=Math.abs(a/Math.sin(o.rotation)),!isFinite(a)&&(a=null)));var g=u.getFont(),y=t.get("nameTruncate",!0)||{},v=y.ellipsis,m=Vn(n.nameTruncateMaxWidth,y.maxWidth,a),_=new Me({x:d[0],y:d[1],rotation:o.rotation,silent:Pt.isLabelSilent(t),style:nt(u,{text:r,font:g,overflow:"truncate",width:m,ellipsis:v,fill:u.getTextColor()||t.get(["axisLine","lineStyle","color"]),align:u.get("align")||o.textAlign,verticalAlign:u.get("verticalAlign")||o.textVerticalAlign}),z2:1});if(ea({el:_,componentModel:t,itemName:r}),_.__fullText=r,_.anid="name",t.get("triggerEvent")){var x=Pt.makeAxisEventDataBase(t);x.targetType="axisName",x.name=r,ye(_).eventData=x}i.add(_),_.updateTransform(),e.add(_),_.decomposeTransform()}}};function en(n){n&&(n.ignore=!0)}function h1(n,t){var e=n&&n.getBoundingRect().clone(),i=t&&t.getBoundingRect().clone();if(e&&i){var r=yo([]);return Ii(r,r,-n.rotation),e.applyTransform(_n([],r,n.getLocalTransform())),i.applyTransform(_n([],r,t.getLocalTransform())),e.intersect(i)}}function p1(n){return n==="middle"||n==="center"}function d1(n,t,e,i,r){for(var o=[],a=[],s=[],l=0;l=0||n===t}function nd(n){var t=(n.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return t&&t.axesInfo[Pa(n)]}function id(n){return!!n.get(["handle","show"])}function Pa(n){return n.type+"||"+n.id}var f1={},Oa=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return F(t,n),t.prototype.render=function(e,i,r,o){this.axisPointerClass&&function(a){var s=nd(a);if(s){var l=s.axisPointerModel,u=s.axis.scale,c=l.option,h=l.get("status"),p=l.get("value");p!=null&&(p=u.parse(p));var d=id(l);h==null&&(c.status=d?"show":"hide");var f=u.getExtent().slice();f[0]>f[1]&&f.reverse(),(p==null||p>f[1])&&(p=f[1]),p0&&!f.min?f.min=0:f.min!=null&&f.min<0&&!f.max&&(f.max=0);var g=l;f.color!=null&&(g=ce({color:f.color},l));var y=de(ae(f),{boundaryGap:e,splitNumber:i,scale:r,axisLine:o,axisTick:a,axisLabel:s,name:f.text,showName:u,nameLocation:"end",nameGap:h,nameTextStyle:g,triggerEvent:p},!1);if(Q(c)){var v=y.name;y.name=c.replace("{value}",v??"")}else ue(c)&&(y.name=c(y.name,y));var m=new Le(y,null,this.ecModel);return at(m,Ta.prototype),m.mainType="radar",m.componentIndex=this.componentIndex,m},this);this._indicatorModels=d},t.prototype.getIndicatorModels=function(){return this._indicatorModels},t.type="radar",t.defaultOption={z:0,center:["50%","50%"],radius:"75%",startAngle:90,axisName:{show:!0},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:de({lineStyle:{color:"#bbb"}},Ra.axisLine),axisLabel:Jl(Ra.axisLabel,!1),axisTick:Jl(Ra.axisTick,!1),splitLine:Jl(Ra.splitLine,!0),splitArea:Jl(Ra.splitArea,!0),indicator:[]},t}(be),DI=["axisLine","axisTickLabel","axisName"],kI=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return F(t,n),t.prototype.render=function(e,i,r){this.group.removeAll(),this._buildAxes(e),this._buildSplitLineAndArea(e)},t.prototype._buildAxes=function(e){var i=e.coordinateSystem;D(j(i.getIndicatorAxes(),function(r){var o=r.model.get("showName")?r.name:"";return new Pt(r.model,{axisName:o,position:[i.cx,i.cy],rotation:r.angle,labelDirection:-1,tickDirection:-1,nameDirection:1})}),function(r){D(DI,r.add,r),this.group.add(r.getGroup())},this)},t.prototype._buildSplitLineAndArea=function(e){var i=e.coordinateSystem,r=i.getIndicatorAxes();if(r.length){var o=e.get("shape"),a=e.getModel("splitLine"),s=e.getModel("splitArea"),l=a.getModel("lineStyle"),u=s.getModel("areaStyle"),c=a.get("show"),h=s.get("show"),p=l.get("color"),d=u.get("color"),f=Y(p)?p:[p],g=Y(d)?d:[d],y=[],v=[];if(o==="circle")for(var m=r[0].getTicksCoords(),_=i.cx,x=i.cy,b=0;b3?1.4:a>1?1.2:1.1;ad(this,"zoom","zoomOnMouseWheel",e,{scale:o>0?u:1/u,originX:s,originY:l,isAvailableBehavior:null})}if(r){var c=Math.abs(o);ad(this,"scrollMove","moveOnMouseWheel",e,{scrollDelta:(o>0?1:-1)*(c>3?.4:c>1?.15:.05),originX:s,originY:l,isAvailableBehavior:null})}}},t.prototype._pinchHandler=function(e){b1(this._zr,"globalPan")||ad(this,"zoom",null,e,{scale:e.pinchScale>1?1.1:1/1.1,originX:e.pinchX,originY:e.pinchY,isAvailableBehavior:null})},t}(Vt);function ad(n,t,e,i,r){n.pointerChecker&&n.pointerChecker(i,r.originX,r.originY)&&(Ti(i.event),w1(n,t,e,i,r))}function w1(n,t,e,i,r){r.isAvailableBehavior=he($l,null,e,i),n.trigger(t,r)}function $l(n,t,e){var i=e[n];return!n||i&&(!Q(i)||t.event[i+"Key"])}var sd,EI={axisPointer:1,tooltip:1,brush:1};function S1(n,t,e){var i=t.getComponentByElement(n.topTarget),r=i&&i.coordinateSystem;return i&&i!==e&&!EI.hasOwnProperty(i.mainType)&&r&&r.model!==e}function M1(n){Q(n)&&(n=new DOMParser().parseFromString(n,"text/xml"));var t=n;for(t.nodeType===9&&(t=t.firstChild);t.nodeName.toLowerCase()!=="svg"||t.nodeType!==1;)t=t.nextSibling;return t}var Ql={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-anchor":"textAlign",visibility:"visibility",display:"display"},T1=Oe(Ql),eu={"alignment-baseline":"textBaseline","stop-color":"stopColor"},C1=Oe(eu),zI=function(){function n(){this._defs={},this._root=null}return n.prototype.parse=function(t,e){e=e||{};var i=M1(t);this._defsUsePending=[];var r=new _e;this._root=r;var o=[],a=i.getAttribute("viewBox")||"",s=parseFloat(i.getAttribute("width")||e.width),l=parseFloat(i.getAttribute("height")||e.height);isNaN(s)&&(s=null),isNaN(l)&&(l=null),Et(i,r,null,!0,!1);for(var u,c,h=i.firstChild;h;)this._parseNode(h,r,o,null,!1,!1),h=h.nextSibling;if(function(f,g){for(var y=0;y=4&&(u={x:parseFloat(p[0]||0),y:parseFloat(p[1]||0),width:parseFloat(p[2]),height:parseFloat(p[3])})}if(u&&s!=null&&l!=null&&(c=R1(u,{x:0,y:0,width:s,height:l}),!e.ignoreViewBox)){var d=r;(r=new _e).add(d),d.scaleX=d.scaleY=c.scale,d.x=c.x,d.y=c.y}return e.ignoreRootClip||s==null||l==null||r.setClipPath(new ke({shape:{x:0,y:0,width:s,height:l}})),{root:r,width:s,height:l,viewBoxRect:u,viewBoxTransform:c,named:o}},n.prototype._parseNode=function(t,e,i,r,o,a){var s,l=t.nodeName.toLowerCase(),u=r;if(l==="defs"&&(o=!0),l==="text"&&(a=!0),l==="defs"||l==="switch")s=e;else{if(!o){var c=sd[l];if(c&&Bt(sd,l)){s=c.call(this,t,e);var h=t.getAttribute("name");if(h){var p={name:h,namedFrom:null,svgNodeTagLower:l,el:s};i.push(p),l==="g"&&(u=p)}else r&&i.push({name:r.name,namedFrom:r,svgNodeTagLower:l,el:s});e.add(s)}}var d=I1[l];if(d&&Bt(I1,l)){var f=d.call(this,t),g=t.getAttribute("id");g&&(this._defs[g]=f)}}if(s&&s.isGroup)for(var y=t.firstChild;y;)y.nodeType===1?this._parseNode(y,s,i,u,o,a):y.nodeType===3&&a&&this._parseText(y,s),y=y.nextSibling},n.prototype._parseText=function(t,e){var i=new Fo({style:{text:t.textContent},silent:!0,x:this._textX||0,y:this._textY||0});tn(e,i),Et(t,i,this._defsUsePending,!1,!1),function(l,u){var c=u.__selfStyle;if(c){var h=c.textBaseline,p=h;h&&h!=="auto"?h==="baseline"?p="alphabetic":h==="before-edge"||h==="text-before-edge"?p="top":h==="after-edge"||h==="text-after-edge"?p="bottom":h!=="central"&&h!=="mathematical"||(p="middle"):p="alphabetic",l.style.textBaseline=p}var d=u.__inheritedStyle;if(d){var f=d.textAlign,g=f;f&&(f==="middle"&&(g="center"),l.style.textAlign=g)}}(i,e);var r=i.style,o=r.fontSize;o&&o<9&&(r.fontSize=9,i.scaleX*=o/9,i.scaleY*=o/9);var a=(r.fontSize||r.fontFamily)&&[r.fontStyle,r.fontWeight,(r.fontSize||12)+"px",r.fontFamily||"sans-serif"].join(" ");r.font=a;var s=i.getBoundingRect();return this._textX+=s.width,e.add(i),i},n.internalField=void(sd={g:function(t,e){var i=new _e;return tn(e,i),Et(t,i,this._defsUsePending,!1,!1),i},rect:function(t,e){var i=new ke;return tn(e,i),Et(t,i,this._defsUsePending,!1,!1),i.setShape({x:parseFloat(t.getAttribute("x")||"0"),y:parseFloat(t.getAttribute("y")||"0"),width:parseFloat(t.getAttribute("width")||"0"),height:parseFloat(t.getAttribute("height")||"0")}),i.silent=!0,i},circle:function(t,e){var i=new In;return tn(e,i),Et(t,i,this._defsUsePending,!1,!1),i.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),r:parseFloat(t.getAttribute("r")||"0")}),i.silent=!0,i},line:function(t,e){var i=new ut;return tn(e,i),Et(t,i,this._defsUsePending,!1,!1),i.setShape({x1:parseFloat(t.getAttribute("x1")||"0"),y1:parseFloat(t.getAttribute("y1")||"0"),x2:parseFloat(t.getAttribute("x2")||"0"),y2:parseFloat(t.getAttribute("y2")||"0")}),i.silent=!0,i},ellipse:function(t,e){var i=new Uo;return tn(e,i),Et(t,i,this._defsUsePending,!1,!1),i.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),rx:parseFloat(t.getAttribute("rx")||"0"),ry:parseFloat(t.getAttribute("ry")||"0")}),i.silent=!0,i},polygon:function(t,e){var i,r=t.getAttribute("points");r&&(i=k1(r));var o=new cn({shape:{points:i||[]},silent:!0});return tn(e,o),Et(t,o,this._defsUsePending,!1,!1),o},polyline:function(t,e){var i,r=t.getAttribute("points");r&&(i=k1(r));var o=new qt({shape:{points:i||[]},silent:!0});return tn(e,o),Et(t,o,this._defsUsePending,!1,!1),o},image:function(t,e){var i=new Tt;return tn(e,i),Et(t,i,this._defsUsePending,!1,!1),i.setStyle({image:t.getAttribute("xlink:href")||t.getAttribute("href"),x:+t.getAttribute("x"),y:+t.getAttribute("y"),width:+t.getAttribute("width"),height:+t.getAttribute("height")}),i.silent=!0,i},text:function(t,e){var i=t.getAttribute("x")||"0",r=t.getAttribute("y")||"0",o=t.getAttribute("dx")||"0",a=t.getAttribute("dy")||"0";this._textX=parseFloat(i)+parseFloat(o),this._textY=parseFloat(r)+parseFloat(a);var s=new _e;return tn(e,s),Et(t,s,this._defsUsePending,!1,!0),s},tspan:function(t,e){var i=t.getAttribute("x"),r=t.getAttribute("y");i!=null&&(this._textX=parseFloat(i)),r!=null&&(this._textY=parseFloat(r));var o=t.getAttribute("dx")||"0",a=t.getAttribute("dy")||"0",s=new _e;return tn(e,s),Et(t,s,this._defsUsePending,!1,!0),this._textX+=parseFloat(o),this._textY+=parseFloat(a),s},path:function(t,e){var i=wy(t.getAttribute("d")||"");return tn(e,i),Et(t,i,this._defsUsePending,!1,!1),i.silent=!0,i}}),n}(),I1={lineargradient:function(n){var t=parseInt(n.getAttribute("x1")||"0",10),e=parseInt(n.getAttribute("y1")||"0",10),i=parseInt(n.getAttribute("x2")||"10",10),r=parseInt(n.getAttribute("y2")||"0",10),o=new jo(t,e,i,r);return A1(n,o),D1(n,o),o},radialgradient:function(n){var t=parseInt(n.getAttribute("cx")||"0",10),e=parseInt(n.getAttribute("cy")||"0",10),i=parseInt(n.getAttribute("r")||"0",10),r=new nh(t,e,i);return A1(n,r),D1(n,r),r}};function A1(n,t){n.getAttribute("gradientUnits")==="userSpaceOnUse"&&(t.global=!0)}function D1(n,t){for(var e=n.firstChild;e;){if(e.nodeType===1&&e.nodeName.toLocaleLowerCase()==="stop"){var i,r=e.getAttribute("offset");i=r&&r.indexOf("%")>0?parseInt(r,10)/100:r?parseFloat(r):0;var o={};O1(e,o,o);var a=o.stopColor||e.getAttribute("stop-color")||"#000000";t.colorStops.push({offset:i,color:a})}e=e.nextSibling}}function tn(n,t){n&&n.__inheritedStyle&&(t.__inheritedStyle||(t.__inheritedStyle={}),ce(t.__inheritedStyle,n.__inheritedStyle))}function k1(n){for(var t=tu(n),e=[],i=0;i0;d-=2){var f=h[d],g=h[d-1],y=tu(f);switch(p=p||[1,0,0,1,0,0],g){case"translate":Ci(p,p,[parseFloat(y[0]),parseFloat(y[1]||"0")]);break;case"scale":Bu(p,p,[parseFloat(y[0]),parseFloat(y[1]||y[0])]);break;case"rotate":Ii(p,p,-parseFloat(y[0])*ld,[parseFloat(y[1]||"0"),parseFloat(y[2]||"0")]);break;case"skewX":_n(p,[1,0,Math.tan(parseFloat(y[0])*ld),1,0,0],p);break;case"skewY":_n(p,[1,Math.tan(parseFloat(y[0])*ld),0,1,0,0],p);break;case"matrix":p[0]=parseFloat(y[0]),p[1]=parseFloat(y[1]),p[2]=parseFloat(y[2]),p[3]=parseFloat(y[3]),p[4]=parseFloat(y[4]),p[5]=parseFloat(y[5])}}u.setLocalTransform(p)}}(n,t),O1(n,a,s),i||function(l,u,c){for(var h=0;h0,g={api:i,geo:l,mapOrGeoModel:t,data:s,isVisualEncodedByVisualMap:f,isGeo:a,transformInfoRaw:p};l.resourceType==="geoJSON"?this._buildGeoJSON(g):l.resourceType==="geoSVG"&&this._buildSVG(g),this._updateController(t,e,i),this._updateMapSelectHandler(t,u,i,r)},n.prototype._buildGeoJSON=function(t){var e=this._regionsGroupByName=re(),i=re(),r=this._regionsGroup,o=t.transformInfoRaw,a=t.mapOrGeoModel,s=t.data,l=t.geo.projection,u=l&&l.stream;function c(d,f){return f&&(d=f(d)),d&&[d[0]*o.scaleX+o.x,d[1]*o.scaleY+o.y]}function h(d){for(var f=[],g=!u&&l&&l.project,y=0;y=0)&&(p=r);var d=a?{normal:{align:"center",verticalAlign:"middle"}}:null;Dn(t,kn(i),{labelFetcher:p,labelDataIndex:h,defaultText:e},d);var f=t.getTextContent();if(f&&(E1(f).ignore=f.ignore,t.textConfig&&a)){var g=t.getBoundingRect().clone();t.textConfig.layoutRect=g,t.textConfig.position=[(a[0]-g.x)/g.width*100+"%",(a[1]-g.y)/g.height*100+"%"]}t.disableLabelAnimation=!0}else t.removeTextContent(),t.removeTextConfig(),t.disableLabelAnimation=null}function G1(n,t,e,i,r,o){n.data?n.data.setItemGraphicEl(o,t):ye(t).eventData={componentType:"geo",componentIndex:r.componentIndex,geoIndex:r.componentIndex,name:e,region:i&&i.option||{}}}function H1(n,t,e,i,r){n.data||ea({el:t,componentModel:r,itemName:e,itemTooltipOption:i.get("tooltip")})}function W1(n,t,e,i,r){t.highDownSilentOnTouch=!!r.get("selectedMode");var o=i.getModel("emphasis"),a=o.get("focus");return ln(t,a,o.get("blurScope"),o.get("disabled")),n.isGeo&&function(s,l,u){var c=ye(s);c.componentMainType=l.mainType,c.componentIndex=l.componentIndex,c.componentHighDownName=u}(t,r,e),a}function X1(n,t,e){var i,r=[];function o(){i=[]}function a(){i.length&&(r.push(i),i=[])}var s=t({polygonStart:o,polygonEnd:a,lineStart:o,lineEnd:a,point:function(l,u){isFinite(l)&&isFinite(u)&&i.push([l,u])},sphere:function(){}});return!e&&s.polygonStart(),D(n,function(l){s.lineStart();for(var u=0;u-1&&(r.style.stroke=r.style.fill,r.style.fill="#fff",r.style.lineWidth=2),r},t.type="series.map",t.dependencies=["geo"],t.layoutMode="box",t.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},nameProperty:"name"},t}(it);function $I(n){var t={};n.eachSeriesByType("map",function(e){var i=e.getHostGeoModel(),r=i?"o"+i.id:"i"+e.getMapType();(t[r]=t[r]||[]).push(e)}),D(t,function(e,i){for(var r,o,a,s=(r=j(e,function(u){return u.getData()}),o=e[0].get("mapValueCalculation"),a={},D(r,function(u){u.each(u.mapDimension("value"),function(c,h){var p="ec-"+u.getName(h);a[p]=a[p]||[],isNaN(c)||a[p].push(c)})}),r[0].map(r[0].mapDimension("value"),function(u,c){for(var h="ec-"+r[0].getName(c),p=0,d=1/0,f=-1/0,g=a[h].length,y=0;y1?(d.width=p,d.height=p/_):(d.height=p,d.width=p*_),d.y=h[1]-d.height/2,d.x=h[0]-d.width/2;else{var b=n.getBoxLayoutParams();b.aspect=_,d=It(b,{width:v,height:m})}this.setViewRect(d.x,d.y,d.width,d.height),this.setCenter(n.get("center"),t),this.setZoom(n.get("zoom"))}at(pd,Y1);var t2=function(){function n(){this.dimensions=q1}return n.prototype.create=function(t,e){var i=[];function r(a){return{nameProperty:a.get("nameProperty"),aspectScale:a.get("aspectScale"),projection:a.get("projection")}}t.eachComponent("geo",function(a,s){var l=a.get("map"),u=new pd(l+s,l,H({nameMap:a.get("nameMap")},r(a)));u.zoomLimit=a.get("scaleLimit"),i.push(u),a.coordinateSystem=u,u.model=a,u.resize=K1,u.resize(a,e)}),t.eachSeries(function(a){if(a.get("coordinateSystem")==="geo"){var s=a.get("geoIndex")||0;a.coordinateSystem=i[s]}});var o={};return t.eachSeriesByType("map",function(a){if(!a.getHostGeoModel()){var s=a.getMapType();o[s]=o[s]||[],o[s].push(a)}}),D(o,function(a,s){var l=j(a,function(c){return c.get("nameMap")}),u=new pd(s,s,H({nameMap:hf(l)},r(a[0])));u.zoomLimit=Vn.apply(null,j(a,function(c){return c.get("scaleLimit")})),i.push(u),u.resize=K1,u.resize(a[0],e),D(a,function(c){c.coordinateSystem=u,function(h,p){D(p.get("geoCoord"),function(d,f){h.addGeoCoord(f,d)})}(u,c)})}),i},n.prototype.getFilledRegions=function(t,e,i,r){for(var o=(t||[]).slice(),a=re(),s=0;s=0;h--)u[h]==null&&(delete l[s[h]],s.pop())}(r):dd(r,!0):(Ot(e!=="linear"||r.dataExtent),dd(r))}return n.prototype.mapValueToVisual=function(t){var e=this._normalizeData(t);return this._normalizedToVisual(e,t)},n.prototype.getNormalizer=function(){return he(this._normalizeData,this)},n.listVisualTypes=function(){return Oe(n.visualHandlers)},n.isValidType=function(t){return n.visualHandlers.hasOwnProperty(t)},n.eachVisual=function(t,e,i){ne(t)?D(t,e,i):e.call(i,t)},n.mapVisual=function(t,e,i){var r,o=Y(t)?[]:ne(t)?{}:(r=!0,null);return n.eachVisual(t,function(a,s){var l=e.call(i,a,s);r?o=l:o[s]=l}),o},n.retrieveVisuals=function(t){var e,i={};return t&&Ea(n.visualHandlers,function(r,o){t.hasOwnProperty(o)&&(i[o]=t[o],e=!0)}),e?i:null},n.prepareVisualTypes=function(t){if(Y(t))t=t.slice();else{if(!s2(t))return[];var e=[];Ea(t,function(i,r){e.push(r)}),t=e}return t.sort(function(i,r){return r==="color"&&i!=="color"&&i.indexOf("color")===0?1:-1}),t},n.dependsOn=function(t,e){return e==="color"?!(!t||t.indexOf(e)!==0):t===e},n.findPieceIndex=function(t,e,i){for(var r,o=1/0,a=0,s=e.length;a=a/3?1:2),c=i.y-o(l)*s*(s>=a/3?1:2);l=i.angle-Math.PI/2,e.moveTo(u,c),e.lineTo(i.x+r(l)*s,i.y+o(l)*s),e.lineTo(i.x+r(i.angle)*a,i.y+o(i.angle)*a),e.lineTo(i.x-r(l)*s,i.y-o(l)*s),e.lineTo(u,c)},t}(Ie);function au(n,t){var e=n==null?"":n+"";return t&&(Q(t)?e=t.replace("{value}",e):ue(t)&&(e=t(n))),e}var h2=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return F(t,n),t.prototype.render=function(e,i,r){this.group.removeAll();var o=e.get(["axisLine","lineStyle","color"]),a=function(s,l){var u=s.get("center"),c=l.getWidth(),h=l.getHeight(),p=Math.min(c,h);return{cx:ee(u[0],l.getWidth()),cy:ee(u[1],l.getHeight()),r:ee(s.get("radius"),p/2)}}(e,r);this._renderMain(e,i,r,o,a),this._data=e.getData()},t.prototype.dispose=function(){},t.prototype._renderMain=function(e,i,r,o,a){var s=this.group,l=e.get("clockwise"),u=-e.get("startAngle")/180*Math.PI,c=-e.get("endAngle")/180*Math.PI,h=e.getModel("axisLine"),p=h.get("roundCap")?Yl:Nt,d=h.get("show"),f=h.getModel("lineStyle"),g=f.get("width"),y=[u,c];zc(y,!l);for(var v=(c=y[1])-(u=y[0]),m=u,_=[],x=0;d&&x=M&&(S===0?0:o[S-1][0])Math.PI/2&&(V+=Math.PI):K==="tangential"?V=-I-Math.PI/2:Ae(K)&&(V=K*Math.PI/180),V===0?d.add(new Me({style:nt(b,{text:E,x:B,y:G,verticalAlign:p<-.8?"top":p>.8?"bottom":"middle",align:h<-.4?"left":h>.4?"right":"center"},{inheritColor:z}),silent:!0})):d.add(new Me({style:nt(b,{text:E,x:B,y:G,verticalAlign:"middle",align:"center"},{inheritColor:z}),silent:!0,originX:B,originY:G,rotation:V}))}if(x.get("show")&&P!==w){N=(N=x.get("distance"))?N+c:c;for(var X=0;X<=M;X++){h=Math.cos(I),p=Math.sin(I);var Z=new ut({shape:{x1:h*(y-N)+f,y1:p*(y-N)+g,x2:h*(y-C-N)+f,y2:p*(y-C-N)+g},silent:!0,style:L});L.stroke==="auto"&&Z.setStyle({stroke:o((P+X/M)/w)}),d.add(Z),I+=A}I-=A}else I+=T}},t.prototype._renderPointer=function(e,i,r,o,a,s,l,u,c){var h=this.group,p=this._data,d=this._progressEls,f=[],g=e.get(["pointer","show"]),y=e.getModel("progress"),v=y.get("show"),m=e.getData(),_=m.mapDimension("value"),x=+e.get("min"),b=+e.get("max"),w=[x,b],M=[s,l];function S(I,T){var A,k=m.getItemModel(I).getModel("pointer"),L=ee(k.get("width"),a.r),O=ee(k.get("length"),a.r),P=e.get(["pointer","icon"]),R=k.get("offsetCenter"),N=ee(R[0],a.r),E=ee(R[1],a.r),z=k.get("keepAspect");return(A=P?_t(P,N-L/2,E-O,L,O,null,z):new c2({shape:{angle:-Math.PI/2,width:L,r:O,x:N,y:E}})).rotation=-(T+Math.PI/2),A.x=a.cx,A.y=a.cy,A}function C(I,T){var A=y.get("roundCap")?Yl:Nt,k=y.get("overlap"),L=k?y.get("width"):c/m.count(),O=k?a.r-L:a.r-(I+1)*L,P=k?a.r:a.r-I*L,R=new A({shape:{startAngle:s,endAngle:T,cx:a.cx,cy:a.cy,clockwise:u,r0:O,r:P}});return k&&(R.z2=b-m.get(_,I)%b),R}(v||g)&&(m.diff(p).add(function(I){var T=m.get(_,I);if(g){var A=S(I,s);Ye(A,{rotation:-((isNaN(+T)?M[0]:Fe(T,w,M,!0))+Math.PI/2)},e),h.add(A),m.setItemGraphicEl(I,A)}if(v){var k=C(I,s),L=y.get("clip");Ye(k,{shape:{endAngle:Fe(T,w,M,L)}},e),h.add(k),Fc(e.seriesIndex,m.dataType,I,k),f[I]=k}}).update(function(I,T){var A=m.get(_,I);if(g){var k=p.getItemGraphicEl(T),L=k?k.rotation:s,O=S(I,L);O.rotation=L,ze(O,{rotation:-((isNaN(+A)?M[0]:Fe(A,w,M,!0))+Math.PI/2)},e),h.add(O),m.setItemGraphicEl(I,O)}if(v){var P=d[T],R=C(I,P?P.shape.endAngle:s),N=y.get("clip");ze(R,{shape:{endAngle:Fe(A,w,M,N)}},e),h.add(R),Fc(e.seriesIndex,m.dataType,I,R),f[I]=R}}).execute(),m.each(function(I){var T=m.getItemModel(I),A=T.getModel("emphasis"),k=A.get("focus"),L=A.get("blurScope"),O=A.get("disabled");if(g){var P=m.getItemGraphicEl(I),R=m.getItemVisual(I,"style"),N=R.fill;if(P instanceof Tt){var E=P.style;P.useStyle(H({image:E.image,x:E.x,y:E.y,width:E.width,height:E.height},R))}else P.useStyle(R),P.type!=="pointer"&&P.setColor(N);P.setStyle(T.getModel(["pointer","itemStyle"]).getItemStyle()),P.style.fill==="auto"&&P.setStyle("fill",o(Fe(m.get(_,I),w,[0,1],!0))),P.z2EmphasisLift=0,Zn(P,T),ln(P,k,L,O)}if(v){var z=f[I];z.useStyle(m.getItemVisual(I,"style")),z.setStyle(T.getModel(["progress","itemStyle"]).getItemStyle()),z.z2EmphasisLift=0,Zn(z,T),ln(z,k,L,O)}}),this._progressEls=f)},t.prototype._renderAnchor=function(e,i){var r=e.getModel("anchor");if(r.get("show")){var o=r.get("size"),a=r.get("icon"),s=r.get("offsetCenter"),l=r.get("keepAspect"),u=_t(a,i.cx-o/2+ee(s[0],i.r),i.cy-o/2+ee(s[1],i.r),o,o,null,l);u.z2=r.get("showAbove")?1:0,u.setStyle(r.getModel("itemStyle").getItemStyle()),this.group.add(u)}},t.prototype._renderTitleAndDetail=function(e,i,r,o,a){var s=this,l=e.getData(),u=l.mapDimension("value"),c=+e.get("min"),h=+e.get("max"),p=new _e,d=[],f=[],g=e.isAnimationEnabled(),y=e.get(["pointer","showAbove"]);l.diff(this._data).add(function(v){d[v]=new Me({silent:!0}),f[v]=new Me({silent:!0})}).update(function(v,m){d[v]=s._titleEls[m],f[v]=s._detailEls[m]}).execute(),l.each(function(v){var m=l.getItemModel(v),_=l.get(u,v),x=new _e,b=o(Fe(_,[c,h],[0,1],!0)),w=m.getModel("title");if(w.get("show")){var M=w.get("offsetCenter"),S=a.cx+ee(M[0],a.r),C=a.cy+ee(M[1],a.r);(R=d[v]).attr({z2:y?0:2,style:nt(w,{x:S,y:C,text:l.getName(v),align:"center",verticalAlign:"middle"},{inheritColor:b})}),x.add(R)}var I=m.getModel("detail");if(I.get("show")){var T=I.get("offsetCenter"),A=a.cx+ee(T[0],a.r),k=a.cy+ee(T[1],a.r),L=ee(I.get("width"),a.r),O=ee(I.get("height"),a.r),P=e.get(["progress","show"])?l.getItemVisual(v,"style").fill:b,R=f[v],N=I.get("formatter");R.attr({z2:y?0:2,style:nt(I,{x:A,y:k,text:au(_,N),width:isNaN(L)?null:L,height:isNaN(O)?null:O,align:"center",verticalAlign:"middle"},{inheritColor:P})}),Uy(R,{normal:I},_,function(E){return au(E,N)}),g&&Yy(R,v,l,e,{getFormattedLabel:function(E,z,B,G,K,V){return au(V?V.interpolatedValue:_,N)}}),x.add(R)}p.add(x)}),this.group.add(p),this._titleEls=d,this._detailEls=f},t.type="gauge",t}(Je),p2=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e.visualStyleAccessPath="itemStyle",e}return F(t,n),t.prototype.getInitialData=function(e,i){return ka(this,["value"])},t.type="series.gauge",t.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,"#E6EBF8"]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:"#63677A",width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:"#63677A",width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:"#464646",fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:"#fff",borderWidth:0,borderColor:"#5470c6"}},title:{show:!0,offsetCenter:[0,"20%"],color:"#464646",fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"#464646",fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},t}(it);function d2(n){n.registerChartView(h2),n.registerSeriesModel(p2)}var f2=["itemStyle","opacity"],g2=function(n){function t(e,i){var r=n.call(this)||this,o=r,a=new qt,s=new Me;return o.setTextContent(s),r.setTextGuideLine(a),r.updateData(e,i,!0),r}return F(t,n),t.prototype.updateData=function(e,i,r){var o=this,a=e.hostModel,s=e.getItemModel(i),l=e.getItemLayout(i),u=s.getModel("emphasis"),c=s.get(f2);c=c??1,r||Er(o),o.useStyle(e.getItemVisual(i,"style")),o.style.lineJoin="round",r?(o.setShape({points:l.points}),o.style.opacity=0,Ye(o,{style:{opacity:c}},a,i)):ze(o,{style:{opacity:c},shape:{points:l.points}},a,i),Zn(o,s),this._updateLabel(e,i),ln(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},t.prototype._updateLabel=function(e,i){var r=this,o=this.getTextGuideLine(),a=r.getTextContent(),s=e.hostModel,l=e.getItemModel(i),u=e.getItemLayout(i).label,c=e.getItemVisual(i,"style"),h=c.fill;Dn(a,kn(l),{labelFetcher:e.hostModel,labelDataIndex:i,defaultOpacity:c.opacity,defaultText:e.getName(i)},{normal:{align:u.textAlign,verticalAlign:u.verticalAlign}}),r.setTextConfig({local:!0,inside:!!u.inside,insideStroke:h,outsideFill:h});var p=u.linePoints;o.setShape({points:p}),r.textGuideLineConfig={anchor:p?new ge(p[0][0],p[0][1]):null},ze(a,{style:{x:u.x,y:u.y}},s,i),a.attr({rotation:u.rotation,originX:u.x,originY:u.y,z2:10}),Np(r,Ep(l),{stroke:h})},t}(cn),y2=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e.ignoreLabelLineUpdate=!0,e}return F(t,n),t.prototype.render=function(e,i,r){var o=e.getData(),a=this._data,s=this.group;o.diff(a).add(function(l){var u=new g2(o,l);o.setItemGraphicEl(l,u),s.add(u)}).update(function(l,u){var c=a.getItemGraphicEl(u);c.updateData(o,l),s.add(c),o.setItemGraphicEl(l,c)}).remove(function(l){Jo(a.getItemGraphicEl(l),e,l)}).execute(),this._data=o},t.prototype.remove=function(){this.group.removeAll(),this._data=null},t.prototype.dispose=function(){},t.type="funnel",t}(Je),v2=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return F(t,n),t.prototype.init=function(e){n.prototype.init.apply(this,arguments),this.legendVisualProvider=new qp(he(this.getData,this),he(this.getRawData,this)),this._defaultLabelLine(e)},t.prototype.getInitialData=function(e,i){return ka(this,{coordDimensions:["value"],encodeDefaulter:Se(Ch,this)})},t.prototype._defaultLabelLine=function(e){Po(e,"labelLine",["show"]);var i=e.labelLine,r=e.emphasis.labelLine;i.show=i.show&&e.label.show,r.show=r.show&&e.emphasis.label.show},t.prototype.getDataParams=function(e){var i=this.getData(),r=n.prototype.getDataParams.call(this,e),o=i.mapDimension("value"),a=i.getSum(o);return r.percent=a?+(i.get(o,e)/a*100).toFixed(2):0,r.$vars.push("percent"),r},t.type="series.funnel",t.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},t}(it);function m2(n,t){n.eachSeriesByType("funnel",function(e){var i=e.getData(),r=i.mapDimension("value"),o=e.get("sort"),a=function(k,L){return It(k.getBoxLayoutParams(),{width:L.getWidth(),height:L.getHeight()})}(e,t),s=e.get("orient"),l=a.width,u=a.height,c=function(k,L){for(var O=k.mapDimension("value"),P=k.mapArray(O,function(B){return B}),R=[],N=L==="ascending",E=0,z=k.count();E5)return;var i=this._model.coordinateSystem.getSlidedAxisExpandWindow([n.offsetX,n.offsetY]);i.behavior!=="none"&&this._dispatchExpand({axisExpandWindow:i.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(n){if(!this._mouseDownPoint&&yd(this,"mousemove")){var t=this._model,e=t.coordinateSystem.getSlidedAxisExpandWindow([n.offsetX,n.offsetY]),i=e.behavior;i==="jump"&&this._throttledDispatchExpand.debounceNextCall(t.get("axisExpandDebounce")),this._throttledDispatchExpand(i==="none"?null:{axisExpandWindow:e.axisExpandWindow,animation:i==="jump"?null:{duration:0}})}}};function yd(n,t){var e=n._model;return e.get("axisExpandable")&&e.get("axisExpandTriggerOn")===t}var S2=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return F(t,n),t.prototype.init=function(){n.prototype.init.apply(this,arguments),this.mergeOption({})},t.prototype.mergeOption=function(e){var i=this.option;e&&de(i,e,!0),this._initDimensions()},t.prototype.contains=function(e,i){var r=e.get("parallelIndex");return r!=null&&i.getComponent("parallel",r)===this},t.prototype.setAxisExpand=function(e){D(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(i){e.hasOwnProperty(i)&&(this.option[i]=e[i])},this)},t.prototype._initDimensions=function(){var e=this.dimensions=[],i=this.parallelAxisIndex=[];D(He(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(r){return(r.get("parallelIndex")||0)===this.componentIndex},this),function(r){e.push("dim"+r.get("dim")),i.push(r.componentIndex)})},t.type="parallel",t.dependencies=["parallelAxis"],t.layoutMode="box",t.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},t}(be),M2=function(n){function t(e,i,r,o,a){var s=n.call(this,e,i,r)||this;return s.type=o||"value",s.axisIndex=a,s}return F(t,n),t.prototype.isHorizontal=function(){return this.coordinateSystem.getModel().get("layout")!=="horizontal"},t}(Rn);function su(n,t,e,i,r,o){n=n||0;var a=e[1]-e[0];if(r!=null&&(r=no(r,[0,a])),o!=null&&(o=Math.max(o,r??0)),i==="all"){var s=Math.abs(t[1]-t[0]);s=no(s,[0,a]),r=o=no(s,[r,o]),i=0}t[0]=no(t[0],e),t[1]=no(t[1],e);var l=vd(t,i);t[i]+=n;var u,c=r||0,h=e.slice();return l.sign<0?h[0]+=c:h[1]-=c,t[i]=no(t[i],h),u=vd(t,i),r!=null&&(u.sign!==l.sign||u.spano&&(t[1-i]=t[i]+u.sign*o),t}function vd(n,t){var e=n[t]-n[1-t];return{span:Math.abs(e),sign:e>0?-1:e<0?1:t?-1:1}}function no(n,t){return Math.min(t[1]!=null?t[1]:1/0,Math.max(t[0]!=null?t[0]:-1/0,n))}var md=D,tx=Math.min,nx=Math.max,ix=Math.floor,T2=Math.ceil,rx=We,C2=Math.PI,I2=function(){function n(t,e,i){this.type="parallel",this._axesMap=re(),this._axesLayout={},this.dimensions=t.dimensions,this._model=t,this._init(t,e,i)}return n.prototype._init=function(t,e,i){var r=t.dimensions,o=t.parallelAxisIndex;md(r,function(a,s){var l=o[s],u=e.getComponent("parallelAxis",l),c=this._axesMap.set(a,new M2(a,Vl(u),[0,0],u.get("type"),l)),h=c.type==="category";c.onBand=h&&u.get("boundaryGap"),c.inverse=u.get("inverse"),u.axis=c,c.model=u,c.coordinateSystem=u.coordinateSystem=this},this)},n.prototype.update=function(t,e){this._updateAxesFromSeries(this._model,t)},n.prototype.containPoint=function(t){var e=this._makeLayoutInfo(),i=e.axisBase,r=e.layoutBase,o=e.pixelDimIndex,a=t[1-o],s=t[o];return a>=i&&a<=i+e.axisLength&&s>=r&&s<=r+e.layoutLength},n.prototype.getModel=function(){return this._model},n.prototype._updateAxesFromSeries=function(t,e){e.eachSeries(function(i){if(t.contains(i,e)){var r=i.getData();md(this.dimensions,function(o){var a=this._axesMap.get(o);a.scale.unionExtentFromData(r,r.mapDimension(o)),Qr(a.scale,a.model)},this)}},this)},n.prototype.resize=function(t,e){this._rect=It(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()}),this._layoutAxes()},n.prototype.getRect=function(){return this._rect},n.prototype._makeLayoutInfo=function(){var t,e=this._model,i=this._rect,r=["x","y"],o=["width","height"],a=e.get("layout"),s=a==="horizontal"?0:1,l=i[o[s]],u=[0,l],c=this.dimensions.length,h=lu(e.get("axisExpandWidth"),u),p=lu(e.get("axisExpandCount")||0,[0,c]),d=e.get("axisExpandable")&&c>3&&c>p&&p>1&&h>0&&l>0,f=e.get("axisExpandWindow");f?(t=lu(f[1]-f[0],u),f[1]=f[0]+t):(t=lu(h*(p-1),u),(f=[h*(e.get("axisExpandCenter")||ix(c/2))-t/2])[1]=f[0]+t);var g=(l-t)/(c-p);g<3&&(g=0);var y=[ix(rx(f[0]/h,1))+1,T2(rx(f[1]/h,1))-1],v=g/h*f[0];return{layout:a,pixelDimIndex:s,layoutBase:i[r[s]],layoutLength:l,axisBase:i[r[1-s]],axisLength:i[o[1-s]],axisExpandable:d,axisExpandWidth:h,axisCollapseWidth:g,axisExpandWindow:f,axisCount:c,winInnerIndices:y,axisExpandWindow0Pos:v}},n.prototype._layoutAxes=function(){var t=this._rect,e=this._axesMap,i=this.dimensions,r=this._makeLayoutInfo(),o=r.layout;e.each(function(a){var s=[0,r.axisLength],l=a.inverse?1:0;a.setExtent(s[l],s[1-l])}),md(i,function(a,s){var l=(r.axisExpandable?D2:A2)(s,r),u={horizontal:{x:l.position,y:r.axisLength},vertical:{x:0,y:l.position}},c={horizontal:C2/2,vertical:0},h=[u[o].x+t.x,u[o].y+t.y],p=c[o],d=[1,0,0,1,0,0];Ii(d,d,p),Ci(d,d,h),this._axesLayout[a]={position:h,rotation:p,transform:d,axisNameAvailableWidth:l.axisNameAvailableWidth,axisLabelShow:l.axisLabelShow,nameTruncateMaxWidth:l.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},n.prototype.getAxis=function(t){return this._axesMap.get(t)},n.prototype.dataToPoint=function(t,e){return this.axisCoordToPoint(this._axesMap.get(e).dataToCoord(t),e)},n.prototype.eachActiveState=function(t,e,i,r){i==null&&(i=0),r==null&&(r=t.count());var o=this._axesMap,a=this.dimensions,s=[],l=[];D(a,function(g){s.push(t.mapDimension(g)),l.push(o.get(g).model)});for(var u=this.hasAxisBrushed(),c=i;co*(1-h[0])?(u="jump",s=l-o*(1-h[2])):(s=l-o*h[1])>=0&&(s=l-o*(1-h[1]))<=0&&(s=0),(s*=e.axisExpandWidth/c)?su(s,r,a,"all"):u="none";else{var d=r[1]-r[0];(r=[nx(0,a[1]*l/d-d/2)])[1]=tx(a[1],r[0]+d),r[0]=r[1]-d}return{axisExpandWindow:r,behavior:u}},n}();function lu(n,t){return tx(nx(n,t[0]),t[1])}function A2(n,t){var e=t.layoutLength/(t.axisCount-1);return{position:e*n,axisNameAvailableWidth:e,axisLabelShow:!0}}function D2(n,t){var e,i,r=t.layoutLength,o=t.axisExpandWidth,a=t.axisCount,s=t.axisCollapseWidth,l=t.winInnerIndices,u=s,c=!1;return n=0;r--)Do(i[r])},t.prototype.getActiveState=function(e){var i=this.activeIntervals;if(!i.length)return"normal";if(e==null||isNaN(+e))return"inactive";if(i.length===1){var r=i[0];if(r[0]<=e&&e<=r[1])return"active"}else for(var o=0,a=i.length;o6}(n)||o){if(a&&!o){s.brushMode==="single"&&Sd(n);var l=ae(s);l.brushType=xx(l.brushType,a),l.panelId=a===hr?null:a.panelId,o=n._creatingCover=lx(n,l),n._covers.push(o)}if(o){var u=uu[xx(n._brushType,a)];o.__brushOption.range=u.getCreatingRange(Id(n,o,n._track)),i&&(ux(n,o),u.updateCommon(n,o)),cx(n,o),r={isEnd:i}}}else i&&s.brushMode==="single"&&s.removeOnClick&&wd(n,t,e)&&Sd(n)&&(r={isEnd:i,removeOnClick:!0});return r}function xx(n,t){return n==="auto"?t.defaultBrushType:n}var E2={mousedown:function(n){if(this._dragging)bx(this,n);else if(!n.target||!n.target.draggable){Ad(n);var t=this.group.transformCoordToLocal(n.offsetX,n.offsetY);this._creatingCover=null,(this._creatingPanel=wd(this,n,t))&&(this._dragging=!0,this._track=[t.slice()])}},mousemove:function(n){var t=n.offsetX,e=n.offsetY,i=this.group.transformCoordToLocal(t,e);if(function(o,a,s){if(o._brushType&&!function(d,f,g){var y=d._zr;return f<0||f>y.getWidth()||g<0||g>y.getHeight()}(o,a.offsetX,a.offsetY)){var l=o._zr,u=o._covers,c=wd(o,a,s);if(!o._dragging)for(var h=0;h0?1:-1})(e,o,r,i,h),function(f,g,y,v,m,_,x,b,w,M){var S,C=w.valueDim,I=w.categoryDim,T=Math.abs(y[I.wh]),A=f.getItemVisual(g,"symbolSize");(S=Y(A)?A.slice():A==null?["100%","100%"]:[A,A])[I.index]=ee(S[I.index],T),S[C.index]=ee(S[C.index],v?T:Math.abs(_)),M.symbolSize=S,(M.symbolScale=[S[0]/b,S[1]/b])[C.index]*=(w.isHorizontal?-1:1)*x}(n,t,r,o,0,h.boundingLength,h.pxSign,u,i,h),function(f,g,y,v,m){var _=f.get(H2)||0;_&&(Ld.attr({scaleX:g[0],scaleY:g[1],rotation:y}),Ld.updateTransform(),_/=Ld.getLineScale(),_*=g[v.valueDim.index]),m.valueLineWidth=_||0}(e,h.symbolScale,l,i,h);var p=h.symbolSize,d=jh(e.get("symbolOffset"),p);return function(f,g,y,v,m,_,x,b,w,M,S,C){var I=S.categoryDim,T=S.valueDim,A=C.pxSign,k=Math.max(g[T.index]+b,0),L=k;if(v){var O=Math.abs(w),P=Vn(f.get("symbolMargin"),"15%")+"",R=!1;P.lastIndexOf("!")===P.length-1&&(R=!0,P=P.slice(0,P.length-1));var N=ee(P,g[T.index]),E=Math.max(k+2*N,0),z=R?0:2*N,B=xc(v),G=B?v:Vx((O+z)/E);E=k+2*(N=(O-G*k)/2/(R?G:Math.max(G-1,1))),z=R?0:2*N,B||v==="fixed"||(G=M?Vx((Math.abs(M)+z)/E):0),L=G*E-z,C.repeatTimes=G,C.symbolMargin=N}var K=A*(L/2),V=C.pathPosition=[];V[I.index]=y[I.wh]/2,V[T.index]=x==="start"?K:x==="end"?w-K:w/2,_&&(V[0]+=_[0],V[1]+=_[1]);var X=C.bundlePosition=[];X[I.index]=y[I.xy],X[T.index]=y[T.xy];var Z=C.barRectShape=H({},y);Z[T.wh]=A*Math.max(Math.abs(y[T.wh]),Math.abs(V[T.index]+K)),Z[I.wh]=y[I.wh];var W=C.clipShape={};W[I.xy]=-y[I.xy],W[I.wh]=S.ecSize[I.wh],W[T.xy]=0,W[T.wh]=y[T.wh]}(e,p,r,o,0,d,s,h.valueLineWidth,h.boundingLength,h.repeatCutLength,i,h),h}function Pd(n,t){return n.toGlobalCoord(n.dataToCoord(n.scale.parse(t)))}function Dx(n){var t=n.symbolPatternSize,e=_t(n.symbolType,-t/2,-t/2,t,t);return e.attr({culling:!0}),e.type!=="image"&&e.setStyle({strokeNoScale:!0}),e}function kx(n,t,e,i){var r=n.__pictorialBundle,o=e.symbolSize,a=e.valueLineWidth,s=e.pathPosition,l=t.valueDim,u=e.repeatTimes||0,c=0,h=o[t.valueDim.index]+a+2*e.symbolMargin;for(Od(n,function(g){g.__pictorialAnimationIndex=c,g.__pictorialRepeatTimes=u,c0:v<0)&&(m=u-1-g),y[l.index]=h*(m-u/2+.5)+s[l.index],{x:y[0],y:y[1],scaleX:e.symbolScale[0],scaleY:e.symbolScale[1],rotation:e.rotation}}}function Lx(n,t,e,i){var r=n.__pictorialBundle,o=n.__pictorialMainPath;o?ro(o,null,{x:e.pathPosition[0],y:e.pathPosition[1],scaleX:e.symbolScale[0],scaleY:e.symbolScale[1],rotation:e.rotation},e,i):(o=n.__pictorialMainPath=Dx(e),r.add(o),ro(o,{x:e.pathPosition[0],y:e.pathPosition[1],scaleX:0,scaleY:0,rotation:e.rotation},{scaleX:e.symbolScale[0],scaleY:e.symbolScale[1]},e,i))}function Px(n,t,e){var i=H({},t.barRectShape),r=n.__pictorialBarRect;r?ro(r,null,{shape:i},t,e):((r=n.__pictorialBarRect=new ke({z2:2,shape:i,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}})).disableMorphing=!0,n.add(r))}function Ox(n,t,e,i){if(e.symbolClip){var r=n.__pictorialClipPath,o=H({},e.clipShape),a=t.valueDim,s=e.animationModel,l=e.dataIndex;if(r)ze(r,{shape:o},s,l);else{o[a.wh]=0,r=new ke({shape:o}),n.__pictorialBundle.setClipPath(r),n.__pictorialClipPath=r;var u={};u[a.wh]=e.clipShape[a.wh],zr[i?"updateProps":"initProps"](r,{shape:u},s,l)}}}function Rx(n,t){var e=n.getItemModel(t);return e.getAnimationDelayParams=X2,e.isAnimationEnabled=U2,e}function X2(n){return{index:n.__pictorialAnimationIndex,count:n.__pictorialRepeatTimes}}function U2(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function Nx(n,t,e,i){var r=new _e,o=new _e;return r.add(o),r.__pictorialBundle=o,o.x=e.bundlePosition[0],o.y=e.bundlePosition[1],e.symbolRepeat?kx(r,t,e):Lx(r,0,e),Px(r,e,i),Ox(r,t,e,i),r.__pictorialShapeStr=zx(n,e),r.__pictorialSymbolMeta=e,r}function Ex(n,t,e,i){var r=i.__pictorialBarRect;r&&r.removeTextContent();var o=[];Od(i,function(a){o.push(a)}),i.__pictorialMainPath&&o.push(i.__pictorialMainPath),i.__pictorialClipPath&&(e=null),D(o,function(a){Ko(a,{scaleX:0,scaleY:0},e,t,function(){i.parent&&i.parent.remove(i)})}),n.setItemGraphicEl(t,null)}function zx(n,t){return[n.getItemVisual(t.dataIndex,"symbol")||"none",!!t.symbolRepeat,!!t.symbolClip].join(":")}function Od(n,t,e){D(n.__pictorialBundle.children(),function(i){i!==n.__pictorialBarRect&&t.call(e,i)})}function ro(n,t,e,i,r,o){t&&n.attr(t),i.symbolClip&&!r?e&&n.attr(e):e&&zr[r?"updateProps":"initProps"](n,e,i.animationModel,i.dataIndex,o)}function Bx(n,t,e){var i=e.dataIndex,r=e.itemModel,o=r.getModel("emphasis"),a=o.getModel("itemStyle").getItemStyle(),s=r.getModel(["blur","itemStyle"]).getItemStyle(),l=r.getModel(["select","itemStyle"]).getItemStyle(),u=r.getShallow("cursor"),c=o.get("focus"),h=o.get("blurScope"),p=o.get("scale");Od(n,function(g){if(g instanceof Tt){var y=g.style;g.useStyle(H({image:y.image,x:y.x,y:y.y,width:y.width,height:y.height},e.style))}else g.useStyle(e.style);var v=g.ensureState("emphasis");v.style=a,p&&(v.scaleX=1.1*g.scaleX,v.scaleY=1.1*g.scaleY),g.ensureState("blur").style=s,g.ensureState("select").style=l,u&&(g.cursor=u),g.z2=e.z2});var d=t.valueDim.posDesc[+(e.boundingLength>0)],f=n.__pictorialBarRect;f.ignoreClip=!0,Dn(f,kn(r),{labelFetcher:t.seriesModel,labelDataIndex:i,defaultText:Ul(t.seriesModel.getData(),i),inheritColor:e.style.fill,defaultOpacity:e.style.opacity,defaultOutsidePosition:d}),ln(n,c,h,o.get("disabled"))}function Vx(n){var t=Math.round(n);return Math.abs(n-t)<1e-4?t:Math.ceil(n)}var Y2=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e.hasSymbolVisual=!0,e.defaultSymbol="roundRect",e}return F(t,n),t.prototype.getInitialData=function(e){return e.stack=null,n.prototype.getInitialData.apply(this,arguments)},t.type="series.pictorialBar",t.dependencies=["grid"],t.defaultOption=ta(Aa.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",clip:!1,progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:"#212121"}}}),t}(Aa);function Z2(n){n.registerChartView(W2),n.registerSeriesModel(Y2),n.registerLayout(n.PRIORITY.VISUAL.LAYOUT,Se(E0,"pictorialBar")),n.registerLayout(n.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,z0("pictorialBar"))}var dr=Ee(),Fx=ae,Rd=he,Gx=function(){function n(){this._dragging=!1,this.animationThreshold=15}return n.prototype.render=function(t,e,i,r){var o=e.get("value"),a=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=i,r||this._lastValue!==o||this._lastStatus!==a){this._lastValue=o,this._lastStatus=a;var s=this._group,l=this._handle;if(!a||a==="hide")return s&&s.hide(),void(l&&l.hide());s&&s.show(),l&&l.show();var u={};this.makeElOption(u,o,t,e,i);var c=u.graphicKey;c!==this._lastGraphicKey&&this.clear(i),this._lastGraphicKey=c;var h=this._moveAnimation=this.determineAnimation(t,e);if(s){var p=Se(Hx,e,h);this.updatePointerEl(s,u,p),this.updateLabelEl(s,u,p,e)}else s=this._group=new _e,this.createPointerEl(s,u,t,e),this.createLabelEl(s,u,t,e),i.getZr().add(s);Ux(s,e,!0),this._renderHandle(o)}},n.prototype.remove=function(t){this.clear(t)},n.prototype.dispose=function(t){this.clear(t)},n.prototype.determineAnimation=function(t,e){var i=e.get("animation"),r=t.axis,o=r.type==="category",a=e.get("snap");if(!a&&!o)return!1;if(i==="auto"||i==null){var s=this.animationThreshold;if(o&&r.getBandWidth()>s)return!0;if(a){var l=nd(t).seriesDataCount,u=r.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return i===!0},n.prototype.makeElOption=function(t,e,i,r,o){},n.prototype.createPointerEl=function(t,e,i,r){var o=e.pointer;if(o){var a=dr(t).pointerEl=new zr[o.type](Fx(e.pointer));t.add(a)}},n.prototype.createLabelEl=function(t,e,i,r){if(e.label){var o=dr(t).labelEl=new Me(Fx(e.label));t.add(o),Xx(o,r)}},n.prototype.updatePointerEl=function(t,e,i){var r=dr(t).pointerEl;r&&e.pointer&&(r.setStyle(e.pointer.style),i(r,{shape:e.pointer.shape}))},n.prototype.updateLabelEl=function(t,e,i,r){var o=dr(t).labelEl;o&&(o.setStyle(e.label.style),i(o,{x:e.label.x,y:e.label.y}),Xx(o,r))},n.prototype._renderHandle=function(t){if(!this._dragging&&this.updateHandleTransform){var e,i=this._axisPointerModel,r=this._api.getZr(),o=this._handle,a=i.getModel("handle"),s=i.get("status");if(!a.get("show")||!s||s==="hide")return o&&r.remove(o),void(this._handle=null);this._handle||(e=!0,o=this._handle=Qo(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){Ti(u.event)},onmousedown:Rd(this._onHandleDragMove,this,0,0),drift:Rd(this._onHandleDragMove,this),ondragend:Rd(this._onHandleDragEnd,this)}),r.add(o)),Ux(o,i,!1),o.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=a.get("size");Y(l)||(l=[l,l]),o.scaleX=l[0]/2,o.scaleY=l[1]/2,Yh(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,e)}},n.prototype._moveHandleToValue=function(t,e){Hx(this._axisPointerModel,!e&&this._moveAnimation,this._handle,Nd(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},n.prototype._onHandleDragMove=function(t,e){var i=this._handle;if(i){this._dragging=!0;var r=this.updateHandleTransform(Nd(i),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=r,i.stopAnimation(),i.attr(Nd(r)),dr(i).lastProp=null,this._doDispatchAxisPointer()}},n.prototype._doDispatchAxisPointer=function(){if(this._handle){var 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}]})}},n.prototype._onHandleDragEnd=function(){if(this._dragging=!1,this._handle){var t=this._axisPointerModel.get("value");this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"})}},n.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),i=this._group,r=this._handle;e&&i&&(this._lastGraphicKey=null,i&&e.remove(i),r&&e.remove(r),this._group=null,this._handle=null,this._payloadInfo=null),hl(this,"_doDispatchAxisPointer")},n.prototype.doClear=function(){},n.prototype.buildLabel=function(t,e,i){return{x:t[i=i||0],y:t[1-i],width:e[i],height:e[1-i]}},n}();function Hx(n,t,e,i){Wx(dr(e).lastProp,i)||(dr(e).lastProp=i,t?ze(e,i,n):(e.stopAnimation(),e.attr(i)))}function Wx(n,t){if(ne(n)&&ne(t)){var e=!0;return D(t,function(i,r){e=e&&Wx(n[r],i)}),!!e}return n===t}function Xx(n,t){n[t.get(["label","show"])?"show":"hide"]()}function Nd(n){return{x:n.x||0,y:n.y||0,rotation:n.rotation||0}}function Ux(n,t,e){var i=t.get("z"),r=t.get("zlevel");n&&n.traverse(function(o){o.type!=="group"&&(i!=null&&(o.z=i),r!=null&&(o.zlevel=r),o.silent=e)})}function Yx(n){var t,e=n.get("type"),i=n.getModel(e+"Style");return e==="line"?(t=i.getLineStyle()).fill=null:e==="shadow"&&((t=i.getAreaStyle()).stroke=null),t}function Zx(n,t,e,i,r){var o=qx(e.get("value"),t.axis,t.ecModel,e.get("seriesDataIndices"),{precision:e.get(["label","precision"]),formatter:e.get(["label","formatter"])}),a=e.getModel("label"),s=Hr(a.get("padding")||0),l=a.getFont(),u=Io(o,l),c=r.position,h=u.width+s[1]+s[3],p=u.height+s[0]+s[2],d=r.align;d==="right"&&(c[0]-=h),d==="center"&&(c[0]-=h/2);var f=r.verticalAlign;f==="bottom"&&(c[1]-=p),f==="middle"&&(c[1]-=p/2),function(y,v,m,_){var x=_.getWidth(),b=_.getHeight();y[0]=Math.min(y[0]+v,x)-v,y[1]=Math.min(y[1]+m,b)-m,y[0]=Math.max(y[0],0),y[1]=Math.max(y[1],0)}(c,h,p,i);var g=a.get("backgroundColor");g&&g!=="auto"||(g=t.get(["axisLine","lineStyle","color"])),n.label={x:c[0],y:c[1],style:nt(a,{text:o,font:l,fill:a.getTextColor(),padding:s,backgroundColor:g}),z2:10}}function qx(n,t,e,i,r){n=t.scale.parse(n);var o=t.scale.getLabel({value:n},{precision:r.precision}),a=r.formatter;if(a){var s={value:Lp(t,{value:n}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};D(i,function(l){var u=e.getSeriesByIndex(l.seriesIndex),c=l.dataIndexInside,h=u&&u.getDataParams(c);h&&s.seriesData.push(h)}),Q(a)?o=a.replace("{value}",o):ue(a)&&(o=a(s))}return o}function jx(n,t,e){var i=[1,0,0,1,0,0];return Ii(i,i,e.rotation),Ci(i,i,e.position),li([n.dataToCoord(t),(e.labelOffset||0)+(e.labelDirection||1)*(e.labelMargin||0)],i)}function Kx(n,t,e){return{x1:n[e=e||0],y1:n[1-e],x2:t[e],y2:t[1-e]}}function Jx(n,t,e,i,r,o){return{cx:n,cy:t,r0:e,r:i,startAngle:r,endAngle:o,clockwise:!0}}var q2=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return F(t,n),t.prototype.makeElOption=function(e,i,r,o,a){var s=r.axis,l=s.grid,u=o.get("type"),c=$x(l,s).getOtherAxis(s).getGlobalExtent(),h=s.toGlobalCoord(s.dataToCoord(i,!0));if(u&&u!=="none"){var p=Yx(o),d=j2[u](s,h,c);d.style=p,e.graphicKey=d.type,e.pointer=d}(function(f,g,y,v,m,_){var x=Pt.innerTextLayout(y.rotation,0,y.labelDirection);y.labelMargin=m.get(["label","margin"]),Zx(g,v,m,_,{position:jx(v.axis,f,y),align:x.textAlign,verticalAlign:x.textVerticalAlign})})(i,e,$p(l.model,r),r,o,a)},t.prototype.getHandleTransform=function(e,i,r){var o=$p(i.axis.grid.model,i,{labelInside:!1});o.labelMargin=r.get(["handle","margin"]);var a=jx(i.axis,e,o);return{x:a[0],y:a[1],rotation:o.rotation+(o.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,i,r,o){var a=r.axis,s=a.grid,l=a.getGlobalExtent(!0),u=$x(s,a).getOtherAxis(a).getGlobalExtent(),c=a.dim==="x"?0:1,h=[e.x,e.y];h[c]+=i[c],h[c]=Math.min(l[1],h[c]),h[c]=Math.max(l[0],h[c]);var p=(u[1]+u[0])/2,d=[p,p];return d[c]=h[c],{x:h[0],y:h[1],rotation:e.rotation,cursorPoint:d,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][c]}},t}(Gx);function $x(n,t){var e={};return e[t.dim+"AxisIndex"]=t.index,n.getCartesian(e)}var j2={line:function(n,t,e){return{type:"Line",subPixelOptimize:!0,shape:Kx([t,e[0]],[t,e[1]],Qx(n))}},shadow:function(n,t,e){var i,r,o,a=Math.max(1,n.getBandWidth()),s=e[1]-e[0];return{type:"Rect",shape:(i=[t-a/2,e[0]],r=[a,s],o=Qx(n),{x:i[o=o||0],y:i[1-o],width:r[o],height:r[1-o]})}}};function Qx(n){return n.dim==="x"?0:1}var K2=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return F(t,n),t.type="axisPointer",t.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}},t}(be),$n=Ee(),J2=D;function eb(n,t,e){if(!fe.node){var i=t.getZr();$n(i).records||($n(i).records={}),function(r,o){function a(s,l){r.on(s,function(u){var c=function(h){var p={showTip:[],hideTip:[]},d=function(f){var g=p[f.type];g?g.push(f):(f.dispatchAction=d,h.dispatchAction(f))};return{dispatchAction:d,pendings:p}}(o);J2($n(r).records,function(h){h&&l(h,u,c.dispatchAction)}),function(h,p){var d,f=h.showTip.length,g=h.hideTip.length;f?d=h.showTip[f-1]:g&&(d=h.hideTip[g-1]),d&&(d.dispatchAction=null,p.dispatchAction(d))}(c.pendings,o)})}$n(r).initialized||($n(r).initialized=!0,a("click",Se(tb,"click")),a("mousemove",Se(tb,"mousemove")),a("globalout",$2))}(i,t),($n(i).records[n]||($n(i).records[n]={})).handler=e}}function $2(n,t,e){n.handler("leave",null,e)}function tb(n,t,e,i){t.handler(n,e,i)}function Ed(n,t){if(!fe.node){var e=t.getZr();($n(e).records||{})[n]&&($n(e).records[n]=null)}}var Q2=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return F(t,n),t.prototype.render=function(e,i,r){var o=i.getComponent("tooltip"),a=e.get("triggerOn")||o&&o.get("triggerOn")||"mousemove|click";eb("axisPointer",r,function(s,l,u){a!=="none"&&(s==="leave"||a.indexOf(s)>=0)&&u({type:"updateAxisPointer",currTrigger:s,x:l&&l.offsetX,y:l&&l.offsetY})})},t.prototype.remove=function(e,i){Ed("axisPointer",i)},t.prototype.dispose=function(e,i){Ed("axisPointer",i)},t.type="axisPointer",t}(Xe);function nb(n,t){var e,i=[],r=n.seriesIndex;if(r==null||!(e=t.getSeriesByIndex(r)))return{point:[]};var o=e.getData(),a=zi(o,n);if(a==null||a<0||Y(a))return{point:[]};var s=o.getItemGraphicEl(a),l=e.coordinateSystem;if(e.getTooltipPosition)i=e.getTooltipPosition(a)||[];else if(l&&l.dataToPoint)if(n.isStacked){var u=l.getBaseAxis(),c=l.getOtherAxis(u).dim,h=u.dim,p=c==="x"||c==="radius"?1:0,d=o.mapDimension(h),f=[];f[p]=o.get(d,a),f[1-p]=o.get(o.getCalculationInfo("stackResultDimension"),a),i=l.dataToPoint(f)||[]}else i=l.dataToPoint(o.getValues(j(l.dimensions,function(y){return o.mapDimension(y)}),a))||[];else if(s){var g=s.getBoundingRect().clone();g.applyTransform(s.transform),i=[g.x+g.width/2,g.y+g.height/2]}return{point:i,el:s}}var ib=Ee();function eA(n,t,e){var i=n.currTrigger,r=[n.x,n.y],o=n,a=n.dispatchAction||he(e.dispatchAction,e),s=t.getComponent("axisPointer").coordSysAxesInfo;if(s){cu(r)&&(r=nb({seriesIndex:o.seriesIndex,dataIndex:o.dataIndex},t).point);var l=cu(r),u=o.axesInfo,c=s.axesInfo,h=i==="leave"||cu(r),p={},d={},f={list:[],map:{}},g={showPointer:Se(tA,d),showTooltip:Se(nA,f)};D(s.coordSysMap,function(v,m){var _=l||v.containPoint(r);D(s.coordSysAxesInfo[m],function(x,b){var w=x.axis,M=function(C,I){for(var T=0;T<(C||[]).length;T++){var A=C[T];if(I.axis.dim===A.axisDim&&I.axis.model.componentIndex===A.axisIndex)return A}}(u,x);if(!h&&_&&(!u||M)){var S=M&&M.value;S!=null||l||(S=w.pointToData(r)),S!=null&&rb(x,S,g,!1,p)}})});var y={};return D(c,function(v,m){var _=v.linkGroup;_&&!d[m]&&D(_.axesInfo,function(x,b){var w=d[b];if(x!==v&&w){var M=w.value;_.mapper&&(M=v.axis.scale.parse(_.mapper(M,ob(x),ob(v)))),y[v.key]=M}})}),D(y,function(v,m){rb(c[m],v,g,!0,p)}),function(v,m,_){var x=_.axesInfo=[];D(m,function(b,w){var M=b.axisPointerModel.option,S=v[w];S?(!b.useHandle&&(M.status="show"),M.value=S.value,M.seriesDataIndices=(S.payloadBatch||[]).slice()):!b.useHandle&&(M.status="hide"),M.status==="show"&&x.push({axisDim:b.axis.dim,axisIndex:b.axis.model.componentIndex,value:M.value})})}(d,c,p),function(v,m,_,x){if(!cu(m)&&v.list.length){var b=((v.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};x({type:"showTip",escapeConnect:!0,x:m[0],y:m[1],tooltipOption:_.tooltipOption,position:_.position,dataIndexInside:b.dataIndexInside,dataIndex:b.dataIndex,seriesIndex:b.seriesIndex,dataByCoordSys:v.list})}else x({type:"hideTip"})}(f,r,n,a),function(v,m,_){var x=_.getZr(),b="axisPointerLastHighlights",w=ib(x)[b]||{},M=ib(x)[b]={};D(v,function(I,T){var A=I.axisPointerModel.option;A.status==="show"&&I.triggerEmphasis&&D(A.seriesDataIndices,function(k){var L=k.seriesIndex+" | "+k.dataIndex;M[L]=k})});var S=[],C=[];D(w,function(I,T){!M[T]&&C.push(I)}),D(M,function(I,T){!w[T]&&S.push(I)}),C.length&&_.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:C}),S.length&&_.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:S})}(c,0,e),p}}function rb(n,t,e,i,r){var o=n.axis;if(!o.scale.isBlank()&&o.containData(t))if(n.involveSeries){var a=function(u,c){var h=c.axis,p=h.dim,d=u,f=[],g=Number.MAX_VALUE,y=-1;return D(c.seriesModels,function(v,m){var _,x,b=v.getData().mapDimensionsAll(p);if(v.getAxisTooltipData){var w=v.getAxisTooltipData(b,u,h);x=w.dataIndices,_=w.nestestValue}else{if(!(x=v.getData().indicesOfNearest(b[0],u,h.type==="category"?.5:null)).length)return;_=v.getData().get(b[0],x[0])}if(_!=null&&isFinite(_)){var M=u-_,S=Math.abs(M);S<=g&&((S=0&&y<0)&&(g=S,y=M,d=_,f.length=0),D(x,function(C){f.push({seriesIndex:v.seriesIndex,dataIndexInside:C,dataIndex:v.getData().getRawIndex(C)})}))}}),{payloadBatch:f,snapToValue:d}}(t,n),s=a.payloadBatch,l=a.snapToValue;s[0]&&r.seriesIndex==null&&H(r,s[0]),!i&&n.snap&&o.containData(l)&&l!=null&&(t=l),e.showPointer(n,t,s),e.showTooltip(n,a,l)}else e.showPointer(n,t)}function tA(n,t,e,i){n[t.key]={value:e,payloadBatch:i}}function nA(n,t,e,i){var r=e.payloadBatch,o=t.axis,a=o.model,s=t.axisPointerModel;if(t.triggerTooltip&&r.length){var l=t.coordSys.model,u=Pa(l),c=n.map[u];c||(c=n.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},n.list.push(c)),c.dataByAxis.push({axisDim:o.dim,axisIndex:a.componentIndex,axisType:a.type,axisId:a.id,value:i,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:r.slice()})}}function ob(n){var t=n.axis.model,e={},i=e.axisDim=n.axis.dim;return e.axisIndex=e[i+"AxisIndex"]=t.componentIndex,e.axisName=e[i+"AxisName"]=t.name,e.axisId=e[i+"AxisId"]=t.id,e}function cu(n){return!n||n[0]==null||isNaN(n[0])||n[1]==null||isNaN(n[1])}function zd(n){Oa.registerAxisPointerClass("CartesianAxisPointer",q2),n.registerComponentModel(K2),n.registerComponentView(Q2),n.registerPreprocessor(function(t){if(t){(!t.axisPointer||t.axisPointer.length===0)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!Y(e)&&(t.axisPointer.link=[e])}}),n.registerProcessor(n.PRIORITY.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=function(i,r){var o={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return function(a,s,l){var u=s.getComponent("tooltip"),c=s.getComponent("axisPointer"),h=c.get("link",!0)||[],p=[];D(l.getCoordinateSystems(),function(d){if(d.axisPointerEnabled){var f=Pa(d.model),g=a.coordSysAxesInfo[f]={};a.coordSysMap[f]=d;var y=d.model.getModel("tooltip",u);if(D(d.getAxes(),Se(x,!1,null)),d.getTooltipAxes&&u&&y.get("show")){var v=y.get("trigger")==="axis",m=y.get(["axisPointer","type"])==="cross",_=d.getTooltipAxes(y.get(["axisPointer","axis"]));(v||m)&&D(_.baseAxes,Se(x,!m||"cross",v)),m&&D(_.otherAxes,Se(x,"cross",!1))}}function x(b,w,M){var S=M.model.getModel("axisPointer",c),C=S.get("show");if(C&&(C!=="auto"||b||id(S))){w==null&&(w=S.get("triggerTooltip")),S=b?function(R,N,E,z,B,G){var K=N.getModel("axisPointer"),V={};D(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],function(te){V[te]=ae(K.get(te))}),V.snap=R.type!=="category"&&!!G,K.get("type")==="cross"&&(V.type="line");var X=V.label||(V.label={});if(X.show==null&&(X.show=!1),B==="cross"){var Z=K.get(["label","show"]);if(X.show=Z==null||Z,!G){var W=V.lineStyle=K.get("crossStyle");W&&ce(X,W.textStyle)}}return R.model.getModel("axisPointer",new Le(V,E,z))}(M,y,c,s,b,w):S;var I=S.get("snap"),T=S.get("triggerEmphasis"),A=Pa(M.model),k=w||I||M.type==="category",L=a.axesInfo[A]={key:A,axis:M,coordSys:d,axisPointerModel:S,triggerTooltip:w,triggerEmphasis:T,involveSeries:k,snap:I,useHandle:id(S),seriesModels:[],linkGroup:null};g[A]=L,a.seriesInvolved=a.seriesInvolved||k;var O=function(R,N){for(var E=N.model,z=N.dim,B=0;BO?"left":"right",C=Math.abs(M[1]-P)/L<.3?"middle":M[1]>P?"top":"bottom"}return{position:M,align:S,verticalAlign:C}}(i,r,0,l,o.get(["label","margin"]));Zx(e,r,o,a,f)},t}(Gx),oA={line:function(n,t,e,i){return n.dim==="angle"?{type:"Line",shape:Kx(t.coordToPoint([i[0],e]),t.coordToPoint([i[1],e]))}:{type:"Circle",shape:{cx:t.cx,cy:t.cy,r:e}}},shadow:function(n,t,e,i){var r=Math.max(1,n.getBandWidth()),o=Math.PI/180;return n.dim==="angle"?{type:"Sector",shape:Jx(t.cx,t.cy,i[0],i[1],(-e-r/2)*o,(r/2-e)*o)}:{type:"Sector",shape:Jx(t.cx,t.cy,e-r/2,e+r/2,0,2*Math.PI)}}},aA=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return F(t,n),t.prototype.findAxisModel=function(e){var i;return this.ecModel.eachComponent(e,function(r){r.getCoordSysModel()===this&&(i=r)},this),i},t.type="polar",t.dependencies=["radiusAxis","angleAxis"],t.defaultOption={z:0,center:["50%","50%"],radius:"80%"},t}(be),Bd=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return F(t,n),t.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",Qe).models[0]},t.type="polarAxis",t}(be);at(Bd,Ta);var sA=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return F(t,n),t.type="angleAxis",t}(Bd),lA=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return F(t,n),t.type="radiusAxis",t}(Bd),Vd=function(n){function t(e,i){return n.call(this,"radius",e,i)||this}return F(t,n),t.prototype.pointToData=function(e,i){return this.polar.pointToData(e,i)[this.dim==="radius"?0:1]},t}(Rn);Vd.prototype.dataToRadius=Rn.prototype.dataToCoord,Vd.prototype.radiusToData=Rn.prototype.coordToData;var uA=Ee(),Fd=function(n){function t(e,i){return n.call(this,"angle",e,i||[0,360])||this}return F(t,n),t.prototype.pointToData=function(e,i){return this.polar.pointToData(e,i)[this.dim==="radius"?0:1]},t.prototype.calculateCategoryInterval=function(){var e=this,i=e.getLabelModel(),r=e.scale,o=r.getExtent(),a=r.count();if(o[1]-o[0]<1)return 0;var s=o[0],l=e.dataToCoord(s+1)-e.dataToCoord(s),u=Math.abs(l),c=Io(s==null?"":s+"",i.getFont(),"center","top"),h=Math.max(c.height,7)/u;isNaN(h)&&(h=1/0);var p=Math.max(0,Math.floor(h)),d=uA(e.model),f=d.lastAutoInterval,g=d.lastTickCount;return f!=null&&g!=null&&Math.abs(f-p)<=1&&Math.abs(g-a)<=1&&f>p?p=f:(d.lastTickCount=a,d.lastAutoInterval=p),p},t}(Rn);Fd.prototype.dataToAngle=Rn.prototype.dataToCoord,Fd.prototype.angleToData=Rn.prototype.coordToData;var ab=["radius","angle"],cA=function(){function n(t){this.dimensions=ab,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new Vd,this._angleAxis=new Fd,this.axisPointerEnabled=!0,this.name=t||"",this._radiusAxis.polar=this._angleAxis.polar=this}return n.prototype.containPoint=function(t){var e=this.pointToCoord(t);return this._radiusAxis.contain(e[0])&&this._angleAxis.contain(e[1])},n.prototype.containData=function(t){return this._radiusAxis.containData(t[0])&&this._angleAxis.containData(t[1])},n.prototype.getAxis=function(t){return this["_"+t+"Axis"]},n.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},n.prototype.getAxesByScale=function(t){var e=[],i=this._angleAxis,r=this._radiusAxis;return i.scale.type===t&&e.push(i),r.scale.type===t&&e.push(r),e},n.prototype.getAngleAxis=function(){return this._angleAxis},n.prototype.getRadiusAxis=function(){return this._radiusAxis},n.prototype.getOtherAxis=function(t){var e=this._angleAxis;return t===e?this._radiusAxis:e},n.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},n.prototype.getTooltipAxes=function(t){var e=t!=null&&t!=="auto"?this.getAxis(t):this.getBaseAxis();return{baseAxes:[e],otherAxes:[this.getOtherAxis(e)]}},n.prototype.dataToPoint=function(t,e){return this.coordToPoint([this._radiusAxis.dataToRadius(t[0],e),this._angleAxis.dataToAngle(t[1],e)])},n.prototype.pointToData=function(t,e){var i=this.pointToCoord(t);return[this._radiusAxis.radiusToData(i[0],e),this._angleAxis.angleToData(i[1],e)]},n.prototype.pointToCoord=function(t){var e=t[0]-this.cx,i=t[1]-this.cy,r=this.getAngleAxis(),o=r.getExtent(),a=Math.min(o[0],o[1]),s=Math.max(o[0],o[1]);r.inverse?a=s-360:s=a+360;var l=Math.sqrt(e*e+i*i);e/=l,i/=l;for(var u=Math.atan2(-i,e)/Math.PI*180,c=us;)u+=360*c;return[l,u]},n.prototype.coordToPoint=function(t){var e=t[0],i=t[1]/180*Math.PI;return[Math.cos(i)*e+this.cx,-Math.sin(i)*e+this.cy]},n.prototype.getArea=function(){var t=this.getAngleAxis(),e=this.getRadiusAxis().getExtent().slice();e[0]>e[1]&&e.reverse();var i=t.getExtent(),r=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:e[0],r:e[1],startAngle:-i[0]*r,endAngle:-i[1]*r,clockwise:t.inverse,contain:function(o,a){var s=o-this.cx,l=a-this.cy,u=s*s+l*l-1e-4,c=this.r,h=this.r0;return u<=c*c&&u>=h*h}}},n.prototype.convertToPixel=function(t,e,i){return sb(e)===this?this.dataToPoint(i):null},n.prototype.convertFromPixel=function(t,e,i){return sb(e)===this?this.pointToData(i):null},n}();function sb(n){var t=n.seriesModel,e=n.polarModel;return e&&e.coordinateSystem||t&&t.coordinateSystem}function hA(n,t){var e=this,i=e.getAngleAxis(),r=e.getRadiusAxis();if(i.scale.setExtent(1/0,-1/0),r.scale.setExtent(1/0,-1/0),n.eachSeries(function(s){if(s.coordinateSystem===e){var l=s.getData();D(Fl(l,"radius"),function(u){r.scale.unionExtentFromData(l,u)}),D(Fl(l,"angle"),function(u){i.scale.unionExtentFromData(l,u)})}}),Qr(i.scale,i.model),Qr(r.scale,r.model),i.type==="category"&&!i.onBand){var o=i.getExtent(),a=360/i.scale.count();i.inverse?o[1]+=a:o[1]-=a,i.setExtent(o[0],o[1])}}function lb(n,t){var e;if(n.type=t.get("type"),n.scale=Vl(t),n.onBand=t.get("boundaryGap")&&n.type==="category",n.inverse=t.get("inverse"),function(o){return o.mainType==="angleAxis"}(t)){n.inverse=n.inverse!==t.get("clockwise");var i=t.get("startAngle"),r=(e=t.get("endAngle"))!==null&&e!==void 0?e:i+(n.inverse?-360:360);n.setExtent(i,r)}t.axis=n,n.model=t}var pA={dimensions:ab,create:function(n,t){var e=[];return n.eachComponent("polar",function(i,r){var o=new cA(r+"");o.update=hA;var a=o.getRadiusAxis(),s=o.getAngleAxis(),l=i.findAxisModel("radiusAxis"),u=i.findAxisModel("angleAxis");lb(a,l),lb(s,u),function(c,h,p){var d=h.get("center"),f=p.getWidth(),g=p.getHeight();c.cx=ee(d[0],f),c.cy=ee(d[1],g);var y=c.getRadiusAxis(),v=Math.min(f,g)/2,m=h.get("radius");m==null?m=[0,"100%"]:Y(m)||(m=[0,m]);var _=[ee(m[0],v),ee(m[1],v)];y.inverse?y.setExtent(_[1],_[0]):y.setExtent(_[0],_[1])}(o,i,t),e.push(o),i.coordinateSystem=o,o.model=i}),n.eachSeries(function(i){if(i.get("coordinateSystem")==="polar"){var r=i.getReferringComponents("polar",Qe).models[0];i.coordinateSystem=r.coordinateSystem}}),e}},dA=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function hu(n,t,e){t[1]>t[0]&&(t=t.slice().reverse());var i=n.coordToPoint([t[0],e]),r=n.coordToPoint([t[1],e]);return{x1:i[0],y1:i[1],x2:r[0],y2:r[1]}}function pu(n){return n.getRadiusAxis().inverse?0:1}function ub(n){var t=n[0],e=n[n.length-1];t&&e&&Math.abs(Math.abs(t.coord-e.coord)-360)<1e-4&&n.pop()}var fA=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e.axisPointerClass="PolarAxisPointer",e}return F(t,n),t.prototype.render=function(e,i){if(this.group.removeAll(),e.get("show")){var r=e.axis,o=r.polar,a=o.getRadiusAxis().getExtent(),s=r.getTicksCoords(),l=r.getMinorTicksCoords(),u=j(r.getViewLabels(),function(c){c=ae(c);var h=r.scale,p=h.type==="ordinal"?h.getRawOrdinalNumber(c.tickValue):c.tickValue;return c.coord=r.dataToCoord(p),c});ub(u),ub(s),D(dA,function(c){!e.get([c,"show"])||r.scale.isBlank()&&c!=="axisLine"||gA[c](this.group,e,o,s,l,a,u)},this)}},t.type="angleAxis",t}(Oa),gA={axisLine:function(n,t,e,i,r,o){var a,s=t.getModel(["axisLine","lineStyle"]),l=e.getAngleAxis(),u=Math.PI/180,c=l.getExtent(),h=pu(e),p=h?0:1,d=Math.abs(c[1]-c[0])===360?"Circle":"Arc";(a=o[p]===0?new zr[d]({shape:{cx:e.cx,cy:e.cy,r:o[h],startAngle:-c[0]*u,endAngle:-c[1]*u,clockwise:l.inverse},style:s.getLineStyle(),z2:1,silent:!0}):new Rr({shape:{cx:e.cx,cy:e.cy,r:o[h],r0:o[p]},style:s.getLineStyle(),z2:1,silent:!0})).style.fill=null,n.add(a)},axisTick:function(n,t,e,i,r,o){var a=t.getModel("axisTick"),s=(a.get("inside")?-1:1)*a.get("length"),l=o[pu(e)],u=j(i,function(c){return new ut({shape:hu(e,[l,l+s],c.coord)})});n.add(Kt(u,{style:ce(a.getModel("lineStyle").getLineStyle(),{stroke:t.get(["axisLine","lineStyle","color"])})}))},minorTick:function(n,t,e,i,r,o){if(r.length){for(var a=t.getModel("axisTick"),s=t.getModel("minorTick"),l=(a.get("inside")?-1:1)*s.get("length"),u=o[pu(e)],c=[],h=0;hv?"left":"right",x=Math.abs(y[1]-m)/g<.3?"middle":y[1]>m?"top":"bottom";if(s&&s[f]){var b=s[f];ne(b)&&b.textStyle&&(d=new Le(b.textStyle,l,l.ecModel))}var w=new Me({silent:Pt.isLabelSilent(t),style:nt(d,{x:y[0],y:y[1],fill:d.getTextColor()||t.get(["axisLine","lineStyle","color"]),text:h.formattedLabel,align:_,verticalAlign:x})});if(n.add(w),c){var M=Pt.makeAxisEventDataBase(t);M.targetType="axisLabel",M.value=h.rawLabel,ye(w).eventData=M}},this)},splitLine:function(n,t,e,i,r,o){var a=t.getModel("splitLine").getModel("lineStyle"),s=a.get("color"),l=0;s=s instanceof Array?s:[s];for(var u=[],c=0;c=0?"p":"n",L=S;b&&(i[c][A]||(i[c][A]={p:S,n:S}),L=i[c][A][k]);var O=void 0,P=void 0,R=void 0,N=void 0;if(f.dim==="radius"){var E=f.dataToCoord(T)-S,z=l.dataToCoord(A);Math.abs(E)=N})}}})}var bA={startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:0}},wA={splitNumber:5},SA=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return F(t,n),t.type="polar",t}(Xe);function MA(n){Lt(zd),Oa.registerAxisPointerClass("PolarAxisPointer",rA),n.registerCoordinateSystem("polar",pA),n.registerComponentModel(aA),n.registerComponentView(SA),La(n,"angle",sA,bA),La(n,"radius",lA,wA),n.registerComponentView(fA),n.registerComponentView(mA),n.registerLayout(Se(xA,"bar"))}var pb=["x","y","radius","angle","single"],TA=["cartesian2d","polar","singleAxis"];function oo(n){return n+"Axis"}var Gd=function(){function n(){this.indexList=[],this.indexMap=[]}return n.prototype.add=function(t){this.indexMap[t]||(this.indexList.push(t),this.indexMap[t]=!0)},n}(),CA=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e._autoThrottle=!0,e._noTarget=!0,e._rangePropMode=["percent","percent"],e}return F(t,n),t.prototype.init=function(e,i,r){var o=db(e);this.settledOption=o,this.mergeDefaultAndTheme(e,r),this._doInit(o)},t.prototype.mergeOption=function(e){var i=db(e);de(this.option,e,!0),de(this.settledOption,i,!0),this._doInit(i)},t.prototype._doInit=function(e){var i=this.option;this._setDefaultThrottle(e),this._updateRangeUse(e);var r=this.settledOption;D([["start","startValue"],["end","endValue"]],function(o,a){this._rangePropMode[a]==="value"&&(i[o[0]]=r[o[0]]=null)},this),this._resetTarget()},t.prototype._resetTarget=function(){var e=this.get("orient",!0),i=this._targetAxisInfoMap=re();this._fillSpecifiedTargetAxis(i)?this._orient=e||this._makeAutoOrientByTargetAxis():(this._orient=e||"horizontal",this._fillAutoTargetAxisByOrient(i,this._orient)),this._noTarget=!0,i.each(function(r){r.indexList.length&&(this._noTarget=!1)},this)},t.prototype._fillSpecifiedTargetAxis=function(e){var i=!1;return D(pb,function(r){var o=this.getReferringComponents(oo(r),hS);if(o.specified){i=!0;var a=new Gd;D(o.models,function(s){a.add(s.componentIndex)}),e.set(r,a)}},this),i},t.prototype._fillAutoTargetAxisByOrient=function(e,i){var r=this.ecModel,o=!0;if(o){var a=i==="vertical"?"y":"x";s(r.findComponents({mainType:a+"Axis"}),a)}function s(l,u){var c=l[0];if(c){var h=new Gd;if(h.add(c.componentIndex),e.set(u,h),o=!1,u==="x"||u==="y"){var p=c.getReferringComponents("grid",Qe).models[0];p&&D(l,function(d){c.componentIndex!==d.componentIndex&&p===d.getReferringComponents("grid",Qe).models[0]&&h.add(d.componentIndex)})}}}o&&s(r.findComponents({mainType:"singleAxis",filter:function(l){return l.get("orient",!0)===i}}),"single"),o&&D(pb,function(l){if(o){var u=r.findComponents({mainType:oo(l),filter:function(h){return h.get("type",!0)==="category"}});if(u[0]){var c=new Gd;c.add(u[0].componentIndex),e.set(l,c),o=!1}}},this)},t.prototype._makeAutoOrientByTargetAxis=function(){var e;return this.eachTargetAxis(function(i){!e&&(e=i)},this),e==="y"?"vertical":"horizontal"},t.prototype._setDefaultThrottle=function(e){if(e.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var i=this.ecModel.option;this.option.throttle=i.animation&&i.animationDurationUpdate>0?100:20}},t.prototype._updateRangeUse=function(e){var i=this._rangePropMode,r=this.get("rangeMode");D([["start","startValue"],["end","endValue"]],function(o,a){var s=e[o[0]]!=null,l=e[o[1]]!=null;s&&!l?i[a]="percent":!s&&l?i[a]="value":r?i[a]=r[a]:s&&(i[a]="percent")})},t.prototype.noTarget=function(){return this._noTarget},t.prototype.getFirstTargetAxisModel=function(){var e;return this.eachTargetAxis(function(i,r){e==null&&(e=this.ecModel.getComponent(oo(i),r))},this),e},t.prototype.eachTargetAxis=function(e,i){this._targetAxisInfoMap.each(function(r,o){D(r.indexList,function(a){e.call(i,o,a)})})},t.prototype.getAxisProxy=function(e,i){var r=this.getAxisModel(e,i);if(r)return r.__dzAxisProxy},t.prototype.getAxisModel=function(e,i){var r=this._targetAxisInfoMap.get(e);if(r&&r.indexMap[i])return this.ecModel.getComponent(oo(e),i)},t.prototype.setRawRange=function(e){var i=this.option,r=this.settledOption;D([["start","startValue"],["end","endValue"]],function(o){e[o[0]]==null&&e[o[1]]==null||(i[o[0]]=r[o[0]]=e[o[0]],i[o[1]]=r[o[1]]=e[o[1]])},this),this._updateRangeUse(e)},t.prototype.setCalculatedRange=function(e){var i=this.option;D(["start","startValue","end","endValue"],function(r){i[r]=e[r]})},t.prototype.getPercentRange=function(){var e=this.findRepresentativeAxisProxy();if(e)return e.getDataPercentWindow()},t.prototype.getValueRange=function(e,i){if(e!=null||i!=null)return this.getAxisProxy(e,i).getDataValueWindow();var r=this.findRepresentativeAxisProxy();return r?r.getDataValueWindow():void 0},t.prototype.findRepresentativeAxisProxy=function(e){if(e)return e.__dzAxisProxy;for(var i,r=this._targetAxisInfoMap.keys(),o=0;o=0}(e)){var i=oo(this._dimName),r=e.getReferringComponents(i,Qe).models[0];r&&this._axisIndex===r.componentIndex&&t.push(e)}},this),t},n.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},n.prototype.getMinMaxSpan=function(){return ae(this._minMaxSpan)},n.prototype.calculateDataWindow=function(t){var e,i=this._dataExtent,r=this.getAxisModel().axis.scale,o=this._dataZoomModel.getRangePropMode(),a=[0,100],s=[],l=[];ao(["start","end"],function(h,p){var d=t[h],f=t[h+"Value"];o[p]==="percent"?(d==null&&(d=a[p]),f=r.parse(Fe(d,a,i))):(e=!0,d=Fe(f=f==null?i[p]:r.parse(f),i,a)),l[p]=f==null||isNaN(f)?i[p]:f,s[p]=d==null||isNaN(d)?a[p]:d}),fb(l),fb(s);var u=this._minMaxSpan;function c(h,p,d,f,g){var y=g?"Span":"ValueSpan";su(0,h,d,"all",u["min"+y],u["max"+y]);for(var v=0;v<2;v++)p[v]=Fe(h[v],d,f,!0),g&&(p[v]=r.parse(p[v]))}return e?c(l,s,i,a,!1):c(s,l,a,i,!0),{valueWindow:l,percentWindow:s}},n.prototype.reset=function(t){if(t===this._dataZoomModel){var e=this.getTargetSeriesModels();this._dataExtent=function(r,o,a){var s=[1/0,-1/0];ao(a,function(c){(function(h,p,d){p&&D(Fl(p,d),function(f){var g=p.getApproximateExtent(f);g[0]h[1]&&(h[1]=g[1])})})(s,c.getData(),o)});var l=r.getAxisModel(),u=X0(l.axis.scale,l,s).calculate();return[u.min,u.max]}(this,this._dimName,e),this._updateMinMaxSpan();var i=this.calculateDataWindow(t.settledOption);this._valueWindow=i.valueWindow,this._percentWindow=i.percentWindow,this._setAxisModel()}},n.prototype.filterData=function(t,e){if(t===this._dataZoomModel){var i=this._dimName,r=this.getTargetSeriesModels(),o=t.get("filterMode"),a=this._valueWindow;o!=="none"&&ao(r,function(s){var l=s.getData(),u=l.mapDimensionsAll(i);if(u.length){if(o==="weakFilter"){var c=l.getStore(),h=j(u,function(p){return l.getDimensionIndex(p)},l);l.filterSelf(function(p){for(var d,f,g,y=0;ya[1];if(m&&!_&&!x)return!0;m&&(g=!0),_&&(d=!0),x&&(f=!0)}return g&&d&&f})}else ao(u,function(p){if(o==="empty")s.setData(l=l.map(p,function(f){return function(g){return g>=a[0]&&g<=a[1]}(f)?f:NaN}));else{var d={};d[p]=a,l.selectRange(d)}});ao(u,function(p){l.setApproximateExtent(a,p)})}})}},n.prototype._updateMinMaxSpan=function(){var t=this._minMaxSpan={},e=this._dataZoomModel,i=this._dataExtent;ao(["min","max"],function(r){var o=e.get(r+"Span"),a=e.get(r+"ValueSpan");a!=null&&(a=this.getAxisModel().axis.scale.parse(a)),a!=null?o=Fe(i[0]+a,i,[0,100],!0):o!=null&&(a=Fe(o,[0,100],i,!0)-i[0]),t[r+"Span"]=o,t[r+"ValueSpan"]=a},this)},n.prototype._setAxisModel=function(){var t=this.getAxisModel(),e=this._percentWindow,i=this._valueWindow;if(e){var r=yc(i,[0,500]);r=Math.min(r,20);var o=t.axis.scale.rawExtentInfo;e[0]!==0&&o.setDeterminedMinMax("min",+i[0].toFixed(r)),e[1]!==100&&o.setDeterminedMinMax("max",+i[1].toFixed(r)),o.freeze()}},n}(),kA={getTargetSeries:function(n){function t(r){n.eachComponent("dataZoom",function(o){o.eachTargetAxis(function(a,s){var l=n.getComponent(oo(a),s);r(a,s,l,o)})})}t(function(r,o,a,s){a.__dzAxisProxy=null});var e=[];t(function(r,o,a,s){a.__dzAxisProxy||(a.__dzAxisProxy=new DA(r,o,s,n),e.push(a.__dzAxisProxy))});var i=re();return D(e,function(r){D(r.getTargetSeriesModels(),function(o){i.set(o.uid,o)})}),i},overallReset:function(n,t){n.eachComponent("dataZoom",function(e){e.eachTargetAxis(function(i,r){e.getAxisProxy(i,r).reset(e)}),e.eachTargetAxis(function(i,r){e.getAxisProxy(i,r).filterData(e,t)})}),n.eachComponent("dataZoom",function(e){var i=e.findRepresentativeAxisProxy();if(i){var r=i.getDataPercentWindow(),o=i.getDataValueWindow();e.setCalculatedRange({start:r[0],end:r[1],startValue:o[0],endValue:o[1]})}})}},gb=!1;function LA(n){gb||(gb=!0,n.registerProcessor(n.PRIORITY.PROCESSOR.FILTER,kA),function(t){t.registerAction("dataZoom",function(e,i){D(function(r,o){var a,s=re(),l=[],u=re();r.eachComponent({mainType:"dataZoom",query:o},function(p){u.get(p.uid)||h(p)});do a=!1,r.eachComponent("dataZoom",c);while(a);function c(p){!u.get(p.uid)&&function(d){var f=!1;return d.eachTargetAxis(function(g,y){var v=s.get(g);v&&v[y]&&(f=!0)}),f}(p)&&(h(p),a=!0)}function h(p){u.set(p.uid,!0),l.push(p),p.eachTargetAxis(function(d,f){(s.get(d)||s.set(d,[]))[f]=!0})}return l}(i,e),function(r){r.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})})}(n),n.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function PA(n){n.registerComponentModel(IA),n.registerComponentView(AA),LA(n)}var mn=function(){},yb={};function Fa(n,t){yb[n]=t}function vb(n){return yb[n]}var OA=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return F(t,n),t.prototype.optionUpdated=function(){n.prototype.optionUpdated.apply(this,arguments);var e=this.ecModel;D(this.option.feature,function(i,r){var o=vb(r);o&&(o.getDefaultOption&&(o.defaultOption=o.getDefaultOption(e)),de(i,o.defaultOption))})},t.type="toolbox",t.layoutMode={type:"box",ignoreSize:!0},t.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"}},t}(be);function mb(n,t){var e=Hr(t.get("padding")),i=t.getItemStyle(["color","opacity"]);return i.fill=t.get("backgroundColor"),new ke({shape:{x:n.x-e[3],y:n.y-e[0],width:n.width+e[1]+e[3],height:n.height+e[0]+e[2],r:t.get("borderRadius")},style:i,silent:!0,z2:-1})}var RA=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return F(t,n),t.prototype.render=function(e,i,r,o){var a=this.group;if(a.removeAll(),e.get("show")){var s=+e.get("itemSize"),l=e.get("orient")==="vertical",u=e.get("feature")||{},c=this._features||(this._features={}),h=[];D(u,function(d,f){h.push(f)}),new _p(this._featureNames||[],h).add(p).update(p).remove(Se(p,null)).execute(),this._featureNames=h,function(d,f,g){var y=f.getBoxLayoutParams(),v=f.get("padding"),m={width:g.getWidth(),height:g.getHeight()},_=It(y,m,v);er(f.get("orient"),d,f.get("itemGap"),_.width,_.height),pv(d,y,m,v)}(a,e,r),a.add(mb(a.getBoundingRect(),e)),l||a.eachChild(function(d){var f=d.__title,g=d.ensureState("emphasis"),y=g.textConfig||(g.textConfig={}),v=d.getTextContent(),m=v&&v.ensureState("emphasis");if(m&&!ue(m)&&f){var _=m.style||(m.style={}),x=Io(f,Me.makeFont(_)),b=d.x+a.x,w=!1;d.y+a.y+s+x.height>r.getHeight()&&(y.position="top",w=!0);var M=w?-5-x.height:s+10;b+x.width/2>r.getWidth()?(y.position=["100%",M],_.align="right"):b-x.width/2<0&&(y.position=[0,M],_.align="left")}})}function p(d,f){var g,y=h[d],v=h[f],m=u[y],_=new Le(m,e,e.ecModel);if(o&&o.newTitle!=null&&o.featureName===y&&(m.title=o.newTitle),y&&!v){if(function(w){return w.indexOf("my")===0}(y))g={onclick:_.option.onclick,featureName:y};else{var x=vb(y);if(!x)return;g=new x}c[y]=g}else if(!(g=c[v]))return;g.uid=Vr("toolbox-feature"),g.model=_,g.ecModel=i,g.api=r;var b=g instanceof mn;y||!v?!_.get("show")||b&&g.unusable?b&&g.remove&&g.remove(i,r):(function(w,M,S){var C,I,T=w.getModel("iconStyle"),A=w.getModel(["emphasis","iconStyle"]),k=M instanceof mn&&M.getIcons?M.getIcons():w.get("icon"),L=w.get("title")||{};Q(k)?(C={})[S]=k:C=k,Q(L)?(I={})[S]=L:I=L;var O=w.iconPaths={};D(C,function(P,R){var N=Qo(P,{},{x:-s/2,y:-s/2,width:s,height:s});N.setStyle(T.getItemStyle()),N.ensureState("emphasis").style=A.getItemStyle();var E=new Me({style:{text:I[R],align:A.get("textAlign"),borderRadius:A.get("textBorderRadius"),padding:A.get("textPadding"),fill:null,font:Xy({fontStyle:A.get("textFontStyle"),fontFamily:A.get("textFontFamily"),fontSize:A.get("textFontSize"),fontWeight:A.get("textFontWeight")},i)},ignore:!0});N.setTextContent(E),ea({el:N,componentModel:e,itemName:R,formatterParamsExtra:{title:I[R]}}),N.__title=I[R],N.on("mouseover",function(){var z=A.getItemStyle(),B=l?e.get("right")==null&&e.get("left")!=="right"?"right":"left":e.get("bottom")==null&&e.get("top")!=="bottom"?"bottom":"top";E.setStyle({fill:A.get("textFill")||z.fill||z.stroke||"#000",backgroundColor:A.get("textBackgroundColor")}),N.setTextConfig({position:A.get("textPosition")||B}),E.ignore=!e.get("showTitle"),r.enterEmphasis(this)}).on("mouseout",function(){w.get(["iconStatus",R])!=="emphasis"&&r.leaveEmphasis(this),E.hide()}),(w.get(["iconStatus",R])==="emphasis"?kr:Lr)(N),a.add(N),N.on("click",he(M.onclick,M,i,r,R)),O[R]=N})}(_,g,y),_.setIconStatus=function(w,M){var S=this.option,C=this.iconPaths;S.iconStatus=S.iconStatus||{},S.iconStatus[w]=M,C[w]&&(M==="emphasis"?kr:Lr)(C[w])},g instanceof mn&&g.render&&g.render(_,i,r,o)):b&&g.dispose&&g.dispose(i,r)}},t.prototype.updateView=function(e,i,r,o){D(this._features,function(a){a instanceof mn&&a.updateView&&a.updateView(a.model,i,r,o)})},t.prototype.remove=function(e,i){D(this._features,function(r){r instanceof mn&&r.remove&&r.remove(e,i)}),this.group.removeAll()},t.prototype.dispose=function(e,i){D(this._features,function(r){r instanceof mn&&r.dispose&&r.dispose(e,i)})},t.type="toolbox",t}(Xe),NA=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return F(t,n),t.prototype.onclick=function(e,i){var r=this.model,o=r.get("name")||e.get("title.0.text")||"echarts",a=i.getZr().painter.getType()==="svg",s=a?"svg":r.get("type",!0)||"png",l=i.getConnectedDataURL({type:s,backgroundColor:r.get("backgroundColor",!0)||e.get("backgroundColor")||"#fff",connectedBackgroundColor:r.get("connectedBackgroundColor"),excludeComponents:r.get("excludeComponents"),pixelRatio:r.get("pixelRatio")}),u=fe.browser;if(typeof MouseEvent!="function"||!u.newEdge&&(u.ie||u.edge))if(window.navigator.msSaveOrOpenBlob||a){var c=l.split(","),h=c[0].indexOf("base64")>-1,p=a?decodeURIComponent(c[1]):c[1];h&&(p=window.atob(p));var d=o+"."+s;if(window.navigator.msSaveOrOpenBlob){for(var f=p.length,g=new Uint8Array(f);f--;)g[f]=p.charCodeAt(f);var y=new Blob([g]);window.navigator.msSaveOrOpenBlob(y,d)}else{var v=document.createElement("iframe");document.body.appendChild(v);var m=v.contentWindow,_=m.document;_.open("image/svg+xml","replace"),_.write(p),_.close(),m.focus(),_.execCommand("SaveAs",!0,d),document.body.removeChild(v)}}else{var x=r.get("lang"),b='',w=window.open();w.document.write(b),w.document.title=o}else{var M=document.createElement("a");M.download=o+"."+s,M.target="_blank",M.href=l;var S=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});M.dispatchEvent(S)}},t.getDefaultOption=function(e){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:e.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],lang:e.getLocaleModel().get(["toolbox","saveAsImage","lang"])}},t}(mn),_b="__ec_magicType_stack__",EA=[["line","bar"],["stack"]],zA=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return F(t,n),t.prototype.getIcons=function(){var e=this.model,i=e.get("icon"),r={};return D(e.get("type"),function(o){i[o]&&(r[o]=i[o])}),r},t.getDefaultOption=function(e){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:e.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}}},t.prototype.onclick=function(e,i,r){var o=this.model,a=o.get(["seriesIndex",r]);if(xb[r]){var s,l={series:[]};D(EA,function(c){we(c,r)>=0&&D(c,function(h){o.setIconStatus(h,"normal")})}),o.setIconStatus(r,"emphasis"),e.eachComponent({mainType:"series",query:a==null?null:{seriesIndex:a}},function(c){var h=c.subType,p=c.id,d=xb[r](h,p,c,o);d&&(ce(d,c.option),l.series.push(d));var f=c.coordinateSystem;if(f&&f.type==="cartesian2d"&&(r==="line"||r==="bar")){var g=f.getAxesByScale("ordinal")[0];if(g){var y=g.dim+"Axis",v=c.getReferringComponents(y,Qe).models[0].componentIndex;l[y]=l[y]||[];for(var m=0;m<=v;m++)l[y][v]=l[y][v]||{};l[y][v].boundaryGap=r==="bar"}}});var u=r;r==="stack"&&(s=de({stack:o.option.title.tiled,tiled:o.option.title.stack},o.option.title),o.get(["iconStatus",r])!=="emphasis"&&(u="tiled")),i.dispatchAction({type:"changeMagicType",currentType:u,newOption:l,newTitle:s,featureName:"magicType"})}},t}(mn),xb={line:function(n,t,e,i){if(n==="bar")return de({id:t,type:"line",data:e.get("data"),stack:e.get("stack"),markPoint:e.get("markPoint"),markLine:e.get("markLine")},i.get(["option","line"])||{},!0)},bar:function(n,t,e,i){if(n==="line")return de({id:t,type:"bar",data:e.get("data"),stack:e.get("stack"),markPoint:e.get("markPoint"),markLine:e.get("markLine")},i.get(["option","bar"])||{},!0)},stack:function(n,t,e,i){var r=e.get("stack")===_b;if(n==="line"||n==="bar")return i.setIconStatus("stack",r?"normal":"emphasis"),de({id:t,stack:r?"":_b},i.get(["option","stack"])||{},!0)}};fn({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(n,t){t.mergeOption(n.newOption)});var du=new Array(60).join("-"),Ga=" ";function fu(n){return n.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}var Hd=new RegExp("[ ]+","g"),BA=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return F(t,n),t.prototype.onclick=function(e,i){setTimeout(function(){i.dispatchAction({type:"hideTip"})});var r=i.getDom(),o=this.model;this._dom&&r.removeChild(this._dom);var a=document.createElement("div");a.style.cssText="position:absolute;top:0;bottom:0;left:0;right:0;padding:5px",a.style.backgroundColor=o.get("backgroundColor")||"#fff";var s=document.createElement("h4"),l=o.get("lang")||[];s.innerHTML=l[0]||o.get("title"),s.style.cssText="margin:10px 20px",s.style.color=o.get("textColor");var u=document.createElement("div"),c=document.createElement("textarea");u.style.cssText="overflow:auto";var h=o.get("optionToContent"),p=o.get("contentToOption"),d=function(M){var S,C,I,T=function(A){var k={},L=[],O=[];return A.eachRawSeries(function(P){var R=P.coordinateSystem;if(!R||R.type!=="cartesian2d"&&R.type!=="polar")L.push(P);else{var N=R.getBaseAxis();if(N.type==="category"){var E=N.dim+"_"+N.index;k[E]||(k[E]={categoryAxis:N,valueAxis:R.getOtherAxis(N),series:[]},O.push({axisDim:N.dim,axisIndex:N.index})),k[E].series.push(P)}else L.push(P)}}),{seriesGroupByCategoryAxis:k,other:L,meta:O}}(M);return{value:He([(C=T.seriesGroupByCategoryAxis,I=[],D(C,function(A,k){var L=A.categoryAxis,O=A.valueAxis.dim,P=[" "].concat(j(A.series,function(G){return G.name})),R=[L.model.getCategories()];D(A.series,function(G){var K=G.getRawData();R.push(G.getRawData().mapArray(K.mapDimension(O),function(V){return V}))});for(var N=[P.join(Ga)],E=0;E=0)return!0}(A)){var L=function(R){for(var N=R.split(/\n+/g),E=[],z=j(fu(N.shift()).split(Hd),function(V){return{name:V,data:[]}}),B=0;B=0)&&a(o,r._targetInfoList)})}return n.prototype.setOutputRanges=function(t,e){return this.matchOutputRanges(t,e,function(i,r,o){if((i.coordRanges||(i.coordRanges=[])).push(r),!i.coordRange){i.coordRange=r;var a=Ud[i.brushType](0,o,r);i.__rangeOffset={offset:Ab[i.brushType](a.values,i.range,[1,1]),xyMinMax:a.xyMinMax}}}),t},n.prototype.matchOutputRanges=function(t,e,i){D(t,function(r){var o=this.findTargetInfo(r,e);o&&o!==!0&&D(o.coordSyses,function(a){var s=Ud[r.brushType](1,a,r.range,!0);i(r,s.values,a,e)})},this)},n.prototype.setInputRanges=function(t,e){D(t,function(i){var r,o,a,s,l,u=this.findTargetInfo(i,e);if(i.range=i.range||[],u&&u!==!0){i.panelId=u.panelId;var c=Ud[i.brushType](0,u.coordSys,i.coordRange),h=i.__rangeOffset;i.range=h?Ab[i.brushType](c.values,h.offset,(r=c.xyMinMax,o=h.xyMinMax,a=kb(r),s=kb(o),l=[a[0]/s[0],a[1]/s[1]],isNaN(l[0])&&(l[0]=1),isNaN(l[1])&&(l[1]=1),l)):c.values}},this)},n.prototype.makePanelOpts=function(t,e){return j(this._targetInfoList,function(i){var r=i.getPanelRect();return{panelId:i.panelId,defaultBrushType:e?e(i):null,clipPath:Mx(r),isTargetByCursor:Cx(r,t,i.coordSysModel),getLinearBrushOtherExtent:Tx(r)}})},n.prototype.controlSeries=function(t,e,i){var r=this.findTargetInfo(t,i);return r===!0||r&&we(r.coordSyses,e.coordinateSystem)>=0},n.prototype.findTargetInfo=function(t,e){for(var i=this._targetInfoList,r=Mb(e,t),o=0;on[1]&&n.reverse(),n}function Mb(n,t){return Eo(n,t,{includeMainTypes:GA})}var HA={grid:function(n,t){var e=n.xAxisModels,i=n.yAxisModels,r=n.gridModels,o=re(),a={},s={};(e||i||r)&&(D(e,function(l){var u=l.axis.grid.model;o.set(u.id,u),a[u.id]=!0}),D(i,function(l){var u=l.axis.grid.model;o.set(u.id,u),s[u.id]=!0}),D(r,function(l){o.set(l.id,l),a[l.id]=!0,s[l.id]=!0}),o.each(function(l){var u=l.coordinateSystem,c=[];D(u.getCartesians(),function(h,p){(we(e,h.getAxis("x").model)>=0||we(i,h.getAxis("y").model)>=0)&&c.push(h)}),t.push({panelId:"grid--"+l.id,gridModel:l,coordSysModel:l,coordSys:c[0],coordSyses:c,getPanelRect:Cb.grid,xAxisDeclared:a[l.id],yAxisDeclared:s[l.id]})}))},geo:function(n,t){D(n.geoModels,function(e){var i=e.coordinateSystem;t.push({panelId:"geo--"+e.id,geoModel:e,coordSysModel:e,coordSys:i,coordSyses:[i],getPanelRect:Cb.geo})})}},Tb=[function(n,t){var e=n.xAxisModel,i=n.yAxisModel,r=n.gridModel;return!r&&e&&(r=e.axis.grid.model),!r&&i&&(r=i.axis.grid.model),r&&r===t.gridModel},function(n,t){var e=n.geoModel;return e&&e===t.geoModel}],Cb={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var n=this.coordSys,t=n.getBoundingRect().clone();return t.applyTransform($i(n)),t}},Ud={lineX:Se(Ib,0),lineY:Se(Ib,1),rect:function(n,t,e,i){var r=n?t.pointToData([e[0][0],e[1][0]],i):t.dataToPoint([e[0][0],e[1][0]],i),o=n?t.pointToData([e[0][1],e[1][1]],i):t.dataToPoint([e[0][1],e[1][1]],i),a=[Xd([r[0],o[0]]),Xd([r[1],o[1]])];return{values:a,xyMinMax:a}},polygon:function(n,t,e,i){var r=[[1/0,-1/0],[1/0,-1/0]];return{values:j(e,function(o){var a=n?t.pointToData(o,i):t.dataToPoint(o,i);return r[0][0]=Math.min(r[0][0],a[0]),r[1][0]=Math.min(r[1][0],a[1]),r[0][1]=Math.max(r[0][1],a[0]),r[1][1]=Math.max(r[1][1],a[1]),a}),xyMinMax:r}}};function Ib(n,t,e,i){var r=e.getAxis(["x","y"][n]),o=Xd(j([0,1],function(s){return t?r.coordToData(r.toLocalCoord(i[s]),!0):r.toGlobalCoord(r.dataToCoord(i[s]))})),a=[];return a[n]=o,a[1-n]=[NaN,NaN],{values:o,xyMinMax:a}}var Ab={lineX:Se(Db,0),lineY:Se(Db,1),rect:function(n,t,e){return[[n[0][0]-e[0]*t[0][0],n[0][1]-e[0]*t[0][1]],[n[1][0]-e[1]*t[1][0],n[1][1]-e[1]*t[1][1]]]},polygon:function(n,t,e){return j(n,function(i,r){return[i[0]-e[0]*t[r][0],i[1]-e[1]*t[r][1]]})}};function Db(n,t,e,i){return[t[0]-i[n]*e[0],t[1]-i[n]*e[1]]}function kb(n){return n?[n[0][1]-n[0][0],n[1][1]-n[1][0]]:[NaN,NaN]}var Yd,Zd,qd=D,WA=bg+"toolbox-dataZoom_",XA=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return F(t,n),t.prototype.render=function(e,i,r,o){this._brushController||(this._brushController=new sx(r.getZr()),this._brushController.on("brush",he(this._onBrush,this)).mount()),function(a,s,l,u,c){var h=l._isZoomActive;u&&u.type==="takeGlobalCursor"&&(h=u.key==="dataZoomSelect"&&u.dataZoomSelectActive),l._isZoomActive=h,a.setIconStatus("zoom",h?"emphasis":"normal");var p=new Sb(jd(a),s,{include:["grid"]}).makePanelOpts(c,function(d){return d.xAxisDeclared&&!d.yAxisDeclared?"lineX":!d.xAxisDeclared&&d.yAxisDeclared?"lineY":"rect"});l._brushController.setPanels(p).enableBrush(!(!h||!p.length)&&{brushType:"auto",brushStyle:a.getModel("brushStyle").getItemStyle()})}(e,i,this,o,r),function(a,s){a.setIconStatus("back",function(l){return Wd(l).length}(s)>1?"emphasis":"normal")}(e,i)},t.prototype.onclick=function(e,i,r){UA[r].call(this)},t.prototype.remove=function(e,i){this._brushController&&this._brushController.unmount()},t.prototype.dispose=function(e,i){this._brushController&&this._brushController.dispose()},t.prototype._onBrush=function(e){var i=e.areas;if(e.isEnd&&i.length){var r={},o=this.ecModel;this._brushController.updateCovers([]),new Sb(jd(this.model),o,{include:["grid"]}).matchOutputRanges(i,o,function(s,l,u){if(u.type==="cartesian2d"){var c=s.brushType;c==="rect"?(a("x",u,l[0]),a("y",u,l[1])):a({lineX:"x",lineY:"y"}[c],u,l)}}),function(s,l){var u=Wd(s);bb(l,function(c,h){for(var p=u.length-1;p>=0&&!u[p][h];p--);if(p<0){var d=s.queryComponents({mainType:"dataZoom",subType:"select",id:h})[0];if(d){var f=d.getPercentRange();u[0][h]={dataZoomId:h,start:f[0],end:f[1]}}}}),u.push(l)}(o,r),this._dispatchZoomAction(r)}function a(s,l,u){var c=l.getAxis(s),h=c.model,p=function(f,g,y){var v;return y.eachComponent({mainType:"dataZoom",subType:"select"},function(m){m.getAxisModel(f,g.componentIndex)&&(v=m)}),v}(s,h,o),d=p.findRepresentativeAxisProxy(h).getMinMaxSpan();d.minValueSpan==null&&d.maxValueSpan==null||(u=su(0,u.slice(),c.scale.getExtent(),0,d.minValueSpan,d.maxValueSpan)),p&&(r[p.id]={dataZoomId:p.id,startValue:u[0],endValue:u[1]})}},t.prototype._dispatchZoomAction=function(e){var i=[];qd(e,function(r,o){i.push(ae(r))}),i.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:i})},t.getDefaultOption=function(e){return{show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:e.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:"rgba(210,219,238,0.2)"}}},t}(mn),UA={zoom:function(){var n=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:n})},back:function(){this._dispatchZoomAction(function(n){var t=Wd(n),e=t[t.length-1];t.length>1&&t.pop();var i={};return bb(e,function(r,o){for(var a=t.length-1;a>=0;a--)if(r=t[a][o]){i[o]=r;break}}),i}(this.ecModel))}};function jd(n){var t={xAxisIndex:n.get("xAxisIndex",!0),yAxisIndex:n.get("yAxisIndex",!0),xAxisId:n.get("xAxisId",!0),yAxisId:n.get("yAxisId",!0)};return t.xAxisIndex==null&&t.xAxisId==null&&(t.xAxisIndex="all"),t.yAxisIndex==null&&t.yAxisId==null&&(t.yAxisIndex="all"),t}function YA(n){n.registerComponentModel(OA),n.registerComponentView(RA),Fa("saveAsImage",NA),Fa("magicType",zA),Fa("dataView",BA),Fa("dataZoom",XA),Fa("restore",FA),Lt(PA)}Yd="dataZoom",Zd=function(n){var t=n.getComponent("toolbox",0),e=["feature","dataZoom"];if(t&&t.get(e)!=null){var i=t.getModel(e),r=[],o=Eo(n,jd(i));return qd(o.xAxisModels,function(s){return a(s,"xAxis","xAxisIndex")}),qd(o.yAxisModels,function(s){return a(s,"yAxis","yAxisIndex")}),r}function a(s,l,u){var c=s.componentIndex,h={type:"select",$fromToolbox:!0,filterMode:i.get("filterMode",!0)||"filter",id:WA+l+c};h[u]=c,r.push(h)}},Ot(Ah.get(Yd)==null&&Zd),Ah.set(Yd,Zd);var ZA=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return F(t,n),t.type="tooltip",t.dependencies=["axisPointer"],t.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},t}(be);function Lb(n){var t=n.get("confine");return t!=null?!!t:n.get("renderMode")==="richText"}function Pb(n){if(fe.domSupported){for(var t=document.documentElement.style,e=0,i=n.length;e-1?(_+="top:50%",x+="translateY(-50%) rotate("+(y=v==="left"?-225:-45)+"deg)"):(_+="left:50%",x+="translateX(-50%) rotate("+(y=v==="top"?225:45)+"deg)");var b=y*Math.PI/180,w=m+f,M=w*Math.abs(Math.cos(b))+w*Math.abs(Math.sin(b)),S=h+" solid "+f+"px;";return'
'}(i,r,o)),Q(t))a.innerHTML=t+s;else if(t){a.innerHTML="",Y(t)||(t=[t]);for(var l=0;l=0?this._tryShow(r,o):i==="leave"&&this._hide(o))},this))},t.prototype._keepShow=function(){var e=this._tooltipModel,i=this._ecModel,r=this._api,o=e.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&o!=="none"&&o!=="click"){var a=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!r.isDisposed()&&a.manuallyShowTip(e,i,r,{x:a._lastX,y:a._lastY,dataByCoordSys:a._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(e,i,r,o){if(o.from!==this.uid&&!fe.node&&r.getDom()){var a=Vb(o,r);this._ticket="";var s=o.dataByCoordSys,l=function(f,g,y){var v=wc(f).queryOptionMap,m=v.keys()[0];if(m&&m!=="series"){var _,x=zo(g,m,v.get(m),{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];if(x)return y.getViewOfComponentModel(x).group.traverse(function(b){var w=ye(b).tooltipConfig;if(w&&w.name===f.name)return _=b,!0}),_?{componentMainType:m,componentIndex:x.componentIndex,el:_}:void 0}}(o,i,r);if(l){var u=l.el.getBoundingRect().clone();u.applyTransform(l.el.transform),this._tryShow({offsetX:u.x+u.width/2,offsetY:u.y+u.height/2,target:l.el,position:o.position,positionDefault:"bottom"},a)}else if(o.tooltip&&o.x!=null&&o.y!=null){var c=$A;c.x=o.x,c.y=o.y,c.update(),ye(c).tooltipConfig={name:null,option:o.tooltip},this._tryShow({offsetX:o.x,offsetY:o.y,target:c},a)}else if(s)this._tryShow({offsetX:o.x,offsetY:o.y,position:o.position,dataByCoordSys:s,tooltipOption:o.tooltipOption},a);else if(o.seriesIndex!=null){if(this._manuallyAxisShowTip(e,i,r,o))return;var h=nb(o,i),p=h.point[0],d=h.point[1];p!=null&&d!=null&&this._tryShow({offsetX:p,offsetY:d,target:h.el,position:o.position,positionDefault:"bottom"},a)}else o.x!=null&&o.y!=null&&(r.dispatchAction({type:"updateAxisPointer",x:o.x,y:o.y}),this._tryShow({offsetX:o.x,offsetY:o.y,position:o.position,target:r.getZr().findHover(o.x,o.y).target},a))}},t.prototype.manuallyHideTip=function(e,i,r,o){var a=this._tooltipContent;this._tooltipModel&&a.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,o.from!==this.uid&&this._hide(Vb(o,r))},t.prototype._manuallyAxisShowTip=function(e,i,r,o){var a=o.seriesIndex,s=o.dataIndex,l=i.getComponent("axisPointer").coordSysAxesInfo;if(a!=null&&s!=null&&l!=null){var u=i.getSeriesByIndex(a);if(u&&Ha([u.getData().getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel).get("trigger")==="axis")return r.dispatchAction({type:"updateAxisPointer",seriesIndex:a,dataIndex:s,position:o.position}),!0}},t.prototype._tryShow=function(e,i){var r=e.target;if(this._tooltipModel){this._lastX=e.offsetX,this._lastY=e.offsetY;var o=e.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,e);else if(r){var a,s;if(ye(r).ssrType==="legend")return;this._lastDataByCoordSys=null,tr(r,function(l){return ye(l).dataIndex!=null?(a=l,!0):ye(l).tooltipConfig!=null?(s=l,!0):void 0},!0),a?this._showSeriesItemTooltip(e,a,i):s?this._showComponentItemTooltip(e,s,i):this._hide(i)}else this._lastDataByCoordSys=null,this._hide(i)}},t.prototype._showOrMove=function(e,i){var r=e.get("showDelay");i=he(i,this),clearTimeout(this._showTimout),r>0?this._showTimout=setTimeout(i,r):i()},t.prototype._showAxisTooltip=function(e,i){var r=this._ecModel,o=this._tooltipModel,a=[i.offsetX,i.offsetY],s=Ha([i.tooltipOption],o),l=this._renderMode,u=[],c=jn("section",{blocks:[],noHeader:!0}),h=[],p=new Wh;D(e,function(m){D(m.dataByAxis,function(_){var x=r.getComponent(_.axisDim+"Axis",_.axisIndex),b=_.value;if(x&&b!=null){var w=qx(b,x.axis,r,_.seriesDataIndices,_.valueLabelOpt),M=jn("section",{header:w,noHeader:!zt(w),sortBlocks:!0,blocks:[]});c.blocks.push(M),D(_.seriesDataIndices,function(S){var C=r.getSeriesByIndex(S.seriesIndex),I=S.dataIndexInside,T=C.getDataParams(I);if(!(T.dataIndex<0)){T.axisDim=_.axisDim,T.axisIndex=_.axisIndex,T.axisType=_.axisType,T.axisId=_.axisId,T.axisValue=Lp(x.axis,{value:b}),T.axisValueLabel=w,T.marker=p.makeTooltipMarker("item",Qi(T.color),l);var A=qv(C.formatTooltip(I,!0,null)),k=A.frag;if(k){var L=Ha([C],o).get("valueFormatter");M.blocks.push(L?H({valueFormatter:L},k):k)}A.text&&h.push(A.text),u.push(T)}})}})}),c.blocks.reverse(),h.reverse();var d=i.position,f=s.get("order"),g=lm(c,p,l,f,r.get("useUTC"),s.get("textStyle"));g&&h.unshift(g);var y=l==="richText"?` `:"
",v=h.join(y);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(e,u)?this._updatePosition(s,d,a[0],a[1],this._tooltipContent,u):this._showTooltipContent(s,v,u,Math.random()+"",a[0],a[1],d,null,p)})},t.prototype._showSeriesItemTooltip=function(e,i,r){var o=this._ecModel,a=ye(i),s=a.seriesIndex,l=o.getSeriesByIndex(s),u=a.dataModel||l,c=a.dataIndex,h=a.dataType,p=u.getData(h),d=this._renderMode,f=e.positionDefault,g=Ha([p.getItemModel(c),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,f?{position:f}:null),y=g.get("trigger");if(y==null||y==="item"){var v=u.getDataParams(c,h),m=new Wh;v.marker=m.makeTooltipMarker("item",Qi(v.color),d);var _=qv(u.formatTooltip(c,!1,h)),x=g.get("order"),b=g.get("valueFormatter"),w=_.frag,M=w?lm(b?H({valueFormatter:b},w):w,m,d,x,o.get("useUTC"),g.get("textStyle")):_.text,S="item_"+u.name+"_"+c;this._showOrMove(g,function(){this._showTooltipContent(g,M,v,S,e.offsetX,e.offsetY,e.position,e.target,m)}),r({type:"showTip",dataIndexInside:c,dataIndex:p.getRawIndex(c),seriesIndex:s,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,i,r){var o=this._renderMode==="html",a=ye(i),s=a.tooltipConfig.option||{},l=s.encodeHTMLContent;Q(s)&&(s={content:s,formatter:s},l=!0),l&&o&&s.content&&((s=ae(s)).content=wt(s.content));var u=[s],c=this._ecModel.getComponent(a.componentMainType,a.componentIndex);c&&u.push(c),u.push({formatter:s.content});var h=e.positionDefault,p=Ha(u,this._tooltipModel,h?{position:h}:null),d=p.get("content"),f=Math.random()+"",g=new Wh;this._showOrMove(p,function(){var y=ae(p.get("formatterParams")||{});this._showTooltipContent(p,d,y,f,e.offsetX,e.offsetY,e.position,i,g)}),r({type:"showTip",from:this.uid})},t.prototype._showTooltipContent=function(e,i,r,o,a,s,l,u,c){if(this._ticket="",e.get("showContent")&&e.get("show")){var h=this._tooltipContent;h.setEnterable(e.get("enterable"));var p=e.get("formatter");l=l||e.get("position");var d=i,f=this._getNearestPoint([a,s],r,e.get("trigger"),e.get("borderColor")).color;if(p)if(Q(p)){var g=e.ecModel.get("useUTC"),y=Y(r)?r[0]:r;d=p,y&&y.axisType&&y.axisType.indexOf("time")>=0&&(d=oa(y.axisValue,d,g)),d=Mh(d,r,!0)}else if(ue(p)){var v=he(function(m,_){m===this._ticket&&(h.setContent(_,c,e,f,l),this._updatePosition(e,l,a,s,h,r,u))},this);this._ticket=o,d=p(r,o,v)}else d=p;h.setContent(d,c,e,f,l),h.show(e,f),this._updatePosition(e,l,a,s,h,r,u)}},t.prototype._getNearestPoint=function(e,i,r,o){return r==="axis"||Y(i)?{color:o||(this._renderMode==="html"?"#fff":"none")}:Y(i)?void 0:{color:o||i.color||i.borderColor}},t.prototype._updatePosition=function(e,i,r,o,a,s,l){var u=this._api.getWidth(),c=this._api.getHeight();i=i||e.get("position");var h=a.getSize(),p=e.get("align"),d=e.get("verticalAlign"),f=l&&l.getBoundingRect().clone();if(l&&f.applyTransform(l.transform),ue(i)&&(i=i([r,o],s,a.el,f,{viewSize:[u,c],contentSize:h.slice()})),Y(i))r=ee(i[0],u),o=ee(i[1],c);else if(ne(i)){var g=i;g.width=h[0],g.height=h[1];var y=It(g,{width:u,height:c});r=y.x,o=y.y,p=null,d=null}else if(Q(i)&&l){var v=function(m,_,x,b){var w=x[0],M=x[1],S=Math.ceil(Math.SQRT2*b)+8,C=0,I=0,T=_.width,A=_.height;switch(m){case"inside":C=_.x+T/2-w/2,I=_.y+A/2-M/2;break;case"top":C=_.x+T/2-w/2,I=_.y-M-S;break;case"bottom":C=_.x+T/2-w/2,I=_.y+A+S;break;case"left":C=_.x-w-S,I=_.y+A/2-M/2;break;case"right":C=_.x+T+S,I=_.y+A/2-M/2}return[C,I]}(i,f,h,e.get("borderWidth"));r=v[0],o=v[1]}else v=function(m,_,x,b,w,M,S){var C=x.getSize(),I=C[0],T=C[1];return M!=null&&(m+I+M+2>b?m-=I+M:m+=M),S!=null&&(_+T+S>w?_-=T+S:_+=S),[m,_]}(r,o,a,u,c,p?null:20,d?null:20),r=v[0],o=v[1];p&&(r-=Fb(p)?h[0]/2:p==="right"?h[0]:0),d&&(o-=Fb(d)?h[1]/2:d==="bottom"?h[1]:0),Lb(e)&&(v=function(m,_,x,b,w){var M=x.getSize(),S=M[0],C=M[1];return m=Math.min(m+S,b)-S,_=Math.min(_+C,w)-C,[m=Math.max(m,0),_=Math.max(_,0)]}(r,o,a,u,c),r=v[0],o=v[1]),a.moveTo(r,o)},t.prototype._updateContentNotChangedOnAxis=function(e,i){var r=this._lastDataByCoordSys,o=this._cbParamsList,a=!!r&&r.length===e.length;return a&&D(r,function(s,l){var u=s.dataByAxis||[],c=(e[l]||{}).dataByAxis||[];(a=a&&u.length===c.length)&&D(u,function(h,p){var d=c[p]||{},f=h.seriesDataIndices||[],g=d.seriesDataIndices||[];(a=a&&h.value===d.value&&h.axisType===d.axisType&&h.axisId===d.axisId&&f.length===g.length)&&D(f,function(y,v){var m=g[v];a=a&&y.seriesIndex===m.seriesIndex&&y.dataIndex===m.dataIndex}),o&&D(h.seriesDataIndices,function(y){var v=y.seriesIndex,m=i[v],_=o[v];m&&_&&_.data!==m.data&&(a=!1)})})}),this._lastDataByCoordSys=e,this._cbParamsList=i,!!a},t.prototype._hide=function(e){this._lastDataByCoordSys=null,e({type:"hideTip",from:this.uid})},t.prototype.dispose=function(e,i){!fe.node&&i.getDom()&&(hl(this,"_updatePosition"),this._tooltipContent.dispose(),Ed("itemTooltip",i))},t.type="tooltip",t}(Xe);function Ha(n,t,e){var i,r=t.ecModel;e?(i=new Le(e,r,r),i=new Le(t.option,i,r)):i=t;for(var o=n.length-1;o>=0;o--){var a=n[o];a&&(a instanceof Le&&(a=a.get("tooltip",!0)),Q(a)&&(a={formatter:a}),a&&(i=new Le(a,i,r)))}return i}function Vb(n,t){return n.dispatchAction||he(t.dispatchAction,t)}function Fb(n){return n==="center"||n==="middle"}function eD(n){Lt(zd),n.registerComponentModel(ZA),n.registerComponentView(QA),n.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},rt),n.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},rt)}var Gb=D;function Hb(n){if(n){for(var t in n)if(n.hasOwnProperty(t))return!0}}function Wb(n,t,e){var i={};return Gb(t,function(r){var o,a=i[r]=((o=function(){}).prototype.__hidden=o.prototype,new o);Gb(n[r],function(s,l){if(pt.isValidType(l)){var u={type:l,visual:s};e&&e(u,r),a[l]=new pt(u),l==="opacity"&&((u=ae(u)).type="colorAlpha",a.__hidden.__alphaForOpacity=new pt(u))}})}),i}var tD=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e.layoutMode={type:"box",ignoreSize:!0},e}return F(t,n),t.type="title",t.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},t}(be),nD=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return F(t,n),t.prototype.render=function(e,i,r){if(this.group.removeAll(),e.get("show")){var o=this.group,a=e.getModel("textStyle"),s=e.getModel("subtextStyle"),l=e.get("textAlign"),u=xe(e.get("textBaseline"),e.get("textVerticalAlign")),c=new Me({style:nt(a,{text:e.get("text"),fill:a.getTextColor()},{disableBox:!0}),z2:10}),h=c.getBoundingRect(),p=e.get("subtext"),d=new Me({style:nt(s,{text:p,fill:s.getTextColor(),y:h.height+e.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),f=e.get("link"),g=e.get("sublink"),y=e.get("triggerEvent",!0);c.silent=!f&&!y,d.silent=!g&&!y,f&&c.on("click",function(){hv(f,"_"+e.get("target"))}),g&&d.on("click",function(){hv(g,"_"+e.get("subtarget"))}),ye(c).eventData=ye(d).eventData=y?{componentType:"title",componentIndex:e.componentIndex}:null,o.add(c),p&&o.add(d);var v=o.getBoundingRect(),m=e.getBoxLayoutParams();m.width=v.width,m.height=v.height;var _=It(m,{width:r.getWidth(),height:r.getHeight()},e.get("padding"));l||((l=e.get("left")||e.get("right"))==="middle"&&(l="center"),l==="right"?_.x+=_.width:l==="center"&&(_.x+=_.width/2)),u||((u=e.get("top")||e.get("bottom"))==="center"&&(u="middle"),u==="bottom"?_.y+=_.height:u==="middle"&&(_.y+=_.height/2),u=u||"top"),o.x=_.x,o.y=_.y,o.markRedraw();var x={align:l,verticalAlign:u};c.setStyle(x),d.setStyle(x),v=o.getBoundingRect();var b=_.margin,w=e.getItemStyle(["color","opacity"]);w.fill=e.get("backgroundColor");var M=new ke({shape:{x:v.x-b[3],y:v.y-b[0],width:v.width+b[1]+b[3],height:v.height+b[0]+b[2],r:e.get("borderRadius")},style:w,subPixelOptimize:!0,silent:!0});o.add(M)}},t.type="title",t}(Xe);function iD(n){n.registerComponentModel(tD),n.registerComponentView(nD)}var Jd=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e.layoutMode={type:"box",ignoreSize:!0},e}return F(t,n),t.prototype.init=function(e,i,r){this.mergeDefaultAndTheme(e,r),e.selected=e.selected||{},this._updateSelector(e)},t.prototype.mergeOption=function(e,i){n.prototype.mergeOption.call(this,e,i),this._updateSelector(e)},t.prototype._updateSelector=function(e){var i=e.selector,r=this.ecModel;i===!0&&(i=e.selector=["all","inverse"]),Y(i)&&D(i,function(o,a){Q(o)&&(o={type:o}),i[a]=de(o,function(s,l){return l==="all"?{type:"all",title:s.getLocaleModel().get(["legend","selector","all"])}:l==="inverse"?{type:"inverse",title:s.getLocaleModel().get(["legend","selector","inverse"])}:void 0}(r,o.type))})},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var e=this._data;if(e[0]&&this.get("selectedMode")==="single"){for(var i=!1,r=0;r=0},t.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},t.type="legend.plain",t.dependencies=["series"],t.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},t}(be),so=Se,$d=D,gu=_e,Xb=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e.newlineDisabled=!1,e}return F(t,n),t.prototype.init=function(){this.group.add(this._contentGroup=new gu),this.group.add(this._selectorGroup=new gu),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(e,i,r){var o=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),e.get("show",!0)){var a=e.get("align"),s=e.get("orient");a&&a!=="auto"||(a=e.get("left")==="right"&&s==="vertical"?"right":"left");var l=e.get("selector",!0),u=e.get("selectorPosition",!0);!l||u&&u!=="auto"||(u=s==="horizontal"?"end":"start"),this.renderInner(a,e,i,r,l,s,u);var c=e.getBoxLayoutParams(),h={width:r.getWidth(),height:r.getHeight()},p=e.get("padding"),d=It(c,h,p),f=this.layoutInner(e,a,d,o,l,u),g=It(ce({width:f.width,height:f.height},c),h,p);this.group.x=g.x-f.x,this.group.y=g.y-f.y,this.group.markRedraw(),this.group.add(this._backgroundEl=mb(f,e))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(e,i,r,o,a,s,l){var u=this.getContentGroup(),c=re(),h=i.get("selectedMode"),p=[];r.eachRawSeries(function(d){!d.get("legendHoverLink")&&p.push(d.id)}),$d(i.getData(),function(d,f){var g=d.get("name");if(!this.newlineDisabled&&(g===""||g===` `)){var y=new gu;return y.newline=!0,void u.add(y)}var v=r.getSeriesByName(g)[0];if(!c.get(g))if(v){var m=v.getData(),_=m.getVisual("legendLineStyle")||{},x=m.getVisual("legendIcon"),b=m.getVisual("style"),w=this._createItem(v,g,f,d,i,e,_,b,x,h,o);w.on("click",so(Ub,g,null,o,p)).on("mouseover",so(Qd,v.name,null,o,p)).on("mouseout",so(ef,v.name,null,o,p)),r.ssr&&w.eachChild(function(M){var S=ye(M);S.seriesIndex=v.seriesIndex,S.dataIndex=f,S.ssrType="legend"}),c.set(g,!0)}else r.eachRawSeries(function(M){if(!c.get(g)&&M.legendVisualProvider){var S=M.legendVisualProvider;if(!S.containName(g))return;var C=S.indexOfName(g),I=S.getItemVisual(C,"style"),T=S.getItemVisual(C,"legendIcon"),A=St(I.fill);A&&A[3]===0&&(A[3]=.2,I=H(H({},I),{fill:on(A,"rgba")}));var k=this._createItem(M,g,f,d,i,e,{},I,T,h,o);k.on("click",so(Ub,null,g,o,p)).on("mouseover",so(Qd,null,g,o,p)).on("mouseout",so(ef,null,g,o,p)),r.ssr&&k.eachChild(function(L){var O=ye(L);O.seriesIndex=M.seriesIndex,O.dataIndex=f,O.ssrType="legend"}),c.set(g,!0)}},this)},this),a&&this._createSelector(a,i,o,s,l)},t.prototype._createSelector=function(e,i,r,o,a){var s=this.getSelectorGroup();$d(e,function(l){var u=l.type,c=new Me({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){r.dispatchAction({type:u==="all"?"legendAllSelect":"legendInverseSelect"})}});s.add(c),Dn(c,{normal:i.getModel("selectorLabel"),emphasis:i.getModel(["emphasis","selectorLabel"])},{defaultText:l.title}),Wo(c)})},t.prototype._createItem=function(e,i,r,o,a,s,l,u,c,h,p){var d,f,g,y=e.visualDrawType,v=a.get("itemWidth"),m=a.get("itemHeight"),_=a.isSelected(i),x=o.get("symbolRotate"),b=o.get("symbolKeepAspect"),w=o.get("icon"),M=function(N,E,z,B,G,K,V){function X(q,U){q.lineWidth==="auto"&&(q.lineWidth=U.lineWidth>0?2:0),$d(q,function(le,ve){q[ve]==="inherit"&&(q[ve]=U[ve])})}var Z=E.getModel("itemStyle"),W=Z.getItemStyle(),te=N.lastIndexOf("empty",0)===0?"fill":"stroke",oe=Z.getShallow("decal");W.decal=oe&&oe!=="inherit"?_l(oe,V):B.decal,W.fill==="inherit"&&(W.fill=B[G]),W.stroke==="inherit"&&(W.stroke=B[te]),W.opacity==="inherit"&&(W.opacity=(G==="fill"?B:z).opacity),X(W,B);var se=E.getModel("lineStyle"),ie=se.getLineStyle();if(X(ie,z),W.fill==="auto"&&(W.fill=B.fill),W.stroke==="auto"&&(W.stroke=B.fill),ie.stroke==="auto"&&(ie.stroke=B.fill),!K){var J=E.get("inactiveBorderWidth"),$=W[te];W.lineWidth=J==="auto"?B.lineWidth>0&&$?2:0:W.lineWidth,W.fill=E.get("inactiveColor"),W.stroke=E.get("inactiveBorderColor"),ie.stroke=se.get("inactiveColor"),ie.lineWidth=se.get("inactiveWidth")}return{itemStyle:W,lineStyle:ie}}(c=w||c||"roundRect",o,l,u,y,_,p),S=new gu,C=o.getModel("textStyle");if(!ue(e.getLegendIcon)||w&&w!=="inherit"){var I=w==="inherit"&&e.getData().getVisual("symbol")?x==="inherit"?e.getData().getVisual("symbolRotate"):x:0;S.add((d={itemWidth:v,itemHeight:m,icon:c,iconRotate:I,itemStyle:M.itemStyle,lineStyle:M.lineStyle,symbolKeepAspect:b},(g=_t(f=d.icon||"roundRect",0,0,d.itemWidth,d.itemHeight,d.itemStyle.fill,d.symbolKeepAspect)).setStyle(d.itemStyle),g.rotation=(d.iconRotate||0)*Math.PI/180,g.setOrigin([d.itemWidth/2,d.itemHeight/2]),f.indexOf("empty")>-1&&(g.style.stroke=g.style.fill,g.style.fill="#fff",g.style.lineWidth=2),g))}else S.add(e.getLegendIcon({itemWidth:v,itemHeight:m,icon:c,iconRotate:x,itemStyle:M.itemStyle,lineStyle:M.lineStyle,symbolKeepAspect:b}));var T=s==="left"?v+5:-5,A=s,k=a.get("formatter"),L=i;Q(k)&&k?L=k.replace("{name}",i??""):ue(k)&&(L=k(i));var O=_?C.getTextColor():o.get("inactiveColor");S.add(new Me({style:nt(C,{text:L,x:T,y:m/2,fill:O,align:A,verticalAlign:"middle"},{inheritColor:O})}));var P=new ke({shape:S.getBoundingRect(),style:{fill:"transparent"}}),R=o.getModel("tooltip");return R.get("show")&&ea({el:P,componentModel:a,itemName:i,itemTooltipOption:R.option}),S.add(P),S.eachChild(function(N){N.silent=!0}),P.silent=!h,this.getContentGroup().add(S),Wo(S),S.__legendDataIndex=r,S},t.prototype.layoutInner=function(e,i,r,o,a,s){var l=this.getContentGroup(),u=this.getSelectorGroup();er(e.get("orient"),l,e.get("itemGap"),r.width,r.height);var c=l.getBoundingRect(),h=[-c.x,-c.y];if(u.markRedraw(),l.markRedraw(),a){er("horizontal",u,e.get("selectorItemGap",!0));var p=u.getBoundingRect(),d=[-p.x,-p.y],f=e.get("selectorButtonGap",!0),g=e.getOrient().index,y=g===0?"width":"height",v=g===0?"height":"width",m=g===0?"y":"x";s==="end"?d[g]+=c[y]+f:h[g]+=p[y]+f,d[1-g]+=c[v]/2-p[v]/2,u.x=d[0],u.y=d[1],l.x=h[0],l.y=h[1];var _={x:0,y:0};return _[y]=c[y]+f+p[y],_[v]=Math.max(c[v],p[v]),_[m]=Math.min(0,p[m]+d[1-g]),_}return l.x=h[0],l.y=h[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type="legend.plain",t}(Xe);function Ub(n,t,e,i){ef(n,t,e,i),e.dispatchAction({type:"legendToggleSelect",name:n??t}),Qd(n,t,e,i)}function Yb(n){for(var t,e=n.getZr().storage.getDisplayList(),i=0,r=e.length;ir[a],y=[-d.x,-d.y];i||(y[o]=c[u]);var v=[0,0],m=[-f.x,-f.y],_=xe(e.get("pageButtonGap",!0),e.get("itemGap",!0));g&&(e.get("pageButtonPosition",!0)==="end"?m[o]+=r[a]-f[a]:v[o]+=f[a]+_),m[1-o]+=d[s]/2-f[s]/2,c.setPosition(y),h.setPosition(v),p.setPosition(m);var x={x:0,y:0};if(x[a]=g?r[a]:d[a],x[s]=Math.max(d[s],f[s]),x[l]=Math.min(0,f[l]+m[1-o]),h.__rectSize=r[a],g){var b={x:0,y:0};b[a]=Math.max(r[a]-f[a]-_,0),b[s]=x[s],h.setClipPath(new ke({shape:b})),h.__rectSize=b[a]}else p.eachChild(function(M){M.attr({invisible:!0,silent:!0})});var w=this._getPageInfo(e);return w.pageIndex!=null&&ze(c,{x:w.contentPosition[0],y:w.contentPosition[1]},g?e:null),this._updatePageInfoView(e,w),x},t.prototype._pageGo=function(e,i,r){var o=this._getPageInfo(i)[e];o!=null&&r.dispatchAction({type:"legendScroll",scrollDataIndex:o,legendId:i.id})},t.prototype._updatePageInfoView=function(e,i){var r=this._controllerGroup;D(["pagePrev","pageNext"],function(c){var h=i[c+"DataIndex"]!=null,p=r.childOfName(c);p&&(p.setStyle("fill",h?e.get("pageIconColor",!0):e.get("pageIconInactiveColor",!0)),p.cursor=h?"pointer":"default")});var o=r.childOfName("pageText"),a=e.get("pageFormatter"),s=i.pageIndex,l=s!=null?s+1:0,u=i.pageCount;o&&a&&o.setStyle("text",Q(a)?a.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):a({current:l,total:u}))},t.prototype._getPageInfo=function(e){var i=e.get("scrollDataIndex",!0),r=this.getContentGroup(),o=this._containerGroup.__rectSize,a=e.getOrient().index,s=tf[a],l=nf[a],u=this._findTargetItemIndex(i),c=r.children(),h=c[u],p=c.length,d=p?1:0,f={contentPosition:[r.x,r.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!h)return f;var g=x(h);f.contentPosition[a]=-g.s;for(var y=u+1,v=g,m=g,_=null;y<=p;++y)(!(_=x(c[y]))&&m.e>v.s+o||_&&!b(_,v.s))&&(v=m.i>v.i?m:_)&&(f.pageNextDataIndex==null&&(f.pageNextDataIndex=v.i),++f.pageCount),m=_;for(y=u-1,v=g,m=g,_=null;y>=-1;--y)(_=x(c[y]))&&b(m,_.s)||!(v.i=M&&w.s<=M+o}},t.prototype._findTargetItemIndex=function(e){return this._showController?(this.getContentGroup().eachChild(function(o,a){var s=o.__legendDataIndex;r==null&&s!=null&&(r=a),s===e&&(i=a)}),i??r):0;var i,r},t.type="legend.scroll",t}(Xb);function sD(n){Lt(Zb),n.registerComponentModel(oD),n.registerComponentView(aD),function(t){t.registerAction("legendScroll","legendscroll",function(e,i){var r=e.scrollDataIndex;r!=null&&i.eachComponent({mainType:"legend",subType:"scroll",query:e},function(o){o.setScrollDataIndex(r)})})}(n)}function lD(n){Lt(Zb),Lt(sD)}var Kb=function(n,t,e){var i=ae((uD[n]||{})[t]);return e&&Y(i)?i[i.length-1]:i},uD={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]}},Jb=pt.mapVisual,cD=pt.eachVisual,hD=Y,$b=D,pD=Do,dD=Fe,yu=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e.stateList=["inRange","outOfRange"],e.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],e.layoutMode={type:"box",ignoreSize:!0},e.dataBound=[-1/0,1/0],e.targetVisuals={},e.controllerVisuals={},e}return F(t,n),t.prototype.init=function(e,i,r){this.mergeDefaultAndTheme(e,r)},t.prototype.optionUpdated=function(e,i){var r=this.option;!i&&function(o,a,s){var l;D(s,function(u){a.hasOwnProperty(u)&&Hb(a[u])&&(l=!0)}),l&&D(s,function(u){a.hasOwnProperty(u)&&Hb(a[u])?o[u]=ae(a[u]):delete o[u]})}(r,e,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},t.prototype.resetVisual=function(e){var i=this.stateList;e=he(e,this),this.controllerVisuals=Wb(this.option.controller,i,e),this.targetVisuals=Wb(this.option.target,i,e)},t.prototype.getItemSymbol=function(){return null},t.prototype.getTargetSeriesIndices=function(){var e=this.option.seriesIndex,i=[];return e==null||e==="all"?this.ecModel.eachSeries(function(r,o){i.push(o)}):i=Ke(e),i},t.prototype.eachTargetSeries=function(e,i){D(this.getTargetSeriesIndices(),function(r){var o=this.ecModel.getSeriesByIndex(r);o&&e.call(i,o)},this)},t.prototype.isTargetSeries=function(e){var i=!1;return this.eachTargetSeries(function(r){r===e&&(i=!0)}),i},t.prototype.formatValueText=function(e,i,r){var o,a=this.option,s=a.precision,l=this.dataBound,u=a.formatter;r=r||["<",">"],Y(e)&&(e=e.slice(),o=!0);var c=i?e:o?[h(e[0]),h(e[1])]:h(e);return Q(u)?u.replace("{value}",o?c[0]:c).replace("{value2}",o?c[1]:c):ue(u)?o?u(e[0],e[1]):u(e):o?e[0]===l[0]?r[0]+" "+c[1]:e[1]===l[1]?r[1]+" "+c[0]:c[0]+" - "+c[1]:c;function h(p){return p===l[0]?"min":p===l[1]?"max":(+p).toFixed(Math.min(s,20))}},t.prototype.resetExtent=function(){var e=this.option,i=pD([e.min,e.max]);this._dataExtent=i},t.prototype.getDataDimensionIndex=function(e){var i=this.option.dimension;if(i!=null)return e.getDimensionIndex(i);for(var r=e.dimensions,o=r.length-1;o>=0;o--){var a=r[o],s=e.getDimensionInfo(a);if(!s.isCalculationCoord)return s.storeDimIndex}},t.prototype.getExtent=function(){return this._dataExtent.slice()},t.prototype.completeVisualOption=function(){var e=this.ecModel,i=this.option,r={inRange:i.inRange,outOfRange:i.outOfRange},o=i.target||(i.target={}),a=i.controller||(i.controller={});de(o,r),de(a,r);var s=this.isCategory();function l(u){hD(i.color)&&!u.inRange&&(u.inRange={color:i.color.slice().reverse()}),u.inRange=u.inRange||{color:e.get("gradientColor")}}l.call(this,o),l.call(this,a),(function(u,c,h){var p=u[c],d=u[h];p&&!d&&(d=u[h]={},$b(p,function(f,g){if(pt.isValidType(g)){var y=Kb(g,"inactive",s);y!=null&&(d[g]=y,g!=="color"||d.hasOwnProperty("opacity")||d.hasOwnProperty("colorAlpha")||(d.opacity=[0,0]))}}))}).call(this,o,"inRange","outOfRange"),(function(u){var c=(u.inRange||{}).symbol||(u.outOfRange||{}).symbol,h=(u.inRange||{}).symbolSize||(u.outOfRange||{}).symbolSize,p=this.get("inactiveColor"),d=this.getItemSymbol()||"roundRect";$b(this.stateList,function(f){var g=this.itemSize,y=u[f];y||(y=u[f]={color:s?p:[p]}),y.symbol==null&&(y.symbol=c&&ae(c)||(s?d:[d])),y.symbolSize==null&&(y.symbolSize=h&&ae(h)||(s?g[0]:[g[0],g[0]])),y.symbol=Jb(y.symbol,function(_){return _==="none"?d:_});var v=y.symbolSize;if(v!=null){var m=-1/0;cD(v,function(_){_>m&&(m=_)}),y.symbolSize=Jb(v,function(_){return dD(_,[0,m],[0,g[0]],!0)})}},this)}).call(this,a)},t.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},t.prototype.isCategory=function(){return!!this.option.categories},t.prototype.setSelected=function(e){},t.prototype.getSelected=function(){return null},t.prototype.getValueState=function(e){return null},t.prototype.getVisualMeta=function(e){return null},t.type="visualMap",t.dependencies=["series"],t.defaultOption={show:!0,z:4,seriesIndex:"all",min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,textStyle:{color:"#333"}},t}(be),Qb=[20,140],fD=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return F(t,n),t.prototype.optionUpdated=function(e,i){n.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(r){r.mappingMethod="linear",r.dataExtent=this.getExtent()}),this._resetRange()},t.prototype.resetItemSize=function(){n.prototype.resetItemSize.apply(this,arguments);var e=this.itemSize;(e[0]==null||isNaN(e[0]))&&(e[0]=Qb[0]),(e[1]==null||isNaN(e[1]))&&(e[1]=Qb[1])},t.prototype._resetRange=function(){var e=this.getExtent(),i=this.option.range;!i||i.auto?(e.auto=1,this.option.range=e):Y(i)&&(i[0]>i[1]&&i.reverse(),i[0]=Math.max(i[0],e[0]),i[1]=Math.min(i[1],e[1]))},t.prototype.completeVisualOption=function(){n.prototype.completeVisualOption.apply(this,arguments),D(this.stateList,function(e){var i=this.option.controller[e].symbolSize;i&&i[0]!==i[1]&&(i[0]=i[1]/3)},this)},t.prototype.setSelected=function(e){this.option.range=e.slice(),this._resetRange()},t.prototype.getSelected=function(){var e=this.getExtent(),i=Do((this.get("range")||[]).slice());return i[0]>e[1]&&(i[0]=e[1]),i[1]>e[1]&&(i[1]=e[1]),i[0]=r[1]||e<=i[1])?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(e){var i=[];return this.eachTargetSeries(function(r){var o=[],a=r.getData();a.each(this.getDataDimensionIndex(a),function(s,l){e[0]<=s&&s<=e[1]&&o.push(l)},this),i.push({seriesId:r.id,dataIndex:o})},this),i},t.prototype.getVisualMeta=function(e){var i=ew(0,0,this.getExtent()),r=ew(0,0,this.option.range.slice()),o=[];function a(d,f){o.push({value:d,color:e(d,f)})}for(var s=0,l=0,u=r.length,c=i.length;le[1])break;r.push({color:this.getControllerVisual(s,"color",i),offset:a/100})}return r.push({color:this.getControllerVisual(e[1],"color",i),offset:1}),r},t.prototype._createBarPoints=function(e,i){var r=this.visualMapModel.itemSize;return[[r[0]-i[0],e[0]],[r[0],e[0]],[r[0],e[1]],[r[0]-i[1],e[1]]]},t.prototype._createBarGroup=function(e){var i=this._orient,r=this.visualMapModel.get("inverse");return new _e(i!=="horizontal"||r?i==="horizontal"&&r?{scaleX:e==="bottom"?-1:1,rotation:-Math.PI/2}:i!=="vertical"||r?{scaleX:e==="left"?1:-1}:{scaleX:e==="left"?1:-1,scaleY:-1}:{scaleX:e==="bottom"?1:-1,rotation:Math.PI/2})},t.prototype._updateHandle=function(e,i){if(this._useHandle){var r=this._shapes,o=this.visualMapModel,a=r.handleThumbs,s=r.handleLabels,l=o.itemSize,u=o.getExtent();gD([0,1],function(c){var h=a[c];h.setStyle("fill",i.handlesColor[c]),h.y=e[c];var p=zn(e[c],[0,l[1]],u,!0),d=this.getControllerVisual(p,"symbolSize");h.scaleX=h.scaleY=d/l[0],h.x=l[0]-d/2;var f=li(r.handleLabelPoints[c],$i(h,this.group));s[c].setStyle({x:f[0],y:f[1],text:o.formatValueText(this._dataInterval[c]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",r.mainGroup):"center"})},this)}},t.prototype._showIndicator=function(e,i,r,o){var a=this.visualMapModel,s=a.getExtent(),l=a.itemSize,u=[0,l[1]],c=this._shapes,h=c.indicator;if(h){h.attr("invisible",!1);var p=this.getControllerVisual(e,"color",{convertOpacityToAlpha:!0}),d=this.getControllerVisual(e,"symbolSize"),f=zn(e,s,u,!0),g=l[0]-d/2,y={x:h.x,y:h.y};h.y=f,h.x=g;var v=li(c.indicatorLabelPoint,$i(h,this.group)),m=c.indicatorLabel;m.attr("invisible",!1);var _=this._applyTransform("left",c.mainGroup),x=this._orient==="horizontal";m.setStyle({text:(r||"")+a.formatValueText(i),verticalAlign:x?_:"middle",align:x?"center":_});var b={x:g,y:f,style:{fill:p}},w={style:{x:v[0],y:v[1]}};if(a.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var M={duration:100,easing:"cubicInOut",additive:!0};h.x=y.x,h.y=y.y,h.animateTo(b,M),m.animateTo(w,M)}else h.attr(b),m.attr(w);this._firstShowIndicator=!1;var S=this._shapes.handleLabels;if(S)for(var C=0;Ca[1]&&(h[1]=1/0),i&&(h[0]===-1/0?this._showIndicator(c,h[1],"< ",l):h[1]===1/0?this._showIndicator(c,h[0],"> ",l):this._showIndicator(c,c,"\u2248 ",l));var p=this._hoverLinkDataIndices,d=[];(i||aw(r))&&(d=this._hoverLinkDataIndices=r.findTargetDataIndices(h));var f=function(g,y){var v={},m={};return _(g||[],v),_(y||[],m,v),[x(v),x(m)];function _(b,w,M){for(var S=0,C=b.length;S=0&&(o.dimension=a,i.push(o))}}),n.getData().setVisual("visualMeta",i)}}];function xD(n,t,e,i){for(var r=t.targetVisuals[i],o=pt.prepareVisualTypes(r),a={color:Om(n.getData(),"color")},s=0,l=o.length;s0:t.splitNumber>0)&&!t.calculable?"piecewise":"continuous"}),n.registerAction(vD,mD),D(_D,function(t){n.registerVisual(n.PRIORITY.VISUAL.COMPONENT,t)}),n.registerPreprocessor(bD))}function wD(n){n.registerComponentModel(fD),n.registerComponentView(yD),cw(n)}var SD=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e._pieceList=[],e}return F(t,n),t.prototype.optionUpdated=function(e,i){n.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var r=this._mode=this._determineMode();this._pieceList=[],MD[this._mode].call(this,this._pieceList),this._resetSelected(e,i);var o=this.option.categories;this.resetVisual(function(a,s){r==="categories"?(a.mappingMethod="category",a.categories=ae(o)):(a.dataExtent=this.getExtent(),a.mappingMethod="piecewise",a.pieceList=j(this._pieceList,function(l){return l=ae(l),s!=="inRange"&&(l.visual=null),l}))})},t.prototype.completeVisualOption=function(){var e=this.option,i={},r=pt.listVisualTypes(),o=this.isCategory();function a(s,l,u){return s&&s[l]&&s[l].hasOwnProperty(u)}D(e.pieces,function(s){D(r,function(l){s.hasOwnProperty(l)&&(i[l]=1)})}),D(i,function(s,l){var u=!1;D(this.stateList,function(c){u=u||a(e,c,l)||a(e.target,c,l)},this),!u&&D(this.stateList,function(c){(e[c]||(e[c]={}))[l]=Kb(l,c==="inRange"?"active":"inactive",o)})},this),n.prototype.completeVisualOption.apply(this,arguments)},t.prototype._resetSelected=function(e,i){var r=this.option,o=this._pieceList,a=(i?r:e).selected||{};if(r.selected=a,D(o,function(l,u){var c=this.getSelectedMapKey(l);a.hasOwnProperty(c)||(a[c]=!0)},this),r.selectedMode==="single"){var s=!1;D(o,function(l,u){var c=this.getSelectedMapKey(l);a[c]&&(s?a[c]=!1:s=!0)},this)}},t.prototype.getItemSymbol=function(){return this.get("itemSymbol")},t.prototype.getSelectedMapKey=function(e){return this._mode==="categories"?e.value+"":e.index+""},t.prototype.getPieceList=function(){return this._pieceList},t.prototype._determineMode=function(){var e=this.option;return e.pieces&&e.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},t.prototype.setSelected=function(e){this.option.selected=ae(e)},t.prototype.getValueState=function(e){var i=pt.findPieceIndex(e,this._pieceList);return i!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[i])]?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(e){var i=[],r=this._pieceList;return this.eachTargetSeries(function(o){var a=[],s=o.getData();s.each(this.getDataDimensionIndex(s),function(l,u){pt.findPieceIndex(l,r)===e&&a.push(u)},this),i.push({seriesId:o.id,dataIndex:a})},this),i},t.prototype.getRepresentValue=function(e){var i;if(this.isCategory())i=e.value;else if(e.value!=null)i=e.value;else{var r=e.interval||[];i=r[0]===-1/0&&r[1]===1/0?0:(r[0]+r[1])/2}return i},t.prototype.getVisualMeta=function(e){if(!this.isCategory()){var i=[],r=["",""],o=this,a=this._pieceList.slice();if(a.length){var s=a[0].interval[0];s!==-1/0&&a.unshift({interval:[-1/0,s]}),(s=a[a.length-1].interval[1])!==1/0&&a.push({interval:[s,1/0]})}else a.push({interval:[-1/0,1/0]});var l=-1/0;return D(a,function(c){var h=c.interval;h&&(h[0]>l&&u([l,h[0]],"outOfRange"),u(h.slice()),l=h[1])},this),{stops:i,outerColors:r}}function u(c,h){var p=o.getRepresentValue({interval:c});h||(h=o.getValueState(p));var d=e(p,h);c[0]===-1/0?r[0]=d:c[1]===1/0?r[1]=d:i.push({value:c[0],color:d},{value:c[1],color:d})}},t.type="visualMap.piecewise",t.defaultOption=ta(yu.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}),t}(yu),MD={splitNumber:function(n){var t=this.option,e=Math.min(t.precision,20),i=this.getExtent(),r=t.splitNumber;r=Math.max(parseInt(r,10),1),t.splitNumber=r;for(var o=(i[1]-i[0])/r;+o.toFixed(e)!==o&&e<5;)e++;t.precision=e,o=+o.toFixed(e),t.minOpen&&n.push({interval:[-1/0,i[0]],close:[0,0]});for(var a=0,s=i[0];a","\u2265"][i[0]]];e.text=e.text||this.formatValueText(e.value!=null?e.value:e.interval,!1,r)},this)}};function hw(n,t){var e=n.inverse;(n.orient==="vertical"?!e:e)&&t.reverse()}var TD=function(n){function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=t.type,e}return F(t,n),t.prototype.doRender=function(){var e=this.group;e.removeAll();var i=this.visualMapModel,r=i.get("textGap"),o=i.textStyleModel,a=o.getFont(),s=o.getTextColor(),l=this._getItemAlign(),u=i.itemSize,c=this._getViewData(),h=c.endsText,p=Vn(i.get("showLabel",!0),!h);h&&this._renderEndsText(e,h[0],u,p,l),D(c.viewPieceList,function(d){var f=d.piece,g=new _e;g.onclick=he(this._onItemClick,this,f),this._enableHoverLink(g,d.indexInModelPieceList);var y=i.getRepresentValue(f);if(this._createItemSymbol(g,y,[0,0,u[0],u[1]]),p){var v=this.visualMapModel.getValueState(y);g.add(new Me({style:{x:l==="right"?-r:u[0]+r,y:u[1]/2,text:f.text,verticalAlign:"middle",align:l,font:a,fill:s,opacity:v==="outOfRange"?.5:1}}))}e.add(g)},this),h&&this._renderEndsText(e,h[1],u,p,l),er(i.get("orient"),e,i.get("itemGap")),this.renderBackground(e),this.positionGroup(e)},t.prototype._enableHoverLink=function(e,i){var r=this;e.on("mouseover",function(){return o("highlight")}).on("mouseout",function(){return o("downplay")});var o=function(a){var s=r.visualMapModel;s.option.hoverLink&&r.api.dispatchAction({type:a,batch:vu(s.findTargetDataIndices(i),s)})}},t.prototype._getItemAlign=function(){var e=this.visualMapModel,i=e.option;if(i.orient==="vertical")return iw(e,this.api,e.itemSize);var r=i.align;return r&&r!=="auto"||(r="left"),r},t.prototype._renderEndsText=function(e,i,r,o,a){if(i){var s=new _e,l=this.visualMapModel.textStyleModel;s.add(new Me({style:nt(l,{x:o?a==="right"?r[0]:0:r[0]/2,y:r[1]/2,verticalAlign:"middle",align:o?a:"center",text:i})})),e.add(s)}},t.prototype._getViewData=function(){var e=this.visualMapModel,i=j(e.getPieceList(),function(s,l){return{piece:s,indexInModelPieceList:l}}),r=e.get("text"),o=e.get("orient"),a=e.get("inverse");return(o==="horizontal"?a:!a)?i.reverse():r&&(r=r.slice().reverse()),{viewPieceList:i,endsText:r}},t.prototype._createItemSymbol=function(e,i,r){e.add(_t(this.getControllerVisual(i,"symbol"),r[0],r[1],r[2],r[3],this.getControllerVisual(i,"color")))},t.prototype._onItemClick=function(e){var i=this.visualMapModel,r=i.option,o=r.selectedMode;if(o){var a=ae(r.selected),s=i.getSelectedMapKey(e);o==="single"||o===!0?(a[s]=!0,D(a,function(l,u){a[u]=u===s})):a[s]=!a[s],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:a})}},t.type="visualMap.piecewise",t}(tw);function CD(n){n.registerComponentModel(SD),n.registerComponentView(TD),cw(n)}function ID(n){Lt(wD),Lt(CD)}var AD={label:{enabled:!0},decal:{show:!1}},pw=Ee(),DD={};function kD(n,t){var e=n.getModel("aria");if(e.get("enabled")){var i=ae(AD);de(i.label,n.getLocaleModel().get("aria"),!1),de(e.option,i,!1),function(){if(e.getModel("decal").get("show")){var o=re();n.eachSeries(function(a){if(!a.isColorBySeries()){var s=o.get(a.type);s||(s={},o.set(a.type,s)),pw(a).scope=s}}),n.eachRawSeries(function(a){if(!n.isSeriesFiltered(a))if(ue(a.enableAriaDecal))a.enableAriaDecal();else{var s=a.getData();if(a.isColorBySeries()){var l=bv(a.ecModel,a.name,DD,n.getSeriesCount()),u=s.getVisual("decal");s.setVisual("decal",f(u,l))}else{var c=a.getRawData(),h={},p=pw(a).scope;s.each(function(g){var y=s.getRawIndex(g);h[y]=g});var d=c.count();c.each(function(g){var y=h[g],v=c.getName(g)||g+"",m=bv(a.ecModel,v,p,d),_=s.getItemVisual(y,"decal");s.setItemVisual(y,"decal",f(_,m))})}}function f(g,y){var v=g?H(H({},y),g):y;return v.dirty=!0,v}})}}(),function(){var o=t.getZr().dom;if(o){var a=n.getLocaleModel().get("aria"),s=e.getModel("label");if(s.option=ce(s.option,a),s.get("enabled"))if(s.get("description"))o.setAttribute("aria-label",s.get("description"));else{var l,u=n.getSeriesCount(),c=s.get(["data","maxCount"])||10,h=s.get(["series","maxCount"])||10,p=Math.min(u,h);if(!(u<1)){var d=function(){var m=n.get("title");return m&&m.length&&(m=m[0]),m&&m.text}();l=d?r(s.get(["general","withTitle"]),{title:d}):s.get(["general","withoutTitle"]);var f=[];l+=r(u>1?s.get(["series","multiple","prefix"]):s.get(["series","single","prefix"]),{seriesCount:u}),n.eachSeries(function(m,_){if(_1?s.get(["series","multiple",b]):s.get(["series","single",b]),{seriesId:m.seriesIndex,seriesName:m.get("name"),seriesType:(L=m.subType,O=n.getLocaleModel().get(["series","typeNames"]),O[L]||O.chart)});var w=m.getData();w.count()>c?x+=r(s.get(["data","partialData"]),{displayCnt:c}):x+=s.get(["data","allData"]);for(var M=s.get(["data","separator","middle"]),S=s.get(["data","separator","end"]),C=[],I=0;I=l)}}for(var p=this.__startIndex;p15)break}L.prevElClipPaths&&m.restore()};if(_)if(_.length===0)y=v.__endIndex;else for(var I=d.dpr,T=0;T<_.length;++T){var A=_[T];m.save(),m.beginPath(),m.rect(A.x*I,A.y*I,A.width*I,A.height*I),m.clip(),C(A),m.restore()}else m.save(),C(),m.restore();v.__drawIndex=y,v.__drawIndex0&&t>r[0]){for(l=0;lt);l++);s=i[r[l]]}if(r.splice(l+1,0,t),i[t]=e,!e.virtual)if(s){var u=s.dom;u.nextSibling?a.insertBefore(e.dom,u.nextSibling):a.appendChild(e.dom)}else a.firstChild?a.insertBefore(e.dom,a.firstChild):a.appendChild(e.dom);e.painter||(e.painter=this)}},n.prototype.eachLayer=function(t,e){for(var i=this._zlevelList,r=0;r0?mu:0),this._needsManuallyCompositing),c.__builtin__||qa("ZLevel "+u+" has been used by unkown layer "+c.id),c!==a&&(c.__used=!0,c.__startIndex!==o&&(c.__dirty=!0),c.__startIndex=o,c.incremental?c.__drawIndex=-1:c.__drawIndex=o,e(o),a=c),1&l.__dirty&&!l.__inHover&&(c.__dirty=!0,c.incremental&&c.__drawIndex<0&&(c.__drawIndex=o))}e(o),this.eachBuiltinLayer(function(h,p){!h.__used&&h.getElementCount()>0&&(h.__dirty=!0,h.__startIndex=h.__endIndex=h.__drawIndex=0),h.__dirty&&h.__drawIndex<0&&(h.__drawIndex=h.__startIndex)})},n.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},n.prototype._clearLayer=function(t){t.clear()},n.prototype.setBackgroundColor=function(t){this._backgroundColor=t,D(this._layers,function(e){e.setUnpainted()})},n.prototype.configLayer=function(t,e){if(e){var i=this._layerConfig;i[t]?de(i[t],e,!0):i[t]=e;for(var r=0;r