import{v as qu,l as $_,g as Ce,A as Hg,d as q_,o as K_,c as Nt,K as ml,L as _l,a as Q,F as Vr,r as Gr,e as $t,w as qt,b as Oe,q as Ka,h as Hr,B as Q_,i as Tt,t as wt,m as Nc,x as Ei,k as zc,n as J_,E as j_,u as t1,_ as e1}from"./index-BEhBl6RD.js";import{a as r1,e as i1,b as n1,h as a1,i as o1,t as s1}from"./index-iQrvdwZD.js";import l1 from"./CloudConfig-Bbw_X5Ij.js";import u1 from"./SystemConfig-CHHWFz_3.js";import f1 from"./SaveRecords-iqWhrjeP.js";import"./index-DZ_Kha3d.js";import"./index-Bn7NwETH.js";import"./CloudBadge-BHmVik7q.js";/*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */var Ku=function(r,t){return Ku=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,i){e.__proto__=i}||function(e,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])},Ku(r,t)};function F(r,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Ku(r,t);function e(){this.constructor=r}r.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}var h1=function(){function r(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return r}(),c1=function(){function r(){this.browser=new h1,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"}return r}(),et=new c1;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(et.wxa=!0,et.touchEventsSupported=!0):typeof document>"u"&&typeof self<"u"?et.worker=!0:!et.hasGlobalWindow||"Deno"in window||typeof navigator<"u"&&typeof navigator.userAgent=="string"&&navigator.userAgent.indexOf("Node.js")>-1?(et.node=!0,et.svgSupported=!0):v1(navigator.userAgent,et);function v1(r,t){var e=t.browser,i=r.match(/Firefox\/([\d.]+)/),n=r.match(/MSIE\s([\d.]+)/)||r.match(/Trident\/.+?rv:(([\d.]+))/),a=r.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(r);i&&(e.firefox=!0,e.version=i[1]),n&&(e.ie=!0,e.version=n[1]),a&&(e.edge=!0,e.version=a[1],e.newEdge=+a[1].split(".")[0]>18),o&&(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);var s=t.domSupported=typeof document<"u";if(s){var l=document.documentElement.style;t.transform3dSupported=(e.ie&&"transition"in l||e.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in l)&&!("OTransition"in l),t.transformSupported=t.transform3dSupported||e.ie&&+e.version>=9}}var gh=12,d1="sans-serif",Rr=gh+"px "+d1,p1=20,g1=100,y1="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function m1(r){var t={};if(typeof JSON>"u")return t;for(var e=0;e=0)s=o*e.length;else for(var l=0;l>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",i[l]+":0",n[u]+":0",i[1-l]+":auto",n[1-u]+":auto",""].join("!important;"),r.appendChild(o),e.push(o)}return t.clearMarkers=function(){T(e,function(f){f.parentNode&&f.parentNode.removeChild(f)})},e}function W1(r,t,e){for(var i=e?"invTrans":"trans",n=t[i],a=t.srcCoords,o=[],s=[],l=!0,u=0;u<4;u++){var f=r[u].getBoundingClientRect(),h=2*u,c=f.left,v=f.top;o.push(c,v),l=l&&a&&c===a[h]&&v===a[h+1],s.push(r[u].offsetLeft,r[u].offsetTop)}return l&&n?n:(t.srcCoords=o,t[i]=e?Hc(s,o):Hc(o,s))}function Kg(r){return r.nodeName.toUpperCase()==="CANVAS"}var U1=/([&<>"'])/g,Y1={"&":"&","<":"<",">":">",'"':""","'":"'"};function Qt(r){return r==null?"":(r+"").replace(U1,function(t,e){return Y1[e]})}var X1=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,wl=[],Z1=et.browser.firefox&&+et.browser.version.split(".")[0]<39;function rf(r,t,e,i){return e=e||{},i?Wc(r,t,e):Z1&&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):Wc(r,t,e),e}function Wc(r,t,e){if(et.domSupported&&r.getBoundingClientRect){var i=t.clientX,n=t.clientY;if(Kg(r)){var a=r.getBoundingClientRect();e.zrX=i-a.left,e.zrY=n-a.top;return}else if(ef(wl,r,i,n)){e.zrX=wl[0],e.zrY=wl[1];return}}e.zrX=e.zrY=0}function xh(r){return r||window.event}function ce(r,t,e){if(t=xh(t),t.zrX!=null)return t;var i=t.type,n=i&&i.indexOf("touch")>=0;if(n){var o=i!=="touchend"?t.targetTouches[0]:t.changedTouches[0];o&&rf(r,o,t,e)}else{rf(r,t,t,e);var a=$1(t);t.zrDelta=a?a/120:-(t.detail||0)/3}var s=t.button;return t.which==null&&s!==void 0&&X1.test(t.type)&&(t.which=s&1?1:s&2?3:s&4?2:0),t}function $1(r){var t=r.wheelDelta;if(t)return t;var e=r.deltaX,i=r.deltaY;if(e==null||i==null)return t;var n=Math.abs(i!==0?i:e),a=i>0?-1:i<0?1:e>0?-1:1;return 3*n*a}function q1(r,t,e,i){r.addEventListener(t,e,i)}function K1(r,t,e,i){r.removeEventListener(t,e,i)}var fs=function(r){r.preventDefault(),r.stopPropagation(),r.cancelBubble=!0},Q1=function(){function r(){this._track=[]}return r.prototype.recognize=function(t,e,i){return this._doTrack(t,e,i),this._recognize(t)},r.prototype.clear=function(){return this._track.length=0,this},r.prototype._doTrack=function(t,e,i){var n=t.touches;if(n){for(var a={points:[],touches:[],target:e,event:t},o=0,s=n.length;o1&&i&&i.length>1){var a=Uc(i)/Uc(n);!isFinite(a)&&(a=1),t.pinchScale=a;var o=J1(i);return t.pinchX=o[0],t.pinchY=o[1],{type:"pinch",target:r[0].target,event:t}}}}};function ur(){return[1,0,0,1,0,0]}function Th(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=1,r[4]=0,r[5]=0,r}function Qg(r,t){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r[4]=t[4],r[5]=t[5],r}function ra(r,t,e){var i=t[0]*e[0]+t[2]*e[1],n=t[1]*e[0]+t[3]*e[1],a=t[0]*e[2]+t[2]*e[3],o=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 r[0]=i,r[1]=n,r[2]=a,r[3]=o,r[4]=s,r[5]=l,r}function nf(r,t,e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r[4]=t[4]+e[0],r[5]=t[5]+e[1],r}function Ch(r,t,e,i){i===void 0&&(i=[0,0]);var n=t[0],a=t[2],o=t[4],s=t[1],l=t[3],u=t[5],f=Math.sin(e),h=Math.cos(e);return r[0]=n*h+s*f,r[1]=-n*f+s*h,r[2]=a*h+l*f,r[3]=-a*f+h*l,r[4]=h*(o-i[0])+f*(u-i[1])+i[0],r[5]=h*(u-i[1])-f*(o-i[0])+i[1],r}function j1(r,t,e){var i=e[0],n=e[1];return r[0]=t[0]*i,r[1]=t[1]*n,r[2]=t[2]*i,r[3]=t[3]*n,r[4]=t[4]*i,r[5]=t[5]*n,r}function Na(r,t){var e=t[0],i=t[2],n=t[4],a=t[1],o=t[3],s=t[5],l=e*o-a*i;return l?(l=1/l,r[0]=o*l,r[1]=-a*l,r[2]=-i*l,r[3]=e*l,r[4]=(i*s-o*n)*l,r[5]=(a*n-e*s)*l,r):null}var dt=function(){function r(t,e){this.x=t||0,this.y=e||0}return r.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},r.prototype.clone=function(){return new r(this.x,this.y)},r.prototype.set=function(t,e){return this.x=t,this.y=e,this},r.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},r.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},r.prototype.scale=function(t){this.x*=t,this.y*=t},r.prototype.scaleAndAdd=function(t,e){this.x+=t.x*e,this.y+=t.y*e},r.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},r.prototype.dot=function(t){return this.x*t.x+this.y*t.y},r.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},r.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},r.prototype.normalize=function(){var t=this.len();return this.x/=t,this.y/=t,this},r.prototype.distance=function(t){var e=this.x-t.x,i=this.y-t.y;return Math.sqrt(e*e+i*i)},r.prototype.distanceSquare=function(t){var e=this.x-t.x,i=this.y-t.y;return e*e+i*i},r.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},r.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}},r.prototype.toArray=function(t){return t[0]=this.x,t[1]=this.y,t},r.prototype.fromArray=function(t){this.x=t[0],this.y=t[1]},r.set=function(t,e,i){t.x=e,t.y=i},r.copy=function(t,e){t.x=e.x,t.y=e.y},r.len=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},r.lenSquare=function(t){return t.x*t.x+t.y*t.y},r.dot=function(t,e){return t.x*e.x+t.y*e.y},r.add=function(t,e,i){t.x=e.x+i.x,t.y=e.y+i.y},r.sub=function(t,e,i){t.x=e.x-i.x,t.y=e.y-i.y},r.scale=function(t,e,i){t.x=e.x*i,t.y=e.y*i},r.scaleAndAdd=function(t,e,i,n){t.x=e.x+i.x*n,t.y=e.y+i.y*n},r.lerp=function(t,e,i,n){var a=1-n;t.x=a*e.x+n*i.x,t.y=a*e.y+n*i.y},r}(),pi=Math.min,an=Math.max,af=Math.abs,Yc=["x","y"],tS=["width","height"],Wr=new dt,Ur=new dt,Yr=new dt,Xr=new dt,ae=Jg(),Zn=ae.minTv,of=ae.maxTv,ia=[0,0],it=function(){function r(t,e,i,n){r.set(this,t,e,i,n)}return r.set=function(t,e,i,n,a){return n<0&&(e=e+n,n=-n),a<0&&(i=i+a,a=-a),t.x=e,t.y=i,t.width=n,t.height=a,t},r.prototype.union=function(t){var e=pi(t.x,this.x),i=pi(t.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=an(t.x+t.width,this.x+this.width)-e:this.width=t.width,isFinite(this.y)&&isFinite(this.height)?this.height=an(t.y+t.height,this.y+this.height)-i:this.height=t.height,this.x=e,this.y=i},r.prototype.applyTransform=function(t){r.applyTransform(this,this,t)},r.prototype.calculateTransform=function(t){var e=this,i=t.width/e.width,n=t.height/e.height,a=ur();return nf(a,a,[-e.x,-e.y]),j1(a,a,[i,n]),nf(a,a,[t.x,t.y]),a},r.prototype.intersect=function(t,e,i){return r.intersect(this,t,e,i)},r.intersect=function(t,e,i,n){i&&dt.set(i,0,0);var a=n&&n.outIntersectRect||null,o=n&&n.clamp;if(a&&(a.x=a.y=a.width=a.height=NaN),!t||!e)return!1;t instanceof r||(t=r.set(eS,t.x,t.y,t.width,t.height)),e instanceof r||(e=r.set(rS,e.x,e.y,e.width,e.height));var s=!!i;ae.reset(n,s);var l=ae.touchThreshold,u=t.x+l,f=t.x+t.width-l,h=t.y+l,c=t.y+t.height-l,v=e.x+l,d=e.x+e.width-l,g=e.y+l,y=e.y+e.height-l;if(u>f||h>c||v>d||g>y)return!1;var p=!(f=t.x&&e<=t.x+t.width&&i>=t.y&&i<=t.y+t.height},r.prototype.contain=function(t,e){return r.contain(this,t,e)},r.prototype.clone=function(){return new r(this.x,this.y,this.width,this.height)},r.prototype.copy=function(t){r.copy(this,t)},r.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},r.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},r.prototype.isZero=function(){return this.width===0||this.height===0},r.create=function(t){return new r(t.x,t.y,t.width,t.height)},r.copy=function(t,e){return t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height,t},r.applyTransform=function(t,e,i){if(!i){t!==e&&r.copy(t,e);return}if(i[1]<1e-5&&i[1]>-1e-5&&i[2]<1e-5&&i[2]>-1e-5){var n=i[0],a=i[3],o=i[4],s=i[5];t.x=e.x*n+o,t.y=e.y*a+s,t.width=e.width*n,t.height=e.height*a,t.width<0&&(t.x+=t.width,t.width=-t.width),t.height<0&&(t.y+=t.height,t.height=-t.height);return}Wr.x=Yr.x=e.x,Wr.y=Xr.y=e.y,Ur.x=Xr.x=e.x+e.width,Ur.y=Yr.y=e.y+e.height,Wr.transform(i),Xr.transform(i),Ur.transform(i),Yr.transform(i),t.x=pi(Wr.x,Ur.x,Yr.x,Xr.x),t.y=pi(Wr.y,Ur.y,Yr.y,Xr.y);var l=an(Wr.x,Ur.x,Yr.x,Xr.x),u=an(Wr.y,Ur.y,Yr.y,Xr.y);t.width=l-t.x,t.height=u-t.y},r}(),eS=new it(0,0,0,0),rS=new it(0,0,0,0);function Xc(r,t,e,i,n,a,o,s){var l=af(t-e),u=af(i-r),f=pi(l,u),h=Yc[n],c=Yc[1-n],v=tS[n];t=u||!ae.bidirectional)&&(Zn[h]=-u,Zn[c]=0,ae.useDir&&ae.calcDirMTV())))}function Jg(){var r=0,t=new dt,e=new dt,i={minTv:new dt,maxTv:new dt,useDir:!1,dirMinTv:new dt,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(a,o){i.touchThreshold=0,a&&a.touchThreshold!=null&&(i.touchThreshold=an(0,a.touchThreshold)),i.negativeSize=!1,o&&(i.minTv.set(1/0,1/0),i.maxTv.set(0,0),i.useDir=!1,a&&a.direction!=null&&(i.useDir=!0,i.dirMinTv.copy(i.minTv),e.copy(i.minTv),r=a.direction,i.bidirectional=a.bidirectional==null||!!a.bidirectional,i.bidirectional||t.set(Math.cos(r),Math.sin(r))))},calcDirMTV:function(){var a=i.minTv,o=i.dirMinTv,s=a.y*a.y+a.x*a.x,l=Math.sin(r),u=Math.cos(r),f=l*a.y+u*a.x;if(n(f)){n(a.x)&&n(a.y)&&o.set(0,0);return}if(e.x=s*u/f,e.y=s*l/f,n(e.x)&&n(e.y)){o.set(0,0);return}(i.bidirectional||t.dot(e)>0)&&e.len()=0;h--){var c=a[h];c!==n&&!c.ignore&&!c.ignoreCoarsePointer&&(!c.parent||!c.parent.ignoreCoarsePointer)&&(Tl.copy(c.getBoundingRect()),c.transform&&Tl.applyTransform(c.transform),Tl.intersect(f)&&s.push(c))}if(s.length)for(var v=4,d=Math.PI/12,g=Math.PI*2,y=0;y4)return;this._downPoint=null}this.dispatchToElement(a,r,t)}});function sS(r,t,e){if(r[r.rectHover?"rectContain":"contain"](t,e)){for(var i=r,n=void 0,a=!1;i;){if(i.ignoreClip&&(a=!0),!a){var o=i.getClipPath();if(o&&!o.contain(t,e))return!1}i.silent&&(n=!0);var s=i.__hostTarget;i=s?i.ignoreHostSilent?null:s:i.parent}return n?jg:!0}return!1}function Zc(r,t,e,i,n){for(var a=r.length-1;a>=0;a--){var o=r[a],s=void 0;if(o!==n&&!o.ignore&&(s=sS(o,e,i))&&(!t.topTarget&&(t.topTarget=o),s!==jg)){t.target=o;break}}}function ey(r,t,e){var i=r.painter;return t<0||t>i.getWidth()||e<0||e>i.getHeight()}var ry=32,An=7;function lS(r){for(var t=0;r>=ry;)t|=r&1,r>>=1;return r+t}function $c(r,t,e,i){var n=t+1;if(n===e)return 1;if(i(r[n++],r[t])<0){for(;n=0;)n++;return n-t}function uS(r,t,e){for(e--;t>>1,n(a,r[l])<0?s=l:o=l+1;var u=i-o;switch(u){case 3:r[o+3]=r[o+2];case 2:r[o+2]=r[o+1];case 1:r[o+1]=r[o];break;default:for(;u>0;)r[o+u]=r[o+u-1],u--}r[o]=a}}function Cl(r,t,e,i,n,a){var o=0,s=0,l=1;if(a(r,t[e+n])>0){for(s=i-n;l0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=n,l+=n}else{for(s=n+1;ls&&(l=s);var u=o;o=n-l,l=n-u}for(o++;o>>1);a(r,t[e+f])>0?o=f+1:l=f}return l}function Ml(r,t,e,i,n,a){var o=0,s=0,l=1;if(a(r,t[e+n])<0){for(s=n+1;ls&&(l=s);var u=o;o=n-l,l=n-u}else{for(s=i-n;l=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=n,l+=n}for(o++;o>>1);a(r,t[e+f])<0?l=f:o=f+1}return l}function fS(r,t){var e=An,i,n,a=0,o=[];i=[],n=[];function s(v,d){i[a]=v,n[a]=d,a+=1}function l(){for(;a>1;){var v=a-2;if(v>=1&&n[v-1]<=n[v]+n[v+1]||v>=2&&n[v-2]<=n[v]+n[v-1])n[v-1]n[v+1])break;f(v)}}function u(){for(;a>1;){var v=a-2;v>0&&n[v-1]=An||x>=An);if(C)break;w<0&&(w=0),w+=2}if(e=w,e<1&&(e=1),d===1){for(p=0;p=0;p--)r[b+p]=r[w+p];r[S]=o[_];return}for(var x=e;;){var C=0,D=0,A=!1;do if(t(o[_],r[m])<0){if(r[S--]=r[m--],C++,D=0,--d===0){A=!0;break}}else if(r[S--]=o[_--],D++,C=0,--y===1){A=!0;break}while((C|D)=0;p--)r[b+p]=r[w+p];if(d===0){A=!0;break}}if(r[S--]=o[_--],--y===1){A=!0;break}if(D=y-Cl(r[m],o,0,y,y-1,t),D!==0){for(S-=D,_-=D,y-=D,b=S+1,w=_+1,p=0;p=An||D>=An);if(A)break;x<0&&(x=0),x+=2}if(e=x,e<1&&(e=1),y===1){for(S-=d,m-=d,b=S+1,w=m+1,p=d-1;p>=0;p--)r[b+p]=r[w+p];r[S]=o[_]}else{if(y===0)throw new Error;for(w=S-(y-1),p=0;ps&&(l=s),qc(r,e,e+l,e+a,t),a=l}o.pushRun(e,a),o.mergeRuns(),n-=a,e+=a}while(n!==0);o.forceMergeRuns()}}var oe=1,$n=2,tn=4,Kc=!1;function Dl(){Kc||(Kc=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function Qc(r,t){return r.zlevel===t.zlevel?r.z===t.z?r.z2-t.z2:r.z-t.z:r.zlevel-t.zlevel}var hS=function(){function r(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=Qc}return r.prototype.traverse=function(t,e){for(var i=0;i=0&&this._roots.splice(n,1)},r.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},r.prototype.getRoots=function(){return this._roots},r.prototype.dispose=function(){this._displayList=null,this._roots=null},r}(),hs;hs=et.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(r){return setTimeout(r,16)};var na={linear:function(r){return r},quadraticIn:function(r){return r*r},quadraticOut:function(r){return r*(2-r)},quadraticInOut:function(r){return(r*=2)<1?.5*r*r:-.5*(--r*(r-2)-1)},cubicIn:function(r){return r*r*r},cubicOut:function(r){return--r*r*r+1},cubicInOut:function(r){return(r*=2)<1?.5*r*r*r:.5*((r-=2)*r*r+2)},quarticIn:function(r){return r*r*r*r},quarticOut:function(r){return 1- --r*r*r*r},quarticInOut:function(r){return(r*=2)<1?.5*r*r*r*r:-.5*((r-=2)*r*r*r-2)},quinticIn:function(r){return r*r*r*r*r},quinticOut:function(r){return--r*r*r*r*r+1},quinticInOut:function(r){return(r*=2)<1?.5*r*r*r*r*r:.5*((r-=2)*r*r*r*r+2)},sinusoidalIn:function(r){return 1-Math.cos(r*Math.PI/2)},sinusoidalOut:function(r){return Math.sin(r*Math.PI/2)},sinusoidalInOut:function(r){return .5*(1-Math.cos(Math.PI*r))},exponentialIn:function(r){return r===0?0:Math.pow(1024,r-1)},exponentialOut:function(r){return r===1?1:1-Math.pow(2,-10*r)},exponentialInOut:function(r){return r===0?0:r===1?1:(r*=2)<1?.5*Math.pow(1024,r-1):.5*(-Math.pow(2,-10*(r-1))+2)},circularIn:function(r){return 1-Math.sqrt(1-r*r)},circularOut:function(r){return Math.sqrt(1- --r*r)},circularInOut:function(r){return(r*=2)<1?-.5*(Math.sqrt(1-r*r)-1):.5*(Math.sqrt(1-(r-=2)*r)+1)},elasticIn:function(r){var t,e=.1,i=.4;return r===0?0:r===1?1:(!e||e<1?(e=1,t=i/4):t=i*Math.asin(1/e)/(2*Math.PI),-(e*Math.pow(2,10*(r-=1))*Math.sin((r-t)*(2*Math.PI)/i)))},elasticOut:function(r){var t,e=.1,i=.4;return r===0?0:r===1?1:(!e||e<1?(e=1,t=i/4):t=i*Math.asin(1/e)/(2*Math.PI),e*Math.pow(2,-10*r)*Math.sin((r-t)*(2*Math.PI)/i)+1)},elasticInOut:function(r){var t,e=.1,i=.4;return r===0?0:r===1?1:(!e||e<1?(e=1,t=i/4):t=i*Math.asin(1/e)/(2*Math.PI),(r*=2)<1?-.5*(e*Math.pow(2,10*(r-=1))*Math.sin((r-t)*(2*Math.PI)/i)):e*Math.pow(2,-10*(r-=1))*Math.sin((r-t)*(2*Math.PI)/i)*.5+1)},backIn:function(r){var t=1.70158;return r*r*((t+1)*r-t)},backOut:function(r){var t=1.70158;return--r*r*((t+1)*r+t)+1},backInOut:function(r){var t=2.5949095;return(r*=2)<1?.5*(r*r*((t+1)*r-t)):.5*((r-=2)*r*((t+1)*r+t)+2)},bounceIn:function(r){return 1-na.bounceOut(1-r)},bounceOut:function(r){return r<1/2.75?7.5625*r*r:r<2/2.75?7.5625*(r-=1.5/2.75)*r+.75:r<2.5/2.75?7.5625*(r-=2.25/2.75)*r+.9375:7.5625*(r-=2.625/2.75)*r+.984375},bounceInOut:function(r){return r<.5?na.bounceIn(r*2)*.5:na.bounceOut(r*2-1)*.5+.5}},Ja=Math.pow,Lr=Math.sqrt,cs=1e-8,iy=1e-4,Jc=Lr(3),ja=1/3,Ge=wn(),pe=wn(),hn=wn();function Mr(r){return r>-cs&&rcs||r<-cs}function zt(r,t,e,i,n){var a=1-n;return a*a*(a*r+3*n*t)+n*n*(n*i+3*a*e)}function jc(r,t,e,i,n){var a=1-n;return 3*(((t-r)*a+2*(e-t)*n)*a+(i-e)*n*n)}function vs(r,t,e,i,n,a){var o=i+3*(t-e)-r,s=3*(e-t*2+r),l=3*(t-r),u=r-n,f=s*s-3*o*l,h=s*l-9*o*u,c=l*l-3*s*u,v=0;if(Mr(f)&&Mr(h))if(Mr(s))a[0]=0;else{var d=-l/s;d>=0&&d<=1&&(a[v++]=d)}else{var g=h*h-4*f*c;if(Mr(g)){var y=h/f,d=-s/o+y,p=-y/2;d>=0&&d<=1&&(a[v++]=d),p>=0&&p<=1&&(a[v++]=p)}else if(g>0){var m=Lr(g),_=f*s+1.5*o*(-h+m),S=f*s+1.5*o*(-h-m);_<0?_=-Ja(-_,ja):_=Ja(_,ja),S<0?S=-Ja(-S,ja):S=Ja(S,ja);var d=(-s-(_+S))/(3*o);d>=0&&d<=1&&(a[v++]=d)}else{var w=(2*f*s-3*o*h)/(2*Lr(f*f*f)),b=Math.acos(w)/3,x=Lr(f),C=Math.cos(b),d=(-s-2*x*C)/(3*o),p=(-s+x*(C+Jc*Math.sin(b)))/(3*o),D=(-s+x*(C-Jc*Math.sin(b)))/(3*o);d>=0&&d<=1&&(a[v++]=d),p>=0&&p<=1&&(a[v++]=p),D>=0&&D<=1&&(a[v++]=D)}}return v}function ay(r,t,e,i,n){var a=6*e-12*t+6*r,o=9*t+3*i-3*r-9*e,s=3*t-3*r,l=0;if(Mr(o)){if(ny(a)){var u=-s/a;u>=0&&u<=1&&(n[l++]=u)}}else{var f=a*a-4*o*s;if(Mr(f))n[0]=-a/(2*o);else if(f>0){var h=Lr(f),u=(-a+h)/(2*o),c=(-a-h)/(2*o);u>=0&&u<=1&&(n[l++]=u),c>=0&&c<=1&&(n[l++]=c)}}return l}function ds(r,t,e,i,n,a){var o=(t-r)*n+r,s=(e-t)*n+t,l=(i-e)*n+e,u=(s-o)*n+o,f=(l-s)*n+s,h=(f-u)*n+u;a[0]=r,a[1]=o,a[2]=u,a[3]=h,a[4]=h,a[5]=f,a[6]=l,a[7]=i}function cS(r,t,e,i,n,a,o,s,l,u,f){var h,c=.005,v=1/0,d,g,y,p;Ge[0]=l,Ge[1]=u;for(var m=0;m<1;m+=.05)pe[0]=zt(r,e,n,o,m),pe[1]=zt(t,i,a,s,m),y=fn(Ge,pe),y=0&&y=0&&u<=1&&(n[l++]=u)}}else{var f=o*o-4*a*s;if(Mr(f)){var u=-o/(2*a);u>=0&&u<=1&&(n[l++]=u)}else if(f>0){var h=Lr(f),u=(-o+h)/(2*a),c=(-o-h)/(2*a);u>=0&&u<=1&&(n[l++]=u),c>=0&&c<=1&&(n[l++]=c)}}return l}function oy(r,t,e){var i=r+e-2*t;return i===0?.5:(r-t)/i}function ps(r,t,e,i,n){var a=(t-r)*i+r,o=(e-t)*i+t,s=(o-a)*i+a;n[0]=r,n[1]=a,n[2]=s,n[3]=s,n[4]=o,n[5]=e}function pS(r,t,e,i,n,a,o,s,l){var u,f=.005,h=1/0;Ge[0]=o,Ge[1]=s;for(var c=0;c<1;c+=.05){pe[0]=Jt(r,e,n,c),pe[1]=Jt(t,i,a,c);var v=fn(Ge,pe);v=0&&v=1?1:vs(0,i,a,1,l,s)&&zt(0,n,o,1,s[0])}}}var mS=function(){function r(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||ee,this.ondestroy=t.ondestroy||ee,this.onrestart=t.onrestart||ee,t.easing&&this.setEasing(t.easing)}return r.prototype.step=function(t,e){if(this._inited||(this._startTime=t+this._delay,this._inited=!0),this._paused){this._pausedTime+=e;return}var i=this._life,n=t-this._startTime-this._pausedTime,a=n/i;a<0&&(a=0),a=Math.min(a,1);var o=this.easingFunc,s=o?o(a):a;if(this.onframe(s),a===1)if(this.loop){var l=n%i;this._startTime=t-l,this._pausedTime=0,this.onrestart()}else return!0;return!1},r.prototype.pause=function(){this._paused=!0},r.prototype.resume=function(){this._paused=!1},r.prototype.setEasing=function(t){this.easing=t,this.easingFunc=tt(t)?t:na[t]||sy(t)},r}(),ly=function(){function r(t){this.value=t}return r}(),_S=function(){function r(){this._len=0}return r.prototype.insert=function(t){var e=new ly(t);return this.insertEntry(e),e},r.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++},r.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--},r.prototype.len=function(){return this._len},r.prototype.clear=function(){this.head=this.tail=null,this._len=0},r}(),dn=function(){function r(t){this._list=new _S,this._maxSize=10,this._map={},this._maxSize=t}return r.prototype.put=function(t,e){var i=this._list,n=this._map,a=null;if(n[t]==null){var o=i.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var l=i.head;i.remove(l),delete n[l.key],a=l.value,this._lastRemovedEntry=l}s?s.value=e:s=new ly(e),s.key=t,i.insertEntry(s),n[t]=s}return a},r.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},r.prototype.clear=function(){this._list.clear(),this._map={}},r.prototype.len=function(){return this._list.len()},r}(),ev={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 Ir(r){return r=Math.round(r),r<0?0:r>255?255:r}function sf(r){return r<0?0:r>1?1:r}function Al(r){var t=r;return t.length&&t.charAt(t.length-1)==="%"?Ir(parseFloat(t)/100*255):Ir(parseInt(t,10))}function _i(r){var t=r;return t.length&&t.charAt(t.length-1)==="%"?sf(parseFloat(t)/100):sf(parseFloat(t))}function Ll(r,t,e){return e<0?e+=1:e>1&&(e-=1),e*6<1?r+(t-r)*e*6:e*2<1?t:e*3<2?r+(t-r)*(2/3-e)*6:r}function to(r,t,e){return r+(t-r)*e}function he(r,t,e,i,n){return r[0]=t,r[1]=e,r[2]=i,r[3]=n,r}function lf(r,t){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r}var uy=new dn(20),eo=null;function Bi(r,t){eo&&lf(eo,t),eo=uy.put(r,eo||t.slice())}function Xe(r,t){if(r){t=t||[];var e=uy.get(r);if(e)return lf(t,e);r=r+"";var i=r.replace(/ /g,"").toLowerCase();if(i in ev)return lf(t,ev[i]),Bi(r,t),t;var n=i.length;if(i.charAt(0)==="#"){if(n===4||n===5){var a=parseInt(i.slice(1,4),16);if(!(a>=0&&a<=4095)){he(t,0,0,0,1);return}return he(t,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,n===5?parseInt(i.slice(4),16)/15:1),Bi(r,t),t}else if(n===7||n===9){var a=parseInt(i.slice(1,7),16);if(!(a>=0&&a<=16777215)){he(t,0,0,0,1);return}return he(t,(a&16711680)>>16,(a&65280)>>8,a&255,n===9?parseInt(i.slice(7),16)/255:1),Bi(r,t),t}return}var o=i.indexOf("("),s=i.indexOf(")");if(o!==-1&&s+1===n){var l=i.substr(0,o),u=i.substr(o+1,s-(o+1)).split(","),f=1;switch(l){case"rgba":if(u.length!==4)return u.length===3?he(t,+u[0],+u[1],+u[2],1):he(t,0,0,0,1);f=_i(u.pop());case"rgb":if(u.length>=3)return he(t,Al(u[0]),Al(u[1]),Al(u[2]),u.length===3?f:_i(u[3])),Bi(r,t),t;he(t,0,0,0,1);return;case"hsla":if(u.length!==4){he(t,0,0,0,1);return}return u[3]=_i(u[3]),uf(u,t),Bi(r,t),t;case"hsl":if(u.length!==3){he(t,0,0,0,1);return}return uf(u,t),Bi(r,t),t;default:return}}he(t,0,0,0,1)}}function uf(r,t){var e=(parseFloat(r[0])%360+360)%360/360,i=_i(r[1]),n=_i(r[2]),a=n<=.5?n*(i+1):n+i-n*i,o=n*2-a;return t=t||[],he(t,Ir(Ll(o,a,e+1/3)*255),Ir(Ll(o,a,e)*255),Ir(Ll(o,a,e-1/3)*255),1),r.length===4&&(t[3]=r[3]),t}function SS(r){if(r){var t=r[0]/255,e=r[1]/255,i=r[2]/255,n=Math.min(t,e,i),a=Math.max(t,e,i),o=a-n,s=(a+n)/2,l,u;if(o===0)l=0,u=0;else{s<.5?u=o/(a+n):u=o/(2-a-n);var f=((a-t)/6+o/2)/o,h=((a-e)/6+o/2)/o,c=((a-i)/6+o/2)/o;t===a?l=c-h:e===a?l=1/3+f-c:i===a&&(l=2/3+h-f),l<0&&(l+=1),l>1&&(l-=1)}var v=[l*360,u,s];return r[3]!=null&&v.push(r[3]),v}}function rv(r,t){var e=Xe(r);if(e){for(var i=0;i<3;i++)e[i]=e[i]*(1-t)|0,e[i]>255?e[i]=255:e[i]<0&&(e[i]=0);return za(e,e.length===4?"rgba":"rgb")}}function bS(r,t,e){if(!(!(t&&t.length)||!(r>=0&&r<=1))){var i=r*(t.length-1),n=Math.floor(i),a=Math.ceil(i),o=Xe(t[n]),s=Xe(t[a]),l=i-n,u=za([Ir(to(o[0],s[0],l)),Ir(to(o[1],s[1],l)),Ir(to(o[2],s[2],l)),sf(to(o[3],s[3],l))],"rgba");return e?{color:u,leftIndex:n,rightIndex:a,value:i}:u}}function ff(r,t,e,i){var n=Xe(r);if(r)return n=SS(n),e!=null&&(n[1]=_i(tt(e)?e(n[1]):e)),i!=null&&(n[2]=_i(tt(i)?i(n[2]):i)),za(uf(n),"rgba")}function za(r,t){if(!(!r||!r.length)){var e=r[0]+","+r[1]+","+r[2];return(t==="rgba"||t==="hsva"||t==="hsla")&&(e+=","+r[3]),t+"("+e+")"}}function gs(r,t){var e=Xe(r);return e?(.299*e[0]+.587*e[1]+.114*e[2])*e[3]/255+(1-e[3])*t:0}var iv=new dn(100);function nv(r){if(Y(r)){var t=iv.get(r);return t||(t=rv(r,-.1),iv.put(r,t)),t}else if(Zs(r)){var e=z({},r);return e.colorStops=Z(r.colorStops,function(i){return{offset:i.offset,color:rv(i.color,-.1)}}),e}return r}function wS(r){return r.type==="linear"}function xS(r){return r.type==="radial"}(function(){return et.hasGlobalWindow&&tt(window.btoa)?function(r){return window.btoa(unescape(encodeURIComponent(r)))}:typeof Buffer<"u"?function(r){return Buffer.from(r).toString("base64")}:function(r){return null}})();var hf=Array.prototype.slice;function ar(r,t,e){return(t-r)*e+r}function Il(r,t,e,i){for(var n=t.length,a=0;ai?t:r,a=Math.min(e,i),o=n[a-1]||{color:[0,0,0,0],offset:0},s=a;so;if(s)i.length=o;else for(var l=a;l=1},r.prototype.getAdditiveTrack=function(){return this._additiveTrack},r.prototype.addKeyframe=function(t,e,i){this._needsSort=!0;var n=this.keyframes,a=n.length,o=!1,s=ov,l=e;if(re(e)){var u=DS(e);s=u,(u===1&&!pt(e[0])||u===2&&!pt(e[0][0]))&&(o=!0)}else if(pt(e)&&!pa(e))s=io;else if(Y(e))if(!isNaN(+e))s=io;else{var f=Xe(e);f&&(l=f,s=qn)}else if(Zs(e)){var h=z({},l);h.colorStops=Z(e.colorStops,function(v){return{offset:v.offset,color:Xe(v.color)}}),wS(e)?s=cf:xS(e)&&(s=vf),l=h}a===0?this.valType=s:(s!==this.valType||s===ov)&&(o=!0),this.discrete=this.discrete||o;var c={time:t,value:l,rawValue:e,percent:0};return i&&(c.easing=i,c.easingFunc=tt(i)?i:na[i]||sy(i)),n.push(c),c},r.prototype.prepare=function(t,e){var i=this.keyframes;this._needsSort&&i.sort(function(g,y){return g.time-y.time});for(var n=this.valType,a=i.length,o=i[a-1],s=this.discrete,l=no(n),u=sv(n),f=0;f=0&&!(o[f].percent<=e);f--);f=c(f,s-2)}else{for(f=h;fe);f++);f=c(f-1,s-2)}d=o[f+1],v=o[f]}if(v&&d){this._lastFr=f,this._lastFrP=e;var y=d.percent-v.percent,p=y===0?1:c((e-v.percent)/y,1);d.easingFunc&&(p=d.easingFunc(p));var m=i?this._additiveValue:u?Ln:t[l];if((no(a)||u)&&!m&&(m=this._additiveValue=[]),this.discrete)t[l]=p<1?v.rawValue:d.rawValue;else if(no(a))a===Qo?Il(m,v[n],d[n],p):TS(m,v[n],d[n],p);else if(sv(a)){var _=v[n],S=d[n],w=a===cf;t[l]={type:w?"linear":"radial",x:ar(_.x,S.x,p),y:ar(_.y,S.y,p),colorStops:Z(_.colorStops,function(x,C){var D=S.colorStops[C];return{offset:ar(x.offset,D.offset,p),color:Ko(Il([],x.color,D.color,p))}}),global:S.global},w?(t[l].x2=ar(_.x2,S.x2,p),t[l].y2=ar(_.y2,S.y2,p)):t[l].r=ar(_.r,S.r,p)}else if(u)Il(m,v[n],d[n],p),i||(t[l]=Ko(m));else{var b=ar(v[n],d[n],p);i?this._additiveValue=b:t[l]=b}i&&this._addToTarget(t)}}},r.prototype._addToTarget=function(t){var e=this.valType,i=this.propName,n=this._additiveValue;e===io?t[i]=t[i]+n:e===qn?(Xe(t[i],Ln),ro(Ln,Ln,n,1),t[i]=Ko(Ln)):e===Qo?ro(t[i],t[i],n,1):e===fy&&av(t[i],t[i],n,1)},r}(),Mh=function(){function r(t,e,i,n){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=t,this._loop=e,e&&n){_h("Can' use additive animation on looped animation.");return}this._additiveAnimators=n,this._allowDiscrete=i}return r.prototype.getMaxTime=function(){return this._maxTime},r.prototype.getDelay=function(){return this._delay},r.prototype.getLoop=function(){return this._loop},r.prototype.getTarget=function(){return this._target},r.prototype.changeTarget=function(t){this._target=t},r.prototype.when=function(t,e,i){return this.whenWithKeys(t,e,xt(e),i)},r.prototype.whenWithKeys=function(t,e,i,n){for(var a=this._tracks,o=0;o0&&l.addKeyframe(0,qo(u),n),this._trackKeys.push(s)}l.addKeyframe(t,qo(e[s]),n)}return this._maxTime=Math.max(this._maxTime,t),this},r.prototype.pause=function(){this._clip.pause(),this._paused=!0},r.prototype.resume=function(){this._clip.resume(),this._paused=!1},r.prototype.isPaused=function(){return!!this._paused},r.prototype.duration=function(t){return this._maxTime=t,this._force=!0,this},r.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=[],n=this._maxTime||0,a=0;a1){var s=o.pop();a.addKeyframe(s.time,t[n]),a.prepare(this._maxTime,a.getAdditiveTrack())}}}},r}();function on(){return new Date().getTime()}var LS=function(r){F(t,r);function t(e){var i=r.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 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,n=e.next;i?i.next=n:this._head=n,n?n.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=on()-this._pausedTime,n=i-this._time,a=this._head;a;){var o=a.next,s=a.step(i,n);s&&(a.ondestroy(),this.removeClip(a)),a=o}this._time=i,e||(this.trigger("frame",n),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0;function i(){e._running&&(hs(i),!e._paused&&e.update())}hs(i)},t.prototype.start=function(){this._running||(this._time=on(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||(this._pauseStart=on(),this._paused=!0)},t.prototype.resume=function(){this._paused&&(this._pausedTime+=on()-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 n=new Mh(e,i.loop);return this.addAnimator(n),n},t}(je),IS=300,Pl=et.domSupported,kl=function(){var r=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],t=["touchstart","touchend","touchmove"],e={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},i=Z(r,function(n){var a=n.replace("mouse","pointer");return e.hasOwnProperty(a)?a:n});return{mouse:r,touch:t,pointer:i}}(),lv={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},uv=!1;function df(r){var t=r.pointerType;return t==="pen"||t==="touch"}function PS(r){r.touching=!0,r.touchTimer!=null&&(clearTimeout(r.touchTimer),r.touchTimer=null),r.touchTimer=setTimeout(function(){r.touching=!1,r.touchTimer=null},700)}function Rl(r){r&&(r.zrByTouch=!0)}function kS(r,t){return ce(r.dom,new RS(r,t),!0)}function hy(r,t){for(var e=t,i=!1;e&&e.nodeType!==9&&!(i=e.domBelongToZr||e!==t&&e===r.painterRoot);)e=e.parentNode;return i}var RS=function(){function r(t,e){this.stopPropagation=ee,this.stopImmediatePropagation=ee,this.preventDefault=ee,this.type=e.type,this.target=this.currentTarget=t.dom,this.pointerType=e.pointerType,this.clientX=e.clientX,this.clientY=e.clientY}return r}(),De={mousedown:function(r){r=ce(this.dom,r),this.__mayPointerCapture=[r.zrX,r.zrY],this.trigger("mousedown",r)},mousemove:function(r){r=ce(this.dom,r);var t=this.__mayPointerCapture;t&&(r.zrX!==t[0]||r.zrY!==t[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",r)},mouseup:function(r){r=ce(this.dom,r),this.__togglePointerCapture(!1),this.trigger("mouseup",r)},mouseout:function(r){r=ce(this.dom,r);var t=r.toElement||r.relatedTarget;hy(this,t)||(this.__pointerCapturing&&(r.zrEventControl="no_globalout"),this.trigger("mouseout",r))},wheel:function(r){uv=!0,r=ce(this.dom,r),this.trigger("mousewheel",r)},mousewheel:function(r){uv||(r=ce(this.dom,r),this.trigger("mousewheel",r))},touchstart:function(r){r=ce(this.dom,r),Rl(r),this.__lastTouchMoment=new Date,this.handler.processGesture(r,"start"),De.mousemove.call(this,r),De.mousedown.call(this,r)},touchmove:function(r){r=ce(this.dom,r),Rl(r),this.handler.processGesture(r,"change"),De.mousemove.call(this,r)},touchend:function(r){r=ce(this.dom,r),Rl(r),this.handler.processGesture(r,"end"),De.mouseup.call(this,r),+new Date-+this.__lastTouchMomentcv||r<-cv}var $r=[],Ni=[],Ol=ur(),Bl=Math.abs,Dh=function(){function r(){}return r.prototype.getLocalTransform=function(t){return r.getLocalTransform(this,t)},r.prototype.setPosition=function(t){this.x=t[0],this.y=t[1]},r.prototype.setScale=function(t){this.scaleX=t[0],this.scaleY=t[1]},r.prototype.setSkew=function(t){this.skewX=t[0],this.skewY=t[1]},r.prototype.setOrigin=function(t){this.originX=t[0],this.originY=t[1]},r.prototype.needLocalTransform=function(){return Zr(this.rotation)||Zr(this.x)||Zr(this.y)||Zr(this.scaleX-1)||Zr(this.scaleY-1)||Zr(this.skewX)||Zr(this.skewY)},r.prototype.updateTransform=function(){var t=this.parent&&this.parent.transform,e=this.needLocalTransform(),i=this.transform;if(!(e||t)){i&&(hv(i),this.invTransform=null);return}i=i||ur(),e?this.getLocalTransform(i):hv(i),t&&(e?ra(i,t,i):Qg(i,t)),this.transform=i,this._resolveGlobalScaleRatio(i)},r.prototype._resolveGlobalScaleRatio=function(t){var e=this.globalScaleRatio;if(e!=null&&e!==1){this.getGlobalScale($r);var i=$r[0]<0?-1:1,n=$r[1]<0?-1:1,a=(($r[0]-i)*e+i)/$r[0]||0,o=(($r[1]-n)*e+n)/$r[1]||0;t[0]*=a,t[1]*=a,t[2]*=o,t[3]*=o}this.invTransform=this.invTransform||ur(),Na(this.invTransform,t)},r.prototype.getComputedTransform=function(){for(var t=this,e=[];t;)e.push(t),t=t.parent;for(;t=e.pop();)t.updateTransform();return this.transform},r.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],n=Math.atan2(t[1],t[0]),a=Math.PI/2+n-Math.atan2(t[3],t[2]);i=Math.sqrt(i)*Math.cos(a),e=Math.sqrt(e),this.skewX=a,this.skewY=0,this.rotation=-n,this.x=+t[4],this.y=+t[5],this.scaleX=e,this.scaleY=i,this.originX=0,this.originY=0}},r.prototype.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(t.invTransform=t.invTransform||ur(),ra(Ni,t.invTransform,e),e=Ni);var i=this.originX,n=this.originY;(i||n)&&(Ol[4]=i,Ol[5]=n,ra(Ni,e,Ol),Ni[4]-=i,Ni[5]-=n,e=Ni),this.setLocalTransform(e)}},r.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)},r.prototype.transformCoordToLocal=function(t,e){var i=[t,e],n=this.invTransform;return n&&_e(i,i,n),i},r.prototype.transformCoordToGlobal=function(t,e){var i=[t,e],n=this.transform;return n&&_e(i,i,n),i},r.prototype.getLineScale=function(){var t=this.transform;return t&&Bl(t[0]-1)>1e-10&&Bl(t[3]-1)>1e-10?Math.sqrt(Bl(t[0]*t[3]-t[2]*t[1])):1},r.prototype.copyTransform=function(t){_f(this,t)},r.getLocalTransform=function(t,e){e=e||[];var i=t.originX||0,n=t.originY||0,a=t.scaleX,o=t.scaleY,s=t.anchorX,l=t.anchorY,u=t.rotation||0,f=t.x,h=t.y,c=t.skewX?Math.tan(t.skewX):0,v=t.skewY?Math.tan(-t.skewY):0;if(i||n||s||l){var d=i+s,g=n+l;e[4]=-d*a-c*g*o,e[5]=-g*o-v*d*a}else e[4]=e[5]=0;return e[0]=a,e[3]=o,e[1]=v*a,e[2]=c*o,u&&Ch(e,e,u),e[4]+=i+f,e[5]+=n+h,e},r.initDefaultProps=function(){var t=r.prototype;t.scaleX=t.scaleY=t.globalScaleRatio=1,t.x=t.y=t.originX=t.originY=t.skewX=t.skewY=t.rotation=t.anchorX=t.anchorY=0}(),r}(),ya=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function _f(r,t){for(var e=0;e=vv)){r=r||Rr;for(var t=[],e=+new Date,i=0;i<=127;i++)t[i]=fr.measureText(String.fromCharCode(i),r).width;var n=+new Date-e;return n>16?Nl=vv:n>2&&Nl++,t}}var Nl=0,vv=5;function vy(r,t){return r.asciiWidthMapTried||(r.asciiWidthMap=zS(r.font),r.asciiWidthMapTried=!0),0<=t&&t<=127?r.asciiWidthMap!=null?r.asciiWidthMap[t]:r.asciiCharWidth:r.stWideCharWidth}function $e(r,t){var e=r.strWidthCache,i=e.get(t);return i==null&&(i=fr.measureText(t,r.font).width,e.put(t,i)),i}function dv(r,t,e,i){var n=$e(Ze(t),r),a=qs(t),o=pn(0,n,e),s=Si(0,a,i),l=new it(o,s,n,a);return l}function dy(r,t,e,i){var n=((r||"")+"").split(` `),a=n.length;if(a===1)return dv(n[0],t,e,i);for(var o=new it(0,0,0,0),s=0;s=0?parseFloat(r)/100*t:parseFloat(r):r}function ms(r,t,e){var i=t.position||"inside",n=t.distance!=null?t.distance:5,a=e.height,o=e.width,s=a/2,l=e.x,u=e.y,f="left",h="top";if(i instanceof Array)l+=Er(i[0],e.width),u+=Er(i[1],e.height),f=null,h=null;else switch(i){case"left":l-=n,u+=s,f="right",h="middle";break;case"right":l+=n+o,u+=s,h="middle";break;case"top":l+=o/2,u-=n,f="center",h="bottom";break;case"bottom":l+=o/2,u+=a+n,f="center";break;case"inside":l+=o/2,u+=s,f="center",h="middle";break;case"insideLeft":l+=n,u+=s,h="middle";break;case"insideRight":l+=o-n,u+=s,f="right",h="middle";break;case"insideTop":l+=o/2,u+=n,f="center";break;case"insideBottom":l+=o/2,u+=a-n,f="center",h="bottom";break;case"insideTopLeft":l+=n,u+=n;break;case"insideTopRight":l+=o-n,u+=n,f="right";break;case"insideBottomLeft":l+=n,u+=a-n,h="bottom";break;case"insideBottomRight":l+=o-n,u+=a-n,f="right",h="bottom";break}return r=r||{},r.x=l,r.y=u,r.align=f,r.verticalAlign=h,r}var zl="__zr_normal__",Fl=ya.concat(["ignore"]),FS=bn(ya,function(r,t){return r[t]=!0,r},{ignore:!1}),zi={},VS=new it(0,0,0,0),oo=[],Ks=function(){function r(t){this.id=Yg(),this.animators=[],this.currentStates=[],this.states={},this._init(t)}return r.prototype._init=function(t){this.attr(t)},r.prototype.drift=function(t,e,i){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0;break}var n=this.transform;n||(n=this.transform=[1,0,0,1,0,0]),n[4]+=t,n[5]+=e,this.decomposeTransform(),this.markRedraw()},r.prototype.beforeUpdate=function(){},r.prototype.afterUpdate=function(){},r.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},r.prototype.updateInnerText=function(t){var e=this._textContent;if(e&&(!e.ignore||t)){this.textConfig||(this.textConfig={});var i=this.textConfig,n=i.local,a=e.innerTransformable,o=void 0,s=void 0,l=!1;a.parent=n?this:null;var u=!1;a.copyTransform(e);var f=i.position!=null,h=i.autoOverflowArea,c=void 0;if((h||f)&&(c=VS,i.layoutRect?c.copy(i.layoutRect):c.copy(this.getBoundingRect()),n||c.applyTransform(this.transform)),f){this.calculateTextPosition?this.calculateTextPosition(zi,i,c):ms(zi,i,c),a.x=zi.x,a.y=zi.y,o=zi.align,s=zi.verticalAlign;var v=i.origin;if(v&&i.rotation!=null){var d=void 0,g=void 0;v==="center"?(d=c.width*.5,g=c.height*.5):(d=Er(v[0],c.width),g=Er(v[1],c.height)),u=!0,a.originX=-a.x+d+(n?0:c.x),a.originY=-a.y+g+(n?0:c.y)}}i.rotation!=null&&(a.rotation=i.rotation);var y=i.offset;y&&(a.x+=y[0],a.y+=y[1],u||(a.originX=-y[0],a.originY=-y[1]));var p=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={});if(h){var m=p.overflowRect=p.overflowRect||new it(0,0,0,0);a.getLocalTransform(oo),Na(oo,oo),it.copy(m,c),m.applyTransform(oo)}else p.overflowRect=null;var _=i.inside==null?typeof i.position=="string"&&i.position.indexOf("inside")>=0:i.inside,S=void 0,w=void 0,b=void 0;_&&this.canBeInsideText()?(S=i.insideFill,w=i.insideStroke,(S==null||S==="auto")&&(S=this.getInsideTextFill()),(w==null||w==="auto")&&(w=this.getInsideTextStroke(S),b=!0)):(S=i.outsideFill,w=i.outsideStroke,(S==null||S==="auto")&&(S=this.getOutsideFill()),(w==null||w==="auto")&&(w=this.getOutsideStroke(S),b=!0)),S=S||"#000",(S!==p.fill||w!==p.stroke||b!==p.autoStroke||o!==p.align||s!==p.verticalAlign)&&(l=!0,p.fill=S,p.stroke=w,p.autoStroke=b,p.align=o,p.verticalAlign=s,e.setDefaultTextStyle(p)),e.__dirty|=oe,l&&e.dirtyStyle(!0)}},r.prototype.canBeInsideText=function(){return!0},r.prototype.getInsideTextFill=function(){return"#fff"},r.prototype.getInsideTextStroke=function(t){return"#000"},r.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?mf:yf},r.prototype.getOutsideStroke=function(t){var e=this.__zr&&this.__zr.getBackgroundColor(),i=typeof e=="string"&&Xe(e);i||(i=[255,255,255,1]);for(var n=i[3],a=this.__zr.isDarkMode(),o=0;o<3;o++)i[o]=i[o]*n+(a?0:255)*(1-n);return i[3]=1,za(i,"rgba")},r.prototype.traverse=function(t,e){},r.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||{},z(this.extra,e)):this[t]=e},r.prototype.hide=function(){this.ignore=!0,this.markRedraw()},r.prototype.show=function(){this.ignore=!1,this.markRedraw()},r.prototype.attr=function(t,e){if(typeof t=="string")this.attrKV(t,e);else if(q(t))for(var i=t,n=xt(i),a=0;a0},r.prototype.getState=function(t){return this.states[t]},r.prototype.ensureState=function(t){var e=this.states;return e[t]||(e[t]={}),e[t]},r.prototype.clearStates=function(t){this.useState(zl,!1,t)},r.prototype.useState=function(t,e,i,n){var a=t===zl,o=this.hasState();if(!(!o&&a)){var s=this.currentStates,l=this.stateTransition;if(!(ot(s,t)>=0&&(e||s.length===1))){var u;if(this.stateProxy&&!a&&(u=this.stateProxy(t)),u||(u=this.states&&this.states[t]),!u&&!a){_h("State "+t+" not exists.");return}a||this.saveCurrentToNormalState(u);var f=!!(u&&u.hoverLayer||n);f&&this._toggleHoverLayerFlag(!0),this._applyStateObj(t,u,this._normalState,e,!i&&!this.__inHover&&l&&l.duration>0,l);var h=this._textContent,c=this._textGuide;return h&&h.useState(t,e,i,f),c&&c.useState(t,e,i,f),a?(this.currentStates=[],this._normalState={}):e?this.currentStates.push(t):this.currentStates=[t],this._updateAnimationTargets(),this.markRedraw(),!f&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~oe),u}}},r.prototype.useStates=function(t,e,i){if(!t.length)this.clearStates();else{var n=[],a=this.currentStates,o=t.length,s=o===a.length;if(s){for(var l=0;l0,d);var g=this._textContent,y=this._textGuide;g&&g.useStates(t,e,c),y&&y.useStates(t,e,c),this._updateAnimationTargets(),this.currentStates=t.slice(),this.markRedraw(),!c&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~oe)}},r.prototype.isSilent=function(){for(var t=this;t;){if(t.silent)return!0;var e=t.__hostTarget;t=e?t.ignoreHostSilent?null:e:t.parent}return!1},r.prototype._updateAnimationTargets=function(){for(var t=0;t=0){var i=this.currentStates.slice();i.splice(e,1),this.useStates(i)}},r.prototype.replaceState=function(t,e,i){var n=this.currentStates.slice(),a=ot(n,t),o=ot(n,e)>=0;a>=0?o?n.splice(a,1):n[a]=e:i&&!o&&n.push(e),this.useStates(n)},r.prototype.toggleState=function(t,e){e?this.useState(t,!0):this.removeState(t)},r.prototype._mergeStates=function(t){for(var e={},i,n=0;n=0&&a.splice(o,1)}),this.animators.push(t),i&&i.animation.addAnimator(t),i&&i.wakeUp()},r.prototype.updateDuringAnimation=function(t){this.markRedraw()},r.prototype.stopAnimation=function(t,e){for(var i=this.animators,n=i.length,a=[],o=0;o0&&e.during&&a[0].during(function(d,g){e.during(g)});for(var c=0;c0||n.force&&!o.length){var C=void 0,D=void 0,A=void 0;if(s){D={},c&&(C={});for(var S=0;S<_;S++){var p=g[S];D[p]=e[p],c?C[p]=i[p]:e[p]=i[p]}}else if(c){A={};for(var S=0;S<_;S++){var p=g[S];A[p]=qo(e[p]),HS(e,i,p)}}var w=new Mh(e,!1,!1,h?It(d,function(I){return I.targetName===t}):null);w.targetName=t,n.scope&&(w.scope=n.scope),c&&C&&w.whenWithKeys(0,C,g),A&&w.whenWithKeys(0,A,g),w.whenWithKeys(u??500,s?D:i,g).delay(f||0),r.addAnimator(w,t),o.push(w)}}var Mt=function(r){F(t,r);function t(e){var i=r.call(this)||this;return i.isGroup=!0,i._children=[],i.attr(e),i}return 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,n=0;n=0&&(n.splice(a,0,e),this._doAdd(e))}return this},t.prototype.replace=function(e,i){var n=ot(this._children,e);return n>=0&&this.replaceAt(i,n),this},t.prototype.replaceAt=function(e,i){var n=this._children,a=n[i];if(e&&e!==this&&e.parent!==this&&e!==a){n[i]=e,a.parent=null;var o=this.__zr;o&&a.removeSelfFromZr(o),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,n=this._children,a=ot(n,e);return a<0?this:(n.splice(a,1),e.parent=null,i&&e.removeSelfFromZr(i),i&&i.refresh(),this)},t.prototype.removeAll=function(){for(var e=this._children,i=this.__zr,n=0;n0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},r.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},r.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},r.prototype.refreshHover=function(){this._needsRefreshHover=!0},r.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover())},r.prototype.resize=function(t){this._disposed||(t=t||{},this.painter.resize(t.width,t.height),this.handler.resize())},r.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},r.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},r.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},r.prototype.setCursorStyle=function(t){this._disposed||this.handler.setCursorStyle(t)},r.prototype.findHover=function(t,e){if(!this._disposed)return this.handler.findHover(t,e)},r.prototype.on=function(t,e,i){return this._disposed||this.handler.on(t,e,i),this},r.prototype.off=function(t,e){this._disposed||this.handler.off(t,e)},r.prototype.trigger=function(t,e){this._disposed||this.handler.trigger(t,e)},r.prototype.clear=function(){if(!this._disposed){for(var t=this.storage.getRoots(),e=0;e0){if(r<=n)return o;if(r>=a)return s}else{if(r>=n)return o;if(r<=a)return s}else{if(r===n)return o;if(r===a)return s}return(r-n)/l*u+o}var Pt=KS;function KS(r,t,e){switch(r){case"center":case"middle":r="50%";break;case"left":case"top":r="0%";break;case"right":case"bottom":r="100%";break}return Sf(r,t,e)}function Sf(r,t,e){return Y(r)?qS(r).match(/%$/)?parseFloat(r)/100*t+(e||0):parseFloat(r):r==null?NaN:+r}function Ot(r,t,e){return t==null&&(t=10),t=Math.min(Math.max(0,t),yy),r=(+r).toFixed(t),e?r:+r}function Kn(r){return r.sort(function(t,e){return t-e}),r}function Ue(r){if(r=+r,isNaN(r))return 0;if(r>1e-14){for(var t=1,e=0;e<15;e++,t*=10)if(Math.round(r*t)/t===r)return e}return QS(r)}function QS(r){var t=r.toString().toLowerCase(),e=t.indexOf("e"),i=e>0?+t.slice(e+1):0,n=e>0?e:t.length,a=t.indexOf("."),o=a<0?0:n-1-a;return Math.max(0,o-i)}function my(r,t){var e=Math.log,i=Math.LN10,n=Math.floor(e(r[1]-r[0])/i),a=Math.round(e(We(t[1]-t[0]))/i),o=Math.min(Math.max(-n+a,0),20);return isFinite(o)?o:20}function JS(r,t){var e=Math.max(Ue(r),Ue(t)),i=r+t;return e>yy?i:Ot(i,e)}function _y(r){var t=Math.PI*2;return(r%t+t)%t}function _s(r){return r>-gv&&r=10&&t++,t}function Sy(r,t){var e=Ah(r),i=Math.pow(10,e),n=r/i,a;return n<1.5?a=1:n<2.5?a=2:n<4?a=3:n<7?a=5:a=10,r=a*i,e>=-20?+r.toFixed(e<0?-e:0):r}function Ss(r){var t=parseFloat(r);return t==r&&(t!==0||!Y(r)||r.indexOf("x")<=0)?t:NaN}function eb(r){return!isNaN(Ss(r))}function by(){return Math.round(Math.random()*9)}function wy(r,t){return t===0?r:wy(t,r%t)}function yv(r,t){return r==null?t:t==null?r:r*t/wy(r,t)}var rb="[ECharts] ",ib=typeof console<"u"&&console.warn&&console.log;function nb(r,t,e){ib&&console[r](rb+t)}function xy(r,t){nb("error",r)}function jt(r){throw new Error(r)}function mv(r,t,e){return(t-r)*e+r}var Ty="series\0",ab="\0_ec_\0";function Xt(r){return r instanceof Array?r:r==null?[]:[r]}function bf(r,t,e){if(r){r[t]=r[t]||{},r.emphasis=r.emphasis||{},r.emphasis[t]=r.emphasis[t]||{};for(var i=0,n=e.length;i=0||a&&ot(a,l)<0)){var u=i.getShallow(l,t);u!=null&&(o[r[s][0]]=u)}}return o}}var Lb=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],Ib=Sa(Lb),Pb=function(){function r(){}return r.prototype.getAreaStyle=function(t,e){return Ib(this,t,e)},r}(),wf=new dn(50);function kb(r){if(typeof r=="string"){var t=wf.get(r);return t&&t.image}else return r}function Ly(r,t,e,i,n){if(r)if(typeof r=="string"){if(t&&t.__zrImageSrc===r||!e)return t;var a=wf.get(r),o={hostEl:e,cb:i,cbPayload:n};return a?(t=a.image,!Js(t)&&a.pending.push(o)):(t=fr.loadImage(r,Sv,Sv),t.__zrImageSrc=r,wf.put(r,t.__cachedImgObj={image:t,pending:[o]})),t}else return r;else return t}function Sv(){var r=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t=s;u++)l-=s;var f=$e(o,e);return f>l&&(e="",f=0),l=r-f,n.ellipsis=e,n.ellipsisWidth=f,n.contentWidth=l,n.containerWidth=r,n}function Py(r,t,e){var i=e.containerWidth,n=e.contentWidth,a=e.fontMeasureInfo;if(!i){r.textLine="",r.isTruncated=!1;return}var o=$e(a,t);if(o<=i){r.textLine=t,r.isTruncated=!1;return}for(var s=0;;s++){if(o<=n||s>=e.maxIterations){t+=e.ellipsis;break}var l=s===0?Eb(t,n,a):o>0?Math.floor(t.length*n/o):0;t=t.substr(0,l),o=$e(a,t)}t===""&&(t=e.placeholder),r.textLine=t,r.isTruncated=!0}function Eb(r,t,e){for(var i=0,n=0,a=r.length;ny&&v){var _=Math.floor(y/c);d=d||p.length>_,p=p.slice(0,_),m=p.length*c}if(n&&f&&g!=null)for(var S=Iy(g,u,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),w={},b=0;bd&&Ul(a,o.substring(d,y),t,v),Ul(a,g[2],t,v,g[1]),d=Wl.lastIndex}dh){var H=a.lines.length;I>0?(D.tokens=D.tokens.slice(0,I),x(D,M,A),a.lines=a.lines.slice(0,C+1)):a.lines=a.lines.slice(0,C),a.isTruncated=a.isTruncated||a.lines.length0&&d+i.accumWidth>i.width&&(f=t.split(` `),u=!0),i.accumWidth=d}else{var g=ky(t,l,i.width,i.breakAll,i.accumWidth);i.accumWidth=g.accumWidth+v,h=g.linesWidths,f=g.lines}}f||(f=t.split(` `));for(var y=Ze(l),p=0;p=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}var Vb=bn(",&?/;] ".split(""),function(r,t){return r[t]=!0,r},{});function Gb(r){return Fb(r)?!!Vb[r]:!0}function ky(r,t,e,i,n){for(var a=[],o=[],s="",l="",u=0,f=0,h=Ze(t),c=0;ce:n+f+d>e){f?(s||l)&&(g?(s||(s=l,l="",u=0,f=u),a.push(s),o.push(f-u),l+=v,u+=d,s="",f=u):(l&&(s+=l,l="",u=0),a.push(s),o.push(f),s=v,f=d)):g?(a.push(l),o.push(u),l=v,u=d):(a.push(v),o.push(d));continue}f+=d,g?(l+=v,u+=d):(l&&(s+=l,l="",u=0),s+=v)}return l&&(s+=l),s&&(a.push(s),o.push(f)),a.length===1&&(f+=n),{accumWidth:f,lines:a,linesWidths:o}}function wv(r,t,e,i,n,a){if(r.baseX=e,r.baseY=i,r.outerWidth=r.outerHeight=null,!!t){var o=t.width*2,s=t.height*2;it.set(xv,pn(e,o,n),Si(i,s,a),o,s),it.intersect(t,xv,null,Tv);var l=Tv.outIntersectRect;r.outerWidth=l.width,r.outerHeight=l.height,r.baseX=pn(l.x,l.width,n,!0),r.baseY=Si(l.y,l.height,a,!0)}}var xv=new it(0,0,0,0),Tv={outIntersectRect:{},clamp:!0};function kh(r){return r!=null?r+="":r=""}function Hb(r){var t=kh(r.text),e=r.font,i=$e(Ze(e),t),n=qs(e);return xf(r,i,n,null)}function xf(r,t,e,i){var n=new it(pn(r.x||0,t,r.textAlign),Si(r.y||0,e,r.textBaseline),t,e),a=i??(Ry(r)?r.lineWidth:0);return a>0&&(n.x-=a/2,n.y-=a/2,n.width+=a,n.height+=a),n}function Ry(r){var t=r.stroke;return t!=null&&t!=="none"&&r.lineWidth>0}var Tf="__zr_style_"+Math.round(Math.random()*10),bi={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},js={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};bi[Tf]=!0;var Cv=["z","z2","invisible"],Wb=["invisible"],Ga=function(r){F(t,r);function t(e){return r.call(this,e)||this}return t.prototype._init=function(e){for(var i=xt(e),n=0;n1e-4){s[0]=r-e,s[1]=t-i,l[0]=r+e,l[1]=t+i;return}if(so[0]=$l(n)*e+r,so[1]=Zl(n)*i+t,lo[0]=$l(a)*e+r,lo[1]=Zl(a)*i+t,u(s,so,lo),f(l,so,lo),n=n%Kr,n<0&&(n=n+Kr),a=a%Kr,a<0&&(a=a+Kr),n>a&&!o?a+=Kr:nn&&(uo[0]=$l(v)*e+r,uo[1]=Zl(v)*i+t,u(s,uo,s),f(l,uo,l))}var ht={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Qr=[],Jr=[],Be=[],pr=[],Ne=[],ze=[],ql=Math.min,Kl=Math.max,jr=Math.cos,ti=Math.sin,er=Math.abs,Cf=Math.PI,Tr=Cf*2,Ql=typeof Float32Array<"u",In=[];function Jl(r){var t=Math.round(r/Cf*1e8)/1e8;return t%2*Cf}function $b(r,t){var e=Jl(r[0]);e<0&&(e+=Tr);var i=e-r[0],n=r[1];n+=i,!t&&n-e>=Tr?n=e+Tr:t&&e-n>=Tr?n=e-Tr:!t&&e>n?n=e+(Tr-Jl(e-n)):t&&e0&&(this._ux=er(i/ys/t)||0,this._uy=er(i/ys/e)||0)},r.prototype.setDPR=function(t){this.dpr=t},r.prototype.setContext=function(t){this._ctx=t},r.prototype.getContext=function(){return this._ctx},r.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},r.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},r.prototype.moveTo=function(t,e){return this._drawPendingPt(),this.addData(ht.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},r.prototype.lineTo=function(t,e){var i=er(t-this._xi),n=er(e-this._yi),a=i>this._ux||n>this._uy;if(this.addData(ht.L,t,e),this._ctx&&a&&this._ctx.lineTo(t,e),a)this._xi=t,this._yi=e,this._pendingPtDist=0;else{var o=i*i+n*n;o>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=e,this._pendingPtDist=o)}return this},r.prototype.bezierCurveTo=function(t,e,i,n,a,o){return this._drawPendingPt(),this.addData(ht.C,t,e,i,n,a,o),this._ctx&&this._ctx.bezierCurveTo(t,e,i,n,a,o),this._xi=a,this._yi=o,this},r.prototype.quadraticCurveTo=function(t,e,i,n){return this._drawPendingPt(),this.addData(ht.Q,t,e,i,n),this._ctx&&this._ctx.quadraticCurveTo(t,e,i,n),this._xi=i,this._yi=n,this},r.prototype.arc=function(t,e,i,n,a,o){this._drawPendingPt(),In[0]=n,In[1]=a,$b(In,o),n=In[0],a=In[1];var s=a-n;return this.addData(ht.A,t,e,i,i,n,s,0,o?0:1),this._ctx&&this._ctx.arc(t,e,i,n,a,o),this._xi=jr(a)*i+t,this._yi=ti(a)*i+e,this},r.prototype.arcTo=function(t,e,i,n,a){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(t,e,i,n,a),this},r.prototype.rect=function(t,e,i,n){return this._drawPendingPt(),this._ctx&&this._ctx.rect(t,e,i,n),this.addData(ht.R,t,e,i,n),this},r.prototype.closePath=function(){this._drawPendingPt(),this.addData(ht.Z);var t=this._ctx,e=this._x0,i=this._y0;return t&&t.closePath(),this._xi=e,this._yi=i,this},r.prototype.fill=function(t){t&&t.fill(),this.toStatic()},r.prototype.stroke=function(t){t&&t.stroke(),this.toStatic()},r.prototype.len=function(){return this._len},r.prototype.setData=function(t){if(this._saveData){var e=t.length;!(this.data&&this.data.length===e)&&Ql&&(this.data=new Float32Array(e));for(var i=0;i0&&o))for(var s=0;sf.length&&(this._expandData(),f=this.data);for(var h=0;h0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},r.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var t=[],e=0;e11&&(this.data=new Float32Array(t)))}},r.prototype.getBoundingRect=function(){Be[0]=Be[1]=Ne[0]=Ne[1]=Number.MAX_VALUE,pr[0]=pr[1]=ze[0]=ze[1]=-Number.MAX_VALUE;var t=this.data,e=0,i=0,n=0,a=0,o;for(o=0;oi||er(_)>n||c===e-1)&&(g=Math.sqrt(m*m+_*_),a=y,o=p);break}case ht.C:{var S=t[c++],w=t[c++],y=t[c++],p=t[c++],b=t[c++],x=t[c++];g=vS(a,o,S,w,y,p,b,x,10),a=b,o=x;break}case ht.Q:{var S=t[c++],w=t[c++],y=t[c++],p=t[c++];g=gS(a,o,S,w,y,p,10),a=y,o=p;break}case ht.A:var C=t[c++],D=t[c++],A=t[c++],M=t[c++],I=t[c++],L=t[c++],P=L+I;c+=1,d&&(s=jr(I)*A+C,l=ti(I)*M+D),g=Kl(A,M)*ql(Tr,Math.abs(L)),a=jr(P)*A+C,o=ti(P)*M+D;break;case ht.R:{s=a=t[c++],l=o=t[c++];var k=t[c++],B=t[c++];g=k*2+B*2;break}case ht.Z:{var m=s-a,_=l-o;g=Math.sqrt(m*m+_*_),a=s,o=l;break}}g>=0&&(u[h++]=g,f+=g)}return this._pathLen=f,f},r.prototype.rebuildPath=function(t,e){var i=this.data,n=this._ux,a=this._uy,o=this._len,s,l,u,f,h,c,v=e<1,d,g,y=0,p=0,m,_=0,S,w;if(!(v&&(this._pathSegLen||this._calculateLength(),d=this._pathSegLen,g=this._pathLen,m=e*g,!m)))t:for(var b=0;b0&&(t.lineTo(S,w),_=0),x){case ht.M:s=u=i[b++],l=f=i[b++],t.moveTo(u,f);break;case ht.L:{h=i[b++],c=i[b++];var D=er(h-u),A=er(c-f);if(D>n||A>a){if(v){var M=d[p++];if(y+M>m){var I=(m-y)/M;t.lineTo(u*(1-I)+h*I,f*(1-I)+c*I);break t}y+=M}t.lineTo(h,c),u=h,f=c,_=0}else{var L=D*D+A*A;L>_&&(S=h,w=c,_=L)}break}case ht.C:{var P=i[b++],k=i[b++],B=i[b++],U=i[b++],O=i[b++],H=i[b++];if(v){var M=d[p++];if(y+M>m){var I=(m-y)/M;ds(u,P,B,O,I,Qr),ds(f,k,U,H,I,Jr),t.bezierCurveTo(Qr[1],Jr[1],Qr[2],Jr[2],Qr[3],Jr[3]);break t}y+=M}t.bezierCurveTo(P,k,B,U,O,H),u=O,f=H;break}case ht.Q:{var P=i[b++],k=i[b++],B=i[b++],U=i[b++];if(v){var M=d[p++];if(y+M>m){var I=(m-y)/M;ps(u,P,B,I,Qr),ps(f,k,U,I,Jr),t.quadraticCurveTo(Qr[1],Jr[1],Qr[2],Jr[2]);break t}y+=M}t.quadraticCurveTo(P,k,B,U),u=B,f=U;break}case ht.A:var R=i[b++],E=i[b++],N=i[b++],X=i[b++],J=i[b++],yt=i[b++],Bt=i[b++],ue=!i[b++],xe=N>X?N:X,K=er(N-X)>.001,ut=J+yt,j=!1;if(v){var M=d[p++];y+M>m&&(ut=J+yt*(m-y)/M,j=!0),y+=M}if(K&&t.ellipse?t.ellipse(R,E,N,X,Bt,J,ut,ue):t.arc(R,E,xe,J,ut,ue),j)break t;C&&(s=jr(J)*N+R,l=ti(J)*X+E),u=jr(ut)*N+R,f=ti(ut)*X+E;break;case ht.R:s=u=i[b],l=f=i[b+1],h=i[b++],c=i[b++];var st=i[b++],Fr=i[b++];if(v){var M=d[p++];if(y+M>m){var Wt=m-y;t.moveTo(h,c),t.lineTo(h+ql(Wt,st),c),Wt-=st,Wt>0&&t.lineTo(h+st,c+ql(Wt,Fr)),Wt-=Fr,Wt>0&&t.lineTo(h+Kl(st-Wt,0),c+Fr),Wt-=st,Wt>0&&t.lineTo(h,c+Kl(Fr-Wt,0));break t}y+=M}t.rect(h,c,st,Fr);break;case ht.Z:if(v){var M=d[p++];if(y+M>m){var I=(m-y)/M;t.lineTo(u*(1-I)+s*I,f*(1-I)+l*I);break t}y+=M}t.closePath(),u=s,f=l}}},r.prototype.clone=function(){var t=new r,e=this.data;return t.data=e.slice?e.slice():Array.prototype.slice.call(e),t._len=this._len,t},r.prototype.canSave=function(){return!!this._saveData},r.CMD=ht,r.initDefaultProps=function(){var t=r.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0}(),r}();function Fi(r,t,e,i,n,a,o){if(n===0)return!1;var s=n,l=0,u=r;if(o>t+s&&o>i+s||or+s&&a>e+s||at+h&&f>i+h&&f>a+h&&f>s+h||fr+h&&u>e+h&&u>n+h&&u>o+h||ut+u&&l>i+u&&l>a+u||lr+u&&s>e+u&&s>n+u||se||f+un&&(n+=Pn);var c=Math.atan2(l,s);return c<0&&(c+=Pn),c>=i&&c<=n||c+Pn>=i&&c+Pn<=n}function ei(r,t,e,i,n,a){if(a>t&&a>i||an?s:0}var gr=Mi.CMD,ri=Math.PI*2,Jb=1e-4;function jb(r,t){return Math.abs(r-t)t&&u>i&&u>a&&u>s||u1&&tw(),v=zt(t,i,a,s,de[0]),c>1&&(d=zt(t,i,a,s,de[1]))),c===2?yt&&s>i&&s>a||s=0&&u<=1){for(var f=0,h=Jt(t,i,a,u),c=0;ce||s<-e)return 0;var l=Math.sqrt(e*e-s*s);Ut[0]=-l,Ut[1]=l;var u=Math.abs(i-n);if(u<1e-4)return 0;if(u>=ri-1e-4){i=0,n=ri;var f=a?1:-1;return o>=Ut[0]+r&&o<=Ut[1]+r?f:0}if(i>n){var h=i;i=n,n=h}i<0&&(i+=ri,n+=ri);for(var c=0,v=0;v<2;v++){var d=Ut[v];if(d+r>o){var g=Math.atan2(s,d),f=a?1:-1;g<0&&(g=ri+g),(g>=i&&g<=n||g+ri>=i&&g+ri<=n)&&(g>Math.PI/2&&g1&&(e||(s+=ei(l,u,f,h,i,n))),y&&(l=a[d],u=a[d+1],f=l,h=u),g){case gr.M:f=a[d++],h=a[d++],l=f,u=h;break;case gr.L:if(e){if(Fi(l,u,a[d],a[d+1],t,i,n))return!0}else s+=ei(l,u,a[d],a[d+1],i,n)||0;l=a[d++],u=a[d++];break;case gr.C:if(e){if(qb(l,u,a[d++],a[d++],a[d++],a[d++],a[d],a[d+1],t,i,n))return!0}else s+=ew(l,u,a[d++],a[d++],a[d++],a[d++],a[d],a[d+1],i,n)||0;l=a[d++],u=a[d++];break;case gr.Q:if(e){if(Kb(l,u,a[d++],a[d++],a[d],a[d+1],t,i,n))return!0}else s+=rw(l,u,a[d++],a[d++],a[d],a[d+1],i,n)||0;l=a[d++],u=a[d++];break;case gr.A:var p=a[d++],m=a[d++],_=a[d++],S=a[d++],w=a[d++],b=a[d++];d+=1;var x=!!(1-a[d++]);c=Math.cos(w)*_+p,v=Math.sin(w)*S+m,y?(f=c,h=v):s+=ei(l,u,c,v,i,n);var C=(i-p)*S/_+p;if(e){if(Qb(p,m,S,w,w+b,x,t,C,n))return!0}else s+=iw(p,m,S,w,w+b,x,C,n);l=Math.cos(w+b)*_+p,u=Math.sin(w+b)*S+m;break;case gr.R:f=l=a[d++],h=u=a[d++];var D=a[d++],A=a[d++];if(c=f+D,v=h+A,e){if(Fi(f,h,c,h,t,i,n)||Fi(c,h,c,v,t,i,n)||Fi(c,v,f,v,t,i,n)||Fi(f,v,f,h,t,i,n))return!0}else s+=ei(c,h,c,v,i,n),s+=ei(f,v,f,h,i,n);break;case gr.Z:if(e){if(Fi(l,u,f,h,t,i,n))return!0}else s+=ei(l,u,f,h,i,n);l=f,u=h;break}}return!e&&!jb(u,h)&&(s+=ei(l,u,f,h,i,n)||0),s!==0}function nw(r,t,e){return Ey(r,0,!1,t,e)}function aw(r,t,e,i){return Ey(r,t,!0,e,i)}var Oy=gt({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},bi),ow={style:gt({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},js.style)},jl=ya.concat(["invisible","culling","z","z2","zlevel","parent"]),vt=function(r){F(t,r);function t(e){return r.call(this,e)||this}return t.prototype.update=function(){var e=this;r.prototype.update.call(this);var i=this.style;if(i.decal){var n=this._decalEl=this._decalEl||new t;n.buildPath===t.prototype.buildPath&&(n.buildPath=function(l){e.buildPath(l,e.shape)}),n.silent=!0;var a=n.style;for(var o in i)a[o]!==i[o]&&(a[o]=i[o]);a.fill=i.fill?i.decal:null,a.decal=null,a.shadowColor=null,i.strokeFirst&&(a.stroke=null);for(var s=0;s.5?yf:i>.2?NS:mf}else if(e)return mf}return yf},t.prototype.getInsideTextStroke=function(e){var i=this.style.fill;if(Y(i)){var n=this.__zr,a=!!(n&&n.isDarkMode()),o=gs(e,0)0))},t.prototype.hasFill=function(){var e=this.style,i=e.fill;return i!=null&&i!=="none"},t.prototype.getBoundingRect=function(){var e=this._rect,i=this.style,n=!e;if(n){var a=!1;this.path||(a=!0,this.createPathProxy());var o=this.path;(a||this.__dirty&tn)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),e=o.getBoundingRect()}if(this._rect=e,this.hasStroke()&&this.path&&this.path.len()>0){var s=this._rectStroke||(this._rectStroke=e.clone());if(this.__dirty||n){s.copy(e);var l=i.strokeNoScale?this.getLineScale():1,u=i.lineWidth;if(!this.hasFill()){var f=this.strokeContainThreshold;u=Math.max(u,f??4)}l>1e-10&&(s.width+=u/l,s.height+=u/l,s.x-=u/l/2,s.y-=u/l/2)}return s}return e},t.prototype.contain=function(e,i){var n=this.transformCoordToLocal(e,i),a=this.getBoundingRect(),o=this.style;if(e=n[0],i=n[1],a.contain(e,i)){var s=this.path;if(this.hasStroke()){var l=o.lineWidth,u=o.strokeNoScale?this.getLineScale():1;if(u>1e-10&&(this.hasFill()||(l=Math.max(l,this.strokeContainThreshold)),aw(s,l/u,e,i)))return!0}if(this.hasFill())return nw(s,e,i)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=tn,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},t.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},t.prototype.animateShape=function(e){return this.animate("shape",e)},t.prototype.updateDuringAnimation=function(e){e==="style"?this.dirtyStyle():e==="shape"?this.dirtyShape():this.markRedraw()},t.prototype.attrKV=function(e,i){e==="shape"?this.setShape(i):r.prototype.attrKV.call(this,e,i)},t.prototype.setShape=function(e,i){var n=this.shape;return n||(n=this.shape={}),typeof e=="string"?n[e]=i:z(n,e),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(this.__dirty&tn)},t.prototype.createStyle=function(e){return $s(Oy,e)},t.prototype._innerSaveToNormal=function(e){r.prototype._innerSaveToNormal.call(this,e);var i=this._normalState;e.shape&&!i.shape&&(i.shape=z({},this.shape))},t.prototype._applyStateObj=function(e,i,n,a,o,s){r.prototype._applyStateObj.call(this,e,i,n,a,o,s);var l=!(i&&a),u;if(i&&i.shape?o?a?u=i.shape:(u=z({},n.shape),z(u,i.shape)):(u=z({},a?this.shape:n.shape),z(u,i.shape)):l&&(u=n.shape),u)if(o){this.shape=z({},this.shape);for(var f={},h=xt(u),c=0;cn&&(h=s+l,s*=n/h,l*=n/h),u+f>n&&(h=u+f,u*=n/h,f*=n/h),l+u>a&&(h=l+u,l*=a/h,u*=a/h),s+f>a&&(h=s+f,s*=a/h,f*=a/h),r.moveTo(e+s,i),r.lineTo(e+n-l,i),l!==0&&r.arc(e+n-l,i+l,l,-Math.PI/2,0),r.lineTo(e+n,i+a-u),u!==0&&r.arc(e+n-u,i+a-u,u,0,Math.PI/2),r.lineTo(e+f,i+a),f!==0&&r.arc(e+f,i+a-f,f,Math.PI/2,Math.PI),r.lineTo(e,i+s),s!==0&&r.arc(e+s,i+s,s,Math.PI,Math.PI*1.5)}var sn=Math.round;function By(r,t,e){if(t){var i=t.x1,n=t.x2,a=t.y1,o=t.y2;r.x1=i,r.x2=n,r.y1=a,r.y2=o;var s=e&&e.lineWidth;return s&&(sn(i*2)===sn(n*2)&&(r.x1=r.x2=gi(i,s,!0)),sn(a*2)===sn(o*2)&&(r.y1=r.y2=gi(a,s,!0))),r}}function Ny(r,t,e){if(t){var i=t.x,n=t.y,a=t.width,o=t.height;r.x=i,r.y=n,r.width=a,r.height=o;var s=e&&e.lineWidth;return s&&(r.x=gi(i,s,!0),r.y=gi(n,s,!0),r.width=Math.max(gi(i+a,s,!1)-r.x,a===0?0:1),r.height=Math.max(gi(n+o,s,!1)-r.y,o===0?0:1)),r}}function gi(r,t,e){if(!t)return r;var i=sn(r*2);return(i+sn(t))%2===0?i/2:(i+(e?1:-1))/2}var cw=function(){function r(){this.x=0,this.y=0,this.width=0,this.height=0}return r}(),vw={},_t=function(r){F(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new cw},t.prototype.buildPath=function(e,i){var n,a,o,s;if(this.subPixelOptimize){var l=Ny(vw,i,this.style);n=l.x,a=l.y,o=l.width,s=l.height,l.r=i.r,i=l}else n=i.x,a=i.y,o=i.width,s=i.height;i.r?hw(e,i):e.rect(n,a,o,s)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t}(vt);_t.prototype.type="rect";var Iv={fill:"#000"},Pv=2,Fe={},dw={style:gt({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},js.style)},Gt=function(r){F(t,r);function t(e){var i=r.call(this)||this;return i.type="text",i._children=[],i._defaultStyle=Iv,i.attr(e),i}return t.prototype.childrenRef=function(){return this._children},t.prototype.update=function(){r.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var e=0;e0,I=0;I=0&&(P=b[L],P.align==="right");)this._placeToken(P,e,C,p,I,"right",_),D-=P.width,I-=P.width,L--;for(M+=(f-(M-y)-(m-I)-D)/2;A<=L;)P=b[A],this._placeToken(P,e,C,p,M+P.width/2,"center",_),M+=P.width,A++;p+=C}},t.prototype._placeToken=function(e,i,n,a,o,s,l){var u=i.rich[e.styleName]||{};u.text=e.text;var f=e.verticalAlign,h=a+n/2;f==="top"?h=a+e.height/2:f==="bottom"&&(h=a+n-e.height/2);var c=!e.isLineHolder&&tu(u);c&&this._renderBackground(u,i,s==="right"?o-e.width:s==="center"?o-e.width/2:o,h-e.height/2,e.width,e.height);var v=!!u.backgroundColor,d=e.textPadding;d&&(o=Nv(o,s,d),h-=e.height/2-d[0]-e.innerHeight/2);var g=this._getOrCreateChild(bs),y=g.createStyle();g.useStyle(y);var p=this._defaultStyle,m=!1,_=0,S=!1,w=Bv("fill"in u?u.fill:"fill"in i?i.fill:(m=!0,p.fill)),b=Ov("stroke"in u?u.stroke:"stroke"in i?i.stroke:!v&&!l&&(!p.autoStroke||m)?(_=Pv,S=!0,p.stroke):null),x=u.textShadowBlur>0||i.textShadowBlur>0;y.text=e.text,y.x=o,y.y=h,x&&(y.shadowBlur=u.textShadowBlur||i.textShadowBlur||0,y.shadowColor=u.textShadowColor||i.textShadowColor||"transparent",y.shadowOffsetX=u.textShadowOffsetX||i.textShadowOffsetX||0,y.shadowOffsetY=u.textShadowOffsetY||i.textShadowOffsetY||0),y.textAlign=s,y.textBaseline="middle",y.font=e.font||Rr,y.opacity=un(u.opacity,i.opacity,1),Rv(y,u),b&&(y.lineWidth=un(u.lineWidth,i.lineWidth,_),y.lineDash=$(u.lineDash,i.lineDash),y.lineDashOffset=i.lineDashOffset||0,y.stroke=b),w&&(y.fill=w),g.setBoundingRect(xf(y,e.contentWidth,e.contentHeight,S?0:null))},t.prototype._renderBackground=function(e,i,n,a,o,s){var l=e.backgroundColor,u=e.borderWidth,f=e.borderColor,h=l&&l.image,c=l&&!h,v=e.borderRadius,d=this,g,y;if(c||e.lineHeight||u&&f){g=this._getOrCreateChild(_t),g.useStyle(g.createStyle()),g.style.fill=null;var p=g.shape;p.x=n,p.y=a,p.width=o,p.height=s,p.r=v,g.dirtyShape()}if(c){var m=g.style;m.fill=l||null,m.fillOpacity=$(e.fillOpacity,1)}else if(h){y=this._getOrCreateChild(vr),y.onload=function(){d.dirtyStyle()};var _=y.style;_.image=l.image,_.x=n,_.y=a,_.width=o,_.height=s}if(u&&f){var m=g.style;m.lineWidth=u,m.stroke=f,m.strokeOpacity=$(e.strokeOpacity,1),m.lineDash=e.borderDash,m.lineDashOffset=e.borderDashOffset||0,g.strokeContainThreshold=0,g.hasFill()&&g.hasStroke()&&(m.strokeFirst=!0,m.lineWidth*=2)}var S=(g||y).style;S.shadowBlur=e.shadowBlur||0,S.shadowColor=e.shadowColor||"transparent",S.shadowOffsetX=e.shadowOffsetX||0,S.shadowOffsetY=e.shadowOffsetY||0,S.opacity=un(e.opacity,i.opacity,1)},t.makeFont=function(e){var i="";return mw(e)&&(i=[e.fontStyle,e.fontWeight,yw(e.fontSize),e.fontFamily||"sans-serif"].join(" ")),i&&He(i)||e.textFont||e.font},t}(Ga),pw={left:!0,right:1,center:1},gw={top:1,bottom:1,middle:1},kv=["fontStyle","fontWeight","fontSize","fontFamily"];function yw(r){return typeof r=="string"&&(r.indexOf("px")!==-1||r.indexOf("rem")!==-1||r.indexOf("em")!==-1)?r:isNaN(+r)?gh+"px":r+"px"}function Rv(r,t){for(var e=0;e=0,a=!1;if(r instanceof vt){var o=zy(r),s=n&&o.selectFill||o.normalFill,l=n&&o.selectStroke||o.normalStroke;if(Vi(s)||Vi(l)){i=i||{};var u=i.style||{};u.fill==="inherit"?(a=!0,i=z({},i),u=z({},u),u.fill=s):!Vi(u.fill)&&Vi(s)?(a=!0,i=z({},i),u=z({},u),u.fill=nv(s)):!Vi(u.stroke)&&Vi(l)&&(a||(i=z({},i),u=z({},u)),u.stroke=nv(l)),i.style=u}}if(i&&i.z2==null){a||(i=z({},i));var f=r.z2EmphasisLift;i.z2=r.z2+(f??bw)}return i}function Dw(r,t,e){if(e&&e.z2==null){e=z({},e);var i=r.z2SelectLift;e.z2=r.z2+(i??ww)}return e}function Aw(r,t,e){var i=ot(r.currentStates,t)>=0,n=r.style.opacity,a=i?null:Cw(r,["opacity"],t,{opacity:1});e=e||{};var o=e.style||{};return o.opacity==null&&(e=z({},e),o=z({opacity:i?n:a.opacity*.1},o),e.style=o),e}function eu(r,t){var e=this.states[r];if(this.style){if(r==="emphasis")return Mw(this,r,t,e);if(r==="blur")return Aw(this,r,e);if(r==="select")return Dw(this,r,e)}return e}function Lw(r){r.stateProxy=eu;var t=r.getTextContent(),e=r.getTextGuideLine();t&&(t.stateProxy=eu),e&&(e.stateProxy=eu)}function Uv(r,t){!Yy(r,t)&&!r.__highByOuter&&dr(r,Fy)}function Yv(r,t){!Yy(r,t)&&!r.__highByOuter&&dr(r,Vy)}function ba(r,t){r.__highByOuter|=1<<(t||0),dr(r,Fy)}function wa(r,t){!(r.__highByOuter&=~(1<<(t||0)))&&dr(r,Vy)}function Hy(r){dr(r,Bh)}function Nh(r){dr(r,Gy)}function Wy(r){dr(r,xw)}function Uy(r){dr(r,Tw)}function Yy(r,t){return r.__highDownSilentOnTouch&&t.zrByTouch}function Xy(r){var t=r.getModel(),e=[],i=[];t.eachComponent(function(n,a){var o=Rh(a),s=n==="series",l=s?r.getViewOfSeriesModel(a):r.getViewOfComponentModel(a);!s&&i.push(l),o.isBlured&&(l.group.traverse(function(u){Gy(u)}),s&&e.push(a)),o.isBlured=!1}),T(i,function(n){n&&n.toggleBlurSeries&&n.toggleBlurSeries(e,!1,t)})}function Df(r,t,e,i){var n=i.getModel();e=e||"coordinateSystem";function a(u,f){for(var h=0;h0){var s={dataIndex:o,seriesIndex:e.seriesIndex};a!=null&&(s.dataType=a),t.push(s)}})}),t}function Ts(r,t,e){Zy(r,!0),dr(r,Lw),Bw(r,t,e)}function Ow(r){Zy(r,!1)}function xa(r,t,e,i){i?Ow(r):Ts(r,t,e)}function Bw(r,t,e){var i=ft(r);t!=null?(i.focus=t,i.blurScope=e):i.focus&&(i.focus=null)}var Zv=["emphasis","blur","select"],Nw={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function Lf(r,t,e,i){e=e||"itemStyle";for(var n=0;n1&&(o*=ru(d),s*=ru(d));var g=(n===a?-1:1)*ru((o*o*(s*s)-o*o*(v*v)-s*s*(c*c))/(o*o*(v*v)+s*s*(c*c)))||0,y=g*o*v/s,p=g*-s*c/o,m=(r+e)/2+co(h)*y-ho(h)*p,_=(t+i)/2+ho(h)*y+co(h)*p,S=Qv([1,0],[(c-y)/o,(v-p)/s]),w=[(c-y)/o,(v-p)/s],b=[(-1*c-y)/o,(-1*v-p)/s],x=Qv(w,b);if(kf(w,b)<=-1&&(x=kn),kf(w,b)>=1&&(x=0),x<0){var C=Math.round(x/kn*1e6)/1e6;x=kn*2+C%2*kn}f.addData(u,m,_,o,s,S,x,h,a)}var Ww=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,Uw=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function Yw(r){var t=new Mi;if(!r)return t;var e=0,i=0,n=e,a=i,o,s=Mi.CMD,l=r.match(Ww);if(!l)return t;for(var u=0;uP*P+k*k&&(C=A,D=M),{cx:C,cy:D,x0:-f,y0:-h,x1:C*(n/w-1),y1:D*(n/w-1)}}function jw(r){var t;if(V(r)){var e=r.length;if(!e)return r;e===1?t=[r[0],r[0],0,0]:e===2?t=[r[0],r[0],r[1],r[1]]:e===3?t=r.concat(r[2]):t=r}else t=[r,r,r,r];return t}function tx(r,t){var e,i=Qn(t.r,0),n=Qn(t.r0||0,0),a=i>0,o=n>0;if(!(!a&&!o)){if(a||(i=n,n=0),n>i){var s=i;i=n,n=s}var l=t.startAngle,u=t.endAngle;if(!(isNaN(l)||isNaN(u))){var f=t.cx,h=t.cy,c=!!t.clockwise,v=jv(u-l),d=v>iu&&v%iu;if(d>Me&&(v=d),!(i>Me))r.moveTo(f,h);else if(v>iu-Me)r.moveTo(f+i*Hi(l),h+i*ii(l)),r.arc(f,h,i,l,u,!c),n>Me&&(r.moveTo(f+n*Hi(u),h+n*ii(u)),r.arc(f,h,n,u,l,c));else{var g=void 0,y=void 0,p=void 0,m=void 0,_=void 0,S=void 0,w=void 0,b=void 0,x=void 0,C=void 0,D=void 0,A=void 0,M=void 0,I=void 0,L=void 0,P=void 0,k=i*Hi(l),B=i*ii(l),U=n*Hi(u),O=n*ii(u),H=v>Me;if(H){var R=t.cornerRadius;R&&(e=jw(R),g=e[0],y=e[1],p=e[2],m=e[3]);var E=jv(i-n)/2;if(_=Ve(E,p),S=Ve(E,m),w=Ve(E,g),b=Ve(E,y),D=x=Qn(_,S),A=C=Qn(w,b),(x>Me||C>Me)&&(M=i*Hi(u),I=i*ii(u),L=n*Hi(l),P=n*ii(l),vMe){var K=Ve(p,D),ut=Ve(m,D),j=vo(L,P,k,B,i,K,c),st=vo(M,I,U,O,i,ut,c);r.moveTo(f+j.cx+j.x0,h+j.cy+j.y0),D0&&r.arc(f+j.cx,h+j.cy,K,Ft(j.y0,j.x0),Ft(j.y1,j.x1),!c),r.arc(f,h,i,Ft(j.cy+j.y1,j.cx+j.x1),Ft(st.cy+st.y1,st.cx+st.x1),!c),ut>0&&r.arc(f+st.cx,h+st.cy,ut,Ft(st.y1,st.x1),Ft(st.y0,st.x0),!c))}else r.moveTo(f+k,h+B),r.arc(f,h,i,l,u,!c);if(!(n>Me)||!H)r.lineTo(f+U,h+O);else if(A>Me){var K=Ve(g,A),ut=Ve(y,A),j=vo(U,O,M,I,n,-ut,c),st=vo(k,B,L,P,n,-K,c);r.lineTo(f+j.cx+j.x0,h+j.cy+j.y0),A0&&r.arc(f+j.cx,h+j.cy,ut,Ft(j.y0,j.x0),Ft(j.y1,j.x1),!c),r.arc(f,h,n,Ft(j.cy+j.y1,j.cx+j.x1),Ft(st.cy+st.y1,st.cx+st.x1),c),K>0&&r.arc(f+st.cx,h+st.cy,K,Ft(st.y1,st.x1),Ft(st.y0,st.x0),!c))}else r.lineTo(f+U,h+O),r.arc(f,h,n,u,l,c)}r.closePath()}}}var ex=function(){function r(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0,this.cornerRadius=0}return r}(),Pi=function(r){F(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new ex},t.prototype.buildPath=function(e,i){tx(e,i)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t}(vt);Pi.prototype.type="sector";var rx=function(){function r(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return r}(),nl=function(r){F(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new rx},t.prototype.buildPath=function(e,i){var n=i.cx,a=i.cy,o=Math.PI*2;e.moveTo(n+i.r,a),e.arc(n,a,i.r,0,o,!1),e.moveTo(n+i.r0,a),e.arc(n,a,i.r0,0,o,!0)},t}(vt);nl.prototype.type="ring";function ix(r,t,e,i){var n=[],a=[],o=[],s=[],l,u,f,h;if(i){f=[1/0,1/0],h=[-1/0,-1/0];for(var c=0,v=r.length;c=2){if(i){var a=ix(n,i,e,t.smoothConstraint);r.moveTo(n[0][0],n[0][1]);for(var o=n.length,s=0;s<(e?o:o-1);s++){var l=a[s*2],u=a[s*2+1],f=n[(s+1)%o];r.bezierCurveTo(l[0],l[1],u[0],u[1],f[0],f[1])}}else{r.moveTo(n[0][0],n[0][1]);for(var s=1,h=n.length;sai[1]){if(a=!1,Rt.negativeSize||i)return a;var l=po(ai[0]-ni[1]),u=po(ni[0]-ai[1]);nu(l,u)>yo.len()&&(l=u||!Rt.bidirectional)&&(dt.scale(go,s,-u*n),Rt.useDir&&Rt.calcDirMTV()))}}return a},r.prototype._getProjMinMaxOnAxis=function(t,e,i){for(var n=this._axes[t],a=this._origin,o=e[0].dot(n)+a[t],s=o,l=o,u=1;u0){var h=f.duration,c=f.delay,v=f.easing,d={duration:h,delay:c||0,easing:v,done:a,force:!!a||!!o,setToFinal:!u,scope:r,during:o};s?t.animateFrom(e,d):t.animateTo(e,d)}else t.stopAnimation(),!s&&t.attr(e),o&&o(1),a&&a()}function Zt(r,t,e,i,n,a){Vh("update",r,t,e,i,n,a)}function Pe(r,t,e,i,n,a){Vh("enter",r,t,e,i,n,a)}function sa(r){if(!r.__zr)return!0;for(var t=0;tWe(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"}function rd(r){return!r.isGroup}function yx(r){return r.shape!=null}function hm(r,t,e){if(!r||!t)return;function i(o){var s={};return o.traverse(function(l){rd(l)&&l.anid&&(s[l.anid]=l)}),s}function n(o){var s={x:o.x,y:o.y,rotation:o.rotation};return yx(o)&&(s.shape=at(o.shape)),s}var a=i(r);t.traverse(function(o){if(rd(o)&&o.anid){var s=a[o.anid];if(s){var l=n(o);o.attr(n(s)),Zt(o,l,e,ft(o).dataIndex)}}})}function cm(r,t){return Z(r,function(e){var i=e[0];i=se(i,t.x),i=ma(i,t.x+t.width);var n=e[1];return n=se(n,t.y),n=ma(n,t.y+t.height),[i,n]})}function vm(r,t){var e=se(r.x,t.x),i=ma(r.x+r.width,t.x+t.width),n=se(r.y,t.y),a=ma(r.y+r.height,t.y+t.height);if(i>=e&&a>=n)return{x:e,y:n,width:i-e,height:a-n}}function ol(r,t,e){var i=z({rectHover:!0},t),n=i.style={strokeNoScale:!0};if(e=e||{x:-1,y:-1,width:2,height:2},r)return r.indexOf("image://")===0?(n.image=r.slice(8),gt(n,e),new vr(i)):al(r.replace("path://",""),i,e,"center")}function mx(r,t,e,i,n){for(var a=0,o=n[n.length-1];a1)return!1;var y=au(v,d,f,h)/c;return!(y<0||y>1)}function au(r,t,e,i){return r*i-e*t}function _x(r){return r<=1e-6&&r>=-1e-6}function Ms(r,t,e,i,n){return t==null||(pt(t)?mt[0]=mt[1]=mt[2]=mt[3]=t:(mt[0]=t[0],mt[1]=t[1],mt[2]=t[2],mt[3]=t[3]),i&&(mt[0]=se(0,mt[0]),mt[1]=se(0,mt[1]),mt[2]=se(0,mt[2]),mt[3]=se(0,mt[3])),e&&(mt[0]=-mt[0],mt[1]=-mt[1],mt[2]=-mt[2],mt[3]=-mt[3]),id(r,mt,"x","width",3,1,n&&n[0]||0),id(r,mt,"y","height",0,2,n&&n[1]||0)),r}var mt=[0,0,0,0];function id(r,t,e,i,n,a,o){var s=t[a]+t[n],l=r[i];r[i]+=s,o=se(0,ma(o,l)),r[i]=0?-t[n]:t[a]>=0?l+t[a]:We(s)>1e-8?(l-o)*t[n]/s:0):r[e]-=t[n]}function sl(r){var t=r.itemTooltipOption,e=r.componentModel,i=r.itemName,n=Y(t)?{formatter:t}:t,a=e.mainType,o=e.componentIndex,s={componentType:a,name:i,$vars:["name"]};s[a+"Index"]=o;var l=r.formatterParamsExtra;l&&T(xt(l),function(f){Le(s,f)||(s[f]=l[f],s.$vars.push(f))});var u=ft(r.el);u.componentMainType=a,u.componentIndex=o,u.tooltipConfig={name:i,option:gt({content:i,encodeHTMLContent:!0,formatterParams:s},n)}}function Ef(r,t){var e;r.isGroup&&(e=t(r)),e||r.traverse(t)}function Za(r,t){if(r)if(V(r))for(var e=0;et&&(t=o),ot&&(e=t=0),{min:e,max:t}}function Zh(r,t,e){pm(r,t,e,-1/0)}function pm(r,t,e,i){if(r.ignoreModelZ)return i;var n=r.getTextContent(),a=r.getTextGuideLine(),o=r.isGroup;if(o)for(var s=r.childrenRef(),l=0;l=0&&s.push(l)}),s}}function $h(r,t){return lt(lt({},r,!0),t,!0)}const Nx={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:". "}}}},zx={time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图",custom:"自定义图表",chart:"图表"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}};var Ds="ZH",qh="EN",cn=qh,rs={},Kh={},mm=et.domSupported?function(){var r=(document.documentElement.lang||navigator.language||navigator.browserLanguage||cn).toUpperCase();return r.indexOf(Ds)>-1?Ds:cn}():cn;function _m(r,t){r=r.toUpperCase(),Kh[r]=new Ct(t),rs[r]=t}function Fx(r){if(Y(r)){var t=rs[r.toUpperCase()]||{};return r===Ds||r===qh?at(t):lt(at(t),at(rs[cn]),!1)}else return lt(at(r),at(rs[cn]),!1)}function Vx(r){return Kh[r]}function Gx(){return Kh[cn]}_m(qh,Nx);_m(Ds,zx);var Hx=null;function As(){return Hx}var Qh=1e3,Jh=Qh*60,la=Jh*60,me=la*24,fd=me*365,Wx={year:/({yyyy}|{yy})/,month:/({MMMM}|{MMM}|{MM}|{M})/,day:/({dd}|{d})/,hour:/({HH}|{H}|{hh}|{h})/,minute:/({mm}|{m})/,second:/({ss}|{s})/,millisecond:/({SSS}|{S})/},is={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}"},Ux="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}",_o="{yyyy}-{MM}-{dd}",hd={year:"{yyyy}",month:"{yyyy}-{MM}",day:_o,hour:_o+" "+is.hour,minute:_o+" "+is.minute,second:_o+" "+is.second,millisecond:Ux},xi=["year","month","day","hour","minute","second","millisecond"],Yx=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function Xx(r){return!Y(r)&&!tt(r)?Zx(r):r}function Zx(r){r=r||{};var t={},e=!0;return T(xi,function(i){e&&(e=r[i]==null)}),T(xi,function(i,n){var a=r[i];t[i]={};for(var o=null,s=n;s>=0;s--){var l=xi[s],u=q(a)&&!V(a)?a[l]:a,f=void 0;V(u)?(f=u.slice(),o=f[0]||""):Y(u)?(o=u,f=[o]):(o==null?o=is[i]:Wx[l].test(o)||(o=t[l][l][0]+" "+o),f=[o],e&&(f[1]="{primary|"+o+"}")),t[i][l]=f}}),t}function yr(r,t){return r+="","0000".substr(0,t-r.length)+r}function ua(r){switch(r){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return r}}function $x(r){return r===ua(r)}function qx(r){switch(r){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function hl(r,t,e,i){var n=xn(r),a=n[Sm(e)](),o=n[jh(e)]()+1,s=Math.floor((o-1)/3)+1,l=n[tc(e)](),u=n["get"+(e?"UTC":"")+"Day"](),f=n[ec(e)](),h=(f-1)%12+1,c=n[rc(e)](),v=n[ic(e)](),d=n[nc(e)](),g=f>=12?"pm":"am",y=g.toUpperCase(),p=i instanceof Ct?i:Vx(i||mm)||Gx(),m=p.getModel("time"),_=m.get("month"),S=m.get("monthAbbr"),w=m.get("dayOfWeek"),b=m.get("dayOfWeekAbbr");return(t||"").replace(/{a}/g,g+"").replace(/{A}/g,y+"").replace(/{yyyy}/g,a+"").replace(/{yy}/g,yr(a%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,_[o-1]).replace(/{MMM}/g,S[o-1]).replace(/{MM}/g,yr(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,yr(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,w[u]).replace(/{ee}/g,b[u]).replace(/{e}/g,u+"").replace(/{HH}/g,yr(f,2)).replace(/{H}/g,f+"").replace(/{hh}/g,yr(h+"",2)).replace(/{h}/g,h+"").replace(/{mm}/g,yr(c,2)).replace(/{m}/g,c+"").replace(/{ss}/g,yr(v,2)).replace(/{s}/g,v+"").replace(/{SSS}/g,yr(d,3)).replace(/{S}/g,d+"")}function Kx(r,t,e,i,n){var a=null;if(Y(e))a=e;else if(tt(e)){var o={time:r.time,level:r.time.level},s=As();s&&s.makeAxisLabelFormatterParamBreak(o,r.break),a=e(r.value,t,o)}else{var l=r.time;if(l){var u=e[l.lowerTimeUnit][l.upperTimeUnit];a=u[Math.min(l.level,u.length-1)]||""}else{var f=Ls(r.value,n);a=e[f][f][0]}}return hl(new Date(r.value),a,n,i)}function Ls(r,t){var e=xn(r),i=e[jh(t)]()+1,n=e[tc(t)](),a=e[ec(t)](),o=e[rc(t)](),s=e[ic(t)](),l=e[nc(t)](),u=l===0,f=u&&s===0,h=f&&o===0,c=h&&a===0,v=c&&n===1,d=v&&i===1;return d?"year":v?"month":c?"day":h?"hour":f?"minute":u?"second":"millisecond"}function Of(r,t,e){switch(t){case"year":r[bm(e)](0);case"month":r[wm(e)](1);case"day":r[xm(e)](0);case"hour":r[Tm(e)](0);case"minute":r[Cm(e)](0);case"second":r[Mm(e)](0)}return r}function Sm(r){return r?"getUTCFullYear":"getFullYear"}function jh(r){return r?"getUTCMonth":"getMonth"}function tc(r){return r?"getUTCDate":"getDate"}function ec(r){return r?"getUTCHours":"getHours"}function rc(r){return r?"getUTCMinutes":"getMinutes"}function ic(r){return r?"getUTCSeconds":"getSeconds"}function nc(r){return r?"getUTCMilliseconds":"getMilliseconds"}function Qx(r){return r?"setUTCFullYear":"setFullYear"}function bm(r){return r?"setUTCMonth":"setMonth"}function wm(r){return r?"setUTCDate":"setDate"}function xm(r){return r?"setUTCHours":"setHours"}function Tm(r){return r?"setUTCMinutes":"setMinutes"}function Cm(r){return r?"setUTCSeconds":"setSeconds"}function Mm(r){return r?"setUTCMilliseconds":"setMilliseconds"}function Dm(r){if(!eb(r))return Y(r)?r:"-";var t=(r+"").split(".");return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function Am(r,t){return r=(r||"").toLowerCase().replace(/-(.)/g,function(e,i){return i.toUpperCase()}),t&&r&&(r=r.charAt(0).toUpperCase()+r.slice(1)),r}var cl=bh;function Bf(r,t,e){var i="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function n(f){return f&&He(f)?f:"-"}function a(f){return!!(f!=null&&!isNaN(f)&&isFinite(f))}var o=t==="time",s=r instanceof Date;if(o||s){var l=o?xn(r):r;if(isNaN(+l)){if(s)return"-"}else return hl(l,i,e)}if(t==="ordinal")return Qu(r)?n(r):pt(r)&&a(r)?r+"":"-";var u=Ss(r);return a(u)?Dm(u):Qu(r)?n(r):typeof r=="boolean"?r+"":"-"}var cd=["a","b","c","d","e","f","g"],lu=function(r,t){return"{"+r+(t??"")+"}"};function Lm(r,t,e){V(t)||(t=[t]);var i=t.length;if(!i)return"";for(var n=t[0].$vars||[],a=0;a':'';var o=e.markerId||"markerX";return{renderMode:a,content:"{"+o+"|} ",style:n==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:i}:{width:10,height:10,borderRadius:5,backgroundColor:i}}}function Ai(r,t){return t=t||"transparent",Y(r)?r:q(r)&&r.colorStops&&(r.colorStops[0]||{}).color||t}var ns={},uu={},ac=function(){function r(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return r.prototype.create=function(t,e){this._nonSeriesBoxMasterList=i(ns),this._normalMasterList=i(uu);function i(n,a){var o=[];return T(n,function(s,l){var u=s.create(t,e);o=o.concat(u||[])}),o}},r.prototype.update=function(t,e){T(this._normalMasterList,function(i){i.update&&i.update(t,e)})},r.prototype.getCoordinateSystems=function(){return this._normalMasterList.concat(this._nonSeriesBoxMasterList)},r.register=function(t,e){if(t==="matrix"||t==="calendar"){ns[t]=e;return}uu[t]=e},r.get=function(t){return uu[t]||ns[t]},r}();function jx(r){return!!ns[r]}var vd={coord:1,coord2:2},tT=rt();function eT(r){var t=r.getShallow("coord",!0),e=vd.coord;if(t==null){var i=tT.get(r.type);i&&i.getCoord2&&(e=vd.coord2,t=i.getCoord2(r))}return{coord:t,from:e}}var or={none:0,dataCoordSys:1,boxCoordSys:2};function rT(r,t){var e=r.getShallow("coordinateSystem"),i=r.getShallow("coordinateSystemUsage",!0),n=or.none;if(e){var a=r.mainType==="series";i==null&&(i=a?"data":"box"),i==="data"?(n=or.dataCoordSys,a||(n=or.none)):i==="box"&&(n=or.boxCoordSys,!a&&!jx(e)&&(n=or.none))}return{coordSysType:e,kind:n}}function iT(r){var t=r.targetModel,e=r.coordSysType,i=r.coordSysProvider,n=r.isDefaultDataCoordSys,a=rT(t),o=a.kind,s=a.coordSysType;if(n&&o!==or.dataCoordSys&&(o=or.dataCoordSys,s=e),o===or.none||s!==e)return!1;var l=i(e,t);return l?(o===or.dataCoordSys?t.coordinateSystem=l:t.boxCoordinateSystem=l,!0):!1}var as=T,nT=["left","right","top","bottom","width","height"],So=[["width","left","right"],["height","top","bottom"]];function oc(r,t,e,i,n){var a=0,o=0;i==null&&(i=1/0),n==null&&(n=1/0);var s=0;t.eachChild(function(l,u){var f=l.getBoundingRect(),h=t.childAt(u+1),c=h&&h.getBoundingRect(),v,d;if(r==="horizontal"){var g=f.width+(c?-c.x+f.x:0);v=a+g,v>i||l.newline?(a=0,v=g,o+=s+e,s=f.height):s=Math.max(s,f.height)}else{var y=f.height+(c?-c.y+f.y:0);d=o+y,d>n||l.newline?(a+=s+e,o=0,d=y,s=f.width):s=Math.max(s,f.width)}l.newline||(l.x=a,l.y=o,l.markRedraw(),r==="horizontal"?a=v+e:o=d+e)})}var fa=oc;St(oc,"vertical");St(oc,"horizontal");function aT(r,t){return{left:r.getShallow("left",t),top:r.getShallow("top",t),right:r.getShallow("right",t),bottom:r.getShallow("bottom",t),width:r.getShallow("width",t),height:r.getShallow("height",t)}}function gn(r,t,e){e=cl(e||0);var i=t.width,n=t.height,a=Pt(r.left,i),o=Pt(r.top,n),s=Pt(r.right,i),l=Pt(r.bottom,n),u=Pt(r.width,i),f=Pt(r.height,n),h=e[2]+e[0],c=e[1]+e[3],v=r.aspect;switch(isNaN(u)&&(u=i-s-c-a),isNaN(f)&&(f=n-l-h-o),v!=null&&(isNaN(u)&&isNaN(f)&&(v>i/n?u=i*.8:f=n*.8),isNaN(u)&&(u=v*f),isNaN(f)&&(f=u/v)),isNaN(a)&&(a=i-s-u-c),isNaN(o)&&(o=n-l-f-h),r.left||r.right){case"center":a=i/2-u/2-e[3];break;case"right":a=i-u-c;break}switch(r.top||r.bottom){case"middle":case"center":o=n/2-f/2-e[0];break;case"bottom":o=n-f-h;break}a=a||0,o=o||0,isNaN(u)&&(u=i-c-a-(s||0)),isNaN(f)&&(f=n-h-o-(l||0));var d=new it((t.x||0)+a+e[3],(t.y||0)+o+e[0],u,f);return d.margin=e,d}var fu={rect:1};function sc(r,t,e){var i,n,a,o=r.boxCoordinateSystem,s;if(o){var l=eT(r),u=l.coord,f=l.from;if(o.dataToLayout){a=fu.rect,s=f;var h=o.dataToLayout(u);i=h.contentRect||h.rect}}return a==null&&(a=fu.rect),a===fu.rect&&(i||(i={x:0,y:0,width:t.getWidth(),height:t.getHeight()}),n=[i.x+i.width/2,i.y+i.height/2]),{type:a,refContainer:i,refPoint:n,boxCoordFrom:s}}function Aa(r){var t=r.layoutMode||r.constructor.layoutMode;return q(t)?t:t?{type:t}:null}function Or(r,t,e){var i=e&&e.ignoreSize;!V(i)&&(i=[i,i]);var n=o(So[0],0),a=o(So[1],1);l(So[0],r,n),l(So[1],r,a);function o(u,f){var h={},c=0,v={},d=0,g=2;if(as(u,function(m){v[m]=r[m]}),as(u,function(m){Le(t,m)&&(h[m]=v[m]=t[m]),s(h,m)&&c++,s(v,m)&&d++}),i[f])return s(t,u[1])?v[u[2]]=null:s(t,u[2])&&(v[u[1]]=null),v;if(d===g||!c)return v;if(c>=g)return h;for(var y=0;y=0;l--)s=lt(s,n[l],!0);i.defaultOption=s}return i.defaultOption},t.prototype.getReferringComponents=function(e,i){var n=e+"Index",a=e+"Id";return Va(this.ecModel,e,{index:this.get(n,!0),id:this.get(a,!0)},i)},t.prototype.getBoxLayoutParams=function(){return aT(this,!1)},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}(Ct);Ay(ct,Ct);Qs(ct);Ox(ct);Bx(ct,lT);function lT(r){var t=[];return T(ct.getClassesByMainType(r),function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])}),t=Z(t,function(e){return Ye(e).main}),r!=="dataset"&&ot(t,"dataset")<=0&&t.unshift("dataset"),t}var W={color:{},darkColor:{},size:{}},Dt=W.color={theme:["#5070dd","#b6d634","#505372","#ff994d","#0ca8df","#ffd10a","#fb628b","#785db0","#3fbe95"],neutral00:"#fff",neutral05:"#f4f7fd",neutral10:"#e8ebf0",neutral15:"#dbdee4",neutral20:"#cfd2d7",neutral25:"#c3c5cb",neutral30:"#b7b9be",neutral35:"#aaacb2",neutral40:"#9ea0a5",neutral45:"#929399",neutral50:"#86878c",neutral55:"#797b7f",neutral60:"#6d6e73",neutral65:"#616266",neutral70:"#54555a",neutral75:"#48494d",neutral80:"#3c3c41",neutral85:"#303034",neutral90:"#232328",neutral95:"#17171b",neutral99:"#000",accent05:"#eff1f9",accent10:"#e0e4f2",accent15:"#d0d6ec",accent20:"#c0c9e6",accent25:"#b1bbdf",accent30:"#a1aed9",accent35:"#91a0d3",accent40:"#8292cc",accent45:"#7285c6",accent50:"#6578ba",accent55:"#5c6da9",accent60:"#536298",accent65:"#4a5787",accent70:"#404c76",accent75:"#374165",accent80:"#2e3654",accent85:"#252b43",accent90:"#1b2032",accent95:"#121521",transparent:"rgba(0,0,0,0)",highlight:"rgba(255,231,130,0.8)"};z(Dt,{primary:Dt.neutral80,secondary:Dt.neutral70,tertiary:Dt.neutral60,quaternary:Dt.neutral50,disabled:Dt.neutral20,border:Dt.neutral30,borderTint:Dt.neutral20,borderShade:Dt.neutral40,background:Dt.neutral05,backgroundTint:"rgba(234,237,245,0.5)",backgroundTransparent:"rgba(255,255,255,0)",backgroundShade:Dt.neutral10,shadow:"rgba(0,0,0,0.2)",shadowTint:"rgba(129,130,136,0.2)",axisLine:Dt.neutral70,axisLineTint:Dt.neutral40,axisTick:Dt.neutral70,axisTickMinor:Dt.neutral60,axisLabel:Dt.neutral70,axisSplitLine:Dt.neutral15,axisMinorSplitLine:Dt.neutral05});for(var oi in Dt)if(Dt.hasOwnProperty(oi)){var dd=Dt[oi];oi==="theme"?W.darkColor.theme=Dt.theme.slice():oi==="highlight"?W.darkColor.highlight="rgba(255,231,130,0.4)":oi.indexOf("accent")===0?W.darkColor[oi]=ff(dd,null,function(r){return r*.5},function(r){return Math.min(1,1.3-r)}):W.darkColor[oi]=ff(dd,null,function(r){return r*.9},function(r){return 1-Math.pow(r,1.5)})}W.size={xxs:2,xs:5,s:10,m:15,l:20,xl:30,xxl:40,xxxl:50};var Im="";typeof navigator<"u"&&(Im=navigator.platform||"");var Wi="rgba(0, 0, 0, 0.2)",Pm=W.color.theme[0],uT=ff(Pm,null,null,.9);const fT={darkMode:"auto",colorBy:"series",color:W.color.theme,gradientColor:[uT,Pm],aria:{decal:{decals:[{color:Wi,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:Wi,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:Wi,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:Wi,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:Wi,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:Wi,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:Im.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 km=rt(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),le="original",Ht="arrayRows",Ee="objectRows",tr="keyedColumns",Pr="typedArray",Rm="unknown",Ke="column",ki="row",ne={Must:1,Might:2,Not:3},Em=bt();function hT(r){Em(r).datasetMap=rt()}function cT(r,t,e){var i={},n=Om(t);if(!n||!r)return i;var a=[],o=[],s=t.ecModel,l=Em(s).datasetMap,u=n.uid+"_"+e.seriesLayoutBy,f,h;r=r.slice(),T(r,function(g,y){var p=q(g)?g:r[y]={name:g};p.type==="ordinal"&&f==null&&(f=y,h=d(p)),i[p.name]=[]});var c=l.get(u)||l.set(u,{categoryWayDim:h,valueWayDim:0});T(r,function(g,y){var p=g.name,m=d(g);if(f==null){var _=c.valueWayDim;v(i[p],_,m),v(o,_,m),c.valueWayDim+=m}else if(f===y)v(i[p],0,m),v(a,0,m);else{var _=c.categoryWayDim;v(i[p],_,m),v(o,_,m),c.categoryWayDim+=m}});function v(g,y,p){for(var m=0;mt)return r[i];return r[e-1]}function mT(r,t,e,i,n,a,o){a=a||r;var s=t(a),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(n))return u[n];var f=o==null||!i?e:yT(i,o);if(f=f||e,!(!f||!f.length)){var h=f[l];return n&&(u[n]=h),s.paletteIdx=(l+1)%f.length,h}}function _T(r,t){t(r).paletteIdx=0,t(r).paletteNameMap={}}var bo,Rn,gd,yd="\0_ec_inner",ST=1,uc=function(r){F(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.init=function(e,i,n,a,o,s){a=a||{},this.option=null,this._theme=new Ct(a),this._locale=new Ct(o),this._optionManager=s},t.prototype.setOption=function(e,i,n){var a=Sd(i);this._optionManager.setOption(e,n,a),this._resetOption(null,a)},t.prototype.resetOption=function(e,i){return this._resetOption(e,Sd(i))},t.prototype._resetOption=function(e,i){var n=!1,a=this._optionManager;if(!e||e==="recreate"){var o=a.mountOption(e==="recreate");!this.option||e==="recreate"?gd(this,o):(this.restoreData(),this._mergeOption(o,i)),n=!0}if((e==="timeline"||e==="media")&&this.restoreData(),!e||e==="recreate"||e==="timeline"){var s=a.getTimelineOption(this);s&&(n=!0,this._mergeOption(s,i))}if(!e||e==="recreate"||e==="media"){var l=a.getMediaOption(this);l.length&&T(l,function(u){n=!0,this._mergeOption(u,i)},this)}return n},t.prototype.mergeOption=function(e){this._mergeOption(e,null)},t.prototype._mergeOption=function(e,i){var n=this.option,a=this._componentsMap,o=this._componentsCount,s=[],l=rt(),u=i&&i.replaceMergeMainTypeMap;hT(this),T(e,function(h,c){h!=null&&(ct.hasClass(c)?c&&(s.push(c),l.set(c,!0)):n[c]=n[c]==null?at(h):lt(n[c],h,!0))}),u&&u.each(function(h,c){ct.hasClass(c)&&!l.get(c)&&(s.push(c),l.set(c,!0))}),ct.topologicalTravel(s,ct.getAllClassMainTypes(),f,this);function f(h){var c=gT(this,h,Xt(e[h])),v=a.get(h),d=v?u&&u.get(h)?"replaceMerge":"normalMerge":"replaceAll",g=sb(v,c,d);db(g,h,ct),n[h]=null,a.set(h,null),o.set(h,0);var y=[],p=[],m=0,_;T(g,function(S,w){var b=S.existing,x=S.newOption;if(!x)b&&(b.mergeOption({},this),b.optionUpdated({},!1));else{var C=h==="series",D=ct.getClass(h,S.keyInfo.subType,!C);if(!D)return;if(h==="tooltip"){if(_)return;_=!0}if(b&&b.constructor===D)b.name=S.keyInfo.name,b.mergeOption(x,this),b.optionUpdated(x,!1);else{var A=z({componentIndex:w},S.keyInfo);b=new D(x,this,this,A),z(b,A),S.brandNew&&(b.__requireNewView=!0),b.init(x,this,this),b.optionUpdated(null,!0)}}b?(y.push(b.option),p.push(b),m++):(y.push(void 0),p.push(void 0))},this),n[h]=y,a.set(h,p),o.set(h,m),h==="series"&&bo(this)}this._seriesIndices||bo(this)},t.prototype.getOption=function(){var e=at(this.option);return T(e,function(i,n){if(ct.hasClass(n)){for(var a=Xt(i),o=a.length,s=!1,l=o-1;l>=0;l--)a[l]&&!_a(a[l])?s=!0:(a[l]=null,!s&&o--);a.length=o,e[n]=a}}),delete e[yd],e},t.prototype.setTheme=function(e){this._theme=new Ct(e),this._resetOption("recreate",null)},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 n=this._componentsMap.get(e);if(n){var a=n[i||0];if(a)return a;if(i==null){for(var o=0;o=t:e==="max"?r<=t:r===t}function LT(r,t){return r.join(",")===t.join(",")}var Te=T,La=q,bd=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function hu(r){var t=r&&r.itemStyle;if(t)for(var e=0,i=bd.length;e0?e[o-1].seriesModel:null)}),zT(e)}})}function zT(r){T(r,function(t,e){var i=[],n=[NaN,NaN],a=[t.stackResultDimension,t.stackedOverDimension],o=t.data,s=t.isStackedByIndex,l=t.seriesModel.get("stackStrategy")||"samesign";o.modify(a,function(u,f,h){var c=o.get(t.stackedDimension,h);if(isNaN(c))return n;var v,d;s?d=o.getRawIndex(h):v=o.get(t.stackedByDimension,h);for(var g=NaN,y=e-1;y>=0;y--){var p=r[y];if(s||(d=p.data.rawIndexOf(p.stackedByDimension,v)),d>=0){var m=p.data.getByRawIndex(p.stackResultDimension,d);if(l==="all"||l==="positive"&&m>0||l==="negative"&&m<0||l==="samesign"&&c>=0&&m>0||l==="samesign"&&c<=0&&m<0){c=JS(c,m),g=m;break}}}return i[0]=c,i[1]=g,i})})}var vl=function(){function r(t){this.data=t.data||(t.sourceFormat===tr?{}:[]),this.sourceFormat=t.sourceFormat||Rm,this.seriesLayoutBy=t.seriesLayoutBy||Ke,this.startIndex=t.startIndex||0,this.dimensionsDetectedCount=t.dimensionsDetectedCount,this.metaRawOption=t.metaRawOption;var e=this.dimensionsDefine=t.dimensionsDefine;if(e)for(var i=0;ig&&(g=_)}v[0]=d,v[1]=g}},n=function(){return this._data?this._data.length/this._dimSize:0};Ad=(t={},t[Ht+"_"+Ke]={pure:!0,appendData:a},t[Ht+"_"+ki]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},t[Ee]={pure:!0,appendData:a},t[tr]={pure:!0,appendData:function(o){var s=this._data;T(o,function(l,u){for(var f=s[u]||(s[u]=[]),h=0;h<(l||[]).length;h++)f.push(l[h])})}},t[le]={appendData:a},t[Pr]={persistent:!1,pure:!0,appendData:function(o){this._data=o},clean:function(){this._offset+=this.count(),this._data=null}},t);function a(o){for(var s=0;s=0&&(g=o.interpolatedValue[y])}return g!=null?g+"":""})}},r.prototype.getRawValue=function(t,e){return yn(this.getData(e),t)},r.prototype.formatTooltip=function(t,e,i){},r}();function kd(r){var t,e;return q(r)?r.type&&(e=r):t=r,{text:t,frag:e}}function ha(r){return new XT(r)}var XT=function(){function r(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0}return r.prototype.perform=function(t){var e=this._upstream,i=t&&t.skip;if(this._dirty&&e){var n=this.context;n.data=n.outputData=e.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var a;this._plan&&!i&&(a=this._plan(this.context));var o=f(this._modBy),s=this._modDataCount||0,l=f(t&&t.modBy),u=t&&t.modDataCount||0;(o!==l||s!==u)&&(a="reset");function f(m){return!(m>=1)&&(m=1),m}var h;(this._dirty||a==="reset")&&(this._dirty=!1,h=this._doReset(i)),this._modBy=l,this._modDataCount=u;var c=t&&t.step;if(e?this._dueEnd=e._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var v=this._dueIndex,d=Math.min(c!=null?this._dueIndex+c:1/0,this._dueEnd);if(!i&&(h||v1&&i>0?s:o}};return a;function o(){return t=r?null:ln?-this._resultLT:0},r}(),$T=function(){function r(){}return r.prototype.getRawData=function(){throw new Error("not supported")},r.prototype.getRawDataItem=function(t){throw new Error("not supported")},r.prototype.cloneRawData=function(){},r.prototype.getDimensionInfo=function(t){},r.prototype.cloneAllDimensionInfo=function(){},r.prototype.count=function(){},r.prototype.retrieveValue=function(t,e){},r.prototype.retrieveValueFromItem=function(t,e){},r.prototype.convertValue=function(t,e){return vn(t,e)},r}();function qT(r,t){var e=new $T,i=r.data,n=e.sourceFormat=r.sourceFormat,a=r.startIndex,o="";r.seriesLayoutBy!==Ke&&jt(o);var s=[],l={},u=r.dimensionsDefine;if(u)T(u,function(g,y){var p=g.name,m={index:y,name:p,displayName:g.displayName};if(s.push(m),p!=null){var _="";Le(l,p)&&jt(_),l[p]=m}});else for(var f=0;f65535?iC:nC}function Yi(){return[1/0,-1/0]}function aC(r){var t=r.constructor;return t===Array?r.slice():new t(r)}function Od(r,t,e,i,n){var a=qm[e||"float"];if(n){var o=r[t],s=o&&o.length;if(s!==i){for(var l=new a(i),u=0;uy[1]&&(y[1]=g)}return this._rawCount=this._count=l,{start:s,end:l}},r.prototype._initDataFromProvider=function(t,e,i){for(var n=this._provider,a=this._chunks,o=this._dimensions,s=o.length,l=this._rawExtent,u=Z(o,function(m){return m.property}),f=0;fp[1]&&(p[1]=y)}}!n.persistent&&n.clean&&n.clean(),this._rawCount=this._count=e,this._extent=[]},r.prototype.count=function(){return this._count},r.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)a=o-1;else return o}return-1},r.prototype.getIndices=function(){var t,e=this._indices;if(e){var i=e.constructor,n=this._count;if(i===Array){t=new i(n);for(var a=0;a=h&&m<=c||isNaN(m))&&(l[u++]=g),g++}d=!0}else if(a===2){for(var y=v[n[0]],_=v[n[1]],S=t[n[1]][0],w=t[n[1]][1],p=0;p=h&&m<=c||isNaN(m))&&(b>=S&&b<=w||isNaN(b))&&(l[u++]=g),g++}d=!0}}if(!d)if(a===1)for(var p=0;p=h&&m<=c||isNaN(m))&&(l[u++]=x)}else for(var p=0;pt[A][1])&&(C=!1)}C&&(l[u++]=e.getRawIndex(p))}return up[1]&&(p[1]=y)}}}},r.prototype.lttbDownSample=function(t,e){var i=this.clone([t],!0),n=i._chunks,a=n[t],o=this.count(),s=0,l=Math.floor(1/e),u=this.getRawIndex(0),f,h,c,v=new(Ui(this._rawCount))(Math.min((Math.ceil(o/l)+2)*2,o));v[s++]=u;for(var d=1;df&&(f=h,c=S)}M>0&&Ms&&(g=s-f);for(var y=0;yd&&(d=m,v=f+y)}var _=this.getRawIndex(h),S=this.getRawIndex(v);hf-d&&(l=f-d,s.length=l);for(var g=0;gh[1]&&(h[1]=p),c[v++]=m}return a._count=v,a._indices=c,a._updateGetRawIdx(),a},r.prototype.each=function(t,e){if(this._count)for(var i=t.length,n=this._chunks,a=0,o=this.count();al&&(l=h)}return o=[s,l],this._extent[t]=o,o},r.prototype.getRawDataItem=function(t){var e=this.getRawIndex(t);if(this._provider.persistent)return this._provider.getItem(e);for(var i=[],n=this._chunks,a=0;a=0?this._indices[t]:-1},r.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},r.internalField=function(){function t(e,i,n,a){return vn(e[a],this._dimensions[a])}du={arrayRows:t,objectRows:function(e,i,n,a){return vn(e[i],this._dimensions[a])},keyedColumns:t,original:function(e,i,n,a){var o=e&&(e.value==null?e:e.value);return vn(o instanceof Array?o[a]:o,this._dimensions[a])},typedArray:function(e,i,n,a){return e[a]}}}(),r}(),oC=function(){function r(t){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=t}return r.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},r.prototype._setLocalSource=function(t,e){this._sourceList=t,this._upstreamSignList=e,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},r.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},r.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},r.prototype._createSource=function(){this._setLocalSource([],[]);var t=this._sourceHost,e=this._getUpstreamSourceManagers(),i=!!e.length,n,a;if(xo(t)){var o=t,s=void 0,l=void 0,u=void 0;if(i){var f=e[0];f.prepareSource(),u=f.getSource(),s=u.data,l=u.sourceFormat,a=[f._getVersionSign()]}else s=o.get("data",!0),l=ie(s)?Pr:le,a=[];var h=this._getSourceMetaRawOption()||{},c=u&&u.metaRawOption||{},v=$(h.seriesLayoutBy,c.seriesLayoutBy)||null,d=$(h.sourceHeader,c.sourceHeader),g=$(h.dimensions,c.dimensions),y=v!==c.seriesLayoutBy||!!d!=!!c.sourceHeader||g;n=y?[Nf(s,{seriesLayoutBy:v,sourceHeader:d,dimensions:g},l)]:[]}else{var p=t;if(i){var m=this._applyTransform(e);n=m.sourceList,a=m.upstreamSignList}else{var _=p.get("source",!0);n=[Nf(_,this._getSourceMetaRawOption(),null)],a=[]}}this._setLocalSource(n,a)},r.prototype._applyTransform=function(t){var e=this._sourceHost,i=e.get("transform",!0),n=e.get("fromTransformResult",!0);if(n!=null){var a="";t.length!==1&&Bd(a)}var o,s=[],l=[];return T(t,function(u){u.prepareSource();var f=u.getSource(n||0),h="";n!=null&&!f&&Bd(h),s.push(f),l.push(u._getVersionSign())}),i?o=eC(i,s,{datasetIndex:e.componentIndex}):n!=null&&(o=[FT(s[0])]),{sourceList:o,upstreamSignList:l}},r.prototype._isDirty=function(){if(this._dirty)return!0;for(var t=this._getUpstreamSourceManagers(),e=0;e1||e>0&&!r.noHeader;return T(r.blocks,function(n){var a=jm(n);a>=t&&(t=a+ +(i&&(!a||Ff(n)&&!n.noHeader)))}),t}return 0}function fC(r,t,e,i){var n=t.noHeader,a=cC(jm(t)),o=[],s=t.blocks||[];hr(!s||V(s)),s=s||[];var l=r.orderMode;if(t.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(Le(u,l)){var f=new ZT(u[l],null);s.sort(function(g,y){return f.evaluate(g.sortParam,y.sortParam)})}else l==="seriesDesc"&&s.reverse()}T(s,function(g,y){var p=t.valueFormatter,m=Jm(g)(p?z(z({},r),{valueFormatter:p}):r,g,y>0?a.html:0,i);m!=null&&o.push(m)});var h=r.renderMode==="richText"?o.join(a.richText):Vf(i,o.join(""),n?e:a.html);if(n)return h;var c=Bf(t.header,"ordinal",r.useUTC),v=Qm(i,r.renderMode).nameStyle,d=Km(i);return r.renderMode==="richText"?t0(r,c,v)+a.richText+h:Vf(i,'
'+Qt(c)+"
"+h,e)}function hC(r,t,e,i){var n=r.renderMode,a=t.noName,o=t.noValue,s=!t.markerType,l=t.name,u=r.useUTC,f=t.valueFormatter||r.valueFormatter||function(S){return S=V(S)?S:[S],Z(S,function(w,b){return Bf(w,V(v)?v[b]:v,u)})};if(!(a&&o)){var h=s?"":r.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||W.color.secondary,n),c=a?"":Bf(l,"ordinal",u),v=t.valueType,d=o?[]:f(t.value,t.dataIndex),g=!s||!a,y=!s&&a,p=Qm(i,n),m=p.nameStyle,_=p.valueStyle;return n==="richText"?(s?"":h)+(a?"":t0(r,c,m))+(o?"":pC(r,d,g,y,_)):Vf(i,(s?"":h)+(a?"":vC(c,!s,m))+(o?"":dC(d,g,y,_)),e)}}function Nd(r,t,e,i,n,a){if(r){var o=Jm(r),s={useUTC:n,renderMode:e,orderMode:i,markupStyleCreator:t,valueFormatter:r.valueFormatter};return o(s,r,0,a)}}function cC(r){return{html:lC[r],richText:uC[r]}}function Vf(r,t,e){var i='
',n="margin: "+e+"px 0 0",a=Km(r);return'
'+t+i+"
"}function vC(r,t,e){var i=t?"margin-left:2px":"";return''+Qt(r)+""}function dC(r,t,e,i){var n=e?"10px":"20px",a=t?"float:right;margin-left:"+n:"";return r=V(r)?r:[r],''+Z(r,function(o){return Qt(o)}).join("  ")+""}function t0(r,t,e){return r.markupStyleCreator.wrapRichTextStyle(t,e)}function pC(r,t,e,i,n){var a=[n],o=i?10:20;return e&&a.push({padding:[0,0,0,o],align:"right"}),r.markupStyleCreator.wrapRichTextStyle(V(t)?t.join(" "):t,a)}function gC(r,t){var e=r.getData().getItemVisual(t,"style"),i=e[r.visualDrawType];return Ai(i)}function e0(r,t){var e=r.get("padding");return e??(t==="richText"?[8,10]:10)}var pu=function(){function r(){this.richTextStyles={},this._nextStyleNameId=by()}return r.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},r.prototype.makeTooltipMarker=function(t,e,i){var n=i==="richText"?this._generateStyleName():null,a=Jx({color:e,type:t,renderMode:i,markerId:n});return Y(a)?a:(this.richTextStyles[n]=a.style,a.content)},r.prototype.wrapRichTextStyle=function(t,e){var i={};V(e)?T(e,function(a){return z(i,a)}):z(i,e);var n=this._generateStyleName();return this.richTextStyles[n]=i,"{"+n+"|"+t+"}"},r}();function yC(r){var t=r.series,e=r.dataIndex,i=r.multipleSeries,n=t.getData(),a=n.mapDimensionsAll("defaultedTooltip"),o=a.length,s=t.getRawValue(e),l=V(s),u=gC(t,e),f,h,c,v;if(o>1||l&&!o){var d=mC(s,t,e,a,u);f=d.inlineValues,h=d.inlineValueTypes,c=d.blocks,v=d.inlineValues[0]}else if(o){var g=n.getDimensionInfo(a[0]);v=f=yn(n,e,a[0]),h=g.type}else v=f=l?s[0]:s;var y=Lh(t),p=y&&t.name||"",m=n.getName(e),_=i?p:m;return Li("section",{header:p,noHeader:i||!y,sortParam:v,blocks:[Li("nameValue",{markerType:"item",markerColor:u,name:_,noName:!He(_),value:f,valueType:h,dataIndex:e})].concat(c||[])})}function mC(r,t,e,i,n){var a=t.getData(),o=bn(r,function(h,c,v){var d=a.getDimensionInfo(v);return h=h||d&&d.tooltip!==!1&&d.displayName!=null},!1),s=[],l=[],u=[];i.length?T(i,function(h){f(yn(a,e,h),h)}):T(r,f);function f(h,c){var v=a.getDimensionInfo(c);!v||v.otherDims.tooltip===!1||(o?u.push(Li("nameValue",{markerType:"subItem",markerColor:n,name:v.displayName,value:h,valueType:v.type})):(s.push(h),l.push(v.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var mr=bt();function To(r,t){return r.getName(t)||r.getId(t)}var _C="__universalTransitionEnabled",Je=function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e._selectedDataIndicesMap={},e}return t.prototype.init=function(e,i,n){this.seriesIndex=this.componentIndex,this.dataTask=ha({count:bC,reset:wC}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n);var a=mr(this).sourceManager=new oC(this);a.prepareSource();var o=this.getInitialData(e,n);Fd(o,this),this.dataTask.context.data=o,mr(this).dataBeforeProcessed=o,zd(this),this._initSelectedMapFromData(o)},t.prototype.mergeDefaultAndTheme=function(e,i){var n=Aa(this),a=n?Cn(e):{},o=this.subType;ct.hasClass(o)&&(o+="Series"),lt(e,i.getTheme().get(this.subType)),lt(e,this.getDefaultOption()),bf(e,"label",["show"]),this.fillDataTextStyle(e.data),n&&Or(e,a,n)},t.prototype.mergeOption=function(e,i){e=lt(this.option,e,!0),this.fillDataTextStyle(e.data);var n=Aa(this);n&&Or(this.option,e,n);var a=mr(this).sourceManager;a.dirty(),a.prepareSource();var o=this.getInitialData(e,i);Fd(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,mr(this).dataBeforeProcessed=o,zd(this),this._initSelectedMapFromData(o)},t.prototype.fillDataTextStyle=function(e){if(e&&!ie(e))for(var i=["show"],n=0;n=0&&c<0)&&(h=m,c=p,v=0),p===c&&(f[v++]=g))}),f.length=v,f},t.prototype.formatTooltip=function(e,i,n){return yC({series:this,dataIndex:e,multipleSeries:i})},t.prototype.isAnimationEnabled=function(){var e=this.ecModel;if(et.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,n){var a=this.ecModel,o=lc.prototype.getColorFromPalette.call(this,e,i,n);return o||(o=a.getColorFromPalette(e,i,n)),o},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 n=this.option.selectedMap;if(n){var a=this.option.selectedMode,o=this.getData(i);if(a==="series"||n==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s=0&&n.push(o)}return n},t.prototype.isSelected=function(e,i){var n=this.option.selectedMap;if(!n)return!1;var a=this.getData(i);return(n==="all"||n[To(a,e)])&&!a.getItemModel(e).get(["select","disabled"])},t.prototype.isUniversalTransitionEnabled=function(){if(this[_C])return!0;var e=this.option.universalTransition;return e?e===!0?!0:e&&e.enabled:!1},t.prototype._innerSelect=function(e,i){var n,a,o=this.option,s=o.selectedMode,l=i.length;if(!(!s||!l)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){q(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,f=0;f0&&this._innerSelect(e,i)}},t.registerClass=function(e){return ct.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}(ct);Re(Je,cc);Re(Je,lc);Ay(Je,ct);function zd(r){var t=r.name;Lh(r)||(r.name=SC(r)||t)}function SC(r){var t=r.getRawData(),e=t.mapDimensionsAll("seriesName"),i=[];return T(e,function(n){var a=t.getDimensionInfo(n);a.displayName&&i.push(a.displayName)}),i.join(" ")}function bC(r){return r.model.getRawData().count()}function wC(r){var t=r.model;return t.setData(t.getRawData().cloneShallow()),xC}function xC(r,t){t.outputData&&r.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function Fd(r,t){T(P1(r.CHANGABLE_METHODS,r.DOWNSAMPLE_METHODS),function(e){r.wrapMethod(e,St(TC,t))})}function TC(r,t){var e=Gf(r);return e&&e.setOutputEnd((t||this).count()),t}function Gf(r){var t=(r.ecModel||{}).scheduler,e=t&&t.getPipeline(r.uid);if(e){var i=e.currentTask;if(i){var n=i.agentStubMap;n&&(i=n.get(r.uid))}return i}}var be=function(){function r(){this.group=new Mt,this.uid=fl("viewComponent")}return r.prototype.init=function(t,e){},r.prototype.render=function(t,e,i,n){},r.prototype.dispose=function(t,e){},r.prototype.updateView=function(t,e,i,n){},r.prototype.updateLayout=function(t,e,i,n){},r.prototype.updateVisual=function(t,e,i,n){},r.prototype.toggleBlurSeries=function(t,e,i){},r.prototype.eachRendered=function(t){var e=this.group;e&&e.traverse(t)},r}();Ph(be);Qs(be);function dc(){var r=bt();return function(t){var e=r(t),i=t.pipelineContext,n=!!e.large,a=!!e.progressiveRender,o=e.large=!!(i&&i.large),s=e.progressiveRender=!!(i&&i.progressiveRender);return(n!==o||a!==s)&&"reset"}}var r0=bt(),CC=dc(),Ie=function(){function r(){this.group=new Mt,this.uid=fl("viewChart"),this.renderTask=ha({plan:MC,reset:DC}),this.renderTask.context={view:this}}return r.prototype.init=function(t,e){},r.prototype.render=function(t,e,i,n){},r.prototype.highlight=function(t,e,i,n){var a=t.getData(n&&n.dataType);a&&Gd(a,n,"emphasis")},r.prototype.downplay=function(t,e,i,n){var a=t.getData(n&&n.dataType);a&&Gd(a,n,"normal")},r.prototype.remove=function(t,e){this.group.removeAll()},r.prototype.dispose=function(t,e){},r.prototype.updateView=function(t,e,i,n){this.render(t,e,i,n)},r.prototype.updateLayout=function(t,e,i,n){this.render(t,e,i,n)},r.prototype.updateVisual=function(t,e,i,n){this.render(t,e,i,n)},r.prototype.eachRendered=function(t){Za(this.group,t)},r.markUpdateMethod=function(t,e){r0(t).updateMethod=e},r.protoInitialize=function(){var t=r.prototype;t.type="chart"}(),r}();function Vd(r,t,e){r&&If(r)&&(t==="emphasis"?ba:wa)(r,e)}function Gd(r,t,e){var i=Ci(r,t),n=t&&t.highlightKey!=null?zw(t.highlightKey):null;i!=null?T(Xt(i),function(a){Vd(r.getItemGraphicEl(a),e,n)}):r.eachItemGraphicEl(function(a){Vd(a,e,n)})}Ph(Ie);Qs(Ie);function MC(r){return CC(r.model)}function DC(r){var t=r.model,e=r.ecModel,i=r.api,n=r.payload,a=t.pipelineContext.progressiveRender,o=r.view,s=n&&r0(n).updateMethod,l=a?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](t,e,i,n),AC[l]}var AC={incrementalPrepareRender:{progress:function(r,t){t.view.incrementalRender(r,t.model,t.ecModel,t.api,t.payload)}},render:{forceFirstProgress:!0,progress:function(r,t){t.view.render(t.model,t.ecModel,t.api,t.payload)}}},Is="\0__throttleOriginMethod",Hd="\0__throttleRate",Wd="\0__throttleType";function pc(r,t,e){var i,n=0,a=0,o=null,s,l,u,f;t=t||0;function h(){a=new Date().getTime(),o=null,r.apply(l,u||[])}var c=function(){for(var v=[],d=0;d=0?h():o=setTimeout(h,-s),n=i};return c.clear=function(){o&&(clearTimeout(o),o=null)},c.debounceNextCall=function(v){f=v},c}function gc(r,t,e,i){var n=r[t];if(n){var a=n[Is]||n,o=n[Wd],s=n[Hd];if(s!==e||o!==i){if(e==null||!i)return r[t]=a;n=r[t]=pc(a,e,i==="debounce"),n[Is]=a,n[Wd]=i,n[Hd]=e}return n}}function Ps(r,t){var e=r[t];e&&e[Is]&&(e.clear&&e.clear(),r[t]=e[Is])}var Ud=bt(),Yd={itemStyle:Sa(ym,!0),lineStyle:Sa(gm,!0)},LC={lineStyle:"stroke",itemStyle:"fill"};function i0(r,t){var e=r.visualStyleMapper||Yd[t];return e||(console.warn("Unknown style type '"+t+"'."),Yd.itemStyle)}function n0(r,t){var e=r.visualDrawType||LC[t];return e||(console.warn("Unknown style type '"+t+"'."),"fill")}var IC={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){var e=r.getData(),i=r.visualStyleAccessPath||"itemStyle",n=r.getModel(i),a=i0(r,i),o=a(n),s=n.getShallow("decal");s&&(e.setVisual("decal",s),s.dirty=!0);var l=n0(r,i),u=o[l],f=tt(u)?u:null,h=o.fill==="auto"||o.stroke==="auto";if(!o[l]||f||h){var c=r.getColorFromPalette(r.name,null,t.getSeriesCount());o[l]||(o[l]=c,e.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||tt(o.fill)?c:o.fill,o.stroke=o.stroke==="auto"||tt(o.stroke)?c:o.stroke}if(e.setVisual("style",o),e.setVisual("drawType",l),!t.isSeriesFiltered(r)&&f)return e.setVisual("colorFromPalette",!1),{dataEach:function(v,d){var g=r.getDataParams(d),y=z({},o);y[l]=f(g),v.setItemVisual(d,"style",y)}}}},On=new Ct,PC={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){if(!(r.ignoreStyleOnData||t.isSeriesFiltered(r))){var e=r.getData(),i=r.visualStyleAccessPath||"itemStyle",n=i0(r,i),a=e.getVisual("drawType");return{dataEach:e.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[i]){On.option=l[i];var u=n(On),f=o.ensureUniqueItemVisual(s,"style");z(f,u),On.option.decal&&(o.setItemVisual(s,"decal",On.option.decal),On.option.decal.dirty=!0),a in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},kC={performRawSeries:!0,overallReset:function(r){var t=rt();r.eachSeries(function(e){var i=e.getColorBy();if(!e.isColorBySeries()){var n=e.type+"-"+i,a=t.get(n);a||(a={},t.set(n,a)),Ud(e).scope=a}}),r.eachSeries(function(e){if(!(e.isColorBySeries()||r.isSeriesFiltered(e))){var i=e.getRawData(),n={},a=e.getData(),o=Ud(e).scope,s=e.visualStyleAccessPath||"itemStyle",l=n0(e,s);a.each(function(u){var f=a.getRawIndex(u);n[f]=u}),i.each(function(u){var f=n[u],h=a.getItemVisual(f,"colorFromPalette");if(h){var c=a.ensureUniqueItemVisual(f,"style"),v=i.getName(u)||u+"",d=i.count();c[l]=e.getColorFromPalette(v,o,d)}})}})}},Co=Math.PI;function RC(r,t){t=t||{},gt(t,{text:"loading",textColor:W.color.primary,fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255,255,255,0.8)",showSpinner:!0,color:W.color.theme[0],spinnerRadius:10,lineWidth:5,zlevel:0});var e=new Mt,i=new _t({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});e.add(i);var n=new Gt({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 _t({style:{fill:"none"},textContent:n,textConfig:{position:"right",distance:10},zlevel:t.zlevel,z:10001});e.add(a);var o;return t.showSpinner&&(o=new Xa({shape:{startAngle:-Co/2,endAngle:-Co/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:"round",lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:Co*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:Co*3/2}).delay(300).start("circularInOut"),e.add(o)),e.resize=function(){var s=n.getBoundingRect().width,l=t.showSpinner?t.spinnerRadius:0,u=(r.getWidth()-l*2-(t.showSpinner&&s?10:0)-s)/2-(t.showSpinner&&s?0:5+s/2)+(t.showSpinner?0:s/2)+(s?0:l),f=r.getHeight()/2;t.showSpinner&&o.setShape({cx:u,cy:f}),a.setShape({x:u-l,y:f-l,width:l*2,height:l*2}),i.setShape({x:0,y:0,width:r.getWidth(),height:r.getHeight()})},e.resize(),e}var a0=function(){function r(t,e,i,n){this._stageTaskMap=rt(),this.ecInstance=t,this.api=e,i=this._dataProcessorHandlers=i.slice(),n=this._visualHandlers=n.slice(),this._allHandlers=i.concat(n)}return r.prototype.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each(function(i){var n=i.overallTask;n&&n.dirty()})},r.prototype.getPerformArgs=function(t,e){if(t.__pipeline){var i=this._pipelineMap.get(t.__pipeline.id),n=i.context,a=!e&&i.progressiveEnabled&&(!n||n.progressiveRender)&&t.__idxInPipeline>i.blockIndex,o=a?i.step:null,s=n&&n.modDataCount,l=s!=null?Math.ceil(s/o):null;return{step:o,modBy:l,modDataCount:s}}},r.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},r.prototype.updateStreamModes=function(t,e){var i=this._pipelineMap.get(t.uid),n=t.getData(),a=n.count(),o=i.progressiveEnabled&&e.incrementalPrepareRender&&a>=i.threshold,s=t.get("large")&&a>=t.get("largeThreshold"),l=t.get("progressiveChunkMode")==="mod"?a:null;t.pipelineContext=i.context={progressiveRender:o,modDataCount:l,large:s}},r.prototype.restorePipelines=function(t){var e=this,i=e._pipelineMap=rt();t.eachSeries(function(n){var a=n.getProgressive(),o=n.uid;i.set(o,{id:o,head:null,tail:null,threshold:n.getProgressiveThreshold(),progressiveEnabled:a&&!(n.preventIncremental&&n.preventIncremental()),blockIndex:-1,step:Math.round(a||700),count:0}),e._pipe(n,n.dataTask)})},r.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.api.getModel(),i=this.api;T(this._allHandlers,function(n){var a=t.get(n.uid)||t.set(n.uid,{}),o="";hr(!(n.reset&&n.overallReset),o),n.reset&&this._createSeriesStageTask(n,a,e,i),n.overallReset&&this._createOverallStageTask(n,a,e,i)},this)},r.prototype.prepareView=function(t,e,i,n){var a=t.renderTask,o=a.context;o.model=e,o.ecModel=i,o.api=n,a.__block=!t.incrementalPrepareRender,this._pipe(e,a)},r.prototype.performDataProcessorTasks=function(t,e){this._performStageTasks(this._dataProcessorHandlers,t,e,{block:!0})},r.prototype.performVisualTasks=function(t,e,i){this._performStageTasks(this._visualHandlers,t,e,i)},r.prototype._performStageTasks=function(t,e,i,n){n=n||{};var a=!1,o=this;T(t,function(l,u){if(!(n.visualType&&n.visualType!==l.visualType)){var f=o._stageTaskMap.get(l.uid),h=f.seriesTaskMap,c=f.overallTask;if(c){var v,d=c.agentStubMap;d.each(function(y){s(n,y)&&(y.dirty(),v=!0)}),v&&c.dirty(),o.updatePayload(c,i);var g=o.getPerformArgs(c,n.block);d.each(function(y){y.perform(g)}),c.perform(g)&&(a=!0)}else h&&h.each(function(y,p){s(n,y)&&y.dirty();var m=o.getPerformArgs(y,n.block);m.skip=!l.performRawSeries&&e.isSeriesFiltered(y.context.model),o.updatePayload(y,i),y.perform(m)&&(a=!0)})}});function s(l,u){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(u.__pipeline.id))}this.unfinished=a||this.unfinished},r.prototype.performSeriesTasks=function(t){var e;t.eachSeries(function(i){e=i.dataTask.perform()||e}),this.unfinished=e||this.unfinished},r.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)})},r.prototype.updatePayload=function(t,e){e!=="remain"&&(t.context.payload=e)},r.prototype._createSeriesStageTask=function(t,e,i,n){var a=this,o=e.seriesTaskMap,s=e.seriesTaskMap=rt(),l=t.seriesType,u=t.getTargetSeries;t.createOnAllSeries?i.eachRawSeries(f):l?i.eachRawSeriesByType(l,f):u&&u(i,n).each(f);function f(h){var c=h.uid,v=s.set(c,o&&o.get(c)||ha({plan:zC,reset:FC,count:GC}));v.context={model:h,ecModel:i,api:n,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:a},a._pipe(h,v)}},r.prototype._createOverallStageTask=function(t,e,i,n){var a=this,o=e.overallTask=e.overallTask||ha({reset:EC});o.context={ecModel:i,api:n,overallReset:t.overallReset,scheduler:a};var s=o.agentStubMap,l=o.agentStubMap=rt(),u=t.seriesType,f=t.getTargetSeries,h=!0,c=!1,v="";hr(!t.createOnAllSeries,v),u?i.eachRawSeriesByType(u,d):f?f(i,n).each(d):(h=!1,T(i.getSeries(),d));function d(g){var y=g.uid,p=l.set(y,s&&s.get(y)||(c=!0,ha({reset:OC,onDirty:NC})));p.context={model:g,overallProgress:h},p.agent=o,p.__block=h,a._pipe(g,p)}c&&o.dirty()},r.prototype._pipe=function(t,e){var i=t.uid,n=this._pipelineMap.get(i);!n.head&&(n.head=e),n.tail&&n.tail.pipe(e),n.tail=e,e.__idxInPipeline=n.count++,e.__pipeline=n},r.wrapStageHandler=function(t,e){return tt(t)&&(t={overallReset:t,seriesType:HC(t)}),t.uid=fl("stageHandler"),e&&(t.visualType=e),t},r}();function EC(r){r.overallReset(r.ecModel,r.api,r.payload)}function OC(r){return r.overallProgress&&BC}function BC(){this.agent.dirty(),this.getDownstream().dirty()}function NC(){this.agent&&this.agent.dirty()}function zC(r){return r.plan?r.plan(r.model,r.ecModel,r.api,r.payload):null}function FC(r){r.useClearVisual&&r.data.clearAllVisual();var t=r.resetDefines=Xt(r.reset(r.model,r.ecModel,r.api,r.payload));return t.length>1?Z(t,function(e,i){return o0(i)}):VC}var VC=o0(0);function o0(r){return function(t,e){var i=e.data,n=e.resetDefines[r];if(n&&n.dataEach)for(var a=t.start;a0&&v===u.length-c.length){var d=u.slice(0,v);d!=="data"&&(e.mainType=d,e[c.toLowerCase()]=l,f=!0)}}s.hasOwnProperty(u)&&(i[u]=l,f=!0),f||(n[u]=l)})}return{cptQuery:e,dataQuery:i,otherQuery:n}},r.prototype.filter=function(t,e){var i=this.eventInfo;if(!i)return!0;var n=i.targetEl,a=i.packedEvent,o=i.model,s=i.view;if(!o||!s)return!0;var l=e.cptQuery,u=e.dataQuery;return f(l,o,"mainType")&&f(l,o,"subType")&&f(l,o,"index","componentIndex")&&f(l,o,"name")&&f(l,o,"id")&&f(u,a,"name")&&f(u,a,"dataIndex")&&f(u,a,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(t,e.otherQuery,n,a));function f(h,c,v,d){return h[v]==null||c[d||v]===h[v]}},r.prototype.afterTrigger=function(){this.eventInfo=null},r}(),Hf=["symbol","symbolSize","symbolRotate","symbolOffset"],Zd=Hf.concat(["symbolKeepAspect"]),YC={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){var e=r.getData();if(r.legendIcon&&e.setVisual("legendIcon",r.legendIcon),!r.hasSymbolVisual)return;for(var i={},n={},a=!1,o=0;o=0&&yi(l)?l:.5;var u=r.createRadialGradient(o,s,0,o,s,l);return u}function Wf(r,t,e){for(var i=t.type==="radial"?sM(r,t,e):oM(r,t,e),n=t.colorStops,a=0;a0)?null:r==="dashed"?[4*t,2*t]:r==="dotted"?[t]:pt(r)?[r]:V(r)?r:null}function h0(r){var t=r.style,e=t.lineDash&&t.lineWidth>0&&uM(t.lineDash,t.lineWidth),i=t.lineDashOffset;if(e){var n=t.strokeNoScale&&r.getLineScale?r.getLineScale():1;n&&n!==1&&(e=Z(e,function(a){return a/n}),i/=n)}return[e,i]}var fM=new Mi(!0);function Es(r){var t=r.stroke;return!(t==null||t==="none"||!(r.lineWidth>0))}function $d(r){return typeof r=="string"&&r!=="none"}function Os(r){var t=r.fill;return t!=null&&t!=="none"}function qd(r,t){if(t.fillOpacity!=null&&t.fillOpacity!==1){var e=r.globalAlpha;r.globalAlpha=t.fillOpacity*t.opacity,r.fill(),r.globalAlpha=e}else r.fill()}function Kd(r,t){if(t.strokeOpacity!=null&&t.strokeOpacity!==1){var e=r.globalAlpha;r.globalAlpha=t.strokeOpacity*t.opacity,r.stroke(),r.globalAlpha=e}else r.stroke()}function Uf(r,t,e){var i=Ly(t.image,t.__image,e);if(Js(i)){var n=r.createPattern(i,t.repeat||"repeat");if(typeof DOMMatrix=="function"&&n&&n.setTransform){var a=new DOMMatrix;a.translateSelf(t.x||0,t.y||0),a.rotateSelf(0,0,(t.rotation||0)*k1),a.scaleSelf(t.scaleX||1,t.scaleY||1),n.setTransform(a)}return n}}function hM(r,t,e,i){var n,a=Es(e),o=Os(e),s=e.strokePercent,l=s<1,u=!t.path;(!t.silent||l)&&u&&t.createPathProxy();var f=t.path||fM,h=t.__dirty;if(!i){var c=e.fill,v=e.stroke,d=o&&!!c.colorStops,g=a&&!!v.colorStops,y=o&&!!c.image,p=a&&!!v.image,m=void 0,_=void 0,S=void 0,w=void 0,b=void 0;(d||g)&&(b=t.getBoundingRect()),d&&(m=h?Wf(r,c,b):t.__canvasFillGradient,t.__canvasFillGradient=m),g&&(_=h?Wf(r,v,b):t.__canvasStrokeGradient,t.__canvasStrokeGradient=_),y&&(S=h||!t.__canvasFillPattern?Uf(r,c,t):t.__canvasFillPattern,t.__canvasFillPattern=S),p&&(w=h||!t.__canvasStrokePattern?Uf(r,v,t):t.__canvasStrokePattern,t.__canvasStrokePattern=w),d?r.fillStyle=m:y&&(S?r.fillStyle=S:o=!1),g?r.strokeStyle=_:p&&(w?r.strokeStyle=w:a=!1)}var x=t.getGlobalScale();f.setScale(x[0],x[1],t.segmentIgnoreThreshold);var C,D;r.setLineDash&&e.lineDash&&(n=h0(t),C=n[0],D=n[1]);var A=!0;(u||h&tn)&&(f.setDPR(r.dpr),l?f.setContext(null):(f.setContext(r),A=!1),f.reset(),t.buildPath(f,t.shape,i),f.toStatic(),t.pathUpdated()),A&&f.rebuildPath(r,l?s:1),C&&(r.setLineDash(C),r.lineDashOffset=D),i||(e.strokeFirst?(a&&Kd(r,e),o&&qd(r,e)):(o&&qd(r,e),a&&Kd(r,e))),C&&r.setLineDash([])}function cM(r,t,e){var i=t.__image=Ly(e.image,t.__image,t,t.onload);if(!(!i||!Js(i))){var n=e.x||0,a=e.y||0,o=t.getWidth(),s=t.getHeight(),l=i.width/i.height;if(o==null&&s!=null?o=s*l:s==null&&o!=null?s=o/l:o==null&&s==null&&(o=i.width,s=i.height),e.sWidth&&e.sHeight){var u=e.sx||0,f=e.sy||0;r.drawImage(i,u,f,e.sWidth,e.sHeight,n,a,o,s)}else if(e.sx&&e.sy){var u=e.sx,f=e.sy,h=o-u,c=s-f;r.drawImage(i,u,f,h,c,n,a,o,s)}else r.drawImage(i,n,a,o,s)}}function vM(r,t,e){var i,n=e.text;if(n!=null&&(n+=""),n){r.font=e.font||Rr,r.textAlign=e.textAlign,r.textBaseline=e.textBaseline;var a=void 0,o=void 0;r.setLineDash&&e.lineDash&&(i=h0(t),a=i[0],o=i[1]),a&&(r.setLineDash(a),r.lineDashOffset=o),e.strokeFirst?(Es(e)&&r.strokeText(n,e.x,e.y),Os(e)&&r.fillText(n,e.x,e.y)):(Os(e)&&r.fillText(n,e.x,e.y),Es(e)&&r.strokeText(n,e.x,e.y)),a&&r.setLineDash([])}}var Qd=["shadowBlur","shadowOffsetX","shadowOffsetY"],Jd=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function c0(r,t,e,i,n){var a=!1;if(!i&&(e=e||{},t===e))return!1;if(i||t.opacity!==e.opacity){te(r,n),a=!0;var o=Math.max(Math.min(t.opacity,1),0);r.globalAlpha=isNaN(o)?bi.opacity:o}(i||t.blend!==e.blend)&&(a||(te(r,n),a=!0),r.globalCompositeOperation=t.blend||bi.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,n){if(!this[Lt]){if(this._disposed){this.id;return}var a,o,s;if(q(i)&&(n=i.lazyUpdate,a=i.silent,o=i.replaceMerge,s=i.transition,i=i.notMerge),this[Lt]=!0,qi(this),!this._model||i){var l=new CT(this._api),u=this._theme,f=this._model=new uc;f.scheduler=this._scheduler,f.ssr=this._ssr,f.init(null,null,null,u,this._locale,l)}this._model.setOption(e,{replaceMerge:o},qf);var h={seriesTransition:s,optionChanged:!0};if(n)this[kt]={silent:a,updateParams:h},this[Lt]=!1,this.getZr().wakeUp();else{try{hi(this),ir.update.call(this,null,h)}catch(c){throw this[kt]=null,this[Lt]=!1,c}this._ssr||this._zr.flush(),this[kt]=null,this[Lt]=!1,Zi.call(this,a),$i.call(this,a)}}},t.prototype.setTheme=function(e,i){if(!this[Lt]){if(this._disposed){this.id;return}var n=this._model;if(n){var a=i&&i.silent,o=null;this[kt]&&(a==null&&(a=this[kt].silent),o=this[kt].updateParams,this[kt]=null),this[Lt]=!0,qi(this);try{this._updateTheme(e),n.setTheme(this._theme),hi(this),ir.update.call(this,{type:"setTheme"},o)}catch(s){throw this[Lt]=!1,s}this[Lt]=!1,Zi.call(this,a),$i.call(this,a)}}},t.prototype._updateTheme=function(e){Y(e)&&(e=L0[e]),e&&(e=at(e),e&&Fm(e,!0),this._theme=e)},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||et.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(e){return this.renderToCanvas(e)},t.prototype.renderToCanvas=function(e){e=e||{};var i=this._zr.painter;return i.getRenderedCanvas({backgroundColor:e.backgroundColor||this._model.get("backgroundColor"),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(e){e=e||{};var i=this._zr.painter;return i.renderToString({useViewBox:e.useViewBox})},t.prototype.getSvgDataURL=function(){var e=this._zr,i=e.storage.getDisplayList();return T(i,function(n){n.stopAnimation(null,!0)}),e.painter.toDataURL()},t.prototype.getDataURL=function(e){if(this._disposed){this.id;return}e=e||{};var i=e.excludeComponents,n=this._model,a=[],o=this;T(i,function(l){n.eachComponent({mainType:l},function(u){var f=o._componentsMap[u.__viewId];f.group.ignore||(a.push(f),f.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(e).toDataURL("image/"+(e&&e.type||"png"));return T(a,function(l){l.group.ignore=!1}),s},t.prototype.getConnectedDataURL=function(e){if(this._disposed){this.id;return}var i=e.type==="svg",n=this.group,a=Math.min,o=Math.max,s=1/0;if(vp[n]){var l=s,u=s,f=-s,h=-s,c=[],v=e&&e.pixelRatio||this.getDevicePixelRatio();T(ca,function(_,S){if(_.group===n){var w=i?_.getZr().painter.getSvgDom().innerHTML:_.renderToCanvas(at(e)),b=_.getDom().getBoundingClientRect();l=a(b.left,l),u=a(b.top,u),f=o(b.right,f),h=o(b.bottom,h),c.push({dom:w,left:b.left,top:b.top})}}),l*=v,u*=v,f*=v,h*=v;var d=f-l,g=h-u,y=fr.createCanvas(),p=pv(y,{renderer:i?"svg":"canvas"});if(p.resize({width:d,height:g}),i){var m="";return T(c,function(_){var S=_.left-l,w=_.top-u;m+=''+_.dom+""}),p.painter.getSvgRoot().innerHTML=m,e.connectedBackgroundColor&&p.painter.setBackgroundColor(e.connectedBackgroundColor),p.refreshImmediately(),p.painter.toDataURL()}else return e.connectedBackgroundColor&&p.add(new _t({shape:{x:0,y:0,width:d,height:g},style:{fill:e.connectedBackgroundColor}})),T(c,function(_){var S=new vr({style:{x:_.left*v-l,y:_.top*v-u,image:_.dom}});p.add(S)}),p.refreshImmediately(),y.toDataURL("image/"+(e&&e.type||"png"))}else return this.getDataURL(e)},t.prototype.convertToPixel=function(e,i,n){return Io(this,"convertToPixel",e,i,n)},t.prototype.convertToLayout=function(e,i,n){return Io(this,"convertToLayout",e,i,n)},t.prototype.convertFromPixel=function(e,i,n){return Io(this,"convertFromPixel",e,i,n)},t.prototype.containPixel=function(e,i){if(this._disposed){this.id;return}var n=this._model,a,o=Hl(n,e);return T(o,function(s,l){l.indexOf("Models")>=0&&T(s,function(u){var f=u.coordinateSystem;if(f&&f.containPoint)a=a||!!f.containPoint(i);else if(l==="seriesModels"){var h=this._chartsMap[u.__viewId];h&&h.containPoint&&(a=a||h.containPoint(i,u))}},this)},this),!!a},t.prototype.getVisual=function(e,i){var n=this._model,a=Hl(n,e,{defaultMainType:"series"}),o=a.seriesModel,s=o.getData(),l=a.hasOwnProperty("dataIndexInside")?a.dataIndexInside:a.hasOwnProperty("dataIndex")?s.indexOfRawIndex(a.dataIndex):null;return l!=null?ZC(s,l,i):f0(s,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=this;T(zM,function(n){var a=function(o){var s=e.getModel(),l=o.target,u,f=n==="globalout";if(f?u={}:l&&jn(l,function(g){var y=ft(g);if(y&&y.dataIndex!=null){var p=y.dataModel||s.getSeriesByIndex(y.seriesIndex);return u=p&&p.getDataParams(y.dataIndex,y.dataType,l)||{},!0}else if(y.eventData)return u=z({},y.eventData),!0},!0),u){var h=u.componentType,c=u.componentIndex;(h==="markLine"||h==="markPoint"||h==="markArea")&&(h="series",c=u.seriesIndex);var v=h&&c!=null&&s.getComponent(h,c),d=v&&e[v.mainType==="series"?"_chartsMap":"_componentsMap"][v.__viewId];u.event=o,u.type=n,e._$eventProcessor.eventInfo={targetEl:l,packedEvent:u,model:v,view:d},e.trigger(n,u)}};a.zrEventfulCallAtLast=!0,e._zr.on(n,a,e)});var i=this._messageCenter;T(Zf,function(n,a){i.on(a,function(o){e.trigger(a,o)})}),$C(i,this,this._api)},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0;var e=this.getDom();e&&My(this.getDom(),Sc,"");var i=this,n=i._api,a=i._model;T(i._componentsViews,function(o){o.dispose(a,n)}),T(i._chartsViews,function(o){o.dispose(a,n)}),i._zr.dispose(),i._dom=i._model=i._chartsMap=i._componentsMap=i._chartsViews=i._componentsViews=i._scheduler=i._api=i._zr=i._throttledZrFlush=i._theme=i._coordSysMgr=i._messageCenter=null,delete ca[i.id]},t.prototype.resize=function(e){if(!this[Lt]){if(this._disposed){this.id;return}this._zr.resize(e);var i=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!i){var n=i.resetOption("media"),a=e&&e.silent;this[kt]&&(a==null&&(a=this[kt].silent),n=!0,this[kt]=null),this[Lt]=!0,qi(this);try{n&&hi(this),ir.update.call(this,{type:"resize",animation:z({duration:0},e&&e.animation)})}catch(o){throw this[Lt]=!1,o}this[Lt]=!1,Zi.call(this,a),$i.call(this,a)}}},t.prototype.showLoading=function(e,i){if(this._disposed){this.id;return}if(q(e)&&(i=e,e=""),e=e||"default",this.hideLoading(),!!Kf[e]){var n=Kf[e](this._api,i),a=this._zr;this._loadingFX=n,a.add(n)}},t.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},t.prototype.makeActionFromEvent=function(e){var i=z({},e);return i.type=Xf[e.type],i},t.prototype.dispatchAction=function(e,i){if(this._disposed){this.id;return}if(q(i)||(i={silent:!!i}),!!Bs[e.type]&&this._model){if(this[Lt]){this._pendingActions.push(e);return}var n=i.silent;bu.call(this,e,n);var a=i.flush;a?this._zr.flush():a!==!1&&et.browser.weChat&&this._throttledZrFlush(),Zi.call(this,n),$i.call(this,n)}},t.prototype.updateLabelLayout=function(){Ae.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed){this.id;return}var i=e.seriesIndex,n=this.getModel(),a=n.getSeriesByIndex(i);a.appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()},t.internalField=function(){hi=function(h){var c=h._scheduler;c.restorePipelines(h._model),c.prepareStageTasks(),_u(h,!0),_u(h,!1),c.plan()},_u=function(h,c){for(var v=h._model,d=h._scheduler,g=c?h._componentsViews:h._chartsViews,y=c?h._componentsMap:h._chartsMap,p=h._zr,m=h._api,_=0;_c.get("hoverLayerThreshold")&&!et.node&&!et.worker&&c.eachSeries(function(y){if(!y.preventUsingHoverLayer){var p=h._chartsMap[y.__viewId];p.__alive&&p.eachRendered(function(m){m.states.emphasis&&(m.states.emphasis.hoverLayer=!0)})}})}function s(h,c){var v=h.get("blendMode")||null;c.eachRendered(function(d){d.isGroup||(d.style.blend=v)})}function l(h,c){if(!h.preventAutoZ){var v=Xh(h);c.eachRendered(function(d){return Zh(d,v.z,v.zlevel),!0})}}function u(h,c){c.eachRendered(function(v){if(!sa(v)){var d=v.getTextContent(),g=v.getTextGuideLine();v.stateTransition&&(v.stateTransition=null),d&&d.stateTransition&&(d.stateTransition=null),g&&g.stateTransition&&(g.stateTransition=null),v.hasState()?(v.prevStates=v.currentStates,v.clearStates()):v.prevStates&&(v.prevStates=null)}})}function f(h,c){var v=h.getModel("stateAnimation"),d=h.isAnimationEnabled(),g=v.get("duration"),y=g>0?{duration:g,delay:v.get("delay"),easing:v.get("easing")}:null;c.eachRendered(function(p){if(p.states&&p.states.emphasis){if(sa(p))return;if(p instanceof vt&&Fw(p),p.__dirty){var m=p.prevStates;m&&p.useStates(m)}if(d){p.stateTransition=y;var _=p.getTextContent(),S=p.getTextGuideLine();_&&(_.stateTransition=y),S&&(S.stateTransition=y)}p.__dirty&&a(p)}})}hp=function(h){return new(function(c){F(v,c);function v(){return c!==null&&c.apply(this,arguments)||this}return v.prototype.getCoordinateSystems=function(){return h._coordSysMgr.getCoordinateSystems()},v.prototype.getComponentByElement=function(d){for(;d;){var g=d.__ecComponentInfo;if(g!=null)return h._model.getComponent(g.mainType,g.index);d=d.parent}},v.prototype.enterEmphasis=function(d,g){ba(d,g),fe(h)},v.prototype.leaveEmphasis=function(d,g){wa(d,g),fe(h)},v.prototype.enterBlur=function(d){Hy(d),fe(h)},v.prototype.leaveBlur=function(d){Nh(d),fe(h)},v.prototype.enterSelect=function(d){Wy(d),fe(h)},v.prototype.leaveSelect=function(d){Uy(d),fe(h)},v.prototype.getModel=function(){return h.getModel()},v.prototype.getViewOfComponentModel=function(d){return h.getViewOfComponentModel(d)},v.prototype.getViewOfSeriesModel=function(d){return h.getViewOfSeriesModel(d)},v.prototype.getMainProcessVersion=function(){return h[Ao]},v}(Nm))(h)},D0=function(h){function c(v,d){for(var g=0;g=0)){dp.push(e);var a=a0.wrapStageHandler(e,n);a.__prio=t,a.__raw=e,r.push(a)}}function R0(r,t){Kf[r]=t}function XM(r,t,e){var i=xM("registerMap");i&&i(r,t,e)}var ZM=tC;Ri(mc,IC);Ri(gl,PC);Ri(gl,kC);Ri(mc,YC);Ri(gl,XC);Ri(b0,bM);P0(Fm);k0(MM,NT);R0("default",RC);Mn({type:wi,event:wi,update:wi},ee);Mn({type:ts,event:ts,update:ts},ee);Mn({type:ws,event:Oh,update:ws,action:ee,refineEvent:xc,publishNonRefinedEvent:!0});Mn({type:Mf,event:Oh,update:Mf,action:ee,refineEvent:xc,publishNonRefinedEvent:!0});Mn({type:xs,event:Oh,update:xs,action:ee,refineEvent:xc,publishNonRefinedEvent:!0});function xc(r,t,e,i){return{eventContent:{selected:Ew(e),isFromClick:t.isFromClick||!1}}}I0("default",{});I0("dark",u0);function Nn(r){return r==null?0:r.length||1}function pp(r){return r}var $M=function(){function r(t,e,i,n,a,o){this._old=t,this._new=e,this._oldKeyGetter=i||pp,this._newKeyGetter=n||pp,this.context=a,this._diffModeMultiple=o==="multiple"}return r.prototype.add=function(t){return this._add=t,this},r.prototype.update=function(t){return this._update=t,this},r.prototype.updateManyToOne=function(t){return this._updateManyToOne=t,this},r.prototype.updateOneToMany=function(t){return this._updateOneToMany=t,this},r.prototype.updateManyToMany=function(t){return this._updateManyToMany=t,this},r.prototype.remove=function(t){return this._remove=t,this},r.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},r.prototype._executeOneToOne=function(){var t=this._old,e=this._new,i={},n=new Array(t.length),a=new Array(e.length);this._initIndexMap(t,null,n,"_oldKeyGetter"),this._initIndexMap(e,i,a,"_newKeyGetter");for(var o=0;o1){var f=l.shift();l.length===1&&(i[s]=l[0]),this._update&&this._update(f,o)}else u===1?(i[s]=null,this._update&&this._update(l,o)):this._remove&&this._remove(o)}this._performRestAdd(a,i)},r.prototype._executeMultiple=function(){var t=this._old,e=this._new,i={},n={},a=[],o=[];this._initIndexMap(t,i,a,"_oldKeyGetter"),this._initIndexMap(e,n,o,"_newKeyGetter");for(var s=0;s1&&c===1)this._updateManyToOne&&this._updateManyToOne(f,u),n[l]=null;else if(h===1&&c>1)this._updateOneToMany&&this._updateOneToMany(f,u),n[l]=null;else if(h===1&&c===1)this._update&&this._update(f,u),n[l]=null;else if(h>1&&c>1)this._updateManyToMany&&this._updateManyToMany(f,u),n[l]=null;else if(h>1)for(var v=0;v1)for(var s=0;s30}var zn=q,_r=Z,eD=typeof Int32Array>"u"?Array:Int32Array,rD="e\0\0",gp=-1,iD=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],nD=["_approximateExtent"],yp,ko,Fn,Vn,Tu,Gn,Cu,ss=function(){function r(t,e){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","minmaxDownSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","minmaxDownSample","lttbDownSample"];var i,n=!1;O0(t)?(i=t.dimensions,this._dimOmitted=t.isDimensionOmitted(),this._schema=t):(n=!0,i=t),i=i||["x","y"];for(var a={},o=[],s={},l=!1,u={},f=0;f=e)){var i=this._store,n=i.getProvider();this._updateOrdinalMeta();var a=this._nameList,o=this._idList,s=n.getSource().sourceFormat,l=s===le;if(l&&!n.pure)for(var u=[],f=t;f0},r.prototype.ensureUniqueItemVisual=function(t,e){var i=this._itemVisuals,n=i[t];n||(n=i[t]={});var a=n[e];return a==null&&(a=this.getVisual(e),V(a)?a=a.slice():zn(a)&&(a=z({},a)),n[e]=a),a},r.prototype.setItemVisual=function(t,e,i){var n=this._itemVisuals[t]||{};this._itemVisuals[t]=n,zn(e)?z(n,e):n[e]=i},r.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},r.prototype.setLayout=function(t,e){zn(t)?z(this._layout,t):this._layout[t]=e},r.prototype.getLayout=function(t){return this._layout[t]},r.prototype.getItemLayout=function(t){return this._itemLayouts[t]},r.prototype.setItemLayout=function(t,e,i){this._itemLayouts[t]=i?z(this._itemLayouts[t]||{},e):e},r.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},r.prototype.setItemGraphicEl=function(t,e){var i=this.hostModel&&this.hostModel.seriesIndex;Sw(i,this.dataType,t,e),this._graphicEls[t]=e},r.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},r.prototype.eachItemGraphicEl=function(t,e){T(this._graphicEls,function(i,n){i&&t&&t.call(e,i,n)})},r.prototype.cloneShallow=function(t){return t||(t=new r(this._schema?this._schema:_r(this.dimensions,this._getDimInfo,this),this.hostModel)),Tu(t,this),t._store=this._store,t},r.prototype.wrapMethod=function(t,e){var i=this[t];tt(i)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var n=i.apply(this,arguments);return e.apply(this,[n].concat(Sh(arguments)))})},r.internalField=function(){yp=function(t){var e=t._invertedIndicesMap;T(e,function(i,n){var a=t._dimInfos[n],o=a.ordinalMeta,s=t._store;if(o){i=e[n]=new eD(o.categories.length);for(var l=0;l1&&(l+="__ec__"+f),n[e]=l}}}(),r}();function aD(r,t){fc(r)||(r=Vm(r)),t=t||{};var e=t.coordDimensions||[],i=t.dimensionsDefine||r.dimensionsDefine||[],n=rt(),a=[],o=sD(r,e,i,t.dimensionsCount),s=t.canOmitUnusedDimensions&&z0(o),l=i===r.dimensionsDefine,u=l?N0(r):B0(i),f=t.encodeDefine;!f&&t.encodeDefaulter&&(f=t.encodeDefaulter(r,o));for(var h=rt(f),c=new $m(o),v=0;v0&&(i.name=n+(a-1)),a++,t.set(n,a)}}function sD(r,t,e,i){var n=Math.max(r.dimensionsDetectedCount||1,t.length,e.length,i||0);return T(t,function(a){var o;q(a)&&(o=a.dimsDef)&&(n=Math.max(n,o.length))}),n}function lD(r,t,e){if(e||t.hasKey(r)){for(var i=0;t.hasKey(r+i);)i++;r+=i}return t.set(r,!0),r}var uD=function(){function r(t){this.coordSysDims=[],this.axisMap=rt(),this.categoryAxisMap=rt(),this.coordSysName=t}return r}();function fD(r){var t=r.get("coordinateSystem"),e=new uD(t),i=hD[t];if(i)return i(r,e,e.axisMap,e.categoryAxisMap),e}var hD={cartesian2d:function(r,t,e,i){var n=r.getReferringComponents("xAxis",Yt).models[0],a=r.getReferringComponents("yAxis",Yt).models[0];t.coordSysDims=["x","y"],e.set("x",n),e.set("y",a),Ki(n)&&(i.set("x",n),t.firstCategoryDimIndex=0),Ki(a)&&(i.set("y",a),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},singleAxis:function(r,t,e,i){var n=r.getReferringComponents("singleAxis",Yt).models[0];t.coordSysDims=["single"],e.set("single",n),Ki(n)&&(i.set("single",n),t.firstCategoryDimIndex=0)},polar:function(r,t,e,i){var n=r.getReferringComponents("polar",Yt).models[0],a=n.findAxisModel("radiusAxis"),o=n.findAxisModel("angleAxis");t.coordSysDims=["radius","angle"],e.set("radius",a),e.set("angle",o),Ki(a)&&(i.set("radius",a),t.firstCategoryDimIndex=0),Ki(o)&&(i.set("angle",o),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},geo:function(r,t,e,i){t.coordSysDims=["lng","lat"]},parallel:function(r,t,e,i){var n=r.ecModel,a=n.getComponent("parallel",r.get("parallelIndex")),o=t.coordSysDims=a.dimensions.slice();T(a.parallelAxisIndex,function(s,l){var u=n.getComponent("parallelAxis",s),f=o[l];e.set(f,u),Ki(u)&&(i.set(f,u),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=l))})},matrix:function(r,t,e,i){var n=r.getReferringComponents("matrix",Yt).models[0];t.coordSysDims=["x","y"];var a=n.getDimensionModel("x"),o=n.getDimensionModel("y");e.set("x",a),e.set("y",o),i.set("x",a),i.set("y",o)}};function Ki(r){return r.get("type")==="category"}function cD(r,t,e){e=e||{};var i=e.byIndex,n=e.stackedCoordDimension,a,o,s;vD(t)?a=t:(o=t.schema,a=o.dimensions,s=t.store);var l=!!(r&&r.get("stack")),u,f,h,c;if(T(a,function(m,_){Y(m)&&(a[_]=m={name:m}),l&&!m.isExtraCoord&&(!i&&!u&&m.ordinalMeta&&(u=m),!f&&m.type!=="ordinal"&&m.type!=="time"&&(!n||n===m.coordDim)&&(f=m))}),f&&!i&&!u&&(i=!0),f){h="__\0ecstackresult_"+r.id,c="__\0ecstackedover_"+r.id,u&&(u.createInvertedIndices=!0);var v=f.coordDim,d=f.type,g=0;T(a,function(m){m.coordDim===v&&g++});var y={name:h,coordDim:v,coordDimIndex:g,type:d,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},p={name:c,coordDim:c,coordDimIndex:g+1,type:d,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(y.storeDimIndex=s.ensureCalculationDimension(c,d),p.storeDimIndex=s.ensureCalculationDimension(h,d)),o.appendCalculationDimension(y),o.appendCalculationDimension(p)):(a.push(y),a.push(p))}return{stackedDimension:f&&f.name,stackedByDimension:u&&u.name,isStackedByIndex:i,stackedOverDimension:c,stackResultDimension:h}}function vD(r){return!O0(r.schema)}function Ii(r,t){return!!t&&t===r.getCalculationInfo("stackedDimension")}function F0(r,t){return Ii(r,t)?r.getCalculationInfo("stackResultDimension"):t}function dD(r,t){var e=r.get("coordinateSystem"),i=ac.get(e),n;return t&&t.coordSysDims&&(n=Z(t.coordSysDims,function(a){var o={name:a},s=t.axisMap.get(a);if(s){var l=s.get("type");o.type=QM(l)}return o})),n||(n=i&&(i.getDimensionsInfo?i.getDimensionsInfo():i.dimensions.slice())||["x","y"]),n}function pD(r,t,e){var i,n;return e&&T(r,function(a,o){var s=a.coordDim,l=e.categoryAxisMap.get(s);l&&(i==null&&(i=o),a.ordinalMeta=l.getOrdinalMeta(),t&&(a.createInvertedIndices=!0)),a.otherDims.itemName!=null&&(n=!0)}),!n&&i!=null&&(r[i].otherDims.itemName=0),i}function Tc(r,t,e){e=e||{};var i=t.getSourceManager(),n,a=!1;n=i.getSource(),a=n.sourceFormat===le;var o=fD(t),s=dD(t,o),l=e.useEncodeDefaulter,u=tt(l)?l:l?St(cT,s,t):null,f={coordDimensions:s,generateCoord:e.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!a},h=aD(n,f),c=pD(h.dimensions,e.createInvertedIndices,o),v=a?null:i.getSharedDataStore(h),d=cD(t,{schema:h,store:v}),g=new ss(h,t);g.setCalculationInfo(d);var y=c!=null&&gD(n)?function(p,m,_,S){return S===c?_:this.defaultDimValueGetter(p,m,_,S)}:null;return g.hasItemOption=!1,g.initData(a?n:v,null,y),g}function gD(r){if(r.sourceFormat===le){var t=yD(r.data||[]);return!V(Fa(t))}}function yD(r){for(var t=0;tn&&(o=a.interval=n);var s=a.intervalPrecision=ka(o),l=a.niceTickExtent=[Ot(Math.ceil(r[0]/o)*o,s),Ot(Math.floor(r[1]/o)*o,s)];return _D(l,r),a}function Mu(r){var t=Math.pow(10,Ah(r)),e=r/t;return e?e===2?e=3:e===3?e=5:e*=2:e=1,Ot(e*t)}function ka(r){return Ue(r)+2}function mp(r,t,e){r[t]=Math.max(Math.min(r[t],e[1]),e[0])}function _D(r,t){!isFinite(r[0])&&(r[0]=t[0]),!isFinite(r[1])&&(r[1]=t[1]),mp(r,0,t),mp(r,1,t),r[0]>r[1]&&(r[0]=r[1])}function Cc(r,t){return r>=t[0]&&r<=t[1]}var SD=function(){function r(){this.normalize=_p,this.scale=Sp}return r.prototype.updateMethods=function(t){t.hasBreaks()?(this.normalize=nt(t.normalize,t),this.scale=nt(t.scale,t)):(this.normalize=_p,this.scale=Sp)},r}();function _p(r,t){return t[1]===t[0]?.5:(r-t[0])/(t[1]-t[0])}function Sp(r,t){return r*(t[1]-t[0])+t[0]}function Jf(r,t,e){var i=Math.log(r);return[Math.log(e?t[0]:Math.max(0,t[0]))/i,Math.log(e?t[1]:Math.max(0,t[1]))/i]}var zr=function(){function r(t){this._calculator=new SD,this._setting=t||{},this._extent=[1/0,-1/0]}return r.prototype.getSetting=function(t){return this._setting[t]},r.prototype._innerUnionExtent=function(t){var e=this._extent;this._innerSetExtent(t[0]e[1]?t[1]:e[1])},r.prototype.unionExtentFromData=function(t,e){this._innerUnionExtent(t.getApproximateExtent(e))},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.setExtent=function(t,e){this._innerSetExtent(t,e)},r.prototype._innerSetExtent=function(t,e){var i=this._extent;isNaN(t)||(i[0]=t),isNaN(e)||(i[1]=e),this._brkCtx&&this._brkCtx.update(i)},r.prototype.setBreaksFromOption=function(t){},r.prototype._innerSetBreak=function(t){this._brkCtx&&(this._brkCtx.setBreaks(t),this._calculator.updateMethods(this._brkCtx),this._brkCtx.update(this._extent))},r.prototype._innerGetBreaks=function(){return this._brkCtx?this._brkCtx.breaks:[]},r.prototype.hasBreaks=function(){return this._brkCtx?this._brkCtx.hasBreaks():!1},r.prototype._getExtentSpanWithBreaks=function(){return this._brkCtx&&this._brkCtx.hasBreaks()?this._brkCtx.getExtentSpan():this._extent[1]-this._extent[0]},r.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},r.prototype.isBlank=function(){return this._isBlank},r.prototype.setBlank=function(t){this._isBlank=t},r}();Qs(zr);var bD=0,jf=function(){function r(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++bD,this._onCollect=t.onCollect}return r.createByAxisModel=function(t){var e=t.option,i=e.data,n=i&&Z(i,wD);return new r({categories:n,needCollect:!n,deduplication:e.dedplication!==!1})},r.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},r.prototype.parseAndCollect=function(t){var e,i=this._needCollect;if(!Y(t)&&!i)return t;if(i&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,this._onCollect&&this._onCollect(t,e),e;var n=this._getOrCreateMap();return e=n.get(t),e==null&&(i?(e=this.categories.length,this.categories[e]=t,n.set(t,e),this._onCollect&&this._onCollect(t,e)):e=NaN),e},r.prototype._getOrCreateMap=function(){return this._map||(this._map=rt(this.categories))},r}();function wD(r){return q(r)&&r.value!=null?r.value:r+""}var V0=function(r){F(t,r);function t(e){var i=r.call(this,e)||this;i.type="ordinal";var n=i.getSetting("ordinalMeta");return n||(n=new jf({})),V(n)&&(n=new jf({categories:Z(n,function(a){return q(a)?a.value:a})})),i._ordinalMeta=n,i._extent=i.getSetting("extent")||[0,n.categories.length-1],i}return t.prototype.parse=function(e){return e==null?NaN:Y(e)?this._ordinalMeta.getOrdinal(e):Math.round(e)},t.prototype.contain=function(e){return Cc(e,this._extent)&&e>=0&&e=0&&e=0&&e=e},t.prototype.getOrdinalMeta=function(){return this._ordinalMeta},t.prototype.calcNiceTicks=function(){},t.prototype.calcNiceExtent=function(){},t.type="ordinal",t}(zr);zr.registerClass(V0);var Sr=Ot,mn=function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="interval",e._interval=0,e._intervalPrecision=2,e}return t.prototype.parse=function(e){return e==null||e===""?NaN:Number(e)},t.prototype.contain=function(e){return Cc(e,this._extent)},t.prototype.normalize=function(e){return this._calculator.normalize(e,this._extent)},t.prototype.scale=function(e){return this._calculator.scale(e,this._extent)},t.prototype.getInterval=function(){return this._interval},t.prototype.setInterval=function(e){this._interval=e,this._niceExtent=this._extent.slice(),this._intervalPrecision=ka(e)},t.prototype.getTicks=function(e){e=e||{};var i=this._interval,n=this._extent,a=this._niceExtent,o=this._intervalPrecision,s=As(),l=[];if(!i)return l;e.breakTicks;var u=1e4;n[0]=0&&(h=Sr(h+c*i,o))}if(l.length>0&&h===l[l.length-1].value)break;if(l.length>u)return[]}var v=l.length?l[l.length-1].value:a[1];return n[1]>v&&(e.expandToNicedExtent?l.push({value:Sr(v+i,o)}):l.push({value:n[1]})),e.breakTicks,l},t.prototype.getMinorTicks=function(e){for(var i=this.getTicks({expandToNicedExtent:!0}),n=[],a=this.getExtent(),o=1;oa[0]&&d0&&(a=a===null?s:Math.min(a,s))}e[i]=a}}return e}function U0(r){var t=CD(r),e=[];return T(r,function(i){var n=i.coordinateSystem,a=n.getBaseAxis(),o=a.getExtent(),s;if(a.type==="category")s=a.getBandWidth();else if(a.type==="value"||a.type==="time"){var l=a.dim+"_"+a.index,u=t[l],f=Math.abs(o[1]-o[0]),h=a.scale.getExtent(),c=Math.abs(h[1]-h[0]);s=u?f/c*u:f}else{var v=i.getData();s=Math.abs(o[1]-o[0])/v.count()}var d=Pt(i.get("barWidth"),s),g=Pt(i.get("barMaxWidth"),s),y=Pt(i.get("barMinWidth")||(X0(i)?.5:1),s),p=i.get("barGap"),m=i.get("barCategoryGap"),_=i.get("defaultBarGap");e.push({bandWidth:s,barWidth:d,barMaxWidth:g,barMinWidth:y,barGap:p,barCategoryGap:m,defaultBarGap:_,axisKey:Mc(a),stackId:H0(i)})}),MD(e)}function MD(r){var t={};T(r,function(i,n){var a=i.axisKey,o=i.bandWidth,s=t[a]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:i.defaultBarGap||0,stacks:{}},l=s.stacks;t[a]=s;var u=i.stackId;l[u]||s.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var f=i.barWidth;f&&!l[u].width&&(l[u].width=f,f=Math.min(s.remainedWidth,f),s.remainedWidth-=f);var h=i.barMaxWidth;h&&(l[u].maxWidth=h);var c=i.barMinWidth;c&&(l[u].minWidth=c);var v=i.barGap;v!=null&&(s.gap=v);var d=i.barCategoryGap;d!=null&&(s.categoryGap=d)});var e={};return T(t,function(i,n){e[n]={};var a=i.stacks,o=i.bandWidth,s=i.categoryGap;if(s==null){var l=xt(a).length;s=Math.max(35-l*4,15)+"%"}var u=Pt(s,o),f=Pt(i.gap,1),h=i.remainedWidth,c=i.autoWidthCount,v=(h-u)/(c+(c-1)*f);v=Math.max(v,0),T(a,function(p){var m=p.maxWidth,_=p.minWidth;if(p.width){var S=p.width;m&&(S=Math.min(S,m)),_&&(S=Math.max(S,_)),p.width=S,h-=S+f*S,c--}else{var S=v;m&&mS&&(S=_),S!==v&&(p.width=S,h-=S+f*S,c--)}}),v=(h-u)/(c+(c-1)*f),v=Math.max(v,0);var d=0,g;T(a,function(p,m){p.width||(p.width=v),g=p,d+=p.width*(1+f)}),g&&(d-=g.width*f);var y=-d/2;T(a,function(p,m){e[n][m]=e[n][m]||{bandWidth:o,offset:y,width:p.width},y+=p.width*(1+f)})}),e}function DD(r,t,e){if(r&&t){var i=r[Mc(t)];return i}}function AD(r,t){var e=W0(r,t),i=U0(e);T(e,function(n){var a=n.getData(),o=n.coordinateSystem,s=o.getBaseAxis(),l=H0(n),u=i[Mc(s)][l],f=u.offset,h=u.width;a.setLayout({bandWidth:u.bandWidth,offset:f,size:h})})}function LD(r){return{seriesType:r,plan:dc(),reset:function(t){if(Y0(t)){var e=t.getData(),i=t.coordinateSystem,n=i.getBaseAxis(),a=i.getOtherAxis(n),o=e.getDimensionIndex(e.mapDimension(a.dim)),s=e.getDimensionIndex(e.mapDimension(n.dim)),l=t.get("showBackground",!0),u=e.mapDimension(a.dim),f=e.getCalculationInfo("stackResultDimension"),h=Ii(e,u)&&!!e.getCalculationInfo("stackedOnSeries"),c=a.isHorizontal(),v=ID(n,a),d=X0(t),g=t.get("barMinHeight")||0,y=f&&e.getDimensionIndex(f),p=e.getLayout("size"),m=e.getLayout("offset");return{progress:function(_,S){for(var w=_.count,b=d&&sr(w*3),x=d&&l&&sr(w*3),C=d&&sr(w),D=i.master.getRect(),A=c?D.width:D.height,M,I=S.getStore(),L=0;(M=_.next())!=null;){var P=I.get(h?y:o,M),k=I.get(s,M),B=v,U=void 0;h&&(U=+P-I.get(o,M));var O=void 0,H=void 0,R=void 0,E=void 0;if(c){var N=i.dataToPoint([P,k]);if(h){var X=i.dataToPoint([U,k]);B=X[0]}O=B,H=N[1]+m,R=N[0]-B,E=p,Math.abs(R)0?e:1:e))}var PD=function(r,t,e,i){for(;e>>1;r[n][1]n&&(this._approxInterval=n);var o=Ro.length,s=Math.min(PD(Ro,this._approxInterval,0,o),o-1);this._interval=Ro[s][1],this._intervalPrecision=ka(this._interval),this._minLevelUnit=Ro[Math.max(s-1,0)][0]},t.prototype.parse=function(e){return pt(e)?e:+xn(e)},t.prototype.contain=function(e){return Cc(e,this._extent)},t.prototype.normalize=function(e){return this._calculator.normalize(e,this._extent)},t.prototype.scale=function(e){return this._calculator.scale(e,this._extent)},t.type="time",t}(mn),Ro=[["second",Qh],["minute",Jh],["hour",la],["quarter-day",la*6],["half-day",la*12],["day",me*1.2],["half-week",me*3.5],["week",me*7],["month",me*31],["quarter",me*95],["half-year",fd/2],["year",fd]];function kD(r,t,e,i){return Of(new Date(t),r,i).getTime()===Of(new Date(e),r,i).getTime()}function RD(r,t){return r/=me,r>16?16:r>7.5?7:r>3.5?4:r>1.5?2:1}function ED(r){var t=30*me;return r/=t,r>6?6:r>3?3:r>2?2:1}function OD(r){return r/=la,r>12?12:r>6?6:r>3.5?4:r>2?2:1}function bp(r,t){return r/=t?Jh:Qh,r>30?30:r>20?20:r>15?15:r>10?10:r>5?5:r>2?2:1}function BD(r){return Sy(r)}function ND(r,t,e){var i=Math.max(0,ot(xi,t)-1);return Of(new Date(r),xi[i],e).getTime()}function zD(r,t){var e=new Date(0);e[r](1);var i=e.getTime();e[r](1+t);var n=e.getTime()-i;return function(a,o){return Math.max(0,Math.round((o-a)/n))}}function FD(r,t,e,i,n,a){var o=1e4,s=Yx,l=0;function u(L,P,k,B,U,O,H){for(var R=zD(U,L),E=P,N=new Date(E);Eo));)if(N[U](N[B]()+L),E=N.getTime(),a){var X=a.calcNiceTickMultiple(E,R);X>0&&(N[U](N[B]()+X*L),E=N.getTime())}H.push({value:E,notAdd:!0})}function f(L,P,k){var B=[],U=!P.length;if(!kD(ua(L),i[0],i[1],e)){U&&(P=[{value:ND(i[0],L,e)},{value:i[1]}]);for(var O=0;O=i[0]&&H<=i[1]&&u(E,H,R,N,X,J,B),L==="year"&&k.length>1&&O===0&&k.unshift({value:k[0].value-E})}}for(var O=0;O=i[0]&&S<=i[1]&&v++)}var w=n/t;if(v>w*1.5&&d>w/1.5||(h.push(m),v>w||r===s[g]))break}c=[]}}}for(var b=It(Z(h,function(L){return It(L,function(P){return P.value>=i[0]&&P.value<=i[1]&&!P.notAdd})}),function(L){return L.length>0}),x=[],C=b.length-1,g=0;g0;)a*=10;var s=[th(GD(i[0]/a)*a),th(VD(i[1]/a)*a)];this._interval=a,this._intervalPrecision=ka(a),this._niceExtent=s}},t.prototype.calcNiceExtent=function(e){r.prototype.calcNiceExtent.call(this,e),this._fixMin=e.fixMin,this._fixMax=e.fixMax},t.prototype.contain=function(e){return e=Oo(e)/Oo(this.base),r.prototype.contain.call(this,e)},t.prototype.normalize=function(e){return e=Oo(e)/Oo(this.base),r.prototype.normalize.call(this,e)},t.prototype.scale=function(e){return e=r.prototype.scale.call(this,e),Eo(this.base,e)},t.prototype.setBreaksFromOption=function(e){},t.type="log",t}(mn);function Du(r,t){return th(r,Ue(t))}zr.registerClass($0);var HD=function(){function r(t,e,i){this._prepareParams(t,e,i)}return r.prototype._prepareParams=function(t,e,i){i[1]0&&l>0&&!u&&(s=0),s<0&&l<0&&!f&&(l=0));var c=this._determinedMin,v=this._determinedMax;return c!=null&&(s=c,u=!0),v!=null&&(l=v,f=!0),{min:s,max:l,minFixed:u,maxFixed:f,isBlank:h}},r.prototype.modifyDataMinMax=function(t,e){this[UD[t]]=e},r.prototype.setDeterminedMinMax=function(t,e){var i=WD[t];this[i]=e},r.prototype.freeze=function(){this.frozen=!0},r}(),WD={min:"_determinedMin",max:"_determinedMax"},UD={min:"_dataMin",max:"_dataMax"};function q0(r,t,e){var i=r.rawExtentInfo;return i||(i=new HD(r,t,e),r.rawExtentInfo=i,i)}function Bo(r,t){return t==null?null:pa(t)?NaN:r.parse(t)}function K0(r,t){var e=r.type,i=q0(r,t,r.getExtent()).calculate();r.setBlank(i.isBlank);var n=i.min,a=i.max,o=t.ecModel;if(o&&e==="time"){var s=W0("bar",o),l=!1;if(T(s,function(h){l=l||h.getBaseAxis()===t.axis}),l){var u=U0(s),f=YD(n,a,t,u);n=f.min,a=f.max}}return{extent:[n,a],fixMin:i.minFixed,fixMax:i.maxFixed}}function YD(r,t,e,i){var n=e.axis.getExtent(),a=Math.abs(n[1]-n[0]),o=DD(i,e.axis);if(o===void 0)return{min:r,max:t};var s=1/0;T(o,function(v){s=Math.min(v.offset,s)});var l=-1/0;T(o,function(v){l=Math.max(v.offset+v.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,f=t-r,h=1-(s+l)/a,c=f/h-f;return t+=c*(l/u),r-=c*(s/u),{min:r,max:t}}function wp(r,t){var e=t,i=K0(r,e),n=i.extent,a=e.get("splitNumber");r instanceof $0&&(r.base=e.get("logBase"));var o=r.type,s=e.get("interval"),l=o==="interval"||o==="time";r.setBreaksFromOption(j0(e)),r.setExtent(n[0],n[1]),r.calcNiceExtent({splitNumber:a,fixMin:i.fixMin,fixMax:i.fixMax,minInterval:l?e.get("minInterval"):null,maxInterval:l?e.get("maxInterval"):null}),s!=null&&r.setInterval&&r.setInterval(s)}function XD(r,t){if(t=t||r.get("type"),t)switch(t){case"category":return new V0({ordinalMeta:r.getOrdinalMeta?r.getOrdinalMeta():r.getCategories(),extent:[1/0,-1/0]});case"time":return new Z0({locale:r.ecModel.getLocaleModel(),useUTC:r.ecModel.get("useUTC")});default:return new(zr.getClass(t)||mn)}}function ZD(r){var t=r.scale.getExtent(),e=t[0],i=t[1];return!(e>0&&i>0||e<0&&i<0)}function qa(r){var t=r.getLabelModel().get("formatter");if(r.type==="time"){var e=Xx(t);return function(n,a){return r.scale.getFormattedLabel(n,a,e)}}else{if(Y(t))return function(n){var a=r.scale.getLabel(n),o=t.replace("{value}",a??"");return o};if(tt(t)){if(r.type==="category")return function(n,a){return t(zs(r,n),n.value-r.scale.getExtent()[0],null)};var i=As();return function(n,a){var o=null;return i&&(o=i.makeAxisLabelFormatterParamBreak(o,n.break)),t(zs(r,n),a,o)}}else return function(n){return r.scale.getLabel(n)}}}function zs(r,t){return r.type==="category"?r.scale.getLabel(t):t.value}function Dc(r){var t=r.get("interval");return t??"auto"}function Q0(r){return r.type==="category"&&Dc(r.getLabelModel())===0}function J0(r,t){var e={};return T(r.mapDimensionsAll(t),function(i){e[F0(r,i)]=!0}),xt(e)}function $D(r,t,e){t&&T(J0(t,e),function(i){var n=t.getApproximateExtent(i);n[0]r[1]&&(r[1]=n[1])})}function _n(r){return r==="middle"||r==="center"}function Ra(r){return r.getShallow("show")}function j0(r){var t=r.get("breaks",!0);t==null}var qD=function(){function r(){}return r.prototype.getNeedCrossZero=function(){var t=this.option;return!t.scale},r.prototype.getCoordSysModel=function(){},r}(),xp=[],KD={registerPreprocessor:P0,registerProcessor:k0,registerPostInit:HM,registerPostUpdate:WM,registerUpdateLifecycle:bc,registerAction:Mn,registerCoordinateSystem:UM,registerLayout:YM,registerVisual:Ri,registerTransform:ZM,registerLoading:R0,registerMap:XM,registerImpl:wM,PRIORITY:OM,ComponentModel:ct,ComponentView:be,SeriesModel:Je,ChartView:Ie,registerComponentModel:function(r){ct.registerClass(r)},registerComponentView:function(r){be.registerClass(r)},registerSeriesModel:function(r){Je.registerClass(r)},registerChartView:function(r){Ie.registerClass(r)},registerCustomSeries:function(r,t){},registerSubTypeDefaulter:function(r,t){ct.registerSubTypeDefaulter(r,t)},registerPainter:function(r,t){$S(r,t)}};function Br(r){if(V(r)){T(r,function(t){Br(t)});return}ot(xp,r)>=0||(xp.push(r),tt(r)&&(r={install:r}),r.install(KD))}const QD=Object.freeze(Object.defineProperty({__proto__:null,Arc:Xa,BezierCurve:Ya,BoundingRect:it,Circle:Ha,CompoundPath:jy,Ellipse:il,Group:Mt,Image:vr,IncrementalDisplayable:im,Line:Qe,LinearGradient:Fh,Polygon:Wa,Polyline:Ua,RadialGradient:em,Rect:_t,Ring:nl,Sector:Pi,Text:Gt,clipPointsByRect:cm,clipRectByRect:vm,createIcon:ol,extendPath:om,extendShape:am,getShapeClass:sm,getTransform:Wh,initProps:Pe,makeImage:Gh,makePath:al,mergePath:um,registerShape:we,resizePath:Hh,updateProps:Zt},Symbol.toStringTag,{value:"Module"}));var JD=bt(),va=bt(),ke={estimate:1,determine:2};function Fs(r){return{out:{noPxChangeTryDetermine:[]},kind:r}}function t_(r,t){var e=Z(t,function(i){return r.scale.parse(i)});return r.type==="time"&&e.length>0&&(e.sort(),e.unshift(e[0]),e.push(e[e.length-1])),e}function jD(r,t){var e=r.getLabelModel().get("customValues");if(e){var i=qa(r),n=r.scale.getExtent(),a=t_(r,e),o=It(a,function(s){return s>=n[0]&&s<=n[1]});return{labels:Z(o,function(s){var l={value:s};return{formattedLabel:i(l),rawLabel:r.scale.getLabel(l),tickValue:s,time:void 0,break:void 0}})}}return r.type==="category"?eA(r,t):iA(r)}function tA(r,t,e){var i=r.getTickModel().get("customValues");if(i){var n=r.scale.getExtent(),a=t_(r,i);return{ticks:It(a,function(o){return o>=n[0]&&o<=n[1]})}}return r.type==="category"?rA(r,t):{ticks:Z(r.scale.getTicks(e),function(o){return o.value})}}function eA(r,t){var e=r.getLabelModel(),i=e_(r,e,t);return!e.get("show")||r.scale.isBlank()?{labels:[]}:i}function e_(r,t,e){var i=aA(r),n=Dc(t),a=e.kind===ke.estimate;if(!a){var o=i_(i,n);if(o)return o}var s,l;tt(n)?s=o_(r,n):(l=n==="auto"?oA(r,e):n,s=a_(r,l));var u={labels:s,labelCategoryInterval:l};return a?e.out.noPxChangeTryDetermine.push(function(){return eh(i,n,u),!0}):eh(i,n,u),u}function rA(r,t){var e=nA(r),i=Dc(t),n=i_(e,i);if(n)return n;var a,o;if((!t.get("show")||r.scale.isBlank())&&(a=[]),tt(i))a=o_(r,i,!0);else if(i==="auto"){var s=e_(r,r.getLabelModel(),Fs(ke.determine));o=s.labelCategoryInterval,a=Z(s.labels,function(l){return l.tickValue})}else o=i,a=a_(r,o,!0);return eh(e,i,{ticks:a,tickCategoryInterval:o})}function iA(r){var t=r.scale.getTicks(),e=qa(r);return{labels:Z(t,function(i,n){return{formattedLabel:e(i,n),rawLabel:r.scale.getLabel(i),tickValue:i.value,time:i.time,break:i.break}})}}var nA=r_("axisTick"),aA=r_("axisLabel");function r_(r){return function(e){return va(e)[r]||(va(e)[r]={list:[]})}}function i_(r,t){for(var e=0;ef&&(u=Math.max(1,Math.floor(l/f)));for(var h=s[0],c=r.dataToCoord(h+1)-r.dataToCoord(h),v=Math.abs(c*Math.cos(a)),d=Math.abs(c*Math.sin(a)),g=0,y=0;h<=s[1];h+=u){var p=0,m=0,_=dy(n({value:h}),i.font,"center","top");p=_.width*1.3,m=_.height*1.3,g=Math.max(g,p,7),y=Math.max(y,m,7)}var S=g/v,w=y/d;isNaN(S)&&(S=1/0),isNaN(w)&&(w=1/0);var b=Math.max(0,Math.floor(Math.min(S,w)));if(e===ke.estimate)return t.out.noPxChangeTryDetermine.push(nt(lA,null,r,b,l)),b;var x=n_(r,b,l);return x??b}function lA(r,t,e){return n_(r,t,e)==null}function n_(r,t,e){var i=JD(r.model),n=r.getExtent(),a=i.lastAutoInterval,o=i.lastTickCount;if(a!=null&&o!=null&&Math.abs(a-t)<=1&&Math.abs(o-e)<=1&&a>t&&i.axisExtent0===n[0]&&i.axisExtent1===n[1])return a;i.lastTickCount=e,i.lastAutoInterval=t,i.axisExtent0=n[0],i.axisExtent1=n[1]}function uA(r){var t=r.getLabelModel();return{axisRotate:r.getRotate?r.getRotate():r.isHorizontal&&!r.isHorizontal()?90:0,labelRotate:t.get("rotate")||0,font:t.getFont()}}function a_(r,t,e){var i=qa(r),n=r.scale,a=n.getExtent(),o=r.getLabelModel(),s=[],l=Math.max((t||0)+1,1),u=a[0],f=n.count();u!==0&&l>1&&f/l>2&&(u=Math.round(Math.ceil(u/l)*l));var h=Q0(r),c=o.get("showMinLabel")||h,v=o.get("showMaxLabel")||h;c&&u!==a[0]&&g(a[0]);for(var d=u;d<=a[1];d+=l)g(d);v&&d-l!==a[1]&&g(a[1]);function g(y){var p={value:y};s.push(e?y:{formattedLabel:i(p),rawLabel:n.getLabel(p),tickValue:y,time:void 0,break:void 0})}return s}function o_(r,t,e){var i=r.scale,n=qa(r),a=[];return T(i.getTicks(),function(o){var s=i.getLabel(o),l=o.value;t(o.value,s)&&a.push(e?l:{formattedLabel:n(o),rawLabel:s,tickValue:l,time:void 0,break:void 0})}),a}var Tp=[0,1],fA=function(){function r(t,e,i){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=e,this._extent=i||[0,0]}return r.prototype.contain=function(t){var e=this._extent,i=Math.min(e[0],e[1]),n=Math.max(e[0],e[1]);return t>=i&&t<=n},r.prototype.containData=function(t){return this.scale.contain(this.scale.parse(t))},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.getPixelPrecision=function(t){return my(t||this.scale.getExtent(),this._extent)},r.prototype.setExtent=function(t,e){var i=this._extent;i[0]=t,i[1]=e},r.prototype.dataToCoord=function(t,e){var i=this._extent,n=this.scale;return t=n.normalize(n.parse(t)),this.onBand&&n.type==="ordinal"&&(i=i.slice(),Cp(i,n.count())),Et(t,Tp,i,e)},r.prototype.coordToData=function(t,e){var i=this._extent,n=this.scale;this.onBand&&n.type==="ordinal"&&(i=i.slice(),Cp(i,n.count()));var a=Et(t,i,Tp,e);return this.scale.scale(a)},r.prototype.pointToData=function(t,e){},r.prototype.getTicksCoords=function(t){t=t||{};var e=t.tickModel||this.getTickModel(),i=tA(this,e,{breakTicks:t.breakTicks,pruneByBreak:t.pruneByBreak}),n=i.ticks,a=Z(n,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=e.get("alignWithLabel");return hA(this,a,o,t.clamp),a},r.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var t=this.model.getModel("minorTick"),e=t.get("splitNumber");e>0&&e<100||(e=5);var i=this.scale.getMinorTicks(e),n=Z(i,function(a){return Z(a,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return n},r.prototype.getViewLabels=function(t){return t=t||Fs(ke.determine),jD(this,t).labels},r.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},r.prototype.getTickModel=function(){return this.model.getModel("axisTick")},r.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 n=Math.abs(t[1]-t[0]);return Math.abs(n)/i},r.prototype.calculateCategoryInterval=function(t){return t=t||Fs(ke.determine),sA(this,t)},r}();function Cp(r,t){var e=r[1]-r[0],i=t,n=e/i/2;r[0]+=n,r[1]-=n}function hA(r,t,e,i){var n=t.length;if(!r.onBand||e||!n)return;var a=r.getExtent(),o,s;if(n===1)t[0].coord=a[0],t[0].onBand=!0,o=t[1]={coord:a[1],tickValue:t[0].tickValue,onBand:!0};else{var l=t[n-1].tickValue-t[0].tickValue,u=(t[n-1].coord-t[0].coord)/l;T(t,function(v){v.coord-=u/2,v.onBand=!0});var f=r.scale.getExtent();s=1+f[1]-t[n-1].tickValue,o={coord:t[n-1].coord+u*s,tickValue:f[1]+1,onBand:!0},t.push(o)}var h=a[0]>a[1];c(t[0].coord,a[0])&&(i?t[0].coord=a[0]:t.shift()),i&&c(a[0],t[0].coord)&&t.unshift({coord:a[0],onBand:!0}),c(a[1],o.coord)&&(i?o.coord=a[1]:t.pop()),i&&c(o.coord,a[1])&&t.push({coord:a[1],onBand:!0});function c(v,d){return v=Ot(v),d=Ot(d),h?v>d:v-1&&(u.style.stroke=u.style.fill,u.style.fill=W.color.neutral00,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:6,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},t}(Je);function Lc(r,t){var e=r.mapDimensionsAll("defaultedLabel"),i=e.length;if(i===1){var n=yn(r,t,e[0]);return n!=null?n+"":null}else if(i){for(var a=[],o=0;o=0&&i.push(t[a])}return i.join(" ")}var Ic=function(r){F(t,r);function t(e,i,n,a){var o=r.call(this)||this;return o.updateData(e,i,n,a),o}return t.prototype._createSymbol=function(e,i,n,a,o,s){this.removeAll();var l=cr(e,-1,-1,2,2,null,s);l.attr({z2:$(o,100),culling:!0,scaleX:a[0]/2,scaleY:a[1]/2}),l.drift=mA,this._symbolType=e,this.add(l)},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(){ba(this.childAt(0))},t.prototype.downplay=function(){wa(this.childAt(0))},t.prototype.setZ=function(e,i){var n=this.childAt(0);n.zlevel=e,n.z=i},t.prototype.setDraggable=function(e,i){var n=this.childAt(0);n.draggable=e,n.cursor=!i&&e?"move":n.cursor},t.prototype.updateData=function(e,i,n,a){this.silent=!1;var o=e.getItemVisual(i,"symbol")||"circle",s=e.hostModel,l=t.getSymbolSize(e,i),u=t.getSymbolZ2(e,i),f=o!==this._symbolType,h=a&&a.disableAnimation;if(f){var c=e.getItemVisual(i,"symbolKeepAspect");this._createSymbol(o,e,i,l,u,c)}else{var v=this.childAt(0);v.silent=!1;var d={scaleX:l[0]/2,scaleY:l[1]/2};h?v.attr(d):Zt(v,d,s,i),nm(v)}if(this._updateCommon(e,i,l,n,a),f){var v=this.childAt(0);if(!h){var d={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:v.style.opacity}};v.scaleX=v.scaleY=0,v.style.opacity=0,Pe(v,d,s,i)}}h&&this.childAt(0).stopAnimation("leave")},t.prototype._updateCommon=function(e,i,n,a,o){var s=this.childAt(0),l=e.hostModel,u,f,h,c,v,d,g,y,p;if(a&&(u=a.emphasisItemStyle,f=a.blurItemStyle,h=a.selectItemStyle,c=a.focus,v=a.blurScope,g=a.labelStatesModels,y=a.hoverScale,p=a.cursorStyle,d=a.emphasisDisabled),!a||e.hasItemOption){var m=a&&a.itemModel?a.itemModel:e.getItemModel(i),_=m.getModel("emphasis");u=_.getModel("itemStyle").getItemStyle(),h=m.getModel(["select","itemStyle"]).getItemStyle(),f=m.getModel(["blur","itemStyle"]).getItemStyle(),c=_.get("focus"),v=_.get("blurScope"),d=_.get("disabled"),g=Tn(m),y=_.getShallow("scale"),p=m.getShallow("cursor")}var S=e.getItemVisual(i,"symbolRotate");s.attr("rotation",(S||0)*Math.PI/180||0);var w=pl(e.getItemVisual(i,"symbolOffset"),n);w&&(s.x=w[0],s.y=w[1]),p&&s.attr("cursor",p);var b=e.getItemVisual(i,"style"),x=b.fill;if(s instanceof vr){var C=s.style;s.useStyle(z({image:C.image,x:C.x,y:C.y,width:C.width,height:C.height},b))}else s.__isEmptyBrush?s.useStyle(z({},b)):s.useStyle(b),s.style.decal=null,s.setColor(x,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var D=e.getItemVisual(i,"liftZ"),A=this._z2;D!=null?A==null&&(this._z2=s.z2,s.z2+=D):A!=null&&(s.z2=A,this._z2=null);var M=o&&o.useNameLabel;$a(s,g,{labelFetcher:l,labelDataIndex:i,defaultText:I,inheritColor:x,defaultOpacity:b.opacity});function I(k){return M?e.getName(k):Lc(e,k)}this._sizeX=n[0]/2,this._sizeY=n[1]/2;var L=s.ensureState("emphasis");L.style=u,s.ensureState("select").style=h,s.ensureState("blur").style=f;var P=y==null||y===!0?Math.max(1.1,3/this._sizeY):isFinite(y)&&y>0?+y:1;L.scaleX=this._sizeX*P,L.scaleY=this._sizeY*P,this.setSymbolScale(1),xa(this,c,v,d)},t.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},t.prototype.fadeOut=function(e,i,n){var a=this.childAt(0),o=ft(this).dataIndex,s=n&&n.animation;if(this.silent=a.silent=!0,n&&n.fadeLabel){var l=a.getTextContent();l&&Cs(l,{style:{opacity:0}},i,{dataIndex:o,removeOpt:s,cb:function(){a.removeTextContent()}})}else a.removeTextContent();Cs(a,{style:{opacity:0},scaleX:0,scaleY:0},i,{dataIndex:o,cb:e,removeOpt:s})},t.getSymbolSize=function(e,i){return yc(e.getItemVisual(i,"symbolSize"))},t.getSymbolZ2=function(e,i){return e.getItemVisual(i,"z2")},t}(Mt);function mA(r,t){this.parent.drift(r,t)}function Lu(r,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]))&&r.getItemVisual(e,"symbol")!=="none"}function Lp(r){return r!=null&&!q(r)&&(r={isIgnore:r}),r||{}}function Ip(r){var t=r.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:Tn(t),cursorStyle:t.get("cursor")}}var _A=function(){function r(t){this.group=new Mt,this._SymbolCtor=t||Ic}return r.prototype.updateData=function(t,e){this._progressiveEls=null,e=Lp(e);var i=this.group,n=t.hostModel,a=this._data,o=this._SymbolCtor,s=e.disableAnimation,l=Ip(t),u={disableAnimation:s},f=e.getSymbolPoint||function(h){return t.getItemLayout(h)};a||i.removeAll(),t.diff(a).add(function(h){var c=f(h);if(Lu(t,c,h,e)){var v=new o(t,h,l,u);v.setPosition(c),t.setItemGraphicEl(h,v),i.add(v)}}).update(function(h,c){var v=a.getItemGraphicEl(c),d=f(h);if(!Lu(t,d,h,e)){i.remove(v);return}var g=t.getItemVisual(h,"symbol")||"circle",y=v&&v.getSymbolType&&v.getSymbolType();if(!v||y&&y!==g)i.remove(v),v=new o(t,h,l,u),v.setPosition(d);else{v.updateData(t,h,l,u);var p={x:d[0],y:d[1]};s?v.attr(p):Zt(v,p,n)}i.add(v),t.setItemGraphicEl(h,v)}).remove(function(h){var c=a.getItemGraphicEl(h);c&&c.fadeOut(function(){i.remove(c)},n)}).execute(),this._getSymbolPoint=f,this._data=t},r.prototype.updateLayout=function(){var t=this,e=this._data;e&&e.eachItemGraphicEl(function(i,n){var a=t._getSymbolPoint(n);i.setPosition(a),i.markRedraw()})},r.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=Ip(t),this._data=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(t,e,i){this._progressiveEls=[],i=Lp(i);function n(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var a=t.start;a0?e=i[0]:i[1]<0&&(e=i[1]),e}function h_(r,t,e,i){var n=NaN;r.stacked&&(n=e.get(e.getCalculationInfo("stackedOverDimension"),i)),isNaN(n)&&(n=r.valueStart);var a=r.baseDataOffset,o=[];return o[a]=e.get(r.baseDim,i),o[1-a]=n,t.dataToPoint(o)}function bA(r,t){var e=[];return t.diff(r).add(function(i){e.push({cmd:"+",idx:i})}).update(function(i,n){e.push({cmd:"=",idx:n,idx1:i})}).remove(function(i){e.push({cmd:"-",idx:i})}).execute(),e}function wA(r,t,e,i,n,a,o,s){for(var l=bA(r,t),u=[],f=[],h=[],c=[],v=[],d=[],g=[],y=f_(n,t,o),p=r.getLayout("points")||[],m=t.getLayout("points")||[],_=0;_=n||g<0)break;if(Ti(p,m)){if(l){g+=a;continue}break}if(g===e)r[a>0?"moveTo":"lineTo"](p,m),h=p,c=m;else{var _=p-u,S=m-f;if(_*_+S*S<.5){g+=a;continue}if(o>0){for(var w=g+a,b=t[w*2],x=t[w*2+1];b===p&&x===m&&y=i||Ti(b,x))v=p,d=m;else{A=b-u,M=x-f;var P=p-u,k=b-p,B=m-f,U=x-m,O=void 0,H=void 0;if(s==="x"){O=Math.abs(P),H=Math.abs(k);var R=A>0?1:-1;v=p-R*O*o,d=m,I=p+R*H*o,L=m}else if(s==="y"){O=Math.abs(B),H=Math.abs(U);var E=M>0?1:-1;v=p,d=m-E*O*o,I=p,L=m+E*H*o}else O=Math.sqrt(P*P+B*B),H=Math.sqrt(k*k+U*U),D=H/(H+O),v=p-A*o*(1-D),d=m-M*o*(1-D),I=p+A*o*D,L=m+M*o*D,I=br(I,wr(b,p)),L=br(L,wr(x,m)),I=wr(I,br(b,p)),L=wr(L,br(x,m)),A=I-p,M=L-m,v=p-A*O/H,d=m-M*O/H,v=br(v,wr(u,p)),d=br(d,wr(f,m)),v=wr(v,br(u,p)),d=wr(d,br(f,m)),A=p-v,M=m-d,I=p+A*H/O,L=m+M*H/O}r.bezierCurveTo(h,c,v,d,p,m),h=I,c=L}else r.lineTo(p,m)}u=p,f=m,g+=a}return y}var c_=function(){function r(){this.smooth=0,this.smoothConstraint=!0}return r}(),xA=function(r){F(t,r);function t(e){var i=r.call(this,e)||this;return i.type="ec-polyline",i}return t.prototype.getDefaultStyle=function(){return{stroke:W.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new c_},t.prototype.buildPath=function(e,i){var n=i.points,a=0,o=n.length/2;if(i.connectNulls){for(;o>0&&Ti(n[o*2-2],n[o*2-1]);o--);for(;a=0){var S=u?(d-l)*_+l:(v-s)*_+s;return u?[e,S]:[S,e]}s=v,l=d;break;case o.C:v=a[h++],d=a[h++],g=a[h++],y=a[h++],p=a[h++],m=a[h++];var w=u?vs(s,v,g,p,e,f):vs(l,d,y,m,e,f);if(w>0)for(var b=0;b=0){var S=u?zt(l,d,y,m,x):zt(s,v,g,p,x);return u?[e,S]:[S,e]}}s=p,l=m;break}}},t}(vt),TA=function(r){F(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t}(c_),CA=function(r){F(t,r);function t(e){var i=r.call(this,e)||this;return i.type="ec-polygon",i}return t.prototype.getDefaultShape=function(){return new TA},t.prototype.buildPath=function(e,i){var n=i.points,a=i.stackedOnPoints,o=0,s=n.length/2,l=i.smoothMonotone;if(i.connectNulls){for(;s>0&&Ti(n[s*2-2],n[s*2-1]);s--);for(;ot){a?e.push(o(a,l,t)):n&&e.push(o(n,l,0),o(n,l,t));break}else n&&(e.push(o(n,l,0)),n=null),e.push(l),a=l}return e}function LA(r,t,e){var i=r.getVisual("visualMeta");if(!(!i||!i.length||!r.count())&&t.type==="cartesian2d"){for(var n,a,o=i.length-1;o>=0;o--){var s=r.getDimensionInfo(i[o].dimension);if(n=s&&s.coordDim,n==="x"||n==="y"){a=i[o];break}}if(a){var l=t.getAxis(n),u=Z(a.stops,function(_){return{coord:l.toGlobalCoord(l.dataToCoord(_.value)),color:_.color}}),f=u.length,h=a.outerColors.slice();f&&u[0].coord>u[f-1].coord&&(u.reverse(),h.reverse());var c=AA(u,n==="x"?e.getWidth():e.getHeight()),v=c.length;if(!v&&f)return u[0].coord<0?h[1]?h[1]:u[f-1].color:h[0]?h[0]:u[0].color;var d=10,g=c[0].coord-d,y=c[v-1].coord+d,p=y-g;if(p<.001)return"transparent";T(c,function(_){_.offset=(_.coord-g)/p}),c.push({offset:v?c[v-1].offset:.5,color:h[1]||"transparent"}),c.unshift({offset:v?c[0].offset:.5,color:h[0]||"transparent"});var m=new Fh(0,0,0,0,c,!0);return m[n]=g,m[n+"2"]=y,m}}}function IA(r,t,e){var i=r.get("showAllSymbol"),n=i==="auto";if(!(i&&!n)){var a=e.getAxesByScale("ordinal")[0];if(a&&!(n&&PA(a,t))){var o=t.mapDimension(a.dim),s={};return T(a.getViewLabels(),function(l){var u=a.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(t.get(o,l))}}}}function PA(r,t){var e=r.getExtent(),i=Math.abs(e[1]-e[0])/r.scale.count();isNaN(i)&&(i=0);for(var n=t.count(),a=Math.max(1,Math.round(n/5)),o=0;oi)return!1;return!0}function kA(r,t){return isNaN(r)||isNaN(t)}function RA(r){for(var t=r.length/2;t>0&&kA(r[t*2-2],r[t*2-1]);t--);return t-1}function Op(r,t){return[r[t*2],r[t*2+1]]}function EA(r,t,e){for(var i=r.length/2,n=e==="x"?0:1,a,o,s=0,l=-1,u=0;u=t||a>=t&&o<=t){l=u;break}s=u,a=o}return{range:[s,l],t:(t-a)/(o-a)}}function p_(r){if(r.get(["endLabel","show"]))return!0;for(var t=0;t0&&e.get(["emphasis","lineStyle","width"])==="bolder"){var H=d.getState("emphasis").style;H.lineWidth=+d.style.lineWidth+1}ft(d).seriesIndex=e.seriesIndex,xa(d,B,U,O);var R=Ep(e.get("smooth")),E=e.get("smoothMonotone");if(d.setShape({smooth:R,smoothMonotone:E,connectNulls:x}),g){var N=s.getCalculationInfo("stackedOnSeries"),X=0;g.useStyle(gt(u.getAreaStyle(),{fill:I,opacity:.7,lineJoin:"bevel",decal:s.getVisual("style").decal})),N&&(X=Ep(N.get("smooth"))),g.setShape({smooth:R,stackedOnSmooth:X,smoothMonotone:E,connectNulls:x}),Lf(g,e,"areaStyle"),ft(g).seriesIndex=e.seriesIndex,xa(g,B,U,O)}var J=this._changePolyState;s.eachItemGraphicEl(function(yt){yt&&(yt.onHoverStateChange=J)}),this._polyline.onHoverStateChange=J,this._data=s,this._coordSys=a,this._stackedOnPoints=w,this._points=f,this._step=A,this._valueOrigin=_,e.get("triggerLineEvent")&&(this.packEventData(e,d),g&&this.packEventData(e,g))},t.prototype.packEventData=function(e,i){ft(i).eventData={componentType:"series",componentSubType:"line",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"line"}},t.prototype.highlight=function(e,i,n,a){var o=e.getData(),s=Ci(o,a);if(this._changePolyState("emphasis"),!(s instanceof Array)&&s!=null&&s>=0){var l=o.getLayout("points"),u=o.getItemGraphicEl(s);if(!u){var f=l[s*2],h=l[s*2+1];if(isNaN(f)||isNaN(h)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(f,h))return;var c=e.get("zlevel")||0,v=e.get("z")||0;u=new Ic(o,s),u.x=f,u.y=h,u.setZ(c,v);var d=u.getSymbolPath().getTextContent();d&&(d.zlevel=c,d.z=v,d.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else Ie.prototype.highlight.call(this,e,i,n,a)},t.prototype.downplay=function(e,i,n,a){var o=e.getData(),s=Ci(o,a);if(this._changePolyState("normal"),s!=null&&s>=0){var l=o.getItemGraphicEl(s);l&&(l.__temp?(o.setItemGraphicEl(s,null),this.group.remove(l)):l.downplay())}else Ie.prototype.downplay.call(this,e,i,n,a)},t.prototype._changePolyState=function(e){var i=this._polygon;Wv(this._polyline,e),i&&Wv(i,e)},t.prototype._newPolyline=function(e){var i=this._polyline;return i&&this._lineGroup.remove(i),i=new xA({shape:{points:e},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(i),this._polyline=i,i},t.prototype._newPolygon=function(e,i){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new CA({shape:{points:e,stackedOnPoints:i},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},t.prototype._initSymbolLabelAnimation=function(e,i,n){var a,o,s=i.getBaseAxis(),l=s.inverse;i.type==="cartesian2d"?(a=s.isHorizontal(),o=!1):i.type==="polar"&&(a=s.dim==="angle",o=!0);var u=e.hostModel,f=u.get("animationDuration");tt(f)&&(f=f(null));var h=u.get("animationDelay")||0,c=tt(h)?h(null):h;e.eachItemGraphicEl(function(v,d){var g=v;if(g){var y=[v.x,v.y],p=void 0,m=void 0,_=void 0;if(n)if(o){var S=n,w=i.pointToCoord(y);a?(p=S.startAngle,m=S.endAngle,_=-w[1]/180*Math.PI):(p=S.r0,m=S.r,_=w[0])}else{var b=n;a?(p=b.x,m=b.x+b.width,_=v.x):(p=b.y+b.height,m=b.y,_=v.y)}var x=m===p?0:(_-p)/(m-p);l&&(x=1-x);var C=tt(h)?h(d):f*x+c,D=g.getSymbolPath(),A=D.getTextContent();g.attr({scaleX:0,scaleY:0}),g.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:C}),A&&A.animateFrom({style:{opacity:0}},{duration:300,delay:C}),D.disableLabelAnimation=!0}})},t.prototype._initOrUpdateEndLabel=function(e,i,n){var a=e.getModel("endLabel");if(p_(e)){var o=e.getData(),s=this._polyline,l=o.getLayout("points");if(!l){s.removeTextContent(),this._endLabel=null;return}var u=this._endLabel;u||(u=this._endLabel=new Gt({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var f=RA(l);f>=0&&($a(s,Tn(e,"endLabel"),{inheritColor:n,labelFetcher:e,labelDataIndex:f,defaultText:function(h,c,v){return v!=null?u_(o,v):Lc(o,h)},enableTextSetter:!0},OA(a,i)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},t.prototype._endLabelOnDuring=function(e,i,n,a,o,s,l){var u=this._endLabel,f=this._polyline;if(u){e<1&&a.originalX==null&&(a.originalX=u.x,a.originalY=u.y);var h=n.getLayout("points"),c=n.hostModel,v=c.get("connectNulls"),d=s.get("precision"),g=s.get("distance")||0,y=l.getBaseAxis(),p=y.isHorizontal(),m=y.inverse,_=i.shape,S=m?p?_.x:_.y+_.height:p?_.x+_.width:_.y,w=(p?g:0)*(m?-1:1),b=(p?0:-g)*(m?-1:1),x=p?"x":"y",C=EA(h,S,x),D=C.range,A=D[1]-D[0],M=void 0;if(A>=1){if(A>1&&!v){var I=Op(h,D[0]);u.attr({x:I[0]+w,y:I[1]+b}),o&&(M=c.getRawValue(D[0]))}else{var I=f.getPointOn(S,x);I&&u.attr({x:I[0]+w,y:I[1]+b});var L=c.getRawValue(D[0]),P=c.getRawValue(D[1]);o&&(M=Sb(n,d,L,P,C.t))}a.lastFrameIndex=D[0]}else{var k=e===1||a.lastFrameIndex>0?D[0]:0,I=Op(h,k);o&&(M=c.getRawValue(k)),u.attr({x:I[0]+w,y:I[1]+b})}if(o){var B=ul(u);typeof B.setLabelText=="function"&&B.setLabelText(M)}}},t.prototype._doUpdateAnimation=function(e,i,n,a,o,s,l){var u=this._polyline,f=this._polygon,h=e.hostModel,c=wA(this._data,e,this._stackedOnPoints,i,this._coordSys,n,this._valueOrigin),v=c.current,d=c.stackedOnCurrent,g=c.next,y=c.stackedOnNext;if(o&&(d=xr(c.stackedOnCurrent,c.current,n,o,l),v=xr(c.current,null,n,o,l),y=xr(c.stackedOnNext,c.next,n,o,l),g=xr(c.next,null,n,o,l)),Rp(v,g)>3e3||f&&Rp(d,y)>3e3){u.stopAnimation(),u.setShape({points:g}),f&&(f.stopAnimation(),f.setShape({points:g,stackedOnPoints:y}));return}u.shape.__points=c.current,u.shape.points=v;var p={shape:{points:g}};c.current!==v&&(p.shape.__points=c.next),u.stopAnimation(),Zt(u,p,h),f&&(f.setShape({points:v,stackedOnPoints:d}),f.stopAnimation(),Zt(f,{shape:{stackedOnPoints:y}},h),u.shape.points!==f.shape.points&&(f.shape.points=u.shape.points));for(var m=[],_=c.status,S=0;S<_.length;S++){var w=_[S].cmd;if(w==="="){var b=e.getItemGraphicEl(_[S].idx1);b&&m.push({el:b,ptIdx:S})}}u.animators&&u.animators.length&&u.animators[0].during(function(){f&&f.dirtyShape();for(var x=u.shape.__points,C=0;Ct&&(t=r[e]);return isFinite(t)?t:NaN},min:function(r){for(var t=1/0,e=0;e10&&o.type==="cartesian2d"&&a){var l=o.getBaseAxis(),u=o.getOtherAxis(l),f=l.getExtent(),h=i.getDevicePixelRatio(),c=Math.abs(f[1]-f[0])*(h||1),v=Math.round(s/c);if(isFinite(v)&&v>1){a==="lttb"?t.setData(n.lttbDownSample(n.mapDimension(u.dim),1/v)):a==="minmax"&&t.setData(n.minmaxDownSample(n.mapDimension(u.dim),1/v));var d=void 0;Y(a)?d=zA[a]:tt(a)&&(d=a),d&&t.setData(n.downSample(n.mapDimension(u.dim),1/v,d,FA))}}}}}function VA(r){r.registerChartView(BA),r.registerSeriesModel(yA),r.registerLayout(NA("line")),r.registerVisual({seriesType:"line",reset:function(t){var e=t.getData(),i=t.getModel("lineStyle").getLineStyle();i&&!i.stroke&&(i.stroke=e.getVisual("style").fill),e.setVisual("legendLineStyle",i)}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,g_("line"))}var ih=function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getInitialData=function(e,i){return Tc(null,this,{useEncodeDefaulter:!0})},t.prototype.getMarkerPosition=function(e,i,n){var a=this.coordinateSystem;if(a&&a.clampData){var o=a.clampData(e),s=a.dataToPoint(o);if(n)T(a.getAxes(),function(c,v){if(c.type==="category"&&i!=null){var d=c.getTicksCoords(),g=c.getTickModel().get("alignWithLabel"),y=o[v],p=i[v]==="x1"||i[v]==="y1";if(p&&!g&&(y+=1),d.length<2)return;if(d.length===2){s[v]=c.toGlobalCoord(c.getExtent()[p?1:0]);return}for(var m=void 0,_=void 0,S=1,w=0;wy){_=(b+m)/2;break}w===1&&(S=x-d[0].tickValue)}_==null&&(m?m&&(_=d[d.length-1].coord):_=d[0].coord),s[v]=c.toGlobalCoord(_)}});else{var l=this.getData(),u=l.getLayout("offset"),f=l.getLayout("size"),h=a.getBaseAxis().isHorizontal()?0:1;s[h]+=u+f/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",defaultBarGap:"10%"},t}(Je);Je.registerClass(ih);var GA=function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getInitialData=function(){return Tc(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},t.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},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,n){return n.rect(i.getItemLayout(e))},t.type="series.bar",t.dependencies=["grid","polar"],t.defaultOption=$h(ih.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:W.color.primary,borderWidth:2}},realtimeSort:!1}),t}(ih),HA=function(){function r(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return r}(),Bp=function(r){F(t,r);function t(e){var i=r.call(this,e)||this;return i.type="sausage",i}return t.prototype.getDefaultShape=function(){return new HA},t.prototype.buildPath=function(e,i){var n=i.cx,a=i.cy,o=Math.max(i.r0||0,0),s=Math.max(i.r,0),l=(s-o)*.5,u=o+l,f=i.startAngle,h=i.endAngle,c=i.clockwise,v=Math.PI*2,d=c?h-fMath.PI/2&&fs)return!0;s=h}return!1},t.prototype._isOrderDifferentInView=function(e,i){for(var n=i.scale,a=n.getExtent(),o=Math.max(0,a[0]),s=Math.min(a[1],n.getOrdinalMeta().categories.length-1);o<=s;++o)if(e.ordinalNumbers[o]!==n.getRawOrdinalNumber(o))return!0},t.prototype._updateSortWithinSameData=function(e,i,n,a){if(this._isOrderChangedWithinSameData(e,i,n)){var o=this._dataSort(e,n,i);this._isOrderDifferentInView(o,n)&&(this._removeOnRenderedListener(a),a.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:o}))}},t.prototype._dispatchInitSort=function(e,i,n){var a=i.baseAxis,o=this._dataSort(e,a,function(s){return e.get(e.mapDimension(i.otherAxis.dim),s)});n.dispatchAction({type:"changeAxisOrder",componentType:a.dim+"Axis",isInitSort:!0,axisId:a.index,sortInfo:o})},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,n=this._data;e&&e.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl(function(a){es(a,e,ft(a).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}(Ie),Np={cartesian2d:function(r,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 n=r.x+r.width,a=r.y+r.height,o=Pu(t.x,r.x),s=ku(t.x+t.width,n),l=Pu(t.y,r.y),u=ku(t.y+t.height,a),f=sn?s:o,t.y=h&&l>a?u:l,t.width=f?0:s-o,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),f||h},polar:function(r,t){var e=t.r0<=t.r?1:-1;if(e<0){var i=t.r;t.r=t.r0,t.r0=i}var n=ku(t.r,r.r),a=Pu(t.r0,r.r0);t.r=n,t.r0=a;var o=n-a<0;if(e<0){var i=t.r;t.r=t.r0,t.r0=i}return o}},zp={cartesian2d:function(r,t,e,i,n,a,o,s,l){var u=new _t({shape:z({},i),z2:1});if(u.__dataIndex=e,u.name="item",a){var f=u.shape,h=n?"height":"width";f[h]=0}return u},polar:function(r,t,e,i,n,a,o,s,l){var u=!n&&l?Bp:Pi,f=new u({shape:i,z2:1});f.name="item";var h=y_(n);if(f.calculateTextPosition=WA(h,{isRoundCap:u===Bp}),a){var c=f.shape,v=n?"r":"endAngle",d={};c[v]=n?i.r0:i.startAngle,d[v]=i[v],(s?Zt:Pe)(f,{shape:d},a)}return f}};function $A(r,t){var e=r.get("realtimeSort",!0),i=t.getBaseAxis();if(e&&i.type==="category"&&t.type==="cartesian2d")return{baseAxis:i,otherAxis:t.getOtherAxis(i)}}function Fp(r,t,e,i,n,a,o,s){var l,u;a?(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||(o?Zt:Pe)(e,{shape:l},t,n,null);var f=t?r.baseAxis.model:null;(o?Zt:Pe)(e,{shape:u},f,n)}function Vp(r,t){for(var e=0;e0?1:-1,o=i.height>0?1:-1;return{x:i.x+a*n/2,y:i.y+o*n/2,width:i.width-a*n,height:i.height-o*n}},polar:function(r,t,e){var i=r.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 QA(r){return r.startAngle!=null&&r.endAngle!=null&&r.startAngle===r.endAngle}function y_(r){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}}}(r)}function Hp(r,t,e,i,n,a,o,s){var l=t.getItemVisual(e,"style");if(s){if(!a.get("roundCap")){var f=r.shape,h=YA(i.getModel("itemStyle"),f);z(f,h),r.setShape(f)}}else{var u=i.get(["itemStyle","borderRadius"])||0;r.setShape("r",u)}r.useStyle(l);var c=i.getShallow("cursor");c&&r.attr("cursor",c);var v=s?o?n.r>=n.r0?"endArc":"startArc":n.endAngle>=n.startAngle?"endAngle":"startAngle":o?n.height>=0?"bottom":"top":n.width>=0?"right":"left",d=Tn(i);$a(r,d,{labelFetcher:a,labelDataIndex:e,defaultText:Lc(a.getData(),e),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:v});var g=r.getTextContent();if(s&&g){var y=i.get(["label","position"]);r.textConfig.inside=y==="middle"?!0:null,UA(r,y==="outside"?v:y,y_(o),i.get(["label","rotate"]))}Dx(g,d,a.getRawValue(e),function(m){return u_(t,m)});var p=i.getModel(["emphasis"]);xa(r,p.get("focus"),p.get("blurScope"),p.get("disabled")),Lf(r,i),QA(n)&&(r.style.fill="none",r.style.stroke="none",T(r.states,function(m){m.style&&(m.style.fill=m.style.stroke="none")}))}function JA(r,t){var e=r.get(["itemStyle","borderColor"]);if(!e||e==="none")return 0;var i=r.get(["itemStyle","borderWidth"])||0,n=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),a=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(i,n,a)}var jA=function(){function r(){}return r}(),Wp=function(r){F(t,r);function t(e){var i=r.call(this,e)||this;return i.type="largeBar",i}return t.prototype.getDefaultShape=function(){return new jA},t.prototype.buildPath=function(e,i){for(var n=i.points,a=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,f=0;f=0?e:null},30,!1);function tL(r,t,e){for(var i=r.baseDimIdx,n=1-i,a=r.shape.points,o=r.largeDataIndices,s=[],l=[],u=r.barWidth,f=0,h=a.length/3;f=s[0]&&t<=s[0]+l[0]&&e>=s[1]&&e<=s[1]+l[1])return o[f]}return-1}function m_(r,t,e){if(yl(e,"cartesian2d")){var i=t,n=e.getArea();return{x:r?i.x:n.x,y:r?n.y:i.y,width:r?i.width:n.width,height:r?n.height:i.height}}else{var n=e.getArea(),a=t;return{cx:n.cx,cy:n.cy,r0:r?n.r0:a.r0,r:r?n.r:a.r,startAngle:r?a.startAngle:0,endAngle:r?a.endAngle:Math.PI*2}}}function eL(r,t,e){var i=r.type==="polar"?Pi:_t;return new i({shape:m_(t,e,r),silent:!0,z2:0})}function rL(r){r.registerChartView(ZA),r.registerSeriesModel(GA),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,St(AD,"bar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,LD("bar")),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,g_("bar")),r.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(t,e){var i=t.componentType||"series";e.eachComponent({mainType:i,query:t},function(n){t.sortInfo&&n.axis.setCategorySortInfo(t.sortInfo)})})}var __={left:0,right:0,top:0,bottom:0},Hs=["25%","25%"],iL=function(r){F(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.mergeDefaultAndTheme=function(e,i){var n=Cn(e.outerBounds);r.prototype.mergeDefaultAndTheme.apply(this,arguments),n&&e.outerBounds&&Or(e.outerBounds,n)},t.prototype.mergeOption=function(e,i){r.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&e.outerBounds&&Or(this.option.outerBounds,e.outerBounds)},t.type="grid",t.dependencies=["xAxis","yAxis"],t.layoutMode="box",t.defaultOption={show:!1,z:0,left:"15%",top:65,right:"10%",bottom:80,containLabel:!1,outerBoundsMode:"auto",outerBounds:__,outerBoundsContain:"all",outerBoundsClampWidth:Hs[0],outerBoundsClampHeight:Hs[1],backgroundColor:W.color.transparent,borderWidth:1,borderColor:W.color.neutral30},t}(ct),nh=function(r){F(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Yt).models[0]},t.type="cartesian2dAxis",t}(ct);Re(nh,qD);var S_={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:W.color.axisLine,width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15],breakLine:!0},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,color:W.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:W.color.axisSplitLine,width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:[W.color.backgroundTint,W.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:W.color.neutral00,borderColor:W.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:"auto"}},nL=lt({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto",show:"auto"},axisLabel:{interval:"auto"}},S_),Pc=lt({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:W.color.axisMinorSplitLine,width:1}}},S_),aL=lt({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},Pc),oL=gt({logBase:10},Pc);const sL={category:nL,value:Pc,time:aL,log:oL};var lL={value:1,category:1,time:1,log:1},uL=null;function fL(){return uL}function Xp(r,t,e,i){T(lL,function(n,a){var o=lt(lt({},sL[a],!0),i,!0),s=function(l){F(u,l);function u(){var f=l!==null&&l.apply(this,arguments)||this;return f.type=t+"Axis."+a,f}return u.prototype.mergeDefaultAndTheme=function(f,h){var c=Aa(this),v=c?Cn(f):{},d=h.getTheme();lt(f,d.get(a+"Axis")),lt(f,this.getDefaultOption()),f.type=Zp(f),c&&Or(f,v,c)},u.prototype.optionUpdated=function(){var f=this.option;f.type==="category"&&(this.__ordinalMeta=jf.createByAxisModel(this))},u.prototype.getCategories=function(f){var h=this.option;if(h.type==="category")return f?h.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.prototype.updateAxisBreaks=function(f){return{breaks:[]}},u.type=t+"Axis."+a,u.defaultOption=o,u}(e);r.registerComponentModel(s)}),r.registerSubTypeDefaulter(t+"Axis",Zp)}function Zp(r){return r.type||(r.data?"category":"value")}var hL=function(){function r(t){this.type="cartesian",this._dimList=[],this._axes={},this.name=t||""}return r.prototype.getAxis=function(t){return this._axes[t]},r.prototype.getAxes=function(){return Z(this._dimList,function(t){return this._axes[t]},this)},r.prototype.getAxesByScale=function(t){return t=t.toLowerCase(),It(this.getAxes(),function(e){return e.scale.type===t})},r.prototype.addAxis=function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},r}(),ah=["x","y"];function $p(r){return(r.type==="interval"||r.type==="time")&&!r.hasBreaks()}var cL=function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="cartesian2d",e.dimensions=ah,e}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis("x").scale,i=this.getAxis("y").scale;if(!(!$p(e)||!$p(i))){var n=e.getExtent(),a=i.getExtent(),o=this.dataToPoint([n[0],a[0]]),s=this.dataToPoint([n[1],a[1]]),l=n[1]-n[0],u=a[1]-a[0];if(!(!l||!u)){var f=(s[0]-o[0])/l,h=(s[1]-o[1])/u,c=o[0]-n[0]*f,v=o[1]-a[0]*h,d=this._transform=[f,0,0,h,c,v];this._invTransform=Na([],d)}}},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"),n=this.getAxis("y");return i.contain(i.toLocalCoord(e[0]))&&n.contain(n.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 n=this.dataToPoint(e),a=this.dataToPoint(i),o=this.getArea(),s=new it(n[0],n[1],a[0]-n[0],a[1]-n[1]);return o.intersect(s)},t.prototype.dataToPoint=function(e,i,n){n=n||[];var a=e[0],o=e[1];if(this._transform&&a!=null&&isFinite(a)&&o!=null&&isFinite(o))return _e(n,e,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return n[0]=s.toGlobalCoord(s.dataToCoord(a,i)),n[1]=l.toGlobalCoord(l.dataToCoord(o,i)),n},t.prototype.clampData=function(e,i){var n=this.getAxis("x").scale,a=this.getAxis("y").scale,o=n.getExtent(),s=a.getExtent(),l=n.parse(e[0]),u=a.parse(e[1]);return i=i||[],i[0]=Math.min(Math.max(Math.min(o[0],o[1]),l),Math.max(o[0],o[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,n){if(n=n||[],this._invTransform)return _e(n,e,this._invTransform);var a=this.getAxis("x"),o=this.getAxis("y");return n[0]=a.coordToData(a.toLocalCoord(e[0]),i),n[1]=o.coordToData(o.toLocalCoord(e[1]),i),n},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(),n=this.getAxis("y").getGlobalExtent(),a=Math.min(i[0],i[1])-e,o=Math.min(n[0],n[1])-e,s=Math.max(i[0],i[1])-a+e,l=Math.max(n[0],n[1])-o+e;return new it(a,o,s,l)},t}(hL),vL=function(r){F(t,r);function t(e,i,n,a,o){var s=r.call(this,e,i,n)||this;return s.index=0,s.type=a||"value",s.position=o||"bottom",s}return 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}(fA),dL="expandAxisBreak",Dr=Math.PI,pL=[[1,2,1,2],[5,3,5,3],[8,3,8,3]],gL=[[0,1,0,1],[0,3,0,3],[0,3,0,3]],Ea=bt(),b_=bt(),w_=function(){function r(t){this.recordMap={},this.resolveAxisNameOverlap=t}return r.prototype.ensureRecord=function(t){var e=t.axis.dim,i=t.componentIndex,n=this.recordMap,a=n[e]||(n[e]=[]);return a[i]||(a[i]={ready:{}})},r}();function yL(r,t,e,i){var n=e.axis,a=t.ensureRecord(e),o=[],s,l=kc(r.axisName)&&_n(r.nameLocation);T(i,function(d){var g=Nr(d);if(!(!g||g.label.ignore)){o.push(g);var y=a.transGroup;l&&(y.transform?Na(Hn,y.transform):Th(Hn),g.transform&&ra(Hn,Hn,g.transform),it.copy(Vo,g.localRect),Vo.applyTransform(Hn),s?s.union(Vo):it.copy(s=new it(0,0,0,0),Vo))}});var u=Math.abs(a.dirVec.x)>.1?"x":"y",f=a.transGroup[u];if(o.sort(function(d,g){return Math.abs(d.label[u]-f)-Math.abs(g.label[u]-f)}),l&&s){var h=n.getExtent(),c=Math.min(h[0],h[1]),v=Math.max(h[0],h[1])-c;s.union(new it(c,0,v,1))}a.stOccupiedRect=s,a.labelInfoList=o}var Hn=ur(),Vo=new it(0,0,0,0),x_=function(r,t,e,i,n,a){if(_n(r.nameLocation)){var o=a.stOccupiedRect;o&&T_(dA({},o,a.transGroup.transform),i,n)}else C_(a.labelInfoList,a.dirVec,i,n)};function T_(r,t,e){var i=new dt;Ac(r,t,i,{direction:Math.atan2(e.y,e.x),bidirectional:!1,touchThreshold:.05})&&pA(t,i)}function C_(r,t,e,i){for(var n=dt.dot(i,t)>=0,a=0,o=r.length;a0?"top":"bottom",a="center"):_s(n-Dr)?(o=i>0?"bottom":"top",a="center"):(o="middle",n>0&&n0?"right":"left":a=i>0?"left":"right"),{rotation:n,textAlign:a,textVerticalAlign:o}},r.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},r.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)},r}(),mL=["axisLine","axisTickLabelEstimate","axisTickLabelDetermine","axisName"],_L={axisLine:function(r,t,e,i,n,a,o){var s=i.get(["axisLine","show"]);if(s==="auto"&&(s=!0,r.raw.axisLineAutoShow!=null&&(s=!!r.raw.axisLineAutoShow)),!!s){var l=i.axis.getExtent(),u=a.transform,f=[l[0],0],h=[l[1],0],c=f[0]>h[0];u&&(_e(f,f,u),_e(h,h,u));var v=z({lineCap:"round"},i.getModel(["axisLine","lineStyle"]).getLineStyle()),d={strokeContainThreshold:r.raw.strokeContainThreshold||5,silent:!0,z2:1,style:v};if(i.get(["axisLine","breakLine"])&&i.axis.scale.hasBreaks())fL().buildAxisBreakLine(i,n,a,d);else{var g=new Qe(z({shape:{x1:f[0],y1:f[1],x2:h[0],y2:h[1]}},d));Ca(g.shape,g.style.lineWidth),g.anid="line",n.add(g)}var y=i.get(["axisLine","symbol"]);if(y!=null){var p=i.get(["axisLine","symbolSize"]);Y(y)&&(y=[y,y]),(Y(p)||pt(p))&&(p=[p,p]);var m=pl(i.get(["axisLine","symbolOffset"])||0,p),_=p[0],S=p[1];T([{rotate:r.rotation+Math.PI/2,offset:m[0],r:0},{rotate:r.rotation-Math.PI/2,offset:m[1],r:Math.sqrt((f[0]-h[0])*(f[0]-h[0])+(f[1]-h[1])*(f[1]-h[1]))}],function(w,b){if(y[b]!=="none"&&y[b]!=null){var x=cr(y[b],-_/2,-S/2,_,S,v.stroke,!0),C=w.r+w.offset,D=c?h:f;x.attr({rotation:w.rotate,x:D[0]+C*Math.cos(r.rotation),y:D[1]-C*Math.sin(r.rotation),silent:!0,z2:11}),n.add(x)}})}}},axisTickLabelEstimate:function(r,t,e,i,n,a,o,s){var l=Kp(t,n,s);l&&qp(r,t,e,i,n,a,o,ke.estimate)},axisTickLabelDetermine:function(r,t,e,i,n,a,o,s){var l=Kp(t,n,s);l&&qp(r,t,e,i,n,a,o,ke.determine);var u=xL(r,n,a,i);wL(r,t.labelLayoutList,u),TL(r,n,a,i,r.tickDirection)},axisName:function(r,t,e,i,n,a,o,s){var l=e.ensureRecord(i);t.nameEl&&(n.remove(t.nameEl),t.nameEl=l.nameLayout=l.nameLocation=null);var u=r.axisName;if(kc(u)){var f=r.nameLocation,h=r.nameDirection,c=i.getModel("nameTextStyle"),v=i.get("nameGap")||0,d=i.axis.getExtent(),g=i.axis.inverse?-1:1,y=new dt(0,0),p=new dt(0,0);f==="start"?(y.x=d[0]-g*v,p.x=-g):f==="end"?(y.x=d[1]+g*v,p.x=g):(y.x=(d[0]+d[1])/2,y.y=r.labelOffset+h*v,p.y=h);var m=ur();p.transform(Ch(m,m,r.rotation));var _=i.get("nameRotate");_!=null&&(_=_*Dr/180);var S,w;_n(f)?S=kr.innerTextLayout(r.rotation,_??r.rotation,h):(S=SL(r.rotation,f,_||0,d),w=r.raw.axisNameAvailableWidth,w!=null&&(w=Math.abs(w/Math.sin(S.rotation)),!isFinite(w)&&(w=null)));var b=c.getFont(),x=i.get("nameTruncate",!0)||{},C=x.ellipsis,D=ga(r.raw.nameTruncateMaxWidth,x.maxWidth,w),A=s.nameMarginLevel||0,M=new Gt({x:y.x,y:y.y,rotation:S.rotation,silent:kr.isLabelSilent(i),style:Di(c,{text:u,font:b,overflow:"truncate",width:D,ellipsis:C,fill:c.getTextColor()||i.get(["axisLine","lineStyle","color"]),align:c.get("align")||S.textAlign,verticalAlign:c.get("verticalAlign")||S.textVerticalAlign}),z2:1});if(sl({el:M,componentModel:i,itemName:u}),M.__fullText=u,M.anid="name",i.get("triggerEvent")){var I=kr.makeAxisEventDataBase(i);I.targetType="axisName",I.name=u,ft(M).eventData=I}a.add(M),M.updateTransform(),t.nameEl=M;var L=l.nameLayout=Nr({label:M,priority:M.z2,defaultAttr:{ignore:M.ignore},marginDefault:_n(f)?pL[A]:gL[A]});if(l.nameLocation=f,n.add(M),M.decomposeTransform(),r.shouldNameMoveOverlap&&L){var P=e.ensureRecord(i);e.resolveAxisNameOverlap(r,e,i,L,p,P)}}}};function qp(r,t,e,i,n,a,o,s){D_(t)||CL(r,t,n,s,i,o);var l=t.labelLayoutList;ML(r,i,l,a),r.rotation;var u=r.optionHideOverlap;bL(i,l,u),u&&gA(It(l,function(f){return f&&!f.label.ignore})),yL(r,e,i,l)}function SL(r,t,e,i){var n=_y(e-r),a,o,s=i[0]>i[1],l=t==="start"&&!s||t!=="start"&&s;return _s(n-Dr/2)?(o=l?"bottom":"top",a="center"):_s(n-Dr*1.5)?(o=l?"top":"bottom",a="center"):(o="middle",nDr/2?a=l?"left":"right":a=l?"right":"left"),{rotation:n,textAlign:a,textVerticalAlign:o}}function bL(r,t,e){if(Q0(r.axis))return;function i(s,l,u){var f=Nr(t[l]),h=Nr(t[u]);if(!(!f||!h)){if(s===!1||f.suggestIgnore){ta(f.label);return}if(h.suggestIgnore){ta(h.label);return}var c=.1;if(!e){var v=[0,0,0,0];f=Dp({marginForce:v},f),h=Dp({marginForce:v},h)}Ac(f,h,null,{touchThreshold:c})&&ta(s?h.label:f.label)}}var n=r.get(["axisLabel","showMinLabel"]),a=r.get(["axisLabel","showMaxLabel"]),o=t.length;i(n,0,1),i(a,o-1,o-2)}function wL(r,t,e){r.showMinorTicks||T(t,function(i){if(i&&i.label.ignore)for(var n=0;nu[0]&&isFinite(d)&&isFinite(u[0]);)v=Mu(v),d=u[1]-v*o;else{var y=r.getTicks().length-1;y>o&&(v=Mu(v));var p=v*o;g=Math.ceil(u[1]/v)*v,d=Ot(g-p),d<0&&u[0]>=0?(d=0,g=Ot(p)):g>0&&u[1]<=0&&(g=0,d=-Ot(p))}var m=(n[0].value-a[0].value)/s,_=(n[o].value-a[o].value)/s;i.setExtent.call(r,d+v*m,g+v*_),i.setInterval.call(r,v),(m||_)&&i.setNiceExtent.call(r,d+v,g-v)}var Jp=[[3,1],[0,2]],RL=function(){function r(t,e,i){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=ah,this._initCartesian(t,e,i),this.model=t}return r.prototype.getRect=function(){return this._rect},r.prototype.update=function(t,e){var i=this._axesMap;this._updateScale(t,this.model);function n(o){var s,l=xt(o),u=l.length;if(u){for(var f=[],h=u-1;h>=0;h--){var c=+l[h],v=o[c],d=v.model,g=v.scale;Qf(g)&&d.get("alignTicks")&&d.get("interval")==null?f.push(v):(wp(g,d),Qf(g)&&(s=v))}f.length&&(s||(s=f.pop(),wp(s.scale,s.model)),T(f,function(y){kL(y.scale,y.model,s.scale)}))}}n(i.x),n(i.y);var a={};T(i.x,function(o){jp(i,"y",o,a)}),T(i.y,function(o){jp(i,"x",o,a)}),this.resize(this.model,e)},r.prototype.resize=function(t,e,i){var n=sc(t,e),a=this._rect=gn(t.getBoxLayoutParams(),n.refContainer),o=this._axesMap,s=this._coordsList,l=t.get("containLabel");if(A_(o,a),!i){var u=OL(a,s,o,l,e),f=void 0;if(l)f=rg(a.clone(),"axisLabel",null,a,o,u,n);else{var h=BL(t,a,n),c=h.outerBoundsRect,v=h.parsedOuterBoundsContain,d=h.outerBoundsClamp;c&&(f=rg(c,v,d,a,o,u,n))}L_(a,o,ke.determine,null,f,n)}T(this._coordsList,function(g){g.calcAffineTransform()})},r.prototype.getAxis=function(t,e){var i=this._axesMap[t];if(i!=null)return i[e||0]},r.prototype.getAxes=function(){return this._axesList.slice()},r.prototype.getCartesian=function(t,e){if(t!=null&&e!=null){var i="x"+t+"y"+e;return this._coordsMap[i]}q(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var n=0,a=this._coordsList;n0})==null;return Ms(i,s,!0,!0,e),A_(n,i),l;function u(c){T(n[vi[c]],function(v){if(Ra(v.model)){var d=a.ensureRecord(v.model),g=d.labelInfoList;if(g)for(var y=0;y0&&!pa(v)&&v>1e-4&&(c/=v),c}}function OL(r,t,e,i,n){var a=new w_(NL);return T(e,function(o){return T(o,function(s){if(Ra(s.model)){var l=!i;s.axisBuilder=IL(r,t,s.model,n,a,l)}})}),a}function L_(r,t,e,i,n,a){var o=e===ke.determine;T(t,function(u){return T(u,function(f){Ra(f.model)&&(PL(f.axisBuilder,r,f.model),f.axisBuilder.build(o?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:n}))})});var s={x:0,y:0};l(0),l(1);function l(u){s[vi[1-u]]=r[Ta[u]]<=a.refContainer[Ta[u]]*.5?0:1-u===1?2:1}T(t,function(u,f){return T(u,function(h){Ra(h.model)&&((i==="all"||o)&&h.axisBuilder.build({axisName:!0},{nameMarginLevel:s[f]}),o&&h.axisBuilder.build({axisLine:!0}))})})}function BL(r,t,e){var i,n=r.get("outerBoundsMode",!0);n==="same"?i=t.clone():(n==null||n==="auto")&&(i=gn(r.get("outerBounds",!0)||__,e.refContainer));var a=r.get("outerBoundsContain",!0),o;a==null||a==="auto"||ot(["all","axisLabel"],a)<0?o="all":o=a;var s=[Sf($(r.get("outerBoundsClampWidth",!0),Hs[0]),t.width),Sf($(r.get("outerBoundsClampHeight",!0),Hs[1]),t.height)];return{outerBoundsRect:i,parsedOuterBoundsContain:o,outerBoundsClamp:s}}var NL=function(r,t,e,i,n,a){var o=e.axis.dim==="x"?"y":"x";x_(r,t,e,i,n,a),_n(r.nameLocation)||T(t.recordMap[o],function(s){s&&s.labelInfoList&&s.dirVec&&C_(s.labelInfoList,s.dirVec,i,n)})};function zL(r,t){var e={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return FL(e,r,t),e.seriesInvolved&&GL(e,r),e}function FL(r,t,e){var i=t.getComponent("tooltip"),n=t.getComponent("axisPointer"),a=n.get("link",!0)||[],o=[];T(e.getCoordinateSystems(),function(s){if(!s.axisPointerEnabled)return;var l=Oa(s.model),u=r.coordSysAxesInfo[l]={};r.coordSysMap[l]=s;var f=s.model,h=f.getModel("tooltip",i);if(T(s.getAxes(),St(g,!1,null)),s.getTooltipAxes&&i&&h.get("show")){var c=h.get("trigger")==="axis",v=h.get(["axisPointer","type"])==="cross",d=s.getTooltipAxes(h.get(["axisPointer","axis"]));(c||v)&&T(d.baseAxes,St(g,v?"cross":!0,c)),v&&T(d.otherAxes,St(g,"cross",!1))}function g(y,p,m){var _=m.model.getModel("axisPointer",n),S=_.get("show");if(!(!S||S==="auto"&&!y&&!sh(_))){p==null&&(p=_.get("triggerTooltip")),_=y?VL(m,h,n,t,y,p):_;var w=_.get("snap"),b=_.get("triggerEmphasis"),x=Oa(m.model),C=p||w||m.type==="category",D=r.axesInfo[x]={key:x,axis:m,coordSys:s,axisPointerModel:_,triggerTooltip:p,triggerEmphasis:b,involveSeries:C,snap:w,useHandle:sh(_),seriesModels:[],linkGroup:null};u[x]=D,r.seriesInvolved=r.seriesInvolved||C;var A=HL(a,m);if(A!=null){var M=o[A]||(o[A]={axesInfo:{}});M.axesInfo[x]=D,M.mapper=a[A].mapper,D.linkGroup=M}}}})}function VL(r,t,e,i,n,a){var o=t.getModel("axisPointer"),s=["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],l={};T(s,function(c){l[c]=at(o.get(c))}),l.snap=r.type!=="category"&&!!a,o.get("type")==="cross"&&(l.type="line");var u=l.label||(l.label={});if(u.show==null&&(u.show=!1),n==="cross"){var f=o.get(["label","show"]);if(u.show=f??!0,!a){var h=l.lineStyle=o.get("crossStyle");h&>(u,h.textStyle)}}return r.model.getModel("axisPointer",new Ct(l,e,i))}function GL(r,t){t.eachSeries(function(e){var i=e.coordinateSystem,n=e.get(["tooltip","trigger"],!0),a=e.get(["tooltip","show"],!0);!i||!i.model||n==="none"||n===!1||n==="item"||a===!1||e.get(["axisPointer","show"],!0)===!1||T(r.coordSysAxesInfo[Oa(i.model)],function(o){var s=o.axis;i.getAxis(s.dim)===s&&(o.seriesModels.push(e),o.seriesDataCount==null&&(o.seriesDataCount=0),o.seriesDataCount+=e.getData().count())})})}function HL(r,t){for(var e=t.model,i=t.dim,n=0;n=0||r===t}function WL(r){var t=Rc(r);if(t){var e=t.axisPointerModel,i=t.axis.scale,n=e.option,a=e.get("status"),o=e.get("value");o!=null&&(o=i.parse(o));var s=sh(e);a==null&&(n.status=s?"show":"hide");var l=i.getExtent().slice();l[0]>l[1]&&l.reverse(),(o==null||o>l[1])&&(o=l[1]),o0&&(w[0]=-w[0],w[1]=-w[1]);var x=S[0]<0?-1:1;if(a.__position!=="start"&&a.__position!=="end"){var C=-Math.atan2(S[1],S[0]);h[0].8?"left":c[0]<-.8?"right":"center",g=c[1]>.8?"top":c[1]<-.8?"bottom":"middle";break;case"start":a.x=-c[0]*p+f[0],a.y=-c[1]*m+f[1],d=c[0]>.8?"right":c[0]<-.8?"left":"center",g=c[1]>.8?"bottom":c[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":a.x=p*x+f[0],a.y=f[1]+D,d=S[0]<0?"right":"left",a.originX=-p*x,a.originY=-D;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":a.x=b[0],a.y=b[1]+D,d="center",a.originY=-D;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":a.x=-p*x+h[0],a.y=h[1]+D,d=S[0]>=0?"right":"left",a.originX=p*x,a.originY=-D;break}a.scaleX=a.scaleY=o,a.setStyle({verticalAlign:a.__verticalAlign||g,align:a.__align||d})}},t}(Mt),e2=function(){function r(t){this.group=new Mt,this._LineCtor=t||t2}return r.prototype.updateData=function(t){var e=this;this._progressiveEls=null;var i=this,n=i.group,a=i._lineData;i._lineData=t,a||n.removeAll();var o=ug(t);t.diff(a).add(function(s){e._doAdd(t,s,o)}).update(function(s,l){e._doUpdate(a,t,l,s,o)}).remove(function(s){n.remove(a.getItemGraphicEl(s))}).execute()},r.prototype.updateLayout=function(){var t=this._lineData;t&&t.eachItemGraphicEl(function(e,i){e.updateLayout(t,i)},this)},r.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=ug(t),this._lineData=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(t,e){this._progressiveEls=[];function i(s){!s.isGroup&&!r2(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var n=t.start;n0}function ug(r){var t=r.hostModel,e=t.getModel("emphasis");return{lineStyle:t.getModel("lineStyle").getLineStyle(),emphasisLineStyle:e.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:t.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:t.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:e.get("disabled"),blurScope:e.get("blurScope"),focus:e.get("focus"),labelStatesModels:Tn(t)}}function fg(r){return isNaN(r[0])||isNaN(r[1])}function zu(r){return r&&!fg(r[0])&&!fg(r[1])}function fh(r,t,e,i,n,a){r=r||0;var o=e[1]-e[0];if(n!=null&&(n=Qi(n,[0,o])),a!=null&&(a=Math.max(a,n??0)),i==="all"){var s=Math.abs(t[1]-t[0]);s=Qi(s,[0,o]),n=a=Qi(s,[n,a]),i=0}t[0]=Qi(t[0],e),t[1]=Qi(t[1],e);var l=Fu(t,i);t[i]+=r;var u=n||0,f=e.slice();l.sign<0?f[0]+=u:f[1]-=u,t[i]=Qi(t[i],f);var h;return h=Fu(t,i),n!=null&&(h.sign!==l.sign||h.spana&&(t[1-i]=t[i]+h.sign*a),t}function Fu(r,t){var e=r[t]-r[1-t];return{span:Math.abs(e),sign:e>0?-1:e<0?1:t?-1:1}}function Qi(r,t){return Math.min(t[1]!=null?t[1]:1/0,Math.max(t[0]!=null?t[0]:-1/0,r))}var di=bt(),hg=at,Vu=nt,i2=function(){function r(){this._dragging=!1,this.animationThreshold=15}return r.prototype.render=function(t,e,i,n){var a=e.get("value"),o=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=i,!(!n&&this._lastValue===a&&this._lastStatus===o)){this._lastValue=a,this._lastStatus=o;var s=this._group,l=this._handle;if(!o||o==="hide"){s&&s.hide(),l&&l.hide();return}s&&s.show(),l&&l.show();var u={};this.makeElOption(u,a,t,e,i);var f=u.graphicKey;f!==this._lastGraphicKey&&this.clear(i),this._lastGraphicKey=f;var h=this._moveAnimation=this.determineAnimation(t,e);if(!s)s=this._group=new Mt,this.createPointerEl(s,u,t,e),this.createLabelEl(s,u,t,e),i.getZr().add(s);else{var c=St(cg,e,h);this.updatePointerEl(s,u,c),this.updateLabelEl(s,u,c,e)}dg(s,e,!0),this._renderHandle(a)}},r.prototype.remove=function(t){this.clear(t)},r.prototype.dispose=function(t){this.clear(t)},r.prototype.determineAnimation=function(t,e){var i=e.get("animation"),n=t.axis,a=n.type==="category",o=e.get("snap");if(!o&&!a)return!1;if(i==="auto"||i==null){var s=this.animationThreshold;if(a&&n.getBandWidth()>s)return!0;if(o){var l=Rc(t).seriesDataCount,u=n.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return i===!0},r.prototype.makeElOption=function(t,e,i,n,a){},r.prototype.createPointerEl=function(t,e,i,n){var a=e.pointer;if(a){var o=di(t).pointerEl=new bx[a.type](hg(e.pointer));t.add(o)}},r.prototype.createLabelEl=function(t,e,i,n){if(e.label){var a=di(t).labelEl=new Gt(hg(e.label));t.add(a),vg(a,n)}},r.prototype.updatePointerEl=function(t,e,i){var n=di(t).pointerEl;n&&e.pointer&&(n.setStyle(e.pointer.style),i(n,{shape:e.pointer.shape}))},r.prototype.updateLabelEl=function(t,e,i,n){var a=di(t).labelEl;a&&(a.setStyle(e.label.style),i(a,{x:e.label.x,y:e.label.y}),vg(a,n))},r.prototype._renderHandle=function(t){if(!(this._dragging||!this.updateHandleTransform)){var e=this._axisPointerModel,i=this._api.getZr(),n=this._handle,a=e.getModel("handle"),o=e.get("status");if(!a.get("show")||!o||o==="hide"){n&&i.remove(n),this._handle=null;return}var s;this._handle||(s=!0,n=this._handle=ol(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){fs(u.event)},onmousedown:Vu(this._onHandleDragMove,this,0,0),drift:Vu(this._onHandleDragMove,this),ondragend:Vu(this._onHandleDragEnd,this)}),i.add(n)),dg(n,e,!1),n.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=a.get("size");V(l)||(l=[l,l]),n.scaleX=l[0]/2,n.scaleY=l[1]/2,gc(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,s)}},r.prototype._moveHandleToValue=function(t,e){cg(this._axisPointerModel,!e&&this._moveAnimation,this._handle,Gu(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},r.prototype._onHandleDragMove=function(t,e){var i=this._handle;if(i){this._dragging=!0;var n=this.updateHandleTransform(Gu(i),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=n,i.stopAnimation(),i.attr(Gu(n)),di(i).lastProp=null,this._doDispatchAxisPointer()}},r.prototype._doDispatchAxisPointer=function(){var t=this._handle;if(t){var e=this._payloadInfo,i=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:i.axis.dim,axisIndex:i.componentIndex}]})}},r.prototype._onHandleDragEnd=function(){this._dragging=!1;var t=this._handle;if(t){var e=this._axisPointerModel.get("value");this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"})}},r.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),i=this._group,n=this._handle;e&&i&&(this._lastGraphicKey=null,i&&e.remove(i),n&&e.remove(n),this._group=null,this._handle=null,this._payloadInfo=null),Ps(this,"_doDispatchAxisPointer")},r.prototype.doClear=function(){},r.prototype.buildLabel=function(t,e,i){return i=i||0,{x:t[i],y:t[1-i],width:e[i],height:e[1-i]}},r}();function cg(r,t,e,i){E_(di(e).lastProp,i)||(di(e).lastProp=i,t?Zt(e,i,r):(e.stopAnimation(),e.attr(i)))}function E_(r,t){if(q(r)&&q(t)){var e=!0;return T(t,function(i,n){e=e&&E_(r[n],i)}),!!e}else return r===t}function vg(r,t){r[t.get(["label","show"])?"show":"hide"]()}function Gu(r){return{x:r.x||0,y:r.y||0,rotation:r.rotation||0}}function dg(r,t,e){var i=t.get("z"),n=t.get("zlevel");r&&r.traverse(function(a){a.type!=="group"&&(i!=null&&(a.z=i),n!=null&&(a.zlevel=n),a.silent=e)})}function n2(r){var t=r.get("type"),e=r.getModel(t+"Style"),i;return t==="line"?(i=e.getLineStyle(),i.fill=null):t==="shadow"&&(i=e.getAreaStyle(),i.stroke=null),i}function a2(r,t,e,i,n){var a=e.get("value"),o=O_(a,t.axis,t.ecModel,e.get("seriesDataIndices"),{precision:e.get(["label","precision"]),formatter:e.get(["label","formatter"])}),s=e.getModel("label"),l=cl(s.get("padding")||0),u=s.getFont(),f=dy(o,u),h=n.position,c=f.width+l[1]+l[3],v=f.height+l[0]+l[2],d=n.align;d==="right"&&(h[0]-=c),d==="center"&&(h[0]-=c/2);var g=n.verticalAlign;g==="bottom"&&(h[1]-=v),g==="middle"&&(h[1]-=v/2),o2(h,c,v,i);var y=s.get("backgroundColor");(!y||y==="auto")&&(y=t.get(["axisLine","lineStyle","color"])),r.label={x:h[0],y:h[1],style:Di(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:y}),z2:10}}function o2(r,t,e,i){var n=i.getWidth(),a=i.getHeight();r[0]=Math.min(r[0]+t,n)-t,r[1]=Math.min(r[1]+e,a)-e,r[0]=Math.max(r[0],0),r[1]=Math.max(r[1],0)}function O_(r,t,e,i,n){r=t.scale.parse(r);var a=t.scale.getLabel({value:r},{precision:n.precision}),o=n.formatter;if(o){var s={value:zs(t,{value:r}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};T(i,function(l){var u=e.getSeriesByIndex(l.seriesIndex),f=l.dataIndexInside,h=u&&u.getDataParams(f);h&&s.seriesData.push(h)}),Y(o)?a=o.replace("{value}",a):tt(o)&&(a=o(s))}return a}function B_(r,t,e){var i=ur();return Ch(i,i,e.rotation),nf(i,i,e.position),Ma([r.dataToCoord(t),(e.labelOffset||0)+(e.labelDirection||1)*(e.labelMargin||0)],i)}function s2(r,t,e,i,n,a){var o=kr.innerTextLayout(e.rotation,0,e.labelDirection);e.labelMargin=n.get(["label","margin"]),a2(t,i,n,a,{position:B_(i.axis,r,e),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function l2(r,t,e){return e=e||0,{x1:r[e],y1:r[1-e],x2:t[e],y2:t[1-e]}}function u2(r,t,e){return e=e||0,{x:r[e],y:r[1-e],width:t[e],height:t[1-e]}}var f2=function(r){F(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,i,n,a,o){var s=n.axis,l=s.grid,u=a.get("type"),f=pg(l,s).getOtherAxis(s).getGlobalExtent(),h=s.toGlobalCoord(s.dataToCoord(i,!0));if(u&&u!=="none"){var c=n2(a),v=h2[u](s,h,f);v.style=c,e.graphicKey=v.type,e.pointer=v}var d=Ws(l.getRect(),n);s2(i,e,d,n,a,o)},t.prototype.getHandleTransform=function(e,i,n){var a=Ws(i.axis.grid.getRect(),i,{labelInside:!1});a.labelMargin=n.get(["handle","margin"]);var o=B_(i.axis,e,a);return{x:o[0],y:o[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,i,n,a){var o=n.axis,s=o.grid,l=o.getGlobalExtent(!0),u=pg(s,o).getOtherAxis(o).getGlobalExtent(),f=o.dim==="x"?0:1,h=[e.x,e.y];h[f]+=i[f],h[f]=Math.min(l[1],h[f]),h[f]=Math.max(l[0],h[f]);var c=(u[1]+u[0])/2,v=[c,c];v[f]=h[f];var d=[{verticalAlign:"middle"},{align:"center"}];return{x:h[0],y:h[1],rotation:e.rotation,cursorPoint:v,tooltipOption:d[f]}},t}(i2);function pg(r,t){var e={};return e[t.dim+"AxisIndex"]=t.index,r.getCartesian(e)}var h2={line:function(r,t,e){var i=l2([t,e[0]],[t,e[1]],gg(r));return{type:"Line",subPixelOptimize:!0,shape:i}},shadow:function(r,t,e){var i=Math.max(1,r.getBandWidth()),n=e[1]-e[0];return{type:"Rect",shape:u2([t-i/2,e[0]],[i,n],gg(r))}}};function gg(r){return r.dim==="x"?0:1}var c2=function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return 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:W.color.border,width:1,type:"dashed"},shadowStyle:{color:W.color.shadowTint},label:{show:!0,formatter:null,precision:"auto",margin:3,color:W.color.neutral00,padding:[5,7,5,7],backgroundColor:W.color.accent60,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:W.color.accent40,throttle:40}},t}(ct),lr=bt(),v2=T;function N_(r,t,e){if(!et.node){var i=t.getZr();lr(i).records||(lr(i).records={}),d2(i,t);var n=lr(i).records[r]||(lr(i).records[r]={});n.handler=e}}function d2(r,t){if(lr(r).initialized)return;lr(r).initialized=!0,e("click",St(yg,"click")),e("mousemove",St(yg,"mousemove")),e("globalout",g2);function e(i,n){r.on(i,function(a){var o=y2(t);v2(lr(r).records,function(s){s&&n(s,a,o.dispatchAction)}),p2(o.pendings,t)})}}function p2(r,t){var e=r.showTip.length,i=r.hideTip.length,n;e?n=r.showTip[e-1]:i&&(n=r.hideTip[i-1]),n&&(n.dispatchAction=null,t.dispatchAction(n))}function g2(r,t,e){r.handler("leave",null,e)}function yg(r,t,e,i){t.handler(r,e,i)}function y2(r){var t={showTip:[],hideTip:[]},e=function(i){var n=t[i.type];n?n.push(i):(i.dispatchAction=e,r.dispatchAction(i))};return{dispatchAction:e,pendings:t}}function hh(r,t){if(!et.node){var e=t.getZr(),i=(lr(e).records||{})[r];i&&(lr(e).records[r]=null)}}var m2=function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,i,n){var a=i.getComponent("tooltip"),o=e.get("triggerOn")||a&&a.get("triggerOn")||"mousemove|click";N_("axisPointer",n,function(s,l,u){o!=="none"&&(s==="leave"||o.indexOf(s)>=0)&&u({type:"updateAxisPointer",currTrigger:s,x:l&&l.offsetX,y:l&&l.offsetY})})},t.prototype.remove=function(e,i){hh("axisPointer",i)},t.prototype.dispose=function(e,i){hh("axisPointer",i)},t.type="axisPointer",t}(be);function z_(r,t){var e=[],i=r.seriesIndex,n;if(i==null||!(n=t.getSeriesByIndex(i)))return{point:[]};var a=n.getData(),o=Ci(a,r);if(o==null||o<0||V(o))return{point:[]};var s=a.getItemGraphicEl(o),l=n.coordinateSystem;if(n.getTooltipPosition)e=n.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)if(r.isStacked){var u=l.getBaseAxis(),f=l.getOtherAxis(u),h=f.dim,c=u.dim,v=h==="x"||h==="radius"?1:0,d=a.mapDimension(c),g=[];g[v]=a.get(d,o),g[1-v]=a.get(a.getCalculationInfo("stackResultDimension"),o),e=l.dataToPoint(g)||[]}else e=l.dataToPoint(a.getValues(Z(l.dimensions,function(p){return a.mapDimension(p)}),o))||[];else if(s){var y=s.getBoundingRect().clone();y.applyTransform(s.transform),e=[y.x+y.width/2,y.y+y.height/2]}return{point:e,el:s}}var mg=bt();function _2(r,t,e){var i=r.currTrigger,n=[r.x,r.y],a=r,o=r.dispatchAction||nt(e.dispatchAction,e),s=t.getComponent("axisPointer").coordSysAxesInfo;if(s){ls(n)&&(n=z_({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},t).point);var l=ls(n),u=a.axesInfo,f=s.axesInfo,h=i==="leave"||ls(n),c={},v={},d={list:[],map:{}},g={showPointer:St(b2,v),showTooltip:St(w2,d)};T(s.coordSysMap,function(p,m){var _=l||p.containPoint(n);T(s.coordSysAxesInfo[m],function(S,w){var b=S.axis,x=M2(u,S);if(!h&&_&&(!u||x)){var C=x&&x.value;C==null&&!l&&(C=b.pointToData(n)),C!=null&&_g(S,C,g,!1,c)}})});var y={};return T(f,function(p,m){var _=p.linkGroup;_&&!v[m]&&T(_.axesInfo,function(S,w){var b=v[w];if(S!==p&&b){var x=b.value;_.mapper&&(x=p.axis.scale.parse(_.mapper(x,Sg(S),Sg(p)))),y[p.key]=x}})}),T(y,function(p,m){_g(f[m],p,g,!0,c)}),x2(v,f,c),T2(d,n,r,o),C2(f,o,e),c}}function _g(r,t,e,i,n){var a=r.axis;if(!(a.scale.isBlank()||!a.containData(t))){if(!r.involveSeries){e.showPointer(r,t);return}var o=S2(t,r),s=o.payloadBatch,l=o.snapToValue;s[0]&&n.seriesIndex==null&&z(n,s[0]),!i&&r.snap&&a.containData(l)&&l!=null&&(t=l),e.showPointer(r,t,s),e.showTooltip(r,o,l)}}function S2(r,t){var e=t.axis,i=e.dim,n=r,a=[],o=Number.MAX_VALUE,s=-1;return T(t.seriesModels,function(l,u){var f=l.getData().mapDimensionsAll(i),h,c;if(l.getAxisTooltipData){var v=l.getAxisTooltipData(f,r,e);c=v.dataIndices,h=v.nestestValue}else{if(c=l.indicesOfNearest(i,f[0],r,e.type==="category"?.5:null),!c.length)return;h=l.getData().get(f[0],c[0])}if(!(h==null||!isFinite(h))){var d=r-h,g=Math.abs(d);g<=o&&((g=0&&s<0)&&(o=g,s=d,n=h,a.length=0),T(c,function(y){a.push({seriesIndex:l.seriesIndex,dataIndexInside:y,dataIndex:l.getData().getRawIndex(y)})}))}}),{payloadBatch:a,snapToValue:n}}function b2(r,t,e,i){r[t.key]={value:e,payloadBatch:i}}function w2(r,t,e,i){var n=e.payloadBatch,a=t.axis,o=a.model,s=t.axisPointerModel;if(!(!t.triggerTooltip||!n.length)){var l=t.coordSys.model,u=Oa(l),f=r.map[u];f||(f=r.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},r.list.push(f)),f.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:i,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:n.slice()})}}function x2(r,t,e){var i=e.axesInfo=[];T(t,function(n,a){var o=n.axisPointerModel.option,s=r[a];s?(!n.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!n.useHandle&&(o.status="hide"),o.status==="show"&&i.push({axisDim:n.axis.dim,axisIndex:n.axis.model.componentIndex,value:o.value})})}function T2(r,t,e,i){if(ls(t)||!r.list.length){i({type:"hideTip"});return}var n=((r.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};i({type:"showTip",escapeConnect:!0,x:t[0],y:t[1],tooltipOption:e.tooltipOption,position:e.position,dataIndexInside:n.dataIndexInside,dataIndex:n.dataIndex,seriesIndex:n.seriesIndex,dataByCoordSys:r.list})}function C2(r,t,e){var i=e.getZr(),n="axisPointerLastHighlights",a=mg(i)[n]||{},o=mg(i)[n]={};T(r,function(u,f){var h=u.axisPointerModel.option;h.status==="show"&&u.triggerEmphasis&&T(h.seriesDataIndices,function(c){var v=c.seriesIndex+" | "+c.dataIndex;o[v]=c})});var s=[],l=[];T(a,function(u,f){!o[f]&&l.push(u)}),T(o,function(u,f){!a[f]&&s.push(u)}),l.length&&e.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&e.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function M2(r,t){for(var e=0;e<(r||[]).length;e++){var i=r[e];if(t.axis.dim===i.axisDim&&t.axis.model.componentIndex===i.axisIndex)return i}}function Sg(r){var t=r.axis.model,e={},i=e.axisDim=r.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 ls(r){return!r||r[0]==null||isNaN(r[0])||r[1]==null||isNaN(r[1])}function F_(r){I_.registerAxisPointerClass("CartesianAxisPointer",f2),r.registerComponentModel(c2),r.registerComponentView(m2),r.registerPreprocessor(function(t){if(t){(!t.axisPointer||t.axisPointer.length===0)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!V(e)&&(t.axisPointer.link=[e])}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=zL(t,e)}),r.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},_2)}function D2(r){Br(QL),Br(F_)}var bg=["x","y","radius","angle","single"],A2=["cartesian2d","polar","singleAxis"];function L2(r){var t=r.get("coordinateSystem");return ot(A2,t)>=0}function Ar(r){return r+"Axis"}function I2(r,t){var e=rt(),i=[],n=rt();r.eachComponent({mainType:"dataZoom",query:t},function(f){n.get(f.uid)||s(f)});var a;do a=!1,r.eachComponent("dataZoom",o);while(a);function o(f){!n.get(f.uid)&&l(f)&&(s(f),a=!0)}function s(f){n.set(f.uid,!0),i.push(f),u(f)}function l(f){var h=!1;return f.eachTargetAxis(function(c,v){var d=e.get(c);d&&d[v]&&(h=!0)}),h}function u(f){f.eachTargetAxis(function(h,c){(e.get(h)||e.set(h,[]))[c]=!0})}return i}function P2(r){var t=r.ecModel,e={infoList:[],infoMap:rt()};return r.eachTargetAxis(function(i,n){var a=t.getComponent(Ar(i),n);if(a){var o=a.getCoordSysModel();if(o){var s=o.uid,l=e.infoMap.get(s);l||(l={model:o,axisModels:[]},e.infoList.push(l),e.infoMap.set(s,l)),l.axisModels.push(a)}}}),e}var Hu=function(){function r(){this.indexList=[],this.indexMap=[]}return r.prototype.add=function(t){this.indexMap[t]||(this.indexList.push(t),this.indexMap[t]=!0)},r}(),wg=function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._autoThrottle=!0,e._noTarget=!0,e._rangePropMode=["percent","percent"],e}return t.prototype.init=function(e,i,n){var a=xg(e);this.settledOption=a,this.mergeDefaultAndTheme(e,n),this._doInit(a)},t.prototype.mergeOption=function(e){var i=xg(e);lt(this.option,e,!0),lt(this.settledOption,i,!0),this._doInit(i)},t.prototype._doInit=function(e){var i=this.option;this._setDefaultThrottle(e),this._updateRangeUse(e);var n=this.settledOption;T([["start","startValue"],["end","endValue"]],function(a,o){this._rangePropMode[o]==="value"&&(i[a[0]]=n[a[0]]=null)},this),this._resetTarget()},t.prototype._resetTarget=function(){var e=this.get("orient",!0),i=this._targetAxisInfoMap=rt(),n=this._fillSpecifiedTargetAxis(i);n?this._orient=e||this._makeAutoOrientByTargetAxis():(this._orient=e||"horizontal",this._fillAutoTargetAxisByOrient(i,this._orient)),this._noTarget=!0,i.each(function(a){a.indexList.length&&(this._noTarget=!1)},this)},t.prototype._fillSpecifiedTargetAxis=function(e){var i=!1;return T(bg,function(n){var a=this.getReferringComponents(Ar(n),yb);if(a.specified){i=!0;var o=new Hu;T(a.models,function(s){o.add(s.componentIndex)}),e.set(n,o)}},this),i},t.prototype._fillAutoTargetAxisByOrient=function(e,i){var n=this.ecModel,a=!0;if(a){var o=i==="vertical"?"y":"x",s=n.findComponents({mainType:o+"Axis"});l(s,o)}if(a){var s=n.findComponents({mainType:"singleAxis",filter:function(f){return f.get("orient",!0)===i}});l(s,"single")}function l(u,f){var h=u[0];if(h){var c=new Hu;if(c.add(h.componentIndex),e.set(f,c),a=!1,f==="x"||f==="y"){var v=h.getReferringComponents("grid",Yt).models[0];v&&T(u,function(d){h.componentIndex!==d.componentIndex&&v===d.getReferringComponents("grid",Yt).models[0]&&c.add(d.componentIndex)})}}}a&&T(bg,function(u){if(a){var f=n.findComponents({mainType:Ar(u),filter:function(c){return c.get("type",!0)==="category"}});if(f[0]){var h=new Hu;h.add(f[0].componentIndex),e.set(u,h),a=!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,n=this.get("rangeMode");T([["start","startValue"],["end","endValue"]],function(a,o){var s=e[a[0]]!=null,l=e[a[1]]!=null;s&&!l?i[o]="percent":!s&&l?i[o]="value":n?i[o]=n[o]:s&&(i[o]="percent")})},t.prototype.noTarget=function(){return this._noTarget},t.prototype.getFirstTargetAxisModel=function(){var e;return this.eachTargetAxis(function(i,n){e==null&&(e=this.ecModel.getComponent(Ar(i),n))},this),e},t.prototype.eachTargetAxis=function(e,i){this._targetAxisInfoMap.each(function(n,a){T(n.indexList,function(o){e.call(i,a,o)})})},t.prototype.getAxisProxy=function(e,i){var n=this.getAxisModel(e,i);if(n)return n.__dzAxisProxy},t.prototype.getAxisModel=function(e,i){var n=this._targetAxisInfoMap.get(e);if(n&&n.indexMap[i])return this.ecModel.getComponent(Ar(e),i)},t.prototype.setRawRange=function(e){var i=this.option,n=this.settledOption;T([["start","startValue"],["end","endValue"]],function(a){(e[a[0]]!=null||e[a[1]]!=null)&&(i[a[0]]=n[a[0]]=e[a[0]],i[a[1]]=n[a[1]]=e[a[1]])},this),this._updateRangeUse(e)},t.prototype.setCalculatedRange=function(e){var i=this.option;T(["start","startValue","end","endValue"],function(n){i[n]=e[n]})},t.prototype.getPercentRange=function(){var e=this.findRepresentativeAxisProxy();if(e)return e.getDataPercentWindow()},t.prototype.getValueRange=function(e,i){if(e==null&&i==null){var n=this.findRepresentativeAxisProxy();if(n)return n.getDataValueWindow()}else return this.getAxisProxy(e,i).getDataValueWindow()},t.prototype.findRepresentativeAxisProxy=function(e){if(e)return e.__dzAxisProxy;for(var i,n=this._targetAxisInfoMap.keys(),a=0;ao[1];if(_&&!S&&!w)return!0;_&&(y=!0),S&&(d=!0),w&&(g=!0)}return y&&d&&g})}else en(f,function(v){if(a==="empty")l.setData(u=u.map(v,function(g){return s(g)?g:NaN}));else{var d={};d[v]=o,u.selectRange(d)}});en(f,function(v){u.setApproximateExtent(o,v)})}});function s(l){return l>=o[0]&&l<=o[1]}},r.prototype._updateMinMaxSpan=function(){var t=this._minMaxSpan={},e=this._dataZoomModel,i=this._dataExtent;en(["min","max"],function(n){var a=e.get(n+"Span"),o=e.get(n+"ValueSpan");o!=null&&(o=this.getAxisModel().axis.scale.parse(o)),o!=null?a=Et(i[0]+o,i,[0,100],!0):a!=null&&(o=Et(a,[0,100],i,!0)-i[0]),t[n+"Span"]=a,t[n+"ValueSpan"]=o},this)},r.prototype._setAxisModel=function(){var t=this.getAxisModel(),e=this._percentWindow,i=this._valueWindow;if(e){var n=my(i,[0,500]);n=Math.min(n,20);var a=t.axis.scale.rawExtentInfo;e[0]!==0&&a.setDeterminedMinMax("min",+i[0].toFixed(n)),e[1]!==100&&a.setDeterminedMinMax("max",+i[1].toFixed(n)),a.freeze()}},r}();function E2(r,t,e){var i=[1/0,-1/0];en(e,function(o){$D(i,o.getData(),t)});var n=r.getAxisModel(),a=q0(n.axis.scale,n,i).calculate();return[a.min,a.max]}var O2={getTargetSeries:function(r){function t(n){r.eachComponent("dataZoom",function(a){a.eachTargetAxis(function(o,s){var l=r.getComponent(Ar(o),s);n(o,s,l,a)})})}t(function(n,a,o,s){o.__dzAxisProxy=null});var e=[];t(function(n,a,o,s){o.__dzAxisProxy||(o.__dzAxisProxy=new R2(n,a,s,r),e.push(o.__dzAxisProxy))});var i=rt();return T(e,function(n){T(n.getTargetSeriesModels(),function(a){i.set(a.uid,a)})}),i},overallReset:function(r,t){r.eachComponent("dataZoom",function(e){e.eachTargetAxis(function(i,n){e.getAxisProxy(i,n).reset(e)}),e.eachTargetAxis(function(i,n){e.getAxisProxy(i,n).filterData(e,t)})}),r.eachComponent("dataZoom",function(e){var i=e.findRepresentativeAxisProxy();if(i){var n=i.getDataPercentWindow(),a=i.getDataValueWindow();e.setCalculatedRange({start:n[0],end:n[1],startValue:a[0],endValue:a[1]})}})}};function B2(r){r.registerAction("dataZoom",function(t,e){var i=I2(e,t);T(i,function(n){n.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})})})}var Cg=!1;function N2(r){Cg||(Cg=!0,r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,O2),B2(r),r.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function z2(r,t){var e=cl(t.get("padding")),i=t.getItemStyle(["color","opacity"]);i.fill=t.get("backgroundColor");var n=new _t({shape:{x:r.x-e[3],y:r.y-e[0],width:r.width+e[1]+e[3],height:r.height+e[0]+e[2],r:t.get("borderRadius")},style:i,silent:!0,z2:-1});return n}var F2=function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="tooltip",t.dependencies=["axisPointer"],t.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,displayTransition:!0,enterable:!1,backgroundColor:W.color.neutral00,shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:W.color.border,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:W.color.borderShade,width:1,type:"dashed",textStyle:{}}},textStyle:{color:W.color.tertiary,fontSize:14}},t}(ct);function V_(r){var t=r.get("confine");return t!=null?!!t:r.get("renderMode")==="richText"}function G_(r){if(et.domSupported){for(var t=document.documentElement.style,e=0,i=r.length;e-1?(s+="top:50%",l+="translateY(-50%) rotate("+(u=a==="left"?-225:-45)+"deg)"):(s+="left:50%",l+="translateX(-50%) rotate("+(u=a==="top"?225:45)+"deg)");var f=u*Math.PI/180,h=o+n,c=h*Math.abs(Math.cos(f))+h*Math.abs(Math.sin(f)),v=Math.round(((c-Math.SQRT2*n)/2+Math.SQRT2*n-(c-h)/2)*100)/100;s+=";"+a+":-"+v+"px";var d=t+" solid "+n+"px;",g=["position:absolute;width:"+o+"px;height:"+o+"px;z-index:-1;",s+";"+l+";","border-bottom:"+d,"border-right:"+d,"background-color:"+i+";"];return'
'}function X2(r,t,e){var i="cubic-bezier(0.23,1,0.32,1)",n="",a="";return e&&(n=" "+r/2+"s "+i,a="opacity"+n+",visibility"+n),t||(n=" "+r+"s "+i,a+=(a.length?",":"")+(et.transformSupported?""+Ec+n:",left"+n+",top"+n)),H2+":"+a}function Mg(r,t,e){var i=r.toFixed(0)+"px",n=t.toFixed(0)+"px";if(!et.transformSupported)return e?"top:"+n+";left:"+i+";":[["top",n],["left",i]];var a=et.transform3dSupported,o="translate"+(a?"3d":"")+"("+i+","+n+(a?",0":"")+")";return e?"top:0;left:0;"+Ec+":"+o+";":[["top",0],["left",0],[H_,o]]}function Z2(r){var t=[],e=r.get("fontSize"),i=r.getTextColor();i&&t.push("color:"+i),t.push("font:"+r.getFont());var n=$(r.get("lineHeight"),Math.round(e*3/2));e&&t.push("line-height:"+n+"px");var a=r.get("textShadowColor"),o=r.get("textShadowBlur")||0,s=r.get("textShadowOffsetX")||0,l=r.get("textShadowOffsetY")||0;return a&&o&&t.push("text-shadow:"+s+"px "+l+"px "+o+"px "+a),T(["decoration","align"],function(u){var f=r.get(u);f&&t.push("text-"+u+":"+f)}),t.join(";")}function $2(r,t,e,i){var n=[],a=r.get("transitionDuration"),o=r.get("backgroundColor"),s=r.get("shadowBlur"),l=r.get("shadowColor"),u=r.get("shadowOffsetX"),f=r.get("shadowOffsetY"),h=r.getModel("textStyle"),c=e0(r,"html"),v=u+"px "+f+"px "+s+"px "+l;return n.push("box-shadow:"+v),t&&a>0&&n.push(X2(a,e,i)),o&&n.push("background-color:"+o),T(["width","color","radius"],function(d){var g="border-"+d,y=Am(g),p=r.get(y);p!=null&&n.push(g+":"+p+(d==="color"?"":"px"))}),n.push(Z2(h)),c!=null&&n.push("padding:"+cl(c).join("px ")+"px"),n.join(";")+";"}function Dg(r,t,e,i,n){var a=t&&t.painter;if(e){var o=a&&a.getViewportRoot();o&&V1(r,o,e,i,n)}else{r[0]=i,r[1]=n;var s=a&&a.getViewportRootOffset();s&&(r[0]+=s.offsetLeft,r[1]+=s.offsetTop)}r[2]=r[0]/t.getWidth(),r[3]=r[1]/t.getHeight()}var q2=function(){function r(t,e){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,et.wxa)return null;var i=document.createElement("div");i.domBelongToZr=!0,this.el=i;var n=this._zr=t.getZr(),a=e.appendTo,o=a&&(Y(a)?document.querySelector(a):da(a)?a:tt(a)&&a(t.getDom()));Dg(this._styleCoord,n,o,t.getWidth()/2,t.getHeight()/2),(o||t.getDom()).appendChild(i),this._api=t,this._container=o;var s=this;i.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},i.onmousemove=function(l){if(l=l||window.event,!s._enterable){var u=n.handler,f=n.painter.getViewportRoot();ce(f,l,!0),u.dispatch("mousemove",l)}},i.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return r.prototype.update=function(t){if(!this._container){var e=this._api.getDom(),i=G2(e,"position"),n=e.style;n.position!=="absolute"&&i!=="absolute"&&(n.position="relative")}var a=t.get("alwaysShowContent");a&&this._moveIfResized(),this._alwaysShowContent=a,this._enableDisplayTransition=t.get("displayTransition")&&t.get("transitionDuration")>0,this.el.className=t.get("className")||""},r.prototype.show=function(t,e){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var i=this.el,n=i.style,a=this._styleCoord;i.innerHTML?n.cssText=W2+$2(t,!this._firstShow,this._longHide,this._enableDisplayTransition)+Mg(a[0],a[1],!0)+("border-color:"+Ai(e)+";")+(t.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):n.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},r.prototype.setContent=function(t,e,i,n,a){var o=this.el;if(t==null){o.innerHTML="";return}var s="";if(Y(a)&&i.get("trigger")==="item"&&!V_(i)&&(s=Y2(i,n,a)),Y(t))o.innerHTML=t+s;else if(t){o.innerHTML="",V(t)||(t=[t]);for(var l=0;l=0?this._tryShow(a,o):n==="leave"&&this._hide(o))},this))},t.prototype._keepShow=function(){var e=this._tooltipModel,i=this._ecModel,n=this._api,a=e.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&a!=="none"&&a!=="click"){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!n.isDisposed()&&o.manuallyShowTip(e,i,n,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(e,i,n,a){if(!(a.from===this.uid||et.node||!n.getDom())){var o=Ig(a,n);this._ticket="";var s=a.dataByCoordSys,l=rI(a,i,n);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:a.position,positionDefault:"bottom"},o)}else if(a.tooltip&&a.x!=null&&a.y!=null){var f=Q2;f.x=a.x,f.y=a.y,f.update(),ft(f).tooltipConfig={name:null,option:a.tooltip},this._tryShow({offsetX:a.x,offsetY:a.y,target:f},o)}else if(s)this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,dataByCoordSys:s,tooltipOption:a.tooltipOption},o);else if(a.seriesIndex!=null){if(this._manuallyAxisShowTip(e,i,n,a))return;var h=z_(a,i),c=h.point[0],v=h.point[1];c!=null&&v!=null&&this._tryShow({offsetX:c,offsetY:v,target:h.el,position:a.position,positionDefault:"bottom"},o)}else a.x!=null&&a.y!=null&&(n.dispatchAction({type:"updateAxisPointer",x:a.x,y:a.y}),this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,target:n.getZr().findHover(a.x,a.y).target},o))}},t.prototype.manuallyHideTip=function(e,i,n,a){var o=this._tooltipContent;this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,a.from!==this.uid&&this._hide(Ig(a,n))},t.prototype._manuallyAxisShowTip=function(e,i,n,a){var o=a.seriesIndex,s=a.dataIndex,l=i.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||s==null||l==null)){var u=i.getSeriesByIndex(o);if(u){var f=u.getData(),h=Wn([f.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(h.get("trigger")==="axis")return n.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:a.position}),!0}}},t.prototype._tryShow=function(e,i){var n=e.target,a=this._tooltipModel;if(a){this._lastX=e.offsetX,this._lastY=e.offsetY;var o=e.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,e);else if(n){var s=ft(n);if(s.ssrType==="legend")return;this._lastDataByCoordSys=null;var l,u;jn(n,function(f){if(f.tooltipDisabled)return l=u=null,!0;l||u||(ft(f).dataIndex!=null?l=f:ft(f).tooltipConfig!=null&&(u=f))},!0),l?this._showSeriesItemTooltip(e,l,i):u?this._showComponentItemTooltip(e,u,i):this._hide(i)}else this._lastDataByCoordSys=null,this._hide(i)}},t.prototype._showOrMove=function(e,i){var n=e.get("showDelay");i=nt(i,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(i,n):i()},t.prototype._showAxisTooltip=function(e,i){var n=this._ecModel,a=this._tooltipModel,o=[i.offsetX,i.offsetY],s=Wn([i.tooltipOption],a),l=this._renderMode,u=[],f=Li("section",{blocks:[],noHeader:!0}),h=[],c=new pu;T(e,function(m){T(m.dataByAxis,function(_){var S=n.getComponent(_.axisDim+"Axis",_.axisIndex),w=_.value;if(!(!S||w==null)){var b=O_(w,S.axis,n,_.seriesDataIndices,_.valueLabelOpt),x=Li("section",{header:b,noHeader:!He(b),sortBlocks:!0,blocks:[]});f.blocks.push(x),T(_.seriesDataIndices,function(C){var D=n.getSeriesByIndex(C.seriesIndex),A=C.dataIndexInside,M=D.getDataParams(A);if(!(M.dataIndex<0)){M.axisDim=_.axisDim,M.axisIndex=_.axisIndex,M.axisType=_.axisType,M.axisId=_.axisId,M.axisValue=zs(S.axis,{value:w}),M.axisValueLabel=b,M.marker=c.makeTooltipMarker("item",Ai(M.color),l);var I=kd(D.formatTooltip(A,!0,null)),L=I.frag;if(L){var P=Wn([D],a).get("valueFormatter");x.blocks.push(P?z({valueFormatter:P},L):L)}I.text&&h.push(I.text),u.push(M)}})}})}),f.blocks.reverse(),h.reverse();var v=i.position,d=s.get("order"),g=Nd(f,c,l,d,n.get("useUTC"),s.get("textStyle"));g&&h.unshift(g);var y=l==="richText"?` `:"
",p=h.join(y);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(e,u)?this._updatePosition(s,v,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,p,u,Math.random()+"",o[0],o[1],v,null,c)})},t.prototype._showSeriesItemTooltip=function(e,i,n){var a=this._ecModel,o=ft(i),s=o.seriesIndex,l=a.getSeriesByIndex(s),u=o.dataModel||l,f=o.dataIndex,h=o.dataType,c=u.getData(h),v=this._renderMode,d=e.positionDefault,g=Wn([c.getItemModel(f),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,d?{position:d}:null),y=g.get("trigger");if(!(y!=null&&y!=="item")){var p=u.getDataParams(f,h),m=new pu;p.marker=m.makeTooltipMarker("item",Ai(p.color),v);var _=kd(u.formatTooltip(f,!1,h)),S=g.get("order"),w=g.get("valueFormatter"),b=_.frag,x=b?Nd(w?z({valueFormatter:w},b):b,m,v,S,a.get("useUTC"),g.get("textStyle")):_.text,C="item_"+u.name+"_"+f;this._showOrMove(g,function(){this._showTooltipContent(g,x,p,C,e.offsetX,e.offsetY,e.position,e.target,m)}),n({type:"showTip",dataIndexInside:f,dataIndex:c.getRawIndex(f),seriesIndex:s,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,i,n){var a=this._renderMode==="html",o=ft(i),s=o.tooltipConfig,l=s.option||{},u=l.encodeHTMLContent;if(Y(l)){var f=l;l={content:f,formatter:f},u=!0}u&&a&&l.content&&(l=at(l),l.content=Qt(l.content));var h=[l],c=this._ecModel.getComponent(o.componentMainType,o.componentIndex);c&&h.push(c),h.push({formatter:l.content});var v=e.positionDefault,d=Wn(h,this._tooltipModel,v?{position:v}:null),g=d.get("content"),y=Math.random()+"",p=new pu;this._showOrMove(d,function(){var m=at(d.get("formatterParams")||{});this._showTooltipContent(d,g,m,y,e.offsetX,e.offsetY,e.position,i,p)}),n({type:"showTip",from:this.uid})},t.prototype._showTooltipContent=function(e,i,n,a,o,s,l,u,f){if(this._ticket="",!(!e.get("showContent")||!e.get("show"))){var h=this._tooltipContent;h.setEnterable(e.get("enterable"));var c=e.get("formatter");l=l||e.get("position");var v=i,d=this._getNearestPoint([o,s],n,e.get("trigger"),e.get("borderColor"),e.get("defaultBorderColor",!0)),g=d.color;if(c)if(Y(c)){var y=e.ecModel.get("useUTC"),p=V(n)?n[0]:n,m=p&&p.axisType&&p.axisType.indexOf("time")>=0;v=c,m&&(v=hl(p.axisValue,v,y)),v=Lm(v,n,!0)}else if(tt(c)){var _=nt(function(S,w){S===this._ticket&&(h.setContent(w,f,e,g,l),this._updatePosition(e,l,o,s,h,n,u))},this);this._ticket=a,v=c(n,a,_)}else v=c;h.setContent(v,f,e,g,l),h.show(e,g),this._updatePosition(e,l,o,s,h,n,u)}},t.prototype._getNearestPoint=function(e,i,n,a,o){if(n==="axis"||V(i))return{color:a||o};if(!V(i))return{color:a||i.color||i.borderColor}},t.prototype._updatePosition=function(e,i,n,a,o,s,l){var u=this._api.getWidth(),f=this._api.getHeight();i=i||e.get("position");var h=o.getSize(),c=e.get("align"),v=e.get("verticalAlign"),d=l&&l.getBoundingRect().clone();if(l&&d.applyTransform(l.transform),tt(i)&&(i=i([n,a],s,o.el,d,{viewSize:[u,f],contentSize:h.slice()})),V(i))n=Pt(i[0],u),a=Pt(i[1],f);else if(q(i)){var g=i;g.width=h[0],g.height=h[1];var y=gn(g,{width:u,height:f});n=y.x,a=y.y,c=null,v=null}else if(Y(i)&&l){var p=eI(i,d,h,e.get("borderWidth"));n=p[0],a=p[1]}else{var p=j2(n,a,o,u,f,c?null:20,v?null:20);n=p[0],a=p[1]}if(c&&(n-=Pg(c)?h[0]/2:c==="right"?h[0]:0),v&&(a-=Pg(v)?h[1]/2:v==="bottom"?h[1]:0),V_(e)){var p=tI(n,a,o,u,f);n=p[0],a=p[1]}o.moveTo(n,a)},t.prototype._updateContentNotChangedOnAxis=function(e,i){var n=this._lastDataByCoordSys,a=this._cbParamsList,o=!!n&&n.length===e.length;return o&&T(n,function(s,l){var u=s.dataByAxis||[],f=e[l]||{},h=f.dataByAxis||[];o=o&&u.length===h.length,o&&T(u,function(c,v){var d=h[v]||{},g=c.seriesDataIndices||[],y=d.seriesDataIndices||[];o=o&&c.value===d.value&&c.axisType===d.axisType&&c.axisId===d.axisId&&g.length===y.length,o&&T(g,function(p,m){var _=y[m];o=o&&p.seriesIndex===_.seriesIndex&&p.dataIndex===_.dataIndex}),a&&T(c.seriesDataIndices,function(p){var m=p.seriesIndex,_=i[m],S=a[m];_&&S&&S.data!==_.data&&(o=!1)})})}),this._lastDataByCoordSys=e,this._cbParamsList=i,!!o},t.prototype._hide=function(e){this._lastDataByCoordSys=null,e({type:"hideTip",from:this.uid})},t.prototype.dispose=function(e,i){et.node||!i.getDom()||(Ps(this,"_updatePosition"),this._tooltipContent.dispose(),hh("itemTooltip",i))},t.type="tooltip",t}(be);function Wn(r,t,e){var i=t.ecModel,n;e?(n=new Ct(e,i,i),n=new Ct(t.option,n,i)):n=t;for(var a=r.length-1;a>=0;a--){var o=r[a];o&&(o instanceof Ct&&(o=o.get("tooltip",!0)),Y(o)&&(o={formatter:o}),o&&(n=new Ct(o,n,i)))}return n}function Ig(r,t){return r.dispatchAction||nt(t.dispatchAction,t)}function j2(r,t,e,i,n,a,o){var s=e.getSize(),l=s[0],u=s[1];return a!=null&&(r+l+a+2>i?r-=l+a:r+=a),o!=null&&(t+u+o>n?t-=u+o:t+=o),[r,t]}function tI(r,t,e,i,n){var a=e.getSize(),o=a[0],s=a[1];return r=Math.min(r+o,i)-o,t=Math.min(t+s,n)-s,r=Math.max(r,0),t=Math.max(t,0),[r,t]}function eI(r,t,e,i){var n=e[0],a=e[1],o=Math.ceil(Math.SQRT2*i)+8,s=0,l=0,u=t.width,f=t.height;switch(r){case"inside":s=t.x+u/2-n/2,l=t.y+f/2-a/2;break;case"top":s=t.x+u/2-n/2,l=t.y-a-o;break;case"bottom":s=t.x+u/2-n/2,l=t.y+f+o;break;case"left":s=t.x-n-o,l=t.y+f/2-a/2;break;case"right":s=t.x+u+o,l=t.y+f/2-a/2}return[s,l]}function Pg(r){return r==="center"||r==="middle"}function rI(r,t,e){var i=Ih(r).queryOptionMap,n=i.keys()[0];if(!(!n||n==="series")){var a=Va(t,n,i.get(n),{useDefault:!1,enableAll:!1,enableNone:!1}),o=a.models[0];if(o){var s=e.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var f=ft(u).tooltipConfig;if(f&&f.name===r.name)return l=u,!0}),l)return{componentMainType:n,componentIndex:o.componentIndex,el:l}}}}function iI(r){Br(F_),r.registerComponentModel(F2),r.registerComponentView(J2),r.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},ee),r.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},ee)}function nI(r,t){if(!r)return!1;for(var e=V(r)?r:[r],i=0;i=0&&(s[o]=+s[o].toFixed(d)),[s,v]}var Uo={min:St(Wo,"min"),max:St(Wo,"max"),average:St(Wo,"average"),median:St(Wo,"median")};function kg(r,t){if(t){var e=r.getData(),i=r.coordinateSystem,n=i&&i.dimensions;if(!oI(t)&&!V(t.coord)&&V(n)){var a=U_(t,e,i,r);if(t=at(t),t.type&&Uo[t.type]&&a.baseAxis&&a.valueAxis){var o=ot(n,a.baseAxis.dim),s=ot(n,a.valueAxis.dim),l=Uo[t.type](e,a.valueAxis.dim,a.baseDataDim,a.valueDataDim,o,s);t.coord=l[0],t.value=l[1]}else t.coord=[t.xAxis!=null?t.xAxis:t.radiusAxis,t.yAxis!=null?t.yAxis:t.angleAxis]}if(t.coord==null||!V(n)){t.coord=[];var u=r.getBaseAxis();if(u&&t.type&&Uo[t.type]){var f=i.getOtherAxis(u);f&&(t.value=Us(e,e.mapDimension(f.dim),t.type))}}else for(var h=t.coord,c=0;c<2;c++)Uo[h[c]]&&(h[c]=Us(e,e.mapDimension(n[c]),h[c]));return t}}function U_(r,t,e,i){var n={};return r.valueIndex!=null||r.valueDim!=null?(n.valueDataDim=r.valueIndex!=null?t.getDimension(r.valueIndex):r.valueDim,n.valueAxis=e.getAxis(sI(i,n.valueDataDim)),n.baseAxis=e.getOtherAxis(n.valueAxis),n.baseDataDim=t.mapDimension(n.baseAxis.dim)):(n.baseAxis=i.getBaseAxis(),n.valueAxis=e.getOtherAxis(n.baseAxis),n.baseDataDim=t.mapDimension(n.baseAxis.dim),n.valueDataDim=t.mapDimension(n.valueAxis.dim)),n}function sI(r,t){var e=r.getData().getDimensionInfo(t);return e&&e.coordDim}function Rg(r,t){return r&&r.containData&&t.coord&&!aI(t)?r.containData(t.coord):!0}function lI(r,t){return r?function(e,i,n,a){var o=a<2?e.coord&&e.coord[a]:e.value;return vn(o,t[a])}:function(e,i,n,a){return vn(e.value,t[a])}}function Us(r,t,e){if(e==="average"){var i=0,n=0;return r.each(t,function(a,o){isNaN(a)||(i+=a,n++)}),i/n}else return e==="median"?r.getMedian(t):r.getDataExtent(t)[e==="max"?1:0]}var Wu=bt(),uI=function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(){this.markerGroupMap=rt()},t.prototype.render=function(e,i,n){var a=this,o=this.markerGroupMap;o.each(function(s){Wu(s).keep=!1}),i.eachSeries(function(s){var l=Sn.getMarkerModelFromSeries(s,a.type);l&&a.renderSeries(s,l,i,n)}),o.each(function(s){!Wu(s).keep&&a.group.remove(s.group)}),fI(i,o,this.type)},t.prototype.markKeep=function(e){Wu(e).keep=!0},t.prototype.toggleBlurSeries=function(e,i){var n=this;T(e,function(a){var o=Sn.getMarkerModelFromSeries(a,n.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(i?Hy(l):Nh(l))})}})},t.type="marker",t}(be);function fI(r,t,e){r.eachSeries(function(i){var n=Sn.getMarkerModelFromSeries(i,e),a=t.get(i.id);if(n&&a&&a.group){var o=Xh(n),s=o.z,l=o.zlevel;Zh(a.group,s,l)}})}var hI=function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.createMarkerModelFromSeries=function(e,i,n){return new t(e,i,n)},t.type="markLine",t.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},t}(Sn),Yo=bt(),cI=function(r,t,e,i){var n=r.getData(),a;if(V(i))a=i;else{var o=i.type;if(o==="min"||o==="max"||o==="average"||o==="median"||i.xAxis!=null||i.yAxis!=null){var s=void 0,l=void 0;if(i.yAxis!=null||i.xAxis!=null)s=t.getAxis(i.yAxis!=null?"y":"x"),l=ga(i.yAxis,i.xAxis);else{var u=U_(i,n,t,r);s=u.valueAxis;var f=F0(n,u.valueDataDim);l=Us(n,f,o)}var h=s.dim==="x"?0:1,c=1-h,v=at(i),d={coord:[]};v.type=null,v.coord=[],v.coord[c]=-1/0,d.coord[c]=1/0;var g=e.get("precision");g>=0&&pt(l)&&(l=+l.toFixed(Math.min(g,20))),v.coord[h]=d.coord[h]=l,a=[v,d,{type:o,valueIndex:i.valueIndex,value:l}]}else a=[]}var y=[kg(r,a[0]),kg(r,a[1]),z({},a[2])];return y[2].type=y[2].type||null,lt(y[2],y[0]),lt(y[2],y[1]),y};function Ys(r){return!isNaN(r)&&!isFinite(r)}function Eg(r,t,e,i){var n=1-r,a=i.dimensions[r];return Ys(t[n])&&Ys(e[n])&&t[r]===e[r]&&i.getAxis(a).containData(t[r])}function vI(r,t){if(r.type==="cartesian2d"){var e=t[0].coord,i=t[1].coord;if(e&&i&&(Eg(1,e,i,r)||Eg(0,e,i,r)))return!0}return Rg(r,t[0])&&Rg(r,t[1])}function Uu(r,t,e,i,n){var a=i.coordinateSystem,o=r.getItemModel(t),s,l=Pt(o.get("x"),n.getWidth()),u=Pt(o.get("y"),n.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(i.getMarkerPosition)s=i.getMarkerPosition(r.getValues(r.dimensions,t));else{var f=a.dimensions,h=r.get(f[0],t),c=r.get(f[1],t);s=a.dataToPoint([h,c])}if(yl(a,"cartesian2d")){var v=a.getAxis("x"),d=a.getAxis("y"),f=a.dimensions;Ys(r.get(f[0],t))?s[0]=v.toGlobalCoord(v.getExtent()[e?0:1]):Ys(r.get(f[1],t))&&(s[1]=d.toGlobalCoord(d.getExtent()[e?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}r.setItemLayout(t,s)}var dI=function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.updateTransform=function(e,i,n){i.eachSeries(function(a){var o=Sn.getMarkerModelFromSeries(a,"markLine");if(o){var s=o.getData(),l=Yo(o).from,u=Yo(o).to;l.each(function(f){Uu(l,f,!0,a,n),Uu(u,f,!1,a,n)}),s.each(function(f){s.setItemLayout(f,[l.getItemLayout(f),u.getItemLayout(f)])}),this.markerGroupMap.get(a.id).updateLayout()}},this)},t.prototype.renderSeries=function(e,i,n,a){var o=e.coordinateSystem,s=e.id,l=e.getData(),u=this.markerGroupMap,f=u.get(s)||u.set(s,new e2);this.group.add(f.group);var h=pI(o,e,i),c=h.from,v=h.to,d=h.line;Yo(i).from=c,Yo(i).to=v,i.setData(d);var g=i.get("symbol"),y=i.get("symbolSize"),p=i.get("symbolRotate"),m=i.get("symbolOffset");V(g)||(g=[g,g]),V(y)||(y=[y,y]),V(p)||(p=[p,p]),V(m)||(m=[m,m]),h.from.each(function(S){_(c,S,!0),_(v,S,!1)}),d.each(function(S){var w=d.getItemModel(S),b=w.getModel("lineStyle").getLineStyle();d.setItemLayout(S,[c.getItemLayout(S),v.getItemLayout(S)]);var x=w.get("z2");b.stroke==null&&(b.stroke=c.getItemVisual(S,"style").fill),d.setItemVisual(S,{z2:$(x,0),fromSymbolKeepAspect:c.getItemVisual(S,"symbolKeepAspect"),fromSymbolOffset:c.getItemVisual(S,"symbolOffset"),fromSymbolRotate:c.getItemVisual(S,"symbolRotate"),fromSymbolSize:c.getItemVisual(S,"symbolSize"),fromSymbol:c.getItemVisual(S,"symbol"),toSymbolKeepAspect:v.getItemVisual(S,"symbolKeepAspect"),toSymbolOffset:v.getItemVisual(S,"symbolOffset"),toSymbolRotate:v.getItemVisual(S,"symbolRotate"),toSymbolSize:v.getItemVisual(S,"symbolSize"),toSymbol:v.getItemVisual(S,"symbol"),style:b})}),f.updateData(d),h.line.eachItemGraphicEl(function(S){ft(S).dataModel=i,S.traverse(function(w){ft(w).dataModel=i})});function _(S,w,b){var x=S.getItemModel(w);Uu(S,w,b,e,a);var C=x.getModel("itemStyle").getItemStyle();C.fill==null&&(C.fill=f0(l,"color")),S.setItemVisual(w,{symbolKeepAspect:x.get("symbolKeepAspect"),symbolOffset:$(x.get("symbolOffset",!0),m[b?0:1]),symbolRotate:$(x.get("symbolRotate",!0),p[b?0:1]),symbolSize:$(x.get("symbolSize"),y[b?0:1]),symbol:$(x.get("symbol",!0),g[b?0:1]),style:C})}this.markKeep(f),f.group.silent=i.get("silent")||e.get("silent")},t.type="markLine",t}(uI);function pI(r,t,e){var i;r?i=Z(r&&r.dimensions,function(u){var f=t.getData().getDimensionInfo(t.getData().mapDimension(u))||{};return z(z({},f),{name:u,ordinalMeta:null})}):i=[{name:"value",type:"float"}];var n=new ss(i,e),a=new ss(i,e),o=new ss([],e),s=Z(e.get("data"),St(cI,t,r,e));r&&(s=It(s,St(vI,r)));var l=lI(!!r,i);return n.initData(Z(s,function(u){return u[0]}),null,l),a.initData(Z(s,function(u){return u[1]}),null,l),o.initData(Z(s,function(u){return u[2]})),o.hasItemOption=!0,{from:n,to:a,line:o}}function gI(r){r.registerComponentModel(hI),r.registerComponentView(dI),r.registerPreprocessor(function(t){nI(t.series,"markLine")&&(t.markLine=t.markLine||{})})}var yI=function(r,t){if(t==="all")return{type:"all",title:r.getLocaleModel().get(["legend","selector","all"])};if(t==="inverse")return{type:"inverse",title:r.getLocaleModel().get(["legend","selector","inverse"])}},ch=function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.layoutMode={type:"box",ignoreSize:!0},e}return t.prototype.init=function(e,i,n){this.mergeDefaultAndTheme(e,n),e.selected=e.selected||{},this._updateSelector(e)},t.prototype.mergeOption=function(e,i){r.prototype.mergeOption.call(this,e,i),this._updateSelector(e)},t.prototype._updateSelector=function(e){var i=e.selector,n=this.ecModel;i===!0&&(i=e.selector=["all","inverse"]),V(i)&&T(i,function(a,o){Y(a)&&(a={type:a}),i[o]=lt(a,yI(n,a.type))})},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var e=this._data;if(e[0]&&this.get("selectedMode")==="single"){for(var i=!1,n=0;n=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",bottom:W.size.m,align:"auto",backgroundColor:W.color.transparent,borderColor:W.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:W.color.disabled,inactiveBorderColor:W.color.disabled,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:W.color.disabled,inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:W.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:W.color.tertiary,borderWidth:1,borderColor:W.color.border},emphasis:{selectorLabel:{show:!0,color:W.color.quaternary}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},t}(ct),Ji=St,vh=T,Xo=Mt,Y_=function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.newlineDisabled=!1,e}return t.prototype.init=function(){this.group.add(this._contentGroup=new Xo),this.group.add(this._selectorGroup=new Xo),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(e,i,n){var a=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!e.get("show",!0)){var o=e.get("align"),s=e.get("orient");(!o||o==="auto")&&(o=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(o,e,i,n,l,s,u);var f=sc(e,n).refContainer,h=e.getBoxLayoutParams(),c=e.get("padding"),v=gn(h,f,c),d=this.layoutInner(e,o,v,a,l,u),g=gn(gt({width:d.width,height:d.height},h),f,c);this.group.x=g.x-d.x,this.group.y=g.y-d.y,this.group.markRedraw(),this.group.add(this._backgroundEl=z2(d,e))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(e,i,n,a,o,s,l){var u=this.getContentGroup(),f=rt(),h=i.get("selectedMode"),c=i.get("triggerEvent"),v=[];n.eachRawSeries(function(d){!d.get("legendHoverLink")&&v.push(d.id)}),vh(i.getData(),function(d,g){var y=this,p=d.get("name");if(!this.newlineDisabled&&(p===""||p===` `)){var m=new Xo;m.newline=!0,u.add(m);return}var _=n.getSeriesByName(p)[0];if(!f.get(p))if(_){var S=_.getData(),w=S.getVisual("legendLineStyle")||{},b=S.getVisual("legendIcon"),x=S.getVisual("style"),C=this._createItem(_,p,g,d,i,e,w,x,b,h,a);C.on("click",Ji(Og,p,null,a,v)).on("mouseover",Ji(dh,_.name,null,a,v)).on("mouseout",Ji(ph,_.name,null,a,v)),n.ssr&&C.eachChild(function(D){var A=ft(D);A.seriesIndex=_.seriesIndex,A.dataIndex=g,A.ssrType="legend"}),c&&C.eachChild(function(D){y.packEventData(D,i,_,g,p)}),f.set(p,!0)}else n.eachRawSeries(function(D){var A=this;if(!f.get(p)&&D.legendVisualProvider){var M=D.legendVisualProvider;if(!M.containName(p))return;var I=M.indexOfName(p),L=M.getItemVisual(I,"style"),P=M.getItemVisual(I,"legendIcon"),k=Xe(L.fill);k&&k[3]===0&&(k[3]=.2,L=z(z({},L),{fill:za(k,"rgba")}));var B=this._createItem(D,p,g,d,i,e,{},L,P,h,a);B.on("click",Ji(Og,null,p,a,v)).on("mouseover",Ji(dh,null,p,a,v)).on("mouseout",Ji(ph,null,p,a,v)),n.ssr&&B.eachChild(function(U){var O=ft(U);O.seriesIndex=D.seriesIndex,O.dataIndex=g,O.ssrType="legend"}),c&&B.eachChild(function(U){A.packEventData(U,i,D,g,p)}),f.set(p,!0)}},this)},this),o&&this._createSelector(o,i,a,s,l)},t.prototype.packEventData=function(e,i,n,a,o){var s={componentType:"legend",componentIndex:i.componentIndex,dataIndex:a,value:o,seriesIndex:n.seriesIndex};ft(e).eventData=s},t.prototype._createSelector=function(e,i,n,a,o){var s=this.getSelectorGroup();vh(e,function(u){var f=u.type,h=new Gt({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:f==="all"?"legendAllSelect":"legendInverseSelect",legendId:i.id})}});s.add(h);var c=i.getModel("selectorLabel"),v=i.getModel(["emphasis","selectorLabel"]);$a(h,{normal:c,emphasis:v},{defaultText:u.title}),Ts(h)})},t.prototype._createItem=function(e,i,n,a,o,s,l,u,f,h,c){var v=e.visualDrawType,d=o.get("itemWidth"),g=o.get("itemHeight"),y=o.isSelected(i),p=a.get("symbolRotate"),m=a.get("symbolKeepAspect"),_=a.get("icon");f=_||f||"roundRect";var S=mI(f,a,l,u,v,y,c),w=new Xo,b=a.getModel("textStyle");if(tt(e.getLegendIcon)&&(!_||_==="inherit"))w.add(e.getLegendIcon({itemWidth:d,itemHeight:g,icon:f,iconRotate:p,itemStyle:S.itemStyle,lineStyle:S.lineStyle,symbolKeepAspect:m}));else{var x=_==="inherit"&&e.getData().getVisual("symbol")?p==="inherit"?e.getData().getVisual("symbolRotate"):p:0;w.add(_I({itemWidth:d,itemHeight:g,icon:f,iconRotate:x,itemStyle:S.itemStyle,symbolKeepAspect:m}))}var C=s==="left"?d+5:-5,D=s,A=o.get("formatter"),M=i;Y(A)&&A?M=A.replace("{name}",i??""):tt(A)&&(M=A(i));var I=y?b.getTextColor():a.get("inactiveColor");w.add(new Gt({style:Di(b,{text:M,x:C,y:g/2,fill:I,align:D,verticalAlign:"middle"},{inheritColor:I})}));var L=new _t({shape:w.getBoundingRect(),style:{fill:"transparent"}}),P=a.getModel("tooltip");return P.get("show")&&sl({el:L,componentModel:o,itemName:i,itemTooltipOption:P.option}),w.add(L),w.eachChild(function(k){k.silent=!0}),L.silent=!h,this.getContentGroup().add(w),Ts(w),w.__legendDataIndex=n,w},t.prototype.layoutInner=function(e,i,n,a,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();fa(e.get("orient"),l,e.get("itemGap"),n.width,n.height);var f=l.getBoundingRect(),h=[-f.x,-f.y];if(u.markRedraw(),l.markRedraw(),o){fa("horizontal",u,e.get("selectorItemGap",!0));var c=u.getBoundingRect(),v=[-c.x,-c.y],d=e.get("selectorButtonGap",!0),g=e.getOrient().index,y=g===0?"width":"height",p=g===0?"height":"width",m=g===0?"y":"x";s==="end"?v[g]+=f[y]+d:h[g]+=c[y]+d,v[1-g]+=f[p]/2-c[p]/2,u.x=v[0],u.y=v[1],l.x=h[0],l.y=h[1];var _={x:0,y:0};return _[y]=f[y]+d+c[y],_[p]=Math.max(f[p],c[p]),_[m]=Math.min(0,c[m]+v[1-g]),_}else 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}(be);function mI(r,t,e,i,n,a,o){function s(y,p){y.lineWidth==="auto"&&(y.lineWidth=p.lineWidth>0?2:0),vh(y,function(m,_){y[_]==="inherit"&&(y[_]=p[_])})}var l=t.getModel("itemStyle"),u=l.getItemStyle(),f=r.lastIndexOf("empty",0)===0?"fill":"stroke",h=l.getShallow("decal");u.decal=!h||h==="inherit"?i.decal:Yf(h,o),u.fill==="inherit"&&(u.fill=i[n]),u.stroke==="inherit"&&(u.stroke=i[f]),u.opacity==="inherit"&&(u.opacity=(n==="fill"?i:e).opacity),s(u,i);var c=t.getModel("lineStyle"),v=c.getLineStyle();if(s(v,e),u.fill==="auto"&&(u.fill=i.fill),u.stroke==="auto"&&(u.stroke=i.fill),v.stroke==="auto"&&(v.stroke=i.fill),!a){var d=t.get("inactiveBorderWidth"),g=u[f];u.lineWidth=d==="auto"?i.lineWidth>0&&g?2:0:u.lineWidth,u.fill=t.get("inactiveColor"),u.stroke=t.get("inactiveBorderColor"),v.stroke=c.get("inactiveColor"),v.lineWidth=c.get("inactiveWidth")}return{itemStyle:u,lineStyle:v}}function _I(r){var t=r.icon||"roundRect",e=cr(t,0,0,r.itemWidth,r.itemHeight,r.itemStyle.fill,r.symbolKeepAspect);return e.setStyle(r.itemStyle),e.rotation=(r.iconRotate||0)*Math.PI/180,e.setOrigin([r.itemWidth/2,r.itemHeight/2]),t.indexOf("empty")>-1&&(e.style.stroke=e.style.fill,e.style.fill=W.color.neutral00,e.style.lineWidth=2),e}function Og(r,t,e,i){ph(r,t,e,i),e.dispatchAction({type:"legendToggleSelect",name:r??t}),dh(r,t,e,i)}function X_(r){for(var t=r.getZr().storage.getDisplayList(),e,i=0,n=t.length;in[o],y=[-v.x,-v.y];i||(y[a]=f[u]);var p=[0,0],m=[-d.x,-d.y],_=$(e.get("pageButtonGap",!0),e.get("itemGap",!0));if(g){var S=e.get("pageButtonPosition",!0);S==="end"?m[a]+=n[o]-d[o]:p[a]+=d[o]+_}m[1-a]+=v[s]/2-d[s]/2,f.setPosition(y),h.setPosition(p),c.setPosition(m);var w={x:0,y:0};if(w[o]=g?n[o]:v[o],w[s]=Math.max(v[s],d[s]),w[l]=Math.min(0,d[l]+m[1-a]),h.__rectSize=n[o],g){var b={x:0,y:0};b[o]=Math.max(n[o]-d[o]-_,0),b[s]=w[s],h.setClipPath(new _t({shape:b})),h.__rectSize=b[o]}else c.eachChild(function(C){C.attr({invisible:!0,silent:!0})});var x=this._getPageInfo(e);return x.pageIndex!=null&&Zt(f,{x:x.contentPosition[0],y:x.contentPosition[1]},g?e:null),this._updatePageInfoView(e,x),w},t.prototype._pageGo=function(e,i,n){var a=this._getPageInfo(i)[e];a!=null&&n.dispatchAction({type:"legendScroll",scrollDataIndex:a,legendId:i.id})},t.prototype._updatePageInfoView=function(e,i){var n=this._controllerGroup;T(["pagePrev","pageNext"],function(f){var h=f+"DataIndex",c=i[h]!=null,v=n.childOfName(f);v&&(v.setStyle("fill",c?e.get("pageIconColor",!0):e.get("pageIconInactiveColor",!0)),v.cursor=c?"pointer":"default")});var a=n.childOfName("pageText"),o=e.get("pageFormatter"),s=i.pageIndex,l=s!=null?s+1:0,u=i.pageCount;a&&o&&a.setStyle("text",Y(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},t.prototype._getPageInfo=function(e){var i=e.get("scrollDataIndex",!0),n=this.getContentGroup(),a=this._containerGroup.__rectSize,o=e.getOrient().index,s=Yu[o],l=Xu[o],u=this._findTargetItemIndex(i),f=n.children(),h=f[u],c=f.length,v=c?1:0,d={contentPosition:[n.x,n.y],pageCount:v,pageIndex:v-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!h)return d;var g=S(h);d.contentPosition[o]=-g.s;for(var y=u+1,p=g,m=g,_=null;y<=c;++y)_=S(f[y]),(!_&&m.e>p.s+a||_&&!w(_,p.s))&&(m.i>p.i?p=m:p=_,p&&(d.pageNextDataIndex==null&&(d.pageNextDataIndex=p.i),++d.pageCount)),m=_;for(var y=u-1,p=g,m=g,_=null;y>=-1;--y)_=S(f[y]),(!_||!w(m,_.s))&&p.i=x&&b.s<=x+a}},t.prototype._findTargetItemIndex=function(e){if(!this._showController)return 0;var i,n=this.getContentGroup(),a;return n.eachChild(function(o,s){var l=o.__legendDataIndex;a==null&&l!=null&&(a=s),l===e&&(i=s)}),i??a},t.type="legend.scroll",t}(Y_);function TI(r){r.registerAction("legendScroll","legendscroll",function(t,e){var i=t.scrollDataIndex;i!=null&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(n){n.setScrollDataIndex(i)})})}function CI(r){Br(Z_),r.registerComponentModel(wI),r.registerComponentView(xI),TI(r)}function MI(r){Br(Z_),Br(CI)}var DI=function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="dataZoom.slider",t.layoutMode="box",t.defaultOption=$h(wg.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:W.color.accent10,borderRadius:0,backgroundColor:W.color.transparent,dataBackground:{lineStyle:{color:W.color.accent30,width:.5},areaStyle:{color:W.color.accent20,opacity:.2}},selectedDataBackground:{lineStyle:{color:W.color.accent40,width:.5},areaStyle:{color:W.color.accent20,opacity:.3}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:W.color.neutral00,borderColor:W.color.accent20},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:W.color.accent40,opacity:.5},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:W.color.tertiary},brushSelect:!0,brushStyle:{color:W.color.accent30,opacity:.3},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:W.color.accent40},moveHandleStyle:{opacity:.8}},defaultLocationEdgeGap:15}),t}(wg),Yn=_t,AI=1,Zu=30,LI=7,Xn="horizontal",Fg="vertical",II=5,PI=["line","bar","candlestick","scatter"],kI={easing:"cubicOut",duration:100,delay:0},RI=function(r){F(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._displayables={},e}return t.prototype.init=function(e,i){this.api=i,this._onBrush=nt(this._onBrush,this),this._onBrushEnd=nt(this._onBrushEnd,this)},t.prototype.render=function(e,i,n,a){if(r.prototype.render.apply(this,arguments),gc(this,"_dispatchZoomAction",e.get("throttle"),"fixRate"),this._orient=e.getOrient(),e.get("show")===!1){this.group.removeAll();return}if(e.noTarget()){this._clear(),this.group.removeAll();return}(!a||a.type!=="dataZoom"||a.from!==this.uid)&&this._buildView(),this._updateView()},t.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){Ps(this,"_dispatchZoomAction");var e=this.api.getZr();e.off("mousemove",this._onBrush),e.off("mouseup",this._onBrushEnd)},t.prototype._buildView=function(){var e=this.group;e.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var i=this._displayables.sliderGroup=new Mt;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),e.add(i),this._positionGroup()},t.prototype._resetLocation=function(){var e=this.dataZoomModel,i=this.api,n=e.get("brushSelect"),a=n?LI:0,o=sc(e,i).refContainer,s=this._findCoordRect(),l=e.get("defaultLocationEdgeGap",!0)||0,u=this._orient===Xn?{right:o.width-s.x-s.width,top:o.height-Zu-l-a,width:s.width,height:Zu}:{right:l,top:s.y,width:Zu,height:s.height},f=Cn(e.option);T(["right","top","width","height"],function(c){f[c]==="ph"&&(f[c]=u[c])});var h=gn(f,o);this._location={x:h.x,y:h.y},this._size=[h.width,h.height],this._orient===Fg&&this._size.reverse()},t.prototype._positionGroup=function(){var e=this.group,i=this._location,n=this._orient,a=this.dataZoomModel.getFirstTargetAxisModel(),o=a&&a.get("inverse"),s=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;s.attr(n===Xn&&!o?{scaleY:l?1:-1,scaleX:1}:n===Xn&&o?{scaleY:l?1:-1,scaleX:-1}:n===Fg&&!o?{scaleY:l?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:l?-1:1,scaleX:-1,rotation:Math.PI/2});var u=e.getBoundingRect([s]);e.x=i.x-u.x,e.y=i.y-u.y,e.markRedraw()},t.prototype._getViewExtent=function(){return[0,this._size[0]]},t.prototype._renderBackground=function(){var e=this.dataZoomModel,i=this._size,n=this._displayables.sliderGroup,a=e.get("brushSelect");n.add(new Yn({silent:!0,shape:{x:0,y:0,width:i[0],height:i[1]},style:{fill:e.get("backgroundColor")},z2:-40}));var o=new Yn({shape:{x:0,y:0,width:i[0],height:i[1]},style:{fill:"transparent"},z2:0,onclick:nt(this._onClickPanel,this)}),s=this.api.getZr();a?(o.on("mousedown",this._onBrushStart,this),o.cursor="crosshair",s.on("mousemove",this._onBrush),s.on("mouseup",this._onBrushEnd)):(s.off("mousemove",this._onBrush),s.off("mouseup",this._onBrushEnd)),n.add(o)},t.prototype._renderDataShadow=function(){var e=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!e)return;var i=this._size,n=this._shadowSize||[],a=e.series,o=a.getRawData(),s=a.getShadowDim&&a.getShadowDim(),l=s&&o.getDimensionInfo(s)?a.getShadowDim():e.otherDim;if(l==null)return;var u=this._shadowPolygonPts,f=this._shadowPolylinePts;if(o!==this._shadowData||l!==this._shadowDim||i[0]!==n[0]||i[1]!==n[1]){var h=o.getDataExtent(e.thisDim),c=o.getDataExtent(l),v=(c[1]-c[0])*.3;c=[c[0]-v,c[1]+v];var d=[0,i[1]],g=[0,i[0]],y=[[i[0],0],[0,0]],p=[],m=g[1]/Math.max(1,o.count()-1),_=i[0]/(h[1]-h[0]),S=e.thisAxis.type==="time",w=-m,b=Math.round(o.count()/i[0]),x;o.each([e.thisDim,l],function(I,L,P){if(b>0&&P%b){S||(w+=m);return}w=S?(+I-h[0])*_:w+m;var k=L==null||isNaN(L)||L==="",B=k?0:Et(L,c,d,!0);k&&!x&&P?(y.push([y[y.length-1][0],0]),p.push([p[p.length-1][0],0])):!k&&x&&(y.push([w,0]),p.push([w,0])),k||(y.push([w,B]),p.push([w,B])),x=k}),u=this._shadowPolygonPts=y,f=this._shadowPolylinePts=p}this._shadowData=o,this._shadowDim=l,this._shadowSize=[i[0],i[1]];var C=this.dataZoomModel;function D(I){var L=C.getModel(I?"selectedDataBackground":"dataBackground"),P=new Mt,k=new Wa({shape:{points:u},segmentIgnoreThreshold:1,style:L.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),B=new Ua({shape:{points:f},segmentIgnoreThreshold:1,style:L.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return P.add(k),P.add(B),P}for(var A=0;A<3;A++){var M=D(A===1);this._displayables.sliderGroup.add(M),this._displayables.dataShadowSegs.push(M)}},t.prototype._prepareDataShadowInfo=function(){var e=this.dataZoomModel,i=e.get("showDataShadow");if(i!==!1){var n,a=this.ecModel;return e.eachTargetAxis(function(o,s){var l=e.getAxisProxy(o,s).getTargetSeriesModels();T(l,function(u){if(!n&&!(i!==!0&&ot(PI,u.get("type"))<0)){var f=a.getComponent(Ar(o),s).axis,h=EI(o),c,v=u.coordinateSystem;h!=null&&v.getOtherAxis&&(c=v.getOtherAxis(f).inverse),h=u.getData().mapDimension(h);var d=u.getData().mapDimension(o);n={thisAxis:f,series:u,thisDim:d,otherDim:h,otherAxisInverse:c}}},this)},this),n}},t.prototype._renderHandle=function(){var e=this.group,i=this._displayables,n=i.handles=[null,null],a=i.handleLabels=[null,null],o=this._displayables.sliderGroup,s=this._size,l=this.dataZoomModel,u=this.api,f=l.get("borderRadius")||0,h=l.get("brushSelect"),c=i.filler=new Yn({silent:h,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(c),o.add(new Yn({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:s[0],height:s[1],r:f},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:AI,fill:W.color.transparent}})),T([0,1],function(_){var S=l.get("handleIcon");!Rs[S]&&S.indexOf("path://")<0&&S.indexOf("image://")<0&&(S="path://"+S);var w=cr(S,-1,0,2,2,null,!0);w.attr({cursor:OI(this._orient),draggable:!0,drift:nt(this._onDragMove,this,_),ondragend:nt(this._onDragEnd,this),onmouseover:nt(this._showDataInfo,this,!0),onmouseout:nt(this._showDataInfo,this,!1),z2:5});var b=w.getBoundingRect(),x=l.get("handleSize");this._handleHeight=Pt(x,this._size[1]),this._handleWidth=b.width/b.height*this._handleHeight,w.setStyle(l.getModel("handleStyle").getItemStyle()),w.style.strokeNoScale=!0,w.rectHover=!0,w.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),Ts(w);var C=l.get("handleColor");C!=null&&(w.style.fill=C),o.add(n[_]=w);var D=l.getModel("textStyle"),A=l.get("handleLabel")||{},M=A.show||!1;e.add(a[_]=new Gt({silent:!0,invisible:!M,style:Di(D,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:D.getTextColor(),font:D.getFont()}),z2:10}))},this);var v=c;if(h){var d=Pt(l.get("moveHandleSize"),s[1]),g=i.moveHandle=new _t({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:s[1]-.5,height:d}}),y=d*.8,p=i.moveHandleIcon=cr(l.get("moveHandleIcon"),-y/2,-y/2,y,y,W.color.neutral00,!0);p.silent=!0,p.y=s[1]+d/2-.5,g.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var m=Math.min(s[1]/2,Math.max(d,10));v=i.moveZone=new _t({invisible:!0,shape:{y:s[1]-m,height:d+m}}),v.on("mouseover",function(){u.enterEmphasis(g)}).on("mouseout",function(){u.leaveEmphasis(g)}),o.add(g),o.add(p),o.add(v)}v.attr({draggable:!0,cursor:"default",drift:nt(this._onDragMove,this,"all"),ondragstart:nt(this._showDataInfo,this,!0),ondragend:nt(this._onDragEnd,this),onmouseover:nt(this._showDataInfo,this,!0),onmouseout:nt(this._showDataInfo,this,!1)})},t.prototype._resetInterval=function(){var e=this._range=this.dataZoomModel.getPercentRange(),i=this._getViewExtent();this._handleEnds=[Et(e[0],[0,100],i,!0),Et(e[1],[0,100],i,!0)]},t.prototype._updateInterval=function(e,i){var n=this.dataZoomModel,a=this._handleEnds,o=this._getViewExtent(),s=n.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];fh(i,a,o,n.get("zoomLock")?"all":e,s.minSpan!=null?Et(s.minSpan,l,o,!0):null,s.maxSpan!=null?Et(s.maxSpan,l,o,!0):null);var u=this._range,f=this._range=Kn([Et(a[0],o,l,!0),Et(a[1],o,l,!0)]);return!u||u[0]!==f[0]||u[1]!==f[1]},t.prototype._updateView=function(e){var i=this._displayables,n=this._handleEnds,a=Kn(n.slice()),o=this._size;T([0,1],function(v){var d=i.handles[v],g=this._handleHeight;d.attr({scaleX:g/2,scaleY:g/2,x:n[v]+(v?-1:1),y:o[1]/2-g/2})},this),i.filler.setShape({x:a[0],y:0,width:a[1]-a[0],height:o[1]});var s={x:a[0],width:a[1]-a[0]};i.moveHandle&&(i.moveHandle.setShape(s),i.moveZone.setShape(s),i.moveZone.getBoundingRect(),i.moveHandleIcon&&i.moveHandleIcon.attr("x",s.x+s.width/2));for(var l=i.dataShadowSegs,u=[0,a[0],a[1],o[0]],f=0;fi[0]||n[1]<0||n[1]>i[1])){var a=this._handleEnds,o=(a[0]+a[1])/2,s=this._updateInterval("all",n[0]-o);this._updateView(),s&&this._dispatchZoomAction(!1)}},t.prototype._onBrushStart=function(e){var i=e.offsetX,n=e.offsetY;this._brushStart=new dt(i,n),this._brushing=!0,this._brushStartTime=+new Date},t.prototype._onBrushEnd=function(e){if(this._brushing){var i=this._displayables.brushRect;if(this._brushing=!1,!!i){i.attr("ignore",!0);var n=i.shape,a=+new Date;if(!(a-this._brushStartTime<200&&Math.abs(n.width)<5)){var o=this._getViewExtent(),s=[0,100],l=this._handleEnds=[n.x,n.x+n.width],u=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();fh(0,l,o,0,u.minSpan!=null?Et(u.minSpan,s,o,!0):null,u.maxSpan!=null?Et(u.maxSpan,s,o,!0):null),this._range=Kn([Et(l[0],o,s,!0),Et(l[1],o,s,!0)]),this._updateView(),this._dispatchZoomAction(!1)}}}},t.prototype._onBrush=function(e){this._brushing&&(fs(e.event),this._updateBrushRect(e.offsetX,e.offsetY))},t.prototype._updateBrushRect=function(e,i){var n=this._displayables,a=this.dataZoomModel,o=n.brushRect;o||(o=n.brushRect=new Yn({silent:!0,style:a.getModel("brushStyle").getItemStyle()}),n.sliderGroup.add(o)),o.attr("ignore",!1);var s=this._brushStart,l=this._displayables.sliderGroup,u=l.transformCoordToLocal(e,i),f=l.transformCoordToLocal(s.x,s.y),h=this._size;u[0]=Math.max(Math.min(h[0],u[0]),0),o.setShape({x:f[0],y:0,width:u[0]-f[0],height:h[1]})},t.prototype._dispatchZoomAction=function(e){var i=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:e?kI:null,start:i[0],end:i[1]})},t.prototype._findCoordRect=function(){var e,i=P2(this.dataZoomModel).infoList;if(!e&&i.length){var n=i[0].model.coordinateSystem;e=n.getRect&&n.getRect()}if(!e){var a=this.api.getWidth(),o=this.api.getHeight();e={x:a*.2,y:o*.2,width:a*.6,height:o*.6}}return e},t.type="dataZoom.slider",t}(k2);function EI(r){var t={x:"y",y:"x",radius:"angle",angle:"radius"};return t[r]}function OI(r){return r==="vertical"?"ns-resize":"ew-resize"}function BI(r){r.registerComponentModel(DI),r.registerComponentView(RI),N2(r)}function Vg(r,t,e){var i=fr.createCanvas(),n=t.getWidth(),a=t.getHeight(),o=i.style;return o&&(o.position="absolute",o.left="0",o.top="0",o.width=n+"px",o.height=a+"px",i.setAttribute("data-zr-dom-id",r)),i.width=n*e,i.height=a*e,i}var $u=function(r){F(t,r);function t(e,i,n){var a=r.call(this)||this;a.motionBlur=!1,a.lastFrameAlpha=.7,a.dpr=1,a.virtual=!1,a.config={},a.incremental=!1,a.zlevel=0,a.maxRepaintRectCount=5,a.__dirty=!0,a.__firstTimePaint=!0,a.__used=!1,a.__drawIndex=0,a.__startIndex=0,a.__endIndex=0,a.__prevStartIndex=null,a.__prevEndIndex=null;var o;n=n||ys,typeof e=="string"?o=Vg(e,i,n):q(e)&&(o=e,e=o.id),a.id=e,a.dom=o;var s=o.style;return s&&($g(o),o.onselectstart=function(){return!1},s.padding="0",s.margin="0",s.borderWidth="0"),a.painter=i,a.dpr=n,a}return t.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},t.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},t.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},t.prototype.setUnpainted=function(){this.__firstTimePaint=!0},t.prototype.createBackBuffer=function(){var e=this.dpr;this.domBack=Vg("back-"+this.id,this.painter,e),this.ctxBack=this.domBack.getContext("2d"),e!==1&&this.ctxBack.scale(e,e)},t.prototype.createRepaintRects=function(e,i,n,a){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var o=[],s=this.maxRepaintRectCount,l=!1,u=new it(0,0,0,0);function f(m){if(!(!m.isFinite()||m.isZero()))if(o.length===0){var _=new it(0,0,0,0);_.copy(m),o.push(_)}else{for(var S=!1,w=1/0,b=0,x=0;x=s)}}for(var h=this.__startIndex;h15)break}}P.prevElClipPaths&&p.restore()};if(m)if(m.length===0)C=y.__endIndex;else for(var A=v.dpr,M=0;M0&&t>n[0]){for(l=0;lt);l++);s=i[n[l]]}if(n.splice(l+1,0,t),i[t]=e,!e.virtual)if(s){var u=s.dom;u.nextSibling?o.insertBefore(e.dom,u.nextSibling):o.appendChild(e.dom)}else o.firstChild?o.insertBefore(e.dom,o.firstChild):o.appendChild(e.dom);e.painter||(e.painter=this)}},r.prototype.eachLayer=function(t,e){for(var i=this._zlevelList,n=0;n0?Zo:0),this._needsManuallyCompositing),f.__builtin__||_h("ZLevel "+u+" has been used by unkown layer "+f.id),f!==a&&(f.__used=!0,f.__startIndex!==l&&(f.__dirty=!0),f.__startIndex=l,f.incremental?f.__drawIndex=-1:f.__drawIndex=l,e(l),a=f),n.__dirty&oe&&!n.__inHover&&(f.__dirty=!0,f.incremental&&f.__drawIndex<0&&(f.__drawIndex=l))}e(l),this.eachBuiltinLayer(function(h,c){!h.__used&&h.getElementCount()>0&&(h.__dirty=!0,h.__startIndex=h.__endIndex=h.__drawIndex=0),h.__dirty&&h.__drawIndex<0&&(h.__drawIndex=h.__startIndex)})},r.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},r.prototype._clearLayer=function(t){t.clear()},r.prototype.setBackgroundColor=function(t){this._backgroundColor=t,T(this._layers,function(e){e.setUnpainted()})},r.prototype.configLayer=function(t,e){if(e){var i=this._layerConfig;i[t]?lt(i[t],e,!0):i[t]=e;for(var n=0;nS+w.searches,0),c=f.reduce((S,w)=>S+w.saves,0),v=f.length||1;let d=0,g=0;return f.forEach((S,w)=>{const b=S.searches+S.saves;b>g&&(g=b,d=w)}),{totalSearches:h,totalSaves:c,avgSearches:Math.round(h/v),avgSaves:Math.round(c/v),peakDay:((p=(y=f[d])==null?void 0:y.date)==null?void 0:p.slice(5))||"—",peakSearches:((m=f[d])==null?void 0:m.searches)||0,peakSaves:((_=f[d])==null?void 0:_.saves)||0,dayCount:v}}function l(){const f=e.value,h=r.value;if(!f)return;const c=s(h);if(typeof t=="function"?t(c):t&&(t.value=c),!h.length){i&&(i.dispose(),i=null),f.innerHTML='
暂无使用数据
';return}(!i||i.getDom()!==f)&&(i&&i.dispose(),i=VM(f),u());const v=h.map(S=>S.date.slice(5)),d=h.length,g=Math.max(...h.map(S=>Math.max(S.searches,S.saves)),1),y=Math.ceil(g*1.35)||1,p=Math.round(c.totalSearches/d),m=d>=30,_={tooltip:{trigger:"axis",axisPointer:{type:"shadow"},backgroundColor:"rgba(255,255,255,0.97)",borderColor:"#e8e8e8",borderWidth:1,borderRadius:8,padding:[10,14],textStyle:{fontSize:12,color:"#303133"},formatter:S=>{var M,I;const w=((M=S[0])==null?void 0:M.dataIndex)??0,b=((I=h[w])==null?void 0:I.date)||"",x=h[w],C=new Set,D=S.filter(L=>{const P=L.seriesName;return C.has(P)?!1:(C.add(P),!0)});let A=`
${b}
`;return D.forEach(L=>{const P=L.value,k=Array.isArray(P)?P[1]:P,B=L.seriesType==="bar",O=L.seriesName==="搜索"?x==null?void 0:x.searchDelta:x==null?void 0:x.saveDelta,H=O!==void 0&&O!==0?`${O>0?"↑":"↓"}${Math.abs(O)}`:O===0?'→0':"",R=B?``:``;A+=`
${R}${L.seriesName}:${k} 次${H}
`}),A}},legend:{data:["搜索","保存"],bottom:m?30:0,left:"center",itemWidth:14,itemHeight:10,textStyle:{fontSize:11,color:"#666"}},grid:{left:8,right:12,top:28,bottom:m?70:42,containLabel:!0},xAxis:{type:"category",data:v,axisLabel:{interval:0,fontSize:11,color:"#909399",rotate:d>15?45:0},axisLine:{lineStyle:{color:"#e8e8e8"}},splitLine:{show:!1},axisTick:{show:!1}},yAxis:{type:"value",name:"次",nameTextStyle:{fontSize:10,color:"#909399"},min:0,max:y,splitNumber:4,axisLabel:{fontSize:10,color:"#909399"},splitLine:{lineStyle:{color:"#f5f5f5",type:"dashed"}}},series:[{name:"搜索",type:"bar",data:h.map(S=>S.searches),barWidth:a,barGap:o,itemStyle:{color:new ji(0,0,0,1,[{offset:0,color:"#6366f1"},{offset:1,color:"#a5b4fc"}]),borderRadius:[4,4,0,0]},emphasis:{itemStyle:{color:new ji(0,0,0,1,[{offset:0,color:"#4f46e5"},{offset:1,color:"#818cf8"}])}},animationDuration:500,animationEasing:"cubicOut"},{name:"保存",type:"bar",data:h.map(S=>S.saves),barWidth:a,barGap:o,itemStyle:{color:new ji(0,0,0,1,[{offset:0,color:"#10b981"},{offset:1,color:"#6ee7b7"}]),borderRadius:[4,4,0,0]},emphasis:{itemStyle:{color:new ji(0,0,0,1,[{offset:0,color:"#059669"},{offset:1,color:"#34d399"}])}},animationDuration:500,animationEasing:"cubicOut"},{name:"搜索",type:"line",smooth:!0,symbol:"circle",symbolSize:5,data:h.map(S=>S.searches),lineStyle:{width:2.5,color:"#4f46e5"},itemStyle:{color:"#4f46e5",borderColor:"#fff",borderWidth:2},areaStyle:{color:new ji(0,0,0,1,[{offset:0,color:"rgba(99,102,241,0.12)"},{offset:1,color:"rgba(99,102,241,0.01)"}])},label:{show:!1},connectNulls:!0,animationDuration:700,animationEasing:"cubicOut",z:3,markLine:p>0?{silent:!0,symbol:"none",lineStyle:{color:"#6366f1",type:"dashed",width:1,opacity:.5},label:{formatter:`均 ${p}`,position:"insideEndTop",fontSize:10,color:"#6366f1"},data:[{yAxis:p,name:"日均搜索"}]}:void 0},{name:"保存",type:"line",smooth:!0,symbol:"circle",symbolSize:5,data:h.map(S=>S.saves),lineStyle:{width:2.5,color:"#059669"},itemStyle:{color:"#059669",borderColor:"#fff",borderWidth:2},areaStyle:{color:new ji(0,0,0,1,[{offset:0,color:"rgba(16,185,129,0.12)"},{offset:1,color:"rgba(16,185,129,0.01)"}])},label:{show:!1},connectNulls:!0,animationDuration:700,animationEasing:"cubicOut",z:3,markLine:p>0?{silent:!0,symbol:"none",lineStyle:{color:"#10b981",type:"dashed",width:1,opacity:.5},label:{formatter:`均 ${Math.round(c.totalSaves/d)}`,position:"insideEndTop",fontSize:10,color:"#10b981"},data:[{yAxis:Math.round(c.totalSaves/d),name:"日均保存"}]}:void 0}],...m?{dataZoom:[{type:"slider",bottom:6,height:20,start:0,end:100,borderColor:"#e8e8e8",fillerColor:"rgba(99,102,241,0.08)",handleStyle:{color:"#6366f1",borderColor:"#6366f1"},textStyle:{fontSize:10,color:"#909399"}}]}:{}};i.setOption(_,!0)}qu(r,()=>{Hg(()=>l())},{deep:!0});function u(){e.value&&(n&&(n.disconnect(),n=null),n=new ResizeObserver(()=>{i==null||i.resize()}),n.observe(e.value))}return $_(()=>{n==null||n.disconnect(),n=null,i==null||i.dispose(),i=null}),{chartRef:e,render:l,initResize:u}}const WI={class:"section-content"},UI={class:"dash-row dash-row-stats"},YI={class:"stat-label"},XI={class:"stat-value"},ZI={class:"dash-row"},$I={class:"storage-grid"},qI={class:"drive-header"},KI=["src"],QI={class:"drive-name"},JI={class:"drive-space"},jI={class:"drive-used"},tP={class:"drive-total"},eP={class:"dash-row dash-row-cols-3"},rP={class:"insight-header"},iP={class:"trend-day-btns"},nP=["onClick"],aP={key:0,class:"trend-summary-row"},oP={class:"trend-summary-item"},sP={class:"trend-summary-num"},lP={class:"trend-summary-item"},uP={class:"trend-summary-num"},fP={class:"trend-summary-item"},hP={class:"trend-summary-num"},cP={class:"trend-summary-item"},vP={class:"trend-summary-num"},dP={class:"trend-summary-desc"},pP={class:"keyword-list"},gP={class:"kw-count"},yP={class:"ip-list"},mP={class:"ip-rank"},_P={class:"ip-addr"},SP={key:0,class:"ip-loc"},bP={class:"ip-count"},wP={class:"province-list"},xP={class:"province-rank"},TP={class:"province-bar-wrap"},CP={class:"province-name"},MP={class:"province-count"},DP={key:0,class:"section-content"},AP={class:"cloud-toggle-grid"},LP=["src"],IP={class:"cloud-label"},PP={key:1,class:"section-content"},kP={key:2,class:"section-content"},RP=q_({__name:"AdminDashboard",setup(r){t1();const t=Ce(""),e=Ce({todaySearches:0,todaySaves:0,monthSearches:0,monthSaves:0,totalSearches:0,totalSaves:0,hotKeywords:[],trendTrend:[],cloudUsage:[],topIps:[],provinceRankings:[]}),i=Ce(""),n=Ce([]),{chartRef:a,render:o,initResize:s}=HI(Ka(()=>e.value.trendTrend),R=>{b.value=R}),l=a;qu(()=>e.value.trendTrend,()=>{o()},{deep:!0});const u=Ce("dashboard");qu(()=>u.value,(R,E)=>{R==="dashboard"&&E!=="dashboard"&&Hg(()=>{const N=document.querySelector(".trend-chart-echarts");N&&N.childElementCount===0?(o(),s()):N&&s()})});const f=[{key:"todaySearches",label:"今日搜索"},{key:"todaySaves",label:"今日保存"},{key:"monthSearches",label:"本月搜索"},{key:"monthSaves",label:"本月保存"},{key:"totalSearches",label:"总搜索量"},{key:"totalSaves",label:"总保存量"}];function h(R){return R===0?"danger":R<3?"warning":R<8?"":"info"}function c(R){return R?R.replace(/^(中国|China)\s*/i,"").trim():""}const v=Ka(()=>{const R=e.value.provinceRankings;return R.length>0?Math.max(...R.map(E=>E.count)):1}),d=["#409eff","#67c23a","#e6a23c","#f56c6c","#909399","#b37feb","#36cfc9","#ff85c0"];function g(R){return d[R%d.length]}const y=Ce("ip");function p(){}const m="data:image/svg+xml,"+encodeURIComponent('');function _(R){var E;return((E=n.value.find(N=>N.type===R))==null?void 0:E.icon)||m}const S=[7,15,30,60],w=Ce(7),b=Ce(null);async function x(R){w.value=R,await U()}const C=Ce(""),D=Ce([]),A=Q_({uptime:"--",memory:"--",version:"--",dbOk:!1,redisOk:!1,pansouOk:!1});async function M(){try{const R=await o1(1,5);D.value=R.records||[]}catch{D.value=[]}}async function I(){var R,E,N;try{const J=await(await fetch("/health")).json();A.uptime=L(J.uptime||0),A.memory=P(J.memory||0),A.version=J.version||"--",A.dbOk=((R=J.components)==null?void 0:R.db)==="connected",A.redisOk=((E=J.components)==null?void 0:E.redis)==="connected",A.pansouOk=((N=J.components)==null?void 0:N.pansou)==="ok"}catch{}}function L(R){const E=Math.floor(R/86400),N=Math.floor(R%86400/3600),X=Math.floor(R%3600/60),J=[];return E>0&&J.push(E+"天"),N>0&&J.push(N+"时"),J.push(X+"分"),J.join(" ")}function P(R){return R>=1073741824?(R/1073741824).toFixed(1)+" GB":R>=1048576?(R/1048576).toFixed(0)+" MB":(R/1024).toFixed(0)+" KB"}const k=Ka(()=>u.value==="cloud-configs-toggle"),B=Ka(()=>u.value.startsWith("sys-"));K_(async()=>{try{const R=await r1();R.site_name&&(i.value=R.site_name,document.title=R.site_name+" - 管理后台")}catch{}try{const[R,E]=await Promise.all([i1(),n1()]);n.value=E.types,await U(),await M(),await I(),s()}catch(R){console.error("加载数据失败",R)}});async function U(){try{e.value=await a1(w.value);try{const E=await(await fetch("/health")).json();t.value=E.version}catch{}}catch(R){console.error("加载统计数据失败",R)}}function O(R){if(!R.storageUsed||!R.storageTotal)return 0;const E=parseFloat(R.storageUsed),N=parseFloat(R.storageTotal);return N<=0?0:Math.round(E/N*100)}async function H(R,E){const N=n.value.find(X=>X.type===R);if(N)try{await s1(R,E),N.enabled=E}catch(X){j_.error(X.message||"切换失败"),N.enabled=!E}}return(R,E)=>{const N=Hr("el-card"),X=Hr("el-progress"),J=Hr("el-empty"),yt=Hr("el-tag"),Bt=Hr("el-tab-pane"),ue=Hr("el-tabs"),xe=Hr("el-switch");return Tt(),Nt("div",null,[ml(Q("div",WI,[Q("div",UI,[(Tt(),Nt(Vr,null,Gr(f,K=>$t(N,{key:K.key,class:"stat-card",shadow:"never"},{default:qt(()=>[Q("div",YI,wt(K.label),1),Q("div",XI,wt(e.value[K.key]??0),1)]),_:2},1024)),64))]),Q("div",ZI,[$t(N,{class:"storage-card",shadow:"never"},{header:qt(()=>[...E[1]||(E[1]=[Q("span",null,"💾 网盘存储空间",-1)])]),default:qt(()=>[Q("div",$I,[(Tt(!0),Nt(Vr,null,Gr(e.value.cloudUsage,K=>(Tt(),Nt("div",{key:K.cloudType+"-"+(K.nickname||""),class:"storage-drive-card"},[Q("div",qI,[Q("img",{src:_(K.cloudType),class:"drive-icon"},null,8,KI),Q("span",QI,wt(K.nickname||K.cloudType),1),Q("span",{class:Nc(["drive-status",K.isActive?"active":"inactive"])},wt(K.isActive?"正常":"停用"),3)]),Q("div",JI,[Q("span",jI,wt(K.storageUsed||"--"),1),E[2]||(E[2]=Q("span",{class:"drive-sep"},"/",-1)),Q("span",tP,wt(K.storageTotal||"--"),1)]),$t(X,{percentage:O(K),"stroke-width":10,color:O(K)>80?"#f56c6c":O(K)>60?"#e6a23c":"#67c23a"},null,8,["percentage","color"])]))),128)),e.value.cloudUsage.length===0?(Tt(),Ei(J,{key:0,description:"暂无网盘数据","image-size":72})):Oe("",!0)])]),_:1})]),Q("div",eP,[$t(N,{class:"insight-card trend-card",shadow:"never"},{header:qt(()=>[Q("div",rP,[E[3]||(E[3]=Q("span",null,"📈 使用趋势",-1)),Q("div",iP,[(Tt(),Nt(Vr,null,Gr(S,K=>Q("button",{key:K,class:Nc(["trend-day-btn",{active:w.value===K}]),onClick:ut=>x(K)},wt(K)+"天",11,nP)),64))])])]),default:qt(()=>[b.value?(Tt(),Nt("div",aP,[Q("div",oP,[Q("span",sP,wt(b.value.totalSearches),1),E[4]||(E[4]=Q("span",{class:"trend-summary-desc"},"总搜索",-1))]),Q("div",lP,[Q("span",uP,wt(b.value.totalSaves),1),E[5]||(E[5]=Q("span",{class:"trend-summary-desc"},"总保存",-1))]),Q("div",fP,[Q("span",hP,wt(b.value.avgSearches)+"/"+wt(b.value.avgSaves),1),E[6]||(E[6]=Q("span",{class:"trend-summary-desc"},"日均搜索/保存",-1))]),Q("div",cP,[Q("span",vP,wt(b.value.peakDay),1),Q("span",dP,"峰值日 "+wt(b.value.peakSearches)+"+"+wt(b.value.peakSaves),1)])])):Oe("",!0),Q("div",{ref_key:"chartRef",ref:l,class:"trend-chart-echarts"},null,512)]),_:1}),$t(N,{class:"insight-card",shadow:"never"},{header:qt(()=>[...E[7]||(E[7]=[Q("span",null,"🔍 热门搜索 Top 20",-1)])]),default:qt(()=>[Q("div",pP,[(Tt(!0),Nt(Vr,null,Gr(e.value.hotKeywords,(K,ut)=>(Tt(),Ei(yt,{key:K.keyword,type:h(ut),size:"small",class:"keyword-tag"},{default:qt(()=>[zc(wt(K.keyword),1),Q("sup",gP,wt(K.count),1)]),_:2},1032,["type"]))),128)),e.value.hotKeywords.length===0?(Tt(),Ei(J,{key:0,description:"暂无搜索数据","image-size":56})):Oe("",!0)])]),_:1}),$t(N,{class:"insight-card",shadow:"never"},{header:qt(()=>[$t(ue,{modelValue:y.value,"onUpdate:modelValue":E[0]||(E[0]=K=>y.value=K),class:"card-tabs",onTabClick:p},{default:qt(()=>[$t(Bt,{label:"🌐 IP Top 10",name:"ip"}),$t(Bt,{label:"🗺️ 地域 Top 10",name:"province"})]),_:1},8,["modelValue"])]),default:qt(()=>{var K;return[ml(Q("div",yP,[(Tt(!0),Nt(Vr,null,Gr(e.value.topIps,(ut,j)=>(Tt(),Nt("div",{key:ut.ip,class:"ip-row"},[Q("span",mP,wt(j+1),1),Q("span",_P,wt(ut.ip),1),ut.ip_location?(Tt(),Nt("span",SP,wt(c(ut.ip_location)),1)):Oe("",!0),Q("span",bP,wt(ut.count)+" 次",1)]))),128)),e.value.topIps.length===0?(Tt(),Ei(J,{key:0,description:"暂无数据","image-size":56})):Oe("",!0)],512),[[_l,y.value==="ip"]]),ml(Q("div",wP,[(Tt(!0),Nt(Vr,null,Gr(e.value.provinceRankings.slice(0,10),(ut,j)=>(Tt(),Nt("div",{key:ut.province,class:"province-row"},[Q("span",xP,wt(j+1),1),Q("span",TP,[Q("span",{class:"province-bar",style:J_({width:ut.count/v.value*100+"%",background:g(j)})},null,4)]),Q("span",CP,wt(ut.province),1),Q("span",MP,wt(ut.count)+" 次",1)]))),128)),(K=e.value.provinceRankings)!=null&&K.length?Oe("",!0):(Tt(),Ei(J,{key:0,description:"暂无数据","image-size":56}))],512),[[_l,y.value==="province"]])]}),_:1})])],512),[[_l,u.value==="dashboard"]]),k.value?(Tt(),Nt("div",DP,[$t(N,{class:"config-card",shadow:"never"},{header:qt(()=>[...E[8]||(E[8]=[Q("span",null,"📂 网盘类型开关",-1)])]),default:qt(()=>[Q("div",AP,[(Tt(!0),Nt(Vr,null,Gr(n.value,K=>(Tt(),Nt("div",{key:K.type,class:"cloud-toggle-chip"},[Q("img",{src:K.icon,class:"cloud-icon-img"},null,8,LP),Q("span",IP,wt(K.label),1),K.type==="others"?(Tt(),Ei(yt,{key:0,size:"small",type:"info"},{default:qt(()=>[...E[9]||(E[9]=[zc("关",-1)])]),_:1})):Oe("",!0),$t(xe,{"model-value":K.enabled,size:"small",onChange:ut=>H(K.type,ut)},null,8,["model-value","onChange"])]))),128))]),E[10]||(E[10]=Q("div",{class:"form-tip",style:{"margin-top":"12px"}}," 关闭的网盘类型在搜索结果中不会展示。修改后立即生效,无需点击保存。 ",-1))]),_:1}),$t(l1)])):Oe("",!0),B.value?(Tt(),Nt("div",PP,[$t(u1,{section:C.value},null,8,["section"])])):Oe("",!0),u.value==="save-records"?(Tt(),Nt("div",kP,[$t(f1)])):Oe("",!0)])}}}),HP=e1(RP,[["__scopeId","data-v-ad5932b7"]]);export{HP as default};