import{B as e}from"./index-yNQwsZKK.js";var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},t(e,n)};function n(e,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}var r=function(){function e(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return e}(),i=new(function(){function e(){this.browser=new r,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 e}());typeof wx==`object`&&typeof wx.getSystemInfoSync==`function`?(i.wxa=!0,i.touchEventsSupported=!0):typeof document>`u`&&typeof self<`u`?i.worker=!0:!i.hasGlobalWindow||`Deno`in window||typeof navigator<`u`&&typeof navigator.userAgent==`string`&&navigator.userAgent.indexOf(`Node.js`)>-1?(i.node=!0,i.svgSupported=!0):a(navigator.userAgent,i);function a(e,t){var n=t.browser,r=e.match(/Firefox\/([\d.]+)/),i=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),a=e.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(e);if(r&&(n.firefox=!0,n.version=r[1]),i&&(n.ie=!0,n.version=i[1]),a&&(n.edge=!0,n.version=a[1],n.newEdge=+a[1].split(`.`)[0]>18),o&&(n.weChat=!0),t.svgSupported=typeof SVGRect<`u`,t.touchEventsSupported=`ontouchstart`in window&&!n.ie&&!n.edge,t.pointerEventsSupported=`onpointerdown`in window&&(n.edge||n.ie&&+n.version>=11),t.domSupported=typeof document<`u`){var s=document.documentElement.style;t.transform3dSupported=(n.ie&&`transition`in s||n.edge||`WebKitCSSMatrix`in window&&`m11`in new WebKitCSSMatrix||`MozPerspective`in s)&&!(`OTransition`in s),t.transformSupported=t.transform3dSupported||n.ie&&+n.version>=9}}var o=`12px sans-serif`,s=20,c=100,l=`007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N`;function u(e){var t={};if(typeof JSON>`u`)return t;for(var n=0;n=0)s=o*n.length;else for(var c=0;cNe,HashMap:()=>Ee,RADIAN_TO_DEGREE:()=>Me,assert:()=>ve,bind:()=>B,clone:()=>k,concatArray:()=>De,createCanvas:()=>P,createHashMap:()=>J,createObject:()=>Oe,curry:()=>V,defaults:()=>N,disableUserSelect:()=>ke,each:()=>L,eqNaN:()=>pe,extend:()=>M,filter:()=>re,find:()=>ie,guid:()=>D,hasOwn:()=>Ae,indexOf:()=>F,inherits:()=>ee,isArray:()=>H,isArrayLike:()=>te,isBuiltInObject:()=>se,isDom:()=>le,isFunction:()=>U,isGradientObject:()=>ue,isImagePatternObject:()=>de,isNumber:()=>G,isObject:()=>K,isPrimitive:()=>Se,isRegExp:()=>fe,isString:()=>W,isStringSafe:()=>oe,isTypedArray:()=>ce,keys:()=>z,logError:()=>O,map:()=>R,merge:()=>A,mergeAll:()=>j,mixin:()=>I,noop:()=>je,normalizeCssArray:()=>_e,reduce:()=>ne,retrieve:()=>me,retrieve2:()=>q,retrieve3:()=>he,setAsPrimitive:()=>xe,slice:()=>ge,trim:()=>ye}),h=ne([`Function`,`RegExp`,`Date`,`Error`,`CanvasGradient`,`CanvasPattern`,`Image`,`Canvas`],function(e,t){return e[`[object `+t+`]`]=!0,e},{}),g=ne([`Int8`,`Uint8`,`Uint8Clamped`,`Int16`,`Uint16`,`Int32`,`Uint32`,`Float32`,`Float64`],function(e,t){return e[`[object `+t+`Array]`]=!0,e},{}),_=Object.prototype.toString,v=Array.prototype,y=v.forEach,b=v.filter,x=v.slice,S=v.map,C=function(){}.constructor,w=C?C.prototype:null,T=`__proto__`,E=2311;function D(){return E++}function O(){var e=[...arguments];typeof console<`u`&&console.error.apply(console,e)}function k(e){if(typeof e!=`object`||!e)return e;var t=e,n=_.call(e);if(n===`[object Array]`){if(!Se(e)){t=[];for(var r=0,i=e.length;rVe,applyTransform:()=>at,clone:()=>ze,copy:()=>Re,create:()=>Le,dist:()=>et,distSquare:()=>nt,distance:()=>$e,distanceSquare:()=>tt,div:()=>Ye,dot:()=>Xe,len:()=>We,lenSquare:()=>Ke,length:()=>Ge,lengthSquare:()=>qe,lerp:()=>it,max:()=>st,min:()=>ot,mul:()=>Je,negate:()=>rt,normalize:()=>Qe,scale:()=>Ze,scaleAndAdd:()=>He,set:()=>Be,sub:()=>Ue});function Le(e,t){return e??=0,t??=0,[e,t]}function Re(e,t){return e[0]=t[0],e[1]=t[1],e}function ze(e){return[e[0],e[1]]}function Be(e,t,n){return e[0]=t,e[1]=n,e}function Ve(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e}function He(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e}function Ue(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e}function We(e){return Math.sqrt(Ke(e))}var Ge=We;function Ke(e){return e[0]*e[0]+e[1]*e[1]}var qe=Ke;function Je(e,t,n){return e[0]=t[0]*n[0],e[1]=t[1]*n[1],e}function Ye(e,t,n){return e[0]=t[0]/n[0],e[1]=t[1]/n[1],e}function Xe(e,t){return e[0]*t[0]+e[1]*t[1]}function Ze(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e}function Qe(e,t){var n=We(t);return n===0?(e[0]=0,e[1]=0):(e[0]=t[0]/n,e[1]=t[1]/n),e}function $e(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}var et=$e;function tt(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])}var nt=tt;function rt(e,t){return e[0]=-t[0],e[1]=-t[1],e}function it(e,t,n,r){return e[0]=t[0]+r*(n[0]-t[0]),e[1]=t[1]+r*(n[1]-t[1]),e}function at(e,t,n){var r=t[0],i=t[1];return e[0]=n[0]*r+n[2]*i+n[4],e[1]=n[1]*r+n[3]*i+n[5],e}function ot(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e}function st(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e}var ct=function(){function e(e,t){this.target=e,this.topTarget=t&&t.topTarget}return e}(),lt=function(){function e(e){this.handler=e,e.on(`mousedown`,this._dragStart,this),e.on(`mousemove`,this._drag,this),e.on(`mouseup`,this._dragEnd,this)}return e.prototype._dragStart=function(e){for(var t=e.target;t&&!t.draggable;)t=t.parent||t.__hostTarget;t&&(this._draggingTarget=t,t.dragging=!0,this._x=e.offsetX,this._y=e.offsetY,this.handler.dispatchToElement(new ct(t,e),`dragstart`,e.event))},e.prototype._drag=function(e){var t=this._draggingTarget;if(t){var n=e.offsetX,r=e.offsetY,i=n-this._x,a=r-this._y;this._x=n,this._y=r,t.drift(i,a,e),this.handler.dispatchToElement(new ct(t,e),`drag`,e.event);var o=this.handler.findHover(n,r,t).target,s=this._dropTarget;this._dropTarget=o,t!==o&&(s&&o!==s&&this.handler.dispatchToElement(new ct(s,e),`dragleave`,e.event),o&&o!==s&&this.handler.dispatchToElement(new ct(o,e),`dragenter`,e.event))}},e.prototype._dragEnd=function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.handler.dispatchToElement(new ct(t,e),`dragend`,e.event),this._dropTarget&&this.handler.dispatchToElement(new ct(this._dropTarget,e),`drop`,e.event),this._draggingTarget=null,this._dropTarget=null},e}(),ut=function(){function e(e){e&&(this._$eventProcessor=e)}return e.prototype.on=function(e,t,n,r){this._$handlers||={};var i=this._$handlers;if(typeof t==`function`&&(r=n,n=t,t=null),!n||!e)return this;var a=this._$eventProcessor;t!=null&&a&&a.normalizeQuery&&(t=a.normalizeQuery(t)),i[e]||(i[e]=[]);for(var o=0;o>1)%2;s.cssText=[`position: absolute`,`visibility: hidden`,`padding: 0`,`margin: 0`,`border-width: 0`,`user-select: none`,`width:0`,`height:0`,r[c]+`:0`,i[l]+`:0`,r[1-c]+`:auto`,i[1-l]+`:auto`,``].join(`!important;`),e.appendChild(o),n.push(o)}return t.clearMarkers=function(){L(n,function(e){e.parentNode&&e.parentNode.removeChild(e)})},n}function bt(e,t,n){for(var r=n?`invTrans`:`trans`,i=t[r],a=t.srcCoords,o=[],s=[],c=!0,l=0;l<4;l++){var u=e[l].getBoundingClientRect(),d=2*l,f=u.left,p=u.top;o.push(f,p),c=c&&a&&f===a[d]&&p===a[d+1],s.push(e[l].offsetLeft,e[l].offsetTop)}return c&&i?i:(t.srcCoords=o,t[r]=n?pt(s,o):pt(o,s))}function xt(e){return e.nodeName.toUpperCase()===`CANVAS`}var St=/([&<>"'])/g,Ct={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`};function wt(e){return e==null?``:(e+``).replace(St,function(e,t){return Ct[t]})}var Tt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Et=[],Dt=i.browser.firefox&&+i.browser.version.split(`.`)[0]<39;function Ot(e,t,n,r){return n||={},r?kt(e,t,n):Dt&&t.layerX!=null&&t.layerX!==t.offsetX?(n.zrX=t.layerX,n.zrY=t.layerY):t.offsetX==null?kt(e,t,n):(n.zrX=t.offsetX,n.zrY=t.offsetY),n}function kt(e,t,n){if(i.domSupported&&e.getBoundingClientRect){var r=t.clientX,a=t.clientY;if(xt(e)){var o=e.getBoundingClientRect();n.zrX=r-o.left,n.zrY=a-o.top;return}else if(vt(Et,e,r,a)){n.zrX=Et[0],n.zrY=Et[1];return}}n.zrX=n.zrY=0}function At(e){return e||window.event}function jt(e,t,n){if(t=At(t),t.zrX!=null)return t;var r=t.type;if(r&&r.indexOf(`touch`)>=0){var i=r===`touchend`?t.changedTouches[0]:t.targetTouches[0];i&&Ot(e,i,t,n)}else{Ot(e,t,t,n);var a=Mt(t);t.zrDelta=a?a/120:-(t.detail||0)/3}var o=t.button;return t.which==null&&o!==void 0&&Tt.test(t.type)&&(t.which=o&1?1:o&2?3:o&4?2:0),t}function Mt(e){var t=e.wheelDelta;if(t)return t;var n=e.deltaX,r=e.deltaY;if(n==null||r==null)return t;var i=Math.abs(r===0?n:r),a=r>0?-1:r<0?1:n>0?-1:1;return 3*i*a}function Nt(e,t,n,r){e.addEventListener(t,n,r)}function Pt(e,t,n,r){e.removeEventListener(t,n,r)}var Ft=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0},It=function(){function e(){this._track=[]}return e.prototype.recognize=function(e,t,n){return this._doTrack(e,t,n),this._recognize(e)},e.prototype.clear=function(){return this._track.length=0,this},e.prototype._doTrack=function(e,t,n){var r=e.touches;if(r){for(var i={points:[],touches:[],target:t,event:e},a=0,o=r.length;a1&&r&&r.length>1){var a=Lt(r)/Lt(i);!isFinite(a)&&(a=1),t.pinchScale=a;var o=Rt(r);return t.pinchX=o[0],t.pinchY=o[1],{type:`pinch`,target:e[0].target,event:t}}}}},Bt=e({clone:()=>Yt,copy:()=>Ut,create:()=>Vt,identity:()=>Ht,invert:()=>Jt,mul:()=>Wt,rotate:()=>Kt,scale:()=>qt,translate:()=>Gt});function Vt(){return[1,0,0,1,0,0]}function Ht(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function Ut(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function Wt(e,t,n){var r=t[0]*n[0]+t[2]*n[1],i=t[1]*n[0]+t[3]*n[1],a=t[0]*n[2]+t[2]*n[3],o=t[1]*n[2]+t[3]*n[3],s=t[0]*n[4]+t[2]*n[5]+t[4],c=t[1]*n[4]+t[3]*n[5]+t[5];return e[0]=r,e[1]=i,e[2]=a,e[3]=o,e[4]=s,e[5]=c,e}function Gt(e,t,n){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4]+n[0],e[5]=t[5]+n[1],e}function Kt(e,t,n,r){r===void 0&&(r=[0,0]);var i=t[0],a=t[2],o=t[4],s=t[1],c=t[3],l=t[5],u=Math.sin(n),d=Math.cos(n);return e[0]=i*d+s*u,e[1]=-i*u+s*d,e[2]=a*d+c*u,e[3]=-a*u+d*c,e[4]=d*(o-r[0])+u*(l-r[1])+r[0],e[5]=d*(l-r[1])-u*(o-r[0])+r[1],e}function qt(e,t,n){var r=n[0],i=n[1];return e[0]=t[0]*r,e[1]=t[1]*i,e[2]=t[2]*r,e[3]=t[3]*i,e[4]=t[4]*r,e[5]=t[5]*i,e}function Jt(e,t){var n=t[0],r=t[2],i=t[4],a=t[1],o=t[3],s=t[5],c=n*o-a*r;return c?(c=1/c,e[0]=o*c,e[1]=-a*c,e[2]=-r*c,e[3]=n*c,e[4]=(r*s-o*i)*c,e[5]=(a*i-n*s)*c,e):null}function Yt(e){var t=Vt();return Ut(t,e),t}var Y=function(){function e(e,t){this.x=e||0,this.y=t||0}return e.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.set=function(e,t){return this.x=e,this.y=t,this},e.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},e.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},e.prototype.scale=function(e){this.x*=e,this.y*=e},e.prototype.scaleAndAdd=function(e,t){this.x+=e.x*t,this.y+=e.y*t},e.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},e.prototype.dot=function(e){return this.x*e.x+this.y*e.y},e.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},e.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},e.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},e.prototype.distance=function(e){var t=this.x-e.x,n=this.y-e.y;return Math.sqrt(t*t+n*n)},e.prototype.distanceSquare=function(e){var t=this.x-e.x,n=this.y-e.y;return t*t+n*n},e.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},e.prototype.transform=function(e){if(e){var t=this.x,n=this.y;return this.x=e[0]*t+e[2]*n+e[4],this.y=e[1]*t+e[3]*n+e[5],this}},e.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},e.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},e.set=function(e,t,n){e.x=t,e.y=n},e.copy=function(e,t){e.x=t.x,e.y=t.y},e.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},e.lenSquare=function(e){return e.x*e.x+e.y*e.y},e.dot=function(e,t){return e.x*t.x+e.y*t.y},e.add=function(e,t,n){e.x=t.x+n.x,e.y=t.y+n.y},e.sub=function(e,t,n){e.x=t.x-n.x,e.y=t.y-n.y},e.scale=function(e,t,n){e.x=t.x*n,e.y=t.y*n},e.scaleAndAdd=function(e,t,n,r){e.x=t.x+n.x*r,e.y=t.y+n.y*r},e.lerp=function(e,t,n,r){var i=1-r;e.x=i*t.x+r*n.x,e.y=i*t.y+r*n.y},e}(),Xt=Math.min,Zt=Math.max,Qt=Math.abs,$t=[`x`,`y`],en=[`width`,`height`],tn=new Y,nn=new Y,rn=new Y,an=new Y,on=pn(),sn=on.minTv,cn=on.maxTv,ln=[0,0],X=function(){function e(t,n,r,i){e.set(this,t,n,r,i)}return e.set=function(e,t,n,r,i){return r<0&&(t+=r,r=-r),i<0&&(n+=i,i=-i),e.x=t,e.y=n,e.width=r,e.height=i,e},e.prototype.union=function(e){var t=Xt(e.x,this.x),n=Xt(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=Zt(e.x+e.width,this.x+this.width)-t:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=Zt(e.y+e.height,this.y+this.height)-n:this.height=e.height,this.x=t,this.y=n},e.prototype.applyTransform=function(t){e.applyTransform(this,this,t)},e.prototype.calculateTransform=function(e){var t=this,n=e.width/t.width,r=e.height/t.height,i=Vt();return Gt(i,i,[-t.x,-t.y]),qt(i,i,[n,r]),Gt(i,i,[e.x,e.y]),i},e.prototype.intersect=function(t,n,r){return e.intersect(this,t,n,r)},e.intersect=function(t,n,r,i){r&&Y.set(r,0,0);var a=i&&i.outIntersectRect||null,o=i&&i.clamp;if(a&&(a.x=a.y=a.width=a.height=NaN),!t||!n)return!1;t instanceof e||(t=e.set(un,t.x,t.y,t.width,t.height)),n instanceof e||(n=e.set(dn,n.x,n.y,n.width,n.height));var s=!!r;on.reset(i,s);var c=on.touchThreshold,l=t.x+c,u=t.x+t.width-c,d=t.y+c,f=t.y+t.height-c,p=n.x+c,m=n.x+n.width-c,h=n.y+c,g=n.y+n.height-c;if(l>u||d>f||p>m||h>g)return!1;var _=!(u=e.x&&t<=e.x+e.width&&n>=e.y&&n<=e.y+e.height},e.prototype.contain=function(t,n){return e.contain(this,t,n)},e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.copy=function(t){e.copy(this,t)},e.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},e.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},e.prototype.isZero=function(){return this.width===0||this.height===0},e.create=function(t){return new e(t.x,t.y,t.width,t.height)},e.copy=function(e,t){return e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height,e},e.applyTransform=function(t,n,r){if(!r){t!==n&&e.copy(t,n);return}if(r[1]<1e-5&&r[1]>-1e-5&&r[2]<1e-5&&r[2]>-1e-5){var i=r[0],a=r[3],o=r[4],s=r[5];t.x=n.x*i+o,t.y=n.y*a+s,t.width=n.width*i,t.height=n.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}tn.x=rn.x=n.x,tn.y=an.y=n.y,nn.x=an.x=n.x+n.width,nn.y=rn.y=n.y+n.height,tn.transform(r),an.transform(r),nn.transform(r),rn.transform(r),t.x=Xt(tn.x,nn.x,rn.x,an.x),t.y=Xt(tn.y,nn.y,rn.y,an.y);var c=Zt(tn.x,nn.x,rn.x,an.x),l=Zt(tn.y,nn.y,rn.y,an.y);t.width=c-t.x,t.height=l-t.y},e}(),un=new X(0,0,0,0),dn=new X(0,0,0,0);function fn(e,t,n,r,i,a,o,s){var c=Qt(t-n),l=Qt(r-e),u=Xt(c,l),d=$t[i],f=$t[1-i],p=en[i];t=l||!on.bidirectional)&&(sn[d]=-l,sn[f]=0,on.useDir&&on.calcDirMTV())))}function pn(){var e=0,t=new Y,n=new Y,r={minTv:new Y,maxTv:new Y,useDir:!1,dirMinTv:new Y,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(i,a){r.touchThreshold=0,i&&i.touchThreshold!=null&&(r.touchThreshold=Zt(0,i.touchThreshold)),r.negativeSize=!1,a&&(r.minTv.set(1/0,1/0),r.maxTv.set(0,0),r.useDir=!1,i&&i.direction!=null&&(r.useDir=!0,r.dirMinTv.copy(r.minTv),n.copy(r.minTv),e=i.direction,r.bidirectional=i.bidirectional==null||!!i.bidirectional,r.bidirectional||t.set(Math.cos(e),Math.sin(e))))},calcDirMTV:function(){var a=r.minTv,o=r.dirMinTv,s=a.y*a.y+a.x*a.x,c=Math.sin(e),l=Math.cos(e),u=c*a.y+l*a.x;if(i(u)){i(a.x)&&i(a.y)&&o.set(0,0);return}if(n.x=s*l/u,n.y=s*c/u,i(n.x)&&i(n.y)){o.set(0,0);return}(r.bidirectional||t.dot(n)>0)&&n.len()=0;l--){var u=r[l];u!==n&&!u.ignore&&!u.ignoreCoarsePointer&&(!u.parent||!u.parent.ignoreCoarsePointer)&&(bn.copy(u.getBoundingRect()),u.transform&&bn.applyTransform(u.transform),bn.intersect(c)&&a.push(u))}if(a.length){for(var d=4,f=Math.PI/12,p=Math.PI*2,m=0;m4)return;this._downPoint=null}this.dispatchToElement(a,e,t)}});function Sn(e,t,n){if(e[e.rectHover?`rectContain`:`contain`](t,n)){for(var r=e,i=void 0,a=!1;r;){if(r.ignoreClip&&(a=!0),!a){var o=r.getClipPath();if(o&&!o.contain(t,n))return!1}r.silent&&(i=!0);var s=r.__hostTarget;r=s?r.ignoreHostSilent?null:s:r.parent}return i?mn:!0}return!1}function Cn(e,t,n,r,i){for(var a=e.length-1;a>=0;a--){var o=e[a],s=void 0;if(o!==i&&!o.ignore&&(s=Sn(o,n,r))&&(!t.topTarget&&(t.topTarget=o),s!==mn)){t.target=o;break}}}function wn(e,t,n){var r=e.painter;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}var Tn=32,En=7;function Dn(e){for(var t=0;e>=Tn;)t|=e&1,e>>=1;return e+t}function On(e,t,n,r){var i=t+1;if(i===n)return 1;if(r(e[i++],e[t])<0){for(;i=0;)i++;return i-t}function kn(e,t,n){for(n--;t>>1,i(a,e[c])<0?s=c:o=c+1;var l=r-o;switch(l){case 3:e[o+3]=e[o+2];case 2:e[o+2]=e[o+1];case 1:e[o+1]=e[o];break;default:for(;l>0;)e[o+l]=e[o+l-1],l--}e[o]=a}}function jn(e,t,n,r,i,a){var o=0,s=0,c=1;if(a(e,t[n+i])>0){for(s=r-i;c0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s),o+=i,c+=i}else{for(s=i+1;cs&&(c=s);var l=o;o=i-c,c=i-l}for(o++;o>>1);a(e,t[n+u])>0?o=u+1:c=u}return c}function Mn(e,t,n,r,i,a){var o=0,s=0,c=1;if(a(e,t[n+i])<0){for(s=i+1;cs&&(c=s);var l=o;o=i-c,c=i-l}else{for(s=r-i;c=0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s),o+=i,c+=i}for(o++;o>>1);a(e,t[n+u])<0?c=u:o=u+1}return c}function Nn(e,t){var n=En,r,i,a=0,o=[];r=[],i=[];function s(e,t){r[a]=e,i[a]=t,a+=1}function c(){for(;a>1;){var e=a-2;if(e>=1&&i[e-1]<=i[e]+i[e+1]||e>=2&&i[e-2]<=i[e]+i[e-1])i[e-1]i[e+1])break;u(e)}}function l(){for(;a>1;){var e=a-2;e>0&&i[e-1]=En||m>=En);if(h)break;f<0&&(f=0),f+=2}if(n=f,n<1&&(n=1),i===1){for(c=0;c=0;c--)e[p+c]=e[f+c];e[d]=o[u];return}for(var m=n;;){var h=0,g=0,_=!1;do if(t(o[u],e[l])<0){if(e[d--]=e[l--],h++,g=0,--i===0){_=!0;break}}else if(e[d--]=o[u--],g++,h=0,--s===1){_=!0;break}while((h|g)=0;c--)e[p+c]=e[f+c];if(i===0){_=!0;break}}if(e[d--]=o[u--],--s===1){_=!0;break}if(g=s-jn(e[l],o,0,s,s-1,t),g!==0){for(d-=g,u-=g,s-=g,p=d+1,f=u+1,c=0;c=En||g>=En);if(_)break;m<0&&(m=0),m+=2}if(n=m,n<1&&(n=1),s===1){for(d-=i,l-=i,p=d+1,f=l+1,c=i-1;c>=0;c--)e[p+c]=e[f+c];e[d]=o[u]}else if(s===0)throw Error();else for(f=d-(s-1),c=0;cs&&(c=s),An(e,n,n+c,n+a,t),a=c}o.pushRun(n,a),o.mergeRuns(),i-=a,n+=a}while(i!==0);o.forceMergeRuns()}}var Fn=!1;function In(){Fn||(Fn=!0,console.warn(`z / z2 / zlevel of displayable is invalid, which may cause unexpected errors`))}function Ln(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var Rn=function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=Ln}return e.prototype.traverse=function(e,t){for(var n=0;n=0&&this._roots.splice(r,1)},e.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},e.prototype.getRoots=function(){return this._roots},e.prototype.dispose=function(){this._displayList=null,this._roots=null},e}(),zn=i.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)},Bn={linear:function(e){return e},quadraticIn:function(e){return e*e},quadraticOut:function(e){return e*(2-e)},quadraticInOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},cubicIn:function(e){return e*e*e},cubicOut:function(e){return--e*e*e+1},cubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},quarticIn:function(e){return e*e*e*e},quarticOut:function(e){return 1- --e*e*e*e},quarticInOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},quinticIn:function(e){return e*e*e*e*e},quinticOut:function(e){return--e*e*e*e*e+1},quinticInOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},sinusoidalIn:function(e){return 1-Math.cos(e*Math.PI/2)},sinusoidalOut:function(e){return Math.sin(e*Math.PI/2)},sinusoidalInOut:function(e){return .5*(1-Math.cos(Math.PI*e))},exponentialIn:function(e){return e===0?0:1024**(e-1)},exponentialOut:function(e){return e===1?1:1-2**(-10*e)},exponentialInOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*1024**(e-1):.5*(-(2**(-10*(e-1)))+2)},circularIn:function(e){return 1-Math.sqrt(1-e*e)},circularOut:function(e){return Math.sqrt(1- --e*e)},circularInOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},elasticIn:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),-(n*2**(10*--e)*Math.sin((e-t)*(2*Math.PI)/r)))},elasticOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),n*2**(-10*e)*Math.sin((e-t)*(2*Math.PI)/r)+1)},elasticInOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),(e*=2)<1?-.5*(n*2**(10*--e)*Math.sin((e-t)*(2*Math.PI)/r)):n*2**(-10*--e)*Math.sin((e-t)*(2*Math.PI)/r)*.5+1)},backIn:function(e){var t=1.70158;return e*e*((t+1)*e-t)},backOut:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},backInOut:function(e){var t=1.70158*1.525;return(e*=2)<1?.5*(e*e*((t+1)*e-t)):.5*((e-=2)*e*((t+1)*e+t)+2)},bounceIn:function(e){return 1-Bn.bounceOut(1-e)},bounceOut:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},bounceInOut:function(e){return e<.5?Bn.bounceIn(e*2)*.5:Bn.bounceOut(e*2-1)*.5+.5}},Vn=Math.pow,Hn=Math.sqrt,Un=1e-8,Wn=1e-4,Gn=Hn(3),Kn=1/3,qn=Le(),Jn=Le(),Yn=Le();function Xn(e){return e>-Un&&eUn||e<-Un}function Qn(e,t,n,r,i){var a=1-i;return a*a*(a*e+3*i*t)+i*i*(i*r+3*a*n)}function $n(e,t,n,r,i){var a=1-i;return 3*(((t-e)*a+2*(n-t)*i)*a+(r-n)*i*i)}function er(e,t,n,r,i,a){var o=r+3*(t-n)-e,s=3*(n-t*2+e),c=3*(t-e),l=e-i,u=s*s-3*o*c,d=s*c-9*o*l,f=c*c-3*s*l,p=0;if(Xn(u)&&Xn(d))if(Xn(s))a[0]=0;else{var m=-c/s;m>=0&&m<=1&&(a[p++]=m)}else{var h=d*d-4*u*f;if(Xn(h)){var g=d/u,m=-s/o+g,_=-g/2;m>=0&&m<=1&&(a[p++]=m),_>=0&&_<=1&&(a[p++]=_)}else if(h>0){var v=Hn(h),y=u*s+1.5*o*(-d+v),b=u*s+1.5*o*(-d-v);y=y<0?-Vn(-y,Kn):Vn(y,Kn),b=b<0?-Vn(-b,Kn):Vn(b,Kn);var m=(-s-(y+b))/(3*o);m>=0&&m<=1&&(a[p++]=m)}else{var x=(2*u*s-3*o*d)/(2*Hn(u*u*u)),S=Math.acos(x)/3,C=Hn(u),w=Math.cos(S),m=(-s-2*C*w)/(3*o),_=(-s+C*(w+Gn*Math.sin(S)))/(3*o),T=(-s+C*(w-Gn*Math.sin(S)))/(3*o);m>=0&&m<=1&&(a[p++]=m),_>=0&&_<=1&&(a[p++]=_),T>=0&&T<=1&&(a[p++]=T)}}return p}function tr(e,t,n,r,i){var a=6*n-12*t+6*e,o=9*t+3*r-3*e-9*n,s=3*t-3*e,c=0;if(Xn(o)){if(Zn(a)){var l=-s/a;l>=0&&l<=1&&(i[c++]=l)}}else{var u=a*a-4*o*s;if(Xn(u))i[0]=-a/(2*o);else if(u>0){var d=Hn(u),l=(-a+d)/(2*o),f=(-a-d)/(2*o);l>=0&&l<=1&&(i[c++]=l),f>=0&&f<=1&&(i[c++]=f)}}return c}function nr(e,t,n,r,i,a){var o=(t-e)*i+e,s=(n-t)*i+t,c=(r-n)*i+n,l=(s-o)*i+o,u=(c-s)*i+s,d=(u-l)*i+l;a[0]=e,a[1]=o,a[2]=l,a[3]=d,a[4]=d,a[5]=u,a[6]=c,a[7]=r}function rr(e,t,n,r,i,a,o,s,c,l,u){var d,f=.005,p=1/0,m,h,g,_;qn[0]=c,qn[1]=l;for(var v=0;v<1;v+=.05)Jn[0]=Qn(e,n,i,o,v),Jn[1]=Qn(t,r,a,s,v),g=nt(qn,Jn),g=0&&g=0&&l<=1&&(i[c++]=l)}}else{var u=o*o-4*a*s;if(Xn(u)){var l=-o/(2*a);l>=0&&l<=1&&(i[c++]=l)}else if(u>0){var d=Hn(u),l=(-o+d)/(2*a),f=(-o-d)/(2*a);l>=0&&l<=1&&(i[c++]=l),f>=0&&f<=1&&(i[c++]=f)}}return c}function cr(e,t,n){var r=e+n-2*t;return r===0?.5:(e-t)/r}function lr(e,t,n,r,i){var a=(t-e)*r+e,o=(n-t)*r+t,s=(o-a)*r+a;i[0]=e,i[1]=a,i[2]=s,i[3]=s,i[4]=o,i[5]=n}function ur(e,t,n,r,i,a,o,s,c){var l,u=.005,d=1/0;qn[0]=o,qn[1]=s;for(var f=0;f<1;f+=.05){Jn[0]=ar(e,n,i,f),Jn[1]=ar(t,r,a,f);var p=nt(qn,Jn);p=0&&p=1?1:er(0,r,a,1,e,s)&&Qn(0,i,o,1,s[0])}}}var mr=function(){function e(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||je,this.ondestroy=e.ondestroy||je,this.onrestart=e.onrestart||je,e.easing&&this.setEasing(e.easing)}return e.prototype.step=function(e,t){if(this._inited||=(this._startTime=e+this._delay,!0),this._paused){this._pausedTime+=t;return}var n=this._life,r=e-this._startTime-this._pausedTime,i=r/n;i<0&&(i=0),i=Math.min(i,1);var a=this.easingFunc,o=a?a(i):i;if(this.onframe(o),i===1)if(this.loop){var s=r%n;this._startTime=e-s,this._pausedTime=0,this.onrestart()}else return!0;return!1},e.prototype.pause=function(){this._paused=!0},e.prototype.resume=function(){this._paused=!1},e.prototype.setEasing=function(e){this.easing=e,this.easingFunc=U(e)?e:Bn[e]||pr(e)},e}(),hr=function(){function e(e){this.value=e}return e}(),gr=function(){function e(){this._len=0}return e.prototype.insert=function(e){var t=new hr(e);return this.insertEntry(t),t},e.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},e.prototype.remove=function(e){var t=e.prev,n=e.next;t?t.next=n:this.head=n,n?n.prev=t:this.tail=t,e.next=e.prev=null,this._len--},e.prototype.len=function(){return this._len},e.prototype.clear=function(){this.head=this.tail=null,this._len=0},e}(),_r=function(){function e(e){this._list=new gr,this._maxSize=10,this._map={},this._maxSize=e}return e.prototype.put=function(e,t){var n=this._list,r=this._map,i=null;if(r[e]==null){var a=n.len(),o=this._lastRemovedEntry;if(a>=this._maxSize&&a>0){var s=n.head;n.remove(s),delete r[s.key],i=s.value,this._lastRemovedEntry=s}o?o.value=t:o=new hr(t),o.key=e,n.insertEntry(o),r[e]=o}return i},e.prototype.get=function(e){var t=this._map[e],n=this._list;if(t!=null)return t!==n.tail&&(n.remove(t),n.insertEntry(t)),t.value},e.prototype.clear=function(){this._list.clear(),this._map={}},e.prototype.len=function(){return this._list.len()},e}(),vr=e({fastLerp:()=>Lr,fastMapToColor:()=>Rr,lerp:()=>zr,lift:()=>Fr,liftColor:()=>qr,lum:()=>Wr,mapToColor:()=>Br,modifyAlpha:()=>Hr,modifyHSL:()=>Vr,parse:()=>Mr,parseCssFloat:()=>wr,parseCssInt:()=>Cr,random:()=>Gr,stringify:()=>Ur,toHex:()=>Ir}),yr={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 br(e){return e=Math.round(e),e<0?0:e>255?255:e}function xr(e){return e=Math.round(e),e<0?0:e>360?360:e}function Sr(e){return e<0?0:e>1?1:e}function Cr(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?br(parseFloat(t)/100*255):br(parseInt(t,10))}function wr(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?Sr(parseFloat(t)/100):Sr(parseFloat(t))}function Tr(e,t,n){return n<0?n+=1:n>1&&--n,n*6<1?e+(t-e)*n*6:n*2<1?t:n*3<2?e+(t-e)*(2/3-n)*6:e}function Er(e,t,n){return e+(t-e)*n}function Dr(e,t,n,r,i){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e}function Or(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var kr=new _r(20),Ar=null;function jr(e,t){Ar&&Or(Ar,t),Ar=kr.put(e,Ar||t.slice())}function Mr(e,t){if(e){t||=[];var n=kr.get(e);if(n)return Or(t,n);e+=``;var r=e.replace(/ /g,``).toLowerCase();if(r in yr)return Or(t,yr[r]),jr(e,t),t;var i=r.length;if(r.charAt(0)===`#`){if(i===4||i===5){var a=parseInt(r.slice(1,4),16);if(!(a>=0&&a<=4095)){Dr(t,0,0,0,1);return}return Dr(t,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,i===5?parseInt(r.slice(4),16)/15:1),jr(e,t),t}else if(i===7||i===9){var a=parseInt(r.slice(1,7),16);if(!(a>=0&&a<=16777215)){Dr(t,0,0,0,1);return}return Dr(t,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(r.slice(7),16)/255:1),jr(e,t),t}return}var o=r.indexOf(`(`),s=r.indexOf(`)`);if(o!==-1&&s+1===i){var c=r.substr(0,o),l=r.substr(o+1,s-(o+1)).split(`,`),u=1;switch(c){case`rgba`:if(l.length!==4)return l.length===3?Dr(t,+l[0],+l[1],+l[2],1):Dr(t,0,0,0,1);u=wr(l.pop());case`rgb`:if(l.length>=3)return Dr(t,Cr(l[0]),Cr(l[1]),Cr(l[2]),l.length===3?u:wr(l[3])),jr(e,t),t;Dr(t,0,0,0,1);return;case`hsla`:if(l.length!==4){Dr(t,0,0,0,1);return}return l[3]=wr(l[3]),Nr(l,t),jr(e,t),t;case`hsl`:if(l.length!==3){Dr(t,0,0,0,1);return}return Nr(l,t),jr(e,t),t;default:return}}Dr(t,0,0,0,1)}}function Nr(e,t){var n=(parseFloat(e[0])%360+360)%360/360,r=wr(e[1]),i=wr(e[2]),a=i<=.5?i*(r+1):i+r-i*r,o=i*2-a;return t||=[],Dr(t,br(Tr(o,a,n+1/3)*255),br(Tr(o,a,n)*255),br(Tr(o,a,n-1/3)*255),1),e.length===4&&(t[3]=e[3]),t}function Pr(e){if(e){var t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=a-i,s=(a+i)/2,c,l;if(o===0)c=0,l=0;else{l=s<.5?o/(a+i):o/(2-a-i);var u=((a-t)/6+o/2)/o,d=((a-n)/6+o/2)/o,f=((a-r)/6+o/2)/o;t===a?c=f-d:n===a?c=1/3+u-f:r===a&&(c=2/3+d-u),c<0&&(c+=1),c>1&&--c}var p=[c*360,l,s];return e[3]!=null&&p.push(e[3]),p}}function Fr(e,t){var n=Mr(e);if(n){for(var r=0;r<3;r++)t<0?n[r]=n[r]*(1-t)|0:n[r]=(255-n[r])*t+n[r]|0,n[r]>255?n[r]=255:n[r]<0&&(n[r]=0);return Ur(n,n.length===4?`rgba`:`rgb`)}}function Ir(e){var t=Mr(e);if(t)return((1<<24)+(t[0]<<16)+(t[1]<<8)+ +t[2]).toString(16).slice(1)}function Lr(e,t,n){if(!(!(t&&t.length)||!(e>=0&&e<=1))){n||=[];var r=e*(t.length-1),i=Math.floor(r),a=Math.ceil(r),o=t[i],s=t[a],c=r-i;return n[0]=br(Er(o[0],s[0],c)),n[1]=br(Er(o[1],s[1],c)),n[2]=br(Er(o[2],s[2],c)),n[3]=Sr(Er(o[3],s[3],c)),n}}var Rr=Lr;function zr(e,t,n){if(!(!(t&&t.length)||!(e>=0&&e<=1))){var r=e*(t.length-1),i=Math.floor(r),a=Math.ceil(r),o=Mr(t[i]),s=Mr(t[a]),c=r-i,l=Ur([br(Er(o[0],s[0],c)),br(Er(o[1],s[1],c)),br(Er(o[2],s[2],c)),Sr(Er(o[3],s[3],c))],`rgba`);return n?{color:l,leftIndex:i,rightIndex:a,value:r}:l}}var Br=zr;function Vr(e,t,n,r){var i=Mr(e);if(e)return i=Pr(i),t!=null&&(i[0]=xr(U(t)?t(i[0]):t)),n!=null&&(i[1]=wr(U(n)?n(i[1]):n)),r!=null&&(i[2]=wr(U(r)?r(i[2]):r)),Ur(Nr(i),`rgba`)}function Hr(e,t){var n=Mr(e);if(n&&t!=null)return n[3]=Sr(t),Ur(n,`rgba`)}function Ur(e,t){if(!(!e||!e.length)){var n=e[0]+`,`+e[1]+`,`+e[2];return(t===`rgba`||t===`hsva`||t===`hsla`)&&(n+=`,`+e[3]),t+`(`+n+`)`}}function Wr(e,t){var n=Mr(e);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*t:0}function Gr(){return Ur([Math.round(Math.random()*255),Math.round(Math.random()*255),Math.round(Math.random()*255)],`rgb`)}var Kr=new _r(100);function qr(e){if(W(e)){var t=Kr.get(e);return t||(t=Fr(e,-.1),Kr.put(e,t)),t}else if(ue(e)){var n=M({},e);return n.colorStops=R(e.colorStops,function(e){return{offset:e.offset,color:Fr(e.color,-.1)}}),n}return e}function Jr(e){return e.type===`linear`}function Yr(e){return e.type===`radial`}(function(){return i.hasGlobalWindow&&U(window.btoa)?function(e){return window.btoa(unescape(encodeURIComponent(e)))}:typeof Buffer<`u`?function(e){return Buffer.from(e).toString(`base64`)}:function(e){return null}})();var Xr=Array.prototype.slice;function Zr(e,t,n){return(t-e)*n+e}function Qr(e,t,n,r){for(var i=t.length,a=0;ar?t:e,a=Math.min(n,r),o=i[a-1]||{color:[0,0,0,0],offset:0},s=a;so)r.length=o;else for(var s=a;s=1},e.prototype.getAdditiveTrack=function(){return this._additiveTrack},e.prototype.addKeyframe=function(e,t,n){this._needsSort=!0;var r=this.keyframes,i=r.length,a=!1,o=pi,s=t;if(te(t)){var c=oi(t);o=c,(c===1&&!G(t[0])||c===2&&!G(t[0][0]))&&(a=!0)}else if(G(t)&&!pe(t))o=si;else if(W(t))if(!isNaN(+t))o=si;else{var l=Mr(t);l&&(s=l,o=ui)}else if(ue(t)){var u=M({},s);u.colorStops=R(t.colorStops,function(e){return{offset:e.offset,color:Mr(e.color)}}),Jr(t)?o=di:Yr(t)&&(o=fi),s=u}i===0?this.valType=o:(o!==this.valType||o===pi)&&(a=!0),this.discrete=this.discrete||a;var d={time:e,value:s,rawValue:t,percent:0};return n&&(d.easing=n,d.easingFunc=U(n)?n:Bn[n]||pr(n)),r.push(d),d},e.prototype.prepare=function(e,t){var n=this.keyframes;this._needsSort&&n.sort(function(e,t){return e.time-t.time});for(var r=this.valType,i=n.length,a=n[i-1],o=this.discrete,s=hi(r),c=mi(r),l=0;l=0&&!(a[l].percent<=t);l--);l=d(l,o-2)}else{for(l=u;lt);l++);l=d(l-1,o-2)}p=a[l+1],f=a[l]}if(f&&p){this._lastFr=l,this._lastFrP=t;var m=p.percent-f.percent,h=m===0?1:d((t-f.percent)/m,1);p.easingFunc&&(h=p.easingFunc(h));var g=n?this._additiveValue:c?gi:e[s];if((hi(i)||c)&&!g&&(g=this._additiveValue=[]),this.discrete)e[s]=h<1?f.rawValue:p.rawValue;else if(hi(i))i===ci?Qr(g,f[r],p[r],h):$r(g,f[r],p[r],h);else if(mi(i)){var _=f[r],v=p[r],y=i===di;e[s]={type:y?`linear`:`radial`,x:Zr(_.x,v.x,h),y:Zr(_.y,v.y,h),colorStops:R(_.colorStops,function(e,t){var n=v.colorStops[t];return{offset:Zr(e.offset,n.offset,h),color:ai(Qr([],e.color,n.color,h))}}),global:v.global},y?(e[s].x2=Zr(_.x2,v.x2,h),e[s].y2=Zr(_.y2,v.y2,h)):e[s].r=Zr(_.r,v.r,h)}else if(c)Qr(g,f[r],p[r],h),n||(e[s]=ai(g));else{var b=Zr(f[r],p[r],h);n?this._additiveValue=b:e[s]=b}n&&this._addToTarget(e)}}},e.prototype._addToTarget=function(e){var t=this.valType,n=this.propName,r=this._additiveValue;t===si?e[n]=e[n]+r:t===ui?(Mr(e[n],gi),ei(gi,gi,r,1),e[n]=ai(gi)):t===ci?ei(e[n],e[n],r,1):t===li&&ti(e[n],e[n],r,1)},e}(),vi=function(){function e(e,t,n,r){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&r){O(`Can' use additive animation on looped animation.`);return}this._additiveAnimators=r,this._allowDiscrete=n}return e.prototype.getMaxTime=function(){return this._maxTime},e.prototype.getDelay=function(){return this._delay},e.prototype.getLoop=function(){return this._loop},e.prototype.getTarget=function(){return this._target},e.prototype.changeTarget=function(e){this._target=e},e.prototype.when=function(e,t,n){return this.whenWithKeys(e,t,z(t),n)},e.prototype.whenWithKeys=function(e,t,n,r){for(var i=this._tracks,a=0;a0&&s.addKeyframe(0,ii(c),r),this._trackKeys.push(o)}s.addKeyframe(e,ii(t[o]),r)}return this._maxTime=Math.max(this._maxTime,e),this},e.prototype.pause=function(){this._clip.pause(),this._paused=!0},e.prototype.resume=function(){this._clip.resume(),this._paused=!1},e.prototype.isPaused=function(){return!!this._paused},e.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},e.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,n=0;n0)){this._started=1;for(var t=this,n=[],r=this._maxTime||0,i=0;i1){var o=a.pop();i.addKeyframe(o.time,e[r]),i.prepare(this._maxTime,i.getAdditiveTrack())}}}},e}();function yi(){return new Date().getTime()}var bi=function(e){Fe(t,e);function t(t){var n=e.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,t||={},n.stage=t.stage||{},n}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 t=e.getClip();t&&this.addClip(t)},t.prototype.removeClip=function(e){if(e.animation){var t=e.prev,n=e.next;t?t.next=n:this._head=n,n?n.prev=t:this._tail=t,e.next=e.prev=e.animation=null}},t.prototype.removeAnimator=function(e){var t=e.getClip();t&&this.removeClip(t),e.animation=null},t.prototype.update=function(e){for(var t=yi()-this._pausedTime,n=t-this._time,r=this._head;r;){var i=r.next;r.step(t,n)?(r.ondestroy(),this.removeClip(r),r=i):r=i}this._time=t,e||(this.trigger(`frame`,n),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0;function t(){e._running&&(zn(t),!e._paused&&e.update())}zn(t)},t.prototype.start=function(){this._running||(this._time=yi(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||=(this._pauseStart=yi(),!0)},t.prototype.resume=function(){this._paused&&=(this._pausedTime+=yi()-this._pauseStart,!1)},t.prototype.clear=function(){for(var e=this._head;e;){var t=e.next;e.prev=e.next=e.animation=null,e=t}this._head=this._tail=null},t.prototype.isFinished=function(){return this._head==null},t.prototype.animate=function(e,t){t||={},this.start();var n=new vi(e,t.loop);return this.addAnimator(n),n},t}(ut),xi=300,Si=i.domSupported,Ci=(function(){var e=[`click`,`dblclick`,`mousewheel`,`wheel`,`mouseout`,`mouseup`,`mousedown`,`mousemove`,`contextmenu`],t=[`touchstart`,`touchend`,`touchmove`],n={pointerdown:1,pointerup:1,pointermove:1,pointerout:1};return{mouse:e,touch:t,pointer:R(e,function(e){var t=e.replace(`mouse`,`pointer`);return n.hasOwnProperty(t)?t:e})}})(),wi={mouse:[`mousemove`,`mouseup`],pointer:[`pointermove`,`pointerup`]},Ti=!1;function Ei(e){var t=e.pointerType;return t===`pen`||t===`touch`}function Di(e){e.touching=!0,e.touchTimer!=null&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout(function(){e.touching=!1,e.touchTimer=null},700)}function Oi(e){e&&(e.zrByTouch=!0)}function ki(e,t){return jt(e.dom,new ji(e,t),!0)}function Ai(e,t){for(var n=t,r=!1;n&&n.nodeType!==9&&!(r=n.domBelongToZr||n!==t&&n===e.painterRoot);)n=n.parentNode;return r}var ji=function(){function e(e,t){this.stopPropagation=je,this.stopImmediatePropagation=je,this.preventDefault=je,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}return e}(),Mi={mousedown:function(e){e=jt(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger(`mousedown`,e)},mousemove:function(e){e=jt(this.dom,e);var t=this.__mayPointerCapture;t&&(e.zrX!==t[0]||e.zrY!==t[1])&&this.__togglePointerCapture(!0),this.trigger(`mousemove`,e)},mouseup:function(e){e=jt(this.dom,e),this.__togglePointerCapture(!1),this.trigger(`mouseup`,e)},mouseout:function(e){e=jt(this.dom,e);var t=e.toElement||e.relatedTarget;Ai(this,t)||(this.__pointerCapturing&&(e.zrEventControl=`no_globalout`),this.trigger(`mouseout`,e))},wheel:function(e){Ti=!0,e=jt(this.dom,e),this.trigger(`mousewheel`,e)},mousewheel:function(e){Ti||(e=jt(this.dom,e),this.trigger(`mousewheel`,e))},touchstart:function(e){e=jt(this.dom,e),Oi(e),this.__lastTouchMoment=new Date,this.handler.processGesture(e,`start`),Mi.mousemove.call(this,e),Mi.mousedown.call(this,e)},touchmove:function(e){e=jt(this.dom,e),Oi(e),this.handler.processGesture(e,`change`),Mi.mousemove.call(this,e)},touchend:function(e){e=jt(this.dom,e),Oi(e),this.handler.processGesture(e,`end`),Mi.mouseup.call(this,e),new Date-+this.__lastTouchMomentqi||e<-qi}var Yi=[],Xi=[],Zi=Vt(),Qi=Math.abs,$i=function(){function e(){}return e.prototype.getLocalTransform=function(t){return e.getLocalTransform(this,t)},e.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},e.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},e.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},e.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},e.prototype.needLocalTransform=function(){return Ji(this.rotation)||Ji(this.x)||Ji(this.y)||Ji(this.scaleX-1)||Ji(this.scaleY-1)||Ji(this.skewX)||Ji(this.skewY)},e.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),n=this.transform;if(!(t||e)){n&&(Ki(n),this.invTransform=null);return}n||=Vt(),t?this.getLocalTransform(n):Ki(n),e&&(t?Wt(n,e,n):Ut(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n)},e.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(t!=null&&t!==1){this.getGlobalScale(Yi);var n=Yi[0]<0?-1:1,r=Yi[1]<0?-1:1,i=((Yi[0]-n)*t+n)/Yi[0]||0,a=((Yi[1]-r)*t+r)/Yi[1]||0;e[0]*=i,e[1]*=i,e[2]*=a,e[3]*=a}this.invTransform=this.invTransform||Vt(),Jt(this.invTransform,e)},e.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},e.prototype.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],r=Math.atan2(e[1],e[0]),i=Math.PI/2+r-Math.atan2(e[3],e[2]);n=Math.sqrt(n)*Math.cos(i),t=Math.sqrt(t),this.skewX=i,this.skewY=0,this.rotation=-r,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=n,this.originX=0,this.originY=0}},e.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||Vt(),Wt(Xi,e.invTransform,t),t=Xi);var n=this.originX,r=this.originY;(n||r)&&(Zi[4]=n,Zi[5]=r,Wt(Xi,t,Zi),Xi[4]-=n,Xi[5]-=r,t=Xi),this.setLocalTransform(t)}},e.prototype.getGlobalScale=function(e){var t=this.transform;return e||=[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},e.prototype.transformCoordToLocal=function(e,t){var n=[e,t],r=this.invTransform;return r&&at(n,n,r),n},e.prototype.transformCoordToGlobal=function(e,t){var n=[e,t],r=this.transform;return r&&at(n,n,r),n},e.prototype.getLineScale=function(){var e=this.transform;return e&&Qi(e[0]-1)>1e-10&&Qi(e[3]-1)>1e-10?Math.sqrt(Qi(e[0]*e[3]-e[2]*e[1])):1},e.prototype.copyTransform=function(e){ta(this,e)},e.getLocalTransform=function(e,t){t||=[];var n=e.originX||0,r=e.originY||0,i=e.scaleX,a=e.scaleY,o=e.anchorX,s=e.anchorY,c=e.rotation||0,l=e.x,u=e.y,d=e.skewX?Math.tan(e.skewX):0,f=e.skewY?Math.tan(-e.skewY):0;if(n||r||o||s){var p=n+o,m=r+s;t[4]=-p*i-d*m*a,t[5]=-m*a-f*p*i}else t[4]=t[5]=0;return t[0]=i,t[3]=a,t[1]=f*i,t[2]=d*a,c&&Kt(t,t,c),t[4]+=n+l,t[5]+=r+u,t},e.initDefaultProps=(function(){var t=e.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})(),e}(),ea=[`x`,`y`,`originX`,`originY`,`anchorX`,`anchorY`,`rotation`,`scaleX`,`scaleY`,`skewX`,`skewY`];function ta(e,t){for(var n=0;n=oa)){e||=`12px sans-serif`;for(var t=[],n=+new Date,r=0;r<=127;r++)t[r]=f.measureText(String.fromCharCode(r),e).width;var i=+new Date-n;return i>16?aa=oa:i>2&&aa++,t}}var aa=0,oa=5;function sa(e,t){return e.asciiWidthMapTried||=(e.asciiWidthMap=ia(e.font),!0),0<=t&&t<=127?e.asciiWidthMap==null?e.asciiCharWidth:e.asciiWidthMap[t]:e.stWideCharWidth}function ca(e,t){var n=e.strWidthCache,r=n.get(t);return r??(r=f.measureText(t,e.font).width,n.put(t,r)),r}function la(e,t,n,r){var i=ca(na(t),e),a=pa(t);return new X(da(0,i,n),fa(0,a,r),i,a)}function ua(e,t,n,r){var i=((e||``)+``).split(` `);if(i.length===1)return la(i[0],t,n,r);for(var a=new X(0,0,0,0),o=0;o=0?parseFloat(e)/100*t:parseFloat(e):e}function ha(e,t,n){var r=t.position||`inside`,i=t.distance==null?5:t.distance,a=n.height,o=n.width,s=a/2,c=n.x,l=n.y,u=`left`,d=`top`;if(r instanceof Array)c+=ma(r[0],n.width),l+=ma(r[1],n.height),u=null,d=null;else switch(r){case`left`:c-=i,l+=s,u=`right`,d=`middle`;break;case`right`:c+=i+o,l+=s,d=`middle`;break;case`top`:c+=o/2,l-=i,u=`center`,d=`bottom`;break;case`bottom`:c+=o/2,l+=a+i,u=`center`;break;case`inside`:c+=o/2,l+=s,u=`center`,d=`middle`;break;case`insideLeft`:c+=i,l+=s,d=`middle`;break;case`insideRight`:c+=o-i,l+=s,u=`right`,d=`middle`;break;case`insideTop`:c+=o/2,l+=i,u=`center`;break;case`insideBottom`:c+=o/2,l+=a-i,u=`center`,d=`bottom`;break;case`insideTopLeft`:c+=i,l+=i;break;case`insideTopRight`:c+=o-i,l+=i,u=`right`;break;case`insideBottomLeft`:c+=i,l+=a-i,d=`bottom`;break;case`insideBottomRight`:c+=o-i,l+=a-i,u=`right`,d=`bottom`;break}return e||={},e.x=c,e.y=l,e.align=u,e.verticalAlign=d,e}var ga=`__zr_normal__`,_a=ea.concat([`ignore`]),va=ne(ea,function(e,t){return e[t]=!0,e},{ignore:!1}),ya={},ba=new X(0,0,0,0),xa=[],Sa=function(){function e(e){this.id=D(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return e.prototype._init=function(e){this.attr(e)},e.prototype.drift=function(e,t,n){switch(this.draggable){case`horizontal`:t=0;break;case`vertical`:e=0;break}var r=this.transform;r||=this.transform=[1,0,0,1,0,0],r[4]+=e,r[5]+=t,this.decomposeTransform(),this.markRedraw()},e.prototype.beforeUpdate=function(){},e.prototype.afterUpdate=function(){},e.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},e.prototype.updateInnerText=function(e){var t=this._textContent;if(t&&(!t.ignore||e)){this.textConfig||={};var n=this.textConfig,r=n.local,i=t.innerTransformable,a=void 0,o=void 0,s=!1;i.parent=r?this:null;var c=!1;i.copyTransform(t);var l=n.position!=null,u=n.autoOverflowArea,d=void 0;if((u||l)&&(d=ba,n.layoutRect?d.copy(n.layoutRect):d.copy(this.getBoundingRect()),r||d.applyTransform(this.transform)),l){this.calculateTextPosition?this.calculateTextPosition(ya,n,d):ha(ya,n,d),i.x=ya.x,i.y=ya.y,a=ya.align,o=ya.verticalAlign;var f=n.origin;if(f&&n.rotation!=null){var p=void 0,m=void 0;f===`center`?(p=d.width*.5,m=d.height*.5):(p=ma(f[0],d.width),m=ma(f[1],d.height)),c=!0,i.originX=-i.x+p+(r?0:d.x),i.originY=-i.y+m+(r?0:d.y)}}n.rotation!=null&&(i.rotation=n.rotation);var h=n.offset;h&&(i.x+=h[0],i.y+=h[1],c||(i.originX=-h[0],i.originY=-h[1]));var g=this._innerTextDefaultStyle||={};if(u){var _=g.overflowRect=g.overflowRect||new X(0,0,0,0);i.getLocalTransform(xa),Jt(xa,xa),X.copy(_,d),_.applyTransform(xa)}else g.overflowRect=null;var v=n.inside==null?typeof n.position==`string`&&n.position.indexOf(`inside`)>=0:n.inside,y=void 0,b=void 0,x=void 0;v&&this.canBeInsideText()?(y=n.insideFill,b=n.insideStroke,(y==null||y===`auto`)&&(y=this.getInsideTextFill()),(b==null||b===`auto`)&&(b=this.getInsideTextStroke(y),x=!0)):(y=n.outsideFill,b=n.outsideStroke,(y==null||y===`auto`)&&(y=this.getOutsideFill()),(b==null||b===`auto`)&&(b=this.getOutsideStroke(y),x=!0)),y||=`#000`,(y!==g.fill||b!==g.stroke||x!==g.autoStroke||a!==g.align||o!==g.verticalAlign)&&(s=!0,g.fill=y,g.stroke=b,g.autoStroke=x,g.align=a,g.verticalAlign=o,t.setDefaultTextStyle(g)),t.__dirty|=1,s&&t.dirtyStyle(!0)}},e.prototype.canBeInsideText=function(){return!0},e.prototype.getInsideTextFill=function(){return`#fff`},e.prototype.getInsideTextStroke=function(e){return`#000`},e.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?Wi:Ui},e.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),n=typeof t==`string`&&Mr(t);n||=[255,255,255,1];for(var r=n[3],i=this.__zr.isDarkMode(),a=0;a<3;a++)n[a]=n[a]*r+(i?0:255)*(1-r);return n[3]=1,Ur(n,`rgba`)},e.prototype.traverse=function(e,t){},e.prototype.attrKV=function(e,t){e===`textConfig`?this.setTextConfig(t):e===`textContent`?this.setTextContent(t):e===`clipPath`?this.setClipPath(t):e===`extra`?(this.extra=this.extra||{},M(this.extra,t)):this[e]=t},e.prototype.hide=function(){this.ignore=!0,this.markRedraw()},e.prototype.show=function(){this.ignore=!1,this.markRedraw()},e.prototype.attr=function(e,t){if(typeof e==`string`)this.attrKV(e,t);else if(K(e))for(var n=z(e),r=0;r0},e.prototype.getState=function(e){return this.states[e]},e.prototype.ensureState=function(e){var t=this.states;return t[e]||(t[e]={}),t[e]},e.prototype.clearStates=function(e){this.useState(ga,!1,e)},e.prototype.useState=function(e,t,n,r){var i=e===ga;if(!(!this.hasState()&&i)){var a=this.currentStates,o=this.stateTransition;if(!(F(a,e)>=0&&(t||a.length===1))){var s;if(this.stateProxy&&!i&&(s=this.stateProxy(e)),s||=this.states&&this.states[e],!s&&!i){O(`State `+e+` not exists.`);return}i||this.saveCurrentToNormalState(s);var c=!!(s&&s.hoverLayer||r);c&&this._toggleHoverLayerFlag(!0),this._applyStateObj(e,s,this._normalState,t,!n&&!this.__inHover&&o&&o.duration>0,o);var l=this._textContent,u=this._textGuide;return l&&l.useState(e,t,n,c),u&&u.useState(e,t,n,c),i?(this.currentStates=[],this._normalState={}):t?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!c&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=-2),s}}},e.prototype.useStates=function(e,t,n){if(!e.length)this.clearStates();else{var r=[],i=this.currentStates,a=e.length,o=a===i.length;if(o){for(var s=0;s0,p);var m=this._textContent,h=this._textGuide;m&&m.useStates(e,t,d),h&&h.useStates(e,t,d),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!d&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=-2)}},e.prototype.isSilent=function(){for(var e=this;e;){if(e.silent)return!0;var t=e.__hostTarget;e=t?e.ignoreHostSilent?null:t:e.parent}return!1},e.prototype._updateAnimationTargets=function(){for(var e=0;e=0){var n=this.currentStates.slice();n.splice(t,1),this.useStates(n)}},e.prototype.replaceState=function(e,t,n){var r=this.currentStates.slice(),i=F(r,e),a=F(r,t)>=0;i>=0?a?r.splice(i,1):r[i]=t:n&&!a&&r.push(t),this.useStates(r)},e.prototype.toggleState=function(e,t){t?this.useState(e,!0):this.removeState(e)},e.prototype._mergeStates=function(e){for(var t={},n,r=0;r=0&&t.splice(n,1)}),this.animators.push(e),n&&n.animation.addAnimator(e),n&&n.wakeUp()},e.prototype.updateDuringAnimation=function(e){this.markRedraw()},e.prototype.stopAnimation=function(e,t){for(var n=this.animators,r=n.length,i=[],a=0;a0&&n.during&&a[0].during(function(e,t){n.during(t)});for(var f=0;f0||i.force&&!o.length){var C=void 0,w=void 0,T=void 0;if(s){w={},f&&(C={});for(var b=0;b=0&&(n.splice(r,0,e),this._doAdd(e))}return this},t.prototype.replace=function(e,t){var n=F(this._children,e);return n>=0&&this.replaceAt(t,n),this},t.prototype.replaceAt=function(e,t){var n=this._children,r=n[t];if(e&&e!==this&&e.parent!==this&&e!==r){n[t]=e,r.parent=null;var i=this.__zr;i&&r.removeSelfFromZr(i),this._doAdd(e)}return this},t.prototype._doAdd=function(e){e.parent&&e.parent.remove(e),e.parent=this;var t=this.__zr;t&&t!==e.__zr&&e.addSelfToZr(t),t&&t.refresh()},t.prototype.remove=function(e){var t=this.__zr,n=this._children,r=F(n,e);return r<0?this:(n.splice(r,1),e.parent=null,t&&e.removeSelfFromZr(t),t&&t.refresh(),this)},t.prototype.removeAll=function(){for(var e=this._children,t=this.__zr,n=0;nRa,disposeAll:()=>za,getElementSSRData:()=>Ua,getInstance:()=>Ba,init:()=>La,registerPainter:()=>Va,registerSSRDataGetter:()=>Wa,version:()=>Ga}),Ma={},Na={};function Pa(e){delete Na[e]}function Fa(e){if(!e)return!1;if(typeof e==`string`)return Wr(e,1)0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},e.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},e.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},e.prototype.refreshHover=function(){this._needsRefreshHover=!0},e.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()===`canvas`&&this.painter.refreshHover())},e.prototype.resize=function(e){this._disposed||(e||={},this.painter.resize(e.width,e.height),this.handler.resize())},e.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},e.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},e.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},e.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},e.prototype.findHover=function(e,t){if(!this._disposed)return this.handler.findHover(e,t)},e.prototype.on=function(e,t,n){return this._disposed||this.handler.on(e,t,n),this},e.prototype.off=function(e,t){this._disposed||this.handler.off(e,t)},e.prototype.trigger=function(e,t){this._disposed||this.handler.trigger(e,t)},e.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),t=0;t0){if(e<=i)return o;if(e>=a)return s}else if(e>=i)return o;else if(e<=a)return s}else{if(e===i)return o;if(e===a)return s}return(e-i)/c*l+o}var $a=eo;function eo(e,t,n){switch(e){case`center`:case`middle`:e=`50%`;break;case`left`:case`top`:e=`0%`;break;case`right`:case`bottom`:e=`100%`;break}return to(e,t,n)}function to(e,t,n){return W(e)?Ja(e).match(/%$/)?parseFloat(e)/100*t+(n||0):parseFloat(e):e==null?NaN:+e}function no(e,t,n){return t??=10,t=Math.min(Math.max(0,t),qa),e=(+e).toFixed(t),n?e:+e}function ro(e){return e.sort(function(e,t){return e-t}),e}function io(e){if(e=+e,isNaN(e))return 0;if(e>1e-14){for(var t=1,n=0;n<15;n++,t*=10)if(Math.round(e*t)/t===e)return n}return ao(e)}function ao(e){var t=e.toString().toLowerCase(),n=t.indexOf(`e`),r=n>0?+t.slice(n+1):0,i=n>0?n:t.length,a=t.indexOf(`.`),o=a<0?0:i-1-a;return Math.max(0,o-r)}function oo(e,t){var n=Math.log,r=Math.LN10,i=Math.floor(n(e[1]-e[0])/r),a=Math.round(n(Za(t[1]-t[0]))/r),o=Math.min(Math.max(-i+a,0),20);return isFinite(o)?o:20}function so(e,t,n){return e[t]&&co(e,n)[t]||0}function co(e,t){var n=ne(e,function(e,t){return e+(isNaN(t)?0:t)},0);if(n===0)return[];for(var r=10**t,i=R(e,function(e){return(isNaN(e)?0:e)/n*r*100}),a=r*100,o=R(i,function(e){return Math.floor(e)}),s=ne(o,function(e,t){return e+t},0),c=R(i,function(e,t){return e-o[t]});sl&&(l=c[d],u=d);++o[u],c[u]=0,++s}return R(o,function(e){return e/r})}function lo(e,t){var n=Math.max(io(e),io(t)),r=e+t;return n>qa?r:no(r,n)}var uo=9007199254740991;function fo(e){var t=Math.PI*2;return(e%t+t)%t}function po(e){return e>-Ka&&e=10&&t++,t}function vo(e,t){var n=_o(e),r=10**n,i=e/r;return e=(t?i<1.5?1:i<2.5?2:i<4?3:i<7?5:10:i<1?1:i<2?2:i<3?3:i<5?5:10)*r,n>=-20?+e.toFixed(n<0?-n:0):e}function yo(e,t){var n=(e.length-1)*t+1,r=Math.floor(n),i=+e[r-1],a=n-r;return a?i+a*(e[r]-i):i}function bo(e){e.sort(function(e,t){return s(e,t,0)?-1:1});for(var t=-1/0,n=1,r=0;r0?e.length:0),this.item=null,this.key=NaN,this},e.prototype.next=function(){return(this._step>0?this._idx=this._end)?(this.item=this._list[this._idx],this.key=this._idx+=this._step,!0):!1},e})();var ds=`.`,fs=`___EC__COMPONENT__CONTAINER___`,ps=`___EC__EXTENDED_CLASS___`;function ms(e){var t={main:``,sub:``};if(e){var n=e.split(ds);t.main=n[0]||``,t.sub=n[1]||``}return t}function hs(e){ve(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(e),`componentType "`+e+`" illegal`)}function gs(e){return!!(e&&e[ps])}function _s(e,t){e.$constructor=e,e.extend=function(e){var t=this,r;return vs(t)?r=function(e){n(t,e);function t(){return e.apply(this,arguments)||this}return t}(t):(r=function(){(e.$constructor||t).apply(this,arguments)},ee(r,this)),M(r.prototype,e),r[ps]=!0,r.extend=this.extend,r.superCall=Ss,r.superApply=Cs,r.superClass=t,r}}function vs(e){return U(e)&&/^class\s/.test(Function.prototype.toString.call(e))}function ys(e,t){e.extend=t.extend}var bs=Math.round(Math.random()*10);function xs(e){var t=[`__\0is_clz`,bs++].join(`_`);e.prototype[t]=!0,e.isInstance=function(e){return!!(e&&e[t])}}function Ss(e,t){var n=[...arguments].slice(2);return this.superClass.prototype[t].apply(e,n)}function Cs(e,t,n){return this.superClass.prototype[t].apply(e,n)}function ws(e){var t={};e.registerClass=function(e){var r=e.type||e.prototype.type;if(r){hs(r),e.prototype.type=r;var i=ms(r);if(!i.sub)t[i.main]=e;else if(i.sub!==fs){var a=n(i);a[i.sub]=e}}return e},e.getClass=function(e,n,r){var i=t[e];if(i&&i[fs]&&(i=n?i[n]:null),r&&!i)throw Error(n?`Component `+e+`.`+(n||``)+` is used but not imported.`:e+`.type should be specified.`);return i},e.getClassesByMainType=function(e){var n=ms(e),r=[],i=t[n.main];return i&&i[fs]?L(i,function(e,t){t!==fs&&r.push(e)}):r.push(i),r},e.hasClass=function(e){return!!t[ms(e).main]},e.getAllClassMainTypes=function(){var e=[];return L(t,function(t,n){e.push(n)}),e},e.hasSubTypes=function(e){var n=t[ms(e).main];return n&&n[fs]};function n(e){var n=t[e.main];return(!n||!n[fs])&&(n=t[e.main]={},n[fs]=!0),n}}function Ts(e,t){for(var n=0;n=0||i&&F(i,s)<0)){var c=n.getShallow(s,t);c!=null&&(a[e[o][0]]=c)}}return a}}var Es=Ts([[`fill`,`color`],[`shadowBlur`],[`shadowOffsetX`],[`shadowOffsetY`],[`opacity`],[`shadowColor`]]),Ds=function(){function e(){}return e.prototype.getAreaStyle=function(e,t){return Es(this,e,t)},e}(),Os=new _r(50);function ks(e){if(typeof e==`string`){var t=Os.get(e);return t&&t.image}else return e}function As(e,t,n,r,i){if(!e)return t;if(typeof e==`string`){if(t&&t.__zrImageSrc===e||!n)return t;var a=Os.get(e),o={hostEl:n,cb:r,cbPayload:i};return a?(t=a.image,!Ms(t)&&a.pending.push(o)):(t=f.loadImage(e,js,js),t.__zrImageSrc=e,Os.put(e,t.__cachedImgObj={image:t,pending:[o]})),t}else return e}function js(){var e=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t=s;l++)c-=s;var u=ca(o,n);return u>c&&(n=``,u=0),c=e-u,i.ellipsis=n,i.ellipsisWidth=u,i.contentWidth=c,i.containerWidth=e,i}function Ls(e,t,n){var r=n.containerWidth,i=n.contentWidth,a=n.fontMeasureInfo;if(!r){e.textLine=``,e.isTruncated=!1;return}var o=ca(a,t);if(o<=r){e.textLine=t,e.isTruncated=!1;return}for(var s=0;;s++){if(o<=i||s>=n.maxIterations){t+=n.ellipsis;break}var c=s===0?Rs(t,i,a):o>0?Math.floor(t.length*i/o):0;t=t.substr(0,c),o=ca(a,t)}t===``&&(t=n.placeholder),e.textLine=t,e.isTruncated=!0}function Rs(e,t,n){for(var r=0,i=0,a=e.length;ig&&p){var y=Math.floor(g/f);m||=_.length>y,_=_.slice(0,y),v=_.length*f}if(i&&u&&h!=null)for(var b=Is(h,l,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),x={},S=0;S<_.length;S++)Ls(x,_[S],b),_[S]=x.textLine,m||=x.isTruncated;for(var C=g,w=0,T=na(l),S=0;S<_.length;S++)w=Math.max(ca(T,_[S]),w);h??=w;var E=h;return C+=c,E+=s,{lines:_,height:g,outerWidth:E,outerHeight:C,lineHeight:f,calculatedLineHeight:d,contentWidth:w,contentHeight:v,width:h,isTruncated:m}}var Bs=function(){function e(){}return e}(),Vs=function(){function e(e){this.tokens=[],e&&(this.tokens=e)}return e}(),Hs=function(){function e(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[],this.isTruncated=!1}return e}();function Us(e,t,n,r,i){var a=new Hs,o=Qs(e);if(!o)return a;var s=t.padding,c=s?s[1]+s[3]:0,l=s?s[0]+s[2]:0,u=t.width;u==null&&n!=null&&(u=n-c);var d=t.height;d==null&&r!=null&&(d=r-l);for(var f=t.overflow,p=(f===`break`||f===`breakAll`)&&u!=null?{width:u,accumWidth:0,breakAll:f===`breakAll`}:null,m=Ns.lastIndex=0,h;(h=Ns.exec(o))!=null;){var g=h.index;g>m&&Ws(a,o.substring(m,g),t,p),Ws(a,h[2],t,p,h[1]),m=Ns.lastIndex}md){var F=a.lines.length;O>0?(T.tokens=T.tokens.slice(0,O),C(T,D,E),a.lines=a.lines.slice(0,w+1)):a.lines=a.lines.slice(0,w),a.isTruncated=a.isTruncated||a.lines.length0&&m+r.accumWidth>r.width&&(u=t.split(` `),l=!0),r.accumWidth=m}else{var h=Js(t,c,r.width,r.breakAll,r.accumWidth);r.accumWidth=h.accumWidth+p,d=h.linesWidths,u=h.lines}}u||=t.split(` `);for(var g=na(c),_=0;_=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}var Ks=ne(`,&?/;] `.split(``),function(e,t){return e[t]=!0,e},{});function qs(e){return Gs(e)?!!Ks[e]:!0}function Js(e,t,n,r,i){for(var a=[],o=[],s=``,c=``,l=0,u=0,d=na(t),f=0;fn:i+u+m>n){u?(s||c)&&(h?(s||(s=c,c=``,l=0,u=l),a.push(s),o.push(u-l),c+=p,l+=m,s=``,u=l):(c&&(s+=c,c=``,l=0),a.push(s),o.push(u),s=p,u=m)):h?(a.push(c),o.push(l),c=p,l=m):(a.push(p),o.push(m));continue}u+=m,h?(c+=p,l+=m):(c&&(s+=c,c=``,l=0),s+=p)}return c&&(s+=c),s&&(a.push(s),o.push(u)),a.length===1&&(u+=i),{accumWidth:u,lines:a,linesWidths:o}}function Ys(e,t,n,r,i,a){if(e.baseX=n,e.baseY=r,e.outerWidth=e.outerHeight=null,t){var o=t.width*2,s=t.height*2;X.set(Xs,da(n,o,i),fa(r,s,a),o,s),X.intersect(t,Xs,null,Zs);var c=Zs.outIntersectRect;e.outerWidth=c.width,e.outerHeight=c.height,e.baseX=da(c.x,c.width,i,!0),e.baseY=fa(c.y,c.height,a,!0)}}var Xs=new X(0,0,0,0),Zs={outIntersectRect:{},clamp:!0};function Qs(e){return e==null?e=``:e+=``}function $s(e){var t=Qs(e.text),n=e.font;return ec(e,ca(na(n),t),pa(n),null)}function ec(e,t,n,r){var i=new X(da(e.x||0,t,e.textAlign),fa(e.y||0,n,e.textBaseline),t,n),a=r??(tc(e)?e.lineWidth:0);return a>0&&(i.x-=a/2,i.y-=a/2,i.width+=a,i.height+=a),i}function tc(e){var t=e.stroke;return t!=null&&t!==`none`&&e.lineWidth>0}var nc=`__zr_style_`+Math.round(Math.random()*10),rc={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:`#000`,opacity:1,blend:`source-over`},ic={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};rc[nc]=!0;var ac=[`z`,`z2`,`invisible`],oc=[`invisible`],sc=function(e){Fe(t,e);function t(t){return e.call(this,t)||this}return t.prototype._init=function(t){for(var n=z(t),r=0;r1e-4){s[0]=e-n,s[1]=t-r,c[0]=e+n,c[1]=t+r;return}if(gc[0]=mc(i)*n+e,gc[1]=pc(i)*r+t,_c[0]=mc(a)*n+e,_c[1]=pc(a)*r+t,l(s,gc,_c),u(c,gc,_c),i%=hc,i<0&&(i+=hc),a%=hc,a<0&&(a+=hc),i>a&&!o?a+=hc:ii&&(vc[0]=mc(p)*n+e,vc[1]=pc(p)*r+t,l(s,vc,s),u(c,vc,c))}var Tc={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Ec=[],Dc=[],Oc=[],kc=[],Ac=[],jc=[],Mc=Math.min,Nc=Math.max,Pc=Math.cos,Fc=Math.sin,Ic=Math.abs,Lc=Math.PI,Rc=Lc*2,zc=typeof Float32Array<`u`,Bc=[];function Vc(e){return Math.round(e/Lc*1e8)/1e8%2*Lc}function Hc(e,t){var n=Vc(e[0]);n<0&&(n+=Rc);var r=n-e[0],i=e[1];i+=r,!t&&i-n>=Rc?i=n+Rc:t&&n-i>=Rc?i=n-Rc:!t&&n>i?i=n+(Rc-Vc(n-i)):t&&n0&&(this._ux=Ic(n/Vi/e)||0,this._uy=Ic(n/Vi/t)||0)},e.prototype.setDPR=function(e){this.dpr=e},e.prototype.setContext=function(e){this._ctx=e},e.prototype.getContext=function(){return this._ctx},e.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},e.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},e.prototype.moveTo=function(e,t){return this._drawPendingPt(),this.addData(Tc.M,e,t),this._ctx&&this._ctx.moveTo(e,t),this._x0=e,this._y0=t,this._xi=e,this._yi=t,this},e.prototype.lineTo=function(e,t){var n=Ic(e-this._xi),r=Ic(t-this._yi),i=n>this._ux||r>this._uy;if(this.addData(Tc.L,e,t),this._ctx&&i&&this._ctx.lineTo(e,t),i)this._xi=e,this._yi=t,this._pendingPtDist=0;else{var a=n*n+r*r;a>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=t,this._pendingPtDist=a)}return this},e.prototype.bezierCurveTo=function(e,t,n,r,i,a){return this._drawPendingPt(),this.addData(Tc.C,e,t,n,r,i,a),this._ctx&&this._ctx.bezierCurveTo(e,t,n,r,i,a),this._xi=i,this._yi=a,this},e.prototype.quadraticCurveTo=function(e,t,n,r){return this._drawPendingPt(),this.addData(Tc.Q,e,t,n,r),this._ctx&&this._ctx.quadraticCurveTo(e,t,n,r),this._xi=n,this._yi=r,this},e.prototype.arc=function(e,t,n,r,i,a){this._drawPendingPt(),Bc[0]=r,Bc[1]=i,Hc(Bc,a),r=Bc[0],i=Bc[1];var o=i-r;return this.addData(Tc.A,e,t,n,n,r,o,0,+!a),this._ctx&&this._ctx.arc(e,t,n,r,i,a),this._xi=Pc(i)*n+e,this._yi=Fc(i)*n+t,this},e.prototype.arcTo=function(e,t,n,r,i){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,t,n,r,i),this},e.prototype.rect=function(e,t,n,r){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,t,n,r),this.addData(Tc.R,e,t,n,r),this},e.prototype.closePath=function(){this._drawPendingPt(),this.addData(Tc.Z);var e=this._ctx,t=this._x0,n=this._y0;return e&&e.closePath(),this._xi=t,this._yi=n,this},e.prototype.fill=function(e){e&&e.fill(),this.toStatic()},e.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},e.prototype.len=function(){return this._len},e.prototype.setData=function(e){if(this._saveData){var t=e.length;!(this.data&&this.data.length===t)&&zc&&(this.data=new Float32Array(t));for(var n=0;n0&&a))for(var o=0;ol.length&&(this._expandData(),l=this.data);for(var u=0;u0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},e.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],t=0;t11&&(this.data=new Float32Array(e)))}},e.prototype.getBoundingRect=function(){Oc[0]=Oc[1]=Ac[0]=Ac[1]=Number.MAX_VALUE,kc[0]=kc[1]=jc[0]=jc[1]=-Number.MAX_VALUE;var e=this.data,t=0,n=0,r=0,i=0,a;for(a=0;an||Ic(v)>r||d===t-1)&&(m=Math.sqrt(_*_+v*v),i=h,a=g);break;case Tc.C:var y=e[d++],b=e[d++],h=e[d++],g=e[d++],x=e[d++],S=e[d++];m=ir(i,a,y,b,h,g,x,S,10),i=x,a=S;break;case Tc.Q:var y=e[d++],b=e[d++],h=e[d++],g=e[d++];m=dr(i,a,y,b,h,g,10),i=h,a=g;break;case Tc.A:var C=e[d++],w=e[d++],T=e[d++],E=e[d++],D=e[d++],O=e[d++],k=O+D;d+=1,p&&(o=Pc(D)*T+C,s=Fc(D)*E+w),m=Nc(T,E)*Mc(Rc,Math.abs(O)),i=Pc(k)*T+C,a=Fc(k)*E+w;break;case Tc.R:o=i=e[d++],s=a=e[d++];var A=e[d++],j=e[d++];m=A*2+j*2;break;case Tc.Z:var _=o-i,v=s-a;m=Math.sqrt(_*_+v*v),i=o,a=s;break}m>=0&&(c[u++]=m,l+=m)}return this._pathLen=l,l},e.prototype.rebuildPath=function(e,t){var n=this.data,r=this._ux,i=this._uy,a=this._len,o,s,c,l,u,d,f=t<1,p,m,h=0,g=0,_,v=0,y,b;if(!(f&&(this._pathSegLen||this._calculateLength(),p=this._pathSegLen,m=this._pathLen,_=t*m,!_)))lo:for(var x=0;x0&&(e.lineTo(y,b),v=0),S){case Tc.M:o=c=n[x++],s=l=n[x++],e.moveTo(c,l);break;case Tc.L:u=n[x++],d=n[x++];var w=Ic(u-c),T=Ic(d-l);if(w>r||T>i){if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;e.lineTo(c*(1-D)+u*D,l*(1-D)+d*D);break lo}h+=E}e.lineTo(u,d),c=u,l=d,v=0}else{var O=w*w+T*T;O>v&&(y=u,b=d,v=O)}break;case Tc.C:var k=n[x++],A=n[x++],j=n[x++],M=n[x++],N=n[x++],P=n[x++];if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;nr(c,k,j,N,D,Ec),nr(l,A,M,P,D,Dc),e.bezierCurveTo(Ec[1],Dc[1],Ec[2],Dc[2],Ec[3],Dc[3]);break lo}h+=E}e.bezierCurveTo(k,A,j,M,N,P),c=N,l=P;break;case Tc.Q:var k=n[x++],A=n[x++],j=n[x++],M=n[x++];if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;lr(c,k,j,D,Ec),lr(l,A,M,D,Dc),e.quadraticCurveTo(Ec[1],Dc[1],Ec[2],Dc[2]);break lo}h+=E}e.quadraticCurveTo(k,A,j,M),c=j,l=M;break;case Tc.A:var F=n[x++],ee=n[x++],I=n[x++],te=n[x++],L=n[x++],R=n[x++],ne=n[x++],re=!n[x++],ie=I>te?I:te,z=Ic(I-te)>.001,ae=L+R,B=!1;if(f){var E=p[g++];h+E>_&&(ae=L+R*(_-h)/E,B=!0),h+=E}if(z&&e.ellipse?e.ellipse(F,ee,I,te,ne,L,ae,re):e.arc(F,ee,ie,L,ae,re),B)break lo;C&&(o=Pc(L)*I+F,s=Fc(L)*te+ee),c=Pc(ae)*I+F,l=Fc(ae)*te+ee;break;case Tc.R:o=c=n[x],s=l=n[x+1],u=n[x++],d=n[x++];var V=n[x++],H=n[x++];if(f){var E=p[g++];if(h+E>_){var U=_-h;e.moveTo(u,d),e.lineTo(u+Mc(U,V),d),U-=V,U>0&&e.lineTo(u+V,d+Mc(U,H)),U-=H,U>0&&e.lineTo(u+Nc(V-U,0),d+H),U-=V,U>0&&e.lineTo(u,d+Nc(H-U,0));break lo}h+=E}e.rect(u,d,V,H);break;case Tc.Z:if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;e.lineTo(c*(1-D)+o*D,l*(1-D)+s*D);break lo}h+=E}e.closePath(),c=o,l=s}}},e.prototype.clone=function(){var t=new e,n=this.data;return t.data=n.slice?n.slice():Array.prototype.slice.call(n),t._len=this._len,t},e.prototype.canSave=function(){return!!this._saveData},e.CMD=Tc,e.initDefaultProps=(function(){var t=e.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0})(),e}();function Wc(e,t,n,r,i,a,o){if(i===0)return!1;var s=i,c=0,l=e;if(o>t+s&&o>r+s||oe+s&&a>n+s||at+d&&u>r+d&&u>a+d&&u>s+d||ue+d&&l>n+d&&l>i+d&&l>o+d||lt+l&&c>r+l&&c>a+l||ce+l&&s>n+l&&s>i+l||sn||u+li&&(i+=Yc);var f=Math.atan2(c,s);return f<0&&(f+=Yc),f>=r&&f<=i||f+Yc>=r&&f+Yc<=i}function Zc(e,t,n,r,i,a){if(a>t&&a>r||ai?s:0}var Qc=Uc.CMD,$c=Math.PI*2,el=1e-4;function tl(e,t){return Math.abs(e-t)t&&l>r&&l>a&&l>s||l1&&il(),p=Qn(t,r,a,s,rl[0]),f>1&&(m=Qn(t,r,a,s,rl[1]))),f===2?gt&&s>r&&s>a||s=0&&l<=1){for(var u=0,d=ar(t,r,a,l),f=0;fn||s<-n)return 0;var c=Math.sqrt(n*n-s*s);nl[0]=-c,nl[1]=c;var l=Math.abs(r-i);if(l<1e-4)return 0;if(l>=$c-1e-4){r=0,i=$c;var u=a?1:-1;return o>=nl[0]+e&&o<=nl[1]+e?u:0}if(r>i){var d=r;r=i,i=d}r<0&&(r+=$c,i+=$c);for(var f=0,p=0;p<2;p++){var m=nl[p];if(m+e>o){var h=Math.atan2(s,m),u=a?1:-1;h<0&&(h=$c+h),(h>=r&&h<=i||h+$c>=r&&h+$c<=i)&&(h>Math.PI/2&&h1&&(n||(s+=Zc(c,l,u,d,r,i))),g&&(c=a[m],l=a[m+1],u=c,d=l),h){case Qc.M:u=a[m++],d=a[m++],c=u,l=d;break;case Qc.L:if(n){if(Wc(c,l,a[m],a[m+1],t,r,i))return!0}else s+=Zc(c,l,a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case Qc.C:if(n){if(Gc(c,l,a[m++],a[m++],a[m++],a[m++],a[m],a[m+1],t,r,i))return!0}else s+=al(c,l,a[m++],a[m++],a[m++],a[m++],a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case Qc.Q:if(n){if(Kc(c,l,a[m++],a[m++],a[m],a[m+1],t,r,i))return!0}else s+=ol(c,l,a[m++],a[m++],a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case Qc.A:var _=a[m++],v=a[m++],y=a[m++],b=a[m++],x=a[m++],S=a[m++];m+=1;var C=!!(1-a[m++]);f=Math.cos(x)*y+_,p=Math.sin(x)*b+v,g?(u=f,d=p):s+=Zc(c,l,f,p,r,i);var w=(r-_)*b/y+_;if(n){if(Xc(_,v,b,x,x+S,C,t,w,i))return!0}else s+=sl(_,v,b,x,x+S,C,w,i);c=Math.cos(x+S)*y+_,l=Math.sin(x+S)*b+v;break;case Qc.R:u=c=a[m++],d=l=a[m++];var T=a[m++],E=a[m++];if(f=u+T,p=d+E,n){if(Wc(u,d,f,d,t,r,i)||Wc(f,d,f,p,t,r,i)||Wc(f,p,u,p,t,r,i)||Wc(u,p,u,d,t,r,i))return!0}else s+=Zc(f,d,f,p,r,i),s+=Zc(u,p,u,d,r,i);break;case Qc.Z:if(n){if(Wc(c,l,u,d,t,r,i))return!0}else s+=Zc(c,l,u,d,r,i);c=u,l=d;break}}return!n&&!tl(l,d)&&(s+=Zc(c,l,u,d,r,i)||0),s!==0}function ll(e,t,n){return cl(e,0,!1,t,n)}function ul(e,t,n,r){return cl(e,t,!0,n,r)}var dl=N({fill:`#000`,stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:`butt`,miterLimit:10,strokeNoScale:!1,strokeFirst:!1},rc),fl={style:N({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},ic.style)},pl=ea.concat([`invisible`,`culling`,`z`,`z2`,`zlevel`,`parent`]),ml=function(e){Fe(t,e);function t(t){return e.call(this,t)||this}return t.prototype.update=function(){var n=this;e.prototype.update.call(this);var r=this.style;if(r.decal){var i=this._decalEl=this._decalEl||new t;i.buildPath===t.prototype.buildPath&&(i.buildPath=function(e){n.buildPath(e,n.shape)}),i.silent=!0;var a=i.style;for(var o in r)a[o]!==r[o]&&(a[o]=r[o]);a.fill=r.fill?r.decal:null,a.decal=null,a.shadowColor=null,r.strokeFirst&&(a.stroke=null);for(var s=0;s.5?Ui:t>.2?Gi:Wi}else if(e)return Wi}return Ui},t.prototype.getInsideTextStroke=function(e){var t=this.style.fill;if(W(t)){var n=this.__zr;if(!!(n&&n.isDarkMode())==Wr(e,0)<.4)return t}},t.prototype.buildPath=function(e,t,n){},t.prototype.pathUpdated=function(){this.__dirty&=-5},t.prototype.getUpdatedPathProxy=function(e){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,e),this.path},t.prototype.createPathProxy=function(){this.path=new Uc(!1)},t.prototype.hasStroke=function(){var e=this.style,t=e.stroke;return!(t==null||t===`none`||!(e.lineWidth>0))},t.prototype.hasFill=function(){var e=this.style.fill;return e!=null&&e!==`none`},t.prototype.getBoundingRect=function(){var e=this._rect,t=this.style,n=!e;if(n){var r=!1;this.path||(r=!0,this.createPathProxy());var i=this.path;(r||this.__dirty&4)&&(i.beginPath(),this.buildPath(i,this.shape,!1),this.pathUpdated()),e=i.getBoundingRect()}if(this._rect=e,this.hasStroke()&&this.path&&this.path.len()>0){var a=this._rectStroke||=e.clone();if(this.__dirty||n){a.copy(e);var o=t.strokeNoScale?this.getLineScale():1,s=t.lineWidth;if(!this.hasFill()){var c=this.strokeContainThreshold;s=Math.max(s,c??4)}o>1e-10&&(a.width+=s/o,a.height+=s/o,a.x-=s/o/2,a.y-=s/o/2)}return a}return e},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t),r=this.getBoundingRect(),i=this.style;if(e=n[0],t=n[1],r.contain(e,t)){var a=this.path;if(this.hasStroke()){var o=i.lineWidth,s=i.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(this.hasFill()||(o=Math.max(o,this.strokeContainThreshold)),ul(a,o/s,e,t)))return!0}if(this.hasFill())return ll(a,e,t)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=4,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(t,n){t===`shape`?this.setShape(n):e.prototype.attrKV.call(this,t,n)},t.prototype.setShape=function(e,t){var n=this.shape;return n||=this.shape={},typeof e==`string`?n[e]=t:M(n,e),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(this.__dirty&4)},t.prototype.createStyle=function(e){return Oe(dl,e)},t.prototype._innerSaveToNormal=function(t){e.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.shape&&!n.shape&&(n.shape=M({},this.shape))},t.prototype._applyStateObj=function(t,n,r,i,a,o){e.prototype._applyStateObj.call(this,t,n,r,i,a,o);var s=!(n&&i),c;if(n&&n.shape?a?i?c=n.shape:(c=M({},r.shape),M(c,n.shape)):(c=M({},i?this.shape:r.shape),M(c,n.shape)):s&&(c=r.shape),c)if(a){this.shape=M({},this.shape);for(var l={},u=z(c),d=0;di&&(d=s+c,s*=i/d,c*=i/d),l+u>i&&(d=l+u,l*=i/d,u*=i/d),c+l>a&&(d=c+l,c*=a/d,l*=a/d),s+u>a&&(d=s+u,s*=a/d,u*=a/d),e.moveTo(n+s,r),e.lineTo(n+i-c,r),c!==0&&e.arc(n+i-c,r+c,c,-Math.PI/2,0),e.lineTo(n+i,r+a-l),l!==0&&e.arc(n+i-l,r+a-l,l,0,Math.PI/2),e.lineTo(n+u,r+a),u!==0&&e.arc(n+u,r+a-u,u,Math.PI/2,Math.PI),e.lineTo(n,r+s),s!==0&&e.arc(n+s,r+s,s,Math.PI,Math.PI*1.5)}var Sl=Math.round;function Cl(e,t,n){if(t){var r=t.x1,i=t.x2,a=t.y1,o=t.y2;e.x1=r,e.x2=i,e.y1=a,e.y2=o;var s=n&&n.lineWidth;return s?(Sl(r*2)===Sl(i*2)&&(e.x1=e.x2=Tl(r,s,!0)),Sl(a*2)===Sl(o*2)&&(e.y1=e.y2=Tl(a,s,!0)),e):e}}function wl(e,t,n){if(t){var r=t.x,i=t.y,a=t.width,o=t.height;e.x=r,e.y=i,e.width=a,e.height=o;var s=n&&n.lineWidth;return s?(e.x=Tl(r,s,!0),e.y=Tl(i,s,!0),e.width=Math.max(Tl(r+a,s,!1)-e.x,a===0?0:1),e.height=Math.max(Tl(i+o,s,!1)-e.y,o===0?0:1),e):e}}function Tl(e,t,n){if(!t)return e;var r=Sl(e*2);return(r+Sl(t))%2==0?r/2:(r+(n?1:-1))/2}var El=function(){function e(){this.x=0,this.y=0,this.width=0,this.height=0}return e}(),Dl={},Ol=function(e){Fe(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new El},t.prototype.buildPath=function(e,t){var n,r,i,a;if(this.subPixelOptimize){var o=wl(Dl,t,this.style);n=o.x,r=o.y,i=o.width,a=o.height,o.r=t.r,t=o}else n=t.x,r=t.y,i=t.width,a=t.height;t.r?xl(e,t):e.rect(n,r,i,a)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t}(ml);Ol.prototype.type=`rect`;var kl={fill:`#000`},Al=2,jl={},Ml={style:N({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},ic.style)},Nl=function(e){Fe(t,e);function t(t){var n=e.call(this)||this;return n.type=`text`,n._children=[],n._defaultStyle=kl,n.attr(t),n}return t.prototype.childrenRef=function(){return this._children},t.prototype.update=function(){e.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var t=0;t0,T=0;T=0&&(D=y[E],D.align===`right`);)this._placeToken(D,e,x,m,T,`right`,g),S-=D.width,T-=D.width,E--;for(w+=(s-(w-p)-(h-T)-S)/2;C<=E;)D=y[C],this._placeToken(D,e,x,m,w+D.width/2,`center`,g),w+=D.width,C++;m+=x}},t.prototype._placeToken=function(e,t,n,r,i,a,o){var s=t.rich[e.styleName]||{};s.text=e.text;var c=e.verticalAlign,l=r+n/2;c===`top`?l=r+e.height/2:c===`bottom`&&(l=r+n-e.height/2),!e.isLineHolder&&Kl(s)&&this._renderBackground(s,t,a===`right`?i-e.width:a===`center`?i-e.width/2:i,l-e.height/2,e.width,e.height);var u=!!s.backgroundColor,d=e.textPadding;d&&(i=Wl(i,a,d),l-=e.height/2-d[0]-e.innerHeight/2);var f=this._getOrCreateChild(gl),p=f.createStyle();f.useStyle(p);var m=this._defaultStyle,h=!1,g=0,_=!1,v=Ul(`fill`in s?s.fill:`fill`in t?t.fill:(h=!0,m.fill)),y=Hl(`stroke`in s?s.stroke:`stroke`in t?t.stroke:!u&&!o&&(!m.autoStroke||h)?(g=Al,_=!0,m.stroke):null),b=s.textShadowBlur>0||t.textShadowBlur>0;p.text=e.text,p.x=i,p.y=l,b&&(p.shadowBlur=s.textShadowBlur||t.textShadowBlur||0,p.shadowColor=s.textShadowColor||t.textShadowColor||`transparent`,p.shadowOffsetX=s.textShadowOffsetX||t.textShadowOffsetX||0,p.shadowOffsetY=s.textShadowOffsetY||t.textShadowOffsetY||0),p.textAlign=a,p.textBaseline=`middle`,p.font=e.font||`12px sans-serif`,p.opacity=he(s.opacity,t.opacity,1),Rl(p,s),y&&(p.lineWidth=he(s.lineWidth,t.lineWidth,g),p.lineDash=q(s.lineDash,t.lineDash),p.lineDashOffset=t.lineDashOffset||0,p.stroke=y),v&&(p.fill=v),f.setBoundingRect(ec(p,e.contentWidth,e.contentHeight,_?0:null))},t.prototype._renderBackground=function(e,t,n,r,i,a){var o=e.backgroundColor,s=e.borderWidth,c=e.borderColor,l=o&&o.image,u=o&&!l,d=e.borderRadius,f=this,p,m;if(u||e.lineHeight||s&&c){p=this._getOrCreateChild(Ol),p.useStyle(p.createStyle()),p.style.fill=null;var h=p.shape;h.x=n,h.y=r,h.width=i,h.height=a,h.r=d,p.dirtyShape()}if(u){var g=p.style;g.fill=o||null,g.fillOpacity=q(e.fillOpacity,1)}else if(l){m=this._getOrCreateChild(bl),m.onload=function(){f.dirtyStyle()};var _=m.style;_.image=o.image,_.x=n,_.y=r,_.width=i,_.height=a}if(s&&c){var g=p.style;g.lineWidth=s,g.stroke=c,g.strokeOpacity=q(e.strokeOpacity,1),g.lineDash=e.borderDash,g.lineDashOffset=e.borderDashOffset||0,p.strokeContainThreshold=0,p.hasFill()&&p.hasStroke()&&(g.strokeFirst=!0,g.lineWidth*=2)}var v=(p||m).style;v.shadowBlur=e.shadowBlur||0,v.shadowColor=e.shadowColor||`transparent`,v.shadowOffsetX=e.shadowOffsetX||0,v.shadowOffsetY=e.shadowOffsetY||0,v.opacity=he(e.opacity,t.opacity,1)},t.makeFont=function(e){var t=``;return zl(e)&&(t=[e.fontStyle,e.fontWeight,Ll(e.fontSize),e.fontFamily||`sans-serif`].join(` `)),t&&ye(t)||e.textFont||e.font},t}(sc),Pl={left:!0,right:1,center:1},Fl={top:1,bottom:1,middle:1},Il=[`fontStyle`,`fontWeight`,`fontSize`,`fontFamily`];function Ll(e){return typeof e==`string`&&(e.indexOf(`px`)!==-1||e.indexOf(`rem`)!==-1||e.indexOf(`em`)!==-1)?e:isNaN(+e)?`12px`:e+`px`}function Rl(e,t){for(var n=0;n=0,a=!1;if(e instanceof ml){var o=Xl(e),s=i&&o.selectFill||o.normalFill,c=i&&o.selectStroke||o.normalStroke;if(ou(s)||ou(c)){r||={};var l=r.style||{};l.fill===`inherit`?(a=!0,r=M({},r),l=M({},l),l.fill=s):!ou(l.fill)&&ou(s)?(a=!0,r=M({},r),l=M({},l),l.fill=qr(s)):!ou(l.stroke)&&ou(c)&&(a||(r=M({},r),l=M({},l)),l.stroke=qr(c)),r.style=l}}if(r&&r.z2==null){a||(r=M({},r));var u=e.z2EmphasisLift;r.z2=e.z2+(u??10)}return r}function yu(e,t,n){if(n&&n.z2==null){n=M({},n);var r=e.z2SelectLift;n.z2=e.z2+(r??9)}return n}function bu(e,t,n){var r=F(e.currentStates,t)>=0,i=e.style.opacity,a=r?null:_u(e,[`opacity`],t,{opacity:1});n||={};var o=n.style||{};return o.opacity??(n=M({},n),o=M({opacity:r?i:a.opacity*.1},o),n.style=o),n}function xu(e,t){var n=this.states[e];if(this.style){if(e===`emphasis`)return vu(this,e,t,n);if(e===`blur`)return bu(this,e,n);if(e===`select`)return yu(this,e,n)}return n}function Su(e){e.stateProxy=xu;var t=e.getTextContent(),n=e.getTextGuideLine();t&&(t.stateProxy=xu),n&&(n.stateProxy=xu)}function Cu(e,t){!ju(e,t)&&!e.__highByOuter&&hu(e,cu)}function wu(e,t){!ju(e,t)&&!e.__highByOuter&&hu(e,lu)}function Tu(e,t){e.__highByOuter|=1<<(t||0),hu(e,cu)}function Eu(e,t){!(e.__highByOuter&=~(1<<(t||0)))&&hu(e,lu)}function Du(e){hu(e,uu)}function Ou(e){hu(e,du)}function ku(e){hu(e,fu)}function Au(e){hu(e,pu)}function ju(e,t){return e.__highDownSilentOnTouch&&t.zrByTouch}function Mu(e){var t=e.getModel(),n=[],r=[];t.eachComponent(function(t,i){var a=Zl(i),o=t===`series`,s=o?e.getViewOfSeriesModel(i):e.getViewOfComponentModel(i);!o&&r.push(s),a.isBlured&&(s.group.traverse(function(e){du(e)}),o&&n.push(i)),a.isBlured=!1}),L(r,function(e){e&&e.toggleBlurSeries&&e.toggleBlurSeries(n,!1,t)})}function Nu(e,t,n,r){var i=r.getModel();n||=`coordinateSystem`;function a(e,t){for(var n=0;n0){var a={dataIndex:i,seriesIndex:e.seriesIndex};r!=null&&(a.dataType=r),t.push(a)}})}),t}function Hu(e,t,n){Yu(e,!0),hu(e,Su),Gu(e,t,n)}function Uu(e){Yu(e,!1)}function Wu(e,t,n,r){r?Uu(e):Hu(e,t,n)}function Gu(e,t,n){var r=Z(e);t==null?r.focus&&=null:(r.focus=t,r.blurScope=n)}var Ku=[`emphasis`,`blur`,`select`],qu={itemStyle:`getItemStyle`,lineStyle:`getLineStyle`,areaStyle:`getAreaStyle`};function Ju(e,t,n,r){n||=`itemStyle`;for(var i=0;i1&&(o*=od(m),s*=od(m));var h=(i===a?-1:1)*od((o*o*(s*s)-o*o*(p*p)-s*s*(f*f))/(o*o*(p*p)+s*s*(f*f)))||0,g=h*o*p/s,_=h*-s*f/o,v=(e+n)/2+cd(d)*g-sd(d)*_,y=(t+r)/2+sd(d)*g+cd(d)*_,b=fd([1,0],[(f-g)/o,(p-_)/s]),x=[(f-g)/o,(p-_)/s],S=[(-1*f-g)/o,(-1*p-_)/s],C=fd(x,S);if(dd(x,S)<=-1&&(C=ld),dd(x,S)>=1&&(C=0),C<0){var w=Math.round(C/ld*1e6)/1e6;C=ld*2+w%2*ld}u.addData(l,v,y,o,s,b,C,d,a)}var md=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,hd=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function gd(e){var t=new Uc;if(!e)return t;var n=0,r=0,i=n,a=r,o,s=Uc.CMD,c=e.match(md);if(!c)return t;for(var l=0;lA*A+j*j&&(w=E,T=D),{cx:w,cy:T,x0:-u,y0:-d,x1:w*(i/x-1),y1:T*(i/x-1)}}function Bd(e){var t;if(H(e)){var n=e.length;if(!n)return e;t=n===1?[e[0],e[0],0,0]:n===2?[e[0],e[0],e[1],e[1]]:n===3?e.concat(e[2]):e}else t=[e,e,e,e];return t}function Vd(e,t){var n,r=Fd(t.r,0),i=Fd(t.r0||0,0),a=r>0;if(!(!a&&!(i>0))){if(a||(r=i,i=0),i>r){var o=r;r=i,i=o}var s=t.startAngle,c=t.endAngle;if(!(isNaN(s)||isNaN(c))){var l=t.cx,u=t.cy,d=!!t.clockwise,f=Nd(c-s),p=f>Od&&f%Od;if(p>Ld&&(f=p),!(r>Ld))e.moveTo(l,u);else if(f>Od-Ld)e.moveTo(l+r*Ad(s),u+r*kd(s)),e.arc(l,u,r,s,c,!d),i>Ld&&(e.moveTo(l+i*Ad(c),u+i*kd(c)),e.arc(l,u,i,c,s,d));else{var m=void 0,h=void 0,g=void 0,_=void 0,v=void 0,y=void 0,b=void 0,x=void 0,S=void 0,C=void 0,w=void 0,T=void 0,E=void 0,D=void 0,O=void 0,k=void 0,A=r*Ad(s),j=r*kd(s),M=i*Ad(c),N=i*kd(c),P=f>Ld;if(P){var F=t.cornerRadius;F&&(n=Bd(F),m=n[0],h=n[1],g=n[2],_=n[3]);var ee=Nd(r-i)/2;if(v=Id(ee,g),y=Id(ee,_),b=Id(ee,m),x=Id(ee,h),w=S=Fd(v,y),T=C=Fd(b,x),(S>Ld||C>Ld)&&(E=r*Ad(c),D=r*kd(c),O=i*Ad(s),k=i*kd(s),fLd){var z=Id(g,w),ae=Id(_,w),B=zd(O,k,A,j,r,z,d),V=zd(E,D,M,N,r,ae,d);e.moveTo(l+B.cx+B.x0,u+B.cy+B.y0),w0&&e.arc(l+B.cx,u+B.cy,z,Md(B.y0,B.x0),Md(B.y1,B.x1),!d),e.arc(l,u,r,Md(B.cy+B.y1,B.cx+B.x1),Md(V.cy+V.y1,V.cx+V.x1),!d),ae>0&&e.arc(l+V.cx,u+V.cy,ae,Md(V.y1,V.x1),Md(V.y0,V.x0),!d))}else e.moveTo(l+A,u+j),e.arc(l,u,r,s,c,!d);if(!(i>Ld)||!P)e.lineTo(l+M,u+N);else if(T>Ld){var z=Id(m,T),ae=Id(h,T),B=zd(M,N,E,D,i,-ae,d),V=zd(A,j,O,k,i,-z,d);e.lineTo(l+B.cx+B.x0,u+B.cy+B.y0),T0&&e.arc(l+B.cx,u+B.cy,ae,Md(B.y0,B.x0),Md(B.y1,B.x1),!d),e.arc(l,u,i,Md(B.cy+B.y1,B.cx+B.x1),Md(V.cy+V.y1,V.cx+V.x1),d),z>0&&e.arc(l+V.cx,u+V.cy,z,Md(V.y1,V.x1),Md(V.y0,V.x0),!d))}else e.lineTo(l+M,u+N),e.arc(l,u,i,c,s,d)}e.closePath()}}}var Hd=function(){function e(){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 e}(),Ud=function(e){Fe(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new Hd},t.prototype.buildPath=function(e,t){Vd(e,t)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t}(ml);Ud.prototype.type=`sector`;var Wd=function(){function e(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return e}(),Gd=function(e){Fe(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new Wd},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=Math.PI*2;e.moveTo(n+t.r,r),e.arc(n,r,t.r,0,i,!1),e.moveTo(n+t.r0,r),e.arc(n,r,t.r0,0,i,!0)},t}(ml);Gd.prototype.type=`ring`;function Kd(e,t,n,r){var i=[],a=[],o=[],s=[],c,l,u,d;if(r){u=[1/0,1/0],d=[-1/0,-1/0];for(var f=0,p=e.length;f=2){if(r){var a=Kd(i,r,n,t.smoothConstraint);e.moveTo(i[0][0],i[0][1]);for(var o=i.length,s=0;s<(n?o:o-1);s++){var c=a[s*2],l=a[s*2+1],u=i[(s+1)%o];e.bezierCurveTo(c[0],c[1],l[0],l[1],u[0],u[1])}}else{e.moveTo(i[0][0],i[0][1]);for(var s=1,d=i.length;sgf[1]){if(i=!1,_f.negativeSize||n)return i;var s=mf(gf[0]-hf[1]),c=mf(hf[0]-gf[1]);ff(s,c)>yf.len()&&(s=c||!_f.bidirectional)&&(Y.scale(vf,o,-c*r),_f.useDir&&_f.calcDirMTV()))}}return i},e.prototype._getProjMinMaxOnAxis=function(e,t,n){for(var r=this._axes[e],i=this._origin,a=t[0].dot(r)+i[e],o=a,s=a,c=1;c0){var d=u.duration,f=u.delay,p=u.easing,m={duration:d,delay:f||0,easing:p,done:a,force:!!a||!!o,setToFinal:!l,scope:e,during:o};s?t.animateFrom(n,m):t.animateTo(n,m)}else t.stopAnimation(),!s&&t.attr(n),o&&o(1),a&&a()}function Ef(e,t,n,r,i,a){Tf(`update`,e,t,n,r,i,a)}function Df(e,t,n,r,i,a){Tf(`enter`,e,t,n,r,i,a)}function Of(e){if(!e.__zr)return!0;for(var t=0;tsf,BezierCurve:()=>af,BoundingRect:()=>X,Circle:()=>wd,CompoundPath:()=>cf,Ellipse:()=>Ed,Group:()=>Aa,Image:()=>bl,IncrementalDisplayable:()=>Sf,Line:()=>ef,LinearGradient:()=>uf,OrientedBoundingRect:()=>bf,Path:()=>ml,Point:()=>Y,Polygon:()=>Yd,Polyline:()=>Zd,RadialGradient:()=>df,Rect:()=>Ol,Ring:()=>Gd,Sector:()=>Ud,Text:()=>Nl,WH:()=>If,XY:()=>Ff,applyTransform:()=>Zf,calcZ2Range:()=>bp,clipPointsByRect:()=>np,clipRectByRect:()=>rp,createIcon:()=>ip,ensureCopyRect:()=>_p,ensureCopyTransform:()=>vp,expandOrShrinkRect:()=>lp,extendPath:()=>zf,extendShape:()=>Lf,getShapeClass:()=>Vf,getTransform:()=>Xf,groupTransition:()=>tp,initProps:()=>Df,isBoundingRectAxisAligned:()=>hp,isElementRemoved:()=>Of,lineLineIntersect:()=>op,linePolygonIntersect:()=>ap,makeImage:()=>Uf,makePath:()=>Hf,mergePath:()=>Gf,registerShape:()=>Bf,removeElement:()=>kf,removeElementWithFadeOut:()=>jf,resizePath:()=>Kf,retrieveZInfo:()=>yp,setTooltipConfig:()=>fp,subPixelOptimize:()=>Yf,subPixelOptimizeLine:()=>qf,subPixelOptimizeRect:()=>Jf,transformDirection:()=>Qf,traverseElements:()=>mp,traverseUpdateZ:()=>xp,updateProps:()=>Ef}),Pf={},Ff=[`x`,`y`],If=[`width`,`height`];function Lf(e){return ml.extend(e)}var Rf=xd;function zf(e,t){return Rf(e,t)}function Bf(e,t){Pf[e]=t}function Vf(e){if(Pf.hasOwnProperty(e))return Pf[e]}function Hf(e,t,n,r){var i=bd(e,t);return n&&(r===`center`&&(n=Wf(n,i.getBoundingRect())),Kf(i,n)),i}function Uf(e,t,n){var r=new bl({style:{image:e,x:t.x,y:t.y,width:t.width,height:t.height},onload:function(e){if(n===`center`){var i={width:e.width,height:e.height};r.setStyle(Wf(t,i))}}});return r}function Wf(e,t){var n=t.width/t.height,r=e.height*n,i;r<=e.width?i=e.height:(r=e.width,i=r/n);var a=e.x+e.width/2,o=e.y+e.height/2;return{x:a-r/2,y:o-i/2,width:r,height:i}}var Gf=Sd;function Kf(e,t){if(e.applyTransform){var n=e.getBoundingRect().calculateTransform(t);e.applyTransform(n)}}function qf(e,t){return Cl(e,e,{lineWidth:t}),e}function Jf(e,t){return wl(e,e,t),e}var Yf=Tl;function Xf(e,t){for(var n=Ht([]);e&&e!==t;)Wt(n,e.getLocalTransform(),n),e=e.parent;return n}function Zf(e,t,n){return t&&!te(t)&&(t=$i.getLocalTransform(t)),n&&(t=Jt([],t)),at([],e,t)}function Qf(e,t,n){var r=t[4]===0||t[5]===0||t[0]===0?1:Za(2*t[4]/t[0]),i=t[4]===0||t[5]===0||t[2]===0?1:Za(2*t[4]/t[2]),a=[e===`left`?-r:e===`right`?r:0,e===`top`?-i:e===`bottom`?i:0];return a=Zf(a,t,n),Za(a[0])>Za(a[1])?a[0]>0?`right`:`left`:a[1]>0?`bottom`:`top`}function $f(e){return!e.isGroup}function ep(e){return e.shape!=null}function tp(e,t,n){if(!e||!t)return;function r(e){var t={};return e.traverse(function(e){$f(e)&&e.anid&&(t[e.anid]=e)}),t}function i(e){var t={x:e.x,y:e.y,rotation:e.rotation};return ep(e)&&(t.shape=k(e.shape)),t}var a=r(e);t.traverse(function(e){if($f(e)&&e.anid){var t=a[e.anid];if(t){var r=i(e);e.attr(i(t)),Ef(e,r,n,Z(e).dataIndex)}}})}function np(e,t){return R(e,function(e){var n=e[0];n=Xa(n,t.x),n=Ya(n,t.x+t.width);var r=e[1];return r=Xa(r,t.y),r=Ya(r,t.y+t.height),[n,r]})}function rp(e,t){var n=Xa(e.x,t.x),r=Ya(e.x+e.width,t.x+t.width),i=Xa(e.y,t.y),a=Ya(e.y+e.height,t.y+t.height);if(r>=n&&a>=i)return{x:n,y:i,width:r-n,height:a-i}}function ip(e,t,n){var r=M({rectHover:!0},t),i=r.style={strokeNoScale:!0};if(n||={x:-1,y:-1,width:2,height:2},e)return e.indexOf(`image://`)===0?(i.image=e.slice(8),N(i,n),new bl(r)):Hf(e.replace(`path://`,``),r,n,`center`)}function ap(e,t,n,r,i){for(var a=0,o=i[i.length-1];a1)return!1;var g=sp(p,m,u,d)/f;return!(g<0||g>1)}function sp(e,t,n,r){return e*r-n*t}function cp(e){return e<=1e-6&&e>=-1e-6}function lp(e,t,n,r,i){return t==null?e:(G(t)?up[0]=up[1]=up[2]=up[3]=t:(up[0]=t[0],up[1]=t[1],up[2]=t[2],up[3]=t[3]),r&&(up[0]=Xa(0,up[0]),up[1]=Xa(0,up[1]),up[2]=Xa(0,up[2]),up[3]=Xa(0,up[3])),n&&(up[0]=-up[0],up[1]=-up[1],up[2]=-up[2],up[3]=-up[3]),dp(e,up,`x`,`width`,3,1,i&&i[0]||0),dp(e,up,`y`,`height`,0,2,i&&i[1]||0),e)}var up=[0,0,0,0];function dp(e,t,n,r,i,a,o){var s=t[a]+t[i],c=e[r];e[r]+=s,o=Xa(0,Ya(o,c)),e[r]=0?-t[i]:t[a]>=0?c+t[a]:Za(s)>1e-8?(c-o)*t[i]/s:0):e[n]-=t[i]}function fp(e){var t=e.itemTooltipOption,n=e.componentModel,r=e.itemName,i=W(t)?{formatter:t}:t,a=n.mainType,o=n.componentIndex,s={componentType:a,name:r,$vars:[`name`]};s[a+`Index`]=o;var c=e.formatterParamsExtra;c&&L(z(c),function(e){Ae(s,e)||(s[e]=c[e],s.$vars.push(e))});var l=Z(e.el);l.componentMainType=a,l.componentIndex=o,l.tooltipConfig={name:r,option:N({content:r,encodeHTMLContent:!0,formatterParams:s},i)}}function pp(e,t){var n;e.isGroup&&(n=t(e)),n||e.traverse(t)}function mp(e,t){if(e)if(H(e))for(var n=0;nt&&(t=r),rt&&(n=t=0),{min:n,max:t}}function xp(e,t,n){Sp(e,t,n,-1/0)}function Sp(e,t,n,r){if(e.ignoreModelZ)return r;var i=e.getTextContent(),a=e.getTextGuideLine();if(e.isGroup)for(var o=e.childrenRef(),s=0;s=0&&n.push(e)}),n}}function tm(e,t){return A(A({},e,!0),t,!0)}var nm={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:`. `}}}},rm={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:``}}}},im=`ZH`,am=`EN`,om=am,sm={},cm={},lm=i.domSupported?function(){return(document.documentElement.lang||navigator.language||navigator.browserLanguage||om).toUpperCase().indexOf(im)>-1?im:om}():om;function um(e,t){e=e.toUpperCase(),cm[e]=new Xp(t),sm[e]=t}function dm(e){if(W(e)){var t=sm[e.toUpperCase()]||{};return e===im||e===am?k(t):A(k(t),k(sm[om]),!1)}else return A(k(e),k(sm[om]),!1)}function fm(e){return cm[e]}function pm(){return cm[om]}um(am,nm),um(im,rm);var mm=null;function hm(){return mm}var gm=1e3,_m=gm*60,vm=_m*60,ym=vm*24,bm=ym*365,xm={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})/},Sm={year:`{yyyy}`,month:`{MMM}`,day:`{d}`,hour:`{HH}:{mm}`,minute:`{HH}:{mm}`,second:`{HH}:{mm}:{ss}`,millisecond:`{HH}:{mm}:{ss} {SSS}`},Cm=`{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}`,wm=`{yyyy}-{MM}-{dd}`,Tm={year:`{yyyy}`,month:`{yyyy}-{MM}`,day:wm,hour:wm+` `+Sm.hour,minute:wm+` `+Sm.minute,second:wm+` `+Sm.second,millisecond:Cm},Em=[`year`,`month`,`day`,`hour`,`minute`,`second`,`millisecond`],Dm=[`year`,`half-year`,`quarter`,`month`,`week`,`half-week`,`day`,`half-day`,`quarter-day`,`hour`,`minute`,`second`,`millisecond`];function Om(e){return!W(e)&&!U(e)?km(e):e}function km(e){e||={};var t={},n=!0;return L(Em,function(t){n&&=e[t]==null}),L(Em,function(r,i){var a=e[r];t[r]={};for(var o=null,s=i;s>=0;s--){var c=Em[s],l=K(a)&&!H(a)?a[c]:a,u=void 0;H(l)?(u=l.slice(),o=u[0]||``):W(l)?(o=l,u=[o]):(o==null?o=Sm[r]:xm[c].test(o)||(o=t[c][c][0]+` `+o),u=[o],n&&(u[1]=`{primary|`+o+`}`)),t[r][c]=u}}),t}function Am(e,t){return e+=``,`0000`.substr(0,t-e.length)+e}function jm(e){switch(e){case`half-year`:case`quarter`:return`month`;case`week`:case`half-week`:return`day`;case`half-day`:case`quarter-day`:return`hour`;default:return e}}function Mm(e){return e===jm(e)}function Nm(e){switch(e){case`year`:case`month`:return`day`;case`millisecond`:return`millisecond`;default:return`second`}}function Pm(e,t,n,r){var i=ho(e),a=i[Rm(n)](),o=i[zm(n)]()+1,s=Math.floor((o-1)/3)+1,c=i[Bm(n)](),l=i[`get`+(n?`UTC`:``)+`Day`](),u=i[Vm(n)](),d=(u-1)%12+1,f=i[Hm(n)](),p=i[Um(n)](),m=i[Wm(n)](),h=u>=12?`pm`:`am`,g=h.toUpperCase(),_=(r instanceof Xp?r:fm(r||lm)||pm()).getModel(`time`),v=_.get(`month`),y=_.get(`monthAbbr`),b=_.get(`dayOfWeek`),x=_.get(`dayOfWeekAbbr`);return(t||``).replace(/{a}/g,h+``).replace(/{A}/g,g+``).replace(/{yyyy}/g,a+``).replace(/{yy}/g,Am(a%100+``,2)).replace(/{Q}/g,s+``).replace(/{MMMM}/g,v[o-1]).replace(/{MMM}/g,y[o-1]).replace(/{MM}/g,Am(o,2)).replace(/{M}/g,o+``).replace(/{dd}/g,Am(c,2)).replace(/{d}/g,c+``).replace(/{eeee}/g,b[l]).replace(/{ee}/g,x[l]).replace(/{e}/g,l+``).replace(/{HH}/g,Am(u,2)).replace(/{H}/g,u+``).replace(/{hh}/g,Am(d+``,2)).replace(/{h}/g,d+``).replace(/{mm}/g,Am(f,2)).replace(/{m}/g,f+``).replace(/{ss}/g,Am(p,2)).replace(/{s}/g,p+``).replace(/{SSS}/g,Am(m,3)).replace(/{S}/g,m+``)}function Fm(e,t,n,r,i){var a=null;if(W(n))a=n;else if(U(n)){var o={time:e.time,level:e.time.level},s=hm();s&&s.makeAxisLabelFormatterParamBreak(o,e.break),a=n(e.value,t,o)}else{var c=e.time;if(c){var l=n[c.lowerTimeUnit][c.upperTimeUnit];a=l[Math.min(c.level,l.length-1)]||``}else{var u=Im(e.value,i);a=n[u][u][0]}}return Pm(new Date(e.value),a,i,r)}function Im(e,t){var n=ho(e),r=n[zm(t)]()+1,i=n[Bm(t)](),a=n[Vm(t)](),o=n[Hm(t)](),s=n[Um(t)](),c=n[Wm(t)]()===0,l=c&&s===0,u=l&&o===0,d=u&&a===0,f=d&&i===1;return f&&r===1?`year`:f?`month`:d?`day`:u?`hour`:l?`minute`:c?`second`:`millisecond`}function Lm(e,t,n){switch(t){case`year`:e[Km(n)](0);case`month`:e[qm(n)](1);case`day`:e[Jm(n)](0);case`hour`:e[Ym(n)](0);case`minute`:e[Xm(n)](0);case`second`:e[Zm(n)](0)}return e}function Rm(e){return e?`getUTCFullYear`:`getFullYear`}function zm(e){return e?`getUTCMonth`:`getMonth`}function Bm(e){return e?`getUTCDate`:`getDate`}function Vm(e){return e?`getUTCHours`:`getHours`}function Hm(e){return e?`getUTCMinutes`:`getMinutes`}function Um(e){return e?`getUTCSeconds`:`getSeconds`}function Wm(e){return e?`getUTCMilliseconds`:`getMilliseconds`}function Gm(e){return e?`setUTCFullYear`:`setFullYear`}function Km(e){return e?`setUTCMonth`:`setMonth`}function qm(e){return e?`setUTCDate`:`setDate`}function Jm(e){return e?`setUTCHours`:`setHours`}function Ym(e){return e?`setUTCMinutes`:`setMinutes`}function Xm(e){return e?`setUTCSeconds`:`setSeconds`}function Zm(e){return e?`setUTCMilliseconds`:`setMilliseconds`}function Qm(e,t,n,r,i,a,o,s){return new Nl({style:{text:e,font:t,align:n,verticalAlign:r,padding:i,rich:a,overflow:o?`truncate`:null,lineHeight:s}}).getBoundingRect()}function $m(e){if(!So(e))return W(e)?e:`-`;var t=(e+``).split(`.`);return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,`$1,`)+(t.length>1?`.`+t[1]:``)}function eh(e,t){return e=(e||``).toLowerCase().replace(/-(.)/g,function(e,t){return t.toUpperCase()}),t&&e&&(e=e.charAt(0).toUpperCase()+e.slice(1)),e}var th=_e;function nh(e,t,n){var r=`{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}`;function i(e){return e&&ye(e)?e:`-`}function a(e){return!!(e!=null&&!isNaN(e)&&isFinite(e))}var o=t===`time`,s=e instanceof Date;if(o||s){var c=o?ho(e):e;if(!isNaN(+c))return Pm(c,r,n);if(s)return`-`}if(t===`ordinal`)return oe(e)?i(e):G(e)&&a(e)?e+``:`-`;var l=xo(e);return a(l)?$m(l):oe(e)?i(e):typeof e==`boolean`?e+``:`-`}var rh=[`a`,`b`,`c`,`d`,`e`,`f`,`g`],ih=function(e,t){return`{`+e+(t??``)+`}`};function ah(e,t,n){H(t)||(t=[t]);var r=t.length;if(!r)return``;for(var i=t[0].$vars||[],a=0;a`:``:{renderMode:a,content:`{`+(n.markerId||`markerX`)+`|} `,style:i===`subItem`?{width:4,height:4,borderRadius:2,backgroundColor:r}:{width:10,height:10,borderRadius:5,backgroundColor:r}}:``}function sh(e,t,n){(e===`week`||e===`month`||e===`quarter`||e===`half-year`||e===`year`)&&(e=`MM-dd yyyy`);var r=ho(t),i=n?`getUTC`:`get`,a=r[i+`FullYear`](),o=r[i+`Month`]()+1,s=r[i+`Date`](),c=r[i+`Hours`](),l=r[i+`Minutes`](),u=r[i+`Seconds`](),d=r[i+`Milliseconds`]();return e=e.replace(`MM`,Am(o,2)).replace(`M`,o).replace(`yyyy`,a).replace(`yy`,Am(a%100+``,2)).replace(`dd`,Am(s,2)).replace(`d`,s).replace(`hh`,Am(c,2)).replace(`h`,c).replace(`mm`,Am(l,2)).replace(`m`,l).replace(`ss`,Am(u,2)).replace(`s`,u).replace(`SSS`,Am(d,3)),e}function ch(e){return e&&e.charAt(0).toUpperCase()+e.substr(1)}function lh(e,t){return t||=`transparent`,W(e)?e:K(e)&&e.colorStops&&(e.colorStops[0]||{}).color||t}function uh(e,t){if(t===`_blank`||t===`blank`){var n=window.open();n.opener=null,n.location.href=e}else window.open(e,t)}var dh={},fh={},ph=function(){function e(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return e.prototype.create=function(e,t){this._nonSeriesBoxMasterList=n(dh,!0),this._normalMasterList=n(fh,!1);function n(n,r){var i=[];return L(n,function(n,r){var a=n.create(e,t);i=i.concat(a||[])}),i}},e.prototype.update=function(e,t){L(this._normalMasterList,function(n){n.update&&n.update(e,t)})},e.prototype.getCoordinateSystems=function(){return this._normalMasterList.concat(this._nonSeriesBoxMasterList)},e.register=function(e,t){if(e===`matrix`||e===`calendar`){dh[e]=t;return}fh[e]=t},e.get=function(e){return fh[e]||dh[e]},e}();function mh(e){return!!dh[e]}var hh={coord:1,coord2:2};function gh(e){_h.set(e.fullType,{getCoord2:void 0}).getCoord2=e.getCoord2}var _h=J();function vh(e){var t=e.getShallow(`coord`,!0),n=hh.coord;if(t==null){var r=_h.get(e.type);r&&r.getCoord2&&(n=hh.coord2,t=r.getCoord2(e))}return{coord:t,from:n}}var yh={none:0,dataCoordSys:1,boxCoordSys:2};function bh(e,t){var n=e.getShallow(`coordinateSystem`),r=e.getShallow(`coordinateSystemUsage`,!0),i=yh.none;if(n){var a=e.mainType===`series`;r??=a?`data`:`box`,r===`data`?(i=yh.dataCoordSys,a||(i=yh.none)):r===`box`&&(i=yh.boxCoordSys,!a&&!mh(n)&&(i=yh.none))}return{coordSysType:n,kind:i}}function xh(e){var t=e.targetModel,n=e.coordSysType,r=e.coordSysProvider,i=e.isDefaultDataCoordSys;e.allowNotFound;var a=bh(t,!0),o=a.kind,s=a.coordSysType;if(i&&o!==yh.dataCoordSys&&(o=yh.dataCoordSys,s=n),o===yh.none||s!==n)return!1;var c=r(n,t);return c?(o===yh.dataCoordSys?t.coordinateSystem=c:t.boxCoordinateSystem=c,!0):!1}var Sh=L,Ch=[`left`,`right`,`top`,`bottom`,`width`,`height`],wh=[[`width`,`left`,`right`],[`height`,`top`,`bottom`]];function Th(e,t,n,r,i){var a=0,o=0;r??=1/0,i??=1/0;var s=0;t.eachChild(function(c,l){var u=c.getBoundingRect(),d=t.childAt(l+1),f=d&&d.getBoundingRect(),p,m;if(e===`horizontal`){var h=u.width+(f?-f.x+u.x:0);p=a+h,p>r||c.newline?(a=0,p=h,o+=s+n,s=u.height):s=Math.max(s,u.height)}else{var g=u.height+(f?-f.y+u.y:0);m=o+g,m>i||c.newline?(a+=s+n,o=0,m=g,s=u.width):s=Math.max(s,u.width)}c.newline||(c.x=a,c.y=o,c.markRedraw(),e===`horizontal`?a=p+n:o=m+n)})}var Eh=Th;V(Th,`vertical`),V(Th,`horizontal`);function Dh(e,t){return{left:e.getShallow(`left`,t),top:e.getShallow(`top`,t),right:e.getShallow(`right`,t),bottom:e.getShallow(`bottom`,t),width:e.getShallow(`width`,t),height:e.getShallow(`height`,t)}}function Oh(e,t){var n=Mh(e,t,{enableLayoutOnlyByCenter:!0}),r=e.getBoxLayoutParams(),i,a;if(n.type===jh.point)a=n.refPoint,i=Ah(r,{width:t.getWidth(),height:t.getHeight()});else{var o=e.get(`center`),s=H(o)?o:[o,o];i=Ah(r,n.refContainer),a=n.boxCoordFrom===hh.coord2?n.refPoint:[$a(s[0],i.width)+i.x,$a(s[1],i.height)+i.y]}return{viewRect:i,center:a}}function kh(e,t){var n=Oh(e,t),r=n.viewRect,i=n.center,a=e.get(`radius`);H(a)||(a=[0,a]);var o=$a(r.width,t.getWidth()),s=$a(r.height,t.getHeight()),c=Math.min(o,s),l=$a(a[0],c/2),u=$a(a[1],c/2);return{cx:i[0],cy:i[1],r0:l,r:u,viewRect:r}}function Ah(e,t,n){n=th(n||0);var r=t.width,i=t.height,a=$a(e.left,r),o=$a(e.top,i),s=$a(e.right,r),c=$a(e.bottom,i),l=$a(e.width,r),u=$a(e.height,i),d=n[2]+n[0],f=n[1]+n[3],p=e.aspect;switch(isNaN(l)&&(l=r-s-f-a),isNaN(u)&&(u=i-c-d-o),p!=null&&(isNaN(l)&&isNaN(u)&&(p>r/i?l=r*.8:u=i*.8),isNaN(l)&&(l=p*u),isNaN(u)&&(u=l/p)),isNaN(a)&&(a=r-s-l-f),isNaN(o)&&(o=i-c-u-d),e.left||e.right){case`center`:a=r/2-l/2-n[3];break;case`right`:a=r-l-f;break}switch(e.top||e.bottom){case`middle`:case`center`:o=i/2-u/2-n[0];break;case`bottom`:o=i-u-d;break}a||=0,o||=0,isNaN(l)&&(l=r-f-a-(s||0)),isNaN(u)&&(u=i-d-o-(c||0));var m=new X((t.x||0)+a+n[3],(t.y||0)+o+n[0],l,u);return m.margin=n,m}var jh={rect:1,point:2};function Mh(e,t,n){var r,i,a,o=e.boxCoordinateSystem,s;if(o){var c=vh(e),l=c.coord,u=c.from;if(o.dataToLayout){a=jh.rect,s=u;var d=o.dataToLayout(l);r=d.contentRect||d.rect}else n&&n.enableLayoutOnlyByCenter&&o.dataToPoint&&(a=jh.point,s=u,i=o.dataToPoint(l))}return a??=jh.rect,a===jh.rect&&(r||={x:0,y:0,width:t.getWidth(),height:t.getHeight()},i=[r.x+r.width/2,r.y+r.height/2]),{type:a,refContainer:r,refPoint:i,boxCoordFrom:s}}function Nh(e){var t=e.layoutMode||e.constructor.layoutMode;return K(t)?t:t?{type:t}:null}function Ph(e,t,n){var r=n&&n.ignoreSize;!H(r)&&(r=[r,r]);var i=o(wh[0],0),a=o(wh[1],1);c(wh[0],e,i),c(wh[1],e,a);function o(n,i){var a={},o=0,c={},l=0,u=2;if(Sh(n,function(t){c[t]=e[t]}),Sh(n,function(e){Ae(t,e)&&(a[e]=c[e]=t[e]),s(a,e)&&o++,s(c,e)&&l++}),r[i])return s(t,n[1])?c[n[2]]=null:s(t,n[2])&&(c[n[1]]=null),c;if(l===u||!o)return c;if(o>=u)return a;for(var d=0;d=0;o--)a=A(a,n[o],!0);t.defaultOption=a}return t.defaultOption},t.prototype.getReferringComponents=function(e,t){var n=e+`Index`,r=e+`Id`;return os(this.ecModel,e,{index:this.get(n,!0),id:this.get(r,!0)},t)},t.prototype.getBoxLayoutParams=function(){return Dh(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}(Xp);ys(Rh,Xp),ws(Rh),$p(Rh),em(Rh,zh);function zh(e){var t=[];return L(Rh.getClassesByMainType(e),function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])}),t=R(t,function(e){return ms(e).main}),e!==`dataset`&&F(t,`dataset`)<=0&&t.unshift(`dataset`),t}var Q={color:{},darkColor:{},size:{}},Bh=Q.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)`};for(var Vh in M(Bh,{primary:Bh.neutral80,secondary:Bh.neutral70,tertiary:Bh.neutral60,quaternary:Bh.neutral50,disabled:Bh.neutral20,border:Bh.neutral30,borderTint:Bh.neutral20,borderShade:Bh.neutral40,background:Bh.neutral05,backgroundTint:`rgba(234,237,245,0.5)`,backgroundTransparent:`rgba(255,255,255,0)`,backgroundShade:Bh.neutral10,shadow:`rgba(0,0,0,0.2)`,shadowTint:`rgba(129,130,136,0.2)`,axisLine:Bh.neutral70,axisLineTint:Bh.neutral40,axisTick:Bh.neutral70,axisTickMinor:Bh.neutral60,axisLabel:Bh.neutral70,axisSplitLine:Bh.neutral15,axisMinorSplitLine:Bh.neutral05}),Bh)if(Bh.hasOwnProperty(Vh)){var Hh=Bh[Vh];Vh===`theme`?Q.darkColor.theme=Bh.theme.slice():Vh===`highlight`?Q.darkColor.highlight=`rgba(255,231,130,0.4)`:Vh.indexOf(`accent`)===0?Q.darkColor[Vh]=Vr(Hh,null,function(e){return e*.5},function(e){return Math.min(1,1.3-e)}):Q.darkColor[Vh]=Vr(Hh,null,function(e){return e*.9},function(e){return 1-e**1.5})}Q.size={xxs:2,xs:5,s:10,m:15,l:20,xl:30,xxl:40,xxxl:50};var Uh=``;typeof navigator<`u`&&(Uh=navigator.platform||``);var Wh=`rgba(0, 0, 0, 0.2)`,Gh=Q.color.theme[0],Kh=Vr(Gh,null,null,.9),qh={darkMode:`auto`,colorBy:`series`,color:Q.color.theme,gradientColor:[Kh,Gh],aria:{decal:{decals:[{color:Wh,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:Wh,symbol:`circle`,dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:Wh,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:Wh,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:Wh,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:Wh,symbol:`triangle`,dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:Uh.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},Jh=J([`tooltip`,`label`,`itemName`,`itemId`,`itemGroupId`,`itemChildGroupId`,`seriesName`]),Yh=`original`,Xh=`arrayRows`,Zh=`objectRows`,Qh=`keyedColumns`,$h=`typedArray`,eg=`unknown`,tg=`column`,ng={Must:1,Might:2,Not:3},rg=ts();function ig(e){rg(e).datasetMap=J()}function ag(e,t,n){var r={},i=sg(t);if(!i||!e)return r;var a=[],o=[],s=t.ecModel,c=rg(s).datasetMap,l=i.uid+`_`+n.seriesLayoutBy,u,d;e=e.slice(),L(e,function(t,n){var i=K(t)?t:e[n]={name:t};i.type===`ordinal`&&u==null&&(u=n,d=m(i)),r[i.name]=[]});var f=c.get(l)||c.set(l,{categoryWayDim:d,valueWayDim:0});L(e,function(e,t){var n=e.name,i=m(e);if(u==null){var s=f.valueWayDim;p(r[n],s,i),p(o,s,i),f.valueWayDim+=i}else if(u===t)p(r[n],0,i),p(a,0,i);else{var s=f.categoryWayDim;p(r[n],s,i),p(o,s,i),f.categoryWayDim+=i}});function p(e,t,n){for(var r=0;rt)return e[r];return e[n-1]}function gg(e,t,n,r,i,a,o){a||=e;var s=t(a),c=s.paletteIdx||0,l=s.paletteNameMap=s.paletteNameMap||{};if(l.hasOwnProperty(i))return l[i];var u=o==null||!r?n:hg(r,o);if(u||=n,!(!u||!u.length)){var d=u[c];return i&&(l[i]=d),s.paletteIdx=(c+1)%u.length,d}}function _g(e,t){t(e).paletteIdx=0,t(e).paletteNameMap={}}var vg,yg,bg,xg=`\0_ec_inner`,Sg=1,Cg=function(e){n(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(e,t,n,r,i,a){r||={},this.option=null,this._theme=new Xp(r),this._locale=new Xp(i),this._optionManager=a},t.prototype.setOption=function(e,t,n){var r=Og(t);this._optionManager.setOption(e,n,r),this._resetOption(null,r)},t.prototype.resetOption=function(e,t){return this._resetOption(e,Og(t))},t.prototype._resetOption=function(e,t){var n=!1,r=this._optionManager;if(!e||e===`recreate`){var i=r.mountOption(e===`recreate`);!this.option||e===`recreate`?bg(this,i):(this.restoreData(),this._mergeOption(i,t)),n=!0}if((e===`timeline`||e===`media`)&&this.restoreData(),!e||e===`recreate`||e===`timeline`){var a=r.getTimelineOption(this);a&&(n=!0,this._mergeOption(a,t))}if(!e||e===`recreate`||e===`media`){var o=r.getMediaOption(this);o.length&&L(o,function(e){n=!0,this._mergeOption(e,t)},this)}return n},t.prototype.mergeOption=function(e){this._mergeOption(e,null)},t.prototype._mergeOption=function(e,t){var n=this.option,r=this._componentsMap,i=this._componentsCount,a=[],o=J(),s=t&&t.replaceMergeMainTypeMap;ig(this),L(e,function(e,t){e!=null&&(Rh.hasClass(t)?t&&(a.push(t),o.set(t,!0)):n[t]=n[t]==null?k(e):A(n[t],e,!0))}),s&&s.each(function(e,t){Rh.hasClass(t)&&!o.get(t)&&(a.push(t),o.set(t,!0))}),Rh.topologicalTravel(a,Rh.getAllClassMainTypes(),c,this);function c(t){var a=fg(this,t,Fo(e[t])),o=r.get(t),c=Bo(o,a,o?s&&s.get(t)?`replaceMerge`:`normalMerge`:`replaceAll`);Qo(c,t,Rh),n[t]=null,r.set(t,null),i.set(t,0);var l=[],u=[],d=0,f;L(c,function(e,n){var r=e.existing,i=e.newOption;if(!i)r&&(r.mergeOption({},this),r.optionUpdated({},!1));else{var a=t===`series`,o=Rh.getClass(t,e.keyInfo.subType,!a);if(!o)return;if(t===`tooltip`){if(f)return;f=!0}if(r&&r.constructor===o)r.name=e.keyInfo.name,r.mergeOption(i,this),r.optionUpdated(i,!1);else{var s=M({componentIndex:n},e.keyInfo);r=new o(i,this,this,s),M(r,s),e.brandNew&&(r.__requireNewView=!0),r.init(i,this,this),r.optionUpdated(null,!0)}}r?(l.push(r.option),u.push(r),d++):(l.push(void 0),u.push(void 0))},this),n[t]=l,r.set(t,u),i.set(t,d),t===`series`&&vg(this)}this._seriesIndices||vg(this)},t.prototype.getOption=function(){var e=k(this.option);return L(e,function(t,n){if(Rh.hasClass(n)){for(var r=Fo(t),i=r.length,a=!1,o=i-1;o>=0;o--)r[o]&&!Zo(r[o])?a=!0:(r[o]=null,!a&&i--);r.length=i,e[n]=r}}),delete e[xg],e},t.prototype.setTheme=function(e){this._theme=new Xp(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,t){var n=this._componentsMap.get(e);if(n){var r=n[t||0];if(r)return r;if(t==null){for(var i=0;i=t:n===`max`?e<=t:e===t}function Ig(e,t){return e.join(`,`)===t.join(`,`)}var Lg=L,Rg=K,zg=[`areaStyle`,`lineStyle`,`nodeStyle`,`linkStyle`,`chordStyle`,`label`,`labelLine`];function Bg(e){var t=e&&e.itemStyle;if(t)for(var n=0,r=zg.length;n0?e[n-1].seriesModel:null)}),c_(e))})}function c_(e){L(e,function(t,n){var r=[],i=[NaN,NaN],a=[t.stackResultDimension,t.stackedOverDimension],o=t.data,s=t.isStackedByIndex,c=t.seriesModel.get(`stackStrategy`)||`samesign`;o.modify(a,function(a,l,u){var d=o.get(t.stackedDimension,u);if(isNaN(d))return i;var f,p;s?p=o.getRawIndex(u):f=o.get(t.stackedByDimension,u);for(var m=NaN,h=n-1;h>=0;h--){var g=e[h];if(s||(p=g.data.rawIndexOf(g.stackedByDimension,f)),p>=0){var _=g.data.getByRawIndex(g.stackResultDimension,p);if(c===`all`||c===`positive`&&_>0||c===`negative`&&_<0||c===`samesign`&&d>=0&&_>0||c===`samesign`&&d<=0&&_<0){d=lo(d,_),m=_;break}}}return r[0]=d,r[1]=m,r})})}var l_=function(){function e(e){this.data=e.data||(e.sourceFormat===`keyedColumns`?{}:[]),this.sourceFormat=e.sourceFormat||`unknown`,this.seriesLayoutBy=e.seriesLayoutBy||`column`,this.startIndex=e.startIndex||0,this.dimensionsDetectedCount=e.dimensionsDetectedCount,this.metaRawOption=e.metaRawOption;var t=this.dimensionsDefine=e.dimensionsDefine;if(t)for(var n=0;nl&&(l=p)}s[0]=c,s[1]=l}},r=function(){return this._data?this._data.length/this._dimSize:0};w_=(e={},e[Xh+`_`+tg]={pure:!0,appendData:i},e[Xh+`_row`]={pure:!0,appendData:function(){throw Error(`Do not support appendData when set seriesLayoutBy: "row".`)}},e[Zh]={pure:!0,appendData:i},e[Qh]={pure:!0,appendData:function(e){var t=this._data;L(e,function(e,n){for(var r=t[n]||(t[n]=[]),i=0;i<(e||[]).length;i++)r.push(e[i])})}},e[Yh]={appendData:i},e[$h]={persistent:!1,pure:!0,appendData:function(e){this._data=e},clean:function(){this._offset+=this.count(),this._data=null}},e);function i(e){for(var t=0;t=0&&(s=a.interpolatedValue[c])}return s==null?``:s+``})},e.prototype.getRawValue=function(e,t){return R_(this.getData(t),e)},e.prototype.formatTooltip=function(e,t,n){},e}();function V_(e){var t,n;return K(e)?e.type&&(n=e):t=e,{text:t,frag:n}}function H_(e){return new U_(e)}var U_=function(){function e(e){e||={},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return e.prototype.perform=function(e){var t=this._upstream,n=e&&e.skip;if(this._dirty&&t){var r=this.context;r.data=r.outputData=t.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var i;this._plan&&!n&&(i=this._plan(this.context));var a=l(this._modBy),o=this._modDataCount||0,s=l(e&&e.modBy),c=e&&e.modDataCount||0;(a!==s||o!==c)&&(i=`reset`);function l(e){return!(e>=1)&&(e=1),e}var u;(this._dirty||i===`reset`)&&(this._dirty=!1,u=this._doReset(n)),this._modBy=s,this._modDataCount=c;var d=e&&e.step;if(t?this._dueEnd=t._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var f=this._dueIndex,p=Math.min(d==null?1/0:this._dueIndex+d,this._dueEnd);if(!n&&(u||f1&&r>0?s:o}};return a;function o(){return t=e?null:at},gte:function(e,t){return e>=t}};(function(){function e(e,t){G(t)||jo(``),this._opFn=K_[e],this._rvalFloat=xo(t)}return e.prototype.evaluate=function(e){return G(e)?this._opFn(e,this._rvalFloat):this._opFn(xo(e),this._rvalFloat)},e})();var q_=function(){function e(e,t){var n=e===`desc`;this._resultLT=n?1:-1,t??=n?`min`:`max`,this._incomparable=t===`min`?-1/0:1/0}return e.prototype.evaluate=function(e,t){var n=G(e)?e:xo(e),r=G(t)?t:xo(t),i=isNaN(n),a=isNaN(r);if(i&&(n=this._incomparable),a&&(r=this._incomparable),i&&a){var o=W(e),s=W(t);o&&(n=s?e:0),s&&(r=o?t:0)}return nr?-this._resultLT:0},e}();(function(){function e(e,t){this._rval=t,this._isEQ=e,this._rvalTypeof=typeof t,this._rvalFloat=xo(t)}return e.prototype.evaluate=function(e){var t=e===this._rval;if(!t){var n=typeof e;n!==this._rvalTypeof&&(n===`number`||this._rvalTypeof===`number`)&&(t=xo(e)===this._rvalFloat)}return this._isEQ?t:!t},e})();var J_=function(){function e(){}return e.prototype.getRawData=function(){throw Error(`not supported`)},e.prototype.getRawDataItem=function(e){throw Error(`not supported`)},e.prototype.cloneRawData=function(){},e.prototype.getDimensionInfo=function(e){},e.prototype.cloneAllDimensionInfo=function(){},e.prototype.count=function(){},e.prototype.retrieveValue=function(e,t){},e.prototype.retrieveValueFromItem=function(e,t){},e.prototype.convertValue=function(e,t){return G_(e,t)},e}();function Y_(e,t){var n=new J_,r=e.data,i=n.sourceFormat=e.sourceFormat,a=e.startIndex;e.seriesLayoutBy!==`column`&&jo(``);var o=[],s={},c=e.dimensionsDefine;if(c)L(c,function(e,t){var n=e.name,r={index:t,name:n,displayName:e.displayName};o.push(r),n!=null&&(Ae(s,n)&&jo(``),s[n]=r)});else for(var l=0;l65535?ov:sv}function pv(){return[1/0,-1/0]}function mv(e){var t=e.constructor;return t===Array?e.slice():new t(e)}function hv(e,t,n,r,i){var a=uv[n||`float`];if(i){var o=e[t],s=o&&o.length;if(s!==r){for(var c=new a(r),l=0;lh[1]&&(h[1]=m)}return this._rawCount=this._count=s,{start:o,end:s}},e.prototype._initDataFromProvider=function(e,t,n){for(var r=this._provider,i=this._chunks,a=this._dimensions,o=a.length,s=this._rawExtent,c=R(a,function(e){return e.property}),l=0;lg[1]&&(g[1]=h)}}!r.persistent&&r.clean&&r.clean(),this._rawCount=this._count=t,this._extent=[]},e.prototype.count=function(){return this._count},e.prototype.get=function(e,t){if(!(t>=0&&t=0&&t=this._rawCount||e<0)return-1;if(!this._indices)return e;var t=this._indices,n=t[e];if(n!=null&&ne)i=a-1;else return a}return-1},e.prototype.getIndices=function(){var e,t=this._indices;if(t){var n=t.constructor,r=this._count;if(n===Array){e=new n(r);for(var i=0;i=l&&g<=u||isNaN(g))&&(o[s++]=p),p++}f=!0}else if(i===2){for(var m=d[r[0]],_=d[r[1]],v=e[r[1]][0],y=e[r[1]][1],h=0;h=l&&g<=u||isNaN(g))&&(b>=v&&b<=y||isNaN(b))&&(o[s++]=p),p++}f=!0}}if(!f)if(i===1)for(var h=0;h=l&&g<=u||isNaN(g))&&(o[s++]=x)}else for(var h=0;he[w][1])&&(S=!1)}S&&(o[s++]=t.getRawIndex(h))}return sg[1]&&(g[1]=h)}}}},e.prototype.lttbDownSample=function(e,t){var n=this.clone([e],!0),r=n._chunks[e],i=this.count(),a=0,o=Math.floor(1/t),s=this.getRawIndex(0),c,l,u,d=new(fv(this._rawCount))(Math.min((Math.ceil(i/o)+2)*2,i));d[a++]=s;for(var f=1;fc&&(c=l,u=v)}T>0&&To&&(m=o-l);for(var h=0;hp&&(p=g,f=l+h)}var _=this.getRawIndex(u),v=this.getRawIndex(f);ul-p&&(s=l-p,o.length=s);for(var m=0;mu[1]&&(u[1]=h),d[f++]=g}return i._count=f,i._indices=d,i._updateGetRawIdx(),i},e.prototype.each=function(e,t){if(this._count)for(var n=e.length,r=this._chunks,i=0,a=this.count();is&&(s=l)}return a=[o,s],this._extent[e]=a,a},e.prototype.getRawDataItem=function(e){var t=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(t);for(var n=[],r=this._chunks,i=0;i=0?this._indices[e]:-1},e.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},e.internalField=function(){function e(e,t,n,r){return G_(e[r],this._dimensions[r])}dv={arrayRows:e,objectRows:function(e,t,n,r){return G_(e[t],this._dimensions[r])},keyedColumns:e,original:function(e,t,n,r){var i=e&&(e.value==null?e:e.value);return G_(i instanceof Array?i[r]:i,this._dimensions[r])},typedArray:function(e,t,n,r){return e[r]}}}(),e}(),_v=function(){function e(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}return e.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},e.prototype._setLocalSource=function(e,t){this._sourceList=e,this._upstreamSignList=t,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},e.prototype._getVersionSign=function(){return this._sourceHost.uid+`_`+this._versionSignBase},e.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},e.prototype._createSource=function(){this._setLocalSource([],[]);var e=this._sourceHost,t=this._getUpstreamSourceManagers(),n=!!t.length,r,i;if(vv(e)){var a=e,o=void 0,s=void 0,c=void 0;if(n){var l=t[0];l.prepareSource(),c=l.getSource(),o=c.data,s=c.sourceFormat,i=[l._getVersionSign()]}else o=a.get(`data`,!0),s=ce(o)?$h:Yh,i=[];var u=this._getSourceMetaRawOption()||{},d=c&&c.metaRawOption||{},f=q(u.seriesLayoutBy,d.seriesLayoutBy)||null,p=q(u.sourceHeader,d.sourceHeader),m=q(u.dimensions,d.dimensions);r=f!==d.seriesLayoutBy||!!p!=!!d.sourceHeader||m?[d_(o,{seriesLayoutBy:f,sourceHeader:p,dimensions:m},s)]:[]}else{var h=e;if(n){var g=this._applyTransform(t);r=g.sourceList,i=g.upstreamSignList}else r=[d_(h.get(`source`,!0),this._getSourceMetaRawOption(),null)],i=[]}this._setLocalSource(r,i)},e.prototype._applyTransform=function(e){var t=this._sourceHost,n=t.get(`transform`,!0),r=t.get(`fromTransformResult`,!0);r!=null&&e.length!==1&&yv(``);var i,a=[],o=[];return L(e,function(e){e.prepareSource();var t=e.getSource(r||0);r!=null&&!t&&yv(``),a.push(t),o.push(e._getVersionSign())}),n?i=nv(n,a,{datasetIndex:t.componentIndex}):r!=null&&(i=[p_(a[0])]),{sourceList:i,upstreamSignList:o}},e.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),t=0;t1||n>0&&!e.noHeader;return L(e.blocks,function(e){var n=Ov(e);n>=t&&(t=n+ +(r&&(!n||Ev(e)&&!e.noHeader)))}),t}return 0}function kv(e,t,n,r){var i=t.noHeader,a=Mv(Ov(t)),o=[],s=t.blocks||[];ve(!s||H(s)),s||=[];var c=e.orderMode;if(t.sortBlocks&&c){s=s.slice();var l={valueAsc:`asc`,valueDesc:`desc`};if(Ae(l,c)){var u=new q_(l[c],null);s.sort(function(e,t){return u.evaluate(e.sortParam,t.sortParam)})}else c===`seriesDesc`&&s.reverse()}L(s,function(n,i){var s=t.valueFormatter,c=Dv(n)(s?M(M({},e),{valueFormatter:s}):e,n,i>0?a.html:0,r);c!=null&&o.push(c)});var d=e.renderMode===`richText`?o.join(a.richText):Nv(r,o.join(``),i?n:a.html);if(i)return d;var f=nh(t.header,`ordinal`,e.useUTC),p=Sv(r,e.renderMode).nameStyle,m=xv(r);return e.renderMode===`richText`?Iv(e,f,p)+a.richText+d:Nv(r,`
`+wt(f)+`
`+d,n)}function Av(e,t,n,r){var i=e.renderMode,a=t.noName,o=t.noValue,s=!t.markerType,c=t.name,l=e.useUTC,u=t.valueFormatter||e.valueFormatter||function(e){return e=H(e)?e:[e],R(e,function(e,t){return nh(e,H(p)?p[t]:p,l)})};if(!(a&&o)){var d=s?``:e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||Q.color.secondary,i),f=a?``:nh(c,`ordinal`,l),p=t.valueType,m=o?[]:u(t.value,t.dataIndex),h=!s||!a,g=!s&&a,_=Sv(r,i),v=_.nameStyle,y=_.valueStyle;return i===`richText`?(s?``:d)+(a?``:Iv(e,f,v))+(o?``:Lv(e,m,h,g,y)):Nv(r,(s?``:d)+(a?``:Pv(f,!s,v))+(o?``:Fv(m,h,g,y)),n)}}function jv(e,t,n,r,i,a){if(e)return Dv(e)({useUTC:i,renderMode:n,orderMode:r,markupStyleCreator:t,valueFormatter:e.valueFormatter},e,0,a)}function Mv(e){return{html:Cv[e],richText:wv[e]}}function Nv(e,t,n){var r=`
`,i=`margin: `+n+`px 0 0`,a=xv(e);return`
`+t+r+`
`}function Pv(e,t,n){var r=t?`margin-left:2px`:``;return``+wt(e)+``}function Fv(e,t,n,r){var i=t?`float:right;margin-left:`+(n?`10px`:`20px`):``;return e=H(e)?e:[e],``+R(e,function(e){return wt(e)}).join(`  `)+``}function Iv(e,t,n){return e.markupStyleCreator.wrapRichTextStyle(t,n)}function Lv(e,t,n,r,i){var a=[i],o=r?10:20;return n&&a.push({padding:[0,0,0,o],align:`right`}),e.markupStyleCreator.wrapRichTextStyle(H(t)?t.join(` `):t,a)}function Rv(e,t){var n=e.getData().getItemVisual(t,`style`)[e.visualDrawType];return lh(n)}function zv(e,t){return e.get(`padding`)??(t===`richText`?[8,10]:10)}var Bv=function(){function e(){this.richTextStyles={},this._nextStyleNameId=Co()}return e.prototype._generateStyleName=function(){return`__EC_aUTo_`+ this._nextStyleNameId++},e.prototype.makeTooltipMarker=function(e,t,n){var r=n===`richText`?this._generateStyleName():null,i=oh({color:t,type:e,renderMode:n,markerId:r});return W(i)?i:(this.richTextStyles[r]=i.style,i.content)},e.prototype.wrapRichTextStyle=function(e,t){var n={};H(t)?L(t,function(e){return M(n,e)}):M(n,t);var r=this._generateStyleName();return this.richTextStyles[r]=n,`{`+r+`|`+e+`}`},e}();function Vv(e){var t=e.series,n=e.dataIndex,r=e.multipleSeries,i=t.getData(),a=i.mapDimensionsAll(`defaultedTooltip`),o=a.length,s=t.getRawValue(n),c=H(s),l=Rv(t,n),u,d,f,p;if(o>1||c&&!o){var m=Hv(s,t,n,a,l);u=m.inlineValues,d=m.inlineValueTypes,f=m.blocks,p=m.inlineValues[0]}else if(o){var h=i.getDimensionInfo(a[0]);p=u=R_(i,n,a[0]),d=h.type}else p=u=c?s[0]:s;var g=Xo(t),_=g&&t.name||``,v=i.getName(n),y=r?_:v;return Tv(`section`,{header:_,noHeader:r||!g,sortParam:p,blocks:[Tv(`nameValue`,{markerType:`item`,markerColor:l,name:y,noName:!ye(y),value:u,valueType:d,dataIndex:n})].concat(f||[])})}function Hv(e,t,n,r,i){var a=t.getData(),o=ne(e,function(e,t,n){var r=a.getDimensionInfo(n);return e||=r&&r.tooltip!==!1&&r.displayName!=null},!1),s=[],c=[],l=[];r.length?L(r,function(e){u(R_(a,n,e),e)}):L(e,u);function u(e,t){var n=a.getDimensionInfo(t);!n||n.otherDims.tooltip===!1||(o?l.push(Tv(`nameValue`,{markerType:`subItem`,markerColor:i,name:n.displayName,value:e,valueType:n.type})):(s.push(e),c.push(n.type)))}return{inlineValues:s,inlineValueTypes:c,blocks:l}}var Uv=ts();function Wv(e,t){return e.getName(t)||e.getId(t)}var Gv=function(e){n(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}return t.prototype.init=function(e,t,n){this.seriesIndex=this.componentIndex,this.dataTask=H_({count:Jv,reset:Yv}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n),(Uv(this).sourceManager=new _v(this)).prepareSource();var r=this.getInitialData(e,n);Zv(r,this),this.dataTask.context.data=r,Uv(this).dataBeforeProcessed=r,Kv(this),this._initSelectedMapFromData(r)},t.prototype.mergeDefaultAndTheme=function(e,t){var n=Nh(this),r=n?Fh(e):{},i=this.subType;Rh.hasClass(i)&&(i+=`Series`),A(e,t.getTheme().get(this.subType)),A(e,this.getDefaultOption()),Io(e,`label`,[`show`]),this.fillDataTextStyle(e.data),n&&Ph(e,r,n)},t.prototype.mergeOption=function(e,t){e=A(this.option,e,!0),this.fillDataTextStyle(e.data);var n=Nh(this);n&&Ph(this.option,e,n);var r=Uv(this).sourceManager;r.dirty(),r.prepareSource();var i=this.getInitialData(e,t);Zv(i,this),this.dataTask.dirty(),this.dataTask.context.data=i,Uv(this).dataBeforeProcessed=i,Kv(this),this._initSelectedMapFromData(i)},t.prototype.fillDataTextStyle=function(e){if(e&&!ce(e))for(var t=[`show`],n=0;n=0&&u<0)&&(l=i,u=n,d=0),n===u&&(c[d++]=t))}),c.length=d,c},t.prototype.formatTooltip=function(e,t,n){return Vv({series:this,dataIndex:e,multipleSeries:t})},t.prototype.isAnimationEnabled=function(){var e=this.ecModel;if(i.node&&!(e&&e.ssr))return!1;var t=this.getShallow(`animation`);return t&&this.getData().count()>this.getShallow(`animationThreshold`)&&(t=!1),!!t},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(e,t,n){var r=this.ecModel,i=mg.prototype.getColorFromPalette.call(this,e,t,n);return i||=r.getColorFromPalette(e,t,n),i},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,t){this._innerSelect(this.getData(t),e)},t.prototype.unselect=function(e,t){var n=this.option.selectedMap;if(n){var r=this.option.selectedMode,i=this.getData(t);if(r===`series`||n===`all`){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var a=0;a=0&&n.push(i)}return n},t.prototype.isSelected=function(e,t){var n=this.option.selectedMap;if(!n)return!1;var r=this.getData(t);return(n===`all`||n[Wv(r,e)])&&!r.getItemModel(e).get([`select`,`disabled`])},t.prototype.isUniversalTransitionEnabled=function(){if(this.__universalTransitionEnabled)return!0;var e=this.option.universalTransition;return e?e===!0?!0:e&&e.enabled:!1},t.prototype._innerSelect=function(e,t){var n,r,i=this.option,a=i.selectedMode,o=t.length;if(!(!a||!o)){if(a===`series`)i.selectedMap=`all`;else if(a===`multiple`){K(i.selectedMap)||(i.selectedMap={});for(var s=i.selectedMap,c=0;c0&&this._innerSelect(e,t)}},t.registerClass=function(e){return Rh.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}(Rh);I(Gv,B_),I(Gv,mg),ys(Gv,Rh);function Kv(e){var t=e.name;Xo(e)||(e.name=qv(e)||t)}function qv(e){var t=e.getRawData(),n=t.mapDimensionsAll(`seriesName`),r=[];return L(n,function(e){var n=t.getDimensionInfo(e);n.displayName&&r.push(n.displayName)}),r.join(` `)}function Jv(e){return e.model.getRawData().count()}function Yv(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),Xv}function Xv(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function Zv(e,t){L(De(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(n){e.wrapMethod(n,V(Qv,t))})}function Qv(e,t){var n=$v(e);return n&&n.setOutputEnd((t||this).count()),t}function $v(e){var t=(e.ecModel||{}).scheduler,n=t&&t.getPipeline(e.uid);if(n){var r=n.currentTask;if(r){var i=r.agentStubMap;i&&(r=i.get(e.uid))}return r}}var ey=function(){function e(){this.group=new Aa,this.uid=Qp(`viewComponent`)}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,n,r){},e.prototype.dispose=function(e,t){},e.prototype.updateView=function(e,t,n,r){},e.prototype.updateLayout=function(e,t,n,r){},e.prototype.updateVisual=function(e,t,n,r){},e.prototype.toggleBlurSeries=function(e,t,n){},e.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},e}();_s(ey),ws(ey);function ty(){var e=ts();return function(t){var n=e(t),r=t.pipelineContext,i=!!n.large,a=!!n.progressiveRender,o=n.large=!!(r&&r.large),s=n.progressiveRender=!!(r&&r.progressiveRender);return(i!==o||a!==s)&&`reset`}}var ny=ts(),ry=ty(),iy=function(){function e(){this.group=new Aa,this.uid=Qp(`viewChart`),this.renderTask=H_({plan:sy,reset:cy}),this.renderTask.context={view:this}}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,n,r){},e.prototype.highlight=function(e,t,n,r){var i=e.getData(r&&r.dataType);i&&oy(i,r,`emphasis`)},e.prototype.downplay=function(e,t,n,r){var i=e.getData(r&&r.dataType);i&&oy(i,r,`normal`)},e.prototype.remove=function(e,t){this.group.removeAll()},e.prototype.dispose=function(e,t){},e.prototype.updateView=function(e,t,n,r){this.render(e,t,n,r)},e.prototype.updateLayout=function(e,t,n,r){this.render(e,t,n,r)},e.prototype.updateVisual=function(e,t,n,r){this.render(e,t,n,r)},e.prototype.eachRendered=function(e){mp(this.group,e)},e.markUpdateMethod=function(e,t){ny(e).updateMethod=t},e.protoInitialize=function(){var t=e.prototype;t.type=`chart`}(),e}();function ay(e,t,n){e&&Xu(e)&&(t===`emphasis`?Tu:Eu)(e,n)}function oy(e,t,n){var r=es(e,t),i=t&&t.highlightKey!=null?Zu(t.highlightKey):null;r==null?e.eachItemGraphicEl(function(e){ay(e,n,i)}):L(Fo(r),function(t){ay(e.getItemGraphicEl(t),n,i)})}_s(iy,[`dispose`]),ws(iy);function sy(e){return ry(e.model)}function cy(e){var t=e.model,n=e.ecModel,r=e.api,i=e.payload,a=t.pipelineContext.progressiveRender,o=e.view,s=i&&ny(i).updateMethod,c=a?`incrementalPrepareRender`:s&&o[s]?s:`render`;return c!==`render`&&o[c](t,n,r,i),ly[c]}var ly={incrementalPrepareRender:{progress:function(e,t){t.view.incrementalRender(e,t.model,t.ecModel,t.api,t.payload)}},render:{forceFirstProgress:!0,progress:function(e,t){t.view.render(t.model,t.ecModel,t.api,t.payload)}}},uy=`\0__throttleOriginMethod`,dy=`\0__throttleRate`,fy=`\0__throttleType`;function py(e,t,n){var r,i=0,a=0,o=null,s,c,l,u;t||=0;function d(){a=new Date().getTime(),o=null,e.apply(c,l||[])}var f=function(){var e=[...arguments];r=new Date().getTime(),c=this,l=e;var f=u||t,p=u||n;u=null,s=r-(p?i:a)-f,clearTimeout(o),p?o=setTimeout(d,f):s>=0?d():o=setTimeout(d,-s),i=r};return f.clear=function(){o&&=(clearTimeout(o),null)},f.debounceNextCall=function(e){u=e},f}function my(e,t,n,r){var i=e[t];if(i){var a=i[uy]||i,o=i[fy];if(i[dy]!==n||o!==r){if(n==null||!r)return e[t]=a;i=e[t]=py(a,n,r===`debounce`),i[uy]=a,i[fy]=r,i[dy]=n}return i}}function hy(e,t){var n=e[t];n&&n[uy]&&(n.clear&&n.clear(),e[t]=n[uy])}var gy=ts(),_y={itemStyle:Ts(qp,!0),lineStyle:Ts(Wp,!0)},vy={lineStyle:`stroke`,itemStyle:`fill`};function yy(e,t){return e.visualStyleMapper||_y[t]||(console.warn(`Unknown style type '`+t+`'.`),_y.itemStyle)}function by(e,t){return e.visualDrawType||vy[t]||(console.warn(`Unknown style type '`+t+`'.`),`fill`)}var xy={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData(),r=e.visualStyleAccessPath||`itemStyle`,i=e.getModel(r),a=yy(e,r)(i),o=i.getShallow(`decal`);o&&(n.setVisual(`decal`,o),o.dirty=!0);var s=by(e,r),c=a[s],l=U(c)?c:null,u=a.fill===`auto`||a.stroke===`auto`;if(!a[s]||l||u){var d=e.getColorFromPalette(e.name,null,t.getSeriesCount());a[s]||(a[s]=d,n.setVisual(`colorFromPalette`,!0)),a.fill=a.fill===`auto`||U(a.fill)?d:a.fill,a.stroke=a.stroke===`auto`||U(a.stroke)?d:a.stroke}if(n.setVisual(`style`,a),n.setVisual(`drawType`,s),!t.isSeriesFiltered(e)&&l)return n.setVisual(`colorFromPalette`,!1),{dataEach:function(t,n){var r=e.getDataParams(n),i=M({},a);i[s]=l(r),t.setItemVisual(n,`style`,i)}}}},Sy=new Xp,Cy={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(!(e.ignoreStyleOnData||t.isSeriesFiltered(e))){var n=e.getData(),r=e.visualStyleAccessPath||`itemStyle`,i=yy(e,r),a=n.getVisual(`drawType`);return{dataEach:n.hasItemOption?function(e,t){var n=e.getRawDataItem(t);if(n&&n[r]){Sy.option=n[r];var o=i(Sy);M(e.ensureUniqueItemVisual(t,`style`),o),Sy.option.decal&&(e.setItemVisual(t,`decal`,Sy.option.decal),Sy.option.decal.dirty=!0),a in o&&e.setItemVisual(t,`colorFromPalette`,!1)}}:null}}}},wy={performRawSeries:!0,overallReset:function(e){var t=J();e.eachSeries(function(e){var n=e.getColorBy();if(!e.isColorBySeries()){var r=e.type+`-`+n,i=t.get(r);i||(i={},t.set(r,i)),gy(e).scope=i}}),e.eachSeries(function(t){if(!(t.isColorBySeries()||e.isSeriesFiltered(t))){var n=t.getRawData(),r={},i=t.getData(),a=gy(t).scope,o=by(t,t.visualStyleAccessPath||`itemStyle`);i.each(function(e){var t=i.getRawIndex(e);r[t]=e}),n.each(function(e){var s=r[e];if(i.getItemVisual(s,`colorFromPalette`)){var c=i.ensureUniqueItemVisual(s,`style`),l=n.getName(e)||e+``,u=n.count();c[o]=t.getColorFromPalette(l,a,u)}})}})}},Ty=Math.PI;function Ey(e,t){t||={},N(t,{text:`loading`,textColor:Q.color.primary,fontSize:12,fontWeight:`normal`,fontStyle:`normal`,fontFamily:`sans-serif`,maskColor:`rgba(255,255,255,0.8)`,showSpinner:!0,color:Q.color.theme[0],spinnerRadius:10,lineWidth:5,zlevel:0});var n=new Aa,r=new Ol({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});n.add(r);var i=new Nl({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 Ol({style:{fill:`none`},textContent:i,textConfig:{position:`right`,distance:10},zlevel:t.zlevel,z:10001});n.add(a);var o;return t.showSpinner&&(o=new sf({shape:{startAngle:-Ty/2,endAngle:-Ty/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:Ty*3/2}).start(`circularInOut`),o.animateShape(!0).when(1e3,{startAngle:Ty*3/2}).delay(300).start(`circularInOut`),n.add(o)),n.resize=function(){var n=i.getBoundingRect().width,s=t.showSpinner?t.spinnerRadius:0,c=(e.getWidth()-s*2-(t.showSpinner&&n?10:0)-n)/2-(t.showSpinner&&n?0:5+n/2)+(t.showSpinner?0:n/2)+(n?0:s),l=e.getHeight()/2;t.showSpinner&&o.setShape({cx:c,cy:l}),a.setShape({x:c-s,y:l-s,width:s*2,height:s*2}),r.setShape({x:0,y:0,width:e.getWidth(),height:e.getHeight()})},n.resize(),n}var Dy=function(){function e(e,t,n,r){this._stageTaskMap=J(),this.ecInstance=e,this.api=t,n=this._dataProcessorHandlers=n.slice(),r=this._visualHandlers=r.slice(),this._allHandlers=n.concat(r)}return e.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each(function(e){var t=e.overallTask;t&&t.dirty()})},e.prototype.getPerformArgs=function(e,t){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),r=n.context,i=!t&&n.progressiveEnabled&&(!r||r.progressiveRender)&&e.__idxInPipeline>n.blockIndex?n.step:null,a=r&&r.modDataCount;return{step:i,modBy:a==null?null:Math.ceil(a/i),modDataCount:a}}},e.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},e.prototype.updateStreamModes=function(e,t){var n=this._pipelineMap.get(e.uid),r=e.getData().count(),i=n.progressiveEnabled&&t.incrementalPrepareRender&&r>=n.threshold,a=e.get(`large`)&&r>=e.get(`largeThreshold`);e.pipelineContext=n.context={progressiveRender:i,modDataCount:e.get(`progressiveChunkMode`)===`mod`?r:null,large:a}},e.prototype.restorePipelines=function(e){var t=this,n=t._pipelineMap=J();e.eachSeries(function(e){var r=e.getProgressive(),i=e.uid;n.set(i,{id:i,head:null,tail:null,threshold:e.getProgressiveThreshold(),progressiveEnabled:r&&!(e.preventIncremental&&e.preventIncremental()),blockIndex:-1,step:Math.round(r||700),count:0}),t._pipe(e,e.dataTask)})},e.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),n=this.api;L(this._allHandlers,function(r){var i=e.get(r.uid)||e.set(r.uid,{});ve(!(r.reset&&r.overallReset),``),r.reset&&this._createSeriesStageTask(r,i,t,n),r.overallReset&&this._createOverallStageTask(r,i,t,n)},this)},e.prototype.prepareView=function(e,t,n,r){var i=e.renderTask,a=i.context;a.model=t,a.ecModel=n,a.api=r,i.__block=!e.incrementalPrepareRender,this._pipe(t,i)},e.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},e.prototype.performVisualTasks=function(e,t,n){this._performStageTasks(this._visualHandlers,e,t,n)},e.prototype._performStageTasks=function(e,t,n,r){r||={};var i=!1,a=this;L(e,function(e,s){if(!(r.visualType&&r.visualType!==e.visualType)){var c=a._stageTaskMap.get(e.uid),l=c.seriesTaskMap,u=c.overallTask;if(u){var d,f=u.agentStubMap;f.each(function(e){o(r,e)&&(e.dirty(),d=!0)}),d&&u.dirty(),a.updatePayload(u,n);var p=a.getPerformArgs(u,r.block);f.each(function(e){e.perform(p)}),u.perform(p)&&(i=!0)}else l&&l.each(function(s,c){o(r,s)&&s.dirty();var l=a.getPerformArgs(s,r.block);l.skip=!e.performRawSeries&&t.isSeriesFiltered(s.context.model),a.updatePayload(s,n),s.perform(l)&&(i=!0)})}});function o(e,t){return e.setDirty&&(!e.dirtyMap||e.dirtyMap.get(t.__pipeline.id))}this.unfinished=i||this.unfinished},e.prototype.performSeriesTasks=function(e){var t;e.eachSeries(function(e){t=e.dataTask.perform()||t}),this.unfinished=t||this.unfinished},e.prototype.plan=function(){this._pipelineMap.each(function(e){var t=e.tail;do{if(t.__block){e.blockIndex=t.__idxInPipeline;break}t=t.getUpstream()}while(t)})},e.prototype.updatePayload=function(e,t){t!==`remain`&&(e.context.payload=t)},e.prototype._createSeriesStageTask=function(e,t,n,r){var i=this,a=t.seriesTaskMap,o=t.seriesTaskMap=J(),s=e.seriesType,c=e.getTargetSeries;e.createOnAllSeries?n.eachRawSeries(l):s?n.eachRawSeriesByType(s,l):c&&c(n,r).each(l);function l(t){var s=t.uid,c=o.set(s,a&&a.get(s)||H_({plan:My,reset:Ny,count:Iy}));c.context={model:t,ecModel:n,api:r,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:i},i._pipe(t,c)}},e.prototype._createOverallStageTask=function(e,t,n,r){var i=this,a=t.overallTask=t.overallTask||H_({reset:Oy});a.context={ecModel:n,api:r,overallReset:e.overallReset,scheduler:i};var o=a.agentStubMap,s=a.agentStubMap=J(),c=e.seriesType,l=e.getTargetSeries,u=!0,d=!1;ve(!e.createOnAllSeries,``),c?n.eachRawSeriesByType(c,f):l?l(n,r).each(f):(u=!1,L(n.getSeries(),f));function f(e){var t=e.uid,n=s.set(t,o&&o.get(t)||(d=!0,H_({reset:ky,onDirty:jy})));n.context={model:e,overallProgress:u},n.agent=a,n.__block=u,i._pipe(e,n)}d&&a.dirty()},e.prototype._pipe=function(e,t){var n=e.uid,r=this._pipelineMap.get(n);!r.head&&(r.head=t),r.tail&&r.tail.pipe(t),r.tail=t,t.__idxInPipeline=r.count++,t.__pipeline=r},e.wrapStageHandler=function(e,t){return U(e)&&(e={overallReset:e,seriesType:Ly(e)}),e.uid=Qp(`stageHandler`),t&&(e.visualType=t),e},e}();function Oy(e){e.overallReset(e.ecModel,e.api,e.payload)}function ky(e){return e.overallProgress&&Ay}function Ay(){this.agent.dirty(),this.getDownstream().dirty()}function jy(){this.agent&&this.agent.dirty()}function My(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function Ny(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=Fo(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?R(t,function(e,t){return Fy(t)}):Py}var Py=Fy(0);function Fy(e){return function(t,n){var r=n.data,i=n.resetDefines[e];if(i&&i.dataEach)for(var a=t.start;a0&&u===i.length-l.length){var d=i.slice(0,u);d!==`data`&&(t.mainType=d,t[l.toLowerCase()]=e,s=!0)}}o.hasOwnProperty(i)&&(n[i]=e,s=!0),s||(r[i]=e)})}return{cptQuery:t,dataQuery:n,otherQuery:r}},e.prototype.filter=function(e,t){var n=this.eventInfo;if(!n)return!0;var r=n.targetEl,i=n.packedEvent,a=n.model,o=n.view;if(!a||!o)return!0;var s=t.cptQuery,c=t.dataQuery;return l(s,a,`mainType`)&&l(s,a,`subType`)&&l(s,a,`index`,`componentIndex`)&&l(s,a,`name`)&&l(s,a,`id`)&&l(c,i,`name`)&&l(c,i,`dataIndex`)&&l(c,i,`dataType`)&&(!o.filterForExposedEvent||o.filterForExposedEvent(e,t.otherQuery,r,i));function l(e,t,n,r){return e[n]==null||t[r||n]===e[n]}},e.prototype.afterTrigger=function(){this.eventInfo=null},e}(),qy=[`symbol`,`symbolSize`,`symbolRotate`,`symbolOffset`],Jy=qy.concat([`symbolKeepAspect`]),Yy={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData();if(e.legendIcon&&n.setVisual(`legendIcon`,e.legendIcon),!e.hasSymbolVisual)return;for(var r={},i={},a=!1,o=0;o=0&&hb(c)?c:.5,e.createRadialGradient(o,s,0,o,s,c)}function vb(e,t,n){for(var r=t.type===`radial`?_b(e,t,n):gb(e,t,n),i=t.colorStops,a=0;a0)?null:e===`dashed`?[4*t,2*t]:e===`dotted`?[t]:G(e)?[e]:H(e)?e:null}function Cb(e){var t=e.style,n=t.lineDash&&t.lineWidth>0&&Sb(t.lineDash,t.lineWidth),r=t.lineDashOffset;if(n){var i=t.strokeNoScale&&e.getLineScale?e.getLineScale():1;i&&i!==1&&(n=R(n,function(e){return e/i}),r/=i)}return[n,r]}var wb=new Uc(!0);function Tb(e){var t=e.stroke;return!(t==null||t===`none`||!(e.lineWidth>0))}function Eb(e){return typeof e==`string`&&e!==`none`}function Db(e){var t=e.fill;return t!=null&&t!==`none`}function Ob(e,t){if(t.fillOpacity!=null&&t.fillOpacity!==1){var n=e.globalAlpha;e.globalAlpha=t.fillOpacity*t.opacity,e.fill(),e.globalAlpha=n}else e.fill()}function kb(e,t){if(t.strokeOpacity!=null&&t.strokeOpacity!==1){var n=e.globalAlpha;e.globalAlpha=t.strokeOpacity*t.opacity,e.stroke(),e.globalAlpha=n}else e.stroke()}function Ab(e,t,n){var r=As(t.image,t.__image,n);if(Ms(r)){var i=e.createPattern(r,t.repeat||`repeat`);if(typeof DOMMatrix==`function`&&i&&i.setTransform){var a=new DOMMatrix;a.translateSelf(t.x||0,t.y||0),a.rotateSelf(0,0,(t.rotation||0)*Me),a.scaleSelf(t.scaleX||1,t.scaleY||1),i.setTransform(a)}return i}}function jb(e,t,n,r){var i,a=Tb(n),o=Db(n),s=n.strokePercent,c=s<1,l=!t.path;(!t.silent||c)&&l&&t.createPathProxy();var u=t.path||wb,d=t.__dirty;if(!r){var f=n.fill,p=n.stroke,m=o&&!!f.colorStops,h=a&&!!p.colorStops,g=o&&!!f.image,_=a&&!!p.image,v=void 0,y=void 0,b=void 0,x=void 0,S=void 0;(m||h)&&(S=t.getBoundingRect()),m&&(v=d?vb(e,f,S):t.__canvasFillGradient,t.__canvasFillGradient=v),h&&(y=d?vb(e,p,S):t.__canvasStrokeGradient,t.__canvasStrokeGradient=y),g&&(b=d||!t.__canvasFillPattern?Ab(e,f,t):t.__canvasFillPattern,t.__canvasFillPattern=b),_&&(x=d||!t.__canvasStrokePattern?Ab(e,p,t):t.__canvasStrokePattern,t.__canvasStrokePattern=x),m?e.fillStyle=v:g&&(b?e.fillStyle=b:o=!1),h?e.strokeStyle=y:_&&(x?e.strokeStyle=x:a=!1)}var C=t.getGlobalScale();u.setScale(C[0],C[1],t.segmentIgnoreThreshold);var w,T;e.setLineDash&&n.lineDash&&(i=Cb(t),w=i[0],T=i[1]);var E=!0;(l||d&4)&&(u.setDPR(e.dpr),c?u.setContext(null):(u.setContext(e),E=!1),u.reset(),t.buildPath(u,t.shape,r),u.toStatic(),t.pathUpdated()),E&&u.rebuildPath(e,c?s:1),w&&(e.setLineDash(w),e.lineDashOffset=T),r||(n.strokeFirst?(a&&kb(e,n),o&&Ob(e,n)):(o&&Ob(e,n),a&&kb(e,n))),w&&e.setLineDash([])}function Mb(e,t,n){var r=t.__image=As(n.image,t.__image,t,t.onload);if(!(!r||!Ms(r))){var i=n.x||0,a=n.y||0,o=t.getWidth(),s=t.getHeight(),c=r.width/r.height;if(o==null&&s!=null?o=s*c:s==null&&o!=null?s=o/c:o==null&&s==null&&(o=r.width,s=r.height),n.sWidth&&n.sHeight){var l=n.sx||0,u=n.sy||0;e.drawImage(r,l,u,n.sWidth,n.sHeight,i,a,o,s)}else if(n.sx&&n.sy){var l=n.sx,u=n.sy,d=o-l,f=s-u;e.drawImage(r,l,u,d,f,i,a,o,s)}else e.drawImage(r,i,a,o,s)}}function Nb(e,t,n){var r,i=n.text;if(i!=null&&(i+=``),i){e.font=n.font||`12px sans-serif`,e.textAlign=n.textAlign,e.textBaseline=n.textBaseline;var a=void 0,o=void 0;e.setLineDash&&n.lineDash&&(r=Cb(t),a=r[0],o=r[1]),a&&(e.setLineDash(a),e.lineDashOffset=o),n.strokeFirst?(Tb(n)&&e.strokeText(i,n.x,n.y),Db(n)&&e.fillText(i,n.x,n.y)):(Db(n)&&e.fillText(i,n.x,n.y),Tb(n)&&e.strokeText(i,n.x,n.y)),a&&e.setLineDash([])}}var Pb=[`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`],Fb=[[`lineCap`,`butt`],[`lineJoin`,`miter`],[`miterLimit`,10]];function Ib(e,t,n,r,i){var a=!1;if(!r&&(n||={},t===n))return!1;if(r||t.opacity!==n.opacity){qb(e,i),a=!0;var o=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(o)?rc.opacity:o}(r||t.blend!==n.blend)&&(a||=(qb(e,i),!0),e.globalCompositeOperation=t.blend||rc.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,t,n){if(!this[Px]){if(this._disposed){this.id;return}var r,i,a;if(K(t)&&(n=t.lazyUpdate,r=t.silent,i=t.replaceMerge,a=t.transition,t=t.notMerge),this[Px]=!0,fS(this),!this._model||t){var o=new Mg(this._api),s=this._theme,c=this._model=new Cg;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,s,this._locale,o)}this._model.setOption(e,{replaceMerge:i},bS);var l={seriesTransition:a,optionChanged:!0};if(n)this[Ix]={silent:r,updateParams:l},this[Px]=!1,this.getZr().wakeUp();else{try{Jx(this),Zx.update.call(this,null,l)}catch(e){throw this[Ix]=null,this[Px]=!1,e}this._ssr||this._zr.flush(),this[Ix]=null,this[Px]=!1,tS.call(this,r),nS.call(this,r)}}},t.prototype.setTheme=function(e,t){if(!this[Px]){if(this._disposed){this.id;return}var n=this._model;if(n){var r=t&&t.silent,i=null;this[Ix]&&(r??=this[Ix].silent,i=this[Ix].updateParams,this[Ix]=null),this[Px]=!0,fS(this);try{this._updateTheme(e),n.setTheme(this._theme),Jx(this),Zx.update.call(this,{type:`setTheme`},i)}catch(e){throw this[Px]=!1,e}this[Px]=!1,tS.call(this,r),nS.call(this,r)}}},t.prototype._updateTheme=function(e){W(e)&&(e=SS[e]),e&&(e=k(e),e&&o_(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||i.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(e){return this.renderToCanvas(e)},t.prototype.renderToCanvas=function(e){return e||={},this._zr.painter.getRenderedCanvas({backgroundColor:e.backgroundColor||this._model.get(`backgroundColor`),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(e){return e||={},this._zr.painter.renderToString({useViewBox:e.useViewBox})},t.prototype.getSvgDataURL=function(){var e=this._zr;return L(e.storage.getDisplayList(),function(e){e.stopAnimation(null,!0)}),e.painter.toDataURL()},t.prototype.getDataURL=function(e){if(this._disposed){this.id;return}e||={};var t=e.excludeComponents,n=this._model,r=[],i=this;L(t,function(e){n.eachComponent({mainType:e},function(e){var t=i._componentsMap[e.__viewId];t.group.ignore||(r.push(t),t.group.ignore=!0)})});var a=this._zr.painter.getType()===`svg`?this.getSvgDataURL():this.renderToCanvas(e).toDataURL(`image/`+(e&&e.type||`png`));return L(r,function(e){e.group.ignore=!1}),a},t.prototype.getConnectedDataURL=function(e){if(this._disposed){this.id;return}var t=e.type===`svg`,n=this.group,r=Math.min,i=Math.max,a=1/0;if(TS[n]){var o=a,s=a,c=-a,l=-a,u=[],d=e&&e.pixelRatio||this.getDevicePixelRatio();L(wS,function(a,d){if(a.group===n){var f=t?a.getZr().painter.getSvgDom().innerHTML:a.renderToCanvas(k(e)),p=a.getDom().getBoundingClientRect();o=r(p.left,o),s=r(p.top,s),c=i(p.right,c),l=i(p.bottom,l),u.push({dom:f,left:p.left,top:p.top})}}),o*=d,s*=d,c*=d,l*=d;var p=c-o,m=l-s,h=f.createCanvas(),g=La(h,{renderer:t?`svg`:`canvas`});if(g.resize({width:p,height:m}),t){var _=``;return L(u,function(e){var t=e.left-o,n=e.top-s;_+=``+e.dom+``}),g.painter.getSvgRoot().innerHTML=_,e.connectedBackgroundColor&&g.painter.setBackgroundColor(e.connectedBackgroundColor),g.refreshImmediately(),g.painter.toDataURL()}else return e.connectedBackgroundColor&&g.add(new Ol({shape:{x:0,y:0,width:p,height:m},style:{fill:e.connectedBackgroundColor}})),L(u,function(e){var t=new bl({style:{x:e.left*d-o,y:e.top*d-s,image:e.dom}});g.add(t)}),g.refreshImmediately(),h.toDataURL(`image/`+(e&&e.type||`png`))}else return this.getDataURL(e)},t.prototype.convertToPixel=function(e,t,n){return Qx(this,`convertToPixel`,e,t,n)},t.prototype.convertToLayout=function(e,t,n){return Qx(this,`convertToLayout`,e,t,n)},t.prototype.convertFromPixel=function(e,t,n){return Qx(this,`convertFromPixel`,e,t,n)},t.prototype.containPixel=function(e,t){if(this._disposed){this.id;return}var n=this._model,r;return L(rs(n,e),function(e,n){n.indexOf(`Models`)>=0&&L(e,function(e){var i=e.coordinateSystem;if(i&&i.containPoint)r||=!!i.containPoint(t);else if(n===`seriesModels`){var a=this._chartsMap[e.__viewId];a&&a.containPoint&&(r||=a.containPoint(t,e))}},this)},this),!!r},t.prototype.getVisual=function(e,t){var n=this._model,r=rs(n,e,{defaultMainType:`series`}),i=r.seriesModel.getData(),a=r.hasOwnProperty(`dataIndexInside`)?r.dataIndexInside:r.hasOwnProperty(`dataIndex`)?i.indexOfRawIndex(r.dataIndex):null;return a==null?Qy(i,t):Zy(i,a,t)},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;L(hS,function(t){var n=function(n){var r=e.getModel(),i=n.target,a;if(t===`globalout`?a={}:i&&nb(i,function(e){var t=Z(e);if(t&&t.dataIndex!=null){var n=t.dataModel||r.getSeriesByIndex(t.seriesIndex);return a=n&&n.getDataParams(t.dataIndex,t.dataType,i)||{},!0}else if(t.eventData)return a=M({},t.eventData),!0},!0),a){var o=a.componentType,s=a.componentIndex;(o===`markLine`||o===`markPoint`||o===`markArea`)&&(o=`series`,s=a.seriesIndex);var c=o&&s!=null&&r.getComponent(o,s),l=c&&e[c.mainType===`series`?`_chartsMap`:`_componentsMap`][c.__viewId];a.event=n,a.type=t,e._$eventProcessor.eventInfo={targetEl:i,packedEvent:a,model:c,view:l},e.trigger(t,a)}};n.zrEventfulCallAtLast=!0,e._zr.on(t,n,e)});var t=this._messageCenter;L(vS,function(n,r){t.on(r,function(t){e.trigger(r,t)})}),tb(t,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,this.getDom()&&ss(this.getDom(),OS,``);var e=this,t=e._api,n=e._model;L(e._componentsViews,function(e){e.dispose(n,t)}),L(e._chartsViews,function(e){e.dispose(n,t)}),e._zr.dispose(),e._dom=e._model=e._chartsMap=e._componentsMap=e._chartsViews=e._componentsViews=e._scheduler=e._api=e._zr=e._throttledZrFlush=e._theme=e._coordSysMgr=e._messageCenter=null,delete wS[e.id]},t.prototype.resize=function(e){if(!this[Px]){if(this._disposed){this.id;return}this._zr.resize(e);var t=this._model;if(this._loadingFX&&this._loadingFX.resize(),t){var n=t.resetOption(`media`),r=e&&e.silent;this[Ix]&&(r??=this[Ix].silent,n=!0,this[Ix]=null),this[Px]=!0,fS(this);try{n&&Jx(this),Zx.update.call(this,{type:`resize`,animation:M({duration:0},e&&e.animation)})}catch(e){throw this[Px]=!1,e}this[Px]=!1,tS.call(this,r),nS.call(this,r)}}},t.prototype.showLoading=function(e,t){if(this._disposed){this.id;return}if(K(e)&&(t=e,e=``),e||=`default`,this.hideLoading(),CS[e]){var n=CS[e](this._api,t),r=this._zr;this._loadingFX=n,r.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 t=M({},e);return t.type=_S[e.type],t},t.prototype.dispatchAction=function(e,t){if(this._disposed){this.id;return}if(K(t)||(t={silent:!!t}),gS[e.type]&&this._model){if(this[Px]){this._pendingActions.push(e);return}var n=t.silent;eS.call(this,e,n);var r=t.flush;r?this._zr.flush():r!==!1&&i.browser.weChat&&this._throttledZrFlush(),tS.call(this,n),nS.call(this,n)}},t.prototype.updateLabelLayout=function(){cx.trigger(`series:layoutlabels`,this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed){this.id;return}var t=e.seriesIndex;this.getModel().getSeriesByIndex(t).appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()},t.internalField=function(){Jx=function(e){var t=e._scheduler;t.restorePipelines(e._model),t.prepareStageTasks(),Yx(e,!0),Yx(e,!1),t.plan()},Yx=function(e,t){for(var n=e._model,r=e._scheduler,i=t?e._componentsViews:e._chartsViews,a=t?e._componentsMap:e._chartsMap,o=e._zr,s=e._api,c=0;ct.get(`hoverLayerThreshold`)&&!i.node&&!i.worker&&t.eachSeries(function(t){if(!t.preventUsingHoverLayer){var n=e._chartsMap[t.__viewId];n.__alive&&n.eachRendered(function(e){e.states.emphasis&&(e.states.emphasis.hoverLayer=!0)})}})}function s(e,t){var n=e.get(`blendMode`)||null;t.eachRendered(function(e){e.isGroup||(e.style.blend=n)})}function c(e,t){if(!e.preventAutoZ){var n=yp(e);t.eachRendered(function(e){return xp(e,n.z,n.zlevel),!0})}}function l(e,t){t.eachRendered(function(e){if(!Of(e)){var t=e.getTextContent(),n=e.getTextGuideLine();e.stateTransition&&=null,t&&t.stateTransition&&(t.stateTransition=null),n&&n.stateTransition&&(n.stateTransition=null),e.hasState()?(e.prevStates=e.currentStates,e.clearStates()):e.prevStates&&=null}})}function u(e,t){var n=e.getModel(`stateAnimation`),r=e.isAnimationEnabled(),i=n.get(`duration`),o=i>0?{duration:i,delay:n.get(`delay`),easing:n.get(`easing`)}:null;t.eachRendered(function(e){if(e.states&&e.states.emphasis){if(Of(e))return;if(e instanceof ml&&ed(e),e.__dirty){var t=e.prevStates;t&&e.useStates(t)}if(r){e.stateTransition=o;var n=e.getTextContent(),i=e.getTextGuideLine();n&&(n.stateTransition=o),i&&(i.stateTransition=o)}e.__dirty&&a(e)}})}cS=function(e){return new(function(t){n(r,t);function r(){return t!==null&&t.apply(this,arguments)||this}return r.prototype.getCoordinateSystems=function(){return e._coordSysMgr.getCoordinateSystems()},r.prototype.getComponentByElement=function(t){for(;t;){var n=t.__ecComponentInfo;if(n!=null)return e._model.getComponent(n.mainType,n.index);t=t.parent}},r.prototype.enterEmphasis=function(t,n){Tu(t,n),uS(e)},r.prototype.leaveEmphasis=function(t,n){Eu(t,n),uS(e)},r.prototype.enterBlur=function(t){Du(t),uS(e)},r.prototype.leaveBlur=function(t){Ou(t),uS(e)},r.prototype.enterSelect=function(t){ku(t),uS(e)},r.prototype.leaveSelect=function(t){Au(t),uS(e)},r.prototype.getModel=function(){return e.getModel()},r.prototype.getViewOfComponentModel=function(t){return e.getViewOfComponentModel(t)},r.prototype.getViewOfSeriesModel=function(t){return e.getViewOfSeriesModel(t)},r.prototype.getMainProcessVersion=function(){return e[Fx]},r}(Ag))(e)},lS=function(e){function t(e,t){for(var n=0;n=0)){JS.push(n);var a=Dy.wrapStageHandler(n,i);a.__prio=t,a.__raw=n,e.push(a)}}function XS(e,t){CS[e]=t}function ZS(e){p({createCanvas:e})}function QS(e,t,n){var r=dx(`registerMap`);r&&r(e,t,n)}function $S(e){var t=dx(`getMap`);return t&&t(e)}var eC=tv;qS(Tx,xy),qS(Ox,Cy),qS(Ox,wy),qS(Tx,Yy),qS(Ox,Xy),qS(Mx,sx),LS(o_),RS(vx,s_),XS(`default`,Ey),HS({type:eu,event:eu,update:eu},je),HS({type:tu,event:tu,update:tu},je),HS({type:nu,event:au,update:nu,action:je,refineEvent:tC,publishNonRefinedEvent:!0}),HS({type:ru,event:au,update:ru,action:je,refineEvent:tC,publishNonRefinedEvent:!0}),HS({type:iu,event:au,update:iu,action:je,refineEvent:tC,publishNonRefinedEvent:!0});function tC(e,t,n,r){return{eventContent:{selected:Vu(n),isFromClick:t.isFromClick||!1}}}IS(`default`,{}),IS(`dark`,Gy);var nC={};function rC(e){return e==null?0:e.length||1}function iC(e){return e}var aC=function(){function e(e,t,n,r,i,a){this._old=e,this._new=t,this._oldKeyGetter=n||iC,this._newKeyGetter=r||iC,this.context=i,this._diffModeMultiple=a===`multiple`}return e.prototype.add=function(e){return this._add=e,this},e.prototype.update=function(e){return this._update=e,this},e.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},e.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},e.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},e.prototype.remove=function(e){return this._remove=e,this},e.prototype.execute=function(){this[this._diffModeMultiple?`_executeMultiple`:`_executeOneToOne`]()},e.prototype._executeOneToOne=function(){var e=this._old,t=this._new,n={},r=Array(e.length),i=Array(t.length);this._initIndexMap(e,null,r,`_oldKeyGetter`),this._initIndexMap(t,n,i,`_newKeyGetter`);for(var a=0;a1){var l=s.shift();s.length===1&&(n[o]=s[0]),this._update&&this._update(l,a)}else c===1?(n[o]=null,this._update&&this._update(s,a)):this._remove&&this._remove(a)}this._performRestAdd(i,n)},e.prototype._executeMultiple=function(){var e=this._old,t=this._new,n={},r={},i=[],a=[];this._initIndexMap(e,n,i,`_oldKeyGetter`),this._initIndexMap(t,r,a,`_newKeyGetter`);for(var o=0;o1&&d===1)this._updateManyToOne&&this._updateManyToOne(l,c),r[s]=null;else if(u===1&&d>1)this._updateOneToMany&&this._updateOneToMany(l,c),r[s]=null;else if(u===1&&d===1)this._update&&this._update(l,c),r[s]=null;else if(u>1&&d>1)this._updateManyToMany&&this._updateManyToMany(l,c),r[s]=null;else if(u>1)for(var f=0;f1)for(var o=0;o30}var yC=K,bC=R,xC=typeof Int32Array>`u`?Array:Int32Array,SC=`e\0\0`,CC=-1,wC=[`hasItemOption`,`_nameList`,`_idList`,`_invertedIndicesMap`,`_dimSummary`,`userOutput`,`_rawData`,`_dimValueGetter`,`_nameDimIdx`,`_idDimIdx`,`_nameRepeatCount`],TC=[`_approximateExtent`],EC,DC,OC,kC,AC,jC,MC,NC=function(){function e(e,t){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 n,r=!1;hC(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(r=!0,n=e),n||=[`x`,`y`];for(var i={},a=[],o={},s=!1,c={},l=0;l=t)){var n=this._store.getProvider();this._updateOrdinalMeta();var r=this._nameList,i=this._idList;if(n.getSource().sourceFormat===`original`&&!n.pure)for(var a=[],o=e;o0},e.prototype.ensureUniqueItemVisual=function(e,t){var n=this._itemVisuals,r=n[e];r||=n[e]={};var i=r[t];return i??(i=this.getVisual(t),H(i)?i=i.slice():yC(i)&&(i=M({},i)),r[t]=i),i},e.prototype.setItemVisual=function(e,t,n){var r=this._itemVisuals[e]||{};this._itemVisuals[e]=r,yC(t)?M(r,t):r[t]=n},e.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},e.prototype.setLayout=function(e,t){yC(e)?M(this._layout,e):this._layout[e]=t},e.prototype.getLayout=function(e){return this._layout[e]},e.prototype.getItemLayout=function(e){return this._itemLayouts[e]},e.prototype.setItemLayout=function(e,t,n){this._itemLayouts[e]=n?M(this._itemLayouts[e]||{},t):t},e.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},e.prototype.setItemGraphicEl=function(e,t){ql(this.hostModel&&this.hostModel.seriesIndex,this.dataType,e,t),this._graphicEls[e]=t},e.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},e.prototype.eachItemGraphicEl=function(e,t){L(this._graphicEls,function(n,r){n&&e&&e.call(t,n,r)})},e.prototype.cloneShallow=function(t){return t||=new e(this._schema?this._schema:bC(this.dimensions,this._getDimInfo,this),this.hostModel),AC(t,this),t._store=this._store,t},e.prototype.wrapMethod=function(e,t){var n=this[e];U(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var e=n.apply(this,arguments);return t.apply(this,[e].concat(ge(arguments)))})},e.internalField=function(){EC=function(e){var t=e._invertedIndicesMap;L(t,function(n,r){var i=e._dimInfos[r],a=i.ordinalMeta,o=e._store;if(a){n=t[r]=new xC(a.categories.length);for(var s=0;s1&&(s+=`__ec__`+l),r[t]=s}}}(),e}();function PC(e,t){return FC(e,t).dimensions}function FC(e,t){u_(e)||(e=f_(e)),t||={};var n=t.coordDimensions||[],r=t.dimensionsDefine||e.dimensionsDefine||[],i=J(),a=[],o=LC(e,n,r,t.dimensionsCount),s=t.canOmitUnusedDimensions&&vC(o),c=r===e.dimensionsDefine,l=c?_C(e):gC(r),u=t.encodeDefine;!u&&t.encodeDefaulter&&(u=t.encodeDefaulter(e,o));for(var d=J(u),f=new cv(o),p=0;p0&&(r.name=i+(a-1)),a++,t.set(i,a)}}function LC(e,t,n,r){var i=Math.max(e.dimensionsDetectedCount||1,t.length,n.length,r||0);return L(t,function(e){var t;K(e)&&(t=e.dimsDef)&&(i=Math.max(i,t.length))}),i}function RC(e,t,n){if(n||t.hasKey(e)){for(var r=0;t.hasKey(e+r);)r++;e+=r}return t.set(e,!0),e}var zC=function(){function e(e){this.coordSysDims=[],this.axisMap=J(),this.categoryAxisMap=J(),this.coordSysName=e}return e}();function BC(e){var t=e.get(`coordinateSystem`),n=new zC(t),r=VC[t];if(r)return r(e,n,n.axisMap,n.categoryAxisMap),n}var VC={cartesian2d:function(e,t,n,r){var i=e.getReferringComponents(`xAxis`,as).models[0],a=e.getReferringComponents(`yAxis`,as).models[0];t.coordSysDims=[`x`,`y`],n.set(`x`,i),n.set(`y`,a),HC(i)&&(r.set(`x`,i),t.firstCategoryDimIndex=0),HC(a)&&(r.set(`y`,a),t.firstCategoryDimIndex??=1)},singleAxis:function(e,t,n,r){var i=e.getReferringComponents(`singleAxis`,as).models[0];t.coordSysDims=[`single`],n.set(`single`,i),HC(i)&&(r.set(`single`,i),t.firstCategoryDimIndex=0)},polar:function(e,t,n,r){var i=e.getReferringComponents(`polar`,as).models[0],a=i.findAxisModel(`radiusAxis`),o=i.findAxisModel(`angleAxis`);t.coordSysDims=[`radius`,`angle`],n.set(`radius`,a),n.set(`angle`,o),HC(a)&&(r.set(`radius`,a),t.firstCategoryDimIndex=0),HC(o)&&(r.set(`angle`,o),t.firstCategoryDimIndex??=1)},geo:function(e,t,n,r){t.coordSysDims=[`lng`,`lat`]},parallel:function(e,t,n,r){var i=e.ecModel,a=i.getComponent(`parallel`,e.get(`parallelIndex`)),o=t.coordSysDims=a.dimensions.slice();L(a.parallelAxisIndex,function(e,a){var s=i.getComponent(`parallelAxis`,e),c=o[a];n.set(c,s),HC(s)&&(r.set(c,s),t.firstCategoryDimIndex??=a)})},matrix:function(e,t,n,r){var i=e.getReferringComponents(`matrix`,as).models[0];t.coordSysDims=[`x`,`y`];var a=i.getDimensionModel(`x`),o=i.getDimensionModel(`y`);n.set(`x`,a),n.set(`y`,o),r.set(`x`,a),r.set(`y`,o)}};function HC(e){return e.get(`type`)===`category`}function UC(e,t,n){n||={};var r=n.byIndex,i=n.stackedCoordDimension,a,o,s;WC(t)?a=t:(o=t.schema,a=o.dimensions,s=t.store);var c=!!(e&&e.get(`stack`)),l,u,d,f;if(L(a,function(e,t){W(e)&&(a[t]=e={name:e}),c&&!e.isExtraCoord&&(!r&&!l&&e.ordinalMeta&&(l=e),!u&&e.type!==`ordinal`&&e.type!==`time`&&(!i||i===e.coordDim)&&(u=e))}),u&&!r&&!l&&(r=!0),u){d=`__\0ecstackresult_`+e.id,f=`__\0ecstackedover_`+e.id,l&&(l.createInvertedIndices=!0);var p=u.coordDim,m=u.type,h=0;L(a,function(e){e.coordDim===p&&h++});var g={name:d,coordDim:p,coordDimIndex:h,type:m,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},_={name:f,coordDim:f,coordDimIndex:h+1,type:m,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(g.storeDimIndex=s.ensureCalculationDimension(f,m),_.storeDimIndex=s.ensureCalculationDimension(d,m)),o.appendCalculationDimension(g),o.appendCalculationDimension(_)):(a.push(g),a.push(_))}return{stackedDimension:u&&u.name,stackedByDimension:l&&l.name,isStackedByIndex:r,stackedOverDimension:f,stackResultDimension:d}}function WC(e){return!hC(e.schema)}function GC(e,t){return!!t&&t===e.getCalculationInfo(`stackedDimension`)}function KC(e,t){return GC(e,t)?e.getCalculationInfo(`stackResultDimension`):t}function qC(e,t){var n=e.get(`coordinateSystem`),r=ph.get(n),i;return t&&t.coordSysDims&&(i=R(t.coordSysDims,function(e){var n={name:e},r=t.axisMap.get(e);return r&&(n.type=lC(r.get(`type`))),n})),i||=r&&(r.getDimensionsInfo?r.getDimensionsInfo():r.dimensions.slice())||[`x`,`y`],i}function JC(e,t,n){var r,i;return n&&L(e,function(e,a){var o=e.coordDim,s=n.categoryAxisMap.get(o);s&&(r??=a,e.ordinalMeta=s.getOrdinalMeta(),t&&(e.createInvertedIndices=!0)),e.otherDims.itemName!=null&&(i=!0)}),!i&&r!=null&&(e[r].otherDims.itemName=0),r}function YC(e,t,n){n||={};var r=t.getSourceManager(),i,a=!1;e?(a=!0,i=f_(e)):(i=r.getSource(),a=i.sourceFormat===Yh);var o=BC(t),s=qC(t,o),c=n.useEncodeDefaulter,l=U(c)?c:c?V(ag,s,t):null,u={coordDimensions:s,generateCoord:n.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:l,canOmitUnusedDimensions:!a},d=FC(i,u),f=JC(d.dimensions,n.createInvertedIndices,o),p=a?null:r.getSharedDataStore(d),m=UC(t,{schema:d,store:p}),h=new NC(d,t);h.setCalculationInfo(m);var g=f!=null&&XC(i)?function(e,t,n,r){return r===f?n:this.defaultDimValueGetter(e,t,n,r)}:null;return h.hasItemOption=!1,h.initData(a?i:p,null,g),h}function XC(e){if(e.sourceFormat===`original`)return!H(Ro(ZC(e.data||[])))}function ZC(e){for(var t=0;ti&&(o=a.interval=i);var s=a.intervalPrecision=tw(o);return rw(a.niceTickExtent=[no(Math.ceil(e[0]/o)*o,s),no(Math.floor(e[1]/o)*o,s)],e),a}function ew(e){var t=10**_o(e),n=e/t;return n?n===2?n=3:n===3?n=5:n*=2:n=1,no(n*t)}function tw(e){return io(e)+2}function nw(e,t,n){e[t]=Math.max(Math.min(e[t],n[1]),n[0])}function rw(e,t){!isFinite(e[0])&&(e[0]=t[0]),!isFinite(e[1])&&(e[1]=t[1]),nw(e,0,t),nw(e,1,t),e[0]>e[1]&&(e[0]=e[1])}function iw(e,t){return e>=t[0]&&e<=t[1]}var aw=function(){function e(){this.normalize=ow,this.scale=sw}return e.prototype.updateMethods=function(e){e.hasBreaks()?(this.normalize=B(e.normalize,e),this.scale=B(e.scale,e)):(this.normalize=ow,this.scale=sw)},e}();function ow(e,t){return t[1]===t[0]?.5:(e-t[0])/(t[1]-t[0])}function sw(e,t){return e*(t[1]-t[0])+t[0]}function cw(e,t,n){var r=Math.log(e);return[Math.log(n?t[0]:Math.max(0,t[0]))/r,Math.log(n?t[1]:Math.max(0,t[1]))/r]}var lw=function(){function e(e){this._calculator=new aw,this._setting=e||{},this._extent=[1/0,-1/0];var t=hm();t&&(this._brkCtx=t.createScaleBreakContext(),this._brkCtx.update(this._extent))}return e.prototype.getSetting=function(e){return this._setting[e]},e.prototype._innerUnionExtent=function(e){var t=this._extent;this._innerSetExtent(e[0]t[1]?e[1]:t[1])},e.prototype.unionExtentFromData=function(e,t){this._innerUnionExtent(e.getApproximateExtent(t))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.setExtent=function(e,t){this._innerSetExtent(e,t)},e.prototype._innerSetExtent=function(e,t){var n=this._extent;isNaN(e)||(n[0]=e),isNaN(t)||(n[1]=t),this._brkCtx&&this._brkCtx.update(n)},e.prototype.setBreaksFromOption=function(e){var t=hm();t&&this._innerSetBreak(t.parseAxisBreakOption(e,B(this.parse,this)))},e.prototype._innerSetBreak=function(e){this._brkCtx&&(this._brkCtx.setBreaks(e),this._calculator.updateMethods(this._brkCtx),this._brkCtx.update(this._extent))},e.prototype._innerGetBreaks=function(){return this._brkCtx?this._brkCtx.breaks:[]},e.prototype.hasBreaks=function(){return this._brkCtx?this._brkCtx.hasBreaks():!1},e.prototype._getExtentSpanWithBreaks=function(){return this._brkCtx&&this._brkCtx.hasBreaks()?this._brkCtx.getExtentSpan():this._extent[1]-this._extent[0]},e.prototype.isInExtentRange=function(e){return this._extent[0]<=e&&this._extent[1]>=e},e.prototype.isBlank=function(){return this._isBlank},e.prototype.setBlank=function(e){this._isBlank=e},e}();ws(lw);var uw=0,dw=function(){function e(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++uw,this._onCollect=e.onCollect}return e.createByAxisModel=function(t){var n=t.option,r=n.data,i=r&&R(r,fw);return new e({categories:i,needCollect:!i,deduplication:n.dedplication!==!1})},e.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},e.prototype.parseAndCollect=function(e){var t,n=this._needCollect;if(!W(e)&&!n)return e;if(n&&!this._deduplication)return t=this.categories.length,this.categories[t]=e,this._onCollect&&this._onCollect(e,t),t;var r=this._getOrCreateMap();return t=r.get(e),t??(n?(t=this.categories.length,this.categories[t]=e,r.set(e,t),this._onCollect&&this._onCollect(e,t)):t=NaN),t},e.prototype._getOrCreateMap=function(){return this._map||=J(this.categories)},e}();function fw(e){return K(e)&&e.value!=null?e.value:e+``}var pw=function(e){n(t,e);function t(t){var n=e.call(this,t)||this;n.type=`ordinal`;var r=n.getSetting(`ordinalMeta`);return r||=new dw({}),H(r)&&(r=new dw({categories:R(r,function(e){return K(e)?e.value:e})})),n._ordinalMeta=r,n._extent=n.getSetting(`extent`)||[0,r.categories.length-1],n}return t.prototype.parse=function(e){return e==null?NaN:W(e)?this._ordinalMeta.getOrdinal(e):Math.round(e)},t.prototype.contain=function(e){return iw(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}(lw);lw.registerClass(pw);var mw=no,hw=function(e){n(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=`interval`,t._interval=0,t._intervalPrecision=2,t}return t.prototype.parse=function(e){return e==null||e===``?NaN:Number(e)},t.prototype.contain=function(e){return iw(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=tw(e)},t.prototype.getTicks=function(e){e||={};var t=this._interval,n=this._extent,r=this._niceExtent,i=this._intervalPrecision,a=hm(),o=[];if(!t)return o;if(e.breakTicks===`only_break`&&a)return a.addBreaksToTicks(o,this._brkCtx.breaks,this._extent),o;var s=1e4;n[0]=0&&(l=mw(l+u*t,i))}if(o.length>0&&l===o[o.length-1].value)break;if(o.length>s)return[]}var d=o.length?o[o.length-1].value:r[1];return n[1]>d&&(e.expandToNicedExtent?o.push({value:mw(d+t,i)}):o.push({value:n[1]})),a&&a.pruneTicksByBreak(e.pruneByBreak,o,this._brkCtx.breaks,function(e){return e.value},this._interval,this._extent),e.breakTicks!==`none`&&a&&a.addBreaksToTicks(o,this._brkCtx.breaks,this._extent),o},t.prototype.getMinorTicks=function(e){for(var t=this.getTicks({expandToNicedExtent:!0}),n=[],r=this.getExtent(),i=1;ir[0]&&d0&&(a=a===null?s:Math.min(a,s))}n[r]=a}}return n}function ww(e){var t=Cw(e),n=[];return L(e,function(e){var r=e.coordinateSystem.getBaseAxis(),i=r.getExtent(),a;if(r.type===`category`)a=r.getBandWidth();else if(r.type===`value`||r.type===`time`){var o=t[r.dim+`_`+r.index],s=Math.abs(i[1]-i[0]),c=r.scale.getExtent(),l=Math.abs(c[1]-c[0]);a=o?s/l*o:s}else{var u=e.getData();a=Math.abs(i[1]-i[0])/u.count()}var d=$a(e.get(`barWidth`),a),f=$a(e.get(`barMaxWidth`),a),p=$a(e.get(`barMinWidth`)||(Aw(e)?.5:1),a),m=e.get(`barGap`),h=e.get(`barCategoryGap`),g=e.get(`defaultBarGap`);n.push({bandWidth:a,barWidth:d,barMaxWidth:f,barMinWidth:p,barGap:m,barCategoryGap:h,defaultBarGap:g,axisKey:xw(r),stackId:bw(e)})}),Tw(n)}function Tw(e){var t={};L(e,function(e,n){var r=e.axisKey,i=e.bandWidth,a=t[r]||{bandWidth:i,remainedWidth:i,autoWidthCount:0,categoryGap:null,gap:e.defaultBarGap||0,stacks:{}},o=a.stacks;t[r]=a;var s=e.stackId;o[s]||a.autoWidthCount++,o[s]=o[s]||{width:0,maxWidth:0};var c=e.barWidth;c&&!o[s].width&&(o[s].width=c,c=Math.min(a.remainedWidth,c),a.remainedWidth-=c);var l=e.barMaxWidth;l&&(o[s].maxWidth=l);var u=e.barMinWidth;u&&(o[s].minWidth=u);var d=e.barGap;d!=null&&(a.gap=d);var f=e.barCategoryGap;f!=null&&(a.categoryGap=f)});var n={};return L(t,function(e,t){n[t]={};var r=e.stacks,i=e.bandWidth,a=e.categoryGap;if(a==null){var o=z(r).length;a=Math.max(35-o*4,15)+`%`}var s=$a(a,i),c=$a(e.gap,1),l=e.remainedWidth,u=e.autoWidthCount,d=(l-s)/(u+(u-1)*c);d=Math.max(d,0),L(r,function(e){var t=e.maxWidth,n=e.minWidth;if(e.width){var r=e.width;t&&(r=Math.min(r,t)),n&&(r=Math.max(r,n)),e.width=r,l-=r+c*r,u--}else{var r=d;t&&tr&&(r=n),r!==d&&(e.width=r,l-=r+c*r,u--)}}),d=(l-s)/(u+(u-1)*c),d=Math.max(d,0);var f=0,p;L(r,function(e,t){e.width||=d,p=e,f+=e.width*(1+c)}),p&&(f-=p.width*c);var m=-f/2;L(r,function(e,r){n[t][r]=n[t][r]||{bandWidth:i,offset:m,width:e.width},m+=e.width*(1+c)})}),n}function Ew(e,t,n){if(e&&t){var r=e[xw(t)];return r!=null&&n!=null?r[bw(n)]:r}}function Dw(e,t){var n=Sw(e,t),r=ww(n);L(n,function(e){var t=e.getData(),n=e.coordinateSystem.getBaseAxis(),i=bw(e),a=r[xw(n)][i],o=a.offset,s=a.width;t.setLayout({bandWidth:a.bandWidth,offset:o,size:s})})}function Ow(e){return{seriesType:e,plan:ty(),reset:function(e){if(kw(e)){var t=e.getData(),n=e.coordinateSystem,r=n.getBaseAxis(),i=n.getOtherAxis(r),a=t.getDimensionIndex(t.mapDimension(i.dim)),o=t.getDimensionIndex(t.mapDimension(r.dim)),s=e.get(`showBackground`,!0),c=t.mapDimension(i.dim),l=t.getCalculationInfo(`stackResultDimension`),u=GC(t,c)&&!!t.getCalculationInfo(`stackedOnSeries`),d=i.isHorizontal(),f=jw(r,i),p=Aw(e),m=e.get(`barMinHeight`)||0,h=l&&t.getDimensionIndex(l),g=t.getLayout(`size`),_=t.getLayout(`offset`);return{progress:function(e,t){for(var r=e.count,i=p&&vw(r*3),c=p&&s&&vw(r*3),l=p&&vw(r),v=n.master.getRect(),y=d?v.width:v.height,b,x=t.getStore(),S=0;(b=e.next())!=null;){var C=x.get(u?h:a,b),w=x.get(o,b),T=f,E=void 0;u&&(E=+C-x.get(a,b));var D=void 0,O=void 0,k=void 0,A=void 0;if(d){var j=n.dataToPoint([C,w]);if(u){var M=n.dataToPoint([E,w]);T=M[0]}D=T,O=j[1]+_,k=j[0]-T,A=g,Math.abs(k)0?n:1:n))}var Mw=function(e,t,n,r){for(;n>>1;e[i][1]n&&(this._approxInterval=n);var i=Pw.length,a=Math.min(Mw(Pw,this._approxInterval,0,i),i-1);this._interval=Pw[a][1],this._intervalPrecision=tw(this._interval),this._minLevelUnit=Pw[Math.max(a-1,0)][0]},t.prototype.parse=function(e){return G(e)?e:+ho(e)},t.prototype.contain=function(e){return iw(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}(hw),Pw=[[`second`,gm],[`minute`,_m],[`hour`,vm],[`quarter-day`,vm*6],[`half-day`,vm*12],[`day`,ym*1.2],[`half-week`,ym*3.5],[`week`,ym*7],[`month`,ym*31],[`quarter`,ym*95],[`half-year`,bm/2],[`year`,bm]];function Fw(e,t,n,r){return Lm(new Date(t),e,r).getTime()===Lm(new Date(n),e,r).getTime()}function Iw(e,t){return e/=ym,e>16?16:e>7.5?7:e>3.5?4:e>1.5?2:1}function Lw(e){var t=30*ym;return e/=t,e>6?6:e>3?3:e>2?2:1}function Rw(e){return e/=vm,e>12?12:e>6?6:e>3.5?4:e>2?2:1}function zw(e,t){return e/=t?_m:gm,e>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}function Bw(e){return vo(e,!0)}function Vw(e,t,n){var r=Math.max(0,F(Em,t)-1);return Lm(new Date(e),Em[r],n).getTime()}function Hw(e,t){var n=new Date(0);n[e](1);var r=n.getTime();n[e](1+t);var i=n.getTime()-r;return function(e,t){return Math.max(0,Math.round((t-e)/i))}}function Uw(e,t,n,r,i,a){var o=1e4,s=Dm,c=0;function l(e,t,n,i,s,l,u){for(var d=Hw(s,e),f=t,p=new Date(f);fo));)if(p[s](p[i]()+e),f=p.getTime(),a){var m=a.calcNiceTickMultiple(f,d);m>0&&(p[s](p[i]()+m*e),f=p.getTime())}u.push({value:f,notAdd:!0})}function u(e,i,a){var o=[],s=!i.length;if(!Fw(jm(e),r[0],r[1],n)){s&&(i=[{value:Vw(r[0],e,n)},{value:r[1]}]);for(var c=0;c=r[0]&&u<=r[1]&&l(f,u,d,p,m,h,o),e===`year`&&a.length>1&&c===0&&a.unshift({value:a[0].value-f})}}for(var c=0;c=r[0]&&y<=r[1]&&p++)}var b=i/t;if(p>b*1.5&&m>b/1.5||(d.push(_),p>b||e===s[h]))break}f=[]}}for(var x=re(R(d,function(e){return re(e,function(e){return e.value>=r[0]&&e.value<=r[1]&&!e.notAdd})}),function(e){return e.length>0}),S=[],C=x.length-1,h=0;h0;)r*=10;var i=[Ww(Kw(t[0]/r)*r),Ww(Gw(t[1]/r)*r)];this._interval=r,this._intervalPrecision=tw(r),this._niceExtent=i}},t.prototype.calcNiceExtent=function(t){e.prototype.calcNiceExtent.call(this,t),this._fixMin=t.fixMin,this._fixMax=t.fixMax},t.prototype.contain=function(t){return t=Jw(t)/Jw(this.base),e.prototype.contain.call(this,t)},t.prototype.normalize=function(t){return t=Jw(t)/Jw(this.base),e.prototype.normalize.call(this,t)},t.prototype.scale=function(t){return t=e.prototype.scale.call(this,t),qw(this.base,t)},t.prototype.setBreaksFromOption=function(e){var t=hm();if(t){var n=t.logarithmicParseBreaksFromOption(e,this.base,B(this.parse,this)),r=n.parsedOriginal,i=n.parsedLogged;this._originalScale._innerSetBreak(r),this._innerSetBreak(i)}},t.type=`log`,t}(hw);function Xw(e,t){return Ww(e,io(t))}lw.registerClass(Yw);var Zw=function(){function e(e,t,n){this._prepareParams(e,t,n)}return e.prototype._prepareParams=function(e,t,n){n[1]0&&s>0&&!c&&(o=0),o<0&&s<0&&!l&&(s=0));var d=this._determinedMin,f=this._determinedMax;return d!=null&&(o=d,c=!0),f!=null&&(s=f,l=!0),{min:o,max:s,minFixed:c,maxFixed:l,isBlank:u}},e.prototype.modifyDataMinMax=function(e,t){this[$w[e]]=t},e.prototype.setDeterminedMinMax=function(e,t){var n=Qw[e];this[n]=t},e.prototype.freeze=function(){this.frozen=!0},e}(),Qw={min:`_determinedMin`,max:`_determinedMax`},$w={min:`_dataMin`,max:`_dataMax`};function eT(e,t,n){var r=e.rawExtentInfo;return r||(r=new Zw(e,t,n),e.rawExtentInfo=r,r)}function tT(e,t){return t==null?null:pe(t)?NaN:e.parse(t)}function nT(e,t){var n=e.type,r=eT(e,t,e.getExtent()).calculate();e.setBlank(r.isBlank);var i=r.min,a=r.max,o=t.ecModel;if(o&&n===`time`){var s=Sw(`bar`,o),c=!1;if(L(s,function(e){c||=e.getBaseAxis()===t.axis}),c){var l=ww(s),u=rT(i,a,t,l);i=u.min,a=u.max}}return{extent:[i,a],fixMin:r.minFixed,fixMax:r.maxFixed}}function rT(e,t,n,r){var i=n.axis.getExtent(),a=Math.abs(i[1]-i[0]),o=Ew(r,n.axis);if(o===void 0)return{min:e,max:t};var s=1/0;L(o,function(e){s=Math.min(e.offset,s)});var c=-1/0;L(o,function(e){c=Math.max(e.offset+e.width,c)}),s=Math.abs(s),c=Math.abs(c);var l=s+c,u=t-e,d=u/(1-(s+c)/a)-u;return t+=c/l*d,e-=s/l*d,{min:e,max:t}}function iT(e,t){var n=t,r=nT(e,n),i=r.extent,a=n.get(`splitNumber`);e instanceof Yw&&(e.base=n.get(`logBase`));var o=e.type,s=n.get(`interval`),c=o===`interval`||o===`time`;e.setBreaksFromOption(mT(n)),e.setExtent(i[0],i[1]),e.calcNiceExtent({splitNumber:a,fixMin:r.fixMin,fixMax:r.fixMax,minInterval:c?n.get(`minInterval`):null,maxInterval:c?n.get(`maxInterval`):null}),s!=null&&e.setInterval&&e.setInterval(s)}function aT(e,t){if(t||=e.get(`type`),t)switch(t){case`category`:return new pw({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:[1/0,-1/0]});case`time`:return new Nw({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get(`useUTC`)});default:return new((lw.getClass(t))||hw)}}function oT(e){var t=e.scale.getExtent(),n=t[0],r=t[1];return!(n>0&&r>0||n<0&&r<0)}function sT(e){var t=e.getLabelModel().get(`formatter`);if(e.type===`time`){var n=Om(t);return function(t,r){return e.scale.getFormattedLabel(t,r,n)}}else if(W(t))return function(n){var r=e.scale.getLabel(n);return t.replace(`{value}`,r??``)};else if(U(t)){if(e.type===`category`)return function(n,r){return t(cT(e,n),n.value-e.scale.getExtent()[0],null)};var r=hm();return function(n,i){var a=null;return r&&(a=r.makeAxisLabelFormatterParamBreak(a,n.break)),t(cT(e,n),i,a)}}else return function(t){return e.scale.getLabel(t)}}function cT(e,t){return e.type===`category`?e.scale.getLabel(t):t.value}function lT(e){return e.get(`interval`)??`auto`}function uT(e){return e.type===`category`&&lT(e.getLabelModel())===0}function dT(e,t){var n={};return L(e.mapDimensionsAll(t),function(t){n[KC(e,t)]=!0}),z(n)}function fT(e){return e===`middle`||e===`center`}function pT(e){return e.getShallow(`show`)}function mT(e){var t=e.get(`breaks`,!0);if(t!=null)return!hm()||!hT(e.axis)?void 0:t}function hT(e){return(e.dim===`x`||e.dim===`y`||e.dim===`z`||e.dim===`single`)&&e.type!==`category`}var gT=function(){function e(){}return e.prototype.getNeedCrossZero=function(){return!this.option.scale},e.prototype.getCoordSysModel=function(){},e}(),_T=e({createDimensions:()=>PC,createList:()=>vT,createScale:()=>bT,createSymbol:()=>fb,createTextStyle:()=>ST,dataStack:()=>yT,enableHoverEmphasis:()=>Hu,getECData:()=>Z,getLayoutRect:()=>Ah,mixinAxisModelCommonMethods:()=>xT});function vT(e){return YC(null,e)}var yT={isDimensionStacked:GC,enableDataStack:UC,getStackedDimension:KC};function bT(e,t){var n=t;t instanceof Xp||(n=new Xp(t));var r=aT(n);return r.setExtent(e[0],e[1]),iT(r,n),r}function xT(e){I(e,gT)}function ST(e,t){return t||={},Op(e,null,null,t.state!==`normal`)}var CT=[],wT={registerPreprocessor:LS,registerProcessor:RS,registerPostInit:zS,registerPostUpdate:BS,registerUpdateLifecycle:VS,registerAction:HS,registerCoordinateSystem:US,registerLayout:KS,registerVisual:qS,registerTransform:eC,registerLoading:XS,registerMap:QS,registerImpl:ux,PRIORITY:Nx,ComponentModel:Rh,ComponentView:ey,SeriesModel:Gv,ChartView:iy,registerComponentModel:function(e){Rh.registerClass(e)},registerComponentView:function(e){ey.registerClass(e)},registerSeriesModel:function(e){Gv.registerClass(e)},registerChartView:function(e){iy.registerClass(e)},registerCustomSeries:function(e,t){px(e,t)},registerSubTypeDefaulter:function(e,t){Rh.registerSubTypeDefaulter(e,t)},registerPainter:function(e,t){Va(e,t)}};function TT(e){if(H(e)){L(e,function(e){TT(e)});return}F(CT,e)>=0||(CT.push(e),U(e)&&(e={install:e}),e.install(wT))}var ET=1e-8;function DT(e,t){return Math.abs(e-t)n&&(t=i,n=o)}if(t)return MT(t.exterior);var s=this.getBoundingRect();return[s.x+s.width/2,s.y+s.height/2]},t.prototype.getBoundingRect=function(e){var t=this._rect;if(t&&!e)return t;var n=[1/0,1/0],r=[-1/0,-1/0],i=this.geometries;return L(i,function(t){t.type===`polygon`?jT(t.exterior,n,r,e):L(t.points,function(t){jT(t,n,r,e)})}),isFinite(n[0])&&isFinite(n[1])&&isFinite(r[0])&&isFinite(r[1])||(n[0]=n[1]=r[0]=r[1]=0),t=new X(n[0],n[1],r[0]-n[0],r[1]-n[1]),e||(this._rect=t),t},t.prototype.contain=function(e){var t=this.getBoundingRect(),n=this.geometries;if(!t.contain(e[0],e[1]))return!1;loopGeo:for(var r=0,i=n.length;r>1^-(s&1),c=c>>1^-(c&1),s+=i,c+=a,i=s,a=c,r.push([s/n,c/n])}return r}function BT(e,t){return e=LT(e),R(re(e.features,function(e){return e.geometry&&e.properties&&e.geometry.coordinates.length>0}),function(e){var n=e.properties,r=e.geometry,i=[];switch(r.type){case`Polygon`:var a=r.coordinates;i.push(new PT(a[0],a.slice(1)));break;case`MultiPolygon`:L(r.coordinates,function(e){e[0]&&i.push(new PT(e[0],e.slice(1)))});break;case`LineString`:i.push(new FT([r.coordinates]));break;case`MultiLineString`:i.push(new FT(r.coordinates))}var o=new IT(n[t||`name`],i,n.cp);return o.properties=n,o})}var VT=e({MAX_SAFE_INTEGER:()=>uo,asc:()=>ro,getPercentWithPrecision:()=>so,getPixelPrecision:()=>oo,getPrecision:()=>io,getPrecisionSafe:()=>ao,isNumeric:()=>So,isRadianAroundZero:()=>po,linearMap:()=>Qa,nice:()=>vo,numericToNumber:()=>xo,parseDate:()=>ho,parsePercent:()=>$a,quantile:()=>yo,quantity:()=>go,quantityExponent:()=>_o,reformIntervals:()=>bo,remRadian:()=>fo,round:()=>no}),HT=e({format:()=>Pm,parse:()=>ho,roundTime:()=>Lm}),UT=e({Arc:()=>sf,BezierCurve:()=>af,BoundingRect:()=>X,Circle:()=>wd,CompoundPath:()=>cf,Ellipse:()=>Ed,Group:()=>Aa,Image:()=>bl,IncrementalDisplayable:()=>Sf,Line:()=>ef,LinearGradient:()=>uf,Polygon:()=>Yd,Polyline:()=>Zd,RadialGradient:()=>df,Rect:()=>Ol,Ring:()=>Gd,Sector:()=>Ud,Text:()=>Nl,clipPointsByRect:()=>np,clipRectByRect:()=>rp,createIcon:()=>ip,extendPath:()=>zf,extendShape:()=>Lf,getShapeClass:()=>Vf,getTransform:()=>Xf,initProps:()=>Df,makeImage:()=>Uf,makePath:()=>Hf,mergePath:()=>Gf,registerShape:()=>Bf,resizePath:()=>Kf,updateProps:()=>Ef}),WT=e({addCommas:()=>$m,capitalFirst:()=>ch,encodeHTML:()=>wt,formatTime:()=>sh,formatTpl:()=>ah,getTextRect:()=>Qm,getTooltipMarker:()=>oh,normalizeCssArray:()=>th,toCamelCase:()=>eh,truncateText:()=>Ps}),GT=e({bind:()=>B,clone:()=>k,curry:()=>V,defaults:()=>N,each:()=>L,extend:()=>M,filter:()=>re,indexOf:()=>F,inherits:()=>ee,isArray:()=>H,isFunction:()=>U,isObject:()=>K,isString:()=>W,map:()=>R,merge:()=>A,reduce:()=>ne}),KT=ts(),qT=ts(),JT={estimate:1,determine:2};function YT(e){return{out:{noPxChangeTryDetermine:[]},kind:e}}function XT(e,t){var n=R(t,function(t){return e.scale.parse(t)});return e.type===`time`&&n.length>0&&(n.sort(),n.unshift(n[0]),n.push(n[n.length-1])),n}function ZT(e,t){var n=e.getLabelModel().get(`customValues`);if(n){var r=sT(e),i=e.scale.getExtent();return{labels:R(re(XT(e,n),function(e){return e>=i[0]&&e<=i[1]}),function(t){var n={value:t};return{formattedLabel:r(n),rawLabel:e.scale.getLabel(n),tickValue:t,time:void 0,break:void 0}})}}return e.type===`category`?$T(e,t):nE(e)}function QT(e,t,n){var r=e.getTickModel().get(`customValues`);if(r){var i=e.scale.getExtent();return{ticks:re(XT(e,r),function(e){return e>=i[0]&&e<=i[1]})}}return e.type===`category`?tE(e,t):{ticks:R(e.scale.getTicks(n),function(e){return e.value})}}function $T(e,t){var n=e.getLabelModel(),r=eE(e,n,t);return!n.get(`show`)||e.scale.isBlank()?{labels:[]}:r}function eE(e,t,n){var r=iE(e),i=lT(t),a=n.kind===JT.estimate;if(!a){var o=oE(r,i);if(o)return o}var s,c;U(i)?s=mE(e,i):(c=i===`auto`?cE(e,n):i,s=pE(e,c));var l={labels:s,labelCategoryInterval:c};return a?n.out.noPxChangeTryDetermine.push(function(){return sE(r,i,l),!0}):sE(r,i,l),l}function tE(e,t){var n=rE(e),r=lT(t),i=oE(n,r);if(i)return i;var a,o;if((!t.get(`show`)||e.scale.isBlank())&&(a=[]),U(r))a=mE(e,r,!0);else if(r===`auto`){var s=eE(e,e.getLabelModel(),YT(JT.determine));o=s.labelCategoryInterval,a=R(s.labels,function(e){return e.tickValue})}else o=r,a=pE(e,o,!0);return sE(n,r,{ticks:a,tickCategoryInterval:o})}function nE(e){var t=e.scale.getTicks(),n=sT(e);return{labels:R(t,function(t,r){return{formattedLabel:n(t,r),rawLabel:e.scale.getLabel(t),tickValue:t.value,time:t.time,break:t.break}})}}var rE=aE(`axisTick`),iE=aE(`axisLabel`);function aE(e){return function(t){return qT(t)[e]||(qT(t)[e]={list:[]})}}function oE(e,t){for(var n=0;nu&&(l=Math.max(1,Math.floor(c/u)));for(var d=s[0],f=e.dataToCoord(d+1)-e.dataToCoord(d),p=Math.abs(f*Math.cos(a)),m=Math.abs(f*Math.sin(a)),h=0,g=0;d<=s[1];d+=l){var _=0,v=0,y=ua(i({value:d}),r.font,`center`,`top`);_=y.width*1.3,v=y.height*1.3,h=Math.max(h,_,7),g=Math.max(g,v,7)}var b=h/p,x=g/m;isNaN(b)&&(b=1/0),isNaN(x)&&(x=1/0);var S=Math.max(0,Math.floor(Math.min(b,x)));return n===JT.estimate?(t.out.noPxChangeTryDetermine.push(B(uE,null,e,S,c)),S):dE(e,S,c)??S}function uE(e,t,n){return dE(e,t,n)==null}function dE(e,t,n){var r=KT(e.model),i=e.getExtent(),a=r.lastAutoInterval,o=r.lastTickCount;if(a!=null&&o!=null&&Math.abs(a-t)<=1&&Math.abs(o-n)<=1&&a>t&&r.axisExtent0===i[0]&&r.axisExtent1===i[1])return a;r.lastTickCount=n,r.lastAutoInterval=t,r.axisExtent0=i[0],r.axisExtent1=i[1]}function fE(e){var t=e.getLabelModel();return{axisRotate:e.getRotate?e.getRotate():e.isHorizontal&&!e.isHorizontal()?90:0,labelRotate:t.get(`rotate`)||0,font:t.getFont()}}function pE(e,t,n){var r=sT(e),i=e.scale,a=i.getExtent(),o=e.getLabelModel(),s=[],c=Math.max((t||0)+1,1),l=a[0],u=i.count();l!==0&&c>1&&u/c>2&&(l=Math.round(Math.ceil(l/c)*c));var d=uT(e),f=o.get(`showMinLabel`)||d,p=o.get(`showMaxLabel`)||d;f&&l!==a[0]&&h(a[0]);for(var m=l;m<=a[1];m+=c)h(m);p&&m-c!==a[1]&&h(a[1]);function h(e){var t={value:e};s.push(n?e:{formattedLabel:r(t),rawLabel:i.getLabel(t),tickValue:e,time:void 0,break:void 0})}return s}function mE(e,t,n){var r=e.scale,i=sT(e),a=[];return L(r.getTicks(),function(e){var o=r.getLabel(e),s=e.value;t(e.value,o)&&a.push(n?s:{formattedLabel:i(e),rawLabel:o,tickValue:s,time:void 0,break:void 0})}),a}var hE=[0,1],gE=function(){function e(e,t,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=n||[0,0]}return e.prototype.contain=function(e){var t=this._extent,n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]);return e>=n&&e<=r},e.prototype.containData=function(e){return this.scale.contain(this.scale.parse(e))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.getPixelPrecision=function(e){return oo(e||this.scale.getExtent(),this._extent)},e.prototype.setExtent=function(e,t){var n=this._extent;n[0]=e,n[1]=t},e.prototype.dataToCoord=function(e,t){var n=this._extent,r=this.scale;return e=r.normalize(r.parse(e)),this.onBand&&r.type===`ordinal`&&(n=n.slice(),_E(n,r.count())),Qa(e,hE,n,t)},e.prototype.coordToData=function(e,t){var n=this._extent,r=this.scale;this.onBand&&r.type===`ordinal`&&(n=n.slice(),_E(n,r.count()));var i=Qa(e,n,hE,t);return this.scale.scale(i)},e.prototype.pointToData=function(e,t){},e.prototype.getTicksCoords=function(e){e||={};var t=e.tickModel||this.getTickModel(),n=QT(this,t,{breakTicks:e.breakTicks,pruneByBreak:e.pruneByBreak}).ticks,r=R(n,function(e){return{coord:this.dataToCoord(this.scale.type===`ordinal`?this.scale.getRawOrdinalNumber(e):e),tickValue:e}},this),i=t.get(`alignWithLabel`);return vE(this,r,i,e.clamp),r},e.prototype.getMinorTicksCoords=function(){if(this.scale.type===`ordinal`)return[];var e=this.model.getModel(`minorTick`).get(`splitNumber`);return e>0&&e<100||(e=5),R(this.scale.getMinorTicks(e),function(e){return R(e,function(e){return{coord:this.dataToCoord(e),tickValue:e}},this)},this)},e.prototype.getViewLabels=function(e){return e||=YT(JT.determine),ZT(this,e).labels},e.prototype.getLabelModel=function(){return this.model.getModel(`axisLabel`)},e.prototype.getTickModel=function(){return this.model.getModel(`axisTick`)},e.prototype.getBandWidth=function(){var e=this._extent,t=this.scale.getExtent(),n=t[1]-t[0]+ +!!this.onBand;n===0&&(n=1);var r=Math.abs(e[1]-e[0]);return Math.abs(r)/n},e.prototype.calculateCategoryInterval=function(e){return e||=YT(JT.determine),lE(this,e)},e}();function _E(e,t){var n=(e[1]-e[0])/t/2;e[0]+=n,e[1]-=n}function vE(e,t,n,r){var i=t.length;if(!e.onBand||n||!i)return;var a=e.getExtent(),o,s;if(i===1)t[0].coord=a[0],t[0].onBand=!0,o=t[1]={coord:a[1],tickValue:t[0].tickValue,onBand:!0};else{var c=t[i-1].tickValue-t[0].tickValue,l=(t[i-1].coord-t[0].coord)/c;L(t,function(e){e.coord-=l/2,e.onBand=!0});var u=e.scale.getExtent();s=1+u[1]-t[i-1].tickValue,o={coord:t[i-1].coord+l*s,tickValue:u[1]+1,onBand:!0},t.push(o)}var d=a[0]>a[1];f(t[0].coord,a[0])&&(r?t[0].coord=a[0]:t.shift()),r&&f(a[0],t[0].coord)&&t.unshift({coord:a[0],onBand:!0}),f(a[1],o.coord)&&(r?o.coord=a[1]:t.pop()),r&&f(o.coord,a[1])&&t.push({coord:a[1],onBand:!0});function f(e,t){return e=no(e),t=no(t),d?e>t:e0){t=t/180*Math.PI,wE.fromArray(e[0]),TE.fromArray(e[1]),EE.fromArray(e[2]),Y.sub(DE,wE,TE),Y.sub(OE,EE,TE);var n=DE.len(),r=OE.len();if(!(n<.001||r<.001)){DE.scale(1/n),OE.scale(1/r);var i=DE.dot(OE);if(Math.cos(t)1&&Y.copy(AE,EE),AE.toArray(e[1])}}}}function ME(e,t,n){if(n<=180&&n>0){n=n/180*Math.PI,wE.fromArray(e[0]),TE.fromArray(e[1]),EE.fromArray(e[2]),Y.sub(DE,TE,wE),Y.sub(OE,EE,TE);var r=DE.len(),i=OE.len();if(!(r<.001||i<.001)&&(DE.scale(1/r),OE.scale(1/i),DE.dot(t)=o)Y.copy(AE,EE);else{AE.scaleAndAdd(OE,a/Math.tan(Math.PI/2-s));var c=EE.x===TE.x?(AE.y-TE.y)/(EE.y-TE.y):(AE.x-TE.x)/(EE.x-TE.x);if(isNaN(c))return;c<0?Y.copy(AE,TE):c>1&&Y.copy(AE,EE)}AE.toArray(e[1])}}}function NE(e,t,n,r){var i=n===`normal`,a=i?e:e.ensureState(n);a.ignore=t;var o=r.get(`smooth`);o&&o===!0&&(o=.3),a.shape=a.shape||{},o>0&&(a.shape.smooth=o);var s=r.getModel(`lineStyle`).getLineStyle();i?e.useStyle(s):a.style=s}function PE(e,t){var n=t.smooth,r=t.points;if(r)if(e.moveTo(r[0][0],r[0][1]),n>0&&r.length>=3){var i=et(r[0],r[1]),a=et(r[1],r[2]);if(!i||!a){e.lineTo(r[1][0],r[1][1]),e.lineTo(r[2][0],r[2][1]);return}var o=Math.min(i,a)*n,s=it([],r[1],r[0],o/i),c=it([],r[1],r[2],o/a),l=it([],s,c,.5);e.bezierCurveTo(s[0],s[1],s[0],s[1],l[0],l[1]),e.bezierCurveTo(c[0],c[1],c[0],c[1],r[2][0],r[2][1])}else for(var u=1;u0&&i&&S(-d/a,0,a);var g=e[0],_=e[a-1],v,y;b(),v<0&&C(-v,.8),y<0&&C(y,.8),b(),x(v,y,1),x(y,v,-1),b(),v<0&&w(-v),y<0&&w(y);function b(){v=g.rect[o]-n,y=r-_.rect[o]-_.rect[s]}function x(e,t,n){if(e<0){var r=Math.min(t,-e);if(r>0){S(r*n,0,a);var i=r+e;i<0&&C(-i*n,1)}else C(-e*n,1)}}function S(t,n,r){t!==0&&(u=!0);for(var i=n;i0)for(var c=0;c0;c--){var f=r[c-1]*d;S(-f,c,a)}}}function w(e){var t=e<0?-1:1;e=Math.abs(e);for(var n=Math.ceil(e/(a-1)),r=0;r0?S(n,0,r+1):S(-n,a-r-1,a),e-=n,e<=0)return}return u}function ZE(e){var t=[];e.sort(function(e,t){return!!t.suggestIgnore-+!!e.suggestIgnore||t.priority-e.priority});function n(e){if(!e.ignore){var t=e.ensureState(`emphasis`);t.ignore??=!1}e.ignore=!0}for(var r=0;rgE,ChartView:()=>iy,ComponentModel:()=>Rh,ComponentView:()=>ey,List:()=>NC,Model:()=>Xp,PRIORITY:()=>Nx,SeriesModel:()=>Gv,color:()=>vr,connect:()=>AS,dataTool:()=>nC,dependencies:()=>hx,disConnect:()=>MS,disconnect:()=>jS,dispose:()=>NS,env:()=>i,extendChartView:()=>SE,extendComponentModel:()=>yE,extendComponentView:()=>bE,extendSeriesModel:()=>xE,format:()=>WT,getCoordinateSystemDimensions:()=>WS,getInstanceByDom:()=>PS,getInstanceById:()=>FS,getMap:()=>$S,graphic:()=>UT,helper:()=>_T,init:()=>kS,innerDrawElementOnCanvas:()=>Yb,matrix:()=>Bt,number:()=>VT,parseGeoJSON:()=>BT,parseGeoJson:()=>BT,registerAction:()=>HS,registerCoordinateSystem:()=>US,registerCustomSeries:()=>GS,registerLayout:()=>KS,registerLoading:()=>XS,registerLocale:()=>um,registerMap:()=>QS,registerPostInit:()=>zS,registerPostUpdate:()=>BS,registerPreprocessor:()=>LS,registerProcessor:()=>RS,registerTheme:()=>IS,registerTransform:()=>eC,registerUpdateLifecycle:()=>VS,registerVisual:()=>qS,setCanvasCreator:()=>ZS,setPlatformAPI:()=>p,throttle:()=>py,time:()=>HT,use:()=>TT,util:()=>GT,vector:()=>Ie,version:()=>mx,zrUtil:()=>m,zrender:()=>ja}),eD=function(e){n(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return t.prototype.getInitialData=function(e){return YC(null,this,{useEncodeDefaulter:!0})},t.prototype.getLegendIcon=function(e){var t=new Aa,n=fb(`line`,0,e.itemHeight/2,e.itemWidth,0,e.lineStyle.stroke,!1);t.add(n),n.setStyle(e.lineStyle);var r=this.getData().getVisual(`symbol`),i=this.getData().getVisual(`symbolRotate`),a=r===`none`?`circle`:r,o=e.itemHeight*.8,s=fb(a,(e.itemWidth-o)/2,(e.itemHeight-o)/2,o,o,e.itemStyle.fill);return t.add(s),s.setStyle(e.itemStyle),s.rotation=(e.iconRotate===`inherit`?i:e.iconRotate||0)*Math.PI/180,s.setOrigin([e.itemWidth/2,e.itemHeight/2]),a.indexOf(`empty`)>-1&&(s.style.stroke=s.style.fill,s.style.fill=Q.color.neutral00,s.style.lineWidth=2),t},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}(Gv);function tD(e,t){var n=e.mapDimensionsAll(`defaultedLabel`),r=n.length;if(r===1){var i=R_(e,t,n[0]);return i==null?null:i+``}else if(r){for(var a=[],o=0;o=0&&r.push(t[a])}return r.join(` `)}var rD=function(e){n(t,e);function t(t,n,r,i){var a=e.call(this)||this;return a.updateData(t,n,r,i),a}return t.prototype._createSymbol=function(e,t,n,r,i,a){this.removeAll();var o=fb(e,-1,-1,2,2,null,a);o.attr({z2:q(i,100),culling:!0,scaleX:r[0]/2,scaleY:r[1]/2}),o.drift=iD,this._symbolType=e,this.add(o)},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(){Tu(this.childAt(0))},t.prototype.downplay=function(){Eu(this.childAt(0))},t.prototype.setZ=function(e,t){var n=this.childAt(0);n.zlevel=e,n.z=t},t.prototype.setDraggable=function(e,t){var n=this.childAt(0);n.draggable=e,n.cursor=!t&&e?`move`:n.cursor},t.prototype.updateData=function(e,n,r,i){this.silent=!1;var a=e.getItemVisual(n,`symbol`)||`circle`,o=e.hostModel,s=t.getSymbolSize(e,n),c=t.getSymbolZ2(e,n),l=a!==this._symbolType,u=i&&i.disableAnimation;if(l){var d=e.getItemVisual(n,`symbolKeepAspect`);this._createSymbol(a,e,n,s,c,d)}else{var f=this.childAt(0);f.silent=!1;var p={scaleX:s[0]/2,scaleY:s[1]/2};u?f.attr(p):Ef(f,p,o,n),Mf(f)}if(this._updateCommon(e,n,s,r,i),l){var f=this.childAt(0);if(!u){var p={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:f.style.opacity}};f.scaleX=f.scaleY=0,f.style.opacity=0,Df(f,p,o,n)}}u&&this.childAt(0).stopAnimation(`leave`)},t.prototype._updateCommon=function(e,t,n,r,i){var a=this.childAt(0),o=e.hostModel,s,c,l,u,d,f,p,m,h;if(r&&(s=r.emphasisItemStyle,c=r.blurItemStyle,l=r.selectItemStyle,u=r.focus,d=r.blurScope,p=r.labelStatesModels,m=r.hoverScale,h=r.cursorStyle,f=r.emphasisDisabled),!r||e.hasItemOption){var g=r&&r.itemModel?r.itemModel:e.getItemModel(t),_=g.getModel(`emphasis`);s=_.getModel(`itemStyle`).getItemStyle(),l=g.getModel([`select`,`itemStyle`]).getItemStyle(),c=g.getModel([`blur`,`itemStyle`]).getItemStyle(),u=_.get(`focus`),d=_.get(`blurScope`),f=_.get(`disabled`),p=Dp(g),m=_.getShallow(`scale`),h=g.getShallow(`cursor`)}var v=e.getItemVisual(t,`symbolRotate`);a.attr(`rotation`,(v||0)*Math.PI/180||0);var y=mb(e.getItemVisual(t,`symbolOffset`),n);y&&(a.x=y[0],a.y=y[1]),h&&a.attr(`cursor`,h);var b=e.getItemVisual(t,`style`),x=b.fill;if(a instanceof bl){var S=a.style;a.useStyle(M({image:S.image,x:S.x,y:S.y,width:S.width,height:S.height},b))}else a.__isEmptyBrush?a.useStyle(M({},b)):a.useStyle(b),a.style.decal=null,a.setColor(x,i&&i.symbolInnerColor),a.style.strokeNoScale=!0;var C=e.getItemVisual(t,`liftZ`),w=this._z2;C==null?w!=null&&(a.z2=w,this._z2=null):w??(this._z2=a.z2,a.z2+=C);var T=i&&i.useNameLabel;Ep(a,p,{labelFetcher:o,labelDataIndex:t,defaultText:E,inheritColor:x,defaultOpacity:b.opacity});function E(t){return T?e.getName(t):tD(e,t)}this._sizeX=n[0]/2,this._sizeY=n[1]/2;var D=a.ensureState(`emphasis`);D.style=s,a.ensureState(`select`).style=l,a.ensureState(`blur`).style=c;var O=m==null||m===!0?Math.max(1.1,3/this._sizeY):isFinite(m)&&m>0?+m:1;D.scaleX=this._sizeX*O,D.scaleY=this._sizeY*O,this.setSymbolScale(1),Wu(this,u,d,f)},t.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},t.prototype.fadeOut=function(e,t,n){var r=this.childAt(0),i=Z(this).dataIndex,a=n&&n.animation;if(this.silent=r.silent=!0,n&&n.fadeLabel){var o=r.getTextContent();o&&kf(o,{style:{opacity:0}},t,{dataIndex:i,removeOpt:a,cb:function(){r.removeTextContent()}})}else r.removeTextContent();kf(r,{style:{opacity:0},scaleX:0,scaleY:0},t,{dataIndex:i,cb:e,removeOpt:a})},t.getSymbolSize=function(e,t){return pb(e.getItemVisual(t,`symbolSize`))},t.getSymbolZ2=function(e,t){return e.getItemVisual(t,`z2`)},t}(Aa);function iD(e,t){this.parent.drift(e,t)}function aD(e,t,n,r){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(r.isIgnore&&r.isIgnore(n))&&!(r.clipShape&&!r.clipShape.contain(t[0],t[1]))&&e.getItemVisual(n,`symbol`)!==`none`}function oD(e){return e!=null&&!K(e)&&(e={isIgnore:e}),e||{}}function sD(e){var t=e.hostModel,n=t.getModel(`emphasis`);return{emphasisItemStyle:n.getModel(`itemStyle`).getItemStyle(),blurItemStyle:t.getModel([`blur`,`itemStyle`]).getItemStyle(),selectItemStyle:t.getModel([`select`,`itemStyle`]).getItemStyle(),focus:n.get(`focus`),blurScope:n.get(`blurScope`),emphasisDisabled:n.get(`disabled`),hoverScale:n.get(`scale`),labelStatesModels:Dp(t),cursorStyle:t.get(`cursor`)}}var cD=function(){function e(e){this.group=new Aa,this._SymbolCtor=e||rD}return e.prototype.updateData=function(e,t){this._progressiveEls=null,t=oD(t);var n=this.group,r=e.hostModel,i=this._data,a=this._SymbolCtor,o=t.disableAnimation,s=sD(e),c={disableAnimation:o},l=t.getSymbolPoint||function(t){return e.getItemLayout(t)};i||n.removeAll(),e.diff(i).add(function(r){var i=l(r);if(aD(e,i,r,t)){var o=new a(e,r,s,c);o.setPosition(i),e.setItemGraphicEl(r,o),n.add(o)}}).update(function(u,d){var f=i.getItemGraphicEl(d),p=l(u);if(!aD(e,p,u,t)){n.remove(f);return}var m=e.getItemVisual(u,`symbol`)||`circle`,h=f&&f.getSymbolType&&f.getSymbolType();if(!f||h&&h!==m)n.remove(f),f=new a(e,u,s,c),f.setPosition(p);else{f.updateData(e,u,s,c);var g={x:p[0],y:p[1]};o?f.attr(g):Ef(f,g,r)}n.add(f),e.setItemGraphicEl(u,f)}).remove(function(e){var t=i.getItemGraphicEl(e);t&&t.fadeOut(function(){n.remove(t)},r)}).execute(),this._getSymbolPoint=l,this._data=e},e.prototype.updateLayout=function(){var e=this,t=this._data;t&&t.eachItemGraphicEl(function(t,n){var r=e._getSymbolPoint(n);t.setPosition(r),t.markRedraw()})},e.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=sD(e),this._data=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(e,t,n){this._progressiveEls=[],n=oD(n);function r(e){e.isGroup||(e.incremental=!0,e.ensureState(`emphasis`).hoverLayer=!0)}for(var i=e.start;i0?n=r[0]:r[1]<0&&(n=r[1]),n}function dD(e,t,n,r){var i=NaN;e.stacked&&(i=n.get(n.getCalculationInfo(`stackedOverDimension`),r)),isNaN(i)&&(i=e.valueStart);var a=e.baseDataOffset,o=[];return o[a]=n.get(e.baseDim,r),o[1-a]=i,t.dataToPoint(o)}function fD(e,t){var n=[];return t.diff(e).add(function(e){n.push({cmd:`+`,idx:e})}).update(function(e,t){n.push({cmd:`=`,idx:t,idx1:e})}).remove(function(e){n.push({cmd:`-`,idx:e})}).execute(),n}function pD(e,t,n,r,i,a,o,s){for(var c=fD(e,t),l=[],u=[],d=[],f=[],p=[],m=[],h=[],g=lD(i,t,o),_=e.getLayout(`points`)||[],v=t.getLayout(`points`)||[],y=0;y=i||h<0)break;if(gD(_,v)){if(c){h+=a;continue}break}if(h===n)e[a>0?`moveTo`:`lineTo`](_,v),d=_,f=v;else{var y=_-l,b=v-u;if(y*y+b*b<.5){h+=a;continue}if(o>0){for(var x=h+a,S=t[x*2],C=t[x*2+1];S===_&&C===v&&g=r||gD(S,C))p=_,m=v;else{E=S-l,D=C-u;var A=_-l,j=S-_,M=v-u,N=C-v,P=void 0,F=void 0;if(s===`x`){P=Math.abs(A),F=Math.abs(j);var ee=E>0?1:-1;p=_-ee*P*o,m=v,O=_+ee*F*o,k=v}else if(s===`y`){P=Math.abs(M),F=Math.abs(N);var I=D>0?1:-1;p=_,m=v-I*P*o,O=_,k=v+I*F*o}else P=Math.sqrt(A*A+M*M),F=Math.sqrt(j*j+N*N),T=F/(F+P),p=_-E*o*(1-T),m=v-D*o*(1-T),O=_+E*o*T,k=v+D*o*T,O=mD(O,hD(S,_)),k=mD(k,hD(C,v)),O=hD(O,mD(S,_)),k=hD(k,mD(C,v)),E=O-_,D=k-v,p=_-E*P/F,m=v-D*P/F,p=mD(p,hD(l,_)),m=mD(m,hD(u,v)),p=hD(p,mD(l,_)),m=hD(m,mD(u,v)),E=_-p,D=v-m,O=_+E*F/P,k=v+D*F/P}e.bezierCurveTo(d,f,p,m,_,v),d=O,f=k}else e.lineTo(_,v)}l=_,u=v,h+=a}return g}var vD=function(){function e(){this.smooth=0,this.smoothConstraint=!0}return e}(),yD=function(e){n(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`ec-polyline`,n}return t.prototype.getDefaultStyle=function(){return{stroke:Q.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new vD},t.prototype.buildPath=function(e,t){var n=t.points,r=0,i=n.length/2;if(t.connectNulls){for(;i>0&&gD(n[i*2-2],n[i*2-1]);i--);for(;r=0){var _=o?(d-a)*g+a:(u-i)*g+i;return o?[e,_]:[_,e]}i=u,a=d;break;case r.C:u=n[c++],d=n[c++],f=n[c++],p=n[c++],m=n[c++],h=n[c++];var v=o?er(i,u,f,m,e,s):er(a,d,p,h,e,s);if(v>0)for(var y=0;y=0){var _=o?Qn(a,d,p,h,b):Qn(i,u,f,m,b);return o?[e,_]:[_,e]}}i=m,a=h;break}}},t}(ml),bD=function(e){n(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(vD),xD=function(e){n(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`ec-polygon`,n}return t.prototype.getDefaultShape=function(){return new bD},t.prototype.buildPath=function(e,t){var n=t.points,r=t.stackedOnPoints,i=0,a=n.length/2,o=t.smoothMonotone;if(t.connectNulls){for(;a>0&&gD(n[a*2-2],n[a*2-1]);a--);for(;it){a?n.push(o(a,c,t)):i&&n.push(o(i,c,0),o(i,c,t));break}else i&&=(n.push(o(i,c,0)),null),n.push(c),a=c}return n}function ND(e,t,n){var r=e.getVisual(`visualMeta`);if(!(!r||!r.length||!e.count())&&t.type===`cartesian2d`){for(var i,a,o=r.length-1;o>=0;o--){var s=e.getDimensionInfo(r[o].dimension);if(i=s&&s.coordDim,i===`x`||i===`y`){a=r[o];break}}if(a){var c=t.getAxis(i),l=R(a.stops,function(e){return{coord:c.toGlobalCoord(c.dataToCoord(e.value)),color:e.color}}),u=l.length,d=a.outerColors.slice();u&&l[0].coord>l[u-1].coord&&(l.reverse(),d.reverse());var f=MD(l,i===`x`?n.getWidth():n.getHeight()),p=f.length;if(!p&&u)return l[0].coord<0?d[1]?d[1]:l[u-1].color:d[0]?d[0]:l[0].color;var m=10,h=f[0].coord-m,g=f[p-1].coord+m,_=g-h;if(_<.001)return`transparent`;L(f,function(e){e.offset=(e.coord-h)/_}),f.push({offset:p?f[p-1].offset:.5,color:d[1]||`transparent`}),f.unshift({offset:p?f[0].offset:.5,color:d[0]||`transparent`});var v=new uf(0,0,0,0,f,!0);return v[i]=h,v[i+`2`]=g,v}}}function PD(e,t,n){var r=e.get(`showAllSymbol`),i=r===`auto`;if(!(r&&!i)){var a=n.getAxesByScale(`ordinal`)[0];if(a&&!(i&&FD(a,t))){var o=t.mapDimension(a.dim),s={};return L(a.getViewLabels(),function(e){var t=a.scale.getRawOrdinalNumber(e.tickValue);s[t]=1}),function(e){return!s.hasOwnProperty(t.get(o,e))}}}}function FD(e,t){var n=e.getExtent(),r=Math.abs(n[1]-n[0])/e.scale.count();isNaN(r)&&(r=0);for(var i=t.count(),a=Math.max(1,Math.round(i/5)),o=0;or)return!1;return!0}function ID(e,t){return isNaN(e)||isNaN(t)}function LD(e){for(var t=e.length/2;t>0&&ID(e[t*2-2],e[t*2-1]);t--);return t-1}function RD(e,t){return[e[t*2],e[t*2+1]]}function zD(e,t,n){for(var r=e.length/2,i=n===`x`?0:1,a,o,s=0,c=-1,l=0;l=t||a>=t&&o<=t){c=l;break}s=l,a=o}return{range:[s,c],t:(t-a)/(o-a)}}function BD(e){if(e.get([`endLabel`,`show`]))return!0;for(var t=0;t0&&e.get([`emphasis`,`lineStyle`,`width`])===`bolder`){var M=f.getState(`emphasis`).style;M.lineWidth=+f.style.lineWidth+1}Z(f).seriesIndex=e.seriesIndex,Wu(f,k,A,j);var P=kD(e.get(`smooth`)),F=e.get(`smoothMonotone`);if(f.setShape({smooth:P,smoothMonotone:F,connectNulls:x}),p){var ee=a.getCalculationInfo(`stackedOnSeries`),I=0;p.useStyle(N(s.getAreaStyle(),{fill:E,opacity:.7,lineJoin:`bevel`,decal:a.getVisual(`style`).decal})),ee&&(I=kD(ee.get(`smooth`))),p.setShape({smooth:P,stackedOnSmooth:I,smoothMonotone:F,connectNulls:x}),Ju(p,e,`areaStyle`),Z(p).seriesIndex=e.seriesIndex,Wu(p,k,A,j)}var te=this._changePolyState;a.eachItemGraphicEl(function(e){e&&(e.onHoverStateChange=te)}),this._polyline.onHoverStateChange=te,this._data=a,this._coordSys=r,this._stackedOnPoints=y,this._points=c,this._step=w,this._valueOrigin=_,e.get(`triggerLineEvent`)&&(this.packEventData(e,f),p&&this.packEventData(e,p))},t.prototype.packEventData=function(e,t){Z(t).eventData={componentType:`series`,componentSubType:`line`,componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:`line`}},t.prototype.highlight=function(e,t,n,r){var i=e.getData(),a=es(i,r);if(this._changePolyState(`emphasis`),!(a instanceof Array)&&a!=null&&a>=0){var o=i.getLayout(`points`),s=i.getItemGraphicEl(a);if(!s){var c=o[a*2],l=o[a*2+1];if(isNaN(c)||isNaN(l)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(c,l))return;var u=e.get(`zlevel`)||0,d=e.get(`z`)||0;s=new rD(i,a),s.x=c,s.y=l,s.setZ(u,d);var f=s.getSymbolPath().getTextContent();f&&(f.zlevel=u,f.z=d,f.z2=this._polyline.z2+1),s.__temp=!0,i.setItemGraphicEl(a,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}else iy.prototype.highlight.call(this,e,t,n,r)},t.prototype.downplay=function(e,t,n,r){var i=e.getData(),a=es(i,r);if(this._changePolyState(`normal`),a!=null&&a>=0){var o=i.getItemGraphicEl(a);o&&(o.__temp?(i.setItemGraphicEl(a,null),this.group.remove(o)):o.downplay())}else iy.prototype.downplay.call(this,e,t,n,r)},t.prototype._changePolyState=function(e){var t=this._polygon;gu(this._polyline,e),t&&gu(t,e)},t.prototype._newPolyline=function(e){var t=this._polyline;return t&&this._lineGroup.remove(t),t=new yD({shape:{points:e},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(t),this._polyline=t,t},t.prototype._newPolygon=function(e,t){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new xD({shape:{points:e,stackedOnPoints:t},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},t.prototype._initSymbolLabelAnimation=function(e,t,n){var r,i,a=t.getBaseAxis(),o=a.inverse;t.type===`cartesian2d`?(r=a.isHorizontal(),i=!1):t.type===`polar`&&(r=a.dim===`angle`,i=!0);var s=e.hostModel,c=s.get(`animationDuration`);U(c)&&(c=c(null));var l=s.get(`animationDelay`)||0,u=U(l)?l(null):l;e.eachItemGraphicEl(function(e,a){var s=e;if(s){var d=[e.x,e.y],f=void 0,p=void 0,m=void 0;if(n)if(i){var h=n,g=t.pointToCoord(d);r?(f=h.startAngle,p=h.endAngle,m=-g[1]/180*Math.PI):(f=h.r0,p=h.r,m=g[0])}else{var _=n;r?(f=_.x,p=_.x+_.width,m=e.x):(f=_.y+_.height,p=_.y,m=e.y)}var v=p===f?0:(m-f)/(p-f);o&&(v=1-v);var y=U(l)?l(a):c*v+u,b=s.getSymbolPath(),x=b.getTextContent();s.attr({scaleX:0,scaleY:0}),s.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:y}),x&&x.animateFrom({style:{opacity:0}},{duration:300,delay:y}),b.disableLabelAnimation=!0}})},t.prototype._initOrUpdateEndLabel=function(e,t,n){var r=e.getModel(`endLabel`);if(BD(e)){var i=e.getData(),a=this._polyline,o=i.getLayout(`points`);if(!o){a.removeTextContent(),this._endLabel=null;return}var s=this._endLabel;s||(s=this._endLabel=new Nl({z2:200}),s.ignoreClip=!0,a.setTextContent(this._endLabel),a.disableLabelAnimation=!0);var c=LD(o);c>=0&&(Ep(a,Dp(e,`endLabel`),{inheritColor:n,labelFetcher:e,labelDataIndex:c,defaultText:function(e,t,n){return n==null?tD(i,e):nD(i,n)},enableTextSetter:!0},HD(r,t)),a.textConfig.position=null)}else this._endLabel&&=(this._polyline.removeTextContent(),null)},t.prototype._endLabelOnDuring=function(e,t,n,r,i,a,o){var s=this._endLabel,c=this._polyline;if(s){e<1&&r.originalX==null&&(r.originalX=s.x,r.originalY=s.y);var l=n.getLayout(`points`),u=n.hostModel,d=u.get(`connectNulls`),f=a.get(`precision`),p=a.get(`distance`)||0,m=o.getBaseAxis(),h=m.isHorizontal(),g=m.inverse,_=t.shape,v=g?h?_.x:_.y+_.height:h?_.x+_.width:_.y,y=(h?p:0)*(g?-1:1),b=(h?0:-p)*(g?-1:1),x=h?`x`:`y`,S=zD(l,v,x),C=S.range,w=C[1]-C[0],T=void 0;if(w>=1){if(w>1&&!d){var E=RD(l,C[0]);s.attr({x:E[0]+y,y:E[1]+b}),i&&(T=u.getRawValue(C[0]))}else{var E=c.getPointOn(v,x);E&&s.attr({x:E[0]+y,y:E[1]+b});var D=u.getRawValue(C[0]),O=u.getRawValue(C[1]);i&&(T=us(n,f,D,O,S.t))}r.lastFrameIndex=C[0]}else{var k=e===1||r.lastFrameIndex>0?C[0]:0,E=RD(l,k);i&&(T=u.getRawValue(k)),s.attr({x:E[0]+y,y:E[1]+b})}if(i){var A=Lp(s);typeof A.setLabelText==`function`&&A.setLabelText(T)}}},t.prototype._doUpdateAnimation=function(e,t,n,r,i,a,o){var s=this._polyline,c=this._polygon,l=e.hostModel,u=pD(this._data,e,this._stackedOnPoints,t,this._coordSys,n,this._valueOrigin,a),d=u.current,f=u.stackedOnCurrent,p=u.next,m=u.stackedOnNext;if(i&&(f=jD(u.stackedOnCurrent,u.current,n,i,o),d=jD(u.current,null,n,i,o),m=jD(u.stackedOnNext,u.next,n,i,o),p=jD(u.next,null,n,i,o)),OD(d,p)>3e3||c&&OD(f,m)>3e3){s.stopAnimation(),s.setShape({points:p}),c&&(c.stopAnimation(),c.setShape({points:p,stackedOnPoints:m}));return}s.shape.__points=u.current,s.shape.points=d;var h={shape:{points:p}};u.current!==d&&(h.shape.__points=u.next),s.stopAnimation(),Ef(s,h,l),c&&(c.setShape({points:d,stackedOnPoints:f}),c.stopAnimation(),Ef(c,{shape:{stackedOnPoints:m}},l),s.shape.points!==c.shape.points&&(c.shape.points=s.shape.points));for(var g=[],_=u.status,v=0;v<_.length;v++)if(_[v].cmd===`=`){var y=e.getItemGraphicEl(_[v].idx1);y&&g.push({el:y,ptIdx:v})}s.animators&&s.animators.length&&s.animators[0].during(function(){c&&c.dirtyShape();for(var e=s.shape.__points,t=0;tt&&(t=e[n]);return isFinite(t)?t:NaN},min:function(e){for(var t=1/0,n=0;n10&&a.type===`cartesian2d`&&i){var s=a.getBaseAxis(),c=a.getOtherAxis(s),l=s.getExtent(),u=n.getDevicePixelRatio(),d=Math.abs(l[1]-l[0])*(u||1),f=Math.round(o/d);if(isFinite(f)&&f>1){i===`lttb`?e.setData(r.lttbDownSample(r.mapDimension(c.dim),1/f)):i===`minmax`&&e.setData(r.minmaxDownSample(r.mapDimension(c.dim),1/f));var p=void 0;W(i)?p=GD[i]:U(i)&&(p=i),p&&e.setData(r.downSample(r.mapDimension(c.dim),1/f,p,KD))}}}}}function JD(e){e.registerChartView(UD),e.registerSeriesModel(eD),e.registerLayout(WD(`line`,!0)),e.registerVisual({seriesType:`line`,reset:function(e){var t=e.getData(),n=e.getModel(`lineStyle`).getLineStyle();n&&!n.stroke&&(n.stroke=t.getVisual(`style`).fill),t.setVisual(`legendLineStyle`,n)}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,qD(`line`))}var YD=function(e){n(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.getInitialData=function(e,t){return YC(null,this,{useEncodeDefaulter:!0})},t.prototype.getMarkerPosition=function(e,t,n){var r=this.coordinateSystem;if(r&&r.clampData){var i=r.clampData(e),a=r.dataToPoint(i);if(n)L(r.getAxes(),function(e,n){if(e.type===`category`&&t!=null){var r=e.getTicksCoords(),o=e.getTickModel().get(`alignWithLabel`),s=i[n],c=t[n]===`x1`||t[n]===`y1`;if(c&&!o&&(s+=1),r.length<2)return;if(r.length===2){a[n]=e.toGlobalCoord(e.getExtent()[+!!c]);return}for(var l=void 0,u=void 0,d=1,f=0;fs){u=(p+l)/2;break}f===1&&(d=m-r[0].tickValue)}u??(l?l&&(u=r[r.length-1].coord):u=r[0].coord),a[n]=e.toGlobalCoord(u)}});else{var o=this.getData(),s=o.getLayout(`offset`),c=o.getLayout(`size`),l=+!r.getBaseAxis().isHorizontal();a[l]+=s+c/2}return a}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}(Gv);Gv.registerClass(YD);var XD=function(e){n(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.getInitialData=function(){return YC(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`),t=this.get(`largeThreshold`);return t>e&&(e=t),e},t.prototype.brushSelector=function(e,t,n){return n.rect(t.getItemLayout(e))},t.type=`series.bar`,t.dependencies=[`grid`,`polar`],t.defaultOption=tm(YD.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:Q.color.primary,borderWidth:2}},realtimeSort:!1}),t}(YD),ZD=function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return e}(),QD=function(e){n(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`sausage`,n}return t.prototype.getDefaultShape=function(){return new ZD},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=Math.max(t.r0||0,0),a=Math.max(t.r,0),o=(a-i)*.5,s=i+o,c=t.startAngle,l=t.endAngle,u=t.clockwise,d=Math.PI*2,f=u?l-cMath.PI/2&&ua)return!0;a=l}return!1},t.prototype._isOrderDifferentInView=function(e,t){for(var n=t.scale,r=n.getExtent(),i=Math.max(0,r[0]),a=Math.min(r[1],n.getOrdinalMeta().categories.length-1);i<=a;++i)if(e.ordinalNumbers[i]!==n.getRawOrdinalNumber(i))return!0},t.prototype._updateSortWithinSameData=function(e,t,n,r){if(this._isOrderChangedWithinSameData(e,t,n)){var i=this._dataSort(e,n,t);this._isOrderDifferentInView(i,n)&&(this._removeOnRenderedListener(r),r.dispatchAction({type:`changeAxisOrder`,componentType:n.dim+`Axis`,axisId:n.index,sortInfo:i}))}},t.prototype._dispatchInitSort=function(e,t,n){var r=t.baseAxis,i=this._dataSort(e,r,function(n){return e.get(e.mapDimension(t.otherAxis.dim),n)});n.dispatchAction({type:`changeAxisOrder`,componentType:r.dim+`Axis`,isInitSort:!0,axisId:r.index,sortInfo:i})},t.prototype.remove=function(e,t){this._clear(this._model),this._removeOnRenderedListener(t)},t.prototype.dispose=function(e,t){this._removeOnRenderedListener(t)},t.prototype._removeOnRenderedListener=function(e){this._onRendered&&=(e.getZr().off(`rendered`,this._onRendered),null)},t.prototype._clear=function(e){var t=this.group,n=this._data;e&&e.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl(function(t){jf(t,e,Z(t).dataIndex)})):t.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type=`bar`,t}(iy),cO={cartesian2d:function(e,t){var n=t.width<0?-1:1,r=t.height<0?-1:1;n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height);var i=e.x+e.width,a=e.y+e.height,o=iO(t.x,e.x),s=aO(t.x+t.width,i),c=iO(t.y,e.y),l=aO(t.y+t.height,a),u=si?s:o,t.y=d&&c>a?l:c,t.width=u?0:s-o,t.height=d?0:l-c,n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height),u||d},polar:function(e,t){var n=t.r0<=t.r?1:-1;if(n<0){var r=t.r;t.r=t.r0,t.r0=r}var i=aO(t.r,e.r),a=iO(t.r0,e.r0);t.r=i,t.r0=a;var o=i-a<0;if(n<0){var r=t.r;t.r=t.r0,t.r0=r}return o}},lO={cartesian2d:function(e,t,n,r,i,a,o,s,c){var l=new Ol({shape:M({},r),z2:1});if(l.__dataIndex=n,l.name=`item`,a){var u=l.shape,d=i?`height`:`width`;u[d]=0}return l},polar:function(e,t,n,r,i,a,o,s,c){var l=!i&&c?QD:Ud,u=new l({shape:r,z2:1});if(u.name=`item`,u.calculateTextPosition=$D(vO(i),{isRoundCap:l===QD}),a){var d=u.shape,f=i?`r`:`endAngle`,p={};d[f]=i?r.r0:r.startAngle,p[f]=r[f],(s?Ef:Df)(u,{shape:p},a)}return u}};function uO(e,t){var n=e.get(`realtimeSort`,!0),r=t.getBaseAxis();if(n&&r.type===`category`&&t.type===`cartesian2d`)return{baseAxis:r,otherAxis:t.getOtherAxis(r)}}function dO(e,t,n,r,i,a,o,s){var c,l;a?(l={x:r.x,width:r.width},c={y:r.y,height:r.height}):(l={y:r.y,height:r.height},c={x:r.x,width:r.width}),s||(o?Ef:Df)(n,{shape:c},t,i,null);var u=t?e.baseAxis.model:null;(o?Ef:Df)(n,{shape:l},u,i)}function fO(e,t){for(var n=0;n0?1:-1,o=r.height>0?1:-1;return{x:r.x+a*i/2,y:r.y+o*i/2,width:r.width-a*i,height:r.height-o*i}},polar:function(e,t,n){var r=e.getItemLayout(t);return{cx:r.cx,cy:r.cy,r0:r.r0,r:r.r,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}}};function _O(e){return e.startAngle!=null&&e.endAngle!=null&&e.startAngle===e.endAngle}function vO(e){return function(e){var t=e?`Arc`:`Angle`;return function(e){switch(e){case`start`:case`insideStart`:case`end`:case`insideEnd`:return e+t;default:return e}}}(e)}function yO(e,t,n,r,i,a,o,s){var c=t.getItemVisual(n,`style`);if(!s){var l=r.get([`itemStyle`,`borderRadius`])||0;e.setShape(`r`,l)}else if(!a.get(`roundCap`)){var u=e.shape;M(u,rO(r.getModel(`itemStyle`),u,!0)),e.setShape(u)}e.useStyle(c);var d=r.getShallow(`cursor`);d&&e.attr(`cursor`,d);var f=s?o?i.r>=i.r0?`endArc`:`startArc`:i.endAngle>=i.startAngle?`endAngle`:`startAngle`:o?i.height>=0?`bottom`:`top`:i.width>=0?`right`:`left`,p=Dp(r);Ep(e,p,{labelFetcher:a,labelDataIndex:n,defaultText:tD(a.getData(),n),inheritColor:c.fill,defaultOpacity:c.opacity,defaultOutsidePosition:f});var m=e.getTextContent();if(s&&m){var h=r.get([`label`,`position`]);e.textConfig.inside=h===`middle`?!0:null,eO(e,h===`outside`?f:h,vO(o),r.get([`label`,`rotate`]))}Rp(m,p,a.getRawValue(n),function(e){return nD(t,e)});var g=r.getModel([`emphasis`]);Wu(e,g.get(`focus`),g.get(`blurScope`),g.get(`disabled`)),Ju(e,r),_O(i)&&(e.style.fill=`none`,e.style.stroke=`none`,L(e.states,function(e){e.style&&(e.style.fill=e.style.stroke=`none`)}))}function bO(e,t){var n=e.get([`itemStyle`,`borderColor`]);if(!n||n===`none`)return 0;var r=e.get([`itemStyle`,`borderWidth`])||0,i=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),a=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(r,i,a)}var xO=function(){function e(){}return e}(),SO=function(e){n(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`largeBar`,n}return t.prototype.getDefaultShape=function(){return new xO},t.prototype.buildPath=function(e,t){for(var n=t.points,r=this.baseDimIdx,i=1-this.baseDimIdx,a=[],o=[],s=this.barWidth,c=0;c=0?n:null},30,!1);function TO(e,t,n){for(var r=e.baseDimIdx,i=1-r,a=e.shape.points,o=e.largeDataIndices,s=[],c=[],l=e.barWidth,u=0,d=a.length/3;u=s[0]&&t<=s[0]+c[0]&&n>=s[1]&&n<=s[1]+c[1])return o[u]}return-1}function EO(e,t,n){if(TD(n,`cartesian2d`)){var r=t,i=n.getArea();return{x:e?r.x:i.x,y:e?i.y:r.y,width:e?r.width:i.width,height:e?i.height:r.height}}else{var i=n.getArea(),a=t;return{cx:i.cx,cy:i.cy,r0:e?i.r0:a.r0,r:e?i.r:a.r,startAngle:e?a.startAngle:0,endAngle:e?a.endAngle:Math.PI*2}}}function DO(e,t,n){return new(e.type===`polar`?Ud:Ol)({shape:EO(t,n,e),silent:!0,z2:0})}function OO(e){e.registerChartView(sO),e.registerSeriesModel(XD),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,V(Dw,`bar`)),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,Ow(`bar`)),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,qD(`bar`)),e.registerAction({type:`changeAxisOrder`,event:`changeAxisOrder`,update:`update`},function(e,t){var n=e.componentType||`series`;t.eachComponent({mainType:n,query:e},function(t){e.sortInfo&&t.axis.setCategorySortInfo(e.sortInfo)})})}var kO=Math.PI*2,AO=Math.PI/180;function jO(e,t,n){t.eachSeriesByType(e,function(e){var t=e.getData(),r=t.mapDimension(`value`),i=kh(e,n),a=i.cx,o=i.cy,s=i.r,c=i.r0,l=i.viewRect,u=-e.get(`startAngle`)*AO,d=e.get(`endAngle`),f=e.get(`padAngle`)*AO;d=d===`auto`?u-kO:-d*AO;var p=e.get(`minAngle`)*AO+f,m=0;t.each(r,function(e){!isNaN(e)&&m++});var h=t.getSum(r),g=Math.PI/(h||m)*2,_=e.get(`clockwise`),v=e.get(`roseType`),y=e.get(`stillShowZeroSum`),b=t.getDataExtent(r);b[0]=0;var x=_?1:-1,S=[u,d],C=x*f/2;Hc(S,!_),u=S[0],d=S[1];var w=MO(e);w.startAngle=u,w.endAngle=d,w.clockwise=_,w.cx=a,w.cy=o,w.r=s,w.r0=c;var T=Math.abs(d-u),E=T,D=0,O=u;if(t.setLayout({viewRect:l,r:s}),t.each(r,function(e,n){var r;if(isNaN(e)){t.setItemLayout(n,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:_,cx:a,cy:o,r0:c,r:v?NaN:s});return}r=v===`area`?T/m:h===0&&y?g:e*g,rr?(l=O+x*r/2,u=l):(l=O+C,u=i-C),t.setItemLayout(n,{angle:r,startAngle:l,endAngle:u,clockwise:_,cx:a,cy:o,r0:c,r:v?Qa(e,b,[c,s]):s}),O=i}),En?o:a,d=Math.abs(c.label.y-n);if(d>=l.maxY){var f=c.label.x-t-c.len2*i,p=r+c.len;l.rB=Math.abs(f)e.unconstrainedWidth?null:f:null;r.setStyle(`width`,p)}RO(a,r)}}}function RO(e,t){BO.rect=e,WE(BO,t,zO)}var zO={minMarginForce:[null,0,null,0],marginDefault:[1,0,1,0]},BO={};function VO(e){return e.position===`center`}function HO(e){var t=e.getData(),n=[],r,i,a=!1,o=(e.get(`minShowLabelAngle`)||0)*PO,s=t.getLayout(`viewRect`),c=t.getLayout(`r`),l=s.width,u=s.x,d=s.y,f=s.height;function p(e){e.ignore=!0}function m(e){if(!e.ignore)return!0;for(var t in e.states)if(e.states[t].ignore===!1)return!0;return!1}t.each(function(e){var s=t.getItemGraphicEl(e),d=s.shape,h=s.getTextContent(),g=s.getTextGuideLine(),_=t.getItemModel(e),v=_.getModel(`label`),y=v.get(`position`)||_.get([`emphasis`,`label`,`position`]),b=v.get(`distanceToLabelLine`),x=v.get(`alignTo`),S=$a(v.get(`edgeDistance`),l),C=v.get(`bleedMargin`);C??=Math.min(l,f)>200?10:2;var w=_.getModel(`labelLine`),T=w.get(`length`);T=$a(T,l);var E=w.get(`length2`);if(E=$a(E,l),Math.abs(d.endAngle-d.startAngle)0?`right`:`left`:O>0?`left`:`right`}var re=Math.PI,ie=0,z=v.get(`rotate`);if(G(z))ie=re/180*z;else if(y===`center`)ie=0;else if(z===`radial`||z===!0)ie=O<0?-D+re:-D;else if(z===`tangential`&&y!==`outside`&&y!==`outer`){var ae=Math.atan2(O,k);ae<0&&(ae=re*2+ae),k>0&&(ae=re+ae),ie=ae-re}if(a=!!ie,h.x=A,h.y=j,h.rotation=ie,h.setStyle({verticalAlign:`middle`}),P){h.setStyle({align:N});var B=h.states.select;B&&(B.x+=h.x,B.y+=h.y)}else{var V=new X(0,0,0,0);RO(V,h),n.push({label:h,labelLine:g,position:y,len:T,len2:E,minTurnAngle:w.get(`minTurnAngle`),maxSurfaceAngle:w.get(`maxSurfaceAngle`),surfaceNormal:new Y(O,k),linePoints:M,textAlign:N,labelDistance:b,labelAlignTo:x,edgeDistance:S,bleedMargin:C,rect:V,unconstrainedWidth:V.width,labelStyleWidth:h.style.width})}s.setTextConfig({inside:P})}}),!a&&e.get(`avoidLabelOverlap`)&&IO(n,r,i,c,l,f,u,d);for(var h=0;h0){for(var c=i.getItemLayout(0),l=1;isNaN(c&&c.startAngle)&&l=n.r0}},t.type=`pie`,t}(iy);function GO(e,t,n){t=H(t)&&{coordDimensions:t}||M({encodeDefine:e.getEncode()},t);var r=e.getSource(),i=FC(r,t).dimensions,a=new NC(i,e);return a.initData(r,n),a}var KO=function(){function e(e,t){this._getDataWithEncodedVisual=e,this._getRawData=t}return e.prototype.getAllNames=function(){var e=this._getRawData();return e.mapArray(e.getName)},e.prototype.containName=function(e){return this._getRawData().indexOfName(e)>=0},e.prototype.indexOfName=function(e){return this._getDataWithEncodedVisual().indexOfName(e)},e.prototype.getItemVisual=function(e,t){return this._getDataWithEncodedVisual().getItemVisual(e,t)},e}(),qO=ts(),JO=function(e){n(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(t){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new KO(B(this.getData,this),B(this.getRawData,this)),this._defaultLabelLine(t)},t.prototype.mergeOption=function(){e.prototype.mergeOption.apply(this,arguments)},t.prototype.getInitialData=function(){return GO(this,{coordDimensions:[`value`],encodeDefaulter:V(og,this)})},t.prototype.getDataParams=function(t){var n=this.getData(),r=qO(n),i=r.seats;if(!i){var a=[];n.each(n.mapDimension(`value`),function(e){a.push(e)}),i=r.seats=co(a,n.hostModel.get(`percentPrecision`))}var o=e.prototype.getDataParams.call(this,t);return o.percent=i[t]||0,o.$vars.push(`percent`),o},t.prototype._defaultLabelLine=function(e){Io(e,`labelLine`,[`show`]);var t=e.labelLine,n=e.emphasis.labelLine;t.show=t.show&&e.label.show,n.show=n.show&&e.emphasis.label.show},t.type=`series.pie`,t.defaultOption={z:2,legendHoverLink:!0,colorBy:`data`,center:[`50%`,`50%`],radius:[0,`50%`],clockwise:!0,startAngle:90,endAngle:`auto`,padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,coordinateSystemUsage:`box`,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:`truncate`,position:`outer`,alignTo:`none`,edgeDistance:`25%`,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:30,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:`solid`}},itemStyle:{borderWidth:1,borderJoin:`round`},showEmptyCircle:!0,emptyCircleStyle:{color:`lightgray`,opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:`expansion`,animationDuration:1e3,animationTypeUpdate:`transition`,animationEasingUpdate:`cubicInOut`,animationDurationUpdate:500,animationEasing:`cubicInOut`},t}(Gv);gh({fullType:JO.type,getCoord2:function(e){return e.getShallow(`center`)}});function YO(e){return{seriesType:e,reset:function(e,t){var n=e.getData();n.filterSelf(function(e){var t=n.mapDimension(`value`),r=n.get(t,e);return!(G(r)&&!isNaN(r)&&r<0)})}}}function XO(e){e.registerChartView(WO),e.registerSeriesModel(JO),$y(`pie`,e.registerAction),e.registerLayout(V(jO,`pie`)),e.registerProcessor(NO(`pie`)),e.registerProcessor(YO(`pie`))}var ZO={left:0,right:0,top:0,bottom:0},QO=[`25%`,`25%`],$O=function(e){n(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.mergeDefaultAndTheme=function(t,n){var r=Fh(t.outerBounds);e.prototype.mergeDefaultAndTheme.apply(this,arguments),r&&t.outerBounds&&Ph(t.outerBounds,r)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&t.outerBounds&&Ph(this.option.outerBounds,t.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:ZO,outerBoundsContain:`all`,outerBoundsClampWidth:QO[0],outerBoundsClampHeight:QO[1],backgroundColor:Q.color.transparent,borderWidth:1,borderColor:Q.color.neutral30},t}(Rh),ek=function(e){n(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents(`grid`,as).models[0]},t.type=`cartesian2dAxis`,t}(Rh);I(ek,gT);var tk={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:Q.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:Q.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:Q.color.axisSplitLine,width:1,type:`solid`}},splitArea:{show:!1,areaStyle:{color:[Q.color.backgroundTint,Q.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:Q.color.neutral00,borderColor:Q.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:`auto`}},nk=A({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:`auto`,show:`auto`},axisLabel:{interval:`auto`}},tk),rk=A({boundaryGap:[0,0],axisLine:{show:`auto`},axisTick:{show:`auto`},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:Q.color.axisMinorSplitLine,width:1}}},tk),ik={category:nk,value:rk,time:A({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:`bold`}}},splitLine:{show:!1}},rk),log:N({logBase:10},rk)},ak={value:1,category:1,time:1,log:1},ok=null;function sk(){return ok}function ck(e,t,r,i){L(ak,function(a,o){var s=A(A({},ik[o],!0),i,!0),c=function(e){n(r,e);function r(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t+`Axis.`+o,n}return r.prototype.mergeDefaultAndTheme=function(e,t){var n=Nh(this),r=n?Fh(e):{};A(e,t.getTheme().get(o+`Axis`)),A(e,this.getDefaultOption()),e.type=lk(e),n&&Ph(e,r,n)},r.prototype.optionUpdated=function(){this.option.type===`category`&&(this.__ordinalMeta=dw.createByAxisModel(this))},r.prototype.getCategories=function(e){var t=this.option;if(t.type===`category`)return e?t.data:this.__ordinalMeta.categories},r.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},r.prototype.updateAxisBreaks=function(e){var t=sk();return t?t.updateModelAxisBreak(this,e):{breaks:[]}},r.type=t+`Axis.`+o,r.defaultOption=s,r}(r);e.registerComponentModel(c)}),e.registerSubTypeDefaulter(t+`Axis`,lk)}function lk(e){return e.type||(e.data?`category`:`value`)}var uk=function(){function e(e){this.type=`cartesian`,this._dimList=[],this._axes={},this.name=e||``}return e.prototype.getAxis=function(e){return this._axes[e]},e.prototype.getAxes=function(){return R(this._dimList,function(e){return this._axes[e]},this)},e.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),re(this.getAxes(),function(t){return t.scale.type===e})},e.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},e}(),dk=[`x`,`y`];function fk(e){return(e.type===`interval`||e.type===`time`)&&!e.hasBreaks()}var pk=function(e){n(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=`cartesian2d`,t.dimensions=dk,t}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis(`x`).scale,t=this.getAxis(`y`).scale;if(!(!fk(e)||!fk(t))){var n=e.getExtent(),r=t.getExtent(),i=this.dataToPoint([n[0],r[0]]),a=this.dataToPoint([n[1],r[1]]),o=n[1]-n[0],s=r[1]-r[0];if(!(!o||!s)){var c=(a[0]-i[0])/o,l=(a[1]-i[1])/s,u=i[0]-n[0]*c,d=i[1]-r[0]*l,f=this._transform=[c,0,0,l,u,d];this._invTransform=Jt([],f)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale(`ordinal`)[0]||this.getAxesByScale(`time`)[0]||this.getAxis(`x`)},t.prototype.containPoint=function(e){var t=this.getAxis(`x`),n=this.getAxis(`y`);return t.contain(t.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,t){var n=this.dataToPoint(e),r=this.dataToPoint(t),i=this.getArea(),a=new X(n[0],n[1],r[0]-n[0],r[1]-n[1]);return i.intersect(a)},t.prototype.dataToPoint=function(e,t,n){n||=[];var r=e[0],i=e[1];if(this._transform&&r!=null&&isFinite(r)&&i!=null&&isFinite(i))return at(n,e,this._transform);var a=this.getAxis(`x`),o=this.getAxis(`y`);return n[0]=a.toGlobalCoord(a.dataToCoord(r,t)),n[1]=o.toGlobalCoord(o.dataToCoord(i,t)),n},t.prototype.clampData=function(e,t){var n=this.getAxis(`x`).scale,r=this.getAxis(`y`).scale,i=n.getExtent(),a=r.getExtent(),o=n.parse(e[0]),s=r.parse(e[1]);return t||=[],t[0]=Math.min(Math.max(Math.min(i[0],i[1]),o),Math.max(i[0],i[1])),t[1]=Math.min(Math.max(Math.min(a[0],a[1]),s),Math.max(a[0],a[1])),t},t.prototype.pointToData=function(e,t,n){if(n||=[],this._invTransform)return at(n,e,this._invTransform);var r=this.getAxis(`x`),i=this.getAxis(`y`);return n[0]=r.coordToData(r.toLocalCoord(e[0]),t),n[1]=i.coordToData(i.toLocalCoord(e[1]),t),n},t.prototype.getOtherAxis=function(e){return this.getAxis(e.dim===`x`?`y`:`x`)},t.prototype.getArea=function(e){e||=0;var t=this.getAxis(`x`).getGlobalExtent(),n=this.getAxis(`y`).getGlobalExtent(),r=Math.min(t[0],t[1])-e,i=Math.min(n[0],n[1])-e;return new X(r,i,Math.max(t[0],t[1])-r+e,Math.max(n[0],n[1])-i+e)},t}(uk),mk=function(e){n(t,e);function t(t,n,r,i,a){var o=e.call(this,t,n,r)||this;return o.index=0,o.type=i||`value`,o.position=a||`bottom`,o}return t.prototype.isHorizontal=function(){var e=this.position;return e===`top`||e===`bottom`},t.prototype.getGlobalExtent=function(e){var t=this.getExtent();return t[0]=this.toGlobalCoord(t[0]),t[1]=this.toGlobalCoord(t[1]),e&&t[0]>t[1]&&t.reverse(),t},t.prototype.pointToData=function(e,t){return this.coordToData(this.toLocalCoord(e[this.dim===`x`?0:1]),t)},t.prototype.setCategorySortInfo=function(e){if(this.type!==`category`)return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)},t}(gE),hk=`expandAxisBreak`,gk=Math.PI,_k=[[1,2,1,2],[5,3,5,3],[8,3,8,3]],vk=[[0,1,0,1],[0,3,0,3],[0,3,0,3]],yk=ts(),bk=ts(),xk=function(){function e(e){this.recordMap={},this.resolveAxisNameOverlap=e}return e.prototype.ensureRecord=function(e){var t=e.axis.dim,n=e.componentIndex,r=this.recordMap,i=r[t]||(r[t]=[]);return i[n]||(i[n]={ready:{}})},e}();function Sk(e,t,n,r){var i=n.axis,a=t.ensureRecord(n),o=[],s,c=Kk(e.axisName)&&fT(e.nameLocation);L(r,function(e){var t=UE(e);if(!(!t||t.label.ignore)){o.push(t);var n=a.transGroup;c&&(n.transform?Jt(Ck,n.transform):Ht(Ck),t.transform&&Wt(Ck,Ck,t.transform),X.copy(wk,t.localRect),wk.applyTransform(Ck),s?s.union(wk):X.copy(s=new X(0,0,0,0),wk))}});var l=Math.abs(a.dirVec.x)>.1?`x`:`y`,u=a.transGroup[l];if(o.sort(function(e,t){return Math.abs(e.label[l]-u)-Math.abs(t.label[l]-u)}),c&&s){var d=i.getExtent(),f=Math.min(d[0],d[1]),p=Math.max(d[0],d[1])-f;s.union(new X(f,0,p,1))}a.stOccupiedRect=s,a.labelInfoList=o}var Ck=Vt(),wk=new X(0,0,0,0),Tk=function(e,t,n,r,i,a){if(fT(e.nameLocation)){var o=a.stOccupiedRect;o&&Ek(KE({},o,a.transGroup.transform),r,i)}else Dk(a.labelInfoList,a.dirVec,r,i)};function Ek(e,t,n){var r=new Y;QE(e,t,r,{direction:Math.atan2(n.y,n.x),bidirectional:!1,touchThreshold:.05})&&qE(t,r)}function Dk(e,t,n,r){for(var i=Y.dot(r,t)>=0,a=0,o=e.length;a0?`top`:`bottom`,i=`center`):po(r-gk)?(a=n>0?`bottom`:`top`,i=`center`):(a=`middle`,i=r>0&&r0?`right`:`left`:n>0?`left`:`right`),{rotation:r,textAlign:i,textVerticalAlign:a}},e.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+`Index`]=e.componentIndex,t},e.isLabelSilent=function(e){var t=e.get(`tooltip`);return e.get(`silent`)||!(e.get(`triggerEvent`)||t&&t.show)},e}(),kk=[`axisLine`,`axisTickLabelEstimate`,`axisTickLabelDetermine`,`axisName`],Ak={axisLine:function(e,t,n,r,i,a,o){var s=r.get([`axisLine`,`show`]);if(s===`auto`&&(s=!0,e.raw.axisLineAutoShow!=null&&(s=!!e.raw.axisLineAutoShow)),s){var c=r.axis.getExtent(),l=a.transform,u=[c[0],0],d=[c[1],0],f=u[0]>d[0];l&&(at(u,u,l),at(d,d,l));var p=M({lineCap:`round`},r.getModel([`axisLine`,`lineStyle`]).getLineStyle()),m={strokeContainThreshold:e.raw.strokeContainThreshold||5,silent:!0,z2:1,style:p};if(r.get([`axisLine`,`breakLine`])&&r.axis.scale.hasBreaks())sk().buildAxisBreakLine(r,i,a,m);else{var h=new ef(M({shape:{x1:u[0],y1:u[1],x2:d[0],y2:d[1]}},m));qf(h.shape,h.style.lineWidth),h.anid=`line`,i.add(h)}var g=r.get([`axisLine`,`symbol`]);if(g!=null){var _=r.get([`axisLine`,`symbolSize`]);W(g)&&(g=[g,g]),(W(_)||G(_))&&(_=[_,_]);var v=mb(r.get([`axisLine`,`symbolOffset`])||0,_),y=_[0],b=_[1];L([{rotate:e.rotation+Math.PI/2,offset:v[0],r:0},{rotate:e.rotation-Math.PI/2,offset:v[1],r:Math.sqrt((u[0]-d[0])*(u[0]-d[0])+(u[1]-d[1])*(u[1]-d[1]))}],function(t,n){if(g[n]!==`none`&&g[n]!=null){var r=fb(g[n],-y/2,-b/2,y,b,p.stroke,!0),a=t.r+t.offset,o=f?d:u;r.attr({rotation:t.rotate,x:o[0]+a*Math.cos(e.rotation),y:o[1]-a*Math.sin(e.rotation),silent:!0,z2:11}),i.add(r)}})}}},axisTickLabelEstimate:function(e,t,n,r,i,a,o,s){zk(t,i,s)&&jk(e,t,n,r,i,a,o,JT.estimate)},axisTickLabelDetermine:function(e,t,n,r,i,a,o,s){zk(t,i,s)&&jk(e,t,n,r,i,a,o,JT.determine);var c=Lk(e,i,a,r);Pk(e,t.labelLayoutList,c),Rk(e,i,a,r,e.tickDirection)},axisName:function(e,t,n,r,i,a,o,s){var c=n.ensureRecord(r);t.nameEl&&=(i.remove(t.nameEl),c.nameLayout=c.nameLocation=null);var l=e.axisName;if(Kk(l)){var u=e.nameLocation,d=e.nameDirection,f=r.getModel(`nameTextStyle`),p=r.get(`nameGap`)||0,m=r.axis.getExtent(),h=r.axis.inverse?-1:1,g=new Y(0,0),_=new Y(0,0);u===`start`?(g.x=m[0]-h*p,_.x=-h):u===`end`?(g.x=m[1]+h*p,_.x=h):(g.x=(m[0]+m[1])/2,g.y=e.labelOffset+d*p,_.y=d);var v=Vt();_.transform(Kt(v,v,e.rotation));var y=r.get(`nameRotate`);y!=null&&(y=y*gk/180);var b,x;fT(u)?b=Ok.innerTextLayout(e.rotation,y??e.rotation,d):(b=Mk(e.rotation,u,y||0,m),x=e.raw.axisNameAvailableWidth,x!=null&&(x=Math.abs(x/Math.sin(b.rotation)),!isFinite(x)&&(x=null)));var S=f.getFont(),C=r.get(`nameTruncate`,!0)||{},w=C.ellipsis,T=me(e.raw.nameTruncateMaxWidth,C.maxWidth,x),E=s.nameMarginLevel||0,D=new Nl({x:g.x,y:g.y,rotation:b.rotation,silent:Ok.isLabelSilent(r),style:Op(f,{text:l,font:S,overflow:`truncate`,width:T,ellipsis:w,fill:f.getTextColor()||r.get([`axisLine`,`lineStyle`,`color`]),align:f.get(`align`)||b.textAlign,verticalAlign:f.get(`verticalAlign`)||b.textVerticalAlign}),z2:1});if(fp({el:D,componentModel:r,itemName:l}),D.__fullText=l,D.anid=`name`,r.get(`triggerEvent`)){var O=Ok.makeAxisEventDataBase(r);O.targetType=`axisName`,O.name=l,Z(D).eventData=O}a.add(D),D.updateTransform(),t.nameEl=D;var k=c.nameLayout=UE({label:D,priority:D.z2,defaultAttr:{ignore:D.ignore},marginDefault:fT(u)?_k[E]:vk[E]});if(c.nameLocation=u,i.add(D),D.decomposeTransform(),e.shouldNameMoveOverlap&&k){var A=n.ensureRecord(r);n.resolveAxisNameOverlap(e,n,r,k,_,A)}}}};function jk(e,t,n,r,i,a,o,s){Vk(t)||Bk(e,t,i,s,r,o);var c=t.labelLayoutList;Uk(e,r,c,a),Jk(r,e.rotation,c);var l=e.optionHideOverlap;Nk(r,c,l),l&&ZE(re(c,function(e){return e&&!e.label.ignore})),Sk(e,n,r,c)}function Mk(e,t,n,r){var i=fo(n-e),a,o,s=r[0]>r[1],c=t===`start`&&!s||t!==`start`&&s;return po(i-gk/2)?(o=c?`bottom`:`top`,a=`center`):po(i-gk*1.5)?(o=c?`top`:`bottom`,a=`center`):(o=`middle`,a=igk/2?c?`left`:`right`:c?`right`:`left`),{rotation:i,textAlign:a,textVerticalAlign:o}}function Nk(e,t,n){if(uT(e.axis))return;function r(e,r,i){var a=UE(t[r]),o=UE(t[i]);if(!(!a||!o)){if(e===!1||a.suggestIgnore){Fk(a.label);return}if(o.suggestIgnore){Fk(o.label);return}var s=.1;if(!n){var c=[0,0,0,0];a=JE({marginForce:c},a),o=JE({marginForce:c},o)}QE(a,o,null,{touchThreshold:s})&&Fk(e?o.label:a.label)}}var i=e.get([`axisLabel`,`showMinLabel`]),a=e.get([`axisLabel`,`showMaxLabel`]),o=t.length;r(i,0,1),r(a,o-1,o-2)}function Pk(e,t,n){e.showMinorTicks||L(t,function(e){if(e&&e.label.ignore)for(var t=0;tl[0]&&isFinite(m)&&isFinite(l[0]);)p=ew(p),m=l[1]-p*o;else{e.getTicks().length-1>o&&(p=ew(p));var g=p*o;h=Math.ceil(l[1]/p)*p,m=no(h-g),m<0&&l[0]>=0?(m=0,h=no(g)):h>0&&l[1]<=0&&(h=0,m=-no(g))}var _=(i[0].value-a[0].value)/s,v=(i[o].value-a[o].value)/s;r.setExtent.call(e,m+p*_,h+p*v),r.setInterval.call(e,p),(_||v)&&r.setNiceExtent.call(e,m+p,h-p)}var tA=[[3,1],[0,2]],nA=function(){function e(e,t,n){this.type=`grid`,this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=dk,this._initCartesian(e,t,n),this.model=e}return e.prototype.getRect=function(){return this._rect},e.prototype.update=function(e,t){var n=this._axesMap;this._updateScale(e,this.model);function r(e){var t,n=z(e),r=n.length;if(r){for(var i=[],a=r-1;a>=0;a--){var o=e[+n[a]],s=o.model,c=o.scale;QC(c)&&s.get(`alignTicks`)&&s.get(`interval`)==null?i.push(o):(iT(c,s),QC(c)&&(t=o))}i.length&&(t||(t=i.pop(),iT(t.scale,t.model)),L(i,function(e){eA(e.scale,e.model,t.scale)}))}}r(n.x),r(n.y);var i={};L(n.x,function(e){iA(n,`y`,e,i)}),L(n.y,function(e){iA(n,`x`,e,i)}),this.resize(this.model,t)},e.prototype.resize=function(e,t,n){var r=Mh(e,t),i=this._rect=Ah(e.getBoxLayoutParams(),r.refContainer),a=this._axesMap,o=this._coordsList,s=e.get(`containLabel`);if(sA(a,i),!n){var c=dA(i,o,a,s,t),l=void 0;if(s)lA?(lA(this._axesList,i),sA(a,i)):l=uA(i.clone(),`axisLabel`,null,i,a,c,r);else{var u=pA(e,i,r),d=u.outerBoundsRect,f=u.parsedOuterBoundsContain,p=u.outerBoundsClamp;d&&(l=uA(d,f,p,i,a,c,r))}fA(i,a,JT.determine,null,l,r)}L(this._coordsList,function(e){e.calcAffineTransform()})},e.prototype.getAxis=function(e,t){var n=this._axesMap[e];if(n!=null)return n[t||0]},e.prototype.getAxes=function(){return this._axesList.slice()},e.prototype.getCartesian=function(e,t){if(e!=null&&t!=null){var n=`x`+e+`y`+t;return this._coordsMap[n]}K(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var r=0,i=this._coordsList;r0})==null;return lp(r,s,!0,!0,n),sA(i,r),c;function l(e){L(i[Ff[e]],function(t){if(pT(t.model)){var n=a.ensureRecord(t.model),r=n.labelInfoList;if(r)for(var i=0;i0&&!pe(t)&&t>1e-4&&(e/=t),e}}function dA(e,t,n,r,i){var a=new xk(mA);return L(n,function(n){return L(n,function(n){if(pT(n.model)){var o=!r;n.axisBuilder=Qk(e,t,n.model,i,a,o)}})}),a}function fA(e,t,n,r,i,a){var o=n===JT.determine;L(t,function(t){return L(t,function(t){pT(t.model)&&($k(t.axisBuilder,e,t.model),t.axisBuilder.build(o?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:i}))})});var s={x:0,y:0};c(0),c(1);function c(t){s[Ff[1-t]]=e[If[t]]<=a.refContainer[If[t]]*.5?0:1-t==1?2:1}L(t,function(e,t){return L(e,function(e){pT(e.model)&&((r===`all`||o)&&e.axisBuilder.build({axisName:!0},{nameMarginLevel:s[t]}),o&&e.axisBuilder.build({axisLine:!0}))})})}function pA(e,t,n){var r,i=e.get(`outerBoundsMode`,!0);i===`same`?r=t.clone():(i==null||i===`auto`)&&(r=Ah(e.get(`outerBounds`,!0)||ZO,n.refContainer));var a=e.get(`outerBoundsContain`,!0),o=a==null||a===`auto`||F([`all`,`axisLabel`],a)<0?`all`:a,s=[to(q(e.get(`outerBoundsClampWidth`,!0),QO[0]),t.width),to(q(e.get(`outerBoundsClampHeight`,!0),QO[1]),t.height)];return{outerBoundsRect:r,parsedOuterBoundsContain:o,outerBoundsClamp:s}}var mA=function(e,t,n,r,i,a){var o=n.axis.dim===`x`?`y`:`x`;Tk(e,t,n,r,i,a),fT(e.nameLocation)||L(t.recordMap[o],function(e){e&&e.labelInfoList&&e.dirVec&&Dk(e.labelInfoList,e.dirVec,r,i)})};function hA(e,t){var n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return gA(n,e,t),n.seriesInvolved&&vA(n,e),n}function gA(e,t,n){var r=t.getComponent(`tooltip`),i=t.getComponent(`axisPointer`),a=i.get(`link`,!0)||[],o=[];L(n.getCoordinateSystems(),function(n){if(!n.axisPointerEnabled)return;var s=TA(n.model),c=e.coordSysAxesInfo[s]={};e.coordSysMap[s]=n;var l=n.model.getModel(`tooltip`,r);if(L(n.getAxes(),V(p,!1,null)),n.getTooltipAxes&&r&&l.get(`show`)){var u=l.get(`trigger`)===`axis`,d=l.get([`axisPointer`,`type`])===`cross`,f=n.getTooltipAxes(l.get([`axisPointer`,`axis`]));(u||d)&&L(f.baseAxes,V(p,d?`cross`:!0,u)),d&&L(f.otherAxes,V(p,`cross`,!1))}function p(r,s,u){var d=u.model.getModel(`axisPointer`,i),f=d.get(`show`);if(!(!f||f===`auto`&&!r&&!wA(d))){s??=d.get(`triggerTooltip`),d=r?_A(u,l,i,t,r,s):d;var p=d.get(`snap`),m=d.get(`triggerEmphasis`),h=TA(u.model),g=s||p||u.type===`category`,_=e.axesInfo[h]={key:h,axis:u,coordSys:n,axisPointerModel:d,triggerTooltip:s,triggerEmphasis:m,involveSeries:g,snap:p,useHandle:wA(d),seriesModels:[],linkGroup:null};c[h]=_,e.seriesInvolved=e.seriesInvolved||g;var v=yA(a,u);if(v!=null){var y=o[v]||(o[v]={axesInfo:{}});y.axesInfo[h]=_,y.mapper=a[v].mapper,_.linkGroup=y}}}})}function _A(e,t,n,r,i,a){var o=t.getModel(`axisPointer`),s=[`type`,`snap`,`lineStyle`,`shadowStyle`,`label`,`animation`,`animationDurationUpdate`,`animationEasingUpdate`,`z`],c={};L(s,function(e){c[e]=k(o.get(e))}),c.snap=e.type!==`category`&&!!a,o.get(`type`)===`cross`&&(c.type=`line`);var l=c.label||={};if(l.show??=!1,i===`cross`&&(l.show=o.get([`label`,`show`])??!0,!a)){var u=c.lineStyle=o.get(`crossStyle`);u&&N(l,u.textStyle)}return e.model.getModel(`axisPointer`,new Xp(c,n,r))}function vA(e,t){t.eachSeries(function(t){var n=t.coordinateSystem,r=t.get([`tooltip`,`trigger`],!0),i=t.get([`tooltip`,`show`],!0);!n||!n.model||r===`none`||r===!1||r===`item`||i===!1||t.get([`axisPointer`,`show`],!0)===!1||L(e.coordSysAxesInfo[TA(n.model)],function(e){var r=e.axis;n.getAxis(r.dim)===r&&(e.seriesModels.push(t),e.seriesDataCount??=0,e.seriesDataCount+=t.getData().count())})})}function yA(e,t){for(var n=t.model,r=t.dim,i=0;i=0||e===t}function xA(e){var t=SA(e);if(t){var n=t.axisPointerModel,r=t.axis.scale,i=n.option,a=n.get(`status`),o=n.get(`value`);o!=null&&(o=r.parse(o));var s=wA(n);a??(i.status=s?`show`:`hide`);var c=r.getExtent().slice();c[0]>c[1]&&c.reverse(),(o==null||o>c[1])&&(o=c[1]),oo)return!0;if(a){var s=SA(e).seriesDataCount,c=r.getExtent();return Math.abs(c[0]-c[1])/s>o}return!1}return n===!0},e.prototype.makeElOption=function(e,t,n,r,i){},e.prototype.createPointerEl=function(e,t,n,r){var i=t.pointer;if(i){var a=zA(e).pointerEl=new Nf[i.type](BA(t.pointer));e.add(a)}},e.prototype.createLabelEl=function(e,t,n,r){if(t.label){var i=zA(e).labelEl=new Nl(BA(t.label));e.add(i),GA(i,r)}},e.prototype.updatePointerEl=function(e,t,n){var r=zA(e).pointerEl;r&&t.pointer&&(r.setStyle(t.pointer.style),n(r,{shape:t.pointer.shape}))},e.prototype.updateLabelEl=function(e,t,n,r){var i=zA(e).labelEl;i&&(i.setStyle(t.label.style),n(i,{x:t.label.x,y:t.label.y}),GA(i,r))},e.prototype._renderHandle=function(e){if(!(this._dragging||!this.updateHandleTransform)){var t=this._axisPointerModel,n=this._api.getZr(),r=this._handle,i=t.getModel(`handle`),a=t.get(`status`);if(!i.get(`show`)||!a||a===`hide`){r&&n.remove(r),this._handle=null;return}var o;this._handle||(o=!0,r=this._handle=ip(i.get(`icon`),{cursor:`move`,draggable:!0,onmousemove:function(e){Ft(e.event)},onmousedown:VA(this._onHandleDragMove,this,0,0),drift:VA(this._onHandleDragMove,this),ondragend:VA(this._onHandleDragEnd,this)}),n.add(r)),qA(r,t,!1),r.setStyle(i.getItemStyle(null,[`color`,`borderColor`,`borderWidth`,`opacity`,`shadowColor`,`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`]));var s=i.get(`size`);H(s)||(s=[s,s]),r.scaleX=s[0]/2,r.scaleY=s[1]/2,my(this,`_doDispatchAxisPointer`,i.get(`throttle`)||0,`fixRate`),this._moveHandleToValue(e,o)}},e.prototype._moveHandleToValue=function(e,t){UA(this._axisPointerModel,!t&&this._moveAnimation,this._handle,KA(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},e.prototype._onHandleDragMove=function(e,t){var n=this._handle;if(n){this._dragging=!0;var r=this.updateHandleTransform(KA(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=r,n.stopAnimation(),n.attr(KA(r)),zA(n).lastProp=null,this._doDispatchAxisPointer()}},e.prototype._doDispatchAxisPointer=function(){if(this._handle){var e=this._payloadInfo,t=this._axisModel;this._api.dispatchAction({type:`updateAxisPointer`,x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:t.axis.dim,axisIndex:t.componentIndex}]})}},e.prototype._onHandleDragEnd=function(){if(this._dragging=!1,this._handle){var e=this._axisPointerModel.get(`value`);this._moveHandleToValue(e),this._api.dispatchAction({type:`hideTip`})}},e.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),n=this._group,r=this._handle;t&&n&&(this._lastGraphicKey=null,n&&t.remove(n),r&&t.remove(r),this._group=null,this._handle=null,this._payloadInfo=null),hy(this,`_doDispatchAxisPointer`)},e.prototype.doClear=function(){},e.prototype.buildLabel=function(e,t,n){return n||=0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}},e}();function UA(e,t,n,r){WA(zA(n).lastProp,r)||(zA(n).lastProp=r,t?Ef(n,r,e):(n.stopAnimation(),n.attr(r)))}function WA(e,t){if(K(e)&&K(t)){var n=!0;return L(t,function(t,r){n&&=WA(e[r],t)}),!!n}else return e===t}function GA(e,t){e[t.get([`label`,`show`])?`show`:`hide`]()}function KA(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function qA(e,t,n){var r=t.get(`z`),i=t.get(`zlevel`);e&&e.traverse(function(e){e.type!==`group`&&(r!=null&&(e.z=r),i!=null&&(e.zlevel=i),e.silent=n)})}function JA(e){var t=e.get(`type`),n=e.getModel(t+`Style`),r;return t===`line`?(r=n.getLineStyle(),r.fill=null):t===`shadow`&&(r=n.getAreaStyle(),r.stroke=null),r}function YA(e,t,n,r,i){var a=ZA(n.get(`value`),t.axis,t.ecModel,n.get(`seriesDataIndices`),{precision:n.get([`label`,`precision`]),formatter:n.get([`label`,`formatter`])}),o=n.getModel(`label`),s=th(o.get(`padding`)||0),c=o.getFont(),l=ua(a,c),u=i.position,d=l.width+s[1]+s[3],f=l.height+s[0]+s[2],p=i.align;p===`right`&&(u[0]-=d),p===`center`&&(u[0]-=d/2);var m=i.verticalAlign;m===`bottom`&&(u[1]-=f),m===`middle`&&(u[1]-=f/2),XA(u,d,f,r);var h=o.get(`backgroundColor`);(!h||h===`auto`)&&(h=t.get([`axisLine`,`lineStyle`,`color`])),e.label={x:u[0],y:u[1],style:Op(o,{text:a,font:c,fill:o.getTextColor(),padding:s,backgroundColor:h}),z2:10}}function XA(e,t,n,r){var i=r.getWidth(),a=r.getHeight();e[0]=Math.min(e[0]+t,i)-t,e[1]=Math.min(e[1]+n,a)-n,e[0]=Math.max(e[0],0),e[1]=Math.max(e[1],0)}function ZA(e,t,n,r,i){e=t.scale.parse(e);var a=t.scale.getLabel({value:e},{precision:i.precision}),o=i.formatter;if(o){var s={value:cT(t,{value:e}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};L(r,function(e){var t=n.getSeriesByIndex(e.seriesIndex),r=e.dataIndexInside,i=t&&t.getDataParams(r);i&&s.seriesData.push(i)}),W(o)?a=o.replace(`{value}`,a):U(o)&&(a=o(s))}return a}function QA(e,t,n){var r=Vt();return Kt(r,r,n.rotation),Gt(r,r,n.position),Zf([e.dataToCoord(t),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],r)}function $A(e,t,n,r,i,a){var o=Ok.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=i.get([`label`,`margin`]),YA(t,r,i,a,{position:QA(r.axis,e,n),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function ej(e,t,n){return n||=0,{x1:e[n],y1:e[1-n],x2:t[n],y2:t[1-n]}}function tj(e,t,n){return n||=0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}}var nj=function(e){n(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,t,n,r,i){var a=n.axis,o=a.grid,s=r.get(`type`),c=rj(o,a).getOtherAxis(a).getGlobalExtent(),l=a.toGlobalCoord(a.dataToCoord(t,!0));if(s&&s!==`none`){var u=JA(r),d=ij[s](a,l,c);d.style=u,e.graphicKey=d.type,e.pointer=d}$A(t,e,Yk(o.getRect(),n),n,r,i)},t.prototype.getHandleTransform=function(e,t,n){var r=Yk(t.axis.grid.getRect(),t,{labelInside:!1});r.labelMargin=n.get([`handle`,`margin`]);var i=QA(t.axis,e,r);return{x:i[0],y:i[1],rotation:r.rotation+(r.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,t,n,r){var i=n.axis,a=i.grid,o=i.getGlobalExtent(!0),s=rj(a,i).getOtherAxis(i).getGlobalExtent(),c=i.dim===`x`?0:1,l=[e.x,e.y];l[c]+=t[c],l[c]=Math.min(o[1],l[c]),l[c]=Math.max(o[0],l[c]);var u=(s[1]+s[0])/2,d=[u,u];return d[c]=l[c],{x:l[0],y:l[1],rotation:e.rotation,cursorPoint:d,tooltipOption:[{verticalAlign:`middle`},{align:`center`}][c]}},t}(HA);function rj(e,t){var n={};return n[t.dim+`AxisIndex`]=t.index,e.getCartesian(n)}var ij={line:function(e,t,n){return{type:`Line`,subPixelOptimize:!0,shape:ej([t,n[0]],[t,n[1]],aj(e))}},shadow:function(e,t,n){var r=Math.max(1,e.getBandWidth()),i=n[1]-n[0];return{type:`Rect`,shape:tj([t-r/2,n[0]],[r,i],aj(e))}}};function aj(e){return e.dim===`x`?0:1}var oj=function(e){n(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}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:Q.color.border,width:1,type:`dashed`},shadowStyle:{color:Q.color.shadowTint},label:{show:!0,formatter:null,precision:`auto`,margin:3,color:Q.color.neutral00,padding:[5,7,5,7],backgroundColor:Q.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:Q.color.accent40,throttle:40}},t}(Rh),sj=ts(),cj=L;function lj(e,t,n){if(!i.node){var r=t.getZr();sj(r).records||(sj(r).records={}),uj(r,t);var a=sj(r).records[e]||(sj(r).records[e]={});a.handler=n}}function uj(e,t){if(sj(e).initialized)return;sj(e).initialized=!0,n(`click`,V(pj,`click`)),n(`mousemove`,V(pj,`mousemove`)),n(`globalout`,fj);function n(n,r){e.on(n,function(n){var i=mj(t);cj(sj(e).records,function(e){e&&r(e,n,i.dispatchAction)}),dj(i.pendings,t)})}}function dj(e,t){var n=e.showTip.length,r=e.hideTip.length,i;n?i=e.showTip[n-1]:r&&(i=e.hideTip[r-1]),i&&(i.dispatchAction=null,t.dispatchAction(i))}function fj(e,t,n){e.handler(`leave`,null,n)}function pj(e,t,n,r){t.handler(e,n,r)}function mj(e){var t={showTip:[],hideTip:[]},n=function(r){var i=t[r.type];i?i.push(r):(r.dispatchAction=n,e.dispatchAction(r))};return{dispatchAction:n,pendings:t}}function hj(e,t){if(!i.node){var n=t.getZr();(sj(n).records||{})[e]&&(sj(n).records[e]=null)}}var gj=function(e){n(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){var r=t.getComponent(`tooltip`),i=e.get(`triggerOn`)||r&&r.get(`triggerOn`)||`mousemove|click`;lj(`axisPointer`,n,function(e,t,n){i!==`none`&&(e===`leave`||i.indexOf(e)>=0)&&n({type:`updateAxisPointer`,currTrigger:e,x:t&&t.offsetX,y:t&&t.offsetY})})},t.prototype.remove=function(e,t){hj(`axisPointer`,t)},t.prototype.dispose=function(e,t){hj(`axisPointer`,t)},t.type=`axisPointer`,t}(ey);function _j(e,t){var n=[],r=e.seriesIndex,i;if(r==null||!(i=t.getSeriesByIndex(r)))return{point:[]};var a=i.getData(),o=es(a,e);if(o==null||o<0||H(o))return{point:[]};var s=a.getItemGraphicEl(o),c=i.coordinateSystem;if(i.getTooltipPosition)n=i.getTooltipPosition(o)||[];else if(c&&c.dataToPoint)if(e.isStacked){var l=c.getBaseAxis(),u=c.getOtherAxis(l).dim,d=l.dim,f=+(u===`x`||u===`radius`),p=a.mapDimension(d),m=[];m[f]=a.get(p,o),m[1-f]=a.get(a.getCalculationInfo(`stackResultDimension`),o),n=c.dataToPoint(m)||[]}else n=c.dataToPoint(a.getValues(R(c.dimensions,function(e){return a.mapDimension(e)}),o))||[];else if(s){var h=s.getBoundingRect().clone();h.applyTransform(s.transform),n=[h.x+h.width/2,h.y+h.height/2]}return{point:n,el:s}}var vj=ts();function yj(e,t,n){var r=e.currTrigger,i=[e.x,e.y],a=e,o=e.dispatchAction||B(n.dispatchAction,n),s=t.getComponent(`axisPointer`).coordSysAxesInfo;if(s){kj(i)&&(i=_j({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},t).point);var c=kj(i),l=a.axesInfo,u=s.axesInfo,d=r===`leave`||kj(i),f={},p={},m={list:[],map:{}},h={showPointer:V(Sj,p),showTooltip:V(Cj,m)};L(s.coordSysMap,function(e,t){var n=c||e.containPoint(i);L(s.coordSysAxesInfo[t],function(e,t){var r=e.axis,a=Dj(l,e);if(!d&&n&&(!l||a)){var o=a&&a.value;o==null&&!c&&(o=r.pointToData(i)),o!=null&&bj(e,o,h,!1,f)}})});var g={};return L(u,function(e,t){var n=e.linkGroup;n&&!p[t]&&L(n.axesInfo,function(t,r){var i=p[r];if(t!==e&&i){var a=i.value;n.mapper&&(a=e.axis.scale.parse(n.mapper(a,Oj(t),Oj(e)))),g[e.key]=a}})}),L(g,function(e,t){bj(u[t],e,h,!0,f)}),wj(p,u,f),Tj(m,i,e,o),Ej(u,o,n),f}}function bj(e,t,n,r,i){var a=e.axis;if(!(a.scale.isBlank()||!a.containData(t))){if(!e.involveSeries){n.showPointer(e,t);return}var o=xj(t,e),s=o.payloadBatch,c=o.snapToValue;s[0]&&i.seriesIndex==null&&M(i,s[0]),!r&&e.snap&&a.containData(c)&&c!=null&&(t=c),n.showPointer(e,t,s),n.showTooltip(e,o,c)}}function xj(e,t){var n=t.axis,r=n.dim,i=e,a=[],o=Number.MAX_VALUE,s=-1;return L(t.seriesModels,function(t,c){var l=t.getData().mapDimensionsAll(r),u,d;if(t.getAxisTooltipData){var f=t.getAxisTooltipData(l,e,n);d=f.dataIndices,u=f.nestestValue}else{if(d=t.indicesOfNearest(r,l[0],e,n.type===`category`?.5:null),!d.length)return;u=t.getData().get(l[0],d[0])}if(!(u==null||!isFinite(u))){var p=e-u,m=Math.abs(p);m<=o&&((m=0&&s<0)&&(o=m,s=p,i=u,a.length=0),L(d,function(e){a.push({seriesIndex:t.seriesIndex,dataIndexInside:e,dataIndex:t.getData().getRawIndex(e)})}))}}),{payloadBatch:a,snapToValue:i}}function Sj(e,t,n,r){e[t.key]={value:n,payloadBatch:r}}function Cj(e,t,n,r){var i=n.payloadBatch,a=t.axis,o=a.model,s=t.axisPointerModel;if(!(!t.triggerTooltip||!i.length)){var c=t.coordSys.model,l=TA(c),u=e.map[l];u||(u=e.map[l]={coordSysId:c.id,coordSysIndex:c.componentIndex,coordSysType:c.type,coordSysMainType:c.mainType,dataByAxis:[]},e.list.push(u)),u.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:r,valueLabelOpt:{precision:s.get([`label`,`precision`]),formatter:s.get([`label`,`formatter`])},seriesDataIndices:i.slice()})}}function wj(e,t,n){var r=n.axesInfo=[];L(t,function(t,n){var i=t.axisPointerModel.option,a=e[n];a?(!t.useHandle&&(i.status=`show`),i.value=a.value,i.seriesDataIndices=(a.payloadBatch||[]).slice()):!t.useHandle&&(i.status=`hide`),i.status===`show`&&r.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:i.value})})}function Tj(e,t,n,r){if(kj(t)||!e.list.length){r({type:`hideTip`});return}var i=((e.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};r({type:`showTip`,escapeConnect:!0,x:t[0],y:t[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:e.list})}function Ej(e,t,n){var r=n.getZr(),i=`axisPointerLastHighlights`,a=vj(r)[i]||{},o=vj(r)[i]={};L(e,function(e,t){var n=e.axisPointerModel.option;n.status===`show`&&e.triggerEmphasis&&L(n.seriesDataIndices,function(e){var t=e.seriesIndex+` | `+e.dataIndex;o[t]=e})});var s=[],c=[];L(a,function(e,t){!o[t]&&c.push(e)}),L(o,function(e,t){!a[t]&&s.push(e)}),c.length&&n.dispatchAction({type:`downplay`,escapeConnect:!0,notBlur:!0,batch:c}),s.length&&n.dispatchAction({type:`highlight`,escapeConnect:!0,notBlur:!0,batch:s})}function Dj(e,t){for(var n=0;n<(e||[]).length;n++){var r=e[n];if(t.axis.dim===r.axisDim&&t.axis.model.componentIndex===r.axisIndex)return r}}function Oj(e){var t=e.axis.model,n={},r=n.axisDim=e.axis.dim;return n.axisIndex=n[r+`AxisIndex`]=t.componentIndex,n.axisName=n[r+`AxisName`]=t.name,n.axisId=n[r+`AxisId`]=t.id,n}function kj(e){return!e||e[0]==null||isNaN(e[0])||e[1]==null||isNaN(e[1])}function Aj(e){DA.registerAxisPointerClass(`CartesianAxisPointer`,nj),e.registerComponentModel(oj),e.registerComponentView(gj),e.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!H(t)&&(e.axisPointer.link=[t])}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,function(e,t){e.getComponent(`axisPointer`).coordSysAxesInfo=hA(e,t)}),e.registerAction({type:`updateAxisPointer`,event:`updateAxisPointer`,update:`:updateAxisPointer`},yj)}function jj(e){TT(RA),TT(Aj)}function Mj(e,t){var n=th(t.get(`padding`)),r=t.getItemStyle([`color`,`opacity`]);return r.fill=t.get(`backgroundColor`),new Ol({shape:{x:e.x-n[3],y:e.y-n[0],width:e.width+n[1]+n[3],height:e.height+n[0]+n[2],r:t.get(`borderRadius`)},style:r,silent:!0,z2:-1})}var Nj=function(e){n(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}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:Q.color.neutral00,shadowBlur:10,shadowColor:`rgba(0, 0, 0, .2)`,shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:Q.color.border,padding:null,extraCssText:``,axisPointer:{type:`line`,axis:`auto`,animation:`auto`,animationDurationUpdate:200,animationEasingUpdate:`exponentialOut`,crossStyle:{color:Q.color.borderShade,width:1,type:`dashed`,textStyle:{}}},textStyle:{color:Q.color.tertiary,fontSize:14}},t}(Rh);function Pj(e){var t=e.get(`confine`);return t==null?e.get(`renderMode`)===`richText`:!!t}function Fj(e){if(i.domSupported){for(var t=document.documentElement.style,n=0,r=e.length;n-1?(s+=`top:50%`,c+=`translateY(-50%) rotate(`+(l=a===`left`?-225:-45)+`deg)`):(s+=`left:50%`,c+=`translateX(-50%) rotate(`+(l=a===`top`?225:45)+`deg)`);var u=l*Math.PI/180,d=o+i,f=d*Math.abs(Math.cos(u))+d*Math.abs(Math.sin(u)),p=Math.round(((f-Math.SQRT2*i)/2+Math.SQRT2*i-(f-d)/2)*100)/100;s+=`;`+a+`:-`+p+`px`;var m=t+` solid `+i+`px;`;return`
`}function Gj(e,t,n){var r=`cubic-bezier(0.23,1,0.32,1)`,a=``,o=``;return n&&(a=` `+e/2+`s `+r,o=`opacity`+a+`,visibility`+a),t||(a=` `+e+`s `+r,o+=(o.length?`,`:``)+(i.transformSupported?``+Vj+a:`,left`+a+`,top`+a)),Bj+`:`+o}function Kj(e,t,n){var r=e.toFixed(0)+`px`,a=t.toFixed(0)+`px`;if(!i.transformSupported)return n?`top:`+a+`;left:`+r+`;`:[[`top`,a],[`left`,r]];var o=i.transform3dSupported,s=`translate`+(o?`3d`:``)+`(`+r+`,`+a+(o?`,0`:``)+`)`;return n?`top:0;left:0;`+Vj+`:`+s+`;`:[[`top`,0],[`left`,0],[Ij,s]]}function qj(e){var t=[],n=e.get(`fontSize`),r=e.getTextColor();r&&t.push(`color:`+r),t.push(`font:`+e.getFont());var i=q(e.get(`lineHeight`),Math.round(n*3/2));n&&t.push(`line-height:`+i+`px`);var a=e.get(`textShadowColor`),o=e.get(`textShadowBlur`)||0,s=e.get(`textShadowOffsetX`)||0,c=e.get(`textShadowOffsetY`)||0;return a&&o&&t.push(`text-shadow:`+s+`px `+c+`px `+o+`px `+a),L([`decoration`,`align`],function(n){var r=e.get(n);r&&t.push(`text-`+n+`:`+r)}),t.join(`;`)}function Jj(e,t,n,r){var i=[],a=e.get(`transitionDuration`),o=e.get(`backgroundColor`),s=e.get(`shadowBlur`),c=e.get(`shadowColor`),l=e.get(`shadowOffsetX`),u=e.get(`shadowOffsetY`),d=e.getModel(`textStyle`),f=zv(e,`html`),p=l+`px `+u+`px `+s+`px `+c;return i.push(`box-shadow:`+p),t&&a>0&&i.push(Gj(a,n,r)),o&&i.push(`background-color:`+o),L([`width`,`color`,`radius`],function(t){var n=`border-`+t,r=eh(n),a=e.get(r);a!=null&&i.push(n+`:`+a+(t===`color`?``:`px`))}),i.push(qj(d)),f!=null&&i.push(`padding:`+th(f).join(`px `)+`px`),i.join(`;`)+`;`}function Yj(e,t,n,r,i){var a=t&&t.painter;if(n){var o=a&&a.getViewportRoot();o&>(e,o,n,r,i)}else{e[0]=r,e[1]=i;var s=a&&a.getViewportRootOffset();s&&(e[0]+=s.offsetLeft,e[1]+=s.offsetTop)}e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var Xj=function(){function e(e,t){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,i.wxa)return null;var n=document.createElement(`div`);n.domBelongToZr=!0,this.el=n;var r=this._zr=e.getZr(),a=t.appendTo,o=a&&(W(a)?document.querySelector(a):le(a)?a:U(a)&&a(e.getDom()));Yj(this._styleCoord,r,o,e.getWidth()/2,e.getHeight()/2),(o||e.getDom()).appendChild(n),this._api=e,this._container=o;var s=this;n.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},n.onmousemove=function(e){if(e||=window.event,!s._enterable){var t=r.handler;jt(r.painter.getViewportRoot(),e,!0),t.dispatch(`mousemove`,e)}},n.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return e.prototype.update=function(e){if(!this._container){var t=this._api.getDom(),n=zj(t,`position`),r=t.style;r.position!==`absolute`&&n!==`absolute`&&(r.position=`relative`)}var i=e.get(`alwaysShowContent`);i&&this._moveIfResized(),this._alwaysShowContent=i,this._enableDisplayTransition=e.get(`displayTransition`)&&e.get(`transitionDuration`)>0,this.el.className=e.get(`className`)||``},e.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,r=n.style,i=this._styleCoord;n.innerHTML?r.cssText=Hj+Jj(e,!this._firstShow,this._longHide,this._enableDisplayTransition)+Kj(i[0],i[1],!0)+(`border-color:`+lh(t)+`;`)+(e.get(`extraCssText`)||``)+(`;pointer-events:`+(this._enterable?`auto`:`none`)):r.display=`none`,this._show=!0,this._firstShow=!1,this._longHide=!1},e.prototype.setContent=function(e,t,n,r,i){var a=this.el;if(e==null){a.innerHTML=``;return}var o=``;if(W(i)&&n.get(`trigger`)===`item`&&!Pj(n)&&(o=Wj(n,r,i)),W(e))a.innerHTML=e+o;else if(e){a.innerHTML=``,H(e)||(e=[e]);for(var s=0;s=0?this._tryShow(n,r):t===`leave`&&this._hide(r))},this))},t.prototype._keepShow=function(){var e=this._tooltipModel,t=this._ecModel,n=this._api,r=e.get(`triggerOn`);if(this._lastX!=null&&this._lastY!=null&&r!==`none`&&r!==`click`){var i=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!n.isDisposed()&&i.manuallyShowTip(e,t,n,{x:i._lastX,y:i._lastY,dataByCoordSys:i._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(e,t,n,r){if(!(r.from===this.uid||i.node||!n.getDom())){var a=iM(r,n);this._ticket=``;var o=r.dataByCoordSys,s=lM(r,t,n);if(s){var c=s.el.getBoundingRect().clone();c.applyTransform(s.el.transform),this._tryShow({offsetX:c.x+c.width/2,offsetY:c.y+c.height/2,target:s.el,position:r.position,positionDefault:`bottom`},a)}else if(r.tooltip&&r.x!=null&&r.y!=null){var l=tM;l.x=r.x,l.y=r.y,l.update(),Z(l).tooltipConfig={name:null,option:r.tooltip},this._tryShow({offsetX:r.x,offsetY:r.y,target:l},a)}else if(o)this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,dataByCoordSys:o,tooltipOption:r.tooltipOption},a);else if(r.seriesIndex!=null){if(this._manuallyAxisShowTip(e,t,n,r))return;var u=_j(r,t),d=u.point[0],f=u.point[1];d!=null&&f!=null&&this._tryShow({offsetX:d,offsetY:f,target:u.el,position:r.position,positionDefault:`bottom`},a)}else r.x!=null&&r.y!=null&&(n.dispatchAction({type:`updateAxisPointer`,x:r.x,y:r.y}),this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,target:n.getZr().findHover(r.x,r.y).target},a))}},t.prototype.manuallyHideTip=function(e,t,n,r){var i=this._tooltipContent;this._tooltipModel&&i.hideLater(this._tooltipModel.get(`hideDelay`)),this._lastX=this._lastY=this._lastDataByCoordSys=null,r.from!==this.uid&&this._hide(iM(r,n))},t.prototype._manuallyAxisShowTip=function(e,t,n,r){var i=r.seriesIndex,a=r.dataIndex,o=t.getComponent(`axisPointer`).coordSysAxesInfo;if(!(i==null||a==null||o==null)){var s=t.getSeriesByIndex(i);if(s&&rM([s.getData().getItemModel(a),s,(s.coordinateSystem||{}).model],this._tooltipModel).get(`trigger`)===`axis`)return n.dispatchAction({type:`updateAxisPointer`,seriesIndex:i,dataIndex:a,position:r.position}),!0}},t.prototype._tryShow=function(e,t){var n=e.target;if(this._tooltipModel){this._lastX=e.offsetX,this._lastY=e.offsetY;var r=e.dataByCoordSys;if(r&&r.length)this._showAxisTooltip(r,e);else if(n){if(Z(n).ssrType===`legend`)return;this._lastDataByCoordSys=null;var i,a;nb(n,function(e){if(e.tooltipDisabled)return i=a=null,!0;i||a||(Z(e).dataIndex==null?Z(e).tooltipConfig!=null&&(a=e):i=e)},!0),i?this._showSeriesItemTooltip(e,i,t):a?this._showComponentItemTooltip(e,a,t):this._hide(t)}else this._lastDataByCoordSys=null,this._hide(t)}},t.prototype._showOrMove=function(e,t){var n=e.get(`showDelay`);t=B(t,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(t,n):t()},t.prototype._showAxisTooltip=function(e,t){var n=this._ecModel,r=this._tooltipModel,i=[t.offsetX,t.offsetY],a=rM([t.tooltipOption],r),o=this._renderMode,s=[],c=Tv(`section`,{blocks:[],noHeader:!0}),l=[],u=new Bv;L(e,function(e){L(e.dataByAxis,function(e){var t=n.getComponent(e.axisDim+`Axis`,e.axisIndex),i=e.value;if(!(!t||i==null)){var a=ZA(i,t.axis,n,e.seriesDataIndices,e.valueLabelOpt),d=Tv(`section`,{header:a,noHeader:!ye(a),sortBlocks:!0,blocks:[]});c.blocks.push(d),L(e.seriesDataIndices,function(c){var f=n.getSeriesByIndex(c.seriesIndex),p=c.dataIndexInside,m=f.getDataParams(p);if(!(m.dataIndex<0)){m.axisDim=e.axisDim,m.axisIndex=e.axisIndex,m.axisType=e.axisType,m.axisId=e.axisId,m.axisValue=cT(t.axis,{value:i}),m.axisValueLabel=a,m.marker=u.makeTooltipMarker(`item`,lh(m.color),o);var h=V_(f.formatTooltip(p,!0,null)),g=h.frag;if(g){var _=rM([f],r).get(`valueFormatter`);d.blocks.push(_?M({valueFormatter:_},g):g)}h.text&&l.push(h.text),s.push(m)}})}})}),c.blocks.reverse(),l.reverse();var d=t.position,f=jv(c,u,o,a.get(`order`),n.get(`useUTC`),a.get(`textStyle`));f&&l.unshift(f);var p=o===`richText`?` `:`
`,m=l.join(p);this._showOrMove(a,function(){this._updateContentNotChangedOnAxis(e,s)?this._updatePosition(a,d,i[0],i[1],this._tooltipContent,s):this._showTooltipContent(a,m,s,Math.random()+``,i[0],i[1],d,null,u)})},t.prototype._showSeriesItemTooltip=function(e,t,n){var r=this._ecModel,i=Z(t),a=i.seriesIndex,o=r.getSeriesByIndex(a),s=i.dataModel||o,c=i.dataIndex,l=i.dataType,u=s.getData(l),d=this._renderMode,f=e.positionDefault,p=rM([u.getItemModel(c),s,o&&(o.coordinateSystem||{}).model],this._tooltipModel,f?{position:f}:null),m=p.get(`trigger`);if(!(m!=null&&m!==`item`)){var h=s.getDataParams(c,l),g=new Bv;h.marker=g.makeTooltipMarker(`item`,lh(h.color),d);var _=V_(s.formatTooltip(c,!1,l)),v=p.get(`order`),y=p.get(`valueFormatter`),b=_.frag,x=b?jv(y?M({valueFormatter:y},b):b,g,d,v,r.get(`useUTC`),p.get(`textStyle`)):_.text,S=`item_`+s.name+`_`+c;this._showOrMove(p,function(){this._showTooltipContent(p,x,h,S,e.offsetX,e.offsetY,e.position,e.target,g)}),n({type:`showTip`,dataIndexInside:c,dataIndex:u.getRawIndex(c),seriesIndex:a,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,t,n){var r=this._renderMode===`html`,i=Z(t),a=i.tooltipConfig.option||{},o=a.encodeHTMLContent;if(W(a)){var s=a;a={content:s,formatter:s},o=!0}o&&r&&a.content&&(a=k(a),a.content=wt(a.content));var c=[a],l=this._ecModel.getComponent(i.componentMainType,i.componentIndex);l&&c.push(l),c.push({formatter:a.content});var u=e.positionDefault,d=rM(c,this._tooltipModel,u?{position:u}:null),f=d.get(`content`),p=Math.random()+``,m=new Bv;this._showOrMove(d,function(){var n=k(d.get(`formatterParams`)||{});this._showTooltipContent(d,f,n,p,e.offsetX,e.offsetY,e.position,t,m)}),n({type:`showTip`,from:this.uid})},t.prototype._showTooltipContent=function(e,t,n,r,i,a,o,s,c){if(this._ticket=``,!(!e.get(`showContent`)||!e.get(`show`))){var l=this._tooltipContent;l.setEnterable(e.get(`enterable`));var u=e.get(`formatter`);o||=e.get(`position`);var d=t,f=this._getNearestPoint([i,a],n,e.get(`trigger`),e.get(`borderColor`),e.get(`defaultBorderColor`,!0)).color;if(u)if(W(u)){var p=e.ecModel.get(`useUTC`),m=H(n)?n[0]:n,h=m&&m.axisType&&m.axisType.indexOf(`time`)>=0;d=u,h&&(d=Pm(m.axisValue,d,p)),d=ah(d,n,!0)}else if(U(u)){var g=B(function(t,r){t===this._ticket&&(l.setContent(r,c,e,f,o),this._updatePosition(e,o,i,a,l,n,s))},this);this._ticket=r,d=u(n,r,g)}else d=u;l.setContent(d,c,e,f,o),l.show(e,f),this._updatePosition(e,o,i,a,l,n,s)}},t.prototype._getNearestPoint=function(e,t,n,r,i){if(n===`axis`||H(t))return{color:r||i};if(!H(t))return{color:r||t.color||t.borderColor}},t.prototype._updatePosition=function(e,t,n,r,i,a,o){var s=this._api.getWidth(),c=this._api.getHeight();t||=e.get(`position`);var l=i.getSize(),u=e.get(`align`),d=e.get(`verticalAlign`),f=o&&o.getBoundingRect().clone();if(o&&f.applyTransform(o.transform),U(t)&&(t=t([n,r],a,i.el,f,{viewSize:[s,c],contentSize:l.slice()})),H(t))n=$a(t[0],s),r=$a(t[1],c);else if(K(t)){var p=t;p.width=l[0],p.height=l[1];var m=Ah(p,{width:s,height:c});n=m.x,r=m.y,u=null,d=null}else if(W(t)&&o){var h=sM(t,f,l,e.get(`borderWidth`));n=h[0],r=h[1]}else{var h=aM(n,r,i,s,c,u?null:20,d?null:20);n=h[0],r=h[1]}if(u&&(n-=cM(u)?l[0]/2:u===`right`?l[0]:0),d&&(r-=cM(d)?l[1]/2:d===`bottom`?l[1]:0),Pj(e)){var h=oM(n,r,i,s,c);n=h[0],r=h[1]}i.moveTo(n,r)},t.prototype._updateContentNotChangedOnAxis=function(e,t){var n=this._lastDataByCoordSys,r=this._cbParamsList,i=!!n&&n.length===e.length;return i&&L(n,function(n,a){var o=n.dataByAxis||[],s=(e[a]||{}).dataByAxis||[];i&&=o.length===s.length,i&&L(o,function(e,n){var a=s[n]||{},o=e.seriesDataIndices||[],c=a.seriesDataIndices||[];i=i&&e.value===a.value&&e.axisType===a.axisType&&e.axisId===a.axisId&&o.length===c.length,i&&L(o,function(e,t){var n=c[t];i=i&&e.seriesIndex===n.seriesIndex&&e.dataIndex===n.dataIndex}),r&&L(e.seriesDataIndices,function(e){var n=e.seriesIndex,a=t[n],o=r[n];a&&o&&o.data!==a.data&&(i=!1)})})}),this._lastDataByCoordSys=e,this._cbParamsList=t,!!i},t.prototype._hide=function(e){this._lastDataByCoordSys=null,e({type:`hideTip`,from:this.uid})},t.prototype.dispose=function(e,t){i.node||!t.getDom()||(hy(this,`_updatePosition`),this._tooltipContent.dispose(),hj(`itemTooltip`,t))},t.type=`tooltip`,t}(ey);function rM(e,t,n){var r=t.ecModel,i;n?(i=new Xp(n,r,r),i=new Xp(t.option,i,r)):i=t;for(var a=e.length-1;a>=0;a--){var o=e[a];o&&(o instanceof Xp&&(o=o.get(`tooltip`,!0)),W(o)&&(o={formatter:o}),o&&(i=new Xp(o,i,r)))}return i}function iM(e,t){return e.dispatchAction||B(t.dispatchAction,t)}function aM(e,t,n,r,i,a,o){var s=n.getSize(),c=s[0],l=s[1];return a!=null&&(e+c+a+2>r?e-=c+a:e+=a),o!=null&&(t+l+o>i?t-=l+o:t+=o),[e,t]}function oM(e,t,n,r,i){var a=n.getSize(),o=a[0],s=a[1];return e=Math.min(e+o,r)-o,t=Math.min(t+s,i)-s,e=Math.max(e,0),t=Math.max(t,0),[e,t]}function sM(e,t,n,r){var i=n[0],a=n[1],o=Math.ceil(Math.SQRT2*r)+8,s=0,c=0,l=t.width,u=t.height;switch(e){case`inside`:s=t.x+l/2-i/2,c=t.y+u/2-a/2;break;case`top`:s=t.x+l/2-i/2,c=t.y-a-o;break;case`bottom`:s=t.x+l/2-i/2,c=t.y+u+o;break;case`left`:s=t.x-i-o,c=t.y+u/2-a/2;break;case`right`:s=t.x+l+o,c=t.y+u/2-a/2}return[s,c]}function cM(e){return e===`center`||e===`middle`}function lM(e,t,n){var r=is(e).queryOptionMap,i=r.keys()[0];if(!(!i||i===`series`)){var a=os(t,i,r.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];if(a){var o=n.getViewOfComponentModel(a),s;if(o.group.traverse(function(t){var n=Z(t).tooltipConfig;if(n&&n.name===e.name)return s=t,!0}),s)return{componentMainType:i,componentIndex:a.componentIndex,el:s}}}}function uM(e){TT(Aj),e.registerComponentModel(Nj),e.registerComponentView(nM),e.registerAction({type:`showTip`,event:`showTip`,update:`tooltip:manuallyShowTip`},je),e.registerAction({type:`hideTip`,event:`hideTip`,update:`tooltip:manuallyHideTip`},je)}var dM=function(e){n(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode={type:`box`,ignoreSize:!0},n}return t.type=`title`,t.defaultOption={z:6,show:!0,text:``,target:`blank`,subtext:``,subtarget:`blank`,left:`center`,top:Q.size.m,backgroundColor:Q.color.transparent,borderColor:Q.color.primary,borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:`bold`,color:Q.color.primary},subtextStyle:{fontSize:12,color:Q.color.quaternary}},t}(Rh),fM=function(e){n(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){if(this.group.removeAll(),e.get(`show`)){var r=this.group,i=e.getModel(`textStyle`),a=e.getModel(`subtextStyle`),o=e.get(`textAlign`),s=q(e.get(`textBaseline`),e.get(`textVerticalAlign`)),c=new Nl({style:Op(i,{text:e.get(`text`),fill:i.getTextColor()},{disableBox:!0}),z2:10}),l=c.getBoundingRect(),u=e.get(`subtext`),d=new Nl({style:Op(a,{text:u,fill:a.getTextColor(),y:l.height+e.get(`itemGap`),verticalAlign:`top`},{disableBox:!0}),z2:10}),f=e.get(`link`),p=e.get(`sublink`),m=e.get(`triggerEvent`,!0);c.silent=!f&&!m,d.silent=!p&&!m,f&&c.on(`click`,function(){uh(f,`_`+e.get(`target`))}),p&&d.on(`click`,function(){uh(p,`_`+e.get(`subtarget`))}),Z(c).eventData=Z(d).eventData=m?{componentType:`title`,componentIndex:e.componentIndex}:null,r.add(c),u&&r.add(d);var h=r.getBoundingRect(),g=e.getBoxLayoutParams();g.width=h.width,g.height=h.height;var _=Ah(g,Mh(e,n).refContainer,e.get(`padding`));o||(o=e.get(`left`)||e.get(`right`),o===`middle`&&(o=`center`),o===`right`?_.x+=_.width:o===`center`&&(_.x+=_.width/2)),s||(s=e.get(`top`)||e.get(`bottom`),s===`center`&&(s=`middle`),s===`bottom`?_.y+=_.height:s===`middle`&&(_.y+=_.height/2),s||=`top`),r.x=_.x,r.y=_.y,r.markRedraw();var v={align:o,verticalAlign:s};c.setStyle(v),d.setStyle(v),h=r.getBoundingRect();var y=_.margin,b=e.getItemStyle([`color`,`opacity`]);b.fill=e.get(`backgroundColor`);var x=new Ol({shape:{x:h.x-y[3],y:h.y-y[0],width:h.width+y[1]+y[3],height:h.height+y[0]+y[2],r:e.get(`borderRadius`)},style:b,subPixelOptimize:!0,silent:!0});r.add(x)}},t.type=`title`,t}(ey);function pM(e){e.registerComponentModel(dM),e.registerComponentView(fM)}var mM=function(e,t){if(t===`all`)return{type:`all`,title:e.getLocaleModel().get([`legend`,`selector`,`all`])};if(t===`inverse`)return{type:`inverse`,title:e.getLocaleModel().get([`legend`,`selector`,`inverse`])}},hM=function(e){n(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode={type:`box`,ignoreSize:!0},n}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n),e.selected=e.selected||{},this._updateSelector(e)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),this._updateSelector(t)},t.prototype._updateSelector=function(e){var t=e.selector,n=this.ecModel;t===!0&&(t=e.selector=[`all`,`inverse`]),H(t)&&L(t,function(e,r){W(e)&&(e={type:e}),t[r]=A(e,mM(n,e.type))})},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var e=this._data;if(e[0]&&this.get(`selectedMode`)===`single`){for(var t=!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:Q.size.m,align:`auto`,backgroundColor:Q.color.transparent,borderColor:Q.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:`inherit`,symbolKeepAspect:!0,inactiveColor:Q.color.disabled,inactiveBorderColor:Q.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:Q.color.disabled,inactiveWidth:2,opacity:`inherit`,type:`inherit`,cap:`inherit`,join:`inherit`,dashOffset:`inherit`,miterLimit:`inherit`},textStyle:{color:Q.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:`sans-serif`,color:Q.color.tertiary,borderWidth:1,borderColor:Q.color.border},emphasis:{selectorLabel:{show:!0,color:Q.color.quaternary}},selectorPosition:`auto`,selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},t}(Rh),gM=V,_M=L,vM=Aa,yM=function(e){n(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!1,n}return t.prototype.init=function(){this.group.add(this._contentGroup=new vM),this.group.add(this._selectorGroup=new vM),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(e,t,n){var r=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),e.get(`show`,!0)){var i=e.get(`align`),a=e.get(`orient`);(!i||i===`auto`)&&(i=e.get(`left`)===`right`&&a===`vertical`?`right`:`left`);var o=e.get(`selector`,!0),s=e.get(`selectorPosition`,!0);o&&(!s||s===`auto`)&&(s=a===`horizontal`?`end`:`start`),this.renderInner(i,e,t,n,o,a,s);var c=Mh(e,n).refContainer,l=e.getBoxLayoutParams(),u=e.get(`padding`),d=Ah(l,c,u),f=this.layoutInner(e,i,d,r,o,s),p=Ah(N({width:f.width,height:f.height},l),c,u);this.group.x=p.x-f.x,this.group.y=p.y-f.y,this.group.markRedraw(),this.group.add(this._backgroundEl=Mj(f,e))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(e,t,n,r,i,a,o){var s=this.getContentGroup(),c=J(),l=t.get(`selectedMode`),u=t.get(`triggerEvent`),d=[];n.eachRawSeries(function(e){!e.get(`legendHoverLink`)&&d.push(e.id)}),_M(t.getData(),function(i,a){var o=this,f=i.get(`name`);if(!this.newlineDisabled&&(f===``||f===` `)){var p=new vM;p.newline=!0,s.add(p);return}var m=n.getSeriesByName(f)[0];if(!c.get(f))if(m){var h=m.getData(),g=h.getVisual(`legendLineStyle`)||{},_=h.getVisual(`legendIcon`),v=h.getVisual(`style`),y=this._createItem(m,f,a,i,t,e,g,v,_,l,r);y.on(`click`,gM(SM,f,null,r,d)).on(`mouseover`,gM(wM,m.name,null,r,d)).on(`mouseout`,gM(TM,m.name,null,r,d)),n.ssr&&y.eachChild(function(e){var t=Z(e);t.seriesIndex=m.seriesIndex,t.dataIndex=a,t.ssrType=`legend`}),u&&y.eachChild(function(e){o.packEventData(e,t,m,a,f)}),c.set(f,!0)}else n.eachRawSeries(function(o){var s=this;if(!c.get(f)&&o.legendVisualProvider){var p=o.legendVisualProvider;if(!p.containName(f))return;var m=p.indexOfName(f),h=p.getItemVisual(m,`style`),g=p.getItemVisual(m,`legendIcon`),_=Mr(h.fill);_&&_[3]===0&&(_[3]=.2,h=M(M({},h),{fill:Ur(_,`rgba`)}));var v=this._createItem(o,f,a,i,t,e,{},h,g,l,r);v.on(`click`,gM(SM,null,f,r,d)).on(`mouseover`,gM(wM,null,f,r,d)).on(`mouseout`,gM(TM,null,f,r,d)),n.ssr&&v.eachChild(function(e){var t=Z(e);t.seriesIndex=o.seriesIndex,t.dataIndex=a,t.ssrType=`legend`}),u&&v.eachChild(function(e){s.packEventData(e,t,o,a,f)}),c.set(f,!0)}},this)},this),i&&this._createSelector(i,t,r,a,o)},t.prototype.packEventData=function(e,t,n,r,i){var a={componentType:`legend`,componentIndex:t.componentIndex,dataIndex:r,value:i,seriesIndex:n.seriesIndex};Z(e).eventData=a},t.prototype._createSelector=function(e,t,n,r,i){var a=this.getSelectorGroup();_M(e,function(e){var r=e.type,i=new Nl({style:{x:0,y:0,align:`center`,verticalAlign:`middle`},onclick:function(){n.dispatchAction({type:r===`all`?`legendAllSelect`:`legendInverseSelect`,legendId:t.id})}});a.add(i),Ep(i,{normal:t.getModel(`selectorLabel`),emphasis:t.getModel([`emphasis`,`selectorLabel`])},{defaultText:e.title}),Hu(i)})},t.prototype._createItem=function(e,t,n,r,i,a,o,s,c,l,u){var d=e.visualDrawType,f=i.get(`itemWidth`),p=i.get(`itemHeight`),m=i.isSelected(t),h=r.get(`symbolRotate`),g=r.get(`symbolKeepAspect`),_=r.get(`icon`);c=_||c||`roundRect`;var v=bM(c,r,o,s,d,m,u),y=new vM,b=r.getModel(`textStyle`);if(U(e.getLegendIcon)&&(!_||_===`inherit`))y.add(e.getLegendIcon({itemWidth:f,itemHeight:p,icon:c,iconRotate:h,itemStyle:v.itemStyle,lineStyle:v.lineStyle,symbolKeepAspect:g}));else{var x=_===`inherit`&&e.getData().getVisual(`symbol`)?h===`inherit`?e.getData().getVisual(`symbolRotate`):h:0;y.add(xM({itemWidth:f,itemHeight:p,icon:c,iconRotate:x,itemStyle:v.itemStyle,lineStyle:v.lineStyle,symbolKeepAspect:g}))}var S=a===`left`?f+5:-5,C=a,w=i.get(`formatter`),T=t;W(w)&&w?T=w.replace(`{name}`,t??``):U(w)&&(T=w(t));var E=m?b.getTextColor():r.get(`inactiveColor`);y.add(new Nl({style:Op(b,{text:T,x:S,y:p/2,fill:E,align:C,verticalAlign:`middle`},{inheritColor:E})}));var D=new Ol({shape:y.getBoundingRect(),style:{fill:`transparent`}}),O=r.getModel(`tooltip`);return O.get(`show`)&&fp({el:D,componentModel:i,itemName:t,itemTooltipOption:O.option}),y.add(D),y.eachChild(function(e){e.silent=!0}),D.silent=!l,this.getContentGroup().add(y),Hu(y),y.__legendDataIndex=n,y},t.prototype.layoutInner=function(e,t,n,r,i,a){var o=this.getContentGroup(),s=this.getSelectorGroup();Eh(e.get(`orient`),o,e.get(`itemGap`),n.width,n.height);var c=o.getBoundingRect(),l=[-c.x,-c.y];if(s.markRedraw(),o.markRedraw(),i){Eh(`horizontal`,s,e.get(`selectorItemGap`,!0));var u=s.getBoundingRect(),d=[-u.x,-u.y],f=e.get(`selectorButtonGap`,!0),p=e.getOrient().index,m=p===0?`width`:`height`,h=p===0?`height`:`width`,g=p===0?`y`:`x`;a===`end`?d[p]+=c[m]+f:l[p]+=u[m]+f,d[1-p]+=c[h]/2-u[h]/2,s.x=d[0],s.y=d[1],o.x=l[0],o.y=l[1];var _={x:0,y:0};return _[m]=c[m]+f+u[m],_[h]=Math.max(c[h],u[h]),_[g]=Math.min(0,u[g]+d[1-p]),_}else return o.x=l[0],o.y=l[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type=`legend.plain`,t}(ey);function bM(e,t,n,r,i,a,o){function s(e,t){e.lineWidth===`auto`&&(e.lineWidth=t.lineWidth>0?2:0),_M(e,function(n,r){e[r]===`inherit`&&(e[r]=t[r])})}var c=t.getModel(`itemStyle`),l=c.getItemStyle(),u=e.lastIndexOf(`empty`,0)===0?`fill`:`stroke`,d=c.getShallow(`decal`);l.decal=!d||d===`inherit`?r.decal:tx(d,o),l.fill===`inherit`&&(l.fill=r[i]),l.stroke===`inherit`&&(l.stroke=r[u]),l.opacity===`inherit`&&(l.opacity=(i===`fill`?r:n).opacity),s(l,r);var f=t.getModel(`lineStyle`),p=f.getLineStyle();if(s(p,n),l.fill===`auto`&&(l.fill=r.fill),l.stroke===`auto`&&(l.stroke=r.fill),p.stroke===`auto`&&(p.stroke=r.fill),!a){var m=t.get(`inactiveBorderWidth`),h=l[u];l.lineWidth=m===`auto`?r.lineWidth>0&&h?2:0:l.lineWidth,l.fill=t.get(`inactiveColor`),l.stroke=t.get(`inactiveBorderColor`),p.stroke=f.get(`inactiveColor`),p.lineWidth=f.get(`inactiveWidth`)}return{itemStyle:l,lineStyle:p}}function xM(e){var t=e.icon||`roundRect`,n=fb(t,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill,e.symbolKeepAspect);return n.setStyle(e.itemStyle),n.rotation=(e.iconRotate||0)*Math.PI/180,n.setOrigin([e.itemWidth/2,e.itemHeight/2]),t.indexOf(`empty`)>-1&&(n.style.stroke=n.style.fill,n.style.fill=Q.color.neutral00,n.style.lineWidth=2),n}function SM(e,t,n,r){TM(e,t,n,r),n.dispatchAction({type:`legendToggleSelect`,name:e??t}),wM(e,t,n,r)}function CM(e){for(var t=e.getZr().storage.getDisplayList(),n,r=0,i=t.length;rn[i],m=[-d.x,-d.y];t||(m[r]=c[s]);var h=[0,0],g=[-f.x,-f.y],_=q(e.get(`pageButtonGap`,!0),e.get(`itemGap`,!0));p&&(e.get(`pageButtonPosition`,!0)===`end`?g[r]+=n[i]-f[i]:h[r]+=f[i]+_),g[1-r]+=d[a]/2-f[a]/2,c.setPosition(m),l.setPosition(h),u.setPosition(g);var v={x:0,y:0};if(v[i]=p?n[i]:d[i],v[a]=Math.max(d[a],f[a]),v[o]=Math.min(0,f[o]+g[1-r]),l.__rectSize=n[i],p){var y={x:0,y:0};y[i]=Math.max(n[i]-f[i]-_,0),y[a]=v[a],l.setClipPath(new Ol({shape:y})),l.__rectSize=y[i]}else u.eachChild(function(e){e.attr({invisible:!0,silent:!0})});var b=this._getPageInfo(e);return b.pageIndex!=null&&Ef(c,{x:b.contentPosition[0],y:b.contentPosition[1]},p?e:null),this._updatePageInfoView(e,b),v},t.prototype._pageGo=function(e,t,n){var r=this._getPageInfo(t)[e];r!=null&&n.dispatchAction({type:`legendScroll`,scrollDataIndex:r,legendId:t.id})},t.prototype._updatePageInfoView=function(e,t){var n=this._controllerGroup;L([`pagePrev`,`pageNext`],function(r){var i=t[r+`DataIndex`]!=null,a=n.childOfName(r);a&&(a.setStyle(`fill`,i?e.get(`pageIconColor`,!0):e.get(`pageIconInactiveColor`,!0)),a.cursor=i?`pointer`:`default`)});var r=n.childOfName(`pageText`),i=e.get(`pageFormatter`),a=t.pageIndex,o=a==null?0:a+1,s=t.pageCount;r&&i&&r.setStyle(`text`,W(i)?i.replace(`{current}`,o==null?``:o+``).replace(`{total}`,s==null?``:s+``):i({current:o,total:s}))},t.prototype._getPageInfo=function(e){var t=e.get(`scrollDataIndex`,!0),n=this.getContentGroup(),r=this._containerGroup.__rectSize,i=e.getOrient().index,a=PM[i],o=FM[i],s=this._findTargetItemIndex(t),c=n.children(),l=c[s],u=c.length,d=+!!u,f={contentPosition:[n.x,n.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!l)return f;var p=v(l);f.contentPosition[i]=-p.s;for(var m=s+1,h=p,g=p,_=null;m<=u;++m)_=v(c[m]),(!_&&g.e>h.s+r||_&&!y(_,h.s))&&(h=g.i>h.i?g:_,h&&(f.pageNextDataIndex??=h.i,++f.pageCount)),g=_;for(var m=s-1,h=p,g=p,_=null;m>=-1;--m)_=v(c[m]),(!_||!y(g,_.s))&&h.i=t&&e.s<=t+r}},t.prototype._findTargetItemIndex=function(e){if(!this._showController)return 0;var t,n=this.getContentGroup(),r;return n.eachChild(function(n,i){var a=n.__legendDataIndex;r==null&&a!=null&&(r=i),a===e&&(t=i)}),t??r},t.type=`legend.scroll`,t}(yM);function LM(e){e.registerAction(`legendScroll`,`legendscroll`,function(e,t){var n=e.scrollDataIndex;n!=null&&t.eachComponent({mainType:`legend`,subType:`scroll`,query:e},function(e){e.setScrollDataIndex(n)})})}function RM(e){TT(AM),e.registerComponentModel(jM),e.registerComponentView(IM),LM(e)}function zM(e){TT(AM),TT(RM)}function BM(e,t,n){var r=f.createCanvas(),i=t.getWidth(),a=t.getHeight(),o=r.style;return o&&(o.position=`absolute`,o.left=`0`,o.top=`0`,o.width=i+`px`,o.height=a+`px`,r.setAttribute(`data-zr-dom-id`,e)),r.width=i*n,r.height=a*n,r}var VM=function(e){Fe(t,e);function t(t,n,r){var i=e.call(this)||this;i.motionBlur=!1,i.lastFrameAlpha=.7,i.dpr=1,i.virtual=!1,i.config={},i.incremental=!1,i.zlevel=0,i.maxRepaintRectCount=5,i.__dirty=!0,i.__firstTimePaint=!0,i.__used=!1,i.__drawIndex=0,i.__startIndex=0,i.__endIndex=0,i.__prevStartIndex=null,i.__prevEndIndex=null;var a;r||=Vi,typeof t==`string`?a=BM(t,n,r):K(t)&&(a=t,t=a.id),i.id=t,i.dom=a;var o=a.style;return o&&(ke(a),a.onselectstart=function(){return!1},o.padding=`0`,o.margin=`0`,o.borderWidth=`0`),i.painter=n,i.dpr=r,i}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=BM(`back-`+this.id,this.painter,e),this.ctxBack=this.domBack.getContext(`2d`),e!==1&&this.ctxBack.scale(e,e)},t.prototype.createRepaintRects=function(e,t,n,r){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var i=[],a=this.maxRepaintRectCount,o=!1,s=new X(0,0,0,0);function c(e){if(!(!e.isFinite()||e.isZero()))if(i.length===0){var t=new X(0,0,0,0);t.copy(e),i.push(t)}else{for(var n=!1,r=1/0,c=0,l=0;l=a}}for(var l=this.__startIndex;l15)break}n.prevElClipPaths&&c.restore()};if(l)if(l.length===0)v=s.__endIndex;else for(var b=p.dpr,x=0;x0&&e>r[0]){for(s=0;se);s++);o=n[r[s]]}if(r.splice(s+1,0,e),n[e]=t,!t.virtual)if(o){var c=o.dom;c.nextSibling?a.insertBefore(t.dom,c.nextSibling):a.appendChild(t.dom)}else a.firstChild?a.insertBefore(t.dom,a.firstChild):a.appendChild(t.dom);t.painter||=this}},e.prototype.eachLayer=function(e,t){for(var n=this._zlevelList,r=0;r0?WM:0),this._needsManuallyCompositing),l.__builtin__||O(`ZLevel `+c+` has been used by unkown layer `+l.id),l!==i&&(l.__used=!0,l.__startIndex!==s&&(l.__dirty=!0),l.__startIndex=s,l.incremental?l.__drawIndex=-1:l.__drawIndex=s,t(s),i=l),r.__dirty&1&&!r.__inHover&&(l.__dirty=!0,l.incremental&&l.__drawIndex<0&&(l.__drawIndex=s))}t(s),this.eachBuiltinLayer(function(e,t){!e.__used&&e.getElementCount()>0&&(e.__dirty=!0,e.__startIndex=e.__endIndex=e.__drawIndex=0),e.__dirty&&e.__drawIndex<0&&(e.__drawIndex=e.__startIndex)})},e.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},e.prototype._clearLayer=function(e){e.clear()},e.prototype.setBackgroundColor=function(e){this._backgroundColor=e,L(this._layers,function(e){e.setUnpainted()})},e.prototype.configLayer=function(e,t){if(t){var n=this._layerConfig;n[e]?A(n[e],t,!0):n[e]=t;for(var r=0;r