@bdspark/sparkng-charts 0.0.0-stage → 22.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js ADDED
@@ -0,0 +1,66 @@
1
+ var e=Object.defineProperty,t=(t,n)=>{let r={};for(var i in t)e(r,i,{get:t[i],enumerable:!0});return n||e(r,Symbol.toStringTag,{value:`Module`}),r};function n(e){"@babel/helpers - typeof";return n=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},n(e)}function r(e,t){if(n(e)!=`object`||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t||`default`);if(n(i)!=`object`)return i;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function i(e){var t=r(e,`string`);return n(t)==`symbol`?t:t+``}function a(e,t,n){return(t=i(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var o=class{constructor(){a(this,`firefox`,!1),a(this,`ie`,!1),a(this,`edge`,!1),a(this,`newEdge`,!1),a(this,`weChat`,!1)}};const s=new class{constructor(){a(this,`browser`,new o),a(this,`node`,!1),a(this,`wxa`,!1),a(this,`worker`,!1),a(this,`svgSupported`,!1),a(this,`touchEventsSupported`,!1),a(this,`pointerEventsSupported`,!1),a(this,`domSupported`,!1),a(this,`transformSupported`,!1),a(this,`transform3dSupported`,!1),a(this,`hasGlobalWindow`,typeof window<`u`)}};typeof wx==`object`&&typeof wx.getSystemInfoSync==`function`?(s.wxa=!0,s.touchEventsSupported=!0):typeof document>`u`&&typeof self<`u`?s.worker=!0:!s.hasGlobalWindow||`Deno`in window||typeof navigator<`u`&&typeof navigator.userAgent==`string`&&navigator.userAgent.indexOf(`Node.js`)>-1?(s.node=!0,s.svgSupported=!0):c(navigator.userAgent,s);function c(e,t){let 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`){let e=document.documentElement.style;t.transform3dSupported=(n.ie&&`transition`in e||n.edge||`WebKitCSSMatrix`in window&&`m11`in new WebKitCSSMatrix||`MozPerspective`in e)&&!(`OTransition`in e),t.transformSupported=t.transform3dSupported||n.ie&&+n.version>=9}}const l=`12px sans-serif`;function u(e){let t={};if(typeof JSON>`u`)return t;for(let n=0;n<e.length;n++){let r=String.fromCharCode(n+32);t[r]=(e.charCodeAt(n)-20)/100}return t}const d=u(`007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N`),f={createCanvas(){return typeof document<`u`&&document.createElement(`canvas`)},measureText:(function(){let e,t;return(n,r)=>{if(!e){let t=f.createCanvas();e=t&&t.getContext(`2d`)}if(e)return t!==r&&(t=e.font=r||l),e.measureText(n);{n=n||``,r=r||l;let e=/((?:\d+)?\.?\d*)px/.exec(r),t=e&&+e[1]||12,i=0;if(r.indexOf(`mono`)>=0)i=t*n.length;else for(let e=0;e<n.length;e++){let r=d[n[e]];i+=r==null?t:r*t}return{width:i}}}})(),loadImage(e,t,n){let r=new Image;return r.onload=t,r.onerror=n,r.src=e,r},getTime(){return Date.now?Date.now():+/* @__PURE__ */ new Date}};function p(e){for(let t in f)f.hasOwnProperty(t)&&e[t]&&(f[t]=e[t])}var m=/* @__PURE__ */ t({EPSILON:()=>ze,HashMap:()=>Ne,RADIAN_TO_DEGREE:()=>Re,assert:()=>H,assignProps:()=>ne,bind:()=>I,clone:()=>k,concatArray:()=>Pe,createCanvas:()=>re,createHashMap:()=>U,createObject:()=>Fe,curry:()=>fe,defaults:()=>M,disableUserSelect:()=>Ie,each:()=>P,eqNaN:()=>xe,extend:()=>j,filter:()=>ce,find:()=>le,guid:()=>O,hasOwn:()=>W,indexOf:()=>N,inherits:()=>ie,isArray:()=>L,isArrayLike:()=>oe,isBuiltInObject:()=>he,isDom:()=>_e,isFunction:()=>R,isGradientObject:()=>ve,isImagePatternObject:()=>ye,isNumber:()=>me,isObject:()=>B,isPrimitive:()=>ke,isRegExp:()=>be,isString:()=>z,isStringSafe:()=>pe,isTypedArray:()=>ge,keys:()=>ue,logError:()=>ee,map:()=>F,merge:()=>A,mergeAll:()=>te,mixin:()=>ae,noop:()=>Le,normalizeCssArray:()=>Te,reduce:()=>se,retrieve:()=>Se,retrieve2:()=>V,retrieve3:()=>Ce,setAsPrimitive:()=>Oe,slice:()=>we,trim:()=>Ee});const h=se([`Function`,`RegExp`,`Date`,`Error`,`CanvasGradient`,`CanvasPattern`,`Image`,`Canvas`],(e,t)=>(e[`[object `+t+`]`]=!0,e),{}),g=se([`Int8`,`Uint8`,`Uint8Clamped`,`Int16`,`Uint16`,`Int32`,`Uint32`,`Float32`,`Float64`],(e,t)=>(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__`;let E=2311;const D=Math.pow(2,53)-1;function O(){return E>=D&&(E=0),E++}function ee(...e){typeof console<`u`&&console.error.apply(console,e)}function k(e){if(typeof e!=`object`||!e)return e;let t=e,n=_.call(e);if(n===`[object Array]`){if(!ke(e)){t=[];for(let n=0,r=e.length;n<r;n++)t[n]=k(e[n])}}else if(g[n]){if(!ke(e)){let n=e.constructor;if(n.from)t=n.from(e);else{t=new n(e.length);for(let n=0,r=e.length;n<r;n++)t[n]=e[n]}}}else if(!h[n]&&!ke(e)&&!_e(e)){t={};for(let n in e)e.hasOwnProperty(n)&&n!==T&&(t[n]=k(e[n]))}return t}function A(e,t,n){if(!B(t)||!B(e))return n?k(t):e;for(let r in t)if(t.hasOwnProperty(r)&&r!==T){let i=e[r],a=t[r];B(a)&&B(i)&&!L(a)&&!L(i)&&!_e(a)&&!_e(i)&&!he(a)&&!he(i)&&!ke(a)&&!ke(i)?A(i,a,n):(n||!(r in e))&&(e[r]=k(t[r]))}return e}function te(e,t){let n=e[0];for(let r=1,i=e.length;r<i;r++)n=A(n,e[r],t);return n}function j(e,t){if(Object.assign)Object.assign(e,t);else for(let n in t)t.hasOwnProperty(n)&&n!==T&&(e[n]=t[n]);return e}function ne(e,t,n){e=e||{};for(let r=0;r<n.length;r++){let i=n[r];e[i]=t[i]}return e}function M(e,t,n){let r=ue(t);for(let i=0,a=r.length;i<a;i++){let a=r[i];(n?t[a]!=null:e[a]==null)&&(e[a]=t[a])}return e}const re=f.createCanvas;function N(e,t){if(e){if(e.indexOf)return e.indexOf(t);for(let n=0,r=e.length;n<r;n++)if(e[n]===t)return n}return-1}function ie(e,t){let n=e.prototype;function r(){}r.prototype=t.prototype,e.prototype=new r;for(let t in n)n.hasOwnProperty(t)&&(e.prototype[t]=n[t]);e.prototype.constructor=e,e.superClass=t}function ae(e,t,n){if(e=`prototype`in e?e.prototype:e,t=`prototype`in t?t.prototype:t,Object.getOwnPropertyNames){let r=Object.getOwnPropertyNames(t);for(let i=0;i<r.length;i++){let a=r[i];a!==`constructor`&&(n?t[a]!=null:e[a]==null)&&(e[a]=t[a])}}else M(e,t,n)}function oe(e){return!e||typeof e==`string`?!1:typeof e.length==`number`}function P(e,t,n){if(e&&t){if(e.forEach&&e.forEach===y)e.forEach(t,n);else if(e.length===+e.length)for(let r=0,i=e.length;r<i;r++)t.call(n,e[r],r,e);else for(let r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r,e)}}function F(e,t,n){if(!e)return[];if(!t)return we(e);if(e.map&&e.map===S)return e.map(t,n);{let r=[];for(let i=0,a=e.length;i<a;i++)r.push(t.call(n,e[i],i,e));return r}}function se(e,t,n,r){if(e&&t){for(let i=0,a=e.length;i<a;i++)n=t.call(r,n,e[i],i,e);return n}}function ce(e,t,n){if(!e)return[];if(!t)return we(e);if(e.filter&&e.filter===b)return e.filter(t,n);{let r=[];for(let i=0,a=e.length;i<a;i++)t.call(n,e[i],i,e)&&r.push(e[i]);return r}}function le(e,t,n){if(e&&t){for(let r=0,i=e.length;r<i;r++)if(t.call(n,e[r],r,e))return e[r]}}function ue(e){if(!e)return[];if(Object.keys)return Object.keys(e);let t=[];for(let n in e)e.hasOwnProperty(n)&&t.push(n);return t}function de(e,t,...n){return function(){return e.apply(t,n.concat(x.call(arguments)))}}const I=w&&R(w.bind)?w.call.bind(w.bind):de;function fe(e,...t){return function(){return e.apply(this,t.concat(x.call(arguments)))}}function L(e){return Array.isArray?Array.isArray(e):_.call(e)===`[object Array]`}function R(e){return typeof e==`function`}function z(e){return typeof e==`string`}function pe(e){return _.call(e)===`[object String]`}function me(e){return typeof e==`number`}function B(e){let t=typeof e;return t===`function`||!!e&&t===`object`}function he(e){return!!h[_.call(e)]}function ge(e){return!!g[_.call(e)]}function _e(e){return typeof e==`object`&&typeof e.nodeType==`number`&&typeof e.ownerDocument==`object`}function ve(e){return e.colorStops!=null}function ye(e){return e.image!=null}function be(e){return _.call(e)===`[object RegExp]`}function xe(e){return e!==e}function Se(...e){for(let t=0,n=e.length;t<n;t++)if(e[t]!=null)return e[t]}function V(e,t){return e==null?t:e}function Ce(e,t,n){return e==null?t==null?n:t:e}function we(e,...t){return x.apply(e,t)}function Te(e){if(typeof e==`number`)return[e,e,e,e];let t=e.length;return t===2?[e[0],e[1],e[0],e[1]]:t===3?[e[0],e[1],e[2],e[1]]:e}function H(e,t){if(!e)throw Error(t)}function Ee(e){return e==null?null:typeof e.trim==`function`?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,``)}const De=`__ec_primitive__`;function Oe(e){e[De]=!0}function ke(e){return e[De]}var Ae=class{constructor(){a(this,`data`,{})}delete(e){let t=this.has(e);return t&&delete this.data[e],t}has(e){return this.data.hasOwnProperty(e)}get(e){return this.data[e]}set(e,t){return this.data[e]=t,this}keys(){return ue(this.data)}forEach(e){let t=this.data;for(let n in t)t.hasOwnProperty(n)&&e(t[n],n)}};const je=typeof Map==`function`;function Me(){return je?/* @__PURE__ */ new Map:new Ae}var Ne=class e{constructor(t){let n=L(t);this.data=Me();let r=this;t instanceof e?t.each(i):t&&P(t,i);function i(e,t){n?r.set(e,t):r.set(t,e)}}hasKey(e){return this.data.has(e)}get(e){return this.data.get(e)}set(e,t){return this.data.set(e,t),t}each(e,t){this.data.forEach((n,r)=>{e.call(t,n,r)})}keys(){let e=this.data.keys();return je?Array.from(e):e}removeKey(e){this.data.delete(e)}};function U(e){return new Ne(e)}function Pe(e,t){let n=new e.constructor(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];let r=e.length;for(let e=0;e<t.length;e++)n[e+r]=t[e];return n}function Fe(e,t){let n;if(Object.create)n=Object.create(e);else{let t=function(){};t.prototype=e,n=new t}return t&&j(n,t),n}function Ie(e){let t=e.style;t.webkitUserSelect=`none`,t.userSelect=`none`,t.webkitTapHighlightColor=`rgba(0,0,0,0)`,t[`-webkit-touch-callout`]=`none`}function W(e,t){return e.hasOwnProperty(t)}function Le(){}const Re=180/Math.PI,ze=Number.EPSILON||Math.pow(2,-52);var Be=/* @__PURE__ */ t({add:()=>Ge,applyTransform:()=>lt,clone:()=>Ue,copy:()=>He,create:()=>Ve,dist:()=>it,distSquare:()=>ot,distance:()=>rt,distanceSquare:()=>at,div:()=>$e,dot:()=>et,len:()=>Je,lenSquare:()=>Xe,length:()=>Ye,lengthSquare:()=>Ze,lerp:()=>ct,max:()=>dt,min:()=>ut,mul:()=>Qe,negate:()=>st,normalize:()=>nt,scale:()=>tt,scaleAndAdd:()=>Ke,set:()=>We,sub:()=>qe});function Ve(e,t){return e==null&&(e=0),t==null&&(t=0),[e,t]}function He(e,t){return e[0]=t[0],e[1]=t[1],e}function Ue(e){return[e[0],e[1]]}function We(e,t,n){return e[0]=t,e[1]=n,e}function Ge(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e}function Ke(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e}function qe(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e}function Je(e){return Math.sqrt(Xe(e))}const Ye=Je;function Xe(e){return e[0]*e[0]+e[1]*e[1]}const Ze=Xe;function Qe(e,t,n){return e[0]=t[0]*n[0],e[1]=t[1]*n[1],e}function $e(e,t,n){return e[0]=t[0]/n[0],e[1]=t[1]/n[1],e}function et(e,t){return e[0]*t[0]+e[1]*t[1]}function tt(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e}function nt(e,t){let n=Je(t);return n===0?(e[0]=0,e[1]=0):(e[0]=t[0]/n,e[1]=t[1]/n),e}function rt(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}const it=rt;function at(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])}const ot=at;function st(e,t){return e[0]=-t[0],e[1]=-t[1],e}function ct(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 lt(e,t,n){let 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 ut(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e}function dt(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e}var ft=class{constructor(e,t){this.target=e,this.topTarget=t&&t.topTarget}},pt=class{constructor(e){this.handler=e,e.on(`mousedown`,this._dragStart,this),e.on(`mousemove`,this._drag,this),e.on(`mouseup`,this._dragEnd,this)}_dragStart(e){let t=e.target;for(;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 ft(t,e),`dragstart`,e.event))}_drag(e){let t=this._draggingTarget;if(t){let 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 ft(t,e),`drag`,e.event);let o=this.handler.findHover(n,r,t).target,s=this._dropTarget;this._dropTarget=o,t!==o&&(s&&o!==s&&this.handler.dispatchToElement(new ft(s,e),`dragleave`,e.event),o&&o!==s&&this.handler.dispatchToElement(new ft(o,e),`dragenter`,e.event))}}_dragEnd(e){let t=this._draggingTarget;t&&(t.dragging=!1),this.handler.dispatchToElement(new ft(t,e),`dragend`,e.event),this._dropTarget&&this.handler.dispatchToElement(new ft(this._dropTarget,e),`drop`,e.event),this._draggingTarget=null,this._dropTarget=null}},mt=class{constructor(e){e&&(this._$eventProcessor=e)}on(e,t,n,r){this._$handlers||(this._$handlers={});let i=this._$handlers;if(typeof t==`function`&&(r=n,n=t,t=null),!n||!e)return this;let a=this._$eventProcessor;t!=null&&a&&a.normalizeQuery&&(t=a.normalizeQuery(t)),i[e]||(i[e]=[]);for(let t=0;t<i[e].length;t++)if(i[e][t].h===n)return this;let o={h:n,query:t,ctx:r||this,callAtLast:n.zrEventfulCallAtLast},s=i[e].length-1,c=i[e][s];return c&&c.callAtLast?i[e].splice(s,0,o):i[e].push(o),this}isSilent(e){let t=this._$handlers;return!t||!t[e]||!t[e].length}off(e,t){let n=this._$handlers;if(!n)return this;if(!e)return this._$handlers={},this;if(t){if(n[e]){let r=[];for(let i=0,a=n[e].length;i<a;i++)n[e][i].h!==t&&r.push(n[e][i]);n[e]=r}n[e]&&n[e].length===0&&delete n[e]}else delete n[e];return this}trigger(e,...t){if(!this._$handlers)return this;let n=this._$handlers[e],r=this._$eventProcessor;if(n){let i=t.length,a=n.length;for(let o=0;o<a;o++){let a=n[o];if(!(r&&r.filter&&a.query!=null&&!r.filter(e,a.query)))switch(i){case 0:a.h.call(a.ctx);break;case 1:a.h.call(a.ctx,t[0]);break;case 2:a.h.call(a.ctx,t[0],t[1]);break;default:a.h.apply(a.ctx,t)}}}return r&&r.afterTrigger&&r.afterTrigger(e),this}triggerWithContext(e,...t){if(!this._$handlers)return this;let n=this._$handlers[e],r=this._$eventProcessor;if(n){let i=t.length,a=t[i-1],o=n.length;for(let s=0;s<o;s++){let o=n[s];if(!(r&&r.filter&&o.query!=null&&!r.filter(e,o.query)))switch(i){case 0:o.h.call(a);break;case 1:o.h.call(a,t[0]);break;case 2:o.h.call(a,t[0],t[1]);break;default:o.h.apply(a,t.slice(1,i-1))}}}return r&&r.afterTrigger&&r.afterTrigger(e),this}};const ht=Math.log(2);function gt(e,t,n,r,i,a){let o=r+`-`+i,s=e.length;if(a.hasOwnProperty(o))return a[o];if(t===1){let t=Math.round(Math.log((1<<s)-1&~i)/ht);return e[n][t]}let c=r|1<<n,l=n+1;for(;r&1<<l;)l++;let u=0;for(let r=0,o=0;r<s;r++){let s=1<<r;s&i||(u+=(o%2?-1:1)*e[n][r]*gt(e,t-1,l,c,i|s,a),o++)}return a[o]=u,u}function _t(e,t){let n=[[e[0],e[1],1,0,0,0,-t[0]*e[0],-t[0]*e[1]],[0,0,0,e[0],e[1],1,-t[1]*e[0],-t[1]*e[1]],[e[2],e[3],1,0,0,0,-t[2]*e[2],-t[2]*e[3]],[0,0,0,e[2],e[3],1,-t[3]*e[2],-t[3]*e[3]],[e[4],e[5],1,0,0,0,-t[4]*e[4],-t[4]*e[5]],[0,0,0,e[4],e[5],1,-t[5]*e[4],-t[5]*e[5]],[e[6],e[7],1,0,0,0,-t[6]*e[6],-t[6]*e[7]],[0,0,0,e[6],e[7],1,-t[7]*e[6],-t[7]*e[7]]],r={},i=gt(n,8,0,0,0,r);if(i===0)return;let a=[];for(let e=0;e<8;e++)for(let o=0;o<8;o++)a[o]==null&&(a[o]=0),a[o]+=((e+o)%2?-1:1)*gt(n,7,+(e===0),1<<e,1<<o,r)/i*t[e];return function(e,t,n){let r=t*a[6]+n*a[7]+1;e[0]=(t*a[0]+n*a[1]+a[2])/r,e[1]=(t*a[3]+n*a[4]+a[5])/r}}const vt=`___zrEVENTSAVED`,yt=[];function bt(e,t,n,r,i){return St(yt,t,r,i,!0)&&St(e,n,yt[0],yt[1])}function xt(e,t){e&&n(e),t&&n(t);function n(e){let t=e[vt];t&&(t.clearMarkers&&t.clearMarkers(),delete e[vt])}}function St(e,t,n,r,i){if(t.getBoundingClientRect&&s.domSupported&&!Tt(t)){let a=t[vt]||(t[vt]={}),o=wt(Ct(t,a),a,i);if(o)return o(e,n,r),!0}return!1}function Ct(e,t){let n=t.markers;if(n)return n;n=t.markers=[];let r=[`left`,`right`],i=[`top`,`bottom`];for(let t=0;t<4;t++){let a=document.createElement(`div`),o=a.style,s=t%2,c=(t>>1)%2;o.cssText=[`position: absolute`,`visibility: hidden`,`padding: 0`,`margin: 0`,`border-width: 0`,`user-select: none`,`width:0`,`height:0`,r[s]+`:0`,i[c]+`:0`,r[1-s]+`:auto`,i[1-c]+`:auto`,``].join(`!important;`),e.appendChild(a),n.push(a)}return t.clearMarkers=function(){P(n,function(e){e.parentNode&&e.parentNode.removeChild(e)})},n}function wt(e,t,n){let r=n?`invTrans`:`trans`,i=t[r],a=t.srcCoords,o=[],s=[],c=!0;for(let t=0;t<4;t++){let n=e[t].getBoundingClientRect(),r=2*t,i=n.left,l=n.top;o.push(i,l),c=c&&a&&i===a[r]&&l===a[r+1],s.push(e[t].offsetLeft,e[t].offsetTop)}return c&&i?i:(t.srcCoords=o,t[r]=n?_t(s,o):_t(o,s))}function Tt(e){return e.nodeName.toUpperCase()===`CANVAS`}const Et=/([&<>"'])/g,Dt={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`};function Ot(e){return e==null?``:(e+``).replace(Et,function(e,t){return Dt[t]})}const kt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,At=[],jt=s.browser.firefox&&+s.browser.version.split(`.`)[0]<39;function Mt(e,t,n,r){return n=n||{},r?Nt(e,t,n):jt&&t.layerX!=null&&t.layerX!==t.offsetX?(n.zrX=t.layerX,n.zrY=t.layerY):t.offsetX==null?Nt(e,t,n):(n.zrX=t.offsetX,n.zrY=t.offsetY),n}function Nt(e,t,n){if(s.domSupported&&e.getBoundingClientRect){let r=t.clientX,i=t.clientY;if(Tt(e)){let t=e.getBoundingClientRect();n.zrX=r-t.left,n.zrY=i-t.top;return}if(St(At,e,r,i)){n.zrX=At[0],n.zrY=At[1];return}}n.zrX=n.zrY=0}function Pt(e){return e||window.event}function Ft(e,t,n){if(t=Pt(t),t.zrX!=null)return t;let r=t.type;if(r&&r.indexOf(`touch`)>=0){let i=r===`touchend`?t.changedTouches[0]:t.targetTouches[0];i&&Mt(e,i,t,n)}else{Mt(e,t,t,n);let r=It(t);t.zrDelta=r?r/120:-(t.detail||0)/3}let i=t.button;return t.which==null&&i!==void 0&&kt.test(t.type)&&(t.which=i&1?1:i&2?3:i&4?2:0),t}function It(e){let t=e.wheelDelta;if(t)return t;let n=e.deltaX,r=e.deltaY;if(n==null||r==null)return t;let i=Math.abs(r===0?n:r),a=r>0?-1:r<0?1:n>0?-1:1;return 3*i*a}function Lt(e,t,n,r){e.addEventListener(t,n,r)}function Rt(e,t,n,r){e.removeEventListener(t,n,r)}const zt=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0};function Bt(e){return e.which===2||e.which===3}var Vt=class{constructor(){a(this,`_track`,[])}recognize(e,t,n){return this._doTrack(e,t,n),this._recognize(e)}clear(){return this._track.length=0,this}_doTrack(e,t,n){let r=e.touches;if(!r)return;let i={points:[],touches:[],target:t,event:e};for(let e=0,t=r.length;e<t;e++){let t=r[e],a=Mt(n,t,{});i.points.push([a.zrX,a.zrY]),i.touches.push(t)}this._track.push(i)}_recognize(e){for(let t in Wt)if(Wt.hasOwnProperty(t)){let n=Wt[t](this._track,e);if(n)return n}}};function Ht(e){let t=e[1][0]-e[0][0],n=e[1][1]-e[0][1];return Math.sqrt(t*t+n*n)}function Ut(e){return[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]}const Wt={pinch:function(e,t){let n=e.length;if(!n)return;let r=(e[n-1]||{}).points,i=(e[n-2]||{}).points||r;if(i&&i.length>1&&r&&r.length>1){let n=Ht(r)/Ht(i);!isFinite(n)&&(n=1),t.pinchScale=n;let a=Ut(r);return t.pinchX=a[0],t.pinchY=a[1],{type:`pinch`,target:e[0].target,event:t}}}};var Gt=/* @__PURE__ */ t({clone:()=>en,copy:()=>Jt,create:()=>Kt,identity:()=>qt,invert:()=>$t,mul:()=>Yt,rotate:()=>Zt,scale:()=>Qt,translate:()=>Xt});function Kt(){return[1,0,0,1,0,0]}function qt(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function Jt(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 Yt(e,t,n){let 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 Xt(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 Zt(e,t,n,r=[0,0]){let 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){let 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 $t(e,t){let 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 en(e){let t=Kt();return Jt(t,e),t}var G=class e{constructor(e,t){this.x=e||0,this.y=t||0}copy(e){return this.x=e.x,this.y=e.y,this}clone(){return new e(this.x,this.y)}set(e,t){return this.x=e,this.y=t,this}equal(e){return e.x===this.x&&e.y===this.y}add(e){return this.x+=e.x,this.y+=e.y,this}scale(e){this.x*=e,this.y*=e}scaleAndAdd(e,t){this.x+=e.x*t,this.y+=e.y*t}sub(e){return this.x-=e.x,this.y-=e.y,this}dot(e){return this.x*e.x+this.y*e.y}len(){return Math.sqrt(this.x*this.x+this.y*this.y)}lenSquare(){return this.x*this.x+this.y*this.y}normalize(){let e=this.len();return this.x/=e,this.y/=e,this}distance(e){let t=this.x-e.x,n=this.y-e.y;return Math.sqrt(t*t+n*n)}distanceSquare(e){let t=this.x-e.x,n=this.y-e.y;return t*t+n*n}negate(){return this.x=-this.x,this.y=-this.y,this}transform(e){if(!e)return;let 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}toArray(e){return e[0]=this.x,e[1]=this.y,e}fromArray(e){this.x=e[0],this.y=e[1]}static set(e,t,n){e.x=t,e.y=n}static copy(e,t){e.x=t.x,e.y=t.y}static len(e){return Math.sqrt(e.x*e.x+e.y*e.y)}static lenSquare(e){return e.x*e.x+e.y*e.y}static dot(e,t){return e.x*t.x+e.y*t.y}static add(e,t,n){e.x=t.x+n.x,e.y=t.y+n.y}static sub(e,t,n){e.x=t.x-n.x,e.y=t.y-n.y}static scale(e,t,n){e.x=t.x*n,e.y=t.y*n}static scaleAndAdd(e,t,n,r){e.x=t.x+n.x*r,e.y=t.y+n.y*r}static lerp(e,t,n,r){let i=1-r;e.x=i*t.x+r*n.x,e.y=i*t.y+r*n.y}};const tn=Math.min,nn=Math.max,rn=Math.abs,an=[`x`,`y`],on=[`width`,`height`],sn=new G,cn=new G,ln=new G,un=new G,dn=Tn(),fn=dn.minTv,pn=dn.maxTv,mn=[0,0];var K=class e{constructor(e,t,n,r){gn(this,e,t,n,r)}static set(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}union(e){let t=tn(e.x,this.x),n=tn(e.y,this.y);this.width=isFinite(this.x)&&isFinite(this.width)?nn(e.x+e.width,this.x+this.width)-t:e.width,this.height=isFinite(this.y)&&isFinite(this.height)?nn(e.y+e.height,this.y+this.height)-n:e.height,this.x=t,this.y=n}applyTransform(t){e.applyTransform(this,this,t)}calculateTransform(e){return vn(Kt(),this,e)}intersect(t,n,r){return e.intersect(this,t,n,r)}static intersect(t,n,r,i){r&&G.set(r,0,0);let 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=gn(xn,t.x,t.y,t.width,t.height)),n instanceof e||(n=gn(Sn,n.x,n.y,n.width,n.height));let s=!!r;dn.reset(i,s);let c=dn.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;let _=!(u<p||m<l||f<h||g<d);return(s||a)&&(mn[0]=1/0,mn[1]=0,wn(l,u,p,m,0,s,a,o),wn(d,f,h,g,1,s,a,o),s&&G.copy(r,_?dn.useDir?dn.dirMinTv:fn:pn)),_}static contain(e,t,n){return t>=e.x&&t<=e.x+e.width&&n>=e.y&&n<=e.y+e.height}contain(t,n){return e.contain(this,t,n)}clone(){return new e(this.x,this.y,this.width,this.height)}copy(e){_n(this,e)}plain(){return{x:this.x,y:this.y,width:this.width,height:this.height}}isFinite(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)}isZero(){return this.width===0||this.height===0}static create(t){return new e(t?t.x:0,t?t.y:0,t?t.width:0,t?t.height:0)}static copy(e,t){return e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height,e}static applyTransform(e,t,n){if(!n){e!==t&&_n(e,t);return}if(n[1]<1e-5&&n[1]>-1e-5&&n[2]<1e-5&&n[2]>-1e-5){let r=n[0],i=n[3],a=n[4],o=n[5];e.x=t.x*r+a,e.y=t.y*i+o,e.width=t.width*r,e.height=t.height*i,e.width<0&&(e.x+=e.width,e.width=-e.width),e.height<0&&(e.y+=e.height,e.height=-e.height);return}sn.x=ln.x=t.x,sn.y=un.y=t.y,cn.x=un.x=t.x+t.width,cn.y=ln.y=t.y+t.height,sn.transform(n),un.transform(n),cn.transform(n),ln.transform(n),e.x=tn(sn.x,cn.x,ln.x,un.x),e.y=tn(sn.y,cn.y,ln.y,un.y);let r=nn(sn.x,cn.x,ln.x,un.x),i=nn(sn.y,cn.y,ln.y,un.y);e.width=r-e.x,e.height=i-e.y}static calculateTransform(e,t,n){let r=n.width/t.width,i=n.height/t.height;return e=qt(e||[]),Xt(e,e,We(Cn,-t.x,-t.y)),Qt(e,e,We(Cn,r,i)),Xt(e,e,We(Cn,n.x,n.y)),e}};const hn=K.create,gn=K.set,_n=K.copy,vn=K.calculateTransform,yn=K.applyTransform,bn=K.contain,xn=new K(0,0,0,0),Sn=new K(0,0,0,0),Cn=[];function wn(e,t,n,r,i,a,o,s){let c=rn(t-n),l=rn(r-e),u=tn(c,l),d=an[i],f=an[1-i],p=on[i];t<n||r<e?c<l?(a&&(pn[d]=-c),s&&(o[d]=t,o[p]=0)):(a&&(pn[d]=l),s&&(o[d]=e,o[p]=0)):(o&&(o[d]=nn(e,n),o[p]=tn(t,r)-o[d]),a&&(u<mn[0]||dn.useDir)&&(mn[0]=tn(u,mn[0]),(c<l||!dn.bidirectional)&&(fn[d]=c,fn[f]=0,dn.useDir&&dn.calcDirMTV()),(c>=l||!dn.bidirectional)&&(fn[d]=-l,fn[f]=0,dn.useDir&&dn.calcDirMTV())))}function Tn(){let e=0,t=new G,n=new G,r={minTv:new G,maxTv:new G,useDir:!1,dirMinTv:new G,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset(i,a){r.touchThreshold=0,i&&i.touchThreshold!=null&&(r.touchThreshold=nn(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(){let 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;i(u)?i(a.x)&&i(a.y)&&o.set(0,0):(n.x=s*l/u,n.y=s*c/u,i(n.x)&&i(n.y)?o.set(0,0):(r.bidirectional||t.dot(n)>0)&&n.len()<o.len()&&o.copy(n))}};function i(e){return rn(e)<1e-10}return r}const En=`silent`;function Dn(e,t,n){return{type:e,event:n,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:On}}function On(){zt(this.event)}var kn=class extends mt{constructor(...e){super(...e),a(this,`handler`,null)}dispose(){}setCursor(){}},An=class{constructor(e,t){this.x=e,this.y=t}};const jn=[`click`,`dblclick`,`mousewheel`,`mouseout`,`mouseup`,`mousedown`,`mousemove`,`contextmenu`],Mn=new K(0,0,0,0);var Nn=class extends mt{constructor(e,t,n,r,i){super(),a(this,`_hovered`,new An(0,0)),this.storage=e,this.painter=t,this.painterRoot=r,this._pointerSize=i,n=n||new kn,this.proxy=null,this.setHandlerProxy(n),this._draggingMgr=new pt(this)}setHandlerProxy(e){this.proxy&&this.proxy.dispose(),e&&(P(jn,function(t){e.on&&e.on(t,this[t],this)},this),e.handler=this),this.proxy=e}mousemove(e){let t=e.zrX,n=e.zrY,r=In(this,t,n),i=this._hovered,a=i.target;a&&!a.__zr&&(i=this.findHover(i.x,i.y),a=i.target);let o=this._hovered=r?new An(t,n):this.findHover(t,n),s=o.target,c=this.proxy;c.setCursor&&c.setCursor(s?s.cursor:`default`),a&&s!==a&&this.dispatchToElement(i,`mouseout`,e),this.dispatchToElement(o,`mousemove`,e),s&&s!==a&&this.dispatchToElement(o,`mouseover`,e)}mouseout(e){let t=e.zrEventControl;t!==`only_globalout`&&this.dispatchToElement(this._hovered,`mouseout`,e),t!==`no_globalout`&&this.trigger(`globalout`,{type:`globalout`,event:e})}resize(){this._hovered=new An(0,0)}dispatch(e,t){let n=this[e];n&&n.call(this,t)}dispose(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null}setCursorStyle(e){let t=this.proxy;t.setCursor&&t.setCursor(e)}dispatchToElement(e,t,n){e=e||{};let r=e.target;if(r&&r.silent)return;let i=`on`+t,a=Dn(t,e,n);for(;r&&(r[i]&&(a.cancelBubble=!!r[i].call(r,a)),r.trigger(t,a),r=r.__hostTarget?r.__hostTarget:r.parent,!a.cancelBubble););a.cancelBubble||(this.trigger(t,a),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(e){typeof e[i]==`function`&&e[i].call(e,a),e.trigger&&e.trigger(t,a)}))}findHover(e,t,n){let r=this.storage.getDisplayList(),i=new An(e,t);if(Fn(r,i,e,t,n),this._pointerSize&&!i.target){let a=[],o=this._pointerSize,s=o/2,c=new K(e-s,t-s,o,o);for(let e=r.length-1;e>=0;e--){let t=r[e];t!==n&&!t.ignore&&!t.ignoreCoarsePointer&&(!t.parent||!t.parent.ignoreCoarsePointer)&&(Mn.copy(t.getBoundingRect()),t.transform&&Mn.applyTransform(t.transform),Mn.intersect(c)&&a.push(t))}if(a.length){let r=Math.PI/12,o=Math.PI*2;for(let c=0;c<s;c+=4)for(let s=0;s<o;s+=r)if(Fn(a,i,e+c*Math.cos(s),t+c*Math.sin(s),n),i.target)return i}}return i}processGesture(e,t){this._gestureMgr||(this._gestureMgr=new Vt);let n=this._gestureMgr;t===`start`&&n.clear();let r=n.recognize(e,this.findHover(e.zrX,e.zrY,null).target,this.proxy.dom);if(t===`end`&&n.clear(),r){let t=r.type;e.gestureEvent=t;let n=new An;n.target=r.target,this.dispatchToElement(n,t,r.event)}}};P([`click`,`mousedown`,`mouseup`,`mousewheel`,`dblclick`,`contextmenu`],function(e){Nn.prototype[e]=function(t){let n=t.zrX,r=t.zrY,i=In(this,n,r),a,o;if((e!==`mouseup`||!i)&&(a=this.findHover(n,r),o=a.target),e===`mousedown`)this._downEl=o,this._downPoint=[t.zrX,t.zrY],this._upEl=o;else if(e===`mouseup`)this._upEl=o;else if(e===`click`){if(this._downEl!==this._upEl||!this._downPoint||it(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(a,e,t)}});function Pn(e,t,n){if(e[e.rectHover?`rectContain`:`contain`](t,n)){let r=e,i,a=!1;for(;r;){if(r.ignoreClip&&(a=!0),!a){let e=r.getClipPath();if(e&&!e.contain(t,n))return!1}r.silent&&(i=!0);let e=r.__hostTarget;r=e?r.ignoreHostSilent?null:e:r.parent}return!i||En}return!1}function Fn(e,t,n,r,i){for(let a=e.length-1;a>=0;a--){let o=e[a],s;if(o!==i&&!o.ignore&&(s=Pn(o,n,r))&&(!t.topTarget&&(t.topTarget=o),s!==En)){t.target=o;break}}}function In(e,t,n){let r=e.painter;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}function Ln(e){for(var t=0;e>=32;)t|=e&1,e>>=1;return e+t}function Rn(e,t,n,r){var i=t+1;if(i===n)return 1;if(r(e[i++],e[t])<0){for(;i<n&&r(e[i],e[i-1])<0;)i++;zn(e,t,i)}else for(;i<n&&r(e[i],e[i-1])>=0;)i++;return i-t}function zn(e,t,n){for(n--;t<n;){var r=e[t];e[t++]=e[n],e[n--]=r}}function Bn(e,t,n,r,i){for(r===t&&r++;r<n;r++){for(var a=e[r],o=t,s=r,c;o<s;)c=o+s>>>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 Vn(e,t,n,r,i,a){var o=0,s=0,c=1;if(a(e,t[n+i])>0){for(s=r-i;c<s&&a(e,t[n+i+c])>0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s),o+=i,c+=i}else{for(s=i+1;c<s&&a(e,t[n+i-c])<=0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s);var l=o;o=i-c,c=i-l}for(o++;o<c;){var u=o+(c-o>>>1);a(e,t[n+u])>0?o=u+1:c=u}return c}function Hn(e,t,n,r,i,a){var o=0,s=0,c=1;if(a(e,t[n+i])<0){for(s=i+1;c<s&&a(e,t[n+i-c])<0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s);var l=o;o=i-c,c=i-l}else{for(s=r-i;c<s&&a(e,t[n+i+c])>=0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s),o+=i,c+=i}for(o++;o<c;){var u=o+(c-o>>>1);a(e,t[n+u])<0?c=u:o=u+1}return c}function Un(e,t){let n=7,r,i,a=0;var 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]&&e--;else if(i[e]>i[e+1])break;u(e)}}function l(){for(;a>1;){var e=a-2;e>0&&i[e-1]<i[e+1]&&e--,u(e)}}function u(n){var o=r[n],s=i[n],c=r[n+1],l=i[n+1];i[n]=s+l,n===a-3&&(r[n+1]=r[n+2],i[n+1]=i[n+2]),a--;var u=Hn(e[c],e,o,s,0,t);o+=u,s-=u,s!==0&&(l=Vn(e[o+s-1],e,c,l,l-1,t),l!==0&&(s<=l?d(o,s,c,l):f(o,s,c,l)))}function d(r,i,a,s){var c=0;for(c=0;c<i;c++)o[c]=e[r+c];var l=0,u=a,d=r;if(e[d++]=e[u++],--s===0)for(c=0;c<i;c++)e[d+c]=o[l+c];else if(i===1){for(c=0;c<s;c++)e[d+c]=e[u+c];e[d+s]=o[l]}else{for(var f=n,p,m,h;;){p=0,m=0,h=!1;do if(t(e[u],o[l])<0){if(e[d++]=e[u++],m++,p=0,--s===0){h=!0;break}}else if(e[d++]=o[l++],p++,m=0,--i===1){h=!0;break}while((p|m)<f);if(h)break;do{if(p=Hn(e[u],o,l,i,0,t),p!==0){for(c=0;c<p;c++)e[d+c]=o[l+c];if(d+=p,l+=p,i-=p,i<=1){h=!0;break}}if(e[d++]=e[u++],--s===0){h=!0;break}if(m=Vn(o[l],e,u,s,0,t),m!==0){for(c=0;c<m;c++)e[d+c]=e[u+c];if(d+=m,u+=m,s-=m,s===0){h=!0;break}}if(e[d++]=o[l++],--i===1){h=!0;break}f--}while(p>=7||m>=7);if(h)break;f<0&&(f=0),f+=2}if(n=f,n<1&&(n=1),i===1){for(c=0;c<s;c++)e[d+c]=e[u+c];e[d+s]=o[l]}else if(i===0)throw Error();else for(c=0;c<i;c++)e[d+c]=o[l+c]}}function f(r,i,a,s){var c=0;for(c=0;c<s;c++)o[c]=e[a+c];var l=r+i-1,u=s-1,d=a+s-1,f=0,p=0;if(e[d--]=e[l--],--i===0)for(f=d-(s-1),c=0;c<s;c++)e[f+c]=o[c];else if(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{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)<m);if(_)break;do{if(h=i-Hn(o[u],e,r,i,i-1,t),h!==0){for(d-=h,l-=h,i-=h,p=d+1,f=l+1,c=h-1;c>=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-Vn(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<g;c++)e[p+c]=o[f+c];if(s<=1){_=!0;break}}if(e[d--]=e[l--],--i===0){_=!0;break}m--}while(h>=7||g>=7);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;c<s;c++)e[f+c]=o[c]}}return{mergeRuns:c,forceMergeRuns:l,pushRun:s}}function Wn(e,t,n,r){n||(n=0),r||(r=e.length);var i=r-n;if(!(i<2)){var a=0;if(i<32)a=Rn(e,n,r,t),Bn(e,n,r,n+a,t);else{var o=Un(e,t),s=Ln(i);do{if(a=Rn(e,n,r,t),a<s){var c=i;c>s&&(c=s),Bn(e,n,n+c,n+a,t),a=c}o.pushRun(n,a),o.mergeRuns(),i-=a,n+=a}while(i!==0);o.forceMergeRuns()}}}let Gn=!1;function Kn(){Gn||(Gn=!0,console.warn(`z / z2 / zlevel of displayable is invalid, which may cause unexpected errors`))}function qn(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var Jn=class{constructor(){a(this,`_roots`,[]),a(this,`_displayList`,[]),a(this,`_displayListLen`,0),a(this,`displayableSortFunc`,qn)}traverse(e,t){for(let n=0;n<this._roots.length;n++)this._roots[n].traverse(e,t)}getDisplayList(e,t){t=t||!1;let n=this._displayList;return(e||!n.length)&&this.updateDisplayList(t),n}updateDisplayList(e){this._displayListLen=0;let t=this._roots,n=this._displayList;for(let n=0,r=t.length;n<r;n++)this._updateAndAddDisplayable(t[n],null,e);n.length=this._displayListLen,Wn(n,qn)}_updateAndAddDisplayable(e,t,n){if(e.ignore&&!n)return;e.beforeUpdate(),e.update(),e.afterUpdate();let r=e.getClipPath(),i=t&&t.length,a=0,o=e.__clipPaths;if(!e.ignoreClip&&(i||r)){if(o||(o=e.__clipPaths=[]),i)for(let e=0;e<t.length;e++)o[a++]=t[e];let n=r,s=e;for(;n;)n.parent=s,n.updateTransform(),o[a++]=n,s=n,n=n.getClipPath()}if(o&&(o.length=a),e.childrenRef){let t=e.childrenRef();for(let r=0;r<t.length;r++){let i=t[r];e.__dirty&&(i.__dirty|=1),this._updateAndAddDisplayable(i,o,n)}e.__dirty=0}else{let t=e;isNaN(t.z)&&(Kn(),t.z=0),isNaN(t.z2)&&(Kn(),t.z2=0),isNaN(t.zlevel)&&(Kn(),t.zlevel=0),this._displayList[this._displayListLen++]=t}let s=e.getDecalElement&&e.getDecalElement();s&&this._updateAndAddDisplayable(s,o,n);let c=e.getTextGuideLine();c&&this._updateAndAddDisplayable(c,o,n);let l=e.getTextContent();l&&this._updateAndAddDisplayable(l,o,n)}addRoot(e){e.__zr&&e.__zr.storage===this||this._roots.push(e)}delRoot(e){if(e instanceof Array){for(let t=0,n=e.length;t<n;t++)this.delRoot(e[t]);return}let t=N(this._roots,e);t>=0&&this._roots.splice(t,1)}delAllRoots(){this._roots=[],this._displayList=[],this._displayListLen=0}getRoots(){return this._roots}dispose(){this._displayList=null,this._roots=null}};let Yn;Yn=s.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)};var Xn=Yn;const Zn={linear(e){return e},quadraticIn(e){return e*e},quadraticOut(e){return e*(2-e)},quadraticInOut(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},cubicIn(e){return e*e*e},cubicOut(e){return--e*e*e+1},cubicInOut(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},quarticIn(e){return e*e*e*e},quarticOut(e){return 1- --e*e*e*e},quarticInOut(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},quinticIn(e){return e*e*e*e*e},quinticOut(e){return--e*e*e*e*e+1},quinticInOut(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},sinusoidalIn(e){return 1-Math.cos(e*Math.PI/2)},sinusoidalOut(e){return Math.sin(e*Math.PI/2)},sinusoidalInOut(e){return .5*(1-Math.cos(Math.PI*e))},exponentialIn(e){return e===0?0:Math.pow(1024,e-1)},exponentialOut(e){return e===1?1:1-Math.pow(2,-10*e)},exponentialInOut(e){return e===0?0:e===1?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(-Math.pow(2,-10*(e-1))+2)},circularIn(e){return 1-Math.sqrt(1-e*e)},circularOut(e){return Math.sqrt(1- --e*e)},circularInOut(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},elasticIn(e){let 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*Math.pow(2,10*--e)*Math.sin((e-t)*(2*Math.PI)/r)))},elasticOut(e){let 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*Math.pow(2,-10*e)*Math.sin((e-t)*(2*Math.PI)/r)+1)},elasticInOut(e){let 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*Math.pow(2,10*--e)*Math.sin((e-t)*(2*Math.PI)/r)):n*Math.pow(2,-10*--e)*Math.sin((e-t)*(2*Math.PI)/r)*.5+1)},backIn(e){return e*e*(2.70158*e-1.70158)},backOut(e){return--e*e*(2.70158*e+1.70158)+1},backInOut(e){let t=2.5949095;return(e*=2)<1?.5*(e*e*(3.5949095*e-t)):.5*((e-=2)*e*(3.5949095*e+t)+2)},bounceIn(e){return 1-Zn.bounceOut(1-e)},bounceOut(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(e){return e<.5?Zn.bounceIn(e*2)*.5:Zn.bounceOut(e*2-1)*.5+.5}},Qn=Math.pow,$n=Math.sqrt,er=1e-8,tr=1e-4,nr=$n(3),rr=1/3,ir=Ve(),ar=Ve(),or=Ve();function sr(e){return e>-1e-8&&e<er}function cr(e){return e>er||e<-1e-8}function lr(e,t,n,r,i){let a=1-i;return a*a*(a*e+3*i*t)+i*i*(i*r+3*a*n)}function ur(e,t,n,r,i){let a=1-i;return 3*(((t-e)*a+2*(n-t)*i)*a+(r-n)*i*i)}function dr(e,t,n,r,i,a){let 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(sr(u)&&sr(d)){if(sr(s))a[0]=0;else{let e=-c/s;e>=0&&e<=1&&(a[p++]=e)}}else{let e=d*d-4*u*f;if(sr(e)){let e=d/u,t=-s/o+e,n=-e/2;t>=0&&t<=1&&(a[p++]=t),n>=0&&n<=1&&(a[p++]=n)}else if(e>0){let t=$n(e),n=u*s+1.5*o*(-d+t),r=u*s+1.5*o*(-d-t);n=n<0?-Qn(-n,rr):Qn(n,rr),r=r<0?-Qn(-r,rr):Qn(r,rr);let i=(-s-(n+r))/(3*o);i>=0&&i<=1&&(a[p++]=i)}else{let e=(2*u*s-3*o*d)/(2*$n(u*u*u)),t=Math.acos(e)/3,n=$n(u),r=Math.cos(t),i=(-s-2*n*r)/(3*o),c=(-s+n*(r+nr*Math.sin(t)))/(3*o),l=(-s+n*(r-nr*Math.sin(t)))/(3*o);i>=0&&i<=1&&(a[p++]=i),c>=0&&c<=1&&(a[p++]=c),l>=0&&l<=1&&(a[p++]=l)}}return p}function fr(e,t,n,r,i){let a=6*n-12*t+6*e,o=9*t+3*r-3*e-9*n,s=3*t-3*e,c=0;if(sr(o)){if(cr(a)){let e=-s/a;e>=0&&e<=1&&(i[c++]=e)}}else{let e=a*a-4*o*s;if(sr(e))i[0]=-a/(2*o);else if(e>0){let t=$n(e),n=(-a+t)/(2*o),r=(-a-t)/(2*o);n>=0&&n<=1&&(i[c++]=n),r>=0&&r<=1&&(i[c++]=r)}}return c}function pr(e,t,n,r,i,a){let 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 mr(e,t,n,r,i,a,o,s,c,l,u){let d,f=.005,p=1/0,m,h,g,_;ir[0]=c,ir[1]=l;for(let c=0;c<1;c+=.05)ar[0]=lr(e,n,i,o,c),ar[1]=lr(t,r,a,s,c),g=ot(ir,ar),g<p&&(d=c,p=g);p=1/0;for(let c=0;c<32&&!(f<tr);c++)m=d-f,h=d+f,ar[0]=lr(e,n,i,o,m),ar[1]=lr(t,r,a,s,m),g=ot(ar,ir),m>=0&&g<p?(d=m,p=g):(or[0]=lr(e,n,i,o,h),or[1]=lr(t,r,a,s,h),_=ot(or,ir),h<=1&&_<p?(d=h,p=_):f*=.5);return u&&(u[0]=lr(e,n,i,o,d),u[1]=lr(t,r,a,s,d)),$n(p)}function hr(e,t,n,r,i,a,o,s,c){let l=e,u=t,d=0,f=1/c;for(let p=1;p<=c;p++){let c=p*f,m=lr(e,n,i,o,c),h=lr(t,r,a,s,c),g=m-l,_=h-u;d+=Math.sqrt(g*g+_*_),l=m,u=h}return d}function gr(e,t,n,r){let i=1-r;return i*(i*e+2*r*t)+r*r*n}function _r(e,t,n,r){return 2*((1-r)*(t-e)+r*(n-t))}function vr(e,t,n,r,i){let a=e-2*t+n,o=2*(t-e),s=e-r,c=0;if(sr(a)){if(cr(o)){let e=-s/o;e>=0&&e<=1&&(i[c++]=e)}}else{let e=o*o-4*a*s;if(sr(e)){let e=-o/(2*a);e>=0&&e<=1&&(i[c++]=e)}else if(e>0){let t=$n(e),n=(-o+t)/(2*a),r=(-o-t)/(2*a);n>=0&&n<=1&&(i[c++]=n),r>=0&&r<=1&&(i[c++]=r)}}return c}function yr(e,t,n){let r=e+n-2*t;return r===0?.5:(e-t)/r}function br(e,t,n,r,i){let 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 xr(e,t,n,r,i,a,o,s,c){let l,u=.005,d=1/0;ir[0]=o,ir[1]=s;for(let o=0;o<1;o+=.05){ar[0]=gr(e,n,i,o),ar[1]=gr(t,r,a,o);let s=ot(ir,ar);s<d&&(l=o,d=s)}d=1/0;for(let o=0;o<32&&!(u<tr);o++){let o=l-u,s=l+u;ar[0]=gr(e,n,i,o),ar[1]=gr(t,r,a,o);let c=ot(ar,ir);if(o>=0&&c<d)l=o,d=c;else{or[0]=gr(e,n,i,s),or[1]=gr(t,r,a,s);let o=ot(or,ir);s<=1&&o<d?(l=s,d=o):u*=.5}}return c&&(c[0]=gr(e,n,i,l),c[1]=gr(t,r,a,l)),$n(d)}function Sr(e,t,n,r,i,a,o){let s=e,c=t,l=0,u=1/o;for(let d=1;d<=o;d++){let o=d*u,f=gr(e,n,i,o),p=gr(t,r,a,o),m=f-s,h=p-c;l+=Math.sqrt(m*m+h*h),s=f,c=p}return l}const Cr=/cubic-bezier\(([0-9,\.e ]+)\)/;function wr(e){let t=e&&Cr.exec(e);if(t){let e=t[1].split(`,`),n=+Ee(e[0]),r=+Ee(e[1]),i=+Ee(e[2]),a=+Ee(e[3]);if(isNaN(n+r+i+a))return;let o=[];return e=>e<=0?0:e>=1?1:dr(0,n,i,1,e,o)&&lr(0,r,a,1,o[0])}}var Tr=class{constructor(e){a(this,`_inited`,!1),a(this,`_startTime`,0),a(this,`_pausedTime`,0),a(this,`_paused`,!1),this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||Le,this.ondestroy=e.ondestroy||Le,this.onrestart=e.onrestart||Le,e.easing&&this.setEasing(e.easing)}step(e,t){if(this._inited||(this._startTime=e+this._delay,this._inited=!0),this._paused){this._pausedTime+=t;return}let n=this._life,r=e-this._startTime-this._pausedTime,i=r/n;i<0&&(i=0),i=Math.min(i,1);let a=this.easingFunc,o=a?a(i):i;if(this.onframe(o),i===1){if(this.loop){let t=r%n;this._startTime=e-t,this._pausedTime=0,this.onrestart()}else return!0}return!1}pause(){this._paused=!0}resume(){this._paused=!1}setEasing(e){this.easing=e,this.easingFunc=R(e)?e:Zn[e]||wr(e)}},Er=class{constructor(e){this.value=e}},Dr=class{constructor(){a(this,`_len`,0)}insert(e){let t=new Er(e);return this.insertEntry(t),t}insertEntry(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++}remove(e){let 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--}len(){return this._len}clear(){this.head=this.tail=null,this._len=0}},Or=class{constructor(e){a(this,`_list`,new Dr),a(this,`_maxSize`,10),a(this,`_map`,{}),this._maxSize=e}put(e,t){let n=this._list,r=this._map,i=null;if(r[e]==null){let a=n.len(),o=this._lastRemovedEntry;if(a>=this._maxSize&&a>0){let e=n.head;n.remove(e),delete r[e.key],i=e.value,this._lastRemovedEntry=e}o?o.value=t:o=new Er(t),o.key=e,n.insertEntry(o),r[e]=o}return i}get(e){let t=this._map[e],n=this._list;if(t!=null)return t!==n.tail&&(n.remove(t),n.insertEntry(t)),t.value}clear(){this._list.clear(),this._map={}}len(){return this._list.len()}},kr=/* @__PURE__ */ t({fastLerp:()=>Jr,fastMapToColor:()=>Yr,lerp:()=>Xr,lift:()=>Kr,liftColor:()=>ii,lum:()=>ti,mapToColor:()=>Zr,modifyAlpha:()=>$r,modifyHSL:()=>Qr,parse:()=>Ur,parseCssFloat:()=>Fr,parseCssInt:()=>Pr,random:()=>ni,stringify:()=>ei,toHex:()=>qr});const Ar={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 jr(e){return e=Math.round(e),e<0?0:e>255?255:e}function Mr(e){return e=Math.round(e),e<0?0:e>360?360:e}function Nr(e){return e<0?0:e>1?1:e}function Pr(e){let t=e;return t.length&&t.charAt(t.length-1)===`%`?jr(parseFloat(t)/100*255):jr(parseInt(t,10))}function Fr(e){let t=e;return t.length&&t.charAt(t.length-1)===`%`?Nr(parseFloat(t)/100):Nr(parseFloat(t))}function Ir(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 Lr(e,t,n){return e+(t-e)*n}function Rr(e,t,n,r,i){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e}function zr(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}const Br=new Or(20);let Vr=null;function Hr(e,t){Vr&&zr(Vr,t),Vr=Br.put(e,Vr||t.slice())}function Ur(e,t){if(!e)return;t=t||[];let n=Br.get(e);if(n)return zr(t,n);e+=``;let r=e.replace(/ /g,``).toLowerCase();if(r in Ar)return zr(t,Ar[r]),Hr(e,t),t;let i=r.length;if(r.charAt(0)===`#`){if(i===4||i===5){let n=parseInt(r.slice(1,4),16);if(!(n>=0&&n<=4095)){Rr(t,0,0,0,1);return}return Rr(t,(n&3840)>>4|(n&3840)>>8,n&240|(n&240)>>4,n&15|(n&15)<<4,i===5?parseInt(r.slice(4),16)/15:1),Hr(e,t),t}if(i===7||i===9){let n=parseInt(r.slice(1,7),16);if(!(n>=0&&n<=16777215)){Rr(t,0,0,0,1);return}return Rr(t,(n&16711680)>>16,(n&65280)>>8,n&255,i===9?parseInt(r.slice(7),16)/255:1),Hr(e,t),t}return}let a=r.indexOf(`(`),o=r.indexOf(`)`);if(a!==-1&&o+1===i){let n=r.substr(0,a),i=r.substr(a+1,o-(a+1)).split(`,`),s=1;switch(n){case`rgba`:if(i.length!==4)return i.length===3?Rr(t,+i[0],+i[1],+i[2],1):Rr(t,0,0,0,1);s=Fr(i.pop());case`rgb`:if(i.length>=3)return Rr(t,Pr(i[0]),Pr(i[1]),Pr(i[2]),i.length===3?s:Fr(i[3])),Hr(e,t),t;Rr(t,0,0,0,1);return;case`hsla`:if(i.length!==4){Rr(t,0,0,0,1);return}return i[3]=Fr(i[3]),Wr(i,t),Hr(e,t),t;case`hsl`:if(i.length!==3){Rr(t,0,0,0,1);return}return Wr(i,t),Hr(e,t),t;default:return}}Rr(t,0,0,0,1)}function Wr(e,t){let n=(parseFloat(e[0])%360+360)%360/360,r=Fr(e[1]),i=Fr(e[2]),a=i<=.5?i*(r+1):i+r-i*r,o=i*2-a;return t=t||[],Rr(t,jr(Ir(o,a,n+1/3)*255),jr(Ir(o,a,n)*255),jr(Ir(o,a,n-1/3)*255),1),e.length===4&&(t[3]=e[3]),t}function Gr(e){if(!e)return;let 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);let e=((a-t)/6+o/2)/o,u=((a-n)/6+o/2)/o,d=((a-r)/6+o/2)/o;t===a?c=d-u:n===a?c=1/3+e-d:r===a&&(c=2/3+u-e),c<0&&(c+=1),c>1&&--c}let u=[c*360,l,s];return e[3]!=null&&u.push(e[3]),u}function Kr(e,t){let n=Ur(e);if(n){for(let e=0;e<3;e++)t<0?n[e]=n[e]*(1-t)|0:n[e]=(255-n[e])*t+n[e]|0,n[e]>255?n[e]=255:n[e]<0&&(n[e]=0);return ei(n,n.length===4?`rgba`:`rgb`)}}function qr(e){let t=Ur(e);if(t)return((1<<24)+(t[0]<<16)+(t[1]<<8)+ +t[2]).toString(16).slice(1)}function Jr(e,t,n){if(!(t&&t.length)||!(e>=0&&e<=1))return;n=n||[];let 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]=jr(Lr(o[0],s[0],c)),n[1]=jr(Lr(o[1],s[1],c)),n[2]=jr(Lr(o[2],s[2],c)),n[3]=Nr(Lr(o[3],s[3],c)),n}const Yr=Jr;function Xr(e,t,n){if(!(t&&t.length)||!(e>=0&&e<=1))return;let r=e*(t.length-1),i=Math.floor(r),a=Math.ceil(r),o=Ur(t[i]),s=Ur(t[a]),c=r-i,l=ei([jr(Lr(o[0],s[0],c)),jr(Lr(o[1],s[1],c)),jr(Lr(o[2],s[2],c)),Nr(Lr(o[3],s[3],c))],`rgba`);return n?{color:l,leftIndex:i,rightIndex:a,value:r}:l}const Zr=Xr;function Qr(e,t,n,r){let i=Ur(e);if(e)return i=Gr(i),t!=null&&(i[0]=Mr(R(t)?t(i[0]):t)),n!=null&&(i[1]=Fr(R(n)?n(i[1]):n)),r!=null&&(i[2]=Fr(R(r)?r(i[2]):r)),ei(Wr(i),`rgba`)}function $r(e,t){let n=Ur(e);if(n&&t!=null)return n[3]=Nr(t),ei(n,`rgba`)}function ei(e,t){if(!e||!e.length)return;let n=e[0]+`,`+e[1]+`,`+e[2];return(t===`rgba`||t===`hsva`||t===`hsla`)&&(n+=`,`+e[3]),t+`(`+n+`)`}function ti(e,t){let n=Ur(e);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*t:0}function ni(){return ei([Math.round(Math.random()*255),Math.round(Math.random()*255),Math.round(Math.random()*255)],`rgb`)}const ri=new Or(100);function ii(e){if(z(e)){let t=ri.get(e);return t||(t=Kr(e,-.1),ri.put(e,t)),t}if(ve(e)){let t=j({},e);return t.colorStops=F(e.colorStops,e=>({offset:e.offset,color:Kr(e.color,-.1)})),t}return e}const ai=Math.round;function oi(e){let t;if(!e||e===`transparent`)e=`none`;else if(typeof e==`string`&&e.indexOf(`rgba`)>-1){let n=Ur(e);n&&(e=`rgb(`+n[0]+`,`+n[1]+`,`+n[2]+`)`,t=n[3])}return{color:e,opacity:t==null?1:t}}function si(e){return e<1e-4&&e>-1e-4}function ci(e){return ai(e*1e3)/1e3}function li(e){return ai(e*1e4)/1e4}function ui(e){return`matrix(`+ci(e[0])+`,`+ci(e[1])+`,`+ci(e[2])+`,`+ci(e[3])+`,`+li(e[4])+`,`+li(e[5])+`)`}const di={left:`start`,right:`end`,center:`middle`,middle:`middle`};function fi(e,t,n){return n===`top`?e+=t/2:n===`bottom`&&(e-=t/2),e}function pi(e){return e&&(e.shadowBlur||e.shadowOffsetX||e.shadowOffsetY)}function mi(e){let t=e.style,n=e.getGlobalScale();return[t.shadowColor,(t.shadowBlur||0).toFixed(2),(t.shadowOffsetX||0).toFixed(2),(t.shadowOffsetY||0).toFixed(2),n[0],n[1]].join(`,`)}function hi(e){return e&&!!e.image}function gi(e){return e&&!!e.svgElement}function _i(e){return hi(e)||gi(e)}function vi(e){return e.type===`linear`}function yi(e){return e.type===`radial`}function bi(e){return e&&(e.type===`linear`||e.type===`radial`)}function xi(e){return`url(#${e})`}function Si(e){let t=e.getGlobalScale(),n=Math.max(t[0],t[1]);return Math.max(Math.ceil(Math.log(n)/Math.log(10)),1)}function Ci(e){let t=e.x||0,n=e.y||0,r=(e.rotation||0)*Re,i=V(e.scaleX,1),a=V(e.scaleY,1),o=e.skewX||0,s=e.skewY||0,c=[];return(t||n)&&c.push(`translate(${t}px,${n}px)`),r&&c.push(`rotate(${r})`),(i!==1||a!==1)&&c.push(`scale(${i},${a})`),(o||s)&&c.push(`skew(${ai(o*Re)}deg, ${ai(s*Re)}deg)`),c.join(` `)}const wi=(function(){return typeof Buffer<`u`&&typeof Buffer.from==`function`?function(e){return Buffer.from(e).toString(`base64`)}:typeof btoa==`function`&&typeof unescape==`function`&&typeof encodeURIComponent==`function`?function(e){return btoa(unescape(encodeURIComponent(e)))}:function(e){return null}})(),Ti=Array.prototype.slice;function Ei(e,t,n){return(t-e)*n+e}function Di(e,t,n,r){let i=t.length;for(let a=0;a<i;a++)e[a]=Ei(t[a],n[a],r);return e}function Oi(e,t,n,r){let i=t.length,a=i&&t[0].length;for(let o=0;o<i;o++){e[o]||(e[o]=[]);for(let i=0;i<a;i++)e[o][i]=Ei(t[o][i],n[o][i],r)}return e}function ki(e,t,n,r){let i=t.length;for(let a=0;a<i;a++)e[a]=t[a]+n[a]*r;return e}function Ai(e,t,n,r){let i=t.length,a=i&&t[0].length;for(let o=0;o<i;o++){e[o]||(e[o]=[]);for(let i=0;i<a;i++)e[o][i]=t[o][i]+n[o][i]*r}return e}function ji(e,t){let n=e.length,r=t.length,i=n>r?t:e,a=Math.min(n,r),o=i[a-1]||{color:[0,0,0,0],offset:0};for(let e=a;e<Math.max(n,r);e++)i.push({offset:o.offset,color:o.color.slice()})}function Mi(e,t,n){let r=e,i=t;if(!r.push||!i.push)return;let a=r.length,o=i.length;if(a!==o){if(a>o)r.length=o;else for(let e=a;e<o;e++)r.push(n===1?i[e]:Ti.call(i[e]))}let s=r[0]&&r[0].length;for(let e=0;e<r.length;e++)if(n===1)isNaN(r[e])&&(r[e]=i[e]);else for(let t=0;t<s;t++)isNaN(r[e][t])&&(r[e][t]=i[e][t])}function Ni(e){if(oe(e)){let t=e.length;if(oe(e[0])){let n=[];for(let r=0;r<t;r++)n.push(Ti.call(e[r]));return n}return Ti.call(e)}return e}function Pi(e){return e[0]=Math.floor(e[0])||0,e[1]=Math.floor(e[1])||0,e[2]=Math.floor(e[2])||0,e[3]=e[3]==null?1:e[3],`rgba(`+e.join(`,`)+`)`}function Fi(e){return oe(e&&e[0])?2:1}function Ii(e){return e===4||e===5}function Li(e){return e===1||e===2}let Ri=[0,0,0,0];var zi=class{constructor(e){a(this,`keyframes`,[]),a(this,`discrete`,!1),a(this,`_invalid`,!1),a(this,`_needsSort`,!1),a(this,`_lastFr`,0),a(this,`_lastFrP`,0),this.propName=e}isFinished(){return this._finished}setFinished(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()}needsAnimate(){return this.keyframes.length>=1}getAdditiveTrack(){return this._additiveTrack}addKeyframe(e,t,n){this._needsSort=!0;let r=this.keyframes,i=r.length,a=!1,o=6,s=t;if(oe(t)){let e=Fi(t);o=e,(e===1&&!me(t[0])||e===2&&!me(t[0][0]))&&(a=!0)}else if(me(t)&&!xe(t))o=0;else if(z(t)){if(!isNaN(+t))o=0;else{let e=Ur(t);e&&(s=e,o=3)}}else if(ve(t)){let e=j({},s);e.colorStops=F(t.colorStops,e=>({offset:e.offset,color:Ur(e.color)})),vi(t)?o=4:yi(t)&&(o=5),s=e}i===0?this.valType=o:(o!==this.valType||o===6)&&(a=!0),this.discrete=this.discrete||a;let c={time:e,value:s,rawValue:t,percent:0};return n&&(c.easing=n,c.easingFunc=R(n)?n:Zn[n]||wr(n)),r.push(c),c}prepare(e,t){let n=this.keyframes;this._needsSort&&n.sort(function(e,t){return e.time-t.time});let r=this.valType,i=n.length,a=n[i-1],o=this.discrete,s=Li(r),c=Ii(r);for(let t=0;t<i;t++){let l=n[t],u=l.value,d=a.value;l.percent=l.time/e,o||(s&&t!==i-1?Mi(u,d,r):c&&ji(u.colorStops,d.colorStops))}if(!o&&r!==5&&t&&this.needsAnimate()&&t.needsAnimate()&&r===t.valType&&!t._finished){this._additiveTrack=t;let e=n[0].value;for(let t=0;t<i;t++)r===0?n[t].additiveValue=n[t].value-e:r===3?n[t].additiveValue=ki([],n[t].value,e,-1):Li(r)&&(n[t].additiveValue=r===1?ki([],n[t].value,e,-1):Ai([],n[t].value,e,-1))}}step(e,t){if(this._finished)return;this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);let n=this._additiveTrack!=null,r=n?`additiveValue`:`value`,i=this.valType,a=this.keyframes,o=a.length,s=this.propName,c=i===3,l,u=this._lastFr,d=Math.min,f,p;if(o===1)f=p=a[0];else{if(t<0)l=0;else if(t<this._lastFrP){for(l=d(u+1,o-1);l>=0&&!(a[l].percent<=t);l--);l=d(l,o-2)}else{for(l=u;l<o&&!(a[l].percent>t);l++);l=d(l-1,o-2)}p=a[l+1],f=a[l]}if(!(f&&p))return;this._lastFr=l,this._lastFrP=t;let m=p.percent-f.percent,h=m===0?1:d((t-f.percent)/m,1);p.easingFunc&&(h=p.easingFunc(h));let g=n?this._additiveValue:c?Ri:e[s];if((Li(i)||c)&&!g&&(g=this._additiveValue=[]),this.discrete)e[s]=h<1?f.rawValue:p.rawValue;else if(Li(i))i===1?Di(g,f[r],p[r],h):Oi(g,f[r],p[r],h);else if(Ii(i)){let t=f[r],n=p[r],a=i===4;e[s]={type:a?`linear`:`radial`,x:Ei(t.x,n.x,h),y:Ei(t.y,n.y,h),colorStops:F(t.colorStops,(e,t)=>{let r=n.colorStops[t];return{offset:Ei(e.offset,r.offset,h),color:Pi(Di([],e.color,r.color,h))}}),global:n.global},a?(e[s].x2=Ei(t.x2,n.x2,h),e[s].y2=Ei(t.y2,n.y2,h)):e[s].r=Ei(t.r,n.r,h)}else if(c)Di(g,f[r],p[r],h),n||(e[s]=Pi(g));else{let t=Ei(f[r],p[r],h);n?this._additiveValue=t:e[s]=t}n&&this._addToTarget(e)}_addToTarget(e){let t=this.valType,n=this.propName,r=this._additiveValue;t===0?e[n]=e[n]+r:t===3?(Ur(e[n],Ri),ki(Ri,Ri,r,1),e[n]=Pi(Ri)):t===1?ki(e[n],e[n],r,1):t===2&&Ai(e[n],e[n],r,1)}},Bi=class{constructor(e,t,n,r){a(this,`_tracks`,{}),a(this,`_trackKeys`,[]),a(this,`_maxTime`,0),a(this,`_started`,0),a(this,`_clip`,null),this._target=e,this._loop=t,t&&r?ee(`Can' use additive animation on looped animation.`):(this._additiveAnimators=r,this._allowDiscrete=n)}getMaxTime(){return this._maxTime}getDelay(){return this._delay}getLoop(){return this._loop}getTarget(){return this._target}changeTarget(e){this._target=e}when(e,t,n){return this.whenWithKeys(e,t,ue(t),n)}whenWithKeys(e,t,n,r){let i=this._tracks;for(let a=0;a<n.length;a++){let o=n[a],s=i[o];if(!s){s=i[o]=new zi(o);let t,n=this._getAdditiveTrack(o);if(n){let e=n.keyframes,r=e[e.length-1];t=r&&r.value,n.valType===3&&t&&(t=Pi(t))}else t=this._target[o];if(t==null)continue;e>0&&s.addKeyframe(0,Ni(t),r),this._trackKeys.push(o)}s.addKeyframe(e,Ni(t[o]),r)}return this._maxTime=Math.max(this._maxTime,e),this}pause(){this._clip.pause(),this._paused=!0}resume(){this._clip.resume(),this._paused=!1}isPaused(){return!!this._paused}duration(e){return this._maxTime=e,this._force=!0,this}_doneCallback(){this._setTracksFinished(),this._clip=null;let e=this._doneCbs;if(e){let t=e.length;for(let n=0;n<t;n++)e[n].call(this)}}_abortedCallback(){this._setTracksFinished();let e=this.animation,t=this._abortedCbs;if(e&&e.removeClip(this._clip),this._clip=null,t)for(let e=0;e<t.length;e++)t[e].call(this)}_setTracksFinished(){let e=this._tracks,t=this._trackKeys;for(let n=0;n<t.length;n++)e[t[n]].setFinished()}_getAdditiveTrack(e){let t,n=this._additiveAnimators;if(n)for(let r=0;r<n.length;r++){let i=n[r].getTrack(e);i&&(t=i)}return t}start(e){if(this._started>0)return;this._started=1;let t=this,n=[],r=this._maxTime||0;for(let e=0;e<this._trackKeys.length;e++){let i=this._trackKeys[e],a=this._tracks[i],o=this._getAdditiveTrack(i),s=a.keyframes,c=s.length;if(a.prepare(r,o),a.needsAnimate()){if(!this._allowDiscrete&&a.discrete){let e=s[c-1];e&&(t._target[a.propName]=e.rawValue),a.setFinished()}else n.push(a)}}if(n.length||this._force){let i=new Tr({life:r,loop:this._loop,delay:this._delay||0,onframe(e){t._started=2;let r=t._additiveAnimators;if(r){let e=!1;for(let t=0;t<r.length;t++)if(r[t]._clip){e=!0;break}e||(t._additiveAnimators=null)}for(let r=0;r<n.length;r++)n[r].step(t._target,e);let i=t._onframeCbs;if(i)for(let n=0;n<i.length;n++)i[n](t._target,e)},ondestroy(){t._doneCallback()}});this._clip=i,this.animation&&this.animation.addClip(i),e&&i.setEasing(e)}else this._doneCallback();return this}stop(e){if(!this._clip)return;let t=this._clip;e&&t.onframe(1),this._abortedCallback()}delay(e){return this._delay=e,this}during(e){return e&&(this._onframeCbs||(this._onframeCbs=[]),this._onframeCbs.push(e)),this}done(e){return e&&(this._doneCbs||(this._doneCbs=[]),this._doneCbs.push(e)),this}aborted(e){return e&&(this._abortedCbs||(this._abortedCbs=[]),this._abortedCbs.push(e)),this}getClip(){return this._clip}getTrack(e){return this._tracks[e]}getTracks(){return F(this._trackKeys,e=>this._tracks[e])}stopTracks(e,t){if(!e.length||!this._clip)return!0;let n=this._tracks,r=this._trackKeys;for(let r=0;r<e.length;r++){let i=n[e[r]];i&&!i.isFinished()&&(t?i.step(this._target,1):this._started===1&&i.step(this._target,0),i.setFinished())}let i=!0;for(let e=0;e<r.length;e++)if(!n[r[e]].isFinished()){i=!1;break}return i&&this._abortedCallback(),i}saveTo(e,t,n){if(e){t=t||this._trackKeys;for(let r=0;r<t.length;r++){let i=t[r],a=this._tracks[i];if(!a||a.isFinished())continue;let o=a.keyframes,s=o[n?0:o.length-1];s&&(e[i]=Ni(s.rawValue))}}}__changeFinalValue(e,t){t=t||ue(e);for(let n=0;n<t.length;n++){let r=t[n],i=this._tracks[r];if(!i)continue;let a=i.keyframes;if(a.length>1){let t=a.pop();i.addKeyframe(t.time,e[r]),i.prepare(this._maxTime,i.getAdditiveTrack())}}}};function Vi(){return(/* @__PURE__ */ new Date()).getTime()}var Hi=class extends mt{constructor(e){super(),a(this,`_running`,!1),a(this,`_time`,0),a(this,`_pausedTime`,0),a(this,`_pauseStart`,0),a(this,`_paused`,!1),e=e||{},this.stage=e.stage||{}}addClip(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}addAnimator(e){e.animation=this;let t=e.getClip();t&&this.addClip(t)}removeClip(e){if(!e.animation)return;let 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}removeAnimator(e){let t=e.getClip();t&&this.removeClip(t),e.animation=null}update(e){let t=Vi()-this._pausedTime,n=t-this._time,r=this._head;for(;r;){let e=r.next;r.step(t,n)&&(r.ondestroy(),this.removeClip(r)),r=e}this._time=t,e||(this.trigger(`frame`,n),this.stage.update&&this.stage.update())}_startLoop(){let e=this;this._running=!0;function t(){e._running&&(Xn(t),!e._paused&&e.update())}Xn(t)}start(){this._running||(this._time=Vi(),this._pausedTime=0,this._startLoop())}stop(){this._running=!1}pause(){this._paused||(this._pauseStart=Vi(),this._paused=!0)}resume(){this._paused&&(this._pausedTime+=Vi()-this._pauseStart,this._paused=!1)}clear(){let e=this._head;for(;e;){let t=e.next;e.prev=e.next=e.animation=null,e=t}this._head=this._tail=null}isFinished(){return this._head==null}animate(e,t){t=t||{},this.start();let n=new Bi(e,t.loop);return this.addAnimator(n),n}};const Ui=s.domSupported,Wi=(function(){let 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:F(e,function(e){let t=e.replace(`mouse`,`pointer`);return n.hasOwnProperty(t)?t:e})}})(),Gi={mouse:[`mousemove`,`mouseup`],pointer:[`pointermove`,`pointerup`]};let Ki=!1;function qi(e){let t=e.pointerType;return t===`pen`||t===`touch`}function Ji(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 Yi(e){e&&(e.zrByTouch=!0)}function Xi(e,t){return Ft(e.dom,new Qi(e,t),!0)}function Zi(e,t){let n=t,r=!1;for(;n&&n.nodeType!==9&&!(r=n.domBelongToZr||n!==t&&n===e.painterRoot);)n=n.parentNode;return r}var Qi=class{constructor(e,t){a(this,`stopPropagation`,Le),a(this,`stopImmediatePropagation`,Le),a(this,`preventDefault`,Le),this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}};const $i={mousedown(e){e=Ft(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger(`mousedown`,e)},mousemove(e){e=Ft(this.dom,e);let t=this.__mayPointerCapture;t&&(e.zrX!==t[0]||e.zrY!==t[1])&&this.__togglePointerCapture(!0),this.trigger(`mousemove`,e)},mouseup(e){e=Ft(this.dom,e),this.__togglePointerCapture(!1),this.trigger(`mouseup`,e)},mouseout(e){e=Ft(this.dom,e);let t=e.toElement||e.relatedTarget;Zi(this,t)||(this.__pointerCapturing&&(e.zrEventControl=`no_globalout`),this.trigger(`mouseout`,e))},wheel(e){Ki=!0,e=Ft(this.dom,e),this.trigger(`mousewheel`,e)},mousewheel(e){Ki||(e=Ft(this.dom,e),this.trigger(`mousewheel`,e))},touchstart(e){e=Ft(this.dom,e),Yi(e),this.__lastTouchMoment=/* @__PURE__ */ new Date,this.handler.processGesture(e,`start`),$i.mousemove.call(this,e),$i.mousedown.call(this,e)},touchmove(e){e=Ft(this.dom,e),Yi(e),this.handler.processGesture(e,`change`),$i.mousemove.call(this,e)},touchend(e){e=Ft(this.dom,e),Yi(e),this.handler.processGesture(e,`end`),$i.mouseup.call(this,e),+/* @__PURE__ */ new Date-this.__lastTouchMoment<300&&$i.click.call(this,e)},pointerdown(e){$i.mousedown.call(this,e)},pointermove(e){qi(e)||$i.mousemove.call(this,e)},pointerup(e){$i.mouseup.call(this,e)},pointerout(e){qi(e)||$i.mouseout.call(this,e)}};P([`click`,`dblclick`,`contextmenu`],function(e){$i[e]=function(t){t=Ft(this.dom,t),this.trigger(e,t)}});const ea={pointermove:function(e){qi(e)||ea.mousemove.call(this,e)},pointerup:function(e){ea.mouseup.call(this,e)},mousemove:function(e){this.trigger(`mousemove`,e)},mouseup:function(e){let t=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger(`mouseup`,e),t&&(e.zrEventControl=`only_globalout`,this.trigger(`mouseout`,e))}};function ta(e,t){let n=t.domHandlers;s.pointerEventsSupported?P(Wi.pointer,function(r){ra(t,r,function(t){n[r].call(e,t)})}):(s.touchEventsSupported&&P(Wi.touch,function(r){ra(t,r,function(i){n[r].call(e,i),Ji(t)})}),P(Wi.mouse,function(r){ra(t,r,function(i){i=Pt(i),t.touching||n[r].call(e,i)})}))}function na(e,t){s.pointerEventsSupported?P(Gi.pointer,n):s.touchEventsSupported||P(Gi.mouse,n);function n(n){function r(r){r=Pt(r),Zi(e,r.target)||(r=Xi(e,r),t.domHandlers[n].call(e,r))}ra(t,n,r,{capture:!0})}}function ra(e,t,n,r){e.mounted[t]=n,e.listenerOpts[t]=r,Lt(e.domTarget,t,n,r)}function ia(e){let t=e.mounted;for(let n in t)t.hasOwnProperty(n)&&Rt(e.domTarget,n,t[n],e.listenerOpts[n]);e.mounted={}}var aa=class{constructor(e,t){a(this,`mounted`,{}),a(this,`listenerOpts`,{}),a(this,`touching`,!1),this.domTarget=e,this.domHandlers=t}},oa=class extends mt{constructor(e,t){super(),a(this,`__pointerCapturing`,!1),this.dom=e,this.painterRoot=t,this._localHandlerScope=new aa(e,$i),Ui&&(this._globalHandlerScope=new aa(document,ea)),ta(this,this._localHandlerScope)}dispose(){ia(this._localHandlerScope),Ui&&ia(this._globalHandlerScope)}setCursor(e){this.dom.style&&(this.dom.style.cursor=e||`default`)}__togglePointerCapture(e){if(this.__mayPointerCapture=null,Ui&&+this.__pointerCapturing^e){this.__pointerCapturing=e;let t=this._globalHandlerScope;e?na(this,t):ia(t)}}};let sa=1;s.hasGlobalWindow&&(sa=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));const ca=sa,la=.4,ua=`#333`,da=`#ccc`;var fa;const pa=qt;function ma(e){return e>5e-5||e<-5e-5}const ha=[],ga=[],_a=Kt(),va=Math.abs;var ya=class{getLocalTransform(e){return ba(this,e)}setPosition(e){this.x=e[0],this.y=e[1]}setScale(e){this.scaleX=e[0],this.scaleY=e[1]}setSkew(e){this.skewX=e[0],this.skewY=e[1]}setOrigin(e){this.originX=e[0],this.originY=e[1]}needLocalTransform(){return ma(this.rotation)||ma(this.x)||ma(this.y)||ma(this.scaleX-1)||ma(this.scaleY-1)||ma(this.skewX)||ma(this.skewY)}updateTransform(){let e=this.parent&&this.parent.transform,t=this.needLocalTransform(),n=this.transform;t||e?(n=n||Kt(),t?this.getLocalTransform(n):pa(n),e&&(t?Yt(n,e,n):Jt(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n),this.invTransform=this.invTransform||Kt(),$t(this.invTransform,n)):n&&(pa(n),this.invTransform=null)}_resolveGlobalScaleRatio(e){let t=this.globalScaleRatio;if(t!=null&&t!==1){this.getGlobalScale(ha);let n=ha[0]<0?-1:1,r=ha[1]<0?-1:1,i=((ha[0]-n)*t+n)/ha[0]||0,a=((ha[1]-r)*t+r)/ha[1]||0;e[0]*=i,e[1]*=i,e[2]*=a,e[3]*=a}}getComputedTransform(){let e=this,t=[];for(;e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform}setLocalTransform(e){if(!e)return;let 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}decomposeTransform(){if(!this.transform)return;let e=this.parent,t=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||Kt(),Yt(ga,e.invTransform,t),t=ga);let n=this.originX,r=this.originY;(n||r)&&(_a[4]=n,_a[5]=r,Yt(ga,t,_a),ga[4]-=n,ga[5]-=r,t=ga),this.setLocalTransform(t)}getGlobalScale(e){let t=this.transform;return e=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)}transformCoordToLocal(e,t){let n=[e,t],r=this.invTransform;return r&&lt(n,n,r),n}transformCoordToGlobal(e,t){let n=[e,t],r=this.transform;return r&&lt(n,n,r),n}getLineScale(){let e=this.transform;return e&&va(e[0]-1)>1e-10&&va(e[3]-1)>1e-10?Math.sqrt(va(e[0]*e[3]-e[2]*e[1])):1}copyTransform(e){Ca(this,e)}static getLocalTransform(e,t){t=t||[];let 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){let e=n+o,c=r+s;t[4]=-e*i-d*c*a,t[5]=-c*a-f*e*i}else t[4]=t[5]=0;return t[0]=i,t[3]=a,t[1]=f*i,t[2]=d*a,c&&Zt(t,t,c),t[4]+=n+l,t[5]+=r+u,t}};fa=ya,a(ya,`initDefaultProps`,(function(){let e=fa.prototype;e.scaleX=e.scaleY=e.globalScaleRatio=1,e.x=e.y=e.originX=e.originY=e.skewX=e.skewY=e.rotation=e.anchorX=e.anchorY=0})());const ba=ya.getLocalTransform;function xa(){return new ya}const Sa=[`x`,`y`,`originX`,`originY`,`anchorX`,`anchorY`,`rotation`,`scaleX`,`scaleY`,`skewX`,`skewY`];function Ca(e,t){return ne(e,t,Sa)}function wa(e){Ta||(Ta=new Or(100)),e=e||l;let t=Ta.get(e);return t||(t={font:e,strWidthCache:new Or(500),asciiWidthMap:null,asciiWidthMapTried:!1,stWideCharWidth:f.measureText(`国`,e).width,asciiCharWidth:f.measureText(`a`,e).width},Ta.put(e,t)),t}let Ta;function Ea(e){if(Da>=Oa)return;e=e||l;let t=[],n=+/* @__PURE__ */ new Date;for(let n=0;n<=127;n++)t[n]=f.measureText(String.fromCharCode(n),e).width;let r=+/* @__PURE__ */ new Date-n;return r>16?Da=Oa:r>2&&Da++,t}let Da=0;const Oa=5;function ka(e,t){return e.asciiWidthMapTried||(e.asciiWidthMap=Ea(e.font),e.asciiWidthMapTried=!0),0<=t&&t<=127?e.asciiWidthMap==null?e.asciiCharWidth:e.asciiWidthMap[t]:e.stWideCharWidth}function Aa(e,t){let n=e.strWidthCache,r=n.get(t);return r==null&&(r=f.measureText(t,e.font).width,n.put(t,r)),r}function ja(e,t,n,r){let i=Aa(wa(t),e),a=Fa(t);return new K(Na(0,i,n),Pa(0,a,r),i,a)}function Ma(e,t,n,r){let i=((e||``)+``).split(`
2
+ `);if(i.length===1)return ja(i[0],t,n,r);{let e=new K(0,0,0,0);for(let a=0;a<i.length;a++){let o=ja(i[a],t,n,r);a===0?e.copy(o):e.union(o)}return e}}function Na(e,t,n,r){return n===`right`?r?e+=t:e-=t:n===`center`&&(r?e+=t/2:e-=t/2),e}function Pa(e,t,n,r){return n===`middle`?r?e+=t/2:e-=t/2:n===`bottom`&&(r?e+=t:e-=t),e}function Fa(e){return wa(e).stWideCharWidth}function Ia(e,t){return typeof e==`string`?e.lastIndexOf(`%`)>=0?parseFloat(e)/100*t:parseFloat(e):e}function La(e,t,n){let 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+=Ia(r[0],n.width),l+=Ia(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`}return e=e||{},e.x=c,e.y=l,e.align=u,e.verticalAlign=d,e}var Ra;const za=`__zr_normal__`,Ba=Sa.concat([`ignore`]),Va=se(Sa,(e,t)=>(e[t]=!0,e),{ignore:!1}),Ha={},Ua=new K(0,0,0,0),Wa=[];var Ga=class{constructor(e){a(this,`id`,O()),a(this,`animators`,[]),a(this,`currentStates`,[]),a(this,`states`,{}),this._init(e)}_init(e){this.attr(e)}drift(e,t,n){switch(this.draggable){case`horizontal`:t=0;break;case`vertical`:e=0}let r=this.transform;r||(r=this.transform=[1,0,0,1,0,0]),r[4]+=e,r[5]+=t,this.decomposeTransform(),this.markRedraw()}beforeUpdate(){}afterUpdate(){}update(){this.updateTransform(),this.__dirty&&this.updateInnerText()}updateInnerText(e){let t=this._textContent;if(t&&(!t.ignore||e)){this.textConfig||(this.textConfig={});let e=this.textConfig,n=e.local,r=t.innerTransformable,i,a,o=!1;r.parent=n?this:null;let s=!1;r.copyTransform(t);let c=e.position!=null,l=e.autoOverflowArea,u;if((l||c)&&(u=Ua,e.layoutRect?u.copy(e.layoutRect):u.copy(this.getBoundingRect()),n||u.applyTransform(this.transform)),c){this.calculateTextPosition?this.calculateTextPosition(Ha,e,u):La(Ha,e,u),r.x=Ha.x,r.y=Ha.y,i=Ha.align,a=Ha.verticalAlign;let t=e.origin;if(t&&e.rotation!=null){let e,i;t===`center`?(e=u.width*.5,i=u.height*.5):(e=Ia(t[0],u.width),i=Ia(t[1],u.height)),s=!0,r.originX=-r.x+e+(n?0:u.x),r.originY=-r.y+i+(n?0:u.y)}}e.rotation!=null&&(r.rotation=e.rotation);let d=e.offset;d&&(r.x+=d[0],r.y+=d[1],s||(r.originX=-d[0],r.originY=-d[1]));let f=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={});if(l){let e=f.overflowRect=f.overflowRect||new K(0,0,0,0);r.getLocalTransform(Wa),$t(Wa,Wa),K.copy(e,u),e.applyTransform(Wa)}else f.overflowRect=null;let p=e.inside==null?typeof e.position==`string`&&e.position.indexOf(`inside`)>=0:e.inside,m,h,g;p&&this.canBeInsideText()?(m=e.insideFill,h=e.insideStroke,(m==null||m===`auto`)&&(m=this.getInsideTextFill()),(h==null||h===`auto`)&&(h=this.getInsideTextStroke(m),g=!0)):(m=e.outsideFill,h=e.outsideStroke,(m==null||m===`auto`)&&(m=this.getOutsideFill()),(h==null||h===`auto`)&&(h=this.getOutsideStroke(m),g=!0)),m=m||`#000`,(m!==f.fill||h!==f.stroke||g!==f.autoStroke||i!==f.align||a!==f.verticalAlign)&&(o=!0,f.fill=m,f.stroke=h,f.autoStroke=g,f.align=i,f.verticalAlign=a,t.setDefaultTextStyle(f)),t.__dirty|=1,o&&t.dirtyStyle(!0)}}canBeInsideText(){return!0}getInsideTextFill(){return`#fff`}getInsideTextStroke(e){return`#000`}getOutsideFill(){return this.__zr&&this.__zr.isDarkMode()?da:ua}getOutsideStroke(e){let t=this.__zr&&this.__zr.getBackgroundColor(),n=typeof t==`string`&&Ur(t);n||(n=[255,255,255,1]);let r=n[3],i=this.__zr.isDarkMode();for(let e=0;e<3;e++)n[e]=n[e]*r+(i?0:255)*(1-r);return n[3]=1,ei(n,`rgba`)}traverse(e,t){}attrKV(e,t){e===`textConfig`?this.setTextConfig(t):e===`textContent`?this.setTextContent(t):e===`clipPath`?this.setClipPath(t):e===`extra`?(this.extra=this.extra||{},j(this.extra,t)):this[e]=t}hide(){this.ignore=!0,this.markRedraw()}show(){this.ignore=!1,this.markRedraw()}attr(e,t){if(typeof e==`string`)this.attrKV(e,t);else if(B(e)){let t=ue(e);for(let n=0;n<t.length;n++){let r=t[n];this.attrKV(r,e[r])}}return this.markRedraw(),this}saveCurrentToNormalState(e){this._innerSaveToNormal(e);let t=this._normalState;for(let e=0;e<this.animators.length;e++){let n=this.animators[e],r=n.__fromStateTransition;if(n.getLoop()||r&&r!==`__zr_normal__`)continue;let i=n.targetName,a=i?t[i]:t;n.saveTo(a)}}_innerSaveToNormal(e){let t=this._normalState;t||(t=this._normalState={}),e.textConfig&&!t.textConfig&&(t.textConfig=this.textConfig),this._savePrimaryToNormal(e,t,Ba)}_savePrimaryToNormal(e,t,n){for(let r=0;r<n.length;r++){let i=n[r];e[i]!=null&&!(i in t)&&(t[i]=this[i])}}hasState(){return this.currentStates.length>0}getState(e){return this.states[e]}ensureState(e){let t=this.states;return t[e]||(t[e]={}),t[e]}clearStates(e){this.useState(za,!1,e)}useState(e,t,n,r){let i=e===za;if(!this.hasState()&&i)return;let a=this.currentStates,o=this.stateTransition;if(N(a,e)>=0&&(t||a.length===1))return;let s;if(this.stateProxy&&!i&&(s=this.stateProxy(e)),s||(s=this.states&&this.states[e]),!s&&!i){ee(`State ${e} not exists.`);return}i||this.saveCurrentToNormalState(s);let c=this._textContent,l=$a(this,c,s,r);l&&!this.__inHover&&(this.__inHover=l),this._applyStateObj(e,s,this._normalState,t,to(this,n,o),o);let u=this._textGuide;return c&&c.useState(e,t,n,!!l),u&&u.useState(e,t,n,!!l),i?(this.currentStates=[],this._normalState={}):t?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!l&&this.__inHover&&(this.__inHover=0,this.__dirty&=-2),s}useStates(e,t,n){if(!e.length)this.clearStates();else{let r=[],i=this.currentStates,a=e.length,o=a===i.length;if(o){for(let t=0;t<a;t++)if(e[t]!==i[t]){o=!1;break}}if(o)return;for(let t=0;t<a;t++){let n=e[t],i;this.stateProxy&&(i=this.stateProxy(n,e)),i||(i=this.states[n]),i&&r.push(i)}let s=r[a-1],c=this._textContent,l=$a(this,c,s,n);l&&!this.__inHover&&(this.__inHover=l);let u=this._mergeStates(r),d=this.stateTransition;this.saveCurrentToNormalState(u),this._applyStateObj(e.join(`,`),u,this._normalState,!1,to(this,t,d),d);let f=this._textGuide;c&&c.useStates(e,t,!!l),f&&f.useStates(e,t,!!l),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!l&&this.__inHover&&(this.__inHover=0,this.__dirty&=-2)}}isSilent(){let e=this;for(;e;){if(e.silent)return!0;let t=e.__hostTarget;e=t?e.ignoreHostSilent?null:t:e.parent}return!1}_updateAnimationTargets(){for(let e=0;e<this.animators.length;e++){let t=this.animators[e];t.targetName&&t.changeTarget(this[t.targetName])}}removeState(e){let t=N(this.currentStates,e);if(t>=0){let e=this.currentStates.slice();e.splice(t,1),this.useStates(e)}}replaceState(e,t,n){let r=this.currentStates.slice(),i=N(r,e),a=N(r,t)>=0;i>=0?a?r.splice(i,1):r[i]=t:n&&!a&&r.push(t),this.useStates(r)}toggleState(e,t){t?this.useState(e,!0):this.removeState(e)}_mergeStates(e){let t={},n;for(let r=0;r<e.length;r++){let i=e[r];j(t,i),i.textConfig&&(n=n||{},j(n,i.textConfig))}return n&&(t.textConfig=n),t}_applyStateObj(e,t,n,r,i,a){if(this.__inHover===1)return;let o=!(t&&r);t&&t.textConfig?(this.textConfig=j({},r?this.textConfig:n.textConfig),j(this.textConfig,t.textConfig)):o&&n.textConfig&&(this.textConfig=n.textConfig);let s={},c=!1;for(let e=0;e<Ba.length;e++){let r=Ba[e],a=i&&Va[r];t&&t[r]!=null?a?(c=!0,s[r]=t[r]):this[r]=t[r]:o&&n[r]!=null&&(a?(c=!0,s[r]=n[r]):this[r]=n[r])}if(!i)for(let e=0;e<this.animators.length;e++){let r=this.animators[e],i=r.targetName;r.getLoop()||r.__changeFinalValue(i?(t||n)[i]:t||n)}c&&this._transitionState(e,s,a)}_attachComponent(e){if(e.__zr&&!e.__hostTarget||e===this)return;let t=this.__zr;t&&e.addSelfToZr(t),e.__zr=t,e.__hostTarget=this}_detachComponent(e){e.__zr&&e.removeSelfFromZr(e.__zr),e.__zr=null,e.__hostTarget=null}getClipPath(){return this._clipPath}setClipPath(e){this._clipPath&&this._clipPath!==e&&this.removeClipPath(),this._attachComponent(e),this._clipPath=e,this.markRedraw()}removeClipPath(){let e=this._clipPath;e&&(this._detachComponent(e),this._clipPath=null,this.markRedraw())}getTextContent(){return this._textContent}setTextContent(e){let t=this._textContent;t!==e&&(t&&t!==e&&this.removeTextContent(),e.innerTransformable=new ya,this._attachComponent(e),this._textContent=e,this.markRedraw())}setTextConfig(e){this.textConfig||(this.textConfig={}),j(this.textConfig,e),this.markRedraw()}removeTextConfig(){this.textConfig=null,this.markRedraw()}removeTextContent(){let e=this._textContent;e&&(e.innerTransformable=null,this._detachComponent(e),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())}getTextGuideLine(){return this._textGuide}setTextGuideLine(e){this._textGuide&&this._textGuide!==e&&this.removeTextGuideLine(),this._attachComponent(e),this._textGuide=e,this.markRedraw()}removeTextGuideLine(){let e=this._textGuide;e&&(this._detachComponent(e),this._textGuide=null,this.markRedraw())}markRedraw(){this.__dirty|=1;let e=this.__zr;e&&(this.__inHover?e.refreshHover():e.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()}dirty(){this.markRedraw()}addSelfToZr(e){if(this.__zr===e)return;this.__zr=e;let t=this.animators;if(t)for(let n=0;n<t.length;n++)e.animation.addAnimator(t[n]);this._clipPath&&this._clipPath.addSelfToZr(e),this._textContent&&this._textContent.addSelfToZr(e),this._textGuide&&this._textGuide.addSelfToZr(e)}removeSelfFromZr(e){if(!this.__zr)return;this.__zr=null;let t=this.animators;if(t)for(let n=0;n<t.length;n++)e.animation.removeAnimator(t[n]);this._clipPath&&this._clipPath.removeSelfFromZr(e),this._textContent&&this._textContent.removeSelfFromZr(e),this._textGuide&&this._textGuide.removeSelfFromZr(e)}animate(e,t,n){let r=new Bi(e?this[e]:this,t,n);return e&&(r.targetName=e),this.addAnimator(r,e),r}addAnimator(e,t){let n=this.__zr,r=this;e.during(function(){r.updateDuringAnimation(t)}).done(function(){let t=r.animators,n=N(t,e);n>=0&&t.splice(n,1)}),this.animators.push(e),n&&n.animation.addAnimator(e),n&&n.wakeUp()}updateDuringAnimation(e){this.markRedraw()}stopAnimation(e,t){let n=this.animators,r=n.length,i=[];for(let a=0;a<r;a++){let r=n[a];!e||e===r.scope?r.stop(t):i.push(r)}return this.animators=i,this}animateTo(e,t,n){Ka(this,e,t,n)}animateFrom(e,t,n){Ka(this,e,t,n,!0)}_transitionState(e,t,n,r){let i=Ka(this,t,n,r);for(let t=0;t<i.length;t++)i[t].__fromStateTransition=e}getBoundingRect(){return null}getPaintRect(){return null}};Ra=Ga,a(Ga,`initDefaultProps`,(function(){let e=Ra.prototype;e.type=`element`,e.name=``,e.ignore=e.silent=e.ignoreHostSilent=e.isGroup=e.draggable=e.dragging=e.ignoreClip=!1,e.__inHover=0,e.__dirty=1;function t(t,n,r,i){Object.defineProperty(e,t,{get(){if(!this[n]){let e=this[n]=[];a(this,e)}return this[n]},set(e){this[r]=e[0],this[i]=e[1],this[n]=e,a(this,e)}});function a(e,t){Object.defineProperty(t,0,{get(){return e[r]},set(t){e[r]=t}}),Object.defineProperty(t,1,{get(){return e[i]},set(t){e[i]=t}})}}Object.defineProperty&&(t(`position`,`_legacyPos`,`x`,`y`),t(`scale`,`_legacyScale`,`scaleX`,`scaleY`),t(`origin`,`_legacyOrigin`,`originX`,`originY`))})()),ae(Ga,mt),ae(Ga,ya);function Ka(e,t,n,r,i){n=n||{};let a=[];Qa(e,``,e,t,n,r,a,i);let o=a.length,s=!1,c=n.done,l=n.aborted,u=()=>{s=!0,o--,o<=0&&(s?c&&c():l&&l())},d=()=>{o--,o<=0&&(s?c&&c():l&&l())};o||c&&c(),a.length>0&&n.during&&a[0].during((e,t)=>{n.during(t)});for(let e=0;e<a.length;e++){let t=a[e];u&&t.done(u),d&&t.aborted(d),n.force&&t.duration(n.duration),t.start(n.easing)}return a}function qa(e,t,n){for(let r=0;r<n;r++)e[r]=t[r]}function Ja(e){return oe(e[0])}function Ya(e,t,n){if(oe(t[n])){if(oe(e[n])||(e[n]=[]),ge(t[n])){let r=t[n].length;e[n].length!==r&&(e[n]=new t[n].constructor(r),qa(e[n],t[n],r))}else{let r=t[n],i=e[n],a=r.length;if(Ja(r)){let e=r[0].length;for(let t=0;t<a;t++)i[t]?qa(i[t],r[t],e):i[t]=Array.prototype.slice.call(r[t])}else qa(i,r,a);i.length=r.length}}else e[n]=t[n]}function Xa(e,t){return e===t||oe(e)&&oe(t)&&Za(e,t)}function Za(e,t){let n=e.length;if(n!==t.length)return!1;for(let r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}function Qa(e,t,n,r,i,a,o,s){let c=ue(r),l=i.duration,u=i.delay,d=i.additive,f=i.setToFinal,p=!B(a),m=e.animators,h=[];for(let l=0;l<c.length;l++){let u=c[l],d=r[u];if(d!=null&&n[u]!=null&&(p||a[u])){if(B(d)&&!oe(d)&&!ve(d)){if(t){s||(n[u]=d,e.updateDuringAnimation(t));continue}Qa(e,u,n[u],d,i,a&&a[u],o,s)}else h.push(u)}else s||(n[u]=d,e.updateDuringAnimation(t),h.push(u))}let g=h.length;if(!d&&g)for(let e=0;e<m.length;e++){let n=m[e];if(n.targetName===t&&n.stopTracks(h)){let e=N(m,n);m.splice(e,1)}}if(i.force||(h=ce(h,e=>!Xa(r[e],n[e])),g=h.length),g>0||i.force&&!o.length){let a,c,p;if(s){c={},f&&(a={});for(let e=0;e<g;e++){let t=h[e];c[t]=n[t],f?a[t]=r[t]:n[t]=r[t]}}else if(f){p={};for(let e=0;e<g;e++){let t=h[e];p[t]=Ni(n[t]),Ya(n,r,t)}}let _=new Bi(n,!1,!1,d?ce(m,e=>e.targetName===t):null);_.targetName=t,i.scope&&(_.scope=i.scope),f&&a&&_.whenWithKeys(0,a,h),p&&_.whenWithKeys(0,p,h),_.whenWithKeys(l==null?500:l,s?c:r,h).delay(u||0),e.addAnimator(_,t),o.push(_)}}function $a(e,t,n,r){return!(n&&n.hoverLayer||r)||eo(e)||t&&eo(t)?0:1}function eo(e){return e.type===`text`||e.type===`tspan`}function to(e,t,n){return!t&&!e.__inHover&&n&&n.duration>0}var q=class extends Ga{constructor(e){super(),a(this,`isGroup`,!0),a(this,`_children`,[]),this.attr(e)}childrenRef(){return this._children}children(){return this._children.slice()}childAt(e){return this._children[e]}childOfName(e){let t=this._children;for(let n=0;n<t.length;n++)if(t[n].name===e)return t[n]}childCount(){return this._children.length}add(e){return e&&e!==this&&e.parent!==this&&(this._children.push(e),this._doAdd(e)),this}addBefore(e,t){if(e&&e!==this&&e.parent!==this&&t&&t.parent===this){let n=this._children,r=n.indexOf(t);r>=0&&(n.splice(r,0,e),this._doAdd(e))}return this}replace(e,t){let n=N(this._children,e);return n>=0&&this.replaceAt(t,n),this}replaceAt(e,t){let n=this._children,r=n[t];if(e&&e!==this&&e.parent!==this&&e!==r){n[t]=e,r.parent=null;let i=this.__zr;i&&r.removeSelfFromZr(i),this._doAdd(e)}return this}_doAdd(e){e.parent&&e.parent.remove(e),e.parent=this;let t=this.__zr;t&&t!==e.__zr&&e.addSelfToZr(t),t&&t.refresh()}remove(e){let t=this.__zr,n=this._children,r=N(n,e);return r<0||(n.splice(r,1),e.parent=null,t&&e.removeSelfFromZr(t),t&&t.refresh()),this}removeAll(){let e=this._children,t=this.__zr;for(let n=0;n<e.length;n++){let r=e[n];t&&r.removeSelfFromZr(t),r.parent=null}return e.length=0,this}eachChild(e,t){let n=this._children;for(let r=0;r<n.length;r++){let i=n[r];e.call(t,i,r)}return this}traverse(e,t){for(let n=0;n<this._children.length;n++){let r=this._children[n],i=e.call(t,r);r.isGroup&&!i&&r.traverse(e,t)}return this}addSelfToZr(e){super.addSelfToZr(e);for(let t=0;t<this._children.length;t++)this._children[t].addSelfToZr(e)}removeSelfFromZr(e){super.removeSelfFromZr(e);for(let t=0;t<this._children.length;t++)this._children[t].removeSelfFromZr(e)}getBoundingRect(e){let t=new K(0,0,0,0),n=e||this._children,r=[],i=null;for(let e=0;e<n.length;e++){let a=n[e];if(a.ignore||a.invisible)continue;let o=a.getBoundingRect(),s=a.getLocalTransform(r);s?(K.applyTransform(t,o,s),i=i||t.clone(),i.union(t)):(i=i||o.clone(),i.union(o))}return i||t}};q.prototype.type=`group`;
3
+ /*!
4
+ * ZRender, a high performance 2d drawing library.
5
+ *
6
+ * Copyright (c) 2013, Baidu Inc.
7
+ * All rights reserved.
8
+ *
9
+ * LICENSE
10
+ * https://github.com/ecomfe/zrender/blob/master/LICENSE
11
+ */
12
+ var no=/* @__PURE__ */ t({dispose:()=>lo,disposeAll:()=>uo,getElementSSRData:()=>ho,getInstance:()=>fo,init:()=>co,registerPainter:()=>po,registerSSRDataGetter:()=>go,version:()=>_o});const ro={};let io={};function ao(e){delete io[e]}function oo(e){if(!e)return!1;if(typeof e==`string`)return ti(e,1)<la;if(e.colorStops){let t=e.colorStops,n=0,r=t.length;for(let e=0;e<r;e++)n+=ti(t[e].color,1);return n/=r,n<la}return!1}var so=class{constructor(e,t,n){a(this,`_sleepAfterStill`,10),a(this,`_stillFrameAccum`,0),a(this,`_needsRefresh`,!0),a(this,`_needsRefreshHover`,!1),a(this,`_darkMode`,!1),n=n||{},this.dom=t,this.id=e;let r=new Jn,i=n.renderer||`canvas`;ro[i]||(i=ue(ro)[0]),n.useDirtyRect=n.useDirtyRect!=null&&n.useDirtyRect;let o=new ro[i](t,r,n,e),c=n.ssr||o.ssrOnly;this.storage=r,this.painter=o;let l=!s.node&&!s.worker&&!c?new oa(o.getViewportRoot(),o.root):null,u=n.useCoarsePointer,d=u==null||u===`auto`?s.touchEventsSupported:!!u,f;d&&(f=V(n.pointerSize,44)),this.handler=new Nn(r,o,l,o.root,f),this.animation=new Hi({stage:{update:c?null:()=>this._flush(!1)}}),c||this.animation.start()}add(e){!this._disposed&&e&&(this.storage.addRoot(e),e.addSelfToZr(this),this.refresh())}remove(e){!this._disposed&&e&&(this.storage.delRoot(e),e.removeSelfFromZr(this),this.refresh())}configLayer(e,t){this._disposed||(this.painter.configLayer&&this.painter.configLayer(e,t),this.refresh())}setBackgroundColor(e){this._disposed||(this.painter.setBackgroundColor&&this.painter.setBackgroundColor(e),this.refresh(),this._backgroundColor=e,this._darkMode=oo(e))}getBackgroundColor(){return this._backgroundColor}setDarkMode(e){this._darkMode=e}isDarkMode(){return this._darkMode}refreshImmediately(e){this._disposed||this._refresh({animUpdate:!e,refresh:!0,refreshHover:!1})}_refresh(e){e.animUpdate&&this.animation.update(!0),this._needsRefresh=this._needsRefreshHover=!1,this.painter.refresh({refresh:e.refresh,refreshHover:e.refreshHover}),this._needsRefresh=this._needsRefreshHover=!1}refresh(){this._disposed||(this._needsRefresh=!0,this.animation.start())}flush(){this._disposed||this._flush(!0)}_flush(e){let t,n=Vi(),r=this._needsRefresh,i=this._needsRefreshHover;(r||i)&&(t=!0,this._refresh({animUpdate:e,refresh:r,refreshHover:i}));let a=Vi();t?(this._stillFrameAccum=0,this.trigger(`rendered`,{elapsedTime:a-n})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())}setSleepAfterStill(e){this._sleepAfterStill=e}wakeUp(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)}refreshHover(){this._needsRefreshHover=!0}refreshHoverImmediately(){this._disposed||this._refresh({animUpdate:!1,refresh:!1,refreshHover:!0})}resize(e){this._disposed||(e=e||{},this.painter.resize(e.width,e.height),this.handler.resize())}clearAnimation(){this._disposed||this.animation.clear()}getWidth(){if(!this._disposed)return this.painter.getWidth()}getHeight(){if(!this._disposed)return this.painter.getHeight()}setCursorStyle(e){this._disposed||this.handler.setCursorStyle(e)}findHover(e,t){if(!this._disposed)return this.handler.findHover(e,t)}on(e,t,n){return this._disposed||this.handler.on(e,t,n),this}off(e,t){this._disposed||this.handler.off(e,t)}trigger(e,t){this._disposed||this.handler.trigger(e,t)}clear(){if(this._disposed)return;let e=this.storage.getRoots();for(let t=0;t<e.length;t++)e[t]instanceof q&&e[t].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()}dispose(){this._disposed||(this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,this._disposed=!0,ao(this.id))}};function co(e,t){let n=new so(O(),e,t);return io[n.id]=n,n}function lo(e){e.dispose()}function uo(){for(let e in io)io.hasOwnProperty(e)&&io[e].dispose();io={}}function fo(e){return io[e]}function po(e,t){ro[e]=t}let mo;function ho(e){if(typeof mo==`function`)return mo(e)}function go(e){mo=e}const _o=`6.1.0`;function vo(e){return e.replace(/^\s+|\s+$/g,``)}const yo=Math.min,bo=Math.max,xo=Math.abs,So=Math.round,Co=Math.floor,wo=Math.ceil,To=Math.pow,Eo=Math.log,Do=Math.LN10,Oo=Math.PI,ko=Math.random;function Ao(e,t,n,r){let i=t[0],a=t[1],o=n[0],s=n[1],c=a-i,l=s-o;if(c===0)return l===0?o:(o+s)/2;if(r){if(c>0){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}const J=jo;function jo(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%`}return Mo(e,t,n)}function Mo(e,t,n){return z(e)?Po(e)?parseFloat(e)/100*t+(n||0):parseFloat(e):e==null?NaN:+e}function No(e){return z(e)&&Po(e)}function Po(e){return!!vo(e).match(/%$/)}function Fo(e,t,n){return typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(t!=null),isNaN(t)?n?``+e:+e:(t=yo(bo(0,t),20),e=(+e).toFixed(t),n?e:+e)}function Io(e,t,n){return t==null&&(t=10),Fo(e,t,n)}function Lo(e){return e.sort(function(e,t){return e-t}),e}function Ro(e){if(e=+e,isNaN(e))return 0;if(e>1e-14){let t=1;for(let n=0;n<15;n++,t*=10)if(So(e*t)/t===e)return n}return zo(e)}function zo(e){let 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 bo(0,o-r)}function Bo(e,t){let n=Co(Eo(e[1]-e[0])/Do),r=So(Eo(xo(t[1]-t[0]))/Do),i=yo(bo(-n+r,0),20);return isFinite(i)?i:20}function Vo(e,t,n){let r=xo(e[1]-e[0]);if(!isFinite(r)||r===0)return NaN;let i=Eo(2*xo(n||1)*xo(r))/Do,a=Eo(xo(t))/Do,o=bo(0,wo(-i+a));return isFinite(o)||(o=NaN),o}function Ho(e,t,n){return e[t]&&Uo(e,n)[t]||0}function Uo(e,t){let n=se(e,function(e,t){return e+(isNaN(t)?0:t)},0);if(n===0)return[];let r=To(10,t),i=F(e,function(e){return(isNaN(e)?0:e)/n*r*100}),a=r*100,o=F(i,function(e){return Co(e)}),s=se(o,function(e,t){return e+t},0),c=F(i,function(e,t){return e-o[t]});for(;s<a;){let e=-1/0,t=null;for(let n=0,r=c.length;n<r;++n)c[n]>e&&(e=c[n],t=n);++o[t],c[t]=0,++s}return F(o,function(e){return e/r})}function Wo(e,t){let n=bo(Ro(e),Ro(t)),r=e+t;return n>20?r:Fo(r,n)}const Go=To(2,53)-1;function Ko(e){let t=Oo*2;return(e%t+t)%t}function qo(e){return e>-1e-4&&e<1e-4}const Jo=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d{1,2})(?::(\d{1,2})(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function Yo(e){if(e instanceof Date)return e;if(z(e)){let t=Jo.exec(e);if(!t)return/* @__PURE__ */ new Date(NaN);if(t[8]){let e=+t[4]||0;return t[8].toUpperCase()!==`Z`&&(e-=+t[8].slice(0,3)),new Date(Date.UTC(+t[1],(t[2]||1)-1,+t[3]||1,e,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0))}return new Date(+t[1],(t[2]||1)-1,+t[3]||1,+t[4]||0,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0)}return e==null?/* @__PURE__ */ new Date(NaN):new Date(So(e))}function Xo(e){return To(10,Zo(e))}function Zo(e){if(e===0)return 0;let t=Co(Eo(e)/Do);return e/To(10,t)>=10&&t++,t}function Qo(e,t){let n=Zo(e),r=To(10,n),i=e/r,a;return a=t===2?1: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,e=a*r,Fo(e,-n)}function $o(e,t){let n=(e.length-1)*t+1,r=Co(n),i=+e[r-1],a=n-r;return a?i+a*(e[r]-i):i}function es(e){e.sort(function(e,t){return r(e,t,0)?-1:1});let t=-1/0,n=1;for(let r=0;r<e.length;){let i=e[r].interval,a=e[r].close;for(let e=0;e<2;e++)i[e]<=t&&(i[e]=t,a[e]=e?1:1-n),t=i[e],n=a[e];i[0]===i[1]&&a[0]*a[1]!==1?e.splice(r,1):r++}return e;function r(e,t,n){return e.interval[n]<t.interval[n]||e.interval[n]===t.interval[n]&&(e.close[n]-t.close[n]===(n?-1:1)||!n&&r(e,t,1))}}function ts(e){let t=parseFloat(e);return t==e&&(t!==0||!z(e)||e.indexOf(`x`)<=0)?t:NaN}function ns(e){return!isNaN(ts(e))}function rs(){return So(ko()*9)}function is(e,t){return t===0?e:is(t,e%t)}function as(e,t){return e==null?t:t==null?e:e*t/is(e,t)}function os(e){return e!=null&&isFinite(e)}const ss={},cs=typeof console<`u`&&console.warn&&console.log;function ls(e,t,n){if(cs){if(n){if(ss[t])return;ss[t]=!0}console[e](`[SparkNG Charts] `+t)}}function us(e,t){ls(`log`,e,t)}function ds(e,t){ls(`warn`,e,t)}function fs(e,t){ls(`error`,e,t)}function ps(e){typeof process<`u`&&process.env.NODE_ENV!==`production`&&ls(`warn`,`DEPRECATED: `+e,!0)}function ms(e,t,n){typeof process<`u`&&process.env.NODE_ENV!==`production`&&ps((n?`[${n}]`:``)+`${e} is deprecated; use ${t} instead.`)}function hs(...e){let t=``;if(typeof process<`u`&&process.env.NODE_ENV!==`production`){let n=e=>e===void 0?`undefined`:e===1/0?`Infinity`:e===-1/0?`-Infinity`:xe(e)?`NaN`:e instanceof Date?`Date(`+e.toISOString()+`)`:R(e)?`function () { ... }`:be(e)?e+``:null;t=F(e,e=>{if(z(e))return e;{let t=n(e);if(t!=null)return t;if(typeof JSON<`u`&&JSON.stringify)try{return JSON.stringify(e,function(e,t){let r=n(t);return r==null?t:r})}catch(e){return`?`}return`?`}}).join(` `)}return t}function gs(e){throw Error(e)}function _s(e,t,n){return(t-e)*n+e}const vs=`series\0`,ys=`\0_ec_\0`;function bs(e){return e instanceof Array?e:e==null?[]:[e]}function xs(e,t,n){if(e){e[t]=e[t]||{},e.emphasis=e.emphasis||{},e.emphasis[t]=e.emphasis[t]||{};for(let r=0,i=n.length;r<i;r++){let i=n[r];!e.emphasis[t].hasOwnProperty(i)&&e[t].hasOwnProperty(i)&&(e.emphasis[t][i]=e[t][i])}}}const Ss=/* @__PURE__ */ `fontStyle.fontWeight.fontSize.fontFamily.rich.tag.color.textBorderColor.textBorderWidth.width.height.lineHeight.align.verticalAlign.baseline.shadowColor.shadowBlur.shadowOffsetX.shadowOffsetY.textShadowColor.textShadowBlur.textShadowOffsetX.textShadowOffsetY.backgroundColor.borderColor.borderWidth.borderRadius.padding`.split(`.`);function Cs(e){return B(e)&&!L(e)&&!(e instanceof Date)?e.value:e}function ws(e){return B(e)&&!(e instanceof Array)}function Ts(e,t,n){let r=n===`normalMerge`,i=n===`replaceMerge`,a=n===`replaceAll`;e=e||[],t=(t||[]).slice();let o=U();P(t,function(e,n){B(e)?typeof process<`u`&&process.env.NODE_ENV!==`production`&&(e.id!=null&&!Is(e.id)&&Fs(e.id),e.name!=null&&!Is(e.name)&&Fs(e.name)):t[n]=null});let s=Es(e,o,n);return(r||i)&&Ds(s,e,o,t),r&&Os(s,t),r||i?ks(s,t,i):a&&As(s,t),js(s),s}function Es(e,t,n){let r=[];if(n===`replaceAll`)return r;for(let i=0;i<e.length;i++){let a=e[i];a&&a.id!=null&&t.set(a.id,i),r.push({existing:n===`replaceMerge`||Rs(a)?null:a,newOption:null,keyInfo:null,brandNew:null})}return r}function Ds(e,t,n,r){P(r,function(i,a){if(!i||i.id==null)return;let o=Ns(i.id),s=n.get(o);if(s!=null){let n=e[s];H(!n.newOption,`Duplicated option on id "`+o+`".`),n.newOption=i,n.existing=t[s],r[a]=null}})}function Os(e,t){P(t,function(n,r){if(n&&n.name!=null)for(let i=0;i<e.length;i++){let a=e[i].existing;if(!e[i].newOption&&a&&(a.id==null||n.id==null)&&!Rs(n)&&!Rs(a)&&Ms(`name`,a,n)){e[i].newOption=n,t[r]=null;return}}})}function ks(e,t,n){P(t,function(t){if(!t)return;let r,i=0;for(;(r=e[i])&&(r.newOption||Rs(r.existing)||r.existing&&t.id!=null&&!Ms(`id`,t,r.existing));)i++;r?(r.newOption=t,r.brandNew=n):e.push({newOption:t,brandNew:n,existing:null,keyInfo:null}),i++})}function As(e,t){P(t,function(t){e.push({newOption:t,brandNew:!0,existing:null,keyInfo:null})})}function js(e){let t=U();P(e,function(e){let n=e.existing;n&&t.set(n.id,e)}),P(e,function(e){let n=e.newOption;H(!n||n.id==null||!t.get(n.id)||t.get(n.id)===e,`id duplicates: `+(n&&n.id)),n&&n.id!=null&&t.set(n.id,e),!e.keyInfo&&(e.keyInfo={})}),P(e,function(e,n){let r=e.existing,i=e.newOption,a=e.keyInfo;if(B(i)){if(a.name=i.name==null?r?r.name:vs+n:Ns(i.name),r)a.id=Ns(r.id);else if(i.id!=null)a.id=Ns(i.id);else{let e=0;do a.id=`\0`+a.name+`\0`+e++;while(t.get(a.id))}t.set(a.id,e)}})}function Ms(e,t,n){let r=Ps(t[e],null),i=Ps(n[e],null);return r!=null&&i!=null&&r===i}function Ns(e){if(typeof process<`u`&&process.env.NODE_ENV!==`production`&&e==null)throw Error();return Ps(e,``)}function Ps(e,t){return e==null?t:z(e)?e:me(e)||pe(e)?e+``:t}function Fs(e){typeof process<`u`&&process.env.NODE_ENV!==`production`&&ds("`"+e+"` is invalid id or name. Must be a string or number.")}function Is(e){return pe(e)||ns(e)}function Ls(e){let t=e.name;return!!(t&&t.indexOf(vs))}function Rs(e){return e&&e.id!=null&&Ns(e.id).indexOf(ys)===0}function zs(e){return ys+e}function Bs(e,t,n){P(e,function(e){let r=e.newOption;B(r)&&(e.keyInfo.mainType=t,e.keyInfo.subType=Vs(t,r,e.existing,n))})}function Vs(e,t,n,r){return t.type?t.type:n?n.subType:r.determineSubType(e,t)}function Hs(e,t){let n={},r={};return i(e||[],n),i(t||[],r,n),[a(n),a(r)];function i(e,t,n){for(let r=0,i=e.length;r<i;r++){let i=Ps(e[r].seriesId,null);if(i==null)return;let a=bs(e[r].dataIndex),o=n&&n[i];for(let e=0,n=a.length;e<n;e++){let n=a[e];o&&o[n]?o[n]=null:(t[i]||(t[i]={}))[n]=1}}}function a(e,t){let n=[];for(let r in e)if(e.hasOwnProperty(r)&&e[r]!=null){if(t)n.push(+r);else{let t=a(e[r],!0);t.length&&n.push({seriesId:r,dataIndex:t})}}return n}}function Us(e,t){if(t.dataIndexInside!=null)return t.dataIndexInside;if(t.dataIndex!=null)return L(t.dataIndex)?F(t.dataIndex,function(t){return e.indexOfRawIndex(t)}):e.indexOfRawIndex(t.dataIndex);if(t.name!=null)return L(t.name)?F(t.name,function(t){return e.indexOfName(t)}):e.indexOfName(t.name)}function Y(){let e=`__ec_inner_`+Ws++;return function(t){return t[e]||(t[e]={})}}let Ws=rs();function Gs(e,t,n){let{mainTypeSpecified:r,queryOptionMap:i,others:a}=Ks(t,n),o=a,s=n?n.defaultMainType:null;return!r&&s&&i.set(s,{}),i.each(function(t,r){let i=Ys(e,r,t,{useDefault:s===r,enableAll:n&&n.enableAll!=null?n.enableAll:!0,enableNone:n&&n.enableNone!=null?n.enableNone:!0});o[r+`Models`]=i.models,o[r+`Model`]=i.models[0]}),o}function Ks(e,t){let n;if(z(e)){let t={};t[e+`Index`]=0,n=t}else n=e;let r=U(),i={},a=!1;return P(n,function(e,n){if(n===`dataIndex`||n===`dataIndexInside`){i[n]=e;return}let o=n.match(/^(\w+)(Index|Id|Name)$/)||[],s=o[1],c=(o[2]||``).toLowerCase();if(!s||!c||t&&t.includeMainTypes&&N(t.includeMainTypes,s)<0)return;a=a||!!s;let l=r.get(s)||r.set(s,{});l[c]=e}),{mainTypeSpecified:a,queryOptionMap:r,others:i}}const qs={useDefault:!0,enableAll:!1,enableNone:!1},Js={useDefault:!1,enableAll:!0,enableNone:!0};function Ys(e,t,n,r){r=r||qs;let i=n.index,a=n.id,o=n.name,s={models:null,specified:i!=null||a!=null||o!=null};if(!s.specified){let n;return s.models=r.useDefault&&(n=e.getComponent(t))?[n]:[],s}if(i===`none`||i===!1){if(r.enableNone)return s.models=[],s;typeof process<`u`&&process.env.NODE_ENV!==`production`&&fs('`"none"` or `false` is not a valid value on index option.'),i=-1}return i===`all`&&(r.enableAll?i=a=o=null:(typeof process<`u`&&process.env.NODE_ENV!==`production`&&fs('`"all"` is not a valid value on index option.'),i=-1)),s.models=e.queryComponents({mainType:t,index:i,id:a,name:o}),s}function Xs(e,t,n){typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(t);let r={};r[t+`Id`]=e[t+`Id`],r[t+`Index`]=e[t+`Index`],r[t+`Name`]=e[t+`Name`];let i={mainType:t,query:r};return n&&(i.subType=n),i}function Zs(e,t,n){e.setAttribute?e.setAttribute(t,n):e[t]=n}function Qs(e,t){return e.getAttribute?e.getAttribute(t):e[t]}function $s(e){return e===`auto`?s.domSupported?`html`:`richText`:e||`html`}function ec(e,t){let n=U(),r=[];return P(e,function(e){let i=t(e);(n.get(i)||(r.push(i),n.set(i,[]))).push(e)}),{keys:r,buckets:n}}function tc(e,t,n,r,i){let a=t==null||t===`auto`;if(r==null)return r;if(me(r))return Fo(_s(n||0,r,i),a?Math.max(Ro(n||0),Ro(r)):t);if(z(r))return i<1?n:r;{let o=[],s=n,c=r,l=Math.max(s?s.length:0,c.length);for(let n=0;n<l;++n){let r=e.getDimensionInfo(n);if(r&&r.type===`ordinal`)o[n]=(i<1&&s?s:c)[n];else{let e=s&&s[n]?s[n]:0,r=c[n],l=_s(e,r,i);o[n]=Fo(l,a?Math.max(Ro(e),Ro(r)):t)}}return o}}var nc=class{reset(e,t,n,r){return this._list=e,this._step=r=r||1,this._idx=t,this._end=n==null?r>0?e.length:0:n,this.item=null,this.key=NaN,this}next(){return(this._step>0?this._idx<this._end:this._idx>=this._end)&&(this.item=this._list[this._idx],this.key=this._idx+=this._step,!0)}};function rc(e){e.option=e.parentModel=e.ecModel=null}function ic(){return[1/0,-1/0]}function ac(e,t){lc(t)&&(t<e[0]&&(e[0]=t),t>e[1]&&(e[1]=t))}function oc(e,t){lc(t)&&t<e[0]&&(e[0]=t)}function sc(e,t){lc(t)&&t>e[1]&&(e[1]=t)}function cc(e,t){uc(t[0],t[1])&&(t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1]))}function lc(e){return e!=null&&isFinite(e)}function uc(e,t){return lc(e)&&lc(t)&&e<=t}function dc(e){let t=e[1]-e[0];return isFinite(t)&&t>=0}function fc(e){uc(e[0],e[1])&&e[0]>e[1]&&(e[0]=e[1])}function pc(){let e=`__ec_once_`+mc++;return function(t,n){typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(t),W(t,e)||(t[e]=1,n())}}let mc=rs();function hc(e,t,n){let r=U(),i=0;P(e,function(a){let o=t(a);typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(z(o));let s=r.get(o)||0;n&&n(a,s),!s&&!n&&(e[i++]=a),r.set(o,s+1)}),n||(e.length=i)}function gc(e){return typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(e.value!=null),e.value+``}function _c(e){return typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(e!=null),e+``}function vc(e,t){return V(t,!0)?e.seriesIndex+2:0}function yc(e,t,n){let r=e.getData().count();return{progressiveRender:n.progressiveEnabled&&t.incrementalPrepareRender&&r>=n.threshold,large:e.get(`large`)&&r>=e.get(`largeThreshold`),modDataCount:e.get(`progressiveChunkMode`)===`mod`?e.getData().count():null}}function bc(e,t){H(e.start===t.start&&e.end===t.end)}function xc(e,t){return{seriesType:e,overallReset:t}}function Sc(e){return{overallReset:e}}const Cc=`___EC__COMPONENT__CONTAINER___`,wc=`___EC__EXTENDED_CLASS___`;function Tc(e){let t={main:``,sub:``};if(e){let n=e.split(`.`);t.main=n[0]||``,t.sub=n[1]||``}return t}function Ec(e){H(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(e),`componentType "`+e+`" illegal`)}function Dc(e){return!!(e&&e[wc])}function Oc(e,t){e.$constructor=e,e.extend=function(e){typeof process<`u`&&process.env.NODE_ENV!==`production`&&P(t,function(t){e[t]||console.warn("Method `"+t+"` should be implemented"+(e.type?` in `+e.type:``)+`.`)});let n=this,r;return kc(n)?r=class extends n{constructor(){super(...arguments)}}:(r=function(){(e.$constructor||n).apply(this,arguments)},ie(r,this)),j(r.prototype,e),r[wc]=!0,r.extend=this.extend,r.superCall=Nc,r.superApply=Pc,r.superClass=n,r}}function kc(e){return R(e)&&/^class\s/.test(Function.prototype.toString.call(e))}function Ac(e,t){e.extend=t.extend}let jc=Math.round(Math.random()*10);function Mc(e){let t=[`__\0is_clz`,jc++].join(`_`);e.prototype[t]=!0,typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(!e.isInstance,`The method "is" can not be defined.`),e.isInstance=function(e){return!!(e&&e[t])}}function Nc(e,t,...n){return this.superClass.prototype[t].apply(e,n)}function Pc(e,t,n){return this.superClass.prototype[t].apply(e,n)}function Fc(e){let t={};e.registerClass=function(e){let r=e.type||e.prototype.type;if(r){Ec(r),e.prototype.type=r;let i=Tc(r);if(!i.sub)typeof process<`u`&&process.env.NODE_ENV!==`production`&&t[i.main]&&console.warn(i.main+` exists.`),t[i.main]=e;else if(i.sub!==Cc){let t=n(i);t[i.sub]=e}}return e},e.getClass=function(e,n,r){let i=t[e];if(i&&i[Cc]&&(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){let n=Tc(e),r=[],i=t[n.main];return i&&i[Cc]?P(i,function(e,t){t!==Cc&&r.push(e)}):r.push(i),r},e.hasClass=function(e){let n=Tc(e);return!!t[n.main]},e.getAllClassMainTypes=function(){let e=[];return P(t,function(t,n){e.push(n)}),e},e.hasSubTypes=function(e){let n=Tc(e),r=t[n.main];return r&&r[Cc]};function n(e){let n=t[e.main];return(!n||!n[Cc])&&(n=t[e.main]={},n[Cc]=!0),n}}function Ic(e,t){for(let t=0;t<e.length;t++)e[t][1]||(e[t][1]=e[t][0]);return t=t||!1,function(n,r,i){let a={};for(let o=0;o<e.length;o++){let s=e[o][1];if(r&&N(r,s)>=0||i&&N(i,s)<0)continue;let c=n.getShallow(s,t);c!=null&&(a[e[o][0]]=c)}return a}}const Lc=Ic([[`fill`,`color`],[`shadowBlur`],[`shadowOffsetX`],[`shadowOffsetY`],[`opacity`],[`shadowColor`]]);var Rc=class{getAreaStyle(e,t){return Lc(this,e,t)}};const zc=new Or(50);function Bc(e){if(typeof e==`string`){let t=zc.get(e);return t&&t.image}return e}function Vc(e,t,n,r,i){if(!e)return t;if(typeof e==`string`){if(t&&t.__zrImageSrc===e||!n)return t;let a=zc.get(e),o={hostEl:n,cb:r,cbPayload:i};return a?(t=a.image,!Uc(t)&&a.pending.push(o)):(t=f.loadImage(e,Hc,Hc),t.__zrImageSrc=e,zc.put(e,t.__cachedImgObj={image:t,pending:[o]})),t}return e}function Hc(){let e=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(let t=0;t<e.pending.length;t++){let n=e.pending[t],r=n.cb;r&&r(this,n.cbPayload),n.hostEl.dirty()}e.pending.length=0}function Uc(e){return e&&e.width&&e.height}const Wc=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function Gc(e,t,n,r,i){let a={};return Kc(a,e,t,n,r,i),a.text}function Kc(e,t,n,r,i,a){if(!n){e.text=``,e.isTruncated=!1;return}let o=(t+``).split(`
13
+ `);a=qc(n,r,i,a);let s=!1,c={};for(let e=0,t=o.length;e<t;e++)Jc(c,o[e],a),o[e]=c.textLine,s=s||c.isTruncated;e.text=o.join(`
14
+ `),e.isTruncated=s}function qc(e,t,n,r){r=r||{};let i=j({},r);n=V(n,`...`),i.maxIterations=V(r.maxIterations,2);let a=i.minChar=V(r.minChar,0),o=i.fontMeasureInfo=wa(t),s=o.asciiCharWidth;i.placeholder=V(r.placeholder,``);let c=e=Math.max(0,e-1);for(let e=0;e<a&&c>=s;e++)c-=s;let l=Aa(o,n);return l>c&&(n=``,l=0),c=e-l,i.ellipsis=n,i.ellipsisWidth=l,i.contentWidth=c,i.containerWidth=e,i}function Jc(e,t,n){let r=n.containerWidth,i=n.contentWidth,a=n.fontMeasureInfo;if(!r){e.textLine=``,e.isTruncated=!1;return}let o=Aa(a,t);if(o<=r)e.textLine=t,e.isTruncated=!1;else{for(let e=0;;e++){if(o<=i||e>=n.maxIterations){t+=n.ellipsis;break}let r=e===0?Yc(t,i,a):o>0?Math.floor(t.length*i/o):0;t=t.substr(0,r),o=Aa(a,t)}t===``&&(t=n.placeholder),e.textLine=t,e.isTruncated=!0}}function Yc(e,t,n){let r=0,i=0;for(let a=e.length;i<a&&r<t;i++)r+=ka(n,e.charCodeAt(i));return i}function Xc(e,t,n,r){let i=ll(e),a=t.overflow,o=t.padding,s=o?o[1]+o[3]:0,c=o?o[0]+o[2]:0,l=t.font,u=a===`truncate`,d=Fa(l),f=V(t.lineHeight,d),p=t.lineOverflow===`truncate`,m=!1,h=t.width;h==null&&n!=null&&(h=n-s);let g=t.height;g==null&&r!=null&&(g=r-c);let _;_=h!=null&&(a===`break`||a===`breakAll`)?i?al(i,t.font,h,a===`breakAll`,0).lines:[]:i?i.split(`
15
+ `):[];let v=_.length*f;if(g==null&&(g=v),v>g&&p){let e=Math.floor(g/f);m=m||_.length>e,_=_.slice(0,e),v=_.length*f}if(i&&u&&h!=null){let e=qc(h,l,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),n={};for(let t=0;t<_.length;t++)Jc(n,_[t],e),_[t]=n.textLine,m=m||n.isTruncated}let y=g,b=0,x=wa(l);for(let e=0;e<_.length;e++)b=Math.max(Aa(x,_[e]),b);h==null&&(h=b);let S=h;return y+=c,S+=s,{lines:_,height:g,outerWidth:S,outerHeight:y,lineHeight:f,calculatedLineHeight:d,contentWidth:b,contentHeight:v,width:h,isTruncated:m}}var Zc=class{},Qc=class{constructor(e){a(this,`tokens`,[]),e&&(this.tokens=e)}},$c=class{constructor(){a(this,`width`,0),a(this,`height`,0),a(this,`contentWidth`,0),a(this,`contentHeight`,0),a(this,`outerWidth`,0),a(this,`outerHeight`,0),a(this,`lines`,[]),a(this,`isTruncated`,!1)}};function el(e,t,n,r,i){let a=new $c,o=ll(e);if(!o)return a;let 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);let d=t.height;d==null&&r!=null&&(d=r-l);let f=t.overflow,p=(f===`break`||f===`breakAll`)&&u!=null?{width:u,accumWidth:0,breakAll:f===`breakAll`}:null,m=Wc.lastIndex=0,h;for(;(h=Wc.exec(o))!=null;){let e=h.index;e>m&&tl(a,o.substring(m,e),t,p),tl(a,h[2],t,p,h[1]),m=Wc.lastIndex}m<o.length&&tl(a,o.substring(m,o.length),t,p);let g=[],_=0,v=0,y=f===`truncate`,b=t.lineOverflow===`truncate`,x={};function S(e,t,n){e.width=t,e.lineHeight=n,_+=n,v=Math.max(v,t)}outer:for(let e=0;e<a.lines.length;e++){let n=a.lines[e],r=0,o=0;for(let s=0;s<n.tokens.length;s++){let c=n.tokens[s],l=c.styleName&&t.rich[c.styleName]||{},f=c.textPadding=l.padding,p=f?f[1]+f[3]:0,m=c.font=l.font||t.font;c.contentHeight=Fa(m);let h=V(l.height,c.contentHeight);if(c.innerHeight=h,f&&(h+=f[0]+f[2]),c.height=h,c.lineHeight=Ce(l.lineHeight,t.lineHeight,h),c.align=l&&l.align||i,c.verticalAlign=l&&l.verticalAlign||`middle`,b&&d!=null&&_+c.lineHeight>d){let t=a.lines.length;s>0?(n.tokens=n.tokens.slice(0,s),S(n,o,r),a.lines=a.lines.slice(0,e+1)):a.lines=a.lines.slice(0,e),a.isTruncated=a.isTruncated||a.lines.length<t;break outer}let v=l.width,C=v==null||v===`auto`;if(typeof v==`string`&&v.charAt(v.length-1)===`%`)c.percentWidth=v,g.push(c),c.contentWidth=Aa(wa(m),c.text);else{if(C){let e=l.backgroundColor,t=e&&e.image;t&&(t=Bc(t),Uc(t)&&(c.width=Math.max(c.width,t.width*h/t.height)))}let e=y&&u!=null?u-o:null;e!=null&&e<c.width?!C||e<p?(c.text=``,c.width=c.contentWidth=0):(Kc(x,c.text,e-p,m,t.ellipsis,{minChar:t.truncateMinChar}),c.text=x.text,a.isTruncated=a.isTruncated||x.isTruncated,c.width=c.contentWidth=Aa(wa(m),c.text)):c.contentWidth=Aa(wa(m),c.text)}c.width+=p,o+=c.width,l&&(r=Math.max(r,c.lineHeight))}S(n,o,r)}a.outerWidth=a.width=V(u,v),a.outerHeight=a.height=V(d,_),a.contentHeight=_,a.contentWidth=v,a.outerWidth+=c,a.outerHeight+=l;for(let e=0;e<g.length;e++){let t=g[e],n=t.percentWidth;t.width=parseInt(n,10)/100*a.width}return a}function tl(e,t,n,r,i){let a=t===``,o=i&&n.rich[i]||{},s=e.lines,c=o.font||n.font,l=!1,u,d;if(r){let e=o.padding,n=e?e[1]+e[3]:0;if(o.width!=null&&o.width!==`auto`){let e=Ia(o.width,r.width)+n;s.length>0&&e+r.accumWidth>r.width&&(u=t.split(`
16
+ `),l=!0),r.accumWidth=e}else{let e=al(t,c,r.width,r.breakAll,r.accumWidth);r.accumWidth=e.accumWidth+n,d=e.linesWidths,u=e.lines}}u||(u=t.split(`
17
+ `));let f=wa(c);for(let e=0;e<u.length;e++){let t=u[e],n=new Zc;if(n.styleName=i,n.text=t,n.isLineHolder=!t&&!a,n.width=typeof o.width==`number`?o.width:d?d[e]:Aa(f,t),!e&&!l){let e=(s[s.length-1]||(s[0]=new Qc)).tokens,r=e.length;r===1&&e[0].isLineHolder?e[0]=n:(t||!r||a)&&e.push(n)}else s.push(new Qc([n]))}}function nl(e){let t=e.charCodeAt(0);return t>=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}const rl=se(`,&?/;] `.split(``),function(e,t){return e[t]=!0,e},{});function il(e){return!nl(e)||!!rl[e]}function al(e,t,n,r,i){let a=[],o=[],s=``,c=``,l=0,u=0,d=wa(t);for(let t=0;t<e.length;t++){let f=e.charAt(t);if(f===`
18
+ `){c&&(s+=c,u+=l),a.push(s),o.push(u),s=``,c=``,l=0,u=0;continue}let p=ka(d,f.charCodeAt(0)),m=!r&&!il(f);(a.length?u+p>n:i+u+p>n)?u?(s||c)&&(m?(s||(s=c,c=``,l=0,u=l),a.push(s),o.push(u-l),c+=f,l+=p,s=``,u=l):(c&&(s+=c,c=``,l=0),a.push(s),o.push(u),s=f,u=p)):m?(a.push(c),o.push(l),c=f,l=p):(a.push(f),o.push(p)):(u+=p,m?(c+=f,l+=p):(c&&(s+=c,c=``,l=0),s+=f))}return c&&(s+=c),s&&(a.push(s),o.push(u)),a.length===1&&(u+=i),{accumWidth:u,lines:a,linesWidths:o}}function ol(e,t,n,r,i,a){if(e.baseX=n,e.baseY=r,e.outerWidth=e.outerHeight=null,!t)return;let o=t.width*2,s=t.height*2;K.set(sl,Na(n,o,i),Pa(r,s,a),o,s),K.intersect(t,sl,null,cl);let c=cl.outIntersectRect;e.outerWidth=c.width,e.outerHeight=c.height,e.baseX=Na(c.x,c.width,i,!0),e.baseY=Pa(c.y,c.height,a,!0)}const sl=new K(0,0,0,0),cl={outIntersectRect:{},clamp:!0};function ll(e){return e==null?e=``:e+=``}function ul(e){let t=ll(e.text),n=e.font;return dl(e,Aa(wa(n),t),Fa(n),null)}function dl(e,t,n,r){let i=new K(Na(e.x||0,t,e.textAlign),Pa(e.y||0,n,e.textBaseline),t,n),a=r==null?fl(e)?e.lineWidth:0:r;return a>0&&(i.x-=a/2,i.y-=a/2,i.width+=a,i.height+=a),i}function fl(e){let t=e.stroke;return t!=null&&t!==`none`&&e.lineWidth>0}var pl;const ml=`__zr_style_`+Math.round(Math.random()*10),hl={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:`#000`,opacity:1,blend:`source-over`},gl={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};hl[ml]=!0;const _l=[`z`,`z2`,`invisible`],vl=[`invisible`];var yl=class extends Ga{constructor(e){super(e)}_init(e){let t=ue(e);for(let n=0;n<t.length;n++){let r=t[n];r===`style`?this.useStyle(e[r]):super.attrKV(r,e[r])}this.style||this.useStyle({})}beforeBrush(e){}afterBrush(){}innerBeforeBrush(){}innerAfterBrush(){}shouldBePainted(e,t,n,r){let i=this.transform;if(this.ignore||this.invisible||this.style.opacity===0||this.culling&&Sl(this,e,t)||i&&!i[0]&&!i[3])return!1;if(n&&this.__clipPaths&&this.__clipPaths.length){for(let e=0;e<this.__clipPaths.length;++e)if(this.__clipPaths[e].isZeroArea())return!1}if(r&&this.parent){let e=this.parent;for(;e;){if(e.ignore)return!1;e=e.parent}}return!0}contain(e,t){return this.rectContain(e,t)}traverse(e,t){e.call(t,this)}rectContain(e,t){let n=this.transformCoordToLocal(e,t);return this.getBoundingRect().contain(n[0],n[1])}getPaintRect(){let e=this._paintRect;if(!this._paintRect||this.__dirty){let t=this.transform,n=this.getBoundingRect(),r=this.style,i=r.shadowBlur||0,a=r.shadowOffsetX||0,o=r.shadowOffsetY||0;e=this._paintRect||(this._paintRect=new K(0,0,0,0)),t?K.applyTransform(e,n,t):e.copy(n),(i||a||o)&&(e.width+=i*2+Math.abs(a),e.height+=i*2+Math.abs(o),e.x=Math.min(e.x,e.x+a-i),e.y=Math.min(e.y,e.y+o-i));let s=this.dirtyRectTolerance;e.isZero()||(e.x=Math.floor(e.x-s),e.y=Math.floor(e.y-s),e.width=Math.ceil(e.width+1+s*2),e.height=Math.ceil(e.height+1+s*2))}return e}setPrevPaintRect(e){e?(this._prevPaintRect=this._prevPaintRect||new K(0,0,0,0),this._prevPaintRect.copy(e)):this._prevPaintRect=null}getPrevPaintRect(){return this._prevPaintRect}animateStyle(e){return this.animate(`style`,e)}updateDuringAnimation(e){e===`style`?this.dirtyStyle():this.markRedraw()}attrKV(e,t){e===`style`?this.style?this.setStyle(t):this.useStyle(t):super.attrKV(e,t)}setStyle(e,t){return typeof e==`string`?this.style[e]=t:j(this.style,e),this.dirtyStyle(),this}dirtyStyle(e){e||this.markRedraw(),this.__dirty|=2,this._rect&&(this._rect=null)}dirty(){this.dirtyStyle()}styleChanged(){return!!(this.__dirty&2)}styleUpdated(){this.__dirty&=-3}createStyle(e){return Fe(hl,e)}useStyle(e){e[ml]||(e=this.createStyle(e)),this.style=e,this.dirtyStyle()}_useHoverStyle(e){this.__hoverStyle=e}isStyleObject(e){return e[ml]}_innerSaveToNormal(e){super._innerSaveToNormal(e);let t=this._normalState;e.style&&!t.style&&(t.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(e,t,_l)}_applyStateObj(e,t,n,r,i,a){super._applyStateObj(e,t,n,r,i,a);let o=!(t&&r),s=this.__inHover===1,c;if(t&&t.style?i?r?c=t.style:(c=this._mergeStyle(this.createStyle(),n.style),this._mergeStyle(c,t.style)):(c=this._mergeStyle(this.createStyle(),r?this.style:n.style),this._mergeStyle(c,t.style)):o&&(c=n.style),c){if(i){let t=this.style;if(this.style=this.createStyle(o?{}:t),o){let e=ue(t);for(let n=0;n<e.length;n++){let r=e[n];r in c&&(c[r]=c[r],this.style[r]=t[r])}}let n=ue(c);for(let e=0;e<n.length;e++){let t=n[e];this.style[t]=this.style[t]}this._transitionState(e,{style:c},a,this.getAnimationStyleProps())}else s?this._useHoverStyle(c):this.useStyle(c)}if(!s){let e=this.__inHover?vl:_l;for(let r=0;r<e.length;r++){let i=e[r];t&&t[i]!=null?this[i]=t[i]:o&&n[i]!=null&&(this[i]=n[i])}}}_mergeStates(e){let t=super._mergeStates(e),n;for(let t=0;t<e.length;t++){let r=e[t];r.style&&(n=n||{},this._mergeStyle(n,r.style))}return n&&(t.style=n),t}_mergeStyle(e,t){return j(e,t),e}getAnimationStyleProps(){return gl}};pl=yl,a(yl,`initDefaultProps`,(function(){let e=pl.prototype;e.type=`displayable`,e.invisible=!1,e.z=0,e.z2=0,e.zlevel=0,e.culling=!1,e.cursor=`pointer`,e.rectHover=!1,e.incremental=0,e._rect=null,e.dirtyRectTolerance=0,e.__dirty=3})());const bl=new K(0,0,0,0),xl=new K(0,0,0,0);function Sl(e,t,n){return bl.copy(e.getBoundingRect()),e.transform&&bl.applyTransform(e.transform),xl.width=t,xl.height=n,!bl.intersect(xl)}const Cl=Math.min,wl=Math.max,Tl=Math.sin,El=Math.cos,Dl=Math.PI*2,Ol=Ve(),kl=Ve(),Al=Ve();function jl(e,t,n){if(e.length===0)return;let r=e[0],i=r[0],a=r[0],o=r[1],s=r[1];for(let t=1;t<e.length;t++)r=e[t],i=Cl(i,r[0]),a=wl(a,r[0]),o=Cl(o,r[1]),s=wl(s,r[1]);t[0]=i,t[1]=o,n[0]=a,n[1]=s}function Ml(e,t,n,r,i,a){i[0]=Cl(e,n),i[1]=Cl(t,r),a[0]=wl(e,n),a[1]=wl(t,r)}const Nl=[],Pl=[];function Fl(e,t,n,r,i,a,o,s,c,l){let u=fr,d=lr,f=u(e,n,i,o,Nl);c[0]=1/0,c[1]=1/0,l[0]=-1/0,l[1]=-1/0;for(let t=0;t<f;t++){let r=d(e,n,i,o,Nl[t]);c[0]=Cl(r,c[0]),l[0]=wl(r,l[0])}f=u(t,r,a,s,Pl);for(let e=0;e<f;e++){let n=d(t,r,a,s,Pl[e]);c[1]=Cl(n,c[1]),l[1]=wl(n,l[1])}c[0]=Cl(e,c[0]),l[0]=wl(e,l[0]),c[0]=Cl(o,c[0]),l[0]=wl(o,l[0]),c[1]=Cl(t,c[1]),l[1]=wl(t,l[1]),c[1]=Cl(s,c[1]),l[1]=wl(s,l[1])}function Il(e,t,n,r,i,a,o,s){let c=yr,l=gr,u=wl(Cl(c(e,n,i),1),0),d=wl(Cl(c(t,r,a),1),0),f=l(e,n,i,u),p=l(t,r,a,d);o[0]=Cl(e,i,f),o[1]=Cl(t,a,p),s[0]=wl(e,i,f),s[1]=wl(t,a,p)}function Ll(e,t,n,r,i,a,o,s,c){let l=ut,u=dt,d=Math.abs(i-a);if(d%Dl<1e-4&&d>1e-4)s[0]=e-n,s[1]=t-r,c[0]=e+n,c[1]=t+r;else{if(Ol[0]=El(i)*n+e,Ol[1]=Tl(i)*r+t,kl[0]=El(a)*n+e,kl[1]=Tl(a)*r+t,l(s,Ol,kl),u(c,Ol,kl),i%=Dl,i<0&&(i+=Dl),a%=Dl,a<0&&(a+=Dl),i>a&&!o?a+=Dl:i<a&&o&&(i+=Dl),o){let e=a;a=i,i=e}for(let o=0;o<a;o+=Math.PI/2)o>i&&(Al[0]=El(o)*n+e,Al[1]=Tl(o)*r+t,l(s,Al,s),u(c,Al,c))}}var Rl;const zl={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Bl=[],Vl=[],Hl=[],Ul=[],Wl=[],Gl=[],Kl=Math.min,ql=Math.max,Jl=Math.cos,Yl=Math.sin,Xl=Math.abs,Zl=Math.PI,Ql=Zl*2,$l=typeof Float32Array<`u`,eu=[];function tu(e){return Math.round(e/Zl*1e8)/1e8%2*Zl}function nu(e,t){let n=tu(e[0]);n<0&&(n+=Ql);let r=n-e[0],i=e[1];i+=r,!t&&i-n>=Ql?i=n+Ql:t&&n-i>=Ql?i=n-Ql:!t&&n>i?i=n+(Ql-tu(n-i)):t&&n<i&&(i=n-(Ql-tu(i-n))),e[0]=n,e[1]=i}var ru=class e{constructor(e){a(this,`dpr`,1),a(this,`_xi`,0),a(this,`_yi`,0),a(this,`_x0`,0),a(this,`_y0`,0),a(this,`_len`,0),e&&(this._saveData=!1),this._saveData&&(this.data=[])}increaseVersion(){this._version++}getVersion(){return this._version}setScale(e,t,n){n=n||0,n>0&&(this._ux=Xl(n/ca/e)||0,this._uy=Xl(n/ca/t)||0)}setDPR(e){this.dpr=e}setContext(e){this._ctx=e}getContext(){return this._ctx}beginPath(){return this._ctx&&this._ctx.beginPath(),this.reset(),this}reset(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++}moveTo(e,t){return this._drawPendingPt(),this.addData(zl.M,e,t),this._ctx&&this._ctx.moveTo(e,t),this._x0=e,this._y0=t,this._xi=e,this._yi=t,this}lineTo(e,t){let n=Xl(e-this._xi),r=Xl(t-this._yi),i=n>this._ux||r>this._uy;if(this.addData(zl.L,e,t),this._ctx&&i&&this._ctx.lineTo(e,t),i)this._xi=e,this._yi=t,this._pendingPtDist=0;else{let i=n*n+r*r;i>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=t,this._pendingPtDist=i)}return this}bezierCurveTo(e,t,n,r,i,a){return this._drawPendingPt(),this.addData(zl.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}quadraticCurveTo(e,t,n,r){return this._drawPendingPt(),this.addData(zl.Q,e,t,n,r),this._ctx&&this._ctx.quadraticCurveTo(e,t,n,r),this._xi=n,this._yi=r,this}arc(e,t,n,r,i,a){this._drawPendingPt(),eu[0]=r,eu[1]=i,nu(eu,a),r=eu[0],i=eu[1];let o=i-r;return this.addData(zl.A,e,t,n,n,r,o,0,+!a),this._ctx&&this._ctx.arc(e,t,n,r,i,a),this._xi=Jl(i)*n+e,this._yi=Yl(i)*n+t,this}arcTo(e,t,n,r,i){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,t,n,r,i),this}rect(e,t,n,r){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,t,n,r),this.addData(zl.R,e,t,n,r),this}closePath(){this._drawPendingPt(),this.addData(zl.Z);let e=this._ctx,t=this._x0,n=this._y0;return e&&e.closePath(),this._xi=t,this._yi=n,this}fill(e){e&&e.fill(),this.toStatic()}stroke(e){e&&e.stroke(),this.toStatic()}len(){return this._len}setData(e){if(!this._saveData)return;let t=e.length;!(this.data&&this.data.length===t)&&$l&&(this.data=new Float32Array(t));for(let n=0;n<t;n++)this.data[n]=e[n];this._len=t}appendPath(e){if(!this._saveData)return;e instanceof Array||(e=[e]);let t=e.length,n=0,r=this._len;for(let r=0;r<t;r++)n+=e[r].len();let i=this.data;if($l&&(i instanceof Float32Array||!i)&&(this.data=new Float32Array(r+n),r>0&&i))for(let e=0;e<r;e++)this.data[e]=i[e];for(let n=0;n<t;n++){let t=e[n].data;for(let e=0;e<t.length;e++)this.data[r++]=t[e]}this._len=r}addData(e,t,n,r,i,a,o,s,c){if(!this._saveData)return;let l=this.data;this._len+arguments.length>l.length&&(this._expandData(),l=this.data);for(let e=0;e<arguments.length;e++)l[this._len++]=arguments[e]}_drawPendingPt(){this._pendingPtDist>0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)}_expandData(){if(!(this.data instanceof Array)){let e=[];for(let t=0;t<this._len;t++)e[t]=this.data[t];this.data=e}}toStatic(){if(!this._saveData)return;this._drawPendingPt();let e=this.data;e instanceof Array&&(e.length=this._len,$l&&this._len>11&&(this.data=new Float32Array(e)))}getBoundingRect(){Hl[0]=Hl[1]=Wl[0]=Wl[1]=Number.MAX_VALUE,Ul[0]=Ul[1]=Gl[0]=Gl[1]=-Number.MAX_VALUE;let e=this.data,t=0,n=0,r=0,i=0,a=0;for(;a<this._len;){let o=e[a++],s=a===1;switch(s&&(t=e[a],n=e[a+1],r=t,i=n),o){case zl.M:t=r=e[a++],n=i=e[a++],Wl[0]=r,Wl[1]=i,Gl[0]=r,Gl[1]=i;break;case zl.L:Ml(t,n,e[a],e[a+1],Wl,Gl),t=e[a++],n=e[a++];break;case zl.C:Fl(t,n,e[a++],e[a++],e[a++],e[a++],e[a],e[a+1],Wl,Gl),t=e[a++],n=e[a++];break;case zl.Q:Il(t,n,e[a++],e[a++],e[a],e[a+1],Wl,Gl),t=e[a++],n=e[a++];break;case zl.A:let o=e[a++],c=e[a++],l=e[a++],u=e[a++],d=e[a++],f=e[a++]+d;a+=1;let p=!e[a++];s&&(r=Jl(d)*l+o,i=Yl(d)*u+c),Ll(o,c,l,u,d,f,p,Wl,Gl),t=Jl(f)*l+o,n=Yl(f)*u+c;break;case zl.R:r=t=e[a++],i=n=e[a++];let m=e[a++],h=e[a++];Ml(r,i,r+m,i+h,Wl,Gl);break;case zl.Z:t=r,n=i}ut(Hl,Hl,Wl),dt(Ul,Ul,Gl)}return a===0&&(Hl[0]=Hl[1]=Ul[0]=Ul[1]=0),new K(Hl[0],Hl[1],Ul[0]-Hl[0],Ul[1]-Hl[1])}_calculateLength(){let e=this.data,t=this._len,n=this._ux,r=this._uy,i=0,a=0,o=0,s=0;this._pathSegLen||(this._pathSegLen=[]);let c=this._pathSegLen,l=0,u=0;for(let d=0;d<t;){let f=e[d++],p=d===1;p&&(i=e[d],a=e[d+1],o=i,s=a);let m=-1;switch(f){case zl.M:i=o=e[d++],a=s=e[d++];break;case zl.L:{let o=e[d++],s=e[d++],c=o-i,l=s-a;(Xl(c)>n||Xl(l)>r||d===t-1)&&(m=Math.sqrt(c*c+l*l),i=o,a=s);break}case zl.C:{let t=e[d++],n=e[d++],r=e[d++],o=e[d++],s=e[d++],c=e[d++];m=hr(i,a,t,n,r,o,s,c,10),i=s,a=c;break}case zl.Q:{let t=e[d++],n=e[d++],r=e[d++],o=e[d++];m=Sr(i,a,t,n,r,o,10),i=r,a=o;break}case zl.A:let c=e[d++],l=e[d++],u=e[d++],f=e[d++],h=e[d++],g=e[d++],_=g+h;d+=1,p&&(o=Jl(h)*u+c,s=Yl(h)*f+l),m=ql(u,f)*Kl(Ql,Math.abs(g)),i=Jl(_)*u+c,a=Yl(_)*f+l;break;case zl.R:{o=i=e[d++],s=a=e[d++];let t=e[d++],n=e[d++];m=t*2+n*2;break}case zl.Z:{let e=o-i,t=s-a;m=Math.sqrt(e*e+t*t),i=o,a=s;break}}m>=0&&(c[u++]=m,l+=m)}return this._pathLen=l,l}rebuildPath(e,t){let 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(let t=0;t<a;){let a=n[t++],m=t===1;switch(m&&(c=n[t],l=n[t+1],o=c,s=l),a!==zl.L&&v>0&&(e.lineTo(y,b),v=0),a){case zl.M:o=c=n[t++],s=l=n[t++],e.moveTo(c,l);break;case zl.L:{u=n[t++],d=n[t++];let a=Xl(u-c),o=Xl(d-l);if(a>r||o>i){if(f){let t=p[g++];if(h+t>_){let n=(_-h)/t;e.lineTo(c*(1-n)+u*n,l*(1-n)+d*n);break lo}h+=t}e.lineTo(u,d),c=u,l=d,v=0}else{let e=a*a+o*o;e>v&&(y=u,b=d,v=e)}break}case zl.C:{let r=n[t++],i=n[t++],a=n[t++],o=n[t++],s=n[t++],u=n[t++];if(f){let t=p[g++];if(h+t>_){let n=(_-h)/t;pr(c,r,a,s,n,Bl),pr(l,i,o,u,n,Vl),e.bezierCurveTo(Bl[1],Vl[1],Bl[2],Vl[2],Bl[3],Vl[3]);break lo}h+=t}e.bezierCurveTo(r,i,a,o,s,u),c=s,l=u;break}case zl.Q:{let r=n[t++],i=n[t++],a=n[t++],o=n[t++];if(f){let t=p[g++];if(h+t>_){let n=(_-h)/t;br(c,r,a,n,Bl),br(l,i,o,n,Vl),e.quadraticCurveTo(Bl[1],Vl[1],Bl[2],Vl[2]);break lo}h+=t}e.quadraticCurveTo(r,i,a,o),c=a,l=o;break}case zl.A:let a=n[t++],x=n[t++],S=n[t++],C=n[t++],w=n[t++],T=n[t++],E=n[t++],D=!n[t++],O=S>C?S:C,ee=Xl(S-C)>.001,k=w+T,A=!1;if(f){let e=p[g++];h+e>_&&(k=w+T*(_-h)/e,A=!0),h+=e}if(ee&&e.ellipse?e.ellipse(a,x,S,C,E,w,k,D):e.arc(a,x,O,w,k,D),A)break lo;m&&(o=Jl(w)*S+a,s=Yl(w)*C+x),c=Jl(k)*S+a,l=Yl(k)*C+x;break;case zl.R:o=c=n[t],s=l=n[t+1],u=n[t++],d=n[t++];let te=n[t++],j=n[t++];if(f){let t=p[g++];if(h+t>_){let t=_-h;e.moveTo(u,d),e.lineTo(u+Kl(t,te),d),t-=te,t>0&&e.lineTo(u+te,d+Kl(t,j)),t-=j,t>0&&e.lineTo(u+ql(te-t,0),d+j),t-=te,t>0&&e.lineTo(u,d+ql(j-t,0));break lo}h+=t}e.rect(u,d,te,j);break;case zl.Z:if(f){let t=p[g++];if(h+t>_){let n=(_-h)/t;e.lineTo(c*(1-n)+o*n,l*(1-n)+s*n);break lo}h+=t}e.closePath(),c=o,l=s}}}clone(){let t=new e,n=this.data;return t.data=n.slice?n.slice():Array.prototype.slice.call(n),t._len=this._len,t}canSave(){return!!this._saveData}};Rl=ru,a(ru,`CMD`,zl),a(ru,`initDefaultProps`,(function(){let e=Rl.prototype;e._saveData=!0,e._ux=0,e._uy=0,e._pendingPtDist=0,e._version=0})());function iu(e,t,n,r,i,a,o){if(i===0)return!1;let s=i,c=0,l=e;if(o>t+s&&o>r+s||o<t-s&&o<r-s||a>e+s&&a>n+s||a<e-s&&a<n-s)return!1;if(e!==n)c=(t-r)/(e-n),l=(e*r-n*t)/(e-n);else return Math.abs(a-e)<=s/2;let u=c*a-o+l;return u*u/(c*c+1)<=s/2*s/2}function au(e,t,n,r,i,a,o,s,c,l,u){if(c===0)return!1;let d=c;return u>t+d&&u>r+d&&u>a+d&&u>s+d||u<t-d&&u<r-d&&u<a-d&&u<s-d||l>e+d&&l>n+d&&l>i+d&&l>o+d||l<e-d&&l<n-d&&l<i-d&&l<o-d?!1:mr(e,t,n,r,i,a,o,s,l,u,null)<=d/2}function ou(e,t,n,r,i,a,o,s,c){if(o===0)return!1;let l=o;return c>t+l&&c>r+l&&c>a+l||c<t-l&&c<r-l&&c<a-l||s>e+l&&s>n+l&&s>i+l||s<e-l&&s<n-l&&s<i-l?!1:xr(e,t,n,r,i,a,s,c,null)<=l/2}const su=Math.PI*2;function cu(e){return e%=su,e<0&&(e+=su),e}const lu=Math.PI*2;function uu(e,t,n,r,i,a,o,s,c){if(o===0)return!1;let l=o;s-=e,c-=t;let u=Math.sqrt(s*s+c*c);if(u-l>n||u+l<n)return!1;if(Math.abs(r-i)%lu<1e-4)return!0;if(a){let e=r;r=cu(i),i=cu(e)}else r=cu(r),i=cu(i);r>i&&(i+=lu);let d=Math.atan2(c,s);return d<0&&(d+=lu),d>=r&&d<=i||d+lu>=r&&d+lu<=i}function du(e,t,n,r,i,a){if(a>t&&a>r||a<t&&a<r||r===t)return 0;let o=(a-t)/(r-t),s=r<t?1:-1;(o===1||o===0)&&(s=r<t?.5:-.5);let c=o*(n-e)+e;return c===i?1/0:c>i?s:0}const fu=ru.CMD,pu=Math.PI*2;function mu(e,t){return Math.abs(e-t)<1e-4}const hu=[-1,-1,-1],gu=[-1,-1];function _u(){let e=gu[0];gu[0]=gu[1],gu[1]=e}function vu(e,t,n,r,i,a,o,s,c,l){if(l>t&&l>r&&l>a&&l>s||l<t&&l<r&&l<a&&l<s)return 0;let u=dr(t,r,a,s,l,hu);if(u===0)return 0;{let l=0,d=-1,f,p;for(let m=0;m<u;m++){let u=hu[m],h=u===0||u===1?.5:1;lr(e,n,i,o,u)<c||(d<0&&(d=fr(t,r,a,s,gu),gu[1]<gu[0]&&d>1&&_u(),f=lr(t,r,a,s,gu[0]),d>1&&(p=lr(t,r,a,s,gu[1]))),d===2?u<gu[0]?l+=f<t?h:-h:u<gu[1]?l+=p<f?h:-h:l+=s<p?h:-h:u<gu[0]?l+=f<t?h:-h:l+=s<f?h:-h)}return l}}function yu(e,t,n,r,i,a,o,s){if(s>t&&s>r&&s>a||s<t&&s<r&&s<a)return 0;let c=vr(t,r,a,s,hu);if(c===0)return 0;{let s=yr(t,r,a);if(s>=0&&s<=1){let l=0,u=gr(t,r,a,s);for(let r=0;r<c;r++){let c=hu[r]===0||hu[r]===1?.5:1;gr(e,n,i,hu[r])<o||(hu[r]<s?l+=u<t?c:-c:l+=a<u?c:-c)}return l}{let r=hu[0]===0||hu[0]===1?.5:1;return gr(e,n,i,hu[0])<o?0:a<t?r:-r}}}function bu(e,t,n,r,i,a,o,s){if(s-=t,s>n||s<-n)return 0;let c=Math.sqrt(n*n-s*s);hu[0]=-c,hu[1]=c;let l=Math.abs(r-i);if(l<1e-4)return 0;if(l>=pu-1e-4){r=0,i=pu;let t=a?1:-1;return o>=hu[0]+e&&o<=hu[1]+e?t:0}if(r>i){let e=r;r=i,i=e}r<0&&(r+=pu,i+=pu);let u=0;for(let t=0;t<2;t++){let n=hu[t];if(n+e>o){let e=Math.atan2(s,n),t=a?1:-1;e<0&&(e=pu+e),(e>=r&&e<=i||e+pu>=r&&e+pu<=i)&&(e>Math.PI/2&&e<Math.PI*1.5&&(t=-t),u+=t)}}return u}function xu(e,t,n,r,i){let a=e.data,o=e.len(),s=0,c=0,l=0,u=0,d=0,f,p;for(let e=0;e<o;){let o=a[e++],m=e===1;switch(o===fu.M&&e>1&&(n||(s+=du(c,l,u,d,r,i))),m&&(c=a[e],l=a[e+1],u=c,d=l),o){case fu.M:u=a[e++],d=a[e++],c=u,l=d;break;case fu.L:if(n){if(iu(c,l,a[e],a[e+1],t,r,i))return!0}else s+=du(c,l,a[e],a[e+1],r,i)||0;c=a[e++],l=a[e++];break;case fu.C:if(n){if(au(c,l,a[e++],a[e++],a[e++],a[e++],a[e],a[e+1],t,r,i))return!0}else s+=vu(c,l,a[e++],a[e++],a[e++],a[e++],a[e],a[e+1],r,i)||0;c=a[e++],l=a[e++];break;case fu.Q:if(n){if(ou(c,l,a[e++],a[e++],a[e],a[e+1],t,r,i))return!0}else s+=yu(c,l,a[e++],a[e++],a[e],a[e+1],r,i)||0;c=a[e++],l=a[e++];break;case fu.A:let o=a[e++],h=a[e++],g=a[e++],_=a[e++],v=a[e++],y=a[e++];e+=1;let b=!!(1-a[e++]);f=Math.cos(v)*g+o,p=Math.sin(v)*_+h,m?(u=f,d=p):s+=du(c,l,f,p,r,i);let x=(r-o)*_/g+o;if(n){if(uu(o,h,_,v,v+y,b,t,x,i))return!0}else s+=bu(o,h,_,v,v+y,b,x,i);c=Math.cos(v+y)*g+o,l=Math.sin(v+y)*_+h;break;case fu.R:u=c=a[e++],d=l=a[e++];let S=a[e++],C=a[e++];if(f=u+S,p=d+C,n){if(iu(u,d,f,d,t,r,i)||iu(f,d,f,p,t,r,i)||iu(f,p,u,p,t,r,i)||iu(u,p,u,d,t,r,i))return!0}else s+=du(f,d,f,p,r,i),s+=du(u,p,u,d,r,i);break;case fu.Z:if(n){if(iu(c,l,u,d,t,r,i))return!0}else s+=du(c,l,u,d,r,i);c=u,l=d}}return!n&&!mu(l,d)&&(s+=du(c,l,u,d,r,i)||0),s!==0}function Su(e,t,n){return xu(e,0,!1,t,n)}function Cu(e,t,n,r){return xu(e,t,!0,n,r)}var wu;const Tu=M({fill:`#000`,stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:`butt`,miterLimit:10,strokeNoScale:!1,strokeFirst:!1},hl),Eu={style:M({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},gl.style)},Du=Sa.concat([`invisible`,`culling`,`z`,`z2`,`zlevel`,`parent`]);var Ou=class e extends yl{constructor(e){super(e)}update(){super.update();let t=this.style;if(t.decal){let n=this._decalEl=this._decalEl||new e;n.buildPath===e.prototype.buildPath&&(n.buildPath=e=>{this.buildPath(e,this.shape)}),n.silent=!0;let r=n.style;for(let e in t)r[e]!==t[e]&&(r[e]=t[e]);r.fill=t.fill?t.decal:null,r.decal=null,r.shadowColor=null,t.strokeFirst&&(r.stroke=null);for(let e=0;e<Du.length;++e)n[Du[e]]=this[Du[e]];n.__dirty|=1}else this._decalEl&&(this._decalEl=null)}getDecalElement(){return this._decalEl}_init(e){let t=ue(e);this.shape=this.getDefaultShape();let n=this.getDefaultStyle();n&&this.useStyle(n);for(let n=0;n<t.length;n++){let r=t[n],i=e[r];r===`style`?this.style?j(this.style,i):this.useStyle(i):r===`shape`?j(this.shape,i):super.attrKV(r,i)}this.style||this.useStyle({})}getDefaultStyle(){return null}getDefaultShape(){return{}}canBeInsideText(){return this.hasFill()}getInsideTextFill(){let e=this.style.fill;if(e!==`none`){if(z(e)){let t=ti(e,0);return t>.5?ua:t>.2?`#eee`:da}if(e)return da}return ua}getInsideTextStroke(e){let t=this.style.fill;if(z(t)){let n=this.__zr;if(!!(n&&n.isDarkMode())==ti(e,0)<.4)return t}}buildPath(e,t,n){}pathUpdated(){this.__dirty&=-5}getUpdatedPathProxy(e){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,e),this.path}createPathProxy(){this.path=new ru(!1)}hasStroke(){let e=this.style,t=e.stroke;return!(t==null||t===`none`||!(e.lineWidth>0))}hasFill(){let e=this.style.fill;return e!=null&&e!==`none`}getBoundingRect(){let e=this._rect,t=this.style,n=!e;if(n){let t=!1;this.path||(t=!0,this.createPathProxy());let n=this.path;(t||this.__dirty&4)&&(n.beginPath(),this.buildPath(n,this.shape,!1),this.pathUpdated()),e=n.getBoundingRect()}if(this._rect=e,this.hasStroke()&&this.path&&this.path.len()>0){let r=this._rectStroke||(this._rectStroke=e.clone());if(this.__dirty||n){r.copy(e);let n=t.strokeNoScale?this.getLineScale():1,i=t.lineWidth;if(!this.hasFill()){let e=this.strokeContainThreshold;i=Math.max(i,e==null?4:e)}n>1e-10&&(r.width+=i/n,r.height+=i/n,r.x-=i/n/2,r.y-=i/n/2)}return r}return e}contain(e,t){let n=this.transformCoordToLocal(e,t),r=this.getBoundingRect(),i=this.style;if(e=n[0],t=n[1],r.contain(e,t)){let n=this.path;if(this.hasStroke()){let r=i.lineWidth,a=i.strokeNoScale?this.getLineScale():1;if(a>1e-10&&(this.hasFill()||(r=Math.max(r,this.strokeContainThreshold)),Cu(n,r/a,e,t)))return!0}if(this.hasFill())return Su(n,e,t)}return!1}dirtyShape(){this.__dirty|=4,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()}dirty(){this.dirtyStyle(),this.dirtyShape()}animateShape(e){return this.animate(`shape`,e)}updateDuringAnimation(e){e===`style`?this.dirtyStyle():e===`shape`?this.dirtyShape():this.markRedraw()}attrKV(e,t){e===`shape`?this.setShape(t):super.attrKV(e,t)}setShape(e,t){let n=this.shape;return n||(n=this.shape={}),typeof e==`string`?n[e]=t:j(n,e),this.dirtyShape(),this}shapeChanged(){return!!(this.__dirty&4)}createStyle(e){return Fe(Tu,e)}_innerSaveToNormal(e){super._innerSaveToNormal(e);let t=this._normalState;e.shape&&!t.shape&&(t.shape=j({},this.shape))}_applyStateObj(e,t,n,r,i,a){if(super._applyStateObj(e,t,n,r,i,a),this.__inHover===1)return;let o=!(t&&r),s;if(t&&t.shape?i?r?s=t.shape:(s=j({},n.shape),j(s,t.shape)):(s=j({},r?this.shape:n.shape),j(s,t.shape)):o&&(s=n.shape),s){if(i){this.shape=j({},this.shape);let t={},n=ue(s);for(let e=0;e<n.length;e++){let r=n[e];typeof s[r]==`object`?this.shape[r]=s[r]:t[r]=s[r]}this._transitionState(e,{shape:t},a)}else this.shape=s,this.dirtyShape()}}_mergeStates(e){let t=super._mergeStates(e),n;for(let t=0;t<e.length;t++){let r=e[t];r.shape&&(n=n||{},this._mergeStyle(n,r.shape))}return n&&(t.shape=n),t}getAnimationStyleProps(){return Eu}isZeroArea(){return!1}static extend(t){class n extends e{getDefaultStyle(){return k(t.style)}getDefaultShape(){return k(t.shape)}constructor(e){super(e),t.init&&t.init.call(this,e)}}for(let e in t)typeof t[e]==`function`&&(n.prototype[e]=t[e]);return n}};wu=Ou,a(Ou,`initDefaultProps`,(function(){let e=wu.prototype;e.type=`path`,e.strokeContainThreshold=5,e.segmentIgnoreThreshold=0,e.subPixelOptimize=!1,e.autoBatch=!1,e.__dirty=7})());var ku;const Au=M({strokeFirst:!0,font:l,x:0,y:0,textAlign:`left`,textBaseline:`top`,miterLimit:2},Tu);var ju=class extends yl{hasStroke(){return fl(this.style)}hasFill(){let e=this.style.fill;return e!=null&&e!==`none`}createStyle(e){return Fe(Au,e)}setBoundingRect(e){this._rect=e}getBoundingRect(){return this._rect||(this._rect=ul(this.style)),this._rect}};ku=ju,a(ju,`initDefaultProps`,(function(){let e=ku.prototype;e.dirtyRectTolerance=10})()),ju.prototype.type=`tspan`;const Mu=M({x:0,y:0},hl),Nu={style:M({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},gl.style)};function Pu(e){return!!(e&&typeof e!=`string`&&e.width&&e.height)}var Fu=class extends yl{createStyle(e){return Fe(Mu,e)}_getSize(e){let t=this.style,n=t[e];if(n!=null)return n;let r=Pu(t.image)?t.image:this.__image;if(!r)return 0;let i=e===`width`?`height`:`width`,a=t[i];return a==null?r[e]:r[e]/r[i]*a}getWidth(){return this._getSize(`width`)}getHeight(){return this._getSize(`height`)}getAnimationStyleProps(){return Nu}getBoundingRect(){let e=this.style;return this._rect||(this._rect=new K(e.x||0,e.y||0,this.getWidth(),this.getHeight())),this._rect}};Fu.prototype.type=`image`;function Iu(e,t){let n=t.x,r=t.y,i=t.width,a=t.height,o=t.r,s,c,l,u;i<0&&(n+=i,i=-i),a<0&&(r+=a,a=-a),typeof o==`number`?s=c=l=u=o:o instanceof Array?o.length===1?s=c=l=u=o[0]:o.length===2?(s=l=o[0],c=u=o[1]):o.length===3?(s=o[0],c=u=o[1],l=o[2]):(s=o[0],c=o[1],l=o[2],u=o[3]):s=c=l=u=0;let d;s+c>i&&(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),e.closePath()}const Lu=Math.round;function Ru(e,t,n){if(!t)return;let r=t.x1,i=t.x2,a=t.y1,o=t.y2;e.x1=r,e.x2=i,e.y1=a,e.y2=o;let s=n&&n.lineWidth;return s&&(Lu(r*2)===Lu(i*2)&&(e.x1=e.x2=Bu(r,s,!0)),Lu(a*2)===Lu(o*2)&&(e.y1=e.y2=Bu(a,s,!0))),e}function zu(e,t,n){if(!t)return;let r=t.x,i=t.y,a=t.width,o=t.height;e.x=r,e.y=i,e.width=a,e.height=o;let s=n&&n.lineWidth;return s&&(e.x=Bu(r,s,!0),e.y=Bu(i,s,!0),e.width=Math.max(Bu(r+a,s,!1)-e.x,a===0?0:1),e.height=Math.max(Bu(i+o,s,!1)-e.y,o===0?0:1)),e}function Bu(e,t,n){if(!t)return e;let r=Lu(e*2);return(r+Lu(t))%2==0?r/2:(r+(n?1:-1))/2}var Vu=class{constructor(){a(this,`x`,0),a(this,`y`,0),a(this,`width`,0),a(this,`height`,0)}};const Hu={};var Uu=class extends Ou{constructor(e){super(e)}getDefaultShape(){return new Vu}buildPath(e,t){let n,r,i,a;if(this.subPixelOptimize){let e=zu(Hu,t,this.style);n=e.x,r=e.y,i=e.width,a=e.height,e.r=t.r,t=e}else n=t.x,r=t.y,i=t.width,a=t.height;t.r?Iu(e,t):e.rect(n,r,i,a)}isZeroArea(){return!this.shape.width||!this.shape.height}};Uu.prototype.type=`rect`;const Wu={fill:`#000`},Gu={},Ku={style:M({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},gl.style)};var qu=class extends yl{constructor(e){super(),a(this,`type`,`text`),a(this,`_children`,[]),a(this,`_defaultStyle`,Wu),this.attr(e)}childrenRef(){return this._children}update(){super.update(),this.styleChanged()&&this._updateSubTexts();for(let e=0;e<this._children.length;e++){let t=this._children[e];t.zlevel=this.zlevel,t.z=this.z,t.z2=this.z2,t.culling=this.culling,t.cursor=this.cursor,t.invisible=this.invisible}}updateTransform(){let e=this.innerTransformable;e?(e.updateTransform(),e.transform&&(this.transform=e.transform)):super.updateTransform()}getLocalTransform(e){let t=this.innerTransformable;return t?t.getLocalTransform(e):super.getLocalTransform(e)}getComputedTransform(){return this.__hostTarget&&(this.__hostTarget.getComputedTransform(),this.__hostTarget.updateInnerText(!0)),super.getComputedTransform()}_updateSubTexts(){this._childCursor=0,ed(this.style),this.style.rich?this._updateRichTexts():this._updatePlainTexts(),this._children.length=this._childCursor,this.styleUpdated()}addSelfToZr(e){super.addSelfToZr(e);for(let t=0;t<this._children.length;t++)this._children[t].__zr=e}removeSelfFromZr(e){super.removeSelfFromZr(e);for(let e=0;e<this._children.length;e++)this._children[e].__zr=null}getBoundingRect(){if(this.styleChanged()&&this._updateSubTexts(),!this._rect){let e=new K(0,0,0,0),t=this._children,n=[],r=null;for(let i=0;i<t.length;i++){let a=t[i],o=a.getBoundingRect(),s=a.getLocalTransform(n);s?(e.copy(o),e.applyTransform(s),r=r||e.clone(),r.union(e)):(r=r||o.clone(),r.union(o))}this._rect=r||e}return this._rect}setDefaultTextStyle(e){this._defaultStyle=e||Wu}setTextContent(e){}_mergeStyle(e,t){if(!t)return e;let n=t.rich,r=e.rich||n&&{};return j(e,t),n&&r?(this._mergeRich(r,n),e.rich=r):r&&(e.rich=r),e}_mergeRich(e,t){let n=ue(t);for(let r=0;r<n.length;r++){let i=n[r];e[i]=e[i]||{},j(e[i],t[i])}}getAnimationStyleProps(){return Ku}_getOrCreateChild(e){let t=this._children[this._childCursor];return(!t||!(t instanceof e))&&(t=new e),this._children[this._childCursor++]=t,t.__zr=this.__zr,t.parent=this,t}_updatePlainTexts(){let e=this.style,t=e.font||l,n=e.padding,r=this._defaultStyle,i=e.x||0,a=e.y||0,o=e.align||r.align||`left`,s=e.verticalAlign||r.verticalAlign||`top`;ol(Gu,r.overflowRect,i,a,o,s),i=Gu.baseX,a=Gu.baseY;let c=Xc(ad(e),e,Gu.outerWidth,Gu.outerHeight),u=od(e),d=!!e.backgroundColor,f=c.outerHeight,p=c.outerWidth,m=c.lines,h=c.lineHeight;this.isTruncated=!!c.isTruncated;let g=i,_=Pa(a,c.contentHeight,s);if(u||n){let t=Na(i,p,o),n=Pa(a,f,s);u&&this._renderBackground(e,e,t,n,p,f)}_+=h/2,n&&(g=id(i,o,n),s===`top`?_+=n[0]:s===`bottom`&&(_-=n[2]));let v=0,y=!1,b=!1,x=rd(`fill`in e?e.fill:(b=!0,r.fill)),S=nd(`stroke`in e?e.stroke:!d&&(!r.autoStroke||b)?(v=2,y=!0,r.stroke):null),C=e.textShadowBlur>0;for(let n=0;n<m.length;n++){let r=this._getOrCreateChild(ju),i=r.createStyle();r.useStyle(i),i.text=m[n],i.x=g,i.y=_,o&&(i.textAlign=o),i.textBaseline=`middle`,i.opacity=e.opacity,i.strokeFirst=!0,C&&(i.shadowBlur=e.textShadowBlur||0,i.shadowColor=e.textShadowColor||`transparent`,i.shadowOffsetX=e.textShadowOffsetX||0,i.shadowOffsetY=e.textShadowOffsetY||0),i.stroke=S,i.fill=x,S&&(i.lineWidth=e.lineWidth||v,i.lineDash=e.lineDash,i.lineDashOffset=e.lineDashOffset||0),i.font=t,Qu(i,e),_+=h,r.setBoundingRect(dl(i,c.contentWidth,c.calculatedLineHeight,y?0:null))}}_updateRichTexts(){let e=this.style,t=this._defaultStyle,n=e.align||t.align,r=e.verticalAlign||t.verticalAlign,i=e.x||0,a=e.y||0;ol(Gu,t.overflowRect,i,a,n,r),i=Gu.baseX,a=Gu.baseY;let o=el(ad(e),e,Gu.outerWidth,Gu.outerHeight,n),s=o.width,c=o.outerWidth,l=o.outerHeight,u=e.padding;this.isTruncated=!!o.isTruncated;let d=Na(i,c,n),f=Pa(a,l,r),p=d,m=f;u&&(p+=u[3],m+=u[0]);let h=p+s;od(e)&&this._renderBackground(e,e,d,f,c,l);let g=!!e.backgroundColor;for(let t=0;t<o.lines.length;t++){let n=o.lines[t],r=n.tokens,i=r.length,a=n.lineHeight,c=n.width,l=0,u=p,d=h,f=i-1,_;for(;l<i&&(_=r[l],!_.align||_.align===`left`);)this._placeToken(_,e,a,m,u,`left`,g),c-=_.width,u+=_.width,l++;for(;f>=0&&(_=r[f],_.align===`right`);)this._placeToken(_,e,a,m,d,`right`,g),c-=_.width,d-=_.width,f--;for(u+=(s-(u-p)-(h-d)-c)/2;l<=f;)_=r[l],this._placeToken(_,e,a,m,u+_.width/2,`center`,g),u+=_.width,l++;m+=a}}_placeToken(e,t,n,r,i,a,o){let s=t.rich[e.styleName]||{};s.text=e.text;let c=e.verticalAlign,u=r+n/2;c===`top`?u=r+e.height/2:c===`bottom`&&(u=r+n-e.height/2),!e.isLineHolder&&od(s)&&this._renderBackground(s,t,a===`right`?i-e.width:a===`center`?i-e.width/2:i,u-e.height/2,e.width,e.height);let d=!!s.backgroundColor,f=e.textPadding;f&&(i=id(i,a,f),u-=e.height/2-f[0]-e.innerHeight/2);let p=this._getOrCreateChild(ju),m=p.createStyle();p.useStyle(m);let h=this._defaultStyle,g=!1,_=0,v=!1,y=rd(`fill`in s?s.fill:`fill`in t?t.fill:(g=!0,h.fill)),b=nd(`stroke`in s?s.stroke:`stroke`in t?t.stroke:!d&&!o&&(!h.autoStroke||g)?(_=2,v=!0,h.stroke):null),x=s.textShadowBlur>0||t.textShadowBlur>0;m.text=e.text,m.x=i,m.y=u,x&&(m.shadowBlur=s.textShadowBlur||t.textShadowBlur||0,m.shadowColor=s.textShadowColor||t.textShadowColor||`transparent`,m.shadowOffsetX=s.textShadowOffsetX||t.textShadowOffsetX||0,m.shadowOffsetY=s.textShadowOffsetY||t.textShadowOffsetY||0),m.textAlign=a,m.textBaseline=`middle`,m.font=e.font||l,m.opacity=Ce(s.opacity,t.opacity,1),Qu(m,s),b&&(m.lineWidth=Ce(s.lineWidth,t.lineWidth,_),m.lineDash=V(s.lineDash,t.lineDash),m.lineDashOffset=t.lineDashOffset||0,m.stroke=b),y&&(m.fill=y),p.setBoundingRect(dl(m,e.contentWidth,e.contentHeight,v?0:null))}_renderBackground(e,t,n,r,i,a){let 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(Uu),p.useStyle(p.createStyle()),p.style.fill=null;let e=p.shape;e.x=n,e.y=r,e.width=i,e.height=a,e.r=d,p.dirtyShape()}if(u){let t=p.style;t.fill=o||null,t.fillOpacity=V(e.fillOpacity,1)}else if(l){m=this._getOrCreateChild(Fu),m.onload=function(){f.dirtyStyle()};let e=m.style;e.image=o.image,e.x=n,e.y=r,e.width=i,e.height=a}if(s&&c){let t=p.style;t.lineWidth=s,t.stroke=c,t.strokeOpacity=V(e.strokeOpacity,1),t.lineDash=e.borderDash,t.lineDashOffset=e.borderDashOffset||0,p.strokeContainThreshold=0,p.hasFill()&&p.hasStroke()&&(t.strokeFirst=!0,t.lineWidth*=2)}let h=(p||m).style;h.shadowBlur=e.shadowBlur||0,h.shadowColor=e.shadowColor||`transparent`,h.shadowOffsetX=e.shadowOffsetX||0,h.shadowOffsetY=e.shadowOffsetY||0,h.opacity=Ce(e.opacity,t.opacity,1)}static makeFont(e){let t=``;return $u(e)&&(t=[e.fontStyle,e.fontWeight,Zu(e.fontSize),e.fontFamily||`sans-serif`].join(` `)),t&&Ee(t)||e.textFont||e.font}};const Ju={left:!0,right:1,center:1},Yu={top:1,bottom:1,middle:1},Xu=[`fontStyle`,`fontWeight`,`fontSize`,`fontFamily`];function Zu(e){return typeof e==`string`&&(e.indexOf(`px`)!==-1||e.indexOf(`rem`)!==-1||e.indexOf(`em`)!==-1)?e:isNaN(+e)?`12px`:e+`px`}function Qu(e,t){for(let n=0;n<Xu.length;n++){let r=Xu[n],i=t[r];i!=null&&(e[r]=i)}}function $u(e){return e.fontSize!=null||e.fontFamily||e.fontWeight}function ed(e){return td(e),P(e.rich,td),e}function td(e){if(e){e.font=qu.makeFont(e);let t=e.align;t===`middle`&&(t=`center`),e.align=t==null||Ju[t]?t:`left`;let n=e.verticalAlign;n===`center`&&(n=`middle`),e.verticalAlign=n==null||Yu[n]?n:`top`,e.padding&&(e.padding=Te(e.padding))}}function nd(e,t){return e==null||t<=0||e===`transparent`||e===`none`?null:e.image||e.colorStops?`#000`:e}function rd(e){return e==null||e===`none`?null:e.image||e.colorStops?`#000`:e}function id(e,t,n){return t===`right`?e-n[1]:t===`center`?e+n[3]/2-n[1]/2:e+n[3]}function ad(e){let t=e.text;return t!=null&&(t+=``),t}function od(e){return!!(e.backgroundColor||e.lineHeight||e.borderWidth&&e.borderColor)}const X=Y(),sd=(e,t,n,r)=>{if(r){let i=X(r);i.dataIndex=n,i.dataType=t,i.seriesIndex=e,i.ssrType=`chart`,r.type===`group`&&r.traverse(function(r){let i=X(r);i.seriesIndex=e,i.dataIndex=n,i.dataType=t,i.ssrType=`chart`})}},cd=`series`,ld=U([`tooltip`,`label`,`itemName`,`itemId`,`itemGroupId`,`itemChildGroupId`,`seriesName`]),ud=`original`,dd=`arrayRows`,fd=`objectRows`,pd=`keyedColumns`,md=`typedArray`,hd=`column`,gd=`Roam`,_d=[`getDom`,`getZr`,`getWidth`,`getHeight`,`getDevicePixelRatio`,`dispatchAction`,`isSSR`,`isDisposed`,`on`,`off`,`getDataURL`,`getConnectedDataURL`,`getOption`,`getId`,`updateLabelLayout`];var vd=class{constructor(e){P(_d,function(t){this[t]=I(e[t],e)},this)}};function yd(e,t){return t.mainType===`series`?e.getViewOfSeriesModel(t):e.getViewOfComponentModel(t)}let bd=1;const xd={},Sd=Y(),Cd=Y(),wd=[`emphasis`,`blur`,`select`],Td=[`normal`,`emphasis`,`blur`,`select`],Ed=`highlight`,Dd=`downplay`,Od=`select`,kd=`unselect`,Ad=`toggleSelect`,jd=`selectchanged`;function Md(e){return e!=null&&e!==`none`}function Nd(e,t,n){e.onHoverStateChange&&(e.hoverState||0)!==n&&e.onHoverStateChange(t),e.hoverState=n}function Pd(e){Nd(e,`emphasis`,2)}function Fd(e){e.hoverState===2&&Nd(e,`normal`,0)}function Id(e){Nd(e,`blur`,1)}function Ld(e){e.hoverState===1&&Nd(e,`normal`,0)}function Rd(e){e.selected=!0}function zd(e){e.selected=!1}function Bd(e,t,n){t(e,n)}function Vd(e,t,n){Bd(e,t,n),e.isGroup&&e.traverse(function(e){Bd(e,t,n)})}function Hd(e,t){switch(t){case`emphasis`:e.hoverState=2;break;case`normal`:e.hoverState=0;break;case`blur`:e.hoverState=1;break;case`select`:e.selected=!0}}function Ud(e,t,n,r){let i=e.style,a={};for(let e=0;e<t.length;e++){let n=t[e],o=i[n];a[n]=o==null?r&&r[n]:o}for(let r=0;r<e.animators.length;r++){let i=e.animators[r];i.__fromStateTransition&&i.__fromStateTransition.indexOf(n)<0&&i.targetName===`style`&&i.saveTo(a,t)}return a}function Wd(e,t,n,r){let i=n&&N(n,`select`)>=0,a=!1;if(e instanceof Ou){let t=Sd(e),n=i&&t.selectFill||t.normalFill,o=i&&t.selectStroke||t.normalStroke;if(Md(n)||Md(o)){r=r||{};let e=r.style||{};e.fill===`inherit`?(a=!0,r=j({},r),e=j({},e),e.fill=n):!Md(e.fill)&&Md(n)?(a=!0,r=j({},r),e=j({},e),e.fill=ii(n)):!Md(e.stroke)&&Md(o)&&(a||(r=j({},r),e=j({},e)),e.stroke=ii(o)),r.style=e}}if(r&&r.z2==null){a||(r=j({},r));let t=e.z2EmphasisLift;r.z2=e.z2+(t==null?10:t)}return r}function Gd(e,t,n){if(n&&n.z2==null){n=j({},n);let t=e.z2SelectLift;n.z2=e.z2+(t==null?9:t)}return n}function Kd(e,t,n){let r=N(e.currentStates,t)>=0,i=e.style.opacity,a=r?null:Ud(e,[`opacity`],t,{opacity:1});n=n||{};let o=n.style||{};return o.opacity==null&&(n=j({},n),o=j({opacity:r?i:a.opacity*.1},o),n.style=o),n}function qd(e,t){let n=this.states[e];if(this.style){if(e===`emphasis`)return Wd(this,e,t,n);if(e===`blur`)return Kd(this,e,n);if(e===`select`)return Gd(this,e,n)}return n}function Jd(e){e.stateProxy=qd;let t=e.getTextContent(),n=e.getTextGuideLine();t&&(t.stateProxy=qd),n&&(n.stateProxy=qd)}function Yd(e,t){!rf(e,t)&&!e.__highByOuter&&Vd(e,Pd)}function Xd(e,t){!rf(e,t)&&!e.__highByOuter&&Vd(e,Fd)}function Zd(e,t){e.__highByOuter|=1<<(t||0),Vd(e,Pd)}function Qd(e,t){!(e.__highByOuter&=~(1<<(t||0)))&&Vd(e,Fd)}function $d(e){Vd(e,Id)}function ef(e){Vd(e,Ld)}function tf(e){Vd(e,Rd)}function nf(e){Vd(e,zd)}function rf(e,t){return e.__highDownSilentOnTouch&&t.zrByTouch}function af(e){let t=e.getModel(),n=[],r=[];t.eachComponent(function(t,i){let a=Cd(i),o=yd(e,i),s=t===`series`;!s&&r.push(o),a.isBlured&&(o.group.traverse(function(e){Ld(e)}),s&&n.push(i)),a.isBlured=!1}),P(r,function(e){e&&e.toggleBlurSeries&&e.toggleBlurSeries(n,!1,t)})}function of(e,t,n,r){let i=r.getModel();n=n||`coordinateSystem`;function a(e,t){for(let n=0;n<t.length;n++){let r=e.getItemGraphicEl(t[n]);r&&ef(r)}}if(e==null||!t||t===`none`)return;let o=i.getSeriesByIndex(e),s=o.coordinateSystem;s&&s.master&&(s=s.master);let c=[];i.eachSeries(function(e){let i=o===e,l=e.coordinateSystem;if(l&&l.master&&(l=l.master),!(n===`series`&&!i||n===`coordinateSystem`&&!(l&&s?l===s:i)||t===`series`&&i)){if(r.getViewOfSeriesModel(e).group.traverse(function(e){e.__highByOuter&&i&&t===`self`||Id(e)}),oe(t))a(e.getData(),t);else if(B(t)){let n=ue(t);for(let r=0;r<n.length;r++)a(e.getData(n[r]),t[n[r]])}c.push(e),Cd(e).isBlured=!0}}),i.eachComponent(function(e,t){if(e===`series`)return;let n=r.getViewOfComponentModel(t);n&&n.toggleBlurSeries&&n.toggleBlurSeries(c,!0,i)})}function sf(e,t,n){if(e==null||t==null)return;let r=n.getModel().getComponent(e,t);if(!r)return;Cd(r).isBlured=!0;let i=n.getViewOfComponentModel(r);i&&i.focusBlurEnabled&&i.group.traverse(function(e){Id(e)})}function cf(e,t,n){let r=e.seriesIndex,i=e.getData(t.dataType);if(!i){typeof process<`u`&&process.env.NODE_ENV!==`production`&&fs(`Unknown dataType ${t.dataType}`);return}let a=Us(i,t);a=(L(a)?a[0]:a)||0;let o=i.getItemGraphicEl(a);if(!o){let e=i.count(),t=0;for(;!o&&t<e;)o=i.getItemGraphicEl(t++)}if(o){let e=X(o);of(r,e.focus,e.blurScope,n)}else{let t=e.get([`emphasis`,`focus`]),i=e.get([`emphasis`,`blurScope`]);t!=null&&of(r,t,i,n)}}function lf(e,t,n,r){let i={focusSelf:!1,dispatchers:null};if(e==null||e===`series`||t==null||n==null)return i;let a=r.getModel().getComponent(e,t);if(!a)return i;let o=r.getViewOfComponentModel(a);if(!o||!o.findHighDownDispatchers)return i;let s=o.findHighDownDispatchers(n),c;for(let e=0;e<s.length;e++)if(typeof process<`u`&&process.env.NODE_ENV!==`production`&&!Cf(s[e])&&fs(`param should be highDownDispatcher`),X(s[e]).focus===`self`){c=!0;break}return{focusSelf:c,dispatchers:s}}function uf(e,t,n){typeof process<`u`&&process.env.NODE_ENV!==`production`&&!Cf(e)&&fs(`param should be highDownDispatcher`);let r=X(e),{dispatchers:i,focusSelf:a}=lf(r.componentMainType,r.componentIndex,r.componentHighDownName,n);i?(a&&sf(r.componentMainType,r.componentIndex,n),P(i,e=>Yd(e,t))):(of(r.seriesIndex,r.focus,r.blurScope,n),r.focus===`self`&&sf(r.componentMainType,r.componentIndex,n),Yd(e,t))}function df(e,t,n){typeof process<`u`&&process.env.NODE_ENV!==`production`&&!Cf(e)&&fs(`param should be highDownDispatcher`),af(n);let r=X(e),{dispatchers:i}=lf(r.componentMainType,r.componentIndex,r.componentHighDownName,n);i?P(i,e=>Xd(e,t)):Xd(e,t)}function ff(e,t,n){if(!Ef(t))return;let r=t.dataType,i=Us(e.getData(r),t);L(i)||(i=[i]),e[t.type===`toggleSelect`?`toggleSelect`:t.type===`select`?`select`:`unselect`](i,r)}function pf(e){P(e.getAllData(),function({data:t,type:n}){t.eachItemGraphicEl(function(t,r){e.isSelected(r,n)?tf(t):nf(t)})})}function mf(e){let t=[];return e.eachSeries(function(e){P(e.getAllData(),function({data:n,type:r}){let i=e.getSelectedDataIndices();if(i.length>0){let n={dataIndex:i,seriesIndex:e.seriesIndex};r!=null&&(n.dataType=r),t.push(n)}})}),t}function hf(e,t,n){Sf(e,!0),Vd(e,Jd),vf(e,t,n)}function gf(e){Sf(e,!1)}function _f(e,t,n,r){r?gf(e):hf(e,t,n)}function vf(e,t,n){let r=X(e);t==null?r.focus&&(r.focus=null):(r.focus=t,r.blurScope=n)}const yf=[`emphasis`,`blur`,`select`],bf={itemStyle:`getItemStyle`,lineStyle:`getLineStyle`,areaStyle:`getAreaStyle`};function xf(e,t,n,r){n=n||`itemStyle`;for(let i=0;i<yf.length;i++){let a=yf[i],o=t.getModel([a,n]),s=e.ensureState(a);s.style=r?r(o):o[bf[n]]()}}function Sf(e,t){let n=t===!1,r=e;e.highDownSilentOnTouch&&(r.__highDownSilentOnTouch=e.highDownSilentOnTouch),(!n||r.__highDownDispatcher)&&(r.__highByOuter=r.__highByOuter||0,r.__highDownDispatcher=!n)}function Cf(e){return!!(e&&e.__highDownDispatcher)}function wf(e,t,n){let r=X(e);r.componentMainType=t.mainType,r.componentIndex=t.componentIndex,r.componentHighDownName=n}function Tf(e){let t=xd[e];return t==null&&bd<=32&&(t=xd[e]=bd++),t}function Ef(e){let t=e.type;return t===`select`||t===`unselect`||t===`toggleSelect`}function Df(e){let t=e.type;return t===`highlight`||t===`downplay`}function Of(e){let t=Sd(e);t.normalFill=e.style.fill,t.normalStroke=e.style.stroke;let n=e.states.select||{};t.selectFill=n.style&&n.style.fill||null,t.selectStroke=n.style&&n.style.stroke||null}const kf=ru.CMD,Af=[[],[],[]],jf=Math.sqrt,Mf=Math.atan2;function Nf(e,t){if(!t)return;let n=e.data,r=e.len(),i,a,o,s,c,l,u=kf.M,d=kf.C,f=kf.L,p=kf.R,m=kf.A,h=kf.Q;for(o=0,s=0;o<r;){switch(i=n[o++],s=o,a=0,i){case u:a=1;break;case f:a=1;break;case d:a=3;break;case h:a=2;break;case m:let e=t[4],r=t[5],i=jf(t[0]*t[0]+t[1]*t[1]),c=jf(t[2]*t[2]+t[3]*t[3]),g=Mf(-t[1]/c,t[0]/i);n[o]*=i,n[o++]+=e,n[o]*=c,n[o++]+=r,n[o++]*=i,n[o++]*=c,n[o++]+=g,n[o++]+=g,o+=2,s=o;break;case p:l[0]=n[o++],l[1]=n[o++],lt(l,l,t),n[s++]=l[0],n[s++]=l[1],l[0]+=n[o++],l[1]+=n[o++],lt(l,l,t),n[s++]=l[0],n[s++]=l[1]}for(c=0;c<a;c++){let e=Af[c];e[0]=n[o++],e[1]=n[o++],lt(e,e,t),n[s++]=e[0],n[s++]=e[1]}}e.increaseVersion()}const Pf=Math.sqrt,Ff=Math.sin,If=Math.cos,Lf=Math.PI;function Rf(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function zf(e,t){return(e[0]*t[0]+e[1]*t[1])/(Rf(e)*Rf(t))}function Bf(e,t){return(e[0]*t[1]<e[1]*t[0]?-1:1)*Math.acos(zf(e,t))}function Vf(e,t,n,r,i,a,o,s,c,l,u){let d=Lf/180*c,f=If(d)*(e-n)/2+Ff(d)*(t-r)/2,p=-1*Ff(d)*(e-n)/2+If(d)*(t-r)/2,m=f*f/(o*o)+p*p/(s*s);m>1&&(o*=Pf(m),s*=Pf(m));let h=(i===a?-1:1)*Pf((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+If(d)*g-Ff(d)*_,y=(t+r)/2+Ff(d)*g+If(d)*_,b=Bf([1,0],[(f-g)/o,(p-_)/s]),x=[(f-g)/o,(p-_)/s],S=[(-1*f-g)/o,(-1*p-_)/s],C=Bf(x,S);if(zf(x,S)<=-1&&(C=Lf),zf(x,S)>=1&&(C=0),C<0){let e=Math.round(C/Lf*1e6)/1e6;C=Lf*2+e%2*Lf}u.addData(l,v,y,o,s,b,C,d,a)}const Hf=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,Uf=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function Wf(e){let t=new ru;if(!e)return t;let n=0,r=0,i=n,a=r,o,s=ru.CMD,c=e.match(Hf);if(!c)return t;for(let e=0;e<c.length;e++){let l=c[e],u=l.charAt(0),d,f=l.match(Uf)||[],p=f.length;for(let e=0;e<p;e++)f[e]=parseFloat(f[e]);let m=0;for(;m<p;){let e,c,l,p,h,g,_,v=n,y=r,b,x;switch(u){case`l`:n+=f[m++],r+=f[m++],d=s.L,t.addData(d,n,r);break;case`L`:n=f[m++],r=f[m++],d=s.L,t.addData(d,n,r);break;case`m`:n+=f[m++],r+=f[m++],d=s.M,t.addData(d,n,r),i=n,a=r,u=`l`;break;case`M`:n=f[m++],r=f[m++],d=s.M,t.addData(d,n,r),i=n,a=r,u=`L`;break;case`h`:n+=f[m++],d=s.L,t.addData(d,n,r);break;case`H`:n=f[m++],d=s.L,t.addData(d,n,r);break;case`v`:r+=f[m++],d=s.L,t.addData(d,n,r);break;case`V`:r=f[m++],d=s.L,t.addData(d,n,r);break;case`C`:d=s.C,t.addData(d,f[m++],f[m++],f[m++],f[m++],f[m++],f[m++]),n=f[m-2],r=f[m-1];break;case`c`:d=s.C,t.addData(d,f[m++]+n,f[m++]+r,f[m++]+n,f[m++]+r,f[m++]+n,f[m++]+r),n+=f[m-2],r+=f[m-1];break;case`S`:e=n,c=r,b=t.len(),x=t.data,o===s.C&&(e+=n-x[b-4],c+=r-x[b-3]),d=s.C,v=f[m++],y=f[m++],n=f[m++],r=f[m++],t.addData(d,e,c,v,y,n,r);break;case`s`:e=n,c=r,b=t.len(),x=t.data,o===s.C&&(e+=n-x[b-4],c+=r-x[b-3]),d=s.C,v=n+f[m++],y=r+f[m++],n+=f[m++],r+=f[m++],t.addData(d,e,c,v,y,n,r);break;case`Q`:v=f[m++],y=f[m++],n=f[m++],r=f[m++],d=s.Q,t.addData(d,v,y,n,r);break;case`q`:v=f[m++]+n,y=f[m++]+r,n+=f[m++],r+=f[m++],d=s.Q,t.addData(d,v,y,n,r);break;case`T`:e=n,c=r,b=t.len(),x=t.data,o===s.Q&&(e+=n-x[b-4],c+=r-x[b-3]),n=f[m++],r=f[m++],d=s.Q,t.addData(d,e,c,n,r);break;case`t`:e=n,c=r,b=t.len(),x=t.data,o===s.Q&&(e+=n-x[b-4],c+=r-x[b-3]),n+=f[m++],r+=f[m++],d=s.Q,t.addData(d,e,c,n,r);break;case`A`:l=f[m++],p=f[m++],h=f[m++],g=f[m++],_=f[m++],v=n,y=r,n=f[m++],r=f[m++],d=s.A,Vf(v,y,n,r,g,_,l,p,h,d,t);break;case`a`:l=f[m++],p=f[m++],h=f[m++],g=f[m++],_=f[m++],v=n,y=r,n+=f[m++],r+=f[m++],d=s.A,Vf(v,y,n,r,g,_,l,p,h,d,t)}}(u===`z`||u===`Z`)&&(d=s.Z,t.addData(d),n=i,r=a),o=d}return t.toStatic(),t}var Gf=class extends Ou{applyTransform(e){}};function Kf(e){return e.setData!=null}function qf(e,t){let n=Wf(e),r=j({},t);return r.buildPath=function(e){let t=Kf(e);if(t&&e.canSave()){e.appendPath(n);let t=e.getContext();t&&e.rebuildPath(t,1)}else{let r=t?e.getContext():e;r&&n.rebuildPath(r,1)}},r.applyTransform=function(e){Nf(n,e),this.dirtyShape()},r}function Jf(e,t){return new Gf(qf(e,t))}function Yf(e,t){let n=qf(e,t);class r extends Gf{constructor(e){super(e),this.applyTransform=n.applyTransform,this.buildPath=n.buildPath}}return r}function Xf(e,t){let n=[],r=e.length;for(let t=0;t<r;t++){let r=e[t];n.push(r.getUpdatedPathProxy(!0))}let i=new Ou(t);return i.createPathProxy(),i.buildPath=function(e){if(Kf(e)){e.appendPath(n);let t=e.getContext();t&&e.rebuildPath(t,1)}},i}function Zf(e,t){t=t||{};let n=new Ou;return e.shape&&n.setShape(e.shape),n.setStyle(e.style),t.bakeTransform?Nf(n.path,e.getComputedTransform()):t.toLocal?n.setLocalTransform(e.getComputedTransform()):n.copyTransform(e),n.buildPath=e.buildPath,n.applyTransform=n.applyTransform,n.z=e.z,n.z2=e.z2,n.zlevel=e.zlevel,n}var Qf=class{constructor(){a(this,`cx`,0),a(this,`cy`,0),a(this,`r`,0)}},$f=class extends Ou{constructor(e){super(e)}getDefaultShape(){return new Qf}buildPath(e,t){e.moveTo(t.cx+t.r,t.cy),e.arc(t.cx,t.cy,t.r,0,Math.PI*2)}};$f.prototype.type=`circle`;var ep=class{constructor(){a(this,`cx`,0),a(this,`cy`,0),a(this,`rx`,0),a(this,`ry`,0)}},tp=class extends Ou{constructor(e){super(e)}getDefaultShape(){return new ep}buildPath(e,t){let n=.5522848,r=t.cx,i=t.cy,a=t.rx,o=t.ry,s=a*n,c=o*n;e.moveTo(r-a,i),e.bezierCurveTo(r-a,i-c,r-s,i-o,r,i-o),e.bezierCurveTo(r+s,i-o,r+a,i-c,r+a,i),e.bezierCurveTo(r+a,i+c,r+s,i+o,r,i+o),e.bezierCurveTo(r-s,i+o,r-a,i+c,r-a,i),e.closePath()}};tp.prototype.type=`ellipse`;const np=Math.PI,rp=np*2,ip=Math.sin,ap=Math.cos,op=Math.acos,sp=Math.atan2,cp=Math.abs,lp=Math.sqrt,up=Math.max,dp=Math.min,fp=1e-4;function pp(e,t,n,r,i,a,o,s){let c=n-e,l=r-t,u=o-i,d=s-a,f=d*c-u*l;if(!(f*f<fp))return f=(u*(t-a)-d*(e-i))/f,[e+f*c,t+f*l]}function mp(e,t,n,r,i,a,o){let s=e-n,c=t-r,l=(o?a:-a)/lp(s*s+c*c),u=l*c,d=-l*s,f=e+u,p=t+d,m=n+u,h=r+d,g=(f+m)/2,_=(p+h)/2,v=m-f,y=h-p,b=v*v+y*y,x=i-a,S=f*h-m*p,C=(y<0?-1:1)*lp(up(0,x*x*b-S*S)),w=(S*y-v*C)/b,T=(-S*v-y*C)/b,E=(S*y+v*C)/b,D=(-S*v+y*C)/b,O=w-g,ee=T-_,k=E-g,A=D-_;return O*O+ee*ee>k*k+A*A&&(w=E,T=D),{cx:w,cy:T,x0:-u,y0:-d,x1:w*(i/x-1),y1:T*(i/x-1)}}function hp(e){let t;if(L(e)){let 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 gp(e,t){let n=up(t.r,0),r=up(t.r0||0,0),i=n>0;if(!i&&!(r>0))return;if(i||(n=r,r=0),r>n){let e=n;n=r,r=e}let{startAngle:a,endAngle:o}=t;if(isNaN(a)||isNaN(o))return;let{cx:s,cy:c}=t,l=!!t.clockwise,u=cp(o-a),d=u>rp&&u%rp;if(d>fp&&(u=d),!(n>fp))e.moveTo(s,c);else if(u>rp-fp)e.moveTo(s+n*ap(a),c+n*ip(a)),e.arc(s,c,n,a,o,!l),r>fp&&(e.moveTo(s+r*ap(o),c+r*ip(o)),e.arc(s,c,r,o,a,l));else{let i,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E=n*ap(a),D=n*ip(a),O=r*ap(o),ee=r*ip(o),k=u>fp;if(k){let e=t.cornerRadius;e&&([i,d,f,p]=hp(e));let s=cp(n-r)/2;if(m=dp(s,f),h=dp(s,p),g=dp(s,i),_=dp(s,d),b=v=up(m,h),x=y=up(g,_),(v>fp||y>fp)&&(S=n*ap(o),C=n*ip(o),w=r*ap(a),T=r*ip(a),u<np)){let e=pp(E,D,w,T,S,C,O,ee);if(e){let t=E-e[0],i=D-e[1],a=S-e[0],o=C-e[1],s=1/ip(op((t*a+i*o)/(lp(t*t+i*i)*lp(a*a+o*o)))/2),c=lp(e[0]*e[0]+e[1]*e[1]);b=dp(v,(n-c)/(s+1)),x=dp(y,(r-c)/(s-1))}}}if(!k)e.moveTo(s+E,c+D);else if(b>fp){let t=dp(f,b),r=dp(p,b),i=mp(w,T,E,D,n,t,l),a=mp(S,C,O,ee,n,r,l);e.moveTo(s+i.cx+i.x0,c+i.cy+i.y0),b<v&&t===r?e.arc(s+i.cx,c+i.cy,b,sp(i.y0,i.x0),sp(a.y0,a.x0),!l):(t>0&&e.arc(s+i.cx,c+i.cy,t,sp(i.y0,i.x0),sp(i.y1,i.x1),!l),e.arc(s,c,n,sp(i.cy+i.y1,i.cx+i.x1),sp(a.cy+a.y1,a.cx+a.x1),!l),r>0&&e.arc(s+a.cx,c+a.cy,r,sp(a.y1,a.x1),sp(a.y0,a.x0),!l))}else e.moveTo(s+E,c+D),e.arc(s,c,n,a,o,!l);if(!(r>fp)||!k)e.lineTo(s+O,c+ee);else if(x>fp){let t=dp(i,x),n=dp(d,x),a=mp(O,ee,S,C,r,-n,l),o=mp(E,D,w,T,r,-t,l);e.lineTo(s+a.cx+a.x0,c+a.cy+a.y0),x<y&&t===n?e.arc(s+a.cx,c+a.cy,x,sp(a.y0,a.x0),sp(o.y0,o.x0),!l):(n>0&&e.arc(s+a.cx,c+a.cy,n,sp(a.y0,a.x0),sp(a.y1,a.x1),!l),e.arc(s,c,r,sp(a.cy+a.y1,a.cx+a.x1),sp(o.cy+o.y1,o.cx+o.x1),l),t>0&&e.arc(s+o.cx,c+o.cy,t,sp(o.y1,o.x1),sp(o.y0,o.x0),!l))}else e.lineTo(s+O,c+ee),e.arc(s,c,r,o,a,l)}e.closePath()}var _p=class{constructor(){a(this,`cx`,0),a(this,`cy`,0),a(this,`r0`,0),a(this,`r`,0),a(this,`startAngle`,0),a(this,`endAngle`,Math.PI*2),a(this,`clockwise`,!0),a(this,`cornerRadius`,0)}},vp=class extends Ou{constructor(e){super(e)}getDefaultShape(){return new _p}buildPath(e,t){gp(e,t)}isZeroArea(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0}};vp.prototype.type=`sector`;var yp=class{constructor(){a(this,`cx`,0),a(this,`cy`,0),a(this,`r`,0),a(this,`r0`,0)}},bp=class extends Ou{constructor(e){super(e)}getDefaultShape(){return new yp}buildPath(e,t){let 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)}};bp.prototype.type=`ring`;function xp(e,t,n,r){let i=[],a=[],o=[],s=[],c,l,u,d;if(r){u=[1/0,1/0],d=[-1/0,-1/0];for(let t=0,n=e.length;t<n;t++)ut(u,u,e[t]),dt(d,d,e[t]);ut(u,u,r[0]),dt(d,d,r[1])}for(let f=0,p=e.length;f<p;f++){let m=e[f];if(n)c=e[f?f-1:p-1],l=e[(f+1)%p];else if(f===0||f===p-1){i.push(Ue(e[f]));continue}else c=e[f-1],l=e[f+1];qe(a,l,c),tt(a,a,t);let h=rt(m,c),g=rt(m,l),_=h+g;_!==0&&(h/=_,g/=_),tt(o,a,-h),tt(s,a,g);let v=Ge([],m,o),y=Ge([],m,s);r&&(dt(v,v,u),ut(v,v,d),dt(y,y,u),ut(y,y,d)),i.push(v),i.push(y)}return n&&i.push(i.shift()),i}function Sp(e,t,n){let r=t.smooth,i=t.points;if(i&&i.length>=2){if(r){let a=xp(i,r,n,t.smoothConstraint);e.moveTo(i[0][0],i[0][1]);let o=i.length;for(let t=0;t<(n?o:o-1);t++){let n=a[t*2],r=a[t*2+1],s=i[(t+1)%o];e.bezierCurveTo(n[0],n[1],r[0],r[1],s[0],s[1])}}else{e.moveTo(i[0][0],i[0][1]);for(let t=1,n=i.length;t<n;t++)e.lineTo(i[t][0],i[t][1])}n&&e.closePath()}}var Cp=class{constructor(){a(this,`points`,null),a(this,`smooth`,0),a(this,`smoothConstraint`,null)}},wp=class extends Ou{constructor(e){super(e)}getDefaultShape(){return new Cp}buildPath(e,t){Sp(e,t,!0)}};wp.prototype.type=`polygon`;var Tp=class{constructor(){a(this,`points`,null),a(this,`percent`,1),a(this,`smooth`,0),a(this,`smoothConstraint`,null)}},Ep=class extends Ou{constructor(e){super(e)}getDefaultStyle(){return{stroke:`#000`,fill:null}}getDefaultShape(){return new Tp}buildPath(e,t){Sp(e,t,!1)}};Ep.prototype.type=`polyline`;const Dp={};var Op=class{constructor(){a(this,`x1`,0),a(this,`y1`,0),a(this,`x2`,0),a(this,`y2`,0),a(this,`percent`,1)}},kp=class extends Ou{constructor(e){super(e)}getDefaultStyle(){return{stroke:`#000`,fill:null}}getDefaultShape(){return new Op}buildPath(e,t){let n,r,i,a;if(this.subPixelOptimize){let e=Ru(Dp,t,this.style);n=e.x1,r=e.y1,i=e.x2,a=e.y2}else n=t.x1,r=t.y1,i=t.x2,a=t.y2;let o=t.percent;o!==0&&(e.moveTo(n,r),o<1&&(i=n*(1-o)+i*o,a=r*(1-o)+a*o),e.lineTo(i,a))}pointAt(e){let t=this.shape;return[t.x1*(1-e)+t.x2*e,t.y1*(1-e)+t.y2*e]}};kp.prototype.type=`line`;const Ap=[];var jp=class{constructor(){a(this,`x1`,0),a(this,`y1`,0),a(this,`x2`,0),a(this,`y2`,0),a(this,`cpx1`,0),a(this,`cpy1`,0),a(this,`percent`,1)}};function Mp(e,t,n){let r=e.cpx2,i=e.cpy2;return r!=null||i!=null?[(n?ur:lr)(e.x1,e.cpx1,e.cpx2,e.x2,t),(n?ur:lr)(e.y1,e.cpy1,e.cpy2,e.y2,t)]:[(n?_r:gr)(e.x1,e.cpx1,e.x2,t),(n?_r:gr)(e.y1,e.cpy1,e.y2,t)]}var Np=class extends Ou{constructor(e){super(e)}getDefaultStyle(){return{stroke:`#000`,fill:null}}getDefaultShape(){return new jp}buildPath(e,t){let n=t.x1,r=t.y1,i=t.x2,a=t.y2,o=t.cpx1,s=t.cpy1,c=t.cpx2,l=t.cpy2,u=t.percent;u!==0&&(e.moveTo(n,r),c==null||l==null?(u<1&&(br(n,o,i,u,Ap),o=Ap[1],i=Ap[2],br(r,s,a,u,Ap),s=Ap[1],a=Ap[2]),e.quadraticCurveTo(o,s,i,a)):(u<1&&(pr(n,o,c,i,u,Ap),o=Ap[1],c=Ap[2],i=Ap[3],pr(r,s,l,a,u,Ap),s=Ap[1],l=Ap[2],a=Ap[3]),e.bezierCurveTo(o,s,c,l,i,a)))}pointAt(e){return Mp(this.shape,e,!1)}tangentAt(e){let t=Mp(this.shape,e,!0);return nt(t,t)}};Np.prototype.type=`bezier-curve`;var Pp=class{constructor(){a(this,`cx`,0),a(this,`cy`,0),a(this,`r`,0),a(this,`startAngle`,0),a(this,`endAngle`,Math.PI*2),a(this,`clockwise`,!0)}},Fp=class extends Ou{constructor(e){super(e)}getDefaultStyle(){return{stroke:`#000`,fill:null}}getDefaultShape(){return new Pp}buildPath(e,t){let n=t.cx,r=t.cy,i=Math.max(t.r,0),a=t.startAngle,o=t.endAngle,s=t.clockwise,c=Math.cos(a),l=Math.sin(a);e.moveTo(c*i+n,l*i+r),e.arc(n,r,i,a,o,!s)}};Fp.prototype.type=`arc`;var Ip=class extends Ou{constructor(...e){super(...e),a(this,`type`,`compound`)}_updatePathDirty(){let e=this.shape.paths,t=this.shapeChanged();for(let n=0;n<e.length;n++)t=t||e[n].shapeChanged();t&&this.dirtyShape()}beforeBrush(){this._updatePathDirty();let e=this.shape.paths||[],t=this.getGlobalScale();for(let n=0;n<e.length;n++)e[n].path||e[n].createPathProxy(),e[n].path.setScale(t[0],t[1],e[n].segmentIgnoreThreshold)}buildPath(e,t){let n=t.paths||[];for(let t=0;t<n.length;t++)n[t].buildPath(e,n[t].shape,!0)}afterBrush(){let e=this.shape.paths||[];for(let t=0;t<e.length;t++)e[t].pathUpdated()}getBoundingRect(){return this._updatePathDirty.call(this),Ou.prototype.getBoundingRect.call(this)}},Lp=class{constructor(e){this.colorStops=e||[]}addColorStop(e,t){this.colorStops.push({offset:e,color:t})}},Rp=class extends Lp{constructor(e,t,n,r,i,a){super(i),this.x=e==null?0:e,this.y=t==null?0:t,this.x2=n==null?1:n,this.y2=r==null?0:r,this.type=`linear`,this.global=a||!1}},zp=class extends Lp{constructor(e,t,n,r,i){super(r),this.x=e==null?.5:e,this.y=t==null?.5:t,this.r=n==null?.5:n,this.type=`radial`,this.global=i||!1}};const Bp=Math.min,Vp=Math.max,Hp=Math.abs,Up=[0,0],Wp=[0,0],Gp=Tn(),Kp=Gp.minTv,qp=Gp.maxTv;var Jp=class{constructor(e,t){a(this,`_corners`,[]),a(this,`_axes`,[]),a(this,`_origin`,[0,0]);for(let e=0;e<4;e++)this._corners[e]=new G;for(let e=0;e<2;e++)this._axes[e]=new G;e&&this.fromBoundingRect(e,t)}fromBoundingRect(e,t){let n=this._corners,r=this._axes,i=e.x,a=e.y,o=i+e.width,s=a+e.height;if(n[0].set(i,a),n[1].set(o,a),n[2].set(o,s),n[3].set(i,s),t)for(let e=0;e<4;e++)n[e].transform(t);G.sub(r[0],n[1],n[0]),G.sub(r[1],n[3],n[0]),r[0].normalize(),r[1].normalize();for(let e=0;e<2;e++)this._origin[e]=r[e].dot(n[0])}intersect(e,t,n){let r=!0,i=!t;return t&&G.set(t,0,0),Gp.reset(n,!i),!this._intersectCheckOneSide(this,e,i,1)&&(r=!1,i)||!this._intersectCheckOneSide(e,this,i,-1)&&(r=!1,i)||!i&&!Gp.negativeSize&&G.copy(t,r?Gp.useDir?Gp.dirMinTv:Kp:qp),r}_intersectCheckOneSide(e,t,n,r){let i=!0;for(let a=0;a<2;a++){let o=e._axes[a];if(e._getProjMinMaxOnAxis(a,e._corners,Up),e._getProjMinMaxOnAxis(a,t._corners,Wp),Gp.negativeSize||Up[1]<Wp[0]||Up[0]>Wp[1]){if(i=!1,Gp.negativeSize||n)return i;let e=Hp(Wp[0]-Up[1]),t=Hp(Up[0]-Wp[1]);Bp(e,t)>qp.len()&&(e<t?G.scale(qp,o,-e*r):G.scale(qp,o,t*r))}else if(!n){let e=Hp(Wp[0]-Up[1]),t=Hp(Up[0]-Wp[1]);(Gp.useDir||Bp(e,t)<Kp.len())&&((e<t||!Gp.bidirectional)&&(G.scale(Kp,o,e*r),Gp.useDir&&Gp.calcDirMTV()),(e>=t||!Gp.bidirectional)&&(G.scale(Kp,o,-t*r),Gp.useDir&&Gp.calcDirMTV()))}}return i}_getProjMinMaxOnAxis(e,t,n){let r=this._axes[e],i=this._origin,a=t[0].dot(r)+i[e],o=a,s=a;for(let n=1;n<t.length;n++){let a=t[n].dot(r)+i[e];o=Bp(a,o),s=Vp(a,s)}n[0]=o+Gp.touchThreshold,n[1]=s-Gp.touchThreshold,Gp.negativeSize=n[1]<n[0]}};const Yp=[];var Xp=class extends yl{constructor(...e){super(...e),a(this,`notClear`,!0),a(this,`incremental`,1),a(this,`_displayables`,[]),a(this,`_temporaryDisplayables`,[]),a(this,`_cursor`,0)}traverse(e,t){e.call(t,this)}useStyle(){this.style={}}_useHoverStyle(){this.__hoverStyle=null}getCursor(){return this._cursor}innerAfterBrush(){this._cursor=this._displayables.length}clearDisplaybles(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.markRedraw(),this.notClear=!1}clearTemporalDisplayables(){this._temporaryDisplayables=[]}addDisplayable(e,t){t?this._temporaryDisplayables.push(e):this._displayables.push(e),this.markRedraw()}addDisplayables(e,t){t=t||!1;for(let n=0;n<e.length;n++)this.addDisplayable(e[n],t)}getDisplayables(){return this._displayables}getTemporalDisplayables(){return this._temporaryDisplayables}eachPendingDisplayable(e){for(let t=this._cursor;t<this._displayables.length;t++)e&&e(this._displayables[t]);for(let t=0;t<this._temporaryDisplayables.length;t++)e&&e(this._temporaryDisplayables[t])}update(){this.updateTransform();for(let e=this._cursor;e<this._displayables.length;e++){let t=this._displayables[e];t.parent=this,t.update(),t.parent=null}for(let e=0;e<this._temporaryDisplayables.length;e++){let t=this._temporaryDisplayables[e];t.parent=this,t.update(),t.parent=null}}getBoundingRect(){if(!this._rect){let e=new K(1/0,1/0,-1/0,-1/0);for(let t=0;t<this._displayables.length;t++){let n=this._displayables[t],r=n.getBoundingRect().clone();n.needLocalTransform()&&r.applyTransform(n.getLocalTransform(Yp)),e.union(r)}this._rect=e}return this._rect}contain(e,t){let n=this.transformCoordToLocal(e,t);if(this.getBoundingRect().contain(n[0],n[1])){for(let n=0;n<this._displayables.length;n++)if(this._displayables[n].contain(e,t))return!0}return!1}};const Zp=Y();function Qp(e,t,n,r,i){let a;if(t&&t.ecModel){let e=t.ecModel.getUpdatePayload();a=e&&e.animation}let o=t&&t.isAnimationEnabled(),s=e===`update`;if(o){let e,o,c;return r?(e=V(r.duration,200),o=V(r.easing,`cubicOut`),c=0):(e=t.getShallow(s?`animationDurationUpdate`:`animationDuration`),o=t.getShallow(s?`animationEasingUpdate`:`animationEasing`),c=t.getShallow(s?`animationDelayUpdate`:`animationDelay`)),a&&(a.duration!=null&&(e=a.duration),a.easing!=null&&(o=a.easing),a.delay!=null&&(c=a.delay)),R(c)&&(c=c(n,i)),R(e)&&(e=e(n)),{duration:e||0,delay:c,easing:o}}return null}function $p(e,t,n,r,i,a,o){let s=!1,c;R(i)?(o=a,a=i,i=null):B(i)&&(a=i.cb,o=i.during,s=i.isFrom,c=i.removeOpt,i=i.dataIndex);let l=e===`leave`;l||t.stopAnimation(`leave`);let u=Qp(e,r,i,l?c||{}:null,r&&r.getAnimationDelayParams?r.getAnimationDelayParams(t,i):null);if(u&&u.duration>0){let r=u.duration,i=u.delay,c=u.easing,d={duration:r,delay:i||0,easing:c,done:a,force:!!a||!!o,setToFinal:!l,scope:e,during:o};s?t.animateFrom(n,d):t.animateTo(n,d)}else t.stopAnimation(),!s&&t.attr(n),o&&o(1),a&&a()}function em(e,t,n,r,i,a){$p(`update`,e,t,n,r,i,a)}function tm(e,t,n,r,i,a){$p(`enter`,e,t,n,r,i,a)}function nm(e){if(!e.__zr)return!0;for(let t=0;t<e.animators.length;t++)if(e.animators[t].scope===`leave`)return!0;return!1}function rm(e,t,n,r,i,a){nm(e)||$p(`leave`,e,t,n,r,i,a)}function im(e,t,n,r){e.removeTextContent(),e.removeTextGuideLine(),rm(e,{style:{opacity:0}},t,n,r)}function am(e,t,n){function r(){e.parent&&e.parent.remove(e)}e.isGroup?e.traverse(function(e){e.isGroup||im(e,t,n,r)}):im(e,t,n,r)}function om(e){Zp(e).oldStyle=e.style}function sm(e){return Zp(e).oldStyle}var cm=/* @__PURE__ */ t({Arc:()=>Fp,BezierCurve:()=>Np,BoundingRect:()=>K,Circle:()=>$f,CompoundPath:()=>Ip,Ellipse:()=>tp,Group:()=>q,HOVER_LAYER_FOR_INCREMENTAL:()=>2,HOVER_LAYER_FROM_THRESHOLD:()=>1,HOVER_LAYER_NO:()=>0,Image:()=>Fu,IncrementalDisplayable:()=>Xp,Line:()=>kp,LinearGradient:()=>Rp,OrientedBoundingRect:()=>Jp,Path:()=>Ou,Point:()=>G,Polygon:()=>wp,Polyline:()=>Ep,RadialGradient:()=>zp,Rect:()=>Uu,Ring:()=>bp,Sector:()=>vp,Text:()=>qu,WH:()=>um,XY:()=>Z,applyTransform:()=>Tm,calcZ2Range:()=>Jm,clipPointsByRect:()=>Am,clipRectByRect:()=>jm,createIcon:()=>Mm,decomposeTransform:()=>Qm,ensureCopyRect:()=>Gm,ensureCopyTransform:()=>Km,expandOrShrinkRect:()=>Lm,extendPath:()=>pm,extendShape:()=>dm,getCurrentCanvasPainter:()=>eh,getShapeClass:()=>hm,getTransform:()=>wm,groupTransition:()=>km,initProps:()=>tm,isBoundingRectAxisAligned:()=>Um,isElementRemoved:()=>nm,lineLineIntersect:()=>Pm,linePolygonIntersect:()=>Nm,makeImage:()=>_m,makePath:()=>gm,mergePath:()=>ym,payloadDisableAnimation:()=>Zm,registerShape:()=>mm,removeElement:()=>rm,removeElementWithFadeOut:()=>am,resizePath:()=>bm,retrieveZInfo:()=>qm,setTooltipConfig:()=>Bm,subPixelOptimize:()=>Cm,subPixelOptimizeLine:()=>xm,subPixelOptimizeRect:()=>Sm,transformDirection:()=>Em,traverseElements:()=>Hm,traverseUpdateZ:()=>Ym,updateProps:()=>em});const lm={},Z=[`x`,`y`],um=[`width`,`height`];function dm(e){return Ou.extend(e)}const fm=Yf;function pm(e,t){return fm(e,t)}function mm(e,t){lm[e]=t}function hm(e){if(lm.hasOwnProperty(e))return lm[e]}function gm(e,t,n,r){let i=Jf(e,t);return n&&(r===`center`&&(n=vm(n,i.getBoundingRect())),bm(i,n)),i}function _m(e,t,n){let r=new Fu({style:{image:e,x:t.x,y:t.y,width:t.width,height:t.height},onload(e){if(n===`center`){let n={width:e.width,height:e.height};r.setStyle(vm(t,n))}}});return r}function vm(e,t){let n=t.width/t.height,r=e.height*n,i;r<=e.width?i=e.height:(r=e.width,i=r/n);let 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}}const ym=Xf;function bm(e,t){if(!e.applyTransform)return;let n=e.getBoundingRect().calculateTransform(t);e.applyTransform(n)}function xm(e,t){return Ru(e,e,{lineWidth:t}),e}function Sm(e,t){return zu(e,e,t),e}const Cm=Bu;function wm(e,t){let n=qt([]);for(;e&&e!==t;)Yt(n,e.getLocalTransform(),n),e=e.parent;return n}function Tm(e,t,n){return t&&!oe(t)&&(t=ya.getLocalTransform(t)),n&&(t=$t([],t)),lt([],e,t)}function Em(e,t,n){let r=t[4]===0||t[5]===0||t[0]===0?1:xo(2*t[4]/t[0]),i=t[4]===0||t[5]===0||t[2]===0?1:xo(2*t[4]/t[2]),a=[e===`left`?-r:e===`right`?r:0,e===`top`?-i:e===`bottom`?i:0];return a=Tm(a,t,n),xo(a[0])>xo(a[1])?a[0]>0?`right`:`left`:a[1]>0?`bottom`:`top`}function Dm(e){return!e.isGroup}function Om(e){return e.shape!=null}function km(e,t,n){if(!e||!t)return;function r(e){let t={};return e.traverse(function(e){Dm(e)&&e.anid&&(t[e.anid]=e)}),t}function i(e){let t={x:e.x,y:e.y,rotation:e.rotation};return Om(e)&&(t.shape=k(e.shape)),t}let a=r(e);t.traverse(function(e){if(Dm(e)&&e.anid){let t=a[e.anid];if(t){let r=i(e);e.attr(i(t)),em(e,r,n,X(e).dataIndex)}}})}function Am(e,t){return F(e,function(e){let n=e[0];n=bo(n,t.x),n=yo(n,t.x+t.width);let r=e[1];return r=bo(r,t.y),r=yo(r,t.y+t.height),[n,r]})}function jm(e,t){let n=bo(e.x,t.x),r=yo(e.x+e.width,t.x+t.width),i=bo(e.y,t.y),a=yo(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 Mm(e,t,n){let r=j({rectHover:!0},t),i=r.style={strokeNoScale:!0};if(n=n||{x:-1,y:-1,width:2,height:2},e)return e.indexOf(`image://`)===0?(i.image=e.slice(8),M(i,n),new Fu(r)):gm(e.replace(`path://`,``),r,n,`center`)}function Nm(e,t,n,r,i){for(let a=0,o=i[i.length-1];a<i.length;a++){let s=i[a];if(Pm(e,t,n,r,s[0],s[1],o[0],o[1]))return!0;o=s}}function Pm(e,t,n,r,i,a,o,s){let c=n-e,l=r-t,u=o-i,d=s-a,f=Fm(u,d,c,l);if(Im(f))return!1;let p=e-i,m=t-a,h=Fm(p,m,c,l)/f;if(h<0||h>1)return!1;let g=Fm(p,m,u,d)/f;return!(g<0||g>1)}function Fm(e,t,n,r){return e*r-n*t}function Im(e){return e<=1e-6&&e>=-1e-6}function Lm(e,t,n,r,i){return t==null||(me(t)?Rm[0]=Rm[1]=Rm[2]=Rm[3]=t:(typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(t.length===4),Rm[0]=t[0],Rm[1]=t[1],Rm[2]=t[2],Rm[3]=t[3]),r&&(Rm[0]=bo(0,Rm[0]),Rm[1]=bo(0,Rm[1]),Rm[2]=bo(0,Rm[2]),Rm[3]=bo(0,Rm[3])),n&&(Rm[0]=-Rm[0],Rm[1]=-Rm[1],Rm[2]=-Rm[2],Rm[3]=-Rm[3]),zm(e,Rm,`x`,`width`,3,1,i&&i[0]||0),zm(e,Rm,`y`,`height`,0,2,i&&i[1]||0)),e}const Rm=[0,0,0,0];function zm(e,t,n,r,i,a,o){let s=t[a]+t[i],c=e[r];e[r]+=s,o=bo(0,yo(o,c)),e[r]<o?(e[r]=o,e[n]+=t[i]>=0?-t[i]:t[a]>=0?c+t[a]:xo(s)>1e-8?(c-o)*t[i]/s:0):e[n]-=t[i]}function Bm(e){let t=e.itemTooltipOption,n=e.componentModel,r=e.itemName,i=z(t)?{formatter:t}:t,a=n.mainType,o=n.componentIndex,s={componentType:a,name:r,$vars:[`name`]};s[a+`Index`]=o;let c=e.formatterParamsExtra;c&&P(ue(c),e=>{W(s,e)||(s[e]=c[e],s.$vars.push(e))});let l=X(e.el);l.componentMainType=a,l.componentIndex=o,l.tooltipConfig={name:r,option:M({content:r,encodeHTMLContent:!0,formatterParams:s},i)}}function Vm(e,t){let n;e.isGroup&&(n=t(e)),n||e.traverse(t)}function Hm(e,t){if(e){if(L(e))for(let n=0;n<e.length;n++)Vm(e[n],t);else Vm(e,t)}}function Um(e){return!e||xo(e[1])<Wm&&xo(e[2])<Wm||xo(e[0])<Wm&&xo(e[3])<Wm}const Wm=1e-5;function Gm(e,t){return e?K.copy(e,t):t.clone()}function Km(e,t){return t?Jt(e||Kt(),t):void 0}function qm(e){return{z:e.get(`z`)||0,zlevel:e.get(`zlevel`)||0}}function Jm(e){let t=-1/0,n=1/0;Vm(e,e=>{r(e),r(e.getTextContent()),r(e.getTextGuideLine())});function r(e){if(!e||e.isGroup)return;let t=e.currentStates;if(t.length)for(let n=0;n<t.length;n++)i(e.states[t[n]]);i(e)}function i(e){if(e){let r=e.z2;r>t&&(t=r),r<n&&(n=r)}}return n>t&&(n=t=0),{min:n,max:t}}function Ym(e,t,n){Xm(e,t,n,-1/0)}function Xm(e,t,n,r){if(e.ignoreModelZ)return r;let i=e.getTextContent(),a=e.getTextGuideLine();if(e.isGroup){let i=e.childrenRef();for(let e=0;e<i.length;e++)r=bo(Xm(i[e],t,n,r),r)}else e.z=t,e.zlevel=n,r=bo(e.z2||0,r);if(i&&(i.z=t,i.zlevel=n,isFinite(r)&&(i.z2=r+2)),a){let i=e.textGuideLineConfig;a.z=t,a.zlevel=n,isFinite(r)&&(a.z2=r+(i&&i.showAbove?1:-1))}return r}function Zm(e){return e.animation={duration:0},e}function Qm(e,t){return t?Jt($m.transform,t):qt($m.transform),$m.decomposeTransform(),Ca(e,$m),e}const $m=new ya;$m.transform=Kt();function eh(e){let t=e.getZr().painter;return t.getType()===`canvas`?t:null}mm(`circle`,$f),mm(`ellipse`,tp),mm(`sector`,vp),mm(`ring`,bp),mm(`polygon`,wp),mm(`polyline`,Ep),mm(`rect`,Uu),mm(`line`,kp),mm(`bezierCurve`,Np),mm(`arc`,Fp);const th={};function nh(e,t){for(let n=0;n<wd.length;n++){let r=wd[n],i=t[r],a=e.ensureState(r);a.style=a.style||{},a.style.text=i}let n=e.currentStates.slice();e.clearStates(!0),e.setStyle({text:t.normal}),e.useStates(n,!0)}function rh(e,t,n){let r=e.labelFetcher,i=e.labelDataIndex,a=e.labelDimIndex,o=t.normal,s;r&&(s=r.getFormattedLabel(i,`normal`,null,a,o&&o.get(`formatter`),n==null?null:{interpolatedValue:n})),s==null&&(s=R(e.defaultText)?e.defaultText(i,e,n):e.defaultText);let c={normal:s};for(let e=0;e<wd.length;e++){let n=wd[e],o=t[n];c[n]=V(r?r.getFormattedLabel(i,n,null,a,o&&o.get(`formatter`)):null,s)}return c}function ih(e,t,n,r){n=n||th;let i=e instanceof qu,a=!1;for(let e=0;e<Td.length;e++){let n=t[Td[e]];if(n&&n.getShallow(`show`)){a=!0;break}}let o=i?e:e.getTextContent();if(a){i||(o||(o=new qu,e.setTextContent(o)),e.stateProxy&&(o.stateProxy=e.stateProxy));let a=rh(n,t),s=t.normal,c=!!s.getShallow(`show`),l=oh(s,r&&r.normal,n,!1,!i);l.text=a.normal,i||e.setTextConfig(sh(s,n,!1));for(let s=0;s<wd.length;s++){let l=wd[s],u=t[l];if(u){let t=o.ensureState(l),s=!!V(u.getShallow(`show`),c);if(s!==c&&(t.ignore=!s),t.style=oh(u,r&&r[l],n,!0,!i),t.style.text=a[l],!i){let t=e.ensureState(l);t.textConfig=sh(u,n,!0)}}}o.silent=!!s.getShallow(`silent`),o.style.x!=null&&(l.x=o.style.x),o.style.y!=null&&(l.y=o.style.y),o.ignore=!c,o.useStyle(l),o.dirty(),n.enableTextSetter&&(hh(o).setLabelText=function(e){let r=rh(n,t,e);nh(o,r)})}else o&&(o.ignore=!0);e.dirty()}function ah(e,t){t=t||`label`;let n={normal:e.getModel(t)};for(let r=0;r<wd.length;r++){let i=wd[r];n[i]=e.getModel([i,t])}return n}function oh(e,t,n,r,i){let a={};return ch(a,e,n,r,i),t&&j(a,t),a}function sh(e,t,n){t=t||{};let r={},i,a=e.getShallow(`rotate`),o=V(e.getShallow(`distance`),n?null:5),s=e.getShallow(`offset`);return i=e.getShallow(`position`)||(n?null:`inside`),i===`outside`&&(i=t.defaultOutsidePosition||`top`),i!=null&&(r.position=i),s!=null&&(r.offset=s),a!=null&&(a*=Math.PI/180,r.rotation=a),o!=null&&(r.distance=o),r.outsideFill=e.get(`color`)===`inherit`?t.inheritColor||null:`auto`,t.autoOverflowArea!=null&&(r.autoOverflowArea=t.autoOverflowArea),t.layoutRect!=null&&(r.layoutRect=t.layoutRect),r}function ch(e,t,n,r,i){n=n||th;let a=t.ecModel,o=a&&a.option.textStyle,s=lh(t),c;if(s){c={};let e=`richInheritPlainLabel`,l=V(t.get(e),a?a.get(e):void 0);for(let e in s)if(s.hasOwnProperty(e)){let a=t.getModel([`rich`,e]);ph(c[e]={},a,o,t,l,n,r,i,!1,!0)}}c&&(e.rich=c);let l=t.get(`overflow`);l&&(e.overflow=l);let u=t.get(`lineOverflow`);u&&(e.lineOverflow=u);let d=e,f=t.get(`minMargin`);if(f!=null)f=me(f)?f/2:0,d.margin=[f,f,f,f],d.__marginType=vh.minMargin;else{let e=t.get(`textMargin`);e!=null&&(d.margin=Te(e),d.__marginType=vh.textMargin)}ph(e,t,o,null,null,n,r,i,!0,!1)}function lh(e){let t;for(;e&&e!==e.ecModel;){let n=(e.option||th).rich;if(n){t=t||{};let e=ue(n);for(let n=0;n<e.length;n++){let r=e[n];t[r]=1}}e=e.parentModel}return t}const uh=[`fontStyle`,`fontWeight`,`fontSize`,`fontFamily`,`textShadowColor`,`textShadowBlur`,`textShadowOffsetX`,`textShadowOffsetY`],dh=[`align`,`lineHeight`,`width`,`height`,`tag`,`verticalAlign`,`ellipsis`],fh=[`padding`,`borderWidth`,`borderRadius`,`borderDashOffset`,`backgroundColor`,`borderColor`,`shadowColor`,`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`];function ph(e,t,n,r,i,a,o,s,c,l){n=!o&&n||th;let u=a&&a.inheritColor,d=t.getShallow(`color`),f=t.getShallow(`textBorderColor`),p=V(t.getShallow(`opacity`),n.opacity);(d===`inherit`||d===`auto`)&&(typeof process<`u`&&process.env.NODE_ENV!==`production`&&d===`auto`&&ms(`color: 'auto'`,`color: 'inherit'`),d=u||null),(f===`inherit`||f===`auto`)&&(typeof process<`u`&&process.env.NODE_ENV!==`production`&&f===`auto`&&ms(`color: 'auto'`,`color: 'inherit'`),f=u||null),s||(d=d||n.color,f=f||n.textBorderColor),d!=null&&(e.fill=d),f!=null&&(e.stroke=f);let m=V(t.getShallow(`textBorderWidth`),n.textBorderWidth);m!=null&&(e.lineWidth=m);let h=V(t.getShallow(`textBorderType`),n.textBorderType);h!=null&&(e.lineDash=h);let g=V(t.getShallow(`textBorderDashOffset`),n.textBorderDashOffset);g!=null&&(e.lineDashOffset=g),!o&&p==null&&!l&&(p=a&&a.defaultOpacity),p!=null&&(e.opacity=p),!o&&!s&&e.fill==null&&a.inheritColor&&(e.fill=a.inheritColor);for(let a=0;a<uh.length;a++){let o=uh[a],s=i!==!1&&r?Ce(t.getShallow(o),r.getShallow(o),n[o]):V(t.getShallow(o),n[o]);s!=null&&(e[o]=s)}for(let n=0;n<dh.length;n++){let r=dh[n],i=t.getShallow(r);i!=null&&(e[r]=i)}if(e.verticalAlign==null){let n=t.getShallow(`baseline`);n!=null&&(e.verticalAlign=n)}if(!c||!a.disableBox){for(let n=0;n<fh.length;n++){let r=fh[n],i=t.getShallow(r);i!=null&&(e[r]=i)}let n=t.getShallow(`borderType`);n!=null&&(e.borderDash=n),(e.backgroundColor===`auto`||e.backgroundColor===`inherit`)&&u&&(typeof process<`u`&&process.env.NODE_ENV!==`production`&&e.backgroundColor===`auto`&&ms(`backgroundColor: 'auto'`,`backgroundColor: 'inherit'`),e.backgroundColor=u),(e.borderColor===`auto`||e.borderColor===`inherit`)&&u&&(typeof process<`u`&&process.env.NODE_ENV!==`production`&&e.borderColor===`auto`&&ms(`borderColor: 'auto'`,`borderColor: 'inherit'`),e.borderColor=u)}}function mh(e,t){let n=t&&t.getModel(`textStyle`);return Ee([e.fontStyle||n&&n.getShallow(`fontStyle`)||``,e.fontWeight||n&&n.getShallow(`fontWeight`)||``,(e.fontSize||n&&n.getShallow(`fontSize`)||12)+`px`,e.fontFamily||n&&n.getShallow(`fontFamily`)||`sans-serif`].join(` `))}const hh=Y();function gh(e,t,n,r){if(!e)return;let i=hh(e);i.prevValue=i.value,i.value=n;let a=t.normal;i.valueAnimation=a.get(`valueAnimation`),i.valueAnimation&&(i.precision=a.get(`precision`),i.defaultInterpolatedText=r,i.statesModels=t)}function _h(e,t,n,r,i){let a=hh(e);if(!a.valueAnimation||a.prevValue===a.value)return;let o=a.defaultInterpolatedText,s=V(a.interpolatedValue,a.prevValue),c=a.value;function l(r){let l=tc(n,a.precision,s,c,r);a.interpolatedValue=r===1?null:l,nh(e,rh({labelDataIndex:t,labelFetcher:i,defaultText:o?o(l):l+``},a.statesModels,l))}e.percent=0,(a.prevValue==null?tm:em)(e,{percent:1},r,t,null,l)}const vh={minMargin:1,textMargin:2},yh=[`textStyle`,`color`],bh=[`fontStyle`,`fontWeight`,`fontSize`,`fontFamily`,`padding`,`lineHeight`,`rich`,`width`,`height`,`overflow`],xh=new qu;var Sh=class{getTextColor(e){let t=this.ecModel;return this.getShallow(`color`)||(!e&&t?t.get(yh):null)}getFont(){return mh({fontStyle:this.getShallow(`fontStyle`),fontWeight:this.getShallow(`fontWeight`),fontSize:this.getShallow(`fontSize`),fontFamily:this.getShallow(`fontFamily`)},this.ecModel)}getTextRect(e){let t={text:e,verticalAlign:this.getShallow(`verticalAlign`)||this.getShallow(`baseline`)};for(let e=0;e<bh.length;e++)t[bh[e]]=this.getShallow(bh[e]);return xh.useStyle(t),xh.update(),xh.getBoundingRect()}};const Ch=[[`lineWidth`,`width`],[`stroke`,`color`],[`opacity`],[`shadowBlur`],[`shadowOffsetX`],[`shadowOffsetY`],[`shadowColor`],[`lineDash`,`type`],[`lineDashOffset`,`dashOffset`],[`lineCap`,`cap`],[`lineJoin`,`join`],[`miterLimit`]],wh=Ic(Ch);var Th=class{getLineStyle(e){return wh(this,e)}};const Eh=[[`fill`,`color`],[`stroke`,`borderColor`],[`lineWidth`,`borderWidth`],[`opacity`],[`shadowBlur`],[`shadowOffsetX`],[`shadowOffsetY`],[`shadowColor`],[`lineDash`,`borderType`],[`lineDashOffset`,`borderDashOffset`],[`lineCap`,`borderCap`],[`lineJoin`,`borderJoin`],[`miterLimit`,`borderMiterLimit`]],Dh=Ic(Eh);var Oh=class{getItemStyle(e,t){return Dh(this,e,t)}},kh=class e{constructor(e,t,n){this.parentModel=t,this.ecModel=n,this.option=e}init(e,t,n,...r){}mergeOption(e,t){A(this.option,e,!0)}get(e,t){return e==null?this.option:this._doGet(this.parsePath(e),!t&&this.parentModel)}getShallow(e,t){let n=this.option,r=n==null?n:n[e];if(r==null&&!t){let t=this.parentModel;t&&(r=t.getShallow(e))}return r}getModel(t,n){let r=t!=null,i=r?this.parsePath(t):null,a=r?this._doGet(i):this.option;return n=n||this.parentModel&&this.parentModel.getModel(this.resolveParentPath(i)),new e(a,n,this.ecModel)}isEmpty(){return this.option==null}restoreData(){}clone(){let e=this.constructor;return new e(k(this.option))}parsePath(e){return typeof e==`string`?e.split(`.`):e}resolveParentPath(e){return e}isAnimationEnabled(){if(!s.node&&this.option){if(this.option.animation!=null)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}}_doGet(e,t){let n=this.option;if(!e)return n;for(let t=0;t<e.length&&!(e[t]&&(n=n&&typeof n==`object`?n[e[t]]:null,n==null));t++);return n==null&&t&&(n=t._doGet(this.resolveParentPath(e),t.parentModel)),n}};Oc(kh),Mc(kh),ae(kh,Th),ae(kh,Oh),ae(kh,Rc),ae(kh,Sh);let Ah=Math.round(Math.random()*10);function jh(e){return[e||``,Ah++].join(`_`)}function Mh(e){let t={};e.registerSubTypeDefaulter=function(e,n){let r=Tc(e);t[r.main]=n},e.determineSubType=function(n,r){let i=r.type;if(!i){let a=Tc(n).main;e.hasSubTypes(n)&&t[a]&&(i=t[a](r))}return i}}function Nh(e,t){e.topologicalTravel=function(e,t,r,i){if(!e.length)return;let a=n(t),o=a.graph,s=a.noEntryList,c={};for(P(e,function(e){c[e]=!0});s.length;){let e=s.pop(),t=o[e],n=!!c[e];n&&(r.call(i,e,t.originalDeps.slice()),delete c[e]),P(t.successor,n?u:l)}P(c,function(){let n=``;throw typeof process<`u`&&process.env.NODE_ENV!==`production`&&(n=hs(`Circular dependency may exists: `,c,e,t)),Error(n)});function l(e){o[e].entryCount--,o[e].entryCount===0&&s.push(e)}function u(e){c[e]=!0,l(e)}};function n(e){let n={},a=[];return P(e,function(o){let s=r(n,o),c=i(s.originalDeps=t(o),e);s.entryCount=c.length,s.entryCount===0&&a.push(o),P(c,function(e){N(s.predecessor,e)<0&&s.predecessor.push(e);let t=r(n,e);N(t.successor,e)<0&&t.successor.push(o)})}),{graph:n,noEntryList:a}}function r(e,t){return e[t]||(e[t]={predecessor:[],successor:[]}),e[t]}function i(e,t){let n=[];return P(e,function(e){N(t,e)>=0&&n.push(e)}),n}}function Ph(e,t){return A(A({},e,!0),t,!0)}var Fh={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:`. `}}}},Ih={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:``}}}};const Lh={},Rh={},zh=s.domSupported?(function(){return(document.documentElement.lang||navigator.language||navigator.browserLanguage||`EN`).toUpperCase().indexOf(`ZH`)>-1?`ZH`:`EN`})():`EN`;function Bh(e,t){e=e.toUpperCase(),Rh[e]=new kh(t),Lh[e]=t}function Vh(e){if(z(e)){let t=Lh[e.toUpperCase()]||{};return e===`ZH`||e===`EN`?k(t):A(k(t),k(Lh.EN),!1)}return A(k(e),k(Lh.EN),!1)}function Hh(e){return Rh[e]}function Uh(){return Rh.EN}Bh(`EN`,Fh),Bh(`ZH`,Ih);let Wh=null;function Gh(e){Wh||(Wh=e)}function Kh(){return Wh}function qh(e,t){let n=Kh(),r=t.breakOption,i=t.breakParsed;return!i&&n&&(i=n.parseAxisBreakOption(r,e)),i}function Jh(e){let t=e.brk;return t?t.breaks:[]}function Yh(e){let t=e.brk;return t?t.hasBreaks():!1}const Xh=1e3,Zh=Xh*60,Qh=Zh*60,$h=Qh*24,eg=$h*365,tg={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})/},ng={year:`{yyyy}`,month:`{MMM}`,day:`{d}`,hour:`{HH}:{mm}`,minute:`{HH}:{mm}`,second:`{HH}:{mm}:{ss}`,millisecond:`{HH}:{mm}:{ss} {SSS}`},rg={year:`{yyyy}`,month:`{yyyy}-{MM}`,day:`{yyyy}-{MM}-{dd}`,hour:`{yyyy}-{MM}-{dd} `+ng.hour,minute:`{yyyy}-{MM}-{dd} `+ng.minute,second:`{yyyy}-{MM}-{dd} `+ng.second,millisecond:`{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}`},ig=[`year`,`month`,`day`,`hour`,`minute`,`second`,`millisecond`],ag=[`year`,`half-year`,`quarter`,`month`,`week`,`half-week`,`day`,`half-day`,`quarter-day`,`hour`,`minute`,`second`,`millisecond`];function og(e){return!z(e)&&!R(e)?sg(e):e}function sg(e){e=e||{};let t={},n=!0;return P(ig,t=>{n&&(n=e[t]==null)}),P(ig,(r,i)=>{let a=e[r];t[r]={};let o=null;for(let e=i;e>=0;e--){let i=ig[e],s=B(a)&&!L(a)?a[i]:a,c;L(s)?(c=s.slice(),o=c[0]||``):z(s)?(o=s,c=[o]):(o==null?o=ng[r]:tg[i].test(o)||(o=`${t[i][i][0]} ${o}`),c=[o],n&&(c[1]=`{primary|${o}}`)),t[r][i]=c}}),t}function cg(e,t){return e+=``,`0000`.substr(0,t-e.length)+e}function lg(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 ug(e){return e===lg(e)}function dg(e){switch(e){case`year`:case`month`:return`day`;case`millisecond`:return`millisecond`;default:return`second`}}function fg(e,t,n,r){let i=Yo(e),a=i[gg(n)](),o=i[_g(n)]()+1,s=Math.floor((o-1)/3)+1,c=i[vg(n)](),l=i[`get`+(n?`UTC`:``)+`Day`](),u=i[yg(n)](),d=(u-1)%12+1,f=i[bg(n)](),p=i[xg(n)](),m=i[Sg(n)](),h=u>=12?`pm`:`am`,g=h.toUpperCase(),_=(r instanceof kh?r:Hh(r||zh)||Uh()).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,cg(a%100+``,2)).replace(/{Q}/g,s+``).replace(/{MMMM}/g,v[o-1]).replace(/{MMM}/g,y[o-1]).replace(/{MM}/g,cg(o,2)).replace(/{M}/g,o+``).replace(/{dd}/g,cg(c,2)).replace(/{d}/g,c+``).replace(/{eeee}/g,b[l]).replace(/{ee}/g,x[l]).replace(/{e}/g,l+``).replace(/{HH}/g,cg(u,2)).replace(/{H}/g,u+``).replace(/{hh}/g,cg(d+``,2)).replace(/{h}/g,d+``).replace(/{mm}/g,cg(f,2)).replace(/{m}/g,f+``).replace(/{ss}/g,cg(p,2)).replace(/{s}/g,p+``).replace(/{SSS}/g,cg(m,3)).replace(/{S}/g,m+``)}function pg(e,t,n,r,i){let a=null;if(z(n))a=n;else if(R(n)){let r={time:e.time,level:e.time?e.time.level:0},i=Kh();i&&i.makeAxisLabelFormatterParamBreak(r,e.break),a=n(e.value,t,r)}else{let t=e.time;if(t){let e=n[t.lowerTimeUnit][t.upperTimeUnit];a=e[Math.min(t.level,e.length-1)]||``}else{let t=mg(e.value,i);a=n[t][t][0]}}return fg(new Date(e.value),a,i,r)}function mg(e,t){let n=Yo(e),r=n[_g(t)]()+1,i=n[vg(t)](),a=n[yg(t)](),o=n[bg(t)](),s=n[xg(t)](),c=n[Sg(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 hg(e,t,n){switch(t){case`year`:e[wg(n)](0);case`month`:e[Tg(n)](1);case`day`:e[Eg(n)](0);case`hour`:e[Dg(n)](0);case`minute`:e[Og(n)](0);case`second`:e[kg(n)](0)}return e}function gg(e){return e?`getUTCFullYear`:`getFullYear`}function _g(e){return e?`getUTCMonth`:`getMonth`}function vg(e){return e?`getUTCDate`:`getDate`}function yg(e){return e?`getUTCHours`:`getHours`}function bg(e){return e?`getUTCMinutes`:`getMinutes`}function xg(e){return e?`getUTCSeconds`:`getSeconds`}function Sg(e){return e?`getUTCMilliseconds`:`getMilliseconds`}function Cg(e){return e?`setUTCFullYear`:`setFullYear`}function wg(e){return e?`setUTCMonth`:`setMonth`}function Tg(e){return e?`setUTCDate`:`setDate`}function Eg(e){return e?`setUTCHours`:`setHours`}function Dg(e){return e?`setUTCMinutes`:`setMinutes`}function Og(e){return e?`setUTCSeconds`:`setSeconds`}function kg(e){return e?`setUTCMilliseconds`:`setMilliseconds`}function Ag(e,t,n,r,i,a,o,s){return new qu({style:{text:e,font:t,align:n,verticalAlign:r,padding:i,rich:a,overflow:o?`truncate`:null,lineHeight:s}}).getBoundingRect()}function jg(e){if(!ns(e))return z(e)?e:`-`;let t=(e+``).split(`.`);return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,`$1,`)+(t.length>1?`.`+t[1]:``)}function Mg(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}const Ng=Te;function Pg(e,t,n){function r(e){return e&&Ee(e)?e:`-`}function i(e){return os(e)}let a=t===`time`,o=e instanceof Date;if(a||o){let t=a?Yo(e):e;if(!isNaN(+t))return fg(t,`{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}`,n);if(o)return`-`}if(t===`ordinal`)return pe(e)?r(e):me(e)&&i(e)?e+``:`-`;let s=ts(e);return i(s)?jg(s):pe(e)?r(e):typeof e==`boolean`?e+``:`-`}const Fg=[`a`,`b`,`c`,`d`,`e`,`f`,`g`],Ig=function(e,t){return`{`+e+(t==null?``:t)+`}`};function Lg(e,t,n){L(t)||(t=[t]);let r=t.length;if(!r)return``;let i=t[0].$vars||[];for(let t=0;t<i.length;t++){let n=Fg[t];e=e.replace(Ig(n),Ig(n,0))}for(let a=0;a<r;a++)for(let r=0;r<i.length;r++){let o=t[a][i[r]];e=e.replace(Ig(Fg[r],a),n?Ot(o):o)}return e}function Rg(e,t,n){return P(t,function(t,r){e=e.replace(`{`+r+`}`,n?Ot(t):t)}),e}function zg(e,t){let n=z(e)?{color:e,extraCssText:t}:e||{},r=n.color,i=n.type;t=n.extraCssText;let a=n.renderMode||`html`;return r?a===`html`?i===`subItem`?`<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:`+Ot(r)+`;`+(t||``)+`"></span>`:`<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:`+Ot(r)+`;`+(t||``)+`"></span>`:{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 Bg(e,t,n){typeof process<`u`&&process.env.NODE_ENV!==`production`&&ms(`echarts.format.formatTime`,`echarts.time.format`),(e===`week`||e===`month`||e===`quarter`||e===`half-year`||e===`year`)&&(e=`MM-dd
19
+ yyyy`);let r=Yo(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`,cg(o,2)).replace(`M`,o).replace(`yyyy`,a).replace(`yy`,cg(a%100+``,2)).replace(`dd`,cg(s,2)).replace(`d`,s).replace(`hh`,cg(c,2)).replace(`h`,c).replace(`mm`,cg(l,2)).replace(`m`,l).replace(`ss`,cg(u,2)).replace(`s`,u).replace(`SSS`,cg(d,3)),e}function Vg(e){return e&&e.charAt(0).toUpperCase()+e.substr(1)}function Hg(e,t){return t=t||`transparent`,z(e)?e:B(e)&&e.colorStops&&(e.colorStops[0]||{}).color||t}function Ug(e,t){if(t===`_blank`||t===`blank`){let t=window.open();t.opener=null,t.location.href=e}else window.open(e,t)}const Wg={},Gg={};var Kg=class{constructor(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}create(e,t){this._nonSeriesBoxMasterList=n(Wg,!0),this._normalMasterList=n(Gg,!1);function n(n,r){let i=[];return P(n,function(n,a){let o=n.create(e,t);i=i.concat(o||[]),typeof process<`u`&&process.env.NODE_ENV!==`production`&&r&&P(o,e=>H(!e.update))}),i}}update(e,t){P(this._normalMasterList,function(n){n.update&&n.update(e,t)})}getCoordinateSystems(){return this._normalMasterList.concat(this._nonSeriesBoxMasterList)}};Kg.register=function(e,t){e===`matrix`||e===`calendar`?Wg[e]=t:Gg[e]=t},Kg.get=function(e){return Gg[e]||Wg[e]};function qg(e){return!!Wg[e]}function Jg(e){typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(!Yg.get(e.fullType)),Yg.set(e.fullType,{getCoord2:void 0}).getCoord2=e.getCoord2}const Yg=U();function Xg(e){let t=e.getShallow(`coord`,!0),n=1;if(t==null){let r=Yg.get(e.type);r&&r.getCoord2&&(n=2,t=r.getCoord2(e))}return{coord:t,from:n}}function Zg(e,t){let n=e.getShallow(`coordinateSystem`),r=e.getShallow(`coordinateSystemUsage`,!0),i=r!=null,a=0;if(n){let o=e.mainType===`series`;r==null&&(r=o?`data`:`box`),r===`data`?(a=1,o||(typeof process<`u`&&process.env.NODE_ENV!==`production`&&i&&t&&fs(`coordinateSystemUsage "data" is not supported in non-series components.`),a=0)):r===`box`&&(a=2,!o&&!qg(n)&&(typeof process<`u`&&process.env.NODE_ENV!==`production`&&i&&t&&fs(`coordinateSystem "${n}" cannot be used as coordinateSystemUsage "box" for "${e.type}" yet.`),a=0))}return{coordSysType:n,kind:a}}function Qg(e){let{targetModel:t,coordSysType:n,coordSysProvider:r,isDefaultDataCoordSys:i,allowNotFound:a}=e;typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(!!n);let{kind:o,coordSysType:s}=Zg(t,!0);if(i&&o!==1&&(o=1,s=n),o===0||s!==n)return 0;let c=r(n,t);return c?(o===1?(typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(t.mainType===`series`),t.coordinateSystem=c):t.boxCoordinateSystem=c,o):(typeof process<`u`&&process.env.NODE_ENV!==`production`&&(a||fs(`${n} cannot be found for ${t.type} (index: ${t.componentIndex}).`)),0)}const $g=function(e,t){let n=t.getReferringComponents(e,qs).models[0];return n&&n.coordinateSystem},e_=P,t_=[`left`,`right`,`top`,`bottom`,`width`,`height`],n_=[[`width`,`left`,`right`],[`height`,`top`,`bottom`]];function r_(e,t,n,r,i){let a=0,o=0;r==null&&(r=1/0),i==null&&(i=1/0);let s=0;t.eachChild(function(c,l){let u=c.getBoundingRect(),d=t.childAt(l+1),f=d&&d.getBoundingRect(),p,m;if(e===`horizontal`){let e=u.width+(f?-f.x+u.x:0);p=a+e,p>r||c.newline?(a=0,p=e,o+=s+n,s=u.height):s=Math.max(s,u.height)}else{let e=u.height+(f?-f.y+u.y:0);m=o+e,m>i||c.newline?(a+=s+n,o=0,m=e,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)})}const i_=r_;function a_(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 o_(e,t){let n=d_(e,t,{enableLayoutOnlyByCenter:!0}),r=e.getBoxLayoutParams(),i,a;if(n.type===u_.point)a=n.refPoint,i=c_(r,{width:t.getWidth(),height:t.getHeight()});else{let t=e.get(`center`),o=L(t)?t:[t,t];i=c_(r,n.refContainer),a=n.boxCoordFrom===2?n.refPoint:[J(o[0],i.width)+i.x,J(o[1],i.height)+i.y]}return{viewRect:i,center:a}}function s_(e,t){let{viewRect:n,center:r}=o_(e,t),i=e.get(`radius`);L(i)||(i=[0,i]);let a=J(n.width,t.getWidth()),o=J(n.height,t.getHeight()),s=Math.min(a,o),c=J(i[0],s/2),l=J(i[1],s/2);return{cx:r[0],cy:r[1],r0:c,r:l,viewRect:n}}function c_(e,t,n){n=Ng(n||0);let r=t.width,i=t.height,a=J(e.left,r),o=J(e.top,i),s=J(e.right,r),c=J(e.bottom,i),l=J(e.width,r),u=J(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}switch(e.top||e.bottom){case`middle`:case`center`:o=i/2-u/2-n[0];break;case`bottom`:o=i-u-d}a=a||0,o=o||0,isNaN(l)&&(l=r-f-a-(s||0)),isNaN(u)&&(u=i-d-o-(c||0));let m=new K((t.x||0)+a+n[3],(t.y||0)+o+n[0],l,u);return m.margin=n,m}function l_(e,t,n){let r=e.getShallow(`preserveAspect`,!0);if(!r)return t;let i=t.width/t.height;if(Math.abs(Math.atan(n)-Math.atan(i))<1e-9)return t;let a=e.getShallow(`preserveAspectAlign`,!0),o=e.getShallow(`preserveAspectVerticalAlign`,!0),s={width:t.width,height:t.height},c=r===`cover`;return i>n&&!c||i<n&&c?(s.width=t.height*n,a===`left`?s.left=0:a===`right`?s.right=0:s.left=`center`):(s.height=t.width/n,o===`top`?s.top=0:o===`bottom`?s.bottom=0:s.top=`middle`),c_(s,t)}const u_={rect:1,point:2};function d_(e,t,n){let r,i,a,o=e.boxCoordinateSystem,s;if(o){let{coord:t,from:c}=Xg(e);if(o.dataToLayout){a=u_.rect,s=c;let e=o.dataToLayout(t);r=e.contentRect||e.rect}else n&&n.enableLayoutOnlyByCenter&&o.dataToPoint?(a=u_.point,s=c,i=o.dataToPoint(t)):typeof process<`u`&&process.env.NODE_ENV!==`production`&&fs(`${e.type}[${e.componentIndex}] layout based on ${o.type} is not supported.`)}return a==null&&(a=u_.rect),a===u_.rect&&(r||(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 f_(e,t,n,r,i,a){let o=!i||!i.hv||i.hv[0],s=!i||!i.hv||i.hv[1],c=i&&i.boundingMode||`all`;if(a=a||e,a.x=e.x,a.y=e.y,!o&&!s)return!1;let l;if(c===`raw`)l=e.type===`group`?new K(0,0,+t.width||0,+t.height||0):e.getBoundingRect();else if(l=e.getBoundingRect(),e.needLocalTransform()){let t=e.getLocalTransform();l=l.clone(),l.applyTransform(t)}let u=c_(M({width:l.width,height:l.height},t),n,r),d=o?u.x-l.x:0,f=s?u.y-l.y:0;return c===`raw`?(a.x=d,a.y=f):(a.x+=d,a.y+=f),a===e&&e.markRedraw(),!0}function p_(e,t){return e[n_[t][0]]!=null||e[n_[t][1]]!=null&&e[n_[t][2]]!=null}function m_(e){let t=e.layoutMode||e.constructor.layoutMode;return B(t)?t:t?{type:t}:null}function h_(e,t,n){let r=n&&n.ignoreSize;!L(r)&&(r=[r,r]);let i=o(n_[0],0),a=o(n_[1],1);c(n_[0],e,i),c(n_[1],e,a);function o(n,i){let a={},o=0,c={},l=0;if(e_(n,function(t){c[t]=e[t]}),e_(n,function(e){W(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===2||!o)return c;if(o>=2)return a;for(let t=0;t<n.length;t++){let r=n[t];if(!W(a,r)&&W(e,r)){a[r]=e[r];break}}return a}function s(e,t){return e[t]!=null&&e[t]!==`auto`}function c(e,t,n){e_(e,function(e){t[e]=n[e]})}}function g_(e){return __({},e)}function __(e,t){return t&&e&&e_(t_,function(n){W(t,n)&&(e[n]=t[n])}),e}var v_;const y_=Y();var b_=class extends kh{constructor(e,t,n){super(e,t,n),this.uid=jh(`ec_cpt_model`)}init(e,t,n){this.mergeDefaultAndTheme(e,n)}mergeDefaultAndTheme(e,t){let n=m_(this),r=n?g_(e):{};A(e,t.getTheme().get(this.mainType)),A(e,this.getDefaultOption()),n&&h_(e,r,n)}mergeOption(e,t){A(this.option,e,!0);let n=m_(this);n&&h_(this.option,e,n)}optionUpdated(e,t){}getDefaultOption(){let e=this.constructor;if(!Dc(e))return e.defaultOption;let t=y_(this);if(!t.defaultOption){let n=[],r=e;for(;r;){let e=r.prototype.defaultOption;e&&n.push(e),r=r.superClass}let i={};for(let e=n.length-1;e>=0;e--)i=A(i,n[e],!0);t.defaultOption=i}return t.defaultOption}getReferringComponents(e,t){let n=e+`Index`,r=e+`Id`;return Ys(this.ecModel,e,{index:this.get(n,!0),id:this.get(r,!0)},t)}getBoxLayoutParams(){return a_(this,!1)}getZLevelKey(){return``}setZLevel(e){this.option.zlevel=e}};v_=b_,b_.protoInitialize=(function(){let e=v_.prototype;e.type=`component`,e.id=``,e.name=``,e.mainType=``,e.subType=``,e.componentIndex=0})(),Ac(b_,kh),Fc(b_),Mh(b_),Nh(b_,x_);function x_(e){let t=[];return P(b_.getClassesByMainType(e),function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])}),t=F(t,function(e){return Tc(e).main}),e!==`dataset`&&N(t,`dataset`)<=0&&t.unshift(`dataset`),t}const Q={color:{},darkColor:{},size:{}},S_=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)`};j(S_,{primary:S_.neutral80,secondary:S_.neutral70,tertiary:S_.neutral60,quaternary:S_.neutral50,disabled:S_.neutral20,border:S_.neutral30,borderTint:S_.neutral20,borderShade:S_.neutral40,background:S_.neutral05,backgroundTint:`rgba(234,237,245,0.5)`,backgroundTransparent:`rgba(255,255,255,0)`,backgroundShade:S_.neutral10,shadow:`rgba(0,0,0,0.2)`,shadowTint:`rgba(129,130,136,0.2)`,axisLine:S_.neutral70,axisLineTint:S_.neutral40,axisTick:S_.neutral70,axisTickMinor:S_.neutral60,axisLabel:S_.neutral70,axisSplitLine:S_.neutral15,axisMinorSplitLine:S_.neutral05});for(let e in S_)if(S_.hasOwnProperty(e)){let t=S_[e];e===`theme`?Q.darkColor.theme=S_.theme.slice():e===`highlight`?Q.darkColor.highlight=`rgba(255,231,130,0.4)`:e.indexOf(`accent`)===0?Q.darkColor[e]=Qr(t,null,e=>e*.5,e=>Math.min(1,1.3-e)):Q.darkColor[e]=Qr(t,null,e=>e*.9,e=>1-Math.pow(e,1.5))}Q.size={xxs:2,xs:5,s:10,m:15,l:20,xl:30,xxl:40,xxxl:50};let C_=``;typeof navigator<`u`&&(C_=navigator.platform||``);const w_=`rgba(0, 0, 0, 0.2)`,T_=Q.color.theme[0],E_=Qr(T_,null,null,.9);var D_={darkMode:`auto`,colorBy:`series`,color:Q.color.theme,gradientColor:[E_,T_],aria:{decal:{decals:[{color:w_,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:w_,symbol:`circle`,dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:w_,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:w_,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:w_,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:w_,symbol:`triangle`,dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:C_.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};const O_={Must:1,Might:2,Not:3},k_=Y();function A_(e){k_(e).datasetMap=U()}function j_(e,t,n){let r={},i=N_(t);if(!i||!e)return r;let a=[],o=[],s=t.ecModel,c=k_(s).datasetMap,l=i.uid+`_`+n.seriesLayoutBy,u,d;e=e.slice(),P(e,function(t,n){let i=B(t)?t:e[n]={name:t};i.type===`ordinal`&&u==null&&(u=n,d=m(i)),r[i.name]=[]});let f=c.get(l)||c.set(l,{categoryWayDim:d,valueWayDim:0});P(e,function(e,t){let n=e.name,i=m(e);if(u==null){let e=f.valueWayDim;p(r[n],e,i),p(o,e,i),f.valueWayDim+=i}else if(u===t)p(r[n],0,i),p(a,0,i);else{let e=f.categoryWayDim;p(r[n],e,i),p(o,e,i),f.categoryWayDim+=i}});function p(e,t,n){for(let r=0;r<n;r++)e.push(t+r)}function m(e){let t=e.dimsDef;return t?t.length:1}return a.length&&(r.itemName=a),o.length&&(r.seriesName=o),r}function M_(e,t,n){let r={};if(!N_(e))return r;let i=t.sourceFormat,a=t.dimensionsDefine,o;(i===`objectRows`||i===`keyedColumns`)&&P(a,function(e,t){(B(e)?e.name:e)===`name`&&(o=t)});let s=(function(){let e={},r={},s=[];for(let l=0,u=Math.min(5,n);l<u;l++){let n=I_(t.data,i,t.seriesLayoutBy,a,t.startIndex,l);s.push(n);let u=n===O_.Not;if(u&&e.v==null&&l!==o&&(e.v=l),(e.n==null||e.n===e.v||!u&&s[e.n]===O_.Not)&&(e.n=l),c(e)&&s[e.n]!==O_.Not)return e;u||(n===O_.Might&&r.v==null&&l!==o&&(r.v=l),(r.n==null||r.n===r.v)&&(r.n=l))}function c(e){return e.v!=null&&e.n!=null}return c(e)?e:c(r)?r:null})();if(s){r.value=[s.v];let e=o==null?s.n:o;r.itemName=[e],r.seriesName=[e]}return r}function N_(e){if(!e.get(`data`,!0))return Ys(e.ecModel,`dataset`,{index:e.get(`datasetIndex`,!0),id:e.get(`datasetId`,!0)},qs).models[0]}function P_(e){return!e.get(`transform`,!0)&&!e.get(`fromTransformResult`,!0)?[]:Ys(e.ecModel,`dataset`,{index:e.get(`fromDatasetIndex`,!0),id:e.get(`fromDatasetId`,!0)},qs).models}function F_(e,t){return I_(e.data,e.sourceFormat,e.seriesLayoutBy,e.dimensionsDefine,e.startIndex,t)}function I_(e,t,n,r,i,a){let o;if(ge(e))return O_.Not;let s,c;if(r){let e=r[a];B(e)?(s=e.name,c=e.type):z(e)&&(s=e)}if(c!=null)return c===`ordinal`?O_.Must:O_.Not;if(t===`arrayRows`){let t=e;if(n===`row`){let e=t[a];for(let t=0;t<(e||[]).length&&t<5;t++)if((o=l(e[i+t]))!=null)return o}else for(let e=0;e<t.length&&e<5;e++){let n=t[i+e];if(n&&(o=l(n[a]))!=null)return o}}else if(t===`objectRows`){let t=e;if(!s)return O_.Not;for(let e=0;e<t.length&&e<5;e++){let n=t[e];if(n&&(o=l(n[s]))!=null)return o}}else if(t===`keyedColumns`){let t=e;if(!s)return O_.Not;let n=t[s];if(!n||ge(n))return O_.Not;for(let e=0;e<n.length&&e<5;e++)if((o=l(n[e]))!=null)return o}else if(t===`original`){let t=e;for(let e=0;e<t.length&&e<5;e++){let n=t[e],r=Cs(n);if(!L(r))return O_.Not;if((o=l(r[a]))!=null)return o}}function l(e){let t=z(e);if(e!=null&&isFinite(Number(e))&&e!==``)return t?O_.Might:O_.Not;if(t&&e!==`-`)return O_.Must}return O_.Not}const L_=U();function R_(e,t){H(L_.get(e)==null&&t),L_.set(e,t)}function z_(e,t,n){let r=L_.get(t);if(!r)return n;let i=r(e);if(!i)return n;if(typeof process<`u`&&process.env.NODE_ENV!==`production`)for(let e=0;e<i.length;e++)H(Rs(i[e]));return n.concat(i)}const B_=Y(),V_=Y();var H_=class{getColorFromPalette(e,t,n){let r=bs(this.get(`color`,!0)),i=this.get(`colorLayer`,!0);return G_(this,B_,r,i,e,t,n)}clearColorPalette(){K_(this,B_)}};function U_(e,t,n,r){let i=bs(e.get([`aria`,`decal`,`decals`]));return G_(e,V_,i,null,t,n,r)}function W_(e,t){let n=e.length;for(let r=0;r<n;r++)if(e[r].length>t)return e[r];return e[n-1]}function G_(e,t,n,r,i,a,o){a=a||e;let s=t(a),c=s.paletteIdx||0,l=s.paletteNameMap=s.paletteNameMap||{};if(l.hasOwnProperty(i))return l[i];let u=o==null||!r?n:W_(r,o);if(u=u||n,!u||!u.length)return;let d=u[c];return i&&(l[i]=d),s.paletteIdx=(c+1)%u.length,d}function K_(e,t){t(e).paletteIdx=0,t(e).paletteNameMap={}}let q_,J_,Y_;const X_=`\0_ec_inner`,Z_={grid:`GridComponent`,polar:`PolarComponent`,geo:`GeoComponent`,singleAxis:`SingleAxisComponent`,parallel:`ParallelComponent`,calendar:`CalendarComponent`,matrix:`MatrixComponent`,graphic:`GraphicComponent`,toolbox:`ToolboxComponent`,tooltip:`TooltipComponent`,axisPointer:`AxisPointerComponent`,brush:`BrushComponent`,title:`TitleComponent`,timeline:`TimelineComponent`,markPoint:`MarkPointComponent`,markLine:`MarkLineComponent`,markArea:`MarkAreaComponent`,legend:`LegendComponent`,dataZoom:`DataZoomComponent`,visualMap:`VisualMapComponent`,xAxis:`GridComponent`,yAxis:`GridComponent`,angleAxis:`PolarComponent`,radiusAxis:`PolarComponent`},Q_={line:`LineChart`,bar:`BarChart`,pie:`PieChart`,scatter:`ScatterChart`,radar:`RadarChart`,map:`MapChart`,tree:`TreeChart`,treemap:`TreemapChart`,graph:`GraphChart`,chord:`ChordChart`,gauge:`GaugeChart`,funnel:`FunnelChart`,parallel:`ParallelChart`,sankey:`SankeyChart`,boxplot:`BoxplotChart`,candlestick:`CandlestickChart`,effectScatter:`EffectScatterChart`,lines:`LinesChart`,heatmap:`HeatmapChart`,pictorialBar:`PictorialBarChart`,themeRiver:`ThemeRiverChart`,sunburst:`SunburstChart`,custom:`CustomChart`},$_={};function ev(e){P(e,function(e,t){if(!b_.hasClass(t)){let e=Z_[t];e&&!$_[e]&&(fs(`Component ${t} is used but not imported.
20
+ import { ${e} } from 'echarts/components';
21
+ echarts.use([${e}]);`),$_[e]=!0)}})}var tv=class extends kh{init(e,t,n,r,i,a){r=r||{},this.option=null,this._theme=new kh(r),this._locale=new kh(i),this._optionManager=a}setOption(e,t,n){typeof process<`u`&&process.env.NODE_ENV!==`production`&&(H(e!=null,`option is null/undefined`),H(e[X_]!==1,`please use chart.getOption()`));let r=ov(t);this._optionManager.setOption(e,n,r),this._resetOption(null,r)}resetOption(e,t){return this._resetOption(e,ov(t))}_resetOption(e,t){let n=!1,r=this._optionManager;if(!e||e===`recreate`){let i=r.mountOption(e===`recreate`);typeof process<`u`&&process.env.NODE_ENV!==`production`&&ev(i),!this.option||e===`recreate`?Y_(this,i):(this.restoreData(),this._mergeOption(i,t)),n=!0}if((e===`timeline`||e===`media`)&&this.restoreData(),!e||e===`recreate`||e===`timeline`){let e=r.getTimelineOption(this);e&&(n=!0,this._mergeOption(e,t))}if(!e||e===`recreate`||e===`media`){let e=r.getMediaOption(this);e.length&&P(e,function(e){n=!0,this._mergeOption(e,t)},this)}return n}mergeOption(e){this._mergeOption(e,null)}_mergeOption(e,t){let n=this.option,r=this._componentsMap,i=this._componentsCount,a=[],o=U(),s=t&&t.replaceMergeMainTypeMap;A_(this),P(e,function(e,t){e!=null&&(b_.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){b_.hasClass(t)&&!o.get(t)&&(a.push(t),o.set(t,!0))}),b_.topologicalTravel(a,b_.getAllClassMainTypes(),c,this);function c(t){let a=z_(this,t,bs(e[t])),o=r.get(t),c=Ts(o,a,o?s&&s.get(t)?`replaceMerge`:`normalMerge`:`replaceAll`);Bs(c,t,b_),n[t]=null,r.set(t,null),i.set(t,0);let l=[],u=[],d=0,f,p;P(c,function(e,n){let r=e.existing,i=e.newOption;if(!i)r&&(r.mergeOption({},this),r.optionUpdated({},!1));else{let a=t===`series`,o=b_.getClass(t,e.keyInfo.subType,!a);if(!o){if(typeof process<`u`&&process.env.NODE_ENV!==`production`){let t=e.keyInfo.subType,n=Q_[t];$_[t]||($_[t]=!0,fs(n?`Series ${t} is used but not imported.
22
+ import { ${n} } from 'echarts/charts';
23
+ echarts.use([${n}]);`:`Unknown series ${t}`))}return}if(t===`tooltip`){if(f){typeof process<`u`&&process.env.NODE_ENV!==`production`&&(p||(ds(`Currently only one tooltip component is allowed.`),p=!0));return}f=!0}if(r&&r.constructor===o)r.name=e.keyInfo.name,r.mergeOption(i,this),r.optionUpdated(i,!1);else{let t=j({componentIndex:n},e.keyInfo);r=new o(i,this,this,t),j(r,t),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`&&q_(this)}this._seriesIndices||q_(this)}getOption(){let e=k(this.option);return P(e,function(t,n){if(b_.hasClass(n)){let r=bs(t),i=r.length,a=!1;for(let e=i-1;e>=0;e--)r[e]&&!Rs(r[e])?a=!0:(r[e]=null,!a&&i--);r.length=i,e[n]=r}}),delete e[X_],e}setTheme(e){this._theme=new kh(e),this._resetOption(`recreate`,null)}getTheme(){return this._theme}getLocaleModel(){return this._locale}setUpdatePayload(e){this._payload=e}getUpdatePayload(){return this._payload}getComponent(e,t){let n=this._componentsMap.get(e);if(n){let e=n[t||0];if(e)return e;if(t==null){for(let e=0;e<n.length;e++)if(n[e])return n[e]}}}queryComponents(e){let t=e.mainType;if(!t)return[];let n=e.index,r=e.id,i=e.name,a=this._componentsMap.get(t);if(!a||!a.length)return[];let o;return n==null?o=r==null?i==null?ce(a,e=>!!e):iv(`name`,i,a):iv(`id`,r,a):(o=[],P(bs(n),function(e){a[e]&&o.push(a[e])})),av(o,e)}findComponents(e){let t=e.query,n=e.mainType,r=i(t);return a(av(r?this.queryComponents(r):ce(this._componentsMap.get(n),e=>!!e),e));function i(e){let t=n+`Index`,r=n+`Id`,i=n+`Name`;return e&&(e[t]!=null||e[r]!=null||e[i]!=null)?{mainType:n,index:e[t],id:e[r],name:e[i]}:null}function a(t){return e.filter?ce(t,e.filter):t}}eachComponent(e,t,n){let r=this._componentsMap;if(R(e)){let n=t,i=e;r.each(function(e,t){for(let r=0;e&&r<e.length;r++){let a=e[r];a&&i.call(n,t,a,a.componentIndex)}})}else{let i=z(e)?r.get(e):B(e)?this.findComponents(e):null;for(let e=0;i&&e<i.length;e++){let r=i[e];r&&t.call(n,r,r.componentIndex)}}}getSeriesByName(e){let t=Ps(e,null);return ce(this._componentsMap.get(`series`),e=>!!e&&t!=null&&e.name===t)}getSeriesByIndex(e){return this._componentsMap.get(`series`)[e]}getSeriesByType(e){return ce(this._componentsMap.get(`series`),t=>!!t&&t.subType===e)}getSeries(){return ce(this._componentsMap.get(`series`),e=>!!e)}getSeriesCount(){return this._componentsCount.get(`series`)}eachSeries(e,t){J_(this),P(this._seriesIndices,function(n){let r=this._componentsMap.get(`series`)[n];e.call(t,r,n)},this)}eachRawSeries(e,t){P(this._componentsMap.get(`series`),function(n){n&&e.call(t,n,n.componentIndex)})}eachSeriesByType(e,t,n){J_(this),P(this._seriesIndices,function(r){let i=this._componentsMap.get(`series`)[r];i.subType===e&&t.call(n,i,r)},this)}eachRawSeriesByType(e,t,n){return P(this.getSeriesByType(e),t,n)}isSeriesFiltered(e){return J_(this),this._seriesIndicesMap.get(e.componentIndex)==null}getCurrentSeriesIndices(){return(this._seriesIndices||[]).slice()}filterSeries(e,t){J_(this);let n=[];P(this._seriesIndices,function(r){let i=this._componentsMap.get(`series`)[r];e.call(t,i,r)&&n.push(r)},this),this._seriesIndices=n,this._seriesIndicesMap=U(n)}restoreData(e){q_(this);let t=this._componentsMap,n=[];t.each(function(e,t){b_.hasClass(t)&&n.push(t)}),b_.topologicalTravel(n,b_.getAllClassMainTypes(),function(n){P(t.get(n),function(t){t&&(n!==`series`||!nv(t,e))&&t.restoreData()})})}};tv.internalField=(function(){q_=function(e){let t=e._seriesIndices=[];P(e._componentsMap.get(`series`),function(e){e&&t.push(e.componentIndex)}),e._seriesIndicesMap=U(t)},J_=function(e){if(typeof process<`u`&&process.env.NODE_ENV!==`production`&&!e._seriesIndices)throw Error(`Option should contains series.`)},Y_=function(e,t){e.option={},e.option[X_]=1,e._componentsMap=U({series:[]}),e._componentsCount=U();let n=t.aria;B(n)&&n.enabled==null&&(n.enabled=!0),rv(t,e._theme.option),A(t,D_,!1),e._mergeOption(t,null)}})();function nv(e,t){if(t){let n=t.seriesIndex,r=t.seriesId,i=t.seriesName;return n!=null&&e.componentIndex!==n||r!=null&&e.id!==r||i!=null&&e.name!==i}}function rv(e,t){let n=e.color&&!e.colorLayer;P(t,function(t,r){r===`colorLayer`&&n||r===`color`&&e.color||b_.hasClass(r)||(typeof t==`object`?e[r]=e[r]?A(e[r],t,!1):k(t):e[r]==null&&(e[r]=t))})}function iv(e,t,n){if(L(t)){let r=U();return P(t,function(e){e!=null&&Ps(e,null)!=null&&r.set(e,!0)}),ce(n,t=>t&&r.get(t[e]))}{let r=Ps(t,null);return ce(n,t=>t&&r!=null&&t[e]===r)}}function av(e,t){return t.hasOwnProperty(`subType`)?ce(e,e=>e&&e.subType===t.subType):e}function ov(e){let t=U();return e&&P(bs(e.replaceMerge),function(e){typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(b_.hasClass(e),`"`+e+`" is not valid component main type in "replaceMerge"`),t.set(e,!0)}),{replaceMergeMainTypeMap:t}}ae(tv,H_);const sv=/^(min|max)?(.+)$/;var cv=class{constructor(e){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=e}setOption(e,t,n){e&&(P(bs(e.series),function(e){e&&e.data&&ge(e.data)&&Oe(e.data)}),P(bs(e.dataset),function(e){e&&e.source&&ge(e.source)&&Oe(e.source)})),e=k(e);let r=this._optionBackup,i=lv(e,t,!r);this._newBaseOption=i.baseOption,r?(i.timelineOptions.length&&(r.timelineOptions=i.timelineOptions),i.mediaList.length&&(r.mediaList=i.mediaList),i.mediaDefault&&(r.mediaDefault=i.mediaDefault)):this._optionBackup=i}mountOption(e){let t=this._optionBackup;return this._timelineOptions=t.timelineOptions,this._mediaList=t.mediaList,this._mediaDefault=t.mediaDefault,this._currentMediaIndices=[],k(e?t.baseOption:this._newBaseOption)}getTimelineOption(e){let t,n=this._timelineOptions;if(n.length){let r=e.getComponent(`timeline`);r&&(t=k(n[r.getCurrentIndex()]))}return t}getMediaOption(e){let t=this._api.getWidth(),n=this._api.getHeight(),r=this._mediaList,i=this._mediaDefault,a=[],o=[];if(!r.length&&!i)return o;for(let e=0,i=r.length;e<i;e++)uv(r[e].query,t,n)&&a.push(e);return!a.length&&i&&(a=[-1]),a.length&&!fv(a,this._currentMediaIndices)&&(o=F(a,function(e){return k(e===-1?i.option:r[e].option)})),this._currentMediaIndices=a,o}};function lv(e,t,n){let r=[],i,a,o=e.baseOption,s=e.timeline,c=e.options,l=e.media,u=!!e.media,d=!!(c||s||o&&o.timeline);o?(a=o,a.timeline||(a.timeline=s)):((d||u)&&(e.options=e.media=null),a=e),u&&(L(l)?P(l,function(e){typeof process<`u`&&process.env.NODE_ENV!==`production`&&e&&!e.option&&B(e.query)&&B(e.query.option)&&fs(`Illegal media option. Must be like { media: [ { query: {}, option: {} } ] }`),e&&e.option&&(e.query?r.push(e):i||(i=e))}):typeof process<`u`&&process.env.NODE_ENV!==`production`&&fs(`Illegal media option. Must be an array. Like { media: [ {...}, {...} ] }`)),f(a),P(c,e=>f(e)),P(r,e=>f(e.option));function f(e){P(t,function(t){t(e,n)})}return{baseOption:a,timelineOptions:c||[],mediaDefault:i,mediaList:r}}function uv(e,t,n){let r={width:t,height:n,aspectratio:t/n},i=!0;return P(e,function(e,t){let n=t.match(sv);if(!n||!n[1]||!n[2])return;let a=n[1],o=n[2].toLowerCase();dv(r[o],e,a)||(i=!1)}),i}function dv(e,t,n){return n===`min`?e>=t:n===`max`?e<=t:e===t}function fv(e,t){return e.join(`,`)===t.join(`,`)}const pv=P,mv=B,hv=[`areaStyle`,`lineStyle`,`nodeStyle`,`linkStyle`,`chordStyle`,`label`,`labelLine`];function gv(e){let t=e&&e.itemStyle;if(t)for(let n=0,r=hv.length;n<r;n++){let r=hv[n],i=t.normal,a=t.emphasis;i&&i[r]&&(typeof process<`u`&&process.env.NODE_ENV!==`production`&&ms(`itemStyle.normal.${r}`,r),e[r]=e[r]||{},e[r].normal?A(e[r].normal,i[r]):e[r].normal=i[r],i[r]=null),a&&a[r]&&(typeof process<`u`&&process.env.NODE_ENV!==`production`&&ms(`itemStyle.emphasis.${r}`,`emphasis.${r}`),e[r]=e[r]||{},e[r].emphasis?A(e[r].emphasis,a[r]):e[r].emphasis=a[r],a[r]=null)}}function _v(e,t,n){if(e&&e[t]&&(e[t].normal||e[t].emphasis)){let r=e[t].normal,i=e[t].emphasis;r&&(typeof process<`u`&&process.env.NODE_ENV!==`production`&&ps(`'normal' hierarchy in ${t} has been removed since 4.0. All style properties are configured in ${t} directly now.`),n?(e[t].normal=e[t].emphasis=null,M(e[t],r)):e[t]=r),i&&(typeof process<`u`&&process.env.NODE_ENV!==`production`&&ps(`${t}.emphasis has been changed to emphasis.${t} since 4.0`),e.emphasis=e.emphasis||{},e.emphasis[t]=i,i.focus&&(e.emphasis.focus=i.focus),i.blurScope&&(e.emphasis.blurScope=i.blurScope))}}function vv(e){_v(e,`itemStyle`),_v(e,`lineStyle`),_v(e,`areaStyle`),_v(e,`label`),_v(e,`labelLine`),_v(e,`upperLabel`),_v(e,`edgeLabel`)}function yv(e,t){let n=mv(e)&&e[t],r=mv(n)&&n.textStyle;if(r){typeof process<`u`&&process.env.NODE_ENV!==`production`&&ps(`textStyle hierarchy in ${t} has been removed since 4.0. All textStyle properties are configured in ${t} directly now.`);for(let e=0,t=Ss.length;e<t;e++){let t=Ss[e];r.hasOwnProperty(t)&&(n[t]=r[t])}}}function bv(e){e&&(vv(e),yv(e,`label`),e.emphasis&&yv(e.emphasis,`label`))}function xv(e){if(!mv(e))return;gv(e),vv(e),yv(e,`label`),yv(e,`upperLabel`),yv(e,`edgeLabel`),e.emphasis&&(yv(e.emphasis,`label`),yv(e.emphasis,`upperLabel`),yv(e.emphasis,`edgeLabel`));let t=e.markPoint;t&&(gv(t),bv(t));let n=e.markLine;n&&(gv(n),bv(n));let r=e.markArea;r&&bv(r);let i=e.data;if(e.type===`graph`){i=i||e.nodes;let t=e.links||e.edges;if(t&&!ge(t))for(let e=0;e<t.length;e++)bv(t[e]);P(e.categories,function(e){vv(e)})}if(i&&!ge(i))for(let e=0;e<i.length;e++)bv(i[e]);if(t=e.markPoint,t&&t.data){let e=t.data;for(let t=0;t<e.length;t++)bv(e[t])}if(n=e.markLine,n&&n.data){let e=n.data;for(let t=0;t<e.length;t++)L(e[t])?(bv(e[t][0]),bv(e[t][1])):bv(e[t])}e.type===`gauge`?(yv(e,`axisLabel`),yv(e,`title`),yv(e,`detail`)):e.type===`treemap`?(_v(e.breadcrumb,`itemStyle`),P(e.levels,function(e){vv(e)})):e.type===`tree`&&vv(e.leaves)}function Sv(e){return L(e)?e:e?[e]:[]}function Cv(e){return(L(e)?e[0]:e)||{}}function wv(e,t){pv(Sv(e.series),function(e){mv(e)&&xv(e)});let n=[`xAxis`,`yAxis`,`radiusAxis`,`angleAxis`,`singleAxis`,`parallelAxis`,`radar`];t&&n.push(`valueAxis`,`categoryAxis`,`logAxis`,`timeAxis`),pv(n,function(t){pv(Sv(e[t]),function(e){e&&(yv(e,`axisLabel`),yv(e.axisPointer,`label`))})}),pv(Sv(e.parallel),function(e){let t=e&&e.parallelAxisDefault;yv(t,`axisLabel`),yv(t&&t.axisPointer,`label`)}),pv(Sv(e.calendar),function(e){_v(e,`itemStyle`),yv(e,`dayLabel`),yv(e,`monthLabel`),yv(e,`yearLabel`)}),pv(Sv(e.radar),function(e){yv(e,`name`),e.name&&e.axisName==null&&(e.axisName=e.name,delete e.name,typeof process<`u`&&process.env.NODE_ENV!==`production`&&ps(`name property in radar component has been changed to axisName`)),e.nameGap!=null&&e.axisNameGap==null&&(e.axisNameGap=e.nameGap,delete e.nameGap,typeof process<`u`&&process.env.NODE_ENV!==`production`&&ps(`nameGap property in radar component has been changed to axisNameGap`)),typeof process<`u`&&process.env.NODE_ENV!==`production`&&pv(e.indicator,function(e){e.text&&ms(`text`,`name`,`radar.indicator`)})}),pv(Sv(e.geo),function(e){mv(e)&&(bv(e),pv(Sv(e.regions),function(e){bv(e)}))}),pv(Sv(e.timeline),function(e){bv(e),_v(e,`label`),_v(e,`itemStyle`),_v(e,`controlStyle`,!0);let t=e.data;L(t)&&P(t,function(e){B(e)&&(_v(e,`label`),_v(e,`itemStyle`))})}),pv(Sv(e.toolbox),function(e){_v(e,`iconStyle`),pv(e.feature,function(e){_v(e,`iconStyle`)})}),yv(Cv(e.axisPointer),`label`),yv(Cv(e.tooltip).axisPointer,`label`)}function Tv(e,t){let n=t.split(`,`),r=e;for(let e=0;e<n.length&&(r=r&&r[n[e]],r!=null);e++);return r}function Ev(e,t,n,r){let i=t.split(`,`),a=e,o,s=0;for(;s<i.length-1;s++)o=i[s],a[o]==null&&(a[o]={}),a=a[o];(r||a[i[s]]==null)&&(a[i[s]]=n)}function Dv(e){e&&P(Ov,function(t){t[0]in e&&!(t[1]in e)&&(e[t[1]]=e[t[0]])})}const Ov=[[`x`,`left`],[`y`,`top`],[`x2`,`right`],[`y2`,`bottom`]],kv=[`grid`,`geo`,`parallel`,`legend`,`toolbox`,`title`,`visualMap`,`dataZoom`,`timeline`],Av=[[`borderRadius`,`barBorderRadius`],[`borderColor`,`barBorderColor`],[`borderWidth`,`barBorderWidth`]];function jv(e){let t=e&&e.itemStyle;if(t)for(let e=0;e<Av.length;e++){let n=Av[e][1],r=Av[e][0];t[n]!=null&&(t[r]=t[n],typeof process<`u`&&process.env.NODE_ENV!==`production`&&ms(n,r))}}function Mv(e){e&&e.alignTo===`edge`&&e.margin!=null&&e.edgeDistance==null&&(typeof process<`u`&&process.env.NODE_ENV!==`production`&&ms(`label.margin`,`label.edgeDistance`,`pie`),e.edgeDistance=e.margin)}function Nv(e){e&&e.downplay&&!e.blur&&(e.blur=e.downplay,typeof process<`u`&&process.env.NODE_ENV!==`production`&&ms(`downplay`,`blur`,`sunburst`))}function Pv(e){e&&e.focusNodeAdjacency!=null&&(e.emphasis=e.emphasis||{},e.emphasis.focus==null&&(typeof process<`u`&&process.env.NODE_ENV!==`production`&&ms(`focusNodeAdjacency`,`emphasis: { focus: 'adjacency'}`,`graph/sankey`),e.emphasis.focus=`adjacency`))}function Fv(e,t){if(e)for(let n=0;n<e.length;n++)t(e[n]),e[n]&&Fv(e[n].children,t)}function Iv(e,t){wv(e,t),e.series=bs(e.series),P(e.series,function(e){if(!B(e))return;let t=e.type;if(t===`line`)e.clipOverflow!=null&&(e.clip=e.clipOverflow,typeof process<`u`&&process.env.NODE_ENV!==`production`&&ms(`clipOverflow`,`clip`,`line`));else if(t===`pie`||t===`gauge`){e.clockWise!=null&&(e.clockwise=e.clockWise,typeof process<`u`&&process.env.NODE_ENV!==`production`&&ms(`clockWise`,`clockwise`)),Mv(e.label);let t=e.data;if(t&&!ge(t))for(let e=0;e<t.length;e++)Mv(t[e]);e.hoverOffset!=null&&(e.emphasis=e.emphasis||{},(e.emphasis.scaleSize=null)&&(typeof process<`u`&&process.env.NODE_ENV!==`production`&&ms(`hoverOffset`,`emphasis.scaleSize`),e.emphasis.scaleSize=e.hoverOffset))}else if(t===`gauge`){let t=Tv(e,`pointer.color`);t!=null&&Ev(e,`itemStyle.color`,t)}else if(t===`bar`){jv(e),jv(e.backgroundStyle),jv(e.emphasis);let t=e.data;if(t&&!ge(t))for(let e=0;e<t.length;e++)typeof t[e]==`object`&&(jv(t[e]),jv(t[e]&&t[e].emphasis))}else if(t===`sunburst`){let t=e.highlightPolicy;t&&(e.emphasis=e.emphasis||{},e.emphasis.focus||(e.emphasis.focus=t,typeof process<`u`&&process.env.NODE_ENV!==`production`&&ms(`highlightPolicy`,`emphasis.focus`,`sunburst`))),Nv(e),Fv(e.data,Nv)}else t===`graph`||t===`sankey`?Pv(e):t===`map`&&(e.mapType&&!e.map&&(typeof process<`u`&&process.env.NODE_ENV!==`production`&&ms(`mapType`,`map`,`map`),e.map=e.mapType),e.mapLocation&&(typeof process<`u`&&process.env.NODE_ENV!==`production`&&ps("`mapLocation` is not used anymore."),M(e,e.mapLocation)));e.hoverAnimation!=null&&(e.emphasis=e.emphasis||{},e.emphasis&&e.emphasis.scale==null&&(typeof process<`u`&&process.env.NODE_ENV!==`production`&&ms(`hoverAnimation`,`emphasis.scale`),e.emphasis.scale=e.hoverAnimation)),Dv(e)}),e.dataRange&&(e.visualMap=e.dataRange),P(kv,function(t){let n=e[t];n&&(L(n)||(n=[n]),P(n,function(e){Dv(e)}))})}const Lv=Sc(Rv);function Rv(e){let t=U();e.eachSeries(function(e){let n=e.get(`stack`);if(n){let r=t.get(n)||t.set(n,[]),i=e.getData(),a={stackResultDimension:i.getCalculationInfo(`stackResultDimension`),stackedOverDimension:i.getCalculationInfo(`stackedOverDimension`),stackedDimension:i.getCalculationInfo(`stackedDimension`),stackedByDimension:i.getCalculationInfo(`stackedByDimension`),isStackedByIndex:i.getCalculationInfo(`isStackedByIndex`),data:i,seriesModel:e};if(!a.stackedDimension||!(a.isStackedByIndex||a.stackedByDimension))return;r.push(a)}}),t.each(function(e){e.length!==0&&((e[0].seriesModel.get(`stackOrder`)||`seriesAsc`)===`seriesDesc`&&e.reverse(),P(e,function(t,n){t.data.setCalculationInfo(`stackedOnSeries`,n>0?e[n-1].seriesModel:null)}),zv(e))})}function zv(e){P(e,function(t,n){let 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){let d=o.get(t.stackedDimension,u);if(isNaN(d))return i;let f,p;s?p=o.getRawIndex(u):f=o.get(t.stackedByDimension,u);let m=NaN;for(let t=n-1;t>=0;t--){let n=e[t];if(s||(p=n.data.rawIndexOf(n.stackedByDimension,f)),p>=0){let e=n.data.getByRawIndex(n.stackResultDimension,p);if(c===`all`||c===`positive`&&e>0||c===`negative`&&e<0||c===`samesign`&&d>=0&&e>0||c===`samesign`&&d<=0&&e<0){d=Wo(d,e),m=e;break}}}return r[0]=d,r[1]=m,r})})}var Bv=class{constructor(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;let t=this.dimensionsDefine=e.dimensionsDefine;if(t)for(let e=0;e<t.length;e++){let n=t[e];n.type==null&&F_(this,e)===O_.Must&&(n.type=`ordinal`)}}};function Vv(e){return e instanceof Bv}function Hv(e,t,n){n=n||Gv(e);let r=t.seriesLayoutBy,i=Kv(e,n,r,t.sourceHeader,t.dimensions);return new Bv({data:e,sourceFormat:n,seriesLayoutBy:r,dimensionsDefine:i.dimensionsDefine,startIndex:i.startIndex,dimensionsDetectedCount:i.dimensionsDetectedCount,metaRawOption:k(t)})}function Uv(e){return new Bv({data:e,sourceFormat:ge(e)?md:ud})}function Wv(e){return new Bv({data:e.data,sourceFormat:e.sourceFormat,seriesLayoutBy:e.seriesLayoutBy,dimensionsDefine:k(e.dimensionsDefine),startIndex:e.startIndex,dimensionsDetectedCount:e.dimensionsDetectedCount})}function Gv(e){let t=`unknown`;if(ge(e))t=md;else if(L(e)){e.length===0&&(t=dd);for(let n=0,r=e.length;n<r;n++){let r=e[n];if(r!=null){if(L(r)||ge(r)){t=dd;break}if(B(r)){t=fd;break}}}}else if(B(e)){for(let n in e)if(W(e,n)&&oe(e[n])){t=pd;break}}return t}function Kv(e,t,n,r,i){let a,o;if(!e)return{dimensionsDefine:Jv(i),startIndex:o,dimensionsDetectedCount:a};if(t===`arrayRows`){let t=e;r===`auto`||r==null?Yv(function(e){e!=null&&e!==`-`&&(z(e)?o==null&&(o=1):o=0)},n,t,10):o=me(r)?r:+!!r,!i&&o===1&&(i=[],Yv(function(e,t){i[t]=e==null?``:e+``},n,t,1/0)),a=i?i.length:n===`row`?t.length:t[0]?t[0].length:null}else if(t===`objectRows`)i||(i=qv(e));else if(t===`keyedColumns`)i||(i=[],P(e,function(e,t){i.push(t)}));else if(t===`original`){let t=Cs(e[0]);a=L(t)&&t.length||1}else t===`typedArray`&&typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(!!i,`dimensions must be given if data is TypedArray.`);return{startIndex:o,dimensionsDefine:Jv(i),dimensionsDetectedCount:a}}function qv(e){let t=U(),n=[];for(let r=0;r<e.length;r++){let i=e[r];if(i)for(let e in i)W(i,e)&&!t.get(e)&&(t.set(e,!0),n.push(e))}return n.length?n:void 0}function Jv(e){if(!e)return;let t=U();return F(e,function(e,n){e=B(e)?e:{name:e};let r={name:e.name,displayName:e.displayName,type:e.type};if(r.name==null)return r;r.name+=``,r.displayName==null&&(r.displayName=r.name);let i=t.get(r.name);return i?r.name+=`-`+i.count++:t.set(r.name,{count:1}),r})}function Yv(e,t,n,r){if(t===`row`)for(let t=0;t<n.length&&t<r;t++)e(n[t]?n[t][0]:null,t);else{let t=n[0]||[];for(let n=0;n<t.length&&n<r;n++)e(t[n],n)}}function Xv(e){let t=e.sourceFormat;return t===`objectRows`||t===`keyedColumns`}var Zv;let Qv,$v;var ey=class{constructor(e,t){let n=Vv(e)?e:Uv(e);this._source=n;let r=this._data=n.data,i=n.sourceFormat,a=n.seriesLayoutBy;if(i===`typedArray`){if(typeof process<`u`&&process.env.NODE_ENV!==`production`&&t==null)throw Error(`Typed array data must specify dimension size`);this._offset=0,this._dimSize=t,this._data=r}if(typeof process<`u`&&process.env.NODE_ENV!==`production`){let e=ny[fy(i,a)];e&&e(r,n.dimensionsDefine)}$v(this,r,n)}getSource(){return this._source}count(){return 0}getItem(e,t){}appendData(e){}clean(){}};Zv=ey,ey.protoInitialize=(function(){let e=Zv.prototype;e.pure=!1,e.persistent=!0})(),ey.internalField=(function(){$v=function(r,i,a){let o=a.sourceFormat,s=a.seriesLayoutBy,c=a.startIndex,l=a.dimensionsDefine,u=Qv[fy(o,s)];if(typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(u,`Invalide sourceFormat: `+o),j(r,u),o===`typedArray`)r.getItem=e,r.count=n,r.fillStorage=t;else{let e=ay(o,s);r.getItem=I(e,null,i,c,l);let t=cy(o,s);r.count=I(t,null,i,c,l)}};let e=function(e,t){e-=this._offset,t=t||[];let n=this._data,r=this._dimSize,i=r*e;for(let e=0;e<r;e++)t[e]=n[i+e];return t},t=function(e,t,n,r){let i=this._data,a=this._dimSize;for(let o=0;o<a;o++){let s=r[o],c=s[0]==null?1/0:s[0],l=s[1]==null?-1/0:s[1],u=t-e,d=n[o];for(let t=0;t<u;t++){let n=i[t*a+o];d[e+t]=n,n<c&&(c=n),n>l&&(l=n)}s[0]=c,s[1]=l}},n=function(){return this._data?this._data.length/this._dimSize:0};Qv={arrayRows_column:{pure:!0,appendData:r},arrayRows_row:{pure:!0,appendData:function(){throw Error(`Do not support appendData when set seriesLayoutBy: "row".`)}},[fd]:{pure:!0,appendData:r},[pd]:{pure:!0,appendData:function(e){let t=this._data;P(e,function(e,n){let r=t[n]||(t[n]=[]);for(let t=0;t<(e||[]).length;t++)r.push(e[t])})}},[ud]:{appendData:r},[md]:{persistent:!1,pure:!0,appendData:function(e){typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(ge(e),`Added data must be TypedArray if data in initialization is TypedArray`),this._data=e},clean:function(){this._offset+=this.count(),this._data=null}}};function r(e){for(let t=0;t<e.length;t++)this._data.push(e[t])}})();const ty=function(e){L(e)||fs(`series.data or dataset.source must be an array.`)},ny={arrayRows_column:ty,arrayRows_row:ty,[fd]:ty,[pd]:function(e,t){for(let e=0;e<t.length;e++)t[e].name==null&&fs(`dimension name must not be null/undefined.`)},[ud]:ty},ry=function(e,t,n,r){return e[r]},iy={arrayRows_column:function(e,t,n,r){return e[r+t]},arrayRows_row:function(e,t,n,r,i){r+=t;let a=i||[],o=e;for(let e=0;e<o.length;e++){let t=o[e];a[e]=t?t[r]:null}return a},[fd]:ry,[pd]:function(e,t,n,r,i){let a=i||[];for(let t=0;t<n.length;t++){let i=n[t].name,o=i==null?null:e[i];a[t]=o?o[r]:null}return a},[ud]:ry};function ay(e,t){let n=iy[fy(e,t)];return typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(n,`Do not support get item on "`+e+`", "`+t+`".`),n}const oy=function(e,t,n){return e.length},sy={arrayRows_column:function(e,t,n){return Math.max(0,e.length-t)},arrayRows_row:function(e,t,n){let r=e[0];return r?Math.max(0,r.length-t):0},[fd]:oy,[pd]:function(e,t,n){let r=n[0].name,i=r==null?null:e[r];return i?i.length:0},[ud]:oy};function cy(e,t){let n=sy[fy(e,t)];return typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(n,`Do not support count on "`+e+`", "`+t+`".`),n}const ly=function(e,t,n){return e[t]},uy={[dd]:ly,[fd]:function(e,t,n){return e[n]},[pd]:ly,[ud]:function(e,t,n){let r=Cs(e);return r instanceof Array?r[t]:r},[md]:ly};function dy(e){let t=uy[e];return typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(t,`Do not support get value on "`+e+`".`),t}function fy(e,t){return e===`arrayRows`?e+`_`+t:e}function py(e,t,n){if(!e)return;let r=e.getRawDataItem(t);if(r==null)return;let i=e.getStore(),a=i.getSource().sourceFormat;if(n!=null){let t=e.getDimensionIndex(n),o=i.getDimensionProperty(t);return dy(a)(r,t,o)}{let e=r;return a===`original`&&(e=Cs(r)),e}}const my=/\{@(.+?)\}/g;var hy=class{getDataParams(e,t){let n=this.getData(t),r=this.getRawValue(e,t),i=n.getRawIndex(e),a=n.getName(e),o=n.getRawDataItem(e),s=n.getItemVisual(e,`style`),c=s&&s[n.getItemVisual(e,`drawType`)||`fill`],l=s&&s.stroke,u=this.mainType,d=u===`series`,f=n.userOutput&&n.userOutput.get();return{componentType:u,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:d?this.subType:null,seriesIndex:this.seriesIndex,seriesId:d?this.id:null,seriesName:d?this.name:null,name:a,dataIndex:i,data:o,dataType:t,value:r,color:c,borderColor:l,dimensionNames:f?f.fullDimensions:null,encode:f?f.encode:null,$vars:[`seriesName`,`name`,`value`]}}getFormattedLabel(e,t,n,r,i,a){t=t||`normal`;let o=this.getData(n),s=this.getDataParams(e,n);if(a&&(s.value=a.interpolatedValue),r!=null&&L(s.value)&&(s.value=s.value[r]),i||(i=o.getItemModel(e).get(t===`normal`?[`label`,`formatter`]:[t,`label`,`formatter`])),R(i))return s.status=t,s.dimensionIndex=r,i(s);if(z(i))return Lg(i,s).replace(my,function(t,n){let r=n.length,i=n;i.charAt(0)===`[`&&i.charAt(r-1)===`]`&&(i=+i.slice(1,r-1),typeof process<`u`&&process.env.NODE_ENV!==`production`&&isNaN(i)&&fs(`Invalide label formatter: @${n}, only support @[0], @[1], @[2], ...`));let s=py(o,e,i);if(a&&L(a.interpolatedValue)){let e=o.getDimensionIndex(i);e>=0&&(s=a.interpolatedValue[e])}return s==null?``:s+``})}getRawValue(e,t){return py(this.getData(t),e)}formatTooltip(e,t,n){}};function gy(e){let t,n;return B(e)?e.type?n=e:typeof process<`u`&&process.env.NODE_ENV!==`production`&&console.warn("The return type of `formatTooltip` is not supported: "+hs(e)):t=e,{text:t,frag:n}}function _y(e){return new vy(e)}var vy=class{constructor(e){e=e||{},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}perform(e){let t=this._upstream,n=e&&e.skip;if(this._dirty&&t){let e=this.context;e.data=e.outputData=t.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);let r;this._plan&&!n&&(r=this._plan(this.context));let i=c(this._modBy),a=this._modDataCount||0,o=c(e&&e.modBy),s=e&&e.modDataCount||0;(i!==o||a!==s)&&(r=`reset`);function c(e){return!(e>=1)&&(e=1),e}let l;(this._dirty||r===`reset`)&&(this._dirty=!1,l=this._doReset(n)),this._modBy=o,this._modDataCount=s;let u=e&&e.step;if(t?(typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(t._outputDueEnd!=null),this._dueEnd=t._outputDueEnd):(typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(!this._progress||this._count),this._dueEnd=this._count?this._count(this.context):1/0),this._progress){let e=this._dueIndex,t=Math.min(u==null?1/0:this._dueIndex+u,this._dueEnd);if(!n&&(l||e<t)){let n=this._progress;if(L(n))for(let r=0;r<n.length;r++)this._doProgress(n[r],e,t,o,s);else this._doProgress(n,e,t,o,s)}this._dueIndex=t;let r=this._settedOutputEnd==null?t:this._settedOutputEnd;typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(r>=this._outputDueEnd),this._outputDueEnd=r}else this._dueIndex=this._outputDueEnd=this._settedOutputEnd==null?this._dueEnd:this._settedOutputEnd;return this.unfinished()}dirty(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)}_doProgress(e,t,n,r,i){yy.reset(t,n,r,i),this._callingProgress=e,this._callingProgress({start:t,end:n,count:n-t,next:yy.next},this.context)}_doReset(e){this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null;let t,n;!e&&this._reset&&(t=this._reset(this.context),t&&t.progress&&(n=t.forceFirstProgress,t=t.progress),L(t)&&!t.length&&(t=null)),this._progress=t,this._modBy=this._modDataCount=null;let r=this._downstream;return r&&r.dirty(),n}unfinished(){return this._progress&&this._dueIndex<this._dueEnd}pipe(e){typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(e&&!e._disposed&&e!==this),(this._downstream!==e||this._dirty)&&(this._downstream=e,e._upstream=this,e.dirty())}dispose(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)}getUpstream(){return this._upstream}getDownstream(){return this._downstream}setOutputEnd(e){this._outputDueEnd=this._settedOutputEnd=e}};const yy=(function(){let e,t,n,r,i,a={reset:function(c,l,u,d){t=c,e=l,n=u,r=d,i=Math.ceil(r/n),a.next=n>1&&r>0?s:o}};return a;function o(){return t<e?t++:null}function s(){let a=t%i*n+Math.ceil(t/i),o=t>=e?null:a<r?a:t;return t++,o}})();function by(e,t){let n=t&&t.type;return n===`ordinal`?e:(n===`time`&&!me(e)&&e!=null&&e!==`-`&&(e=+Yo(e)),e==null||e===``?NaN:Number(e))}const xy=U({number:function(e){return parseFloat(e)},time:function(e){return+Yo(e)},trim:function(e){return z(e)?Ee(e):e}});function Sy(e){return xy.get(e)}const Cy={lt:(e,t)=>e<t,lte:(e,t)=>e<=t,gt:(e,t)=>e>t,gte:(e,t)=>e>=t};var wy=class{constructor(e,t){if(!me(t)){let e=``;typeof process<`u`&&process.env.NODE_ENV!==`production`&&(e=`rvalue of "<", ">", "<=", ">=" can only be number in filter.`),gs(e)}this._opFn=Cy[e],this._rvalFloat=ts(t)}evaluate(e){return me(e)?this._opFn(e,this._rvalFloat):this._opFn(ts(e),this._rvalFloat)}},Ty=class{constructor(e,t){let n=e===`desc`;this._resultLT=n?1:-1,t==null&&(t=n?`min`:`max`),this._incomparable=t===`min`?-1/0:1/0}evaluate(e,t){let n=me(e)?e:ts(e),r=me(t)?t:ts(t),i=isNaN(n),a=isNaN(r);if(i&&(n=this._incomparable),a&&(r=this._incomparable),i&&a){let i=z(e),a=z(t);i&&(n=a?e:0),a&&(r=i?t:0)}return n<r?this._resultLT:n>r?-this._resultLT:0}},Ey=class{constructor(e,t){this._rval=t,this._isEQ=e,this._rvalTypeof=typeof t,this._rvalFloat=ts(t)}evaluate(e){let t=e===this._rval;if(!t){let n=typeof e;n!==this._rvalTypeof&&(n===`number`||this._rvalTypeof===`number`)&&(t=ts(e)===this._rvalFloat)}return this._isEQ?t:!t}};function Dy(e,t){return e===`eq`||e===`ne`?new Ey(e===`eq`,t):W(Cy,e)?new wy(e,t):null}function Oy(e){let t=``,n=-1/0,r=-1/0,i=1/0,a=1/0;return e&&(e.g!=null&&(t+=`G`+e.g,n=e.g),e.ge!=null&&(t+=`GE`+e.ge,r=e.ge),e.l!=null&&(t+=`L`+e.l,i=e.l),e.le!=null&&(t+=`LE`+e.le,a=e.le)),{key:t,g:n,ge:r,l:i,le:a}}function ky(e,t){return t>e.g&&t>=e.ge&&t<e.l&&t<=e.le}var Ay=class{getRawData(){throw Error(`not supported`)}getRawDataItem(e){throw Error(`not supported`)}cloneRawData(){}getDimensionInfo(e){}cloneAllDimensionInfo(){}count(){}retrieveValue(e,t){}retrieveValueFromItem(e,t){}convertValue(e,t){return by(e,t)}};function jy(e,t){let n=new Ay,r=e.data,i=n.sourceFormat=e.sourceFormat,a=e.startIndex,o=``;e.seriesLayoutBy!==`column`&&(typeof process<`u`&&process.env.NODE_ENV!==`production`&&(o='`seriesLayoutBy` of upstream dataset can only be "column" in data transform.'),gs(o));let s=[],c={},l=e.dimensionsDefine;if(l)P(l,function(e,t){let n=e.name,r={index:t,name:n,displayName:e.displayName};if(s.push(r),n!=null){let e=``;W(c,n)&&(typeof process<`u`&&process.env.NODE_ENV!==`production`&&(e=`dimension name "`+n+`" duplicated.`),gs(e)),c[n]=r}});else for(let t=0;t<e.dimensionsDetectedCount;t++)s.push({index:t});let u=ay(i,hd);t.__isBuiltIn&&(n.getRawDataItem=function(e){return u(r,a,s,e)},n.getRawData=I(My,null,e)),n.cloneRawData=I(Ny,null,e);let d=cy(i,hd);n.count=I(d,null,r,a,s);let f=dy(i);n.retrieveValue=function(e,t){let n=u(r,a,s,e);return p(n,t)};let p=n.retrieveValueFromItem=function(e,t){if(e==null)return;let n=s[t];if(n)return f(e,t,n.name)};return n.getDimensionInfo=I(Py,null,s,c),n.cloneAllDimensionInfo=I(Fy,null,s),n}function My(e){let t=e.sourceFormat;if(!By(t)){let e=``;typeof process<`u`&&process.env.NODE_ENV!==`production`&&(e="`getRawData` is not supported in source format "+t),gs(e)}return e.data}function Ny(e){let t=e.sourceFormat,n=e.data;if(!By(t)){let e=``;typeof process<`u`&&process.env.NODE_ENV!==`production`&&(e="`cloneRawData` is not supported in source format "+t),gs(e)}if(t===`arrayRows`){let e=[];for(let t=0,r=n.length;t<r;t++)e.push(n[t].slice());return e}if(t===`objectRows`){let e=[];for(let t=0,r=n.length;t<r;t++)e.push(j({},n[t]));return e}}function Py(e,t,n){if(n!=null){if(me(n)||!isNaN(n)&&!W(t,n))return e[n];if(W(t,n))return t[n]}}function Fy(e){return k(e)}const Iy=U();function Ly(e){e=k(e);let t=e.type,n=``;t||(typeof process<`u`&&process.env.NODE_ENV!==`production`&&(n="Must have a `type` when `registerTransform`."),gs(n));let r=t.split(`:`);r.length!==2&&(typeof process<`u`&&process.env.NODE_ENV!==`production`&&(n=`Name must include namespace like "ns:regression".`),gs(n));let i=!1;r[0]===`sparkng`&&(t=r[1],i=!0),e.__isBuiltIn=i,Iy.set(t,e)}function Ry(e,t,n){let r=bs(e),i=r.length,a=``;i||(typeof process<`u`&&process.env.NODE_ENV!==`production`&&(a="If `transform` declared, it should at least contain one transform."),gs(a));for(let e=0,a=i;e<a;e++){let o=r[e];t=zy(o,t,n,i===1?null:e),e!==a-1&&(t.length=Math.max(t.length,1))}return t}function zy(e,t,n,r){let i=``;t.length||(typeof process<`u`&&process.env.NODE_ENV!==`production`&&(i=`Must have at least one upstream dataset.`),gs(i)),B(e)||(typeof process<`u`&&process.env.NODE_ENV!==`production`&&(i=`transform declaration must be an object rather than `+typeof e+`.`),gs(i));let a=e.type,o=Iy.get(a);o||(typeof process<`u`&&process.env.NODE_ENV!==`production`&&(i=`Can not find transform on type "`+a+`".`),gs(i));let s=F(t,e=>jy(e,o)),c=bs(o.transform({upstream:s[0],upstreamList:s,config:k(e.config)}));return typeof process<`u`&&process.env.NODE_ENV!==`production`&&e.print&&us(F(c,e=>{let t=r==null?``:` === pipe index: `+r;return[`=== dataset index: `+n.datasetIndex+t+` ===`,`- transform result data:`,hs(e.data),`- transform result dimensions:`,hs(e.dimensions)].join(`
24
+ `)}).join(`
25
+ `)),F(c,function(e,n){let r=``;B(e)||(typeof process<`u`&&process.env.NODE_ENV!==`production`&&(r=`A transform should not return some empty results.`),gs(r)),e.data||(typeof process<`u`&&process.env.NODE_ENV!==`production`&&(r=`Transform result data should be not be null or undefined`),gs(r)),By(Gv(e.data))||(typeof process<`u`&&process.env.NODE_ENV!==`production`&&(r=`Transform result data should be array rows or object rows.`),gs(r));let i,a=t[0];if(a&&n===0&&!e.dimensions){let t=a.startIndex;t&&(e.data=a.data.slice(0,t).concat(e.data)),i={seriesLayoutBy:hd,sourceHeader:t,dimensions:a.metaRawOption.dimensions}}else i={seriesLayoutBy:hd,sourceHeader:0,dimensions:e.dimensions};return Hv(e.data,i,null)})}function By(e){return e===`arrayRows`||e===`objectRows`}const Vy=typeof Uint32Array>`u`?Array:Uint32Array,Hy=typeof Uint16Array>`u`?Array:Uint16Array,Uy=typeof Int32Array>`u`?Array:Int32Array,Wy=typeof Float64Array>`u`?Array:Float64Array,Gy={float:Wy,int:Uy,ordinal:Array,number:Array,time:Wy};let Ky;function qy(e){return e>65535?Vy:Hy}function Jy(e){let t=e.constructor;return t===Array?e.slice():new t(e)}function Yy(e,t,n,r,i){let a=Gy[n||`float`];if(i){let n=e[t],i=n&&n.length;if(i!==r){let o=new a(r);for(let e=0;e<i;e++)o[e]=n[e];e[t]=o}}else e[t]=new a(r)}var Xy=class e{constructor(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=U()}initData(e,t,n){typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(R(e.getItem)&&R(e.count),`Invalid data provider.`),this._provider=e,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;let r=e.getSource(),i=this.defaultDimValueGetter=Ky[r.sourceFormat];this._dimValueGetter=n||i,this._rawExtent=[];let a=Xv(r);this._dimensions=F(t,e=>(typeof process<`u`&&process.env.NODE_ENV!==`production`&&a&&H(e.property!=null),{type:e.type,property:e.property})),this._initDataFromProvider(0,e.count())}getProvider(){return this._provider}getSource(){return this._provider.getSource()}ensureCalculationDimension(e,t){let n=this._calcDimNameToIdx,r=this._dimensions,i=n.get(e);if(i!=null){if(r[i].type===t)return i}else i=r.length;return r[i]={type:t},n.set(e,i),this._chunks[i]=new Gy[t||`float`](this._rawCount),this._rawExtent[i]=ic(),i}collectOrdinalMeta(e,t){let n=this._chunks[e],r=this._dimensions[e],i=this._rawExtent,a=r.ordinalOffset||0,o=n.length;a===0&&(i[e]=ic());let s=i[e];for(let e=a;e<o;e++){let r=n[e]=t.parseAndCollect(n[e]);isNaN(r)||(s[0]=Math.min(r,s[0]),s[1]=Math.max(r,s[1]))}r.ordinalMeta=t,r.ordinalOffset=o,r.type=`ordinal`}getOrdinalMeta(e){return this._dimensions[e].ordinalMeta}getDimensionProperty(e){let t=this._dimensions[e];return t&&t.property}appendData(e){typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(!this._indices,`appendData can only be called on raw data.`);let t=this._provider,n=this.count();t.appendData(e);let r=t.count();return t.persistent||(r+=n),n<r&&this._initDataFromProvider(n,r,!0),[n,r]}appendValues(e,t){let n=this._chunks,r=this._dimensions,i=r.length,a=this._rawExtent,o=this.count(),s=o+Math.max(e.length,t||0);for(let e=0;e<i;e++){let t=r[e];Yy(n,e,t.type,s,!0)}let c=[];for(let t=o;t<s;t++){let s=t-o;for(let o=0;o<i;o++){let i=r[o],l=Ky.arrayRows.call(this,e[s]||c,i.property,s,o);n[o][t]=l;let u=a[o];l<u[0]&&(u[0]=l),l>u[1]&&(u[1]=l)}}return this._rawCount=this._count=s,{start:o,end:s}}_initDataFromProvider(e,t,n){let r=this._provider,i=this._chunks,a=this._dimensions,o=a.length,s=this._rawExtent,c=F(a,e=>e.property);for(let e=0;e<o;e++){let r=a[e];s[e]||(s[e]=ic()),Yy(i,e,r.type,t,n)}if(r.fillStorage)r.fillStorage(e,t,i,s);else{let n=[];for(let a=e;a<t;a++){n=r.getItem(a,n);for(let e=0;e<o;e++){let t=i[e],r=this._dimValueGetter(n,c[e],a,e);t[a]=r;let o=s[e];r<o[0]&&(o[0]=r),r>o[1]&&(o[1]=r)}}}!r.persistent&&r.clean&&r.clean(),this._rawCount=this._count=t,this._extent=[]}count(){return this._count}get(e,t){if(!(t>=0&&t<this._count))return NaN;let n=this._chunks[e];return n?n[this.getRawIndex(t)]:NaN}getValues(e,t){let n=[],r=[];if(t==null){t=e,e=[];for(let e=0;e<this._dimensions.length;e++)r.push(e)}else r=e;for(let e=0,i=r.length;e<i;e++)n.push(this.get(r[e],t));return n}getByRawIndex(e,t){if(!(t>=0&&t<this._rawCount))return NaN;let n=this._chunks[e];return n?n[t]:NaN}getSum(e){let t=this._chunks[e],n=0;if(t)for(let t=0,r=this.count();t<r;t++){let r=this.get(e,t);isNaN(r)||(n+=r)}return n}getMedian(e){let t=[];this.each([e],function(e){isNaN(e)||t.push(e)}),Lo(t);let n=this.count();return n===0?0:n%2==1?t[(n-1)/2]:(t[n/2]+t[n/2-1])/2}indexOfRawIndex(e){if(e>=this._rawCount||e<0)return-1;if(!this._indices)return e;let t=this._indices,n=t[e];if(n!=null&&n<this._count&&n===e)return e;let r=0,i=this._count-1;for(;r<=i;){let n=(r+i)/2|0;if(t[n]<e)r=n+1;else if(t[n]>e)i=n-1;else return n}return-1}getIndices(){let e,t=this._indices;if(t){let n=t.constructor,r=this._count;if(n===Array){e=new n(r);for(let n=0;n<r;n++)e[n]=t[n]}else e=new n(t.buffer,0,r)}else{e=new(qy(this._rawCount))(this.count());for(let t=0;t<e.length;t++)e[t]=t}return e}filter(e,t){if(!this._count)return this;let n=this.clone(),r=n.count(),i=new(qy(n._rawCount))(r),a=[],o=e.length,s=0,c=e[0],l=n._chunks;for(let u=0;u<r;u++){let r,d=n.getRawIndex(u);if(o===0)r=t(u);else if(o===1){let e=l[c][d];r=t(e,u)}else{let n=0;for(;n<o;n++)a[n]=l[e[n]][d];a[n]=u,r=t.apply(null,a)}r&&(i[s++]=d)}return s<r&&(n._indices=i),n._count=s,n._extent=[],n._updateGetRawIdx(),n}selectRange(e){let t=this.clone(),n=t._count;if(!n)return this;let r=ue(e),i=r.length;if(!i)return this;let a=t.count(),o=new(qy(t._rawCount))(a),s=0,c=r[0],l=e[c][0],u=e[c][1],d=t._chunks,f=!1;if(!t._indices){let t=0;if(i===1){let e=d[r[0]];for(let r=0;r<n;r++){let n=e[r];(n>=l&&n<=u||isNaN(n))&&(o[s++]=t),t++}f=!0}else if(i===2){let i=d[r[0]],a=d[r[1]],c=e[r[1]][0],p=e[r[1]][1];for(let e=0;e<n;e++){let n=i[e],r=a[e];(n>=l&&n<=u||isNaN(n))&&(r>=c&&r<=p||isNaN(r))&&(o[s++]=t),t++}f=!0}}if(!f){if(i===1)for(let e=0;e<a;e++){let n=t.getRawIndex(e),i=d[r[0]][n];(i>=l&&i<=u||isNaN(i))&&(o[s++]=n)}else for(let n=0;n<a;n++){let a=!0,c=t.getRawIndex(n);for(let t=0;t<i;t++){let n=r[t],i=d[n][c];(i<e[n][0]||i>e[n][1])&&(a=!1)}a&&(o[s++]=t.getRawIndex(n))}}return s<a&&(t._indices=o),t._count=s,t._extent=[],t._updateGetRawIdx(),t}map(e,t){let n=this.clone(e);return this._updateDims(n,e,t),n}modify(e,t){this._updateDims(this,e,t)}_updateDims(e,t,n){let r=e._chunks,i=[],a=t.length,o=e.count(),s=[],c=e._rawExtent;for(let e=0;e<t.length;e++)c[t[e]]=ic();for(let l=0;l<o;l++){let o=e.getRawIndex(l);for(let e=0;e<a;e++)s[e]=r[t[e]][o];s[a]=l;let u=n&&n.apply(null,s);if(u!=null){typeof u!=`object`&&(i[0]=u,u=i);for(let e=0;e<u.length;e++){let n=t[e],i=u[e],a=c[n],s=r[n];s&&(s[o]=i),i<a[0]&&(a[0]=i),i>a[1]&&(a[1]=i)}}}}lttbDownSample(e,t){let 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(qy(this._rawCount))(Math.min((Math.ceil(i/o)+2)*2,i));d[a++]=s;for(let e=1;e<i-1;e+=o){let t=Math.min(e+o,i-1),n=Math.min(e+o*2,i),f=(n+t)/2,p=0;for(let e=t;e<n;e++){let t=r[this.getRawIndex(e)];isNaN(t)||(p+=t)}p/=n-t;let m=e,h=Math.min(e+o,i),g=e-1,_=r[s];c=-1,u=m;let v=-1,y=0;for(let e=m;e<h;e++){let t=this.getRawIndex(e),n=r[t];isNaN(n)?(y++,v<0&&(v=t)):(l=Math.abs((g-f)*(n-_)-(g-e)*(p-_)),l>c&&(c=l,u=t))}y>0&&y<h-m&&(d[a++]=Math.min(v,u),u=Math.max(v,u)),d[a++]=u,s=u}return d[a++]=this.getRawIndex(i-1),n._count=a,n._indices=d,n.getRawIndex=this._getRawIdx,n}minmaxDownSample(e,t){let n=this.clone([e],!0),r=n._chunks,i=Math.floor(1/t),a=r[e],o=this.count(),s=new(qy(this._rawCount))(Math.ceil(o/i)*2),c=0;for(let e=0;e<o;e+=i){let t=e,n=a[this.getRawIndex(t)],r=e,l=a[this.getRawIndex(r)],u=i;e+i>o&&(u=o-e);for(let i=0;i<u;i++){let o=a[this.getRawIndex(e+i)];o<n&&(n=o,t=e+i),o>l&&(l=o,r=e+i)}let d=this.getRawIndex(t),f=this.getRawIndex(r);t<r?(s[c++]=d,s[c++]=f):(s[c++]=f,s[c++]=d)}return n._count=c,n._indices=s,n._updateGetRawIdx(),n}downSample(e,t,n,r){let i=this.clone([e],!0),a=i._chunks,o=[],s=Math.floor(1/t),c=a[e],l=this.count(),u=i._rawExtent[e]=ic(),d=new(qy(this._rawCount))(Math.ceil(l/s)),f=0;for(let e=0;e<l;e+=s){s>l-e&&(s=l-e,o.length=s);for(let t=0;t<s;t++){let n=this.getRawIndex(e+t);o[t]=c[n]}let t=n(o),i=this.getRawIndex(Math.min(e+r(o,t)||0,l-1));c[i]=t,t<u[0]&&(u[0]=t),t>u[1]&&(u[1]=t),d[f++]=i}return i._count=f,i._indices=d,i._updateGetRawIdx(),i}each(e,t){if(!this._count)return;let n=e.length,r=this._chunks;for(let i=0,a=this.count();i<a;i++){let a=this.getRawIndex(i);switch(n){case 0:t(i);break;case 1:t(r[e[0]][a],i);break;case 2:t(r[e[0]][a],r[e[1]][a],i);break;default:let o=0,s=[];for(;o<n;o++)s[o]=r[e[o]][a];s[o]=i,t.apply(null,s)}}}getDataExtent(e,t){let n=this._chunks[e],r=ic();if(!n)return r;let i=this.count();if(!this._indices&&!t)return this._rawExtent[e].slice();let a=this._extent,o=a[e]||(a[e]={}),s=Oy(t),c=s.key,l=o[c];if(l)return l.slice();let u=r[0],d=r[1];for(let e=0;e<i;e++){let r=n[this.getRawIndex(e)];(!t||ky(s,r))&&(r<u&&(u=r),r>d&&(d=r))}return o[c]=[u,d]}getRawDataItem(e){let t=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(t);{let e=[],n=this._chunks;for(let r=0;r<n.length;r++)e.push(n[r][t]);return e}}clone(t,n){let r=new e,i=this._chunks,a=t&&se(t,(e,t)=>(e[t]=!0,e),{});if(a)for(let e=0;e<i.length;e++)r._chunks[e]=a[e]?Jy(i[e]):i[e];else r._chunks=i;return this._copyCommonProps(r),n||(r._indices=this._cloneIndices()),r._updateGetRawIdx(),r}_copyCommonProps(e){e._count=this._count,e._rawCount=this._rawCount,e._provider=this._provider,e._dimensions=this._dimensions,e._extent=k(this._extent),e._rawExtent=k(this._rawExtent)}_cloneIndices(){if(this._indices){let e=this._indices.constructor,t;if(e===Array){let n=this._indices.length;t=new e(n);for(let e=0;e<n;e++)t[e]=this._indices[e]}else t=new e(this._indices);return t}return null}_getRawIdxIdentity(e){return e}_getRawIdx(e){return e<this._count&&e>=0?this._indices[e]:-1}_updateGetRawIdx(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity}};Xy.internalField=(function(){function e(e,t,n,r){return by(e[r],this._dimensions[r])}Ky={arrayRows:e,objectRows(e,t,n,r){return by(e[t],this._dimensions[r])},keyedColumns:e,original(e,t,n,r){let i=e&&(e.value==null?e:e.value);return by(i instanceof Array?i[r]:i,this._dimensions[r])},typedArray:function(e,t,n,r){return e[r]}}})();var Zy=class{constructor(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}dirty(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0}_setLocalSource(e,t){this._sourceList=e,this._upstreamSignList=t,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)}_getVersionSign(){return this._sourceHost.uid+`_`+this._versionSignBase}prepareSource(){this._isDirty()&&(this._createSource(),this._dirty=!1)}_createSource(){this._setLocalSource([],[]);let e=this._sourceHost,t=this._getUpstreamSourceManagers(),n=!!t.length,r,i;if($y(e)){let a=e,o,s,c;if(n){let e=t[0];e.prepareSource(),c=e.getSource(),o=c.data,s=c.sourceFormat,i=[e._getVersionSign()]}else o=a.get(`data`,!0),s=ge(o)?md:ud,i=[];let l=this._getSourceMetaRawOption()||{},u=c&&c.metaRawOption||{},d=V(l.seriesLayoutBy,u.seriesLayoutBy)||null,f=V(l.sourceHeader,u.sourceHeader),p=V(l.dimensions,u.dimensions);r=d!==u.seriesLayoutBy||!!f!=!!u.sourceHeader||p?[Hv(o,{seriesLayoutBy:d,sourceHeader:f,dimensions:p},s)]:[]}else{let a=e;if(n){let e=this._applyTransform(t);r=e.sourceList,i=e.upstreamSignList}else r=[Hv(a.get(`source`,!0),this._getSourceMetaRawOption(),null)],i=[]}typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(r&&i),this._setLocalSource(r,i)}_applyTransform(e){let t=this._sourceHost,n=t.get(`transform`,!0),r=t.get(`fromTransformResult`,!0);if(typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(r!=null||n!=null),r!=null){let t=``;e.length!==1&&(typeof process<`u`&&process.env.NODE_ENV!==`production`&&(t="When using `fromTransformResult`, there should be only one upstream dataset"),eb(t))}let i,a=[],o=[];return P(e,e=>{e.prepareSource();let t=e.getSource(r||0),n=``;r!=null&&!t&&(typeof process<`u`&&process.env.NODE_ENV!==`production`&&(n="Can not retrieve result by `fromTransformResult`: "+r),eb(n)),a.push(t),o.push(e._getVersionSign())}),n?i=Ry(n,a,{datasetIndex:t.componentIndex}):r!=null&&(i=[Wv(a[0])]),{sourceList:i,upstreamSignList:o}}_isDirty(){if(this._dirty)return!0;let e=this._getUpstreamSourceManagers();for(let t=0;t<e.length;t++){let n=e[t];if(n._isDirty()||this._upstreamSignList[t]!==n._getVersionSign())return!0}}getSource(e){e=e||0;let t=this._sourceList[e];if(!t){let t=this._getUpstreamSourceManagers();return t[0]&&t[0].getSource(e)}return t}getSharedDataStore(e){typeof process<`u`&&process.env.NODE_ENV!==`production`&&H($y(this._sourceHost),`Can only call getDataStore on series source manager.`);let t=e.makeStoreSchema();return this._innerGetDataStore(t.dimensions,e.source,t.hash)}_innerGetDataStore(e,t,n){let r=this._storeList,i=r[0];i||(i=r[0]={});let a=i[n];if(!a){let r=this._getUpstreamSourceManagers()[0];$y(this._sourceHost)&&r?a=r._innerGetDataStore(e,t,n):(a=new Xy,a.initData(new ey(t,e.length),e)),i[n]=a}return a}_getUpstreamSourceManagers(){let e=this._sourceHost;if($y(e)){let t=N_(e);return t?[t.getSourceManager()]:[]}return F(P_(e),e=>e.getSourceManager())}_getSourceMetaRawOption(){let e=this._sourceHost,t,n,r;if($y(e))t=e.get(`seriesLayoutBy`,!0),n=e.get(`sourceHeader`,!0),r=e.get(`dimensions`,!0);else if(!this._getUpstreamSourceManagers().length){let i=e;t=i.get(`seriesLayoutBy`,!0),n=i.get(`sourceHeader`,!0),r=i.get(`dimensions`,!0)}return{seriesLayoutBy:t,sourceHeader:n,dimensions:r}}};function Qy(e){e.option.transform&&Oe(e.option.transform)}function $y(e){return e.mainType===`series`}function eb(e){throw Error(e)}function tb(e){let t=e.lineHeight;return t==null?`line-height:1`:`line-height:${Ot(t+``)}px`}function nb(e,t){let n=e.color||Q.color.tertiary,r=e.fontSize||12,i=e.fontWeight||`400`,a=e.color||Q.color.secondary,o=e.fontSize||14,s=e.fontWeight||`900`;return t===`html`?{nameStyle:`font-size:${Ot(r+``)}px;color:${Ot(n)};font-weight:${Ot(i+``)}`,valueStyle:`font-size:${Ot(o+``)}px;color:${Ot(a)};font-weight:${Ot(s+``)}`}:{nameStyle:{fontSize:r,fill:n,fontWeight:i},valueStyle:{fontSize:o,fill:a,fontWeight:s}}}const rb=[0,10,20,30],ib=[``,`
26
+ `,`
27
+
28
+ `,`
29
+
30
+
31
+ `];function ab(e,t){return t.type=e,t}function ob(e){return e.type===`section`}function sb(e){return ob(e)?lb:ub}function cb(e){if(ob(e)){let t=0,n=e.blocks.length,r=n>1||n>0&&!e.noHeader;return P(e.blocks,function(e){let n=cb(e);n>=t&&(t=n+ +(r&&(!n||ob(e)&&!e.noHeader)))}),t}return 0}function lb(e,t,n,r){let i=t.noHeader,a=fb(cb(t)),o=[],s=t.blocks||[];H(!s||L(s)),s=s||[];let c=e.orderMode;if(t.sortBlocks&&c){s=s.slice();let e={valueAsc:`asc`,valueDesc:`desc`};if(W(e,c)){let t=new Ty(e[c],null);s.sort((e,n)=>t.evaluate(e.sortParam,n.sortParam))}else c===`seriesDesc`&&s.reverse()}P(s,function(n,i){let s=t.valueFormatter,c=sb(n)(s?j(j({},e),{valueFormatter:s}):e,n,i>0?a.html:0,r);c!=null&&o.push(c)});let l=e.renderMode===`richText`?o.join(a.richText):pb(r,o.join(``),i?n:a.html);if(i)return l;let u=Pg(t.header,`ordinal`,e.useUTC),{nameStyle:d}=nb(r,e.renderMode),f=tb(r);return e.renderMode===`richText`?gb(e,u,d)+a.richText+l:pb(r,`<div style="${d};${f};">`+Ot(u)+`</div>`+l,n)}function ub(e,t,n,r){let i=e.renderMode,a=t.noName,o=t.noValue,s=!t.markerType,c=t.name,l=e.useUTC,u=t.valueFormatter||e.valueFormatter||(e=>(e=L(e)?e:[e],F(e,(e,t)=>Pg(e,L(p)?p[t]:p,l))));if(a&&o)return;let d=s?``:e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||Q.color.secondary,i),f=a?``:Pg(c,`ordinal`,l),p=t.valueType,m=o?[]:u(t.value,t.rawDataIndex),h=!s||!a,g=!s&&a,{nameStyle:_,valueStyle:v}=nb(r,i);return i===`richText`?(s?``:d)+(a?``:gb(e,f,_))+(o?``:_b(e,m,h,g,v)):pb(r,(s?``:d)+(a?``:mb(f,!s,_))+(o?``:hb(m,h,g,v)),n)}function db(e,t,n,r,i,a){if(e)return sb(e)({useUTC:i,renderMode:n,orderMode:r,markupStyleCreator:t,valueFormatter:e.valueFormatter},e,0,a)}function fb(e){return{html:rb[e],richText:ib[e]}}function pb(e,t,n){return`<div style="${`margin: ${n}px 0 0`};${tb(e)};">`+t+`<div style="clear:both"></div></div>`}function mb(e,t,n){return`<span style="${n};${t?`margin-left:2px`:``}">`+Ot(e)+`</span>`}function hb(e,t,n,r){let i=t?`float:right;margin-left:${n?`10px`:`20px`}`:``;return e=L(e)?e:[e],`<span style="${i};${r}">`+F(e,e=>Ot(e)).join(`&nbsp;&nbsp;`)+`</span>`}function gb(e,t,n){return e.markupStyleCreator.wrapRichTextStyle(t,n)}function _b(e,t,n,r,i){let a=[i],o=r?10:20;return n&&a.push({padding:[0,0,0,o],align:`right`}),e.markupStyleCreator.wrapRichTextStyle(L(t)?t.join(` `):t,a)}function vb(e,t){let n=e.getData().getItemVisual(t,`style`)[e.visualDrawType];return Hg(n)}function yb(e,t){let n=e.get(`padding`);return n==null?t===`richText`?[8,10]:10:n}var bb=class{constructor(){this.richTextStyles={},this._nextStyleNameId=rs()}_generateStyleName(){return`__EC_aUTo_`+this._nextStyleNameId++}makeTooltipMarker(e,t,n){let r=n===`richText`?this._generateStyleName():null,i=zg({color:t,type:e,renderMode:n,markerId:r});return z(i)?i:(typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(r),this.richTextStyles[r]=i.style,i.content)}wrapRichTextStyle(e,t){let n={};L(t)?P(t,e=>j(n,e)):j(n,t);let r=this._generateStyleName();return this.richTextStyles[r]=n,`{${r}|${e}}`}};function xb(e){let t=e.series,n=e.dataIndex,r=e.multipleSeries,i=t.getData(),a=i.mapDimensionsAll(`defaultedTooltip`),o=a.length,s=t.getRawValue(n),c=L(s),l=vb(t,n),u,d,f,p;if(o>1||c&&!o){let e=Sb(s,t,n,a,l);u=e.inlineValues,d=e.inlineValueTypes,f=e.blocks,p=e.inlineValues[0]}else if(o){let e=i.getDimensionInfo(a[0]);p=u=py(i,n,a[0]),d=e.type}else p=u=c?s[0]:s;let m=Ls(t),h=m&&t.name||``,g=i.getName(n),_=r?h:g;return ab(`section`,{header:h,noHeader:r||!m,sortParam:p,blocks:[ab(`nameValue`,{markerType:`item`,markerColor:l,name:_,noName:!Ee(_),value:u,valueType:d,rawDataIndex:i.getRawIndex(n)})].concat(f||[])})}function Sb(e,t,n,r,i){let a=t.getData(),o=se(e,function(e,t,n){let r=a.getDimensionInfo(n);return e=e||r&&r.tooltip!==!1&&r.displayName!=null},!1),s=[],c=[],l=[];r.length?P(r,function(e){u(py(a,n,e),e)}):P(e,u);function u(e,t){let n=a.getDimensionInfo(t);n&&n.otherDims.tooltip!==!1&&(o?l.push(ab(`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 Cb;const wb=Y();function Tb(e,t){return e.getName(t)||e.getId(t)}const Eb=`__universalTransitionEnabled`;var Db=class extends b_{constructor(...e){super(...e),this._selectedDataIndicesMap={}}init(e,t,n){this.seriesIndex=this.componentIndex,this.dataTask=_y({count:Ab,reset:jb}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n),(wb(this).sourceManager=new Zy(this)).prepareSource();let r=this.getInitialData(e,n);Nb(r,this),this.dataTask.context.data=r,typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(r,`getInitialData returned invalid data.`),wb(this).dataBeforeProcessed=r,Ob(this),this._initSelectedMapFromData(r)}mergeDefaultAndTheme(e,t){let n=m_(this),r=n?g_(e):{},i=this.subType;b_.hasClass(i)&&(i+=`Series`),A(e,t.getTheme().get(this.subType)),A(e,this.getDefaultOption()),xs(e,`label`,[`show`]),this.fillDataTextStyle(e.data),n&&h_(e,r,n)}mergeOption(e,t){e=A(this.option,e,!0),this.fillDataTextStyle(e.data);let n=m_(this);n&&h_(this.option,e,n);let r=wb(this).sourceManager;r.dirty(),r.prepareSource();let i=this.getInitialData(e,t);Nb(i,this),this.dataTask.dirty(),this.dataTask.context.data=i,wb(this).dataBeforeProcessed=i,Ob(this),this._initSelectedMapFromData(i)}fillDataTextStyle(e){if(e&&!ge(e)){let t=[`show`];for(let n=0;n<e.length;n++)e[n]&&e[n].label&&xs(e[n],`label`,t)}}getInitialData(e,t){}appendData(e){this.getRawData().appendData(e.data)}getData(e){let t=Fb(this);if(t){let n=t.context.data;return e==null||!n.getLinkedData?n:n.getLinkedData(e)}return wb(this).data}getAllData(){let e=this.getData();return e&&e.getLinkedDataAll?e.getLinkedDataAll():[{data:e}]}setData(e){let t=Fb(this);if(t){let n=t.context;n.outputData=e,t!==this.dataTask&&(n.data=e)}wb(this).data=e}getEncode(){let e=this.get(`encode`,!0);if(e)return U(e)}getSourceManager(){return wb(this).sourceManager}getSource(){return this.getSourceManager().getSource()}getRawData(){return wb(this).dataBeforeProcessed}getColorBy(){return this.get(`colorBy`)||`series`}isColorBySeries(){return this.getColorBy()===`series`}getBaseAxis(){let e=this.coordinateSystem;return e&&e.getBaseAxis&&e.getBaseAxis()}indicesOfNearest(e,t,n,r){let i=this.getData(),a=this.coordinateSystem,o=a&&a.getAxis(e);if(!a||!o)return[];let s=o.dataToCoord(n);r==null&&(r=1/0);let c=[],l=1/0,u=-1,d=0,f=i.getDimensionIndex(t),p=i.getStore();for(let e=0,t=p.count();e<t;e++){let t=p.get(f,e),n=s-o.dataToCoord(t),i=Math.abs(n);i<=r&&((i<l||i===l&&n>=0&&u<0)&&(l=i,u=n,d=0),n===u&&(c[d++]=e))}return c.length=d,c}formatTooltip(e,t,n){return xb({series:this,dataIndex:e,multipleSeries:t})}isAnimationEnabled(){let e=this.ecModel;if(s.node&&!(e&&e.ssr))return!1;let t=this.getShallow(`animation`);return t&&this.getData().count()>this.getShallow(`animationThreshold`)&&(t=!1),!!t}restoreData(){this.dataTask.dirty()}getColorFromPalette(e,t,n){let r=this.ecModel,i=H_.prototype.getColorFromPalette.call(this,e,t,n);return i||(i=r.getColorFromPalette(e,t,n)),i}coordDimToDataDim(e){return this.getRawData().mapDimensionsAll(e)}getProgressive(){return this.get(`progressive`)}getProgressiveThreshold(){return this.get(`progressiveThreshold`)}select(e,t){this._innerSelect(this.getData(t),e)}unselect(e,t){let n=this.option.selectedMap;if(!n)return;let r=this.option.selectedMode,i=this.getData(t);if(r===`series`||n===`all`)this.option.selectedMap={},this._selectedDataIndicesMap={};else for(let t=0;t<e.length;t++){let r=e[t],a=Tb(i,r);n[a]=!1,this._selectedDataIndicesMap[a]=-1}}toggleSelect(e,t){let n=[];for(let r=0;r<e.length;r++)n[0]=e[r],this.isSelected(e[r],t)?this.unselect(n,t):this.select(n,t)}getSelectedDataIndices(){if(this.option.selectedMap===`all`)return[].slice.call(this.getData().getIndices());let e=this._selectedDataIndicesMap,t=ue(e),n=[];for(let r=0;r<t.length;r++){let i=e[t[r]];i>=0&&n.push(i)}return n}isSelected(e,t){let n=this.option.selectedMap;if(!n)return!1;let r=this.getData(t);return(n===`all`||n[Tb(r,e)])&&!r.getItemModel(e).get([`select`,`disabled`])}isUniversalTransitionEnabled(){if(this.__universalTransitionEnabled)return!0;let e=this.option.universalTransition;return e?e===!0||e&&e.enabled:!1}_innerSelect(e,t){let n=this.option,r=n.selectedMode,i=t.length;if(r&&i){if(r===`series`)n.selectedMap=`all`;else if(r===`multiple`){B(n.selectedMap)||(n.selectedMap={});let r=n.selectedMap;for(let n=0;n<i;n++){let i=t[n],a=Tb(e,i);r[a]=!0,this._selectedDataIndicesMap[a]=e.getRawIndex(i)}}else if(r===`single`||r===!0){let r=t[i-1],a=Tb(e,r);n.selectedMap={[a]:!0},this._selectedDataIndicesMap={[a]:e.getRawIndex(r)}}}}_initSelectedMapFromData(e){if(this.option.selectedMap)return;let t=[];e.hasItemOption&&e.each(function(n){let r=e.getRawDataItem(n);r&&r.selected&&t.push(n)}),t.length>0&&this._innerSelect(e,t)}static registerClass(e){return b_.registerClass(e)}};Cb=Db,Db.protoInitialize=(function(){let e=Cb.prototype;e.type=`series.__base__`,e.seriesIndex=0,e.ignoreStyleOnData=!1,e.hasSymbolVisual=!1,e.defaultSymbol=`circle`,e.visualStyleAccessPath=`itemStyle`,e.visualDrawType=`fill`})(),ae(Db,hy),ae(Db,H_),Ac(Db,b_);function Ob(e){let t=e.name;Ls(e)||(e.name=kb(e)||t)}function kb(e){let t=e.getRawData(),n=t.mapDimensionsAll(`seriesName`),r=[];return P(n,function(e){let n=t.getDimensionInfo(e);n.displayName&&r.push(n.displayName)}),r.join(` `)}function Ab(e){return e.model.getRawData().count()}function jb(e){let t=e.model;return t.setData(t.getRawData().cloneShallow()),Mb}function Mb(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function Nb(e,t){P(Pe(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(n){e.wrapMethod(n,fe(Pb,t))})}function Pb(e,t){let n=Fb(e);return n&&n.setOutputEnd((t||this).count()),t}function Fb(e){let t=(e.ecModel||{}).scheduler,n=t&&t.getPipeline(e.uid);if(n){let t=n.currentTask;if(t){let n=t.agentStubMap;n&&(t=n.get(e.uid))}return t}}var Ib=class{constructor(){this.group=new q,this.uid=jh(`viewComponent`)}init(e,t){}render(e,t,n,r){}dispose(e,t){}updateView(e,t,n,r){}updateLayout(e,t,n,r){}updateVisual(e,t,n,r){}toggleBlurSeries(e,t,n){}eachRendered(e){let t=this.group;t&&t.traverse(e)}};Oc(Ib),Fc(Ib);function Lb(){let e=Y();return function(t){let 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 Rb;const zb=Y(),Bb=Lb();var Vb=class{constructor(){this.group=new q,this.uid=jh(`viewChart`),this.renderTask=_y({plan:Wb,reset:Gb}),this.renderTask.context={view:this}}init(e,t){}render(e,t,n,r){if(typeof process<`u`&&process.env.NODE_ENV!==`production`)throw Error(`render method must been implemented`)}highlight(e,t,n,r){let i=e.getData(r&&r.dataType);i?Ub(i,r,`emphasis`):typeof process<`u`&&process.env.NODE_ENV!==`production`&&fs(`Unknown dataType ${r.dataType}`)}downplay(e,t,n,r){let i=e.getData(r&&r.dataType);i?Ub(i,r,`normal`):typeof process<`u`&&process.env.NODE_ENV!==`production`&&fs(`Unknown dataType ${r.dataType}`)}remove(e,t){this.group.removeAll()}dispose(e,t){}updateView(e,t,n,r){this.render(e,t,n,r)}updateVisual(e,t,n,r){this.render(e,t,n,r)}eachRendered(e){Hm(this.group,e)}static markUpdateMethod(e,t){zb(e).updateMethod=t}};Rb=Vb,Vb.protoInitialize=(function(){let e=Rb.prototype;e.type=`chart`})();function Hb(e,t,n){e&&Cf(e)&&(t===`emphasis`?Zd:Qd)(e,n)}function Ub(e,t,n){let r=Us(e,t),i=t&&t.highlightKey!=null?Tf(t.highlightKey):null;r==null?e.eachItemGraphicEl(function(e){Hb(e,n,i)}):P(bs(r),function(t){Hb(e.getItemGraphicEl(t),n,i)})}Oc(Vb,[`dispose`]),Fc(Vb);function Wb(e){return Bb(e.model)}function Gb(e){let t=e.model,n=e.ecModel,r=e.api,i=e.payload,a=t.pipelineContext.progressiveRender,o=e.view,s=i&&zb(i).updateMethod,c=a?`incrementalPrepareRender`:s&&o[s]?s:`render`;return c!==`render`&&o[c](t,n,r,i),Kb[c]}const Kb={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)}}},qb=`\0__throttleOriginMethod`,Jb=`\0__throttleRate`,Yb=`\0__throttleType`;function Xb(e,t,n){let r,i=0,a=0,o=null,s,c,l,u;t=t||0;function d(){a=(/* @__PURE__ */ new Date()).getTime(),o=null,e.apply(c,l||[])}let f=function(...e){r=(/* @__PURE__ */ new Date()).getTime(),c=this,l=e;let 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),o=null)},f.debounceNextCall=function(e){u=e},f}function Zb(e,t,n,r){let i=e[t];if(!i)return;let a=i[qb]||i,o=i[Yb];if(i[Jb]!==n||o!==r){if(n==null||!r)return e[t]=a;i=e[t]=Xb(a,n,r===`debounce`),i[qb]=a,i[Yb]=r,i[Jb]=n}return i}function Qb(e,t){let n=e[t];n&&n[qb]&&(n.clear&&n.clear(),e[t]=n[qb])}const $b=Y(),ex={itemStyle:Ic(Eh,!0),lineStyle:Ic(Ch,!0)},tx={lineStyle:`stroke`,itemStyle:`fill`};function nx(e,t){return e.visualStyleMapper||ex[t]||(console.warn(`Unknown style type '${t}'.`),ex.itemStyle)}function rx(e,t){return e.visualDrawType||tx[t]||(console.warn(`Unknown style type '${t}'.`),`fill`)}const ix={createOnAllSeries:!0,performRawSeries:!0,reset(e,t){let n=e.getData(),r=e.visualStyleAccessPath||`itemStyle`,i=e.getModel(r),a=nx(e,r)(i),o=i.getShallow(`decal`);o&&(n.setVisual(`decal`,o),o.dirty=!0);let s=rx(e,r),c=a[s],l=R(c)?c:null,u=a.fill===`auto`||a.stroke===`auto`;if(!a[s]||l||u){let r=e.getColorFromPalette(e.name,null,t.getSeriesCount());a[s]||(a[s]=r,n.setVisual(`colorFromPalette`,!0)),a.fill=a.fill===`auto`||R(a.fill)?r:a.fill,a.stroke=a.stroke===`auto`||R(a.stroke)?r:a.stroke}if(n.setVisual(`style`,a),n.setVisual(`drawType`,s),!t.isSeriesFiltered(e)&&l)return n.setVisual(`colorFromPalette`,!1),{dataEach(t,n){let r=e.getDataParams(n),i=j({},a);i[s]=l(r),t.setItemVisual(n,`style`,i)}}}},ax=new kh,ox={createOnAllSeries:!0,reset(e,t){if(e.ignoreStyleOnData)return;let n=e.getData(),r=e.visualStyleAccessPath||`itemStyle`,i=nx(e,r),a=n.getVisual(`drawType`);return{dataEach:n.hasItemOption?function(e,t){let n=e.getRawDataItem(t);if(n&&n[r]){ax.option=n[r];let o=i(ax);j(e.ensureUniqueItemVisual(t,`style`),o),ax.option.decal&&(e.setItemVisual(t,`decal`,ax.option.decal),ax.option.decal.dirty=!0),a in o&&e.setItemVisual(t,`colorFromPalette`,!1)}}:null}}},sx={performRawSeries:!0,overallReset(e){let t=U();e.eachSeries(e=>{if(!e.isColorBySeries()){let n=e.type+`-`+e.getColorBy();$b(e).scope=t.get(n)||t.set(n,{})}}),e.eachSeries(e=>{if(e.isColorBySeries())return;let t=e.getRawData(),n={},r=e.getData(),i=$b(e).scope,a=rx(e,e.visualStyleAccessPath||`itemStyle`);r.each(function(e){let t=r.getRawIndex(e);n[t]=e}),t.each(function(o){let s=n[o];if(r.getItemVisual(s,`colorFromPalette`)){let n=r.ensureUniqueItemVisual(s,`style`),c=t.getName(o)||o+``,l=t.count();n[a]=e.getColorFromPalette(c,i,l)}})})}},cx=Math.PI;function lx(e,t){t=t||{},M(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});let n=new q,r=new Uu({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});n.add(r);let i=new qu({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 Uu({style:{fill:`none`},textContent:i,textConfig:{position:`right`,distance:10},zlevel:t.zlevel,z:10001});n.add(a);let o;return t.showSpinner&&(o=new Fp({shape:{startAngle:-cx/2,endAngle:-cx/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:cx*3/2}).start(`circularInOut`),o.animateShape(!0).when(1e3,{startAngle:cx*3/2}).delay(300).start(`circularInOut`),n.add(o)),n.resize=function(){let 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 ux=class{constructor(e,t,n,r){this._stageTaskMap=U(),this.ecInstance=e,this.api=t,n=this._dataProcessorHandlers=n.slice(),r=this._visualHandlers=r.slice(),this._allHandlers=n.concat(r)}restoreData(e,t){e.restoreData(t),this._stageTaskMap.each(function(e){let t=e.overallTask;t&&t.dirty()})}getPerformArgs(e,t){if(!e.__pipeline)return;let 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}}getPipeline(e){return this._pipelineMap.get(e)}updateStreamModes(e,t){let n=this._pipelineMap.get(e.uid);e.pipelineContext=n.context=e.__preparePipelineContext?e.__preparePipelineContext(t,n):yc(e,t,n)}restorePipelines(e,t){let n=this,r=n._pipelineMap=U();t.eachSeries(function(t){let i=e.painter.type===`canvas`&&t.getProgressive(),a=t.uid;r.set(a,{id:a,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:i&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),n._pipe(t,t.dataTask)})}prepareStageTasks(){let e=this._stageTaskMap,t=this.api.getModel(),n=this.api;P(this._allHandlers,function(r){let i=e.get(r.uid)||e.set(r.uid,{}),a=``;typeof process<`u`&&process.env.NODE_ENV!==`production`&&(a=`"reset" and "overallReset" must not be both specified.`),H(!(r.reset&&r.overallReset),a),r.reset&&this._createSeriesStageTask(r,i,t,n),r.overallReset&&this._createOverallStageTask(r,i,t,n)},this)}prepareView(e,t,n,r){let i=e.renderTask,a=i.context;a.model=t,a.ecModel=n,a.api=r,i.__block=!e.incrementalPrepareRender,this._pipe(t,i)}performDataProcessorTasks(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})}performVisualTasks(e,t,n){this._performStageTasks(this._visualHandlers,e,t,n)}_performStageTasks(e,t,n,r){r=r||{};let i=!1,a=this;P(e,function(e,s){if(r.visualType&&r.visualType!==e.visualType)return;let c=a._stageTaskMap.get(e.uid),l=c.seriesTaskMap,u=c.overallTask;if(u){let e,t=u.agentStubMap;t.each(function(t){o(r,t)&&(t.dirty(),e=!0)}),e&&u.dirty(),a.updatePayload(u,n);let s=a.getPerformArgs(u,r.block);t.each(function(e){e.perform(s)}),u.perform(s)&&(i=!0)}else l&&l.each(function(s,c){o(r,s)&&s.dirty();let 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}performSeriesTasks(e){let t;e.eachSeries(function(e){t=e.dataTask.perform()||t}),this.unfinished=t||this.unfinished}plan(){this._pipelineMap.each(function(e){let t=e.tail;do{if(t.__block){e.blockIndex=t.__idxInPipeline;break}t=t.getUpstream()}while(t)})}updatePayload(e,t){t!==`remain`&&(e.context.payload=t)}_createSeriesStageTask(e,t,n,r){let i=this,a=t.seriesTaskMap,o=t.seriesTaskMap=U(),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){let s=t.uid,c=o.set(s,a&&a.get(s)||_y({plan:hx,reset:gx,count:yx}));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)}}_createOverallStageTask(e,t,n,r){let i=this,a=t.overallTask=t.overallTask||_y({reset:dx});a.context={ecModel:n,api:r,overallReset:e.overallReset,scheduler:i};let o=a.agentStubMap,s=a.agentStubMap=U(),c=e.seriesType,l=e.getTargetSeries,u=e.dirtyOnOverallProgress,d=!1,f=``;typeof process<`u`&&process.env.NODE_ENV!==`production`&&(f=`"createOnAllSeries" is not supported for "overallReset", because it will block all streams.`),H(!e.createOnAllSeries,f),c?n.eachRawSeriesByType(c,p):l?l(n,r).each(p):P(n.getSeries(),p);function p(e){let t=e.uid,n=s.set(t,o&&o.get(t)||(d=!0,_y({reset:fx,onDirty:mx})));n.context={model:e,dirtyOnOverallProgress:u},n.agent=a,n.__block=u,i._pipe(e,n)}d&&a.dirty()}_pipe(e,t){let 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}static wrapStageHandler(e,t){return R(e)&&(e={overallReset:e,seriesType:bx(e)}),e.uid=jh(`stageHandler`),t&&(e.visualType=t),e}};function dx(e){e.overallReset(e.ecModel,e.api,e.payload)}function fx(e){return e.dirtyOnOverallProgress&&px}function px(){this.agent.dirty(),this.getDownstream().dirty()}function mx(){this.agent&&this.agent.dirty()}function hx(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function gx(e){e.useClearVisual&&e.data.clearAllVisual();let t=e.resetDefines=bs(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?F(t,function(e,t){return vx(t)}):_x}const _x=vx(0);function vx(e){return function(t,n){let r=n.data,i=n.resetDefines[e];if(i&&i.dataEach)for(let e=t.start;e<t.end;e++)i.dataEach(r,e);else i&&i.progress&&i.progress(t,r)}}function yx(e){return e.data.count()}function bx(e){Cx=null;try{e(xx,Sx)}catch(e){}return Cx}const xx={},Sx={};let Cx;Tx(xx,tv),Tx(Sx,vd),xx.eachSeriesByType=xx.eachRawSeriesByType=function(e){Cx=e},xx.eachComponent=function(e){e.mainType===`series`&&e.subType&&(Cx=e.subType)};function Tx(e,t){for(let n in t.prototype)e[n]=Le}const $=Q.darkColor,Ex=$.background,Dx=function(){return{axisLine:{lineStyle:{color:$.axisLine}},splitLine:{lineStyle:{color:$.axisSplitLine}},splitArea:{areaStyle:{color:[$.backgroundTint,$.backgroundTransparent]}},minorSplitLine:{lineStyle:{color:$.axisMinorSplitLine}},axisLabel:{color:$.axisLabel},axisName:{}}},Ox={label:{color:$.secondary},itemStyle:{borderColor:$.borderTint},dividerLineStyle:{color:$.border}},kx={darkMode:!0,color:$.theme,backgroundColor:Ex,axisPointer:{lineStyle:{color:$.border},crossStyle:{color:$.borderShade},label:{color:$.tertiary}},legend:{textStyle:{color:$.secondary},pageTextStyle:{color:$.tertiary}},textStyle:{color:$.secondary},title:{textStyle:{color:$.primary},subtextStyle:{color:$.quaternary}},toolbox:{iconStyle:{borderColor:$.accent50},feature:{dataView:{backgroundColor:Ex,textColor:$.primary,textareaColor:$.background,textareaBorderColor:$.border,buttonColor:$.accent50,buttonTextColor:$.neutral00}}},tooltip:{backgroundColor:$.neutral20,defaultBorderColor:$.border,textStyle:{color:$.tertiary}},dataZoom:{borderColor:$.accent10,textStyle:{color:$.tertiary},brushStyle:{color:$.backgroundTint},handleStyle:{color:$.neutral00,borderColor:$.accent20},moveHandleStyle:{color:$.accent40},emphasis:{handleStyle:{borderColor:$.accent50}},dataBackground:{lineStyle:{color:$.accent30},areaStyle:{color:$.accent20}},selectedDataBackground:{lineStyle:{color:$.accent50},areaStyle:{color:$.accent30}}},visualMap:{textStyle:{color:$.secondary},handleStyle:{borderColor:$.neutral30}},timeline:{lineStyle:{color:$.accent10},label:{color:$.tertiary},controlStyle:{color:$.accent30,borderColor:$.accent30}},calendar:{itemStyle:{color:$.neutral00,borderColor:$.neutral20},dayLabel:{color:$.tertiary},monthLabel:{color:$.secondary},yearLabel:{color:$.secondary}},matrix:{x:Ox,y:Ox,backgroundColor:{borderColor:$.axisLine},body:{itemStyle:{borderColor:$.borderTint}}},timeAxis:Dx(),logAxis:Dx(),valueAxis:Dx(),categoryAxis:Dx(),line:{symbol:`circle`},graph:{color:$.theme},gauge:{title:{color:$.secondary},axisLine:{lineStyle:{color:[[1,$.neutral05]]}},axisLabel:{color:$.axisLabel},detail:{color:$.primary}},candlestick:{itemStyle:{color:`#f64e56`,color0:`#54ea92`,borderColor:`#f64e56`,borderColor0:`#54ea92`}},funnel:{itemStyle:{borderColor:$.background}},radar:(()=>{let e=Dx();return e.axisName={color:$.axisLabel},e.axisLine.lineStyle.color=$.neutral20,e})(),treemap:{breadcrumb:{itemStyle:{color:$.neutral20,textStyle:{color:$.secondary}},emphasis:{itemStyle:{color:$.neutral30}}}},sunburst:{itemStyle:{borderColor:$.background}},map:{itemStyle:{borderColor:$.border,areaColor:$.neutral10},label:{color:$.tertiary},emphasis:{label:{color:$.primary},itemStyle:{areaColor:$.highlight}},select:{label:{color:$.primary},itemStyle:{areaColor:$.highlight}}},geo:{itemStyle:{borderColor:$.border,areaColor:$.neutral10},emphasis:{label:{color:$.primary},itemStyle:{areaColor:$.highlight}},select:{label:{color:$.primary},itemStyle:{color:$.highlight}}}};kx.categoryAxis.splitLine.show=!1;var Ax=class{normalizeQuery(e){let t={},n={},r={};if(z(e)){let n=Tc(e);t.mainType=n.main||null,t.subType=n.sub||null}else{let i=[`Index`,`Name`,`Id`],a={name:1,dataIndex:1,dataType:1};P(e,function(e,o){let s=!1;for(let n=0;n<i.length;n++){let r=i[n],a=o.lastIndexOf(r);if(a>0&&a===o.length-r.length){let n=o.slice(0,a);n!==`data`&&(t.mainType=n,t[r.toLowerCase()]=e,s=!0)}}a.hasOwnProperty(o)&&(n[o]=e,s=!0),s||(r[o]=e)})}return{cptQuery:t,dataQuery:n,otherQuery:r}}filter(e,t){let n=this.eventInfo;if(!n)return!0;let r=n.targetEl,i=n.packedEvent,a=n.model,o=n.view;if(!a||!o)return!0;let 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]}}afterTrigger(){this.eventInfo=null}};const jx=[`symbol`,`symbolSize`,`symbolRotate`,`symbolOffset`],Mx=jx.concat([`symbolKeepAspect`]),Nx={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){let n=e.getData();if(e.legendIcon&&n.setVisual(`legendIcon`,e.legendIcon),!e.hasSymbolVisual)return;let r={},i={},a=!1;for(let t=0;t<jx.length;t++){let n=jx[t],o=e.get(n);R(o)?(a=!0,i[n]=o):r[n]=o}if(r.symbol=r.symbol||e.defaultSymbol,n.setVisual(j({legendIcon:e.legendIcon||r.symbol,symbolKeepAspect:e.get(`symbolKeepAspect`)},r)),t.isSeriesFiltered(e))return;let o=ue(i);function s(t,n){let r=e.getRawValue(n),a=e.getDataParams(n);for(let e=0;e<o.length;e++){let s=o[e];t.setItemVisual(n,s,i[s](r,a))}}return{dataEach:a?s:null}}},Px={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(!e.hasSymbolVisual||t.isSeriesFiltered(e))return;let n=e.getData();function r(e,t){let n=e.getItemModel(t);for(let r=0;r<Mx.length;r++){let i=Mx[r],a=n.getShallow(i,!0);a!=null&&e.setItemVisual(t,i,a)}}return{dataEach:n.hasItemOption?r:null}}};function Fx(e,t,n){switch(n){case`color`:return e.getItemVisual(t,`style`)[e.getVisual(`drawType`)];case`opacity`:return e.getItemVisual(t,`style`).opacity;case`symbol`:case`symbolSize`:case`liftZ`:return e.getItemVisual(t,n);default:typeof process<`u`&&process.env.NODE_ENV!==`production`&&console.warn(`Unknown visual type ${n}`)}}function Ix(e,t){switch(t){case`color`:return e.getVisual(`style`)[e.getVisual(`drawType`)];case`opacity`:return e.getVisual(`style`).opacity;case`symbol`:case`symbolSize`:case`liftZ`:return e.getVisual(t);default:typeof process<`u`&&process.env.NODE_ENV!==`production`&&console.warn(`Unknown visual type ${t}`)}}function Lx(e,t,n,r){switch(n){case`color`:let i=e.ensureUniqueItemVisual(t,`style`);i[e.getVisual(`drawType`)]=r,e.setItemVisual(t,`colorFromPalette`,!1);break;case`opacity`:e.ensureUniqueItemVisual(t,`style`).opacity=r;break;case`symbol`:case`symbolSize`:case`liftZ`:e.setItemVisual(t,n,r);break;default:typeof process<`u`&&process.env.NODE_ENV!==`production`&&console.warn(`Unknown visual type ${n}`)}}function Rx(e,t){function n(t,n){let r=[];return t.eachComponent({mainType:`series`,subType:e,query:n},function(e){r.push(e.seriesIndex)}),r}P([[e+`ToggleSelect`,`toggleSelect`],[e+`Select`,`select`],[e+`UnSelect`,`unselect`]],function(e){t(e[0],function(t,r,i){t=j({},t),typeof process<`u`&&process.env.NODE_ENV!==`production`&&ms(t.type,e[1]),i.dispatchAction(j(t,{type:e[1],seriesIndex:n(r,t)}))})})}function zx(e,t,n,r,i){let a=e+t;n.isSilent(a)||(typeof process<`u`&&process.env.NODE_ENV!==`production`&&ps(`event ${a} is deprecated.`),r.eachComponent({mainType:`series`,subType:`pie`},function(e){let t=e.seriesIndex,r=e.option.selectedMap,o=i.selected;for(let s=0;s<o.length;s++)if(o[s].seriesIndex===t){let t=e.getData(),o=Us(t,i.fromActionPayload);n.trigger(a,{type:a,seriesId:e.id,name:L(o)?t.getName(o[0]):t.getName(o),selected:z(r)?r:j({},r)})}}))}function Bx(e,t,n){e.on(`selectchanged`,function(e){let r=n.getModel();e.isFromClick?(zx(`map`,`selectchanged`,t,r,e),zx(`pie`,`selectchanged`,t,r,e)):e.fromAction===`select`?(zx(`map`,`selected`,t,r,e),zx(`pie`,`selected`,t,r,e)):e.fromAction===`unselect`&&(zx(`map`,`unselected`,t,r,e),zx(`pie`,`unselected`,t,r,e))})}function Vx(e,t,n){let r;for(;e&&!(t(e)&&(r=e,n));)e=e.__hostTarget||e.parent;return r}const Hx=new mt,Ux={};function Wx(e,t){typeof process<`u`&&process.env.NODE_ENV!==`production`&&Ux[e]&&fs(`Already has an implementation of ${e}.`),Ux[e]=t}function Gx(e){return typeof process<`u`&&process.env.NODE_ENV!==`production`&&(Ux[e]||fs(`Implementation of ${e} doesn't exists.`)),Ux[e]}const Kx={};function qx(e,t){Kx[e]=t}function Jx(e){return Kx[e]}const Yx=Y();function Xx(e){Yx(e).prepare={}}function Zx(e){Yx(e).fullUpdate={}}function Qx(e){return Yx(e).prepare}function $x(e){return Yx(e).fullUpdate}let eS=Math.round(Math.random()*9);const tS=typeof Object.defineProperty==`function`;var nS=class{constructor(){this._id=`__ec_inner_`+eS++}get(e){return this._guard(e)[this._id]}set(e,t){let n=this._guard(e);return tS?Object.defineProperty(n,this._id,{value:t,enumerable:!1,configurable:!0}):n[this._id]=t,this}delete(e){return this.has(e)?(delete this._guard(e)[this._id],!0):!1}has(e){return!!this._guard(e)[this._id]}_guard(e){if(e!==Object(e))throw TypeError(`Value of WeakMap is not a non-null object.`);return e}};const rS=Ou.extend({type:`triangle`,shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){let n=t.cx,r=t.cy,i=t.width/2,a=t.height/2;e.moveTo(n,r-a),e.lineTo(n+i,r+a),e.lineTo(n-i,r+a),e.closePath()}}),iS={line:kp,rect:Uu,roundRect:Uu,square:Uu,circle:$f,diamond:Ou.extend({type:`diamond`,shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){let n=t.cx,r=t.cy,i=t.width/2,a=t.height/2;e.moveTo(n,r-a),e.lineTo(n+i,r),e.lineTo(n,r+a),e.lineTo(n-i,r),e.closePath()}}),pin:Ou.extend({type:`pin`,shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){let n=t.x,r=t.y,i=t.width/5*3,a=Math.max(i,t.height),o=i/2,s=o*o/(a-o),c=r-a+o+s,l=Math.asin(s/o),u=Math.cos(l)*o,d=Math.sin(l),f=Math.cos(l),p=o*.6,m=o*.7;e.moveTo(n-u,c+s),e.arc(n,c,o,Math.PI-l,Math.PI*2+l),e.bezierCurveTo(n+u-d*p,c+s+f*p,n,r-m,n,r),e.bezierCurveTo(n,r-m,n-u+d*p,c+s+f*p,n-u,c+s),e.closePath()}}),arrow:Ou.extend({type:`arrow`,shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){let n=t.height,r=t.width,i=t.x,a=t.y,o=r/3*2;e.moveTo(i,a),e.lineTo(i+o,a+n),e.lineTo(i,a+n/4*3),e.lineTo(i-o,a+n),e.lineTo(i,a),e.closePath()}}),triangle:rS},aS={line:function(e,t,n,r,i){i.x1=e,i.y1=t+r/2,i.x2=e+n,i.y2=t+r/2},rect:function(e,t,n,r,i){i.x=e,i.y=t,i.width=n,i.height=r},roundRect:function(e,t,n,r,i){i.x=e,i.y=t,i.width=n,i.height=r,i.r=Math.min(n,r)/4},square:function(e,t,n,r,i){let a=Math.min(n,r);i.x=e,i.y=t,i.width=a,i.height=a},circle:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.r=Math.min(n,r)/2},diamond:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.width=n,i.height=r},pin:function(e,t,n,r,i){i.x=e+n/2,i.y=t+r/2,i.width=n,i.height=r},arrow:function(e,t,n,r,i){i.x=e+n/2,i.y=t+r/2,i.width=n,i.height=r},triangle:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.width=n,i.height=r}},oS={};P(iS,function(e,t){oS[t]=new e});const sS=Ou.extend({type:`symbol`,shape:{symbolType:``,x:0,y:0,width:0,height:0},calculateTextPosition(e,t,n){let r=La(e,t,n),i=this.shape;return i&&i.symbolType===`pin`&&t.position===`inside`&&(r.y=n.y+n.height*.4),r},buildPath(e,t,n){let r=t.symbolType;if(r!==`none`){let i=oS[r];i||(r=`rect`,i=oS[r]),aS[r](t.x,t.y,t.width,t.height,i.shape),i.buildPath(e,i.shape,n)}}});function cS(e,t){if(this.type!==`image`){let n=this.style;this.__isEmptyBrush?(n.stroke=e,n.fill=t||Q.color.neutral00,n.lineWidth=2):this.shape.symbolType===`line`?n.stroke=e:n.fill=e,this.markRedraw()}}function lS(e,t,n,r,i,a,o){let s=e.indexOf(`empty`)===0;s&&(e=e.substr(5,1).toLowerCase()+e.substr(6));let c;return c=e.indexOf(`image://`)===0?_m(e.slice(8),new K(t,n,r,i),o?`center`:`cover`):e.indexOf(`path://`)===0?gm(e.slice(7),{},new K(t,n,r,i),o?`center`:`cover`):new sS({shape:{symbolType:e,x:t,y:n,width:r,height:i}}),c.__isEmptyBrush=s,c.setColor=cS,a&&c.setColor(a),c}function uS(e){return L(e)||(e=[+e,+e]),[e[0]||0,e[1]||0]}function dS(e,t){if(e!=null)return L(e)||(e=[e,e]),[J(e[0],t[0])||0,J(V(e[1],e[0]),t[1])||0]}function fS(e){return isFinite(e)}function pS(e,t,n){let r=t.x==null?0:t.x,i=t.x2==null?1:t.x2,a=t.y==null?0:t.y,o=t.y2==null?0:t.y2;return t.global||(r=r*n.width+n.x,i=i*n.width+n.x,a=a*n.height+n.y,o=o*n.height+n.y),r=fS(r)?r:0,i=fS(i)?i:1,a=fS(a)?a:0,o=fS(o)?o:0,e.createLinearGradient(r,a,i,o)}function mS(e,t,n){let r=n.width,i=n.height,a=Math.min(r,i),o=t.x==null?.5:t.x,s=t.y==null?.5:t.y,c=t.r==null?.5:t.r;return t.global||(o=o*r+n.x,s=s*i+n.y,c*=a),o=fS(o)?o:.5,s=fS(s)?s:.5,c=c>=0&&fS(c)?c:.5,e.createRadialGradient(o,s,0,o,s,c)}function hS(e,t,n){let r=t.type===`radial`?mS(e,t,n):pS(e,t,n),i=t.colorStops;for(let e=0;e<i.length;e++)r.addColorStop(i[e].offset,i[e].color);return r}function gS(e,t){if(e===t||!e&&!t)return!1;if(!e||!t||e.length!==t.length)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!0;return!1}function _S(e){return parseInt(e,10)}function vS(e,t,n){let r=[`width`,`height`][t],i=[`clientWidth`,`clientHeight`][t],a=[`paddingLeft`,`paddingTop`][t],o=[`paddingRight`,`paddingBottom`][t];if(n[r]!=null&&n[r]!==`auto`)return parseFloat(n[r]);let s=document.defaultView.getComputedStyle(e);return(e[i]||_S(s[r])||_S(e.style[r]))-(_S(s[a])||0)-(_S(s[o])||0)||0}function yS(e,t){return!e||e===`solid`||!(t>0)?null:e===`dashed`?[4*t,2*t]:e===`dotted`?[t]:me(e)?[e]:L(e)?e:null}function bS(e){let t=e.style,n=t.lineDash&&t.lineWidth>0&&yS(t.lineDash,t.lineWidth),r=t.lineDashOffset;if(n){let i=t.strokeNoScale&&e.getLineScale?e.getLineScale():1;i&&i!==1&&(n=F(n,function(e){return e/i}),r/=i)}return[n,r]}const xS=new ru(!0);function SS(e){let t=e.stroke;return!(t==null||t===`none`||!(e.lineWidth>0))}function CS(e){return typeof e==`string`&&e!==`none`}function wS(e){let t=e.fill;return t!=null&&t!==`none`}function TS(e,t){if(t.fillOpacity!=null&&t.fillOpacity!==1){let n=e.globalAlpha;e.globalAlpha=t.fillOpacity*t.opacity,e.fill(),e.globalAlpha=n}else e.fill()}function ES(e,t){if(t.strokeOpacity!=null&&t.strokeOpacity!==1){let n=e.globalAlpha;e.globalAlpha=t.strokeOpacity*t.opacity,e.stroke(),e.globalAlpha=n}else e.stroke()}function DS(e,t,n){let r=Vc(t.image,t.__image,n);if(Uc(r)){let n=e.createPattern(r,t.repeat||`repeat`);if(typeof DOMMatrix==`function`&&n&&n.setTransform){let e=new DOMMatrix;e.translateSelf(t.x||0,t.y||0),e.rotateSelf(0,0,(t.rotation||0)*Re),e.scaleSelf(t.scaleX||1,t.scaleY||1),n.setTransform(e)}return n}}function OS(e,t,n,r,i){let a=SS(n),o=wS(n),s=n.strokePercent,c=s<1,l=!t.path;(!t.silent||c)&&l&&t.createPathProxy();let u=t.path||xS,d=t.__dirty;if(!r){let r=n.fill,i=n.stroke,s=o&&!!r.colorStops,c=a&&!!i.colorStops,l=o&&!!r.image,u=a&&!!i.image,f,p,m,h,g;(s||c)&&(g=t.getBoundingRect()),s&&(f=d?hS(e,r,g):t.__canvasFillGradient,t.__canvasFillGradient=f),c&&(p=d?hS(e,i,g):t.__canvasStrokeGradient,t.__canvasStrokeGradient=p),l&&(m=d||!t.__canvasFillPattern?DS(e,r,t):t.__canvasFillPattern,t.__canvasFillPattern=m),u&&(h=d||!t.__canvasStrokePattern?DS(e,i,t):t.__canvasStrokePattern,t.__canvasStrokePattern=h),s?e.fillStyle=f:l&&(m?e.fillStyle=m:o=!1),c?e.strokeStyle=p:u&&(h?e.strokeStyle=h:a=!1)}let f=t.getGlobalScale();u.setScale(f[0],f[1],t.segmentIgnoreThreshold);let p,m;e.setLineDash&&n.lineDash&&([p,m]=bS(t));let h=!0;(l||d&4)&&(u.setDPR(e.dpr),c?u.setContext(null):(u.setContext(e),h=!1),u.reset(),t.buildPath(u,t.shape,r),u.toStatic(),t.pathUpdated()),h&&u.rebuildPath(e,c?s:1),p&&(e.setLineDash(p),e.lineDashOffset=m),r?(i.batchFill=o,i.batchStroke=a):n.strokeFirst?(a&&ES(e,n),o&&TS(e,n)):(o&&TS(e,n),a&&ES(e,n)),p&&e.setLineDash([])}function kS(e,t,n){let r=t.__image=Vc(n.image,t.__image,t,t.onload);if(!r||!Uc(r))return;let 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){let t=n.sx||0,c=n.sy||0;e.drawImage(r,t,c,n.sWidth,n.sHeight,i,a,o,s)}else if(n.sx&&n.sy){let t=n.sx,c=n.sy,l=o-t,u=s-c;e.drawImage(r,t,c,l,u,i,a,o,s)}else e.drawImage(r,i,a,o,s)}function AS(e,t,n){let r=n.text;if(r!=null&&(r+=``),r){e.font=n.font||l,e.textAlign=n.textAlign,e.textBaseline=n.textBaseline;let i,a;e.setLineDash&&n.lineDash&&([i,a]=bS(t)),i&&(e.setLineDash(i),e.lineDashOffset=a),n.strokeFirst?(SS(n)&&e.strokeText(r,n.x,n.y),wS(n)&&e.fillText(r,n.x,n.y)):(wS(n)&&e.fillText(r,n.x,n.y),SS(n)&&e.strokeText(r,n.x,n.y)),i&&e.setLineDash([])}}const jS=[`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`],MS=[[`lineCap`,`butt`],[`lineJoin`,`miter`],[`miterLimit`,10]];function NS(e,t,n,r,i){let a=!1;if(!r&&(n=n||{},t===n))return!1;if(r||t.opacity!==n.opacity){BS(e,i),a=!0;let n=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(n)?hl.opacity:n}(r||t.blend!==n.blend)&&(a||(BS(e,i),a=!0),e.globalCompositeOperation=t.blend||hl.blend);for(let o=0;o<jS.length;o++){let s=jS[o];(r||t[s]!==n[s])&&(a||(BS(e,i),a=!0),e[s]=e.dpr*(t[s]||0))}return(r||t.shadowColor!==n.shadowColor)&&(a||(BS(e,i),a=!0),e.shadowColor=t.shadowColor||hl.shadowColor),a}function PS(e,t,n,r,i){let a=t.style,o=r?null:n&&n.style||{};if(a===o)return!1;let s=NS(e,a,o,r,i);if((r||a.fill!==o.fill)&&(s||(BS(e,i),s=!0),CS(a.fill)&&(e.fillStyle=a.fill)),(r||a.stroke!==o.stroke)&&(s||(BS(e,i),s=!0),CS(a.stroke)&&(e.strokeStyle=a.stroke)),(r||a.opacity!==o.opacity)&&(s||(BS(e,i),s=!0),e.globalAlpha=a.opacity==null?1:a.opacity),t.hasStroke()){let n=a.lineWidth/(a.strokeNoScale&&t.getLineScale?t.getLineScale():1);e.lineWidth!==n&&(s||(BS(e,i),s=!0),e.lineWidth=n)}for(let t=0;t<MS.length;t++){let n=MS[t],c=n[0];(r||a[c]!==o[c])&&(s||(BS(e,i),s=!0),e[c]=a[c]||n[1])}return s}function FS(e,t,n,r,i){return NS(e,t.style,n&&n.style,r,i)}function IS(e,t){let n=t.transform,r=e.dpr||1;n?e.setTransform(r*n[0],r*n[1],r*n[2],r*n[3],r*n[4],r*n[5]):e.setTransform(r,0,0,r,0,0)}function LS(e,t,n){let r=!1;for(let n=0;n<e.length;n++){let i=e[n];r=r||i.isZeroArea(),IS(t,i),t.beginPath(),i.buildPath(t,i.shape),t.clip()}n.allClipped=r}function RS(e,t){return e&&t?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&&!t)}function zS(e){let t=wS(e),n=SS(e);return!(e.lineDash||!(+t^n)||t&&typeof e.fill!=`string`||n&&typeof e.stroke!=`string`||e.strokePercent<1||e.strokeOpacity<1||e.fillOpacity<1)}function BS(e,t){t.batchFill&&(t.batchFill=!1,e.fill()),t.batchStroke&&(t.batchStroke=!1,e.stroke())}function VS(e,t){let n={inHover:!1,viewWidth:0,viewHeight:0,beforeBrushParam:{}};HS(e,t,n),US(e,n)}function HS(e,t,n){let r=t.transform;if(!t.shouldBePainted(n.viewWidth,n.viewHeight,!1,!1)){t.__dirty&=-2,t.__isRendered=!1;return}let i=t.__clipPaths,a=n.prevElClipPaths,o=t.style,s=!1,c=!1;if((!a||gS(i,a))&&(a&&(BS(e,n),e.restore(),c=s=!0,n.prevElClipPaths=null,n.allClipped=!1,n.prevEl=null),i&&i.length&&(BS(e,n),e.save(),LS(i,e,n),s=!0,n.prevElClipPaths=i)),n.allClipped){t.__dirty&=-2,t.__isRendered=!1;return}t.beforeBrush&&t.beforeBrush(n.beforeBrushParam),t.innerBeforeBrush();let l=n.prevEl;l||(c=s=!0);let u=t instanceof Ou&&t.autoBatch&&zS(o);s||RS(r,l.transform)?(BS(e,n),IS(e,t)):u||BS(e,n),t instanceof Ou?(n.lastDrawType!==1&&(c=!0,n.lastDrawType=1),PS(e,t,l,c,n),(!u||!n.batchFill&&!n.batchStroke)&&e.beginPath(),OS(e,t,o,u,n)):t instanceof ju?(n.lastDrawType!==3&&(c=!0,n.lastDrawType=3),PS(e,t,l,c,n),AS(e,t,o)):t instanceof Fu?(n.lastDrawType!==2&&(c=!0,n.lastDrawType=2),FS(e,t,l,c,n),kS(e,t,o)):t.getTemporalDisplayables&&(n.lastDrawType!==4&&(c=!0,n.lastDrawType=4),WS(e,t,n)),t.innerAfterBrush(),t.afterBrush&&(u&&BS(e,n),t.afterBrush()),n.prevEl=t,t.__dirty=0,t.__isRendered=!0}function US(e,t){BS(e,t),t.prevElClipPaths&&e.restore()}function WS(e,t,n){let r=t.getDisplayables(),i=t.getTemporalDisplayables();e.save();let a={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:n.viewWidth,viewHeight:n.viewHeight,inHover:n.inHover,beforeBrushParam:{}},o,s;for(o=t.getCursor(),s=r.length;o<s;o++){let t=r[o];t.beforeBrush&&t.beforeBrush(n.beforeBrushParam),t.innerBeforeBrush(),HS(e,t,a),t.innerAfterBrush(),t.afterBrush&&t.afterBrush(),a.prevEl=t}US(e,a);for(let t=0,r=i.length;t<r;t++){let r=i[t];r.beforeBrush&&r.beforeBrush(n.beforeBrushParam),r.innerBeforeBrush(),HS(e,r,a),r.innerAfterBrush(),r.afterBrush&&r.afterBrush(),a.prevEl=r}US(e,a),t.clearTemporalDisplayables(),t.notClear=!0,e.restore()}const GS=new nS,KS=new Or(100),qS=[`symbol`,`symbolSize`,`symbolKeepAspect`,`color`,`backgroundColor`,`dashArrayX`,`dashArrayY`,`maxTileWidth`,`maxTileHeight`];function JS(e,t){if(e===`none`)return null;let n=t.getDevicePixelRatio(),r=t.getZr(),i=r.painter.type===`svg`;e.dirty&&GS.delete(e);let a=GS.get(e);if(a)return a;let o=M(e,{symbol:`rect`,symbolSize:1,symbolKeepAspect:!0,color:`rgba(0, 0, 0, 0.2)`,backgroundColor:null,dashArrayX:5,dashArrayY:5,rotation:0,maxTileWidth:512,maxTileHeight:512});o.backgroundColor===`none`&&(o.backgroundColor=null);let s={repeat:`repeat`};return c(s),s.rotation=o.rotation,s.scaleX=s.scaleY=i?1:1/n,GS.set(e,s),e.dirty=!1,s;function c(e){let t=[n],a=!0;for(let e=0;e<qS.length;++e){let n=o[qS[e]];if(n!=null&&!L(n)&&!z(n)&&!me(n)&&typeof n!=`boolean`){a=!1;break}t.push(n)}let s;if(a){s=t.join(`,`)+(i?`-svg`:``);let n=KS.get(s);n&&(i?e.svgElement=n:e.image=n)}let c=XS(o.dashArrayX),l=ZS(o.dashArrayY),u=YS(o.symbol),d=QS(c),p=$S(l),m=!i&&f.createCanvas(),h=i&&{tag:`g`,attrs:{},key:`dcl`,children:[]},g=v(),_;m&&(m.width=g.width*n,m.height=g.height*n,_=m.getContext(`2d`)),y(),a&&KS.put(s,m||h),e.image=m,e.svgElement=h,e.svgWidth=g.width,e.svgHeight=g.height;function v(){let e=1;for(let t=0,n=d.length;t<n;++t)e=as(e,d[t]);let t=1;for(let e=0,n=u.length;e<n;++e)t=as(t,u[e].length);e*=t;let n=p*d.length*u.length;if(typeof process<`u`&&process.env.NODE_ENV!==`production`){let t=e=>{console.warn(`Calculated decal size is greater than ${e} due to decal option settings so ${e} is used for the decal size. Please consider changing the decal option to make a smaller decal or set ${e} to be larger to avoid incontinuity.`)};e>o.maxTileWidth&&t(`maxTileWidth`),n>o.maxTileHeight&&t(`maxTileHeight`)}return{width:Math.max(1,Math.min(e,o.maxTileWidth)),height:Math.max(1,Math.min(n,o.maxTileHeight))}}function y(){_&&(_.clearRect(0,0,m.width,m.height),o.backgroundColor&&(_.fillStyle=o.backgroundColor,_.fillRect(0,0,m.width,m.height)));let e=0;for(let t=0;t<l.length;++t)e+=l[t];if(e<=0)return;let t=-p,a=0,s=0,d=0;for(;t<g.height;){if(a%2==0){let e=s/2%u.length,n=0,r=0,i=0;for(;n<g.width*2;){let s=0;for(let e=0;e<c[d].length;++e)s+=c[d][e];if(s<=0)break;if(r%2==0){let s=(1-o.symbolSize)*.5,p=n+c[d][r]*s,m=t+l[a]*s,h=c[d][r]*o.symbolSize,g=l[a]*o.symbolSize,_=i/2%u[e].length;f(p,m,h,g,u[e][_])}n+=c[d][r],++i,++r,r===c[d].length&&(r=0)}++d,d===c.length&&(d=0)}t+=l[a],++s,++a,a===l.length&&(a=0)}function f(e,t,a,s,c){let l=i?1:n,u=lS(c,e*l,t*l,a*l,s*l,o.color,o.symbolKeepAspect);if(i){let e=r.painter.renderOneToVNode(u);e&&h.children.push(e)}else VS(_,u)}}}}function YS(e){if(!e||e.length===0)return[[`rect`]];if(z(e))return[[e]];let t=!0;for(let n=0;n<e.length;++n)if(!z(e[n])){t=!1;break}if(t)return YS([e]);let n=[];for(let t=0;t<e.length;++t)z(e[t])?n.push([e[t]]):n.push(e[t]);return n}function XS(e){if(!e||e.length===0)return[[0,0]];if(me(e)){let t=Math.ceil(e);return[[t,t]]}let t=!0;for(let n=0;n<e.length;++n)if(!me(e[n])){t=!1;break}if(t)return XS([e]);let n=[];for(let t=0;t<e.length;++t)if(me(e[t])){let r=Math.ceil(e[t]);n.push([r,r])}else{let r=F(e[t],e=>Math.ceil(e));r.length%2==1?n.push(r.concat(r)):n.push(r)}return n}function ZS(e){if(!e||typeof e==`object`&&e.length===0)return[0,0];if(me(e)){let t=Math.ceil(e);return[t,t]}let t=F(e,e=>Math.ceil(e));return e.length%2?t.concat(t):t}function QS(e){return F(e,function(e){return $S(e)})}function $S(e){let t=0;for(let n=0;n<e.length;++n)t+=e[n];return e.length%2==1?t*2:t}const eC=Sc(tC);function tC(e,t){e.eachRawSeries(n=>{if(e.isSeriesFiltered(n))return;let r=n.getData();r.hasItemVisual()&&r.each(e=>{let n=r.getItemVisual(e,`decal`);if(n){let i=r.ensureUniqueItemVisual(e,`style`);i.decal=JS(n,t)}});let i=r.getVisual(`decal`);if(i){let e=r.getVisual(`style`);e.decal=JS(i,t)}})}const nC=`6.1.0`,rC={zrender:`6.1.0`},iC=5e3,aC=1e3,oC=2e3,sC=3e3,cC=4500,lC=7e3,uC={PROCESSOR:{SERIES_FILTER:800,AXIS_STATISTICS:920,FILTER:1e3,STATISTIC:iC,STATISTICS:iC},VISUAL:{LAYOUT:aC,PROGRESSIVE_LAYOUT:1100,GLOBAL:oC,CHART:sC,POST_CHART_LAYOUT:4600,COMPONENT:4e3,BRUSH:5e3,CHART_ITEM:cC,ARIA:6e3,DECAL:lC}},dC=`__flagInMainProcess`,fC=`__mainProcessVersion`,pC=`__pendingUpdate`,mC=`__needsUpdateStatus`,hC=/^[a-zA-Z0-9_]+$/,gC=`__connectUpdateStatus`;function _C(e){return function(...t){if(this.isDisposed())WC(this.id);else return yC(this,e,t)}}function vC(e){return function(...t){return yC(this,e,t)}}function yC(e,t,n){return n[0]=n[0]&&n[0].toLowerCase(),mt.prototype[t].apply(e,n)}var bC=class extends mt{};const xC=bC.prototype;xC.on=vC(`on`),xC.off=vC(`off`);let SC,CC,wC,TC,EC,DC,OC,kC,AC,jC,MC,NC,PC,FC,IC,LC,RC,zC,BC;var VC=class extends mt{constructor(e,t,n){super(new Ax),this._chartsViews=[],this._chartsMap={},this._componentsViews=[],this._componentsMap={},this._pendingActions=[],n=n||{},this.__v_skip=!0,this._dom=e;let r=`canvas`,i=`auto`,a=!1;if(this[fC]=1,typeof process<`u`&&process.env.NODE_ENV!==`production`){let e=s.hasGlobalWindow?window:global;e&&(r=V(e.__ECHARTS__DEFAULT__RENDERER__,r),i=V(e.__ECHARTS__DEFAULT__COARSE_POINTER,i),a=V(e.__ECHARTS__DEFAULT__USE_DIRTY_RECT__,a))}n.ssr&&go(e=>{let t=X(e),n=t.dataIndex;if(n==null)return;let r=U();return r.set(`series_index`,t.seriesIndex),r.set(`data_index`,n),t.ssrType&&r.set(`ssr_type`,t.ssrType),r});let o=this._zr=co(e,{renderer:n.renderer||r,devicePixelRatio:n.devicePixelRatio,width:n.width,height:n.height,ssr:n.ssr,useDirtyRect:V(n.useDirtyRect,a),useCoarsePointer:V(n.useCoarsePointer,i),pointerSize:n.pointerSize});this._ssr=n.ssr,this._throttledZrFlush=Xb(I(o.flush,o),17),this._updateTheme(t),this._locale=Vh(n.locale||zh),this._coordSysMgr=new Kg;let c=this._api=IC(this);function l(e,t){return e.__prio-t.__prio}Wn(XC,l),Wn(JC,l),this._scheduler=new ux(this,c,JC,XC),this._messageCenter=new bC,this._initEvents(),this.resize=I(this.resize,this),o.animation.on(`frame`,this._onframe,this),jC(o,this),MC(o,this),Oe(this)}_onframe(){if(this._disposed)return;let e=this._scheduler,t=this._model,n=this._api;if(zC(this),this[pC]){let e=this[pC].silent;this[dC]=!0,BC(this);try{SC(this),TC.update.call(this,null,this[pC].updateParams)}catch(e){throw this[dC]=!1,this[pC]=null,e}this._zr.flush(),this[dC]=!1,this[pC]=null,kC.call(this,e),AC.call(this,e)}else if(e.unfinished){let r=1;do{e.unfinished=!1;let i=f.getTime();e.performSeriesTasks(t),e.performDataProcessorTasks(t),DC(this,t),e.performVisualTasks(t),FC(this,this._model,n,`remain`,{}),r-=f.getTime()-i}while(r>0&&e.unfinished);e.unfinished||this._zr.flush()}}getDom(){return this._dom}getId(){return this.id}getZr(){return this._zr}isSSR(){return this._ssr}setOption(e,t,n){if(this[dC]){typeof process<`u`&&process.env.NODE_ENV!==`production`&&fs("`setOption` should not be called during main process.");return}if(this._disposed){WC(this.id);return}let r,i,a;if(B(t)&&(n=t.lazyUpdate,r=t.silent,i=t.replaceMerge,a=t.transition,t=t.notMerge),this[dC]=!0,BC(this),!this._model||t){let e=new cv(this._api),t=this._theme,n=this._model=new tv;n.scheduler=this._scheduler,n.ssr=this._ssr,n.init(null,null,null,t,this._locale,e)}this._model.setOption(e,{replaceMerge:i},YC);let o={seriesTransition:a,optionChanged:!0};if(n)this[pC]={silent:r,updateParams:o},this[dC]=!1,this.getZr().wakeUp();else{try{SC(this),TC.update.call(this,null,o)}catch(e){throw this[pC]=null,this[dC]=!1,e}this._ssr||this._zr.flush(),this[pC]=null,this[dC]=!1,kC.call(this,r),AC.call(this,r)}}setTheme(e,t){if(this[dC]){typeof process<`u`&&process.env.NODE_ENV!==`production`&&fs("`setTheme` should not be called during main process.");return}if(this._disposed){WC(this.id);return}let n=this._model;if(!n)return;let r=t&&t.silent,i=null;this[pC]&&(r==null&&(r=this[pC].silent),i=this[pC].updateParams,this[pC]=null),this[dC]=!0,BC(this);try{this._updateTheme(e),n.setTheme(this._theme),SC(this),TC.update.call(this,{type:`setTheme`},i)}catch(e){throw this[dC]=!1,e}this[dC]=!1,kC.call(this,r),AC.call(this,r)}_updateTheme(e){z(e)&&(e=ZC[e]),e&&(e=k(e),e&&Iv(e,!0),this._theme=e)}getModel(){return this._model}getOption(){return this._model&&this._model.getOption()}getWidth(){return this._zr.getWidth()}getHeight(){return this._zr.getHeight()}getDevicePixelRatio(){return this._zr.painter.dpr||s.hasGlobalWindow&&window.devicePixelRatio||1}getRenderedCanvas(e){return typeof process<`u`&&process.env.NODE_ENV!==`production`&&ms(`getRenderedCanvas`,`renderToCanvas`),this.renderToCanvas(e)}renderToCanvas(e){e=e||{};let t=this._zr.painter;if(typeof process<`u`&&process.env.NODE_ENV!==`production`&&t.type!==`canvas`)throw Error(`renderToCanvas can only be used in the canvas renderer.`);return t.getRenderedCanvas({backgroundColor:e.backgroundColor||this._model.get(`backgroundColor`),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})}renderToSVGString(e){e=e||{};let t=this._zr.painter;if(typeof process<`u`&&process.env.NODE_ENV!==`production`&&t.type!==`svg`)throw Error(`renderToSVGString can only be used in the svg renderer.`);return t.renderToString({useViewBox:e.useViewBox})}getSvgDataURL(){let e=this._zr;return P(e.storage.getDisplayList(),function(e){e.stopAnimation(null,!0)}),e.painter.toDataURL()}getDataURL(e){if(this._disposed){WC(this.id);return}e=e||{};let t=e.excludeComponents,n=this._model,r=[],i=this;P(t,function(e){n.eachComponent({mainType:e},function(e){let t=i._componentsMap[e.__viewId];t.group.ignore||(r.push(t),t.group.ignore=!0)})});let a=this._zr.painter.getType()===`svg`?this.getSvgDataURL():this.renderToCanvas(e).toDataURL(`image/`+(e&&e.type||`png`));return P(r,function(e){e.group.ignore=!1}),a}getConnectedDataURL(e){if(this._disposed){WC(this.id);return}let t=e.type===`svg`,n=this.group,r=Math.min,i=Math.max,a=1/0;if(ew[n]){let o=a,s=a,c=-1/0,l=-1/0,u=[],d=e&&e.pixelRatio||this.getDevicePixelRatio();P($C,function(a,d){if(a.group===n){let n=t?a.getZr().painter.getSvgDom().innerHTML:a.renderToCanvas(k(e)),d=a.getDom().getBoundingClientRect();o=r(d.left,o),s=r(d.top,s),c=i(d.right,c),l=i(d.bottom,l),u.push({dom:n,left:d.left,top:d.top})}}),o*=d,s*=d,c*=d,l*=d;let p=c-o,m=l-s,h=f.createCanvas(),g=co(h,{renderer:t?`svg`:`canvas`});if(g.resize({width:p,height:m}),t){let t=``;return P(u,function(e){let n=e.left-o,r=e.top-s;t+=`<g transform="translate(`+n+`,`+r+`)">`+e.dom+`</g>`}),g.painter.getSvgRoot().innerHTML=t,e.connectedBackgroundColor&&g.painter.setBackgroundColor(e.connectedBackgroundColor),g.refreshImmediately(),g.painter.toDataURL()}return e.connectedBackgroundColor&&g.add(new Uu({shape:{x:0,y:0,width:p,height:m},style:{fill:e.connectedBackgroundColor}})),P(u,function(e){let t=new Fu({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`))}return this.getDataURL(e)}convertToPixel(e,t,n){return EC(this,`convertToPixel`,e,t,n)}convertToLayout(e,t,n){return EC(this,`convertToLayout`,e,t,n)}convertFromPixel(e,t,n){return EC(this,`convertFromPixel`,e,t,n)}containPixel(e,t){if(this._disposed){WC(this.id);return}let n=this._model,r;return P(Gs(n,e),function(e,n){n.indexOf(`Models`)>=0&&P(e,function(e){let i=e.coordinateSystem;if(i&&i.containPoint)r=r||!!i.containPoint(t);else if(n===`seriesModels`){let i=this._chartsMap[e.__viewId];i&&i.containPoint?r=r||i.containPoint(t,e):typeof process<`u`&&process.env.NODE_ENV!==`production`&&ds(n+`: `+(i?`The found component do not support containPoint.`:`No view mapping to the found component.`))}else typeof process<`u`&&process.env.NODE_ENV!==`production`&&ds(n+`: containPoint is not supported`)},this)},this),!!r}getVisual(e,t){let n=this._model,r=Gs(n,e,{defaultMainType:`series`}),i=r.seriesModel;typeof process<`u`&&process.env.NODE_ENV!==`production`&&(i||ds(`There is no specified series model`));let a=i.getData(),o=r.hasOwnProperty(`dataIndexInside`)?r.dataIndexInside:r.hasOwnProperty(`dataIndex`)?a.indexOfRawIndex(r.dataIndex):null;return o==null?Ix(a,t):Fx(a,o,t)}getViewOfComponentModel(e){return this._componentsMap[e.__viewId]}getViewOfSeriesModel(e){return this._chartsMap[e.__viewId]}_initEvents(){P(UC,e=>{let t=t=>{let n=this.getModel(),r=t.target,i,a=e===`globalout`;if(a?i={}:r&&Vx(r,e=>{let t=X(e);if(t&&t.dataIndex!=null){let e=t.dataModel||n.getSeriesByIndex(t.seriesIndex);return i=e&&e.getDataParams(t.dataIndex,t.dataType,r)||{},!0}if(t.eventData)return i=j({},t.eventData),!0},!0),i){let o=i.componentType,s=i.componentIndex;(o===`markLine`||o===`markPoint`||o===`markArea`)&&(o=`series`,s=i.seriesIndex);let c=o&&s!=null&&n.getComponent(o,s),l=c&&this[c.mainType===`series`?`_chartsMap`:`_componentsMap`][c.__viewId];typeof process<`u`&&process.env.NODE_ENV!==`production`&&!a&&!(c&&l)&&ds(`model or view can not be found by params`),i.event=t,i.type=e,this._$eventProcessor.eventInfo={targetEl:r,packedEvent:i,model:c,view:l},this.trigger(e,i)}};t.zrEventfulCallAtLast=!0,this._zr.on(e,t,this)});let e=this._messageCenter;P(qC,(t,n)=>{e.on(n,e=>{this.trigger(n,e)})}),Bx(e,this,this._api)}isDisposed(){return this._disposed}clear(){this._disposed?WC(this.id):this.setOption({series:[]},!0)}dispose(){if(this._disposed){WC(this.id);return}this._disposed=!0,this.getDom()&&Zs(this.getDom(),rw,``);let e=this,t=e._api,n=e._model;P(e._componentsViews,function(e){e.dispose(n,t)}),P(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 $C[e.id]}resize(e){if(this[dC]){typeof process<`u`&&process.env.NODE_ENV!==`production`&&fs("`resize` should not be called during main process.");return}if(this._disposed){WC(this.id);return}this._zr.resize(e);let t=this._model;if(this._loadingFX&&this._loadingFX.resize(),!t)return;let n=t.resetOption(`media`),r=e&&e.silent;this[pC]&&(r==null&&(r=this[pC].silent),n=!0,this[pC]=null),this[dC]=!0,BC(this);try{n&&SC(this),TC.update.call(this,{type:`resize`,animation:j({duration:0},e&&e.animation)})}catch(e){throw this[dC]=!1,e}this[dC]=!1,kC.call(this,r),AC.call(this,r)}showLoading(e,t){if(this._disposed){WC(this.id);return}if(B(e)&&(t=e,e=``),e=e||`default`,this.hideLoading(),!QC[e]){typeof process<`u`&&process.env.NODE_ENV!==`production`&&ds(`Loading effects `+e+` not exists.`);return}let n=QC[e](this._api,t),r=this._zr;this._loadingFX=n,r.add(n)}hideLoading(){this._disposed?WC(this.id):(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)}makeActionFromEvent(e){let t=j({},e);return t.type=KC[e.type],t}dispatchAction(e,t){if(this._disposed){WC(this.id);return}if(B(t)||(t={silent:!!t}),!GC[e.type]||!this._model)return;if(this[dC]){this._pendingActions.push(e);return}let n=t.silent;OC.call(this,e,n);let r=t.flush;r?this._zr.flush():r!==!1&&s.browser.weChat&&this._throttledZrFlush(),kC.call(this,n),AC.call(this,n)}updateLabelLayout(){Hx.trigger(`series:layoutlabels`,this._model,this._api,{updatedSeries:[]})}appendData(e){if(this._disposed){WC(this.id);return}let t=e.seriesIndex,n=this.getModel().getSeriesByIndex(t);typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(e.data&&n),n.appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()}};VC.internalField=(function(){SC=function(e){Xx(e._model);let t=e._scheduler;t.restorePipelines(e._zr,e._model),t.prepareStageTasks(),CC(e,!0),CC(e,!1),t.plan()},CC=function(e,t){let n=e._model,r=e._scheduler,i=t?e._componentsViews:e._chartsViews,a=t?e._componentsMap:e._chartsMap,o=e._zr,s=e._api;for(let e=0;e<i.length;e++)i[e].__alive=!1;t?n.eachComponent(function(e,t){e!==`series`&&c(t)}):n.eachSeries(c);function c(e){let c=e.__requireNewView;e.__requireNewView=!1;let l=`_ec_`+e.id+`_`+e.type,u=!c&&a[l];if(!u){let r=Tc(e.type),c=t?Ib.getClass(r.main,r.sub):Vb.getClass(r.sub);typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(c,r.sub+` does not exist.`),u=new c,u.init(n,s),a[l]=u,i.push(u),o.add(u.group)}e.__viewId=u.__id=l,u.__alive=!0,u.__model=e,u.group.__ecComponentInfo={mainType:e.mainType,index:e.componentIndex},!t&&r.prepareView(u,e,n,s)}for(let e=0;e<i.length;){let r=i[e];r.__alive?e++:(!t&&r.renderTask.dispose(),o.remove(r.group),r.dispose(n,s),i.splice(e,1),a[r.__id]===r&&delete a[r.__id],r.__id=r.group.__ecComponentInfo=null)}},wC=function(e,t,n,r,i){let a=e._model;if(a.setUpdatePayload(n),!r){P([].concat(e._componentsViews,e._chartsViews),l);return}let o=Xs(n,r,i),s=n.excludeSeriesId,c;s!=null&&(c=U(),P(bs(s),e=>{let t=Ps(e,null);t!=null&&c.set(t,!0)})),a&&a.eachComponent(o,function(t){if(!(c&&c.get(t.id)!=null)){if(Df(n)){if(t instanceof Db)n.type===`highlight`&&!n.notBlur&&!t.get([`emphasis`,`disabled`])&&cf(t,n,e._api);else{let{focusSelf:r,dispatchers:i}=lf(t.mainType,t.componentIndex,n.name,e._api);n.type===`highlight`&&r&&!n.notBlur&&sf(t.mainType,t.componentIndex,e._api),i&&P(i,e=>{n.type===`highlight`?Zd(e):Qd(e)})}}else Ef(n)&&t instanceof Db&&(ff(t,n,e._api),pf(t),RC(e))}},e),a&&a.eachComponent(o,function(t){c&&c.get(t.id)!=null||l(e[r===`series`?`_chartsMap`:`_componentsMap`][t.__viewId])},e);function l(r){r&&r.__alive&&r[t]&&r[t](r.__model,a,e._api,n)}},TC={prepareAndUpdate(e){SC(this),TC.update.call(this,e,e&&{optionChanged:e.newOption!=null})},update(e,n){let r=this._model,i=this._api,a=this._zr,o=this._coordSysMgr,s=this._scheduler;if(!r)return;Zx(r),r.setUpdatePayload(e),s.restoreData(r,e),s.performSeriesTasks(r),o.create(r,i),Hx.trigger(`coordsys:aftercreate`,r,i),s.performDataProcessorTasks(r,e),DC(this,r),o.update(r,i),t(r),s.performVisualTasks(r,e);let c=r.get(`backgroundColor`)||`transparent`;a.setBackgroundColor(c);let l=r.get(`darkMode`);l!=null&&l!==`auto`&&a.setDarkMode(l),NC(this,r,i,e,n),Hx.trigger(`afterupdate`,r,i)},updateTransform(e){let t=this,n=t._model,r=t._api;if(!n)return;n.setUpdatePayload(e);let i=[];n.eachComponent(function(a,o){if(a===`series`)return;let s=t.getViewOfComponentModel(o);if(s&&s.__alive){if(s.updateTransform){let t=s.updateTransform(o,n,r,e);t&&t.update&&i.push(s)}else i.push(s)}});let a=U();n.eachSeries(function(i){let o=t._chartsMap[i.__viewId],s=i.pipelineContext;if(o.updateTransform&&!s.progressiveRender){let t=o.updateTransform(i,n,r,e);t&&t.update&&a.set(i.uid,1)}else a.set(i.uid,1)}),t._scheduler.performVisualTasks(n,e,{setDirty:!0,dirtyMap:a}),FC(t,n,r,e,{},a),Hx.trigger(`afterupdate`,n,r)},updateView(e){let n=this._model;n&&(n.setUpdatePayload(e),Vb.markUpdateMethod(e,`updateView`),t(n),this._scheduler.performVisualTasks(n,e,{setDirty:!0}),NC(this,n,this._api,e,{}),Hx.trigger(`afterupdate`,n,this._api))},updateVisual(e){let n=this._model;n&&(n.setUpdatePayload(e),n.eachSeries(function(e){e.getData().clearAllVisual()}),Vb.markUpdateMethod(e,`updateVisual`),t(n),this._scheduler.performVisualTasks(n,e,{visualType:`visual`,setDirty:!0}),n.eachComponent((t,r)=>{if(t!==`series`){let t=this.getViewOfComponentModel(r);t&&t.__alive&&t.updateVisual(r,n,this._api,e)}}),n.eachSeries(t=>{this._chartsMap[t.__viewId].updateVisual(t,n,this._api,e)}),Hx.trigger(`afterupdate`,n,this._api))},updateLayout(e){TC.update.call(this,e)}};function e(e,t,n,r,i){if(e._disposed){WC(e.id);return}let a=e._model,o=e._coordSysMgr.getCoordinateSystems(),s,c=Gs(a,n);for(let e=0;e<o.length;e++){let n=o[e];if(n[t]&&(s=n[t](a,c,r,i))!=null)return s}typeof process<`u`&&process.env.NODE_ENV!==`production`&&ds(`No coordinate system that supports `+t+` found by the given finder.`)}EC=e,DC=function(e,t){let n=e._chartsMap,r=e._scheduler;t.eachSeries(function(e){r.updateStreamModes(e,n[e.__viewId])})},OC=function(e,t){let n=this.getModel(),r=e.type,i=e.escapeConnect,a=GC[r],o=(a.update||`update`).split(`:`),s=o.pop(),c=o[0]!=null&&Tc(o[0]);this[dC]=!0,BC(this);let l=[e],u=!1;e.batch&&(u=!0,l=F(e.batch,function(t){return t=M(j({},t),e),t.batch=null,t}));let d=[],f,p=[],m=a.nonRefinedEventType,h=Ef(e),g=Df(e);if(g&&af(this._api),P(l,t=>{let r=a.action(t,n,this._api);if(a.refineEvent?p.push(r):f=r,f=f||j({},t),f.type=m,d.push(f),g){let{queryOptionMap:n,mainTypeSpecified:r}=Ks(e),i=r?n.keys()[0]:`series`;wC(this,s,t,i),RC(this)}else h?(wC(this,s,t,`series`),RC(this)):c&&wC(this,s,t,c.main,c.sub)}),s!==`none`&&!g&&!h&&!c)try{this[pC]?(SC(this),TC.update.call(this,e),this[pC]=null):TC[s].call(this,e)}catch(e){throw this[dC]=!1,e}if(f=u?{type:m,escapeConnect:i,batch:d}:d[0],this[dC]=!1,!t){let t;if(a.refineEvent){let{eventContent:r}=a.refineEvent(p,e,n,this._api);H(B(r)),t=M({type:a.refinedEventType},r),t.fromAction=e.type,t.fromActionPayload=e,t.escapeConnect=!0}let r=this._messageCenter;r.trigger(f.type,f),t&&r.trigger(t.type,t)}},kC=function(e){let t=this._pendingActions;for(;t.length;){let n=t.shift();OC.call(this,n,e)}},AC=function(e){!e&&this.trigger(`updated`)},jC=function(e,t){e.on(`rendered`,function(n){t.trigger(`rendered`,n),e.animation.isFinished()&&!t[pC]&&!t._scheduler.unfinished&&!t._pendingActions.length?t.trigger(`finished`):e.refresh()})},MC=function(e,t){e.on(`mouseover`,function(e){let n=e.target,r=Vx(n,Cf);r&&(uf(r,e,t._api),RC(t))}).on(`mouseout`,function(e){let n=e.target,r=Vx(n,Cf);r&&(df(r,e,t._api),RC(t))}).on(`click`,function(e){let n=e.target,r=Vx(n,e=>X(e).dataIndex!=null,!0);if(r){let e=r.selected?`unselect`:`select`,n=X(r);t._api.dispatchAction({type:e,dataType:n.dataType,dataIndexInside:n.dataIndex,seriesIndex:n.seriesIndex,isFromClick:!0})}})};function t(e){e.clearColorPalette(),e.eachSeries(function(e){e.clearColorPalette()})}function n(e){let t=[],n=[],r=!1;if(e.eachComponent(function(e,i){let a=i.get(`zlevel`)||0,o=i.get(`z`)||0,s=i.getZLevelKey();r=r||!!s,(e===`series`?n:t).push({zlevel:a,z:o,idx:i.componentIndex,type:e,key:s})}),r){let r=t.concat(n),i,a;Wn(r,(e,t)=>e.zlevel===t.zlevel?e.z-t.z:e.zlevel-t.zlevel),P(r,t=>{let n=e.getComponent(t.type,t.idx),r=t.zlevel,o=t.key;i!=null&&(r=Math.max(i,r)),o?(r===i&&o!==a&&r++,a=o):a&&(r===i&&r++,a=``),i=r,n.setZLevel(r)})}}NC=(e,t,r,i,a)=>{n(t),PC(e,t,r,i,a),P(e._chartsViews,function(e){e.__alive=!1}),FC(e,t,r,i,a),P(e._chartsViews,function(e){e.__alive||e.remove(t,r)})},PC=(e,t,n,r,i,a)=>{P(a||e._componentsViews,function(e){let i=e.__model;c(i,e),e.render(i,t,n,r),o(i,e),l(i,e)})},FC=(e,t,n,r,s,u)=>{let d=e._scheduler;s=j(s||{},{updatedSeries:t.getSeries()}),Hx.trigger(`series:beforeupdate`,t,n,s);let f=!1;t.eachSeries(function(t){let n=e._chartsMap[t.__viewId];n.__alive=!0;let i=n.renderTask;d.updatePayload(i,r),c(t,n),u&&u.get(t.uid)&&i.dirty(),i.perform(d.getPerformArgs(i))&&(f=!0),n.group.silent=!!t.get(`silent`),a(t,n),pf(t)}),d.unfinished=f||d.unfinished,Hx.trigger(`series:layoutlabels`,t,n,s),Hx.trigger(`series:transition`,t,n,s),t.eachSeries(function(t){let n=e._chartsMap[t.__viewId];o(t,n),l(t,n)}),i(e,t),Hx.trigger(`series:afterupdate`,t,n,s)},RC=function(e){e[mC]=!0,e.getZr().wakeUp()},BC=function(e){e[fC]=(e[fC]+1)%1e6},zC=function(e){e[mC]&&(e.getZr().storage.traverse(function(e){nm(e)||r(e)}),e[mC]=!1)};function r(e){let t=[],n=e.currentStates;for(let e=0;e<n.length;e++){let r=n[e];r!==`emphasis`&&r!==`blur`&&r!==`select`&&t.push(r)}e.selected&&e.states.select&&t.push(`select`),e.hoverState===2&&e.states.emphasis?t.push(`emphasis`):e.hoverState===1&&e.states.blur&&t.push(`blur`),e.useStates(t)}function i(e,t){let n=e._zr;if(n.painter.type!==`canvas`)return;let r=n.storage,i=0;r.traverse(function(e){e.isGroup||i++});let a=i>V(t.get(`hoverLayerThreshold`),D_.hoverLayerThreshold)&&!s.node&&!s.worker;(e._usingTHL||a)&&(t.eachSeries(function(t){if(t.preventUsingHoverLayer)return;let n=e._chartsMap[t.__viewId];n.__alive&&n.eachRendered(e=>{let t=e.states.emphasis;t&&t.hoverLayer!==2&&(t.hoverLayer=+!!a)})}),e._usingTHL=a)}function a(e,t){let n=e.get(`blendMode`)||null;t.eachRendered(e=>{e.isGroup||(e.style.blend=n)})}function o(e,t){if(e.preventAutoZ)return;let n=qm(e);t.eachRendered(e=>(Ym(e,n.z,n.zlevel),!0))}function c(e,t){t.eachRendered(function(e){if(nm(e))return;let t=e.getTextContent(),n=e.getTextGuideLine();e.stateTransition&&(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&&(e.prevStates=null)})}function l(e,t){let n=e.getModel(`stateAnimation`),i=e.isAnimationEnabled(),a=n.get(`duration`),o=a>0?{duration:a,delay:n.get(`delay`),easing:n.get(`easing`)}:null;t.eachRendered(function(e){if(e.states&&e.states.emphasis){if(nm(e))return;if(e instanceof Ou&&Of(e),e.__dirty){let t=e.prevStates;t&&e.useStates(t)}if(i){e.stateTransition=o;let t=e.getTextContent(),n=e.getTextGuideLine();t&&(t.stateTransition=o),n&&(n.stateTransition=o)}e.__dirty&&r(e)}})}IC=function(e){return new class extends vd{getCoordinateSystems(){return e._coordSysMgr.getCoordinateSystems()}getComponentByElement(t){for(;t;){let n=t.__ecComponentInfo;if(n!=null)return e._model.getComponent(n.mainType,n.index);t=t.parent}}enterEmphasis(t,n){Zd(t,n),RC(e)}leaveEmphasis(t,n){Qd(t,n),RC(e)}enterBlur(t){$d(t),RC(e)}leaveBlur(t){ef(t),RC(e)}enterSelect(t){tf(t),RC(e)}leaveSelect(t){nf(t),RC(e)}getModel(){return e.getModel()}getViewOfComponentModel(t){return e.getViewOfComponentModel(t)}getViewOfSeriesModel(t){return e.getViewOfSeriesModel(t)}getECUpdateCycleVersion(){return e[fC]}usingTHL(){return e._usingTHL}}(e)},LC=function(e){function t(e,t){for(let n=0;n<e.length;n++){let r=e[n];r[gC]=t}}P(KC,function(n,r){e._messageCenter.on(r,function(n){if(ew[e.group]&&e[gC]!==0){if(n&&n.escapeConnect)return;let r=e.makeActionFromEvent(n),i=[];P($C,function(t){t!==e&&t.group===e.group&&i.push(t)}),t(i,0),P(i,function(e){e[gC]!==1&&e.dispatchAction(r)}),t(i,2)}})})}})();const HC=VC.prototype;HC.on=_C(`on`),HC.off=_C(`off`),HC.one=function(e,t,n){let r=this;ps(`ECharts#one is deprecated.`);function i(...n){t&&t.apply&&t.apply(this,n),r.off(e,i)}this.on.call(this,e,i,n)};const UC=[`click`,`dblclick`,`mouseover`,`mouseout`,`mousemove`,`mousedown`,`mouseup`,`globalout`,`contextmenu`];function WC(e){typeof process<`u`&&process.env.NODE_ENV!==`production`&&ds(`Instance `+e+` has been disposed`)}const GC={},KC={},qC={},JC=[],YC=[],XC=[],ZC={},QC={},$C={},ew={};let tw=/* @__PURE__ */ new Date-0,nw=/* @__PURE__ */ new Date-0;const rw=`_echarts_instance_`;function iw(e,t,n){let r=!(n&&n.ssr);if(r){if(typeof process<`u`&&process.env.NODE_ENV!==`production`&&!e)throw Error(`Initialize failed: invalid dom.`);let t=lw(e);if(t)return typeof process<`u`&&process.env.NODE_ENV!==`production`&&ds(`There is a chart instance already initialized on the dom.`),t;typeof process<`u`&&process.env.NODE_ENV!==`production`&&_e(e)&&e.nodeName.toUpperCase()!==`CANVAS`&&(!e.clientWidth&&(!n||n.width==null)||!e.clientHeight&&(!n||n.height==null))&&ds(`Can't get DOM width or height. Please check dom.clientWidth and dom.clientHeight. They should not be 0.For example, you may need to call this in the callback of window.onload.`)}let i=new VC(e,t,n);return i.id=`ec_`+tw++,$C[i.id]=i,r&&Zs(e,rw,i.id),LC(i),Hx.trigger(`afterinit`,i),i}function aw(e){if(L(e)){let t=e;e=null,P(t,function(t){t.group!=null&&(e=t.group)}),e=e||`g_`+nw++,P(t,function(t){t.group=e})}return ew[e]=!0,e}function ow(e){ew[e]=!1}const sw=ow;function cw(e){z(e)?e=$C[e]:e instanceof VC||(e=lw(e)),e instanceof VC&&!e.isDisposed()&&e.dispose()}function lw(e){return $C[Qs(e,rw)]}function uw(e){return $C[e]}function dw(e,t){ZC[e]=t}function fw(e){N(YC,e)<0&&YC.push(e)}function pw(e,t){ww(JC,e,t,2e3)}function mw(e){gw(`afterinit`,e)}function hw(e){gw(`afterupdate`,e)}function gw(e,t){Hx.on(e,t)}function _w(e,t,n){let r,i,a,o,s;R(t)&&(n=t,t=``),B(e)?(r=e.type,i=e.event,o=e.update,s=e.publishNonRefinedEvent,n||(n=e.action),a=e.refineEvent):(r=e,i=t);function c(e){return e.toLowerCase()}i=c(i||r);let l=a?c(r):i;GC[r]||(H(hC.test(r)&&hC.test(i)),a&&H(i!==r),GC[r]={actionType:r,refinedEventType:i,nonRefinedEventType:l,update:o,action:n,refineEvent:a},qC[i]=1,a&&s&&(qC[l]=1),typeof process<`u`&&process.env.NODE_ENV!==`production`&&KC[l]&&fs(`${l} must not be shared; use "refineEvent" if you intend to share an event name.`),KC[l]=r)}function vw(e,t){Kg.register(e,t)}function yw(e){let t=Kg.get(e);if(t)return t.getDimensionsInfo?t.getDimensionsInfo():t.dimensions.slice()}function bw(e,t){qx(e,t)}function xw(e,t){ww(XC,e,t,aC,`layout`,!0)}function Sw(e,t){ww(XC,e,t,sC,`visual`,!0)}const Cw=[];function ww(e,t,n,r,i,a){if((R(t)||B(t))&&(n=t,t=r),typeof process<`u`&&process.env.NODE_ENV!==`production`){if(isNaN(t)||t==null)throw Error(`Illegal priority`);P(e,function(e){H(e.__raw!==n)})}if(N(Cw,n)>=0)return;Cw.push(n);let o=ux.wrapStageHandler(n,i);o.__prio=t,o.__raw=n,e.push(o),typeof process<`u`&&process.env.NODE_ENV!==`production`&&a&&H(!o.dirtyOnOverallProgress,`dirtyOnOverallProgress is not allowed in ${i} stage; otherwise progressive rendering is disabled on all series.`)}function Tw(e,t){QC[e]=t}function Ew(e){typeof process<`u`&&process.env.NODE_ENV!==`production`&&ps(`setCanvasCreator is deprecated. Use setPlatformAPI({ createCanvas }) instead.`),p({createCanvas:e})}function Dw(e,t,n){let r=Gx(`registerMap`);r&&r(e,t,n)}function Ow(e){let t=Gx(`getMap`);return t&&t(e)}const kw=Ly;Sw(oC,ix),Sw(cC,ox),Sw(cC,sx),Sw(oC,Nx),Sw(cC,Px),Sw(lC,eC),fw(Iv),pw(900,Lv),Tw(`default`,lx),_w({type:Ed,event:Ed,update:Ed},Le),_w({type:Dd,event:Dd,update:Dd},Le),_w({type:Od,event:jd,update:Od,action:Le,refineEvent:Aw,publishNonRefinedEvent:!0}),_w({type:kd,event:jd,update:kd,action:Le,refineEvent:Aw,publishNonRefinedEvent:!0}),_w({type:Ad,event:jd,update:Ad,action:Le,refineEvent:Aw,publishNonRefinedEvent:!0});function Aw(e,t,n,r){return{eventContent:{selected:mf(n),isFromClick:t.isFromClick||!1}}}dw(`default`,{}),dw(`dark`,kx);const jw={};function Mw(e){return e==null?0:e.length||1}function Nw(e){return e}var Pw=class{constructor(e,t,n,r,i,a){this._old=e,this._new=t,this._oldKeyGetter=n||Nw,this._newKeyGetter=r||Nw,this.context=i,this._diffModeMultiple=a===`multiple`}add(e){return this._add=e,this}update(e){return this._update=e,this}updateManyToOne(e){return this._updateManyToOne=e,this}updateOneToMany(e){return this._updateOneToMany=e,this}updateManyToMany(e){return this._updateManyToMany=e,this}remove(e){return this._remove=e,this}execute(){this[this._diffModeMultiple?`_executeMultiple`:`_executeOneToOne`]()}_executeOneToOne(){let 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(let t=0;t<e.length;t++){let e=r[t],i=n[e],a=Mw(i);if(a>1){let r=i.shift();i.length===1&&(n[e]=i[0]),this._update&&this._update(r,t)}else a===1?(n[e]=null,this._update&&this._update(i,t)):this._remove&&this._remove(t)}this._performRestAdd(i,n)}_executeMultiple(){let e=this._old,t=this._new,n={},r={},i=[],a=[];this._initIndexMap(e,n,i,`_oldKeyGetter`),this._initIndexMap(t,r,a,`_newKeyGetter`);for(let e=0;e<i.length;e++){let t=i[e],a=n[t],o=r[t],s=Mw(a),c=Mw(o);if(s>1&&c===1)this._updateManyToOne&&this._updateManyToOne(o,a),r[t]=null;else if(s===1&&c>1)this._updateOneToMany&&this._updateOneToMany(o,a),r[t]=null;else if(s===1&&c===1)this._update&&this._update(o,a),r[t]=null;else if(s>1&&c>1)this._updateManyToMany&&this._updateManyToMany(o,a),r[t]=null;else if(s>1)for(let e=0;e<s;e++)this._remove&&this._remove(a[e]);else this._remove&&this._remove(a)}this._performRestAdd(a,r)}_performRestAdd(e,t){for(let n=0;n<e.length;n++){let r=e[n],i=t[r],a=Mw(i);if(a>1)for(let e=0;e<a;e++)this._add&&this._add(i[e]);else a===1&&this._add&&this._add(i);t[r]=null}}_initIndexMap(e,t,n,r){let i=this._diffModeMultiple;for(let a=0;a<e.length;a++){let o=`_ec_`+this[r](e[a],a);if(i||(n[a]=o),!t)continue;let s=t[o],c=Mw(s);c===0?(t[o]=a,i&&n.push(o)):c===1?t[o]=[s,a]:s.push(a)}}},Fw=class{constructor(e,t){this._encode=e,this._schema=t}get(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}}_getFullDimensionNames(){return this._cachedDimNames||(this._cachedDimNames=this._schema?this._schema.makeOutputDimensionNames():[]),this._cachedDimNames}};function Iw(e,t){let n={},r=n.encode={},i=U(),a=[],o=[],s={};P(e.dimensions,function(t){let n=e.getDimensionInfo(t),c=n.coordDim;if(c){typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(ld.get(c)==null);let l=n.coordDimIndex;Lw(r,c)[l]=t,n.isExtraCoord||(i.set(c,1),zw(n.type)&&(a[0]=t),Lw(s,c)[l]=e.getDimensionIndex(n.name)),n.defaultTooltip&&o.push(t)}ld.each(function(e,t){let i=Lw(r,t),a=n.otherDims[t];a!=null&&a!==!1&&(i[a]=n.name)})});let c=[],l={};i.each(function(e,t){let n=r[t];l[t]=n[0],c=c.concat(n)}),n.dataDimsOnCoord=c,n.dataDimIndicesOnCoord=F(c,t=>e.getDimensionInfo(t).storeDimIndex),n.encodeFirstDimNotExtra=l;let u=r.label;u&&u.length&&(a=u.slice());let d=r.tooltip;return d&&d.length?o=d.slice():o.length||(o=a.slice()),r.defaultedLabel=a,r.defaultedTooltip=o,n.userOutput=new Fw(s,t),n}function Lw(e,t){return e.hasOwnProperty(t)||(e[t]=[]),e[t]}function Rw(e){return e===`category`?`ordinal`:e===`time`?`time`:`float`}function zw(e){return e!==`ordinal`&&e!==`time`}var Bw=class{constructor(e){this.otherDims={},e!=null&&j(this,e)}};const Vw=Y(),Hw={float:`f`,int:`i`,ordinal:`o`,number:`n`,time:`t`};var Uw=class{constructor(e){this.dimensions=e.dimensions,this._dimOmitted=e.dimensionOmitted,this.source=e.source,this._fullDimCount=e.fullDimensionCount,this._updateDimOmitted(e.dimensionOmitted)}isDimensionOmitted(){return this._dimOmitted}_updateDimOmitted(e){this._dimOmitted=e,e&&(this._dimNameMap||(this._dimNameMap=Kw(this.source)))}getSourceDimensionIndex(e){return V(this._dimNameMap.get(e),-1)}getSourceDimension(e){let t=this.source.dimensionsDefine;if(t)return t[e]}makeStoreSchema(){let e=this._fullDimCount,t=Xv(this.source),n=!qw(e),r=``,i=[];for(let a=0,o=0;a<e;a++){let e,s,c,l=this.dimensions[o];if(l&&l.storeDimIndex===a)e=t?l.name:null,s=l.type,c=l.ordinalMeta,o++;else{let n=this.getSourceDimension(a);n&&(e=t?n.name:null,s=n.type)}i.push({property:e,type:s,ordinalMeta:c}),t&&e!=null&&(!l||!l.isCalculationCoord)&&(r+=n?e.replace(/\`/g,"`1").replace(/\$/g,"`2"):e),r+=`$`,r+=Hw[s]||`f`,c&&(r+=c.uid),r+=`$`}let a=this.source;return{dimensions:i,hash:[a.seriesLayoutBy,a.startIndex,r].join(`$$`)}}makeOutputDimensionNames(){let e=[];for(let t=0,n=0;t<this._fullDimCount;t++){let r,i=this.dimensions[n];if(i&&i.storeDimIndex===t)i.isCalculationCoord||(r=i.name),n++;else{let e=this.getSourceDimension(t);e&&(r=e.name)}e.push(r)}return e}appendCalculationDimension(e){this.dimensions.push(e),e.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)}};function Ww(e){return e instanceof Uw}function Gw(e){let t=U();for(let n=0;n<(e||[]).length;n++){let r=e[n],i=B(r)?r.name:r;i!=null&&t.get(i)==null&&t.set(i,n)}return t}function Kw(e){let t=Vw(e);return t.dimNameMap||(t.dimNameMap=Gw(e.dimensionsDefine))}function qw(e){return e>30}var Jw;const Yw=B,Xw=F,Zw=typeof Int32Array>`u`?Array:Int32Array,Qw=[`hasItemOption`,`_nameList`,`_idList`,`_invertedIndicesMap`,`_dimSummary`,`userOutput`,`_rawData`,`_dimValueGetter`,`_nameDimIdx`,`_idDimIdx`,`_nameRepeatCount`],$w=[`_approximateExtent`];let eT,tT,nT,rT,iT,aT,oT;var sT=class e{constructor(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`];let n,r=!1;Ww(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(r=!0,n=e),n=n||[`x`,`y`];let i={},a=[],o={},s=!1,c={};for(let e=0;e<n.length;e++){let t=n[e],l=z(t)?new Bw({name:t}):t instanceof Bw?t:new Bw(t),u=l.name;l.type=l.type||`float`,l.coordDim||(l.coordDim=u,l.coordDimIndex=0);let d=l.otherDims=l.otherDims||{};a.push(u),i[u]=l,c[u]!=null&&(s=!0),l.createInvertedIndices&&(o[u]=[]),typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(r||l.storeDimIndex>=0),r&&(l.storeDimIndex=e),d.itemName===0&&(this._nameDimIdx=l.storeDimIndex),d.itemId===0&&(this._idDimIdx=l.storeDimIndex)}if(this.dimensions=a,this._dimInfos=i,this._initGetDimensionInfo(s),this.hostModel=t,this._invertedIndicesMap=o,this._dimOmitted){let e=this._dimIdxToName=U();P(a,t=>{e.set(i[t].storeDimIndex,t)})}}getDimension(e){let t=this._recognizeDimIndex(e);if(t==null)return e;if(t=e,!this._dimOmitted)return this.dimensions[t];let n=this._dimIdxToName.get(t);if(n!=null)return n;let r=this._schema.getSourceDimension(t);if(r)return r.name}getDimensionIndex(e){let t=this._recognizeDimIndex(e);if(t!=null)return t;if(e==null)return-1;let n=this._getDimInfo(e);return n?n.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(e):-1}_recognizeDimIndex(e){if(me(e)||e!=null&&!isNaN(e)&&!this._getDimInfo(e)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(e)<0))return+e}_getStoreDimIndex(e){let t=this.getDimensionIndex(e);if(typeof process<`u`&&process.env.NODE_ENV!==`production`&&t==null)throw Error(`Unknown dimension `+e);return t}getDimensionInfo(e){return this._getDimInfo(this.getDimension(e))}_initGetDimensionInfo(e){let t=this._dimInfos;this._getDimInfo=e?e=>t.hasOwnProperty(e)?t[e]:void 0:e=>t[e]}getDimensionsOnCoord(){return this._dimSummary.dataDimsOnCoord.slice()}mapDimension(e,t){let n=this._dimSummary;if(t==null)return n.encodeFirstDimNotExtra[e];let r=n.encode[e];return r?r[t]:null}mapDimensionsAll(e){return(this._dimSummary.encode[e]||[]).slice()}getStore(){return this._store}initData(e,t,n){let r;if(e instanceof Xy&&(r=e),!r){let t=this.dimensions,i=Vv(e)||oe(e)?new ey(e,t.length):e;r=new Xy;let a=Xw(t,e=>({type:this._dimInfos[e].type,property:e}));r.initData(i,a,n)}this._store=r,this._nameList=(t||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,r.count()),this._dimSummary=Iw(this,this._schema),this.userOutput=this._dimSummary.userOutput}appendData(e){let t=this._store.appendData(e);this._doInit(t[0],t[1])}appendValues(e,t){let{start:n,end:r}=this._store.appendValues(e,t&&t.length),i=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),t)for(let e=n;e<r;e++){let r=e-n;this._nameList[e]=t[r],i&&oT(this,e)}}_updateOrdinalMeta(){let e=this._store,t=this.dimensions;for(let n=0;n<t.length;n++){let r=this._dimInfos[t[n]];r.ordinalMeta&&e.collectOrdinalMeta(r.storeDimIndex,r.ordinalMeta)}}_shouldMakeIdFromName(){let e=this._store.getProvider();return this._idDimIdx==null&&e.getSource().sourceFormat!==`typedArray`&&!e.fillStorage}_doInit(e,t){if(e>=t)return;let n=this._store.getProvider();this._updateOrdinalMeta();let r=this._nameList,i=this._idList;if(n.getSource().sourceFormat===`original`&&!n.pure){let a=[];for(let o=e;o<t;o++){let e=n.getItem(o,a);if(!this.hasItemOption&&ws(e)&&(this.hasItemOption=!0),e){let t=e.name;r[o]==null&&t!=null&&(r[o]=Ps(t,null));let n=e.id;i[o]==null&&n!=null&&(i[o]=Ps(n,null))}}}if(this._shouldMakeIdFromName())for(let n=e;n<t;n++)oT(this,n);eT(this)}getApproximateExtent(e,t){return this._approximateExtent[e]||this._store.getDataExtent(this._getStoreDimIndex(e),t)}setApproximateExtent(e,t){t=this.getDimension(t),this._approximateExtent[t]=e.slice()}getCalculationInfo(e){return this._calculationInfo[e]}setCalculationInfo(e,t){Yw(e)?j(this._calculationInfo,e):this._calculationInfo[e]=t}getName(e){let t=this.getRawIndex(e),n=this._nameList[t];return n==null&&this._nameDimIdx!=null&&(n=nT(this,this._nameDimIdx,t)),n==null&&(n=``),n}_getCategory(e,t){let n=this._store.get(e,t),r=this._store.getOrdinalMeta(e);return r?r.categories[n]:n}getId(e){return tT(this,this.getRawIndex(e))}count(){return this._store.count()}get(e,t){let n=this._store,r=this._dimInfos[e];if(r)return n.get(r.storeDimIndex,t)}getByRawIndex(e,t){let n=this._store,r=this._dimInfos[e];if(r)return n.getByRawIndex(r.storeDimIndex,t)}getIndices(){return this._store.getIndices()}getDataExtent(e){return this._store.getDataExtent(this._getStoreDimIndex(e),null)}getSum(e){return this._store.getSum(this._getStoreDimIndex(e))}getMedian(e){return this._store.getMedian(this._getStoreDimIndex(e))}getValues(e,t){let n=this._store;return L(e)?n.getValues(Xw(e,e=>this._getStoreDimIndex(e)),t):n.getValues(e)}hasValue(e){let t=this._dimSummary.dataDimIndicesOnCoord;for(let n=0,r=t.length;n<r;n++)if(isNaN(this._store.get(t[n],e)))return!1;return!0}indexOfName(e){for(let t=0,n=this._store.count();t<n;t++)if(this.getName(t)===e)return t;return-1}getRawIndex(e){return this._store.getRawIndex(e)}indexOfRawIndex(e){return this._store.indexOfRawIndex(e)}rawIndexOf(e,t){let n=e&&this._invertedIndicesMap[e];if(typeof process<`u`&&process.env.NODE_ENV!==`production`&&!n)throw Error(`Do not supported yet`);let r=n&&n[t];return r==null||isNaN(r)?-1:r}each(e,t,n){R(e)&&(n=t,t=e,e=[]);let r=n||this,i=Xw(rT(e),this._getStoreDimIndex,this);this._store.each(i,r?I(t,r):t)}filterSelf(e,t,n){R(e)&&(n=t,t=e,e=[]);let r=n||this,i=Xw(rT(e),this._getStoreDimIndex,this);return this._store=this._store.filter(i,r?I(t,r):t),this}selectRange(e){let t={},n=ue(e),r=[];return P(n,n=>{let i=this._getStoreDimIndex(n);t[i]=e[n],r.push(i)}),this._store=this._store.selectRange(t),this}mapArray(e,t,n){R(e)&&(n=t,t=e,e=[]),n=n||this;let r=[];return this.each(e,function(){r.push(t&&t.apply(this,arguments))},n),r}map(e,t,n,r){let i=n||r||this,a=Xw(rT(e),this._getStoreDimIndex,this),o=aT(this);return o._store=this._store.map(a,i?I(t,i):t),o}modify(e,t,n,r){let i=n||r||this;typeof process<`u`&&process.env.NODE_ENV!==`production`&&P(rT(e),e=>{this.getDimensionInfo(e).isCalculationCoord||console.error(`Danger: only stack dimension can be modified`)});let a=Xw(rT(e),this._getStoreDimIndex,this);this._store.modify(a,i?I(t,i):t)}downSample(e,t,n,r){let i=aT(this);return i._store=this._store.downSample(this._getStoreDimIndex(e),t,n,r),i}minmaxDownSample(e,t){let n=aT(this);return n._store=this._store.minmaxDownSample(this._getStoreDimIndex(e),t),n}lttbDownSample(e,t){let n=aT(this);return n._store=this._store.lttbDownSample(this._getStoreDimIndex(e),t),n}getRawDataItem(e){return this._store.getRawDataItem(e)}getItemModel(e){let t=this.hostModel;return new kh(this.getRawDataItem(e),t,t&&t.ecModel)}diff(e){let t=this;return new Pw(e?e.getStore().getIndices():[],this.getStore().getIndices(),function(t){return tT(e,t)},function(e){return tT(t,e)})}getVisual(e){let t=this._visual;return t&&t[e]}setVisual(e,t){this._visual=this._visual||{},Yw(e)?j(this._visual,e):this._visual[e]=t}getItemVisual(e,t){let n=this._itemVisuals[e],r=n&&n[t];return r==null?this.getVisual(t):r}hasItemVisual(){return this._itemVisuals.length>0}ensureUniqueItemVisual(e,t){let n=this._itemVisuals,r=n[e];r||(r=n[e]={});let i=r[t];return i==null&&(i=this.getVisual(t),L(i)?i=i.slice():Yw(i)&&(i=j({},i)),r[t]=i),i}setItemVisual(e,t,n){let r=this._itemVisuals[e]||{};this._itemVisuals[e]=r,Yw(t)?j(r,t):r[t]=n}clearAllVisual(){this._visual={},this._itemVisuals=[]}setLayout(e,t){Yw(e)?j(this._layout,e):this._layout[e]=t}getLayout(e){return this._layout[e]}getItemLayout(e){return this._itemLayouts[e]}setItemLayout(e,t,n){this._itemLayouts[e]=n?j(this._itemLayouts[e]||{},t):t}clearItemLayouts(){this._itemLayouts.length=0}setItemGraphicEl(e,t){let n=this.hostModel&&this.hostModel.seriesIndex;sd(n,this.dataType,e,t),this._graphicEls[e]=t}getItemGraphicEl(e){return this._graphicEls[e]}eachItemGraphicEl(e,t){P(this._graphicEls,function(n,r){n&&e&&e.call(t,n,r)})}cloneShallow(t){return t||(t=new e(this._schema?this._schema:Xw(this.dimensions,this._getDimInfo,this),this.hostModel)),iT(t,this),t._store=this._store,t}wrapMethod(e,t){let n=this[e];R(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){let e=n.apply(this,arguments);return t.apply(this,[e].concat(we(arguments)))})}};Jw=sT,sT.internalField=(function(){eT=function(e){let t=e._invertedIndicesMap;P(t,function(n,r){let i=e._dimInfos[r],a=i.ordinalMeta,o=e._store;if(a){n=t[r]=new Zw(a.categories.length);for(let e=0;e<n.length;e++)n[e]=-1;for(let e=0;e<o.count();e++)n[o.get(i.storeDimIndex,e)]=e}})},nT=function(e,t,n){return Ps(e._getCategory(t,n),null)},tT=function(e,t){let n=e._idList[t];return n==null&&e._idDimIdx!=null&&(n=nT(e,e._idDimIdx,t)),n==null&&(n=`e\0\0`+t),n},rT=function(e){return L(e)||(e=e==null?[]:[e]),e},aT=function(e){let t=new Jw(e._schema?e._schema:Xw(e.dimensions,e._getDimInfo,e),e.hostModel);return iT(t,e),t},iT=function(e,t){P(Qw.concat(t.__wrappedMethods||[]),function(n){t.hasOwnProperty(n)&&(e[n]=t[n])}),e.__wrappedMethods=t.__wrappedMethods,P($w,function(n){e[n]=k(t[n])}),e._calculationInfo=j({},t._calculationInfo)},oT=function(e,t){let n=e._nameList,r=e._idList,i=e._nameDimIdx,a=e._idDimIdx,o=n[t],s=r[t];if(o==null&&i!=null&&(n[t]=o=nT(e,i,t)),s==null&&a!=null&&(r[t]=s=nT(e,a,t)),s==null&&o!=null){let n=e._nameRepeatCount,i=n[o]=(n[o]||0)+1;s=o,i>1&&(s+=`__ec__`+i),r[t]=s}}})();function cT(e,t){return lT(e,t).dimensions}function lT(e,t){Vv(e)||(e=Uv(e)),t=t||{};let n=t.coordDimensions||[],r=t.dimensionsDefine||e.dimensionsDefine||[],i=U(),a=[],o=uT(e,n,r,t.dimensionsCount),s=t.canOmitUnusedDimensions&&qw(o),c=r===e.dimensionsDefine,l=c?Kw(e):Gw(r),u=t.encodeDefine;!u&&t.encodeDefaulter&&(u=t.encodeDefaulter(e,o));let d=U(u),f=new Uy(o);for(let e=0;e<f.length;e++)f[e]=-1;function p(e){let t=f[e];if(t<0){let t=r[e],n=B(t)?t:{name:t},i=new Bw,o=n.name;o!=null&&l.get(o)!=null&&(i.name=i.displayName=o),n.type!=null&&(i.type=n.type),n.displayName!=null&&(i.displayName=n.displayName);let s=a.length;return f[e]=s,i.storeDimIndex=e,a.push(i),i}return a[t]}if(!s)for(let e=0;e<o;e++)p(e);d.each(function(e,t){let n=bs(e).slice();if(n.length===1&&!z(n[0])&&n[0]<0){d.set(t,!1);return}let r=d.set(t,[]);P(n,function(e,n){let i=z(e)?l.get(e):e;i!=null&&i<o&&(r[n]=i,h(p(i),t,n))})});let m=0;P(n,function(e){let t,n,r,i;if(z(e))t=e,i={};else{i=e,t=i.name;let a=i.ordinalMeta;i.ordinalMeta=null,i=j({},i),i.ordinalMeta=a,n=i.dimsDef,r=i.otherDims,i.name=i.coordDim=i.coordDimIndex=i.dimsDef=i.otherDims=null}let a=d.get(t);if(a!==!1){if(a=bs(a),!a.length)for(let e=0;e<(n&&n.length||1);e++){for(;m<o&&p(m).coordDim!=null;)m++;m<o&&a.push(m++)}P(a,function(e,a){let o=p(e);if(c&&i.type!=null&&(o.type=i.type),h(M(o,i),t,a),o.name==null&&n){let e=n[a];!B(e)&&(e={name:e}),o.name=o.displayName=e.name,o.defaultTooltip=e.defaultTooltip}r&&M(o.otherDims,r)})}});function h(e,t,n){ld.get(t)==null?(e.coordDim=t,e.coordDimIndex=n,i.set(t,!0)):e.otherDims[t]=n}let g=t.generateCoord,_=t.generateCoordCount,v=_!=null;_=g?_||1:0;let y=g||`value`;function b(e){e.name==null&&(e.name=e.coordDim)}if(s)P(a,e=>{b(e)}),a.sort((e,t)=>e.storeDimIndex-t.storeDimIndex);else for(let t=0;t<o;t++){let n=p(t);n.coordDim==null&&(n.coordDim=dT(y,i,v),n.coordDimIndex=0,(!g||_<=0)&&(n.isExtraCoord=!0),_--),b(n),n.type==null&&(F_(e,t)===O_.Must||n.isExtraCoord&&(n.otherDims.itemName!=null||n.otherDims.seriesName!=null))&&(n.type=`ordinal`)}return hc(a,function(e){return e.name},function(e,t){t>0&&(e.name+=t-1)}),new Uw({source:e,dimensions:a,fullDimensionCount:o,dimensionOmitted:s})}function uT(e,t,n,r){let i=Math.max(e.dimensionsDetectedCount||1,t.length,n.length,r||0);return P(t,function(e){let t;B(e)&&(t=e.dimsDef)&&(i=Math.max(i,t.length))}),i}function dT(e,t,n){if(n||t.hasKey(e)){let n=0;for(;t.hasKey(e+n);)n++;e+=n}return t.set(e,!0),e}var fT=class{constructor(e){this.coordSysDims=[],this.axisMap=U(),this.categoryAxisMap=U(),this.coordSysName=e}};function pT(e){let t=e.get(`coordinateSystem`),n=new fT(t),r=mT[t];if(r)return r(e,n,n.axisMap,n.categoryAxisMap),n}const mT={cartesian2d:function(e,t,n,r){let i=e.getReferringComponents(`xAxis`,qs).models[0],a=e.getReferringComponents(`yAxis`,qs).models[0];if(typeof process<`u`&&process.env.NODE_ENV!==`production`){if(!i)throw Error(`xAxis "`+Se(e.get(`xAxisIndex`),e.get(`xAxisId`),0)+`" not found`);if(!a)throw Error(`yAxis "`+Se(e.get(`xAxisIndex`),e.get(`yAxisId`),0)+`" not found`)}t.coordSysDims=[`x`,`y`],n.set(`x`,i),n.set(`y`,a),hT(i)&&(r.set(`x`,i),t.firstCategoryDimIndex=0),hT(a)&&(r.set(`y`,a),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},singleAxis:function(e,t,n,r){let i=e.getReferringComponents(`singleAxis`,qs).models[0];if(typeof process<`u`&&process.env.NODE_ENV!==`production`&&!i)throw Error(`singleAxis should be specified.`);t.coordSysDims=[`single`],n.set(`single`,i),hT(i)&&(r.set(`single`,i),t.firstCategoryDimIndex=0)},polar:function(e,t,n,r){let i=e.getReferringComponents(`polar`,qs).models[0],a=i.findAxisModel(`radiusAxis`),o=i.findAxisModel(`angleAxis`);if(typeof process<`u`&&process.env.NODE_ENV!==`production`){if(!o)throw Error(`angleAxis option not found`);if(!a)throw Error(`radiusAxis option not found`)}t.coordSysDims=[`radius`,`angle`],n.set(`radius`,a),n.set(`angle`,o),hT(a)&&(r.set(`radius`,a),t.firstCategoryDimIndex=0),hT(o)&&(r.set(`angle`,o),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},geo:function(e,t,n,r){t.coordSysDims=[`lng`,`lat`]},parallel:function(e,t,n,r){let i=e.ecModel,a=i.getComponent(`parallel`,e.get(`parallelIndex`)),o=t.coordSysDims=a.dimensions.slice();P(a.parallelAxisIndex,function(e,a){let s=i.getComponent(`parallelAxis`,e),c=o[a];n.set(c,s),hT(s)&&(r.set(c,s),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=a))})},matrix:function(e,t,n,r){let i=e.getReferringComponents(`matrix`,qs).models[0];if(typeof process<`u`&&process.env.NODE_ENV!==`production`&&!i)throw Error(`matrix coordinate system should be specified.`);t.coordSysDims=[`x`,`y`];let 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 hT(e){return e.get(`type`)===`category`}function gT(e,t,n){n=n||{};let r=n.byIndex,i=n.stackedCoordDimension,a,o,s;_T(t)?a=t:(o=t.schema,a=o.dimensions,s=t.store);let c=!!(e&&e.get(`stack`)),l,u,d,f,p=!0;function m(e){return e.type!==`ordinal`&&e.type!==`time`}if(P(a,function(e,t){z(e)&&(a[t]=e={name:e}),m(e)||(p=!1)}),P(a,function(e,t){c&&!e.isExtraCoord&&(!r&&!l&&e.ordinalMeta&&(l=e),!u&&m(e)&&(!p||e.coordDim!==`x`&&e.coordDim!==`angle`)&&(!i||i===e.coordDim)&&(u=e))}),u&&!r&&!l&&(r=!0),u){d=`__\0ecstackresult_`+e.id,f=`__\0ecstackedover_`+e.id,l&&(l.createInvertedIndices=!0);let t=u.coordDim,n=u.type,r=0;P(a,function(e){e.coordDim===t&&r++});let i={name:d,coordDim:t,coordDimIndex:r,type:n,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},c={name:f,coordDim:f,coordDimIndex:r+1,type:n,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(i.storeDimIndex=s.ensureCalculationDimension(f,n),c.storeDimIndex=s.ensureCalculationDimension(d,n)),o.appendCalculationDimension(i),o.appendCalculationDimension(c)):(a.push(i),a.push(c))}return{stackedDimension:u&&u.name,stackedByDimension:l&&l.name,isStackedByIndex:r,stackedOverDimension:f,stackResultDimension:d}}function _T(e){return!Ww(e.schema)}function vT(e,t){return!!t&&t===e.getCalculationInfo(`stackedDimension`)}function yT(e,t){return vT(e,t)?e.getCalculationInfo(`stackResultDimension`):t}function bT(e,t){let n=e.get(`coordinateSystem`),r=Kg.get(n),i;return t&&t.coordSysDims&&(i=F(t.coordSysDims,function(e){let n={name:e},r=t.axisMap.get(e);return r&&(n.type=Rw(r.get(`type`))),n})),i||(i=r&&(r.getDimensionsInfo?r.getDimensionsInfo():r.dimensions.slice())||[`x`,`y`]),i}function xT(e,t,n){let r,i;return n&&P(e,function(e,a){let o=e.coordDim,s=n.categoryAxisMap.get(o);s&&(r==null&&(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 ST(e,t,n){n=n||{};let r=t.getSourceManager(),i,a=!1;e?(a=!0,i=Uv(e)):(i=r.getSource(),a=i.sourceFormat===ud);let o=pT(t),s=bT(t,o),c=n.useEncodeDefaulter,l=R(c)?c:c?fe(j_,s,t):null,u={coordDimensions:s,generateCoord:n.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:l,canOmitUnusedDimensions:!a},d=lT(i,u),f=xT(d.dimensions,n.createInvertedIndices,o),p=a?null:r.getSharedDataStore(d),m=gT(t,{schema:d,store:p}),h=new sT(d,t);h.setCalculationInfo(m);let g=f!=null&&CT(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 CT(e){if(e.sourceFormat===`original`)return!L(Cs(wT(e.data||[])))}function wT(e){let t=0;for(;t<e.length&&e[t]==null;)t++;return e[t]}var TT=class{isBlank(){return this._isBlank}setBlank(e){this._isBlank=e}};Fc(TT);let ET=0;var DT=class e{constructor(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++ET,this._onCollect=e.onCollect}static createByAxisModel(t){let n=t.option,r=n.data,i=r&&F(r,OT);return new e({categories:i,needCollect:!i,deduplication:n.dedplication!==!1})}getOrdinal(e){return this._getOrCreateMap().get(e)}parseAndCollect(e){let t,n=this._needCollect;if(!z(e)&&!n)return e;if(n&&!this._deduplication)return t=this.categories.length,this.categories[t]=e,this._onCollect&&this._onCollect(e,t),t;let r=this._getOrCreateMap();return t=r.get(e),t==null&&(n?(t=this.categories.length,this.categories[t]=e,r.set(e,t),this._onCollect&&this._onCollect(e,t)):t=NaN),t}_getOrCreateMap(){return this._map||(this._map=U(this.categories))}};function OT(e){return B(e)&&e.value!=null?e.value:e+``}const kT=ue({needTransform:1,normalize:1,scale:1,transformIn:1,transformOut:1,contain:1,getExtent:1,getExtentUnsafe:1,setExtent:1,setExtent2:1,getFilter:1,sanitize:1,getDefaultStartValue:1,freeze:1});function AT(e,t,n){let r;e=e||{};let i=Kh();if(i){let a=i.createBreakScaleMapper(t,n);a.hasBreaks()&&(P(kT,function(t){a[t]&&(e[t]=I(a[t],a))}),r=a)}return r==null&&LT(e,n),{brk:r,mapper:e}}function jT(e,t){P(kT,function(n){e[n]=t[n]})}function MT(e,t){e.freeze=Le,typeof process<`u`&&process.env.NODE_ENV!==`production`&&(e.freeze=function(){t.freeze()})}function NT(e){return e.getExtentUnsafe(0,2)}function PT(e,t){return e.getExtentUnsafe(1,t)||e.getExtentUnsafe(0,t)}function FT(e){let t=PT(e,3);return t[1]-t[0]}function IT(e){let t=e.getExtentUnsafe(0,3);return t[1]-t[0]}function LT(e,t){let n=e||{},r=[];return n._extents=r,r[0]=t?t.slice():ic(),j(n,RT),n}const RT={needTransform(){return!1},normalize(e){let t=this._extents[1]||this._extents[0];return t[1]===t[0]?.5:(e-t[0])/(t[1]-t[0])},scale(e){let t=this._extents[1]||this._extents[0];return e*(t[1]-t[0])+t[0]},transformIn(e){return e},transformOut(e){return e},contain(e){let t=PT(this,null);return e>=t[0]&&e<=t[1]},getExtent(){return this._extents[0].slice()},getExtentUnsafe(e){return this._extents[e]},setExtent(e,t){typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(!this._frozen),zT(this._extents,0,e,t)},setExtent2(e,t,n){typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(!this._frozen);let r=this._extents;r[e]||(r[e]=r[0].slice()),zT(r,e,t,n)},freeze(){typeof process<`u`&&process.env.NODE_ENV!==`production`&&(this._frozen=!0)}};function zT(e,t,n,r){uc(n,r)?(e[t][0]=n,e[t][1]=r):typeof process<`u`&&process.env.NODE_ENV!==`production`&&n!=null&&r!=null&&n<=r&&fs(`Invalid setExtent call - start: ${n}, end: ${r}`)}function BT(e){return VT(e)||UT(e)}function VT(e){return e.type===`interval`}function HT(e){return e.type===`time`}function UT(e){return e.type===`log`}function WT(e){return e.type===`ordinal`}function GT(e){let t=Zo(e),n=To(10,t),r=So(e/n);return r?r===2?r=3:r===3?r=5:r*=2:r=1,Fo(r*n,-t)}function KT(e){return Ro(e)+2}function qT(e,t){return Eo(e)/Eo(t)}function JT(e,t,n){let r=n&&n.lookup;if(r){for(let t=0;t<r.from.length;t++)if(e===r.from[t])return r.to[t]}return To(t,e)}function YT(e,t,n){let r=e.slice();if(r[0]===r[1]){let e=n&&n.ctnShp;if(r[0]!==0){let e=xo(r[0]);t[1]||(r[1]+=e/2),r[0]-=e/2}else e&&(r[0]=-1),r[1]=1}return(!lc(r[0])||!lc(r[1]))&&(r[0]=0,r[1]=1),r[1]<r[0]&&r.reverse(),r}function XT(e,t){return[e[0]!==t[0],e[1]!==t[1]]}function ZT(e,t){return e=e||t,So(bo(e,1))}function QT(e,t,n){let r=NT(e),i=r[0],a=e.count(),o=Math.max((t||0)+1,1);i!==0&&o>1&&a/o>2&&(i=Math.round(Math.ceil(i/o)*o)),i!==r[0]&&c(r[0],!0,!0);let s=i;for(;s<=r[1];s+=o)c(s,!1,s===r[0]||s===r[1]);s-o!==r[1]&&c(r[1],!0,!0);function c(e,t,r){n({value:e,offInterval:t},r)}}var $T=class e extends TT{constructor(t){super(),this.type=`ordinal`,this.parse=e.parse,jT(this,e.decoratedMethods);let n=t.ordinalMeta;n||(n=new DT({})),L(n)&&(n=new DT({categories:F(n,e=>B(e)?e.value:e)})),this._ordinalMeta=n;let r=AT(null,null,t.extent||[0,n.categories.length-1]);this._mapper=r.mapper,MT(this,r.mapper)}static parse(e){return e==null?e=NaN:z(e)?(e=this._ordinalMeta.getOrdinal(e),e==null&&(e=NaN)):e=So(e),e}getTicks(){let e=[];return QT(this,0,function(t){e.push(t)}),e}getMinorTicks(e){}setSortInfo(e){if(e==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}let t=e.ordinalNumbers,n=this._ordinalNumbersByTick=[],r=this._ticksByOrdinalNumber=[],i=0,a=this._ordinalMeta.categories.length;for(let e=yo(a,t.length);i<e;++i){let e=n[i]=t[i];r[e]=i}let o=0;for(;i<a;++i){for(;r[o]!=null;)o++;n[i]=o,r[o]=i}}_getTickNumber(e){let t=this._ticksByOrdinalNumber;return t&&e>=0&&e<t.length?t[e]:e}getRawOrdinalNumber(e){let t=this._ordinalNumbersByTick;return t&&e>=0&&e<t.length?t[e]:e}getLabel(e){if(!this.isBlank()){let t=this.getRawOrdinalNumber(e.value),n=this._ordinalMeta.categories[t];return n==null?``:n+``}}count(){let e=NT(this._mapper);return e[1]-e[0]+1}getOrdinalMeta(){return this._ordinalMeta}};$T.type=`ordinal`,$T.decoratedMethods={needTransform(){return this._mapper.needTransform()},contain(e){return this._mapper.contain(this._getTickNumber(e))&&e>=0&&e<this._ordinalMeta.categories.length},normalize(e){return this._mapper.normalize(this._getTickNumber(e))},scale(e){return this.getRawOrdinalNumber(So(this._mapper.scale(e)))},transformIn(e,t){return this._mapper.transformIn(this._getTickNumber(e),t)},transformOut(e,t){return this.getRawOrdinalNumber(this._mapper.transformOut(e,t))},getExtent(){return this._mapper.getExtent()},getExtentUnsafe(e,t){return this._mapper.getExtentUnsafe(e,t)},setExtent(e,t){return this._mapper.setExtent(e,t)},setExtent2(e,t,n){return this._mapper.setExtent2(e,t,n)}},TT.registerClass($T);function eE(e,t,n,r){let i=e.getTicks({expandToNicedExtent:!0}),a=[],o=e.getExtent();for(let e=1;e<i.length;e++){let s=i[e],c=i[e-1];if(c.break||s.break)continue;let l=0,u=[],d=(s.value-c.value)/t,f=KT(d);for(;l<t-1;){let e=Fo(c.value+(l+1)*d,f);e>o[0]&&e<o[1]&&u.push(e),l++}let p=Kh();p&&p.pruneTicksByBreak(`auto`,u,n,e=>e,r,o),a.push(u)}return a}var tE=class e extends TT{constructor(t){super(),this.type=`interval`,this.parse=e.parse,t=t||{};let n=qh(this,t),r=AT(this,n,null);this.brk=r.brk,this._cfg={interval:0,intervalPrecision:2,intervalCount:void 0,niceExtent:void 0}}static parse(e){return e==null||e===``?NaN:Number(e)}getConfig(){return k(this._cfg)}setConfig(e){let t=NT(this);typeof process<`u`&&process.env.NODE_ENV!==`production`&&(H(e.interval!=null),e.intervalCount!=null&&H(e.intervalCount>=-1&&e.intervalPrecision!=null&&!Yh(this)),e.niceExtent!=null&&(H(isFinite(e.niceExtent[0])&&isFinite(e.niceExtent[1])),H(t[0]<=e.niceExtent[0]&&e.niceExtent[1]<=t[1]),H(Fo(e.niceExtent[0]-e.niceExtent[1],Ro(e.interval))<=e.interval))),this._cfg=e=k(e),e.niceExtent==null&&(e.niceExtent=t.slice()),e.intervalPrecision==null&&(e.intervalPrecision=KT(e.interval))}getTicks(e){e=e||{};let t=this._cfg,n=t.interval,r=NT(this),i=t.niceExtent,a=t.intervalPrecision,o=Kh(),s=this.brk,c=o&&s,l=[];if(!n)return l;if(e.breakTicks===`only_break`&&c)return o.addBreaksToTicks(l,s.breaks,r),l;typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(i!=null),r[0]<i[0]&&l.push({value:e.expandToNicedExtent?Fo(i[0]-n,a):r[0]});let u=(e,t)=>So((t-e)/n),d=t.intervalCount;for(let e=i[0],t=0;;t++){if(d==null){if(e>i[1]||!isFinite(e)||!isFinite(i[1]))break}else{if(t>d)break;e=yo(e,i[1]),t===d&&(e=i[1])}if(l.push({value:e}),e=Fo(e+n,a),s){let t=s.calcNiceTickMultiple(e,u);t>=0&&(e=Fo(e+t*n,a))}if(l.length>0&&e===l[l.length-1].value)break;if(l.length>3e3)return typeof process<`u`&&process.env.NODE_ENV!==`production`&&ds(`Exceed safe limit in IntervalScale["getTicks"].`),[]}let f=l.length?l[l.length-1].value:i[1];return r[1]>f&&l.push({value:e.expandToNicedExtent?Fo(f+n,a):r[1]}),c&&o.pruneTicksByBreak(e.pruneByBreak,l,s.breaks,e=>e.value,t.interval,r),c&&e.breakTicks!==`none`&&o.addBreaksToTicks(l,s.breaks,r),l}getMinorTicks(e){return eE(this,e,Jh(this),this._cfg.interval)}getLabel(e,t){if(e==null)return``;let n=t&&t.precision;return n==null?n=Ro(e.value)||0:n===`auto`&&(n=this._cfg.intervalPrecision),jg(Fo(e.value,n,!0))}};tE.type=`interval`,TT.registerClass(tE);const nE=function(e,t,n,r){for(;n<r;){let i=n+r>>>1;e[i][1]<t?n=i+1:r=i}return n};var rE=class e extends TT{constructor(t){super(),this.type=`time`,this.parse=e.parse,this._locale=t.locale,this._useUTC=t.useUTC,this._interval=0;let n=qh(this,t),r=AT(this,n,null);this.brk=r.brk}getLabel(e){return fg(e.value,rg[dg(lg(this._minLevelUnit))]||rg.second,this._useUTC,this._locale)}getFormattedLabel(e,t,n){return pg(e,t,n,this._locale,this._useUTC)}getTicks(e){e=e||{};let t=this._interval,n=NT(this),r=Kh(),i=this.brk,a=r&&i,o=[];if(!t)return o;let s=this._useUTC;if(a&&e.breakTicks===`only_break`)return Kh().addBreaksToTicks(o,i.breaks,n),o;o=pE(this._minLevelUnit,this._approxInterval,s,n,IT(this),i);let c=ig.length-1,l=0;return P(o,e=>{e.time&&(c=Math.min(c,N(ig,e.time.upperTimeUnit)),l=Math.max(l,e.time.level))}),a&&Kh().pruneTicksByBreak(e.pruneByBreak,o,i.breaks,e=>e.value,this._approxInterval,n),a&&e.breakTicks!==`none`&&Kh().addBreaksToTicks(o,i.breaks,n,e=>{let t=Math.max(N(ig,mg(e.vmin,s)),N(ig,mg(e.vmax,s))),n=0;for(let t=0;t<ig.length;t++)if(!aE(ig[t],e.vmin,e.vmax,s)){n=t;break}let r=Math.min(n,c);return{level:l,lowerTimeUnit:ig[Math.max(r,t)],upperTimeUnit:ig[r]}}),o}getMinorTicks(e){return eE(this,e,Jh(this),this._interval)}setTimeInterval(e){this._interval=e.interval,this._approxInterval=e.approxInterval,this._minLevelUnit=e.minLevelUnit}static parse(e){return me(e)?Math.round(e):+Yo(e)}};rE.type=`time`;const iE=[[`second`,Xh],[`minute`,Zh],[`hour`,Qh],[`quarter-day`,Qh*6],[`half-day`,Qh*12],[`day`,$h*1.2],[`half-week`,$h*3.5],[`week`,$h*7],[`month`,$h*31],[`quarter`,$h*95],[`half-year`,eg/2],[`year`,eg]];function aE(e,t,n,r){return hg(new Date(t),e,r).getTime()===hg(new Date(n),e,r).getTime()}function oE(e,t){return e/=$h,e>16?16:e>7.5?7:e>3.5?4:e>1.5?2:1}function sE(e){return e/=2592e6,e>6?6:e>3?3:e>2?2:1}function cE(e){return e/=Qh,e>12?12:e>6?6:e>3.5?4:e>2?2:1}function lE(e,t){return e/=t?Zh:Xh,e>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}function uE(e){return bo(Qo(e,!0),1)}function dE(e,t,n){let r=Math.max(0,N(ig,t)-1);return hg(new Date(e),ig[r],n).getTime()}function fE(e,t){let n=/* @__PURE__ */ new Date(0);n[e](1);let r=n.getTime();n[e](1+t);let i=n.getTime()-r;return(e,t)=>Math.max(0,Math.round((t-e)/i))}function pE(e,t,n,r,i,a){let o=ag,s=0;function c(e,t,n,i,o,c,l){let u=fE(o,e),d=t,f=new Date(d);for(;d<n&&d<=r[1];){if(l.push({value:d}),s++>3e3){typeof process<`u`&&process.env.NODE_ENV!==`production`&&ds(`Exceed safe limit in TimeScale["getTicks"].`);break}if(f[o](f[i]()+e),d=f.getTime(),a){let t=a.calcNiceTickMultiple(d,u);t>0&&(f[o](f[i]()+t*e),d=f.getTime())}}l.push({value:d,notAdd:d>r[1]})}function l(e,i,a){let o=[],s=!i.length;if(!aE(lg(e),r[0],r[1],n)){s&&(i=[{value:dE(r[0],e,n)},{value:r[1]}]);for(let s=0;s<i.length-1;s++){let l=i[s].value,u=i[s+1].value;if(l===u)continue;let d,f,p,m=!1;switch(e){case`year`:d=Math.max(1,Math.round(t/$h/365)),f=gg(n),p=Cg(n);break;case`half-year`:case`quarter`:case`month`:d=sE(t),f=_g(n),p=wg(n);break;case`week`:case`half-week`:case`day`:d=oE(t,31),f=vg(n),p=Tg(n),m=!0;break;case`half-day`:case`quarter-day`:case`hour`:d=cE(t),f=yg(n),p=Eg(n);break;case`minute`:d=lE(t,!0),f=bg(n),p=Dg(n);break;case`second`:d=lE(t,!1),f=xg(n),p=Og(n);break;case`millisecond`:d=uE(t),f=Sg(n),p=kg(n)}u>=r[0]&&l<=r[1]&&c(d,l,u,f,p,m,o),e===`year`&&a.length>1&&s===0&&a.unshift({value:a[0].value-d})}for(let e=0;e<o.length;e++)a.push(o[e])}}let u=[],d=[],f=0,p=0;for(let n=0;n<o.length;++n){let a=lg(o[n]);if(ug(o[n])&&(l(o[n],u[u.length-1]||[],d),a!==(o[n+1]?lg(o[n+1]):null))){if(d.length){p=f,d.sort((e,t)=>e.value-t.value);let a=[];for(let e=0;e<d.length;++e){let t=d[e].value;(e===0||d[e-1].value!==t)&&(a.push(d[e]),t>=r[0]&&t<=r[1]&&f++)}let s=i/t;if(f>s*1.5&&p>s/1.5||(u.push(a),f>s||e===o[n]))break}d=[]}}let m=ce(F(u,e=>ce(e,e=>e.value>=r[0]&&e.value<=r[1]&&!e.notAdd)),e=>e.length>0),h=m.length-1,g=[];for(let e=0;e<m.length;++e){let t=m[e];for(let r=0;r<t.length;++r){let i=mg(t[r].value,n);g.push({value:t[r].value,time:{level:h-e,upperTimeUnit:i,lowerTimeUnit:i}})}}hc(g,gc,null),g.sort((e,t)=>e.value-t.value);let _=g[0],v=g[g.length-1],y=mg(r[0],n),b=mg(r[1],n);return(!_||_.value>r[0])&&g.unshift({value:r[0],time:{level:0,upperTimeUnit:y,lowerTimeUnit:y},notNice:!0}),(!v||v.value<r[1])&&g.push({value:r[1],time:{level:0,upperTimeUnit:b,lowerTimeUnit:b},notNice:!0}),g}const mE=function(e,t){let n=e.getExtent();if(n[0]===n[1]&&(n[0]-=$h,n[1]+=$h),n[1]===-1/0&&n[0]===1/0){let e=/* @__PURE__ */ new Date;n[1]=+new Date(e.getFullYear(),e.getMonth(),e.getDate()),n[0]=n[1]-$h}e.setExtent(n[0],n[1]);let r=ZT(t.splitNumber,10),i=IT(e)/r,a=t.minInterval,o=t.maxInterval;a!=null&&i<a&&(i=a),o!=null&&i>o&&(i=o);let s=iE.length,c=Math.min(nE(iE,i,0,s),s-1),l=iE[c][1],u=iE[Math.max(c-1,0)][0];e.setTimeInterval({approxInterval:i,interval:l,minLevelUnit:u})};TT.registerClass(rE);var hE=class e extends TT{constructor(t){super(),this.type=`log`,this.parse=tE.parse,this.base=t.logBase||10;let n=[],r=[],i=this._lookup={from:n,to:r};n[0]=n[1]=r[0]=r[1]=NaN,jT(this,e.mapperMethods);let a=Kh(),o=t.breakOption,s={lookup:i};a&&a.parseAxisBreakOptionInwardTransform(o,this,{noNegative:!0},2,s),this.powStub=new tE({breakParsed:s.original}),this.intervalStub=new tE({breakParsed:s.transformed}),MT(this,this.intervalStub)}getTicks(e){let t=this.base,n=this.powStub,r=Kh(),i=this.intervalStub,a={lookup:{from:i.getExtent(),to:n.getExtent()}};return F(i.getTicks(e||{}),function(e){let i=e.value,o=JT(i,t,a),s;if(r){let t=r.getTicksBreakOutwardTransform(this,e,Jh(n),this._lookup);t&&(s=t.vBreak,o=t.tickVal)}return{value:o,break:s}},this)}getMinorTicks(e){return eE(this,e,Jh(this.powStub),this.intervalStub.getConfig().interval)}getLabel(e,t){return this.intervalStub.getLabel(e,t)}};hE.type=`log`,hE.mapperMethods={needTransform(){return!0},normalize(e){return this.intervalStub.normalize(qT(e,this.base))},scale(e){return JT(this.intervalStub.scale(e),this.base,null)},transformIn(e,t){return e=qT(e,this.base),t&&t.depth===2?e:this.intervalStub.transformIn(e,t)},transformOut(e,t){let n=t?t.depth:null;return gE.depth=n,_E.lookup=this._lookup,JT(n===2?e:this.intervalStub.transformOut(e,gE),this.base,_E)},contain(e){return this.powStub.contain(e)},setExtent(e,t){this.setExtent2(0,e,t)},setExtent2(e,t,n){if(!uc(t,n)||t<=0||n<=0)return;let r=vE,i=vE;if(e===0){let e=this._lookup;r=e.to,i=e.from}this.powStub.setExtent2(e,r[0]=t,r[1]=n);let a=this.base;this.intervalStub.setExtent2(e,i[0]=qT(t,a),i[1]=qT(n,a))},getFilter(){return{g:0}},sanitize(e,t){return uc(t[0],t[1])&&os(e)&&e<=0&&(e=t[0]),e},getDefaultStartValue(){return 1},getExtent(){return this.powStub.getExtent()},getExtentUnsafe(e,t){return t===null?this.powStub.getExtentUnsafe(e,null):this.intervalStub.getExtentUnsafe(e,t)}},TT.registerClass(hE);const gE={},_E={},vE=[],yE={value:1,category:1,time:1,log:1},bE=Y();function xE(e){let t=e.get(`type`);return(t==null||!W(yE,t)&&!TT.getClass(t))&&(t=`value`),t}function SE(e,t,n){let r=Kh(),i;switch(r&&(i=NE(e,t,n)),t){case`category`:return new $T({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:ic()});case`time`:return new rE({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get(`useUTC`),breakOption:i});case`log`:return new hE({logBase:e.get(`logBase`),breakOption:i});case`value`:return new tE({breakOption:i});default:return new((TT.getClass(t))||tE)({})}}function CE(e,t,n){let r=n?PT(e,null):e.getExtentUnsafe(0,null),i=r[0],a=r[1];return uc(i,a)?i===t||a===t?2:i<t&&a>t?1:3:3}function wE(e){bE(e).noOnMyZero=!0}function TE(e){return bE(e).noOnMyZero}function EE(e){let t=e.getLabelModel().get(`formatter`);if(e.type===`time`){let n=og(t);return function(t,r){return e.scale.getFormattedLabel(t,r,n)}}if(z(t))return function(n){let r=e.scale.getLabel(n);return t.replace(`{value}`,r==null?``:r)};if(R(t)){if(e.type===`category`)return function(n,r){return t(DE(e,n),n.value-e.scale.getExtent()[0],null)};let n=Kh();return function(r,i){let a=null;return n&&(a=n.makeAxisLabelFormatterParamBreak(a,r.break)),t(DE(e,r),i,a)}}return function(t){return e.scale.getLabel(t)}}function DE(e,t){let n=e.scale;return WT(n)?n.getLabel(t):t.value}function OE(e){let t=e.get(`interval`);return t==null?`auto`:t}function kE(e){return e.type===`category`&&OE(e.getLabelModel())===0}function AE(e,t){let n={};return P(e.mapDimensionsAll(t),function(t){n[yT(e,t)]=!0}),ue(n)}function jE(e){return e===`middle`||e===`center`}function ME(e){return e.getShallow(`show`)}function NE(e,t,n){let r=e.get(`breaks`,!0);if(r!=null){if(!Kh()){typeof process<`u`&&process.env.NODE_ENV!==`production`&&fs('Must `import {AxisBreak} from "echarts/features"; use(AxisBreak);` first if using breaks option.');return}if(!n||!PE(t)){typeof process<`u`&&process.env.NODE_ENV!==`production`&&fs(`Axis${e instanceof b_?` ${e.type}[${e.componentIndex}]`:``} does not support break.`);return}return r}}function PE(e){return e!==`category`}function FE(e,t,n,r,i,a){let o=UT(e),s=o?e.intervalStub:e;if(s.setExtent(r[0],r[1]),o){let a=e.powStub,o={depth:2},s=e.transformOut(r[0],o),c=e.transformOut(r[1],o),l=XT(n,r);t[0]&&!l[0]&&(s=i[0]),t[1]&&!l[1]&&(c=i[1]),a.setExtent(s,c)}s.setConfig(a)}function IE(e,t){return WT(e)?e.getRawOrdinalNumber(t.value):t.value}function LE(e,t){return WT(e)&&!!t.get(`boundaryGap`)}var RE=class{needIncludeZero(){return!this.option.scale}getCoordSysModel(){}};const zE=pc(),BE=Y(),VE=Y();let HE;typeof process<`u`&&process.env.NODE_ENV!==`production`&&(HE=function(e){H(e&&e.model&&e.model.uid&&e.model.ecModel)});function UE(e,t){let n=e.model,r=BE($x(n.ecModel)).keyed,i=r&&r.get(t);return i&&i.get(n.uid)}function WE(e,t){return typeof process<`u`&&process.env.NODE_ENV!==`production`&&(H(t!=null),HE(e)),qE(UE(e,t))}function GE(e,t){typeof process<`u`&&process.env.NODE_ENV!==`production`&&HE(e);let n=[];return KE(e.model.ecModel,function(e){for(let r=0;r<t.length;r++)t[r]&&e.serByIdx[t[r].seriesIndex]&&n.push(qE(e))}),n}function KE(e,t){let n=BE($x(e)).keyed;n&&n.each(function(e,n){e.each(function(e,r){t(e,n,r)})})}function qE(e){return{liPosMinGap:e?e.liPosMinGap:void 0}}function JE(e,t){typeof process<`u`&&process.env.NODE_ENV!==`production`&&HE(e);let n=e.model.ecModel,r=BE($x(n)).axSer;r&&XE(n,r.get(e.model.uid),t)}function YE(e,t,n){typeof process<`u`&&process.env.NODE_ENV!==`production`&&(H(t!=null),HE(e));let r=UE(e,t);r&&XE(e.model.ecModel,r.sers,n)}function XE(e,t,n){if(t)for(let r=0;r<t.length;r++){let i=t[r];e.isSeriesFiltered(i)||n(i)}}function ZE(e,t){typeof process<`u`&&process.env.NODE_ENV!==`production`&&(H(t!=null),HE(e));let n=UE(e,t);if(!n||!n.sers.length)return 0;let r=0;return XE(e.model.ecModel,n.sers,function(){r++}),r}function QE(e,t,n){typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(t!=null);let r=BE($x(e)).keyed,i=r&&r.get(t);i&&i.each(function(e){typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(e.sers.length>0),n(e.axis)})}function $E(e,t){typeof process<`u`&&process.env.NODE_ENV!==`production`&&HE(e);let n=e.model,r=BE($x(n.ecModel)).keys;r&&P(r.get(n.uid),function(n){if(typeof process<`u`&&process.env.NODE_ENV!==`production`){let t=UE(e,n);H(t&&t.sers.length>0)}t(n)})}function eD(e){let t=VE(Qx(e)),n=t.keyed||(t.keyed=U());KE(e,function(t,r,i){let a=n.get(r)||n.set(r,U()),o=a.get(i)||a.set(i,{});t.metrics.liPosMinGap&&nD.liPosMinGap(e,t,o)})}function tD(e,t){nD[e]=t}const nD={};function rD(e,t,n){if(!e)return;let r=t.ecModel,i=BE($x(r)),a=e.model.uid;if(typeof process<`u`&&process.env.NODE_ENV!==`production`){HE(e);let n=i.axSerPairCheck||(i.axSerPairCheck=U()),r=`${a}|&${t.uid}`;H(!n.get(r)),n.set(r,1)}let o=i.axSer||(i.axSer=U()),s=o.get(a)||o.set(a,[]);if(typeof process<`u`&&process.env.NODE_ENV!==`production`){let e=s[s.length-1];e&&H(e.seriesIndex<t.seriesIndex)}s.push(t);let c=t.subType,l=t.getBaseAxis()===e,u=sD.get(iD(c,l,n))||sD.get(iD(c,l,null));if(!u)return;let d=i.keyed||(i.keyed=U()),f=i.keys||(i.keys=U()),p=u.key,m=d.get(p)||d.set(p,U()),h=m.get(a);h||(h=m.set(a,{axis:e,sers:[],serByIdx:[]}),h.metrics=u.getMetrics(e),(f.get(a)||f.set(a,[])).push(p)),h.sers.push(t),h.serByIdx[t.seriesIndex]=t}function iD(e,t,n){return e+`|&`+V(t,!0)+`|&`+(n||``)}function aD(e,t){let n=iD(t.seriesType,t.baseAxis,t.coordSysType);typeof process<`u`&&process.env.NODE_ENV!==`production`&&(H(t.seriesType&&t.key&&!oD.get(t.key)&&!sD.get(n)),oD.set(t.key,1)),sD.set(n,t),zE(e,function(){e.registerProcessor(e.PRIORITY.PROCESSOR.AXIS_STATISTICS,{overallReset:eD})})}let oD;typeof process<`u`&&process.env.NODE_ENV!==`production`&&(oD=U());const sD=U(),cD=Y();var lD=class{constructor(e,t,n,r,i){let a=WT(e),o=a?t.getCategories().length:null,s;if(a){let e=t.getCategories(!0);s=e&&!e.length}let c=n.slice();(VT(e)||UT(e)||HT(e))&&(oc(c,dD(e,t.get(`dataMin`,!0))),sc(c,dD(e,t.get(`dataMax`,!0)))),dc(c)||(c[0]=c[1]=NaN);let l=[],u=[!1,!1],d=t.get(`min`,!0);d===`dataMin`?(l[0]=c[0],u[0]=!0):(l[0]=dD(e,R(d)?d({min:c[0],max:c[1]}):d),u[0]=l[0]!=null);let f=t.get(`max`,!0);f===`dataMax`?(l[1]=c[1],u[1]=!0):(l[1]=dD(e,R(f)?f({min:c[0],max:c[1]}):f),u[1]=l[1]!=null);let p=fD(e,t),m=a?null:c[1]-c[0]||Math.abs(c[0]);l[0]==null&&(l[0]=a?s?c[0]:o?0:NaN:c[0]-p[0]*m),l[1]==null&&(l[1]=a?s?c[1]:o?o-1:NaN:c[1]+p[1]*m),!lc(l[0])&&(l[0]=NaN),!lc(l[1])&&(l[1]=NaN);let h=s||xe(l[0])||xe(l[1])||a&&!o,g=VT(e),_=g&&t.needIncludeZero&&t.needIncludeZero();_&&(l[0]>0&&l[1]>0&&!u[0]&&(l[0]=0),l[0]<0&&l[1]<0&&!u[1]&&(l[1]=0));let v=!1;l[0]>l[1]&&(l.reverse(),v=!0);let y=dD(e,t.get(`startValue`,!0)),b=y!=null;!os(y)&&r&&(y=e.getDefaultStartValue?e.getDefaultStartValue():0),os(y)&&(b||!g||_)&&(y<l[0]&&!u[0]?(l[0]=y,u[0]=!0):y>l[1]&&!u[1]&&(l[1]=y,u[1]=!0)),uD(this._i={scale:e,dataMM:c,noZoomEffMM:l,zoomMM:[],fixMM:u,zoomFixMM:[!1,!1],startValue:y,isBlank:h,incl0:_,tggAxInv:v,ctnShp:i},l)}makeNoZoom(){return this._i.noZoomEffMM.slice()}makeFinal(){let e=this._i,t=e.zoomMM,n=e.noZoomEffMM,r=e.zoomFixMM,i=e.fixMM,a={fixMM:i,zoomFixMM:r,isBlank:e.isBlank,incl0:e.incl0,tggAxInv:e.tggAxInv,ctnShp:e.ctnShp,effMM:n.slice()},o=a.effMM;return t[0]!=null&&(o[0]=t[0],i[0]=r[0]=!0),t[1]!=null&&(o[1]=t[1],i[1]=r[1]=!0),uD(e,o),a}makeRenderInfo(){return{startValue:this._i.startValue}}setZoomMM(e,t){this._i.zoomMM[e]=t}};function uD(e,t){let n=e.scale,r=e.dataMM;n.sanitize&&(t[0]=n.sanitize(t[0],r),t[1]=n.sanitize(t[1],r),fc(t))}function dD(e,t){return t==null?null:xe(t)?NaN:e.parse(t)}function fD(e,t){let n;if(WT(e))n=[0,0];else{let e=t.get(`boundaryGap`);typeof e==`boolean`&&(typeof process<`u`&&process.env.NODE_ENV!==`production`&&e===!0&&console.warn(`Boolean type for boundaryGap is only allowed for ordinal axis. Please use string in percentage instead, e.g., "20%". Currently, boundaryGap is set to 0.`),e=null),n=L(e)?e:[e,e]}return[pD(n[0]),pD(n[1])]}function pD(e){return Ia(typeof e==`boolean`?0:e,1)||0}function mD(e){let t=cD(e.scale);return t.extent||(t.extent=ic()),t}function hD(e,t){mD(e).dimIdxInCoord=t.get(e.dim)}function gD(e,t){let n=e.scale,r=e.model,i=e.dim;typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(n&&r&&i),n.rawExtentInfo?typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(n.rawExtentInfo.from!==t||t===2):_D(n,e,i,r,t)}function _D(e,t,n,r,i){let a=mD(t),o=a.extent,s=!1;JE(t,function(r){if(r.boxCoordinateSystem){let{coord:t}=Xg(r),n=a.dimIdxInCoord;if(!(n>=0))typeof process<`u`&&process.env.NODE_ENV!==`production`&&fs(`Property "series.coord" is not supported on axis ${r.boxCoordinateSystem.type}.`);else if(L(t)){let r=t[n];r!=null&&!L(r)&&ac(o,e.parse(r))}}else if(r.coordinateSystem){let i=r.getData();if(i){let t=e.getFilter?e.getFilter():null;P(AE(i,n),function(e){cc(o,i.getApproximateExtent(e,t))})}r.__requireStartValue&&r.__requireStartValue(t)&&(s=!0)}});let c=CD(e,t,r);yD(e,new lD(e,r,o,s,c),i),a.extent=null}function vD(e,t){let n=e.scale;typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(!n.rawExtentInfo),yD(n,new lD(n,e.model,t,!1,!1),3)}function yD(e,t,n){e.rawExtentInfo=t,t.from=n}function bD(e,t){typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(!xD.get(e)),xD.set(e,t)}const xD=U();function SD(e,t,n,r,i){typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(!i||!e.rawExtentInfo),e.rawExtentInfo||vD({scale:e,model:t},i||ic());let a=e.rawExtentInfo.makeFinal(),o=a.effMM;return e.setExtent(o[0],o[1]),e.setBlank(a.isBlank),r&&a.tggAxInv&&n&&!n.get(`legacyMinMaxDontInverseAxis`)&&(r.inverse=!r.inverse),a}function CD(e,t,n){let r=LE(e,n),i=n.get(`containShape`,!0);if(i==null&&!r&&(i=!0),!i)return!1;let a=!1;return $E(t,function(e){a=!!xD.get(e)||a}),a}function wD(e,t,n,r){if(!n.ctnShp)return;let i;if($E(e,function(t){let n=xD.get(t);if(n){let t=n(e,r);t&&(i=i||[0,0],oc(i,t[0]),sc(i,t[1]),wE(e))}}),!i)return;let a=t.getExtent();if(WT(t))e.onBand||t.setExtent2(1,yo(a[0],a[0]+i[0]),bo(a[1],a[1]+i[1]));else{let e=a.slice();n.zoomFixMM[0]||(e[0]=yo(e[0],t.transformOut(t.transformIn(e[0],null)+i[0],null))),n.zoomFixMM[1]||(e[1]=bo(e[1],t.transformOut(t.transformIn(e[1],null)+i[1],null))),(e[0]<a[0]||e[1]>a[1])&&t.setExtent2(1,e[0],e[1])}}function TD(e,t){let n=UT(e),r=n?e.intervalStub:e,i=t.fixMinMax||[],a=n?e.getExtent():null,o=r.getExtent(),s=YT(o,i,t.rawExtentResult);r.setExtent(s[0],s[1]),s=r.getExtent();let c=n?DD(r,t):ED(r,t),l=c.intervalPrecision,u=c.interval,d=t.userInterval;d!=null&&(c.interval=d,c.intervalPrecision=KT(d)),i[0]||(s[0]=Fo(Co(s[0]/u)*u,l)),i[1]||(s[1]=Fo(wo(s[1]/u)*u,l)),d!=null&&(c.niceExtent=s.slice()),FE(e,i,o,s,a,c)}function ED(e,t){let n=ZT(t.splitNumber,5),r=IT(e);typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(isFinite(r)&&r>0);let i=t.minInterval,a=t.maxInterval,o=Qo(r/n,!0);i!=null&&o<i&&(o=i),a!=null&&o>a&&(o=a);let s=KT(o),c=e.getExtent(),l=[Fo(wo(c[0]/o)*o,s),Fo(Co(c[1]/o)*o,s)];return{interval:o,intervalPrecision:s,niceExtent:l}}function DD(e,t){let n=ZT(t.splitNumber,10),r=e.getExtent(),i=IT(e);typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(isFinite(i)&&i>0);let a=bo(Xo(i),1);n/i*a<=.5&&(a*=10);let o=KT(a),s=[Fo(wo(r[0]/a)*a,o),Fo(Co(r[1]/a)*a,o)];return{intervalPrecision:o,interval:a,niceExtent:s}}function OD(e){let t=e.scale,n=e.model,r=n.axis,i=n.ecModel;typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(r&&i),kD(t,n,r,i,null)}function kD(e,t,n,r,i){let a=SD(e,t,r,n,i),o=VT(e)||HT(e);AD(e,{splitNumber:t.get(`splitNumber`),fixMinMax:a.fixMM,userInterval:t.get(`interval`),minInterval:o?t.get(`minInterval`):null,maxInterval:o?t.get(`maxInterval`):null,rawExtentResult:a}),n&&r&&wD(n,e,a,r),typeof process<`u`&&process.env.NODE_ENV!==`production`&&e.freeze()}function AD(e,t){jD[e.type](e,t)}const jD={interval:TD,log:TD,time:mE,ordinal:Le};var MD=/* @__PURE__ */ t({createDimensions:()=>cT,createList:()=>ND,createScale:()=>FD,createSymbol:()=>lS,createTextStyle:()=>LD,dataStack:()=>PD,enableHoverEmphasis:()=>hf,getECData:()=>X,getLayoutRect:()=>c_,mixinAxisModelCommonMethods:()=>ID});function ND(e){return ST(null,e)}const PD={isDimensionStacked:vT,enableDataStack:gT,getStackedDimension:yT};function FD(e,t){let n=t;t instanceof kh||(n=new kh(t));let r=xE(n),i=SE(n,r,!1);return e[1]<e[0]&&(e=e.slice().reverse()),kD(i,n,null,null,e),i}function ID(e){ae(e,RE)}function LD(e,t){return t=t||{},oh(e,null,null,t.state!==`normal`)}const RD=[],zD={registerPreprocessor:fw,registerProcessor:pw,registerPostInit:mw,registerPostUpdate:hw,registerUpdateLifecycle:gw,registerAction:_w,registerCoordinateSystem:vw,registerLayout:xw,registerVisual:Sw,registerTransform:kw,registerLoading:Tw,registerMap:Dw,registerImpl:Wx,PRIORITY:uC,ComponentModel:b_,ComponentView:Ib,SeriesModel:Db,ChartView:Vb,registerComponentModel(e){b_.registerClass(e)},registerComponentView(e){Ib.registerClass(e)},registerSeriesModel(e){Db.registerClass(e)},registerChartView(e){Vb.registerClass(e)},registerCustomSeries(e,t){qx(e,t)},registerSubTypeDefaulter(e,t){b_.registerSubTypeDefaulter(e,t)},registerPainter(e,t){po(e,t)}};function BD(e){L(e)?P(e,e=>{BD(e)}):N(RD,e)>=0||(RD.push(e),R(e)&&(e={install:e}),e.install(zD))}function VD(e,t){return Math.abs(e-t)<1e-8}function HD(e,t,n){let r=0,i=e[0];if(!i)return!1;for(let a=1;a<e.length;a++){let o=e[a];r+=du(i[0],i[1],o[0],o[1],t,n),i=o}let a=e[0];return(!VD(i[0],a[0])||!VD(i[1],a[1]))&&(r+=du(i[0],i[1],a[0],a[1],t,n)),r!==0}const UD=[];function WD(e,t){for(let n=0;n<e.length;n++)lt(e[n],e[n],t)}function GD(e,t,n,r){for(let i=0;i<e.length;i++){let a=e[i];r&&(a=r.project(a)),a&&isFinite(a[0])&&isFinite(a[1])&&(ut(t,t,a),dt(n,n,a))}}function KD(e){let t=0,n=0,r=0,i=e.length,a=e[i-1][0],o=e[i-1][1];for(let s=0;s<i;s++){let i=e[s][0],c=e[s][1],l=a*c-i*o;t+=l,n+=(a+i)*l,r+=(o+c)*l,a=i,o=c}return t?[n/t/3,r/t/3,t]:[e[0][0]||0,e[0][1]||0]}var qD=class{constructor(e){this.name=e}setCenter(e){this._center=e}getCenter(){let e=this._center;return e||(e=this._center=this.calcCenter()),e}},JD=class{constructor(e,t){this.type=`polygon`,this.exterior=e,this.interiors=t}},YD=class{constructor(e){this.type=`linestring`,this.points=e}},XD=class e extends qD{constructor(e,t,n){super(e),this.type=`geoJSON`,this.geometries=t,this._center=n&&[n[0],n[1]]}calcCenter(){let e=this.geometries,t,n=0;for(let r=0;r<e.length;r++){let i=e[r],a=i.exterior,o=a&&a.length;o>n&&(t=i,n=o)}if(t)return KD(t.exterior);let r=this.getBoundingRect();return[r.x+r.width/2,r.y+r.height/2]}getBoundingRect(e){let t=this._rect;if(t&&!e)return t;let n=[1/0,1/0],r=[-1/0,-1/0],i=this.geometries;return P(i,t=>{t.type===`polygon`?GD(t.exterior,n,r,e):P(t.points,t=>{GD(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 K(n[0],n[1],r[0]-n[0],r[1]-n[1]),e||(this._rect=t),t}contain(e){let t=this.getBoundingRect(),n=this.geometries;if(!t.contain(e[0],e[1]))return!1;loopGeo:for(let t=0,r=n.length;t<r;t++){let r=n[t];if(r.type!==`polygon`)continue;let i=r.exterior,a=r.interiors;if(HD(i,e[0],e[1])){for(let t=0;t<(a?a.length:0);t++)if(HD(a[t],e[0],e[1]))continue loopGeo;return!0}}return!1}transformTo(e,t,n,r){let i=this.getBoundingRect(),a=i.width/i.height;n?r||(r=n/a):n=a*r;let o=new K(e,t,n,r),s=i.calculateTransform(o),c=this.geometries;for(let e=0;e<c.length;e++){let t=c[e];t.type===`polygon`?(WD(t.exterior,s),P(t.interiors,e=>{WD(e,s)})):P(t.points,e=>{WD(e,s)})}i=this._rect,i.copy(o),this._center=[i.x+i.width/2,i.y+i.height/2]}cloneShallow(t){t==null&&(t=this.name);let n=new e(t,this.geometries,this._center);return n._rect=this._rect,n.transformTo=null,n}},ZD=class extends qD{constructor(e,t){super(e),this.type=`geoSVG`,this._elOnlyForCalculate=t}calcCenter(){let e=this._elOnlyForCalculate,t=e.getBoundingRect(),n=[t.x+t.width/2,t.y+t.height/2],r=qt(UD),i=e;for(;i&&!i.isGeoSVGGraphicRoot;)Yt(r,i.getLocalTransform(),r),i=i.parent;return $t(r,r),lt(n,n,r),n}};function QD(e){if(!e.UTF8Encoding)return e;let t=e,n=t.UTF8Scale;n==null&&(n=1024);let r=t.features;return P(r,e=>{let t=e.geometry,r=t.encodeOffsets,i=t.coordinates;if(r)switch(t.type){case`LineString`:t.coordinates=eO(i,r,n);break;case`Polygon`:$D(i,r,n);break;case`MultiLineString`:$D(i,r,n);break;case`MultiPolygon`:P(i,(e,t)=>$D(e,r[t],n))}}),t.UTF8Encoding=!1,t}function $D(e,t,n){for(let r=0;r<e.length;r++)e[r]=eO(e[r],t[r],n)}function eO(e,t,n){let r=[],i=t[0],a=t[1];for(let t=0;t<e.length;t+=2){let o=e.charCodeAt(t)-64,s=e.charCodeAt(t+1)-64;o=o>>1^-(o&1),s=s>>1^-(s&1),o+=i,s+=a,i=o,a=s,r.push([o/n,s/n])}return r}function tO(e,t){return e=QD(e),F(ce(e.features,function(e){return e.geometry&&e.properties&&e.geometry.coordinates.length>0}),function(e){let n=e.properties,r=e.geometry,i=[];switch(r.type){case`Polygon`:let e=r.coordinates;i.push(new JD(e[0],e.slice(1)));break;case`MultiPolygon`:P(r.coordinates,function(e){e[0]&&i.push(new JD(e[0],e.slice(1)))});break;case`LineString`:i.push(new YD([r.coordinates]));break;case`MultiLineString`:i.push(new YD(r.coordinates))}let a=new XD(n[t||`name`],i,n.cp);return a.properties=n,a})}var nO=/* @__PURE__ */ t({MAX_SAFE_INTEGER:()=>Go,asc:()=>Lo,getPercentWithPrecision:()=>Ho,getPixelPrecision:()=>Bo,getPrecision:()=>Ro,getPrecisionSafe:()=>zo,isNumeric:()=>ns,isRadianAroundZero:()=>qo,linearMap:()=>Ao,nice:()=>Qo,numericToNumber:()=>ts,parseDate:()=>Yo,parsePercent:()=>J,quantile:()=>$o,quantity:()=>Xo,quantityExponent:()=>Zo,reformIntervals:()=>es,remRadian:()=>Ko,round:()=>Io}),rO=/* @__PURE__ */ t({format:()=>fg,parse:()=>Yo,roundTime:()=>hg}),iO=/* @__PURE__ */ t({Arc:()=>Fp,BezierCurve:()=>Np,BoundingRect:()=>K,Circle:()=>$f,CompoundPath:()=>Ip,Ellipse:()=>tp,Group:()=>q,Image:()=>Fu,IncrementalDisplayable:()=>Xp,Line:()=>kp,LinearGradient:()=>Rp,Polygon:()=>wp,Polyline:()=>Ep,RadialGradient:()=>zp,Rect:()=>Uu,Ring:()=>bp,Sector:()=>vp,Text:()=>qu,clipPointsByRect:()=>Am,clipRectByRect:()=>jm,createIcon:()=>Mm,extendPath:()=>pm,extendShape:()=>dm,getShapeClass:()=>hm,getTransform:()=>wm,initProps:()=>tm,makeImage:()=>_m,makePath:()=>gm,mergePath:()=>ym,registerShape:()=>mm,resizePath:()=>bm,updateProps:()=>em}),aO=/* @__PURE__ */ t({addCommas:()=>jg,capitalFirst:()=>Vg,encodeHTML:()=>Ot,formatTime:()=>Bg,formatTpl:()=>Lg,getTextRect:()=>Ag,getTooltipMarker:()=>zg,normalizeCssArray:()=>Ng,toCamelCase:()=>Mg,truncateText:()=>Gc}),oO=/* @__PURE__ */ t({bind:()=>I,clone:()=>k,curry:()=>fe,defaults:()=>M,each:()=>P,extend:()=>j,filter:()=>ce,indexOf:()=>N,inherits:()=>ie,isArray:()=>L,isFunction:()=>R,isObject:()=>B,isString:()=>z,map:()=>F,merge:()=>A,reduce:()=>se});const sO=Y(),cO=Y(),lO={estimate:1,determine:2};function uO(e){return{out:{noPxChangeTryDetermine:[]},kind:e}}function dO(e,t){let n=e.getLabelModel().get(`customValues`);if(n){let t=e.scale;return{labels:F(pO(n,t),(n,r)=>({formattedLabel:EE(e)(n,r),rawLabel:t.getLabel(n),tick:n}))}}return e.type===`category`?mO(e,t):_O(e)}function fO(e,t,n){let r=e.scale,i=e.getTickModel().get(`customValues`);return i?{ticks:pO(i,r)}:e.type===`category`?gO(e,t):{ticks:r.getTicks(n)}}function pO(e,t){let n=t.getExtent(),r=[];return P(e,function(e){e=t.parse(e),e>=n[0]&&e<=n[1]&&r.push(e)}),hc(r,_c,null),Lo(r),F(r,function(e){return{value:e}})}function mO(e,t){let n=e.getLabelModel(),r=hO(e,n,t);return!n.get(`show`)||e.scale.isBlank()?{labels:[]}:r}function hO(e,t,n){let r=yO(e),i=OE(t),a=n.kind===lO.estimate;if(!a){let e=xO(r,i);if(e)return e}let o,s;R(i)?o=OO(e,i,!1):(s=i===`auto`?CO(e,n):i,o=OO(e,s,!1));let c={labels:o,labelCategoryInterval:s};return a?n.out.noPxChangeTryDetermine.push(function(){return SO(r,i,c),!0}):SO(r,i,c),c}function gO(e,t){let n=vO(e),r=OE(t),i=xO(n,r);if(i)return i;let a,o;if((!t.get(`show`)||e.scale.isBlank())&&(a=[]),R(r))a=OO(e,r,!0);else if(r===`auto`){let t=hO(e,e.getLabelModel(),uO(lO.determine));o=t.labelCategoryInterval,a=F(t.labels,function(e){return e.tick})}else o=r,a=OO(e,o,!0);return SO(n,r,{ticks:a,tickCategoryInterval:o})}function _O(e){let t=e.scale.getTicks(),n=EE(e);return{labels:F(t,function(t,r){return{formattedLabel:n(t,r),rawLabel:e.scale.getLabel(t),tick:t}})}}const vO=bO(`axisTick`),yO=bO(`axisLabel`);function bO(e){return function(t){return cO(t)[e]||(cO(t)[e]={list:[]})}}function xO(e,t){for(let n=0;n<e.list.length;n++)if(e.list[n].key===t)return e.list[n].value}function SO(e,t,n){return e.list.push({key:t,value:n}),n}function CO(e,t){if(t.kind===lO.estimate){let n=e.calculateCategoryInterval(t);return t.out.noPxChangeTryDetermine.push(function(){return cO(e).autoInterval=n,!0}),n}let n=cO(e).autoInterval;return n==null?cO(e).autoInterval=e.calculateCategoryInterval(t):n}function wO(e,t){let n=t.kind,r=DO(e),i=EE(e),a=(r.axisRotate-r.labelRotate)/180*Math.PI,o=e.scale,s=o.getExtent(),c=o.count();if(s[1]-s[0]<1)return 0;let l=1;c>40&&(l=Math.max(1,Math.floor(c/40)));let u=s[0],d=e.dataToCoord(u+1)-e.dataToCoord(u),f=Math.abs(d*Math.cos(a)),p=Math.abs(d*Math.sin(a)),m=0,h=0;for(;u<=s[1];u+=l){let e=0,t=0,n=Ma(i({value:u}),r.font,`center`,`top`);e=n.width*1.3,t=n.height*1.3,m=Math.max(m,e,7),h=Math.max(h,t,7)}let g=m/f,_=h/p;isNaN(g)&&(g=1/0),isNaN(_)&&(_=1/0);let v=Math.max(0,Math.floor(Math.min(g,_)));if(n===lO.estimate)return t.out.noPxChangeTryDetermine.push(I(TO,null,e,v,c)),v;let y=EO(e,v,c);return y==null?v:y}function TO(e,t,n){return EO(e,t,n)==null}function EO(e,t,n){let r=sO(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 DO(e){let t=e.getLabelModel();return{axisRotate:e.getRotate?e.getRotate():e.isHorizontal&&!e.isHorizontal()?90:0,labelRotate:t.get(`rotate`)||0,font:t.getFont()}}function OO(e,t,n){let r=EE(e),i=e.scale,a=[],o=R(t);return QT(i,o?0:t,function(e,s){let c=i.getLabel(e);if(o){let n=!!t(e.value,c);if(e.offInterval=!n,!n&&!s)return}a.push(n?e:{formattedLabel:r(e),rawLabel:c,tick:e})}),a}function kO(e,t){t=t||{};let n={w:NaN,w2:NaN},r=e.scale,i=t.fromStat,a=t.min,o=FT(r);os(o)||(o=NaN);let s=e.getExtent(),c=xo(s[1]-s[0]);return WT(r)?AO(n,e,o,c):i?jO(n,e,o,c,i):a==null&&typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(!1),a!=null&&(n.w=os(n.w)?bo(a,n.w):a),n}function AO(e,t,n,r){let i=t.onBand,a=n+ +!!i;a===0&&(a=1),e.w=r/a,!i&&n&&r&&(e.w2=e.w*n/r)}function jO(e,t,n,r,i){typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(i);let a=!1,o=-1/0;P(i.key?[WE(t,i.key)]:GE(t,i.sers||[]),function(e){let t=e.liPosMinGap;t!=null&&(t>0?(t>o&&(o=t),a=!1):t===-2&&(a=!0))}),os(n)&&n>0&&os(o)?(e.w=r/n*o,e.w2=o):a&&(e.w=r*.8,e.w2=e.w*n/r)}const MO=[0,1];var NO=class{constructor(e,t,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=n||[0,0]}contain(e){let t=this._extent,n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]);return e>=n&&e<=r}containData(e){return this.scale.contain(this.scale.parse(e))}getExtent(){return this._extent.slice()}setExtent(e,t){let n=this._extent;n[0]=e,n[1]=t}dataToCoord(e,t){let n=this.scale;return e=n.normalize(n.parse(e)),Ao(e,MO,PO(this),t)}coordToData(e,t){let n=Ao(e,PO(this),MO,t);return this.scale.scale(n)}pointToData(e,t){}getTicksCoords(e){e=e||{};let t=e.tickModel||this.getTickModel(),n=F(fO(this,t,{breakTicks:e.breakTicks,pruneByBreak:e.pruneByBreak}).ticks,function(e){return{coord:this.dataToCoord(IE(this.scale,e)),tick:e}},this),r=t.get(`alignWithLabel`),i=FO(this,n,r);return F(n,function(e){return{coord:e.coord,tickValue:e.tick.value,onBand:i}})}getMinorTicksCoords(){if(WT(this.scale))return[];let e=this.model.getModel(`minorTick`).get(`splitNumber`);return e>0&&e<100||(e=5),F(this.scale.getMinorTicks(e),function(e){return F(e,function(e){return{coord:this.dataToCoord(e),tickValue:e}},this)},this)}getViewLabels(e){return e=e||uO(lO.determine),dO(this,e).labels}getLabelModel(){return this.model.getModel(`axisLabel`)}getTickModel(){return this.model.getModel(`axisTick`)}getBandWidth(){return kO(this,{min:1}).w}calculateCategoryInterval(e){return e=e||uO(lO.determine),wO(this,e)}};function PO(e){let t=e.getExtent();if(e.onBand){let n=(t[1]-t[0])/e.scale.count()/2;t[0]+=n,t[1]-=n}return t}function FO(e,t,n){let r=t.length;if(!e.onBand||n||!r)return!1;let i=kO(e).w;if(!i)return!1;P(t,function(e){e.coord-=i/2});let a=e.scale.getExtent(),o=t[r-1];return o.tick.offInterval&&t.pop(),t.push({coord:o.coord+i,tick:{value:a[1]+1}}),!0}function IO(e){let t=b_.extend(e);return b_.registerClass(t),t}function LO(e){let t=Ib.extend(e);return Ib.registerClass(t),t}function RO(e){let t=Db.extend(e);return Db.registerClass(t),t}function zO(e){let t=Vb.extend(e);return Vb.registerClass(t),t}const BO=Math.PI*2,VO=ru.CMD,HO=[`top`,`right`,`bottom`,`left`];function UO(e,t,n,r,i){let a=n.width,o=n.height;switch(e){case`top`:r.set(n.x+a/2,n.y-t),i.set(0,-1);break;case`bottom`:r.set(n.x+a/2,n.y+o+t),i.set(0,1);break;case`left`:r.set(n.x-t,n.y+o/2),i.set(-1,0);break;case`right`:r.set(n.x+a+t,n.y+o/2),i.set(1,0)}}function WO(e,t,n,r,i,a,o,s,c){o-=e,s-=t;let l=Math.sqrt(o*o+s*s);o/=l,s/=l;let u=o*n+e,d=s*n+t;if(Math.abs(r-i)%BO<1e-4)return c[0]=u,c[1]=d,l-n;if(a){let e=r;r=cu(i),i=cu(e)}else r=cu(r),i=cu(i);r>i&&(i+=BO);let f=Math.atan2(s,o);if(f<0&&(f+=BO),f>=r&&f<=i||f+BO>=r&&f+BO<=i)return c[0]=u,c[1]=d,l-n;let p=n*Math.cos(r)+e,m=n*Math.sin(r)+t,h=n*Math.cos(i)+e,g=n*Math.sin(i)+t,_=(p-o)*(p-o)+(m-s)*(m-s),v=(h-o)*(h-o)+(g-s)*(g-s);return _<v?(c[0]=p,c[1]=m,Math.sqrt(_)):(c[0]=h,c[1]=g,Math.sqrt(v))}function GO(e,t,n,r,i,a,o,s){let c=i-e,l=a-t,u=n-e,d=r-t,f=Math.sqrt(u*u+d*d);u/=f,d/=f;let p=(c*u+l*d)/f;s&&(p=Math.min(Math.max(p,0),1)),p*=f;let m=o[0]=e+p*u,h=o[1]=t+p*d;return Math.sqrt((m-i)*(m-i)+(h-a)*(h-a))}function KO(e,t,n,r,i,a,o){n<0&&(e+=n,n=-n),r<0&&(t+=r,r=-r);let s=e+n,c=t+r,l=o[0]=Math.min(Math.max(i,e),s),u=o[1]=Math.min(Math.max(a,t),c);return Math.sqrt((l-i)*(l-i)+(u-a)*(u-a))}const qO=[];function JO(e,t,n){let r=KO(t.x,t.y,t.width,t.height,e.x,e.y,qO);return n.set(qO[0],qO[1]),r}function YO(e,t,n){let r=0,i=0,a=0,o=0,s,c,l=1/0,u=t.data,d=e.x,f=e.y;for(let e=0;e<u.length;){let t=u[e++];e===1&&(r=u[e],i=u[e+1],a=r,o=i);let p=l;switch(t){case VO.M:a=u[e++],o=u[e++],r=a,i=o;break;case VO.L:p=GO(r,i,u[e],u[e+1],d,f,qO,!0),r=u[e++],i=u[e++];break;case VO.C:p=mr(r,i,u[e++],u[e++],u[e++],u[e++],u[e],u[e+1],d,f,qO),r=u[e++],i=u[e++];break;case VO.Q:p=xr(r,i,u[e++],u[e++],u[e],u[e+1],d,f,qO),r=u[e++],i=u[e++];break;case VO.A:let t=u[e++],n=u[e++],l=u[e++],m=u[e++],h=u[e++],g=u[e++];e+=1;let _=!!(1-u[e++]);s=Math.cos(h)*l+t,c=Math.sin(h)*m+n,e<=1&&(a=s,o=c);let v=(d-t)*m/l+t;p=WO(t,n,m,h,h+g,_,v,f,qO),r=Math.cos(h+g)*l+t,i=Math.sin(h+g)*m+n;break;case VO.R:a=r=u[e++],o=i=u[e++];let y=u[e++],b=u[e++];p=KO(a,o,y,b,d,f,qO);break;case VO.Z:p=GO(r,i,a,o,d,f,qO,!0),r=a,i=o}p<l&&(l=p,n.set(qO[0],qO[1]))}return l}const XO=new G,ZO=new G,QO=new G,$O=new G,ek=new G;function tk(e,t){if(!e)return;let n=e.getTextGuideLine(),r=e.getTextContent();if(!(r&&n))return;let i=e.textGuideLineConfig||{},a=[[0,0],[0,0],[0,0]],o=i.candidates||HO,s=r.getBoundingRect().clone();s.applyTransform(r.getComputedTransform());let c=1/0,l=i.anchor,u=e.getComputedTransform(),d=u&&$t([],u),f=t.get(`length2`)||0;l&&QO.copy(l);for(let t=0;t<o.length;t++){let n=o[t];UO(n,0,s,XO,$O),G.scaleAndAdd(ZO,XO,$O,f),ZO.transform(d);let r=e.getBoundingRect(),i=l?l.distance(ZO):e instanceof Ou?YO(ZO,e.path,QO):JO(ZO,r,QO);i<c&&(c=i,ZO.transform(u),QO.transform(u),QO.toArray(a[0]),ZO.toArray(a[1]),XO.toArray(a[2]))}ik(a,t.get(`minTurnAngle`)),n.setShape({points:a})}const nk=[],rk=new G;function ik(e,t){if(!(t<=180&&t>0))return;t=t/180*Math.PI,XO.fromArray(e[0]),ZO.fromArray(e[1]),QO.fromArray(e[2]),G.sub($O,XO,ZO),G.sub(ek,QO,ZO);let n=$O.len(),r=ek.len();if(n<.001||r<.001)return;$O.scale(1/n),ek.scale(1/r);let i=$O.dot(ek);if(Math.cos(t)<i){let n=GO(ZO.x,ZO.y,QO.x,QO.y,XO.x,XO.y,nk,!1);rk.fromArray(nk),rk.scaleAndAdd(ek,n/Math.tan(Math.PI-t));let r=QO.x===ZO.x?(rk.y-ZO.y)/(QO.y-ZO.y):(rk.x-ZO.x)/(QO.x-ZO.x);if(isNaN(r))return;r<0?G.copy(rk,ZO):r>1&&G.copy(rk,QO),rk.toArray(e[1])}}function ak(e,t,n){if(!(n<=180&&n>0))return;n=n/180*Math.PI,XO.fromArray(e[0]),ZO.fromArray(e[1]),QO.fromArray(e[2]),G.sub($O,ZO,XO),G.sub(ek,QO,ZO);let r=$O.len(),i=ek.len();if(!(r<.001||i<.001)&&($O.scale(1/r),ek.scale(1/i),$O.dot(t)<Math.cos(n))){let r=GO(ZO.x,ZO.y,QO.x,QO.y,XO.x,XO.y,nk,!1);rk.fromArray(nk);let i=Math.PI/2,a=i+Math.acos(ek.dot(t))-n;if(a>=i)G.copy(rk,QO);else{rk.scaleAndAdd(ek,r/Math.tan(Math.PI/2-a));let e=QO.x===ZO.x?(rk.y-ZO.y)/(QO.y-ZO.y):(rk.x-ZO.x)/(QO.x-ZO.x);if(isNaN(e))return;e<0?G.copy(rk,ZO):e>1&&G.copy(rk,QO)}rk.toArray(e[1])}}function ok(e,t,n,r){let i=n===`normal`,a=i?e:e.ensureState(n);a.ignore=t;let o=r.get(`smooth`);o=o===!0?.3:Math.max(+o,0)||0,a.shape=a.shape||{},a.shape.smooth=o;let s=r.getModel(`lineStyle`).getLineStyle();i?e.useStyle(s):a.style=s}function sk(e,t){let n=t.smooth,r=t.points;if(r){if(e.moveTo(r[0][0],r[0][1]),n>0&&r.length>=3){let t=it(r[0],r[1]),i=it(r[1],r[2]);if(!t||!i){e.lineTo(r[1][0],r[1][1]),e.lineTo(r[2][0],r[2][1]);return}let a=Math.min(t,i)*n,o=ct([],r[1],r[0],a/t),s=ct([],r[1],r[2],a/i),c=ct([],o,s,.5);e.bezierCurveTo(o[0],o[1],o[0],o[1],c[0],c[1]),e.bezierCurveTo(s[0],s[1],s[0],s[1],r[2][0],r[2][1])}else for(let t=1;t<r.length;t++)e.lineTo(r[t][0],r[t][1])}}function ck(e,t,n){let r=e.getTextGuideLine(),i=e.getTextContent();if(!i){r&&e.removeTextGuideLine();return}let a=t.normal,o=a.get(`show`),s=i.ignore;for(let n=0;n<Td.length;n++){let a=Td[n],c=t[a],l=a===`normal`;if(c){let n=c.get(`show`);if((l?s:V(i.states[a]&&i.states[a].ignore,s))||!V(n,o)){let e=l?r:r&&r.states[a];e&&(e.ignore=!0),r&&ok(r,!0,a,c);continue}r||(r=new Ep,e.setTextGuideLine(r),!l&&(s||!o)&&ok(r,!0,`normal`,t.normal),e.stateProxy&&(r.stateProxy=e.stateProxy)),ok(r,!1,a,c)}}if(r){M(r.style,n),r.style.fill=null;let t=a.get(`showAbove`),i=e.textGuideLineConfig=e.textGuideLineConfig||{};i.showAbove=t||!1,r.buildPath=sk}}function lk(e,t){t=t||`labelLine`;let n={normal:e.getModel(t)};for(let r=0;r<wd.length;r++){let i=wd[r];n[i]=e.getModel([i,t])}return n}const uk=[`label`,`labelLine`,`layoutOption`,`priority`,`defaultAttr`,`marginForce`,`minMarginForce`,`marginDefault`,`suggestIgnore`];function dk(e,t,n){n=n||3,t?e.dirty|=n:e.dirty&=~n}function fk(e,t){return t=t||3,e.dirty==null||!!(e.dirty&t)}function pk(e){if(e)return fk(e)&&mk(e,e.label,e),e}function mk(e,t,n){let r=t.getComputedTransform();e.transform=Km(e.transform,r);let i=e.localRect=Gm(e.localRect,t.getBoundingRect()),a=t.style,o=a.margin,s=n&&n.marginForce,c=n&&n.minMarginForce,l=n&&n.marginDefault,u=a.__marginType;u==null&&l&&(o=l,u=vh.textMargin);for(let e=0;e<4;e++)hk[e]=u===vh.minMargin&&c&&c[e]!=null?c[e]:s&&s[e]!=null?s[e]:o?o[e]:0;u===vh.textMargin&&Lm(i,hk,!1,!1);let d=e.rect=Gm(e.rect,i);return r&&d.applyTransform(r),u===vh.minMargin&&Lm(d,hk,!1,!1),e.axisAligned=Um(r),(e.label=e.label||{}).ignore=t.ignore,dk(e,!1),dk(e,!0,2),e}const hk=[0,0,0,0];function gk(e,t,n){return e.transform=Km(e.transform,n),e.localRect=Gm(e.localRect,t),e.rect=Gm(e.rect,t),n&&e.rect.applyTransform(n),e.axisAligned=Um(n),e.obb=void 0,(e.label=e.label||{}).ignore=!1,e}function _k(e,t){if(!e)return;e.label.x+=t.x,e.label.y+=t.y,e.label.markRedraw();let n=e.transform;n&&(n[4]+=t.x,n[5]+=t.y);let r=e.rect;r&&(r.x+=t.x,r.y+=t.y);let i=e.obb;i&&i.fromBoundingRect(e.localRect,n)}function vk(e,t){for(let n=0;n<uk.length;n++){let r=uk[n];e[r]==null&&(e[r]=t[r])}return pk(e)}function yk(e){let t=e.obb;return(!t||fk(e,2))&&(e.obb=t=t||new Jp,t.fromBoundingRect(e.localRect,e.transform),dk(e,!1,2)),t}function bk(e,t,n,r,i){let a=e.length,o=Z[t],s=um[t];if(a<2)return!1;e.sort(function(e,t){return e.rect[o]-t.rect[o]});let c=0,l,u=!1,d=0;for(let t=0;t<a;t++){let n=e[t],r=n.rect;l=r[o]-c,l<0&&(r[o]-=l,n.label[o]-=l,u=!0);let i=Math.max(-l,0);d+=i,c=r[o]+r[s]}d>0&&i&&v(-d/a,0,a);let f=e[0],p=e[a-1],m,h;g(),m<0&&y(-m,.8),h<0&&y(h,.8),g(),_(m,h,1),_(h,m,-1),g(),m<0&&b(-m),h<0&&b(h);function g(){m=f.rect[o]-n,h=r-p.rect[o]-p.rect[s]}function _(e,t,n){if(e<0){let r=Math.min(t,-e);if(r>0){v(r*n,0,a);let t=r+e;t<0&&y(-t*n,1)}else y(-e*n,1)}}function v(t,n,r){t!==0&&(u=!0);for(let i=n;i<r;i++){let n=e[i],r=n.rect;r[o]+=t,n.label[o]+=t}}function y(t,n){let r=[],i=0;for(let t=1;t<a;t++){let n=e[t-1].rect,a=Math.max(e[t].rect[o]-n[o]-n[s],0);r.push(a),i+=a}if(!i)return;let c=Math.min(Math.abs(t)/i,n);if(t>0)for(let e=0;e<a-1;e++)v(r[e]*c,0,e+1);else for(let e=a-1;e>0;e--)v(-(r[e-1]*c),e,a)}function b(e){let t=e<0?-1:1;e=Math.abs(e);let n=Math.ceil(e/(a-1));for(let r=0;r<a-1;r++)if(t>0?v(n,0,r+1):v(-n,a-r-1,a),e-=n,e<=0)return}return u}function xk(e){for(let t=0;t<e.length;t++){let n=e[t],r=n.defaultAttr,i=n.labelLine;n.label.attr(`ignore`,r.ignore),i&&i.attr(`ignore`,r.labelGuideIgnore)}}function Sk(e){let t=[];e.sort(function(e,t){return+!!t.suggestIgnore-!!e.suggestIgnore||t.priority-e.priority});function n(e){if(!e.ignore){let t=e.ensureState(`emphasis`);t.ignore==null&&(t.ignore=!1)}e.ignore=!0}for(let r=0;r<e.length;r++){let i=pk(e[r]);if(i.label.ignore)continue;let a=i.label,o=i.labelLine,s=!1;for(let e=0;e<t.length;e++)if(Ck(i,t[e],null,{touchThreshold:.05})){s=!0;break}s?(n(a),o&&n(o)):t.push(i)}}function Ck(e,t,n,r){return!e||!t||e.label&&e.label.ignore||t.label&&t.label.ignore||!e.rect.intersect(t.rect,n,r)?!1:e.axisAligned&&t.axisAligned?!0:yk(e).intersect(yk(t),n,r)}function wk(e){if(e){let t=[];for(let n=0;n<e.length;n++)t.push(e[n].slice());return t}}function Tk(e,t){let n=e.label,r=t&&t.getTextGuideLine();return{dataIndex:e.dataIndex,dataType:e.dataType,seriesIndex:e.seriesModel.seriesIndex,text:e.label.style.text,rect:e.hostRect,labelRect:e.rect,align:n.style.align,verticalAlign:n.style.verticalAlign,labelLinePoints:wk(r&&r.shape.points)}}const Ek=[`align`,`verticalAlign`,`width`,`height`,`fontSize`],Dk=new ya,Ok=Y(),kk=Y();function Ak(e,t,n){for(let r=0;r<n.length;r++){let i=n[r];t[i]!=null&&(e[i]=t[i])}}const jk=[`x`,`y`,`rotation`];var Mk=class{constructor(){this._labelList=[],this._chartViewList=[]}clearLabels(){this._labelList=[],this._chartViewList=[]}_addLabel(e,t,n,r,i){let a=r.style,o=r.__hostTarget.textConfig||{},s=r.getComputedTransform(),c=r.getBoundingRect().plain();K.applyTransform(c,c,s),s?Dk.setLocalTransform(s):(Dk.x=Dk.y=Dk.rotation=Dk.originX=Dk.originY=0,Dk.scaleX=Dk.scaleY=1),Dk.rotation=cu(Dk.rotation);let l=r.__hostTarget,u;if(l){u=l.getBoundingRect().plain();let e=l.getComputedTransform();K.applyTransform(u,u,e)}let d=u&&l.getTextGuideLine();this._labelList.push({label:r,labelLine:d,seriesModel:n,dataIndex:e,dataType:t,layoutOptionOrCb:i,layoutOption:null,rect:c,hostRect:u,priority:u?u.width*u.height:0,defaultAttr:{ignore:r.ignore,labelGuideIgnore:d&&d.ignore,x:Dk.x,y:Dk.y,scaleX:Dk.scaleX,scaleY:Dk.scaleY,rotation:Dk.rotation,style:{x:a.x,y:a.y,align:a.align,verticalAlign:a.verticalAlign,width:a.width,height:a.height,fontSize:a.fontSize},cursor:r.cursor,attachedPos:o.position,attachedRot:o.rotation}})}addLabelsOfSeries(e){this._chartViewList.push(e);let t=e.__model,n=t.get(`labelLayout`);(R(n)||ue(n).length)&&e.group.traverse(e=>{if(e.ignore)return!0;let r=e.getTextContent(),i=X(e);r&&!r.disableLabelLayout&&this._addLabel(i.dataIndex,i.dataType,t,r,n)})}updateLayoutConfig(e){let t=e.getWidth(),n=e.getHeight();function r(e,t){return function(){tk(e,t)}}for(let e=0;e<this._labelList.length;e++){let i=this._labelList[e],a=i.label,o=a.__hostTarget,s=i.defaultAttr,c;c=R(i.layoutOptionOrCb)?i.layoutOptionOrCb(Tk(i,o)):i.layoutOptionOrCb,c=c||{},i.layoutOption=c;let l=Math.PI/180;o&&o.setTextConfig({local:!1,position:c.x!=null||c.y!=null?null:s.attachedPos,rotation:c.rotate==null?s.attachedRot:c.rotate*l,offset:[c.dx||0,c.dy||0]});let u=!1;if(c.x==null?(a.x=s.x,a.setStyle(`x`,s.style.x)):(a.x=J(c.x,t),a.setStyle(`x`,0),u=!0),c.y==null?(a.y=s.y,a.setStyle(`y`,s.style.y)):(a.y=J(c.y,n),a.setStyle(`y`,0),u=!0),c.labelLinePoints){let e=o.getTextGuideLine();e&&(e.setShape({points:c.labelLinePoints}),u=!1)}let d=Ok(a);d.needsUpdateLabelLine=u,a.rotation=c.rotate==null?s.rotation:c.rotate*l,a.scaleX=s.scaleX,a.scaleY=s.scaleY;for(let e=0;e<Ek.length;e++){let t=Ek[e];a.setStyle(t,c[t]==null?s.style[t]:c[t])}if(c.draggable){if(a.draggable=!0,a.cursor=`move`,o){let e=i.seriesModel;i.dataIndex!=null&&(e=i.seriesModel.getData(i.dataType).getItemModel(i.dataIndex)),a.on(`drag`,r(o,e.getModel(`labelLine`)))}}else a.off(`drag`),a.cursor=s.cursor}}layout(e){let t=e.getWidth(),n=e.getHeight(),r=[];P(this._labelList,e=>{e.defaultAttr.ignore||r.push(vk({},e))});let i=ce(r,function(e){return e.layoutOption.moveOverlap===`shiftX`}),a=ce(r,function(e){return e.layoutOption.moveOverlap===`shiftY`});bk(i,0,0,t),bk(a,1,0,n);let o=ce(r,function(e){return e.layoutOption.hideOverlap});xk(o),Sk(o)}processLabelsOverall(){P(this._chartViewList,e=>{let t=e.__model,n=e.ignoreLabelLineUpdate,r=t.isAnimationEnabled();e.group.traverse(e=>{if(e.ignore&&!e.forceLabelAnimation)return!0;let i=!n,a=e.getTextContent();!i&&a&&(i=Ok(a).needsUpdateLabelLine),i&&this._updateLabelLine(e,t),r&&this._animateLabels(e,t)})})}_updateLabelLine(e,t){let n=e.getTextContent(),r=X(e),i=r.dataIndex;if(n&&i!=null){let n=t.getData(r.dataType),a=n.getItemModel(i),o={},s=n.getItemVisual(i,`style`);s&&(o.stroke=s[n.getVisual(`drawType`)]);let c=a.getModel(`labelLine`);ck(e,lk(a),o),tk(e,c)}}_animateLabels(e,t){let n=e.getTextContent(),r=e.getTextGuideLine();if(n&&(e.forceLabelAnimation||!n.ignore&&!n.invisible&&!e.disableLabelAnimation&&!nm(e))){let r=Ok(n),i=r.oldLayout,a=X(e),o=a.dataIndex,s={x:n.x,y:n.y,rotation:n.rotation},c=t.getData(a.dataType);if(i){n.attr(i);let a=e.prevStates;a&&(N(a,`select`)>=0&&n.attr(r.oldLayoutSelect),N(a,`emphasis`)>=0&&n.attr(r.oldLayoutEmphasis)),em(n,s,t,o)}else if(n.attr(s),!hh(n).valueAnimation){let e=V(n.style.opacity,1);n.style.opacity=0,tm(n,{style:{opacity:e}},t,o)}if(r.oldLayout=s,n.states.select){let e=r.oldLayoutSelect={};Ak(e,s,jk),Ak(e,n.states.select,jk)}if(n.states.emphasis){let e=r.oldLayoutEmphasis={};Ak(e,s,jk),Ak(e,n.states.emphasis,jk)}_h(n,o,c,t,t)}if(r&&!r.ignore&&!r.invisible){let e=kk(r),n=e.oldLayout,i={points:r.shape.points};n?(r.attr({shape:n}),em(r,{shape:i},t)):(r.setShape(i),r.style.strokePercent=0,tm(r,{style:{strokePercent:1}},t)),e.oldLayout=i}}};const Nk=Y();function Pk(e){e.registerUpdateLifecycle(`series:beforeupdate`,function(e,t,n){let r=Nk(t).labelManager;r||(r=Nk(t).labelManager=new Mk),r.clearLabels()}),e.registerUpdateLifecycle(`series:layoutlabels`,function(e,t,n){let r=Nk(t).labelManager;P(n.updatedSeries,function(e){r.addLabelsOfSeries(t.getViewOfSeriesModel(e))}),r.updateLayoutConfig(t),r.layout(t),r.processLabelsOverall()})}BD(Pk);var Fk=class e extends Db{constructor(...t){super(...t),this.type=e.type,this.hasSymbolVisual=!0}getInitialData(e){if(typeof process<`u`&&process.env.NODE_ENV!==`production`){let t=e.coordinateSystem;if(t!==`polar`&&t!==`cartesian2d`)throw Error(`Line not support coordinateSystem besides cartesian and polar`)}return ST(null,this,{useEncodeDefaulter:!0})}getLegendIcon(e){let t=new q,n=lS(`line`,0,e.itemHeight/2,e.itemWidth,0,e.lineStyle.stroke,!1);t.add(n),n.setStyle(e.lineStyle);let r=this.getData().getVisual(`symbol`),i=this.getData().getVisual(`symbolRotate`),a=r===`none`?`circle`:r,o=e.itemHeight*.8,s=lS(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}};Fk.type=`series.line`,Fk.dependencies=[`grid`,`polar`],Fk.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,triggerEvent:!1};function Ik(e,t){let n=e.mapDimensionsAll(`defaultedLabel`),r=n.length;if(r===1){let r=py(e,t,n[0]);return r==null?null:r+``}if(r){let r=[];for(let i=0;i<n.length;i++)r.push(py(e,t,n[i]));return r.join(` `)}}function Lk(e,t){let n=e.mapDimensionsAll(`defaultedLabel`);if(!L(t))return t+``;let r=[];for(let i=0;i<n.length;i++){let a=e.getDimensionIndex(n[i]);a>=0&&r.push(t[a])}return r.join(` `)}var Rk=class e extends q{constructor(e,t,n,r){super(),this.updateData(e,t,n,r)}_createSymbol(e,t,n,r,i,a){this.removeAll();let o=lS(e,-1,-1,2,2,null,a);o.attr({z2:V(i,100),culling:!0,scaleX:r[0]/2,scaleY:r[1]/2}),o.drift=zk,this._symbolType=e,this.add(o)}stopSymbolAnimation(e){this.childAt(0).stopAnimation(null,e)}getSymbolType(){return this._symbolType}getSymbolPath(){return this.childAt(0)}highlight(){Zd(this.childAt(0))}downplay(){Qd(this.childAt(0))}setZ(e,t){let n=this.childAt(0);n.zlevel=e,n.z=t}setDraggable(e,t){let n=this.childAt(0);n.draggable=e,n.cursor=!t&&e?`move`:n.cursor}updateData(t,n,r,i){this.silent=!1;let a=t.getItemVisual(n,`symbol`)||`circle`,o=t.hostModel,s=e.getSymbolSize(t,n),c=e.getSymbolZ2(t,n),l=a!==this._symbolType,u=i&&i.disableAnimation;if(l){let e=t.getItemVisual(n,`symbolKeepAspect`);this._createSymbol(a,t,n,s,c,e)}else{let e=this.childAt(0);e.silent=!1;let t={scaleX:s[0]/2,scaleY:s[1]/2};u?e.attr(t):em(e,t,o,n),om(e)}if(this._updateCommon(t,n,s,r,i),l){let e=this.childAt(0);if(!u){let t={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:e.style.opacity}};e.scaleX=e.scaleY=0,e.style.opacity=0,tm(e,t,o,n)}}u&&this.childAt(0).stopAnimation(`leave`)}_updateCommon(e,t,n,r,i){let 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){let n=r&&r.itemModel?r.itemModel:e.getItemModel(t),i=n.getModel(`emphasis`);s=i.getModel(`itemStyle`).getItemStyle(),l=n.getModel([`select`,`itemStyle`]).getItemStyle(),c=n.getModel([`blur`,`itemStyle`]).getItemStyle(),u=i.get(`focus`),d=i.get(`blurScope`),f=i.get(`disabled`),p=ah(n),m=i.getShallow(`scale`),h=n.getShallow(`cursor`)}let g=e.getItemVisual(t,`symbolRotate`);a.attr(`rotation`,(g||0)*Math.PI/180||0);let _=dS(e.getItemVisual(t,`symbolOffset`),n);_&&(a.x=_[0],a.y=_[1]),h&&a.attr(`cursor`,h);let v=e.getItemVisual(t,`style`),y=v.fill;if(a instanceof Fu){let e=a.style;a.useStyle(j({image:e.image,x:e.x,y:e.y,width:e.width,height:e.height},v))}else a.__isEmptyBrush?a.useStyle(j({},v)):a.useStyle(v),a.style.decal=null,a.setColor(y,i&&i.symbolInnerColor),a.style.strokeNoScale=!0;let b=e.getItemVisual(t,`liftZ`),x=this._z2;b==null?x!=null&&(a.z2=x,this._z2=null):x==null&&(this._z2=a.z2,a.z2+=b);let S=i&&i.useNameLabel;ih(a,p,{labelFetcher:o,labelDataIndex:t,defaultText:C,inheritColor:y,defaultOpacity:v.opacity});function C(t){return S?e.getName(t):Ik(e,t)}this._sizeX=n[0]/2,this._sizeY=n[1]/2;let w=a.ensureState(`emphasis`);w.style=s,a.ensureState(`select`).style=l,a.ensureState(`blur`).style=c;let T=m==null||m===!0?Math.max(1.1,3/this._sizeY):isFinite(m)&&m>0?+m:1;w.scaleX=this._sizeX*T,w.scaleY=this._sizeY*T,this.setSymbolScale(1),_f(this,u,d,f)}setSymbolScale(e){this.scaleX=this.scaleY=e}fadeOut(e,t,n){let r=this.childAt(0),i=X(this).dataIndex,a=n&&n.animation;if(this.silent=r.silent=!0,n&&n.fadeLabel){let e=r.getTextContent();e&&rm(e,{style:{opacity:0}},t,{dataIndex:i,removeOpt:a,cb(){r.removeTextContent()}})}else r.removeTextContent();rm(r,{style:{opacity:0},scaleX:0,scaleY:0},t,{dataIndex:i,cb:e,removeOpt:a})}static getSymbolSize(e,t){return uS(e.getItemVisual(t,`symbolSize`))}static getSymbolZ2(e,t){return e.getItemVisual(t,`z2`)}};function zk(e,t){this.parent.drift(e,t)}function Bk(e,t,n,r){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(r&&r.isIgnore&&r.isIgnore(n))&&!(r&&r.clipShape&&!r.clipShape.contain(t[0],t[1]))&&e.getItemVisual(n,`symbol`)!==`none`}function Vk(e){return e!=null&&!B(e)&&(e={isIgnore:e}),e||{}}function Hk(e){let 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:ah(t),cursorStyle:t.get(`cursor`)}}function Uk(e,t,n,r,i,a,o){let s=new e(t,n,r,i);return s.setPosition(a),t.setItemGraphicEl(n,s),o.add(s),s}var Wk=class{constructor(e){this.group=new q,this._SymbolCtor=e||Rk}updateData(e,t){this._progressiveEls=null,t=Vk(t);let n=this.group,r=e.hostModel,i=this._data,a=this._SymbolCtor,o=t.disableAnimation,s=this._seriesScope=Hk(e),c={disableAnimation:o},l=t.getSymbolPoint||function(t){return e.getItemLayout(t)};i||n.removeAll(),e.diff(i).add(function(r){let i=l(r);Bk(e,i,r,t)&&Uk(a,e,r,s,c,i,n)}).update(function(u,d){let f=i.getItemGraphicEl(d),p=l(u);if(!Bk(e,p,u,t)){n.remove(f);return}let 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);let t={x:p[0],y:p[1]};o?f.attr(t):em(f,t,r)}n.add(f),e.setItemGraphicEl(u,f)}).remove(function(e){let t=i.getItemGraphicEl(e);t&&t.fadeOut(function(){n.remove(t)},r)}).execute(),this._getSymbolPoint=l,this._data=e}updateLayout(e){let t=this._data;if(!t)return;let n=this,r=t.getStore();for(let i=0,a=r.count();i<a;i++){let r=t.getItemGraphicEl(i),a=n._getSymbolPoint(i);Bk(t,a,i,e)?(r=r||Uk(n._SymbolCtor,t,i,n._seriesScope,{disableAnimation:!0},a,n.group),r.stopAnimation(),r.setPosition(a),r.markRedraw()):r&&(n.group.remove(r),t.setItemGraphicEl(i,null))}}incrementalPrepareUpdate(e){this._seriesScope=Hk(e),this._data=null,this.group.removeAll()}incrementalUpdate(e,t,n,r){this._progressiveEls=[],r=Vk(r);function i(e){e.isGroup||(e.incremental=n,e.ensureState(`emphasis`).hoverLayer=2)}for(let n=e.start;n<e.end;n++){let e=t.getItemLayout(n);if(Bk(t,e,n,r)){let r=new this._SymbolCtor(t,n,this._seriesScope);r.traverse(i),r.setPosition(e),this.group.add(r),t.setItemGraphicEl(n,r),this._progressiveEls.push(r)}}}eachRendered(e){Hm(this._progressiveEls||this.group,e)}remove(e){let t=this.group,n=this._data;n&&e?n.eachItemGraphicEl(function(e){e.fadeOut(function(){t.remove(e)},n.hostModel)}):t.removeAll()}};function Gk(e,t,n){let r=e.getBaseAxis(),i=e.getOtherAxis(r),a=Kk(i,n),o=r.dim,s=i.dim,c=t.mapDimension(s),l=t.mapDimension(o),u=+(s===`x`||s===`radius`),d=F(e.dimensions,function(e){return t.mapDimension(e)}),f=!1,p=t.getCalculationInfo(`stackResultDimension`);return vT(t,d[0])&&(f=!0,d[0]=p),vT(t,d[1])&&(f=!0,d[1]=p),{dataDimsForPoint:d,valueStart:a,valueAxisDim:s,baseAxisDim:o,stacked:!!f,valueDim:c,baseDim:l,baseDataOffset:u,stackedOverDimension:t.getCalculationInfo(`stackedOverDimension`)}}function Kk(e,t){let n=0,r=e.scale.getExtent();return t===`start`?n=r[0]:t===`end`?n=r[1]:me(t)&&!isNaN(t)?n=t:r[0]>0?n=r[0]:r[1]<0&&(n=r[1]),n}function qk(e,t,n,r){let i=NaN;e.stacked&&(i=n.get(n.getCalculationInfo(`stackedOverDimension`),r)),isNaN(i)&&(i=e.valueStart);let a=e.baseDataOffset,o=[];return o[a]=n.get(e.baseDim,r),o[1-a]=i,t.dataToPoint(o)}function Jk(e,t){return!isFinite(e)||!isFinite(t)}const Yk=typeof Float32Array<`u`?Float32Array:void 0,Xk=typeof Float64Array<`u`?Float64Array:void 0;function Zk(e){return Qk({ctor:Yk},e).arr}function Qk(e,t){typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(t!=null&&isFinite(t)&&t>=0&&e.hasOwnProperty(`ctor`));let n=e.arr,r=e.ctor;if(t>Go&&(t=Go),!n||e.typed&&n.length<t){let i;if(r)try{i=new r(t),e.typed=!0,n&&i.set(n)}catch(e){typeof process<`u`&&process.env.NODE_ENV!==`production`&&fs(e)}if(!i&&(i=[],e.typed=!1,n))for(let e=0,t=n.length;e<t;e++)i[e]=n[e];e.arr=i}return e}function $k(e,t){let 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 eA(e,t,n,r,i,a,o,s){let c=$k(e,t),l=[],u=[],d=[],f=[],p=[],m=[],h=[],g=Gk(i,t,o),_=e.getLayout(`points`)||[],v=t.getLayout(`points`)||[];for(let e=0;e<c.length;e++){let a=c[e],o=!0,s,y;switch(a.cmd){case`=`:s=a.idx*2,y=a.idx1*2;let e=_[s],c=_[s+1],p=v[y],m=v[y+1];(isNaN(e)||isNaN(c))&&(e=p,c=m),l.push(e,c),u.push(p,m),d.push(n[s],n[s+1]),f.push(r[y],r[y+1]),h.push(t.getRawIndex(a.idx1));break;case`+`:let b=a.idx,x=g.dataDimsForPoint,S=i.dataToPoint([t.get(x[0],b),t.get(x[1],b)]);y=b*2,l.push(S[0],S[1]),u.push(v[y],v[y+1]);let C=qk(g,i,t,b);d.push(C[0],C[1]),f.push(r[y],r[y+1]),h.push(t.getRawIndex(b));break;case`-`:o=!1}o&&(p.push(a),m.push(m.length))}m.sort(function(e,t){return h[e]-h[t]});let y=l.length,b=Zk(y),x=Zk(y),S=Zk(y),C=Zk(y),w=[];for(let e=0;e<m.length;e++){let t=m[e],n=e*2,r=t*2;b[n]=l[r],b[n+1]=l[r+1],x[n]=u[r],x[n+1]=u[r+1],S[n]=d[r],S[n+1]=d[r+1],C[n]=f[r],C[n+1]=f[r+1],w[e]=p[t]}return{current:b,next:x,stackedOnCurrent:S,stackedOnNext:C,status:w}}const tA=Math.min,nA=Math.max;function rA(e,t,n,r,i,a,o,s,c){let l,u,d,f,p,m,h=n,g=0;for(;g<r;g++){let _=t[h*2],v=t[h*2+1];if(h>=i||h<0)break;if(Jk(_,v)){if(c){h+=a;continue}break}if(h===n)e[a>0?`moveTo`:`lineTo`](_,v),d=_,f=v;else{let n=_-l,i=v-u;if(n*n+i*i<.5){h+=a;continue}if(o>0){let y=h+a,b=t[y*2],x=t[y*2+1];for(;b===_&&x===v&&g<r;)g++,y+=a,h+=a,b=t[y*2],x=t[y*2+1],_=t[h*2],v=t[h*2+1],n=_-l,i=v-u;let S=g+1;if(c)for(;Jk(b,x)&&S<r;)S++,y+=a,b=t[y*2],x=t[y*2+1];let C=.5,w=0,T=0,E,D;if(S>=r||Jk(b,x))p=_,m=v;else{w=b-l,T=x-u;let e=_-l,t=b-_,n=v-u,r=x-v,i,a;if(s===`x`){i=Math.abs(e),a=Math.abs(t);let n=w>0?1:-1;p=_-n*i*o,m=v,E=_+n*a*o,D=v}else if(s===`y`){i=Math.abs(n),a=Math.abs(r);let e=T>0?1:-1;p=_,m=v-e*i*o,E=_,D=v+e*a*o}else i=Math.sqrt(e*e+n*n),a=Math.sqrt(t*t+r*r),C=a/(a+i),p=_-w*o*(1-C),m=v-T*o*(1-C),E=_+w*o*C,D=v+T*o*C,E=tA(E,nA(b,_)),D=tA(D,nA(x,v)),E=nA(E,tA(b,_)),D=nA(D,tA(x,v)),w=E-_,T=D-v,p=_-w*i/a,m=v-T*i/a,p=tA(p,nA(l,_)),m=tA(m,nA(u,v)),p=nA(p,tA(l,_)),m=nA(m,tA(u,v)),w=_-p,T=v-m,E=_+w*a/i,D=v+T*a/i}e.bezierCurveTo(d,f,p,m,_,v),d=E,f=D}else e.lineTo(_,v)}l=_,u=v,h+=a}return g}var iA=class{constructor(){this.smooth=0,this.smoothConstraint=!0}},aA=class extends Ou{constructor(e){super(e),this.type=`ec-polyline`}getDefaultStyle(){return{stroke:Q.color.neutral99,fill:null}}getDefaultShape(){return new iA}buildPath(e,t){let n=t.points,r=0,i=n.length/2;if(t.connectNulls){for(;i>0&&Jk(n[i*2-2],n[i*2-1]);i--);for(;r<i&&Jk(n[r*2],n[r*2+1]);r++);}for(;r<i;)r+=rA(e,n,r,i,i,1,t.smooth,t.smoothMonotone,t.connectNulls)+1}getPointOn(e,t){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));let n=this.path.data,r=ru.CMD,i,a,o=t===`x`,s=[];for(let t=0;t<n.length;){let c=n[t++],l,u,d,f,p,m,h;switch(c){case r.M:i=n[t++],a=n[t++];break;case r.L:if(l=n[t++],u=n[t++],h=o?(e-i)/(l-i):(e-a)/(u-a),h<=1&&h>=0){let t=o?(u-a)*h+a:(l-i)*h+i;return o?[e,t]:[t,e]}i=l,a=u;break;case r.C:l=n[t++],u=n[t++],d=n[t++],f=n[t++],p=n[t++],m=n[t++];let c=o?dr(i,l,d,p,e,s):dr(a,u,f,m,e,s);if(c>0)for(let t=0;t<c;t++){let n=s[t];if(n<=1&&n>=0){let t=o?lr(a,u,f,m,n):lr(i,l,d,p,n);return o?[e,t]:[t,e]}}i=p,a=m}}}},oA=class extends iA{},sA=class extends Ou{constructor(e){super(e),this.type=`ec-polygon`}getDefaultShape(){return new oA}buildPath(e,t){let n=t.points,r=t.stackedOnPoints,i=0,a=n.length/2,o=t.smoothMonotone;if(t.connectNulls){for(;a>0&&Jk(n[a*2-2],n[a*2-1]);a--);for(;i<a&&Jk(n[i*2],n[i*2+1]);i++);}for(;i<a;){let s=rA(e,n,i,a,a,1,t.smooth,o,t.connectNulls);rA(e,r,i+s-1,s,a,-1,t.stackedOnSmooth,o,t.connectNulls),i+=s+1,e.closePath()}}};function cA(e,t,n,r,i){let a=e.getArea(),o=a.x,s=a.y,c=a.width,l=a.height,u=n.get([`lineStyle`,`width`])||0;o-=u/2,s-=u/2,c+=u,l+=u,c=Math.ceil(c),o!==Math.floor(o)&&(o=Math.floor(o),c++);let d=new Uu({shape:{x:o,y:s,width:c,height:l}});if(t){let t=e.getBaseAxis(),a=t.isHorizontal(),u=t.inverse;a?(u&&(d.shape.x+=c),d.shape.width=0):(u||(d.shape.y+=l),d.shape.height=0);let f=R(i)?e=>{i(e,d)}:null;tm(d,{shape:{width:c,height:l,x:o,y:s}},n,null,r,f)}return d}function lA(e,t,n){let r=e.getArea(),i=Fo(r.r0,1),a=Fo(r.r,1),o=new vp({shape:{cx:Fo(e.cx,1),cy:Fo(e.cy,1),r0:i,r:a,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}});return t&&(e.getBaseAxis().dim===`angle`?o.shape.endAngle=r.startAngle:o.shape.r=i,tm(o,{shape:{endAngle:r.endAngle,r:a}},n)),o}function uA(e,t,n,r,i){return e?e.type===`polar`?lA(e,t,n):e.type===`cartesian2d`?cA(e,t,n,r,i):null:null}function dA(e,t,n){e?(typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(n),t.setClipPath(n)):t.removeClipPath()}function fA(e){let t=e.coordinateSystem;if(e.get(`clip`,!0)&&t&&(!t.shouldClip||t.shouldClip()))return t.getArea&&t.getArea(.1)}function pA(e,t){return e.type===t}function mA(e){let t=e.dimensions;return t[0]===`lng`&&t[1]===`lat`&&!!e.getViewRect}const hA={};function gA(e,t,n,r){return e&&(e.legacy||e.legacy!==!1&&!n&&!r&&t!==`tspan`&&(t===`text`||W(e,`text`)))}function _A(e,t,n){let r=e,i,a,o;if(t===`text`)o=r;else{o={},W(r,`text`)&&(o.text=r.text),W(r,`rich`)&&(o.rich=r.rich),W(r,`textFill`)&&(o.fill=r.textFill),W(r,`textStroke`)&&(o.stroke=r.textStroke),W(r,`fontFamily`)&&(o.fontFamily=r.fontFamily),W(r,`fontSize`)&&(o.fontSize=r.fontSize),W(r,`fontStyle`)&&(o.fontStyle=r.fontStyle),W(r,`fontWeight`)&&(o.fontWeight=r.fontWeight),a={type:`text`,style:o,silent:!0},i={};let e=W(r,`textPosition`);n?i.position=e?r.textPosition:`inside`:e&&(i.position=r.textPosition),W(r,`textPosition`)&&(i.position=r.textPosition),W(r,`textOffset`)&&(i.offset=r.textOffset),W(r,`textRotation`)&&(i.rotation=r.textRotation),W(r,`textDistance`)&&(i.distance=r.textDistance)}return vA(o,e),P(o.rich,function(e){vA(e,e)}),{textConfig:i,textContent:a}}function vA(e,t){t&&(t.font=t.textFont||t.font,W(t,`textStrokeWidth`)&&(e.lineWidth=t.textStrokeWidth),W(t,`textAlign`)&&(e.align=t.textAlign),W(t,`textVerticalAlign`)&&(e.verticalAlign=t.textVerticalAlign),W(t,`textLineHeight`)&&(e.lineHeight=t.textLineHeight),W(t,`textWidth`)&&(e.width=t.textWidth),W(t,`textHeight`)&&(e.height=t.textHeight),W(t,`textBackgroundColor`)&&(e.backgroundColor=t.textBackgroundColor),W(t,`textPadding`)&&(e.padding=t.textPadding),W(t,`textBorderColor`)&&(e.borderColor=t.textBorderColor),W(t,`textBorderWidth`)&&(e.borderWidth=t.textBorderWidth),W(t,`textBorderRadius`)&&(e.borderRadius=t.textBorderRadius),W(t,`textBoxShadowColor`)&&(e.shadowColor=t.textBoxShadowColor),W(t,`textBoxShadowBlur`)&&(e.shadowBlur=t.textBoxShadowBlur),W(t,`textBoxShadowOffsetX`)&&(e.shadowOffsetX=t.textBoxShadowOffsetX),W(t,`textBoxShadowOffsetY`)&&(e.shadowOffsetY=t.textBoxShadowOffsetY))}function yA(e,t,n){let r=e;r.textPosition=r.textPosition||n.position||`inside`,n.offset!=null&&(r.textOffset=n.offset),n.rotation!=null&&(r.textRotation=n.rotation),n.distance!=null&&(r.textDistance=n.distance);let i=r.textPosition.indexOf(`inside`)>=0,a=e.fill||Q.color.neutral99;bA(r,t);let o=r.textFill==null;return i?o&&(r.textFill=n.insideFill||Q.color.neutral00,!r.textStroke&&n.insideStroke&&(r.textStroke=n.insideStroke),!r.textStroke&&(r.textStroke=a),r.textStrokeWidth==null&&(r.textStrokeWidth=2)):(o&&(r.textFill=e.fill||n.outsideFill||Q.color.neutral00),!r.textStroke&&n.outsideStroke&&(r.textStroke=n.outsideStroke)),r.text=t.text,r.rich=t.rich,P(t.rich,function(e){bA(e,e)}),r}function bA(e,t){t&&(W(t,`fill`)&&(e.textFill=t.fill),W(t,`stroke`)&&(e.textStroke=t.fill),W(t,`lineWidth`)&&(e.textStrokeWidth=t.lineWidth),W(t,`font`)&&(e.font=t.font),W(t,`fontStyle`)&&(e.fontStyle=t.fontStyle),W(t,`fontWeight`)&&(e.fontWeight=t.fontWeight),W(t,`fontSize`)&&(e.fontSize=t.fontSize),W(t,`fontFamily`)&&(e.fontFamily=t.fontFamily),W(t,`align`)&&(e.textAlign=t.align),W(t,`verticalAlign`)&&(e.textVerticalAlign=t.verticalAlign),W(t,`lineHeight`)&&(e.textLineHeight=t.lineHeight),W(t,`width`)&&(e.textWidth=t.width),W(t,`height`)&&(e.textHeight=t.height),W(t,`backgroundColor`)&&(e.textBackgroundColor=t.backgroundColor),W(t,`padding`)&&(e.textPadding=t.padding),W(t,`borderColor`)&&(e.textBorderColor=t.borderColor),W(t,`borderWidth`)&&(e.textBorderWidth=t.borderWidth),W(t,`borderRadius`)&&(e.textBorderRadius=t.borderRadius),W(t,`shadowColor`)&&(e.textBoxShadowColor=t.shadowColor),W(t,`shadowBlur`)&&(e.textBoxShadowBlur=t.shadowBlur),W(t,`shadowOffsetX`)&&(e.textBoxShadowOffsetX=t.shadowOffsetX),W(t,`shadowOffsetY`)&&(e.textBoxShadowOffsetY=t.shadowOffsetY),W(t,`textShadowColor`)&&(e.textShadowColor=t.textShadowColor),W(t,`textShadowBlur`)&&(e.textShadowBlur=t.textShadowBlur),W(t,`textShadowOffsetX`)&&(e.textShadowOffsetX=t.textShadowOffsetX),W(t,`textShadowOffsetY`)&&(e.textShadowOffsetY=t.textShadowOffsetY))}function xA(e,t){if(typeof process<`u`&&process.env.NODE_ENV!==`production`){let n=e+`^_^`+t;hA[n]||(console.warn(`[SparkNG Charts] DEPRECATED: "${e}" has been deprecated. ${t}`),hA[n]=!0)}}function SA(e,t){if(e.length===t.length){for(let n=0;n<e.length;n++)if(e[n]!==t[n])return;return!0}}function CA(e){let t=ic(),n=ic();for(let r=0;r<e.length;){let i=e[r++],a=e[r++];Jk(i,a)||(ac(t,i),ac(n,a))}return[t,n]}function wA(e,t){let[n,r]=CA(e),[i,a]=CA(t);return Math.max(Math.abs(n[0]-i[0]),Math.abs(r[0]-a[0]),Math.abs(n[1]-i[1]),Math.abs(r[1]-a[1]))}function TA(e){return me(e)?e:e?.5:0}function EA(e,t,n){if(n.valueDim==null)return[];let r=t.count(),i=Zk(r*2);for(let a=0;a<r;a++){let r=qk(n,e,t,a);i[a*2]=r[0],i[a*2+1]=r[1]}return i}function DA(e,t,n,r,i){let a=n.getBaseAxis(),o=a.dim===`x`||a.dim===`radius`?0:1,s=[],c=0,l=[],u=[],d=[],f=[];if(i){for(c=0;c<e.length;c+=2){let n=t||e;Jk(n[c],n[c+1])||f.push(e[c],e[c+1])}e=f}for(c=0;c<e.length-2;c+=2)switch(d[0]=e[c+2],d[1]=e[c+3],u[0]=e[c],u[1]=e[c+1],s.push(u[0],u[1]),r){case`end`:l[o]=d[o],l[1-o]=u[1-o],s.push(l[0],l[1]);break;case`middle`:let e=(u[o]+d[o])/2,t=[];l[o]=t[o]=e,l[1-o]=u[1-o],t[1-o]=d[1-o],s.push(l[0],l[1]),s.push(t[0],t[1]);break;default:l[o]=u[o],l[1-o]=d[1-o],s.push(l[0],l[1])}return s.push(e[c++],e[c++]),s}function OA(e,t){let n=[],r=e.length,i,a;function o(e,t,n){let r=e.coord;return{coord:n,color:Xr((n-r)/(t.coord-r),[e.color,t.color])}}for(let s=0;s<r;s++){let r=e[s],c=r.coord;if(c<0)i=r;else if(c>t){a?n.push(o(a,r,t)):i&&n.push(o(i,r,0),o(i,r,t));break}else i&&(n.push(o(i,r,0)),i=null),n.push(r),a=r}return n}function kA(e,t,n){let r=e.getVisual(`visualMeta`);if(!r||!r.length||!e.count())return;if(t.type!==`cartesian2d`){typeof process<`u`&&process.env.NODE_ENV!==`production`&&console.warn(`Visual map on line style is only supported on cartesian2d.`);return}let i,a;for(let t=r.length-1;t>=0;t--){let n=e.getDimensionInfo(r[t].dimension);if(i=n&&n.coordDim,i===`x`||i===`y`){a=r[t];break}}if(!a){typeof process<`u`&&process.env.NODE_ENV!==`production`&&console.warn(`Visual map on line style only support x or y dimension.`);return}let o=t.getAxis(i),s=F(a.stops,function(e){return{coord:o.toGlobalCoord(o.dataToCoord(e.value)),color:e.color}}),c=s.length,l=a.outerColors.slice();c&&s[0].coord>s[c-1].coord&&(s.reverse(),l.reverse());let u=OA(s,i===`x`?n.getWidth():n.getHeight()),d=u.length;if(!d&&c)return s[0].coord<0?l[1]?l[1]:s[c-1].color:l[0]?l[0]:s[0].color;let f=u[0].coord-10,p=u[d-1].coord+10,m=p-f;if(m<.001)return`transparent`;P(u,function(e){e.offset=(e.coord-f)/m}),u.push({offset:d?u[d-1].offset:.5,color:l[1]||`transparent`}),u.unshift({offset:d?u[0].offset:.5,color:l[0]||`transparent`});let h=new Rp(0,0,0,0,u,!0);return h[i]=f,h[i+`2`]=p,h}function AA(e,t,n){let r=e.get(`showAllSymbol`),i=r===`auto`;if(r&&!i)return;let a=n.getAxesByScale(`ordinal`)[0];if(!a||i&&jA(a,t))return;let o=t.mapDimension(a.dim),s={};return P(a.getViewLabels(),function(e){e.tick.offInterval||(s[IE(a.scale,e.tick)]=1)}),function(e){return!s.hasOwnProperty(t.get(o,e))}}function jA(e,t){let n=e.getExtent(),r=Math.abs(n[1]-n[0])/e.scale.count();isNaN(r)&&(r=0);let i=t.count(),a=Math.max(1,Math.round(i/5));for(let n=0;n<i;n+=a)if(Rk.getSymbolSize(t,n)[+!!e.isHorizontal()]*1.5>r)return!1;return!0}function MA(e){let t=e.length/2;for(;t>0&&Jk(e[t*2-2],e[t*2-1]);t--);return t-1}function NA(e,t){return[e[t*2],e[t*2+1]]}function PA(e,t,n){let r=e.length/2,i=n===`x`?0:1,a,o,s=0,c=-1;for(let n=0;n<r;n++)if(o=e[n*2+i],!Jk(o,e[n*2+1-i])){if(n===0)a=o;else{if(a<=t&&o>=t||a>=t&&o<=t){c=n;break}s=n,a=o}}return{range:[s,c],t:(t-a)/(o-a)}}function FA(e){if(e.get([`endLabel`,`show`]))return!0;for(let t=0;t<wd.length;t++)if(e.get([wd[t],`endLabel`,`show`]))return!0;return!1}function IA(e,t,n,r){if(pA(t,`cartesian2d`)){let i=r.getModel(`endLabel`),a=i.get(`valueAnimation`),o=r.getData(),s={lastFrameIndex:0},c=FA(r)?(n,r)=>{e._endLabelOnDuring(n,r,o,s,a,i,t)}:null,l=t.getBaseAxis().isHorizontal(),u=cA(t,n,r,()=>{let t=e._endLabel;t&&n&&s.originalX!=null&&t.attr({x:s.originalX,y:s.originalY})},c);if(!r.get(`clip`,!0)){let e=u.shape,t=Math.max(e.width,e.height);l?(e.y-=t,e.height+=t*2):(e.x-=t,e.width+=t*2)}return c&&c(1,u),u}return typeof process<`u`&&process.env.NODE_ENV!==`production`&&r.get([`endLabel`,`show`])&&console.warn(`endLabel is not supported for lines in polar systems.`),lA(t,n,r)}function LA(e,t){let n=t.getBaseAxis(),r=n.isHorizontal(),i=n.inverse,a=r?i?`right`:`left`:`center`,o=r?`middle`:i?`top`:`bottom`;return{normal:{align:e.get(`align`)||a,verticalAlign:e.get(`verticalAlign`)||o}}}var RA=class extends Vb{init(){let e=new q,t=new Wk;this.group.add(t.group),this._symbolDraw=t,this._lineGroup=e,this._changePolyState=I(this._changePolyState,this)}render(e,t,n){let r=e.coordinateSystem,i=this.group,a=e.getData(),o=e.getModel(`lineStyle`),s=e.getModel(`areaStyle`),c=a.getLayout(`points`)||[],l=r.type===`polar`,u=this._coordSys,d=this._symbolDraw,f=this._polyline,p=this._polygon,m=this._lineGroup,h=!t.ssr&&e.get(`animation`),g=!s.isEmpty(),_=s.get(`origin`),v=Gk(r,a,_),y=g&&EA(r,a,v),b=e.get(`showSymbol`),x=e.get(`connectNulls`),S=b&&!l&&AA(e,a,r),C=this._data;C&&C.eachItemGraphicEl(function(e,t){e.__temp&&(i.remove(e),C.setItemGraphicEl(t,null))}),b||d.remove(),i.add(m);let w=!l&&e.get(`step`),T;r&&r.getArea&&e.get(`clip`,!0)&&(T=r.getArea(),T.width==null?T.r0&&(T.r0-=.5,T.r+=.5):(T.x-=.1,T.y-=.1,T.width+=.2,T.height+=.2)),this._clipShapeForSymbol=T;let E=kA(a,r,n)||a.getVisual(`style`)[a.getVisual(`drawType`)];if(!(f&&u.type===r.type&&w===this._step))b&&d.updateData(a,{isIgnore:S,clipShape:T,disableAnimation:!0,getSymbolPoint(e){return[c[e*2],c[e*2+1]]}}),h&&this._initSymbolLabelAnimation(a,r,T),w&&(y&&(y=DA(y,c,r,w,x)),c=DA(c,null,r,w,x)),f=this._newPolyline(c),g?p=this._newPolygon(c,y):p&&(m.remove(p),p=this._polygon=null),l||this._initOrUpdateEndLabel(e,r,Hg(E)),m.setClipPath(IA(this,r,!0,e));else{g&&!p?p=this._newPolygon(c,y):p&&!g&&(m.remove(p),p=this._polygon=null),l||this._initOrUpdateEndLabel(e,r,Hg(E));let t=m.getClipPath();t?tm(t,{shape:IA(this,r,!1,e).shape},e):m.setClipPath(IA(this,r,!0,e)),b&&d.updateData(a,{isIgnore:S,clipShape:T,disableAnimation:!0,getSymbolPoint(e){return[c[e*2],c[e*2+1]]}}),(!SA(this._stackedOnPoints,y)||!SA(this._points,c))&&(h?this._doUpdateAnimation(a,y,r,n,w,_,x):(w&&(y&&(y=DA(y,c,r,w,x)),c=DA(c,null,r,w,x)),f.setShape({points:c}),p&&p.setShape({points:c,stackedOnPoints:y})))}let D=e.getModel(`emphasis`),O=D.get(`focus`),ee=D.get(`blurScope`),k=D.get(`disabled`);if(f.useStyle(M(o.getLineStyle(),{fill:`none`,stroke:E,lineJoin:`bevel`})),xf(f,e,`lineStyle`),f.style.lineWidth>0&&e.get([`emphasis`,`lineStyle`,`width`])===`bolder`){let e=f.getState(`emphasis`).style;e.lineWidth=+f.style.lineWidth+1}X(f).seriesIndex=e.seriesIndex,_f(f,O,ee,k);let A=TA(e.get(`smooth`)),te=e.get(`smoothMonotone`);if(f.setShape({smooth:A,smoothMonotone:te,connectNulls:x}),p){let t=a.getCalculationInfo(`stackedOnSeries`),n=0;p.useStyle(M(s.getAreaStyle(),{fill:E,opacity:.7,lineJoin:`bevel`,decal:a.getVisual(`style`).decal})),t&&(n=TA(t.get(`smooth`))),p.setShape({smooth:A,stackedOnSmooth:n,smoothMonotone:te,connectNulls:x}),xf(p,e,`areaStyle`),X(p).seriesIndex=e.seriesIndex,_f(p,O,ee,k)}let j=this._changePolyState;a.eachItemGraphicEl(function(e){e&&(e.onHoverStateChange=j)}),this._polyline.onHoverStateChange=j,this._data=a,this._coordSys=r,this._stackedOnPoints=y,this._points=c,this._step=w,this._valueOrigin=_;let ne=e.get(`triggerEvent`),re=e.get(`triggerLineEvent`);typeof process<`u`&&process.env.NODE_ENV!==`production`&&re&&xA(`triggerLineEvent`,"Use the `triggerEvent` option instead.");let N=re===!0||ne===!0||ne===`line`,ie=re===!0||ne===!0||ne===`area`;this.packEventData(e,f,N),p&&this.packEventData(e,p,ie)}packEventData(e,t,n){X(t).eventData=n?{componentType:`series`,componentSubType:`line`,componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:`line`,selfType:t===this._polygon?`area`:`line`}:null}highlight(e,t,n,r){let i=e.getData(),a=Us(i,r);if(this._changePolyState(`emphasis`),!(a instanceof Array)&&a!=null&&a>=0){let t=i.getLayout(`points`),n=i.getItemGraphicEl(a);if(!n){let r=t[a*2],o=t[a*2+1];if(Jk(r,o)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(r,o))return;let s=e.get(`zlevel`)||0,c=e.get(`z`)||0;n=new Rk(i,a),n.x=r,n.y=o,n.setZ(s,c);let l=n.getSymbolPath().getTextContent();l&&(l.zlevel=s,l.z=c,l.z2=this._polyline.z2+1),n.__temp=!0,i.setItemGraphicEl(a,n),n.stopSymbolAnimation(!0),this.group.add(n)}n.highlight()}else Vb.prototype.highlight.call(this,e,t,n,r)}downplay(e,t,n,r){let i=e.getData(),a=Us(i,r);if(this._changePolyState(`normal`),a!=null&&a>=0){let e=i.getItemGraphicEl(a);e&&(e.__temp?(i.setItemGraphicEl(a,null),this.group.remove(e)):e.downplay())}else Vb.prototype.downplay.call(this,e,t,n,r)}_changePolyState(e){let t=this._polygon;Hd(this._polyline,e),t&&Hd(t,e)}_newPolyline(e){let t=this._polyline;return t&&this._lineGroup.remove(t),t=new aA({shape:{points:e},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(t),this._polyline=t,t}_newPolygon(e,t){let n=this._polygon;return n&&this._lineGroup.remove(n),n=new sA({shape:{points:e,stackedOnPoints:t},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n}_initSymbolLabelAnimation(e,t,n){let 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);let s=e.hostModel,c=s.get(`animationDuration`);R(c)&&(c=c(null));let l=s.get(`animationDelay`)||0,u=R(l)?l(null):l;e.eachItemGraphicEl(function(e,a){let s=e;if(s){let d=[e.x,e.y],f,p,m;if(n){if(i){let e=n,i=t.pointToCoord(d);r?(f=e.startAngle,p=e.endAngle,m=-i[1]/180*Math.PI):(f=e.r0,p=e.r,m=i[0])}else{let t=n;r?(f=t.x,p=t.x+t.width,m=e.x):(f=t.y+t.height,p=t.y,m=e.y)}}let h=p===f?0:(m-f)/(p-f);o&&(h=1-h);let g=R(l)?l(a):c*h+u,_=s.getSymbolPath(),v=_.getTextContent();s.attr({scaleX:0,scaleY:0}),s.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:g}),v&&v.animateFrom({style:{opacity:0}},{duration:300,delay:g}),_.disableLabelAnimation=!0}})}_initOrUpdateEndLabel(e,t,n){let r=e.getModel(`endLabel`);if(FA(e)){let i=e.getData(),a=this._polyline,o=i.getLayout(`points`);if(!o){a.removeTextContent(),this._endLabel=null;return}let s=this._endLabel;s||(s=this._endLabel=new qu({z2:200}),s.ignoreClip=!0,a.setTextContent(this._endLabel),a.disableLabelAnimation=!0);let c=MA(o);c>=0&&(ih(a,ah(e,`endLabel`),{inheritColor:n,labelFetcher:e,labelDataIndex:c,defaultText(e,t,n){return n==null?Ik(i,e):Lk(i,n)},enableTextSetter:!0},LA(r,t)),a.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)}_endLabelOnDuring(e,t,n,r,i,a,o){let s=this._endLabel,c=this._polyline;if(s){e<1&&r.originalX==null&&(r.originalX=s.x,r.originalY=s.y);let 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=PA(l,v,x),C=S.range,w=C[1]-C[0],T;if(w>=1){if(w>1&&!d){let e=NA(l,C[0]);s.attr({x:e[0]+y,y:e[1]+b}),i&&(T=u.getRawValue(C[0]))}else{let e=c.getPointOn(v,x);e&&s.attr({x:e[0]+y,y:e[1]+b});let t=u.getRawValue(C[0]),r=u.getRawValue(C[1]);i&&(T=tc(n,f,t,r,S.t))}r.lastFrameIndex=C[0]}else{let t=e===1||r.lastFrameIndex>0?C[0]:0,n=NA(l,t);i&&(T=u.getRawValue(t)),s.attr({x:n[0]+y,y:n[1]+b})}if(i){let e=hh(s);typeof e.setLabelText==`function`&&e.setLabelText(T)}}}_doUpdateAnimation(e,t,n,r,i,a,o){let s=this._polyline,c=this._polygon,l=e.hostModel,u=eA(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=DA(u.stackedOnCurrent,u.current,n,i,o),d=DA(u.current,null,n,i,o),m=DA(u.stackedOnNext,u.next,n,i,o),p=DA(u.next,null,n,i,o)),wA(d,p)>3e3||c&&wA(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;let h={shape:{points:p}};u.current!==d&&(h.shape.__points=u.next),s.stopAnimation(),em(s,h,l),c&&(c.setShape({points:d,stackedOnPoints:f}),c.stopAnimation(),em(c,{shape:{stackedOnPoints:m}},l),s.shape.points!==c.shape.points&&(c.shape.points=s.shape.points));let g=[],_=u.status;for(let t=0;t<_.length;t++)if(_[t].cmd===`=`){let n=e.getItemGraphicEl(_[t].idx1);n&&g.push({el:n,ptIdx:t})}s.animators&&s.animators.length&&s.animators[0].during(function(){c&&c.dirtyShape();let e=s.shape.__points;for(let t=0;t<g.length;t++){let n=g[t].el,r=g[t].ptIdx*2;n.x=e[r],n.y=e[r+1],n.markRedraw()}})}remove(e){let t=this.group,n=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),n&&n.eachItemGraphicEl(function(e,r){e.__temp&&(t.remove(e),n.setItemGraphicEl(r,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null}};RA.type=`line`;function zA(e,t){return{seriesType:e,plan:Lb(),reset:function(e){let n=e.getData(),r=e.coordinateSystem,i=e.pipelineContext,a=t||i.large;if(!r)return;let o=F(r.dimensions,function(e){return n.mapDimension(e)}).slice(0,2),s=o.length,c=n.getCalculationInfo(`stackResultDimension`);vT(n,o[0])&&(o[0]=c),vT(n,o[1])&&(o[1]=c);let l=n.getStore(),u=n.getDimensionIndex(o[0]),d=n.getDimensionIndex(o[1]);return s&&{progress(e,t){let n=e.end-e.start,i=a&&Zk(n*s),o=[],c=[];for(let n=e.start,f=0;n<e.end;n++){let e;if(s===1){let t=l.get(u,n);e=r.dataToPoint(t,null,c)}else o[0]=l.get(u,n),o[1]=l.get(d,n),e=r.dataToPoint(o,null,c);a?(i[f++]=e[0],i[f++]=e[1]):t.setItemLayout(n,e.slice())}a&&(t.setLayout(`points`,i),t.setLayout(`pointsRange`,{start:e.start,end:e.end}))}}}}}const BA={average:function(e){let t=0,n=0;for(let r=0;r<e.length;r++)isNaN(e[r])||(t+=e[r],n++);return n===0?NaN:t/n},sum:function(e){let t=0;for(let n=0;n<e.length;n++)t+=e[n]||0;return t},max:function(e){let t=-1/0;for(let n=0;n<e.length;n++)e[n]>t&&(t=e[n]);return isFinite(t)?t:NaN},min:function(e){let t=1/0;for(let n=0;n<e.length;n++)e[n]<t&&(t=e[n]);return isFinite(t)?t:NaN},nearest:function(e){return e[0]}},VA=function(e){return Math.round(e.length/2)};function HA(e){return{seriesType:e,reset:function(e,t,n){let r=e.getData(),i=e.get(`sampling`),a=e.coordinateSystem,o=r.count();if(o>10&&a.type===`cartesian2d`&&i){let t=a.getBaseAxis(),s=a.getOtherAxis(t),c=t.getExtent(),l=n.getDevicePixelRatio(),u=Math.abs(c[1]-c[0])*(l||1),d=Math.round(o/u);if(isFinite(d)&&d>1){i===`lttb`?e.setData(r.lttbDownSample(r.mapDimension(s.dim),1/d)):i===`minmax`&&e.setData(r.minmaxDownSample(r.mapDimension(s.dim),1/d));let t;z(i)?t=BA[i]:R(i)&&(t=i),t&&e.setData(r.downSample(r.mapDimension(s.dim),1/d,t,VA))}}}}}function UA(e){e.registerChartView(RA),e.registerSeriesModel(Fk),e.registerLayout(zA(`line`,!0)),e.registerVisual({seriesType:`line`,reset:function(e){let 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,HA(`line`))}var WA=class extends NO{constructor(e,t,n,r,i){super(e,t,n),this.index=0,this.type=r||`value`,this.position=i||`bottom`}isHorizontal(){let e=this.position;return e===`top`||e===`bottom`}getGlobalExtent(e){let t=this.getExtent();return t[0]=this.toGlobalCoord(t[0]),t[1]=this.toGlobalCoord(t[1]),e&&t[0]>t[1]&&t.reverse(),t}pointToData(e,t){return this.coordToData(this.toLocalCoord(e[this.dim===`x`?0:1]),t)}setCategorySortInfo(e){if(this.type!==`category`)return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)}};let GA=null;function KA(e){GA||(GA=e)}function qA(){return GA}const JA=`expandAxisBreak`,YA=`axisbreakchanged`,XA={type:JA,event:YA,update:`update`,refineEvent:$A},ZA={type:`collapseAxisBreak`,event:YA,update:`update`,refineEvent:$A},QA={type:`toggleAxisBreak`,event:YA,update:`update`,refineEvent:$A};function $A(e,t,n,r){let i=[];return P(e,e=>{i=i.concat(e.eventBreaks)}),{eventContent:{breaks:i}}}function ej(e){e.registerAction(XA,t),e.registerAction(ZA,t),e.registerAction(QA,t);function t(e,t){let n=[],r=Gs(t,e);function i(t,i){P(r[t],t=>{P(t.updateAxisBreaks(e).breaks,e=>{n.push(M({[i]:t.componentIndex},e))})})}return i(`xAxisModels`,`xAxisIndex`),i(`yAxisModels`,`yAxisIndex`),i(`singleAxisModels`,`singleAxisIndex`),{eventBreaks:n}}}const tj=Math.PI,nj=[[1,2,1,2],[5,3,5,3],[8,3,8,3]],rj=[[0,1,0,1],[0,3,0,3],[0,3,0,3]],ij=Y(),aj=Y();var oj=class{constructor(e){this.recordMap={},this.resolveAxisNameOverlap=e}ensureRecord(e){let t=e.axis.dim,n=e.componentIndex,r=this.recordMap,i=r[t]||(r[t]=[]);return i[n]||(i[n]={ready:{}})}};function sj(e,t,n,r){let i=n.axis,a=t.ensureRecord(n),o=[],s,c=jj(e.axisName)&&jE(e.nameLocation);P(r,e=>{let t=pk(e);if(!t||t.label.ignore)return;o.push(t);let n=a.transGroup;c&&(n.transform?$t(cj,n.transform):qt(cj),t.transform&&Yt(cj,cj,t.transform),K.copy(lj,t.localRect),lj.applyTransform(cj),s?s.union(lj):K.copy(s=new K(0,0,0,0),lj))});let l=Math.abs(a.dirVec.x)>.1?`x`:`y`,u=a.transGroup[l];if(o.sort((e,t)=>Math.abs(e.label[l]-u)-Math.abs(t.label[l]-u)),c&&s){let e=i.getExtent(),t=Math.min(e[0],e[1]),n=Math.max(e[0],e[1])-t;s.union(new K(t,0,n,1))}a.stOccupiedRect=s,a.labelInfoList=o}const cj=Kt(),lj=new K(0,0,0,0),uj=(e,t,n,r,i,a)=>{if(jE(e.nameLocation)){let e=a.stOccupiedRect;e&&dj(gk({},e,a.transGroup.transform),r,i)}else fj(a.labelInfoList,a.dirVec,r,i)};function dj(e,t,n){let r=new G;Ck(e,t,r,{direction:Math.atan2(n.y,n.x),bidirectional:!1,touchThreshold:.05})&&_k(t,r)}function fj(e,t,n,r){let i=G.dot(r,t)>=0;for(let t=0,a=e.length;t<a;t++){let o=e[i?t:a-1-t];o.label.ignore||dj(o,n,r)}}var pj=class{constructor(e,t,n,r){this.group=new q,this._axisModel=e,this._api=t,this._local={},this._shared=r||new oj(uj),this._resetCfgDetermined(n)}updateCfg(e){if(typeof process<`u`&&process.env.NODE_ENV!==`production`){let e=this._shared.ensureRecord(this._axisModel).ready;H(!e.axisLine&&!e.axisTickLabelDetermine),e.axisName=e.axisTickLabelEstimate=!1}let t=this._cfg.raw;t.position=e.position,t.labelOffset=e.labelOffset,this._resetCfgDetermined(t)}__getRawCfg(){return this._cfg.raw}_resetCfgDetermined(e){let t=this._axisModel,n=t.getDefaultOption?t.getDefaultOption():{},r=V(e.axisName,t.get(`name`)),i=t.get(`nameMoveOverlap`);(i==null||i===`auto`)&&(i=V(e.defaultNameMoveOverlap,!0));let a={raw:e,position:e.position,rotation:e.rotation,nameDirection:V(e.nameDirection,1),tickDirection:V(e.tickDirection,1),labelDirection:V(e.labelDirection,1),labelOffset:V(e.labelOffset,0),silent:V(e.silent,!0),axisName:r,nameLocation:Ce(t.get(`nameLocation`),n.nameLocation,`end`),shouldNameMoveOverlap:jj(r)&&i,optionHideOverlap:t.get([`axisLabel`,`hideOverlap`]),showMinorTicks:t.get([`minorTick`,`show`])};typeof process<`u`&&process.env.NODE_ENV!==`production`&&(H(a.position!=null),H(a.rotation!=null)),this._cfg=a;let o=new q({x:a.position[0],y:a.position[1],rotation:a.rotation});o.updateTransform(),this._transformGroup=o;let s=this._shared.ensureRecord(t);s.transGroup=this._transformGroup,s.dirVec=new G(Math.cos(-a.rotation),Math.sin(-a.rotation))}build(e,t){return e||(e={axisLine:!0,axisTickLabelEstimate:!1,axisTickLabelDetermine:!0,axisName:!0}),P(mj,n=>{e[n]&&hj[n](this._cfg,this._local,this._shared,this._axisModel,this.group,this._transformGroup,this._api,t||{})}),this}static innerTextLayout(e,t,n){let r=Ko(t-e),i,a;return qo(r)?(a=n>0?`top`:`bottom`,i=`center`):qo(r-tj)?(a=n>0?`bottom`:`top`,i=`center`):(a=`middle`,i=r>0&&r<tj?n>0?`right`:`left`:n>0?`left`:`right`),{rotation:r,textAlign:i,textVerticalAlign:a}}static makeAxisEventDataBase(e){let t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+`Index`]=e.componentIndex,t}static isLabelSilent(e){let t=e.get(`tooltip`);return e.get(`silent`)||!(e.get(`triggerEvent`)||t&&t.show)}};const mj=[`axisLine`,`axisTickLabelEstimate`,`axisTickLabelDetermine`,`axisName`],hj={axisLine(e,t,n,r,i,a,o){if(typeof process<`u`&&process.env.NODE_ENV!==`production`){let e=n.ensureRecord(r).ready;H(!e.axisLine),e.axisLine=!0}let s=r.get([`axisLine`,`show`]);if(s===`auto`&&(s=!0,e.raw.axisLineAutoShow!=null&&(s=!!e.raw.axisLineAutoShow)),!s)return;let c=r.axis.getExtent(),l=a.transform,u=[c[0],0],d=[c[1],0],f=u[0]>d[0];l&&(lt(u,u,l),lt(d,d,l));let p=j({lineCap:`round`},r.getModel([`axisLine`,`lineStyle`]).getLineStyle()),m={strokeContainThreshold:e.raw.strokeContainThreshold||5,silent:!0,z2:1,style:p};if(r.get([`axisLine`,`breakLine`])&&Yh(r.axis.scale))qA().buildAxisBreakLine(r,i,a,m);else{let e=new kp(j({shape:{x1:u[0],y1:u[1],x2:d[0],y2:d[1]}},m));xm(e.shape,e.style.lineWidth),e.anid=`line`,i.add(e)}let h=r.get([`axisLine`,`symbol`]);if(h!=null){let t=r.get([`axisLine`,`symbolSize`]);z(h)&&(h=[h,h]),(z(t)||me(t))&&(t=[t,t]);let n=dS(r.get([`axisLine`,`symbolOffset`])||0,t),a=t[0],o=t[1];P([{rotate:e.rotation+Math.PI/2,offset:n[0],r:0},{rotate:e.rotation-Math.PI/2,offset:n[1],r:Math.sqrt((u[0]-d[0])*(u[0]-d[0])+(u[1]-d[1])*(u[1]-d[1]))}],function(t,n){if(h[n]!==`none`&&h[n]!=null){let r=lS(h[n],-a/2,-o/2,a,o,p.stroke,!0),s=t.r+t.offset,c=f?d:u;r.attr({rotation:t.rotate,x:c[0]+s*Math.cos(e.rotation),y:c[1]-s*Math.sin(e.rotation),silent:!0,z2:11}),i.add(r)}})}},axisTickLabelEstimate(e,t,n,r,i,a,o,s){if(typeof process<`u`&&process.env.NODE_ENV!==`production`){let e=n.ensureRecord(r).ready;H(!e.axisTickLabelDetermine),e.axisTickLabelEstimate=!0}wj(t,i,s)&&gj(e,t,n,r,i,a,o,lO.estimate)},axisTickLabelDetermine(e,t,n,r,i,a,o,s){if(typeof process<`u`&&process.env.NODE_ENV!==`production`){let e=n.ensureRecord(r).ready;e.axisTickLabelDetermine=!0}wj(t,i,s)&&gj(e,t,n,r,i,a,o,lO.determine);let c=Sj(e,i,a,r);yj(e,t.labelLayoutList,c),Cj(e,i,a,r,e.tickDirection)},axisName(e,t,n,r,i,a,o,s){let c=n.ensureRecord(r);if(typeof process<`u`&&process.env.NODE_ENV!==`production`){let e=c.ready;H(e.axisTickLabelEstimate||e.axisTickLabelDetermine),e.axisName=!0}t.nameEl&&(i.remove(t.nameEl),t.nameEl=c.nameLayout=c.nameLocation=null);let l=e.axisName;if(!jj(l))return;let 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 G(0,0),_=new G(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);let v=Kt();_.transform(Zt(v,v,e.rotation));let y=r.get(`nameRotate`);y!=null&&(y=y*tj/180);let b,x;jE(u)?b=pj.innerTextLayout(e.rotation,y==null?e.rotation:y,d):(b=_j(e.rotation,u,y||0,m),x=e.raw.axisNameAvailableWidth,x!=null&&(x=Math.abs(x/Math.sin(b.rotation)),!isFinite(x)&&(x=null)));let S=f.getFont(),C=r.get(`nameTruncate`,!0)||{},w=C.ellipsis,T=Se(e.raw.nameTruncateMaxWidth,C.maxWidth,x),E=s.nameMarginLevel||0,D=new qu({x:g.x,y:g.y,rotation:b.rotation,silent:pj.isLabelSilent(r),style:oh(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(Bm({el:D,componentModel:r,itemName:l}),D.__fullText=l,D.anid=`name`,r.get(`triggerEvent`)){let e=pj.makeAxisEventDataBase(r);e.targetType=`axisName`,e.name=l,X(D).eventData=e}a.add(D),D.updateTransform(),t.nameEl=D;let O=c.nameLayout=pk({label:D,priority:D.z2,defaultAttr:{ignore:D.ignore},marginDefault:jE(u)?nj[E]:rj[E]});if(c.nameLocation=u,i.add(D),D.decomposeTransform(),e.shouldNameMoveOverlap&&O){let t=n.ensureRecord(r);typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(t.labelInfoList),n.resolveAxisNameOverlap(e,n,r,O,_,t)}}};function gj(e,t,n,r,i,a,o,s){Ej(t)||Tj(e,t,i,s,r,o);let c=t.labelLayoutList;Oj(e,r,c,a),Nj(r,e.rotation,c);let l=e.optionHideOverlap;vj(r,c,l),l&&Sk(ce(c,e=>e&&!e.label.ignore)),sj(e,n,r,c)}function _j(e,t,n,r){let i=Ko(n-e),a,o,s=r[0]>r[1],c=t===`start`&&!s||t!==`start`&&s;return qo(i-tj/2)?(o=c?`bottom`:`top`,a=`center`):qo(i-tj*1.5)?(o=c?`top`:`bottom`,a=`center`):(o=`middle`,a=i<tj*1.5&&i>tj/2?c?`left`:`right`:c?`right`:`left`),{rotation:i,textAlign:a,textVerticalAlign:o}}function vj(e,t,n){let r=e.axis,i=e.get([`axisLabel`,`customValues`]);if(kE(r))return;function a(e,a,o){let s=pk(t[a]),c=pk(t[o]),l=r.scale;if(s&&c){if(e==null){if(!n&&i)return;let e=ij(s.label).labelInfo.tick;if(HT(l)&&e.notNice||WT(l)&&e.offInterval){bj(s.label);return}}if(e===!1||s.suggestIgnore)bj(s.label);else if(c.suggestIgnore)bj(c.label);else{if(!n){let e=[0,0,0,0];s=vk({marginForce:e},s),c=vk({marginForce:e},c)}Ck(s,c,null,{touchThreshold:.1})&&bj(e?c.label:s.label)}}}let o=e.get([`axisLabel`,`showMinLabel`]),s=e.get([`axisLabel`,`showMaxLabel`]),c=t.length;a(o,0,1),a(s,c-1,c-2)}function yj(e,t,n){e.showMinorTicks||P(t,e=>{if(e&&e.label.ignore)for(let t=0;t<n.length;t++){let r=n[t],i=aj(r),a=ij(e.label);if(i.tickValue!=null&&!i.onBand&&i.tickValue===a.labelInfo.tick.value){bj(r);return}}})}function bj(e){e&&(e.ignore=!0)}function xj(e,t,n,r,i){let a=[],o=[],s=[];for(let c=0;c<e.length;c++){let l=e[c].coord;o[0]=l,o[1]=0,s[0]=l,s[1]=n,t&&(lt(o,o,t),lt(s,s,t));let u=new kp({shape:{x1:o[0],y1:o[1],x2:s[0],y2:s[1]},style:r,z2:2,autoBatch:!0,silent:!0});xm(u.shape,u.style.lineWidth),u.anid=i+`_`+e[c].tickValue,a.push(u);let d=aj(u);d.onBand=!!e[c].onBand,d.tickValue=e[c].tickValue}return a}function Sj(e,t,n,r){let i=r.axis,a=r.getModel(`axisTick`),o=a.get(`show`);if(o===`auto`&&(o=!0,e.raw.axisTickAutoShow!=null&&(o=!!e.raw.axisTickAutoShow)),!o||i.scale.isBlank())return[];let s=a.getModel(`lineStyle`),c=e.tickDirection*a.get(`length`),l=xj(i.getTicksCoords(),n.transform,c,M(s.getLineStyle(),{stroke:r.get([`axisLine`,`lineStyle`,`color`])}),`ticks`);for(let e=0;e<l.length;e++)t.add(l[e]);return l}function Cj(e,t,n,r,i){let a=r.axis,o=r.getModel(`minorTick`);if(!e.showMinorTicks||a.scale.isBlank())return;let s=a.getMinorTicksCoords();if(!s.length)return;let c=o.getModel(`lineStyle`),l=i*o.get(`length`),u=M(c.getLineStyle(),M(r.getModel(`axisTick`).getLineStyle(),{stroke:r.get([`axisLine`,`lineStyle`,`color`])}));for(let e=0;e<s.length;e++){let r=xj(s[e],n.transform,l,u,`minorticks_`+e);for(let e=0;e<r.length;e++)t.add(r[e])}}function wj(e,t,n){if(Ej(e)){let r=e.axisLabelsCreationContext;typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(e.labelGroup&&r);let i=r.out.noPxChangeTryDetermine;if(n.noPxChange){let e=!0;for(let t=0;t<i.length;t++)e=e&&i[t]();if(e)return!1}i.length&&(t.remove(e.labelGroup),Dj(e,null,null,null))}return!0}function Tj(e,t,n,r,i,a){let o=i.axis,s=Se(e.raw.axisLabelShow,i.get([`axisLabel`,`show`])),c=new q;n.add(c);let l=uO(r);if(!s||o.scale.isBlank()){Dj(t,[],c,l);return}let u=i.getModel(`axisLabel`),d=o.getViewLabels(l),f=(Se(e.raw.labelRotate,u.get(`rotate`))||0)*tj/180,p=pj.innerTextLayout(e.rotation,f,e.labelDirection),m=i.getCategories&&i.getCategories(!0),h=[],g=i.get(`triggerEvent`),_=1/0,v=-1/0;P(d,function(e,t){var n;let r=e.tick,s=e.formattedLabel,l=e.rawLabel,f=u,y=IE(o.scale,r);if(m&&m[y]){let e=m[y];B(e)&&e.textStyle&&(f=new kh(e.textStyle,u,i.ecModel))}let b=f.getTextColor()||i.get([`axisLine`,`lineStyle`,`color`]),x=f.getShallow(`align`,!0)||p.textAlign,S=V(f.getShallow(`alignMinLabel`,!0),x),C=V(f.getShallow(`alignMaxLabel`,!0),x),w=f.getShallow(`verticalAlign`,!0)||f.getShallow(`baseline`,!0)||p.textVerticalAlign,T=V(f.getShallow(`verticalAlignMinLabel`,!0),w),E=V(f.getShallow(`verticalAlignMaxLabel`,!0),w),D=10+(((n=r.time)==null?void 0:n.level)||0);_=Math.min(_,D),v=Math.max(v,D);let O=new qu({x:0,y:0,rotation:0,silent:pj.isLabelSilent(i),z2:D,style:oh(f,{text:s,align:t===0?S:t===d.length-1?C:x,verticalAlign:t===0?T:t===d.length-1?E:w,fill:R(b)?b(o.type===`category`?l:o.type===`value`?y+``:y,t):b})});O.anid=`label_`+y;let ee=ij(O);if(ee.labelInfo=e,ee.layoutRotation=p.rotation,Bm({el:O,componentModel:i,itemName:s,formatterParamsExtra:{isTruncated:()=>O.isTruncated,value:l,tickIndex:t}}),g){let n=pj.makeAxisEventDataBase(i);n.targetType=`axisLabel`,n.value=l,n.tickIndex=t;let r=e.tick.break;if(r){let e=r.parsedBreak;n.break={start:e.vmin,end:e.vmax}}o.type===`category`&&(n.dataIndex=y),X(O).eventData=n,r&&Mj(i,a,O,r)}h.push(O),c.add(O)}),Dj(t,F(h,e=>({label:e,priority:ij(e).labelInfo.tick.break?e.z2+(v-_+1):e.z2,defaultAttr:{ignore:e.ignore}})),c,l)}function Ej(e){return!!e.labelLayoutList}function Dj(e,t,n,r){e.labelLayoutList=t,e.labelGroup=n,e.axisLabelsCreationContext=r}function Oj(e,t,n,r){let i=t.get([`axisLabel`,`margin`]);P(n,(n,a)=>{let o=pk(n);if(!o)return;let s=o.label,c=ij(s);o.suggestIgnore=s.ignore,s.ignore=!1,Ca(kj,Aj);let l=t.axis;kj.x=l.dataToCoord(IE(l.scale,c.labelInfo.tick)),kj.y=e.labelOffset+e.labelDirection*i,kj.rotation=c.layoutRotation,r.add(kj),kj.updateTransform(),r.remove(kj),kj.decomposeTransform(),Ca(s,kj),s.markRedraw(),dk(o,!0),pk(o)})}const kj=new Uu,Aj=new Uu;function jj(e){return!!e}function Mj(e,t,n,r){n.on(`click`,n=>{let i={type:JA,breaks:[{start:r.parsedBreak.breakOption.start,end:r.parsedBreak.breakOption.end}]};i[`${e.axis.dim}AxisIndex`]=e.componentIndex,t.dispatchAction(i)})}function Nj(e,t,n){let r=Kh();if(!r)return;let i=r.retrieveAxisBreakPairs(n,e=>e&&ij(e.label).labelInfo.tick.break,!0),a=e.get([`breakLabelLayout`,`moveOverlap`],!0);(a===!0||a===`auto`)&&P(i,r=>{qA().adjustBreakLabelPair(e.axis.inverse,t,[pk(n[r[0]]),pk(n[r[1]])])})}function Pj(e,t,n){n=n||{};let r=t.axis,i={},a=r.getAxesOnZeroOf()[0],o=r.position,s=a?`onZero`:o,c=r.dim,l=[e.x,e.x+e.width,e.y,e.y+e.height],u={left:0,right:1,top:0,bottom:1,onZero:2},d=t.get(`offset`)||0,f=c===`x`?[l[2]-d,l[3]+d]:[l[0]-d,l[1]+d];if(a){let e=a.toGlobalCoord(a.dataToCoord(0));f[u.onZero]=Math.max(Math.min(e,f[1]),f[0])}i.position=[c===`y`?f[u[s]]:l[0],c===`x`?f[u[s]]:l[3]],i.rotation=Math.PI/2*(c===`x`?0:1),i.labelDirection=i.tickDirection=i.nameDirection={top:-1,bottom:1,left:-1,right:1}[o],i.labelOffset=a?f[u[o]]-f[u.onZero]:0,t.get([`axisTick`,`inside`])&&(i.tickDirection=-i.tickDirection),Se(n.labelInside,t.get([`axisLabel`,`inside`]))&&(i.labelDirection=-i.labelDirection);let p=t.get([`axisLabel`,`rotate`]);return i.labelRotate=s===`top`?-p:p,i.z2=1,i}function Fj(e){return e.coordinateSystem&&e.coordinateSystem.type===`cartesian2d`}function Ij(e){let t={xAxisModel:null,yAxisModel:null};return P(t,function(n,r){let i=r.replace(/Model$/,``),a=e.getReferringComponents(i,qs).models[0];if(typeof process<`u`&&process.env.NODE_ENV!==`production`&&!a)throw Error(i+` "`+Ce(e.get(i+`Index`),e.get(i+`Id`),0)+`" not found`);t[r]=a}),t}function Lj(e,t,n,r,i,a){let o=Pj(e,n),s=!1,c=!1;for(let e=0;e<t.length;e++)BT(t[e].getOtherAxis(n.axis).scale)&&(s=c=!0,n.axis.type===`category`&&n.axis.onBand&&(c=!1));return o.axisLineAutoShow=s,o.axisTickAutoShow=c,o.defaultNameMoveOverlap=a,new pj(n,r,o,i)}function Rj(e,t,n){let r=Pj(t,n);if(typeof process<`u`&&process.env.NODE_ENV!==`production`){let t=e.__getRawCfg();P(ue(r),e=>{e!==`position`&&e!==`labelOffset`&&H(r[e]===t[e])})}e.updateCfg(r)}function zj(e){return e.dim+`_`+e.index}function Bj(){tD(`liPosMinGap`,Vj)}function Vj(e,t,n){let r=U(),i=n.serUids,a=n.liPosMinGap,o,s=t.axis,c=s.scale,l=c.needTransform(),u=c.getFilter?c.getFilter():null,d=Oy(u);function f(n){XE(e,t.sers,function(e){let t=e.getRawData(),r=t.getDimensionIndex(t.mapDimension(s.dim));r>=0&&n(r,e,t.getStore())})}let p=0;if(f(function(e,t,n){r.set(t.uid,1),(!i||!i.hasKey(t.uid))&&(o=!0),p+=n.count()}),(!i||i.keys().length!==r.keys().length)&&(o=!0),!o&&a!=null){t.liPosMinGap=a;return}Qk(Hj,p);let m=0;f(function(e,t,n){for(let t=0,r=n.count();t<r;++t){let r=n.get(e,t);isFinite(r)&&(!u||ky(d,r))&&(l&&(r=c.transformIn(r,null)),Hj.arr[m++]=r)}});let h=Hj.typed?Hj.arr.subarray(0,m):(Hj.arr.length=m,Hj.arr);Hj.typed?h.sort():Lo(h);let g=1/0;for(let e=1;e<m;++e){let t=h[e]-h[e-1];t>0&&t<g&&(g=t)}n.liPosMinGap=t.liPosMinGap=os(g)?g:m>0?-2:-1,n.serUids=r}const Hj=Qk({ctor:Xk},50);function Uj(e){return function(t,n){let r=kO(t,{fromStat:{key:e}});if(os(r.w2))return[-r.w2/2,r.w2/2]}}function Wj(e){return e+`|&`}function Gj(e,t){return e+`|&`+t}function Kj(e){return Bj(),{liPosMinGap:!WT(e.scale)}}const qj=`pictorialBar`;function Jj(e,t,n,r){aD(e,{key:t,seriesType:n,coordSysType:r,getMetrics:Kj})}function Yj(e){let t=e.scale.rawExtentInfo.makeRenderInfo().startValue;return typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(os(t)),t}const Xj={left:0,right:0,top:0,bottom:0},Zj=[`25%`,`25%`],Qj=`cartesian2d`;var $j=class extends b_{mergeDefaultAndTheme(e,t){let n=g_(e.outerBounds);super.mergeDefaultAndTheme.apply(this,arguments),n&&e.outerBounds&&h_(e.outerBounds,n)}mergeOption(e,t){super.mergeOption.apply(this,arguments),this.option.outerBounds&&e.outerBounds&&h_(this.option.outerBounds,e.outerBounds)}};$j.type=`grid`,$j.dependencies=[`xAxis`,`yAxis`],$j.layoutMode=`box`,$j.defaultOption={show:!1,z:0,left:`15%`,top:65,right:`10%`,bottom:80,containLabel:!1,outerBoundsMode:`auto`,outerBounds:Xj,outerBoundsContain:`all`,outerBoundsClampWidth:Zj[0],outerBoundsClampHeight:Zj[1],backgroundColor:Q.color.transparent,borderWidth:1,borderColor:Q.color.neutral30};const eM=pc(),tM=`__ec_stack_`;function nM(e){return e.get(`stack`)||tM+e.seriesIndex}function rM(e){if(!WT(e.axis.scale))return;let t=kO(e.axis),n=[];for(let t=0;t<e.count;t++)n.push(M({stackId:tM+t},e));let r=oM({bandWidthResult:t,seriesInfo:n}),i=[];for(let t=0;t<e.count;t++){let e=r[tM+t];e.offsetCenter=e.offset+e.width/2,i.push(e)}return i}function iM(e,t){let n=aM(e,t);return n.columnMap=oM(n),n}function aM(e,t){let n=Gj(t,Qj),r=[],i=kO(e,{fromStat:{key:n},min:1});return YE(e,n,function(e){r.push({barWidth:J(e.get(`barWidth`),i.w),barMaxWidth:J(e.get(`barMaxWidth`),i.w),barMinWidth:J(e.get(`barMinWidth`)||(lM(e)?.5:1),i.w),barGap:e.get(`barGap`),barCategoryGap:e.get(`barCategoryGap`),defaultBarGap:e.get(`defaultBarGap`),stackId:nM(e)})}),{bandWidthResult:i,seriesInfo:r}}function oM(e){let t=e.bandWidthResult.w,n=t,r=0,i,a,o=[],s={};P(e.seriesInfo,function(e,t){t||(a=e.defaultBarGap||0);let c=e.stackId;W(s,c)||r++;let l=s[c];l||(l=s[c]={width:0,maxWidth:0},o.push(c));let u=e.barWidth;u&&!l.width&&(l.width=u,u=yo(n,u),n-=u);let d=e.barMaxWidth;d&&(l.maxWidth=d);let f=e.barMinWidth;f&&(l.minWidth=f);let p=e.barGap;p!=null&&(a=p);let m=e.barCategoryGap;m!=null&&(i=m)}),i==null&&(i=bo(35-o.length*4,15)+`%`);let c=J(i,t),l=J(a,1),u=(n-c)/(r+(r-1)*l);u=bo(u,0),P(o,function(e){let t=s[e],i=t.maxWidth,a=t.minWidth;if(t.width){let e=t.width;i&&(e=yo(e,i)),a&&(e=bo(e,a)),t.width=e,n-=e+l*e,r--}else{let e=u;i&&i<e&&(e=yo(i,n)),a&&a>e&&(e=a),e!==u&&(t.width=e,n-=e+l*e,r--)}}),u=(n-c)/(r+(r-1)*l),u=bo(u,0);let d=0,f;P(o,function(e){let t=s[e];t.width||(t.width=u),f=t,d+=t.width*(1+l)}),f&&(d-=f.width*l);let p={},m=-d/2;return P(o,function(e){let n=s[e];p[e]=p[e]||{bandWidth:t,offset:m,width:n.width},m+=n.width*(1+l)}),p}function sM(e){return{seriesType:e,overallReset(t){let n=Gj(e,Qj);QE(t,n,function(t){typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(t instanceof WA);let r=iM(t,e);YE(t,n,function(e){let t=r.columnMap[nM(e)];e.getData().setLayout({bandWidth:t.bandWidth,offset:t.offset,size:t.width})})})}}}function cM(e){return{seriesType:e,plan:Lb(),reset:function(e){if(!Fj(e))return;let 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=vT(t,c)&&!!t.getCalculationInfo(`stackedOnSeries`),d=i.isHorizontal(),f=i.toGlobalCoord(i.dataToCoord(Yj(i))),p=lM(e),m=e.get(`barMinHeight`)||0,h=l&&t.getDimensionIndex(l),g=t.getLayout(`size`),_=t.getLayout(`offset`);return{progress:function(e,t){let r=e.count,i=p&&Zk(r*3),c=p&&s&&Zk(r*3),l=p&&Zk(r),v=n.master.getRect(),y=d?v.width:v.height,b,x=t.getStore(),S=0;for(;(b=e.next())!=null;){let e=x.get(u?h:a,b),r=x.get(o,b),s=f,C;u&&(C=+e-x.get(a,b));let w,T,E,D;if(d){let t=n.dataToPoint([e,r]);u&&(s=n.dataToPoint([C,r])[0]),w=s,T=t[1]+_,E=t[0]-s,D=g,xo(E)<m&&(E=(E<0?-1:1)*m)}else{let t=n.dataToPoint([r,e]);u&&(s=n.dataToPoint([r,C])[1]),w=t[0]+_,T=s,E=g,D=t[1]-s,xo(D)<m&&(D=(D<=0?-1:1)*m)}p?(i[S]=w,i[S+1]=T,i[S+2]=d?E:D,c&&(c[S]=d?v.x:w,c[S+1]=d?T:v.y,c[S+2]=y),l[b]=b):t.setItemLayout(b,{x:w,y:T,width:E,height:D}),S+=3}p&&t.setLayout({largePoints:i,largeDataIndices:l,largeBackgroundPoints:c,valueAxisHorizontal:d})}}}}}function lM(e){return e.pipelineContext&&e.pipelineContext.large}function uM(e){return Uj(Gj(e,Qj))}function dM(e){eM(e,function(){function t(t){let n=Gj(t,Qj);Jj(e,n,t,Qj),bD(n,uM(t))}t(`bar`),t(`pictorialBar`)})}var fM=class e extends Db{constructor(...t){super(...t),this.type=e.type}getInitialData(e,t){return ST(null,this,{useEncodeDefaulter:!0})}getMarkerPosition(e,t,n){let r=this.coordinateSystem;if(r&&r.clampData){let i=r.clampData(e),a=r.dataToPoint(i);if(n)P(r.getAxes(),function(e,n){if(e.type===`category`&&t!=null){let 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}let l,u,d=1;for(let e=0;e<r.length;e++){let t=r[e].coord,n=e===r.length-1?r[e-1].tickValue+d:r[e].tickValue;if(n===s){u=t;break}if(n<s)l=t;else if(l!=null&&n>s){u=(t+l)/2;break}e===1&&(d=n-r[0].tickValue)}u==null&&(l?l&&(u=r[r.length-1].coord):u=r[0].coord),a[n]=e.toGlobalCoord(u)}});else{let e=this.getData(),t=e.getLayout(`offset`),n=e.getLayout(`size`),i=+!r.getBaseAxis().isHorizontal();a[i]+=t+n/2}return a}return[NaN,NaN]}__requireStartValue(e){return this.getBaseAxis()!==e}};fM.type=`series.__base_bar__`,fM.defaultOption={z:2,coordinateSystem:`cartesian2d`,legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:`mod`,defaultBarGap:`10%`},Db.registerClass(fM);var pM=class e extends fM{constructor(...t){super(...t),this.type=e.type}getInitialData(){return ST(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get(`realtimeSort`,!0)||null})}getProgressive(){return this.get(`large`)?this.get(`progressive`):!1}__preparePipelineContext(e,t){let n=yc(this,e,t);return n.progressiveRender&&(n.large=!0),n}brushSelector(e,t,n){return n.rect(t.getItemLayout(e))}};pM.type=`series.bar`,pM.dependencies=[`grid`,`polar`],pM.defaultOption=Ph(fM.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});var mM=class{constructor(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}},hM=class extends Ou{constructor(e){super(e),this.type=`sausage`}getDefaultShape(){return new mM}buildPath(e,t){let 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-c<d:c-l<d;f||(c=l-(u?d:-d));let p=Math.cos(c),m=Math.sin(c),h=Math.cos(l),g=Math.sin(l);f?(e.moveTo(p*i+n,m*i+r),e.arc(p*s+n,m*s+r,o,-Math.PI+c,c,!u)):e.moveTo(p*a+n,m*a+r),e.arc(n,r,a,c,l,!u),e.arc(h*s+n,g*s+r,o,l-Math.PI*2,l-Math.PI,!u),i!==0&&e.arc(n,r,i,l,c,u)}};function gM(e,t){t=t||{};let n=t.isRoundCap;return function(t,r,i){let a=r.position;if(!a||a instanceof Array)return La(t,r,i);let o=e(a),s=r.distance==null?5:r.distance,c=this.shape,l=c.cx,u=c.cy,d=c.r,f=c.r0,p=(d+f)/2,m=c.startAngle,h=c.endAngle,g=(m+h)/2,_=n?Math.abs(d-f)/2:0,v=Math.cos,y=Math.sin,b=l+d*v(m),x=u+d*y(m),S=`left`,C=`top`;switch(o){case`startArc`:b=l+(f-s)*v(g),x=u+(f-s)*y(g),S=`center`,C=`top`;break;case`insideStartArc`:b=l+(f+s)*v(g),x=u+(f+s)*y(g),S=`center`,C=`bottom`;break;case`startAngle`:b=l+p*v(m)+vM(m,s+_,!1),x=u+p*y(m)+yM(m,s+_,!1),S=`right`,C=`middle`;break;case`insideStartAngle`:b=l+p*v(m)+vM(m,-s+_,!1),x=u+p*y(m)+yM(m,-s+_,!1),S=`left`,C=`middle`;break;case`middle`:b=l+p*v(g),x=u+p*y(g),S=`center`,C=`middle`;break;case`endArc`:b=l+(d+s)*v(g),x=u+(d+s)*y(g),S=`center`,C=`bottom`;break;case`insideEndArc`:b=l+(d-s)*v(g),x=u+(d-s)*y(g),S=`center`,C=`top`;break;case`endAngle`:b=l+p*v(h)+vM(h,s+_,!0),x=u+p*y(h)+yM(h,s+_,!0),S=`left`,C=`middle`;break;case`insideEndAngle`:b=l+p*v(h)+vM(h,-s+_,!0),x=u+p*y(h)+yM(h,-s+_,!0),S=`right`,C=`middle`;break;default:return La(t,r,i)}return t=t||{},t.x=b,t.y=x,t.align=S,t.verticalAlign=C,t}}function _M(e,t,n,r){if(me(r)){e.setTextConfig({rotation:r});return}if(L(t)){e.setTextConfig({rotation:0});return}let i=e.shape,a=i.clockwise?i.startAngle:i.endAngle,o=i.clockwise?i.endAngle:i.startAngle,s=(a+o)/2,c,l=n(t);switch(l){case`startArc`:case`insideStartArc`:case`middle`:case`insideEndArc`:case`endArc`:c=s;break;case`startAngle`:case`insideStartAngle`:c=a;break;case`endAngle`:case`insideEndAngle`:c=o;break;default:e.setTextConfig({rotation:0});return}let u=Math.PI*1.5-c;l===`middle`&&u>Math.PI/2&&u<Math.PI*1.5&&(u-=Math.PI),e.setTextConfig({rotation:u})}function vM(e,t,n){return t*Math.sin(e)*(n?-1:1)}function yM(e,t,n){return t*Math.cos(e)*(n?1:-1)}function bM(e,t,n){let r=e.get(`borderRadius`);if(r==null)return n?{cornerRadius:0}:null;L(r)||(r=[r,r,r,r]);let i=Math.abs(t.r||0-t.r0||0);return{cornerRadius:F(r,e=>Ia(e,i))}}const xM=Math.max,SM=Math.min;var CM=class extends Vb{constructor(){super(),this.type=`bar`,this._isFirstFrame=!0}render(e,t,n,r){this._model=e,this._removeOnRenderedListener(n),this._updateDrawMode(e);let i=e.get(`coordinateSystem`);i===`cartesian2d`||i===`polar`?(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(e,t,n):this._renderNormal(e,t,n,r)):typeof process<`u`&&process.env.NODE_ENV!==`production`&&ds(`Only cartesian2d and polar supported for bar.`)}incrementalPrepareRender(e){this._clear(),this._updateDrawMode(e),this._updateLargeClip(e)}incrementalRender(e,t){this._progressiveEls=[],this._incrementalRenderLarge(e,t)}eachRendered(e){Hm(this._progressiveEls||this.group,e)}_updateDrawMode(e){let t=e.pipelineContext.large;(this._isLargeDraw==null||t!==this._isLargeDraw)&&(this._isLargeDraw=t,this._clear())}_renderNormal(e,t,n,r){let i=this.group,a=e.getData(),o=this._data,s=e.coordinateSystem,c=s.getBaseAxis(),l;s.type===`cartesian2d`?l=c.isHorizontal():s.type===`polar`&&(l=c.dim===`angle`);let u=e.isAnimationEnabled()?e:null,d=EM(e,s);d&&this._enableRealtimeSort(d,a,n);let f=e.get(`clip`,!0)||d,p=s.getArea();i.removeClipPath();let m=e.get(`roundCap`,!0),h=e.get(`showBackground`,!0),g=e.getModel(`backgroundStyle`),_=g.get(`borderRadius`)||0,v=[],y=this._backgroundEls,b=r&&r.isInitSort,x=r&&r.type===`changeAxisOrder`;function S(e){let t=MM[s.type](a,e);if(!t)return null;let n=UM(s,l,t);return n.useStyle(g.getItemStyle()),s.type===`cartesian2d`?n.setShape(`r`,_):n.setShape(`cornerRadius`,_),v[e]=n,n}a.diff(o).add(function(t){let n=a.getItemModel(t),r=MM[s.type](a,t,n);if(!r||(h&&S(t),!a.hasValue(t)||!jM[s.type](r)))return;let o=!1;f&&(o=wM[s.type](p,r));let g=TM[s.type](e,a,t,r,l,u,c.model,!1,m);d&&(g.forceLabelAnimation=!0),FM(g,a,t,n,r,e,l,s.type===`polar`),b?g.attr({shape:r}):d?DM(d,u,g,r,t,l,!1,!1):tm(g,{shape:r},e,t),a.setItemGraphicEl(t,g),i.add(g),g.ignore=o}).update(function(t,n){let r=a.getItemModel(t),C=MM[s.type](a,t,r);if(!C)return;if(h){let e;y.length===0?e=S(n):(e=y[n],e.useStyle(g.getItemStyle()),s.type===`cartesian2d`?e.setShape(`r`,_):e.setShape(`cornerRadius`,_),v[t]=e);let r=MM[s.type](a,t),i=HM(l,r,s);em(e,{shape:i},u,t)}let w=o.getItemGraphicEl(n);if(!a.hasValue(t)||!jM[s.type](C)){i.remove(w);return}let T=!1;if(f&&(T=wM[s.type](p,C),T&&i.remove(w)),w&&(w.type===`sector`&&m||w.type===`sausage`&&!m)&&(w&&am(w,e,n),w=null),w?om(w):w=TM[s.type](e,a,t,C,l,u,c.model,!0,m),d&&(w.forceLabelAnimation=!0),x){let e=w.getTextContent();if(e){let t=hh(e);t.prevValue!=null&&(t.prevValue=t.value)}}else FM(w,a,t,r,C,e,l,s.type===`polar`);b?w.attr({shape:C}):d?DM(d,u,w,C,t,l,!0,x):em(w,{shape:C},e,t,null),a.setItemGraphicEl(t,w),w.ignore=T,i.add(w)}).remove(function(t){let n=o.getItemGraphicEl(t);n&&am(n,e,t)}).execute();let C=this._backgroundGroup||(this._backgroundGroup=new q);C.removeAll();for(let e=0;e<v.length;++e)C.add(v[e]);i.add(C),this._backgroundEls=v,this._data=a}_renderLarge(e,t,n){this._clear(),zM(e,this.group),this._updateLargeClip(e)}_incrementalRenderLarge(e,t){this._removeBackground(),zM(t,this.group,this._progressiveEls,!0)}_updateLargeClip(e){let t=e.get(`clip`,!0)&&uA(e.coordinateSystem,!1,e),n=this.group;t?n.setClipPath(t):n.removeClipPath()}_enableRealtimeSort(e,t,n){if(!t.count())return;let r=e.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(t,e,n),this._isFirstFrame=!1;else{let e=e=>{let n=t.getItemGraphicEl(e),i=n&&n.shape;return i&&Math.abs(r.isHorizontal()?i.height:i.width)||0};this._onRendered=()=>{this._updateSortWithinSameData(t,e,r,n)},n.getZr().on(`rendered`,this._onRendered)}}_dataSort(e,t,n){let r=[];return e.each(e.mapDimension(t.dim),(e,t)=>{let i=n(t);i=i==null?NaN:i,r.push({dataIndex:t,mappedValue:i,ordinalNumber:e})}),r.sort((e,t)=>t.mappedValue-e.mappedValue),{ordinalNumbers:F(r,e=>e.ordinalNumber)}}_isOrderChangedWithinSameData(e,t,n){let r=n.scale,i=e.mapDimension(n.dim),a=Number.MAX_VALUE;for(let n=0,o=r.getOrdinalMeta().categories.length;n<o;++n){let o=e.rawIndexOf(i,r.getRawOrdinalNumber(n)),s=o<0?Number.MIN_VALUE:t(e.indexOfRawIndex(o));if(s>a)return!0;a=s}return!1}_isOrderDifferentInView(e,t){let n=t.scale,r=n.getExtent(),i=Math.max(0,r[0]),a=Math.min(r[1],n.getOrdinalMeta().categories.length-1);for(;i<=a;++i)if(e.ordinalNumbers[i]!==n.getRawOrdinalNumber(i))return!0}_updateSortWithinSameData(e,t,n,r){if(!this._isOrderChangedWithinSameData(e,t,n))return;let 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}))}_dispatchInitSort(e,t,n){let r=t.baseAxis,i=this._dataSort(e,r,n=>e.get(e.mapDimension(t.otherAxis.dim),n));n.dispatchAction({type:`changeAxisOrder`,componentType:r.dim+`Axis`,isInitSort:!0,axisId:r.index,sortInfo:i})}remove(e,t){this._clear(this._model),this._removeOnRenderedListener(t)}dispose(e,t){this._removeOnRenderedListener(t)}_removeOnRenderedListener(e){this._onRendered&&(e.getZr().off(`rendered`,this._onRendered),this._onRendered=null)}_clear(e){let t=this.group,n=this._data;e&&e.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl(function(t){am(t,e,X(t).dataIndex)})):t.removeAll(),this._data=null,this._isFirstFrame=!0}_removeBackground(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null}};CM.type=`bar`;const wM={cartesian2d(e,t){let 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);let i=e.x+e.width,a=e.y+e.height,o=xM(t.x,e.x),s=SM(t.x+t.width,i),c=xM(t.y,e.y),l=SM(t.y+t.height,a),u=s<o,d=l<c;return t.x=u&&o>i?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(e,t){let n=t.r0<=t.r?1:-1;if(n<0){let e=t.r;t.r=t.r0,t.r0=e}let r=SM(t.r,e.r),i=xM(t.r0,e.r0);t.r=r,t.r0=i;let a=r-i<0;if(n<0){let e=t.r;t.r=t.r0,t.r0=e}return a}},TM={cartesian2d(e,t,n,r,i,a,o,s,c){let l=new Uu({shape:j({},r),z2:1});if(l.__dataIndex=n,l.name=`item`,a){let e=l.shape,t=i?`height`:`width`;e[t]=0}return l},polar(e,t,n,r,i,a,o,s,c){let l=!i&&c?hM:vp,u=new l({shape:r,z2:1});if(u.name=`item`,u.calculateTextPosition=gM(PM(i),{isRoundCap:l===hM}),a){let e=u.shape,t=i?`r`:`endAngle`,n={};e[t]=i?r.r0:r.startAngle,n[t]=r[t],(s?em:tm)(u,{shape:n},a)}return u}};function EM(e,t){let n=e.get(`realtimeSort`,!0),r=t.getBaseAxis();if(typeof process<`u`&&process.env.NODE_ENV!==`production`&&n&&(r.type!==`category`&&ds("`realtimeSort` will not work because this bar series is not based on a category axis."),t.type!==`cartesian2d`&&ds("`realtimeSort` will not work because this bar series is not on cartesian2d.")),n&&r.type===`category`&&t.type===`cartesian2d`)return{baseAxis:r,otherAxis:t.getOtherAxis(r)}}function DM(e,t,n,r,i,a,o,s){let 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?em:tm)(n,{shape:c},t,i,null);let u=t?e.baseAxis.model:null;(o?em:tm)(n,{shape:l},u,i)}function OM(e,t){for(let n=0;n<t.length;n++)if(!isFinite(e[t[n]]))return!0;return!1}const kM=[`x`,`y`,`width`,`height`],AM=[`cx`,`cy`,`r`,`startAngle`,`endAngle`],jM={cartesian2d(e){return!OM(e,kM)},polar(e){return!OM(e,AM)}},MM={cartesian2d(e,t,n){let r=e.getItemLayout(t);if(!r)return null;let i=n?IM(n,r):0,a=r.width>0?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(e,t,n){let 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 NM(e){return e.startAngle!=null&&e.endAngle!=null&&e.startAngle===e.endAngle}function PM(e){return(e=>{let t=e?`Arc`:`Angle`;return e=>{switch(e){case`start`:case`insideStart`:case`end`:case`insideEnd`:return e+t;default:return e}}})(e)}function FM(e,t,n,r,i,a,o,s){let c=t.getItemVisual(n,`style`);if(!s){let t=r.get([`itemStyle`,`borderRadius`])||0;e.setShape(`r`,t)}else if(!a.get(`roundCap`)){let t=e.shape;j(t,bM(r.getModel(`itemStyle`),t,!0)),e.setShape(t)}e.useStyle(c);let l=r.getShallow(`cursor`);l&&e.attr(`cursor`,l);let u=s?o?i.r>=i.r0?`endArc`:`startArc`:i.endAngle>=i.startAngle?`endAngle`:`startAngle`:o?WM(i,a.coordinateSystem):GM(i,a.coordinateSystem),d=ah(r);ih(e,d,{labelFetcher:a,labelDataIndex:n,defaultText:Ik(a.getData(),n),inheritColor:c.fill,defaultOpacity:c.opacity,defaultOutsidePosition:u});let f=e.getTextContent();if(s&&f){let t=r.get([`label`,`position`]);e.textConfig.inside=t===`middle`||null,_M(e,t===`outside`?u:t,PM(o),r.get([`label`,`rotate`]))}gh(f,d,a.getRawValue(n),e=>Lk(t,e));let p=r.getModel([`emphasis`]);_f(e,p.get(`focus`),p.get(`blurScope`),p.get(`disabled`)),xf(e,r),NM(i)&&(e.style.fill=`none`,e.style.stroke=`none`,P(e.states,e=>{e.style&&(e.style.fill=e.style.stroke=`none`)}))}function IM(e,t){let n=e.get([`itemStyle`,`borderColor`]);if(!n||n===`none`)return 0;let 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 LM=class{},RM=class extends Ou{constructor(e){super(e),this.type=`largeBar`}getDefaultShape(){return new LM}buildPath(e,t){let n=t.points,r=this.baseDimIdx,i=1-this.baseDimIdx,a=[],o=[],s=this.barWidth;for(let t=0;t<n.length;t+=3)o[r]=s,o[i]=n[t+2],a[r]=n[t+r],a[i]=n[t+i],e.rect(a[0],a[1],o[0],o[1])}};function zM(e,t,n,r){let i=e.getData(),a=+!!i.getLayout(`valueAxisHorizontal`),o=i.getLayout(`largeDataIndices`),s=i.getLayout(`size`),c=e.getModel(`backgroundStyle`),l=i.getLayout(`largeBackgroundPoints`),u=r?vc(e):0;if(l){let e=new RM({shape:{points:l},incremental:u,silent:!0,z2:0});e.baseDimIdx=a,e.largeDataIndices=o,e.barWidth=s,e.useStyle(c.getItemStyle()),t.add(e),n&&n.push(e)}let d=new RM({shape:{points:i.getLayout(`largePoints`)},incremental:u,ignoreCoarsePointer:!0,z2:1});d.baseDimIdx=a,d.largeDataIndices=o,d.barWidth=s,t.add(d),d.useStyle(i.getVisual(`style`)),d.style.stroke=null,X(d).seriesIndex=e.seriesIndex,e.get(`silent`)||(d.on(`mousedown`,BM),d.on(`mousemove`,BM)),n&&n.push(d)}const BM=Xb(function(e){let t=this,n=VM(t,e.offsetX,e.offsetY);X(t).dataIndex=n>=0?n:null},30,!1);function VM(e,t,n){let r=e.baseDimIdx,i=1-r,a=e.shape.points,o=e.largeDataIndices,s=[],c=[],l=e.barWidth;for(let e=0,u=a.length/3;e<u;e++){let u=e*3;if(c[r]=l,c[i]=a[u+2],s[r]=a[u+r],s[i]=a[u+i],c[i]<0&&(s[i]+=c[i],c[i]=-c[i]),t>=s[0]&&t<=s[0]+c[0]&&n>=s[1]&&n<=s[1]+c[1])return o[e]}return-1}function HM(e,t,n){if(pA(n,`cartesian2d`)){let 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}}{let r=n.getArea(),i=t;return{cx:r.cx,cy:r.cy,r0:e?r.r0:i.r0,r:e?r.r:i.r,startAngle:e?i.startAngle:0,endAngle:e?i.endAngle:Math.PI*2}}}function UM(e,t,n){return new(e.type===`polar`?vp:Uu)({shape:HM(t,n,e),silent:!0,z2:0})}function WM(e,t){return e.height===0?t.getOtherAxis(t.getBaseAxis()).inverse?`bottom`:`top`:e.height>0?`bottom`:`top`}function GM(e,t){return e.width===0?t.getOtherAxis(t.getBaseAxis()).inverse?`left`:`right`:e.width>=0?`right`:`left`}function KM(e){e.registerChartView(CM),e.registerSeriesModel(pM),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,sM(`bar`)),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,cM(`bar`)),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,HA(`bar`)),e.registerAction({type:`changeAxisOrder`,event:`changeAxisOrder`,update:`update`},function(e,t){let n=e.componentType||`series`;t.eachComponent({mainType:n,query:e},function(t){e.sortInfo&&t.axis.setCategorySortInfo(e.sortInfo)})}),dM(e)}function qM(e){return{seriesType:e,reset:function(e,t){let n=t.findComponents({mainType:`legend`});if(!n||!n.length)return;let r=e.getData();r.filterSelf(function(e){let t=r.getName(e);for(let e=0;e<n.length;e++)if(!n[e].isSelected(t))return!1;return!0})}}}function JM(e,t,n){t=L(t)&&{coordDimensions:t}||j({encodeDefine:e.getEncode()},t);let r=e.getSource(),{dimensions:i}=lT(r,t),a=new sT(i,e);return a.initData(r,n),a}var YM=class{constructor(e,t){this._getDataWithEncodedVisual=e,this._getRawData=t}getAllNames(){let e=this._getRawData();return e.mapArray(e.getName)}containName(e){return this._getRawData().indexOfName(e)>=0}indexOfName(e){return this._getDataWithEncodedVisual().indexOfName(e)}getItemVisual(e,t){return this._getDataWithEncodedVisual().getItemVisual(e,t)}};const XM=Y();var ZM=class e extends Db{constructor(...t){super(...t),this.type=e.type}init(e){super.init.apply(this,arguments),this.legendVisualProvider=new YM(I(this.getData,this),I(this.getRawData,this)),this._defaultLabelLine(e)}mergeOption(){super.mergeOption.apply(this,arguments)}getInitialData(){return JM(this,{coordDimensions:[`value`],encodeDefaulter:fe(M_,this)})}getDataParams(e){let t=this.getData(),n=XM(t),r=n.seats;if(!r){let e=[];t.each(t.mapDimension(`value`),function(t){e.push(t)}),r=n.seats=Uo(e,t.hostModel.get(`percentPrecision`))}let i=super.getDataParams(e);return i.percent=r[e]||0,i.$vars.push(`percent`),i}_defaultLabelLine(e){xs(e,`labelLine`,[`show`]);let t=e.labelLine,n=e.emphasis.labelLine;t.show=t.show&&e.label.show,n.show=n.show&&e.emphasis.label.show}};ZM.type=`series.pie`,ZM.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`},Jg({fullType:ZM.type,getCoord2(e){return e.getShallow(`center`)}});const QM=Math.PI/180;function $M(e,t,n,r,i,a,o,s,c,l){if(e.length<2)return;function u(e){let a=e.rB,o=a*a;for(let a=0;a<e.list.length;a++){let s=e.list[a],c=Math.abs(s.label.y-n),l=r+s.len,u=l*l,d=t+(Math.sqrt(Math.abs((1-c*c/o)*u))+s.len2)*i,f=d-s.label.x;tN(s,s.targetTextWidth-f*i,!0),s.label.x=d}}function d(e){let a={list:[],maxY:0},o={list:[],maxY:0};for(let s=0;s<e.length;s++){if(e[s].labelAlignTo!==`none`)continue;let c=e[s],l=c.label.y>n?o:a,u=Math.abs(c.label.y-n);if(u>=l.maxY){let e=c.label.x-t-c.len2*i,n=r+c.len;l.rB=Math.abs(e)<n?Math.sqrt(u*u/(1-e*e/n/n)):n,l.maxY=u}l.list.push(c)}u(a),u(o)}let f=e.length;for(let t=0;t<f;t++)if(e[t].position===`outer`&&e[t].labelAlignTo===`labelLine`){let n=e[t].label.x-l;e[t].linePoints[1][0]+=n,e[t].label.x=l}bk(e,1,c,c+o)&&d(e)}function eN(e,t,n,r,i,a,o,s){let c=[],l=[],u=Number.MAX_VALUE,d=-Number.MAX_VALUE;for(let n=0;n<e.length;n++){let r=e[n].label;aN(e[n])||(r.x<t?(u=Math.min(u,r.x),c.push(e[n])):(d=Math.max(d,r.x),l.push(e[n])))}for(let n=0;n<e.length;n++){let r=e[n];if(!aN(r)&&r.linePoints){if(r.labelStyleWidth!=null)continue;let e=r.label,n=r.linePoints,a;a=r.labelAlignTo===`edge`?e.x<t?n[2][0]-r.labelDistance-o-r.edgeDistance:o+i-r.edgeDistance-n[2][0]-r.labelDistance:r.labelAlignTo===`labelLine`?e.x<t?u-o-r.bleedMargin:o+i-d-r.bleedMargin:e.x<t?e.x-o-r.bleedMargin:o+i-e.x-r.bleedMargin,r.targetTextWidth=a,tN(r,a,!1)}}$M(l,t,n,r,1,i,a,o,s,d),$M(c,t,n,r,-1,i,a,o,s,u);for(let n=0;n<e.length;n++){let r=e[n];if(!aN(r)&&r.linePoints){let e=r.label,n=r.linePoints,a=r.labelAlignTo===`edge`,s=e.style.padding,c=s?s[1]+s[3]:0,l=e.style.backgroundColor?0:c,u=r.rect.width+l,d=n[1][0]-n[2][0];a?e.x<t?n[2][0]=o+r.edgeDistance+u+r.labelDistance:n[2][0]=o+i-r.edgeDistance-u-r.labelDistance:(e.x<t?n[2][0]=e.x+r.labelDistance:n[2][0]=e.x-r.labelDistance,n[1][0]=n[2][0]+d),n[1][1]=n[2][1]=e.y}}}function tN(e,t,n){if(e.labelStyleWidth!=null)return;let r=e.label,i=r.style,a=e.rect,o=i.backgroundColor,s=i.padding,c=s?s[1]+s[3]:0,l=i.overflow,u=a.width+(o?0:c);if(t<u||n){if(l&&l.match(`break`)){r.setStyle(`backgroundColor`,null),r.setStyle(`width`,t-c);let e=r.getBoundingRect();r.setStyle(`width`,Math.ceil(e.width)),r.setStyle(`backgroundColor`,o)}else{let i=t-c,a=t<u?i:n?i>e.unconstrainedWidth?null:i:null;r.setStyle(`width`,a)}nN(a,r)}}function nN(e,t){iN.rect=e,mk(iN,t,rN)}const rN={minMarginForce:[null,0,null,0],marginDefault:[1,0,1,0]},iN={};function aN(e){return e.position===`center`}function oN(e){let t=e.getData(),n=[],r,i,a=!1,o=(e.get(`minShowLabelAngle`)||0)*QM,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(let t in e.states)if(e.states[t].ignore===!1)return!0;return!1}t.each(function(e){let 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=J(v.get(`edgeDistance`),l),C=v.get(`bleedMargin`);C==null&&(C=Math.min(l,f)>200?10:2);let w=_.getModel(`labelLine`),T=w.get(`length`);T=J(T,l);let E=w.get(`length2`);if(E=J(E,l),Math.abs(d.endAngle-d.startAngle)<o){P(h.states,p),h.ignore=!0,g&&(P(g.states,p),g.ignore=!0);return}if(!m(h))return;let D=(d.startAngle+d.endAngle)/2,O=Math.cos(D),ee=Math.sin(D),k,A,te,j;r=d.cx,i=d.cy;let ne=y===`inside`||y===`inner`;if(y===`center`)k=d.cx,A=d.cy,j=`center`;else{let e=(ne?(d.r+d.r0)/2*O:d.r*O)+r,t=(ne?(d.r+d.r0)/2*ee:d.r*ee)+i;if(k=e+O*3,A=t+ee*3,!ne){let n=e+O*(T+c-d.r),r=t+ee*(T+c-d.r),i=n+(O<0?-1:1)*E,a=r;k=x===`edge`?O<0?u+S:u+l-S:i+(O<0?-b:b),A=a,te=[[e,t],[n,r],[i,a]]}j=ne?`center`:x===`edge`?O>0?`right`:`left`:O>0?`left`:`right`}let M=Math.PI,re=0,N=v.get(`rotate`);if(me(N))re=M/180*N;else if(y===`center`)re=0;else if(N===`radial`||N===!0)re=O<0?-D+M:-D;else if(N===`tangential`||N===`tangential-noflip`&&y!==`outside`&&y!==`outer`){let e=Math.atan2(O,ee);e<0&&(e=M*2+e),ee>0&&N!==`tangential-noflip`&&(e=M+e),re=e-M}if(a=!!re,h.x=k,h.y=A,h.rotation=re,h.setStyle({verticalAlign:`middle`}),ne){h.setStyle({align:j});let e=h.states.select;e&&(e.x+=h.x,e.y+=h.y)}else{let e=new K(0,0,0,0);nN(e,h),n.push({label:h,labelLine:g,position:y,len:T,len2:E,minTurnAngle:w.get(`minTurnAngle`),maxSurfaceAngle:w.get(`maxSurfaceAngle`),surfaceNormal:new G(O,ee),linePoints:te,textAlign:j,labelDistance:b,labelAlignTo:x,edgeDistance:S,bleedMargin:C,rect:e,unconstrainedWidth:e.width,labelStyleWidth:h.style.width})}s.setTextConfig({inside:ne})}),!a&&e.get(`avoidLabelOverlap`)&&eN(n,r,i,c,l,f,u,d);for(let e=0;e<n.length;e++){let t=n[e],r=t.label,i=t.labelLine,a=isNaN(r.x)||isNaN(r.y);if(r){r.setStyle({align:t.textAlign}),a&&(P(r.states,p),r.ignore=!0);let e=r.states.select;e&&(e.x+=r.x,e.y+=r.y)}if(i){let e=t.linePoints;a||!e?(P(i.states,p),i.ignore=!0):(ik(e,t.minTurnAngle),ak(e,t.surfaceNormal,t.maxSurfaceAngle),i.setShape({points:e}),r.__hostTarget.textGuideLineConfig={anchor:new G(e[0][0],e[0][1])})}}}const sN=Math.PI*2,cN=Math.PI/180,lN=xc(`pie`,uN);function uN(e,t){e.eachSeriesByType(`pie`,function(e){let n=e.getData(),r=n.mapDimension(`value`),{cx:i,cy:a,r:o,r0:s,viewRect:c}=s_(e,t),l=-e.get(`startAngle`)*cN,u=e.get(`endAngle`),d=e.get(`padAngle`)*cN;u=u===`auto`?l-sN:-u*cN;let f=e.get(`minAngle`)*cN+d,p=0;n.each(r,function(e){!isNaN(e)&&p++});let m=n.getSum(r),h=Math.PI/(m||p)*2,g=e.get(`clockwise`),_=e.get(`roseType`),v=e.get(`stillShowZeroSum`),y=n.getDataExtent(r);y[0]=0;let b=g?1:-1,x=[l,u],S=b*d/2;nu(x,!g),[l,u]=x;let C=dN(e);C.startAngle=l,C.endAngle=u,C.clockwise=g,C.cx=i,C.cy=a,C.r=o,C.r0=s;let w=Math.abs(u-l),T=w,E=0,D=l;if(n.setLayout({viewRect:c,r:o}),n.each(r,function(e,t){let r;if(isNaN(e)){n.setItemLayout(t,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:g,cx:i,cy:a,r0:s,r:_?NaN:o});return}r=_===`area`?w/p:m===0&&v?h:e*h,r<f?(r=f,T-=f):E+=e;let c=D+b*r,l=0,u=0;d>r?(l=D+b*r/2,u=l):(l=D+S,u=c-S),n.setItemLayout(t,{angle:r,startAngle:l,endAngle:u,clockwise:g,cx:i,cy:a,r0:s,r:_?Ao(e,y,[s,o]):o}),D=c}),T<sN&&p){if(T<=.001){let e=w/p;n.each(r,function(t,r){if(!isNaN(t)){let t=n.getItemLayout(r);t.angle=e;let i=0,a=0;e<d?(i=l+b*(r+1/2)*e,a=i):(i=l+b*r*e+S,a=l+b*(r+1)*e-S),t.startAngle=i,t.endAngle=a}})}else h=T/E,D=l,n.each(r,function(e,t){if(!isNaN(e)){let r=n.getItemLayout(t),i=r.angle===f?f:e*h,a=0,o=0;i<d?(a=D+b*i/2,o=a):(a=D+S,o=D+b*i-S),r.startAngle=a,r.endAngle=o,D+=b*i}})}})}const dN=Y();var fN=class extends vp{constructor(e,t,n){super(),this.z2=2;let r=new qu;this.setTextContent(r),this.updateData(e,t,n,!0)}updateData(e,t,n,r){let i=this,a=e.hostModel,o=e.getItemModel(t),s=o.getModel(`emphasis`),c=e.getItemLayout(t),l=j(bM(o.getModel(`itemStyle`),c,!0),c);if(isNaN(l.startAngle)){i.setShape(l);return}if(r){i.setShape(l);let e=a.getShallow(`animationType`);a.ecModel.ssr?(tm(i,{scaleX:0,scaleY:0},a,{dataIndex:t,isFrom:!0}),i.originX=l.cx,i.originY=l.cy):e===`scale`?(i.shape.r=c.r0,tm(i,{shape:{r:c.r}},a,t)):n==null?(i.shape.endAngle=c.startAngle,em(i,{shape:{endAngle:c.endAngle}},a,t)):(i.setShape({startAngle:n,endAngle:n}),tm(i,{shape:{startAngle:c.startAngle,endAngle:c.endAngle}},a,t))}else om(i),em(i,{shape:l},a,t);i.useStyle(e.getItemVisual(t,`style`)),xf(i,o);let u=(c.startAngle+c.endAngle)/2,d=a.get(`selectedOffset`),f=Math.cos(u)*d,p=Math.sin(u)*d,m=o.getShallow(`cursor`);m&&i.attr(`cursor`,m),this._updateLabel(a,e,t),i.ensureState(`emphasis`).shape=j({r:c.r+(s.get(`scale`)&&s.get(`scaleSize`)||0)},bM(s.getModel(`itemStyle`),c)),j(i.ensureState(`select`),{x:f,y:p,shape:bM(o.getModel([`select`,`itemStyle`]),c)}),j(i.ensureState(`blur`),{shape:bM(o.getModel([`blur`,`itemStyle`]),c)});let h=i.getTextGuideLine(),g=i.getTextContent();h&&j(h.ensureState(`select`),{x:f,y:p}),j(g.ensureState(`select`),{x:f,y:p}),_f(this,s.get(`focus`),s.get(`blurScope`),s.get(`disabled`))}_updateLabel(e,t,n){let r=this,i=t.getItemModel(n),a=i.getModel(`labelLine`),o=t.getItemVisual(n,`style`),s=o&&o.fill,c=o&&o.opacity;ih(r,ah(i),{labelFetcher:t.hostModel,labelDataIndex:n,inheritColor:s,defaultOpacity:c,defaultText:e.getFormattedLabel(n,`normal`)||t.getName(n)});let l=r.getTextContent();r.setTextConfig({position:null,rotation:null}),l.attr({z2:10});let u=i.get([`label`,`position`]);if(u!==`outside`&&u!==`outer`)r.removeTextGuideLine();else{let e=this.getTextGuideLine();e||(e=new Ep,this.setTextGuideLine(e)),ck(this,lk(i),{stroke:s,opacity:Ce(a.get([`lineStyle`,`opacity`]),c,1)})}}},pN=class extends Vb{constructor(...e){super(...e),this.type=`pie`,this.ignoreLabelLineUpdate=!0}render(e,t,n,r){let i=e.getData(),a=this._data,o=this.group,s;if(!a&&i.count()>0){let e=i.getItemLayout(0);for(let t=1;isNaN(e&&e.startAngle)&&t<i.count();++t)e=i.getItemLayout(t);e&&(s=e.startAngle)}if(this._emptyCircleSector&&o.remove(this._emptyCircleSector),i.count()===0&&e.get(`showEmptyCircle`)){let t=new vp({shape:k(dN(e))});t.useStyle(e.getModel(`emptyCircleStyle`).getItemStyle()),this._emptyCircleSector=t,o.add(t)}i.diff(a).add(function(e){let t=new fN(i,e,s);i.setItemGraphicEl(e,t),o.add(t)}).update(function(e,t){let n=a.getItemGraphicEl(t);n.updateData(i,e,s),n.off(`click`),o.add(n),i.setItemGraphicEl(e,n)}).remove(function(t){am(a.getItemGraphicEl(t),e,t)}).execute(),oN(e),e.get(`animationTypeUpdate`)!==`expansion`&&(this._data=i)}dispose(){}containPoint(e,t){let n=t.getData().getItemLayout(0);if(n){let t=e[0]-n.cx,r=e[1]-n.cy,i=Math.sqrt(t*t+r*r);return i<=n.r&&i>=n.r0}}};pN.type=`pie`;function mN(e){return{seriesType:e,reset:function(e,t){let n=e.getData();n.filterSelf(function(e){let t=n.mapDimension(`value`),r=n.get(t,e);return!(me(r)&&!isNaN(r)&&r<0)})}}}function hN(e){e.registerChartView(pN),e.registerSeriesModel(ZM),Rx(`pie`,e.registerAction),e.registerLayout(lN),e.registerProcessor(qM(`pie`)),e.registerProcessor(mN(`pie`))}var gN=class e extends Db{constructor(...t){super(...t),this.type=e.type,this.hasSymbolVisual=!0}getInitialData(e,t){return ST(null,this,{useEncodeDefaulter:!0})}getProgressive(){let e=this.option.progressive;return e==null?this.option.large?5e3:this.get(`progressive`):e}getProgressiveThreshold(){let e=this.option.progressiveThreshold;return e==null?this.option.large?1e4:this.get(`progressiveThreshold`):e}brushSelector(e,t,n){return n.point(t.getItemLayout(e))}getZLevelKey(){return this.getData().count()>this.getProgressiveThreshold()?this.id:``}};gN.type=`series.scatter`,gN.dependencies=[`grid`,`polar`,`geo`,`singleAxis`,`calendar`,`matrix`],gN.defaultOption={coordinateSystem:`cartesian2d`,z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:Q.color.primary}},universalTransition:{divideShape:`clone`}};var _N=class{},vN=class extends Ou{constructor(e){super(e),this._off=0,this.hoverDataIdx=-1}getDefaultShape(){return new _N}reset(){this.notClear=!1,this._off=0}beforeBrush(e){e&&!e.contentRetained&&this.reset()}buildPath(e,t){let n=t.points,r=t.size,i=this.symbolProxy,a=i.shape,o=e.getContext?e.getContext():e,s=o&&r[0]<4,c=this.softClipShape,l;if(s)this._ctx=o;else{for(this._ctx=null,l=this._off;l<n.length;){let t=n[l++],o=n[l++];isNaN(t)||isNaN(o)||(!c||c.contain(t,o))&&(a.x=t-r[0]/2,a.y=o-r[1]/2,a.width=r[0],a.height=r[1],i.buildPath(e,a,!0))}this.incremental&&(this._off=l,this.notClear=!0)}}afterBrush(){let e=this.shape,t=e.points,n=e.size,r=this._ctx,i=this.softClipShape,a;if(r){for(a=this._off;a<t.length;){let e=t[a++],o=t[a++];isNaN(e)||isNaN(o)||(!i||i.contain(e,o))&&r.fillRect(e-n[0]/2,o-n[1]/2,n[0],n[1])}this.incremental&&(this._off=a,this.notClear=!0)}}findDataIndex(e,t){let n=this.shape,r=n.points,i=n.size,a=Math.max(i[0],4),o=Math.max(i[1],4);for(let n=r.length/2-1;n>=0;n--){let i=n*2,s=r[i]-a/2,c=r[i+1]-o/2;if(e>=s&&t>=c&&e<=s+a&&t<=c+o)return n}return-1}contain(e,t){let n=this.transformCoordToLocal(e,t),r=this.getBoundingRect();return e=n[0],t=n[1],r.contain(e,t)?(this.hoverDataIdx=this.findDataIndex(e,t))>=0:(this.hoverDataIdx=-1,!1)}getBoundingRect(){let e=this._rect;if(!e){let t=this.shape,n=t.points,r=t.size,i=r[0],a=r[1],o=1/0,s=1/0,c=-1/0,l=-1/0;for(let e=0;e<n.length;){let t=n[e++],r=n[e++];o=Math.min(t,o),c=Math.max(t,c),s=Math.min(r,s),l=Math.max(r,l)}e=this._rect=new K(o-i/2,s-a/2,c-o+i,l-s+a)}return e}},yN=class{constructor(){this.group=new q}updateData(e,t){this._clear(),this._data=e;let n=this._create();n.setShape({points:e.getLayout(`points`)}),this._setCommon(n,e,t)}updateLayout(e){let t=this._data;if(!t)return;let n=t.getLayout(`points`);this.group.eachChild(function(e){if(e.startIndex!=null){let t=(e.endIndex-e.startIndex)*2,r=e.startIndex*4*2;n=new Float32Array(n.buffer,r,t)}e.setShape(`points`,n),e.reset(),e.stopAnimation()})}incrementalPrepareUpdate(e){this._clear()}incrementalUpdate(e,t,n,r){let i=this._newAdded[0],a=t.getLayout(`points`),o=i&&i.shape.points;if(typeof process<`u`&&process.env.NODE_ENV!==`production`&&bc(t.getLayout(`pointsRange`),e),o&&o.length<2e4){let t=o.length,n=new Float32Array(t+a.length);n.set(o),n.set(a,t),i.endIndex=e.end,i.setShape({points:n})}else{this._newAdded=[];let i=this._create();i.startIndex=e.start,i.endIndex=e.end,i.incremental=n,i.setShape({points:a}),this._setCommon(i,t,r)}}eachRendered(e){this._newAdded[0]&&e(this._newAdded[0])}_create(){let e=new vN({cursor:`default`});return e.ignoreCoarsePointer=!0,this.group.add(e),this._newAdded.push(e),e}_setCommon(e,t,n){let r=t.hostModel;n=n||{};let i=t.getVisual(`symbolSize`);e.setShape(`size`,i instanceof Array?i:[i,i]),e.softClipShape=n.clipShape||null,e.symbolProxy=lS(t.getVisual(`symbol`),0,0,0,0),e.setColor=e.symbolProxy.setColor;let a=e.shape.size[0]<4;e.useStyle(r.getModel(`itemStyle`).getItemStyle(a?[`color`,`shadowBlur`,`shadowColor`]:[`color`]));let o=t.getVisual(`style`),s=o&&o.fill;s&&e.setColor(s);let c=X(e);c.seriesIndex=r.seriesIndex,e.on(`mousemove`,function(t){c.dataIndex=null;let n=e.hoverDataIdx;n>=0&&(c.dataIndex=n+(e.startIndex||0))})}remove(){this._clear()}_clear(){this._newAdded=[],this.group.removeAll()}},bN=class e extends Vb{constructor(...t){super(...t),this.type=e.type}render(e,t,n){let r=e.getData();this._updateSymbolDraw(r,e).updateData(r,xN(e)),this._finished=!0}incrementalPrepareRender(e,t,n){let r=e.getData();this._updateSymbolDraw(r,e).incrementalPrepareUpdate(r),this._finished=!1}incrementalRender(e,t,n){this._symbolDraw.incrementalUpdate(e,t.getData(),vc(t),xN(t)),this._finished=e.end===t.getData().count()}updateTransform(e,t,n){let r=e.getData();if(this.group.dirty(),this._finished){let i=zA(``).reset(e,t,n);i.progress&&i.progress({start:0,end:r.count(),count:r.count()},r),this._symbolDraw.updateLayout(xN(e))}else return{update:!0}}eachRendered(e){this._symbolDraw&&this._symbolDraw.eachRendered(e)}_updateSymbolDraw(e,t){let n=this._symbolDraw,r=t.pipelineContext.large;return(!n||r!==this._isLargeDraw)&&(n&&n.remove(),n=this._symbolDraw=r?new yN:new Wk,this._isLargeDraw=r,this.group.removeAll()),this.group.add(n.group),n}remove(e,t){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null}dispose(){}};bN.type=`scatter`;function xN(e){return{clipShape:fA(e)}}var SN=class extends b_{getCoordSysModel(){return this.getReferringComponents(`grid`,qs).models[0]}};SN.type=`cartesian2dAxis`,ae(SN,RE);const CN={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:`auto`,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`}},wN=A({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:`auto`,show:`auto`},axisLabel:{interval:`auto`}},CN),TN=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}}},CN);var EN={category:wN,value:TN,time:A({splitNumber:6,axisLabel:{rich:{primary:{fontWeight:`bold`}}},splitLine:{show:!1}},TN),log:M({logBase:10},TN)};function DN(e,t,n,r){P(yE,function(i,a){let o=A(A({},EN[a],!0),r,!0);class s extends n{constructor(...e){super(...e),this.type=t+`Axis.`+a}mergeDefaultAndTheme(e,t){let n=m_(this),r=n?g_(e):{};A(e,t.getTheme().get(a+`Axis`)),A(e,this.getDefaultOption()),e.type=ON(e),n&&h_(e,r,n)}optionUpdated(){this.option.type===`category`&&(this.__ordinalMeta=DT.createByAxisModel(this))}getCategories(e){let t=this.option;if(t.type===`category`)return e?t.data:this.__ordinalMeta.categories}getOrdinalMeta(){return this.__ordinalMeta}updateAxisBreaks(e){let t=qA();return t?t.updateModelAxisBreak(this,e):{breaks:[]}}}s.type=t+`Axis.`+a,s.defaultOption=o,e.registerComponentModel(s)}),e.registerSubTypeDefaulter(t+`Axis`,ON)}function ON(e){return e.type||(e.data?`category`:`value`)}var kN=class{constructor(e){this.type=`cartesian`,this._dimList=[],this._axes={},this.name=e||``}getAxis(e){return this._axes[e]}getAxes(){return F(this._dimList,function(e){return this._axes[e]},this)}getAxesByScale(e){return e=e.toLowerCase(),ce(this.getAxes(),function(t){return t.scale.type===e})}addAxis(e){let t=e.dim;this._axes[t]=e,this._dimList.push(t)}};const AN=[`x`,`y`];function jN(e){return(e.type===`interval`||e.type===`time`)&&!Yh(e)}var MN=class extends kN{constructor(...e){super(...e),this.type=Qj,this.dimensions=AN}calcAffineTransform(){this._transform=this._invTransform=null;let e=this.getAxis(`x`).scale,t=this.getAxis(`y`).scale;if(!jN(e)||!jN(t))return;let n=PT(e,null),r=PT(t,null),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)return;let 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=$t([],f)}getBaseAxis(){return this.getAxesByScale(`ordinal`)[0]||this.getAxesByScale(`time`)[0]||this.getAxis(`x`)}containPoint(e){let t=this.getAxis(`x`),n=this.getAxis(`y`);return t.contain(t.toLocalCoord(e[0]))&&n.contain(n.toLocalCoord(e[1]))}containData(e){return this.getAxis(`x`).containData(e[0])&&this.getAxis(`y`).containData(e[1])}containZone(e,t){let n=this.dataToPoint(e),r=this.dataToPoint(t),i=this.getArea(),a=new K(n[0],n[1],r[0]-n[0],r[1]-n[1]);return i.intersect(a)}dataToPoint(e,t,n){n=n||[];let r=e[0],i=e[1];if(this._transform&&r!=null&&isFinite(r)&&i!=null&&isFinite(i))return lt(n,e,this._transform);let 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}clampData(e,t){let 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||[],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}pointToData(e,t,n){if(n=n||[],this._invTransform)return lt(n,e,this._invTransform);let 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}getOtherAxis(e){return this.getAxis(e.dim===`x`?`y`:`x`)}getArea(e){e=e||0;let 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 K(r,i,Math.max(t[0],t[1])-r+e,Math.max(n[0],n[1])-i+e)}};function NN(e,t){let n=e.scale,r=e.model;typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(n&&r&&(n instanceof tE||n instanceof hE)&&(t instanceof tE||t instanceof hE));let i=SD(n,r,r.ecModel,e,null),a=UT(n),o=UT(t)?t.intervalStub:t,s=a?n.intervalStub:n,c=n.base,l=o.getTicks(),u=o.getTicks({expandToNicedExtent:!0}),d=l.length-1;typeof process<`u`&&process.env.NODE_ENV!==`production`&&(H(!Yh(t)&&!Yh(n)),H(d>0),H(u.length===l.length),H(l[0].value<=l[d].value),H(u[0].value<=l[0].value&&l[d].value<=u[d].value),d>=2&&(H(u[1].value===l[1].value),H(u[d-1].value===l[d-1].value)));let f,p,m;if(d===1)f=p=0,m=1;else if(d===2){let e=xo(l[0].value-l[1].value),t=xo(l[1].value-l[2].value);f=p=0,e===t?m=2:(m=1,e<t?f=e/t:p=t/e)}else{let e=o.getConfig().interval;f=(1-(l[0].value-u[0].value)/e)%1,p=(1-(u[d].value-l[d].value)/e)%1,m=d-+!!f-!!p}typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(m>=1);let h=i.zoomFixMM,g=h[0]||h[1],_=[i.fixMM[0]||g,i.fixMM[1]||g],v=n.getExtent(),y=s.getExtent(),b=YT(y,_),x,S,C,w,T,E;function D(e){let t=0;for(;t<50&&!e();t++)C=a?C*bo(c,2):GT(C),w=KT(C);typeof process<`u`&&process.env.NODE_ENV!==`production`&&t>=50&&ds("incorrect impl in `scaleCalcAlign`.")}function O(){x=Fo(E-C*f,w)}function ee(){S=Fo(T+C*p,w)}function k(){E=f?Fo(x+C*f,w):x}function A(){T=p?Fo(S-C*p,w):S}if(_[0]&&_[1]){x=b[0],S=b[1],C=(S-x)/(m+f+p);let t=e.getExtent(),n=xo(t[1]-t[0]);w=Vo([S,x],n,.5/m),k(),A(),os(w)&&(C=Fo(C,w))}else{let e=b[1]-b[0];C=a?bo(Xo(e),1):Qo(e/m,2),w=KT(C),_[0]?(x=b[0],D(function(){if(k(),T=Fo(E+C*m,w),ee(),S>=b[1])return!0})):_[1]?(S=b[1],D(function(){if(A(),E=Fo(T-C*m,w),O(),x<=b[0])return!0})):D(function(){E=Fo(wo(b[0]/C)*C,w),T=Fo(Co(b[1]/C)*C,w);let e=So((T-E)/C);if(e<=m){let t=m-e,n,r=i.incl0||a;if(r&&b[0]===0)n=[0,t];else if(r&&b[1]===0)n=[t,0];else{let e=Co(t/2);n=t%2==0?[e,e]:x+S<b[0]+b[1]?[e,e+1]:[e+1,e]}if(E=Fo(E-C*n[0],w),T=Fo(T+C*n[1],w),O(),ee(),x<=b[0]&&S>=b[1])return!0}})}FE(n,_,y,[x,S],v,{interval:C,intervalCount:m,intervalPrecision:w,niceExtent:[E,T]}),typeof process<`u`&&process.env.NODE_ENV!==`production`&&n.freeze()}const PN=[[3,1],[0,2]];var FN=class e{constructor(e,t,n){this.type=`grid`,this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=AN,this._initCartesian(e,t,n),this.model=e}getRect(){return this._rect}update(e,t){let n=this._axesMap;P(this._axesList,function(e){gD(e,1);let t=e.scale;WT(t)&&t.setSortInfo(e.model.get(`categorySortInfo`))});function r(e){let t=ue(e),n=[];for(let r=t.length-1;r>=0;r--){let i=e[+t[r]];i.__alignTo?n.push(i):OD(i)}P(n,e=>{BN(e,e.__alignTo)?OD(e):NN(e,e.__alignTo.scale)})}r(n.x),r(n.y);let i={};P(n.x,function(e){LN(n,`y`,e,i)}),P(n.y,function(e){LN(n,`x`,e,i)}),this.resize(this.model,t)}resize(e,t,n){let r=d_(e,t),i=this._rect=c_(e.getBoxLayoutParams(),r.refContainer),a=this._axesMap,o=this._coordsList,s=e.get(`containLabel`);if(HN(a,i),!n){let n=qN(i,o,a,s,t),c;if(s)WN?(WN(this._axesList,i),HN(a,i)):(typeof process<`u`&&process.env.NODE_ENV!==`production`&&us("Specified `grid.containLabel` but no `use(LegacyGridContainLabel)`;use `grid.outerBounds` instead.",!0),c=KN(i.clone(),`axisLabel`,null,i,a,n,r));else{let{outerBoundsRect:t,parsedOuterBoundsContain:o,outerBoundsClamp:s}=YN(e,i,r);t&&(c=KN(t,o,s,i,a,n,r))}JN(i,a,lO.determine,null,c,r),P(this._coordsList,function(e){e.calcAffineTransform()})}}getAxis(e,t){let n=this._axesMap[e];if(n!=null)return n[t||0]}getAxes(){return this._axesList.slice()}getCartesian(e,t){if(e!=null&&t!=null){let n=`x`+e+`y`+t;return this._coordsMap[n]}B(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(let n=0,r=this._coordsList;n<r.length;n++)if(r[n].getAxis(`x`).index===e||r[n].getAxis(`y`).index===t)return r[n]}getCartesians(){return this._coordsList.slice()}convertToPixel(e,t,n){let r=this._findConvertTarget(t);return r.cartesian?r.cartesian.dataToPoint(n):r.axis?r.axis.toGlobalCoord(r.axis.dataToCoord(n)):null}convertFromPixel(e,t,n){let r=this._findConvertTarget(t);return r.cartesian?r.cartesian.pointToData(n):r.axis?r.axis.coordToData(r.axis.toLocalCoord(n)):null}_findConvertTarget(e){let t=e.seriesModel,n=e.xAxisModel||t&&t.getReferringComponents(`xAxis`,qs).models[0],r=e.yAxisModel||t&&t.getReferringComponents(`yAxis`,qs).models[0],i=e.gridModel,a=this._coordsList,o,s;return t?(o=t.coordinateSystem,N(a,o)<0&&(o=null)):n&&r?o=this.getCartesian(n.componentIndex,r.componentIndex):n?s=this.getAxis(`x`,n.componentIndex):r?s=this.getAxis(`y`,r.componentIndex):i&&i.coordinateSystem===this&&(o=this._coordsList[0]),{cartesian:o,axis:s}}containPoint(e){let t=this._coordsList[0];if(t)return t.containPoint(e)}_initCartesian(e,t,n){let r=this,i={left:!1,right:!1,top:!1,bottom:!1},a={x:{},y:{}},o={x:0,y:0};if(t.eachComponent(`xAxis`,s(`x`),this),t.eachComponent(`yAxis`,s(`y`),this),!o.x||!o.y){this._axesMap={},this._axesList=[];return}this._axesMap=a,P(a.x,(t,n)=>{P(a.y,(r,i)=>{let a=`x`+n+`y`+i,o=new MN(a);o.master=this,o.model=e,this._coordsMap[a]=o,this._coordsList.push(o),o.addAxis(t),o.addAxis(r)})}),zN(a.x),zN(a.y);function s(t){return function(n,s){if(!IN(n,e))return;let c=n.get(`position`);t===`x`?c!==`top`&&c!==`bottom`&&(c=i.bottom?`top`:`bottom`):c!==`left`&&c!==`right`&&(c=i.left?`right`:`left`),i[c]=!0;let l=xE(n),u=new WA(t,SE(n,l,!0),[0,0],l,c);u.onBand=LE(u.scale,n),u.inverse=n.get(`inverse`),n.axis=u,u.model=n,u.grid=r,u.index=s,r._axesList.push(u),a[t][s]=u,o[t]++}}}getTooltipAxes(e){let t=[],n=[];return P(this.getCartesians(),function(r){let i=e!=null&&e!==`auto`?r.getAxis(e):r.getBaseAxis(),a=r.getOtherAxis(i);N(t,i)<0&&t.push(i),N(n,a)<0&&n.push(a)}),{baseAxes:t,otherAxes:n}}static create(t,n){let r=[];return t.eachComponent(`grid`,function(i,a){let o=new e(i,t,n);o.name=`grid_`+a,o.resize(i,n,!0),i.coordinateSystem=o,r.push(o),P(o._axesList,function(t){hD(t,e.dimIdxMap)})}),t.eachSeries(function(e){let t,n;Qg({targetModel:e,coordSysType:Qj,coordSysProvider:r});function r(){let r=Ij(e),i=r.xAxisModel,a=r.yAxisModel;t=i.axis,n=a.axis;let o=i.getCoordSysModel();if(typeof process<`u`&&process.env.NODE_ENV!==`production`){if(!o)throw Error(`Grid "`+Ce(i.get(`gridIndex`),i.get(`gridId`),0)+`" not found`);if(i.getCoordSysModel()!==a.getCoordSysModel())throw Error(`xAxis and yAxis must use the same grid`)}return o.coordinateSystem.getCartesian(i.componentIndex,a.componentIndex)}t&&n&&(rD(t,e,Qj),rD(n,e,Qj))},this),r}};FN.dimensions=AN,FN.dimIdxMap=Gw(AN);function IN(e,t){return e.getCoordSysModel()===t}function LN(e,t,n,r){n.getAxesOnZeroOf=function(){return a?[a]:[]};let i=e[t],a,o=n.model,s=o.get([`axisLine`,`onZero`]),c=o.get([`axisLine`,`onZeroAxisIndex`]);if(!s)return;if(c!=null)RN(s,i[c])&&(a=i[c]);else for(let e in i)if(W(i,e)&&RN(s,i[e])&&!r[l(i[e])]){a=i[e];break}a&&(r[l(a)]=!0);function l(e){return e.dim+`_`+e.index}}function RN(e,t){if(!t)return!1;let n=t.scale,r=CE(n,0,!1),i=t&&t.type!==`category`&&t.type!==`time`&&r!==3;return i&&e===`auto`&&TE(t)&&(i=!1),i}function zN(e){let t=ue(e),n,r=[];for(let i=t.length-1;i>=0;i--){let a=e[+t[i]];BT(a.scale)&&NE(a.model,a.type,!0)==null&&(a.model.get(`alignTicks`)&&a.model.get(`interval`)==null?r.push(a):n=a)}n||(n=r.pop()),n&&P(r,function(e){e.__alignTo=n})}function BN(e,t){return Yh(e.scale)||Yh(t.scale)||t.scale.getTicks().length<2}function VN(e,t){let n=e.getExtent(),r=n[0]+n[1];e.toGlobalCoord=e.dim===`x`?function(e){return e+t}:function(e){return r-e+t},e.toLocalCoord=e.dim===`x`?function(e){return e-t}:function(e){return r-e+t}}function HN(e,t){P(e.x,e=>UN(e,t.x,t.width)),P(e.y,e=>UN(e,t.y,t.height))}function UN(e,t,n){let r=[0,n],i=+!!e.inverse;e.setExtent(r[i],r[1-i]),VN(e,t)}let WN;function GN(e){WN=e}function KN(e,t,n,r,i,a,o){typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(t===`all`||t===`axisLabel`),JN(r,i,lO.estimate,t,!1,o);let s=[0,0,0,0];l(0),l(1),u(r,0,NaN),u(r,1,NaN);let c=le(s,e=>e>0)==null;return Lm(r,s,!0,!0,n),HN(i,r),c;function l(e){P(i[Z[e]],t=>{if(!ME(t.model))return;let n=a.ensureRecord(t.model),r=n.labelInfoList;if(r)for(let n=0;n<r.length;n++){let i=r[n],a=t.scale.normalize(IE(t.scale,ij(i.label).labelInfo.tick));a=e===1?1-a:a,u(i.rect,e,a),u(i.rect,1-e,NaN)}let i=n.nameLayout;if(i){let t=jE(n.nameLocation)?.5:NaN;u(i.rect,e,t),u(i.rect,1-e,NaN)}})}function u(t,n,r){let i=e[Z[n]]-t[Z[n]],a=t[um[n]]+t[Z[n]]-(e[um[n]]+e[Z[n]]);i=d(i,1-r),a=d(a,r);let o=PN[n][0],c=PN[n][1];s[o]=bo(s[o],i),s[c]=bo(s[c],a)}function d(e,t){return e>0&&!xe(t)&&t>1e-4&&(e/=t),e}}function qN(e,t,n,r,i){let a=new oj(XN);return P(n,n=>P(n,n=>{if(ME(n.model)){let o=!r;n.axisBuilder=Lj(e,t,n.model,i,a,o)}})),a}function JN(e,t,n,r,i,a){let o=n===lO.determine;P(t,t=>P(t,t=>{ME(t.model)&&(Rj(t.axisBuilder,e,t.model),t.axisBuilder.build(o?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:i}))}));let s={x:0,y:0};c(0),c(1);function c(t){s[Z[1-t]]=e[um[t]]<=a.refContainer[um[t]]*.5?0:1-t==1?2:1}P(t,(e,t)=>P(e,e=>{ME(e.model)&&((r===`all`||o)&&e.axisBuilder.build({axisName:!0},{nameMarginLevel:s[t]}),o&&e.axisBuilder.build({axisLine:!0}))}))}function YN(e,t,n){let r,i=e.get(`outerBoundsMode`,!0);i===`same`?r=t.clone():i==null||i===`auto`?r=c_(e.get(`outerBounds`,!0)||Xj,n.refContainer):i!==`none`&&typeof process<`u`&&process.env.NODE_ENV!==`production`&&fs(`Invalid grid[${e.componentIndex}].outerBoundsMode.`);let a=e.get(`outerBoundsContain`,!0),o;a==null||a===`auto`?o=`all`:N([`all`,`axisLabel`],a)<0?(typeof process<`u`&&process.env.NODE_ENV!==`production`&&fs(`Invalid grid[${e.componentIndex}].outerBoundsContain.`),o=`all`):o=a;let s=[Mo(V(e.get(`outerBoundsClampWidth`,!0),Zj[0]),t.width),Mo(V(e.get(`outerBoundsClampHeight`,!0),Zj[1]),t.height)];return{outerBoundsRect:r,parsedOuterBoundsContain:o,outerBoundsClamp:s}}const XN=(e,t,n,r,i,a)=>{let o=n.axis.dim===`x`?`y`:`x`;uj(e,t,n,r,i,a),jE(e.nameLocation)||P(t.recordMap[o],e=>{e&&e.labelInfoList&&e.dirVec&&fj(e.labelInfoList,e.dirVec,r,i)})};function ZN(e,t){let n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return QN(n,e,t),n.seriesInvolved&&eP(n,e),n}function QN(e,t,n){let r=t.getComponent(`tooltip`),i=t.getComponent(`axisPointer`),a=i.get(`link`,!0)||[],o=[];P(n.getCoordinateSystems(),function(n){if(!n.axisPointerEnabled)return;let s=sP(n.model),c=e.coordSysAxesInfo[s]={};e.coordSysMap[s]=n;let l=n.model.getModel(`tooltip`,r);if(P(n.getAxes(),fe(u,!1,null)),n.getTooltipAxes&&r&&l.get(`show`)){let e=l.get(`trigger`)===`axis`,t=l.get([`axisPointer`,`type`])===`cross`,r=n.getTooltipAxes(l.get([`axisPointer`,`axis`]));(e||t)&&P(r.baseAxes,fe(u,!t||`cross`,e)),t&&P(r.otherAxes,fe(u,`cross`,!1))}function u(r,s,u){let d=u.model.getModel(`axisPointer`,i),f=d.get(`show`);if(!f||f===`auto`&&!r&&!oP(d))return;s==null&&(s=d.get(`triggerTooltip`)),d=r?$N(u,l,i,t,r,s):d;let p=d.get(`snap`),m=d.get(`triggerEmphasis`),h=sP(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:oP(d),seriesModels:[],linkGroup:null};c[h]=_,e.seriesInvolved=e.seriesInvolved||g;let v=tP(a,u);if(v!=null){let e=o[v]||(o[v]={axesInfo:{}});e.axesInfo[h]=_,e.mapper=a[v].mapper,_.linkGroup=e}}})}function $N(e,t,n,r,i,a){let o=t.getModel(`axisPointer`),s=[`type`,`snap`,`lineStyle`,`shadowStyle`,`label`,`animation`,`animationDurationUpdate`,`animationEasingUpdate`,`z`],c={};P(s,function(e){c[e]=k(o.get(e))}),c.snap=e.type!==`category`&&!!a,o.get(`type`)===`cross`&&(c.type=`line`);let l=c.label||(c.label={});if(l.show==null&&(l.show=!1),i===`cross`){let e=o.get([`label`,`show`]);if(l.show=e==null||e,!a){let e=c.lineStyle=o.get(`crossStyle`);e&&M(l,e.textStyle)}}return e.model.getModel(`axisPointer`,new kh(c,n,r))}function eP(e,t){t.eachSeries(function(t){let 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&&P(e.coordSysAxesInfo[sP(n.model)],function(e){let r=e.axis;n.getAxis(r.dim)===r&&(e.seriesModels.push(t),e.seriesDataCount==null&&(e.seriesDataCount=0),e.seriesDataCount+=t.getData().count())})})}function tP(e,t){let n=t.model,r=t.dim;for(let t=0;t<e.length;t++){let i=e[t]||{};if(nP(i[r+`AxisId`],n.id)||nP(i[r+`AxisIndex`],n.componentIndex)||nP(i[r+`AxisName`],n.name))return t}}function nP(e,t){return e===`all`||L(e)&&N(e,t)>=0||e===t}function rP(e){let t=iP(e);if(!t)return;let n=t.axisPointerModel,r=t.axis.scale,i=n.option,a=n.get(`status`),o=n.get(`value`);o!=null&&(o=r.parse(o));let s=oP(n);a==null&&(i.status=s?`show`:`hide`);let c=r.getExtent();(o==null||o>c[1])&&(o=c[1]),o<c[0]&&(o=c[0]),i.value=o,s&&(i.status=t.axis.scale.isBlank()?`hide`:`show`)}function iP(e){let t=(e.ecModel.getComponent(`axisPointer`)||{}).coordSysAxesInfo;return t&&t.axesInfo[sP(e)]}function aP(e){let t=iP(e);return t&&t.axisPointerModel}function oP(e){return!!e.get([`handle`,`show`])}function sP(e){return e.type+`||`+e.id}const cP={};var lP=class e extends Ib{constructor(...t){super(...t),this.type=e.type}render(e,t,n,r){this.axisPointerClass&&rP(e),super.render.apply(this,arguments),this._doUpdateAxisPointerClass(e,n,!0)}updateAxisPointer(e,t,n,r){this._doUpdateAxisPointerClass(e,n,!1)}remove(e,t){let n=this._axisPointer;n&&n.remove(t)}dispose(e,t){this._disposeAxisPointer(t),super.dispose.apply(this,arguments)}_doUpdateAxisPointerClass(t,n,r){let i=e.getAxisPointerClass(this.axisPointerClass);if(!i)return;let a=aP(t);a?(this._axisPointer||(this._axisPointer=new i)).render(t,a,n,r):this._disposeAxisPointer(n)}_disposeAxisPointer(e){this._axisPointer&&this._axisPointer.dispose(e),this._axisPointer=null}static registerAxisPointerClass(e,t){if(typeof process<`u`&&process.env.NODE_ENV!==`production`&&cP[e])throw Error(`axisPointer `+e+` exists`);cP[e]=t}static getAxisPointerClass(e){return e&&cP[e]}};lP.type=`axis`;const uP=Y();function dP(e,t,n,r){let i=n.axis;if(i.scale.isBlank())return;let a=n.getModel(`splitArea`),o=a.getModel(`areaStyle`),s=o.get(`color`),c=r.coordinateSystem.getRect(),l=i.getTicksCoords({tickModel:a,breakTicks:`none`,pruneByBreak:`preserve_extent_bound`});if(!l.length)return;let u=s.length,d=uP(e).splitAreaColors,f=U(),p=0;if(d)for(let e=0;e<l.length;e++){let t=d.get(l[e].tickValue);if(t!=null){p=(t+(u-1)*e)%u;break}}let m=i.toGlobalCoord(l[0].coord),h=o.getAreaStyle();s=L(s)?s:[s];for(let e=1;e<l.length;e++){let n=i.toGlobalCoord(l[e].coord),r,a,o,d;i.isHorizontal()?(r=m,a=c.y,o=n-r,d=c.height,m=r+o):(r=c.x,a=m,o=c.width,d=n-a,m=a+d);let g=l[e-1].tickValue;g!=null&&f.set(g,p),t.add(new Uu({anid:g==null?null:`area_`+g,shape:{x:r,y:a,width:o,height:d},style:M({fill:s[p]},h),autoBatch:!0,silent:!0})),p=(p+1)%u}uP(e).splitAreaColors=f}function fP(e){uP(e).splitAreaColors=null}const pP=[`splitArea`,`splitLine`,`minorSplitLine`,`breakArea`];var mP=class e extends lP{constructor(...t){super(...t),this.type=e.type,this.axisPointerClass=`CartesianAxisPointer`}render(e,t,n,r){this.group.removeAll();let i=this._axisGroup;this._axisGroup=new q,this.group.add(this._axisGroup),ME(e)&&(this._axisGroup.add(e.axis.axisBuilder.group),P(pP,function(t){e.get([t,`show`])&&hP[t](this,this._axisGroup,e,e.getCoordSysModel(),n)},this),r&&r.type===`changeAxisOrder`&&r.isInitSort||km(i,this._axisGroup,e),super.render(e,t,n,r))}remove(){fP(this)}};mP.type=`cartesianAxis`;const hP={splitLine(e,t,n,r,i){let a=n.axis;if(a.scale.isBlank())return;let o=n.getModel(`splitLine`),s=o.getModel(`lineStyle`),c=s.get(`color`),l=o.get(`showMinLine`)!==!1,u=o.get(`showMaxLine`)!==!1;c=L(c)?c:[c];let d=r.coordinateSystem.getRect(),f=a.isHorizontal(),p=0,m=a.getTicksCoords({tickModel:o,breakTicks:`none`,pruneByBreak:`preserve_extent_bound`}),h=[],g=[],_=s.getLineStyle();for(let e=0;e<m.length;e++){let n=a.toGlobalCoord(m[e].coord);if(e===0&&!l||e===m.length-1&&!u)continue;let r=m[e].tickValue;f?(h[0]=n,h[1]=d.y,g[0]=n,g[1]=d.y+d.height):(h[0]=d.x,h[1]=n,g[0]=d.x+d.width,g[1]=n);let i=p++%c.length,o=new kp({anid:r==null?null:`line_`+r,autoBatch:!0,shape:{x1:h[0],y1:h[1],x2:g[0],y2:g[1]},style:M({stroke:c[i]},_),silent:!0});xm(o.shape,_.lineWidth),t.add(o)}},minorSplitLine(e,t,n,r,i){let a=n.axis,o=n.getModel(`minorSplitLine`).getModel(`lineStyle`),s=r.coordinateSystem.getRect(),c=a.isHorizontal(),l=a.getMinorTicksCoords();if(!l.length)return;let u=[],d=[],f=o.getLineStyle();for(let e=0;e<l.length;e++)for(let n=0;n<l[e].length;n++){let r=a.toGlobalCoord(l[e][n].coord);c?(u[0]=r,u[1]=s.y,d[0]=r,d[1]=s.y+s.height):(u[0]=s.x,u[1]=r,d[0]=s.x+s.width,d[1]=r);let i=new kp({anid:`minor_line_`+l[e][n].tickValue,autoBatch:!0,shape:{x1:u[0],y1:u[1],x2:d[0],y2:d[1]},style:f,silent:!0});xm(i.shape,f.lineWidth),t.add(i)}},splitArea(e,t,n,r,i){dP(e,t,n,r)},breakArea(e,t,n,r,i){let a=qA(),o=n.axis.scale;a&&o.type!==`ordinal`&&a.rectCoordBuildBreakAxis(t,e,n,r.coordinateSystem.getRect(),i)}};var gP=class e extends mP{constructor(...t){super(...t),this.type=e.type}};gP.type=`xAxis`;var _P=class extends mP{constructor(...e){super(...e),this.type=gP.type}};_P.type=`yAxis`;var vP=class extends Ib{constructor(...e){super(...e),this.type=`grid`}render(e,t){this.group.removeAll(),e.get(`show`)&&this.group.add(new Uu({shape:e.coordinateSystem.getRect(),style:M({fill:e.get(`backgroundColor`)},e.getItemStyle()),silent:!0,z2:-1}))}};vP.type=`grid`;const yP={offset:0};function bP(e){e.registerComponentView(vP),e.registerComponentModel($j),e.registerCoordinateSystem(`cartesian2d`,FN),DN(e,`x`,SN,yP),DN(e,`y`,SN,yP),e.registerComponentView(gP),e.registerComponentView(_P),e.registerPreprocessor(function(e){e.xAxis&&e.yAxis&&!e.grid&&(e.grid={})})}const xP=`single`,SP=`singleAxis`;var CP=class e extends b_{constructor(...t){super(...t),this.type=e.type}getCoordSysModel(){return this}};CP.type=SP,CP.layoutMode=`box`,CP.defaultOption={left:`5%`,top:`5%`,right:`5%`,bottom:`5%`,type:`value`,position:`bottom`,orient:`horizontal`,axisLine:{show:!0,lineStyle:{width:1,type:`solid`}},tooltip:{show:!0},axisTick:{show:!0,length:6,lineStyle:{width:1}},axisLabel:{show:!0,interval:`auto`},splitLine:{show:!0,lineStyle:{type:`dashed`,opacity:.2}},jitter:0,jitterOverlap:!0,jitterMargin:2},ae(CP,RE.prototype);function wP(e,t){let n=e.coordinateSystem,r=n&&n.type,i=n&&n.getBaseAxis&&n.getBaseAxis(),a=i&&i.scale&&i.scale.type,o=r===`cartesian2d`&&a===`ordinal`||r===`single`,s=t.model.get(`jitter`)>0;return o&&s}const TP=Y();function EP(e,t,n,r){if(e instanceof WA&&e.scale.type!==`ordinal`)return n;let i=e.model,a=i.get(`jitter`);if(!(a>0))return n;let o=i.get(`jitterOverlap`),s=i.get(`jitterMargin`)||0,c=WT(e.scale)?kO(e).w:null;return o?DP(n,a,c,r):OP(e,t,n,r,a,s)}function DP(e,t,n,r){if(n===null)return e+(Math.random()-.5)*t;let i=n-r*2,a=Math.min(Math.max(0,t),i);return e+(Math.random()-.5)*a}function OP(e,t,n,r,i,a){let o=TP(e);o.items||(o.items=[]);let s=o.items,c=kP(s,t,n,r,i,a,1),l=kP(s,t,n,r,i,a,-1),u=Math.abs(c-n)<Math.abs(l-n)?c:l,d=WT(e.scale)?kO(e).w:null,f=Math.abs(u-n);return f>i/2||d&&f>d/2-r?DP(n,i,d,r):(s.push({fixedCoord:t,floatCoord:u,r}),u)}function kP(e,t,n,r,i,a,o){let s=n;for(let c=0;c<e.length;c++){let l=e[c],u=t-l.fixedCoord,d=s-l.floatCoord,f=u*u+d*d,p=r+l.r+a;if(f<p*p){let e=l.floatCoord+Math.sqrt(p*p-u*u)*o;if(Math.abs(e-n)>i/2)return Number.MAX_VALUE;if(o===1&&e>s||o===-1&&e<s){s=e,c=-1;continue}}}return s}function AP(){return{seriesType:`scatter`,plan:Lb(),reset(e){let t=e.coordinateSystem;if(!t||t.type!==`cartesian2d`&&t.type!==`single`)return;let n=t.getBaseAxis&&t.getBaseAxis();if(!(n&&wP(e,n)))return;let r=n.dim,i=n.orient,a=i===`horizontal`&&n.type!==`category`||i===`vertical`&&n.type===`category`,o=r===`y`||r===`single`&&a,s=r===`x`||r===`single`&&!a;if(o||s)return{progress(e,t){let r=t.getLayout(`points`),i=!!r;typeof process<`u`&&process.env.NODE_ENV!==`production`&&i&&bc(t.getLayout(`pointsRange`),e);for(let a=e.start;a<e.end;a++){let c=i?(a-e.start)*2:-1,l=i?[r[c],r[c+1]]:t.getItemLayout(a);if(!l)continue;let u=t.getItemVisual(a,`symbolSize`),d=u instanceof Array?(u[1]+u[0])/2:u;if(o){let e=EP(n,l[0],l[1],d/2);i?r[c+1]=e:l[1]=e}else if(s){let e=EP(n,l[1],l[0],d/2);i?r[c]=e:l[0]=e}}}}}}}function jP(e){BD(bP),e.registerSeriesModel(gN),e.registerChartView(bN),e.registerLayout(zA(`scatter`))}function MP(e){e.registerLayout(e.PRIORITY.VISUAL.POST_CHART_LAYOUT,AP())}function NP(e){let t=e.polar;if(t){L(t)||(t=[t]);let n=[];P(t,function(t,r){t.indicator?(t.type&&!t.shape&&(t.shape=t.type),e.radar=e.radar||[],L(e.radar)||(e.radar=[e.radar]),e.radar.push(t)):n.push(t)}),e.polar=n}P(e.series,function(e){e&&e.type===`radar`&&e.polarIndex&&(e.radarIndex=e.polarIndex)})}const PP=`radar`;var FP=class e extends Db{constructor(...t){super(...t),this.type=e.type,this.hasSymbolVisual=!0}init(e){super.init.apply(this,arguments),this.legendVisualProvider=new YM(I(this.getData,this),I(this.getRawData,this))}getInitialData(e,t){return JM(this,{generateCoord:`indicator_`,generateCoordCount:1/0})}formatTooltip(e,t,n){let r=this.getData(),i=this.coordinateSystem.getIndicatorAxes(),a=this.getData().getName(e),o=a===``?this.name:a,s=vb(this,e);return ab(`section`,{header:o,sortBlocks:!0,blocks:F(i,t=>{let n=r.get(r.mapDimension(t.dim),e);return ab(`nameValue`,{markerType:`subItem`,markerColor:s,name:t.name,value:n,sortParam:n})})})}getTooltipPosition(e){if(e!=null){let t=this.getData(),n=this.coordinateSystem,r=t.getValues(F(n.dimensions,function(e){return t.mapDimension(e)}),e);for(let e=0,t=r.length;e<t;e++)if(!isNaN(r[e])){let t=n.getIndicatorAxes();return n.coordToPoint(t[e].dataToCoord(r[e]),e)}}}};FP.type=`series.radar`,FP.dependencies=[`radar`],FP.defaultOption={z:2,colorBy:`data`,coordinateSystem:`radar`,legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:`solid`,join:`round`},label:{position:`top`},symbolSize:8};var IP=class extends Vb{constructor(...e){super(...e),this.type=PP}render(e,t,n){let r=e.coordinateSystem,i=this.group,a=e.getData(),o=this._data;function s(e,t){let n=e.getItemVisual(t,`symbol`)||`circle`;if(n===`none`)return;let r=uS(e.getItemVisual(t,`symbolSize`)),i=lS(n,-1,-1,2,2),a=e.getItemVisual(t,`symbolRotate`)||0;return i.attr({style:{strokeNoScale:!0},z2:100,scaleX:r[0]/2,scaleY:r[1]/2,rotation:a*Math.PI/180||0}),i}function c(t,n,r,i,a,o){r.removeAll();for(let c=0;c<n.length-1;c++){let l=s(i,a);l&&(l.__dimIdx=c,t[c]?(l.setPosition(t[c]),cm[o?`initProps`:`updateProps`](l,{x:n[c][0],y:n[c][1]},e,a)):l.setPosition(n[c]),r.add(l))}}function l(e){return F(e,function(e){return[r.cx,r.cy]})}a.diff(o).add(function(t){let n=a.getItemLayout(t);if(!n)return;let r=new wp,i=new Ep,o={shape:{points:n}};r.shape.points=l(n),i.shape.points=l(n),tm(r,o,e,t),tm(i,o,e,t);let s=new q,u=new q;s.add(i),s.add(r),s.add(u),c(i.shape.points,n,u,a,t,!0),a.setItemGraphicEl(t,s)}).update(function(t,n){let r=o.getItemGraphicEl(n),i=r.childAt(0),s=r.childAt(1),l=r.childAt(2),u={shape:{points:a.getItemLayout(t)}};u.shape.points&&(c(i.shape.points,u.shape.points,l,a,t,!1),om(s),om(i),em(i,u,e),em(s,u,e),a.setItemGraphicEl(t,r))}).remove(function(e){i.remove(o.getItemGraphicEl(e))}).execute(),a.eachItemGraphicEl(function(e,t){let n=a.getItemModel(t),r=e.childAt(0),o=e.childAt(1),s=e.childAt(2),c=a.getItemVisual(t,`style`),l=c.fill;i.add(e),r.useStyle(M(n.getModel(`lineStyle`).getLineStyle(),{fill:`none`,stroke:l})),xf(r,n,`lineStyle`),xf(o,n,`areaStyle`);let u=n.getModel(`areaStyle`),d=u.isEmpty()&&u.parentModel.isEmpty();o.ignore=d,P([`emphasis`,`select`,`blur`],function(e){let t=n.getModel([e,`areaStyle`]),i=t.isEmpty()&&t.parentModel.isEmpty();o.ensureState(e).ignore=i&&d;let a=n.getModel([e,`lineStyle`]).getLineStyle();r.ensureState(e).style=a;let c=t.getAreaStyle();o.ensureState(e).style=c;let l=n.getModel([e,`itemStyle`]).getItemStyle();s.eachChild(function(t){t.ensureState(e).style=k(l)})}),o.useStyle(M(n.getModel(`areaStyle`).getAreaStyle(),{fill:l,opacity:.7,decal:c.decal}));let f=n.getModel(`emphasis`);s.eachChild(function(e){if(e instanceof Fu){let t=e.style;e.useStyle(j({image:t.image,x:t.x,y:t.y,width:t.width,height:t.height},c))}else e.useStyle(c),e.setColor(l),e.style.strokeNoScale=!0;let r=a.getStore().get(a.getDimensionIndex(e.__dimIdx),t);(r==null||isNaN(r))&&(r=``),ih(e,ah(n),{labelFetcher:a.hostModel,labelDataIndex:t,labelDimIndex:e.__dimIdx,defaultText:r,inheritColor:l,defaultOpacity:c.opacity})}),_f(e,f.get(`focus`),f.get(`blurScope`),f.get(`disabled`))}),this._data=a}remove(){this.group.removeAll(),this._data=null}};IP.type=PP;const LP=EN.value,RP=`radar`,zP=RP;function BP(e,t){return M({show:t},e)}var VP=class e extends b_{constructor(...t){super(...t),this.type=e.type}optionUpdated(){let e=this.get(`boundaryGap`),t=this.get(`splitNumber`),n=this.get(`clockwise`),r=this.get(`scale`),i=this.get(`axisLine`),a=this.get(`axisTick`),o=this.get(`axisLabel`),s=this.get(`axisName`),c=this.get([`axisName`,`show`]),l=this.get([`axisName`,`formatter`]),u=this.get(`axisNameGap`),d=this.get(`triggerEvent`),f=F(this.get(`indicator`)||[],function(f){f.max!=null&&f.max>0&&!f.min?f.min=0:f.min!=null&&f.min<0&&!f.max&&(f.max=0);let p=s;f.color!=null&&(p=M({color:f.color},s));let m=A(k(f),{boundaryGap:e,splitNumber:t,clockwise:n,scale:r,axisLine:i,axisTick:a,axisLabel:o,name:f.text,showName:c,nameLocation:`end`,nameGap:u,nameTextStyle:p,triggerEvent:d},!1);if(z(l)){let e=m.name;m.name=l.replace(`{value}`,e==null?``:e)}else R(l)&&(m.name=l(m.name,m));let h=new kh(m,null,this.ecModel);return ae(h,RE.prototype),h.mainType=`radar`,h.componentIndex=this.componentIndex,h.uid=jh(`ec_radar`),h},this);this._indicatorModels=f}getIndicatorModels(){return this._indicatorModels}};VP.type=zP,VP.defaultOption={z:0,center:[`50%`,`50%`],radius:`50%`,startAngle:90,clockwise:!1,axisName:{show:!0,color:Q.color.axisLabel},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:`polygon`,axisLine:A({lineStyle:{color:Q.color.neutral20}},LP.axisLine),axisLabel:BP(LP.axisLabel,!1),axisTick:BP(LP.axisTick,!1),splitLine:BP(LP.splitLine,!0),splitArea:BP(LP.splitArea,!0),indicator:[]};var HP=class e extends Ib{constructor(...t){super(...t),this.type=e.type}render(e,t,n){this.group.removeAll(),this._buildAxes(e,n),this._buildSplitLineAndArea(e)}_buildAxes(e,t){let n=e.coordinateSystem;P(F(n.getIndicatorAxes(),function(e){let r=e.model.get(`showName`)?e.name:``;return new pj(e.model,t,{axisName:r,position:[n.cx,n.cy],rotation:e.angle,labelDirection:-1,tickDirection:-1,nameDirection:1})}),function(e){e.build(),this.group.add(e.group)},this)}_buildSplitLineAndArea(e){let t=e.coordinateSystem,n=t.getIndicatorAxes();if(!n.length)return;let r=e.get(`shape`),i=e.getModel(`splitLine`),a=e.getModel(`splitArea`),o=i.getModel(`lineStyle`),s=a.getModel(`areaStyle`),c=i.get(`show`),l=a.get(`show`),u=o.get(`color`),d=s.get(`color`),f=L(u)?u:[u],p=L(d)?d:[d],m=[],h=[];function g(e,t,n){let r=n%t.length;return e[r]=e[r]||[],r}if(r===`circle`){let e=n[0].getTicksCoords(),r=t.cx,i=t.cy;for(let t=0;t<e.length;t++)c&&m[g(m,f,t)].push(new $f({shape:{cx:r,cy:i,r:e[t].coord}})),l&&t<e.length-1&&h[g(h,p,t)].push(new bp({shape:{cx:r,cy:i,r0:e[t].coord,r:e[t+1].coord}}))}else{let e,r=F(n,function(n,r){let i=n.getTicksCoords();return e=e==null?i.length-1:Math.min(i.length-1,e),F(i,function(e){return t.coordToPoint(e.coord,r)})}),i=[];for(let t=0;t<=e;t++){let e=[];for(let i=0;i<n.length;i++)e.push(r[i][t]);e[0]?e.push(e[0].slice()):typeof process<`u`&&process.env.NODE_ENV!==`production`&&console.error(`Can't draw value axis `+t),c&&m[g(m,f,t)].push(new Ep({shape:{points:e}})),l&&i&&h[g(h,p,t-1)].push(new wp({shape:{points:e.concat(i)}})),i=e.slice().reverse()}}let _=o.getLineStyle(),v=s.getAreaStyle();P(h,function(e,t){this.group.add(ym(e,{style:M({stroke:`none`,fill:p[t%p.length]},v),silent:!0}))},this),P(m,function(e,t){this.group.add(ym(e,{style:M({fill:`none`,stroke:f[t%f.length]},_),silent:!0}))},this)}};HP.type=`radar`;var UP=class extends NO{constructor(e,t,n){super(e,t,n),this.type=`value`,this.angle=0,this.name=``}},WP=class e{constructor(e,t,n){this.type=RP,this.dimensions=[],this._model=e,this._indicatorAxes=F(e.getIndicatorModels(),function(e,t){let n=`indicator_`+t,r=new UP(n,new tE);return r.name=e.get(`name`),r.model=e,e.axis=r,this.dimensions.push(n),r},this),this.resize(e,n)}getIndicatorAxes(){return this._indicatorAxes}dataToPoint(e,t){let n=this._indicatorAxes[t];return this.coordToPoint(n.dataToCoord(e),t)}coordToPoint(e,t){let n=this._indicatorAxes[t].angle;return[this.cx+e*Math.cos(n),this.cy-e*Math.sin(n)]}pointToData(e){let t=e[0]-this.cx,n=e[1]-this.cy,r=Math.sqrt(t*t+n*n);t/=r,n/=r;let i=Math.atan2(-n,t),a=1/0,o,s=-1;for(let e=0;e<this._indicatorAxes.length;e++){let t=this._indicatorAxes[e],n=Math.abs(i-t.angle);n<a&&(o=t,s=e,a=n)}return[s,+(o&&o.coordToData(r))]}resize(e,t){let n=d_(e,t).refContainer,r=e.get(`center`),i=e.get(`clockwise`)||!1,a=Math.min(n.width,n.height)/2;this.cx=J(r[0],n.width)+n.x,this.cy=J(r[1],n.height)+n.y,this.startAngle=e.get(`startAngle`)*Math.PI/180;let o=e.get(`radius`);(z(o)||me(o))&&(o=[0,o]),this.r0=J(o[0],a),this.r=J(o[1],a);let s=i?-1:1;P(this._indicatorAxes,function(e,t){e.setExtent(this.r0,this.r);let n=this.startAngle+s*t*Math.PI*2/this._indicatorAxes.length;n=Math.atan2(Math.sin(n),Math.cos(n)),e.angle=n},this)}update(e,t){let n=this._indicatorAxes,r=this._model,i=ZT(r.get(`splitNumber`),5),a=new tE;a.setExtent(0,i),a.setConfig({interval:1}),P(n,function(e){gD(e,1),NN(e,a)})}convertToPixel(e,t,n){return console.warn(`Not implemented.`),null}convertFromPixel(e,t,n){return console.warn(`Not implemented.`),null}containPoint(e){return console.warn(`Not implemented.`),!1}static create(t,n){let r=[];return t.eachComponent(zP,function(i){let a=new e(i,t,n);r.push(a),i.coordinateSystem=a}),t.eachSeriesByType(`radar`,function(e){if(e.get(`coordinateSystem`)===`radar`){let t=e.coordinateSystem=r[e.get(`radarIndex`)||0];t&&P(t.getIndicatorAxes(),function(t){rD(t,e,RP)})}}),r}};WP.dimensions=[];function GP(e){e.registerCoordinateSystem(`radar`,WP),e.registerComponentModel(VP),e.registerComponentView(HP),e.registerVisual({seriesType:`radar`,reset:function(e){let t=e.getData();t.each(function(e){t.setItemVisual(e,`legendIcon`,`roundRect`)}),t.setVisual(`legendIcon`,`roundRect`)}})}const KP=xc(PP,qP);function qP(e){e.eachSeriesByType(PP,function(e){let t=e.getData(),n=[],r=e.coordinateSystem;if(!r)return;let i=r.getIndicatorAxes();P(i,function(e,a){t.each(t.mapDimension(i[a].dim),function(e,t){n[t]=n[t]||[];let i=r.dataToPoint(e,a);n[t][a]=JP(i)?i:YP(r)})}),t.each(function(e){let i=le(n[e],function(e){return JP(e)})||YP(r);n[e].push(i.slice()),t.setItemLayout(e,n[e])})})}function JP(e){return!isNaN(e[0])&&!isNaN(e[1])}function YP(e){return[e.cx,e.cy]}function XP(e){BD(GP),e.registerChartView(IP),e.registerSeriesModel(FP),e.registerLayout(KP),e.registerProcessor(qM(`radar`)),e.registerPreprocessor(NP)}const ZP=Y();function QP(e,t,n){ZP(e)[t]=n}function $P(e,t,n){let r=ZP(e);r[t]===n&&(r[t]=null)}function eF(e,t){return!!ZP(e)[t]}_w({type:`takeGlobalCursor`,event:`globalCursorTaken`,update:`update`},Le);const tF={axisPointer:1,tooltip:1,brush:1};function nF(e,t,n){let r=t.getComponentByElement(e.topTarget);if(!r||r===n||tF.hasOwnProperty(r.mainType))return!1;let i=r.coordinateSystem;if(!i||i.model===n)return!1;let a=qm(r),o=qm(n);return!((a.zlevel-o.zlevel||a.z-o.z)<=0)}var rF=class extends mt{constructor(e){super(),this._zr=e;let t=I(this._mousedownHandler,this),n=I(this._mousemoveHandler,this),r=I(this._mouseupHandler,this),i=I(this._mousewheelHandler,this),a=I(this._pinchHandler,this);this.enable=function(o,s){let c=s.zInfo,{z:l,zlevel:u}=qm(c.component),d={component:c.component,z:l,zlevel:u,z2:V(c.z2,-1/0)},f=j({},s.triggerInfo);this._opt=M(j({},s),{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0,zInfoParsed:d,triggerInfo:f,cursorGrab:`grab`,cursorGrabbing:`grabbing`}),o==null&&(o=!0),(!this._enabled||this._controlType!==o)&&(this.disable(),this._enabled=!0,(o===!0||o===`move`||o===`pan`)&&(sF(e,`mousedown`,t,d),sF(e,`mousemove`,n,d),sF(e,`mouseup`,r,d)),(o===!0||o===`scale`||o===`zoom`)&&(sF(e,`mousewheel`,i,d),sF(e,`pinch`,a,d)))},this.disable=function(){this._enabled&&(this._enabled=!1,cF(e,`mousedown`,t),cF(e,`mousemove`,n),cF(e,`mouseup`,r),cF(e,`mousewheel`,i),cF(e,`pinch`,a))}}isDragging(){return this._dragging}isPinching(){return this._pinching}_checkPointer(e,t,n){let r=this._opt,i=r.zInfoParsed;if(nF(e,r.api,i.component))return!1;let a=r.triggerInfo,o=a.roamTrigger,s=!1;return o===`global`&&(s=!0),s||(s=a.isInSelf(e,t,n)),s&&a.isInClip&&!a.isInClip(e,t,n)&&(s=!1),s}_decideCursorStyle(e,t,n,r){let i=e.target;if(!i&&this._checkPointer(e,t,n))return this._opt.cursorGrab;if(r)return i&&i.cursor||`default`}dispose(){this.disable()}_mousedownHandler(e){if(Bt(e)||iF(e))return;let t=e.target;for(;t;){if(t.draggable)return;t=t.__hostTarget||t.parent}let n=e.offsetX,r=e.offsetY;this._checkPointer(e,n,r)&&(this._x=n,this._y=r,this._dragging=!0)}_mousemoveHandler(e){let t=this._zr;if(e.gestureEvent===`pinch`||eF(t,`globalPan`)||iF(e))return;let n=e.offsetX,r=e.offsetY;if(!this._dragging||!fF(`moveOnMouseMove`,e,this._opt)){let i=this._decideCursorStyle(e,n,r,!1);i&&t.setCursorStyle(i);return}t.setCursorStyle(this._opt.cursorGrabbing);let i=this._x,a=this._y,o=n-i,s=r-a;this._x=n,this._y=r,this._opt.preventDefaultMouseMove&&zt(e.event),e.__ecRoamConsumed=!0,dF(this,`pan`,`moveOnMouseMove`,e,{dx:o,dy:s,oldX:i,oldY:a,newX:n,newY:r,isAvailableBehavior:null})}_mouseupHandler(e){if(iF(e))return;let t=this._zr;if(!Bt(e)){this._dragging=!1;let n=this._decideCursorStyle(e,e.offsetX,e.offsetY,!0);n&&t.setCursorStyle(n)}}_mousewheelHandler(e){if(iF(e))return;let t=fF(`zoomOnMouseWheel`,e,this._opt),n=fF(`moveOnMouseWheel`,e,this._opt),r=e.wheelDelta,i=Math.abs(r),a=e.offsetX,o=e.offsetY;if(r!==0&&(t||n)){if(t){let t=i>3?1.4:i>1?1.2:1.1,n=r>0?t:1/t;this._checkTriggerMoveZoom(this,`zoom`,`zoomOnMouseWheel`,e,{scale:n,originX:a,originY:o,isAvailableBehavior:null})}if(n){let t=Math.abs(r),n=(r>0?1:-1)*(t>3?.4:t>1?.15:.05);this._checkTriggerMoveZoom(this,`scrollMove`,`moveOnMouseWheel`,e,{scrollDelta:n,originX:a,originY:o,isAvailableBehavior:null})}}}_pinchHandler(e){if(eF(this._zr,`globalPan`)||iF(e))return;let t=e.pinchScale>1?1.1:1/1.1;this._checkTriggerMoveZoom(this,`zoom`,null,e,{scale:t,originX:e.pinchX,originY:e.pinchY,isAvailableBehavior:null})}_checkTriggerMoveZoom(e,t,n,r,i){e._checkPointer(r,i.originX,i.originY)&&(zt(r.event),r.__ecRoamConsumed=!0,dF(e,t,n,r,i))}};function iF(e){return e.__ecRoamConsumed}const aF=Y();function oF(e){let t=aF(e);return t.roam=t.roam||{},t.uniform=t.uniform||{},t}function sF(e,t,n,r){let i=oF(e).roam,a=i[t]=i[t]||[],o=0;for(;o<a.length;o++){let e=a[o].zInfoParsed;if((e.zlevel-r.zlevel||e.z-r.z||e.z2-r.z2)<=0)break}a.splice(o,0,{listener:n,zInfoParsed:r}),lF(e,t)}function cF(e,t,n){let r=oF(e).roam[t]||[];for(let i=0;i<r.length;i++)if(r[i].listener===n){r.splice(i,1),r.length||uF(e,t);return}}function lF(e,t){let n=oF(e);n.uniform[t]||e.on(t,n.uniform[t]=function(e){let r=n.roam[t];if(r)for(let t=0;t<r.length;t++)r[t].listener(e)})}function uF(e,t){let n=oF(e).uniform;n[t]&&(e.off(t,n[t]),n[t]=null)}function dF(e,t,n,r,i){i.isAvailableBehavior=I(fF,null,n,r),e.trigger(t,i)}function fF(e,t,n){let r=n[e];return!e||r&&(!z(r)||t.event[r+`Key`])}function pF(e){z(e)&&(e=new DOMParser().parseFromString(e,`text/xml`));let t=e;for(t.nodeType===9&&(t=t.firstChild);t.nodeName.toLowerCase()!==`svg`||t.nodeType!==1;)t=t.nextSibling;return t}let mF;const hF={fill:`fill`,stroke:`stroke`,"stroke-width":`lineWidth`,opacity:`opacity`,"fill-opacity":`fillOpacity`,"stroke-opacity":`strokeOpacity`,"stroke-dasharray":`lineDash`,"stroke-dashoffset":`lineDashOffset`,"stroke-linecap":`lineCap`,"stroke-linejoin":`lineJoin`,"stroke-miterlimit":`miterLimit`,"font-family":`fontFamily`,"font-size":`fontSize`,"font-style":`fontStyle`,"font-weight":`fontWeight`,"text-anchor":`textAlign`,visibility:`visibility`,display:`display`},gF=ue(hF),_F={"alignment-baseline":`textBaseline`,"stop-color":`stopColor`},vF=ue(_F);var yF=class{constructor(){a(this,`_defs`,{}),a(this,`_root`,null)}parse(e,t){t=t||{};let n=pF(e);this._defsUsePending=[];let r=new q;this._root=r;let i=[],a=n.getAttribute(`viewBox`)||``,o=parseFloat(n.getAttribute(`width`)||t.width),s=parseFloat(n.getAttribute(`height`)||t.height);isNaN(o)&&(o=null),isNaN(s)&&(s=null),TF(n,r,null,!0,!1);let c=n.firstChild;for(;c;)this._parseNode(c,r,i,null,!1,!1),c=c.nextSibling;kF(this._defs,this._defsUsePending),this._defsUsePending=[];let l,u;if(a){let e=jF(a);e.length>=4&&(l={x:parseFloat(e[0]||0),y:parseFloat(e[1]||0),width:parseFloat(e[2]),height:parseFloat(e[3])})}if(l&&o!=null&&s!=null&&(u=RF(l,{x:0,y:0,width:o,height:s}),!t.ignoreViewBox)){let e=r;r=new q,r.add(e),e.scaleX=e.scaleY=u.scale,e.x=u.x,e.y=u.y}return!t.ignoreRootClip&&o!=null&&s!=null&&r.setClipPath(new Uu({shape:{x:0,y:0,width:o,height:s}})),{root:r,width:o,height:s,viewBoxRect:l,viewBoxTransform:u,named:i}}_parseNode(e,t,n,r,i,a){let o=e.nodeName.toLowerCase(),s,c=r;if(o===`defs`&&(i=!0),o===`text`&&(a=!0),o===`defs`||o===`switch`)s=t;else{if(!i){let i=mF[o];if(i&&W(mF,o)){s=i.call(this,e,t);let a=e.getAttribute(`name`);if(a){let e={name:a,namedFrom:null,svgNodeTagLower:o,el:s};n.push(e),o===`g`&&(c=e)}else r&&n.push({name:r.name,namedFrom:r,svgNodeTagLower:o,el:s});t.add(s)}}let a=bF[o];if(a&&W(bF,o)){let t=a.call(this,e),n=e.getAttribute(`id`);n&&(this._defs[n]=t)}}if(s&&s.isGroup){let t=e.firstChild;for(;t;)t.nodeType===1?this._parseNode(t,s,n,c,i,a):t.nodeType===3&&a&&this._parseText(t,s),t=t.nextSibling}}_parseText(e,t){let n=new ju({style:{text:e.textContent},silent:!0,x:this._textX||0,y:this._textY||0});CF(t,n),TF(e,n,this._defsUsePending,!1,!1),EF(n,t);let r=n.style,i=r.fontSize;i&&i<9&&(r.fontSize=9,n.scaleX*=i/9,n.scaleY*=i/9),r.font=(r.fontSize||r.fontFamily)&&[r.fontStyle,r.fontWeight,(r.fontSize||12)+`px`,r.fontFamily||`sans-serif`].join(` `);let a=n.getBoundingRect();return this._textX+=a.width,t.add(n),n}};a(yF,`internalField`,(function(){mF={g:function(e,t){let n=new q;return CF(t,n),TF(e,n,this._defsUsePending,!1,!1),n},rect:function(e,t){let n=new Uu;return CF(t,n),TF(e,n,this._defsUsePending,!1,!1),n.setShape({x:parseFloat(e.getAttribute(`x`)||`0`),y:parseFloat(e.getAttribute(`y`)||`0`),width:parseFloat(e.getAttribute(`width`)||`0`),height:parseFloat(e.getAttribute(`height`)||`0`)}),n.silent=!0,n},circle:function(e,t){let n=new $f;return CF(t,n),TF(e,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(e.getAttribute(`cx`)||`0`),cy:parseFloat(e.getAttribute(`cy`)||`0`),r:parseFloat(e.getAttribute(`r`)||`0`)}),n.silent=!0,n},line:function(e,t){let n=new kp;return CF(t,n),TF(e,n,this._defsUsePending,!1,!1),n.setShape({x1:parseFloat(e.getAttribute(`x1`)||`0`),y1:parseFloat(e.getAttribute(`y1`)||`0`),x2:parseFloat(e.getAttribute(`x2`)||`0`),y2:parseFloat(e.getAttribute(`y2`)||`0`)}),n.silent=!0,n},ellipse:function(e,t){let n=new tp;return CF(t,n),TF(e,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(e.getAttribute(`cx`)||`0`),cy:parseFloat(e.getAttribute(`cy`)||`0`),rx:parseFloat(e.getAttribute(`rx`)||`0`),ry:parseFloat(e.getAttribute(`ry`)||`0`)}),n.silent=!0,n},polygon:function(e,t){let n=e.getAttribute(`points`),r;n&&(r=wF(n));let i=new wp({shape:{points:r||[]},silent:!0});return CF(t,i),TF(e,i,this._defsUsePending,!1,!1),i},polyline:function(e,t){let n=e.getAttribute(`points`),r;n&&(r=wF(n));let i=new Ep({shape:{points:r||[]},silent:!0});return CF(t,i),TF(e,i,this._defsUsePending,!1,!1),i},image:function(e,t){let n=new Fu;return CF(t,n),TF(e,n,this._defsUsePending,!1,!1),n.setStyle({image:e.getAttribute(`xlink:href`)||e.getAttribute(`href`),x:+e.getAttribute(`x`),y:+e.getAttribute(`y`),width:+e.getAttribute(`width`),height:+e.getAttribute(`height`)}),n.silent=!0,n},text:function(e,t){let n=e.getAttribute(`x`)||`0`,r=e.getAttribute(`y`)||`0`,i=e.getAttribute(`dx`)||`0`,a=e.getAttribute(`dy`)||`0`;this._textX=parseFloat(n)+parseFloat(i),this._textY=parseFloat(r)+parseFloat(a);let o=new q;return CF(t,o),TF(e,o,this._defsUsePending,!1,!0),o},tspan:function(e,t){let n=e.getAttribute(`x`),r=e.getAttribute(`y`);n!=null&&(this._textX=parseFloat(n)),r!=null&&(this._textY=parseFloat(r));let i=e.getAttribute(`dx`)||`0`,a=e.getAttribute(`dy`)||`0`,o=new q;return CF(t,o),TF(e,o,this._defsUsePending,!1,!0),this._textX+=parseFloat(i),this._textY+=parseFloat(a),o},path:function(e,t){let n=Jf(e.getAttribute(`d`)||``);return CF(t,n),TF(e,n,this._defsUsePending,!1,!1),n.silent=!0,n}}})());const bF={lineargradient:function(e){let t=new Rp(parseInt(e.getAttribute(`x1`)||`0`,10),parseInt(e.getAttribute(`y1`)||`0`,10),parseInt(e.getAttribute(`x2`)||`10`,10),parseInt(e.getAttribute(`y2`)||`0`,10));return xF(e,t),SF(e,t),t},radialgradient:function(e){let t=new zp(parseInt(e.getAttribute(`cx`)||`0`,10),parseInt(e.getAttribute(`cy`)||`0`,10),parseInt(e.getAttribute(`r`)||`0`,10));return xF(e,t),SF(e,t),t}};function xF(e,t){e.getAttribute(`gradientUnits`)===`userSpaceOnUse`&&(t.global=!0)}function SF(e,t){let n=e.firstChild;for(;n;){if(n.nodeType===1&&n.nodeName.toLocaleLowerCase()===`stop`){let e=n.getAttribute(`offset`),r;r=e&&e.indexOf(`%`)>0?parseInt(e,10)/100:e?parseFloat(e):0;let i={};IF(n,i,i);let a=i.stopColor||n.getAttribute(`stop-color`)||`#000000`,o=i.stopOpacity||n.getAttribute(`stop-opacity`);if(o){let e=Ur(a);e&&e[3]&&(e[3]*=Fr(o),a=ei(e,`rgba`))}t.colorStops.push({offset:r,color:a})}n=n.nextSibling}}function CF(e,t){e&&e.__inheritedStyle&&(t.__inheritedStyle||(t.__inheritedStyle={}),M(t.__inheritedStyle,e.__inheritedStyle))}function wF(e){let t=jF(e),n=[];for(let e=0;e<t.length;e+=2){let r=parseFloat(t[e]),i=parseFloat(t[e+1]);n.push([r,i])}return n}function TF(e,t,n,r,i){let a=t,o=a.__inheritedStyle=a.__inheritedStyle||{},s={};e.nodeType===1&&(PF(e,t),IF(e,o,s),r||LF(e,o,s)),a.style=a.style||{},o.fill!=null&&(a.style.fill=OF(a,`fill`,o.fill,n)),o.stroke!=null&&(a.style.stroke=OF(a,`stroke`,o.stroke,n)),P([`lineWidth`,`opacity`,`fillOpacity`,`strokeOpacity`,`miterLimit`,`fontSize`],function(e){o[e]!=null&&(a.style[e]=parseFloat(o[e]))}),P([`lineDashOffset`,`lineCap`,`lineJoin`,`fontWeight`,`fontFamily`,`fontStyle`,`textAlign`],function(e){o[e]!=null&&(a.style[e]=o[e])}),i&&(a.__selfStyle=s),o.lineDash&&(a.style.lineDash=F(jF(o.lineDash),function(e){return parseFloat(e)})),(o.visibility===`hidden`||o.visibility===`collapse`)&&(a.invisible=!0),o.display===`none`&&(a.ignore=!0)}function EF(e,t){let n=t.__selfStyle;if(n){let t=n.textBaseline,r=t;!t||t===`auto`||t===`baseline`?r=`alphabetic`:t===`before-edge`||t===`text-before-edge`?r=`top`:t===`after-edge`||t===`text-after-edge`?r=`bottom`:(t===`central`||t===`mathematical`)&&(r=`middle`),e.style.textBaseline=r}let r=t.__inheritedStyle;if(r){let t=r.textAlign,n=t;t&&(t===`middle`&&(n=`center`),e.style.textAlign=n)}}const DF=/^url\(\s*#(.*?)\)/;function OF(e,t,n,r){let i=n&&n.match(DF);if(i){let n=Ee(i[1]);r.push([e,t,n])}else return n===`none`&&(n=null),n}function kF(e,t){for(let n=0;n<t.length;n++){let r=t[n];r[0].style[r[1]]=e[r[2]]}}const AF=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function jF(e){return e.match(AF)||[]}const MF=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.eE,]*)\)/g,NF=Math.PI/180;function PF(e,t){let n=e.getAttribute(`transform`);if(n){n=n.replace(/,/g,` `);let e=[],r=null;n.replace(MF,function(t,n,r){return e.push(n,r),``});for(let t=e.length-1;t>0;t-=2){let n=e[t],i=e[t-1],a=jF(n);switch(r=r||Kt(),i){case`translate`:Xt(r,r,[parseFloat(a[0]),parseFloat(a[1]||`0`)]);break;case`scale`:Qt(r,r,[parseFloat(a[0]),parseFloat(a[1]||a[0])]);break;case`rotate`:Zt(r,r,-parseFloat(a[0])*NF,[parseFloat(a[1]||`0`),parseFloat(a[2]||`0`)]);break;case`skewX`:let e=Math.tan(parseFloat(a[0])*NF);Yt(r,[1,0,e,1,0,0],r);break;case`skewY`:let t=Math.tan(parseFloat(a[0])*NF);Yt(r,[1,t,0,1,0,0],r);break;case`matrix`:r[0]=parseFloat(a[0]),r[1]=parseFloat(a[1]),r[2]=parseFloat(a[2]),r[3]=parseFloat(a[3]),r[4]=parseFloat(a[4]),r[5]=parseFloat(a[5])}}t.setLocalTransform(r)}}const FF=/([^\s:;]+)\s*:\s*([^:;]+)/g;function IF(e,t,n){let r=e.getAttribute(`style`);if(!r)return;FF.lastIndex=0;let i;for(;(i=FF.exec(r))!=null;){let e=i[1],r=W(hF,e)?hF[e]:null;r&&(t[r]=i[2]);let a=W(_F,e)?_F[e]:null;a&&(n[a]=i[2])}}function LF(e,t,n){for(let n=0;n<gF.length;n++){let r=gF[n],i=e.getAttribute(r);i!=null&&(t[hF[r]]=i)}for(let t=0;t<vF.length;t++){let r=vF[t],i=e.getAttribute(r);i!=null&&(n[_F[r]]=i)}}function RF(e,t){let n=t.width/e.width,r=t.height/e.height,i=Math.min(n,r);return{scale:i,x:-(e.x+e.width/2)*i+(t.x+t.width/2),y:-(e.y+e.height/2)*i+(t.y+t.height/2)}}function zF(e,t){return new yF().parse(e,t)}const BF=U([`rect`,`circle`,`line`,`ellipse`,`polygon`,`polyline`,`path`,`text`,`tspan`,`g`]);var VF=class{constructor(e,t){this.type=`geoSVG`,this._usedGraphicMap=U(),this._freedGraphics=[],this._mapName=e,this._parsedXML=pF(t)}load(){let e=this._firstGraphic;if(!e){e=this._firstGraphic=this._buildGraphic(this._parsedXML),this._freedGraphics.push(e),this._boundingRect=this._firstGraphic.boundingRect.clone();let{regions:t,regionsMap:n}=UF(e.named);this._regions=t,this._regionsMap=n}return{boundingRect:this._boundingRect,regions:this._regions,regionsMap:this._regionsMap}}_buildGraphic(e){let t,n;try{t=e&&zF(e,{ignoreViewBox:!0,ignoreRootClip:!0})||{},n=t.root,H(n!=null)}catch(e){throw Error(`Invalid svg format
32
+ `+e.message)}let r=new q;r.add(n),r.isGeoSVGGraphicRoot=!0;let i=t.width,a=t.height,o=t.viewBoxRect,s=this._boundingRect;if(!s){let e,t,r,c;if(i==null?o&&(e=o.x,r=o.width):(e=0,r=i),a==null?o&&(t=o.y,c=o.height):(t=0,c=a),e==null||t==null){let i=n.getBoundingRect();e==null&&(e=i.x,r=i.width),t==null&&(t=i.y,c=i.height)}s=this._boundingRect=new K(e,t,r,c)}if(o){let e=RF(o,s);n.scaleX=n.scaleY=e.scale,n.x=e.x,n.y=e.y}r.setClipPath(new Uu({shape:s.plain()}));let c=[];return P(t.named,e=>{BF.get(e.svgNodeTagLower)!=null&&(c.push(e),HF(e.el))}),{root:r,boundingRect:s,named:c}}useGraphic(e){let t=this._usedGraphicMap,n=t.get(e);return n||(n=this._freedGraphics.pop()||this._buildGraphic(this._parsedXML),t.set(e,n),n)}freeGraphic(e){let t=this._usedGraphicMap,n=t.get(e);n&&(t.removeKey(e),this._freedGraphics.push(n))}};function HF(e){e.silent=!1,e.isGroup&&e.traverse(e=>{e.silent=!1})}function UF(e){let t=[],n=U();return P(e,e=>{if(e.namedFrom!=null)return;let r=new ZD(e.name,e.el);t.push(r),n.set(e.name,r)}),{regions:t,regionsMap:n}}const WF=[126,25],GF=`南海诸岛`,KF=[[[0,3.5],[7,11.2],[15,11.9],[30,7],[42,.7],[52,.7],[56,7.7],[59,.7],[64,.7],[64,0],[5,0],[0,3.5]],[[13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]],[[12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]],[[16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]],[[6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]],[[23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]],[[37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]],[[48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]],[[51,35],[51,28.7],[53,28.7],[53,35],[51,35]],[[52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]],[[58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]],[[0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],[1,92.4],[1,3.5],[0,3.5]]];for(let e=0;e<KF.length;e++)for(let t=0;t<KF[e].length;t++)KF[e][t][0]/=10.5,KF[e][t][1]/=-14,KF[e][t][0]+=WF[0],KF[e][t][1]+=WF[1];function qF(e,t){if(e===`china`){for(let e=0;e<t.length;e++)if(t[e].name===GF)return;t.push(new XD(GF,F(KF,function(e){return{type:`polygon`,exterior:e}}),WF))}}const JF={南海诸岛:[32,80],广东:[0,-10],香港:[10,5],澳门:[-10,10],天津:[5,5]};function YF(e,t){if(e===`china`){let e=JF[t.name];if(e){let n=t.getCenter();n[0]+=e[0]/10.5,n[1]+=-e[1]/14,t.setCenter(n)}}}const XF=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]];function ZF(e,t){e===`china`&&t.name===`台湾`&&t.geometries.push({type:`polygon`,exterior:XF[0]})}var QF=class{constructor(e,t,n){this.type=`geoJSON`,this._parsedMap=U(),this._mapName=e,this._specialAreas=n,this._geoJSON=eI(t)}load(e,t){t=t||`name`;let n=this._parsedMap.get(t);if(!n){let e=this._parseToRegions(t);n=this._parsedMap.set(t,{regions:e,boundingRect:$F(e)})}let r=U(),i=[];return P(n.regions,function(t){let n=t.name;e&&W(e,n)&&(t=t.cloneShallow(n=e[n])),i.push(t),r.set(n,t)}),{regions:i,boundingRect:n.boundingRect||new K(0,0,0,0),regionsMap:r}}_parseToRegions(e){let t=this._mapName,n=this._geoJSON,r;try{r=n?tO(n,e):[]}catch(e){throw Error(`Invalid geoJson format
33
+ `+e.message)}return qF(t,r),P(r,function(e){let n=e.name;YF(t,e),ZF(t,e);let r=this._specialAreas&&this._specialAreas[n];r&&e.transformTo(r.left,r.top,r.width,r.height)},this),r}getMapForUser(){return{geoJson:this._geoJSON,geoJSON:this._geoJSON,specialAreas:this._specialAreas}}};function $F(e){let t;for(let n=0;n<e.length;n++){let r=e[n].getBoundingRect();t=t||r.clone(),t.union(r)}return t}function eI(e){return z(e)?typeof JSON<`u`&&JSON.parse?JSON.parse(e):Function(`return (`+e+`);`)():e}const tI=U();var nI={registerMap:function(e,t,n){if(t.svg){let n=new VF(e,t.svg);tI.set(e,n)}else{let r=t.geoJson||t.geoJSON;r&&!t.features?n=t.specialAreas:r=t;let i=new QF(e,r,n);tI.set(e,i)}},getGeoResource(e){return tI.get(e)},getMapForUser:function(e){let t=tI.get(e);return t&&t.type===`geoJSON`&&t.getMapForUser()},load:function(e,t,n){let r=tI.get(e);if(!r)typeof process<`u`&&process.env.NODE_ENV!==`production`&&console.error(`Map `+e+` not exists. The GeoJSON of the map must be provided.`);else return r.load(t,n)}};function rI(e){return e}var iI=class extends ya{constructor(e,t,n){super(),this.type=`view`,this.dimensions=[`x`,`y`];let r=rI(this);r.invertY=e,r.lgCt=t,r.lgGeo=n;let i=r.trans=[];i[0]=xa(),i[1]=xa(),i[2]=xa(),r.mtRaw=Kt(),r.mtRawInv=Kt(),r.mtOverall=Kt(),r.mtOverallInv=Kt(),r.zoom=1}getBoundingRect(){return cI(null,this)}getViewRect(){return lI(null,this)}getRoamTransform(){return ba(rI(this).trans[1])}dataToPoint(e,t,n){let r=t?rI(this).mtRaw:rI(this).mtOverall;return n=n||[],r?lt(n,e,r):He(n,e)}pointToData(e,t,n){n=n||[];let r=rI(this).mtOverallInv;return r?lt(n,e,r):He(n,e)}convertToPixel(e,t,n){let r=kI(t);return r===this?r.dataToPoint(n):null}convertFromPixel(e,t,n){let r=kI(t);return r===this?r.pointToData(n):null}containPoint(e){let t=rI(this);return _n(aI,t.dataRect),yn(aI,aI,t.mtOverall),bn(aI,e[0],e[1])}};iI.dimensions=[`x`,`y`];const aI=hn();function oI(e,t){return Jt(e||[],rI(t).mtOverall)}function sI(e){return rI(e).zoom}function cI(e,t){return _n(e||hn(),rI(t).dataRect)}function lI(e,t){return _n(e||hn(),rI(t).viewRect)}function uI(e,t,n){return Ca(e||xa(),rI(t).trans[n])}function dI(e){return!!(e.dataRect&&e.viewRect)}function fI(e,t,n,r){r===1?EI(e,t.trans[0],n):Ca(e,n)}function pI(e,t,n){ba(n,mI),Yt(mI,mI,t.mtRawInv),Qm(e,mI)}const mI=Kt();function hI(e,t){let n=rI(e);n.centerOption=t.getShallow(`center`);let r=n.zoomLimit=t.getShallow(`scaleLimit`);n.zoom=YI(t.getShallow(`zoom`)||1,r)||1,dI(n)&&vI(n)}function gI(e,t,n,r,i){let a=rI(e);a.dataRect=new K(t,n,r,i),dI(a)&&vI(a)}function _I(e,t,n,r,i){let a=rI(e);a.viewRect=new K(t,n,r,i),dI(a)&&vI(a)}function vI(e){yI(e),SI(e),wI(e)}function yI(e){let t=e.dataRect,n=e.viewRect,r=e.trans[0],i=e.invertY;i&&(t=_n(xI,t),t.y=-t.y-t.height),vn(bI,t,n),Qm(r,bI),i&&(r.scaleY=-r.scaleY);let a=ba(r,e.mtRaw);$t(e.mtRawInv,a)}const bI=Kt(),xI=hn();function SI(e){let t=AI(e),n=HI(CI,e,e.centerOption)?lt(CI,CI,e.mtRaw):t,r=e.zoom,i=e.trans[1];i.x=t[0]-r*n[0],i.y=t[1]-r*n[1],i.scaleX=i.scaleY=r}const CI=[];function wI(e){let t=e.trans,n=t[1],r=t[0],i=t[2];EI(i,r,n);let a=ba(i,e.mtOverall),o=$t(e.mtOverallInv,a);TI(e,i,a,o),TI(e.lgGeo,i,a,o)}function TI(e,t,n,r){e&&(Ca(e,t),Jt(e.transform||(e.transform=[]),n),Jt(e.invTransform||(e.invTransform=[]),r))}function EI(e,t,n){ba(t,DI),ba(n,OI),Yt(OI,OI,DI),Qm(e,OI)}const DI=Kt(),OI=Kt();function kI(e){let t=e.seriesModel;return t?t.coordinateSystem:null}function AI(e){let t=e.viewRect;return jI[0]=t.x+t.width/2,jI[1]=t.y+t.height/2,jI}const jI=[];function MI(e){return e&&e.type===`view`}function NI(e,t,n,r){let i=rI(n);i.syncBackEl=e,i.syncBackType=t,r?em(e,uI(null,n,t),r):(uI(e,n,t),e.dirty())}function PI(e,t,n,r){let i=rI(e),a=i.syncBackEl;a?(typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(i.syncBackType!=null),a.stopAnimation(),fI(FI,i,a,i.syncBackType)):Ca(FI,i.trans[2]),pI(II,i,FI),r?BI(FI,II,i,r):Ca(FI,II),pI(FI,i,FI),KI(i,t,n,FI)}const FI=xa(),II=xa();function LI(e,t,n){let r=RI(t);r&&(PI(r,t,n,e),hI(r,t))}function RI(e){return e.__ownRoamView?e.__ownRoamView():null}function zI(e,t,n,r){n.setUpdatePayload(Zm(e));let i=yd(r,t);i&&i.__updateOnOwnRoam&&i.__updateOnOwnRoam(e,t,r)}function BI(e,t,n,r){r.dx!=null&&r.dy!=null&&(e.x+=r.dx,e.y+=r.dy);let i=r.zoom;if(i!=null){let a=VI(t),o=YI(a*i,n.zoomLimit)/a;e.x-=(r.originX-e.x)*(o-1),e.y-=(r.originY-e.y)*(o-1),e.scaleX*=o,e.scaleY*=o}}function VI(e){return typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(xo(e.scaleX-e.scaleY)<1e-5),e.scaleX}function HI(e,t,n){typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(dI(t));let r=t.dataRect;if(!n)return!1;let i=t.lgCt;return i?We(e,J(n[0],i.w),J(n[1],i.h)):r&&We(e,J(n[0],r.width,r.x),J(n[1],r.height,r.y)),!0}function UI(e,t){let n=e.centerOption,r=e.dataRect;return typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(t&&r),!n||e.lgCt?t.slice():[WI(0,t,n,r),WI(1,t,n,r)]}function WI(e,t,n,r){return n&&r&&r[um[e]]&&No(n[e])?(t[e]-r[Z[e]])/r[um[e]]*100+`%`:t[e]}function GI(e,t){return t&&e&&e.getShallow(`legacyViewCoordSysCenterBase`)?{w:t.getWidth(),h:t.getHeight()}:null}function KI(e,t,n,r){let i=AI(e),a=VI(r),o=xo(a)>1e-6;qI[0]=o?(i[0]-r.x)/a:i[0],qI[1]=o?(i[1]-r.y)/a:i[1],lt(qI,qI,e.mtRawInv);let s=UI(e,qI);JI(t,s,a),P(n,function(e){e!==t&&JI(e,s.slice(),a)})}const qI=[];function JI(e,t,n){let r=e.option;r.center=t,r.zoom=n}function YI(e,t){if(t){let n=t.min||0,r=t.max||1/0;e=Math.max(Math.min(r,e),n)}return e}function XI(e,t){let n=t.getShallow(`nodeScaleRatio`,!0)||1,r=rI(e);return((r.zoom-1)*n+1)/(r.trans[2].scaleX||1)}function ZI(e,t,n,r,i,a,o,s){if(!RI(e)){n.disable();return}n.enable(V(e.get(`roam`),o),{api:t,zInfo:{component:e},triggerInfo:{roamTrigger:e.get(`roamTrigger`),isInSelf:r,isInClip:function(e,t,n){return!i||i.contain(t,n)}}});function c(n){let r=e.mainType,i=Zm(M({type:tL(r,e.subType,gd)},n));s&&(i.componentType=r),i[`${r}Id`]=e.id,t.dispatchAction(i)}n.off(`pan`).off(`zoom`).on(`pan`,function(e){a&&a(`pan`),c({dx:e.dx,dy:e.dy})}).on(`zoom`,function(e){a&&a(`zoom`),c({zoom:e.scale,originX:e.originX,originY:e.originY})})}function QI(e){return function(t,n,r){return $I.copy(e.getBoundingRect()),$I.applyTransform(e.getComputedTransform()),$I.contain(n,r)}}const $I=new K(0,0,0,0);function eL(e,t,n){let r=tL(t,n,gd);e.registerAction({type:r,event:r,update:`none`},function(e,r,i){r.eachComponent(Xs(e,t,n),function(t){LI(e,t),zI(e,t,r,i)})})}function tL(e,t,n){return(e===`series`?t===`map`?`geo`:t:e)+n}function nL(e){return e.zoom!=null}function rL(e,t,n,r,i,a,o){let s=new iI(null,GI(e.ecModel,t));return gI(s,n,r,i,a),o?_I(s,o.x,o.y,o.width,o.height):_I(s,n,r,i,a),hI(s,e),s}const iL=[`rect`,`circle`,`line`,`ellipse`,`polygon`,`polyline`,`path`],aL=U(iL),oL=U(iL.concat([`g`])),sL=U(iL.concat([`g`])),cL=Y();function lL(e){let t=e.getItemStyle(),n=e.get(`areaColor`);return n!=null&&(t.fill=n),t}function uL(e){let t=e.style;t&&(t.stroke=t.stroke||t.fill,t.fill=null)}var dL=class{constructor(e){let t=this.group=new q,n=this._transformGroup=new q;t.add(n),this.uid=jh(`ec_map_draw`),this._controller=new rF(e.getZr()),n.add(this._regionsGroup=new q),n.add(this._svgGroup=new q)}draw(e,t,n,r,i){let a=this,o=e.getData&&e.getData();vL(e)&&t.eachComponent({mainType:`series`,subType:`map`},function(t){!o&&t.getHostGeoModel()===e&&(o=t.getData())});let s=e.coordinateSystem,c=s.view,l=this._regionsGroup,u=this._transformGroup,d=!l.childAt(0)||i,f;s.shouldClip()?(f=lI(null,c),this.group.setClipPath(new Uu({shape:f.clone()}))):this.group.removeClipPath(),NI(u,1,c,d?null:e);let p=o&&o.getVisual(`visualMeta`)&&o.getVisual(`visualMeta`).length>0;s.resourceType===`geoJSON`?this._buildGeoJSON(c,n,s,e,o,p):s.resourceType===`geoSVG`&&this._buildSVG(c,n,s,e,o,p),ZI(e,n,this._controller,function(t,n,r){return e.coordinateSystem.containPoint([n,r])},f,function(){a._mouseDownFlag=!1},!1,!0),this._updateMapSelectHandler(e,l,n,r)}__updateOnOwnRoam(e){NI(this._transformGroup,1,e.coordinateSystem.view,null)}_buildGeoJSON(e,t,n,r,i,a){let o=this._regionsGroupByName=U(),s=U(),c=this._regionsGroup,l=n.projection,u=l&&l.stream,d=ba(uI(null,e,0));function f(e,t){return t&&(e=t(e)),e&&lt([],e,d)}function p(e){let t=[],n=!u&&l&&l.project;for(let r=0;r<e.length;++r){let i=f(e[r],n);i&&t.push(i)}return t}function m(e){return{shape:{points:p(e)}}}c.removeAll(),P(n.regions,function(e){let n=e.name,d=o.get(n),{dataIdx:p,regionModel:h}=s.get(n)||{};if(!d){d=o.set(n,new q),c.add(d),p=i?i.indexOfName(n):null,h=vL(r)?r.getRegionModel(n):i?i.getItemModel(p):null;let e=h.get(`silent`,!0);e!=null&&(d.silent=e),s.set(n,{dataIdx:p,regionModel:h})}let g=[],_=[];P(e.geometries,function(e){if(e.type===`polygon`){let t=[e.exterior].concat(e.interiors||[]);u&&(t=_L(t,u)),P(t,e=>{g.push(new wp(m(e)))})}else{let t=e.points;u&&(t=_L(t,u,!0)),P(t,e=>{_.push(new Ep(m(e)))})}});let v=f(e.getCenter(),l&&l.project);function y(e,o){if(!e.length)return;let s=new Ip({culling:!0,segmentIgnoreThreshold:1,shape:{paths:e}});d.add(s),fL(t,i,a,s,p,h),pL(r,i,s,n,h,p,v),o&&(uL(s),P(s.states,uL))}y(g),y(_,!0)}),o.each(function(e,t){let{dataIdx:n,regionModel:a}=s.get(t);mL(r,i,e,t,a,n),hL(r,i,e,t,a),gL(r,e,t,a)},this)}_buildSVG(e,t,n,r,i,a){let o=n.map;uI(this._svgGroup,e,0),this._svgResourceChanged(o)&&(this._freeSVG(),this._useSVG(o));let s=this._svgDispatcherMap=U(),c=!1;P(this._svgGraphicRecord.named,function(e){let n=e.name,o=e.svgNodeTagLower,l=e.el,u=i?i.indexOfName(n):null,d=r.getRegionModel(n);aL.get(o)!=null&&l instanceof yl&&fL(t,i,a,l,u,d),l instanceof yl&&(l.culling=!0);let f=d.get(`silent`,!0);f!=null&&(l.silent=f),l.z2EmphasisLift=0,e.namedFrom||(sL.get(o)!=null&&pL(r,i,l,n,d,u,null),mL(r,i,l,n,d,u),hL(r,i,l,n,d),oL.get(o)!=null&&(gL(r,l,n,d)===`self`&&(c=!0),(s.get(n)||s.set(n,[])).push(l)))},this),this._enableBlurEntireSVG(c,r)}_enableBlurEntireSVG(e,t){if(e&&vL(t)){let e=t.getModel([`blur`,`itemStyle`]).getItemStyle().opacity;this._svgGraphicRecord.root.traverse(t=>{if(!t.isGroup){Jd(t);let n=t.ensureState(`blur`).style||{};n.opacity==null&&e!=null&&(n.opacity=e),t.ensureState(`emphasis`)}})}}remove(){this._regionsGroup.removeAll(),this._regionsGroupByName=null,this._svgGroup.removeAll(),this._freeSVG(),this._controller.disable()}findHighDownDispatchers(e,t){if(e==null)return[];let n=t.coordinateSystem;if(n.resourceType===`geoJSON`){let t=this._regionsGroupByName;if(t){let n=t.get(e);return n?[n]:[]}}else if(n.resourceType===`geoSVG`)return this._svgDispatcherMap&&this._svgDispatcherMap.get(e)||[]}_svgResourceChanged(e){return this._svgMapName!==e}_useSVG(e){let t=nI.getGeoResource(e);if(t&&t.type===`geoSVG`){let n=t.useGraphic(this.uid);this._svgGroup.add(n.root),this._svgGraphicRecord=n,this._svgMapName=e}}_freeSVG(){let e=this._svgMapName;if(e==null)return;let t=nI.getGeoResource(e);t&&t.type===`geoSVG`&&t.freeGraphic(this.uid),this._svgGraphicRecord=null,this._svgDispatcherMap=null,this._svgGroup.removeAll(),this._svgMapName=null}resetForLabelLayout(){this.group.traverse(e=>{let t=e.getTextContent();t&&(t.ignore=cL(t).ignore)})}_updateMapSelectHandler(e,t,n,r){let i=this;t.off(`mousedown`),t.off(`click`),e.get(`selectedMode`)&&(t.on(`mousedown`,function(){i._mouseDownFlag=!0}),t.on(`click`,function(e){i._mouseDownFlag&&(i._mouseDownFlag=!1)}))}};function fL(e,t,n,r,i,a){let o=a.getModel(`itemStyle`),s=a.getModel([`emphasis`,`itemStyle`]),c=a.getModel([`blur`,`itemStyle`]),l=a.getModel([`select`,`itemStyle`]),u=lL(o),d=lL(s),f=lL(l),p=lL(c);if(t){let r=t.getItemVisual(i,`style`),a=t.getItemVisual(i,`decal`);n&&r.fill&&(u.fill=r.fill),a&&(u.decal=JS(a,e))}r.setStyle(u),r.style.strokeNoScale=!0,r.ensureState(`emphasis`).style=d,r.ensureState(`select`).style=f,r.ensureState(`blur`).style=p,Jd(r)}function pL(e,t,n,r,i,a,o){let s=t&&isNaN(t.get(t.mapDimension(`value`),a)),c=t&&t.getItemLayout(a);if(vL(e)||s||c&&c.showLabel){let s=vL(e)?r:a,c;(!t||a>=0)&&(c=e);let l=o?{normal:{align:`center`,verticalAlign:`middle`}}:null;ih(n,ah(i),{labelFetcher:c,labelDataIndex:s,defaultText:r},l);let u=n.getTextContent();if(u&&(cL(u).ignore=u.ignore,n.textConfig&&o)){let e=n.getBoundingRect().clone();n.textConfig.layoutRect=e,n.textConfig.position=[(o[0]-e.x)/e.width*100+`%`,(o[1]-e.y)/e.height*100+`%`]}n.disableLabelAnimation=!0}else n.removeTextContent(),n.removeTextConfig(),n.disableLabelAnimation=null}function mL(e,t,n,r,i,a){t?t.setItemGraphicEl(a,n):X(n).eventData={componentType:`geo`,componentIndex:e.componentIndex,geoIndex:e.componentIndex,name:r,region:i&&i.option||{}}}function hL(e,t,n,r,i){t||Bm({el:n,componentModel:e,itemName:r,itemTooltipOption:i.get(`tooltip`)})}function gL(e,t,n,r){t.highDownSilentOnTouch=!!e.get(`selectedMode`);let i=r.getModel(`emphasis`),a=i.get(`focus`);return _f(t,a,i.get(`blurScope`),i.get(`disabled`)),vL(e)&&wf(t,e,n),a}function _L(e,t,n){let r=[],i;function a(){i=[]}function o(){i.length&&(r.push(i),i=[])}let s=t({polygonStart:a,polygonEnd:o,lineStart:a,lineEnd:o,point(e,t){isFinite(e)&&isFinite(t)&&i.push([e,t])},sphere(){}});return!n&&s.polygonStart(),P(e,e=>{s.lineStart();for(let t=0;t<e.length;t++)s.point(e[t][0],e[t][1]);s.lineEnd()}),!n&&s.polygonEnd(),r}function vL(e){return e.mainType===`geo`}var yL=class e extends Db{constructor(...t){super(...t),this.type=e.type,this.getTooltipPosition=function(e){if(e!=null){let t=this.getData().getName(e),n=this.coordinateSystem,r=n.getRegion(t);return r&&n.dataToPoint(r.getCenter())}}}getInitialData(e){let t=JM(this,{coordDimensions:[`value`],encodeDefaulter:fe(M_,this)}),n=U(),r=[];for(let e=0,r=t.count();e<r;e++){let r=t.getName(e);n.set(r,e)}return P(nI.load(this.getMapType(),this.option.nameMap,this.option.nameProperty).regions,function(e){let i=e.name,a=n.get(i),o=e.properties&&e.properties.echartsStyle,s;a==null?(s={name:i},r.push(s)):s=t.getRawDataItem(a),o&&A(s,o)}),t.appendData(r),t}getHostGeoModel(){if(Zg(this).kind!==2)return this.getReferringComponents(`geo`,{useDefault:!1,enableAll:!1,enableNone:!1}).models[0]}getMapType(){return(this.getHostGeoModel()||this).option.map}getRawValue(e){let t=this.getData();return t.get(t.mapDimension(`value`),e)}getRegionModel(e){let t=this.getData();return t.getItemModel(t.indexOfName(e))}formatTooltip(e,t,n){let r=this.getData(),i=this.getRawValue(e),a=r.getName(e),o=[];return P(this.seriesGroup.f,function(e){let t=e.originalData.indexOfName(a),n=r.mapDimension(`value`);isNaN(e.originalData.get(n,t))||o.push(e.name)}),ab(`section`,{header:o.join(`, `),noHeader:!o.length,blocks:[ab(`nameValue`,{name:a,value:i})]})}getLegendIcon(e){let t=e.icon||`roundRect`,n=lS(t,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill);return n.setStyle(e.itemStyle),n.style.stroke=`none`,t.indexOf(`empty`)>-1&&(n.style.stroke=n.style.fill,n.style.fill=Q.color.neutral00,n.style.lineWidth=2),n}__ownRoamView(){return xL(this)?this.coordinateSystem.view:null}};yL.type=`series.map`,yL.dependencies=[`geo`],yL.layoutMode=`box`,yL.defaultOption={z:2,coordinateSystem:`geo`,map:``,left:`center`,top:`center`,aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:Q.color.tertiary},itemStyle:{borderWidth:.5,borderColor:Q.color.border,areaColor:Q.color.background},emphasis:{label:{show:!0,color:Q.color.primary},itemStyle:{areaColor:Q.color.highlight}},select:{label:{show:!0,color:Q.color.primary},itemStyle:{color:Q.color.highlight}},nameProperty:`name`};function bL(e){return e.indexOf(`i`)===0}function xL(e){return SL(e.seriesGroup)===e&&!e.getHostGeoModel()}function SL(e){return e.f[0]}function CL(e,t){let n={};return e.eachRawSeriesByType(`map`,function(r){let i=r.getHostGeoModel(),a=i?`o`+i.id:`i`+r.getMapType(),o=n[a]=n[a]||{f:[],r:[]};!e.isSeriesFiltered(r)&&!t&&o.f.push(r),o.r.push(r)}),n}var wL=class extends Vb{constructor(...e){super(...e),this.type=`map`}render(e,t,n,r){if(r&&r.type===`mapToggleSelect`&&r.from===this.uid)return;let i=this.group;if(i.removeAll(),e.getHostGeoModel())return;let a=this._mapDraw;a&&r&&r.type===`geoRoam`&&a.resetForLabelLayout(),r&&r.type===`geoRoam`&&r.componentType===`series`&&r.seriesId===e.id?a&&i.add(a.group):xL(e)?(a=a||(this._mapDraw=new dL(n)),i.add(a.group),a.draw(e,t,n,this,r)):this._clearMapDraw(),e.get(`showLegendSymbol`)&&t.getComponent(`legend`)&&this._renderSymbols(e)}__updateOnOwnRoam(e,t,n){let r=this._mapDraw;xL(t)&&r&&r.__updateOnOwnRoam(t)}remove(){this._clearMapDraw(),this.group.removeAll()}dispose(){this._clearMapDraw()}_clearMapDraw(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null}_renderSymbols(e){let t=e.originalData,n=this.group;t.each(t.mapDimension(`value`),function(r,i){if(isNaN(r))return;let a=t.getItemLayout(i);if(!a||!a.point)return;let o=a.point,s=a.offset,c=new $f({style:{fill:e.getData().getVisual(`style`).fill},shape:{cx:o[0]+s*9,cy:o[1],r:3},silent:!0,z2:8+(s?0:11)});if(!s){let n=SL(e.seriesGroup).getData(),r=t.getName(i),a=n.indexOfName(r),o=t.getItemModel(i),s=o.getModel(`label`),l=n.getItemGraphicEl(a);ih(c,ah(o),{labelFetcher:{getFormattedLabel(t,n){return e.getFormattedLabel(a,n)}},defaultText:r}),c.disableLabelAnimation=!0,s.get(`position`)||c.setTextConfig({position:`bottom`}),l.onHoverStateChange=function(e){Hd(c,e)}}n.add(c)})}};wL.type=`map`;const TL={geoJSON:{aspectScale:.75,invertLongitute:!0},geoSVG:{aspectScale:1,invertLongitute:!1}},EL=[`lng`,`lat`];var DL=class extends ya{constructor(e,t,n){super(),this.dimensions=EL,this.type=`geo`,this._nameCoordMap=U(),this.name=e;let r=n.projection,i=nI.load(t,n.nameMap,n.nameProperty),a=nI.getGeoResource(t),o=this.resourceType=a?a.type:null,s=this.regions=i.regions,c=TL[a.type];this._clip=n.clip;let l=!r&&c.invertLongitute;this.view=new iI(l,GI(n.ecModel,n.api),this),this.map=t,this._regionsMap=i.regionsMap,this.regions=i.regions,typeof process<`u`&&process.env.NODE_ENV!==`production`&&r&&(o===`geoSVG`&&(typeof process<`u`&&process.env.NODE_ENV!==`production`&&ds(`Map ${t} with SVG source can't use projection. Only GeoJSON source supports projection.`),r=null),r.project&&r.unproject||(typeof process<`u`&&process.env.NODE_ENV!==`production`&&ds(`project and unproject must be both provided in the projeciton.`),r=null)),this.projection=r;let u;if(r)for(let e=0;e<s.length;e++){let t=s[e].getBoundingRect(r);u=u||t.clone(),u.union(t)}else u=i.boundingRect;gI(this.view,u.x,u.y,u.width,u.height),this.aspectScale=r?1:V(n.aspectScale,c.aspectScale)}getRegion(e){return this._regionsMap.get(e)}getRegionByCoord(e){let t=this.regions;for(let n=0;n<t.length;n++){let r=t[n];if(r.type===`geoJSON`&&r.contain(e))return t[n]}}addGeoCoord(e,t){this._nameCoordMap.set(e,t)}getGeoCoord(e){let t=this._regionsMap.get(e);return this._nameCoordMap.get(e)||t&&t.getCenter()}dataToPoint(e,t,n){if(z(e)&&(e=this.getGeoCoord(e)),e){let r=this.projection;return r&&(e=r.project(e)),e&&this.view.dataToPoint(e,t,n)}}pointToData(e,t,n){let r=this.projection;return r&&(e=r.unproject(e)),e&&this.view.pointToData(e,n)}convertToPixel(e,t,n){let r=OL(t);return r===this?r.dataToPoint(n):null}convertFromPixel(e,t,n){let r=OL(t);return r===this?r.pointToData(n):null}containPoint(e){return this.view.containPoint(e)}getArea(e){e=e||0;let t=lI(null,this.view);return t.x-=e,t.y-=e,t.width+=2*e,t.height+=2*e,t}shouldClip(){return this._clip}getBoundingRect(){return this.view.getBoundingRect()}getViewRect(){return this.view.getViewRect()}getRoamTransform(){return this.view.getRoamTransform()}};function OL(e){let t=e.geoModel,n=e.seriesModel;return t?t.coordinateSystem:n?n.coordinateSystem||(n.getReferringComponents(`geo`,qs).models[0]||{}).coordinateSystem:null}function kL(e,t){let n=this.view,r=e.get(`boundingCoords`);if(r!=null){let e=r[0],t=r[1];if(!(isFinite(e[0])&&isFinite(e[1])&&isFinite(t[0])&&isFinite(t[1])))typeof process<`u`&&process.env.NODE_ENV!==`production`&&console.error(`Invalid boundingCoords`);else{let r=this.projection;if(r){let n=e[0],i=e[1],a=t[0],o=t[1];e=[1/0,1/0],t=[-1/0,-1/0];let s=(n,i,a,o)=>{let s=a-n,c=o-i;for(let a=0;a<=100;a++){let o=a/100,l=r.project([n+s*o,i+c*o]);ut(e,e,l),dt(t,t,l)}};s(n,i,a,i),s(a,i,a,o),s(a,o,n,o),s(n,o,a,i)}gI(n,e[0],e[1],t[0]-e[0],t[1]-e[1])}}let i=n.getBoundingRect(),a=e.get(`layoutCenter`),o=e.get(`layoutSize`),{refContainer:s}=d_(e,t),c=i.width/i.height*this.aspectScale,l=!1,u,d;a&&o&&(u=[J(a[0],s.width)+s.x,J(a[1],s.height)+s.y],d=J(o,Math.min(s.width,s.height)),!isNaN(u[0])&&!isNaN(u[1])&&!isNaN(d)?l=!0:typeof process<`u`&&process.env.NODE_ENV!==`production`&&console.warn(`Given layoutCenter or layoutSize data are invalid. Use left/top/width/height instead.`));let f;if(l)f={},c>1?(f.width=d,f.height=d/c):(f.height=d,f.width=d*c),f.y=u[1]-f.height/2,f.x=u[0]-f.width/2;else{let t=e.getBoxLayoutParams();t.aspect=c,f=c_(t,s),f=l_(e,f,c)}_I(n,f.x,f.y,f.width,f.height),hI(n,e)}function AL(e,t){P(t.get(`geoCoord`),function(t,n){e.addGeoCoord(n,t)})}const jL=new class{constructor(){this.dimensions=EL}create(e,t){let n=[];function r(e){return{nameProperty:e.get(`nameProperty`),aspectScale:e.get(`aspectScale`),projection:e.get(`projection`),clip:e.getShallow(`clip`,!0)}}return e.eachComponent(`geo`,function(i,a){let o=i.get(`map`),s=new DL(o+a,o,j({nameMap:i.get(`nameMap`),api:t,ecModel:e},r(i)));n.push(s),i.coordinateSystem=s,s.model=i,s.resize=kL,s.resize(i,t)}),e.eachSeries(function(e){Qg({targetModel:e,coordSysType:`geo`,coordSysProvider(){let t=e.subType===`map`?e.getHostGeoModel():e.getReferringComponents(`geo`,qs).models[0];return t&&t.coordinateSystem},allowNotFound:!0})}),P(CL(e,!0),function(i,a){if(!bL(a))return;let o=i.r[0],s=[];P(i.r,function(e){s.push(e.get(`nameMap`)),e.seriesGroup=null});let c=a.slice(1),l=new DL(c,c,j({nameMap:te(s),api:t,ecModel:e},r(o))),u;P(i.r,function(e){u=V(u,e.get(`scaleLimit`))}),n.push(l),l.resize=kL,l.resize(o,t),P(i.r,function(e){e.coordinateSystem=l,AL(l,e)})}),n}getFilledRegions(e,t,n,r){let i=(e||[]).slice(),a=U();for(let e=0;e<i.length;e++)a.set(i[e].name,i[e]);return P(nI.load(t,n,r).regions,function(e){let t=e.name,n=a.get(t),r=e.properties&&e.properties.echartsStyle;n||(n={name:t},i.push(n)),r&&A(n,r)}),i}};var ML=class e extends b_{constructor(...t){super(...t),this.type=e.type}init(e,t,n){this.mergeDefaultAndTheme(e,n);let r=nI.getGeoResource(e.map);if(r&&r.type===`geoJSON`){let t=e.itemStyle=e.itemStyle||{};`color`in t||(t.color=e.defaultItemStyleColor||Q.color.backgroundTint)}xs(e,`label`,[`show`])}optionUpdated(){let e=this.option;e.regions=jL.getFilledRegions(e.regions,e.map,e.nameMap,e.nameProperty);let t={};this._optionModelMap=se(e.regions||[],(e,n)=>{let r=n.name;return r&&(e.set(r,new kh(n,this,this.ecModel)),n.selected&&(t[r]=!0)),e},U()),e.selectedMap||(e.selectedMap=t)}getRegionModel(e){return this._optionModelMap.get(e)||new kh(null,this,this.ecModel)}getFormattedLabel(e,t){let n=this.getRegionModel(e),r=t===`normal`?n.get([`label`,`formatter`]):n.get([`emphasis`,`label`,`formatter`]),i={name:e};if(R(r))return i.status=t,r(i);if(z(r))return r.replace(`{a}`,e==null?``:e)}select(e){let t=this.option,n=t.selectedMode;if(!n)return;n!==`multiple`&&(t.selectedMap=null);let r=t.selectedMap||(t.selectedMap={});r[e]=!0}unSelect(e){let t=this.option.selectedMap;t&&(t[e]=!1)}toggleSelected(e){this[this.isSelected(e)?`unSelect`:`select`](e)}isSelected(e){let t=this.option.selectedMap;return!!(t&&t[e])}__ownRoamView(){return this.coordinateSystem.view}};ML.type=`geo`,ML.layoutMode=`box`,ML.defaultOption={z:0,show:!0,left:`center`,top:`center`,aspectScale:null,silent:!1,map:``,boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:Q.color.tertiary},itemStyle:{borderWidth:.5,borderColor:Q.color.border},emphasis:{label:{show:!0,color:Q.color.primary},itemStyle:{color:Q.color.highlight}},select:{label:{show:!0,color:Q.color.primary},itemStyle:{color:Q.color.highlight}},regions:[]};var NL=class e extends Ib{constructor(...t){super(...t),this.type=e.type,this.focusBlurEnabled=!0}init(e,t){this._api=t}render(e,t,n,r){if(this._model=e,!e.get(`show`)){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;return}this._mapDraw||(this._mapDraw=new dL(n));let i=this._mapDraw;i.draw(e,t,n,this,r),i.group.on(`click`,this._handleRegionClick,this),i.group.silent=e.get(`silent`),this.group.add(i.group),this.updateSelectStatus(e,t,n)}__updateOnOwnRoam(e,t,n){let r=this._mapDraw;r&&r.__updateOnOwnRoam(t)}_handleRegionClick(e){let t;Vx(e.target,e=>(t=X(e).eventData)!=null,!0),t&&this._api.dispatchAction({type:`geoToggleSelect`,geoId:this._model.id,name:t.name})}updateSelectStatus(e,t,n){this._mapDraw.group.traverse(e=>{let t=X(e).eventData;if(t)return this._model.isSelected(t.name)?n.enterSelect(e):n.leaveSelect(e),!0})}findHighDownDispatchers(e){return this._mapDraw&&this._mapDraw.findHighDownDispatchers(e,this._model)}dispose(){this._mapDraw&&this._mapDraw.remove()}};NL.type=`geo`;function PL(e,t,n){nI.registerMap(e,t,n)}function FL(e){e.registerCoordinateSystem(`geo`,jL),e.registerComponentModel(ML),e.registerComponentView(NL),e.registerImpl(`registerMap`,PL),e.registerImpl(`getMap`,e=>nI.getMapForUser(e));function t(t,n){n.update=`geo:updateSelectStatus`,e.registerAction(n,function(e,n){let r={},i=[];return n.eachComponent({mainType:`geo`,query:e},function(n){n[t](e.name);let a=n.coordinateSystem;P(a.regions,function(e){r[e.name]=n.isSelected(e.name)||!1});let o=[];P(r,function(e,t){r[t]&&o.push(t)}),i.push({geoIndex:n.componentIndex,name:o})}),{selected:r,allSelected:i,name:e.name}})}t(`toggleSelected`,{type:`geoToggleSelect`,event:`geoselectchanged`}),t(`select`,{type:`geoSelect`,event:`geoselected`}),t(`unSelect`,{type:`geoUnSelect`,event:`geounselected`}),e.registerAction({type:`geoRoam`,event:`geoRoam`,update:`updateTransform`},function(e,t,n){let r=e.componentType||(e.geoId!=null||e.geoName!=null||e.geoIndex!=null?`geo`:`series`),i=r===cd;if(r!==`geo`&&!i)return;let a=i?`map`:null;t.eachComponent(Xs(e,r,a),function(r){(!i||xL(r))&&(LI(e,r,i?r.seriesGroup.r:null),zI(e,r,t,n))})})}const IL=xc(`map`,LL);function LL(e){P(CL(e),function(t,n){if(!SL(t)||!bL(n))return;let r={};P(t.f,function(t){let n=t.coordinateSystem,i=t.originalData;t.get(`showLegendSymbol`)&&e.getComponent(`legend`)&&i.each(i.mapDimension(`value`),function(e,t){let a=i.getName(t),o=n.getRegion(a);if(!o||isNaN(e))return;let s=r[a]||0,c=n.dataToPoint(o.getCenter());r[a]=s+1,i.setItemLayout(t,{point:c,offset:s})})});let i=SL(t).getData();i.each(function(e){let t=i.getName(e),n=i.getItemLayout(e)||{};n.showLabel=!r[t],i.setItemLayout(e,n)})})}function RL(e,t){let n={};return P(e,function(e){e.each(e.mapDimension(`value`),function(t,r){let i=`ec-`+e.getName(r);n[i]=n[i]||[],isNaN(t)||n[i].push(t)})}),e[0].map(e[0].mapDimension(`value`),function(r,i){let a=`ec-`+e[0].getName(i),o=0,s=1/0,c=-1/0,l=n[a].length;for(let e=0;e<l;e++)s=Math.min(s,n[a][e]),c=Math.max(c,n[a][e]),o+=n[a][e];let u;return u=t===`min`?s:t===`max`?c:t===`average`?o/l:o,l===0?NaN:u})}const zL=xc(`map`,BL);function BL(e){P(CL(e),function(e){let t=SL(e);if(!t)return;let n=RL(F(e.f,function(e){return e.getData()}),t.get(`mapValueCalculation`));P(e.f,function(t){t.seriesGroup=e,t.originalData=t.getData(),t.setData(n.cloneShallow())})})}function VL(e){BD(FL),e.registerChartView(wL),e.registerSeriesModel(yL),e.registerLayout(IL),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,zL),Rx(`map`,e.registerAction)}function HL(e){let t=e;t.hierNode={defaultAncestor:null,ancestor:t,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};let n=[t],r,i;for(;r=n.pop();)if(i=r.children,r.isExpand&&i.length){let e=i.length;for(let t=e-1;t>=0;t--){let e=i[t];e.hierNode={defaultAncestor:null,ancestor:e,prelim:0,modifier:0,change:0,shift:0,i:t,thread:null},n.push(e)}}}function UL(e,t){let n=e.isExpand?e.children:[],r=e.parentNode.children,i=e.hierNode.i?r[e.hierNode.i-1]:null;if(n.length){qL(e);let r=(n[0].hierNode.prelim+n[n.length-1].hierNode.prelim)/2;i?(e.hierNode.prelim=i.hierNode.prelim+t(e,i),e.hierNode.modifier=e.hierNode.prelim-r):e.hierNode.prelim=r}else i&&(e.hierNode.prelim=i.hierNode.prelim+t(e,i));e.parentNode.hierNode.defaultAncestor=JL(e,i,e.parentNode.hierNode.defaultAncestor||r[0],t)}function WL(e){let t=e.hierNode.prelim+e.parentNode.hierNode.modifier;e.setLayout({x:t},!0),e.hierNode.modifier+=e.parentNode.hierNode.modifier}function GL(e){return arguments.length?e:$L}function KL(e,t){return e-=Math.PI/2,{x:t*Math.cos(e),y:t*Math.sin(e)}}function qL(e){let t=e.children,n=t.length,r=0,i=0;for(;--n>=0;){let e=t[n];e.hierNode.prelim+=r,e.hierNode.modifier+=r,i+=e.hierNode.change,r+=e.hierNode.shift+i}}function JL(e,t,n,r){if(t){let i=e,a=e,o=a.parentNode.children[0],s=t,c=i.hierNode.modifier,l=a.hierNode.modifier,u=o.hierNode.modifier,d=s.hierNode.modifier;for(;s=YL(s),a=XL(a),s&&a;){i=YL(i),o=XL(o),i.hierNode.ancestor=e;let t=s.hierNode.prelim+d-a.hierNode.prelim-l+r(s,a);t>0&&(QL(ZL(s,e,n),e,t),l+=t,c+=t),d+=s.hierNode.modifier,l+=a.hierNode.modifier,c+=i.hierNode.modifier,u+=o.hierNode.modifier}s&&!YL(i)&&(i.hierNode.thread=s,i.hierNode.modifier+=d-c),a&&!XL(o)&&(o.hierNode.thread=a,o.hierNode.modifier+=l-u,n=e)}return n}function YL(e){let t=e.children;return t.length&&e.isExpand?t[t.length-1]:e.hierNode.thread}function XL(e){let t=e.children;return t.length&&e.isExpand?t[0]:e.hierNode.thread}function ZL(e,t,n){return e.hierNode.ancestor.parentNode===t.parentNode?e.hierNode.ancestor:n}function QL(e,t,n){let r=n/(t.hierNode.i-e.hierNode.i);t.hierNode.change-=r,t.hierNode.shift+=n,t.hierNode.modifier+=n,t.hierNode.prelim+=n,e.hierNode.change+=r}function $L(e,t){return e.parentNode===t.parentNode?1:2}const eR=Y();function tR(e){let t=e.mainData,n=e.datas;n||(n={main:t},e.datasAttr={main:`data`}),e.datas=e.mainData=null,cR(t,n,e),P(n,function(n){P(t.TRANSFERABLE_METHODS,function(t){n.wrapMethod(t,fe(nR,e))})}),t.wrapMethod(`cloneShallow`,fe(iR,e)),P(t.CHANGABLE_METHODS,function(n){t.wrapMethod(n,fe(rR,e))}),H(n[t.dataType]===t)}function nR(e,t){if(sR(this)){let n=j({},eR(this).datas);n[this.dataType]=t,cR(t,n,e)}else lR(t,this.dataType,eR(this).mainData,e);return t}function rR(e,t){return e.struct&&e.struct.update(),t}function iR(e,t){return P(eR(t).datas,function(n,r){n!==t&&lR(n.cloneShallow(),r,t,e)}),t}function aR(e){let t=eR(this).mainData;return e==null||t==null?t:eR(t).datas[e]}function oR(){let e=eR(this).mainData;return e==null?[{data:e}]:F(ue(eR(e).datas),function(t){return{type:t,data:eR(e).datas[t]}})}function sR(e){return eR(e).mainData===e}function cR(e,t,n){eR(e).datas={},P(t,function(t,r){lR(t,r,e,n)})}function lR(e,t,n,r){eR(n).datas[t]=e,eR(e).mainData=n,e.dataType=t,r.struct&&(e[r.structAttr]=r.struct,r.struct[r.datasAttr[t]]=e),e.getLinkedData=aR,e.getLinkedDataAll=oR}var uR=class{constructor(e,t){this.depth=0,this.height=0,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.isExpand=!1,this.name=e||``,this.hostTree=t}isRemoved(){return this.dataIndex<0}eachNode(e,t,n){R(e)&&(n=t,t=e,e=null),e=e||{},z(e)&&(e={order:e});let r=e.order||`preorder`,i=this[e.attr||`children`],a;r===`preorder`&&(a=t.call(n,this));for(let r=0;!a&&r<i.length;r++)i[r].eachNode(e,t,n);r===`postorder`&&t.call(n,this)}updateDepthAndHeight(e){let t=0;this.depth=e;for(let n=0;n<this.children.length;n++){let r=this.children[n];r.updateDepthAndHeight(e+1),r.height>t&&(t=r.height)}this.height=t+1}getNodeById(e){if(this.getId()===e)return this;for(let t=0,n=this.children,r=n.length;t<r;t++){let r=n[t].getNodeById(e);if(r)return r}}contains(e){if(e===this)return!0;for(let t=0,n=this.children,r=n.length;t<r;t++){let r=n[t].contains(e);if(r)return r}}getAncestors(e){let t=[],n=e?this:this.parentNode;for(;n;)t.push(n),n=n.parentNode;return t.reverse(),t}getAncestorsIndices(){let e=[],t=this;for(;t;)e.push(t.dataIndex),t=t.parentNode;return e.reverse(),e}getDescendantIndices(){let e=[];return this.eachNode(t=>{e.push(t.dataIndex)}),e}getValue(e){let t=this.hostTree.data;return t.getStore().get(t.getDimensionIndex(e||`value`),this.dataIndex)}setLayout(e,t){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,t)}getLayout(){return this.hostTree.data.getItemLayout(this.dataIndex)}getModel(e){if(!(this.dataIndex<0))return this.hostTree.data.getItemModel(this.dataIndex).getModel(e)}getLevelModel(){return(this.hostTree.levelModels||[])[this.depth]}setVisual(e,t){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,t)}getVisual(e){return this.hostTree.data.getItemVisual(this.dataIndex,e)}getRawIndex(){return this.hostTree.data.getRawIndex(this.dataIndex)}getId(){return this.hostTree.data.getId(this.dataIndex)}getChildIndex(){if(this.parentNode){let e=this.parentNode.children;for(let t=0;t<e.length;++t)if(e[t]===this)return t;return-1}return-1}isAncestorOf(e){let t=e.parentNode;for(;t;){if(t===this)return!0;t=t.parentNode}return!1}isDescendantOf(e){return e!==this&&e.isAncestorOf(this)}},dR=class e{constructor(e){this.type=`tree`,this._nodes=[],this.hostModel=e}eachNode(e,t,n){this.root.eachNode(e,t,n)}getNodeByDataIndex(e){let t=this.data.getRawIndex(e);return this._nodes[t]}getNodeById(e){return this.root.getNodeById(e)}update(){let e=this.data,t=this._nodes;for(let e=0,n=t.length;e<n;e++)t[e].dataIndex=-1;for(let n=0,r=e.count();n<r;n++)t[e.getRawIndex(n)].dataIndex=n}clearLayouts(){this.data.clearItemLayouts()}static createTree(t,n,r){let i=new e(n),a=[],o=1;s(t);function s(e,t){let n=e.value;o=Math.max(o,L(n)?n.length:1),a.push(e);let r=new uR(Ps(e.name,``),i);t?fR(r,t):i.root=r,i._nodes.push(r);let c=e.children;if(c)for(let e=0;e<c.length;e++)s(c[e],r)}i.root.updateDepthAndHeight(0);let{dimensions:c}=lT(a,{coordDimensions:[`value`],dimensionsCount:o}),l=new sT(c,n);return l.initData(a),r&&r(l),tR({mainData:l,struct:i,structAttr:`tree`}),i.update(),i}};function fR(e,t){let n=t.children;e.parentNode!==t&&(n.push(e),e.parentNode=t)}function pR(e,t,n){if(e&&N(t,e.type)>=0){let t=n.getData().tree.root,r=e.targetNode;if(z(r)&&(r=t.getNodeById(r)),r&&t.contains(r))return{node:r};let i=e.targetNodeId;if(i!=null&&(r=t.getNodeById(i)))return{node:r}}}function mR(e){let t=[];for(;e;)e=e.parentNode,e&&t.push(e);return t.reverse()}function hR(e,t){return N(mR(e),t)>=0}function gR(e,t){let n=[];for(;e;){let r=e.dataIndex;n.push({name:e.name,dataIndex:r,value:t.getRawValue(r)}),e=e.parentNode}return n.reverse(),n}const _R=`tree`;var vR=class e extends Db{constructor(...t){super(...t),this.type=e.type,this.hasSymbolVisual=!0,this.ignoreStyleOnData=!0}getInitialData(e){let t={name:e.name,children:e.data},n=new kh(e.leaves||{},this,this.ecModel),r=dR.createTree(t,this,i);function i(e){e.wrapMethod(`getItemModel`,function(e,t){let i=r.getNodeByDataIndex(t);return i&&i.children.length&&i.isExpand||(e.parentModel=n),e})}let a=0;r.eachNode(`preorder`,function(e){e.depth>a&&(a=e.depth)});let o=e.expandAndCollapse&&e.initialTreeDepth>=0?e.initialTreeDepth:a;return r.root.eachNode(`preorder`,function(e){let t=e.hostTree.data.getRawDataItem(e.dataIndex);e.isExpand=t&&t.collapsed!=null?!t.collapsed:e.depth<=o}),r.data}getOrient(){let e=this.get(`orient`);return e===`horizontal`?e=`LR`:e===`vertical`&&(e=`TB`),e}formatTooltip(e,t,n){let r=this.getData().tree,i=r.root.children[0],a=r.getNodeByDataIndex(e),o=a.getValue(),s=a.name;for(;a&&a!==i;)s=a.parentNode.name+`.`+s,a=a.parentNode;return ab(`nameValue`,{name:s,value:o,noValue:isNaN(o)||o==null})}getDataParams(e){let t=super.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(e);return t.treeAncestors=gR(n,this),t.collapsed=!n.isExpand,t}__ownRoamView(){return this.coordinateSystem}};vR.type=`series.tree`,vR.layoutMode=`box`,vR.defaultOption={z:2,coordinateSystemUsage:`box`,left:`12%`,top:`12%`,right:`12%`,bottom:`12%`,layout:`orthogonal`,edgeShape:`curve`,edgeForkPosition:`50%`,roam:!1,roamTrigger:`global`,nodeScaleRatio:.4,center:null,zoom:1,orient:`LR`,symbol:`emptyCircle`,symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:Q.color.borderTint,width:1.5,curveness:.5},itemStyle:{color:`lightsteelblue`,borderWidth:1.5},label:{show:!0},animationEasing:`linear`,animationDuration:700,animationDurationUpdate:500};var yR=class{constructor(){this.parentPoint=[],this.childPoints=[]}},bR=class extends Ou{constructor(e){super(e)}getDefaultStyle(){return{stroke:Q.color.neutral99,fill:null}}getDefaultShape(){return new yR}buildPath(e,t){let n=t.childPoints,r=n.length,i=t.parentPoint,a=n[0],o=n[r-1];if(r===1){e.moveTo(i[0],i[1]),e.lineTo(a[0],a[1]);return}let s=t.orient,c=s===`TB`||s===`BT`?0:1,l=1-c,u=J(t.forkPosition,1),d=[];d[c]=i[c],d[l]=i[l]+(o[l]-i[l])*u,e.moveTo(i[0],i[1]),e.lineTo(d[0],d[1]),e.moveTo(a[0],a[1]),d[c]=a[c],e.lineTo(d[0],d[1]),d[c]=o[c],e.lineTo(d[0],d[1]),e.lineTo(o[0],o[1]);for(let t=1;t<r-1;t++){let r=n[t];e.moveTo(r[0],r[1]),d[c]=r[c],e.lineTo(d[0],d[1])}}},xR=class extends Vb{constructor(...e){super(...e),this.type=_R,this._mainGroup=new q}init(e,t){this._controller=new rF(t.getZr()),this.group.add(this._mainGroup),this._firstRender=!0}render(e,t,n){let r=e.getData(),i=e.layoutInfo,a=this._mainGroup;e.get(`layout`)===`radial`?(a.x=i.x+i.width/2,a.y=i.y+i.height/2):(a.x=i.x,a.y=i.y),this._updateViewCoordSys(e,n),ZI(e,n,this._controller,QI(this.group),null);let o=this._data;r.diff(o).add(function(t){SR(r,t)&&CR(r,t,null,a,e)}).update(function(t,n){let i=o.getItemGraphicEl(n);SR(r,t)?CR(r,t,i,a,e):i&&DR(o,n,i,a,e)}).remove(function(t){let n=o.getItemGraphicEl(t);n&&DR(o,t,n,a,e)}).execute(),this._updateNodeAndLinkScale(e),e.get(`expandAndCollapse`)===!0&&r.eachItemGraphicEl(function(t,r){t.off(`click`).on(`click`,function(){n.dispatchAction({type:`treeExpandAndCollapse`,seriesId:e.id,dataIndex:r})})}),this._data=r,this._firstRender=!1}__updateOnOwnRoam(e,t,n){NI(this.group,2,t.coordinateSystem,null),nL(e)&&this._updateNodeAndLinkScale(t)}_updateViewCoordSys(e,t){let n=e.getData(),r=[];n.each(function(e){let t=n.getItemLayout(e);t&&!isNaN(t.x)&&!isNaN(t.y)&&r.push([+t.x,+t.y])});let i=[],a=[];jl(r,i,a);let o=this._min,s=this._max;a[0]-i[0]===0&&(i[0]=o?o[0]:i[0]-1,a[0]=s?s[0]:a[0]+1),a[1]-i[1]===0&&(i[1]=o?o[1]:i[1]-1,a[1]=s?s[1]:a[1]+1);let c=e.coordinateSystem=rL(e,t,i[0],i[1],a[0]-i[0],a[1]-i[1]);NI(this.group,2,c,this._firstRender?null:e),this._min=i,this._max=a}_updateNodeAndLinkScale(e){let t=e.getData(),n=XI(e.coordinateSystem,e);t.eachItemGraphicEl(function(e,t){e.setSymbolScale(n)})}dispose(){this._controller&&this._controller.dispose()}remove(){this._mainGroup.removeAll(),this._data=null}};xR.type=_R;function SR(e,t){let n=e.getItemLayout(t);return n&&!isNaN(n.x)&&!isNaN(n.y)}function CR(e,t,n,r,i){let a=!n,o=e.tree.getNodeByDataIndex(t),s=o.getModel(),c=o.getVisual(`style`).fill,l=o.isExpand===!1&&o.children.length!==0?c:Q.color.neutral00,u=e.tree.root,d=o.parentNode===u?o:o.parentNode||o,f=e.getItemGraphicEl(d.dataIndex),p=d.getLayout(),m=f?{x:f.__oldX,y:f.__oldY,rawX:f.__radialOldRawX,rawY:f.__radialOldRawY}:p,h=o.getLayout();a?(n=new Rk(e,t,null,{symbolInnerColor:l,useNameLabel:!0}),n.x=m.x,n.y=m.y):n.updateData(e,t,null,{symbolInnerColor:l,useNameLabel:!0}),n.__radialOldRawX=n.__radialRawX,n.__radialOldRawY=n.__radialRawY,n.__radialRawX=h.rawX,n.__radialRawY=h.rawY,r.add(n),e.setItemGraphicEl(t,n),n.__oldX=n.x,n.__oldY=n.y,em(n,{x:h.x,y:h.y},i);let g=n.getSymbolPath();if(i.get(`layout`)===`radial`){let e=u.children[0],t=e.getLayout(),n=e.children.length,r,i;if(h.x===t.x&&o.isExpand===!0&&e.children.length){let a={x:(e.children[0].getLayout().x+e.children[n-1].getLayout().x)/2,y:(e.children[0].getLayout().y+e.children[n-1].getLayout().y)/2};r=Math.atan2(a.y-t.y,a.x-t.x),r<0&&(r=Math.PI*2+r),i=a.x<t.x,i&&(r-=Math.PI)}else r=Math.atan2(h.y-t.y,h.x-t.x),r<0&&(r=Math.PI*2+r),o.children.length===0||o.children.length!==0&&o.isExpand===!1?(i=h.x<t.x,i&&(r-=Math.PI)):(i=h.x>t.x,i||(r-=Math.PI));let a=i?`left`:`right`,c=s.getModel(`label`),l=c.get(`rotate`),d=Math.PI/180*l,f=g.getTextContent();f&&(g.setTextConfig({position:c.get(`position`)||a,rotation:l==null?-r:d,origin:`center`}),f.setStyle(`verticalAlign`,`middle`))}let _=s.get([`emphasis`,`focus`]),v=_===`relative`?Pe(o.getAncestorsIndices(),o.getDescendantIndices()):_===`ancestor`?o.getAncestorsIndices():_===`descendant`?o.getDescendantIndices():null;v&&(X(n).focus=v),wR(i,o,u,n,m,p,h,r),n.__edge&&(n.onHoverStateChange=function(t){if(t!==`blur`){let r=o.parentNode&&e.getItemGraphicEl(o.parentNode.dataIndex);r&&r.hoverState===1||Hd(n.__edge,t)}})}function wR(e,t,n,r,i,a,o,s){let c=t.getModel(),l=e.get(`edgeShape`),u=e.get(`layout`),d=e.getOrient(),f=e.get([`lineStyle`,`curveness`]),p=e.get(`edgeForkPosition`),m=c.getModel(`lineStyle`).getLineStyle(),h=r.__edge;if(l===`curve`)t.parentNode&&t.parentNode!==n&&(h||(h=r.__edge=new Np({shape:OR(u,d,f,i,i)})),em(h,{shape:OR(u,d,f,a,o)},e));else if(l===`polyline`){if(u===`orthogonal`){if(t!==n&&t.children&&t.children.length!==0&&t.isExpand===!0){let n=t.children,i=[];for(let e=0;e<n.length;e++){let t=n[e].getLayout();i.push([t.x,t.y])}h||(h=r.__edge=new bR({shape:{parentPoint:[o.x,o.y],childPoints:[[o.x,o.y]],orient:d,forkPosition:p}})),em(h,{shape:{parentPoint:[o.x,o.y],childPoints:i}},e)}}else if(typeof process<`u`&&process.env.NODE_ENV!==`production`)throw Error(`The polyline edgeShape can only be used in orthogonal layout`)}h&&(l!==`polyline`||t.isExpand)&&(h.useStyle(M({strokeNoScale:!0,fill:null},m)),xf(h,c,`lineStyle`),Jd(h),s.add(h))}function TR(e,t,n,r,i){let a=t.tree.root,{source:o,sourceLayout:s}=ER(a,e),c=t.getItemGraphicEl(e.dataIndex);if(!c)return;let l=t.getItemGraphicEl(o.dataIndex).__edge,u=c.__edge||(o.isExpand===!1||o.children.length===1?l:void 0),d=r.get(`edgeShape`),f=r.get(`layout`),p=r.get(`orient`),m=r.get([`lineStyle`,`curveness`]);u&&(d===`curve`?rm(u,{shape:OR(f,p,m,s,s),style:{opacity:0}},r,{cb(){n.remove(u)},removeOpt:i}):d===`polyline`&&r.get(`layout`)===`orthogonal`&&rm(u,{shape:{parentPoint:[s.x,s.y],childPoints:[[s.x,s.y]]},style:{opacity:0}},r,{cb(){n.remove(u)},removeOpt:i}))}function ER(e,t){let n=t.parentNode===e?t:t.parentNode||t,r;for(;r=n.getLayout(),r==null;)n=n.parentNode===e?n:n.parentNode||n;return{source:n,sourceLayout:r}}function DR(e,t,n,r,i){let a=e.tree.getNodeByDataIndex(t),o=e.tree.root,{sourceLayout:s}=ER(o,a),c={duration:i.get(`animationDurationUpdate`),easing:i.get(`animationEasingUpdate`)};rm(n,{x:s.x+1,y:s.y+1},i,{cb(){r.remove(n),e.setItemGraphicEl(t,null)},removeOpt:c}),n.fadeOut(null,e.hostModel,{fadeLabel:!0,animation:c}),P(a.children,function(t){TR(t,e,r,i,c)}),TR(a,e,r,i,c)}function OR(e,t,n,r,i){let a,o,s,c,l,u,d,f;if(e===`radial`){l=r.rawX,d=r.rawY,u=i.rawX,f=i.rawY;let e=KL(l,d),t=KL(l,d+(f-d)*n),a=KL(u,f+(d-f)*n),o=KL(u,f);return{x1:e.x||0,y1:e.y||0,x2:o.x||0,y2:o.y||0,cpx1:t.x||0,cpy1:t.y||0,cpx2:a.x||0,cpy2:a.y||0}}return l=r.x,d=r.y,u=i.x,f=i.y,(t===`LR`||t===`RL`)&&(a=l+(u-l)*n,o=d,s=u+(l-u)*n,c=f),(t===`TB`||t===`BT`)&&(a=l,o=d+(f-d)*n,s=u,c=f+(d-f)*n),{x1:l,y1:d,x2:u,y2:f,cpx1:a,cpy1:o,cpx2:s,cpy2:c}}function kR(e,t,n){let r=[e],i=[],a;for(;a=r.pop();)if(i.push(a),a.isExpand){let e=a.children;if(e.length)for(let t=0;t<e.length;t++)r.push(e[t])}for(;a=i.pop();)t(a,n)}function AR(e,t){let n=[e],r;for(;r=n.pop();)if(t(r),r.isExpand){let e=r.children;if(e.length)for(let t=e.length-1;t>=0;t--)n.push(e[t])}}function jR(e,t){e.eachSeriesByType(`tree`,function(e){MR(e,t)})}function MR(e,t){let n=d_(e,t).refContainer,r=c_(e.getBoxLayoutParams(),n);e.layoutInfo=r;let i=e.get(`layout`),a=0,o=0,s=null;i===`radial`?(a=2*Math.PI,o=Math.min(r.height,r.width)/2,s=GL(function(e,t){return(e.parentNode===t.parentNode?1:2)/e.depth})):(a=r.width,o=r.height,s=GL());let c=e.getData().tree.root,l=c.children[0];if(l){HL(c),kR(l,UL,s),c.hierNode.modifier=-l.hierNode.prelim,AR(l,WL);let t=l,n=l,r=l;AR(l,function(e){let i=e.getLayout().x;i<t.getLayout().x&&(t=e),i>n.getLayout().x&&(n=e),e.depth>r.depth&&(r=e)});let u=t===n?1:s(t,n)/2,d=u-t.getLayout().x,f=0,p=0,m=0,h=0;if(i===`radial`)f=a/(n.getLayout().x+u+d),p=o/(r.depth-1||1),AR(l,function(e){m=(e.getLayout().x+d)*f,h=(e.depth-1)*p;let t=KL(m,h);e.setLayout({x:t.x,y:t.y,rawX:m,rawY:h},!0)});else{let t=e.getOrient();t===`RL`||t===`LR`?(p=o/(n.getLayout().x+u+d),f=a/(r.depth-1||1),AR(l,function(e){h=(e.getLayout().x+d)*p,m=t===`LR`?(e.depth-1)*f:a-(e.depth-1)*f,e.setLayout({x:m,y:h},!0)})):(t===`TB`||t===`BT`)&&(f=a/(n.getLayout().x+u+d),p=o/(r.depth-1||1),AR(l,function(e){m=(e.getLayout().x+d)*f,h=t===`TB`?(e.depth-1)*p:o-(e.depth-1)*p,e.setLayout({x:m,y:h},!0)}))}}}function NR(e){e.registerAction({type:`treeExpandAndCollapse`,event:`treeExpandAndCollapse`,update:`update`},function(e,t){t.eachComponent({mainType:cd,subType:_R,query:e},function(t){let n=e.dataIndex,r=t.getData().tree.getNodeByDataIndex(n);r.isExpand=!r.isExpand})}),eL(e,cd,_R)}const PR=xc(_R,FR);function FR(e){e.eachSeriesByType(_R,function(e){let t=e.getData();t.tree.eachNode(function(e){let n=e.getModel().getModel(`itemStyle`).getItemStyle();j(t.ensureUniqueItemVisual(e.dataIndex,`style`),n)})})}function IR(e){e.registerChartView(xR),e.registerSeriesModel(vR),e.registerLayout(jR),e.registerVisual(PR),NR(e)}const LR=[`treemapZoomToNode`,`treemapRender`,`treemapMove`];function RR(e){for(let t=0;t<LR.length;t++)e.registerAction({type:LR[t],update:`updateView`},Le);e.registerAction({type:`treemapRootToNode`,update:`updateView`},function(e,t){t.eachComponent({mainType:`series`,subType:`treemap`,query:e},n);function n(t,n){let r=pR(e,[`treemapZoomToNode`,`treemapRootToNode`],t);if(r){let n=t.getViewRoot();n&&(e.direction=hR(n,r.node)?`rollUp`:`drillDown`),t.resetViewRoot(r.node)}}})}function zR(e){let t=e.getData().tree,n={};t.eachNode(t=>{let r=t;for(;r&&r.depth>1;)r=r.parentNode;let i=U_(e.ecModel,r.name||r.dataIndex+``,n);t.setVisual(`decal`,i)})}var BR=class e extends Db{constructor(...t){super(...t),this.type=e.type,this.preventUsingHoverLayer=!0}getInitialData(e,t){let n={name:e.name,children:e.data};VR(n);let r=e.levels||[],i=new kh({itemStyle:this.designatedVisualItemStyle={}},this,t);r=e.levels=HR(r,t);let a=F(r||[],function(e){return new kh(e,i,t)},this),o=dR.createTree(n,this,s);function s(e){e.wrapMethod(`getItemModel`,function(e,t){let n=o.getNodeByDataIndex(t);return e.parentModel=(n?a[n.depth]:null)||i,e})}return o.data}optionUpdated(){this.resetViewRoot()}formatTooltip(e,t,n){let r=this.getData(),i=this.getRawValue(e);return ab(`nameValue`,{name:r.getName(e),value:i})}getDataParams(e){let t=super.getDataParams.apply(this,arguments);return t.treeAncestors=gR(this.getData().tree.getNodeByDataIndex(e),this),t.treePathInfo=t.treeAncestors,t}setLayoutInfo(e){this.layoutInfo=this.layoutInfo||{},j(this.layoutInfo,e)}mapIdToIndex(e){let t=this._idIndexMap;t||(t=this._idIndexMap=U(),this._idIndexMapCount=0);let n=t.get(e);return n==null&&t.set(e,n=this._idIndexMapCount++),n}getViewRoot(){return this._viewRoot}resetViewRoot(e){e?this._viewRoot=e:e=this._viewRoot;let t=this.getRawData().tree.root;(!e||e!==t&&!t.contains(e))&&(this._viewRoot=t)}enableAriaDecal(){zR(this)}};BR.type=`series.treemap`,BR.layoutMode=`box`,BR.defaultOption={progressive:0,coordinateSystemUsage:`box`,left:Q.size.l,top:Q.size.xxxl,right:Q.size.l,bottom:Q.size.xxxl,sort:!0,clipWindow:`origin`,squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:`▶`,zoomToNodeRatio:.1024,scaleLimit:{max:5,min:.2},roam:!0,roamTrigger:`global`,nodeClick:`zoomToNode`,animation:!0,animationDurationUpdate:900,animationEasing:`quinticInOut`,breadcrumb:{show:!0,height:22,left:`center`,bottom:Q.size.m,emptyItemWidth:25,itemStyle:{color:Q.color.backgroundShade,textStyle:{color:Q.color.secondary}},emphasis:{itemStyle:{color:Q.color.background}}},label:{show:!0,distance:0,padding:5,position:`inside`,color:Q.color.neutral00,overflow:`truncate`},upperLabel:{show:!1,position:[0,`50%`],height:20,overflow:`truncate`,verticalAlign:`middle`},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:Q.color.neutral00,borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,`50%`],overflow:`truncate`,verticalAlign:`middle`}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:`index`,visibleMin:10,childrenVisibleMin:null,levels:[]};function VR(e){let t=0;P(e.children,function(e){VR(e);let n=e.value;L(n)&&(n=n[0]),t+=n});let n=e.value;L(n)&&(n=n[0]),(n==null||isNaN(n))&&(n=t),n<0&&(n=0),L(e.value)?e.value[0]=n:e.value=n}function HR(e,t){let n=bs(t.get(`color`)),r=bs(t.get([`aria`,`decal`,`decals`]));if(!n)return;e=e||[];let i,a;P(e,function(e){let t=new kh(e),n=t.get(`color`),r=t.get(`decal`);(t.get([`itemStyle`,`color`])||n&&n!==`none`)&&(i=!0),(t.get([`itemStyle`,`decal`])||r&&r!==`none`)&&(a=!0)});let o=e[0]||(e[0]={});return i||(o.color=n.slice()),!a&&r&&(o.decal=r.slice()),e}var UR=class{constructor(e){this.group=new q,e.add(this.group)}render(e,t,n,r){let i=e.getModel(`breadcrumb`),a=this.group;if(a.removeAll(),!i.get(`show`)||!n)return;let o=i.getModel(`itemStyle`),s=i.getModel(`emphasis`),c=o.getModel(`textStyle`),l=s.getModel([`itemStyle`,`textStyle`]),u=d_(e,t).refContainer,d={left:i.get(`left`),right:i.get(`right`),top:i.get(`top`),bottom:i.get(`bottom`)},f={emptyItemWidth:i.get(`emptyItemWidth`),totalWidth:0,renderList:[]},p=c_(d,u);this._prepare(n,f,c),this._renderContent(e,f,p,o,s,c,l,r),f_(a,d,u)}_prepare(e,t,n){for(let r=e;r;r=r.parentNode){let e=Ps(r.getModel().get(`name`),``),i=n.getTextRect(e),a=Math.max(i.width+16,t.emptyItemWidth);t.totalWidth+=a+8,t.renderList.push({node:r,text:e,width:a})}}_renderContent(e,t,n,r,i,a,o,s){let c=0,l=t.emptyItemWidth,u=e.get([`breadcrumb`,`height`]),d=t.totalWidth,f=t.renderList,p=i.getModel(`itemStyle`).getItemStyle();for(let t=f.length-1;t>=0;t--){let m=f[t],h=m.node,g=m.width,_=m.text;d>n.width&&(d-=g-l,g=l,_=null);let v=new wp({shape:{points:WR(c,0,g,u,t===f.length-1,t===0)},style:M(r.getItemStyle(),{lineJoin:`bevel`}),textContent:new qu({style:oh(a,{text:_})}),textConfig:{position:`inside`},z2:1e5,onclick:fe(s,h)});v.disableLabelAnimation=!0,v.getTextContent().ensureState(`emphasis`).style=oh(o,{text:_}),v.ensureState(`emphasis`).style=p,_f(v,i.get(`focus`),i.get(`blurScope`),i.get(`disabled`)),this.group.add(v),GR(v,e,h),c+=g+8}}remove(){this.group.removeAll()}};function WR(e,t,n,r,i,a){let o=[[i?e:e-5,t],[e+n,t],[e+n,t+r],[i?e:e-5,t+r]];return!a&&o.splice(2,0,[e+n+5,t+r/2]),!i&&o.push([e,t+r/2]),o}function GR(e,t,n){X(e).eventData={componentType:`series`,componentSubType:`treemap`,componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:`treemap`,selfType:`breadcrumb`,nodeData:{dataIndex:n&&n.dataIndex,name:n&&n.name},treePathInfo:n&&gR(n,t)}}var KR=class{constructor(){this._storage=[],this._elExistsMap={}}add(e,t,n,r,i){return!this._elExistsMap[e.id]&&(this._elExistsMap[e.id]=!0,this._storage.push({el:e,target:t,duration:n,delay:r,easing:i}),!0)}finished(e){return this._finishedCallback=e,this}start(){let e=this._storage.length,t=()=>{e--,e<=0&&(this._storage.length=0,this._elExistsMap={},this._finishedCallback&&this._finishedCallback())};for(let e=0,n=this._storage.length;e<n;e++){let n=this._storage[e];n.el.animateTo(n.target,{duration:n.duration,delay:n.delay,easing:n.easing,setToFinal:!0,done:t,aborted:t})}return this}};function qR(){return new KR}const JR=Math.max,YR=Math.min,XR=P,ZR=[`itemStyle`,`borderWidth`],QR=[`itemStyle`,`gapWidth`],$R=[`upperLabel`,`show`],ez=[`upperLabel`,`height`];var tz={seriesType:`treemap`,reset:function(e,t,n,r){let i=e.option,a=d_(e,n).refContainer,o=c_(e.getBoxLayoutParams(),a),s=r&&r.type,c=pR(r,[`treemapZoomToNode`,`treemapRootToNode`],e),l=s===`treemapRender`||s===`treemapMove`?r.rootRect:null,u=e.getViewRoot(),d=mR(u);if(s!==`treemapMove`){let t=!1,n=s===`treemapZoomToNode`?(t=!0,lz(e,c,u,o)):l?(t=!0,j({},l)):j({},o);if(t){let t=pz(o,n);t=mz(t,e),n.width=o.width*t,n.height=o.height*t}let r=i.sort;r&&r!==`asc`&&r!==`desc`&&(r=`desc`);let a={squareRatio:i.squareRatio,sort:r,leafDepth:i.leafDepth};u.hostTree.clearLayouts();let f={x:0,y:0,width:n.width,height:n.height,area:n.width*n.height};u.setLayout(f),nz(u,a,!1,0),f=u.getLayout(),XR(d,function(e,t){let n=(d[t+1]||u).getValue();e.setLayout(j({dataExtent:[n,n],borderWidth:0,upperHeight:0},f))})}let f=e.getData().tree.root;f.setLayout(uz(o,l,c),!0),e.setLayoutInfo(o),dz(f,new K(-o.x,-o.y,n.getWidth(),n.getHeight()),d,u,0)}};function nz(e,t,n,r){let i,a;if(e.isRemoved())return;let o=e.getLayout();i=o.width,a=o.height;let s=e.getModel(),c=s.get(ZR),l=s.get(QR)/2,u=fz(s),d=Math.max(c,u),f=c-l,p=d-l;e.setLayout({borderWidth:c,upperHeight:d,upperLabelHeight:u},!0),i=JR(i-2*f,0),a=JR(a-f-p,0);let m=i*a,h=rz(e,s,m,t,n,r);if(!h.length)return;let g={x:f,y:p,width:i,height:a},_=YR(i,a),v=1/0,y=[];y.area=0;for(let e=0,n=h.length;e<n;){let n=h[e];y.push(n),y.area+=n.getLayout().area;let r=sz(y,_,t.squareRatio);r<=v?(e++,v=r):(y.area-=y.pop().getLayout().area,cz(y,_,g,l,!1),_=YR(g.width,g.height),y.length=y.area=0,v=1/0)}if(y.length&&cz(y,_,g,l,!0),!n){let e=s.get(`childrenVisibleMin`);e!=null&&m<e&&(n=!0)}for(let e=0,i=h.length;e<i;e++)nz(h[e],t,n,r+1)}function rz(e,t,n,r,i,a){let o=e.children||[],s=r.sort;s!==`asc`&&s!==`desc`&&(s=null);let c=r.leafDepth!=null&&r.leafDepth<=a;if(i&&!c)return e.viewChildren=[];o=ce(o,function(e){return!e.isRemoved()}),az(o,s);let l=oz(t,o,s);if(l.sum===0||(l.sum=iz(t,n,l.sum,s,o),l.sum===0))return e.viewChildren=[];for(let e=0,t=o.length;e<t;e++){let t=o[e].getValue()/l.sum*n;o[e].setLayout({area:t})}return c&&(o.length&&e.setLayout({isLeafRoot:!0},!0),o.length=0),e.viewChildren=o,e.setLayout({dataExtent:l.dataExtent},!0),o}function iz(e,t,n,r,i){if(!r)return n;let a=e.get(`visibleMin`),o=i.length,s=o;for(let e=o-1;e>=0;e--){let c=i[r===`asc`?o-e-1:e].getValue();c/n*t<a&&(s=e,n-=c)}return r===`asc`?i.splice(0,o-s):i.splice(s,o-s),n}function az(e,t){return t&&e.sort(function(e,n){let r=t===`asc`?e.getValue()-n.getValue():n.getValue()-e.getValue();return r===0?t===`asc`?e.dataIndex-n.dataIndex:n.dataIndex-e.dataIndex:r}),e}function oz(e,t,n){let r=0;for(let e=0,n=t.length;e<n;e++)r+=t[e].getValue();let i=e.get(`visualDimension`),a;return!t||!t.length?a=[NaN,NaN]:i===`value`&&n?(a=[t[t.length-1].getValue(),t[0].getValue()],n===`asc`&&a.reverse()):(a=ic(),XR(t,function(e){let t=e.getValue(i);t<a[0]&&(a[0]=t),t>a[1]&&(a[1]=t)})),{sum:r,dataExtent:a}}function sz(e,t,n){let r=0,i=1/0;for(let t=0,n,a=e.length;t<a;t++)n=e[t].getLayout().area,n&&(n<i&&(i=n),n>r&&(r=n));let a=e.area*e.area,o=t*t*n;return a?JR(o*r/a,a/(o*i)):1/0}function cz(e,t,n,r,i){let a=t===n.width?0:1,o=1-a,s=[`x`,`y`],c=[`width`,`height`],l=n[s[a]],u=t?e.area/t:0;(i||u>n[c[o]])&&(u=n[c[o]]);for(let t=0,i=e.length;t<i;t++){let d=e[t],f={},p=u?d.getLayout().area/u:0,m=f[c[o]]=JR(u-2*r,0),h=n[s[a]]+n[c[a]]-l,g=t===i-1||h<p?h:p,_=f[c[a]]=JR(g-2*r,0);f[s[o]]=n[s[o]]+YR(r,m/2),f[s[a]]=l+YR(r,_/2),l+=g,d.setLayout(f,!0)}n[s[o]]+=u,n[c[o]]-=u}function lz(e,t,n,r){let i=(t||{}).node,a=r.width,o=r.height,s=j({},r);if(!i||i===n)return s;let c,l=a*o,u=l*e.option.zoomToNodeRatio;for(;c=i.parentNode;){let e=0,t=c.children;for(let n=0,r=t.length;n<r;n++)e+=t[n].getValue();let n=i.getValue();if(n===0)return s;u*=e/n;let r=c.getModel(),a=r.get(ZR),o=Math.max(a,fz(r));u+=4*a*a+(3*a+o)*Math.pow(u,.5),u>Go&&(u=Go),i=c}u<l&&(u=l);let d=Math.pow(u/l,.5);return{width:a*d,height:o*d}}function uz(e,t,n){if(t)return{x:t.x,y:t.y};let r={x:0,y:0};if(!n)return r;let i=n.node,a=i.getLayout();if(!a)return r;let o=[a.width/2,a.height/2],s=i;for(;s;){let e=s.getLayout();o[0]+=e.x,o[1]+=e.y,s=s.parentNode}return{x:e.width/2-o[0],y:e.height/2-o[1]}}function dz(e,t,n,r,i){let a=e.getLayout(),o=n[i],s=o&&o===e;if(o&&!s||i===n.length&&e!==r)return;e.setLayout({isInView:!0,invisible:!s&&!t.intersect(a),isAboveViewRoot:s},!0);let c=new K(t.x-a.x,t.y-a.y,t.width,t.height);XR(e.viewChildren||[],function(e){dz(e,c,n,r,i+1)})}function fz(e){return e.get($R)?e.get(ez):0}function pz(e,t){return t.width/e.width||t.height/e.height||1}function mz(e,t){return YI(e,t.get(`scaleLimit`,!0))}const hz=q,gz=Uu,_z=`label`,vz=`upperLabel`,yz=Ic([[`fill`,`color`],[`stroke`,`strokeColor`],[`lineWidth`,`strokeWidth`],[`shadowBlur`],[`shadowOffsetX`],[`shadowOffsetY`],[`shadowColor`]]),bz=function(e){let t=yz(e);return t.stroke=t.fill=t.lineWidth=null,t},xz=Y();var Sz=class e extends Vb{constructor(...t){super(...t),this.type=e.type,this._state=`ready`,this._storage=Cz()}render(e,t,n,r){if(N(t.findComponents({mainType:`series`,subType:`treemap`,query:r}),e)<0)return;this.seriesModel=e,this.api=n,this.ecModel=t;let i=pR(r,[`treemapZoomToNode`,`treemapRootToNode`],e),a=r&&r.type,o=e.layoutInfo,s=!this._oldTree,c=this._storage,l=a===`treemapRootToNode`&&i&&c?{rootNodeGroup:c.nodeGroup[i.node.getRawIndex()],direction:r.direction}:null,u=this._giveContainerGroup(o),d=e.get(`animation`),f=this._doRender(u,e,l);d&&!s&&(!a||a===`treemapZoomToNode`||a===`treemapRootToNode`)?this._doAnimation(u,f,e,l):f.renderFinally(),this._resetController(n),this._renderBreadcrumb(e,n,i)}_giveContainerGroup(e){let t=this._containerGroup;return t||(t=this._containerGroup=new hz,this._initEvents(t),this.group.add(t)),t.x=e.x,t.y=e.y,t}_doRender(e,t,n){let r=t.getData().tree,i=this._oldTree,a=Cz(),o=Cz(),s=this._storage,c=[];function l(e,r,i,l){return wz(t,o,s,n,a,c,e,r,i,l)}d(r.root?[r.root]:[],i&&i.root?[i.root]:[],e,r===i||!i,0);let u=f(s);return this._oldTree=r,this._storage=o,{lastsForAnimation:a,willDeleteEls:u,renderFinally:p};function d(e,t,n,r,i){r?(t=e,P(e,function(e,t){!e.isRemoved()&&o(t,t)})):new Pw(t,e,a,a).add(o).update(o).remove(fe(o,null)).execute();function a(e){return e.getId()}function o(a,o){let s=a==null?null:e[a],c=o==null?null:t[o],u=l(s,c,n,i);u&&d(s&&s.viewChildren||[],c&&c.viewChildren||[],u,r,i+1)}}function f(e){let t=Cz();return e&&P(e,function(e,n){let r=t[n];P(e,function(e){e&&(r.push(e),xz(e).willDelete=!0)})}),t}function p(){P(u,function(e){P(e,function(e){e.parent&&e.parent.remove(e)})}),P(c,function(e){e.invisible=!0,e.dirty()})}}_doAnimation(e,t,n,r){let i=n.get(`animationDurationUpdate`),a=n.get(`animationEasing`),o=(R(i)?0:i)||0,s=(R(a)?null:a)||`cubicOut`,c=qR();P(t.willDeleteEls,function(e,t){P(e,function(e,n){if(e.invisible)return;let i=e.parent,a,l=xz(i);if(r&&r.direction===`drillDown`)a=i===r.rootNodeGroup?{shape:{x:0,y:0,width:l.nodeWidth,height:l.nodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{let e=0,n=0;l.willDelete||(e=l.nodeWidth/2,n=l.nodeHeight/2),a=t===`nodeGroup`?{x:e,y:n,style:{opacity:0}}:{shape:{x:e,y:n,width:0,height:0},style:{opacity:0}}}a&&c.add(e,a,o,0,s)})}),P(this._storage,function(e,n){P(e,function(e,r){let i=t.lastsForAnimation[n][r],a={};i&&(e instanceof q?i.oldX!=null&&(a.x=e.x,a.y=e.y,e.x=i.oldX,e.y=i.oldY):(i.oldShape&&(a.shape=j({},e.shape),e.setShape(i.oldShape)),i.fadein?(e.setStyle(`opacity`,0),a.style={opacity:1}):e.style.opacity!==1&&(a.style={opacity:1})),c.add(e,a,o,0,s))})},this),this._state=`animating`,c.finished(I(function(){this._state=`ready`,t.renderFinally()},this)).start()}_resetController(e){let t=this.seriesModel,n=this._controller;n||(n=this._controller=new rF(e.getZr()),n.on(`pan`,I(this._onPan,this)),n.on(`zoom`,I(this._onZoom,this))),n.enable(t.get(`roam`),{api:e,zInfo:{component:t},triggerInfo:{roamTrigger:t.get(`roamTrigger`),isInSelf:(e,t,n)=>{let r=this._containerGroup;return r?r.getBoundingRect().contain(t-r.x,n-r.y):!1}}})}_clearController(){let e=this._controller;e&&(e.dispose(),e=null)}_onPan(e){if(this._state!==`animating`&&(Math.abs(e.dx)>3||Math.abs(e.dy)>3)){let t=this.seriesModel.getData().tree.root;if(!t)return;let n=t.getLayout();if(!n)return;this.api.dispatchAction({type:`treemapMove`,from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x+e.dx,y:n.y+e.dy,width:n.width,height:n.height}})}}_onZoom(e){let t=e.originX,n=e.originY,r=e.scale,i=this.seriesModel;if(this._state!==`animating`){let e=i.getData().tree.root;if(!e)return;let a=e.getLayout();if(!a)return;let o=new K(a.x,a.y,a.width,a.height),s=i.layoutInfo,c=pz(s,a),l=c*r;l=mz(l,i);let u=l/c;t-=s.x,n-=s.y;let d=Kt();Xt(d,d,[-t,-n]),Qt(d,d,[u,u]),Xt(d,d,[t,n]),o.applyTransform(d),this.api.dispatchAction({type:`treemapRender`,from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:o.x,y:o.y,width:o.width,height:o.height}})}}_initEvents(e){e.on(`click`,e=>{if(this._state!==`ready`)return;let t=this.seriesModel.get(`nodeClick`,!0);if(!t)return;let n=this.findTarget(e.offsetX,e.offsetY);if(!n)return;let r=n.node;if(r.getLayout().isLeafRoot)this._rootToNode(n);else if(t===`zoomToNode`)this._zoomToNode(n);else if(t===`link`){let e=r.hostTree.data.getItemModel(r.dataIndex),t=e.get(`link`,!0),n=e.get(`target`,!0)||`blank`;t&&Ug(t,n)}},this)}_renderBreadcrumb(e,t,n){n||(n=e.get(`leafDepth`,!0)==null?this.findTarget(t.getWidth()/2,t.getHeight()/2):{node:e.getViewRoot()},n||(n={node:e.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new UR(this.group))).render(e,t,n.node,t=>{this._state!==`animating`&&(hR(e.getViewRoot(),t)?this._rootToNode({node:t}):this._zoomToNode({node:t}))})}remove(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=Cz(),this._state=`ready`,this._breadcrumb&&this._breadcrumb.remove()}dispose(){this._clearController()}_zoomToNode(e){this.api.dispatchAction({type:`treemapZoomToNode`,from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})}_rootToNode(e){this.api.dispatchAction({type:`treemapRootToNode`,from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})}findTarget(e,t){let n;return this.seriesModel.getViewRoot().eachNode({attr:`viewChildren`,order:`preorder`},function(r){let i=this._storage.background[r.getRawIndex()];if(i){let a=i.transformCoordToLocal(e,t),o=i.shape;if(o.x<=a[0]&&a[0]<=o.x+o.width&&o.y<=a[1]&&a[1]<=o.y+o.height)n={node:r,offsetX:a[0],offsetY:a[1]};else return!1}},this),n}};Sz.type=`treemap`;function Cz(){return{nodeGroup:[],background:[],content:[]}}function wz(e,t,n,r,i,a,o,s,c,l){if(!o)return;let u=o.getLayout(),d=e.getData(),f=o.getModel();if(d.setItemGraphicEl(o.dataIndex,null),!u||!u.isInView)return;let p=u.width,m=u.height,h=u.borderWidth,g=u.invisible,_=o.getRawIndex(),v=s&&s.getRawIndex(),y=o.viewChildren,b=u.upperHeight,x=y&&y.length,S=f.getModel(`itemStyle`),C=f.getModel([`emphasis`,`itemStyle`]),w=f.getModel([`blur`,`itemStyle`]),T=f.getModel([`select`,`itemStyle`]),E=S.get(`borderRadius`)||0,D=oe(`nodeGroup`,hz);if(!D)return;if(c.add(D),D.x=u.x||0,D.y=u.y||0,D.markRedraw(),xz(D).nodeWidth=p,xz(D).nodeHeight=m,u.isAboveViewRoot)return D;let O=oe(`background`,gz,l,20);O&&M(D,O,x&&u.upperLabelHeight);let ee=f.getModel(`emphasis`),k=ee.get(`focus`),A=ee.get(`blurScope`),te=ee.get(`disabled`),ne=k===`ancestor`?o.getAncestorsIndices():k===`descendant`?o.getDescendantIndices():k;if(x)Cf(D)&&Sf(D,!1),O&&(Sf(O,!te),d.setItemGraphicEl(o.dataIndex,O),vf(O,ne,A));else{let e=oe(`content`,gz,l,30);e&&re(D,e),O.disableMorphing=!0,O&&Cf(O)&&Sf(O,!1),Sf(D,!te),d.setItemGraphicEl(o.dataIndex,D);let t=f.getShallow(`cursor`);t&&e.attr(`cursor`,t),vf(D,ne,A)}return D;function M(t,n,r){let i=X(n);if(i.dataIndex=o.dataIndex,i.seriesIndex=e.seriesIndex,n.setShape({x:0,y:0,width:p,height:m,r:E}),g)N(n);else{n.invisible=!1;let e=o.getVisual(`style`),t=e.stroke,i=bz(S);i.fill=t;let a=yz(C);a.fill=C.get(`borderColor`);let s=yz(w);s.fill=w.get(`borderColor`);let c=yz(T);if(c.fill=T.get(`borderColor`),r){let r=p-2*h;ie(n,t,e.opacity,{x:h,y:0,width:r,height:b})}else n.removeTextContent();n.setStyle(i),n.ensureState(`emphasis`).style=a,n.ensureState(`blur`).style=s,n.ensureState(`select`).style=c,Jd(n)}t.add(n)}function re(t,n){let r=X(n);r.dataIndex=o.dataIndex,r.seriesIndex=e.seriesIndex;let i=Math.max(p-2*h,0),a=Math.max(m-2*h,0);if(n.culling=!0,n.setShape({x:h,y:h,width:i,height:a,r:E}),g)N(n);else{n.invisible=!1;let e=o.getVisual(`style`),t=e.fill,r=bz(S);r.fill=t,r.decal=e.decal;let i=yz(C),a=yz(w),s=yz(T);ie(n,t,e.opacity,null),n.setStyle(r),n.ensureState(`emphasis`).style=i,n.ensureState(`blur`).style=a,n.ensureState(`select`).style=s,Jd(n)}t.add(n)}function N(e){!e.invisible&&a.push(e)}function ie(t,n,r,i){let a=f.getModel(i?vz:_z),s=Ps(f.get(`name`),null),c=a.getShallow(`show`);ih(t,ah(f,i?vz:_z),{defaultText:c?s:null,inheritColor:n,defaultOpacity:r,labelFetcher:e,labelDataIndex:o.dataIndex});let l=t.getTextContent();if(!l)return;let d=l.style,p=Te(d.padding||0);i&&(t.setTextConfig({layoutRect:i}),l.disableLabelLayout=!0),l.beforeUpdate=function(){let e=Math.max((i?i.width:t.shape.width)-p[1]-p[3],0),n=Math.max((i?i.height:t.shape.height)-p[0]-p[2],0);(d.width!==e||d.height!==n)&&l.setStyle({width:e,height:n})},d.truncateMinChar=2,d.lineOverflow=`truncate`,ae(d,i,u);let m=l.getState(`emphasis`);ae(m?m.style:null,i,u)}function ae(t,n,r){let i=t?t.text:null;if(!n&&r.isLeafRoot&&i!=null){let n=e.get(`drillDownIcon`,!0);t.text=n?n+` `+i:i}}function oe(e,r,a,o){let s=v!=null&&n[e][v],c=i[e];return s?(n[e][v]=null,P(c,s)):g||(s=new r,s instanceof yl&&(s.z2=Tz(a,o)),F(c,s)),t[e][_]=s}function P(e,t){let n=e[_]={};t instanceof hz?(n.oldX=t.x,n.oldY=t.y):n.oldShape=j({},t.shape)}function F(e,t){let n=e[_]={},a=o.parentNode,s=t instanceof q;if(a&&(!r||r.direction===`drillDown`)){let e=0,t=0,o=i.background[a.getRawIndex()];!r&&o&&o.oldShape&&(e=o.oldShape.width,t=o.oldShape.height),s?(n.oldX=0,n.oldY=t):n.oldShape={x:e,y:t,width:0,height:0}}n.fadein=!s}}function Tz(e,t){return e*100+t}const Ez=P,Dz=B;var Oz=class e{constructor(t){let n=t.mappingMethod,r=t.type,i=this.option=k(t);this.type=r,this.mappingMethod=n,this._normalizeData=Bz[n];let a=e.visualHandlers[r];this.applyVisual=a.applyVisual,this.getColorMapper=a.getColorMapper,this._normalizedToVisual=a._normalizedToVisual[n],n===`piecewise`?(jz(i),kz(i)):n===`category`?i.categories?Az(i):jz(i,!0):(H(n!==`linear`||i.dataExtent),jz(i))}mapValueToVisual(e){let t=this._normalizeData(e);return this._normalizedToVisual(t,e)}getNormalizer(){return I(this._normalizeData,this)}static listVisualTypes(){return ue(e.visualHandlers)}static isValidType(t){return e.visualHandlers.hasOwnProperty(t)}static eachVisual(e,t,n){B(e)?P(e,t,n):t.call(n,e)}static mapVisual(t,n,r){let i,a=L(t)?[]:B(t)?{}:(i=!0,null);return e.eachVisual(t,function(e,t){let o=n.call(r,e,t);i?a=o:a[t]=o}),a}static retrieveVisuals(t){let n={},r;return t&&Ez(e.visualHandlers,function(e,i){t.hasOwnProperty(i)&&(n[i]=t[i],r=!0)}),r?n:null}static prepareVisualTypes(e){if(L(e))e=e.slice();else if(Dz(e)){let t=[];Ez(e,function(e,n){t.push(n)}),e=t}else return[];return e.sort(function(e,t){return t===`color`&&e!==`color`&&e.indexOf(`color`)===0?1:-1}),e}static dependsOn(e,t){return t===`color`?!!(e&&e.indexOf(t)===0):e===t}static findPieceIndex(e,t,n){let r,i=1/0;for(let r=0,i=t.length;r<i;r++){let i=t[r].value;if(i!=null){if(i===e||z(i)&&i===e+``)return r;n&&a(i,r)}}for(let r=0,i=t.length;r<i;r++){let i=t[r],o=i.interval,s=i.close;if(o){if(o[0]===-1/0){if(Vz(s[1],e,o[1]))return r}else if(o[1]===1/0){if(Vz(s[0],o[0],e))return r}else if(Vz(s[0],o[0],e)&&Vz(s[1],e,o[1]))return r;n&&a(o[0],r),n&&a(o[1],r)}}if(n)return e===1/0?t.length-1:e===-1/0?0:r;function a(t,n){let a=Math.abs(t-e);a<i&&(i=a,r=n)}}};Oz.visualHandlers={color:{applyVisual:Pz(`color`),getColorMapper:function(){let e=this.option;return I(e.mappingMethod===`category`?function(e,t){return!t&&(e=this._normalizeData(e)),Fz.call(this,e)}:function(t,n,r){let i=!!r;return!n&&(t=this._normalizeData(t)),r=Jr(t,e.parsedVisual,r),i?r:ei(r,`rgba`)},this)},_normalizedToVisual:{linear:function(e){return ei(Jr(e,this.option.parsedVisual),`rgba`)},category:Fz,piecewise:function(e,t){let n=Rz.call(this,t);return n==null&&(n=ei(Jr(e,this.option.parsedVisual),`rgba`)),n},fixed:Iz}},colorHue:Mz(function(e,t){return Qr(e,t)}),colorSaturation:Mz(function(e,t){return Qr(e,null,t)}),colorLightness:Mz(function(e,t){return Qr(e,null,null,t)}),colorAlpha:Mz(function(e,t){return $r(e,t)}),decal:{applyVisual:Pz(`decal`),_normalizedToVisual:{linear:null,category:Fz,piecewise:null,fixed:null}},opacity:{applyVisual:Pz(`opacity`),_normalizedToVisual:Lz([0,1])},liftZ:{applyVisual:Pz(`liftZ`),_normalizedToVisual:{linear:Iz,category:Iz,piecewise:Iz,fixed:Iz}},symbol:{applyVisual:function(e,t,n){n(`symbol`,this.mapValueToVisual(e))},_normalizedToVisual:{linear:Nz,category:Fz,piecewise:function(e,t){let n=Rz.call(this,t);return n==null&&(n=Nz.call(this,e)),n},fixed:Iz}},symbolSize:{applyVisual:Pz(`symbolSize`),_normalizedToVisual:Lz([0,1])}};function kz(e){let t=e.pieceList;e.hasSpecialVisual=!1,P(t,function(t,n){t.originIndex=n,t.visual!=null&&(e.hasSpecialVisual=!0)})}function Az(e){let t=e.categories,n=e.categoryMap={},r=e.visual;if(Ez(t,function(e,t){n[e]=t}),!L(r)){let t=[];B(r)?Ez(r,function(e,r){let i=n[r];t[i==null?-1:i]=e}):t[-1]=r,r=zz(e,t)}for(let e=t.length-1;e>=0;e--)r[e]==null&&(delete n[t[e]],t.pop())}function jz(e,t){let n=e.visual,r=[];B(n)?Ez(n,function(e){r.push(e)}):n!=null&&r.push(n),!t&&r.length===1&&!{color:1,symbol:1}.hasOwnProperty(e.type)&&(r[1]=r[0]),zz(e,r)}function Mz(e){return{applyVisual:function(t,n,r){let i=this.mapValueToVisual(t);r(`color`,e(n(`color`),i))},_normalizedToVisual:Lz([0,1])}}function Nz(e){let t=this.option.visual;return t[Math.round(Ao(e,[0,1],[0,t.length-1],!0))]||{}}function Pz(e){return function(t,n,r){r(e,this.mapValueToVisual(t))}}function Fz(e){let t=this.option.visual;return t[this.option.loop&&e!==-1?e%t.length:e]}function Iz(){return this.option.visual[0]}function Lz(e){return{linear:function(t){return Ao(t,e,this.option.visual,!0)},category:Fz,piecewise:function(t,n){let r=Rz.call(this,n);return r==null&&(r=Ao(t,e,this.option.visual,!0)),r},fixed:Iz}}function Rz(e){let t=this.option,n=t.pieceList;if(t.hasSpecialVisual){let t=n[Oz.findPieceIndex(e,n)];if(t&&t.visual)return t.visual[this.type]}}function zz(e,t){return e.visual=t,e.type===`color`&&(e.parsedVisual=F(t,function(e){let t=Ur(e);return!t&&typeof process<`u`&&process.env.NODE_ENV!==`production`&&ds(`'${e}' is an illegal color, fallback to '#000000'`,!0),t||[0,0,0,1]})),t}const Bz={linear:function(e){return Ao(e,this.option.dataExtent,[0,1],!0)},piecewise:function(e){let t=this.option.pieceList,n=Oz.findPieceIndex(e,t,!0);if(n!=null)return Ao(n,[0,t.length-1],[0,1],!0)},category:function(e){let t=this.option.categories?this.option.categoryMap[e]:e;return t==null?-1:t},fixed:Le};function Vz(e,t,n){return e?t<=n:t<n}const Hz=Y();var Uz={seriesType:`treemap`,reset(e){let t=e.getData().tree.root;t.isRemoved()||Wz(t,{},e.getViewRoot().getAncestors(),e)}};function Wz(e,t,n,r){let i=e.getModel(),a=e.getLayout(),o=e.hostTree.data;if(!a||a.invisible||!a.isInView)return;let s=i.getModel(`itemStyle`),c=Gz(s,t,r),l=o.ensureUniqueItemVisual(e.dataIndex,`style`),u=s.get(`borderColor`),d=s.get(`borderColorSaturation`),f;d!=null&&(f=Kz(c),u=qz(d,f)),l.stroke=u;let p=e.viewChildren;if(!p||!p.length)f=Kz(c),l.fill=f;else{let t=Yz(e,i,a,s,c,p);P(p,function(e,a){(e.depth>=n.length||e===n[e.depth])&&Wz(e,Zz(i,c,e,a,t,r),n,r)})}}function Gz(e,t,n){let r=j({},t),i=n.designatedVisualItemStyle;return P([`color`,`colorAlpha`,`colorSaturation`],function(n){i[n]=t[n];let a=e.get(n);i[n]=null,a!=null&&(r[n]=a)}),r}function Kz(e){let t=Jz(e,`color`);if(t){let n=Jz(e,`colorAlpha`),r=Jz(e,`colorSaturation`);return r&&(t=Qr(t,null,null,r)),n&&(t=$r(t,n)),t}}function qz(e,t){return t==null?null:Qr(t,null,null,e)}function Jz(e,t){let n=e[t];if(n!=null&&n!==`none`)return n}function Yz(e,t,n,r,i,a){if(!a||!a.length)return;let o=Xz(t,`color`)||i.color!=null&&i.color!==`none`&&(Xz(t,`colorAlpha`)||Xz(t,`colorSaturation`));if(!o)return;let s=t.get(`visualMin`),c=t.get(`visualMax`),l=n.dataExtent.slice();s!=null&&s<l[0]&&(l[0]=s),c!=null&&c>l[1]&&(l[1]=c);let u=t.get(`colorMappingBy`),d={type:o.name,dataExtent:l,visual:o.range};d.type===`color`&&(u===`index`||u===`id`)?(d.mappingMethod=`category`,d.loop=!0):d.mappingMethod=`linear`;let f=new Oz(d);return Hz(f).drColorMappingBy=u,f}function Xz(e,t){let n=e.get(t);return L(n)&&n.length?{name:t,range:n}:null}function Zz(e,t,n,r,i,a){let o=j({},t);if(i){let t=i.type,s=t===`color`&&Hz(i).drColorMappingBy,c=s===`index`?r:s===`id`?a.mapIdToIndex(n.getId()):n.getValue(e.get(`visualDimension`));o[t]=i.mapValueToVisual(c)}return o}function Qz(e){e.registerSeriesModel(BR),e.registerChartView(Sz),e.registerVisual(Uz),e.registerLayout(tz),RR(e)}function $z(e){return`_EC_`+e}var eB=class e{constructor(e){this.type=`graph`,this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=e||!1}isDirected(){return this._directed}addNode(e,t){e=e==null?``+t:``+e;let n=this._nodesMap;if(n[$z(e)]){typeof process<`u`&&process.env.NODE_ENV!==`production`&&console.error(`Graph nodes have duplicate name or id`);return}let r=new tB(e,t);return r.hostGraph=this,this.nodes.push(r),n[$z(e)]=r,r}getNodeByIndex(e){let t=this.data.getRawIndex(e);return this.nodes[t]}getNodeById(e){return this._nodesMap[$z(e)]}addEdge(e,t,n){let r=this._nodesMap,i=this._edgesMap;if(me(e)&&(e=this.nodes[e]),me(t)&&(t=this.nodes[t]),e instanceof tB||(e=r[$z(e)]),t instanceof tB||(t=r[$z(t)]),!e||!t)return;let a=e.id+`-`+t.id,o=new nB(e,t,n);return o.hostGraph=this,this._directed&&(e.outEdges.push(o),t.inEdges.push(o)),e.edges.push(o),e!==t&&t.edges.push(o),this.edges.push(o),i[a]=o,o}getEdgeByIndex(e){let t=this.edgeData.getRawIndex(e);return this.edges[t]}getEdge(e,t){e instanceof tB&&(e=e.id),t instanceof tB&&(t=t.id);let n=this._edgesMap;return this._directed?n[e+`-`+t]:n[e+`-`+t]||n[t+`-`+e]}eachNode(e,t){let n=this.nodes,r=n.length;for(let i=0;i<r;i++)n[i].dataIndex>=0&&e.call(t,n[i],i)}eachEdge(e,t){let n=this.edges,r=n.length;for(let i=0;i<r;i++)n[i].dataIndex>=0&&n[i].node1.dataIndex>=0&&n[i].node2.dataIndex>=0&&e.call(t,n[i],i)}breadthFirstTraverse(e,t,n,r){if(t instanceof tB||(t=this._nodesMap[$z(t)]),!t)return;let i=n===`out`?`outEdges`:n===`in`?`inEdges`:`edges`;for(let e=0;e<this.nodes.length;e++)this.nodes[e].__visited=!1;if(e.call(r,t,null))return;let a=[t];for(;a.length;){let t=a.shift(),n=t[i];for(let i=0;i<n.length;i++){let o=n[i],s=o.node1===t?o.node2:o.node1;if(!s.__visited){if(e.call(r,s,t))return;a.push(s),s.__visited=!0}}}}update(){let e=this.data,t=this.edgeData,n=this.nodes,r=this.edges;for(let e=0,t=n.length;e<t;e++)n[e].dataIndex=-1;for(let t=0,r=e.count();t<r;t++)n[e.getRawIndex(t)].dataIndex=t;t.filterSelf(function(e){let n=r[t.getRawIndex(e)];return n.node1.dataIndex>=0&&n.node2.dataIndex>=0});for(let e=0,t=r.length;e<t;e++)r[e].dataIndex=-1;for(let e=0,n=t.count();e<n;e++)r[t.getRawIndex(e)].dataIndex=e}clone(){let t=new e(this._directed),n=this.nodes,r=this.edges;for(let e=0;e<n.length;e++)t.addNode(n[e].id,n[e].dataIndex);for(let e=0;e<r.length;e++){let n=r[e];t.addEdge(n.node1.id,n.node2.id,n.dataIndex)}return t}},tB=class{constructor(e,t){this.inEdges=[],this.outEdges=[],this.edges=[],this.dataIndex=-1,this.id=e==null?``:e,this.dataIndex=t==null?-1:t}degree(){return this.edges.length}inDegree(){return this.inEdges.length}outDegree(){return this.outEdges.length}getModel(e){if(!(this.dataIndex<0))return this.hostGraph.data.getItemModel(this.dataIndex).getModel(e)}getAdjacentDataIndices(){let e={edge:[],node:[]};for(let t=0;t<this.edges.length;t++){let n=this.edges[t];n.dataIndex<0||(e.edge.push(n.dataIndex),e.node.push(n.node1.dataIndex,n.node2.dataIndex))}return e}getTrajectoryDataIndices(){let e=U(),t=U();for(let n=0,r=this.edges.length;n<r;n++){let r=this.edges[n];if(r.dataIndex<0)continue;e.set(r.dataIndex,!0);let i=[r.node1],a=[r.node2],o=0;for(;o<i.length;){let n=i[o];o++,t.set(n.dataIndex,!0);let r=n.inEdges;for(let t=0,n=r.length,a,o;t<n;t++)a=r[t],o=a.dataIndex,o>=0&&!e.hasKey(o)&&(e.set(o,!0),i.push(a.node1))}for(o=0;o<a.length;){let n=a[o];o++,t.set(n.dataIndex,!0);let r=n.outEdges;for(let t=0,n=r.length,i,o;t<n;t++)i=r[t],o=i.dataIndex,o>=0&&!e.hasKey(o)&&(e.set(o,!0),a.push(i.node2))}}return{edge:e.keys(),node:t.keys()}}},nB=class{constructor(e,t,n){this.dataIndex=-1,this.node1=e,this.node2=t,this.dataIndex=n==null?-1:n}getModel(e){if(!(this.dataIndex<0))return this.hostGraph.edgeData.getItemModel(this.dataIndex).getModel(e)}getAdjacentDataIndices(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}}getTrajectoryDataIndices(){let e=U(),t=U();e.set(this.dataIndex,!0);let n=[this.node1],r=[this.node2],i=0;for(;i<n.length;){let r=n[i];i++,t.set(r.dataIndex,!0);let a=r.inEdges;for(let t=0,i=a.length,o,s;t<i;t++)o=r.inEdges[t],s=o.dataIndex,s>=0&&!e.hasKey(s)&&(e.set(s,!0),n.push(o.node1))}for(i=0;i<r.length;){let n=r[i];i++,t.set(n.dataIndex,!0);let a=n.outEdges;for(let t=0,i=a.length,o,s;t<i;t++)o=n.outEdges[t],s=o.dataIndex,s>=0&&!e.hasKey(s)&&(e.set(s,!0),r.push(o.node2))}return{edge:e.keys(),node:t.keys()}}};function rB(e,t){return{getValue(n){let r=this[e][t];return r.getStore().get(r.getDimensionIndex(n||`value`),this.dataIndex)},setVisual(n,r){this.dataIndex>=0&&this[e][t].setItemVisual(this.dataIndex,n,r)},getVisual(n){return this[e][t].getItemVisual(this.dataIndex,n)},setLayout(n,r){this.dataIndex>=0&&this[e][t].setItemLayout(this.dataIndex,n,r)},getLayout(){return this[e][t].getItemLayout(this.dataIndex)},getGraphicEl(){return this[e][t].getItemGraphicEl(this.dataIndex)},getRawIndex(){return this[e][t].getRawIndex(this.dataIndex)}}}ae(tB,rB(`hostGraph`,`data`)),ae(nB,rB(`hostGraph`,`edgeData`));function iB(e,t,n,r,i){let a=new eB(r);for(let t=0;t<e.length;t++)a.addNode(Se(e[t].id,e[t].name,t),t);let o=[],s=[],c=0;for(let e=0;e<t.length;e++){let n=t[e],r=n.source,i=n.target;a.addEdge(r,i,c)&&(s.push(n),o.push(Se(Ps(n.id,null),r+` > `+i)),c++)}let l=n.get(`coordinateSystem`),u;if(l===`cartesian2d`||l===`polar`||l===`matrix`)u=ST(e,n);else{let t=Kg.get(l),r=t&&t.dimensions||[];N(r,`value`)<0&&r.concat([`value`]);let{dimensions:i}=lT(e,{coordDimensions:r,encodeDefine:n.getEncode()});u=new sT(i,n),u.initData(e)}let d=new sT([`value`],n);return d.initData(s,o),i&&i(u,d),tR({mainData:u,struct:a,structAttr:`graph`,datas:{node:u,edge:d},datasAttr:{node:`data`,edge:`edgeData`}}),a.update(),a}const aB=function(e){return e.get(`autoCurveness`)||null},oB=function(e,t){let n=aB(e),r=20,i=[];if(me(n))r=n;else if(L(n)){e.__curvenessList=n;return}t>r&&(r=t);let a=r%2?r+2:r+3;i=[];for(let e=0;e<a;e++)i.push((e%2?e+1:e)/10*(e%2?-1:1));e.__curvenessList=i},sB=function(e,t,n){let r=[e.id,e.dataIndex].join(`.`),i=[t.id,t.dataIndex].join(`.`);return[n.uid,r,i].join(`-->`)},cB=function(e){let t=e.split(`-->`);return[t[0],t[2],t[1]].join(`-->`)},lB=function(e,t){let n=sB(e.node1,e.node2,t);return t.__edgeMap[n]},uB=function(e,t){return dB(sB(e.node1,e.node2,t),t)+dB(sB(e.node2,e.node1,t),t)},dB=function(e,t){let n=t.__edgeMap;return n[e]?n[e].length:0};function fB(e){aB(e)&&(e.__curvenessList=[],e.__edgeMap={},oB(e))}function pB(e,t,n,r){if(!aB(n))return;let i=sB(e,t,n),a=n.__edgeMap,o=a[cB(i)];a[i]&&!o?a[i].isForward=!0:o&&a[i]&&(o.isForward=!0,a[i].isForward=!1),a[i]=a[i]||[],a[i].push(r)}function mB(e,t,n,r){let i=aB(t),a=L(i);if(!i)return null;let o=lB(e,t);if(!o)return null;let s=-1;for(let e=0;e<o.length;e++)if(o[e]===n){s=e;break}let c=uB(e,t);oB(t,c),e.lineStyle=e.lineStyle||{};let l=sB(e.node1,e.node2,t),u=t.__curvenessList,d=a||c%2?0:1;if(o.isForward)return u[d+s];{let e=cB(l),n=dB(e,t),o=u[s+n+d];return r?a?i&&i[0]===0?(n+d)%2?o:-o:((n%2?0:1)+d)%2?o:-o:(n+d)%2?o:-o:u[s+n+d]}}const hB=`graph`;var gB=class e extends Db{constructor(...t){super(...t),this.type=e.type,this.hasSymbolVisual=!0}init(e){super.init.apply(this,arguments);let t=this;function n(){return t._categoriesData}this.legendVisualProvider=new YM(n,n),this.fillDataTextStyle(e.edges||e.links),this._updateCategoriesData()}mergeOption(e){super.mergeOption.apply(this,arguments),this.fillDataTextStyle(e.edges||e.links),this._updateCategoriesData()}mergeDefaultAndTheme(e){super.mergeDefaultAndTheme.apply(this,arguments),xs(e,`edgeLabel`,[`show`])}getInitialData(e,t){let n=e.edges||e.links||[],r=e.data||e.nodes||[],i=this;if(r&&n){fB(this);let e=iB(r,n,this,!0,a);return P(e.edges,function(e){pB(e.node1,e.node2,this,e.dataIndex)},this),e.data}function a(e,t){e.wrapMethod(`getItemModel`,function(e){let t=i._categoriesModels[e.getShallow(`category`)];return t&&(t.parentModel=e.parentModel,e.parentModel=t),e});let n=kh.prototype.getModel;function r(e,t){let r=n.call(this,e,t);return r.resolveParentPath=a,r}t.wrapMethod(`getItemModel`,function(e){return e.resolveParentPath=a,e.getModel=r,e});function a(e){if(e&&(e[0]===`label`||e[1]===`label`)){let t=e.slice();return e[0]===`label`?t[0]=`edgeLabel`:e[1]===`label`&&(t[1]=`edgeLabel`),t}return e}}}getGraph(){return this.getData().graph}getEdgeData(){return this.getGraph().edgeData}getCategoriesData(){return this._categoriesData}formatTooltip(e,t,n){if(n===`edge`){let t=this.getData(),r=this.getDataParams(e,n),i=t.graph.getEdgeByIndex(e),a=t.getName(i.node1.dataIndex),o=t.getName(i.node2.dataIndex),s=[];return a!=null&&s.push(a),o!=null&&s.push(o),ab(`nameValue`,{name:s.join(` > `),value:r.value,noValue:r.value==null})}return xb({series:this,dataIndex:e,multipleSeries:t})}_updateCategoriesData(){let e=F(this.option.categories||[],function(e){return e.value==null?j({value:0},e):e}),t=new sT([`value`],this);t.initData(e),this._categoriesData=t,this._categoriesModels=t.mapArray(function(e){return t.getItemModel(e)})}isAnimationEnabled(){return super.isAnimationEnabled()&&!(this.get(`layout`)===`force`&&this.get([`force`,`layoutAnimation`]))}__ownRoamView(){let e=this.coordinateSystem;return MI(e)&&e}};gB.type=`series.graph`,gB.dependencies=[`grid`,`polar`,`geo`,`singleAxis`,`calendar`],gB.defaultOption={z:2,coordinateSystem:`view`,legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:`center`,top:`center`,symbol:`circle`,symbolSize:10,edgeSymbol:[`none`,`none`],edgeSymbolSize:10,edgeLabel:{position:`middle`,distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:`{b}`},itemStyle:{},lineStyle:{color:Q.color.neutral50,width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:Q.color.primary}}};function _B(e){return e instanceof Array||(e=[e,e]),e}const vB=xc(hB,yB);function yB(e){e.eachSeriesByType(hB,function(e){let t=e.getGraph(),n=e.getEdgeData(),r=_B(e.get(`edgeSymbol`)),i=_B(e.get(`edgeSymbolSize`));n.setVisual(`fromSymbol`,r&&r[0]),n.setVisual(`toSymbol`,r&&r[1]),n.setVisual(`fromSymbolSize`,i&&i[0]),n.setVisual(`toSymbolSize`,i&&i[1]),n.setVisual(`style`,e.getModel(`lineStyle`).getLineStyle()),n.each(function(e){let r=n.getItemModel(e),i=t.getEdgeByIndex(e),a=_B(r.getShallow(`symbol`,!0)),o=_B(r.getShallow(`symbolSize`,!0)),s=r.getModel(`lineStyle`).getLineStyle(),c=n.ensureUniqueItemVisual(e,`style`);switch(j(c,s),c.stroke){case`source`:{let e=i.node1.getVisual(`style`);c.stroke=e&&e.fill;break}case`target`:{let e=i.node2.getVisual(`style`);c.stroke=e&&e.fill;break}}a[0]&&i.setVisual(`fromSymbol`,a[0]),a[1]&&i.setVisual(`toSymbol`,a[1]),o[0]&&i.setVisual(`fromSymbolSize`,o[0]),o[1]&&i.setVisual(`toSymbolSize`,o[1])})})}function bB(e){let t=e.coordinateSystem;if(t&&t.type!==`view`)return;let n=e.getGraph();n.eachNode(function(e){let t=e.getModel();e.setLayout([+t.get(`x`),+t.get(`y`)])}),xB(n,e)}function xB(e,t){e.eachEdge(function(e,n){let r=Ce(e.getModel().get([`lineStyle`,`curveness`]),-mB(e,t,n,!0),0),i=Ue(e.node1.getLayout()),a=Ue(e.node2.getLayout()),o=[i,a];+r&&o.push([(i[0]+a[0])/2-(i[1]-a[1])*r,(i[1]+a[1])/2-(a[0]-i[0])*r]),e.setLayout(o)})}const SB=xc(hB,CB);function CB(e,t){e.eachSeriesByType(hB,function(e){let t=e.get(`layout`),n=e.coordinateSystem;if(n&&n.type!==`view`){let t=e.getData(),r=[];P(n.dimensions,function(e){r=r.concat(t.mapDimensionsAll(e))});for(let e=0;e<t.count();e++){let i=[],a=!1;for(let n=0;n<r.length;n++){let o=t.get(r[n],e);isNaN(o)||(a=!0),i.push(o)}a?t.setItemLayout(e,n.dataToPoint(i)):t.setItemLayout(e,[NaN,NaN])}xB(t.graph,e)}else(!t||t===`none`)&&bB(e)})}function wB(e){let t=e.coordinateSystem;return MI(t)?XI(t,e):1}function TB(e){let t=e.getVisual(`symbolSize`);return t instanceof Array&&(t=(t[0]+t[1])/2),+t}const EB=Math.PI,DB=[];function OB(e,t,n,r){let i=e.coordinateSystem;if(i&&i.type!==`view`)return;let a=i.getBoundingRect(),o=e.getData(),s=o.graph,c=a.width/2+a.x,l=a.height/2+a.y,u=Math.min(a.width,a.height)/2,d=o.count();if(o.setLayout({cx:c,cy:l}),d){if(n){let[t,a]=i.pointToData(r),o=[t-c,a-l];nt(o,o),tt(o,o,u),n.setLayout([c+o[0],l+o[1]],!0),AB(n,e.get([`circular`,`rotateLabel`]),c,l)}kB[t](e,s,o,u,c,l,d),s.eachEdge(function(t,n){let r=Ce(t.getModel().get([`lineStyle`,`curveness`]),mB(t,e,n),0),i=Ue(t.node1.getLayout()),a=Ue(t.node2.getLayout()),o,s=(i[0]+a[0])/2,u=(i[1]+a[1])/2;+r&&(r*=3,o=[c*r+s*(1-r),l*r+u*(1-r)]),t.setLayout([i,a,o])})}}const kB={value(e,t,n,r,i,a,o){let s=0,c=n.getSum(`value`),l=Math.PI*2/(c||o);t.eachNode(function(e){let t=e.getValue(`value`),n=l*(c?t:1)/2;s+=n,e.setLayout([r*Math.cos(s)+i,r*Math.sin(s)+a]),s+=n})},symbolSize(e,t,n,r,i,a,o){let s=0;DB.length=o;let c=wB(e);t.eachNode(function(e){let t=TB(e);isNaN(t)&&(t=2),t<0&&(t=0),t*=c;let n=Math.asin(t/2/r);isNaN(n)&&(n=EB/2),DB[e.dataIndex]=n,s+=n*2});let l=(2*EB-s)/o/2,u=0;t.eachNode(function(e){let t=l+DB[e.dataIndex];u+=t,(!e.getLayout()||!e.getLayout().fixed)&&e.setLayout([r*Math.cos(u)+i,r*Math.sin(u)+a]),u+=t})}};function AB(e,t,n,r){let i=e.getGraphicEl();if(!i)return;let a=e.getModel().get([`label`,`rotate`])||0,o=i.getSymbolPath();if(t){let t=e.getLayout(),i=Math.atan2(t[1]-r,t[0]-n);i<0&&(i=Math.PI*2+i);let a=t[0]<n;a&&(i-=Math.PI);let s=a?`left`:`right`;o.setTextConfig({rotation:-i,position:s,origin:`center`});let c=o.ensureState(`emphasis`);j(c.textConfig||(c.textConfig={}),{position:s})}else o.setTextConfig({rotation:a*=Math.PI/180})}const jB=xc(hB,MB);function MB(e){e.eachSeriesByType(`graph`,function(e){e.get(`layout`)===`circular`&&OB(e,`symbolSize`)})}const NB=Ke;function PB(e,t,n){let r=e,i=t,a=n.rect,o=a.width,s=a.height,c=[a.x+o/2,a.y+s/2],l=n.gravity==null?.1:n.gravity;for(let e=0;e<r.length;e++){let t=r[e];t.p||(t.p=Ve(o*(Math.random()-.5)+c[0],s*(Math.random()-.5)+c[1])),t.pp=Ue(t.p),t.edges=null}let u=n.friction==null?.6:n.friction,d=u,f,p;return{warmUp:function(){d=u*.8},setFixed:function(e){r[e].fixed=!0},setUnfixed:function(e){r[e].fixed=!1},beforeStep:function(e){f=e},afterStep:function(e){p=e},step:function(e){f&&f(r,i);let t=[],n=r.length;for(let e=0;e<i.length;e++){let n=i[e];if(n.ignoreForceLayout)continue;let r=n.n1,a=n.n2;qe(t,a.p,r.p);let o=Je(t)-n.d,s=a.w/(r.w+a.w);isNaN(s)&&(s=0),nt(t,t),!r.fixed&&NB(r.p,r.p,t,s*o*d),!a.fixed&&NB(a.p,a.p,t,-(1-s)*o*d)}for(let e=0;e<n;e++){let n=r[e];n.fixed||(qe(t,c,n.p),NB(n.p,n.p,t,l*d))}for(let e=0;e<n;e++){let i=r[e];for(let a=e+1;a<n;a++){let e=r[a];qe(t,e.p,i.p);let n=Je(t);n===0&&(We(t,Math.random()-.5,Math.random()-.5),n=1);let o=(i.rep+e.rep)/n/n;!i.fixed&&NB(i.pp,i.pp,t,o),!e.fixed&&NB(e.pp,e.pp,t,-o)}}let a=[];for(let e=0;e<n;e++){let t=r[e];t.fixed||(qe(a,t.p,t.pp),NB(t.p,t.p,a,d),He(t.pp,t.p))}d*=.992;let o=d<.01;p&&p(r,i,o),e&&e(o)}}}const FB=xc(hB,IB);function IB(e){e.eachSeriesByType(hB,function(e){let t=e.coordinateSystem;if(!(t&&t.type!==`view`)){if(e.get(`layout`)===`force`){let n=e.preservedPoints||{},r=e.getGraph(),i=r.data,a=r.edgeData,o=e.getModel(`force`),s=o.get(`initLayout`);e.preservedPoints?i.each(function(e){let t=i.getId(e);i.setItemLayout(e,n[t]||[NaN,NaN])}):!s||s===`none`?bB(e):s===`circular`&&OB(e,`value`);let c=i.getDataExtent(`value`),l=a.getDataExtent(`value`),u=o.get(`repulsion`),d=o.get(`edgeLength`),f=L(u)?u:[u,u],p=L(d)?d:[d,d];p=[p[1],p[0]];let m=i.mapArray(`value`,function(e,t){let n=i.getItemLayout(t),r=Ao(e,c,f);return isNaN(r)&&(r=(f[0]+f[1])/2),{w:r,rep:r,fixed:i.getItemModel(t).get(`fixed`),p:!n||isNaN(n[0])||isNaN(n[1])?null:n}}),h=PB(m,a.mapArray(`value`,function(t,n){let i=r.getEdgeByIndex(n),a=Ao(t,l,p);isNaN(a)&&(a=(p[0]+p[1])/2);let o=i.getModel(),s=Ce(i.getModel().get([`lineStyle`,`curveness`]),-mB(i,e,n,!0),0);return{n1:m[i.node1.dataIndex],n2:m[i.node2.dataIndex],d:a,curveness:s,ignoreForceLayout:o.get(`ignoreForceLayout`)}}),{rect:t.getBoundingRect(),gravity:o.get(`gravity`),friction:o.get(`friction`)});h.beforeStep(function(e,t){for(let t=0,n=e.length;t<n;t++)e[t].fixed&&He(e[t].p,r.getNodeByIndex(t).getLayout())}),h.afterStep(function(e,t,a){for(let t=0,a=e.length;t<a;t++)e[t].fixed||r.getNodeByIndex(t).setLayout(e[t].p),n[i.getId(t)]=e[t].p;for(let e=0,n=t.length;e<n;e++){let n=t[e],i=r.getEdgeByIndex(e),a=n.n1.p,o=n.n2.p,s=i.getLayout();s=s?s.slice():[],s[0]=s[0]||[],s[1]=s[1]||[],He(s[0],a),He(s[1],o),+n.curveness&&(s[2]=[(a[0]+o[0])/2-(a[1]-o[1])*n.curveness,(a[1]+o[1])/2-(o[0]-a[0])*n.curveness]),i.setLayout(s)}}),e.forceLayout=h,e.preservedPoints=n,h.step()}else e.forceLayout=null}})}function LB(e,t,n){let r=d_(e,t);return l_(e,c_(j(e.getBoxLayoutParams(),{aspect:n}),r.refContainer),n)}function RB(e,t){let n=[];return e.eachSeriesByType(`graph`,function(e){Qg({targetModel:e,coordSysType:`view`,coordSysProvider:r,isDefaultDataCoordSys:!0});function r(){let r=e.getData(),i=r.mapArray(function(e){let t=r.getItemModel(e);return[+t.get(`x`),+t.get(`y`)]}),a=[],o=[];jl(i,a,o),o[0]-a[0]===0&&(o[0]+=1,--a[0]),o[1]-a[1]===0&&(o[1]+=1,--a[1]);let s=(o[0]-a[0])/(o[1]-a[1]),c=LB(e,t,s);isNaN(s)&&(a=[c.x,c.y],o=[c.x+c.width,c.y+c.height]);let l=o[0]-a[0],u=o[1]-a[1],d=rL(e,t,a[0],a[1],l,u,c);return n.push(d),d}}),n}const zB=kp.prototype,BB=Np.prototype;var VB=class{constructor(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}};function HB(e){return isNaN(+e.cpx1)||isNaN(+e.cpy1)}var UB=class extends Ou{constructor(e){super(e),this.type=`ec-line`}getDefaultStyle(){return{stroke:Q.color.neutral99,fill:null}}getDefaultShape(){return new VB}buildPath(e,t){HB(t)?zB.buildPath.call(this,e,t):BB.buildPath.call(this,e,t)}pointAt(e){return HB(this.shape)?zB.pointAt.call(this,e):BB.pointAt.call(this,e)}tangentAt(e){let t=this.shape,n=HB(t)?[t.x2-t.x1,t.y2-t.y1]:BB.tangentAt.call(this,e);return nt(n,n)}};const WB=[`fromSymbol`,`toSymbol`];function GB(e){return`_`+e+`Type`}function KB(e,t,n){let r=t.getItemVisual(n,e);if(!r||r===`none`)return r;let i=t.getItemVisual(n,e+`Size`),a=t.getItemVisual(n,e+`Rotate`),o=t.getItemVisual(n,e+`Offset`),s=t.getItemVisual(n,e+`KeepAspect`),c=uS(i),l=dS(o||0,c);return r+c+l+(a||``)+(s||``)}function qB(e,t,n){let r=t.getItemVisual(n,e);if(!r||r===`none`)return;let i=t.getItemVisual(n,e+`Size`),a=t.getItemVisual(n,e+`Rotate`),o=t.getItemVisual(n,e+`Offset`),s=t.getItemVisual(n,e+`KeepAspect`),c=uS(i),l=dS(o||0,c),u=lS(r,-c[0]/2+l[0],-c[1]/2+l[1],c[0],c[1],null,s);return u.__specifiedRotation=a==null||isNaN(a)?void 0:a*Math.PI/180||0,u.name=e,u}function JB(e){let t=new UB({name:`line`,subPixelOptimize:!0});return YB(t.shape,e),t}function YB(e,t){e.x1=t[0][0],e.y1=t[0][1],e.x2=t[1][0],e.y2=t[1][1],e.percent=1;let n=t[2];n?(e.cpx1=n[0],e.cpy1=n[1]):(e.cpx1=NaN,e.cpy1=NaN)}var XB=class extends q{constructor(e,t,n){super(),this._createLine(e,t,n)}_createLine(e,t,n){let r=e.hostModel,i=e.getItemLayout(t),a=e.getItemVisual(t,`z2`),o=JB(i);o.shape.percent=0,tm(o,{z2:V(a,0),shape:{percent:1}},r,t),this.add(o),P(WB,function(n){let r=qB(n,e,t);this.add(r),this[GB(n)]=KB(n,e,t)},this),this._updateCommonStl(e,t,n)}updateData(e,t,n){let r=e.hostModel,i=this.childOfName(`line`),a=e.getItemLayout(t),o={shape:{}};YB(o.shape,a),em(i,o,r,t),P(WB,function(n){let r=KB(n,e,t),i=GB(n);if(this[i]!==r){this.remove(this.childOfName(n));let r=qB(n,e,t);this.add(r)}this[i]=r},this),this._updateCommonStl(e,t,n)}getLinePath(){return this.childAt(0)}_updateCommonStl(e,t,n){let r=e.hostModel,i=this.childOfName(`line`),a=n&&n.emphasisLineStyle,o=n&&n.blurLineStyle,s=n&&n.selectLineStyle,c=n&&n.labelStatesModels,l=n&&n.emphasisDisabled,u=n&&n.focus,d=n&&n.blurScope;if(!n||e.hasItemOption){let n=e.getItemModel(t),r=n.getModel(`emphasis`);a=r.getModel(`lineStyle`).getLineStyle(),o=n.getModel([`blur`,`lineStyle`]).getLineStyle(),s=n.getModel([`select`,`lineStyle`]).getLineStyle(),l=r.get(`disabled`),u=r.get(`focus`),d=r.get(`blurScope`),c=ah(n)}let f=e.getItemVisual(t,`style`),p=f.stroke;i.useStyle(f),i.style.fill=null,i.style.strokeNoScale=!0,i.ensureState(`emphasis`).style=a,i.ensureState(`blur`).style=o,i.ensureState(`select`).style=s,P(WB,function(e){let t=this.childOfName(e);if(t){t.setColor(p),t.style.opacity=f.opacity;for(let e=0;e<wd.length;e++){let n=wd[e],r=i.getState(n);if(r){let e=r.style||{},i=t.ensureState(n),a=i.style||(i.style={});e.stroke!=null&&(a[t.__isEmptyBrush?`stroke`:`fill`]=e.stroke),e.opacity!=null&&(a.opacity=e.opacity)}}t.markRedraw()}},this);let m=r.getRawValue(t);ih(this,c,{labelDataIndex:t,labelFetcher:{getFormattedLabel(t,n){return r.getFormattedLabel(t,n,e.dataType)}},inheritColor:p||Q.color.neutral99,defaultOpacity:f.opacity,defaultText:(m==null?e.getName(t):isFinite(m)?Fo(m,10):m)+``});let h=this.getTextContent();if(h){let e=c.normal;h.__align=h.style.align,h.__verticalAlign=h.style.verticalAlign,h.__position=e.get(`position`)||`middle`;let t=e.get(`distance`);L(t)||(t=[t,t]),h.__labelDistance=t}this.setTextConfig({position:null,local:!0,inside:!1}),_f(this,u,d,l)}highlight(){Zd(this)}downplay(){Qd(this)}updateLayout(e,t){this.childOfName(`line`).stopAnimation(),this.setLinePoints(e.getItemLayout(t))}setLinePoints(e){let t=this.childOfName(`line`);YB(t.shape,e),t.dirty()}beforeUpdate(){let e=this,t=e.childOfName(`fromSymbol`),n=e.childOfName(`toSymbol`),r=e.getTextContent();if(!t&&!n&&(!r||r.ignore))return;let i=1,a=this.parent;for(;a;)a.scaleX&&(i/=a.scaleX),a=a.parent;let o=e.childOfName(`line`);if(!this.__dirty&&!o.__dirty)return;let s=o.shape.percent,c=o.pointAt(0),l=o.pointAt(s),u=qe([],l,c);nt(u,u);function d(e,t){let n=e.__specifiedRotation;if(n==null){let n=o.tangentAt(t);e.attr(`rotation`,(t===1?-1:1)*Math.PI/2-Math.atan2(n[1],n[0]))}else e.attr(`rotation`,n)}if(t&&(t.setPosition(c),d(t,0),t.scaleX=t.scaleY=i*s,t.markRedraw()),n&&(n.setPosition(l),d(n,1),n.scaleX=n.scaleY=i*s,n.markRedraw()),r&&!r.ignore){r.x=r.y=0,r.originX=r.originY=0;let e,t,n=r.__labelDistance,a=n[0]*i,d=n[1]*i,f=s/2,p=o.tangentAt(f),m=[p[1],-p[0]],h=o.pointAt(f);m[1]>0&&(m[0]=-m[0],m[1]=-m[1]);let g=p[0]<0?-1:1;if(r.__position!==`start`&&r.__position!==`end`){let e=-Math.atan2(p[1],p[0]);l[0]<c[0]&&(e=Math.PI+e),r.rotation=e}let _;switch(r.__position){case`insideStartTop`:case`insideMiddleTop`:case`insideEndTop`:case`middle`:_=-d,t=`bottom`;break;case`insideStartBottom`:case`insideMiddleBottom`:case`insideEndBottom`:_=d,t=`top`;break;default:_=0,t=`middle`}switch(r.__position){case`end`:r.x=u[0]*a+l[0],r.y=u[1]*d+l[1],e=u[0]>.8?`left`:u[0]<-.8?`right`:`center`,t=u[1]>.8?`top`:u[1]<-.8?`bottom`:`middle`;break;case`start`:r.x=-u[0]*a+c[0],r.y=-u[1]*d+c[1],e=u[0]>.8?`right`:u[0]<-.8?`left`:`center`,t=u[1]>.8?`bottom`:u[1]<-.8?`top`:`middle`;break;case`insideStartTop`:case`insideStart`:case`insideStartBottom`:r.x=a*g+c[0],r.y=c[1]+_,e=p[0]<0?`right`:`left`,r.originX=-a*g,r.originY=-_;break;case`insideMiddleTop`:case`insideMiddle`:case`insideMiddleBottom`:case`middle`:r.x=h[0],r.y=h[1]+_,e=`center`,r.originY=-_;break;case`insideEndTop`:case`insideEnd`:case`insideEndBottom`:r.x=-a*g+l[0],r.y=l[1]+_,e=p[0]>=0?`right`:`left`,r.originX=a*g,r.originY=-_}r.scaleX=r.scaleY=i,r.setStyle({verticalAlign:r.__verticalAlign||t,align:r.__align||e})}}},ZB=class{constructor(e){this.group=new q,this._LineCtor=e||XB}updateData(e){this._progressiveEls=null;let t=this,n=t.group,r=t._lineData;t._lineData=e,r||n.removeAll();let i=$B(e);e.diff(r).add(t=>{this._doAdd(e,t,i)}).update((t,n)=>{this._doUpdate(r,e,n,t,i)}).remove(e=>{n.remove(r.getItemGraphicEl(e))}).execute()}updateLayout(){let e=this._lineData;e&&e.eachItemGraphicEl(function(t,n){t.updateLayout(e,n)},this)}incrementalPrepareUpdate(e){this._seriesScope=$B(e),this._lineData=null,this.group.removeAll()}incrementalUpdate(e,t,n){this._progressiveEls=[];function r(e){!e.isGroup&&!QB(e)&&(e.incremental=n,e.ensureState(`emphasis`).hoverLayer=2)}for(let n=e.start;n<e.end;n++)if(tV(t.getItemLayout(n))){let e=new this._LineCtor(t,n,this._seriesScope);e.traverse(r),this.group.add(e),t.setItemGraphicEl(n,e),this._progressiveEls.push(e)}}remove(){this.group.removeAll()}eachRendered(e){Hm(this._progressiveEls||this.group,e)}_doAdd(e,t,n){if(!tV(e.getItemLayout(t)))return;let r=new this._LineCtor(e,t,n);e.setItemGraphicEl(t,r),this.group.add(r)}_doUpdate(e,t,n,r,i){let a=e.getItemGraphicEl(n);tV(t.getItemLayout(r))?(a?a.updateData(t,r,i):a=new this._LineCtor(t,r,i),t.setItemGraphicEl(r,a),this.group.add(a)):this.group.remove(a)}};function QB(e){return e.animators&&e.animators.length>0}function $B(e){let t=e.hostModel,n=t.getModel(`emphasis`);return{lineStyle:t.getModel(`lineStyle`).getLineStyle(),emphasisLineStyle:n.getModel([`lineStyle`]).getLineStyle(),blurLineStyle:t.getModel([`blur`,`lineStyle`]).getLineStyle(),selectLineStyle:t.getModel([`select`,`lineStyle`]).getLineStyle(),emphasisDisabled:n.get(`disabled`),blurScope:n.get(`blurScope`),focus:n.get(`focus`),labelStatesModels:ah(t)}}function eV(e){return isNaN(e[0])||isNaN(e[1])}function tV(e){return e&&!eV(e[0])&&!eV(e[1])}const nV=[],rV=[],iV=[],aV=gr,oV=ot,sV=Math.abs;function cV(e,t,n){let r=e[0],i=e[1],a=e[2],o=1/0,s,c=n*n,l=.1;for(let e=.1;e<=.9;e+=.1){nV[0]=aV(r[0],i[0],a[0],e),nV[1]=aV(r[1],i[1],a[1],e);let n=sV(oV(nV,t)-c);n<o&&(o=n,s=e)}for(let e=0;e<32;e++){let e=s+l;rV[0]=aV(r[0],i[0],a[0],s),rV[1]=aV(r[1],i[1],a[1],s),iV[0]=aV(r[0],i[0],a[0],e),iV[1]=aV(r[1],i[1],a[1],e);let n=oV(rV,t)-c;if(sV(n)<.01)break;let o=oV(iV,t)-c;l/=2,n<0?o>=0?s+=l:s-=l:o>=0?s-=l:s+=l}return s}function lV(e,t){let n=[],r=br,i=[[],[],[]],a=[[],[]],o=[];t/=2,e.eachEdge(function(e,s){let c=e.getLayout(),l=e.getVisual(`fromSymbol`),u=e.getVisual(`toSymbol`);c.__original||(c.__original=[Ue(c[0]),Ue(c[1])],c[2]&&c.__original.push(Ue(c[2])));let d=c.__original;if(c[2]!=null){if(He(i[0],d[0]),He(i[1],d[2]),He(i[2],d[1]),l&&l!==`none`){let a=TB(e.node1),o=cV(i,d[0],a*t);r(i[0][0],i[1][0],i[2][0],o,n),i[0][0]=n[3],i[1][0]=n[4],r(i[0][1],i[1][1],i[2][1],o,n),i[0][1]=n[3],i[1][1]=n[4]}if(u&&u!==`none`){let a=TB(e.node2),o=cV(i,d[1],a*t);r(i[0][0],i[1][0],i[2][0],o,n),i[1][0]=n[1],i[2][0]=n[2],r(i[0][1],i[1][1],i[2][1],o,n),i[1][1]=n[1],i[2][1]=n[2]}He(c[0],i[0]),He(c[1],i[2]),He(c[2],i[1])}else{if(He(a[0],d[0]),He(a[1],d[1]),qe(o,a[1],a[0]),nt(o,o),l&&l!==`none`){let n=TB(e.node1);Ke(a[0],a[0],o,n*t)}if(u&&u!==`none`){let n=TB(e.node2);Ke(a[1],a[1],o,-n*t)}He(c[0],a[0]),He(c[1],a[1])}})}const uV=Y();function dV(e){if(e)return uV(e).bridge}function fV(e,t){e&&(uV(e).bridge=t)}var pV=class extends Vb{constructor(...e){super(...e),this.type=hB}init(e,t){let n=new Wk,r=new ZB,i=this.group,a=new q;this._controller=new rF(t.getZr()),a.add(n.group),a.add(r.group),i.add(a),this._symbolDraw=n,this._lineDraw=r,this._mainGroup=a,this._firstRender=!0}render(e,t,n){let r=RI(e),i=!1;this._model=e,this._api=n,this._active=!0;let a=this._mainGroup,o=this._getThumbnailInfo();o&&o.bridge.reset(n);let s=this._symbolDraw,c=this._lineDraw;r&&NI(a,2,r,this._firstRender?null:e),lV(e.getGraph(),wB(e));let l=e.getData();s.updateData(l);let u=e.getEdgeData();c.updateData(u),this._updateNodeAndLinkScale(),r&&ZI(e,n,this._controller,function(t,n,r){return e.coordinateSystem.containPoint([n,r])},null),clearTimeout(this._layoutTimeout);let d=e.forceLayout,f=e.get([`force`,`layoutAnimation`]);d&&(i=!0,this._startForceLayoutIteration(d,n,f));let p=e.get(`layout`);l.graph.eachNode(t=>{let r=t.dataIndex,i=t.getGraphicEl(),a=t.getModel();if(!i)return;i.off(`drag`).off(`dragend`);let o=a.get(`draggable`);o&&i.on(`drag`,a=>{switch(p){case`force`:d.warmUp(),!this._layouting&&this._startForceLayoutIteration(d,n,f),d.setFixed(r),l.setItemLayout(r,[i.x,i.y]);break;case`circular`:l.setItemLayout(r,[i.x,i.y]),t.setLayout({fixed:!0},!0),OB(e,`symbolSize`,t,[a.offsetX,a.offsetY]),this.updateLayout(e);break;default:l.setItemLayout(r,[i.x,i.y]),xB(e.getGraph(),e),this.updateLayout(e)}}).on(`dragend`,()=>{d&&d.setUnfixed(r)}),i.setDraggable(o,!!a.get(`cursor`)),a.get([`emphasis`,`focus`])===`adjacency`&&(X(i).focus=t.getAdjacentDataIndices())}),l.graph.eachEdge(function(e){let t=e.getGraphicEl(),n=e.getModel().get([`emphasis`,`focus`]);t&&n===`adjacency`&&(X(t).focus={edge:[e.dataIndex],node:[e.node1.dataIndex,e.node2.dataIndex]})});let m=e.get(`layout`)===`circular`&&e.get([`circular`,`rotateLabel`]),h=l.getLayout(`cx`),g=l.getLayout(`cy`);l.graph.eachNode(e=>{AB(e,m,h,g)}),this._firstRender=!1,i||this._renderThumbnail(e,n,this._symbolDraw,this._lineDraw)}dispose(){this.remove(),this._controller&&this._controller.dispose()}_startForceLayoutIteration(e,t,n){let r=this,i=!1;(function a(){e.step(function(e){r.updateLayout(r._model),(e||!i)&&(i=!0,r._renderThumbnail(r._model,t,r._symbolDraw,r._lineDraw)),(r._layouting=!e)&&(n?r._layoutTimeout=setTimeout(a,16):a())})})()}__updateOnOwnRoam(e,t,n){let r=RI(t);this._active&&r&&(NI(this._mainGroup,2,r,null),nL(e)&&(this._updateNodeAndLinkScale(),lV(t.getGraph(),wB(t)),this._lineDraw.updateLayout(),n.updateLabelLayout()),this._updateThumbnailWindow())}_updateNodeAndLinkScale(){let e=this._model,t=e.getData(),n=wB(e);t.eachItemGraphicEl(function(e,t){e&&e.setSymbolScale(n)})}updateLayout(e){this._active&&(lV(e.getGraph(),wB(e)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout())}remove(){this._active=!1,clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove(),this._controller&&this._controller.disable()}_getThumbnailInfo(){let e=this._model,t=e.coordinateSystem;if(t.type!==`view`)return;let n=dV(e);if(n)return{bridge:n,coordSys:t}}_updateThumbnailWindow(){let e=this._getThumbnailInfo();e&&e.bridge.updateWindow(oI(null,e.coordSys),this._api)}_renderThumbnail(e,t,n,r){let i=this._getThumbnailInfo();if(!i)return;let a=new q,o=n.group.children(),s=r.group.children(),c=new q,l=new q;a.add(l),a.add(c);for(let e=0;e<o.length;e++){let t=o[e],n=t.children()[0],r=t.x,i=t.y,a=j(k(n.shape),{width:n.scaleX,height:n.scaleY,x:r-n.scaleX/2,y:i-n.scaleY/2}),s=k(n.style),c=new n.constructor({shape:a,style:s,z2:151});l.add(c)}for(let e=0;e<s.length;e++){let t=s[e].children()[0],n=new UB({style:k(t.style),shape:k(t.shape),z2:151});c.add(n)}i.bridge.renderContent({api:t,roamType:e.get(`roam`),viewportRect:null,group:a,targetTrans:oI(null,i.coordSys)})}};pV.type=hB;const mV=xc(hB,hV);function hV(e){let t=e.findComponents({mainType:`legend`});t&&t.length&&e.eachSeriesByType(hB,function(e){let n=e.getCategoriesData(),r=e.getGraph().data,i=n.mapArray(n.getName);r.filterSelf(function(e){let n=r.getItemModel(e).getShallow(`category`);if(n!=null){me(n)&&(n=i[n]);for(let e=0;e<t.length;e++)if(!t[e].isSelected(n))return!1}return!0})})}const gV=xc(hB,_V);function _V(e){let t={};e.eachSeriesByType(hB,function(e){let n=e.getCategoriesData(),r=e.getData(),i={};n.each(function(r){let a=n.getName(r);i[`ec-`+a]=r;let o=n.getItemModel(r),s=o.getModel(`itemStyle`).getItemStyle();s.fill||(s.fill=e.getColorFromPalette(a,t)),n.setItemVisual(r,`style`,s);let c=[`symbol`,`symbolSize`,`symbolKeepAspect`];for(let e=0;e<c.length;e++){let t=o.getShallow(c[e],!0);t!=null&&n.setItemVisual(r,c[e],t)}}),n.count()&&r.each(function(e){let t=r.getItemModel(e).getShallow(`category`);if(t!=null){z(t)&&(t=i[`ec-`+t]);let a=n.getItemVisual(t,`style`);j(r.ensureUniqueItemVisual(e,`style`),a);let o=[`symbol`,`symbolSize`,`symbolKeepAspect`];for(let i=0;i<o.length;i++)r.setItemVisual(e,o[i],n.getItemVisual(t,o[i]))}})})}function vV(e){e.registerChartView(pV),e.registerSeriesModel(gB),e.registerProcessor(mV),e.registerVisual(gV),e.registerVisual(vB),e.registerLayout(SB),e.registerLayout(e.PRIORITY.VISUAL.POST_CHART_LAYOUT,jB),e.registerLayout(FB),e.registerCoordinateSystem(`graphView`,{dimensions:iI.dimensions,create:RB}),e.registerAction({type:`focusNodeAdjacency`,event:`focusNodeAdjacency`,update:`series:focusNodeAdjacency`},Le),e.registerAction({type:`unfocusNodeAdjacency`,event:`unfocusNodeAdjacency`,update:`series:unfocusNodeAdjacency`},Le),eL(e,cd,hB)}const yV=`chord`;var bV=class e extends Db{constructor(...t){super(...t),this.type=e.type}init(e){super.init.apply(this,arguments),this.fillDataTextStyle(e.edges||e.links),this.legendVisualProvider=new YM(I(this.getData,this),I(this.getRawData,this))}mergeOption(e){super.mergeOption.apply(this,arguments),this.fillDataTextStyle(e.edges||e.links)}getInitialData(e,t){let n=e.edges||e.links||[],r=e.data||e.nodes||[];if(r&&n)return iB(r,n,this,!0,i).data;function i(e,t){let n=kh.prototype.getModel;function r(e,t){let r=n.call(this,e,t);return r.resolveParentPath=i,r}t.wrapMethod(`getItemModel`,function(e){return e.resolveParentPath=i,e.getModel=r,e});function i(e){if(e&&(e[0]===`label`||e[1]===`label`)){let t=e.slice();return e[0]===`label`?t[0]=`edgeLabel`:e[1]===`label`&&(t[1]=`edgeLabel`),t}return e}}}getGraph(){return this.getData().graph}getEdgeData(){return this.getGraph().edgeData}formatTooltip(e,t,n){let r=this.getDataParams(e,n);if(n===`edge`){let t=this.getData(),n=t.graph.getEdgeByIndex(e),i=t.getName(n.node1.dataIndex),a=t.getName(n.node2.dataIndex),o=[];return i!=null&&o.push(i),a!=null&&o.push(a),ab(`nameValue`,{name:o.join(` > `),value:r.value,noValue:r.value==null})}return ab(`nameValue`,{name:r.name,value:r.value,noValue:r.value==null})}getDataParams(e,t){let n=super.getDataParams(e,t);if(t===`node`){let t=this.getData(),r=this.getGraph().getNodeByIndex(e);n.name==null&&(n.name=t.getName(e)),n.value==null&&(n.value=r.getLayout().value)}return n}};bV.type=`series.chord`,bV.defaultOption={z:2,coordinateSystem:`none`,legendHoverLink:!0,colorBy:`data`,left:0,top:0,right:0,bottom:0,width:null,height:null,center:[`50%`,`50%`],radius:[`70%`,`80%`],clockwise:!0,startAngle:90,endAngle:`auto`,minAngle:0,padAngle:3,itemStyle:{borderRadius:[0,0,5,5]},lineStyle:{width:0,color:`source`,opacity:.2},label:{show:!0,position:`outside`,distance:5},emphasis:{focus:`adjacency`,lineStyle:{opacity:.5}}};var xV=class extends vp{constructor(e,t,n){super(),X(this).dataType=`node`,this.z2=2;let r=new qu;this.setTextContent(r),this.updateData(e,t,n,!0)}updateData(e,t,n,r){let i=this,a=e.graph.getNodeByIndex(t),o=e.hostModel,s=a.getModel(),c=s.getModel(`emphasis`),l=e.getItemLayout(t),u=j(bM(s.getModel(`itemStyle`),l,!0),l),d=this;if(isNaN(u.startAngle)){d.setShape(u);return}r?d.setShape(u):em(d,{shape:u},o,t);let f=j(bM(s.getModel(`itemStyle`),l,!0),l);i.setShape(f),i.useStyle(e.getItemVisual(t,`style`)),xf(i,s),this._updateLabel(o,s,a),e.setItemGraphicEl(t,d),xf(d,s,`itemStyle`);let p=c.get(`focus`);_f(this,p===`adjacency`?a.getAdjacentDataIndices():p,c.get(`blurScope`),c.get(`disabled`))}_updateLabel(e,t,n){let r=this.getTextContent(),i=n.getLayout(),a=(i.startAngle+i.endAngle)/2,o=Math.cos(a),s=Math.sin(a),c=t.getModel(`label`);r.ignore=!c.get(`show`);let l=ah(t),u=n.getVisual(`style`);ih(r,l,{labelFetcher:{getFormattedLabel(n,r,i,a,o,s){return e.getFormattedLabel(n,r,`node`,a,Ce(o,l.normal&&l.normal.get(`formatter`),t.get(`name`)),s)}},labelDataIndex:n.dataIndex,defaultText:n.dataIndex+``,inheritColor:u.fill,defaultOpacity:u.opacity,defaultOutsidePosition:`startArc`});let d=c.get(`position`)||`outside`,f=c.get(`distance`)||0,p;p=d===`outside`?i.r+f:(i.r+i.r0)/2,this.textConfig={inside:d!==`outside`};let m=d===`outside`?o>0?`left`:`right`:c.get(`align`)||`center`,h=d===`outside`?s>0?`top`:`bottom`:c.get(`verticalAlign`)||`middle`;r.attr({x:o*p+i.cx,y:s*p+i.cy,rotation:0,style:{align:m,verticalAlign:h}})}},SV=class extends Ou{constructor(e,t,n,r){super(),X(this).dataType=`edge`,this.updateData(e,t,n,r,!0)}buildPath(e,t){e.moveTo(t.s1[0],t.s1[1]);let n=.7,r=t.clockwise;e.arc(t.cx,t.cy,t.r,t.sStartAngle,t.sEndAngle,!r),e.bezierCurveTo((t.cx-t.s2[0])*n+t.s2[0],(t.cy-t.s2[1])*n+t.s2[1],(t.cx-t.t1[0])*n+t.t1[0],(t.cy-t.t1[1])*n+t.t1[1],t.t1[0],t.t1[1]),e.arc(t.cx,t.cy,t.r,t.tStartAngle,t.tEndAngle,!r),e.bezierCurveTo((t.cx-t.t2[0])*n+t.t2[0],(t.cy-t.t2[1])*n+t.t2[1],(t.cx-t.s1[0])*n+t.s1[0],(t.cy-t.s1[1])*n+t.s1[1],t.s1[0],t.s1[1]),e.closePath()}updateData(e,t,n,r,i){let a=e.hostModel,o=t.graph.getEdgeByIndex(n),s=o.getLayout(),c=o.node1.getModel(),l=t.getItemModel(o.dataIndex),u=l.getModel(`lineStyle`),d=l.getModel(`emphasis`),f=d.get(`focus`),p=j(bM(c.getModel(`itemStyle`),s,!0),s),m=this;isNaN(p.sStartAngle)||isNaN(p.tStartAngle)?m.setShape(p):(i?(m.setShape(p),CV(m,o,e,u)):(om(m),CV(m,o,e,u),em(m,{shape:p},a,n)),_f(this,f===`adjacency`?o.getAdjacentDataIndices():f,d.get(`blurScope`),d.get(`disabled`)),xf(m,l,`lineStyle`),t.setItemGraphicEl(o.dataIndex,m))}};function CV(e,t,n,r){let i=t.node1,a=t.node2,o=e.style;switch(e.setStyle(r.getLineStyle()),r.get(`color`)){case`source`:o.fill=n.getItemVisual(i.dataIndex,`style`).fill,o.decal=i.getVisual(`style`).decal;break;case`target`:o.fill=n.getItemVisual(a.dataIndex,`style`).fill,o.decal=a.getVisual(`style`).decal;break;case`gradient`:let t=n.getItemVisual(i.dataIndex,`style`).fill,r=n.getItemVisual(a.dataIndex,`style`).fill;if(z(t)&&z(r)){let n=e.shape;o.fill=new Rp((n.s1[0]+n.s2[0])/2,(n.s1[1]+n.s2[1])/2,(n.t1[0]+n.t2[0])/2,(n.t1[1]+n.t2[1])/2,[{offset:0,color:t},{offset:1,color:r}],!0)}}}const wV=Math.PI/180;var TV=class extends Vb{constructor(...e){super(...e),this.type=yV}init(e,t){}render(e,t,n){let r=e.getData(),i=this._data,a=this.group,o=-e.get(`startAngle`)*wV;if(r.diff(i).add(e=>{if(r.getItemLayout(e)){let t=new xV(r,e,o);X(t).dataIndex=e,a.add(t)}}).update((t,n)=>{let s=i.getItemGraphicEl(n);r.getItemLayout(t)?(s?s.updateData(r,t,o):s=new xV(r,t,o),a.add(s)):s&&am(s,e,n)}).remove(t=>{let n=i.getItemGraphicEl(t);n&&am(n,e,t)}).execute(),!i){let t=e.get(`center`);this.group.scaleX=.01,this.group.scaleY=.01,this.group.originX=J(t[0],n.getWidth()),this.group.originY=J(t[1],n.getHeight()),tm(this.group,{scaleX:1,scaleY:1},e)}this._data=r,this.renderEdges(e,o)}renderEdges(e,t){let n=e.getData(),r=e.getEdgeData(),i=this._edgeData,a=this.group;r.diff(i).add(function(e){let i=new SV(n,r,e,t);X(i).dataIndex=e,a.add(i)}).update(function(e,o){let s=i.getItemGraphicEl(o);s.updateData(n,r,e,t),a.add(s)}).remove(function(t){let n=i.getItemGraphicEl(t);n&&am(n,e,t)}).execute(),this._edgeData=r}dispose(){}};TV.type=yV;const EV=Math.PI/180,DV=xc(yV,OV);function OV(e,t){e.eachSeriesByType(yV,function(e){kV(e,t)})}function kV(e,t){let n=e.getData(),r=n.graph,i=e.getEdgeData();if(!i.count())return;let{cx:a,cy:o,r:s,r0:c}=s_(e,t),l=Math.max((e.get(`padAngle`)||0)*EV,0),u=Math.max((e.get(`minAngle`)||0)*EV,0),d=-e.get(`startAngle`)*EV,f=d+Math.PI*2,p=e.get(`clockwise`),m=p?1:-1,h=[d,f];nu(h,!p);let[g,_]=h,v=_-g,y=n.getSum(`value`)===0&&i.getSum(`value`)===0,b=[],x=0;r.eachEdge(function(e){let t=y?1:e.getValue(`value`);y&&(t>0||u)&&(x+=2);let n=e.node1.dataIndex,r=e.node2.dataIndex;b[n]=(b[n]||0)+t,b[r]=(b[r]||0)+t});let S=0;if(r.eachNode(e=>{let t=e.getValue(`value`);isNaN(t)||(b[e.dataIndex]=Math.max(t,b[e.dataIndex]||0)),!y&&(b[e.dataIndex]>0||u)&&x++,S+=b[e.dataIndex]||0}),x===0||S===0)return;l*x>=Math.abs(v)&&(l=Math.max(0,(Math.abs(v)-u*x)/x)),(l+u)*x>=Math.abs(v)&&(u=(Math.abs(v)-l*x)/x);let C=(v-l*x*m)/S,w=0,T=0,E=0,D=1/0;r.eachNode(e=>{let t=b[e.dataIndex]||0,n=C*(S?t:1)*m;Math.abs(n)<u?w+=u-Math.abs(n):(D=Math.min(D,Math.abs(n)-u),T+=Math.abs(n)-u,E+=Math.abs(n)),e.setLayout({angle:n,value:t})});let O=!1;if(w>T){let e=w/T;r.eachNode(t=>{let n=t.getLayout().angle;Math.abs(n)>=u?t.setLayout({angle:n*e,ratio:e},!0):t.setLayout({angle:u,ratio:u===0?1:n/u},!0)})}else r.eachNode(e=>{if(O)return;let t=e.getLayout().angle;t-Math.min(t/E,1)*w<u&&(O=!0)});let ee=w;r.eachNode(e=>{if(ee<=0)return;let t=e.getLayout().angle;if(t>u&&u>0){let n=O?1:Math.min(t/E,1),r=t-u,i=Math.min(r,Math.min(ee,w*n));ee-=i,e.setLayout({angle:t-i,ratio:(t-i)/t},!0)}else u>0&&e.setLayout({angle:u,ratio:t===0?1:u/t},!0)});let k=g,A=[];r.eachNode(e=>{let t=Math.max(e.getLayout().angle,u);e.setLayout({cx:a,cy:o,r0:c,r:s,startAngle:k,endAngle:k+t*m,clockwise:p},!0),A[e.dataIndex]=k,k+=(t+l)*m}),r.eachEdge(e=>{let t=y?1:e.getValue(`value`),n=C*(S?t:1)*m,r=e.node1.dataIndex,i=A[r]||0,s=i+Math.abs((e.node1.getLayout().ratio||1)*n)*m,l=[a+c*Math.cos(i),o+c*Math.sin(i)],u=[a+c*Math.cos(s),o+c*Math.sin(s)],d=e.node2.dataIndex,f=A[d]||0,h=f+Math.abs((e.node2.getLayout().ratio||1)*n)*m,g=[a+c*Math.cos(f),o+c*Math.sin(f)],_=[a+c*Math.cos(h),o+c*Math.sin(h)];e.setLayout({s1:l,s2:u,sStartAngle:i,sEndAngle:s,t1:g,t2:_,tStartAngle:f,tEndAngle:h,cx:a,cy:o,r:c,value:t,clockwise:p}),A[r]=s,A[d]=h})}function AV(e){e.registerChartView(TV),e.registerSeriesModel(bV),e.registerLayout(e.PRIORITY.VISUAL.POST_CHART_LAYOUT,DV),e.registerProcessor(qM(`chord`))}var jV=class{constructor(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}},MV=class extends Ou{constructor(e){super(e),this.type=`pointer`}getDefaultShape(){return new jV}buildPath(e,t){let n=Math.cos,r=Math.sin,i=t.r,a=t.width,o=t.angle,s=t.x-n(o)*a*(a>=i/3?1:2),c=t.y-r(o)*a*(a>=i/3?1:2);o=t.angle-Math.PI/2,e.moveTo(s,c),e.lineTo(t.x+n(o)*a,t.y+r(o)*a),e.lineTo(t.x+n(t.angle)*i,t.y+r(t.angle)*i),e.lineTo(t.x-n(o)*a,t.y-r(o)*a),e.lineTo(s,c)}};function NV(e,t){let n=e.get(`center`),r=t.getWidth(),i=t.getHeight(),a=Math.min(r,i);return{cx:J(n[0],t.getWidth()),cy:J(n[1],t.getHeight()),r:J(e.get(`radius`),a/2)}}function PV(e,t){let n=e==null?``:e+``;return t&&(z(t)?n=t.replace(`{value}`,n):R(t)&&(n=t(e))),n}var FV=class e extends Vb{constructor(...t){super(...t),this.type=e.type}render(e,t,n){this.group.removeAll();let r=e.get([`axisLine`,`lineStyle`,`color`]),i=NV(e,n);this._renderMain(e,t,n,r,i),this._data=e.getData()}dispose(){}_renderMain(e,t,n,r,i){let a=this.group,o=e.get(`clockwise`),s=-e.get(`startAngle`)/180*Math.PI,c=-e.get(`endAngle`)/180*Math.PI,l=e.getModel(`axisLine`),u=l.get(`roundCap`)?hM:vp,d=l.get(`show`),f=l.getModel(`lineStyle`),p=f.get(`width`),m=[s,c];nu(m,!o),s=m[0],c=m[1];let h=c-s,g=s,_=[];for(let e=0;d&&e<r.length;e++){let t=Math.min(Math.max(r[e][0],0),1);c=s+h*t;let n=new u({shape:{startAngle:g,endAngle:c,cx:i.cx,cy:i.cy,clockwise:o,r0:i.r-p,r:i.r},silent:!0});n.setStyle({fill:r[e][1]}),n.setStyle(f.getLineStyle([`color`,`width`])),_.push(n),g=c}_.reverse(),P(_,e=>a.add(e));let v=function(e){if(e<=0)return r[0][1];let t=0;for(;t<r.length;t++)if(r[t][0]>=e&&(t===0?0:r[t-1][0])<e)return r[t][1];return r[t-1][1]};this._renderTicks(e,t,n,v,i,s,c,o,p),this._renderTitleAndDetail(e,t,n,v,i),this._renderAnchor(e,i),this._renderPointer(e,t,n,v,i,s,c,o,p)}_renderTicks(e,t,n,r,i,a,o,s,c){let l=this.group,u=i.cx,d=i.cy,f=i.r,p=+e.get(`min`),m=+e.get(`max`),h=e.getModel(`splitLine`),g=e.getModel(`axisTick`),_=e.getModel(`axisLabel`),v=e.get(`splitNumber`),y=g.get(`splitNumber`),b=J(h.get(`length`),f),x=J(g.get(`length`),f),S=a,C=(o-a)/v,w=C/y,T=h.getModel(`lineStyle`).getLineStyle(),E=g.getModel(`lineStyle`).getLineStyle(),D=h.get(`distance`),O,ee;for(let e=0;e<=v;e++){if(O=Math.cos(S),ee=Math.sin(S),h.get(`show`)){let t=D?D+c:c,n=new kp({shape:{x1:O*(f-t)+u,y1:ee*(f-t)+d,x2:O*(f-b-t)+u,y2:ee*(f-b-t)+d},style:T,silent:!0});T.stroke===`auto`&&n.setStyle({stroke:r(e/v)}),l.add(n)}if(_.get(`show`)){let t=_.get(`distance`)+D,n=PV(Fo(e*(m-p)/v+p,14),_.get(`formatter`)),i=r(e/v),a=O*(f-b-t)+u,o=ee*(f-b-t)+d,s=_.get(`rotate`),c=0;s===`radial`?(c=-S+2*Math.PI,c>Math.PI/2&&(c+=Math.PI)):s===`tangential`?c=-S-Math.PI/2:me(s)&&(c=s*Math.PI/180),c===0?l.add(new qu({style:oh(_,{text:n,x:a,y:o,verticalAlign:ee<-.8?`top`:ee>.8?`bottom`:`middle`,align:O<-.4?`left`:O>.4?`right`:`center`},{inheritColor:i}),silent:!0})):l.add(new qu({style:oh(_,{text:n,x:a,y:o,verticalAlign:`middle`,align:`center`},{inheritColor:i}),silent:!0,originX:a,originY:o,rotation:c}))}if(g.get(`show`)&&e!==v){let t=g.get(`distance`);t=t?t+c:c;for(let n=0;n<=y;n++){O=Math.cos(S),ee=Math.sin(S);let i=new kp({shape:{x1:O*(f-t)+u,y1:ee*(f-t)+d,x2:O*(f-x-t)+u,y2:ee*(f-x-t)+d},silent:!0,style:E});E.stroke===`auto`&&i.setStyle({stroke:r((e+n/y)/v)}),l.add(i),S+=w}S-=w}else S+=C}}_renderPointer(e,t,n,r,i,a,o,s,c){let l=this.group,u=this._data,d=this._progressEls,f=[],p=e.get([`pointer`,`show`]),m=e.getModel(`progress`),h=m.get(`show`),g=e.getData(),_=g.mapDimension(`value`),v=+e.get(`min`),y=+e.get(`max`),b=[v,y],x=[a,o];function S(t,n){let r=g.getItemModel(t).getModel(`pointer`),a=J(r.get(`width`),i.r),o=J(r.get(`length`),i.r),s=e.get([`pointer`,`icon`]),c=r.get(`offsetCenter`),l=J(c[0],i.r),u=J(c[1],i.r),d=r.get(`keepAspect`),f;return f=s?lS(s,l-a/2,u-o,a,o,null,d):new MV({shape:{angle:-Math.PI/2,width:a,r:o,x:l,y:u}}),f.rotation=-(n+Math.PI/2),f.x=i.cx,f.y=i.cy,f}function C(e,t){let n=m.get(`roundCap`)?hM:vp,r=m.get(`overlap`),o=r?m.get(`width`):c/g.count(),l=r?i.r-o:i.r-(e+1)*o,u=r?i.r:i.r-e*o,d=new n({shape:{startAngle:a,endAngle:t,cx:i.cx,cy:i.cy,clockwise:s,r0:l,r:u}});return r&&(d.z2=Ao(g.get(_,e),[v,y],[100,0],!0)),d}(h||p)&&(g.diff(u).add(function(t){let n=g.get(_,t);if(p){let r=S(t,a);tm(r,{rotation:-((isNaN(+n)?x[0]:Ao(n,b,x,!0))+Math.PI/2)},e),l.add(r),g.setItemGraphicEl(t,r)}if(h){let r=C(t,a),i=m.get(`clip`);tm(r,{shape:{endAngle:Ao(n,b,x,i)}},e),l.add(r),sd(e.seriesIndex,g.dataType,t,r),f[t]=r}}).update(function(t,n){let r=g.get(_,t);if(p){let i=u.getItemGraphicEl(n),o=i?i.rotation:a,s=S(t,o);s.rotation=o,em(s,{rotation:-((isNaN(+r)?x[0]:Ao(r,b,x,!0))+Math.PI/2)},e),l.add(s),g.setItemGraphicEl(t,s)}if(h){let i=d[n],o=C(t,i?i.shape.endAngle:a),s=m.get(`clip`);em(o,{shape:{endAngle:Ao(r,b,x,s)}},e),l.add(o),sd(e.seriesIndex,g.dataType,t,o),f[t]=o}}).execute(),g.each(function(e){let t=g.getItemModel(e),n=t.getModel(`emphasis`),i=n.get(`focus`),a=n.get(`blurScope`),o=n.get(`disabled`),s=r(Ao(g.get(_,e),b,[0,1],!0));if(p){let n=g.getItemGraphicEl(e),r=g.getItemVisual(e,`style`),c=r.fill;if(n instanceof Fu){let e=n.style;n.useStyle(j({image:e.image,x:e.x,y:e.y,width:e.width,height:e.height},r))}else n.useStyle(r),n.type!==`pointer`&&n.setColor(c);n.setStyle(t.getModel([`pointer`,`itemStyle`]).getItemStyle()),n.style.fill===`auto`&&n.setStyle(`fill`,s),n.z2EmphasisLift=0,xf(n,t),_f(n,i,a,o)}if(h){let n=f[e];n.useStyle(g.getItemVisual(e,`style`)),n.setStyle(t.getModel([`progress`,`itemStyle`]).getItemStyle()),n.style.fill===`auto`&&n.setStyle(`fill`,s),n.z2EmphasisLift=0,xf(n,t),_f(n,i,a,o)}}),this._progressEls=f)}_renderAnchor(e,t){let n=e.getModel(`anchor`);if(n.get(`show`)){let e=n.get(`size`),r=n.get(`icon`),i=n.get(`offsetCenter`),a=n.get(`keepAspect`),o=lS(r,t.cx-e/2+J(i[0],t.r),t.cy-e/2+J(i[1],t.r),e,e,null,a);o.z2=+!!n.get(`showAbove`),o.setStyle(n.getModel(`itemStyle`).getItemStyle()),this.group.add(o)}}_renderTitleAndDetail(e,t,n,r,i){let a=e.getData(),o=a.mapDimension(`value`),s=+e.get(`min`),c=+e.get(`max`),l=new q,u=[],d=[],f=e.isAnimationEnabled(),p=e.get([`pointer`,`showAbove`]);a.diff(this._data).add(e=>{u[e]=new qu({silent:!0}),d[e]=new qu({silent:!0})}).update((e,t)=>{u[e]=this._titleEls[t],d[e]=this._detailEls[t]}).execute(),a.each(function(t){let n=a.getItemModel(t),m=a.get(o,t),h=new q,g=r(Ao(m,[s,c],[0,1],!0)),_=n.getModel(`title`);if(_.get(`show`)){let e=_.get(`offsetCenter`),n=i.cx+J(e[0],i.r),r=i.cy+J(e[1],i.r),o=u[t];o.attr({z2:p?0:2,style:oh(_,{x:n,y:r,text:a.getName(t),align:`center`,verticalAlign:`middle`},{inheritColor:g})}),h.add(o)}let v=n.getModel(`detail`);if(v.get(`show`)){let n=v.get(`offsetCenter`),r=i.cx+J(n[0],i.r),o=i.cy+J(n[1],i.r),s=J(v.get(`width`),i.r),c=J(v.get(`height`),i.r),l=e.get([`progress`,`show`])?a.getItemVisual(t,`style`).fill:g,u=d[t],_=v.get(`formatter`);u.attr({z2:p?0:2,style:oh(v,{x:r,y:o,text:PV(m,_),width:isNaN(s)?null:s,height:isNaN(c)?null:c,align:`center`,verticalAlign:`middle`},{inheritColor:l})}),gh(u,{normal:v},m,e=>PV(e,_)),f&&_h(u,t,a,e,{getFormattedLabel(e,t,n,r,i,a){return PV(a?a.interpolatedValue:m,_)}}),h.add(u)}l.add(h)}),this.group.add(l),this._titleEls=u,this._detailEls=d}};FV.type=`gauge`;var IV=class e extends Db{constructor(...t){super(...t),this.type=e.type,this.visualStyleAccessPath=`itemStyle`}getInitialData(e,t){return JM(this,[`value`])}};IV.type=`series.gauge`,IV.defaultOption={z:2,colorBy:`data`,center:[`50%`,`50%`],legendHoverLink:!0,radius:`75%`,startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,Q.color.neutral10]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:Q.color.axisTick,width:3,type:`solid`}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:Q.color.axisTickMinor,width:1,type:`solid`}},axisLabel:{show:!0,distance:15,color:Q.color.axisLabel,fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:`60%`,width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:`circle`,offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:Q.color.neutral00,borderWidth:0,borderColor:Q.color.theme[0]}},title:{show:!0,offsetCenter:[0,`20%`],color:Q.color.secondary,fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:Q.color.transparent,borderWidth:0,borderColor:Q.color.neutral40,width:100,height:null,padding:[5,10],offsetCenter:[0,`40%`],color:Q.color.primary,fontSize:30,fontWeight:`bold`,lineHeight:30,valueAnimation:!1}};function LV(e){e.registerChartView(FV),e.registerSeriesModel(IV)}const RV=`funnel`;var zV=class e extends Db{constructor(...t){super(...t),this.type=e.type}init(e){super.init.apply(this,arguments),this.legendVisualProvider=new YM(I(this.getData,this),I(this.getRawData,this)),this._defaultLabelLine(e)}getInitialData(e,t){return JM(this,{coordDimensions:[`value`],encodeDefaulter:fe(M_,this)})}_defaultLabelLine(e){xs(e,`labelLine`,[`show`]);let t=e.labelLine,n=e.emphasis.labelLine;t.show=t.show&&e.label.show,n.show=n.show&&e.emphasis.label.show}getDataParams(e){let t=this.getData(),n=super.getDataParams(e),r=t.mapDimension(`value`),i=t.getSum(r);return n.percent=i?+(t.get(r,e)/i*100).toFixed(2):0,n.$vars.push(`percent`),n}};zV.type=`series.funnel`,zV.defaultOption={coordinateSystemUsage:`box`,z:2,legendHoverLink:!0,colorBy:`data`,left:80,top:60,right:80,bottom:65,minSize:`0%`,maxSize:`100%`,sort:`descending`,orient:`vertical`,gap:0,funnelAlign:`center`,label:{show:!0,position:`outer`},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:Q.color.neutral00,borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:Q.color.primary}}};const BV=[`itemStyle`,`opacity`];var VV=class extends wp{constructor(e,t){super();let n=this,r=new Ep,i=new qu;n.setTextContent(i),this.setTextGuideLine(r),this.updateData(e,t,!0)}updateData(e,t,n){let r=this,i=e.hostModel,a=e.getItemModel(t),o=e.getItemLayout(t),s=a.getModel(`emphasis`),c=a.get(BV);c=c==null?1:c,n||om(r),r.useStyle(e.getItemVisual(t,`style`)),r.style.lineJoin=`round`,n?(r.setShape({points:o.points}),r.style.opacity=0,tm(r,{style:{opacity:c}},i,t)):em(r,{style:{opacity:c},shape:{points:o.points}},i,t),xf(r,a),this._updateLabel(e,t),_f(this,s.get(`focus`),s.get(`blurScope`),s.get(`disabled`))}_updateLabel(e,t){let n=this,r=this.getTextGuideLine(),i=n.getTextContent(),a=e.hostModel,o=e.getItemModel(t),s=e.getItemLayout(t).label,c=e.getItemVisual(t,`style`),l=c.fill;ih(i,ah(o),{labelFetcher:e.hostModel,labelDataIndex:t,defaultOpacity:c.opacity,defaultText:e.getName(t)},{normal:{align:s.textAlign,verticalAlign:s.verticalAlign}});let u=o.getModel(`label`).get(`color`)===`inherit`?l:null;n.setTextConfig({local:!0,inside:!!s.inside,insideStroke:u,outsideFill:u});let d=s.linePoints;r.setShape({points:d}),n.textGuideLineConfig={anchor:d?new G(d[0][0],d[0][1]):null},em(i,{style:{x:s.x,y:s.y}},a,t),i.attr({rotation:s.rotation,originX:s.x,originY:s.y,z2:10}),ck(n,lk(o),{stroke:l})}},HV=class extends Vb{constructor(...e){super(...e),this.type=RV,this.ignoreLabelLineUpdate=!0}render(e,t,n){let r=e.getData(),i=this._data,a=this.group;r.diff(i).add(function(e){let t=new VV(r,e);r.setItemGraphicEl(e,t),a.add(t)}).update(function(e,t){let n=i.getItemGraphicEl(t);n.updateData(r,e),a.add(n),r.setItemGraphicEl(e,n)}).remove(function(t){am(i.getItemGraphicEl(t),e,t)}).execute(),this._data=r}remove(){this.group.removeAll(),this._data=null}dispose(){}};HV.type=RV;function UV(e,t){let n=e.mapDimension(`value`),r=e.mapArray(n,function(e){return e}),i=[],a=t===`ascending`;for(let t=0,n=e.count();t<n;t++)i[t]=t;return R(t)?i.sort(t):t!==`none`&&i.sort(function(e,t){return a?r[e]-r[t]:r[t]-r[e]}),i}function WV(e){let t=e.hostModel,n=qV(t);e.each(function(t){let r=e.getItemModel(t),i=r.getModel(`label`).get(`position`),a=r.getModel(`labelLine`),o=e.getItemLayout(t),s=o.points,c=i===`inner`||i===`inside`||i===`center`||i===`insideLeft`||i===`insideRight`,l,u,d,f;if(c)i===`insideLeft`?(u=(s[0][0]+s[3][0])/2+5,d=(s[0][1]+s[3][1])/2,l=`left`):i===`insideRight`?(u=(s[1][0]+s[2][0])/2-5,d=(s[1][1]+s[2][1])/2,l=`right`):(u=(s[0][0]+s[1][0]+s[2][0]+s[3][0])/4,d=(s[0][1]+s[1][1]+s[2][1]+s[3][1])/4,l=`center`),f=[[u,d],[u,d]];else{let e,t,r,o,c=a.get(`length`);z(i)&&(!n&&N([`top`,`bottom`],i)>-1&&(i=`left`,typeof process<`u`&&process.env.NODE_ENV!==`production`&&console.warn(`Position error: Funnel chart on vertical orient dose not support top and bottom.`)),n&&N([`left`,`right`],i)>-1&&(i=`bottom`,typeof process<`u`&&process.env.NODE_ENV!==`production`&&console.warn(`Position error: Funnel chart on horizontal orient dose not support left and right.`))),i===`left`?(e=(s[3][0]+s[0][0])/2,t=(s[3][1]+s[0][1])/2,r=e-c,u=r-5,l=`right`):i===`right`?(e=(s[1][0]+s[2][0])/2,t=(s[1][1]+s[2][1])/2,r=e+c,u=r+5,l=`left`):i===`top`?(e=(s[3][0]+s[0][0])/2,t=(s[3][1]+s[0][1])/2,o=t-c,d=o-5,l=`center`):i===`bottom`?(e=(s[1][0]+s[2][0])/2,t=(s[1][1]+s[2][1])/2,o=t+c,d=o+5,l=`center`):i===`rightTop`?(e=n?s[3][0]:s[1][0],t=n?s[3][1]:s[1][1],n?(o=t-c,d=o-5,l=`center`):(r=e+c,u=r+5,l=`top`)):i===`rightBottom`?(e=s[2][0],t=s[2][1],n?(o=t+c,d=o+5,l=`center`):(r=e+c,u=r+5,l=`bottom`)):i===`leftTop`?(e=s[0][0],t=n?s[0][1]:s[1][1],n?(o=t-c,d=o-5,l=`center`):(r=e-c,u=r-5,l=`right`)):i===`leftBottom`?(e=n?s[1][0]:s[3][0],t=n?s[1][1]:s[2][1],n?(o=t+c,d=o+5,l=`center`):(r=e-c,u=r-5,l=`right`)):(e=(s[1][0]+s[2][0])/2,t=(s[1][1]+s[2][1])/2,n?(o=t+c,d=o+5,l=`center`):(r=e+c,u=r+5,l=`left`)),n?(r=e,u=r):(o=t,d=o),f=[[e,t],[r,o]]}o.label={linePoints:f,x:u,y:d,verticalAlign:`middle`,textAlign:l,inside:c}})}const GV=xc(RV,KV);function KV(e,t){e.eachSeriesByType(RV,function(e){let n=e.getData(),r=n.mapDimension(`value`),i=e.get(`sort`),a=d_(e,t),o=c_(e.getBoxLayoutParams(),a.refContainer),s=qV(e),c=o.width,l=o.height,u=UV(n,i),d=o.x,f=o.y,p=s?[J(e.get(`minSize`),l),J(e.get(`maxSize`),l)]:[J(e.get(`minSize`),c),J(e.get(`maxSize`),c)],m=n.getDataExtent(r),h=e.get(`min`),g=e.get(`max`);h==null&&(h=Math.min(m[0],0)),g==null&&(g=m[1]);let _=e.get(`funnelAlign`),v=e.get(`gap`),y=((s?c:l)-v*(n.count()-1))/n.count(),b=function(e,t){if(s){let i=Ao(n.get(r,e)||0,[h,g],p,!0),a;switch(_){case`top`:a=f;break;case`center`:a=f+(l-i)/2;break;case`bottom`:a=f+(l-i)}return[[t,a],[t,a+i]]}let i=Ao(n.get(r,e)||0,[h,g],p,!0),a;switch(_){case`left`:a=d;break;case`center`:a=d+(c-i)/2;break;case`right`:a=d+c-i}return[[a,t],[a+i,t]]};i===`ascending`&&(y=-y,v=-v,s?d+=c:f+=l,u=u.reverse());for(let e=0;e<u.length;e++){let t=u[e],r=u[e+1],a=n.getItemModel(t);if(s){let e=a.get([`itemStyle`,`width`]);e==null?e=y:(e=J(e,c),i===`ascending`&&(e=-e));let o=b(t,d),s=b(r,d+e);d+=e+v,n.setItemLayout(t,{points:o.concat(s.slice().reverse())})}else{let e=a.get([`itemStyle`,`height`]);e==null?e=y:(e=J(e,l),i===`ascending`&&(e=-e));let o=b(t,f),s=b(r,f+e);f+=e+v,n.setItemLayout(t,{points:o.concat(s.slice().reverse())})}}WV(n)})}function qV(e){return e.get(`orient`)===`horizontal`}function JV(e){e.registerChartView(HV),e.registerSeriesModel(zV),e.registerLayout(GV),e.registerProcessor(qM(RV))}var YV=class e extends Vb{constructor(...t){super(...t),this.type=e.type,this._dataGroup=new q,this._initialized=!1}init(){this.group.add(this._dataGroup)}render(e,t,n,r){let i=this._dataGroup;this._progressiveEls=[],i.removeAll();let a=e.getData(),o=this._data,s=e.coordinateSystem,c=s.dimensions,l=$V(e);a.diff(o).add(u).update(d).remove(f).execute();function u(e){eH(QV(a,i,e,c,s),a,e,l)}function d(t,n){let r=o.getItemGraphicEl(n);i.add(r);let u=ZV(a,t,c,s);a.setItemGraphicEl(t,r),em(r,{shape:{points:u}},e,t),om(r),eH(r,a,t,l)}function f(e){let t=o.getItemGraphicEl(e);i.remove(t)}if(!this._initialized){this._initialized=!0;let t=XV(s,e,function(){setTimeout(function(){i.removeClipPath()})});i.setClipPath(t)}this._data=a}incrementalPrepareRender(e,t,n){this._initialized=!0,this._data=null,this._dataGroup.removeAll()}incrementalRender(e,t,n){let r=t.getData(),i=t.coordinateSystem,a=this._progressiveEls=[];for(let n=e.start;n<e.end;n++){let e=QV(r,this._dataGroup,n,i.dimensions,i);e.incremental=vc(t),eH(e,r,n,$V(t)),a.push(e)}}remove(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null}};YV.type=`parallel`;function XV(e,t,n){let r=e.model,i=e.getRect(),a=new Uu({shape:{x:i.x,y:i.y,width:i.width,height:i.height}}),o=r.get(`layout`)===`horizontal`?`width`:`height`;return a.setShape(o,0),tm(a,{shape:{width:i.width,height:i.height}},t,n),a}function ZV(e,t,n,r){let i=[];for(let a=0;a<n.length;a++){let o=n[a],s=e.get(e.mapDimension(o),t);tH(s,r.getAxis(o).type)||i.push(r.dataToPoint(s,o))}return i}function QV(e,t,n,r,i){let a=new Ep({shape:{points:ZV(e,n,r,i)},z2:10});return t.add(a),e.setItemGraphicEl(n,a),a}function $V(e){let t=e.get(`smooth`,!0);return t===!0&&(t=.3),t=ts(t),xe(t)&&(t=0),{smooth:t}}function eH(e,t,n,r){e.useStyle(t.getItemVisual(n,`style`)),e.style.fill=null,e.setShape(`smooth`,r.smooth);let i=t.getItemModel(n),a=i.getModel(`emphasis`);xf(e,i,`lineStyle`),_f(e,a.get(`focus`),a.get(`blurScope`),a.get(`disabled`))}function tH(e,t){return t===`category`?e==null:e==null||isNaN(e)}var nH=class e extends Db{constructor(...t){super(...t),this.type=e.type,this.visualStyleAccessPath=`lineStyle`,this.visualDrawType=`stroke`}getInitialData(e,t){return ST(null,this,{useEncodeDefaulter:I(rH,null,this)})}getRawIndicesByActiveState(e){let t=this.coordinateSystem,n=this.getData(),r=[];return t.eachActiveState(n,function(t,i){e===t&&r.push(n.getRawIndex(i))}),r}};nH.type=`series.parallel`,nH.dependencies=[`parallel`],nH.defaultOption={z:2,coordinateSystem:`parallel`,parallelIndex:0,label:{show:!1},inactiveOpacity:.05,activeOpacity:1,lineStyle:{width:1,opacity:.45,type:`solid`},emphasis:{label:{show:!1}},progressive:300,smooth:!1,animationEasing:`linear`};function rH(e){let t=e.ecModel.getComponent(`parallel`,e.get(`parallelIndex`));if(!t)return;let n={};return P(t.dimensions,function(e){let t=iH(e);n[e]=t}),n}function iH(e){return+e.replace(`dim`,``)}const aH=[`lineStyle`,`opacity`],oH={seriesType:`parallel`,reset:function(e,t){let n=e.coordinateSystem,r={normal:e.get([`lineStyle`,`opacity`]),active:e.get(`activeOpacity`),inactive:e.get(`inactiveOpacity`)};return{progress(e,t){n.eachActiveState(t,function(e,n){let i=r[e];if(e===`normal`&&t.hasItemOption){let e=t.getItemModel(n).get(aH,!0);e!=null&&(i=e)}let a=t.ensureUniqueItemVisual(n,`style`);a.opacity=i},e.start,e.end)}}}};function sH(e){cH(e),lH(e)}function cH(e){if(e.parallel)return;let t=!1;P(e.series,function(e){e&&e.type===`parallel`&&(t=!0)}),t&&(e.parallel=[{}])}function lH(e){P(bs(e.parallelAxis),function(t){if(!B(t))return;let n=t.parallelIndex||0,r=bs(e.parallel)[n];r&&r.parallelAxisDefault&&A(t,r.parallelAxisDefault,!1)})}var uH=class e extends Ib{constructor(...t){super(...t),this.type=e.type}render(e,t,n){this._model=e,this._api=n,this._handlers||(this._handlers={},P(dH,function(e,t){n.getZr().on(t,this._handlers[t]=I(e,this))},this)),Zb(this,`_throttledDispatchExpand`,e.get(`axisExpandRate`),`fixRate`)}dispose(e,t){Qb(this,`_throttledDispatchExpand`),P(this._handlers,function(e,n){t.getZr().off(n,e)}),this._handlers=null}_throttledDispatchExpand(e){this._dispatchExpand(e)}_dispatchExpand(e){e&&this._api.dispatchAction(j({type:`parallelAxisExpand`},e))}};uH.type=`parallel`;const dH={mousedown:function(e){fH(this,`click`)&&(this._mouseDownPoint=[e.offsetX,e.offsetY])},mouseup:function(e){let t=this._mouseDownPoint;if(fH(this,`click`)&&t){let n=[e.offsetX,e.offsetY];if(Math.pow(t[0]-n[0],2)+Math.pow(t[1]-n[1],2)>5)return;let r=this._model.coordinateSystem.getSlidedAxisExpandWindow([e.offsetX,e.offsetY]);r.behavior!==`none`&&this._dispatchExpand({axisExpandWindow:r.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(e){if(this._mouseDownPoint||!fH(this,`mousemove`))return;let t=this._model,n=t.coordinateSystem.getSlidedAxisExpandWindow([e.offsetX,e.offsetY]),r=n.behavior;r===`jump`&&this._throttledDispatchExpand.debounceNextCall(t.get(`axisExpandDebounce`)),this._throttledDispatchExpand(r===`none`?null:{axisExpandWindow:n.axisExpandWindow,animation:r===`jump`?null:{duration:0}})}};function fH(e,t){let n=e._model;return n.get(`axisExpandable`)&&n.get(`axisExpandTriggerOn`)===t}const pH=`parallel`,mH=pH;var hH=class e extends b_{constructor(...t){super(...t),this.type=e.type}init(){super.init.apply(this,arguments),this.mergeOption({})}mergeOption(e){let t=this.option;e&&A(t,e,!0),this._initDimensions()}contains(e,t){let n=e.get(`parallelIndex`);return n!=null&&t.getComponent(`parallel`,n)===this}setAxisExpand(e){P([`axisExpandable`,`axisExpandCenter`,`axisExpandCount`,`axisExpandWidth`,`axisExpandWindow`],function(t){e.hasOwnProperty(t)&&(this.option[t]=e[t])},this)}_initDimensions(){let e=this.dimensions=[],t=this.parallelAxisIndex=[];P(ce(this.ecModel.queryComponents({mainType:`parallelAxis`}),function(e){return(e.get(`parallelIndex`)||0)===this.componentIndex},this),function(n){e.push(`dim`+n.get(`dim`)),t.push(n.componentIndex)})}};hH.type=mH,hH.dependencies=[`parallelAxis`],hH.layoutMode=`box`,hH.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:`horizontal`,axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:`click`,parallelAxisDefault:null};var gH=class extends NO{constructor(e,t,n,r,i){super(e,t,n),this.type=r||`value`,this.axisIndex=i}isHorizontal(){return this.coordinateSystem.getModel().get(`layout`)!==`horizontal`}};function _H(e,t,n,r,i,a){e=e||0;let o=Wo(n[1],-n[0]);if(i!=null&&(i=yH(i,[0,o])),a!=null&&(a=Math.max(a,i==null?0:i)),r===`all`){let e=Math.abs(Wo(t[1],-t[0]));e=yH(e,[0,o]),i=a=yH(e,[i,a]),r=0}t[0]=yH(t[0],n),t[1]=yH(t[1],n);let s=vH(t,r);t[r]+=e;let c=i||0,l=n.slice();s.sign<0?l[0]=Wo(l[0],c):l[1]=Wo(l[1],-c),t[r]=yH(t[r],l);let u;return u=vH(t,r),i!=null&&(u.sign!==s.sign||u.span<i)&&(t[1-r]=Wo(t[r],s.sign*i)),u=vH(t,r),a!=null&&u.span>a&&(t[1-r]=Wo(t[r],u.sign*a)),t}function vH(e,t){let n=e[t]-e[1-t];return{span:Math.abs(n),sign:n>0?-1:n<0?1:t?-1:1}}function yH(e,t){return Math.min(t[1]==null?1/0:t[1],Math.max(t[0]==null?-1/0:t[0],e))}var bH=class{constructor(e,t,n){this.type=pH,this._axesMap=U(),this._axesLayout={},this.dimensions=e.dimensions,this._model=e,this._init(e,t,n)}_init(e,t,n){let r=e.dimensions,i=e.parallelAxisIndex;P(r,function(e,n){let r=i[n],a=t.getComponent(`parallelAxis`,r),o=xE(a),s=this._axesMap.set(e,new gH(e,SE(a,o,!1),[0,0],o,r));s.onBand=LE(s.scale,a),s.inverse=a.get(`inverse`),a.axis=s,s.model=a,s.coordinateSystem=a.coordinateSystem=this},this)}update(e,t){P(this.dimensions,function(e){let t=this._axesMap.get(e);gD(t,1),OD(t)},this)}containPoint(e){let t=this._makeLayoutInfo(),n=t.axisBase,r=t.layoutBase,i=t.pixelDimIndex,a=e[1-i],o=e[i];return a>=n&&a<=n+t.axisLength&&o>=r&&o<=r+t.layoutLength}getModel(){return this._model}resize(e,t){let n=d_(e,t).refContainer;this._rect=c_(e.getBoxLayoutParams(),n),this._layoutAxes()}getRect(){return this._rect}_makeLayoutInfo(){let e=this._model,t=this._rect,n=[`x`,`y`],r=[`width`,`height`],i=e.get(`layout`),a=i===`horizontal`?0:1,o=t[r[a]],s=[0,o],c=this.dimensions.length,l=xH(e.get(`axisExpandWidth`),s),u=xH(e.get(`axisExpandCount`)||0,[0,c]),d=e.get(`axisExpandable`)&&c>3&&c>u&&u>1&&l>0&&o>0,f=e.get(`axisExpandWindow`),p;f?(p=xH(f[1]-f[0],s),f[1]=f[0]+p):(p=xH(l*(u-1),s),f=[l*(e.get(`axisExpandCenter`)||Co(c/2))-p/2],f[1]=f[0]+p);let m=(o-p)/(c-u);m<3&&(m=0);let h=[Co(Fo(f[0]/l,1))+1,wo(Fo(f[1]/l,1))-1],g=m/l*f[0];return{layout:i,pixelDimIndex:a,layoutBase:t[n[a]],layoutLength:o,axisBase:t[n[1-a]],axisLength:t[r[1-a]],axisExpandable:d,axisExpandWidth:l,axisCollapseWidth:m,axisExpandWindow:f,axisCount:c,winInnerIndices:h,axisExpandWindow0Pos:g}}_layoutAxes(){let e=this._rect,t=this._axesMap,n=this.dimensions,r=this._makeLayoutInfo(),i=r.layout;t.each(function(e){let t=[0,r.axisLength],n=+!!e.inverse;e.setExtent(t[n],t[1-n])}),P(n,function(t,n){let a=(r.axisExpandable?CH:SH)(n,r),o={horizontal:{x:a.position,y:r.axisLength},vertical:{x:0,y:a.position}},s={horizontal:Oo/2,vertical:0},c=[o[i].x+e.x,o[i].y+e.y],l=s[i],u=Kt();Zt(u,u,l),Xt(u,u,c),this._axesLayout[t]={position:c,rotation:l,transform:u,axisNameAvailableWidth:a.axisNameAvailableWidth,axisLabelShow:a.axisLabelShow,nameTruncateMaxWidth:a.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)}getAxis(e){return this._axesMap.get(e)}dataToPoint(e,t){return this.axisCoordToPoint(this._axesMap.get(t).dataToCoord(e),t)}eachActiveState(e,t,n,r){n==null&&(n=0),r==null&&(r=e.count());let i=this._axesMap,a=this.dimensions,o=[],s=[];P(a,function(t){o.push(e.mapDimension(t)),s.push(i.get(t).model)});let c=this.hasAxisBrushed();for(let i=n;i<r;i++){let n;if(!c)n=`normal`;else{n=`active`;let t=e.getValues(o,i);for(let e=0,r=a.length;e<r;e++)if(s[e].getActiveState(t[e])===`inactive`){n=`inactive`;break}}t(n,i)}}hasAxisBrushed(){let e=this.dimensions,t=this._axesMap,n=!1;for(let r=0,i=e.length;r<i;r++)t.get(e[r]).model.getActiveState()!==`normal`&&(n=!0);return n}axisCoordToPoint(e,t){let n=this._axesLayout[t];return Tm([e,0],n.transform)}getAxisLayout(e){return k(this._axesLayout[e])}getSlidedAxisExpandWindow(e){let t=this._makeLayoutInfo(),n=t.pixelDimIndex,r=t.axisExpandWindow.slice(),i=r[1]-r[0],a=[0,t.axisExpandWidth*(t.axisCount-1)];if(!this.containPoint(e))return{behavior:`none`,axisExpandWindow:r};let o=e[n]-t.layoutBase-t.axisExpandWindow0Pos,s,c=`slide`,l=t.axisCollapseWidth,u=this._model.get(`axisExpandSlideTriggerArea`),d=u[0]!=null;if(l)d&&l&&o<i*u[0]?(c=`jump`,s=o-i*u[2]):d&&l&&o>i*(1-u[0])?(c=`jump`,s=o-i*(1-u[2])):(s=o-i*u[1])>=0&&(s=o-i*(1-u[1]))<=0&&(s=0),s*=t.axisExpandWidth/l,s?_H(s,r,a,`all`):c=`none`;else{let e=r[1]-r[0],t=a[1]*o/e;r=[bo(0,t-e/2)],r[1]=yo(a[1],r[0]+e),r[0]=r[1]-e}return{axisExpandWindow:r,behavior:c}}};function xH(e,t){return yo(bo(e,t[0]),t[1])}function SH(e,t){let n=t.layoutLength/(t.axisCount-1);return{position:n*e,axisNameAvailableWidth:n,axisLabelShow:!0}}function CH(e,t){let n=t.layoutLength,r=t.axisExpandWidth,i=t.axisCount,a=t.axisCollapseWidth,o=t.winInnerIndices,s,c=a,l=!1,u;return e<o[0]?(s=e*a,u=a):e<=o[1]?(s=t.axisExpandWindow0Pos+e*r-t.axisExpandWindow[0],c=r,l=!0):(s=n-(i-1-e)*a,u=a),{position:s,axisNameAvailableWidth:c,axisLabelShow:l,nameTruncateMaxWidth:u}}function wH(e,t){let n=[];return e.eachComponent(mH,function(r,i){let a=new bH(r,e,t);a.name=`parallel_`+i,a.resize(r,t),r.coordinateSystem=a,a.model=r,n.push(a)}),e.eachSeries(function(e){if(e.get(`coordinateSystem`)===`parallel`){let t=e.coordinateSystem=e.getReferringComponents(mH,qs).models[0].coordinateSystem;t&&P(t.dimensions,function(n){rD(t.getAxis(n),e,pH)})}}),n}const TH={create:wH};var EH=class e extends b_{constructor(...t){super(...t),this.type=e.type,this.activeIntervals=[]}getAreaSelectStyle(){return Ic([[`fill`,`color`],[`lineWidth`,`borderWidth`],[`stroke`,`borderColor`],[`width`,`width`],[`opacity`,`opacity`]])(this.getModel(`areaSelectStyle`))}setActiveIntervals(e){let t=this.activeIntervals=k(e);if(t)for(let e=t.length-1;e>=0;e--)Lo(t[e])}getActiveState(e){let t=this.activeIntervals;if(!t.length)return`normal`;if(e==null||isNaN(+e))return`inactive`;if(t.length===1){let n=t[0];if(n[0]<=e&&e<=n[1])return`active`}else for(let n=0,r=t.length;n<r;n++)if(t[n][0]<=e&&e<=t[n][1])return`active`;return`inactive`}};ae(EH,RE);const DH=Math.min,OH=Math.max,kH=Math.pow,AH=`globalPan`,jH={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},MH={w:`ew`,e:`ew`,n:`ns`,s:`ns`,ne:`nesw`,sw:`nesw`,nw:`nwse`,se:`nwse`},NH={brushStyle:{lineWidth:2,stroke:Q.color.backgroundTint,fill:Q.color.borderTint},transformable:!0,brushMode:`single`,removeOnClick:!1};let PH=0;var FH=class extends mt{constructor(e){super(),this._track=[],this._covers=[],this._handlers={},typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(e),this._zr=e,this.group=new q,this._uid=`brushController_`+PH++,P(pU,function(e,t){this._handlers[t]=I(e,this)},this)}enableBrush(e){return typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(this._mounted),this._brushType&&this._doDisableBrush(),e.brushType&&this._doEnableBrush(e),this}_doEnableBrush(e){let t=this._zr;this._enableGlobalPan||QP(t,AH,this._uid),P(this._handlers,function(e,n){t.on(n,e)}),this._brushType=e.brushType,this._brushOption=A(k(NH),e,!0)}_doDisableBrush(){let e=this._zr;$P(e,AH,this._uid),P(this._handlers,function(t,n){e.off(n,t)}),this._brushType=this._brushOption=null}setPanels(e){if(e&&e.length){let t=this._panels={};P(e,function(e){t[e.panelId]=k(e)})}else this._panels=null;return this}mount(e){e=e||{},typeof process<`u`&&process.env.NODE_ENV!==`production`&&(this._mounted=!0),this._enableGlobalPan=e.enableGlobalPan;let t=this.group;return this._zr.add(t),t.attr({x:e.x||0,y:e.y||0,rotation:e.rotation||0,scaleX:e.scaleX||1,scaleY:e.scaleY||1}),this._transform=t.getLocalTransform(),this}updateCovers(e){typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(this._mounted);let t=this._brushOption||NH;e=F(e,function(e){return A(k(t),e,!0)});let n=this._covers,r=this._covers=[],i=this,a=this._creatingCover;return new Pw(n,e,s,o).add(c).update(c).remove(l).execute(),this;function o(e,t){return(e.id==null?`\0-brush-index-`+t:e.id)+`-`+e.brushType}function s(e,t){return o(e.__brushOption,t)}function c(t,o){let s=e[t];if(o!=null&&n[o]===a)r[t]=n[o];else{let e=r[t]=o==null?LH(i,IH(i,s)):(n[o].__brushOption=s,n[o]);BH(i,e)}}function l(e){n[e]!==a&&i.group.remove(n[e])}}unmount(){if(typeof process>`u`||process.env.NODE_ENV===`production`||this._mounted)return this.enableBrush(!1),WH(this),this._zr.remove(this.group),typeof process<`u`&&process.env.NODE_ENV!==`production`&&(this._mounted=!1),this}dispose(){this.unmount(),this.off()}};function IH(e,t){let n=gU[t.brushType].createCover(e,t);return n.__brushOption=t,zH(n,t),e.group.add(n),n}function LH(e,t){let n=VH(t);return n.endCreating&&(n.endCreating(e,t),zH(t,t.__brushOption)),t}function RH(e,t){let n=t.__brushOption;VH(t).updateCoverShape(e,t,n.range,n)}function zH(e,t){let n=t.z;n==null&&(n=1e4),e.traverse(function(e){e.z=n,e.z2=n})}function BH(e,t){VH(t).updateCommon(e,t),RH(e,t)}function VH(e){return gU[e.__brushOption.brushType]}function HH(e,t,n){let r=e._panels;if(!r)return!0;let i,a=e._transform;return P(r,function(e){e.isTargetByCursor(t,n,a)&&(i=e)}),i}function UH(e,t){let n=e._panels;if(!n)return!0;let r=t.__brushOption.panelId;return r==null||n[r]}function WH(e){let t=e._covers,n=t.length;return P(t,function(t){e.group.remove(t)},e),t.length=0,!!n}function GH(e,t){let n=F(e._covers,function(e){let t=e.__brushOption,n=k(t.range);return{brushType:t.brushType,panelId:t.panelId,range:n}});e.trigger(`brush`,{areas:n,isEnd:!!t.isEnd,removeOnClick:!!t.removeOnClick})}function KH(e){let t=e._track;if(!t.length)return!1;let n=t[t.length-1],r=t[0],i=n[0]-r[0],a=n[1]-r[1];return kH(i*i+a*a,.5)>6}function qH(e){let t=e.length-1;return t<0&&(t=0),[e[0],e[t]]}function JH(e,t,n,r){let i=new q;return i.add(new Uu({name:`main`,style:QH(n),silent:!0,draggable:!0,cursor:`move`,drift:fe(rU,e,t,i,[`n`,`s`,`w`,`e`]),ondragend:fe(GH,t,{isEnd:!0})})),P(r,function(n){i.add(new Uu({name:n.join(``),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:fe(rU,e,t,i,n),ondragend:fe(GH,t,{isEnd:!0})}))}),i}function YH(e,t,n,r){let i=r.brushStyle.lineWidth||0,a=OH(i,6),o=n[0][0],s=n[1][0],c=o-i/2,l=s-i/2,u=n[0][1],d=n[1][1],f=u-a+i/2,p=d-a+i/2,m=u-o,h=d-s,g=m+i,_=h+i;ZH(e,t,`main`,o,s,m,h),r.transformable&&(ZH(e,t,`w`,c,l,a,_),ZH(e,t,`e`,f,l,a,_),ZH(e,t,`n`,c,l,g,a),ZH(e,t,`s`,c,p,g,a),ZH(e,t,`nw`,c,l,a,a),ZH(e,t,`ne`,f,l,a,a),ZH(e,t,`sw`,c,p,a,a),ZH(e,t,`se`,f,p,a,a))}function XH(e,t){let n=t.__brushOption,r=n.transformable,i=t.childAt(0);i.useStyle(QH(n)),i.attr({silent:!r,cursor:r?`move`:`default`}),P([[`w`],[`e`],[`n`],[`s`],[`s`,`e`],[`s`,`w`],[`n`,`e`],[`n`,`w`]],function(n){let i=t.childOfName(n.join(``)),a=n.length===1?tU(e,n[0]):nU(e,n);i&&i.attr({silent:!r,invisible:!r,cursor:r?MH[a]+`-resize`:null})})}function ZH(e,t,n,r,i,a,o){let s=t.childOfName(n);s&&s.setShape(sU(oU(e,t,[[r,i],[r+a,i+o]])))}function QH(e){return M({strokeNoScale:!0},e.brushStyle)}function $H(e,t,n,r){let i=[DH(e,n),DH(t,r)],a=[OH(e,n),OH(t,r)];return[[i[0],a[0]],[i[1],a[1]]]}function eU(e){return wm(e.group)}function tU(e,t){return{left:`w`,right:`e`,top:`n`,bottom:`s`}[Em({w:`left`,e:`right`,n:`top`,s:`bottom`}[t],eU(e))]}function nU(e,t){let n=[tU(e,t[0]),tU(e,t[1])];return(n[0]===`e`||n[0]===`w`)&&n.reverse(),n.join(``)}function rU(e,t,n,r,i,a){let o=n.__brushOption,s=e.toRectRange(o.range),c=aU(t,i,a);P(r,function(e){let t=jH[e];s[t[0]][t[1]]+=c[t[0]]}),o.range=e.fromRectRange($H(s[0][0],s[1][0],s[0][1],s[1][1])),BH(t,n),GH(t,{isEnd:!1})}function iU(e,t,n,r){let i=t.__brushOption.range,a=aU(e,n,r);P(i,function(e){e[0]+=a[0],e[1]+=a[1]}),BH(e,t),GH(e,{isEnd:!1})}function aU(e,t,n){let r=e.group,i=r.transformCoordToLocal(t,n),a=r.transformCoordToLocal(0,0);return[i[0]-a[0],i[1]-a[1]]}function oU(e,t,n){let r=UH(e,t);return r&&r!==!0?r.clipPath(n,e._transform):k(n)}function sU(e){let t=DH(e[0][0],e[1][0]),n=DH(e[0][1],e[1][1]),r=OH(e[0][0],e[1][0]),i=OH(e[0][1],e[1][1]);return{x:t,y:n,width:r-t,height:i-n}}function cU(e,t,n){if(!e._brushType||hU(e,t.offsetX,t.offsetY))return;let r=e._zr,i=e._covers,a=HH(e,t,n);if(!e._dragging)for(let e=0;e<i.length;e++){let t=i[e].__brushOption;if(a&&(a===!0||t.panelId===a.panelId)&&gU[t.brushType].contain(i[e],n[0],n[1]))return}a&&r.setCursorStyle(`crosshair`)}function lU(e){let t=e.event;t.preventDefault&&t.preventDefault()}function uU(e,t,n){return e.childOfName(`main`).contain(t,n)}function dU(e,t,n,r){let i=e._creatingCover,a=e._creatingPanel,o=e._brushOption,s;if(e._track.push(n.slice()),KH(e)||i){if(a&&!i){o.brushMode===`single`&&WH(e);let t=k(o);t.brushType=fU(t.brushType,a),t.panelId=a===!0?null:a.panelId,i=e._creatingCover=IH(e,t),e._covers.push(i)}if(i){let t=gU[fU(e._brushType,a)],n=i.__brushOption;n.range=t.getCreatingRange(oU(e,i,e._track)),r&&(LH(e,i),t.updateCommon(e,i)),RH(e,i),s={isEnd:r}}}else r&&o.brushMode===`single`&&o.removeOnClick&&HH(e,t,n)&&WH(e)&&(s={isEnd:r,removeOnClick:!0});return s}function fU(e,t){return e===`auto`?(typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(t&&t.defaultBrushType,`MUST have defaultBrushType when brushType is "atuo"`),t.defaultBrushType):e}const pU={mousedown:function(e){if(this._dragging)mU(this,e);else if(!e.target||!e.target.draggable){lU(e);let t=this.group.transformCoordToLocal(e.offsetX,e.offsetY);this._creatingCover=null,(this._creatingPanel=HH(this,e,t))&&(this._dragging=!0,this._track=[t.slice()])}},mousemove:function(e){let t=e.offsetX,n=e.offsetY,r=this.group.transformCoordToLocal(t,n);if(cU(this,e,r),this._dragging){lU(e);let t=dU(this,e,r,!1);t&&GH(this,t)}},mouseup:function(e){mU(this,e)}};function mU(e,t){if(e._dragging){lU(t);let n=t.offsetX,r=t.offsetY,i=dU(e,t,e.group.transformCoordToLocal(n,r),!0);e._dragging=!1,e._track=[],e._creatingCover=null,i&&GH(e,i)}}function hU(e,t,n){let r=e._zr;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}const gU={lineX:_U(0),lineY:_U(1),rect:{createCover:function(e,t){function n(e){return e}return JH({toRectRange:n,fromRectRange:n},e,t,[[`w`],[`e`],[`n`],[`s`],[`s`,`e`],[`s`,`w`],[`n`,`e`],[`n`,`w`]])},getCreatingRange:function(e){let t=qH(e);return $H(t[1][0],t[1][1],t[0][0],t[0][1])},updateCoverShape:function(e,t,n,r){YH(e,t,n,r)},updateCommon:XH,contain:uU},polygon:{createCover:function(e,t){let n=new q;return n.add(new Ep({name:`main`,style:QH(t),silent:!0})),n},getCreatingRange:function(e){return e},endCreating:function(e,t){t.remove(t.childAt(0)),t.add(new wp({name:`main`,draggable:!0,drift:fe(iU,e,t),ondragend:fe(GH,e,{isEnd:!0})}))},updateCoverShape:function(e,t,n,r){t.childAt(0).setShape({points:oU(e,t,n)})},updateCommon:XH,contain:uU}};function _U(e){return{createCover:function(t,n){return JH({toRectRange:function(t){let n=[t,[0,100]];return e&&n.reverse(),n},fromRectRange:function(t){return t[e]}},t,n,[[[`w`],[`e`]],[[`n`],[`s`]]][e])},getCreatingRange:function(t){let n=qH(t);return[DH(n[0][e],n[1][e]),OH(n[0][e],n[1][e])]},updateCoverShape:function(t,n,r,i){let a,o=UH(t,n);if(o!==!0&&o.getLinearBrushOtherExtent)a=o.getLinearBrushOtherExtent(e);else{let n=t._zr;a=[0,[n.getWidth(),n.getHeight()][1-e]]}let s=[r,a];e&&s.reverse(),YH(t,n,s,i)},updateCommon:XH,contain:uU}}function vU(e){return e=xU(e),function(t){return Am(t,e)}}function yU(e,t){return e=xU(e),function(n){let r=t==null?n:t,i=r?e.width:e.height,a=r?e.x:e.y;return[a,a+(i||0)]}}function bU(e,t,n){let r=xU(e);return function(e,i){return r.contain(i[0],i[1])&&!nF(e,t,n)}}function xU(e){return K.create(e)}var SU=class e extends Ib{constructor(...t){super(...t),this.type=e.type}init(e,t){super.init.apply(this,arguments),(this._brushController=new FH(t.getZr())).on(`brush`,I(this._onBrush,this))}render(e,t,n,r){if(CU(e,t,r))return;this.axisModel=e,this.api=n,this.group.removeAll();let i=this._axisGroup;if(this._axisGroup=new q,this.group.add(this._axisGroup),!e.get(`show`))return;let a=TU(e,t),o=a.coordinateSystem,s=e.getAreaSelectStyle(),c=s.width,l=e.axis.dim,u=o.getAxisLayout(l),d=j({strokeContainThreshold:c},u),f=new pj(e,n,d);f.build(),this._axisGroup.add(f.group),this._refreshBrushController(d,s,e,a,c,n),km(i,this._axisGroup,e)}_refreshBrushController(e,t,n,r,i,a){let o=n.axis.getExtent(),s=o[1]-o[0],c=Math.min(30,Math.abs(s)*.1),l=K.create({x:o[0],y:-i/2,width:s,height:i});l.x-=c,l.width+=2*c,this._brushController.mount({enableGlobalPan:!0,rotation:e.rotation,x:e.position[0],y:e.position[1]}).setPanels([{panelId:`pl`,clipPath:vU(l),isTargetByCursor:bU(l,a,r),getLinearBrushOtherExtent:yU(l,0)}]).enableBrush({brushType:`lineX`,brushStyle:t,removeOnClick:!0}).updateCovers(wU(n))}_onBrush(e){let t=e.areas,n=this.axisModel,r=n.axis,i=F(t,function(e){return[r.coordToData(e.range[0],!0),r.coordToData(e.range[1],!0)]});(!n.option.realtime===e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:`axisAreaSelect`,parallelAxisId:n.id,intervals:i})}dispose(){this._brushController.dispose()}};SU.type=`parallelAxis`;function CU(e,t,n){return n&&n.type===`axisAreaSelect`&&t.findComponents({mainType:`parallelAxis`,query:n})[0]===e}function wU(e){let t=e.axis;return F(e.activeIntervals,function(e){return{brushType:`lineX`,panelId:`pl`,range:[t.dataToCoord(e[0],!0),t.dataToCoord(e[1],!0)]}})}function TU(e,t){return t.getComponent(`parallel`,e.get(`parallelIndex`))}const EU={type:`axisAreaSelect`,event:`axisAreaSelected`};function DU(e){e.registerAction(EU,function(e,t){t.eachComponent({mainType:`parallelAxis`,query:e},function(t){t.axis.model.setActiveIntervals(e.intervals)})}),e.registerAction(`parallelAxisExpand`,function(e,t){t.eachComponent({mainType:`parallel`,query:e},function(t){t.setAxisExpand(e)})})}const OU={type:`value`,areaSelectStyle:{width:20,borderWidth:1,borderColor:`rgba(160,197,232)`,color:`rgba(160,197,232)`,opacity:.3},realtime:!0,z:10};function kU(e){e.registerComponentView(uH),e.registerComponentModel(hH),e.registerCoordinateSystem(`parallel`,TH),e.registerPreprocessor(sH),e.registerComponentModel(EH),e.registerComponentView(SU),DN(e,`parallel`,EH,OU),DU(e)}function AU(e){BD(kU),e.registerChartView(YV),e.registerSeriesModel(nH),e.registerVisual(e.PRIORITY.VISUAL.BRUSH,oH)}const jU=`sankey`;var MU=class e extends Db{constructor(...t){super(...t),this.type=e.type}getInitialData(e,t){let n=e.edges||e.links||[],r=e.data||e.nodes||[],i=e.levels||[];this.levelModels=[];let a=this.levelModels;for(let e=0;e<i.length;e++)if(i[e].depth!=null&&i[e].depth>=0)a[i[e].depth]=new kh(i[e],this,t);else if(typeof process<`u`&&process.env.NODE_ENV!==`production`)throw Error(`levels[i].depth is mandatory and should be natural number`);return iB(r,n,this,!0,o).data;function o(e,t){e.wrapMethod(`getItemModel`,function(e,t){let n=e.parentModel,r=n.getData().getItemLayout(t);if(r){let t=r.depth,i=n.levelModels[t];i&&(e.parentModel=i)}return e}),t.wrapMethod(`getItemModel`,function(e,t){let n=e.parentModel,r=n.getGraph().getEdgeByIndex(t).node1.getLayout();if(r){let t=r.depth,i=n.levelModels[t];i&&(e.parentModel=i)}return e})}}setNodePosition(e,t){let n=(this.option.data||this.option.nodes)[e];n.localX=t[0],n.localY=t[1]}getGraph(){return this.getData().graph}getEdgeData(){return this.getGraph().edgeData}formatTooltip(e,t,n){function r(e){return isNaN(e)||e==null}if(n===`edge`){let t=this.getDataParams(e,n),i=t.data,a=t.value;return ab(`nameValue`,{name:i.source+` -- `+i.target,value:a,noValue:r(a)})}{let t=this.getGraph().getNodeByIndex(e).getLayout().value,i=this.getDataParams(e,n).data.name;return ab(`nameValue`,{name:i==null?null:i+``,value:t,noValue:r(t)})}}optionUpdated(){}getDataParams(e,t){let n=super.getDataParams(e,t);return n.value==null&&t===`node`&&(n.value=this.getGraph().getNodeByIndex(e).getLayout().value),n}__ownRoamView(){return this.coordinateSystem}};MU.type=`series.sankey`,MU.layoutMode=`box`,MU.defaultOption={z:2,coordinateSystemUsage:`box`,left:`5%`,top:`5%`,right:`20%`,bottom:`5%`,orient:`horizontal`,nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,sort:`desc`,roam:!1,roamTrigger:`global`,center:null,zoom:1,label:{show:!0,position:`right`,fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:`justify`,lineStyle:{color:Q.color.neutral50,opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:Q.color.primary}},animationEasing:`linear`,animationDuration:1e3};var NU=class{constructor(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.cpx2=0,this.cpy2=0,this.extent=0}},PU=class extends Ou{constructor(e){super(e)}getDefaultShape(){return new NU}buildPath(e,t){let n=t.extent;e.moveTo(t.x1,t.y1),e.bezierCurveTo(t.cpx1,t.cpy1,t.cpx2,t.cpy2,t.x2,t.y2),t.orient===`vertical`?(e.lineTo(t.x2+n,t.y2),e.bezierCurveTo(t.cpx2+n,t.cpy2,t.cpx1+n,t.cpy1,t.x1+n,t.y1)):(e.lineTo(t.x2,t.y2+n),e.bezierCurveTo(t.cpx2,t.cpy2+n,t.cpx1,t.cpy1+n,t.x1,t.y1+n)),e.closePath()}highlight(){Zd(this)}downplay(){Qd(this)}},FU=class extends Vb{constructor(...e){super(...e),this.type=jU,this._mainGroup=new q}init(e,t){this._controller=new rF(t.getZr()),this.group.add(this._mainGroup),this._firstRender=!0}render(e,t,n){let r=e.getGraph(),i=this._mainGroup,a=e.layoutInfo,o=a.width,s=a.height,c=e.getData(),l=e.getData(`edge`),u=e.get(`orient`);i.removeAll(),i.x=a.x,i.y=a.y,this._updateViewCoordSys(e,n),ZI(e,n,this._controller,QI(i),null),r.eachEdge(function(t){let n=new PU,r=X(n);r.dataIndex=t.dataIndex,r.seriesIndex=e.seriesIndex,r.dataType=`edge`;let a=t.getModel(),c=a.getModel(`lineStyle`),d=c.get(`curveness`),f=t.node1.getLayout(),p=t.node1.getModel(),m=p.get(`localX`),h=p.get(`localY`),g=t.node2.getLayout(),_=t.node2.getModel(),v=_.get(`localX`),y=_.get(`localY`),b=t.getLayout(),x,S,C,w,T,E,D,O;n.shape.extent=Math.max(1,b.dy),n.shape.orient=u,u===`vertical`?(x=(m==null?f.x:m*o)+b.sy,S=(h==null?f.y:h*s)+f.dy,C=(v==null?g.x:v*o)+b.ty,w=y==null?g.y:y*s,T=x,E=S*(1-d)+w*d,D=C,O=S*d+w*(1-d)):(x=(m==null?f.x:m*o)+f.dx,S=(h==null?f.y:h*s)+b.sy,C=v==null?g.x:v*o,w=(y==null?g.y:y*s)+b.ty,T=x*(1-d)+C*d,E=S,D=x*d+C*(1-d),O=w),n.setShape({x1:x,y1:S,x2:C,y2:w,cpx1:T,cpy1:E,cpx2:D,cpy2:O}),n.useStyle(c.getItemStyle()),IU(n.style,u,t);let ee=`${a.get(`value`)}`,k=ah(a,`edgeLabel`);ih(n,k,{labelFetcher:{getFormattedLabel(t,n,r,i,a,o){return e.getFormattedLabel(t,n,`edge`,i,Ce(a,k.normal&&k.normal.get(`formatter`),ee),o)}},labelDataIndex:t.dataIndex,defaultText:ee}),n.setTextConfig({position:`inside`});let A=a.getModel(`emphasis`);xf(n,a,`lineStyle`,e=>{let n=e.getItemStyle();return IU(n,u,t),n}),i.add(n),l.setItemGraphicEl(t.dataIndex,n);let te=A.get(`focus`);_f(n,te===`adjacency`?t.getAdjacentDataIndices():te===`trajectory`?t.getTrajectoryDataIndices():te,A.get(`blurScope`),A.get(`disabled`))}),r.eachNode(function(t){let n=t.getLayout(),r=t.getModel(),a=r.get(`localX`),l=r.get(`localY`),u=r.getModel(`emphasis`),d=r.get([`itemStyle`,`borderRadius`])||0,f=new Uu({shape:{x:a==null?n.x:a*o,y:l==null?n.y:l*s,width:n.dx,height:n.dy,r:d},style:r.getModel(`itemStyle`).getItemStyle(),z2:10});ih(f,ah(r),{labelFetcher:{getFormattedLabel(t,n){return e.getFormattedLabel(t,n,`node`)}},labelDataIndex:t.dataIndex,defaultText:t.id}),f.disableLabelAnimation=!0,f.setStyle(`fill`,t.getVisual(`color`)),f.setStyle(`decal`,t.getVisual(`style`).decal),xf(f,r),i.add(f),c.setItemGraphicEl(t.dataIndex,f),X(f).dataType=`node`;let p=u.get(`focus`);_f(f,p===`adjacency`?t.getAdjacentDataIndices():p===`trajectory`?t.getTrajectoryDataIndices():p,u.get(`blurScope`),u.get(`disabled`))}),c.eachItemGraphicEl(function(t,r){c.getItemModel(r).get(`draggable`)&&(t.drift=function(t,i){this.shape.x+=t,this.shape.y+=i,this.dirty(),n.dispatchAction({type:`dragNode`,seriesId:e.id,dataIndex:c.getRawIndex(r),localX:this.shape.x/o,localY:this.shape.y/s})},t.draggable=!0,t.cursor=`move`)}),!this._data&&e.isAnimationEnabled()&&i.setClipPath(LU(i.getBoundingRect(),e,function(){i.removeClipPath()})),this._data=e.getData(),this._firstRender=!1}__updateOnOwnRoam(e,t,n){NI(this.group,2,t.coordinateSystem,null)}dispose(){this._controller&&this._controller.dispose()}_updateViewCoordSys(e,t){let n=e.layoutInfo,r=e.coordinateSystem=rL(e,t,n.x,n.y,n.width,n.height);NI(this.group,2,r,this._firstRender?null:e)}};FU.type=jU;function IU(e,t,n){switch(e.fill){case`source`:e.fill=n.node1.getVisual(`color`),e.decal=n.node1.getVisual(`style`).decal;break;case`target`:e.fill=n.node2.getVisual(`color`),e.decal=n.node2.getVisual(`style`).decal;break;case`gradient`:let r=n.node1.getVisual(`color`),i=n.node2.getVisual(`color`);z(r)&&z(i)&&(e.fill=new Rp(0,0,+(t===`horizontal`),+(t===`vertical`),[{color:r,offset:0},{color:i,offset:1}]))}}function LU(e,t,n){let r=new Uu({shape:{x:e.x-10,y:e.y-10,width:0,height:e.height+20}});return tm(r,{shape:{width:e.width+20}},t,n),r}const RU=xc(jU,zU);function zU(e,t){e.eachSeriesByType(jU,function(e){let n=e.get(`nodeWidth`),r=e.get(`nodeGap`),i=d_(e,t).refContainer,a=c_(e.getBoxLayoutParams(),i);e.layoutInfo=a;let o=a.width,s=a.height,c=e.getGraph(),l=c.nodes,u=c.edges;VU(l),BU(l,u,n,r,o,s,ce(l,function(e){return e.getLayout().value===0}).length===0?e.get(`layoutIterations`):0,e.get(`orient`),e.get(`nodeAlign`),e.get(`sort`))})}function BU(e,t,n,r,i,a,o,s,c,l){HU(e,t,n,i,a,s,c),qU(e,t,a,i,r,o,s,l),oW(e,s)}function VU(e){P(e,function(e){let t=iW(e.outEdges,rW),n=iW(e.inEdges,rW),r=e.getValue()||0,i=Math.max(t,n,r);e.setLayout({value:i},!0)})}function HU(e,t,n,r,i,a,o){let s=[],c=[],l=[],u=[],d=0;for(let e=0;e<t.length;e++)s[e]=1;for(let t=0;t<e.length;t++)c[t]=e[t].inEdges.length,c[t]===0&&l.push(e[t]);let f=-1;for(;l.length;){for(let r=0;r<l.length;r++){let i=l[r],o=i.hostGraph.data.getRawDataItem(i.dataIndex),p=o.depth!=null&&o.depth>=0;p&&o.depth>f&&(f=o.depth),i.setLayout({depth:p?o.depth:d},!0),a===`vertical`?i.setLayout({dy:n},!0):i.setLayout({dx:n},!0);for(let n=0;n<i.outEdges.length;n++){let r=i.outEdges[n],a=N(t,r);s[a]=0;let o=r.node2,l=N(e,o);--c[l]===0&&N(u,o)<0&&u.push(o)}}++d,l=u,u=[]}for(let e=0;e<s.length;e++)if(s[e]===1)throw Error(`Sankey is a DAG, the original data has cycle!`);let p=f>d-1?f:d-1;o&&o!==`left`&&WU(e,o,a,p),KU(e,a===`vertical`?(i-n)/p:(r-n)/p,a)}function UU(e){let t=e.hostGraph.data.getRawDataItem(e.dataIndex);return t.depth!=null&&t.depth>=0}function WU(e,t,n,r){if(t===`right`){let t=[],n=e,i=0;for(;n.length;){for(let e=0;e<n.length;e++){let r=n[e];r.setLayout({skNodeHeight:i},!0);for(let e=0;e<r.inEdges.length;e++){let n=r.inEdges[e];N(t,n.node1)<0&&t.push(n.node1)}}n=t,t=[],++i}P(e,function(e){UU(e)||e.setLayout({depth:Math.max(0,r-e.getLayout().skNodeHeight)},!0)})}else t===`justify`&&GU(e,r)}function GU(e,t){P(e,function(e){!UU(e)&&!e.outEdges.length&&e.setLayout({depth:t},!0)})}function KU(e,t,n){P(e,function(e){let r=e.getLayout().depth*t;n===`vertical`?e.setLayout({y:r},!0):e.setLayout({x:r},!0)})}function qU(e,t,n,r,i,a,o,s){let c=JU(e,o);YU(c,t,n,r,i,o),XU(c,i,n,r,o,s);for(let e=1;a>0;a--)e*=.99,ZU(c,e,o),XU(c,i,n,r,o,s),aW(c,e,o),XU(c,i,n,r,o,s)}function JU(e,t){let n=[],r=t===`vertical`?`y`:`x`,i=ec(e,function(e){return e.getLayout()[r]});return Lo(i.keys),P(i.keys,function(e){n.push(i.buckets.get(e))}),n}function YU(e,t,n,r,i,a){let o=1/0;P(e,function(e){let t=e.length,s=0;P(e,function(e){s+=e.getLayout().value});let c=a===`vertical`?(r-(t-1)*i)/s:(n-(t-1)*i)/s;c<o&&(o=c)}),P(e,function(e){P(e,function(e,t){let n=e.getLayout().value*o;a===`vertical`?(e.setLayout({x:t},!0),e.setLayout({dx:n},!0)):(e.setLayout({y:t},!0),e.setLayout({dy:n},!0))})}),P(t,function(e){let t=+e.getValue()*o;e.setLayout({dy:t},!0)})}function XU(e,t,n,r,i,a){let o=i===`vertical`?`x`:`y`;P(e,function(e){a!==null&&e.sort(function(e,t){return e.getLayout()[o]-t.getLayout()[o]});let s,c,l,u=0,d=e.length,f=i===`vertical`?`dx`:`dy`;for(let n=0;n<d;n++)c=e[n],l=u-c.getLayout()[o],l>0&&(s=c.getLayout()[o]+l,i===`vertical`?c.setLayout({x:s},!0):c.setLayout({y:s},!0)),u=c.getLayout()[o]+c.getLayout()[f]+t;let p=i===`vertical`?r:n;if(l=u-t-p,l>0){s=c.getLayout()[o]-l,i===`vertical`?c.setLayout({x:s},!0):c.setLayout({y:s},!0),u=s;for(let n=d-2;n>=0;--n)c=e[n],l=c.getLayout()[o]+c.getLayout()[f]+t-u,l>0&&(s=c.getLayout()[o]-l,i===`vertical`?c.setLayout({x:s},!0):c.setLayout({y:s},!0)),u=c.getLayout()[o]}})}function ZU(e,t,n){P(e.slice().reverse(),function(e){P(e,function(e){if(e.outEdges.length){let r=iW(e.outEdges,QU,n)/iW(e.outEdges,rW);if(isNaN(r)){let t=e.outEdges.length;r=t?iW(e.outEdges,$U,n)/t:0}if(n===`vertical`){let i=e.getLayout().x+(r-nW(e,n))*t;e.setLayout({x:i},!0)}else{let i=e.getLayout().y+(r-nW(e,n))*t;e.setLayout({y:i},!0)}}})})}function QU(e,t){return nW(e.node2,t)*e.getValue()}function $U(e,t){return nW(e.node2,t)}function eW(e,t){return nW(e.node1,t)*e.getValue()}function tW(e,t){return nW(e.node1,t)}function nW(e,t){return t===`vertical`?e.getLayout().x+e.getLayout().dx/2:e.getLayout().y+e.getLayout().dy/2}function rW(e){return e.getValue()}function iW(e,t,n){let r=0,i=e.length,a=-1;for(;++a<i;){let i=+t(e[a],n);isNaN(i)||(r+=i)}return r}function aW(e,t,n){P(e,function(e){P(e,function(e){if(e.inEdges.length){let r=iW(e.inEdges,eW,n)/iW(e.inEdges,rW);if(isNaN(r)){let t=e.inEdges.length;r=t?iW(e.inEdges,tW,n)/t:0}if(n===`vertical`){let i=e.getLayout().x+(r-nW(e,n))*t;e.setLayout({x:i},!0)}else{let i=e.getLayout().y+(r-nW(e,n))*t;e.setLayout({y:i},!0)}}})})}function oW(e,t){let n=t===`vertical`?`x`:`y`;P(e,function(e){e.outEdges.sort(function(e,t){return e.node2.getLayout()[n]-t.node2.getLayout()[n]}),e.inEdges.sort(function(e,t){return e.node1.getLayout()[n]-t.node1.getLayout()[n]})}),P(e,function(e){let t=0,n=0;P(e.outEdges,function(e){e.setLayout({sy:t},!0),t+=e.getLayout().dy}),P(e.inEdges,function(e){e.setLayout({ty:n},!0),n+=e.getLayout().dy})})}const sW=xc(jU,cW);function cW(e){e.eachSeriesByType(jU,function(e){let t=e.getGraph(),n=t.nodes,r=t.edges;if(n.length){let t=1/0,r=-1/0;P(n,function(e){let n=e.getLayout().value;n<t&&(t=n),n>r&&(r=n)}),P(n,function(n){let i=new Oz({type:`color`,mappingMethod:`linear`,dataExtent:[t,r],visual:e.get(`color`)}).mapValueToVisual(n.getLayout().value),a=n.getModel().get([`itemStyle`,`color`]);a==null?(n.setVisual(`color`,i),n.setVisual(`style`,{fill:i})):(n.setVisual(`color`,a),n.setVisual(`style`,{fill:a}))})}r.length&&P(r,function(e){let t=e.getModel().get(`lineStyle`);e.setVisual(`style`,t)})})}function lW(e){e.registerChartView(FU),e.registerSeriesModel(MU),e.registerLayout(RU),e.registerVisual(sW),e.registerAction({type:`dragNode`,event:`dragnode`,update:`update`},function(e,t){t.eachComponent({mainType:cd,subType:jU,query:e},function(t){t.setNodePosition(e.dataIndex,[e.localX,e.localY])})}),eL(e,cd,jU)}var uW=class{_hasEncodeRule(e){let t=this.getEncode();return t&&t.get(e)!=null}getInitialData(e,t){let n,r=t.getComponent(`xAxis`,this.get(`xAxisIndex`)),i=t.getComponent(`yAxis`,this.get(`yAxisIndex`)),a=r.get(`type`),o=i.get(`type`),s,c=e.layout;a===`category`?(c=`horizontal`,n=r.getOrdinalMeta(),s=!this._hasEncodeRule(`x`)):o===`category`&&(c=`vertical`,n=i.getOrdinalMeta(),s=!this._hasEncodeRule(`y`)),c||(c=o===`time`?`vertical`:`horizontal`),this._layout=c;let l=[`x`,`y`],u=c===`horizontal`?0:1,d=this._baseAxisDim=l[u],f=l[1-u],p=[r,i],m=p[u].get(`type`),h=p[1-u].get(`type`),g=e.data;if(g&&s){let t=[];P(g,function(e,n){let r;L(e)?(r=e.slice(),e.unshift(n)):L(e.value)?(r=j({},e),r.value=r.value.slice(),e.value.unshift(n)):r=e,t.push(r)}),e.data=t}let _=this.defaultValueDimensions,v=[{name:d,type:Rw(m),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:[`base`]},{name:f,type:Rw(h),dimsDef:_.slice()}];return JM(this,{coordDimensions:v,dimensionsCount:_.length+1,encodeDefaulter:fe(j_,v,this)})}getBaseAxis(){let e=this._baseAxisDim;return this.ecModel.getComponent(e+`Axis`,this.get(e+`AxisIndex`)).axis}getWhiskerBoxesLayout(){return this._layout}};function dW(e,t){let n=t.ends.length,r=0;for(let i=0;i<n;i++)e.contain(t.ends[i][0],t.ends[i][1])&&r++;return r?+(r<n):2}const fW=`boxplot`;var pW=class e extends Db{constructor(...t){super(...t),this.type=e.type,this.defaultValueDimensions=[{name:`min`,defaultTooltip:!0},{name:`Q1`,defaultTooltip:!0},{name:`median`,defaultTooltip:!0},{name:`Q3`,defaultTooltip:!0},{name:`max`,defaultTooltip:!0}],this.visualDrawType=`stroke`}};pW.type=`series.boxplot`,pW.dependencies=[`xAxis`,`yAxis`,`grid`],pW.defaultOption={z:2,coordinateSystem:`cartesian2d`,legendHoverLink:!0,layout:null,clip:!0,boxWidth:[7,50],itemStyle:{color:Q.color.neutral00,borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:Q.color.shadow}},animationDuration:800},ae(pW,uW,!0);var mW=class extends Vb{constructor(...e){super(...e),this.type=fW}render(e,t,n){let r=e.getData(),i=this.group,a=this._data;this._data||i.removeAll();let o=+(e.getWhiskerBoxesLayout()===`horizontal`),s=e.get(`clip`,!0),c=e.coordinateSystem,l=c.getArea&&c.getArea(),u=s&&uA(c,!1,e);r.diff(a).add(function(e){if(r.hasValue(e)){let t=r.getItemLayout(e),n=s?dW(l,t):0;if(n===2)return;let a=_W(t,r,e,o,!0);dA(n===1,a,u),r.setItemGraphicEl(e,a),i.add(a)}}).update(function(e,t){let n=a.getItemGraphicEl(t);if(!r.hasValue(e)){i.remove(n);return}let c=r.getItemLayout(e),d=s?dW(l,c):0;d===2?i.remove(n):(n?(om(n),vW(c,n,r,e)):n=_W(c,r,e,o),dA(d===1,n,u),i.add(n),r.setItemGraphicEl(e,n))}).remove(function(e){let t=a.getItemGraphicEl(e);t&&i.remove(t)}).execute(),this._data=r}remove(e){let t=this.group,n=this._data;this._data=null,n&&n.eachItemGraphicEl(function(e){e&&t.remove(e)})}};mW.type=fW;var hW=class{},gW=class extends Ou{constructor(e){super(e),this.type=`boxplotBoxPath`}getDefaultShape(){return new hW}buildPath(e,t){let n=t.points,r=0;for(e.moveTo(n[r][0],n[r][1]),r++;r<4;r++)e.lineTo(n[r][0],n[r][1]);for(e.closePath();r<n.length;r++)e.moveTo(n[r][0],n[r][1]),r++,e.lineTo(n[r][0],n[r][1])}};function _W(e,t,n,r,i){let a=e.ends,o=new gW({shape:{points:i?yW(a,r,e):a}});return vW(e,o,t,n,i),o}function vW(e,t,n,r,i){let a=n.hostModel,o=cm[i?`initProps`:`updateProps`];o(t,{shape:{points:e.ends}},a,r),t.useStyle(n.getItemVisual(r,`style`)),t.style.strokeNoScale=!0,t.z2=100;let s=n.getItemModel(r),c=s.getModel(`emphasis`);xf(t,s),_f(t,c.get(`focus`),c.get(`blurScope`),c.get(`disabled`))}function yW(e,t,n){return F(e,function(e){return e=e.slice(),e[t]=n.initBaseline,e})}const bW=pc(),xW=xc(fW,SW);function SW(e){let t=Wj(fW);QE(e,t,function(e){let n=ZE(e,t);if(!n)return;let r=CW(e,n);YE(e,t,function(e){let t=e.seriesIndex;wW(e,r.boxOffsetList[t],r.boxWidthList[t])})})}function CW(e,t){let n=[],r=[],i=[],a=kO(e,{fromStat:{key:Wj(fW)},min:1}).w;YE(e,Wj(fW),function(e){let t=e.get(`boxWidth`);L(t)||(t=[t,t]),i[e.seriesIndex]=[J(t[0],a)||0,J(t[1],a)||0]});let o=a*.8-2,s=o/t*.3,c=(o-s*(t-1))/t,l=c/2-o/2;return YE(e,Wj(fW),function(e){let t=e.seriesIndex;r[t]=l,l+=s+c,n[t]=yo(bo(c,i[t][0]),i[t][1])}),{boxOffsetList:r,boxWidthList:n}}function wW(e,t,n){let r=e.coordinateSystem,i=e.getData(),a=n/2,o=e.getWhiskerBoxesLayout()===`horizontal`?0:1,s=1-o,c=[`x`,`y`],l=i.mapDimension(c[o]),u=i.mapDimensionsAll(c[s]);if(l==null||u.length<5)return;for(let e=0;e<i.count();e++){let t=i.get(l,e),n=d(t,u[2],e),r=d(t,u[0],e),a=d(t,u[1],e),o=d(t,u[3],e),c=d(t,u[4],e),m=[];f(m,a,!1),f(m,o,!0),m.push(r,a,c,o),p(m,r),p(m,c),p(m,n),i.setItemLayout(e,{initBaseline:n[s],ends:m})}function d(e,n,a){let c=i.get(n,a),l=[];l[o]=e,l[s]=c;let u;return isNaN(e)||isNaN(c)?u=[NaN,NaN]:(u=r.dataToPoint(l),u[o]+=t),u}function f(e,t,n){let r=t.slice(),i=t.slice();r[o]+=a,i[o]-=a,n?e.push(r,i):e.push(i,r)}function p(e,t){let n=t.slice(),r=t.slice();n[o]-=a,r[o]+=a,e.push(n,r)}}function TW(e){bW(e,function(){let t=Wj(fW);aD(e,{key:t,seriesType:fW,getMetrics:Kj}),bD(t,Uj(t))})}function EW(e,t){t=t||{};let n=[],r=[],i=t.boundIQR,a=i===`none`||i===0;for(let o=0;o<e.length;o++){let s=Lo(e[o].slice()),c=$o(s,.25),l=$o(s,.5),u=$o(s,.75),d=s[0],f=s[s.length-1],p=(i==null?1.5:i)*(u-c),m=a?d:Math.max(d,c-p),h=a?f:Math.min(f,u+p),g=t.itemNameFormatter,_=R(g)?g({value:o}):z(g)?g.replace(`{value}`,o+``):o+``;n.push([_,m,c,l,u,h]);for(let e=0;e<s.length;e++){let t=s[e];if(t<m||t>h){let e=[_,t];r.push(e)}}}return{boxData:n,outliers:r}}const DW={type:`sparkng:boxplot`,transform:function(e){let t=e.upstream;if(t.sourceFormat!==`arrayRows`){let e=``;typeof process<`u`&&process.env.NODE_ENV!==`production`&&(e=hs(`source data is not applicable for this boxplot transform. Expect number[][].`)),gs(e)}let n=EW(t.getRawData(),e.config);return[{dimensions:[`ItemName`,`Low`,`Q1`,`Q2`,`Q3`,`High`],data:n.boxData},{data:n.outliers}]}};function OW(e){e.registerSeriesModel(pW),e.registerChartView(mW),e.registerLayout(xW),e.registerTransform(DW),TW(e)}const kW=`candlestick`;var AW=class e extends Db{constructor(...t){super(...t),this.type=e.type,this.defaultValueDimensions=[{name:`open`,defaultTooltip:!0},{name:`close`,defaultTooltip:!0},{name:`lowest`,defaultTooltip:!0},{name:`highest`,defaultTooltip:!0}]}getShadowDim(){return`open`}brushSelector(e,t,n){let r=t.getItemLayout(e);return r&&n.rect(r.brushRect)}};AW.type=`series.candlestick`,AW.dependencies=[`xAxis`,`yAxis`,`grid`],AW.defaultOption={z:2,coordinateSystem:`cartesian2d`,legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:`#eb5454`,color0:`#47b262`,borderColor:`#eb5454`,borderColor0:`#47b262`,borderColorDoji:null,borderWidth:1},emphasis:{itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:`mod`,animationEasing:`linear`,animationDuration:300},ae(AW,uW,!0);const jW=[`itemStyle`,`borderColor`],MW=[`itemStyle`,`borderColor0`],NW=[`itemStyle`,`borderColorDoji`],PW=[`itemStyle`,`color`],FW=[`itemStyle`,`color0`];function IW(e,t){return t.get(e>0?PW:FW)}function LW(e,t){return t.get(e===0?NW:e>0?jW:MW)}const RW={seriesType:kW,plan:Lb(),performRawSeries:!0,reset:function(e,t){if(!t.isSeriesFiltered(e))return!e.pipelineContext.large&&{progress(e,t){let n;for(;(n=e.next())!=null;){let e=t.getItemModel(n),r=t.getItemLayout(n).sign,i=e.getItemStyle();i.fill=IW(r,e),i.stroke=LW(r,e)||i.fill,j(t.ensureUniqueItemVisual(n,`style`),i)}}}}},zW=[`color`,`borderColor`];var BW=class e extends Vb{constructor(...t){super(...t),this.type=e.type}render(e,t,n){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(e),this._isLargeDraw?this._renderLarge(e):this._renderNormal(e)}incrementalPrepareRender(e,t,n){this._clear(),this._updateDrawMode(e)}incrementalRender(e,t,n,r){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(e,t):this._incrementalRenderNormal(e,t)}eachRendered(e){Hm(this._progressiveEls||this.group,e)}_updateDrawMode(e){let t=e.pipelineContext.large;(this._isLargeDraw==null||t!==this._isLargeDraw)&&(this._isLargeDraw=t,this._clear())}_renderNormal(e){let t=e.getData(),n=this._data,r=this.group,i=t.getLayout(`isSimpleBox`),a=e.get(`clip`,!0),o=e.coordinateSystem,s=o.getArea&&o.getArea(),c=a&&uA(o,!1,e);this._data||r.removeAll();let l=KW(e);t.diff(n).add(function(n){if(t.hasValue(n)){let o=t.getItemLayout(n),u=a?dW(s,o):0;if(u===2)return;let d=UW(o,n,l,!0);tm(d,{shape:{points:o.ends}},e,n),dA(u===1,d,c),WW(d,t,n,i),r.add(d),t.setItemGraphicEl(n,d)}}).update(function(o,u){let d=n.getItemGraphicEl(u);if(!t.hasValue(o)){r.remove(d);return}let f=t.getItemLayout(o),p=a?dW(s,f):0;p===2?r.remove(d):(d?(em(d,{shape:{points:f.ends}},e,o),om(d)):d=UW(f,o,l),WW(d,t,o,i),dA(p===1,d,c),r.add(d),t.setItemGraphicEl(o,d))}).remove(function(e){let t=n.getItemGraphicEl(e);t&&r.remove(t)}).execute(),this._data=t}_renderLarge(e){this._clear(),YW(e,this.group);let t=e.get(`clip`,!0)?uA(e.coordinateSystem,!1,e):null;dA(!!t,this.group,t)}_incrementalRenderNormal(e,t){let n=t.getData(),r=n.getLayout(`isSimpleBox`),i=KW(t),a;for(;(a=e.next())!=null;){let e=UW(n.getItemLayout(a),a,i);WW(e,n,a,r),e.incremental=vc(t),this.group.add(e),this._progressiveEls.push(e)}}_incrementalRenderLarge(e,t){YW(t,this.group,this._progressiveEls,!0)}remove(e){this._clear()}_clear(){this.group.removeAll(),dA(!1,this.group,null),this._data=null}};BW.type=kW;var VW=class{},HW=class extends Ou{constructor(e){super(e),this.type=`normalCandlestickBox`}getDefaultShape(){return new VW}buildPath(e,t){let n=t.points;this.__simpleBox?(e.moveTo(n[4][0],n[4][1]),e.lineTo(n[6][0],n[6][1])):(e.moveTo(n[0][0],n[0][1]),e.lineTo(n[1][0],n[1][1]),e.lineTo(n[2][0],n[2][1]),e.lineTo(n[3][0],n[3][1]),e.closePath(),e.moveTo(n[4][0],n[4][1]),e.lineTo(n[5][0],n[5][1]),e.moveTo(n[6][0],n[6][1]),e.lineTo(n[7][0],n[7][1]))}};function UW(e,t,n,r){let i=e.ends;return new HW({shape:{points:r?GW(i,n,e):i},z2:100})}function WW(e,t,n,r){let i=t.getItemModel(n);e.useStyle(t.getItemVisual(n,`style`)),e.style.strokeNoScale=!0;let a=i.getShallow(`cursor`);a&&e.attr(`cursor`,a),e.__simpleBox=r,xf(e,i);let o=t.getItemLayout(n).sign;P(e.states,(e,t)=>{let n=i.getModel(t),r=IW(o,n),a=LW(o,n)||r,s=e.style||(e.style={});r&&(s.fill=r),a&&(s.stroke=a)});let s=i.getModel(`emphasis`);_f(e,s.get(`focus`),s.get(`blurScope`),s.get(`disabled`))}function GW(e,t,n){return F(e,function(e){return e=e.slice(),e[t]=n.initBaseline,e})}function KW(e){return+(e.getWhiskerBoxesLayout()===`horizontal`)}var qW=class{},JW=class extends Ou{constructor(e){super(e),this.type=`largeCandlestickBox`}getDefaultShape(){return new qW}buildPath(e,t){let n=t.points;for(let t=0;t<n.length;)if(this.__sign===n[t++]){let r=n[t++];e.moveTo(r,n[t++]),e.lineTo(r,n[t++])}else t+=3}};function YW(e,t,n,r){let i=e.getData(),a=i.getLayout(`largePoints`),o=new JW({shape:{points:a},__sign:1,ignoreCoarsePointer:!0});t.add(o);let s=new JW({shape:{points:a},__sign:-1,ignoreCoarsePointer:!0});t.add(s);let c=new JW({shape:{points:a},__sign:0,ignoreCoarsePointer:!0});t.add(c),XW(1,o,e,i),XW(-1,s,e,i),XW(0,c,e,i),r&&(o.incremental=vc(e),s.incremental=vc(e),c.incremental=vc(e)),n&&n.push(o,s,c)}function XW(e,t,n,r){let i=LW(e,n)||IW(e,n),a=n.getModel(`itemStyle`).getItemStyle(zW);t.useStyle(a),t.style.fill=null,t.style.stroke=i;let o=n.get(`cursor`);o&&t.attr(`cursor`,o)}function ZW(e){e&&L(e.series)&&P(e.series,function(e){B(e)&&e.type===`k`&&(e.type=kW)})}const QW=pc(),$W={seriesType:kW,plan:Lb(),reset:function(e){let t=e.coordinateSystem,n=e.getData(),r=tG(e,n),i=e.getWhiskerBoxesLayout()===`horizontal`?0:1,a=1-i,o=[`x`,`y`],s=n.getDimensionIndex(n.mapDimension(o[i])),c=F(n.mapDimensionsAll(o[a]),n.getDimensionIndex,n),l=c[0],u=c[1],d=c[2],f=c[3];return n.setLayout({candleWidth:r,isSimpleBox:r<=1.3}),s<0||c.length<4?void 0:{progress:e.pipelineContext.large?m:p};function p(e,n){let o,c=n.getStore();for(;(o=e.next())!=null;){let e=c.get(s,o),t=c.get(l,o),r=c.get(u,o),i=c.get(d,o),_=c.get(f,o),v=yo(t,r),y=bo(t,r),b=p(v,e),x=p(y,e),S=p(i,e),C=p(_,e),w=[];m(w,x,0),m(w,b,1),w.push(g(C),g(x),g(S),g(b));let T=!!n.getItemModel(o).get([`itemStyle`,`borderColorDoji`]);n.setItemLayout(o,{sign:eG(c,o,t,r,u,T),initBaseline:t>r?x[a]:b[a],ends:w,brushRect:h(i,_,e)})}function p(e,n){let r=[];return r[i]=n,r[a]=e,isNaN(n)||isNaN(e)?[NaN,NaN]:t.dataToPoint(r)}function m(e,t,n){let a=t.slice(),o=t.slice();a[i]=Cm(a[i]+r/2,1,!1),o[i]=Cm(o[i]-r/2,1,!0),n?e.push(a,o):e.push(o,a)}function h(e,t,n){let o=p(e,n),s=p(t,n);return o[i]-=r/2,s[i]-=r/2,{x:o[0],y:o[1],width:a?r:s[0]-o[0],height:a?s[1]-o[1]:r}}function g(e){return e[i]=Cm(e[i],1),e}}function m(n,r){let o=Zk(n.count*4),c=0,p,m=[],h=[],g,_=r.getStore(),v=!!e.get([`itemStyle`,`borderColorDoji`]);for(;(g=n.next())!=null;){let e=_.get(s,g),n=_.get(l,g),r=_.get(u,g),y=_.get(d,g),b=_.get(f,g);isNaN(e)||isNaN(y)||isNaN(b)?(o[c++]=NaN,c+=3):(o[c++]=eG(_,g,n,r,u,v),m[i]=e,m[a]=y,p=t.dataToPoint(m,null,h),o[c++]=p?p[0]:NaN,o[c++]=p?p[1]:NaN,m[a]=b,p=t.dataToPoint(m,null,h),o[c++]=p?p[1]:NaN)}r.setLayout(`largePoints`,o)}}};function eG(e,t,n,r,i,a){let o;return o=n>r?-1:n<r?1:a?0:t>0?e.get(i,t-1)<=r?1:-1:1,o}function tG(e,t){let n=kO(e.getBaseAxis(),{fromStat:{key:Wj(kW)},min:1}).w,r=J(V(e.get(`barMaxWidth`),n),n),i=J(V(e.get(`barMinWidth`),1),n),a=e.get(`barWidth`);return a==null?bo(yo(n/2,r),i):J(a,n)}function nG(e){QW(e,function(){let t=Wj(kW);aD(e,{key:t,seriesType:kW,getMetrics:Kj}),bD(t,Uj(t))})}function rG(e){e.registerChartView(BW),e.registerSeriesModel(AW),e.registerPreprocessor(ZW),e.registerVisual(RW),e.registerLayout($W),nG(e)}function iG(e,t){let n=t.rippleEffectColor||t.color;e.eachChild(function(e){e.attr({z:t.z,zlevel:t.zlevel,style:{stroke:t.brushType===`stroke`?n:null,fill:t.brushType===`fill`?n:null}})})}var aG=class extends q{constructor(e,t){super();let n=new Rk(e,t),r=new q;this.add(n),this.add(r),this.updateData(e,t)}stopEffectAnimation(){this.childAt(1).removeAll()}startEffectAnimation(e){let t=e.symbolType,n=e.color,r=e.rippleNumber,i=this.childAt(1);for(let a=0;a<r;a++){let o=lS(t,-1,-1,2,2,n);o.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scaleX:.5,scaleY:.5});let s=-a/r*e.period+e.effectOffset;o.animate(``,!0).when(e.period,{scaleX:e.rippleScale/2,scaleY:e.rippleScale/2}).delay(s).start(),o.animateStyle(!0).when(e.period,{opacity:0}).delay(s).start(),i.add(o)}iG(i,e)}updateEffectAnimation(e){let t=this._effectCfg,n=this.childAt(1),r=[`symbolType`,`period`,`rippleScale`,`rippleNumber`];for(let n=0;n<r.length;n++){let i=r[n];if(t[i]!==e[i]){this.stopEffectAnimation(),this.startEffectAnimation(e);return}}iG(n,e)}highlight(){Zd(this)}downplay(){Qd(this)}getSymbolType(){let e=this.childAt(0);return e&&e.getSymbolType()}updateData(e,t){let n=e.hostModel;this.childAt(0).updateData(e,t);let r=this.childAt(1),i=e.getItemModel(t),a=e.getItemVisual(t,`symbol`),o=uS(e.getItemVisual(t,`symbolSize`)),s=e.getItemVisual(t,`style`),c=s&&s.fill,l=i.getModel(`emphasis`);r.setScale(o),r.traverse(function(e){e.setStyle(`fill`,c)});let u=dS(e.getItemVisual(t,`symbolOffset`),o);u&&(r.x=u[0],r.y=u[1]),r.rotation=(e.getItemVisual(t,`symbolRotate`)||0)*Math.PI/180||0;let d={};d.showEffectOn=n.get(`showEffectOn`),d.rippleScale=i.get([`rippleEffect`,`scale`]),d.brushType=i.get([`rippleEffect`,`brushType`]),d.period=i.get([`rippleEffect`,`period`])*1e3,d.effectOffset=t/e.count(),d.z=n.getShallow(`z`)||0,d.zlevel=n.getShallow(`zlevel`)||0,d.symbolType=a,d.color=c,d.rippleEffectColor=i.get([`rippleEffect`,`color`]),d.rippleNumber=i.get([`rippleEffect`,`number`]),d.showEffectOn===`render`?(this._effectCfg?this.updateEffectAnimation(d):this.startEffectAnimation(d),this._effectCfg=d):(this._effectCfg=null,this.stopEffectAnimation(),this.onHoverStateChange=e=>{e===`emphasis`?d.showEffectOn!==`render`&&this.startEffectAnimation(d):e===`normal`&&d.showEffectOn!==`render`&&this.stopEffectAnimation()}),this._effectCfg=d,_f(this,l.get(`focus`),l.get(`blurScope`),l.get(`disabled`))}fadeOut(e){e&&e()}},oG=class e extends Vb{constructor(...t){super(...t),this.type=e.type}init(){this._symbolDraw=new Wk(aG)}render(e,t,n){let r=e.getData(),i=this._symbolDraw;i.updateData(r,sG(e)),this.group.add(i.group)}updateTransform(e,t,n){let r=e.getData();this.group.dirty();let i=zA(``).reset(e,t,n);i.progress&&i.progress({start:0,end:r.count(),count:r.count()},r),this._symbolDraw.updateLayout(sG(e))}_updateGroupTransform(e){let t=e.coordinateSystem;t&&t.getRoamTransform&&(this.group.transform=en(t.getRoamTransform()),this.group.decomposeTransform())}remove(e,t){this._symbolDraw&&this._symbolDraw.remove(!0)}};oG.type=`effectScatter`;function sG(e){return{clipShape:fA(e)}}var cG=class e extends Db{constructor(...t){super(...t),this.type=e.type,this.hasSymbolVisual=!0}getInitialData(e,t){return ST(null,this,{useEncodeDefaulter:!0})}brushSelector(e,t,n){return n.point(t.getItemLayout(e))}};cG.type=`series.effectScatter`,cG.dependencies=[`grid`,`polar`],cG.defaultOption={coordinateSystem:`cartesian2d`,z:2,legendHoverLink:!0,effectType:`ripple`,progressive:0,showEffectOn:`render`,clip:!0,rippleEffect:{period:4,scale:2.5,brushType:`fill`,number:3},universalTransition:{divideShape:`clone`},symbolSize:10};function lG(e){e.registerChartView(oG),e.registerSeriesModel(cG),e.registerLayout(zA(`effectScatter`))}var uG=class extends q{constructor(e,t,n){super(),this.add(this.createLine(e,t,n)),this._updateEffectSymbol(e,t)}createLine(e,t,n){return new XB(e,t,n)}_updateEffectSymbol(e,t){let n=e.getItemModel(t).getModel(`effect`),r=n.get(`symbolSize`),i=n.get(`symbol`);L(r)||(r=[r,r]);let a=e.getItemVisual(t,`style`),o=n.get(`color`)||a&&a.stroke,s=this.childAt(1);this._symbolType!==i&&(this.remove(s),s=lS(i,-.5,-.5,1,1,o),s.z2=100,s.culling=!0,this.add(s)),s&&(s.setStyle(`shadowColor`,o),s.setStyle(n.getItemStyle([`color`])),s.scaleX=r[0],s.scaleY=r[1],s.setColor(o),this._symbolType=i,this._symbolScale=r,this._updateEffectAnimation(e,n,t))}_updateEffectAnimation(e,t,n){let r=this.childAt(1);if(!r)return;let i=e.getItemLayout(n),a=t.get(`period`)*1e3,o=t.get(`loop`),s=t.get(`roundTrip`),c=t.get(`constantSpeed`),l=Se(t.get(`delay`),function(t){return t/e.count()*a/3});if(r.ignore=!0,this._updateAnimationPoints(r,i),c>0&&(a=this._getLineLength(r)/c*1e3),a!==this._period||o!==this._loop||s!==this._roundTrip){r.stopAnimation();let e;e=R(l)?l(n):l,r.__t>0&&(e=-a*r.__t),this._animateSymbol(r,a,e,o,s)}this._period=a,this._loop=o,this._roundTrip=s}_animateSymbol(e,t,n,r,i){if(t>0){e.__t=0;let a=this,o=e.animate(``,r).when(i?t*2:t,{__t:i?2:1}).delay(n).during(function(){a._updateSymbolPosition(e)});r||o.done(function(){a.remove(e)}),o.start()}}_getLineLength(e){return it(e.__p1,e.__cp1)+it(e.__cp1,e.__p2)}_updateAnimationPoints(e,t){e.__p1=t[0],e.__p2=t[1],e.__cp1=t[2]||[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]}updateData(e,t,n){this.childAt(0).updateData(e,t,n),this._updateEffectSymbol(e,t)}_updateSymbolPosition(e){let t=e.__p1,n=e.__p2,r=e.__cp1,i=e.__t<=1?e.__t:2-e.__t,a=[e.x,e.y],o=a.slice(),s=gr,c=_r;a[0]=s(t[0],r[0],n[0],i),a[1]=s(t[1],r[1],n[1],i);let l=e.__t<=1?c(t[0],r[0],n[0],i):c(n[0],r[0],t[0],1-i),u=e.__t<=1?c(t[1],r[1],n[1],i):c(n[1],r[1],t[1],1-i);e.rotation=-Math.atan2(u,l)-Math.PI/2,(this._symbolType===`line`||this._symbolType===`rect`||this._symbolType===`roundRect`)&&(e.__lastT!==void 0&&e.__lastT<e.__t?(e.scaleY=it(o,a)*1.05,i===1&&(a[0]=o[0]+(a[0]-o[0])/2,a[1]=o[1]+(a[1]-o[1])/2)):e.scaleY=e.__lastT===1?2*it(t,a):this._symbolScale[1]),e.__lastT=e.__t,e.ignore=!1,e.x=a[0],e.y=a[1]}updateLayout(e,t){this.childAt(0).updateLayout(e,t);let n=e.getItemModel(t).getModel(`effect`);this._updateEffectAnimation(e,n,t)}},dG=class extends q{constructor(e,t,n){super(),this._createPolyline(e,t,n)}_createPolyline(e,t,n){let r=new Ep({shape:{points:e.getItemLayout(t)}});this.add(r),this._updateCommonStl(e,t,n)}updateData(e,t,n){let r=e.hostModel;em(this.childAt(0),{shape:{points:e.getItemLayout(t)}},r,t),this._updateCommonStl(e,t,n)}_updateCommonStl(e,t,n){let r=this.childAt(0),i=e.getItemModel(t),a=n&&n.emphasisLineStyle,o=n&&n.focus,s=n&&n.blurScope,c=n&&n.emphasisDisabled;if(!n||e.hasItemOption){let e=i.getModel(`emphasis`);a=e.getModel(`lineStyle`).getLineStyle(),c=e.get(`disabled`),o=e.get(`focus`),s=e.get(`blurScope`)}r.useStyle(e.getItemVisual(t,`style`)),r.style.fill=null,r.style.strokeNoScale=!0;let l=r.ensureState(`emphasis`);l.style=a,_f(this,o,s,c)}updateLayout(e,t){let n=this.childAt(0);n.stopAnimation(),n.setShape(`points`,e.getItemLayout(t))}},fG=class extends uG{constructor(...e){super(...e),this._lastFrame=0,this._lastFramePercent=0}createLine(e,t,n){return new dG(e,t,n)}_updateAnimationPoints(e,t){this._points=t;let n=[0],r=0;for(let e=1;e<t.length;e++){let i=t[e-1],a=t[e];r+=it(i,a),n.push(r)}if(r===0)this._length=0;else{for(let e=0;e<n.length;e++)n[e]/=r;this._offsets=n,this._length=r}}_getLineLength(){return this._length}_updateSymbolPosition(e){let t=e.__t<=1?e.__t:2-e.__t,n=this._points,r=this._offsets,i=n.length;if(!r)return;let a=this._lastFrame,o;if(t<this._lastFramePercent){for(o=Math.min(a+1,i-1);o>=0&&!(r[o]<=t);o--);o=Math.min(o,i-2)}else{for(o=a;o<i&&!(r[o]>t);o++);o=Math.min(o-1,i-2)}let s=(t-r[o])/(r[o+1]-r[o]),c=n[o],l=n[o+1];e.x=c[0]*(1-s)+s*l[0],e.y=c[1]*(1-s)+s*l[1];let u=e.__t<=1?l[0]-c[0]:c[0]-l[0],d=e.__t<=1?l[1]-c[1]:c[1]-l[1];e.rotation=-Math.atan2(d,u)-Math.PI/2,this._lastFrame=o,this._lastFramePercent=t,e.ignore=!1}},pG=class{constructor(){this.polyline=!1,this.curveness=0,this.segs=[]}},mG=class extends Ou{constructor(e){super(e),this._off=0,this.hoverDataIdx=-1}reset(){this.notClear=!1,this._off=0}beforeBrush(e){e&&!e.contentRetained&&this.reset()}getDefaultStyle(){return{stroke:Q.color.neutral99,fill:null}}getDefaultShape(){return new pG}buildPath(e,t){let n=t.segs,r=t.curveness,i;if(t.polyline)for(i=this._off;i<n.length;){let t=n[i++];if(t>0){e.moveTo(n[i++],n[i++]);for(let r=1;r<t;r++)e.lineTo(n[i++],n[i++])}}else for(i=this._off;i<n.length;){let t=n[i++],a=n[i++],o=n[i++],s=n[i++];if(e.moveTo(t,a),r>0){let n=(t+o)/2-(a-s)*r,i=(a+s)/2-(o-t)*r;e.quadraticCurveTo(n,i,o,s)}else e.lineTo(o,s)}this.incremental&&(this._off=i,this.notClear=!0)}findDataIndex(e,t){let n=this.shape,r=n.segs,i=n.curveness,a=this.style.lineWidth;if(n.polyline){let n=0;for(let i=0;i<r.length;){let o=r[i++];if(o>0){let s=r[i++],c=r[i++];for(let l=1;l<o;l++){let o=r[i++],l=r[i++];if(iu(s,c,o,l,a,e,t))return n}}n++}}else{let n=0;for(let o=0;o<r.length;){let s=r[o++],c=r[o++],l=r[o++],u=r[o++];if(i>0){if(ou(s,c,(s+l)/2-(c-u)*i,(c+u)/2-(l-s)*i,l,u,a,e,t))return n}else if(iu(s,c,l,u,a,e,t))return n;n++}}return-1}contain(e,t){let n=this.transformCoordToLocal(e,t),r=this.getBoundingRect();return e=n[0],t=n[1],r.contain(e,t)?(this.hoverDataIdx=this.findDataIndex(e,t))>=0:(this.hoverDataIdx=-1,!1)}getBoundingRect(){let e=this._rect;if(!e){let t=this.shape.segs,n=1/0,r=1/0,i=-1/0,a=-1/0;for(let e=0;e<t.length;){let o=t[e++],s=t[e++];n=Math.min(o,n),i=Math.max(o,i),r=Math.min(s,r),a=Math.max(s,a)}e=this._rect=new K(n,r,i,a)}return e}},hG=class{constructor(){this.group=new q}updateData(e){this._clear();let t=this._create();t.setShape({segs:e.getLayout(`linesPoints`)}),this._setCommon(t,e)}incrementalPrepareUpdate(e){this.group.removeAll(),this._clear()}incrementalUpdate(e,t,n){let r=this._newAdded[0],i=t.getLayout(`linesPoints`),a=r&&r.shape.segs;if(a&&a.length<2e4){let e=a.length,t=new Float32Array(e+i.length);t.set(a),t.set(i,e),r.setShape({segs:t})}else{this._newAdded=[];let r=this._create();r.incremental=n,r.setShape({segs:i}),this._setCommon(r,t),r.__startIndex=e.start}}remove(){this._clear()}eachRendered(e){this._newAdded[0]&&e(this._newAdded[0])}_create(){let e=new mG({cursor:`default`,ignoreCoarsePointer:!0});return this._newAdded.push(e),this.group.add(e),e}_setCommon(e,t,n){let r=t.hostModel;e.setShape({polyline:r.get(`polyline`),curveness:r.get([`lineStyle`,`curveness`])}),e.useStyle(r.getModel(`lineStyle`).getLineStyle()),e.style.strokeNoScale=!0;let i=t.getVisual(`style`);i&&i.stroke&&e.setStyle(`stroke`,i.stroke),e.setStyle(`fill`,null);let a=X(e);a.seriesIndex=r.seriesIndex,e.on(`mousemove`,function(t){a.dataIndex=null;let n=e.hoverDataIdx;n>0&&(a.dataIndex=n+e.__startIndex)})}_clear(){this._newAdded=[],this.group.removeAll()}};const gG={seriesType:`lines`,plan:Lb(),reset:function(e){let t=e.coordinateSystem;if(!t){typeof process<`u`&&process.env.NODE_ENV!==`production`&&fs(`The lines series must have a coordinate system.`);return}let n=e.get(`polyline`),r=e.pipelineContext.large;return{progress(i,a){let o=[];if(r){let r,s=i.end-i.start;if(n){let t=0;for(let n=i.start;n<i.end;n++)t+=e.getLineCoordsCount(n);r=new Float32Array(s+t*2)}else r=new Float32Array(s*4);let c=0,l=[];for(let a=i.start;a<i.end;a++){let i=e.getLineCoords(a,o);n&&(r[c++]=i);for(let e=0;e<i;e++)l=t.dataToPoint(o[e],!1,l),r[c++]=l[0],r[c++]=l[1]}a.setLayout(`linesPoints`,r)}else for(let r=i.start;r<i.end;r++){let i=a.getItemModel(r),s=e.getLineCoords(r,o),c=[];if(n)for(let e=0;e<s;e++)c.push(t.dataToPoint(o[e]));else{c[0]=t.dataToPoint(o[0]),c[1]=t.dataToPoint(o[1]);let e=i.get([`lineStyle`,`curveness`]);+e&&(c[2]=[(c[0][0]+c[1][0])/2-(c[0][1]-c[1][1])*e,(c[0][1]+c[1][1])/2-(c[1][0]-c[0][0])*e])}a.setItemLayout(r,c)}}}}};var _G=class e extends Vb{constructor(...t){super(...t),this.type=e.type}render(e,t,n){let r=e.getData(),i=this._updateLineDraw(r,e),a=e.get(`zlevel`),o=e.get([`effect`,`trailLength`]),s=n.getZr(),c=!!eh(n);c&&s.painter.getLayer(a).clear(!0),this._lastZlevel!=null&&c&&s.configLayer(this._lastZlevel,{motionBlur:!1}),this._showEffect(e)&&o>0&&(c?s.configLayer(a,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(o/10+.9,1),0)}):typeof process<`u`&&process.env.NODE_ENV!==`production`&&console.warn(`SVG render mode doesn't support lines with trail effect`)),i.updateData(r);let l=e.get(`clip`,!0)&&uA(e.coordinateSystem,!1,e);l?this.group.setClipPath(l):this.group.removeClipPath(),this._lastZlevel=a,this._finished=!0}incrementalPrepareRender(e,t,n){let r=e.getData();this._updateLineDraw(r,e).incrementalPrepareUpdate(r),this._clearLayer(n),this._finished=!1}incrementalRender(e,t,n){this._lineDraw.incrementalUpdate(e,t.getData(),vc(t)),this._finished=e.end===t.getData().count()}eachRendered(e){this._lineDraw&&this._lineDraw.eachRendered(e)}updateTransform(e,t,n){let r=e.getData(),i=this._lineDraw;if(!this._finished||!i||!i.updateLayout)return{update:!0};{let a=gG.reset(e,t,n);a.progress&&a.progress({start:0,end:r.count(),count:r.count()},r),i.updateLayout(),this._clearLayer(n)}}_updateLineDraw(e,t){let n=this._lineDraw,r=this._showEffect(t),i=!!t.get(`polyline`),a=t.pipelineContext.large;return typeof process<`u`&&process.env.NODE_ENV!==`production`&&r&&a&&console.warn(`Large lines not support effect`),(!n||r!==this._hasEffet||i!==this._isPolyline||a!==this._isLargeDraw)&&(n&&n.remove(),n=this._lineDraw=a?new hG:new ZB(i?r?fG:dG:r?uG:XB),this._hasEffet=r,this._isPolyline=i,this._isLargeDraw=a),this.group.add(n.group),n}_showEffect(e){return!!e.get([`effect`,`show`])}_clearLayer(e){let t=eh(e);t&&this._lastZlevel!=null&&t.getLayer(this._lastZlevel).clear(!0)}remove(e,t){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(t)}dispose(e,t){this.remove(e,t)}};_G.type=`lines`;const vG=typeof Uint32Array>`u`?Array:Uint32Array,yG=typeof Float64Array>`u`?Array:Float64Array;function bG(e){let t=e.data;t&&t[0]&&t[0][0]&&t[0][0].coord&&(typeof process<`u`&&process.env.NODE_ENV!==`production`&&console.warn(`Lines data configuration has been changed to { coords:[[1,2],[2,3]] }`),e.data=F(t,function(e){let t={coords:[e[0].coord,e[1].coord]};return e[0].name&&(t.fromName=e[0].name),e[1].name&&(t.toName=e[1].name),te([t,e[0],e[1]])}))}var xG=class e extends Db{constructor(...t){super(...t),this.type=e.type,this.visualStyleAccessPath=`lineStyle`,this.visualDrawType=`stroke`}init(e){e.data=e.data||[],bG(e);let t=this._processFlatCoordsArray(e.data);this._flatCoords=t.flatCoords,this._flatCoordsOffset=t.flatCoordsOffset,t.flatCoords&&(e.data=new Float32Array(t.count)),super.init.apply(this,arguments)}mergeOption(e){if(bG(e),e.data){let t=this._processFlatCoordsArray(e.data);this._flatCoords=t.flatCoords,this._flatCoordsOffset=t.flatCoordsOffset,t.flatCoords&&(e.data=new Float32Array(t.count))}super.mergeOption.apply(this,arguments)}appendData(e){let t=this._processFlatCoordsArray(e.data);t.flatCoords&&(this._flatCoords?(this._flatCoords=Pe(this._flatCoords,t.flatCoords),this._flatCoordsOffset=Pe(this._flatCoordsOffset,t.flatCoordsOffset)):(this._flatCoords=t.flatCoords,this._flatCoordsOffset=t.flatCoordsOffset),e.data=new Float32Array(t.count)),this.getRawData().appendData(e.data)}_getCoordsFromItemModel(e){let t=this.getData().getItemModel(e),n=t.option instanceof Array?t.option:t.getShallow(`coords`);if(typeof process<`u`&&process.env.NODE_ENV!==`production`&&!(n instanceof Array&&n.length>0&&n[0]instanceof Array))throw Error(`Invalid coords `+JSON.stringify(n)+`. Lines must have 2d coords array in data item.`);return n}getLineCoordsCount(e){return this._flatCoordsOffset?this._flatCoordsOffset[e*2+1]:this._getCoordsFromItemModel(e).length}getLineCoords(e,t){if(this._flatCoordsOffset){let n=this._flatCoordsOffset[e*2],r=this._flatCoordsOffset[e*2+1];for(let e=0;e<r;e++)t[e]=t[e]||[],t[e][0]=this._flatCoords[n+e*2],t[e][1]=this._flatCoords[n+e*2+1];return r}{let n=this._getCoordsFromItemModel(e);for(let e=0;e<n.length;e++)t[e]=t[e]||[],t[e][0]=n[e][0],t[e][1]=n[e][1];return n.length}}_processFlatCoordsArray(e){let t=0;if(this._flatCoords&&(t=this._flatCoords.length),me(e[0])){let n=e.length,r=new vG(n),i=new yG(n),a=0,o=0,s=0;for(let c=0;c<n;){s++;let l=e[c++];r[o++]=a+t,r[o++]=l;for(let t=0;t<l;t++){let t=e[c++],r=e[c++];if(i[a++]=t,i[a++]=r,c>n&&typeof process<`u`&&process.env.NODE_ENV!==`production`)throw Error(`Invalid data format.`)}}return{flatCoordsOffset:new Uint32Array(r.buffer,0,o),flatCoords:i,count:s}}return{flatCoordsOffset:null,flatCoords:null,count:e.length}}getInitialData(e,t){if(typeof process<`u`&&process.env.NODE_ENV!==`production`&&!Kg.get(e.coordinateSystem))throw Error(`Unknown coordinate system `+e.coordinateSystem);let n=new sT([`value`],this);return n.hasItemOption=!1,n.initData(e.data,[],function(e,t,r,i){if(e instanceof Array)return NaN;{n.hasItemOption=!0;let t=e.value;if(t!=null)return t instanceof Array?t[i]:t}}),n}formatTooltip(e,t,n){let r=this.getData(),i=this.getRawValue(e),a=r.getItemModel(e),o=a.get(`name`);if(!o){let e=a.get(`fromName`),t=a.get(`toName`),n=[];e!=null&&n.push(e),t!=null&&n.push(t),o=n.join(` > `)}return ab(`nameValue`,{name:o,value:i,noValue:i==null||isNaN(i)})}preventIncremental(){return!!this.get([`effect`,`show`])}getProgressive(){let e=this.option.progressive;return e==null?this.option.large?1e4:this.get(`progressive`):e}getProgressiveThreshold(){let e=this.option.progressiveThreshold;return e==null?this.option.large?2e4:this.get(`progressiveThreshold`):e}getZLevelKey(){let e=this.getModel(`effect`),t=e.get(`trailLength`);return this.getData().count()>this.getProgressiveThreshold()?this.id:e.get(`show`)&&t>0?t+``:``}};xG.type=`series.lines`,xG.dependencies=[`grid`,`polar`,`geo`,`calendar`],xG.defaultOption={coordinateSystem:`geo`,z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:[`none`,`none`],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:`circle`,symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:`end`},lineStyle:{opacity:.5}};function SG(e){return e instanceof Array||(e=[e,e]),e}const CG={seriesType:`lines`,reset(e){let t=SG(e.get(`symbol`)),n=SG(e.get(`symbolSize`)),r=e.getData();r.setVisual(`fromSymbol`,t&&t[0]),r.setVisual(`toSymbol`,t&&t[1]),r.setVisual(`fromSymbolSize`,n&&n[0]),r.setVisual(`toSymbolSize`,n&&n[1]);function i(e,t){let n=e.getItemModel(t),r=SG(n.getShallow(`symbol`,!0)),i=SG(n.getShallow(`symbolSize`,!0));r[0]&&e.setItemVisual(t,`fromSymbol`,r[0]),r[1]&&e.setItemVisual(t,`toSymbol`,r[1]),i[0]&&e.setItemVisual(t,`fromSymbolSize`,i[0]),i[1]&&e.setItemVisual(t,`toSymbolSize`,i[1])}return{dataEach:r.hasItemOption?i:null}}};function wG(e){e.registerChartView(_G),e.registerSeriesModel(xG),e.registerLayout(gG),e.registerVisual(CG)}var TG=class{constructor(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};let e=f.createCanvas();this.canvas=e}update(e,t,n,r,i,a){let o=this._getBrush(),s=this._getGradient(i,`inRange`),c=this._getGradient(i,`outOfRange`),l=this.pointSize+this.blurSize,u=this.canvas,d=u.getContext(`2d`),f=e.length;u.width=t,u.height=n;for(let t=0;t<f;++t){let n=e[t],i=n[0],a=n[1],s=n[2];d.globalAlpha=r(s),d.drawImage(o,i-l,a-l)}if(!u.width||!u.height)return u;let p=d.getImageData(0,0,u.width,u.height),m=p.data,h=0,g=m.length,_=this.minOpacity,v=this.maxOpacity-_;for(;h<g;){let e=m[h+3]/256,t=Math.floor(e*255)*4;if(e>0){let n=a(e)?s:c;e>0&&(e=e*v+_),m[h++]=n[t],m[h++]=n[t+1],m[h++]=n[t+2],m[h++]=n[t+3]*e*256}else h+=4}return d.putImageData(p,0,0),u}_getBrush(){let e=this._brushCanvas||(this._brushCanvas=f.createCanvas()),t=this.pointSize+this.blurSize,n=t*2;e.width=n,e.height=n;let r=e.getContext(`2d`);return r.clearRect(0,0,n,n),r.shadowOffsetX=n,r.shadowBlur=this.blurSize,r.shadowColor=Q.color.neutral99,r.beginPath(),r.arc(-t,t,this.pointSize,0,Math.PI*2,!0),r.closePath(),r.fill(),e}_getGradient(e,t){let n=this._gradientPixels,r=n[t]||(n[t]=/* @__PURE__ */ new Uint8ClampedArray(1024)),i=[0,0,0,0],a=0;for(let n=0;n<256;n++)e[t](n/255,!0,i),r[a++]=i[0],r[a++]=i[1],r[a++]=i[2],r[a++]=i[3];return r}};function EG(e,t,n){let r=e[1]-e[0];t=F(t,function(t){return{interval:[(t.interval[0]-e[0])/r,(t.interval[1]-e[0])/r]}});let i=t.length,a=0;return function(e){let r;for(r=a;r<i;r++){let n=t[r].interval;if(n[0]<=e&&e<=n[1]){a=r;break}}if(r===i)for(r=a-1;r>=0;r--){let n=t[r].interval;if(n[0]<=e&&e<=n[1]){a=r;break}}return r>=0&&r<i&&n[r]}}function DG(e,t){let n=e[1]-e[0];return t=[(t[0]-e[0])/n,(t[1]-e[0])/n],function(e){return e>=t[0]&&e<=t[1]}}var OG=class e extends Vb{constructor(...t){super(...t),this.type=e.type}render(e,t,n){let r;if(t.eachComponent(`visualMap`,function(t){t.eachTargetSeries(function(n){n===e&&(r=t)})}),typeof process<`u`&&process.env.NODE_ENV!==`production`&&!r)throw Error(`Heatmap must use with visualMap`);this._progressiveEls=null,this.group.removeAll();let i=e.coordinateSystem;i.type===`cartesian2d`||i.type===`calendar`||i.type===`matrix`?this._renderOnGridLike(e,n,0,e.getData().count()):mA(i)&&this._renderOnGeo(i,e,r,n)}incrementalPrepareRender(e,t,n){this.group.removeAll()}incrementalRender(e,t,n,r){let i=t.coordinateSystem;i&&(mA(i)?this.render(t,n,r):(this._progressiveEls=[],this._renderOnGridLike(t,r,e.start,e.end,!0)))}eachRendered(e){Hm(this._progressiveEls||this.group,e)}_renderOnGridLike(e,t,n,r,i){let a=e.coordinateSystem,o=pA(a,`cartesian2d`),s=pA(a,`matrix`),c,l,u,d;if(o){let e=a.getAxis(`x`),t=a.getAxis(`y`);if(typeof process<`u`&&process.env.NODE_ENV!==`production`){if(e.type!==`category`||t.type!==`category`)throw Error(`Heatmap on cartesian must have two category axes`);if(!(e.onBand&&t.onBand))throw Error(`Heatmap on cartesian must have two axes with boundaryGap true`)}c=kO(e).w+.5,l=kO(t).w+.5,u=e.scale.getExtent(),d=t.scale.getExtent()}let f=this.group,p=e.getData(),m=e.getModel([`emphasis`,`itemStyle`]).getItemStyle(),h=e.getModel([`blur`,`itemStyle`]).getItemStyle(),g=e.getModel([`select`,`itemStyle`]).getItemStyle(),_=e.get([`itemStyle`,`borderRadius`]),v=ah(e),y=e.getModel(`emphasis`),b=y.get(`focus`),x=y.get(`blurScope`),S=y.get(`disabled`),C=o||s?[p.mapDimension(`x`),p.mapDimension(`y`),p.mapDimension(`value`)]:[p.mapDimension(`time`),p.mapDimension(`value`)];for(let t=n;t<r;t++){let n,r=p.getItemVisual(t,`style`);if(o){let e=p.get(C[0],t),i=p.get(C[1],t);if(isNaN(p.get(C[2],t))||isNaN(e)||isNaN(i)||e<u[0]||e>u[1]||i<d[0]||i>d[1])continue;let o=a.dataToPoint([e,i]);n=new Uu({shape:{x:o[0]-c/2,y:o[1]-l/2,width:c,height:l},style:r})}else if(s){let e=a.dataToLayout([p.get(C[0],t),p.get(C[1],t)]).rect;if(xe(e.x))continue;n=new Uu({z2:1,shape:e,style:r})}else{if(isNaN(p.get(C[1],t)))continue;let e=a.dataToLayout([p.get(C[0],t)]),i=e.contentRect||e.rect;if(xe(i.x)||xe(i.y))continue;n=new Uu({z2:1,shape:i,style:r})}if(p.hasItemOption){let e=p.getItemModel(t),n=e.getModel(`emphasis`);m=n.getModel(`itemStyle`).getItemStyle(),h=e.getModel([`blur`,`itemStyle`]).getItemStyle(),g=e.getModel([`select`,`itemStyle`]).getItemStyle(),_=e.get([`itemStyle`,`borderRadius`]),b=n.get(`focus`),x=n.get(`blurScope`),S=n.get(`disabled`),v=ah(e)}n.shape.r=_;let y=e.getRawValue(t),w=`-`;y&&y[2]!=null&&(w=y[2]+``),ih(n,v,{labelFetcher:e,labelDataIndex:t,defaultOpacity:r.opacity,defaultText:w}),n.ensureState(`emphasis`).style=m,n.ensureState(`blur`).style=h,n.ensureState(`select`).style=g,_f(n,b,x,S),n.incremental=vc(e,i),i&&(n.states.emphasis.hoverLayer=2),f.add(n),p.setItemGraphicEl(t,n),this._progressiveEls&&this._progressiveEls.push(n)}}_renderOnGeo(e,t,n,r){let i=n.targetVisuals.inRange,a=n.targetVisuals.outOfRange,o=t.getData(),s=this._hmLayer||this._hmLayer||new TG;s.blurSize=t.get(`blurSize`),s.pointSize=t.get(`pointSize`),s.minOpacity=t.get(`minOpacity`),s.maxOpacity=t.get(`maxOpacity`);let c=e.getViewRect().clone(),l=e.getRoamTransform();c.applyTransform(l);let u=Math.max(c.x,0),d=Math.max(c.y,0),f=Math.min(c.width+c.x,r.getWidth()),p=Math.min(c.height+c.y,r.getHeight()),m=f-u,h=p-d,g=[o.mapDimension(`lng`),o.mapDimension(`lat`),o.mapDimension(`value`)],_=o.mapArray(g,function(t,n,r){let i=e.dataToPoint([t,n]);return i[0]-=u,i[1]-=d,i.push(r),i}),v=n.getExtent(),y=n.type===`visualMap.continuous`?DG(v,n.option.range):EG(v,n.getPieceList(),n.option.selected);s.update(_,m,h,i.color.getNormalizer(),{inRange:i.color.getColorMapper(),outOfRange:a.color.getColorMapper()},y);let b=new Fu({style:{width:m,height:h,x:u,y:d,image:s.canvas},silent:!0});this.group.add(b)}};OG.type=`heatmap`;var kG=class e extends Db{constructor(...t){super(...t),this.type=e.type}getInitialData(e,t){return ST(null,this,{generateCoord:`value`})}preventIncremental(){let e=Kg.get(this.get(`coordinateSystem`));if(e&&e.dimensions)return e.dimensions[0]===`lng`&&e.dimensions[1]===`lat`}};kG.type=`series.heatmap`,kG.dependencies=[`grid`,`geo`,`calendar`,`matrix`],kG.defaultOption={coordinateSystem:`cartesian2d`,z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:Q.color.primary}}};function AG(e){e.registerChartView(OG),e.registerSeriesModel(kG)}const jG=[`itemStyle`,`borderWidth`],MG=[{xy:`x`,wh:`width`,index:0,posDesc:[`left`,`right`]},{xy:`y`,wh:`height`,index:1,posDesc:[`top`,`bottom`]}],NG=new $f;var PG=class extends Vb{constructor(...e){super(...e),this.type=qj}render(e,t,n){let r=this.group,i=e.getData(),a=this._data,o=e.coordinateSystem,s=o.getBaseAxis().isHorizontal(),c=o.master.getRect(),l={ecSize:{width:n.getWidth(),height:n.getHeight()},seriesModel:e,coordSys:o,coordSysExtent:[[c.x,c.x+c.width],[c.y,c.y+c.height]],isHorizontal:s,valueDim:MG[+s],categoryDim:MG[1-s]};i.diff(a).add(function(e){if(!i.hasValue(e))return;let t=KG(i,e),n=FG(i,e,t,l),a=YG(i,l,n);i.setItemGraphicEl(e,a),r.add(a),tK(a,l,n)}).update(function(e,t){let n=a.getItemGraphicEl(t);if(!i.hasValue(e)){r.remove(n);return}let o=KG(i,e),s=FG(i,e,o,l),c=QG(i,s);n&&c!==n.__pictorialShapeStr&&(r.remove(n),i.setItemGraphicEl(e,null),n=null),n?XG(n,l,s):n=YG(i,l,s,!0),i.setItemGraphicEl(e,n),n.__pictorialSymbolMeta=s,r.add(n),tK(n,l,s)}).remove(function(e){let t=a.getItemGraphicEl(e);t&&ZG(a,e,t.__pictorialSymbolMeta.animationModel,t)}).execute();let u=e.get(`clip`,!0)?uA(e.coordinateSystem,!1,e):null;return u?r.setClipPath(u):r.removeClipPath(),this._data=i,this.group}remove(e,t){let n=this.group,r=this._data;e.get(`animation`)?r&&r.eachItemGraphicEl(function(t){ZG(r,X(t).dataIndex,e,t)}):n.removeAll()}};PG.type=qj;function FG(e,t,n,r){let i=e.getItemLayout(t),a=n.get(`symbolRepeat`),o=n.get(`symbolClip`),s=n.get(`symbolPosition`)||`start`,c=(n.get(`symbolRotate`)||0)*Math.PI/180||0,l=n.get(`symbolPatternSize`)||2,u=n.isAnimationEnabled(),d={dataIndex:t,layout:i,itemModel:n,symbolType:e.getItemVisual(t,`symbol`)||`circle`,style:e.getItemVisual(t,`style`),symbolClip:o,symbolRepeat:a,symbolRepeatDirection:n.get(`symbolRepeatDirection`),symbolPatternSize:l,rotation:c,animationModel:u?n:null,hoverScale:u&&n.get([`emphasis`,`scale`]),z2:n.getShallow(`z`,!0)||0};IG(n,a,i,r,d),RG(e,t,i,a,o,d.boundingLength,d.pxSign,l,r,d),zG(n,d.symbolScale,c,r,d);let f=d.symbolSize;return BG(n,f,i,a,o,dS(n.get(`symbolOffset`),f),s,d.valueLineWidth,d.boundingLength,d.repeatCutLength,r,d),d}function IG(e,t,n,r,i){let a=r.valueDim,o=e.get(`symbolBoundingData`),s=r.coordSys.getOtherAxis(r.coordSys.getBaseAxis()),c=s.toGlobalCoord(s.dataToCoord(0)),l=1-(n[a.wh]<=0),u;if(L(o)){let e=[LG(s,o[0])-c,LG(s,o[1])-c];e[1]<e[0]&&e.reverse(),u=e[l]}else u=o==null?t?r.coordSysExtent[a.index][l]-c:n[a.wh]:LG(s,o)-c;i.boundingLength=u,t&&(i.repeatCutLength=n[a.wh]);let d=a.xy===`x`,f=s.inverse;i.pxSign=d&&!f||!d&&f?u>=0?1:-1:u>0?1:-1}function LG(e,t){return e.toGlobalCoord(e.dataToCoord(e.scale.parse(t)))}function RG(e,t,n,r,i,a,o,s,c,l){let u=c.valueDim,d=c.categoryDim,f=Math.abs(n[d.wh]),p=e.getItemVisual(t,`symbolSize`),m;m=L(p)?p.slice():p==null?[`100%`,`100%`]:[p,p],m[d.index]=J(m[d.index],f),m[u.index]=J(m[u.index],r?f:Math.abs(a)),l.symbolSize=m;let h=l.symbolScale=[m[0]/s,m[1]/s];h[u.index]*=(c.isHorizontal?-1:1)*o}function zG(e,t,n,r,i){let a=e.get(jG)||0;a&&(NG.attr({scaleX:t[0],scaleY:t[1],rotation:n}),NG.updateTransform(),a/=NG.getLineScale(),a*=t[r.valueDim.index]),i.valueLineWidth=a||0}function BG(e,t,n,r,i,a,o,s,c,l,u,d){let f=u.categoryDim,p=u.valueDim,m=d.pxSign,h=Math.max(t[p.index]+s,0),g=h;if(r){let n=Math.abs(c),i=Se(e.get(`symbolMargin`),`15%`)+``,a=!1;i.lastIndexOf(`!`)===i.length-1&&(a=!0,i=i.slice(0,i.length-1));let o=J(i,t[p.index]),s=Math.max(h+o*2,0),u=a?0:o*2,f=ns(r),m=f?r:nK((n+u)/s);o=(n-m*h)/2/(a?m:Math.max(m-1,1)),s=h+o*2,u=a?0:o*2,!f&&r!==`fixed`&&(m=l?nK((Math.abs(l)+u)/s):0),g=m*s-u,d.repeatTimes=m,d.symbolMargin=o}let _=g/2*m,v=d.pathPosition=[];v[f.index]=n[f.wh]/2,v[p.index]=o===`start`?_:o===`end`?c-_:c/2,a&&(v[0]+=a[0],v[1]+=a[1]);let y=d.bundlePosition=[];y[f.index]=n[f.xy],y[p.index]=n[p.xy];let b=d.barRectShape=j({},n);b[p.wh]=m*Math.max(Math.abs(n[p.wh]),Math.abs(v[p.index]+_)),b[f.wh]=n[f.wh];let x=d.clipShape={};x[f.xy]=-n[f.xy],x[f.wh]=u.ecSize[f.wh],x[p.xy]=0,x[p.wh]=n[p.wh]}function VG(e){let t=e.symbolPatternSize,n=lS(e.symbolType,-t/2,-t/2,t,t);return n.attr({culling:!0}),n.type!==`image`&&n.setStyle({strokeNoScale:!0}),n}function HG(e,t,n,r){let i=e.__pictorialBundle,a=n.symbolSize,o=n.valueLineWidth,s=n.pathPosition,c=t.valueDim,l=n.repeatTimes||0,u=0,d=a[t.valueDim.index]+o+n.symbolMargin*2;for($G(e,function(e){e.__pictorialAnimationIndex=u,e.__pictorialRepeatTimes=l,u<l?eK(e,null,f(u),n,r):eK(e,null,{scaleX:0,scaleY:0},n,r,function(){i.remove(e)}),u++});u<l;u++){let e=VG(n);e.__pictorialAnimationIndex=u,e.__pictorialRepeatTimes=l,i.add(e);let t=f(u);eK(e,{x:t.x,y:t.y,scaleX:0,scaleY:0},{scaleX:t.scaleX,scaleY:t.scaleY,rotation:t.rotation},n,r)}function f(e){let t=s.slice(),r=n.pxSign,i=e;return(n.symbolRepeatDirection===`start`?r>0:r<0)&&(i=l-1-e),t[c.index]=d*(i-l/2+.5)+s[c.index],{x:t[0],y:t[1],scaleX:n.symbolScale[0],scaleY:n.symbolScale[1],rotation:n.rotation}}}function UG(e,t,n,r){let i=e.__pictorialBundle,a=e.__pictorialMainPath;a?eK(a,null,{x:n.pathPosition[0],y:n.pathPosition[1],scaleX:n.symbolScale[0],scaleY:n.symbolScale[1],rotation:n.rotation},n,r):(a=e.__pictorialMainPath=VG(n),i.add(a),eK(a,{x:n.pathPosition[0],y:n.pathPosition[1],scaleX:0,scaleY:0,rotation:n.rotation},{scaleX:n.symbolScale[0],scaleY:n.symbolScale[1]},n,r))}function WG(e,t,n){let r=j({},t.barRectShape),i=e.__pictorialBarRect;i?eK(i,null,{shape:r},t,n):(i=e.__pictorialBarRect=new Uu({z2:2,shape:r,silent:!0,style:{stroke:`transparent`,fill:`transparent`,lineWidth:0}}),i.disableMorphing=!0,e.add(i))}function GG(e,t,n,r){if(n.symbolClip){let i=e.__pictorialClipPath,a=j({},n.clipShape),o=t.valueDim,s=n.animationModel,c=n.dataIndex;if(i)em(i,{shape:a},s,c);else{a[o.wh]=0,i=new Uu({shape:a}),e.__pictorialBundle.setClipPath(i),e.__pictorialClipPath=i;let t={};t[o.wh]=n.clipShape[o.wh],cm[r?`updateProps`:`initProps`](i,{shape:t},s,c)}}}function KG(e,t){let n=e.getItemModel(t);return n.getAnimationDelayParams=qG,n.isAnimationEnabled=JG,n}function qG(e){return{index:e.__pictorialAnimationIndex,count:e.__pictorialRepeatTimes}}function JG(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow(`animation`)}function YG(e,t,n,r){let i=new q,a=new q;return i.add(a),i.__pictorialBundle=a,a.x=n.bundlePosition[0],a.y=n.bundlePosition[1],n.symbolRepeat?HG(i,t,n):UG(i,t,n),WG(i,n,r),GG(i,t,n,r),i.__pictorialShapeStr=QG(e,n),i.__pictorialSymbolMeta=n,i}function XG(e,t,n){let r=n.animationModel,i=n.dataIndex,a=e.__pictorialBundle;em(a,{x:n.bundlePosition[0],y:n.bundlePosition[1]},r,i),n.symbolRepeat?HG(e,t,n,!0):UG(e,t,n,!0),WG(e,n,!0),GG(e,t,n,!0)}function ZG(e,t,n,r){let i=r.__pictorialBarRect;i&&i.removeTextContent();let a=[];$G(r,function(e){a.push(e)}),r.__pictorialMainPath&&a.push(r.__pictorialMainPath),r.__pictorialClipPath&&(n=null),P(a,function(e){rm(e,{scaleX:0,scaleY:0},n,t,function(){r.parent&&r.parent.remove(r)})}),e.setItemGraphicEl(t,null)}function QG(e,t){return[e.getItemVisual(t.dataIndex,`symbol`)||`none`,!!t.symbolRepeat,!!t.symbolClip].join(`:`)}function $G(e,t,n){P(e.__pictorialBundle.children(),function(r){r!==e.__pictorialBarRect&&t.call(n,r)})}function eK(e,t,n,r,i,a){t&&e.attr(t),r.symbolClip&&!i?n&&e.attr(n):n&&cm[i?`updateProps`:`initProps`](e,n,r.animationModel,r.dataIndex,a)}function tK(e,t,n){let r=n.dataIndex,i=n.itemModel,a=i.getModel(`emphasis`),o=a.getModel(`itemStyle`).getItemStyle(),s=i.getModel([`blur`,`itemStyle`]).getItemStyle(),c=i.getModel([`select`,`itemStyle`]).getItemStyle(),l=i.getShallow(`cursor`),u=a.get(`focus`),d=a.get(`blurScope`),f=a.get(`scale`);$G(e,function(e){if(e instanceof Fu){let t=e.style;e.useStyle(j({image:t.image,x:t.x,y:t.y,width:t.width,height:t.height},n.style))}else e.useStyle(n.style);let t=e.ensureState(`emphasis`);t.style=o,f&&(t.scaleX=e.scaleX*1.1,t.scaleY=e.scaleY*1.1),e.ensureState(`blur`).style=s,e.ensureState(`select`).style=c,l&&(e.cursor=l),e.z2=n.z2});let p=t.valueDim.posDesc[+(n.boundingLength>0)],m=e.__pictorialBarRect;m.ignoreClip=!0,ih(m,ah(i),{labelFetcher:t.seriesModel,labelDataIndex:r,defaultText:Ik(t.seriesModel.getData(),r),inheritColor:n.style.fill,defaultOpacity:n.style.opacity,defaultOutsidePosition:p}),_f(e,u,d,a.get(`disabled`))}function nK(e){let t=Math.round(e);return Math.abs(e-t)<1e-4?t:Math.ceil(e)}var rK=class e extends fM{constructor(...t){super(...t),this.type=e.type,this.hasSymbolVisual=!0,this.defaultSymbol=`roundRect`}getInitialData(e){return e.stack=null,super.getInitialData.apply(this,arguments)}};rK.type=`series.pictorialBar`,rK.dependencies=[`grid`],rK.defaultOption=Ph(fM.defaultOption,{symbol:`circle`,symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:`end`,symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:`-100%`,clip:!1,progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:Q.color.primary}}});function iK(e){e.registerChartView(PG),e.registerSeriesModel(rK),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,sM(qj)),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,cM(qj)),dM(e)}const aK=`themeRiver`;var oK=class e extends Db{constructor(...t){super(...t),this.type=e.type}init(e){super.init.apply(this,arguments),this.legendVisualProvider=new YM(I(this.getData,this),I(this.getRawData,this))}fixData(e){let t=e.length,n={},r=ec(e,e=>(n.hasOwnProperty(e[0]+``)||(n[e[0]+``]=-1),e[2])),i=[];r.buckets.each(function(e,t){i.push({name:t,dataList:e})});let a=i.length;for(let r=0;r<a;++r){let a=i[r].name;for(let e=0;e<i[r].dataList.length;++e){let t=i[r].dataList[e][0]+``;n[t]=r}for(let i in n)n.hasOwnProperty(i)&&n[i]!==r&&(n[i]=r,e[t]=[i,0,a],t++)}return e}getInitialData(e,t){let n=this.getReferringComponents(`singleAxis`,qs).models[0].get(`type`),r=ce(e.data,function(e){return e[2]!==void 0}),i=this.fixData(r||[]),a=[],o=this.nameMap=U(),s=0;for(let e=0;e<i.length;++e)a.push(i[e][2]),o.get(i[e][2])||(o.set(i[e][2],s),s++);let{dimensions:c}=lT(i,{coordDimensions:[`single`],dimensionsDefine:[{name:`time`,type:Rw(n)},{name:`value`,type:`float`},{name:`name`,type:`ordinal`}],encodeDefine:{single:0,value:1,itemName:2}}),l=new sT(c,this);return l.initData(i),l}getLayerSeries(){let e=this.getData(),t=e.count(),n=[];for(let e=0;e<t;++e)n[e]=e;let r=e.mapDimension(`single`),i=ec(n,function(t){return e.get(`name`,t)}),a=[];return i.buckets.each(function(t,n){t.sort(function(t,n){return e.get(r,t)-e.get(r,n)}),a.push({name:n,indices:t})}),a}getAxisTooltipData(e,t,n){L(e)||(e=e?[e]:[]);let r=this.getData(),i=this.getLayerSeries(),a=[],o=i.length,s;for(let n=0;n<o;++n){let o=Number.MAX_VALUE,c=-1,l=i[n].indices.length;for(let a=0;a<l;++a){let l=r.get(e[0],i[n].indices[a]),u=Math.abs(l-t);u<=o&&(s=l,o=u,c=i[n].indices[a])}a.push(c)}return{dataIndices:a,nestestValue:s}}formatTooltip(e,t,n){let r=this.getData();return ab(`nameValue`,{name:r.getName(e),value:r.get(r.mapDimension(`value`),e)})}};oK.type=`series.themeRiver`,oK.dependencies=[`singleAxis`],oK.defaultOption={z:2,colorBy:`data`,coordinateSystem:`singleAxis`,boundaryGap:[`10%`,`10%`],singleAxisIndex:0,animationEasing:`linear`,label:{margin:4,show:!0,position:`left`,fontSize:11},emphasis:{label:{show:!0}}};var sK=class extends Vb{constructor(...e){super(...e),this.type=aK,this._layers=[]}render(e,t,n){let r=e.getData(),i=this,a=this.group,o=e.getLayerSeries(),s=r.getLayout(`layoutInfo`),c=s.rect,l=s.boundaryGap;a.x=0,a.y=c.y+l[0];function u(e){return e.name}let d=new Pw(this._layersSeries||[],o,u,u),f=[];d.add(I(p,this,`add`)).update(I(p,this,`update`)).remove(I(p,this,`remove`)).execute();function p(t,n,s){let c=i._layers;if(t===`remove`){a.remove(c[n]);return}let l=[],u=[],d,p=o[n].indices,m=0;for(;m<p.length;m++){let e=r.getItemLayout(p[m]),t=e.x,n=e.y0,i=e.y;l.push(t,n),u.push(t,n+i),d=r.getItemVisual(p[m],`style`)}let h,g=r.getItemLayout(p[0]),_=e.getModel(`label`).get(`margin`),v=e.getModel(`emphasis`);if(t===`add`){let t=f[n]=new q;h=new sA({shape:{points:l,stackedOnPoints:u,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),t.add(h),a.add(t),e.isAnimationEnabled()&&h.setClipPath(cK(h.getBoundingRect(),e,function(){h.removeClipPath()}))}else{let t=c[s];h=t.childAt(0),a.add(t),f[n]=t,em(h,{shape:{points:l,stackedOnPoints:u}},e),om(h)}ih(h,ah(e),{labelDataIndex:p[m-1],defaultText:r.getName(p[m-1]),inheritColor:d.fill},{normal:{verticalAlign:`middle`}}),h.setTextConfig({position:null,local:!0});let y=h.getTextContent();y&&(y.x=g.x-_,y.y=g.y0+g.y/2),h.useStyle(d),r.setItemGraphicEl(n,h),xf(h,e),_f(h,v.get(`focus`),v.get(`blurScope`),v.get(`disabled`))}this._layersSeries=o,this._layers=f}};sK.type=aK;function cK(e,t,n){let r=new Uu({shape:{x:e.x-10,y:e.y-10,width:0,height:e.height+20}});return tm(r,{shape:{x:e.x-50,width:e.width+100,height:e.height+20}},t,n),r}const lK=xc(aK,uK);function uK(e,t){e.eachSeriesByType(aK,function(e){let t=e.getData(),n=e.coordinateSystem,r={},i=n.getRect();r.rect=i;let a=e.get(`boundaryGap`),o=n.getAxis();r.boundaryGap=a,o.orient===`horizontal`?(a[0]=J(a[0],i.height),a[1]=J(a[1],i.height),dK(t,e,i.height-a[0]-a[1])):(a[0]=J(a[0],i.width),a[1]=J(a[1],i.width),dK(t,e,i.width-a[0]-a[1])),t.setLayout(`layoutInfo`,r)})}function dK(e,t,n){if(!e.count())return;let r=t.coordinateSystem,i=t.getLayerSeries(),a=e.mapDimension(`single`),o=e.mapDimension(`value`),s=F(i,function(t){return F(t.indices,function(t){let n=r.dataToPoint(e.get(a,t));return n[1]=e.get(o,t),n})}),c=fK(s),l=c.y0,u=n/c.max,d=i.length,f=i[0].indices.length,p;for(let t=0;t<f;++t){p=l[t]*u,e.setItemLayout(i[0].indices[t],{layerIndex:0,x:s[0][t][0],y0:p,y:s[0][t][1]*u});for(let n=1;n<d;++n)p+=s[n-1][t][1]*u,e.setItemLayout(i[n].indices[t],{layerIndex:n,x:s[n][t][0],y0:p,y:s[n][t][1]*u})}}function fK(e){let t=e.length,n=e[0].length,r=[],i=[],a=0;for(let i=0;i<n;++i){let n=0;for(let r=0;r<t;++r)n+=e[r][i][1];n>a&&(a=n),r.push(n)}for(let e=0;e<n;++e)i[e]=(a-r[e])/2;a=0;for(let e=0;e<n;++e){let t=r[e]+i[e];t>a&&(a=t)}return{y0:i,max:a}}function pK(e){e.registerChartView(sK),e.registerSeriesModel(oK),e.registerLayout(lK),e.registerProcessor(qM(aK))}var mK=class extends vp{constructor(e,t,n,r){super(),this.z2=2,this.textConfig={inside:!0},X(this).seriesIndex=t.seriesIndex;let i=new qu({z2:4,silent:e.getModel().get([`label`,`silent`])});this.setTextContent(i),this.updateData(!0,e,t,n,r)}updateData(e,t,n,r,i){this.node=t,t.piece=this,n=n||this._seriesModel,r=r||this._ecModel;let a=this;X(a).dataIndex=t.dataIndex;let o=t.getModel(),s=o.getModel(`emphasis`),c=t.getLayout(),l=j({},c);l.label=null;let u=t.getVisual(`style`);u.lineJoin=`bevel`;let d=t.getVisual(`decal`);d&&(u.decal=JS(d,i)),j(l,bM(o.getModel(`itemStyle`),l,!0)),P(wd,function(e){let t=a.ensureState(e),n=o.getModel([e,`itemStyle`]);t.style=n.getItemStyle();let r=bM(n,l);r&&(t.shape=r)}),e?(a.setShape(l),a.shape.r=c.r0,tm(a,{shape:{r:c.r}},n,t.dataIndex)):(em(a,{shape:l},n),om(a)),a.useStyle(u),this._updateLabel(n);let f=o.getShallow(`cursor`);f&&a.attr(`cursor`,f),this._seriesModel=n||this._seriesModel,this._ecModel=r||this._ecModel;let p=s.get(`focus`),m=p===`relative`?Pe(t.getAncestorsIndices(),t.getDescendantIndices()):p===`ancestor`?t.getAncestorsIndices():p===`descendant`?t.getDescendantIndices():p;_f(this,m,s.get(`blurScope`),s.get(`disabled`))}_updateLabel(e){let t=this.node.getModel(),n=t.getModel(`label`),r=this.node.getLayout(),i=r.endAngle-r.startAngle,a=(r.startAngle+r.endAngle)/2,o=Math.cos(a),s=Math.sin(a),c=this,l=c.getTextContent(),u=this.node.dataIndex,d=n.get(`minAngle`)/180*Math.PI;l.ignore=!(n.get(`show`)&&!(d!=null&&Math.abs(i)<d)),P(Td,n=>{let d=n===`normal`?t.getModel(`label`):t.getModel([n,`label`]),p=n===`normal`,m=p?l:l.ensureState(n),h=e.getFormattedLabel(u,n);p&&(h=h||this.node.name),m.style=oh(d,{},null,n!==`normal`,!0),h&&(m.style.text=h);let g=d.get(`show`);g!=null&&!p&&(m.ignore=!g);let _=f(d,`position`),v=p?c:c.states[n],y=v.style.fill;v.textConfig={outsideFill:d.get(`color`)===`inherit`?y:null,inside:_!==`outside`};let b,x=f(d,`distance`)||0,S=f(d,`align`),C=f(d,`rotate`),w=Math.PI*.5,T=Math.PI*1.5,E=cu(C===`tangential`?Math.PI/2-a:a),D=E>w&&!qo(E-w)&&E<T;_===`outside`?(b=r.r+x,S=D?`right`:`left`):!S||S===`center`?(b=r.r0===0&&qo(i-2*Math.PI)?0:(r.r+r.r0)/2,S=`center`):S===`left`?(b=r.r0+x,S=D?`right`:`left`):S===`right`&&(b=r.r-x,S=D?`left`:`right`),m.style.align=S,m.style.verticalAlign=f(d,`verticalAlign`)||`middle`,m.x=b*o+r.cx,m.y=b*s+r.cy;let O=0;C===`radial`?O=cu(-a)+(D?Math.PI:0):C===`tangential`?O=cu(Math.PI/2-a)+(D?Math.PI:0):me(C)&&(O=C*Math.PI/180),m.rotation=cu(O)});function f(e,t){let r=e.get(t);return r==null?n.get(t):r}l.dirtyStyle()}};const hK=`sunburst`;var gK=class e extends Db{constructor(...t){super(...t),this.type=e.type,this.ignoreStyleOnData=!0}getInitialData(e,t){let n={name:e.name,children:e.data};_K(n);let r=this._levelModels=F(e.levels||[],function(e){return new kh(e,this,t)},this),i=dR.createTree(n,this,a);function a(e){e.wrapMethod(`getItemModel`,function(e,t){let n=i.getNodeByDataIndex(t),a=r[n.depth];return a&&(e.parentModel=a),e})}return i.data}optionUpdated(){this.resetViewRoot()}getDataParams(e){let t=super.getDataParams.apply(this,arguments);return t.treePathInfo=gR(this.getData().tree.getNodeByDataIndex(e),this),t}getLevelModel(e){return this._levelModels&&this._levelModels[e.depth]}getViewRoot(){return this._viewRoot}resetViewRoot(e){e?this._viewRoot=e:e=this._viewRoot;let t=this.getRawData().tree.root;(!e||e!==t&&!t.contains(e))&&(this._viewRoot=t)}enableAriaDecal(){zR(this)}};gK.type=`series.sunburst`,gK.defaultOption={z:2,center:[`50%`,`50%`],radius:[0,`75%`],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:`rootToNode`,renderLabelForZeroData:!1,label:{rotate:`radial`,show:!0,opacity:1,align:`center`,position:`inside`,distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:`white`,borderType:`solid`,shadowBlur:0,shadowColor:`rgba(0, 0, 0, 0.2)`,shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:`descendant`},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:`expansion`,animationDuration:1e3,animationDurationUpdate:500,data:[],sort:`desc`};function _K(e){let t=0;P(e.children,function(e){_K(e);let n=e.value;L(n)&&(n=n[0]),t+=n});let n=e.value;L(n)&&(n=n[0]),(n==null||isNaN(n))&&(n=t),n<0&&(n=0),L(e.value)?e.value[0]=n:e.value=n}const vK=`sunburstRootToNode`,yK=`sunburstHighlight`;function bK(e){e.registerAction({type:vK,update:`updateView`},function(e,t){t.eachComponent({mainType:`series`,subType:`sunburst`,query:e},n);function n(t,n){let r=pR(e,[vK],t);if(r){let n=t.getViewRoot();n&&(e.direction=hR(n,r.node)?`rollUp`:`drillDown`),t.resetViewRoot(r.node)}}}),e.registerAction({type:yK,update:`none`},function(e,t,n){e=j({},e),t.eachComponent({mainType:`series`,subType:`sunburst`,query:e},r);function r(t){let n=pR(e,[yK],t);n&&(e.dataIndex=n.node.dataIndex)}typeof process<`u`&&process.env.NODE_ENV!==`production`&&ms(`sunburstHighlight`,`highlight`),n.dispatchAction(j(e,{type:`highlight`}))}),e.registerAction({type:`sunburstUnhighlight`,update:`updateView`},function(e,t,n){e=j({},e),typeof process<`u`&&process.env.NODE_ENV!==`production`&&ms(`sunburstUnhighlight`,`downplay`),n.dispatchAction(j(e,{type:`downplay`}))})}var xK=class extends Vb{constructor(...e){super(...e),this.type=hK}render(e,t,n,r){let i=this;this.seriesModel=e,this.api=n,this.ecModel=t;let a=e.getData(),o=a.tree.root,s=e.getViewRoot(),c=this.group,l=e.get(`renderLabelForZeroData`),u=[];s.eachNode(function(e){u.push(e)}),d(u,this._oldChildren||[]),m(o,s),this._initEvents(),this._oldChildren=u;function d(e,t){if(e.length===0&&t.length===0)return;new Pw(t,e,n,n).add(r).update(r).remove(fe(r,null)).execute();function n(e){return e.getId()}function r(n,r){f(n==null?null:e[n],r==null?null:t[r])}}function f(r,i){if(!l&&r&&!r.getValue()&&(r=null),r!==o&&i!==o){if(i&&i.piece)r?(i.piece.updateData(!1,r,e,t,n),a.setItemGraphicEl(r.dataIndex,i.piece)):p(i);else if(r){let i=new mK(r,e,t,n);c.add(i),a.setItemGraphicEl(r.dataIndex,i)}}}function p(e){e&&e.piece&&(c.remove(e.piece),e.piece=null)}function m(r,a){a.depth>0?(i.virtualPiece?i.virtualPiece.updateData(!1,r,e,t,n):(i.virtualPiece=new mK(r,e,t,n),c.add(i.virtualPiece)),a.piece.off(`click`),i.virtualPiece.on(`click`,function(e){i._rootToNode(a.parentNode)})):i.virtualPiece&&(c.remove(i.virtualPiece),i.virtualPiece=null)}}_initEvents(){this.group.off(`click`),this.group.on(`click`,e=>{let t=!1;this.seriesModel.getViewRoot().eachNode(n=>{if(!t&&n.piece&&n.piece===e.target){let e=n.getModel().get(`nodeClick`);if(e===`rootToNode`)this._rootToNode(n);else if(e===`link`){let e=n.getModel(),t=e.get(`link`);t&&Ug(t,e.get(`target`,!0)||`_blank`)}t=!0}})})}_rootToNode(e){e!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:vK,from:this.uid,seriesId:this.seriesModel.id,targetNode:e})}containPoint(e,t){let n=t.getData().getItemLayout(0);if(n){let t=e[0]-n.cx,r=e[1]-n.cy,i=Math.sqrt(t*t+r*r);return i<=n.r&&i>=n.r0}}};xK.type=hK;const SK=xc(hK,CK);function CK(e){let t={};function n(e,n,r){if(e.depth===0)return Q.color.neutral50;let i=e;for(;i&&i.depth>1;)i=i.parentNode;let a=n.getColorFromPalette(i.name||i.dataIndex+``,t);return e.depth>1&&z(a)&&(a=Kr(a,(e.depth-1)/(r-1)*.5)),a}e.eachSeriesByType(hK,function(e){let t=e.getData(),r=t.tree;r.eachNode(function(i){let a=i.getModel().getModel(`itemStyle`).getItemStyle();a.fill||(a.fill=n(i,e,r.root.height)),j(t.ensureUniqueItemVisual(i.dataIndex,`style`),a)})})}const wK=Math.PI/180,TK=xc(hK,EK);function EK(e,t){e.eachSeriesByType(hK,function(e){let n=e.get(`center`),r=e.get(`radius`);L(r)||(r=[0,r]),L(n)||(n=[n,n]);let i=t.getWidth(),a=t.getHeight(),o=Math.min(i,a),s=J(n[0],i),c=J(n[1],a),l=J(r[0],o/2),u=J(r[1],o/2),d=-e.get(`startAngle`)*wK,f=e.get(`minAngle`)*wK,p=e.getData().tree.root,m=e.getViewRoot(),h=m.depth,g=e.get(`sort`);g!=null&&DK(m,g);let _=0;P(m.children,function(e){!isNaN(e.getValue())&&_++});let v=m.getValue(),y=Math.PI/(v||_)*2,b=m.depth>0,x=m.height-(b?-1:1),S=(u-l)/(x||1),C=e.get(`clockwise`),w=e.get(`stillShowZeroSum`),T=C?1:-1,E=function(t,n){if(!t)return;let r=n;if(t!==p){let i=t.getValue(),a=v===0&&w?y:i*y;a<f&&(a=f),r=n+T*a;let u=t.depth-h-(b?-1:1),d=l+S*u,p=l+S*(u+1),m=e.getLevelModel(t);if(m){let e=m.get(`r0`,!0),t=m.get(`r`,!0),n=m.get(`radius`,!0);n!=null&&(e=n[0],t=n[1]),e!=null&&(d=J(e,o/2)),t!=null&&(p=J(t,o/2))}t.setLayout({angle:a,startAngle:n,endAngle:r,clockwise:C,cx:s,cy:c,r0:d,r:p})}if(t.children&&t.children.length){let e=0;P(t.children,function(t){e+=E(t,n+e)})}return r-n};if(b){let e=l,t=l+S,n=Math.PI*2;p.setLayout({angle:n,startAngle:d,endAngle:d+n,clockwise:C,cx:s,cy:c,r0:e,r:t})}E(m,d)})}function DK(e,t){let n=e.children||[];e.children=OK(n,t),n.length&&P(e.children,function(e){DK(e,t)})}function OK(e,t){if(R(t)){let n=F(e,(e,t)=>{let n=e.getValue();return{params:{depth:e.depth,height:e.height,dataIndex:e.dataIndex,getValue:()=>n},index:t}});return n.sort((e,n)=>t(e.params,n.params)),F(n,t=>e[t.index])}{let n=t===`asc`;return e.sort(function(e,t){let r=(e.getValue()-t.getValue())*(n?1:-1);return r===0?(e.dataIndex-t.dataIndex)*(n?-1:1):r})}}function kK(e){e.registerChartView(xK),e.registerSeriesModel(gK),e.registerLayout(TK),e.registerVisual(SK),bK(e)}const AK={color:`fill`,borderColor:`stroke`},jK={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},MK=Y();var NK=class e extends Db{constructor(...t){super(...t),this.type=e.type}optionUpdated(){this.currentZLevel=this.get(`zlevel`,!0),this.currentZ=this.get(`z`,!0)}getInitialData(e,t){return ST(null,this)}getDataParams(e,t,n){let r=super.getDataParams(e,t);return n&&(r.info=MK(n).info),r}};NK.type=`series.custom`,NK.dependencies=[`grid`,`polar`,`geo`,`singleAxis`,`calendar`,`matrix`],NK.defaultOption={coordinateSystem:`cartesian2d`,z:2,legendHoverLink:!0,clip:!1};function PK(e,t){return t=t||[0,0],F([`x`,`y`],function(n,r){let i=this.getAxis(n),a=t[r],o=e[r]/2;return i.type===`category`?kO(i).w:Math.abs(i.dataToCoord(a-o)-i.dataToCoord(a+o))},this)}function FK(e){let t=e.master.getRect();return{coordSys:{type:`cartesian2d`,x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(t){return e.dataToPoint(t)},size:I(PK,e)}}}function IK(e,t){return t=t||[0,0],F([0,1],function(n){let r=t[n],i=e[n]/2,a=[],o=[];return a[n]=r-i,o[n]=r+i,a[1-n]=o[1-n]=t[1-n],Math.abs(this.dataToPoint(a)[n]-this.dataToPoint(o)[n])},this)}function LK(e){let t=e.view,n=t.getBoundingRect();return{coordSys:{type:`geo`,x:n.x,y:n.y,width:n.width,height:n.height,zoom:sI(t)},api:{coord:function(t){return e.dataToPoint(t)},size:I(IK,e)}}}function RK(e,t){let n=this.getAxis(),r=t instanceof Array?t[0]:t,i=(e instanceof Array?e[0]:e)/2;return n.type===`category`?kO(n).w:Math.abs(n.dataToCoord(r-i)-n.dataToCoord(r+i))}function zK(e){let t=e.getRect();return{coordSys:{type:`singleAxis`,x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(t){return e.dataToPoint(t)},size:I(RK,e)}}}function BK(e,t){return t=t||[0,0],F([`Radius`,`Angle`],function(n,r){let i=`get`+n+`Axis`,a=this[i](),o=t[r],s=e[r]/2,c=a.type===`category`?kO(a).w:Math.abs(a.dataToCoord(o-s)-a.dataToCoord(o+s));return n===`Angle`&&(c=c*Math.PI/180),c},this)}function VK(e){let t=e.getRadiusAxis(),n=e.getAngleAxis(),r=t.getExtent();return r[0]>r[1]&&r.reverse(),{coordSys:{type:`polar`,cx:e.cx,cy:e.cy,r:r[1],r0:r[0]},api:{coord:function(r){let i=t.dataToRadius(r[0]),a=n.dataToAngle(r[1]),o=e.coordToPoint([i,a]);return o.push(i,a*Math.PI/180),o},size:I(BK,e)}}}function HK(e){let t=e.getRect(),n=e.getRangeInfo();return{coordSys:{type:`calendar`,x:t.x,y:t.y,width:t.width,height:t.height,cellWidth:e.getCellWidth(),cellHeight:e.getCellHeight(),rangeInfo:{start:n.start,end:n.end,weeks:n.weeks,dayCount:n.allDay}},api:{coord:function(t,n){return e.dataToPoint(t,n)},layout:function(t,n){return e.dataToLayout(t,n)}}}}function UK(e){let t=e.getRect();return{coordSys:{type:`matrix`,x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(t,n){return e.dataToPoint(t,n)},layout:function(t,n){return e.dataToLayout(t,n)}}}}const WK={position:[`x`,`y`],scale:[`scaleX`,`scaleY`],origin:[`originX`,`originY`]},GK=ue(WK),KK=se(Sa,(e,t)=>(e[t]=1,e),{}),qK=Sa.join(`, `),JK=[``,`style`,`shape`,`extra`],YK=Y();function XK(e,t,n,r,i){let a=`${e}Animation`,o=Qp(e,r,i)||{},s=YK(t).userDuring;return o.duration>0&&(o.during=s?I(sq,{el:t,userDuring:s}):null,o.setToFinal=!0,o.scope=e),j(o,n[a]),o}function ZK(e,t,n,r){r=r||{};let{dataIndex:i,isInit:a,clearStyle:o}=r,s=n.isAnimationEnabled(),c=YK(e),l=t.style;c.userDuring=t.during;let u={},d={};if(dq(e,t,d),e.type===`compound`){let n=e.shape.paths,r=t.shape.paths;for(let e=0;e<r.length;e++){let t=r[e];lq(`shape`,t,n[e])}}else lq(`shape`,t,d),lq(`extra`,t,d);if(!a&&s&&(uq(e,t,u),cq(`shape`,e,t,u),cq(`extra`,e,t,u),fq(e,t,l,u)),d.style=l,tq(e,d,o),rq(e,t),s){if(a){let r={};P(JK,e=>{let n=e?t[e]:t;n&&n.enterFrom&&(e&&(r[e]=r[e]||{}),j(e?r[e]:r,n.enterFrom))});let a=XK(`enter`,e,t,n,i);a.duration>0&&e.animateFrom(r,a)}else nq(e,t,i||0,n,u)}QK(e,t),l?e.dirty():e.markRedraw()}function QK(e,t){let n=YK(e).leaveToProps;for(let r=0;r<JK.length;r++){let i=JK[r],a=i?t[i]:t;a&&a.leaveTo&&(n||(n=YK(e).leaveToProps={}),i&&(n[i]=n[i]||{}),j(i?n[i]:n,a.leaveTo))}}function $K(e,t,n,r){if(e){let i=e.parent,a=YK(e).leaveToProps;if(a){let o=XK(`update`,e,t,n,0);o.done=()=>{i&&i.remove(e),r&&r()},e.animateTo(a,o)}else i&&i.remove(e),r&&r()}}function eq(e){return e===`all`}function tq(e,t,n){let r=t.style;if(!e.isGroup&&r){if(n){e.useStyle({});let t=e.animators;for(let n=0;n<t.length;n++){let r=t[n];r.targetName===`style`&&r.changeTarget(e.style)}}e.setStyle(r)}t&&(t.style=null,t&&e.attr(t),t.style=r)}function nq(e,t,n,r,i){if(i){let a=XK(`update`,e,t,r,n);a.duration>0&&e.animateFrom(i,a)}}function rq(e,t){W(t,`silent`)&&(e.silent=t.silent),W(t,`ignore`)&&(e.ignore=t.ignore),e instanceof yl&&W(t,`invisible`)&&(e.invisible=t.invisible),e instanceof Ou&&W(t,`autoBatch`)&&(e.autoBatch=t.autoBatch)}const iq={},aq={setTransform(e,t){return typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(W(KK,e),`Only `+qK+" available in `setTransform`."),iq.el[e]=t,this},getTransform(e){return typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(W(KK,e),`Only `+qK+" available in `getTransform`."),iq.el[e]},setShape(e,t){typeof process<`u`&&process.env.NODE_ENV!==`production`&&oq(e);let n=iq.el,r=n.shape||(n.shape={});return r[e]=t,n.dirtyShape&&n.dirtyShape(),this},getShape(e){typeof process<`u`&&process.env.NODE_ENV!==`production`&&oq(e);let t=iq.el.shape;if(t)return t[e]},setStyle(e,t){typeof process<`u`&&process.env.NODE_ENV!==`production`&&oq(e);let n=iq.el,r=n.style;return r&&(typeof process<`u`&&process.env.NODE_ENV!==`production`&&xe(t)&&ds(`style.`+e+` must not be assigned with NaN.`),r[e]=t,n.dirtyStyle&&n.dirtyStyle()),this},getStyle(e){typeof process<`u`&&process.env.NODE_ENV!==`production`&&oq(e);let t=iq.el.style;if(t)return t[e]},setExtra(e,t){typeof process<`u`&&process.env.NODE_ENV!==`production`&&oq(e);let n=iq.el.extra||(iq.el.extra={});return n[e]=t,this},getExtra(e){typeof process<`u`&&process.env.NODE_ENV!==`production`&&oq(e);let t=iq.el.extra;if(t)return t[e]}};function oq(e){if(typeof process<`u`&&process.env.NODE_ENV!==`production`&&(e===`transition`||e===`enterFrom`||e===`leaveTo`))throw Error(`key must not be "`+e+`"`)}function sq(){let e=this,t=e.el;if(!t)return;let n=YK(t).userDuring,r=e.userDuring;n===r?(iq.el=t,r(aq)):e.el=e.userDuring=null}function cq(e,t,n,r){let i=n[e];if(!i)return;let a=t[e],o;if(a){let t=n.transition,s=i.transition;if(s){if(!o&&(o=r[e]={}),eq(s))j(o,a);else{let e=bs(s);for(let t=0;t<e.length;t++){let n=e[t],r=a[n];o[n]=r}}}else if(eq(t)||N(t,e)>=0){!o&&(o=r[e]={});let t=ue(a);for(let e=0;e<t.length;e++){let n=t[e],r=a[n];pq(i[n],r)&&(o[n]=r)}}}}function lq(e,t,n){let r=t[e];if(!r)return;let i=n[e]={},a=ue(r);for(let e=0;e<a.length;e++){let t=a[e];i[t]=Ni(r[t])}}function uq(e,t,n){let r=t.transition,i=eq(r)?Sa:bs(r||[]);for(let t=0;t<i.length;t++){let r=i[t];if(r===`style`||r===`shape`||r===`extra`)continue;let a=e[r];typeof process<`u`&&process.env.NODE_ENV!==`production`&&mq(r,`el.transition`),n[r]=a}}function dq(e,t,n){for(let e=0;e<GK.length;e++){let r=GK[e],i=WK[r],a=t[r];a&&(n[i[0]]=a[0],n[i[1]]=a[1])}for(let e=0;e<Sa.length;e++){let r=Sa[e];t[r]!=null&&(n[r]=t[r])}}function fq(e,t,n,r){if(!n)return;let i=e.style,a;if(i){let o=n.transition,s=t.transition;if(o&&!eq(o)){let e=bs(o);!a&&(a=r.style={});for(let t=0;t<e.length;t++){let n=e[t],r=i[n];a[n]=r}}else if(e.getAnimationStyleProps&&(eq(s)||eq(o)||N(s,`style`)>=0)){let t=e.getAnimationStyleProps(),o=t?t.style:null;if(o){!a&&(a=r.style={});let e=ue(n);for(let t=0;t<e.length;t++){let n=e[t];if(o[n]){let e=i[n];a[n]=e}}}}}}function pq(e,t){return oe(e)?e!==t:e!=null&&isFinite(e)}let mq;typeof process<`u`&&process.env.NODE_ENV!==`production`&&(mq=function(e,t){W(KK,e)||ds("Prop `"+e+"` is not a permitted in `"+t+"`. Only `"+ue(KK).join("`, `")+"` are permitted.")});const hq=Y(),gq=[`percent`,`easing`,`shape`,`style`,`extra`];function _q(e){e.stopAnimation(`keyframe`),e.attr(hq(e))}function vq(e,t,n){if(!n.isAnimationEnabled()||!t)return;if(L(t)){P(t,t=>{vq(e,t,n)});return}let r=t.keyframes,i=t.duration;if(n&&i==null){let e=Qp(`enter`,n,0);i=e&&e.duration}if(!r||!i)return;let a=hq(e);P(JK,n=>{if(n&&!e[n])return;let o,s=!1;r.sort((e,t)=>e.percent-t.percent),P(r,r=>{let c=e.animators,l=n?r[n]:r;if(typeof process<`u`&&process.env.NODE_ENV!==`production`&&r.percent>=1&&(s=!0),!l)return;let u=ue(l);if(n||(u=ce(u,e=>N(gq,e)<0)),!u.length)return;o||(o=e.animate(n,t.loop,!0),o.scope=`keyframe`);for(let e=0;e<c.length;e++)c[e]!==o&&c[e].targetName===o.targetName&&c[e].stopTracks(u);n&&(a[n]=a[n]||{});let d=n?a[n]:a;P(u,t=>{d[t]=((n?e[n]:e)||{})[t]}),o.whenWithKeys(i*r.percent,l,u,r.easing)}),o&&(typeof process<`u`&&process.env.NODE_ENV!==`production`&&(s||ds(`End frame with percent: 1 is missing in the keyframeAnimation.`,!0)),o.delay(t.delay||0).duration(i).start(t.easing))})}const yq=`emphasis`,bq=`normal`,xq=`blur`,Sq=`select`,Cq=[bq,yq,xq,Sq],wq={normal:[`itemStyle`],emphasis:[yq,`itemStyle`],blur:[xq,`itemStyle`],select:[Sq,`itemStyle`]},Tq={normal:[`label`],emphasis:[yq,`label`],blur:[xq,`label`],select:[Sq,`label`]},Eq=[`x`,`y`],Dq={normal:{},emphasis:{},blur:{},select:{}},Oq={cartesian2d:FK,geo:LK,single:zK,polar:VK,calendar:HK,matrix:UK};function kq(e){return e instanceof Ou}function Aq(e){return e instanceof yl}function jq(e,t){t.copyTransform(e),Aq(t)&&Aq(e)&&(t.setStyle(e.style),t.z=e.z,t.z2=e.z2,t.zlevel=e.zlevel,t.invisible=e.invisible,t.ignore=e.ignore,kq(t)&&kq(e)&&t.setShape(e.shape))}var Mq=class e extends Vb{constructor(...t){super(...t),this.type=e.type}render(e,t,n,r){this._progressiveEls=null;let i=this._data,a=e.getData(),o=this.group,s=Rq(e,a,t,n);i||o.removeAll(),a.diff(i).add(function(t){Bq(n,null,t,s(t,r),e,o,a)}).remove(function(t){let n=i.getItemGraphicEl(t);n&&$K(n,MK(n).option,e)}).update(function(t,c){Bq(n,i.getItemGraphicEl(c),t,s(t,r),e,o,a)}).execute();let c=e.get(`clip`,!0)?uA(e.coordinateSystem,!1,e):null;c?o.setClipPath(c):o.removeClipPath(),this._data=a}incrementalPrepareRender(e,t,n){this.group.removeAll(),this._data=null}incrementalRender(e,t,n,r,i){let a=t.getData(),o=Rq(t,a,n,r),s=this._progressiveEls=[];function c(e){e.isGroup||(e.incremental=vc(t),e.ensureState(`emphasis`).hoverLayer=2)}for(let n=e.start;n<e.end;n++){let e=Bq(null,null,n,o(n,i),t,this.group,a);e&&(e.traverse(c),s.push(e))}}eachRendered(e){Hm(this._progressiveEls||this.group,e)}filterForExposedEvent(e,t,n,r){let i=t.element;if(i==null||n.name===i)return!0;for(;(n=n.__hostTarget||n.parent)&&n!==this.group;)if(n.name===i)return!0;return!1}};Mq.type=`custom`;function Nq(e){let t=e.type,n;if(t===`path`){let t=e.shape,r=t.width!=null&&t.height!=null?{x:t.x||0,y:t.y||0,width:t.width,height:t.height}:null,i=eJ(t);n=gm(i,null,r,t.layout||`center`),MK(n).customPathData=i}else if(t===`image`)n=new Fu({}),MK(n).customImagePath=e.style.image;else if(t===`text`)n=new qu({});else if(t===`group`)n=new q;else if(t===`compoundPath`){let r=e.shape;if(!r||!r.paths){let e=``;typeof process<`u`&&process.env.NODE_ENV!==`production`&&(e=`shape.paths must be specified in compoundPath`),gs(e)}n=new Ip({shape:{paths:F(r.paths,function(e){if(e.type===`path`)return gm(e.shape.pathData,e,null);let n=hm(e.type);if(!n){let e=``;typeof process<`u`&&process.env.NODE_ENV!==`production`&&(e=`graphic type "`+t+`" can not be found.`),gs(e)}return new n})}})}else{let e=hm(t);if(!e){let e=``;typeof process<`u`&&process.env.NODE_ENV!==`production`&&(e=`graphic type "`+t+`" can not be found.`),gs(e)}n=new e}return MK(n).customGraphicType=t,n.name=e.name,n.z2EmphasisLift=1,n.z2SelectLift=1,n}function Pq(e,t,n,r,i,a,o){_q(t);let s=i&&i.normal.cfg;s&&t.setTextConfig(s),r&&r.transition==null&&(r.transition=Eq);let c=r&&r.style;if(c){if(t.type===`text`){let e=c;W(e,`textFill`)&&(e.fill=e.textFill),W(e,`textStroke`)&&(e.stroke=e.textStroke)}let n,r=kq(t)?c.decal:null;e&&r&&(r.dirty=!0,n=JS(r,e)),c.__decalPattern=n}if(Aq(t)&&c){let e=c.__decalPattern;e&&(c.decal=e)}ZK(t,r,a,{dataIndex:n,isInit:o,clearStyle:!0}),vq(t,r.keyframeAnimation,a)}function Fq(e,t,n,r,i){let a=t.isGroup?null:t,o=i&&i[e].cfg;if(a){let t=a.ensureState(e);if(r===!1){let t=a.getState(e);t&&(t.style=null)}else t.style=r||null;o&&(t.textConfig=o),Jd(a)}}function Iq(e,t,n){if(e.isGroup)return;let r=e,i=n.currentZ,a=n.currentZLevel;r.z=i,r.zlevel=a;let o=t.z2;o!=null&&(r.z2=o||0);for(let e=0;e<Cq.length;e++)Lq(r,t,Cq[e])}function Lq(e,t,n){let r=n===bq,i=r?t:Kq(t,n),a=i?i.z2:null,o;a!=null&&(o=r?e:e.ensureState(n),o.z2=a||0)}function Rq(e,t,n,r){let i=e.get(`renderItem`);if(typeof i==`string`){let e=Jx(i);e?i=e:typeof process<`u`&&process.env.NODE_ENV!==`production`&&console.warn(`Custom series renderItem '${i}' not found.
34
+ Call 'echarts.registerCustomSeries' to register it.`)}let a=e.coordinateSystem,o={};a&&(typeof process<`u`&&process.env.NODE_ENV!==`production`&&(H(i,`series.render is required.`),H(a.prepareCustoms||Oq[a.type],`This coordSys does not support custom series.`)),o=a.prepareCustoms?a.prepareCustoms(a):Oq[a.type](a));let s=M({getWidth:r.getWidth,getHeight:r.getHeight,getZr:r.getZr,getDevicePixelRatio:r.getDevicePixelRatio,value:v,style:b,ordinalRawValue:y,styleEmphasis:x,visual:w,barLayout:T,currentSeriesIndices:E,font:D},o.api||{}),c={context:{},seriesId:e.id,seriesName:e.name,seriesIndex:e.seriesIndex,coordSys:o.coordSys,dataInsideLength:t.count(),encode:zq(e.getData()),itemPayload:e.get(`itemPayload`)||{}},l,u,d={},f={},p={},m={};for(let t=0;t<Cq.length;t++){let n=Cq[t];p[n]=e.getModel(wq[n]),m[n]=e.getModel(Tq[n])}function h(e){return e===l?u||(u=t.getItemModel(e)):t.getItemModel(e)}function g(e,n){return t.hasItemOption?e===l?d[n]||(d[n]=h(e).getModel(wq[n])):h(e).getModel(wq[n]):p[n]}function _(e,n){return t.hasItemOption?e===l?f[n]||(f[n]=h(e).getModel(Tq[n])):h(e).getModel(Tq[n]):m[n]}return function(e,n){return l=e,u=null,d={},f={},i&&i(M({dataIndexInside:e,dataIndex:t.getRawIndex(e),actionType:n?n.type:null},c),s)};function v(e,n){return n==null&&(n=l),t.getStore().get(t.getDimensionIndex(e||0),n)}function y(e,n){n==null&&(n=l),e=e||0;let r=t.getDimensionInfo(e);if(!r){let r=t.getDimensionIndex(e);return r>=0?t.getStore().get(r,n):void 0}let i=t.get(r.name,n),a=r&&r.ordinalMeta;return a?a.categories[i]:i}function b(n,r){typeof process<`u`&&process.env.NODE_ENV!==`production`&&xA(`api.style`,`Please write literal style directly instead.`),r==null&&(r=l);let i=t.getItemVisual(r,`style`),a=i&&i.fill,o=i&&i.opacity,s=g(r,bq).getItemStyle();a!=null&&(s.fill=a),o!=null&&(s.opacity=o);let c={inheritColor:z(a)?a:Q.color.neutral99},u=_(r,bq),d=oh(u,null,c,!1,!0);d.text=u.getShallow(`show`)?V(e.getFormattedLabel(r,bq),Ik(t,r)):null;let f=sh(u,c,!1);return C(n,s),s=yA(s,d,f),n&&S(s,n),s.legacy=!0,s}function x(n,r){typeof process<`u`&&process.env.NODE_ENV!==`production`&&xA(`api.styleEmphasis`,`Please write literal style directly instead.`),r==null&&(r=l);let i=g(r,yq).getItemStyle(),a=_(r,yq),o=oh(a,null,null,!0,!0);o.text=a.getShallow(`show`)?Ce(e.getFormattedLabel(r,yq),e.getFormattedLabel(r,bq),Ik(t,r)):null;let s=sh(a,null,!0);return C(n,i),i=yA(i,o,s),n&&S(i,n),i.legacy=!0,i}function S(e,t){for(let n in t)W(t,n)&&(e[n]=t[n])}function C(e,t){e&&(e.textFill&&(t.textFill=e.textFill),e.textPosition&&(t.textPosition=e.textPosition))}function w(e,n){if(n==null&&(n=l),W(AK,e)){let r=t.getItemVisual(n,`style`);return r?r[AK[e]]:null}if(W(jK,e))return t.getItemVisual(n,e)}function T(e){if(a.type===`cartesian2d`)return rM(M({axis:a.getBaseAxis()},e))}function E(){return n.getCurrentSeriesIndices()}function D(e){return mh(e,n)}}function zq(e){let t={};return P(e.dimensions,function(n){let r=e.getDimensionInfo(n);if(!r.isExtraCoord){let i=r.coordDim,a=t[i]=t[i]||[];a[r.coordDimIndex]=e.getDimensionIndex(n)}}),t}function Bq(e,t,n,r,i,a,o){if(!r){a.remove(t);return}let s=Vq(e,t,n,r,i,a);return s&&o.setItemGraphicEl(n,s),s&&_f(s,r.focus,r.blurScope,r.emphasisDisabled),s}function Vq(e,t,n,r,i,a){typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(r,`should not have an null/undefined element setting`);let o=-1,s=t;t&&Hq(t,r,i)&&(o=N(a.childrenRef(),t),t=null);let c=!t,l=t;l?l.clearStates():(l=Nq(r),s&&jq(s,l)),r.morph===!1?l.disableMorphing=!0:l.disableMorphing&&(l.disableMorphing=!1),r.tooltipDisabled&&(l.tooltipDisabled=!0),Dq.normal.cfg=Dq.normal.conOpt=Dq.emphasis.cfg=Dq.emphasis.conOpt=Dq.blur.cfg=Dq.blur.conOpt=Dq.select.cfg=Dq.select.conOpt=null,Dq.isLegacy=!1,Wq(l,n,r,i,c,Dq),Uq(l,n,r,i,c),Pq(e,l,n,r,Dq,i,c),W(r,`info`)&&(MK(l).info=r.info);for(let e=0;e<Cq.length;e++){let t=Cq[e];if(t!==bq){let e=Kq(r,t),n=qq(r,e,t);Fq(t,l,e,n,Dq)}}return Iq(l,r,i),r.type===`group`&&Jq(e,l,n,r,i),o>=0?a.replaceAt(l,o):a.add(l),l}function Hq(e,t,n){let r=MK(e),i=t.type,a=t.shape,o=t.style;return n.isUniversalTransitionEnabled()||i!=null&&i!==r.customGraphicType||i===`path`&&tJ(a)&&eJ(a)!==r.customPathData||i===`image`&&W(o,`image`)&&o.image!==r.customImagePath}function Uq(e,t,n,r,i){let a=n.clipPath;if(a===!1)e&&e.getClipPath()&&e.removeClipPath();else if(a){let n=e.getClipPath();n&&Hq(n,a,r)&&(n=null),n||(n=Nq(a),typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(kq(n),"Only any type of `path` can be used in `clipPath`, rather than "+n.type+`.`),e.setClipPath(n)),Pq(null,n,t,a,null,r,i)}}function Wq(e,t,n,r,i,a){if(e.isGroup||e.type===`compoundPath`)return;Gq(n,null,a),Gq(n,yq,a);let o=a.normal.conOpt,s=a.emphasis.conOpt,c=a.blur.conOpt,l=a.select.conOpt;if(o!=null||s!=null||l!=null||c!=null){let n=e.getTextContent();if(o===!1)n&&e.removeTextContent();else{o=a.normal.conOpt=o||{type:`text`},n?n.clearStates():(n=Nq(o),e.setTextContent(n)),Pq(null,n,t,o,null,r,i);let s=o&&o.style;for(let e=0;e<Cq.length;e++){let t=Cq[e];if(t!==bq){let e=a[t].conOpt;Fq(t,n,e,qq(o,e,t),null)}}s?n.dirty():n.markRedraw()}}}function Gq(e,t,n){let r=t?Kq(e,t):e,i=t?qq(e,r,yq):e.style,a=e.type,o=r?r.textConfig:null,s=e.textContent,c=s?t?Kq(s,t):s:null;if(i&&(n.isLegacy||gA(i,a,!!o,!!c))){n.isLegacy=!0;let e=_A(i,a,!t);!o&&e.textConfig&&(o=e.textConfig),!c&&e.textContent&&(c=e.textContent)}if(!t&&c){let e=c;!e.type&&(e.type=`text`),typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(e.type===`text`,`textContent.type must be "text"`)}let l=t?n[t]:n.normal;l.cfg=o,l.conOpt=c}function Kq(e,t){return t?e?e[t]:null:e}function qq(e,t,n){let r=t&&t.style;return r==null&&n===yq&&e&&(r=e.styleEmphasis),r}function Jq(e,t,n,r,i){let a=r.children,o=a?a.length:0,s=r.$mergeChildren,c=s===`byName`||r.diffChildrenByName,l=s===!1;if(!o&&!c&&!l)return;if(c){Xq({api:e,oldChildren:t.children()||[],newChildren:a||[],dataIndex:n,seriesModel:i,group:t});return}l&&t.removeAll();let u=0;for(;u<o;u++){let r=a[u],o=t.childAt(u);r?(r.ignore==null&&(r.ignore=!1),Vq(e,o,n,r,i,t)):(typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(o,`renderItem should not return a group containing elements as null/undefined/{} if they do not exist before.`),o.ignore=!0)}for(let e=t.childCount()-1;e>=u;e--)Yq(t,t.childAt(e),i)}function Yq(e,t,n){t&&$K(t,MK(e).option,n)}function Xq(e){new Pw(e.oldChildren,e.newChildren,Zq,Zq,e).add(Qq).update(Qq).remove($q).execute()}function Zq(e,t){let n=e&&e.name;return n==null?`e\0\0`+t:n}function Qq(e,t){let n=this.context,r=e==null?null:n.newChildren[e],i=t==null?null:n.oldChildren[t];Vq(n.api,i,n.dataIndex,r,n.seriesModel,n.group)}function $q(e){let t=this.context,n=t.oldChildren[e];n&&$K(n,MK(n).option,t.seriesModel)}function eJ(e){return e&&(e.pathData||e.d)}function tJ(e){return e&&(W(e,`pathData`)||W(e,`d`))}function nJ(e){e.registerChartView(Mq),e.registerSeriesModel(NK)}const rJ=Y(),iJ=k,aJ=I;var oJ=class{constructor(){this._dragging=!1,this.animationThreshold=15}render(e,t,n,r){let i=t.get(`value`),a=t.get(`status`);if(this._axisModel=e,this._axisPointerModel=t,this._api=n,!r&&this._lastValue===i&&this._lastStatus===a)return;this._lastValue=i,this._lastStatus=a;let o=this._group,s=this._handle;if(!a||a===`hide`){o&&o.hide(),s&&s.hide();return}o&&o.show(),s&&s.show();let c={};this.makeElOption(c,i,e,t,n);let l=c.graphicKey;l!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=l;let u=this._moveAnimation=this.determineAnimation(e,t);if(!o)o=this._group=new q,this.createPointerEl(o,c,e,t),this.createLabelEl(o,c,e,t),n.getZr().add(o);else{let e=fe(sJ,t,u);this.updatePointerEl(o,c,e),this.updateLabelEl(o,c,e,t)}dJ(o,t,!0),this._renderHandle(i)}remove(e){this.clear(e)}dispose(e){this.clear(e)}determineAnimation(e,t){let n=t.get(`animation`),r=e.axis,i=r.type===`category`,a=t.get(`snap`);if(!a&&!i)return!1;if(n===`auto`||n==null){let t=this.animationThreshold;if(i&&kO(r).w>t)return!0;if(a){let n=iP(e).seriesDataCount,i=r.getExtent();return Math.abs(i[0]-i[1])/n>t}return!1}return n===!0}makeElOption(e,t,n,r,i){}createPointerEl(e,t,n,r){let i=t.pointer;if(i){let n=rJ(e).pointerEl=new cm[i.type](iJ(t.pointer));e.add(n)}}createLabelEl(e,t,n,r){if(t.label){let n=rJ(e).labelEl=new qu(iJ(t.label));e.add(n),lJ(n,r)}}updatePointerEl(e,t,n){let r=rJ(e).pointerEl;r&&t.pointer&&(r.setStyle(t.pointer.style),n(r,{shape:t.pointer.shape}))}updateLabelEl(e,t,n,r){let i=rJ(e).labelEl;i&&(i.setStyle(t.label.style),n(i,{x:t.label.x,y:t.label.y}),lJ(i,r))}_renderHandle(e){if(this._dragging||!this.updateHandleTransform)return;let 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}let o;this._handle||(o=!0,r=this._handle=Mm(i.get(`icon`),{cursor:`move`,draggable:!0,onmousemove(e){zt(e.event)},onmousedown:aJ(this._onHandleDragMove,this,0,0),drift:aJ(this._onHandleDragMove,this),ondragend:aJ(this._onHandleDragEnd,this)}),n.add(r)),dJ(r,t,!1),r.setStyle(i.getItemStyle(null,[`color`,`borderColor`,`borderWidth`,`opacity`,`shadowColor`,`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`]));let s=i.get(`size`);L(s)||(s=[s,s]),r.scaleX=s[0]/2,r.scaleY=s[1]/2,Zb(this,`_doDispatchAxisPointer`,i.get(`throttle`)||0,`fixRate`),this._moveHandleToValue(e,o)}_moveHandleToValue(e,t){sJ(this._axisPointerModel,!t&&this._moveAnimation,this._handle,uJ(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))}_onHandleDragMove(e,t){let n=this._handle;if(!n)return;this._dragging=!0;let r=this.updateHandleTransform(uJ(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=r,n.stopAnimation(),n.attr(uJ(r)),rJ(n).lastProp=null,this._doDispatchAxisPointer()}_doDispatchAxisPointer(){if(!this._handle)return;let 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}]})}_onHandleDragEnd(){if(this._dragging=!1,!this._handle)return;let e=this._axisPointerModel.get(`value`);this._moveHandleToValue(e),this._api.dispatchAction({type:`hideTip`})}clear(e){this._lastValue=null,this._lastStatus=null;let 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),Qb(this,`_doDispatchAxisPointer`)}doClear(){}buildLabel(e,t,n){return n=n||0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}}};function sJ(e,t,n,r){cJ(rJ(n).lastProp,r)||(rJ(n).lastProp=r,t?em(n,r,e):(n.stopAnimation(),n.attr(r)))}function cJ(e,t){if(B(e)&&B(t)){let n=!0;return P(t,function(t,r){n=n&&cJ(e[r],t)}),!!n}return e===t}function lJ(e,t){e[t.get([`label`,`show`])?`show`:`hide`]()}function uJ(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function dJ(e,t,n){let 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 fJ(e){let 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 pJ(e,t,n,r,i){let a=hJ(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=Ng(o.get(`padding`)||0),c=o.getFont(),l=Ma(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);let m=i.verticalAlign;m===`bottom`&&(u[1]-=f),m===`middle`&&(u[1]-=f/2),mJ(u,d,f,r);let h=o.get(`backgroundColor`);(!h||h===`auto`)&&(h=t.get([`axisLine`,`lineStyle`,`color`])),e.label={x:u[0],y:u[1],style:oh(o,{text:a,font:c,fill:o.getTextColor(),padding:s,backgroundColor:h}),z2:10}}function mJ(e,t,n,r){let 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 hJ(e,t,n,r,i){e=t.scale.parse(e);let a=t.scale.getLabel({value:e},{precision:i.precision}),o=i.formatter;if(o){let i={value:DE(t,{value:e}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};P(r,function(e){let t=n.getSeriesByIndex(e.seriesIndex),r=e.dataIndexInside,a=t&&t.getDataParams(r);a&&i.seriesData.push(a)}),z(o)?a=o.replace(`{value}`,a):R(o)&&(a=o(i))}return a}function gJ(e,t,n){let r=Kt();return Zt(r,r,n.rotation),Xt(r,r,n.position),Tm([e.dataToCoord(t),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],r)}function _J(e,t,n,r,i,a){let o=pj.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=i.get([`label`,`margin`]),pJ(t,r,i,a,{position:gJ(r.axis,e,n),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function vJ(e,t,n){return n=n||0,{x1:e[n],y1:e[1-n],x2:t[n],y2:t[1-n]}}function yJ(e,t,n){return n=n||0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}}function bJ(e,t,n,r,i,a){return{cx:e,cy:t,r0:n,r,startAngle:i,endAngle:a,clockwise:!0}}function xJ(e,t,n){return kO(e,{fromStat:{sers:F(t,function(e){return n.getSeriesByIndex(e.seriesIndex)})},min:1}).w}function SJ(e,t,n){return[bo(yo(t[0],t[1]),e-n/2),yo(e+n/2,bo(t[0],t[1]))]}var CJ=class extends oJ{makeElOption(e,t,n,r,i){let a=n.axis,o=a.grid,s=r.get(`type`),c=a.getGlobalExtent(),l=wJ(o,a).getOtherAxis(a).getGlobalExtent(),u=a.toGlobalCoord(a.dataToCoord(t,!0));if(s&&s!==`none`){let t=fJ(r),n=TJ[s](a,u,c,l,r.get(`seriesDataIndices`),r.ecModel);n.style=t,e.graphicKey=n.type,e.pointer=n}_J(t,e,Pj(o.getRect(),n),n,r,i)}getHandleTransform(e,t,n){let r=Pj(t.axis.grid.getRect(),t,{labelInside:!1});r.labelMargin=n.get([`handle`,`margin`]);let i=gJ(t.axis,e,r);return{x:i[0],y:i[1],rotation:r.rotation+(r.labelDirection<0?Math.PI:0)}}updateHandleTransform(e,t,n,r){let i=n.axis,a=i.grid,o=i.getGlobalExtent(!0),s=wJ(a,i).getOtherAxis(i).getGlobalExtent(),c=i.dim===`x`?0:1,l=[e.x,e.y];l[c]+=t[c],l[c]=yo(o[1],l[c]),l[c]=bo(o[0],l[c]);let 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]}}};function wJ(e,t){let n={};return n[t.dim+`AxisIndex`]=t.index,e.getCartesian(n)}const TJ={line:function(e,t,n,r){return{type:`Line`,subPixelOptimize:!0,shape:vJ([t,r[0]],[t,r[1]],EJ(e))}},shadow:function(e,t,n,r,i,a){let o=xJ(e,i,a),s=r[1]-r[0],[c,l]=SJ(t,n,o);return{type:`Rect`,shape:yJ([c,r[0]],[l-c,s],EJ(e))}}};function EJ(e){return e.dim===`x`?0:1}var DJ=class e extends b_{constructor(...t){super(...t),this.type=e.type}};DJ.type=`axisPointer`,DJ.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}};const OJ=Y(),kJ=P;function AJ(e,t,n){if(s.node)return;let r=t.getZr();OJ(r).records||(OJ(r).records={}),jJ(r,t);let i=OJ(r).records[e]||(OJ(r).records[e]={});i.handler=n}function jJ(e,t){if(OJ(e).initialized)return;OJ(e).initialized=!0,n(`click`,fe(PJ,`click`)),n(`mousemove`,fe(PJ,`mousemove`)),n(`mousewheel`,fe(PJ,`mousewheel`)),n(`globalout`,NJ);function n(n,r){e.on(n,function(n){let i=FJ(t);kJ(OJ(e).records,function(e){e&&r(e,n,i.dispatchAction)}),MJ(i.pendings,t)})}}function MJ(e,t){let 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 NJ(e,t,n){e.handler(`leave`,null,n)}function PJ(e,t,n,r){t.handler(e,n,r)}function FJ(e){let t={showTip:[],hideTip:[]},n=function(r){let i=t[r.type];i?i.push(r):(r.dispatchAction=n,e.dispatchAction(r))};return{dispatchAction:n,pendings:t}}function IJ(e,t){if(s.node)return;let n=t.getZr();(OJ(n).records||{})[e]&&(OJ(n).records[e]=null)}var LJ=class e extends Ib{constructor(...t){super(...t),this.type=e.type}render(e,t,n){let r=t.getComponent(`tooltip`),i=e.get(`triggerOn`)||r&&r.get(`triggerOn`)||`mousemove|click|mousewheel`;AJ(`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})})}remove(e,t){IJ(`axisPointer`,t)}dispose(e,t){IJ(`axisPointer`,t)}};LJ.type=`axisPointer`;function RJ(e,t){let n=[],r=e.seriesIndex,i;if(r==null||!(i=t.getSeriesByIndex(r)))return{point:[]};let a=i.getData(),o=Us(a,e);if(o==null||o<0||L(o))return{point:[]};let s=a.getItemGraphicEl(o),c=i.coordinateSystem;if(i.getTooltipPosition)n=i.getTooltipPosition(o)||[];else if(c&&c.dataToPoint){if(e.isStacked){let e=c.getBaseAxis(),t=c.getOtherAxis(e).dim,r=e.dim,i=+(t===`x`||t===`radius`),s=a.mapDimension(r),l=[];l[i]=a.get(s,o),l[1-i]=a.get(a.getCalculationInfo(`stackResultDimension`),o),n=c.dataToPoint(l)||[]}else n=c.dataToPoint(a.getValues(F(c.dimensions,function(e){return a.mapDimension(e)}),o))||[]}else if(s){let e=s.getBoundingRect().clone();e.applyTransform(s.transform),n=[e.x+e.width/2,e.y+e.height/2]}return{point:n,el:s}}const zJ=Y();function BJ(e,t,n){let r=e.currTrigger,i=[e.x,e.y],a=e,o=e.dispatchAction||I(n.dispatchAction,n),s=t.getComponent(`axisPointer`).coordSysAxesInfo;if(!s)return;XJ(i)&&(i=RJ({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},t).point);let c=XJ(i),l=a.axesInfo,u=s.axesInfo,d=r===`leave`||XJ(i),f={},p={},m={list:[],map:{}},h={showPointer:fe(UJ,p),showTooltip:fe(WJ,m)};P(s.coordSysMap,function(e,t){let n=c||e.containPoint(i);P(s.coordSysAxesInfo[t],function(e,t){let r=e.axis,a=JJ(l,e);if(!d&&n&&(!l||a)){let t=a&&a.value;t==null&&!c&&(t=r.pointToData(i)),t!=null&&VJ(e,t,h,!1,f)}})});let g={};return P(u,function(e,t){let n=e.linkGroup;n&&!p[t]&&P(n.axesInfo,function(t,r){let i=p[r];if(t!==e&&i){let r=i.value;n.mapper&&(r=e.axis.scale.parse(n.mapper(r,YJ(t),YJ(e)))),g[e.key]=r}})}),P(g,function(e,t){VJ(u[t],e,h,!0,f)}),GJ(p,u,f),KJ(m,i,e,o),qJ(u,o,n),f}function VJ(e,t,n,r,i){let a=e.axis;if(a.scale.isBlank()||!a.containData(t))return;if(!e.involveSeries){n.showPointer(e,t);return}let o=HJ(t,e),s=o.payloadBatch,c=o.snapToValue;s[0]&&i.seriesIndex==null&&j(i,s[0]),!r&&e.snap&&a.containData(c)&&c!=null&&(t=c),n.showPointer(e,t,s),n.showTooltip(e,o,c)}function HJ(e,t){let n=t.axis,r=n.dim,i=e,a=[],o=Number.MAX_VALUE,s=-1;return P(t.seriesModels,function(t,c){let l=t.getData().mapDimensionsAll(r),u,d;if(t.getAxisTooltipData){let r=t.getAxisTooltipData(l,e,n);d=r.dataIndices,u=r.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(!os(u))return;let f=e-u,p=Math.abs(f);p<=o&&((p<o||f>=0&&s<0)&&(o=p,s=f,i=u,a.length=0),P(d,function(e){a.push({seriesIndex:t.seriesIndex,dataIndexInside:e,dataIndex:t.getData().getRawIndex(e)})}))}),{payloadBatch:a,snapToValue:i}}function UJ(e,t,n,r){e[t.key]={value:n,payloadBatch:r}}function WJ(e,t,n,r){let i=n.payloadBatch,a=t.axis,o=a.model,s=t.axisPointerModel;if(!t.triggerTooltip||!i.length)return;let c=t.coordSys.model,l=sP(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 GJ(e,t,n){let r=n.axesInfo=[];P(t,function(t,n){let 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 KJ(e,t,n,r){if(XJ(t)||!e.list.length){r({type:`hideTip`});return}let 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 qJ(e,t,n){let r=n.getZr(),i=`axisPointerLastHighlights`,a=zJ(r)[i]||{},o=zJ(r)[i]={};P(e,function(e,t){let n=e.axisPointerModel.option;n.status===`show`&&e.triggerEmphasis&&P(n.seriesDataIndices,function(e){o[e.seriesIndex+`|`+e.dataIndex]=e})});let s=[],c=[];function l(e){return{seriesIndex:e.seriesIndex,dataIndex:e.dataIndex}}P(a,function(e,t){!o[t]&&c.push(l(e))}),P(o,function(e,t){!a[t]&&s.push(l(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 JJ(e,t){for(let n=0;n<(e||[]).length;n++){let r=e[n];if(t.axis.dim===r.axisDim&&t.axis.model.componentIndex===r.axisIndex)return r}}function YJ(e){let 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 XJ(e){return!e||e[0]==null||isNaN(e[0])||e[1]==null||isNaN(e[1])}function ZJ(e){lP.registerAxisPointerClass(`CartesianAxisPointer`,CJ),e.registerComponentModel(DJ),e.registerComponentView(LJ),e.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});let t=e.axisPointer.link;t&&!L(t)&&(e.axisPointer.link=[t])}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,{overallReset(e,t){e.getComponent(`axisPointer`).coordSysAxesInfo=ZN(e,t)}}),e.registerAction({type:`updateAxisPointer`,event:`updateAxisPointer`,update:`:updateAxisPointer`},BJ)}function QJ(e){BD(bP),BD(ZJ)}var $J=class extends oJ{makeElOption(e,t,n,r,i){let a=n.axis;a.dim===`angle`&&(this.animationThreshold=Math.PI/18);let o=a.polar,s=a.getExtent(),c=o.getOtherAxis(a).getExtent(),l=a.dataToCoord(t),u=r.get(`type`);if(u&&u!==`none`){let t=fJ(r),n=tY[u](a,o,l,s,c,r.get(`seriesDataIndices`),r.ecModel);n.style=t,e.graphicKey=n.type,e.pointer=n}pJ(e,n,r,i,eY(t,n,r,o,r.get([`label`,`margin`])))}};function eY(e,t,n,r,i){let a=t.axis,o=a.dataToCoord(e),s=r.getAngleAxis().getExtent()[0];s=s/180*Math.PI;let c=r.getRadiusAxis().getExtent(),l,u,d;if(a.dim===`radius`){let e=Kt();Zt(e,e,s),Xt(e,e,[r.cx,r.cy]),l=Tm([o,-i],e);let n=t.getModel(`axisLabel`).get(`rotate`)||0,a=pj.innerTextLayout(s,n*Math.PI/180,-1);u=a.textAlign,d=a.textVerticalAlign}else{let e=c[1];l=r.coordToPoint([e+i,o]);let t=r.cx,n=r.cy;u=Math.abs(l[0]-t)/e<.3?`center`:l[0]>t?`left`:`right`,d=Math.abs(l[1]-n)/e<.3?`middle`:l[1]>n?`top`:`bottom`}return{position:l,align:u,verticalAlign:d}}const tY={line:function(e,t,n,r,i){return e.dim===`angle`?{type:`Line`,shape:vJ(t.coordToPoint([i[0],n]),t.coordToPoint([i[1],n]))}:{type:`Circle`,shape:{cx:t.cx,cy:t.cy,r:n}}},shadow:function(e,t,n,r,i,a,o){let s=Math.PI/180,c=xJ(e,a,o),l;if(e.dim===`angle`)l=bJ(t.cx,t.cy,i[0],i[1],(-n-c/2)*s,(-n+c/2)*s);else{let[e,i]=SJ(n,r,c);l=bJ(t.cx,t.cy,e,i,0,Math.PI*2)}return{type:`Sector`,shape:l}}},nY=`polar`,rY=nY;var iY=class e extends b_{constructor(...t){super(...t),this.type=e.type}findAxisModel(e){let t;return this.ecModel.eachComponent(e,function(e){e.getCoordSysModel()===this&&(t=e)},this),t}};iY.type=nY,iY.dependencies=[`radiusAxis`,`angleAxis`],iY.defaultOption={z:0,center:[`50%`,`50%`],radius:`80%`};var aY=class extends b_{getCoordSysModel(){return this.getReferringComponents(`polar`,qs).models[0]}};aY.type=`polarAxis`,ae(aY,RE);var oY=class e extends aY{constructor(...t){super(...t),this.type=e.type}};oY.type=`angleAxis`;var sY=class e extends aY{constructor(...t){super(...t),this.type=e.type}};sY.type=`radiusAxis`;var cY=class extends NO{constructor(e,t){super(`radius`,e,t)}pointToData(e,t){return this.polar.pointToData(e,t)[this.dim===`radius`?0:1]}};cY.prototype.dataToRadius=NO.prototype.dataToCoord,cY.prototype.radiusToData=NO.prototype.coordToData;const lY=Y();var uY=class extends NO{constructor(e,t){super(`angle`,e,t||[0,360])}pointToData(e,t){return this.polar.pointToData(e,t)[this.dim===`radius`?0:1]}calculateCategoryInterval(){let e=this,t=e.getLabelModel(),n=e.scale,r=n.getExtent(),i=n.count();if(r[1]-r[0]<1)return 0;let a=r[0],o=e.dataToCoord(a+1)-e.dataToCoord(a),s=Math.abs(o),c=Ma(a==null?``:a+``,t.getFont(),`center`,`top`),l=Math.max(c.height,7)/s;isNaN(l)&&(l=1/0);let u=Math.max(0,Math.floor(l)),d=lY(e.model),f=d.lastAutoInterval,p=d.lastTickCount;return f!=null&&p!=null&&Math.abs(f-u)<=1&&Math.abs(p-i)<=1&&f>u?u=f:(d.lastTickCount=i,d.lastAutoInterval=u),u}};uY.prototype.dataToAngle=NO.prototype.dataToCoord,uY.prototype.angleToData=NO.prototype.coordToData;const dY=[`radius`,`angle`];var fY=class{constructor(e){this.dimensions=dY,this.type=nY,this.cx=0,this.cy=0,this._radiusAxis=new cY,this._angleAxis=new uY,this.axisPointerEnabled=!0,this.name=e||``,this._radiusAxis.polar=this._angleAxis.polar=this}containPoint(e){let t=this.pointToCoord(e);return this._radiusAxis.contain(t[0])&&this._angleAxis.contain(t[1])}containData(e){return this._radiusAxis.containData(e[0])&&this._angleAxis.containData(e[1])}getAxis(e){let t=`_`+e+`Axis`;return this[t]}getAxes(){return[this._radiusAxis,this._angleAxis]}getAxesByScale(e){let t=[],n=this._angleAxis,r=this._radiusAxis;return n.scale.type===e&&t.push(n),r.scale.type===e&&t.push(r),t}getAngleAxis(){return this._angleAxis}getRadiusAxis(){return this._radiusAxis}getOtherAxis(e){let t=this._angleAxis;return e===t?this._radiusAxis:t}getBaseAxis(){return this.getAxesByScale(`ordinal`)[0]||this.getAxesByScale(`time`)[0]||this.getAngleAxis()}getTooltipAxes(e){let t=e!=null&&e!==`auto`?this.getAxis(e):this.getBaseAxis();return{baseAxes:[t],otherAxes:[this.getOtherAxis(t)]}}dataToPoint(e,t,n){return this.coordToPoint([this._radiusAxis.dataToRadius(e[0],t),this._angleAxis.dataToAngle(e[1],t)],n)}pointToData(e,t,n){n=n||[];let r=this.pointToCoord(e);return n[0]=this._radiusAxis.radiusToData(r[0],t),n[1]=this._angleAxis.angleToData(r[1],t),n}pointToCoord(e){let t=e[0]-this.cx,n=e[1]-this.cy,r=this.getAngleAxis(),i=r.getExtent(),a=Math.min(i[0],i[1]),o=Math.max(i[0],i[1]);r.inverse?a=o-360:o=a+360;let s=Math.sqrt(t*t+n*n);t/=s,n/=s;let c=Math.atan2(-n,t)/Math.PI*180,l=c<a?1:-1;for(;c<a||c>o;)c+=l*360;return[s,c]}coordToPoint(e,t){t=t||[];let n=e[0],r=e[1]/180*Math.PI;return t[0]=Math.cos(r)*n+this.cx,t[1]=-Math.sin(r)*n+this.cy,t}getArea(){let e=this.getAngleAxis(),t=this.getRadiusAxis().getExtent().slice();t[0]>t[1]&&t.reverse();let n=e.getExtent(),r=Math.PI/180,i=1e-4;return{cx:this.cx,cy:this.cy,r0:t[0],r:t[1],startAngle:-n[0]*r,endAngle:-n[1]*r,clockwise:e.inverse,contain(e,t){let n=e-this.cx,r=t-this.cy,a=n*n+r*r,o=this.r,s=this.r0;return o!==s&&a-i<=o*o&&a+i>=s*s},x:this.cx-t[1],y:this.cy-t[1],width:t[1]*2,height:t[1]*2}}convertToPixel(e,t,n){return pY(t)===this?this.dataToPoint(n):null}convertFromPixel(e,t,n){return pY(t)===this?this.pointToData(n):null}};function pY(e){let t=e.seriesModel,n=e.polarModel;return n&&n.coordinateSystem||t&&t.coordinateSystem}function mY(e,t,n){let r=t.get(`center`),i=d_(t,n).refContainer;e.cx=J(r[0],i.width)+i.x,e.cy=J(r[1],i.height)+i.y;let a=e.getRadiusAxis(),o=Math.min(i.width,i.height)/2,s=t.get(`radius`);s==null?s=[0,`100%`]:L(s)||(s=[0,s]);let c=[J(s[0],o),J(s[1],o)];a.inverse?a.setExtent(c[1],c[0]):a.setExtent(c[0],c[1])}function hY(e,t){let n=this,r=n.getAngleAxis(),i=n.getRadiusAxis();if(gD(r,1),gD(i,1),OD(r),OD(i),r.type===`category`&&!r.onBand){let e=r.getExtent(),t=360/r.scale.count();r.inverse?e[1]+=t:e[1]-=t,r.setExtent(e[0],e[1])}}function gY(e){return e.mainType===`angleAxis`}function _Y(e,t){if(e.type=xE(t),e.scale=SE(t,e.type,!1),e.onBand=LE(e.scale,t),e.inverse=t.get(`inverse`),gY(t)){var n;e.inverse=e.inverse!==t.get(`clockwise`);let r=t.get(`startAngle`),i=(n=t.get(`endAngle`))==null?r+(e.inverse?-360:360):n;e.setExtent(r,i)}t.axis=e,e.model=t}const vY={dimensions:dY,create:function(e,t){let n=[];return e.eachComponent(rY,function(e,r){let i=new fY(r+``);i.update=hY;let a=i.getRadiusAxis(),o=i.getAngleAxis(),s=e.findAxisModel(`radiusAxis`),c=e.findAxisModel(`angleAxis`);_Y(a,s),_Y(o,c),mY(i,e,t),n.push(i),e.coordinateSystem=i,i.model=e}),e.eachSeries(function(e){if(e.get(`coordinateSystem`)===`polar`){let t=e.getReferringComponents(rY,qs).models[0];if(typeof process<`u`&&process.env.NODE_ENV!==`production`&&!t)throw Error(`Polar "`+Se(e.get(`polarIndex`),e.get(`polarId`),0)+`" not found`);let n=e.coordinateSystem=t.coordinateSystem;n&&(rD(n.getRadiusAxis(),e,nY),rD(n.getAngleAxis(),e,nY))}}),n}},yY=[`axisLine`,`axisLabel`,`axisTick`,`minorTick`,`splitLine`,`minorSplitLine`,`splitArea`];function bY(e,t,n){t[1]>t[0]&&(t=t.slice().reverse());let r=e.coordToPoint([t[0],n]),i=e.coordToPoint([t[1],n]);return{x1:r[0],y1:r[1],x2:i[0],y2:i[1]}}function xY(e){return+!e.getRadiusAxis().inverse}function SY(e){let t=e[0],n=e[e.length-1];t&&n&&Math.abs(Math.abs(t.coord-n.coord)-360)<1e-4&&e.pop()}var CY=class e extends lP{constructor(...t){super(...t),this.type=e.type,this.axisPointerClass=`PolarAxisPointer`}render(e,t){if(this.group.removeAll(),!e.get(`show`))return;let n=e.axis,r=n.polar,i=r.getRadiusAxis().getExtent(),a=n.getTicksCoords({breakTicks:`none`}),o=n.getMinorTicksCoords(),s=[];P(n.getViewLabels(),function(e){if(e.tick.offInterval)return;e=k(e);let t=n.scale;e.coord=n.dataToCoord(IE(t,e.tick)),s.push(e)}),SY(s),SY(a),P(yY,function(t){e.get([t,`show`])&&(!n.scale.isBlank()||t===`axisLine`)&&wY[t](this.group,e,r,a,o,i,s)},this)}};CY.type=`angleAxis`;const wY={axisLine(e,t,n,r,i,a){let o=t.getModel([`axisLine`,`lineStyle`]),s=n.getAngleAxis(),c=Math.PI/180,l=s.getExtent(),u=xY(n),d=+!u,f,p=Math.abs(l[1]-l[0])===360?`Circle`:`Arc`;f=a[d]===0?new cm[p]({shape:{cx:n.cx,cy:n.cy,r:a[u],startAngle:-l[0]*c,endAngle:-l[1]*c,clockwise:s.inverse},style:o.getLineStyle(),z2:1,silent:!0}):new bp({shape:{cx:n.cx,cy:n.cy,r:a[u],r0:a[d]},style:o.getLineStyle(),z2:1,silent:!0}),f.style.fill=null,e.add(f)},axisTick(e,t,n,r,i,a){let o=t.getModel(`axisTick`),s=(o.get(`inside`)?-1:1)*o.get(`length`),c=a[xY(n)],l=F(r,function(e){return new kp({shape:bY(n,[c,c+s],e.coord)})});e.add(ym(l,{style:M(o.getModel(`lineStyle`).getLineStyle(),{stroke:t.get([`axisLine`,`lineStyle`,`color`])})}))},minorTick(e,t,n,r,i,a){if(!i.length)return;let o=t.getModel(`axisTick`),s=t.getModel(`minorTick`),c=(o.get(`inside`)?-1:1)*s.get(`length`),l=a[xY(n)],u=[];for(let e=0;e<i.length;e++)for(let t=0;t<i[e].length;t++)u.push(new kp({shape:bY(n,[l,l+c],i[e][t].coord)}));e.add(ym(u,{style:M(s.getModel(`lineStyle`).getLineStyle(),M(o.getLineStyle(),{stroke:t.get([`axisLine`,`lineStyle`,`color`])}))}))},axisLabel(e,t,n,r,i,a,o){let s=t.getCategories(!0),c=t.getModel(`axisLabel`),l=c.get(`margin`),u=t.get(`triggerEvent`);P(o,function(r,i){let o=c,d=r.tick.value,f=a[xY(n)],p=n.coordToPoint([f+l,r.coord]),m=n.cx,h=n.cy,g=Math.abs(p[0]-m)/f<.3?`center`:p[0]>m?`left`:`right`,_=Math.abs(p[1]-h)/f<.3?`middle`:p[1]>h?`top`:`bottom`;if(s&&s[d]){let e=s[d];B(e)&&e.textStyle&&(o=new kh(e.textStyle,c,c.ecModel))}let v=new qu({silent:pj.isLabelSilent(t),style:oh(o,{x:p[0],y:p[1],fill:o.getTextColor()||t.get([`axisLine`,`lineStyle`,`color`]),text:r.formattedLabel,align:g,verticalAlign:_})});if(e.add(v),Bm({el:v,componentModel:t,itemName:r.formattedLabel,formatterParamsExtra:{isTruncated:()=>v.isTruncated,value:r.rawLabel,tickIndex:i}}),u){let e=pj.makeAxisEventDataBase(t);e.targetType=`axisLabel`,e.value=r.rawLabel,X(v).eventData=e}},this)},splitLine(e,t,n,r,i,a){let o=t.getModel(`splitLine`).getModel(`lineStyle`),s=o.get(`color`),c=0;s=s instanceof Array?s:[s];let l=[];for(let e=0;e<r.length;e++){let t=c++%s.length;l[t]=l[t]||[],l[t].push(new kp({shape:bY(n,a,r[e].coord)}))}for(let n=0;n<l.length;n++)e.add(ym(l[n],{style:M({stroke:s[n%s.length]},o.getLineStyle()),silent:!0,z:t.get(`z`)}))},minorSplitLine(e,t,n,r,i,a){if(!i.length)return;let o=t.getModel(`minorSplitLine`).getModel(`lineStyle`),s=[];for(let e=0;e<i.length;e++)for(let t=0;t<i[e].length;t++)s.push(new kp({shape:bY(n,a,i[e][t].coord)}));e.add(ym(s,{style:o.getLineStyle(),silent:!0,z:t.get(`z`)}))},splitArea(e,t,n,r,i,a){if(!r.length)return;let o=t.getModel(`splitArea`).getModel(`areaStyle`),s=o.get(`color`),c=0;s=s instanceof Array?s:[s];let l=[],u=Math.PI/180,d=-r[0].coord*u,f=Math.min(a[0],a[1]),p=Math.max(a[0],a[1]),m=t.get(`clockwise`);for(let e=1,t=r.length;e<=t;e++){let i=e===t?r[0].coord:r[e].coord,a=c++%s.length;l[a]=l[a]||[],l[a].push(new vp({shape:{cx:n.cx,cy:n.cy,r0:f,r:p,startAngle:d,endAngle:-i*u,clockwise:m},silent:!0})),d=-i*u}for(let t=0;t<l.length;t++)e.add(ym(l[t],{style:M({fill:s[t%s.length]},o.getAreaStyle()),silent:!0}))}},TY=[`splitLine`,`splitArea`,`minorSplitLine`];var EY=class e extends lP{constructor(...t){super(...t),this.type=e.type,this.axisPointerClass=`PolarAxisPointer`}render(e,t,n){if(this.group.removeAll(),!e.get(`show`))return;let r=this._axisGroup,i=this._axisGroup=new q;this.group.add(i);let a=e.axis,o=a.polar,s=o.getAngleAxis(),c=a.getTicksCoords(),l=a.getMinorTicksCoords(),u=s.getExtent()[0],d=a.getExtent(),f=new pj(e,n,OY(o,e,u));f.build(),i.add(f.group),km(r,i,e),P(TY,function(t){e.get([t,`show`])&&!a.scale.isBlank()&&DY[t](this.group,e,o,u,d,c,l)},this)}};EY.type=`radiusAxis`;const DY={splitLine(e,t,n,r,i,a){let o=t.getModel(`splitLine`).getModel(`lineStyle`),s=o.get(`color`),c=0,l=n.getAngleAxis(),u=Math.PI/180,d=l.getExtent(),f=Math.abs(d[1]-d[0])===360?`Circle`:`Arc`;s=s instanceof Array?s:[s];let p=[];for(let e=0;e<a.length;e++){let t=c++%s.length;p[t]=p[t]||[],p[t].push(new cm[f]({shape:{cx:n.cx,cy:n.cy,r:Math.max(a[e].coord,0),startAngle:-d[0]*u,endAngle:-d[1]*u,clockwise:l.inverse}}))}for(let t=0;t<p.length;t++)e.add(ym(p[t],{style:M({stroke:s[t%s.length],fill:null},o.getLineStyle()),silent:!0}))},minorSplitLine(e,t,n,r,i,a,o){if(!o.length)return;let s=t.getModel(`minorSplitLine`).getModel(`lineStyle`),c=[];for(let e=0;e<o.length;e++)for(let t=0;t<o[e].length;t++)c.push(new $f({shape:{cx:n.cx,cy:n.cy,r:o[e][t].coord}}));e.add(ym(c,{style:M({fill:null},s.getLineStyle()),silent:!0}))},splitArea(e,t,n,r,i,a){if(!a.length)return;let o=t.getModel(`splitArea`).getModel(`areaStyle`),s=o.get(`color`),c=0;s=s instanceof Array?s:[s];let l=[],u=a[0].coord;for(let e=1;e<a.length;e++){let t=c++%s.length;l[t]=l[t]||[],l[t].push(new vp({shape:{cx:n.cx,cy:n.cy,r0:u,r:a[e].coord,startAngle:0,endAngle:Math.PI*2},silent:!0})),u=a[e].coord}for(let t=0;t<l.length;t++)e.add(ym(l[t],{style:M({fill:s[t%s.length]},o.getAreaStyle()),silent:!0}))}};function OY(e,t,n){return{position:[e.cx,e.cy],rotation:n/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:t.getModel(`axisLabel`).get(`rotate`),z2:1}}const kY=pc();function AY(e){return e.get(`stack`)||`__ec_stack_`+e.seriesIndex}const jY=xc(`bar`,MY);function MY(e){let t=Gj(`bar`,nY);QE(e,t,function(e){typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(e instanceof uY||e instanceof cY);let n=PY(e,`bar`),r={};YE(e,t,function(t){NY(e,t,n,r)})})}function NY(e,t,n,r){let i=t.getData(),a=AY(t),o=n[a],s=o.offset,c=o.width,l=t.coordinateSystem;typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(l.type===nY);let u=l.getOtherAxis(e),d=l.cx,f=l.cy,p=t.get(`barMinHeight`)||0,m=t.get(`barMinAngle`)||0;r[a]=r[a]||[];let h=i.mapDimension(u.dim),g=i.mapDimension(e.dim),_=vT(i,h),v=e.dim!==`radius`||!t.get(`roundCap`,!0),y=u.dataToCoord(Yj(u));for(let t=0,n=i.count();t<n;t++){let n=i.get(h,t),o=i.get(g,t),l=n>=0?`p`:`n`,b=y;_&&(r[a][o]||(r[a][o]={p:y,n:y}),b=r[a][o][l]);let x,S,C,w;if(u.dim===`radius`){let t=u.dataToCoord(n)-y,i=e.dataToCoord(o);xo(t)<p&&(t=(t<0?-1:1)*p),x=b,S=b+t,C=i-s,w=C-c,_&&(r[a][o][l]=S)}else{let t=u.dataToCoord(n,v)-y,i=e.dataToCoord(o);xo(t)<m&&(t=(t<0?-1:1)*m),x=i+s,S=x+c,C=b,w=b+t,_&&(r[a][o][l]=w)}i.setItemLayout(t,{cx:d,cy:f,r0:x,r:S,startAngle:-C*Oo/180,endAngle:-w*Oo/180,clockwise:C>=w})}}function PY(e,t){let n=Gj(t,nY),r=kO(e,{fromStat:{key:n},min:1}).w,i=r,a=0,o=`20%`,s=`30%`,c={};YE(e,n,function(e){let t=AY(e);c[t]||a++,c[t]=c[t]||{width:0,maxWidth:0};let n=J(e.get(`barWidth`),r),l=J(e.get(`barMaxWidth`),r),u=e.get(`barGap`),d=e.get(`barCategoryGap`);n&&!c[t].width&&(n=yo(i,n),c[t].width=n,i-=n),l&&(c[t].maxWidth=l),u!=null&&(s=u),d!=null&&(o=d)});let l={},u=J(o,r),d=J(s,1),f=(i-u)/(a+(a-1)*d);f=bo(f,0),P(c,function(e,t){let n=e.maxWidth;n&&n<f&&(n=yo(n,i),e.width&&(n=yo(n,e.width)),i-=n,e.width=n,a--)}),f=(i-u)/(a+(a-1)*d),f=bo(f,0);let p=0,m;P(c,function(e,t){e.width||(e.width=f),m=e,p+=e.width*(1+d)}),m&&(p-=m.width*d);let h=-p/2;return P(c,function(e,t){l[t]=l[t]||{offset:h,width:e.width},h+=e.width*(1+d)}),l}function FY(e,t){kY(e,function(){let n=Gj(t,nY);Jj(e,n,t,nY),bD(n,Uj(n))})}const IY={startAngle:90,clockwise:!0,splitNumber:12,containShape:!1,axisLabel:{rotate:0}},LY={splitNumber:5};var RY=class e extends Ib{constructor(...t){super(...t),this.type=e.type}};RY.type=`polar`;function zY(e){BD(ZJ),lP.registerAxisPointerClass(`PolarAxisPointer`,$J),e.registerCoordinateSystem(`polar`,vY),e.registerComponentModel(iY),e.registerComponentView(RY),DN(e,`angle`,oY,IY),DN(e,`radius`,sY,LY),e.registerComponentView(CY),e.registerComponentView(EY),e.registerLayout(jY),FY(e,`bar`)}function BY(e,t){t=t||{};let n=e.coordinateSystem,r=e.axis,i={},a=r.position,o=r.orient,s=n.getRect(),c=[s.x,s.x+s.width,s.y,s.y+s.height],l={horizontal:{top:c[2],bottom:c[3]},vertical:{left:c[0],right:c[1]}};i.position=[o===`vertical`?l.vertical[a]:c[0],o===`horizontal`?l.horizontal[a]:c[3]],i.rotation=Math.PI/2*{horizontal:0,vertical:1}[o],i.labelDirection=i.tickDirection=i.nameDirection={top:-1,bottom:1,right:1,left:-1}[a],e.get([`axisTick`,`inside`])&&(i.tickDirection=-i.tickDirection),Se(t.labelInside,e.get([`axisLabel`,`inside`]))&&(i.labelDirection=-i.labelDirection);let u=e.get([`axisLabel`,`rotate`]);return i.labelRotate=a===`top`?-u:u,i.z2=1,i}const VY=[`splitArea`,`splitLine`,`breakArea`];var HY=class e extends lP{constructor(...t){super(...t),this.type=e.type,this.axisPointerClass=`SingleAxisPointer`}render(e,t,n,r){let i=this.group;i.removeAll();let a=this._axisGroup;this._axisGroup=new q;let o=new pj(e,n,BY(e));o.build(),i.add(this._axisGroup),i.add(o.group),P(VY,function(t){e.get([t,`show`])&&UY[t](this,this.group,this._axisGroup,e,n)},this),km(a,this._axisGroup,e),super.render(e,t,n,r)}remove(){fP(this)}};HY.type=`singleAxis`;const UY={splitLine(e,t,n,r,i){let a=r.axis;if(a.scale.isBlank())return;let o=r.getModel(`splitLine`),s=o.getModel(`lineStyle`),c=s.get(`color`);c=c instanceof Array?c:[c];let l=s.get(`width`),u=r.coordinateSystem.getRect(),d=a.isHorizontal(),f=[],p=0,m=a.getTicksCoords({tickModel:o,breakTicks:`none`,pruneByBreak:`preserve_extent_bound`}),h=[],g=[];for(let e=0;e<m.length;++e){let t=a.toGlobalCoord(m[e].coord);d?(h[0]=t,h[1]=u.y,g[0]=t,g[1]=u.y+u.height):(h[0]=u.x,h[1]=t,g[0]=u.x+u.width,g[1]=t);let n=new kp({shape:{x1:h[0],y1:h[1],x2:g[0],y2:g[1]},silent:!0});xm(n.shape,l);let r=p++%c.length;f[r]=f[r]||[],f[r].push(n)}let _=s.getLineStyle([`color`]);for(let e=0;e<f.length;++e)t.add(ym(f[e],{style:M({stroke:c[e%c.length]},_),silent:!0}))},splitArea(e,t,n,r,i){dP(e,n,r,r)},breakArea(e,t,n,r,i){let a=qA(),o=r.axis.scale;a&&o.type!==`ordinal`&&a.rectCoordBuildBreakAxis(t,e,r,r.coordinateSystem.getRect(),i)}};var WY=class extends NO{constructor(e,t,n,r,i){super(e,t,n),this.type=r||`value`,this.position=i||`bottom`}isHorizontal(){let e=this.position;return e===`top`||e===`bottom`}pointToData(e,t){return this.coordinateSystem.pointToData(e)[0]}};const GY=[`single`];var KY=class{constructor(e,t,n){this.type=xP,this.dimension=`single`,this.dimensions=GY,this.axisPointerEnabled=!0,this.model=e,this._init(e,t,n)}_init(e,t,n){let r=this.dimension,i=xE(e),a=new WY(r,SE(e,i,!0),[0,0],i,e.get(`position`));a.onBand=LE(a.scale,e),a.inverse=e.get(`inverse`),a.orient=e.get(`orient`),e.axis=a,a.model=e,a.coordinateSystem=this,this._axis=a}update(e,t){let n=this._axis;gD(n,1),OD(n)}resize(e,t){let n=d_(e,t).refContainer;this._rect=c_(e.getBoxLayoutParams(),n),this._adjustAxis()}getRect(){return this._rect}_adjustAxis(){let e=this._rect,t=this._axis,n=t.isHorizontal(),r=n?[0,e.width]:[0,e.height],i=+!!t.inverse;t.setExtent(r[i],r[1-i]),this._updateAxisTransform(t,n?e.x:e.y)}_updateAxisTransform(e,t){let n=e.getExtent(),r=n[0]+n[1],i=e.isHorizontal();e.toGlobalCoord=i?function(e){return e+t}:function(e){return r-e+t},e.toLocalCoord=i?function(e){return e-t}:function(e){return r-e+t}}getAxis(){return this._axis}getBaseAxis(){return this._axis}getAxes(){return[this._axis]}getTooltipAxes(){return{baseAxes:[this.getAxis()],otherAxes:[]}}containPoint(e){let t=this.getRect(),n=this.getAxis();return n.orient===`horizontal`?n.contain(n.toLocalCoord(e[0]))&&e[1]>=t.y&&e[1]<=t.y+t.height:n.contain(n.toLocalCoord(e[1]))&&e[0]>=t.y&&e[0]<=t.y+t.height}pointToData(e,t,n){n=n||[];let r=this.getAxis();return n[0]=r.coordToData(r.toLocalCoord(e[r.orient===`horizontal`?0:1])),n}dataToPoint(e,t,n){let r=this.getAxis(),i=this.getRect();n=n||[];let a=r.orient===`horizontal`?0:1;return e instanceof Array&&(e=e[0]),n[a]=r.toGlobalCoord(r.dataToCoord(+e)),n[1-a]=a===0?i.y+i.height/2:i.x+i.width/2,n}convertToPixel(e,t,n){return qY(t)===this?this.dataToPoint(n):null}convertFromPixel(e,t,n){return qY(t)===this?this.pointToData(n):null}};function qY(e){let t=e.seriesModel,n=e.singleAxisModel;return n&&n.coordinateSystem||t&&t.coordinateSystem}function JY(e,t){let n=[];return e.eachComponent(SP,function(r,i){let a=new KY(r,e,t);a.name=`single_`+i,a.resize(r,t),r.coordinateSystem=a,n.push(a)}),e.eachSeries(function(e){if(e.get(`coordinateSystem`)===`singleAxis`){let t=e.getReferringComponents(SP,qs).models[0],n=e.coordinateSystem=t&&t.coordinateSystem;n&&rD(n.getAxis(),e,xP)}}),n}const YY={create:JY,dimensions:GY},XY=[`x`,`y`],ZY=[`width`,`height`];var QY=class extends oJ{makeElOption(e,t,n,r,i){let a=n.axis,o=a.coordinateSystem,s=eX(a),c=tX(o,s),l=tX(o,1-s),u=o.dataToPoint(t)[0],d=r.get(`type`);if(d&&d!==`none`){let t=fJ(r),n=$Y[d](a,u,c,l,r.get(`seriesDataIndices`),r.ecModel);n.style=t,e.graphicKey=n.type,e.pointer=n}_J(t,e,BY(n),n,r,i)}getHandleTransform(e,t,n){let r=BY(t,{labelInside:!1});r.labelMargin=n.get([`handle`,`margin`]);let i=gJ(t.axis,e,r);return{x:i[0],y:i[1],rotation:r.rotation+(r.labelDirection<0?Math.PI:0)}}updateHandleTransform(e,t,n,r){let i=n.axis,a=i.coordinateSystem,o=eX(i),s=tX(a,o),c=[e.x,e.y];c[o]+=t[o],c[o]=Math.min(s[1],c[o]),c[o]=Math.max(s[0],c[o]);let l=tX(a,1-o),u=(l[1]+l[0])/2,d=[u,u];return d[o]=c[o],{x:c[0],y:c[1],rotation:e.rotation,cursorPoint:d,tooltipOption:{verticalAlign:`middle`}}}};const $Y={line:function(e,t,n,r){return{type:`Line`,subPixelOptimize:!0,shape:vJ([t,r[0]],[t,r[1]],eX(e))}},shadow:function(e,t,n,r,i,a){let o=xJ(e,i,a),s=r[1]-r[0],[c,l]=SJ(t,n,o);return{type:`Rect`,shape:yJ([c,r[0]],[l-c,s],eX(e))}}};function eX(e){return+!e.isHorizontal()}function tX(e,t){let n=e.getRect();return[n[XY[t]],n[XY[t]]+n[ZY[t]]]}var nX=class e extends Ib{constructor(...t){super(...t),this.type=e.type}};nX.type=`single`;function rX(e){BD(ZJ),lP.registerAxisPointerClass(`SingleAxisPointer`,QY),e.registerComponentView(nX),e.registerComponentView(HY),e.registerComponentModel(CP),DN(e,`single`,CP,CP.defaultOption),e.registerCoordinateSystem(`single`,YY)}var iX=class e extends b_{constructor(...t){super(...t),this.type=e.type}init(e,t,n){let r=g_(e);super.init.apply(this,arguments),aX(e,r)}mergeOption(e){super.mergeOption.apply(this,arguments),aX(this.option,e)}getCellSize(){return this.option.cellSize}};iX.type=`calendar`,iX.layoutMode=`box`,iX.defaultOption={z:2,left:80,top:60,cellSize:20,orient:`horizontal`,splitLine:{show:!0,lineStyle:{color:Q.color.axisLine,width:1,type:`solid`}},itemStyle:{color:Q.color.neutral00,borderWidth:1,borderColor:Q.color.neutral10},dayLabel:{show:!0,firstDay:0,position:`start`,margin:Q.size.s,color:Q.color.secondary},monthLabel:{show:!0,position:`start`,margin:Q.size.s,align:`center`,formatter:null,color:Q.color.secondary},yearLabel:{show:!0,position:null,margin:Q.size.xl,formatter:null,color:Q.color.quaternary,fontFamily:`sans-serif`,fontWeight:`bolder`,fontSize:20}};function aX(e,t){let n=e.cellSize,r;r=L(n)?n:e.cellSize=[n,n],r.length===1&&(r[1]=r[0]),h_(e,t,{type:`box`,ignoreSize:F([0,1],function(e){return p_(t,e)&&(r[e]=`auto`),r[e]!=null&&r[e]!==`auto`})})}var oX=class e extends Ib{constructor(...t){super(...t),this.type=e.type}render(e,t,n){let r=this.group;r.removeAll();let i=e.coordinateSystem,a=i.getRangeInfo(),o=i.getOrient(),s=t.getLocaleModel();this._renderDayRect(e,a,r),this._renderLines(e,a,o,r),this._renderYearText(e,a,o,r),this._renderMonthText(e,s,o,r),this._renderWeekText(e,s,a,o,r)}_renderDayRect(e,t,n){let r=e.coordinateSystem,i=e.getModel(`itemStyle`).getItemStyle(),a=r.getCellWidth(),o=r.getCellHeight();for(let e=t.start.time;e<=t.end.time;e=r.getNextNDay(e,1).time){let t=r.dataToCalendarLayout([e],!1).tl,s=new Uu({shape:{x:t[0],y:t[1],width:a,height:o},cursor:`default`,style:i});n.add(s)}}_renderLines(e,t,n,r){let i=this,a=e.coordinateSystem,o=e.getModel([`splitLine`,`lineStyle`]).getLineStyle(),s=e.get([`splitLine`,`show`]),c=o.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];let l=t.start;for(let e=0;l.time<=t.end.time;e++){u(l.formatedDate),e===0&&(l=a.getDateInfo(t.start.y+`-`+t.start.m));let n=l.date;n.setMonth(n.getMonth()+1),l=a.getDateInfo(n)}u(a.getNextNDay(t.end.time,1).formatedDate);function u(t){i._firstDayOfMonth.push(a.getDateInfo(t)),i._firstDayPoints.push(a.dataToCalendarLayout([t],!1).tl);let c=i._getLinePointsOfOneWeek(e,t,n);i._tlpoints.push(c[0]),i._blpoints.push(c[c.length-1]),s&&i._drawSplitline(c,o,r)}s&&this._drawSplitline(i._getEdgesPoints(i._tlpoints,c,n),o,r),s&&this._drawSplitline(i._getEdgesPoints(i._blpoints,c,n),o,r)}_getEdgesPoints(e,t,n){let r=[e[0].slice(),e[e.length-1].slice()],i=n===`horizontal`?0:1;return r[0][i]=r[0][i]-t/2,r[1][i]=r[1][i]+t/2,r}_drawSplitline(e,t,n){let r=new Ep({z2:20,shape:{points:e},style:t});n.add(r)}_getLinePointsOfOneWeek(e,t,n){let r=e.coordinateSystem,i=r.getDateInfo(t),a=[];for(let e=0;e<7;e++){let t=r.getNextNDay(i.time,e),o=r.dataToCalendarLayout([t.time],!1);a[2*t.day]=o.tl,a[2*t.day+1]=o[n===`horizontal`?`bl`:`tr`]}return a}_formatterLabel(e,t){return z(e)&&e?Rg(e,t):R(e)?e(t):t.nameMap}_yearTextPositionControl(e,t,n,r,i){let a=t[0],o=t[1],s=[`center`,`bottom`];r===`bottom`?(o+=i,s=[`center`,`top`]):r===`left`?a-=i:r===`right`?(a+=i,s=[`center`,`top`]):o-=i;let c=0;return(r===`left`||r===`right`)&&(c=Math.PI/2),{rotation:c,x:a,y:o,style:{align:s[0],verticalAlign:s[1]}}}_renderYearText(e,t,n,r){let i=e.getModel(`yearLabel`);if(!i.get(`show`))return;let a=i.get(`margin`),o=i.get(`position`);o||(o=n===`horizontal`?`left`:`top`);let s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],c=(s[0][0]+s[1][0])/2,l=(s[0][1]+s[1][1])/2,u=n===`horizontal`?0:1,d={top:[c,s[u][1]],bottom:[c,s[1-u][1]],left:[s[1-u][0],l],right:[s[u][0],l]},f=t.start.y;+t.end.y>+t.start.y&&(f=f+`-`+t.end.y);let p=i.get(`formatter`),m={start:t.start.y,end:t.end.y,nameMap:f},h=new qu({z2:30,style:oh(i,{text:this._formatterLabel(p,m)}),silent:i.get(`silent`)});h.attr(this._yearTextPositionControl(h,d[o],n,o,a)),r.add(h)}_monthTextPositionControl(e,t,n,r,i){let a=`left`,o=`top`,s=e[0],c=e[1];return n===`horizontal`?(c+=i,t&&(a=`center`),r===`start`&&(o=`bottom`)):(s+=i,t&&(o=`middle`),r===`start`&&(a=`right`)),{x:s,y:c,align:a,verticalAlign:o}}_renderMonthText(e,t,n,r){let i=e.getModel(`monthLabel`);if(!i.get(`show`))return;let a=i.get(`nameMap`),o=i.get(`margin`),s=i.get(`position`),c=i.get(`align`),l=[this._tlpoints,this._blpoints];(!a||z(a))&&(a&&(t=Hh(a)||t),a=t.get([`time`,`monthAbbr`])||[]);let u=s===`start`?0:1,d=n===`horizontal`?0:1;o=s===`start`?-o:o;let f=c===`center`,p=i.get(`silent`);for(let e=0;e<l[u].length-1;e++){let t=l[u][e].slice(),c=this._firstDayOfMonth[e];f&&(t[d]=(this._firstDayPoints[e][d]+l[0][e+1][d])/2);let m=i.get(`formatter`),h=a[c.m-1],g={yyyy:c.y,yy:(c.y+``).slice(2),MM:c.m,M:+c.m,nameMap:h},_=new qu({z2:30,style:j(oh(i,{text:this._formatterLabel(m,g)}),this._monthTextPositionControl(t,f,n,s,o)),silent:p});r.add(_)}}_weekTextPositionControl(e,t,n,r,i){let a=`center`,o=`middle`,s=e[0],c=e[1],l=n===`start`;return t===`horizontal`?(s=s+r+(l?1:-1)*i[0]/2,a=l?`right`:`left`):(c=c+r+(l?1:-1)*i[1]/2,o=l?`bottom`:`top`),{x:s,y:c,align:a,verticalAlign:o}}_renderWeekText(e,t,n,r,i){let a=e.getModel(`dayLabel`);if(!a.get(`show`))return;let o=e.coordinateSystem,s=a.get(`position`),c=a.get(`nameMap`),l=a.get(`margin`),u=o.getFirstDayOfWeek();(!c||z(c))&&(c&&(t=Hh(c)||t),c=t.get([`time`,`dayOfWeekShort`])||F(t.get([`time`,`dayOfWeekAbbr`]),e=>e[0]));let d=o.getNextNDay(n.end.time,7-n.lweek).time,f=[o.getCellWidth(),o.getCellHeight()];l=J(l,Math.min(f[1],f[0])),s===`start`&&(d=o.getNextNDay(n.start.time,-(7+n.fweek)).time,l=-l);let p=a.get(`silent`);for(let e=0;e<7;e++){let t=o.getNextNDay(d,e),n=o.dataToCalendarLayout([t.time],!1).center,m=e;m=Math.abs((e+u)%7);let h=new qu({z2:30,style:j(oh(a,{text:c[m]}),this._weekTextPositionControl(n,r,s,l,f)),silent:p});i.add(h)}}};oX.type=`calendar`;const sX=864e5;var cX=class e{static getDimensionsInfo(){return[{name:`time`,type:`time`},`value`]}constructor(t,n,r){this.type=`calendar`,this.dimensions=e.dimensions,this.getDimensionsInfo=e.getDimensionsInfo,this._model=t,this._update(n,r)}getRangeInfo(){return this._rangeInfo}getModel(){return this._model}getRect(){return this._rect}getCellWidth(){return this._sw}getCellHeight(){return this._sh}getOrient(){return this._orient}getFirstDayOfWeek(){return this._firstDayOfWeek}getDateInfo(e){e=Yo(e);let t=e.getFullYear(),n=e.getMonth()+1,r=n<10?`0`+n:``+n,i=e.getDate(),a=i<10?`0`+i:``+i,o=e.getDay();return o=Math.abs((o+7-this.getFirstDayOfWeek())%7),{y:t+``,m:r,d:a,day:o,time:e.getTime(),formatedDate:t+`-`+r+`-`+a,date:e}}getNextNDay(e,t){return t=t||0,t===0||(e=new Date(this.getDateInfo(e).time),e.setDate(e.getDate()+t)),this.getDateInfo(e)}_update(e,t){this._firstDayOfWeek=+this._model.getModel(`dayLabel`).get(`firstDay`),this._orient=this._model.get(`orient`),this._lineWidth=this._model.getModel(`itemStyle`).getItemStyle().lineWidth||0,this._rangeInfo=this._getRangeInfo(this._initRangeOption());let n=this._rangeInfo.weeks||1,r=[`width`,`height`],i=this._model.getCellSize().slice(),a=this._model.getBoxLayoutParams(),o=this._orient===`horizontal`?[n,7]:[7,n];P([0,1],function(e){l(i,e)&&(a[r[e]]=i[e]*o[e])});let s={width:t.getWidth(),height:t.getHeight()},c=this._rect=c_(a,s);P([0,1],function(e){l(i,e)||(i[e]=c[r[e]]/o[e])});function l(e,t){return e[t]!=null&&e[t]!==`auto`}this._sw=i[0],this._sh=i[1]}dataToPoint(e,t,n){n=n||[],L(e)&&(e=e[0]),t==null&&(t=!0);let r=this.getDateInfo(e),i=this._rangeInfo,a=r.formatedDate;if(t&&!(r.time>=i.start.time&&r.time<i.end.time+sX))return n[0]=n[1]=NaN,n;let o=r.day,s=this._getRangeInfo([i.start.time,a]).nthWeek;return this._orient===`vertical`?(n[0]=this._rect.x+o*this._sw+this._sw/2,n[1]=this._rect.y+s*this._sh+this._sh/2):(n[0]=this._rect.x+s*this._sw+this._sw/2,n[1]=this._rect.y+o*this._sh+this._sh/2),n}pointToData(e){let t=this.pointToDate(e);return t&&t.time}dataToLayout(e,t,n){n=n||{};let r=n.rect=n.rect||{},i=n.contentRect=n.contentRect||{},a=this.dataToPoint(e,t);return r.x=a[0]-this._sw/2,r.y=a[1]-this._sh/2,r.width=this._sw,r.height=this._sh,K.copy(i,r),Lm(i,this._lineWidth/2,!0,!0),n}dataToCalendarLayout(e,t){let n=this.dataToPoint(e,t);return{center:n,tl:[n[0]-this._sw/2,n[1]-this._sh/2],tr:[n[0]+this._sw/2,n[1]-this._sh/2],br:[n[0]+this._sw/2,n[1]+this._sh/2],bl:[n[0]-this._sw/2,n[1]+this._sh/2]}}pointToDate(e){let t=Math.floor((e[0]-this._rect.x)/this._sw)+1,n=Math.floor((e[1]-this._rect.y)/this._sh)+1,r=this._rangeInfo.range;return this._orient===`vertical`?this._getDateByWeeksAndDay(n,t-1,r):this._getDateByWeeksAndDay(t,n-1,r)}convertToPixel(e,t,n){let r=lX(t);return r===this?r.dataToPoint(n):null}convertToLayout(e,t,n){let r=lX(t);return r===this?r.dataToLayout(n):null}convertFromPixel(e,t,n){let r=lX(t);return r===this?r.pointToData(n):null}containPoint(e){return console.warn(`Not implemented.`),!1}_initRangeOption(){let e=this._model.get(`range`),t;if(L(e)&&e.length===1&&(e=e[0]),L(e))t=e;else{let n=e.toString();if(/^\d{4}$/.test(n)&&(t=[n+`-01-01`,n+`-12-31`]),/^\d{4}[\/|-]\d{1,2}$/.test(n)){let e=this.getDateInfo(n),r=e.date;r.setMonth(r.getMonth()+1);let i=this.getNextNDay(r,-1);t=[e.formatedDate,i.formatedDate]}/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(n)&&(t=[n,n])}if(!t)return typeof process<`u`&&process.env.NODE_ENV!==`production`&&ee(`Invalid date range.`),e;let n=this._getRangeInfo(t);return n.start.time>n.end.time&&t.reverse(),t}_getRangeInfo(e){let t=[this.getDateInfo(e[0]),this.getDateInfo(e[1])],n;t[0].time>t[1].time&&(n=!0,t.reverse());let r=Math.floor(t[1].time/sX)-Math.floor(t[0].time/sX)+1,i=new Date(t[0].time),a=i.getDate(),o=t[1].date.getDate();i.setDate(a+r-1);let s=i.getDate();if(s!==o){let e=i.getTime()-t[1].time>0?1:-1;for(;(s=i.getDate())!==o&&(i.getTime()-t[1].time)*e>0;)r-=e,i.setDate(s-e)}let c=Math.floor((r+t[0].day+6)/7),l=n?-c+1:c-1;return n&&t.reverse(),{range:[t[0].formatedDate,t[1].formatedDate],start:t[0],end:t[1],allDay:r,weeks:c,nthWeek:l,fweek:t[0].day,lweek:t[1].day}}_getDateByWeeksAndDay(e,t,n){let r=this._getRangeInfo(n);if(e>r.weeks||e===0&&t<r.fweek||e===r.weeks&&t>r.lweek)return null;let i=(e-1)*7-r.fweek+t,a=new Date(r.start.time);return a.setDate(+r.start.d+i),this.getDateInfo(a)}static create(t,n){let r=[];return t.eachComponent(`calendar`,function(i){let a=new e(i,t,n);r.push(a),i.coordinateSystem=a}),t.eachComponent((e,t)=>{Qg({targetModel:t,coordSysType:`calendar`,coordSysProvider:$g})}),r}};cX.dimensions=[`time`,`value`];function lX(e){let t=e.calendarModel,n=e.seriesModel;return t?t.coordinateSystem:n?n.coordinateSystem:null}function uX(e){e.registerComponentModel(iX),e.registerComponentView(oX),e.registerCoordinateSystem(`calendar`,cX)}const dX={level:1,leaf:2,nonLeaf:3},fX={none:0,all:1,body:2,corner:3};function pX(e,t,n){let r=t[Z[n]].getCell(e);return!r&&me(e)&&e<0&&(r=t[Z[1-n]].getUnitLayoutInfo(n,Math.round(e))),r}function mX(e){let t=e||[];return t[0]=t[0]||[],t[1]=t[1]||[],t[0][0]=t[0][1]=t[1][0]=t[1][1]=NaN,t}function hX(e,t,n,r,i){gX(e[0],t,i,n,r,0),gX(e[1],t,i,n,r,1)}function gX(e,t,n,r,i,a){e[0]=1/0,e[1]=-1/0;let o=r[a],s=L(o)?o:[o],c=s.length,l=!!n;if(c>=1?(_X(e,t,s,l,i,a,0),c>1&&_X(e,t,s,l,i,a,c-1)):(typeof process<`u`&&process.env.NODE_ENV!==`production`&&t&&t.push(`Should be like [["x1", "x2"], ["y1", "y2"]], or ["x1", "y1"], rather than empty.`),e[0]=e[1]=NaN),l){let t=-i[Z[1-a]].getLocatorCount(a),r=i[Z[a]].getLocatorCount(a)-1;n===fX.body?t=bo(0,t):n===fX.corner&&(r=yo(-1,r)),r<t&&(t=r=NaN),xe(e[0])&&(e[0]=t),xe(e[1])&&(e[1]=r),e[0]=bo(yo(e[0],r),t),e[1]=bo(yo(e[1],r),t)}}function _X(e,t,n,r,i,a,o){let s=pX(n[o],i,a);if(!s){typeof process<`u`&&process.env.NODE_ENV!==`production`&&!r&&t&&t.push(`Can not find cell by coord[${a}][${o}].`),e[0]=e[1]=NaN;return}let c=s.id[Z[a]],l=c,u=DX(s);u&&(l+=u.span[Z[a]]-1),e[0]=yo(e[0],c,l),e[1]=bo(e[1],c,l)}function vX(e,t){return xe(e[t][0])||xe(e[t][1])}function yX(e,t,n,r){t=t||bX;for(let e=0;e<r;e++)t[e]=!1;for(;;){let i=!1;for(let a=0;a<r;a++){let r=n[a];!t[a]&&r.cellMergeOwner&&xX(e,r.locatorRange)&&(t[a]=!0,i=!0)}if(!i)break}}const bX=[];function xX(e,t){return!SX(e[0],t[0])||!SX(e[1],t[1])?!1:(e[0][0]=yo(e[0][0],t[0][0]),e[0][1]=bo(e[0][1],t[0][1]),e[1][0]=yo(e[1][0],t[1][0]),e[1][1]=bo(e[1][1],t[1][1]),!0)}function SX(e,t){return e[1]>=t[0]&&e[0]<=t[1]}function CX(e,t){e.id.set(t[0][0],t[1][0]),e.span.set(t[0][1]-e.id.x+1,t[1][1]-e.id.y+1)}function wX(e,t){e[0][0]=t[0][0],e[0][1]=t[0][1],e[1][0]=t[1][0],e[1][1]=t[1][1]}function TX(e,t,n,r){let i=pX(t[r][0],n,r),a=pX(t[r][1],n,r);e[Z[r]]=e[um[r]]=NaN,i&&a&&(e[Z[r]]=i.xy,e[um[r]]=a.xy+a.wh-i.xy)}function EX(e,t,n,r){return e[Z[t]]=n,e[Z[1-t]]=r,e}function DX(e){return e&&(e.type===dX.leaf||e.type===dX.nonLeaf)?e:null}function OX(){return{x:NaN,y:NaN,width:NaN,height:NaN}}var kX=class{constructor(e,t){this._cells=[],this._levels=[],this.dim=e,this.dimIdx=e===`x`?0:1,this._model=t,this._uniqueValueGen=AX(e);let n=t.get(`data`,!0),r=t.get(`length`,!0);if(n!=null&&!L(n)&&(typeof process<`u`&&process.env.NODE_ENV!==`production`&&fs(`Illegal echarts option - matrix.${this.dim}.data must be an array if specified.`),n=[]),n)this._initByDimModelData(n);else if(r!=null){n=Array(r);for(let e=0;e<r;e++)n[e]=null;this._initByDimModelData(n)}else this._initBySeriesData()}_initByDimModelData(e){let t=this,n=t._cells,r=t._levels,i=[],a=0;t._leavesCount=o(e,0,0),s();return;function o(e,n,s){let c=0;return e&&P(e,(e,l)=>{let u=!1,d;z(e)?d={value:e}:B(e)?(d=e,e.value!=null&&!z(e.value)&&(u=!0,d={value:null})):(d={value:null},e!=null&&(u=!0)),u&&typeof process<`u`&&process.env.NODE_ENV!==`production`&&fs(`Illegal echarts option - matrix.${t.dim}.data[${l}] must be \`string | {value: string}\`.`);let f={type:dX.nonLeaf,ordinal:NaN,level:s,firstLeafLocator:n,id:new G,span:EX(new G,t.dimIdx,1,1),option:d,xy:NaN,wh:NaN,dim:t,rect:OX()};a++,(i[n]||(i[n]=[])).push(f),r[s]||(r[s]={type:dX.level,xy:NaN,wh:NaN,option:null,id:new G,dim:t});let p=o(d.children,n,s+1),m=Math.max(1,p);f.span[Z[t.dimIdx]]=m,c+=m,n+=m}),c}function s(){let e=[];for(;n.length<a;)for(let r=0;r<i.length;r++){let a=i[r].pop();if(a){a.ordinal=e.length;let r=a.option.value;e.push(r),n.push(a),t._uniqueValueGen.calcDupBase(r)}}t._uniqueValueGen.ensureValueUnique(e,n);let r=t._ordinalMeta=new DT({categories:e,needCollect:!1,deduplication:!1});t._scale=new $T({ordinalMeta:r});for(let e=0;e<t._leavesCount;e++){let n=t._cells[e];n.type=dX.leaf,n.span[Z[1-t.dimIdx]]=t._levels.length-n.level}t._initCellsId(),t._initLevelIdOptions()}}_initBySeriesData(){let e=this;e._leavesCount=0,e._levels=[{type:dX.level,xy:NaN,wh:NaN,option:null,id:new G,dim:e}],e._initLevelIdOptions(),e._scale=new $T({ordinalMeta:e._ordinalMeta=new DT({needCollect:!0,deduplication:!0,onCollect:(t,n)=>{let r=e._cells[n]={type:dX.leaf,ordinal:n,level:0,firstLeafLocator:n,id:new G,span:EX(new G,e.dimIdx,1,1),option:{value:t+``},xy:NaN,wh:NaN,dim:e,rect:OX()};e._leavesCount++,e._setCellId(r)}})})}_setCellId(e){let t=this._levels.length,n=this.dimIdx;EX(e.id,n,e.firstLeafLocator,e.level-t)}_initCellsId(){let e=this._levels.length,t=this.dimIdx;P(this._cells,n=>{EX(n.id,t,n.firstLeafLocator,n.level-e)})}_initLevelIdOptions(){let e=this._levels.length,t=this.dimIdx,n=this._model.get(`levels`,!0);n=L(n)?n:[],P(this._levels,(r,i)=>{EX(r.id,t,0,i-e),r.option=n[i]})}shouldShow(){return!!this._model.getShallow(`show`,!0)}resetLayoutIterator(e,t,n,r){if(e=e||new nc,t===this.dimIdx){let t=this._leavesCount,i=n==null?0:Math.max(0,n);r=r==null?t:Math.min(r,t),e.reset(this._cells,i,i+r)}else{let t=this._levels.length,i=n==null?0:Math.max(0,n+t);r=r==null?t:Math.min(r,t),e.reset(this._levels,i,i+r)}return e}resetCellIterator(e){return(e||new nc).reset(this._cells,0)}resetLevelIterator(e){return(e||new nc).reset(this._levels,0)}getLayout(e,t,n){let r=this.getUnitLayoutInfo(t,n);e[Z[t]]=r?r.xy:NaN,e[um[t]]=r?r.wh:NaN}getUnitLayoutInfo(e,t){return e===this.dimIdx?t<this._leavesCount?this._cells[t]:void 0:this._levels[t+this._levels.length]}getCell(e){let t=this._scale.parse(e);return xe(t)?void 0:this._cells[t]}getLocatorCount(e){return e===this.dimIdx?this._leavesCount:this._levels.length}getOrdinalMeta(){return this._ordinalMeta}};function AX(e){let t=e.toUpperCase(),n=RegExp(`^${t}([0-9]+)$`),r=0;function i(e){let t;e!=null&&(t=e.match(n))&&(r=bo(r,+t[1]+1))}function a(){return`${t}${r++}`}function o(e,t){let n=U();for(let r=0;r<e.length;r++){let i=e[r];(i==null||n.get(i)!=null)&&(e[r]=i=a(),t[r].option=M({value:i},t[r].option)),n.set(i,!0)}}return{calcDupBase:i,ensureValueUnique:o}}var jX=class{constructor(e,t,n){this._model=t,this._dims=n,this._kind=e,this._cellMergeOwnerList=[]}_ensureCellMap(){let e=this,t=e._cellMap;return t||(t=e._cellMap=U(),n()),t;function n(){let t=[],n=e._model.getShallow(`data`);n&&!L(n)&&(typeof process<`u`&&process.env.NODE_ENV!==`production`&&fs(`matrix.${n}.data must be an array if specified.`),n=null),P(n,(n,r)=>{if(!B(n)||!L(n.coord)){typeof process<`u`&&process.env.NODE_ENV!==`production`&&fs(`Illegal matrix.${e._kind}.data[${r}], must be a {coord: [...], ...}`);return}let i=mX([]),a=null;if(typeof process<`u`&&process.env.NODE_ENV!==`production`&&(a=[]),hX(i,a,n.coord,e._dims,n.coordClamp?fX[e._kind]:fX.none),vX(i,0)||vX(i,1)){typeof process<`u`&&process.env.NODE_ENV!==`production`&&fs(`Can not determine cells by option matrix.${e._kind}.data[${r}]: ${a.join(` `)}`);return}let o=n&&n.mergeCells,s={id:new G,span:new G,locatorRange:i,option:n,cellMergeOwner:o};CX(s,i),t.push(s)});let i=[];for(let e=0;e<t.length;e++){let n=t[e];if(!n.cellMergeOwner)continue;let r=n.locatorRange;yX(r,i,t,e);for(let n=0;n<e;n++)i[n]&&(t[n].cellMergeOwner=!1);if(r[0][0]!==n.id.x||r[1][0]!==n.id.y){n.cellMergeOwner=!1;let e=j({},n.option);e.coord=null;let i={id:new G,span:new G,locatorRange:r,option:e,cellMergeOwner:!0};CX(i,r),t.push(i)}}P(t,t=>{let n=r(t.id.x,t.id.y);if(t.cellMergeOwner&&(n.cellMergeOwner=!0,n.span=t.span,n.locatorRange=t.locatorRange,n.spanRect=OX(),e._cellMergeOwnerList.push(n)),t.cellMergeOwner||t.option)for(let e=0;e<t.span.y;e++)for(let i=0;i<t.span.x;i++){let a=r(t.id.x+i,t.id.y+e);a.option=t.option,t.cellMergeOwner&&(a.inSpanOf=n)}})}function r(e,n){let r=NX(e,n),i=t.get(r);return i||(i=t.set(r,{id:new G(e,n),option:null,inSpanOf:null,span:null,spanRect:null,locatorRange:null,cellMergeOwner:!1})),i}}getCell(e){return this._ensureCellMap().get(NX(e[0],e[1]))}travelExistingCells(e){this._ensureCellMap().each(e)}expandRangeByCellMerge(e){if(!vX(e,0)&&!vX(e,1)&&e[0][0]===e[0][1]&&e[1][0]===e[1][1]){MX[0]=e[0][0],MX[1]=e[1][0];let t=this.getCell(MX),n=t&&t.inSpanOf;if(n){wX(e,n.locatorRange);return}}let t=this._cellMergeOwnerList;yX(e,null,t,t.length)}};const MX=[];function NX(e,t){return`${e}|${t}`}const PX={show:!0,color:Q.color.secondary,overflow:`break`,lineOverflow:`truncate`,padding:[2,3,2,3],distance:0};function FX(e){return{color:`none`,borderWidth:1,borderColor:e?`none`:Q.color.borderTint}}const IX={show:!0,label:PX,itemStyle:FX(!1),silent:void 0,dividerLineStyle:{width:1,color:Q.color.border}},LX={z:-50,left:`10%`,top:`10%`,right:`10%`,bottom:`10%`,x:IX,y:IX,body:{label:PX,itemStyle:FX(!1),silent:void 0},corner:{label:PX,itemStyle:FX(!0),silent:void 0},backgroundStyle:{color:`none`,borderColor:Q.color.axisLine,borderWidth:1},triggerEvent:!1};var RX=class e extends b_{constructor(...t){super(...t),this.type=e.type}optionUpdated(){let e=this._dimModels={x:new zX(this.get(`x`,!0)||{}),y:new zX(this.get(`y`,!0)||{})};e.x.option.type=e.y.option.type=`category`;let t={x:e.x.dim=new kX(`x`,e.x),y:e.y.dim=new kX(`y`,e.y)};this._body=new jX(`body`,new kh(this.getShallow(`body`)),t),this._corner=new jX(`corner`,new kh(this.getShallow(`corner`)),t)}getDimensionModel(e){return this._dimModels[e]}getBody(){return this._body}getCorner(){return this._corner}};RX.type=`matrix`,RX.layoutMode=`box`,RX.defaultOption=LX;var zX=class extends kh{getOrdinalMeta(){return this.dim.getOrdinalMeta()}};const BX=Math.round,VX={normal:25,special:100},HX={normal:50,special:125};var UX=class e extends Ib{constructor(...t){super(...t),this.type=e.type}render(e,t){this.group.removeAll();let n=this.group,r=e.coordinateSystem.getRect(),i=e.getDimensionModel(`x`),a=e.getDimensionModel(`y`),o=i.dim,s=a.dim;WX(n,e,t),GX(n,e,o,s,t);let c=V(e.getShallow(`borderZ2`,!0),99),l=c-1,u=e.getModel(`backgroundStyle`).getItemStyle([`borderWidth`]);u.lineWidth=0;let d=e.getModel(`backgroundStyle`).getItemStyle([`color`,`decal`,`shadowColor`,`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`]);d.fill=`none`;let f=ZX(r.clone(),u,0),p=ZX(r.clone(),d,c);f.silent=!0,p.silent=!0,n.add(f),n.add(p);let m=o.getUnitLayoutInfo(0,0),h=s.getUnitLayoutInfo(1,0);m&&h&&(o.shouldShow()&&n.add(QX({x1:r.x,y1:h.xy,x2:r.x+r.width,y2:h.xy},i.getModel(`dividerLineStyle`).getLineStyle(),l)),s.shouldShow()&&n.add(QX({x1:m.xy,y1:r.y,x2:m.xy,y2:r.y+r.height},a.getModel(`dividerLineStyle`).getLineStyle(),l)))}};UX.type=`matrix`;function WX(e,t,n){r(0),r(1);function r(r){let i=t.getDimensionModel(Z[r]),a=i.dim;if(!a.shouldShow())return;let o=i.getModel(`itemStyle`),s=i.getModel(`label`),c=t.getShallow(`tooltip`,!0),l=[];for(let u=a.resetCellIterator();u.next();){let a=u.item,d={};K.copy(d,a.rect),We(l,a.id.x,a.id.y),KX(l,t,e,n,a.option,o,s,i,d,a.option.value,HX,c,r===0?`x`:`y`)}}}function GX(e,t,n,r,i){a(`body`,t.getBody(),n,r),n.shouldShow()&&r.shouldShow()&&a(`corner`,t.getCorner(),r,n);function a(n,r,a,o){let s=new kh(t.getShallow(n,!0)),c=s.getModel(`itemStyle`),l=s.getModel(`label`),u=new nc,d=new nc,f=[],p=t.getShallow(`tooltip`,!0);for(o.resetLayoutIterator(d,1);d.next();)for(a.resetLayoutIterator(u,0);u.next();){let a=u.item,o=d.item;We(f,a.id.x,o.id.y);let m=r.getCell(f);if(m&&m.inSpanOf&&m.inSpanOf!==m)continue;let h={};m&&m.span?K.copy(h,m.spanRect):(a.dim.getLayout(h,0,f[0]),o.dim.getLayout(h,1,f[1]));let g=m?m.option:null;KX(f,t,e,i,g,c,l,s,h,g?g.value:null,VX,p,n)}}}function KX(e,t,n,r,i,a,o,s,c,l,u,d,f){JX.option=i?i.itemStyle:null,JX.parentModel=a,qX.option=i,qX.parentModel=s;let p=V(qX.getShallow(`z2`),i&&i.itemStyle?u.special:u.normal),m=d&&d.show,h=ZX(c,JX.getItemStyle(),p);n.add(h);let g=qX.get(`cursor`);g!=null&&h.attr(`cursor`,g);let _;if(l!=null){let n=l+``;YX.option=i?i.label:null,YX.parentModel=o,YX.ecModel=r;let a=YX.getShallow(`formatter`);if(a){let r={componentType:`matrix`,componentIndex:t.componentIndex,name:n,value:l,coord:e.slice(),$vars:[`name`,`value`,`coord`]};if(z(a))n=Rg(a,r);else if(R(a)){let e=a(r);e!=null&&(n=e+``)}}if(ih(h,{normal:YX},{defaultText:n,autoOverflowArea:!0,layoutRect:k(h.shape)}),_=h.getTextContent(),_){_.z2=p+1;let e=_.style;if(e&&e.overflow&&e.overflow!==`none`&&e.lineOverflow){var v;let e={};K.copy(e,c),Lm(e,(((v=h.style)==null?void 0:v.lineWidth)||0)/2,!0,!0),h.updateInnerText(),_.getLocalTransform(XX),$t(XX,XX),K.applyTransform(e,e,XX),_.setClipPath(new Uu({shape:e}))}}Bm({el:h,componentModel:t,itemName:n,itemTooltipOption:d,formatterParamsExtra:{xyLocator:e.slice()}})}let y=t.get(`triggerEvent`,!0);if(_){let e=YX.get(`silent`);e==null&&(e=!(y||m)),_.silent=e,_.ignoreHostSilent=!0}let b=qX.get(`silent`);if(b==null&&(b=!h.style||h.style.fill===`none`||!h.style.fill),h.silent=b,y&&h){let n={componentType:`matrix`,componentIndex:t.componentIndex,matrixIndex:t.componentIndex,targetType:f,name:_&&_.style?_.style.text:void 0,value:l,coord:e.slice()};X(h).eventData=n}rc(qX),rc(JX),rc(YX)}const qX=new kh,JX=new kh,YX=new kh,XX=[];function ZX(e,t,n){let r=t.lineWidth;if(r){let t=e.x+e.width,n=e.y+e.height;e.x=Bu(e.x,r,!0),e.y=Bu(e.y,r,!0),e.width=Bu(t,r,!0)-e.x,e.height=Bu(n,r,!0)-e.y}return new Uu({shape:e,style:t,z2:n})}function QX(e,t,n){let r=t.lineWidth;return r&&(BX(e.x1*2)===BX(e.x2*2)&&(e.x1=e.x2=Bu(e.x1,r,!0)),BX(e.y1*2)===BX(e.y2*2)&&(e.y1=e.y2=Bu(e.y1,r,!0))),new kp({shape:e,style:t,silent:!0,z2:n})}var $X=class e{static getDimensionsInfo(){return[{name:`x`,type:`ordinal`},{name:`y`,type:`ordinal`},{name:`value`}]}static create(t,n){let r=[];return t.eachComponent(`matrix`,function(i){let a=new e(i,t,n);r.push(a),i.coordinateSystem=a}),t.eachComponent((e,t)=>{Qg({targetModel:t,coordSysType:`matrix`,coordSysProvider:$g})}),r}constructor(t,n,r){this.dimensions=e.dimensions,this.type=`matrix`,this._model=t;let i=this._dimModels={x:t.getDimensionModel(`x`),y:t.getDimensionModel(`y`)};this._dims={x:i.x.dim,y:i.y.dim},this._resize(t,r)}getRect(){return this._rect}_resize(e,t){let n=this._dims,r=this._dimModels,i=this._rect=c_(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()});rZ(r,n,i,0),rZ(r,n,i,1),iZ(0,n),iZ(1,n),aZ(this._model.getBody(),n),aZ(this._model.getCorner(),n)}dataToPoint(e,t,n){return n=n||[],this.dataToLayout(e,t,eZ),n[0]=eZ.rect.x+eZ.rect.width/2,n[1]=eZ.rect.y+eZ.rect.height/2,n}dataToLayout(e,t,n){let r=this._dims;n=n||{};let i=n.rect=n.rect||{};i.x=i.y=i.width=i.height=NaN;let a=n.matrixXYLocatorRange=mX(n.matrixXYLocatorRange);return L(e)?(hX(a,null,e,r,V(t&&t.clamp,fX.none)),(!t||!t.ignoreMergeCells)&&((!t||t.clamp!==fX.corner)&&this._model.getBody().expandRangeByCellMerge(a),(!t||t.clamp!==fX.body)&&this._model.getCorner().expandRangeByCellMerge(a)),TX(i,a,r,0),TX(i,a,r,1),n):(typeof process<`u`&&process.env.NODE_ENV!==`production`&&fs("Input data must be an array in `convertToLayout`, `convertToPixel`"),n)}pointToData(e,t,n){let r=this._dims;return fZ(dZ,0,r,e,t&&t.clamp),fZ(dZ,1,r,e,t&&t.clamp),n=n||[],n[0]=n[1]=NaN,dZ.y===uZ.inCorner&&dZ.x===uZ.inBody?pZ(dZ,n,0,r):dZ.x===uZ.inCorner&&dZ.y===uZ.inBody?pZ(dZ,n,1,r):(mZ(dZ,n,0,r),mZ(dZ,n,1,r)),n}convertToPixel(e,t,n,r){let i=lZ(t);return i===this?i.dataToPoint(n,r):void 0}convertToLayout(e,t,n,r){let i=lZ(t);return i===this?i.dataToLayout(n,r):void 0}convertFromPixel(e,t,n,r){let i=lZ(t);return i===this?i.pointToData(n,r):void 0}containPoint(e){return this._rect.contain(e[0],e[1])}};$X.dimensions=[`x`,`y`,`value`];const eZ={rect:OX()},tZ=new nc,nZ=new nc;function rZ(e,t,n,r){let i=1-r,a=t[Z[r]],o=t[Z[i]],s=o.shouldShow();for(let e=a.resetCellIterator();e.next();)e.item.wh=e.item.xy=NaN;for(let e=o.resetLayoutIterator(null,r);e.next();)e.item.wh=e.item.xy=NaN;let c=n[um[r]],l=a.getLocatorCount(r)+o.getLocatorCount(r),u=new kh;for(let t=o.resetLevelIterator();t.next();)u.option=t.item.option,u.parentModel=e[Z[i]],f(t.item,s?u.get(`levelSize`):0);let d=new kh;for(let e=a.resetCellIterator();e.next();)e.item.type===dX.leaf&&(d.option=e.item.option,d.parentModel=void 0,f(e.item,d.get(`size`)));function f(e,t){let i=sZ(t,r,n);xe(i)||(e.wh=cZ(i,c),c=cZ(c-e.wh),l--)}let p=l?c/l:0,m=!l&&c>=1,h=n[Z[r]],g=a.getLocatorCount(r)-1,_=new nc;for(o.resetLayoutIterator(_,r);_.next();)v(_.item);for(a.resetLayoutIterator(_,r);_.next();)v(_.item);function v(e){xe(e.wh)&&(e.wh=p),e.xy=h,e.id[Z[r]]===g&&!m&&(e.wh=n[Z[r]]+n[um[r]]-e.xy),h+=e.wh}}function iZ(e,t){for(let n=t[Z[e]].resetCellIterator();n.next();){let r=n.item;oZ(r.rect,e,r.id,r.span,t),oZ(r.rect,1-e,r.id,r.span,t),r.type===dX.nonLeaf&&(r.xy=r.rect[Z[e]],r.wh=r.rect[um[e]])}}function aZ(e,t){e.travelExistingCells(e=>{let n=e.span;if(n){let r=e.spanRect,i=e.id;oZ(r,0,i,n,t),oZ(r,1,i,n,t)}})}function oZ(e,t,n,r,i){e[um[t]]=0;let a=n[Z[t]]<0?i[Z[1-t]]:i[Z[t]],o=a.getUnitLayoutInfo(t,n[Z[t]]);if(e[Z[t]]=o.xy,e[um[t]]=o.wh,r[Z[t]]>1){let i=a.getUnitLayoutInfo(t,n[Z[t]]+r[Z[t]]-1);e[um[t]]=i.xy+i.wh-o.xy}}function sZ(e,t,n){return cZ(Mo(e,n[um[t]]),n[um[t]])}function cZ(e,t){return Math.max(Math.min(e,V(t,1/0)),0)}function lZ(e){let t=e.matrixModel,n=e.seriesModel;return t?t.coordinateSystem:n?n.coordinateSystem:null}const uZ={inBody:1,inCorner:2,outside:3},dZ={x:null,y:null,point:[]};function fZ(e,t,n,r,i){let a=n[Z[t]],o=n[Z[1-t]],s=a.getUnitLayoutInfo(t,a.getLocatorCount(t)-1),c=a.getUnitLayoutInfo(t,0),l=o.getUnitLayoutInfo(t,-o.getLocatorCount(t)),u=o.shouldShow()?o.getUnitLayoutInfo(t,-1):null,d=e.point[t]=r[t];if(!c&&!u){e[Z[t]]=uZ.outside;return}if(i===fX.body){c?(e[Z[t]]=uZ.inBody,d=yo(s.xy+s.wh,bo(c.xy,d)),e.point[t]=d):e[Z[t]]=uZ.outside;return}if(i===fX.corner){u?(e[Z[t]]=uZ.inCorner,d=yo(u.xy+u.wh,bo(l.xy,d)),e.point[t]=d):e[Z[t]]=uZ.outside;return}let f=c?c.xy:u?u.xy+u.wh:NaN,p=l?l.xy:f,m=s?s.xy+s.wh:f;if(d<p){if(!i){e[Z[t]]=uZ.outside;return}d=p}else if(d>m){if(!i){e[Z[t]]=uZ.outside;return}d=m}e.point[t]=d,e[Z[t]]=f<=d&&d<=m?uZ.inBody:p<=d&&d<=f?uZ.inCorner:uZ.outside}function pZ(e,t,n,r){let i=1-n;if(e[Z[n]]!==uZ.outside)for(r[Z[n]].resetCellIterator(nZ);nZ.next();){let r=nZ.item;if(gZ(e.point[n],r.rect,n)&&gZ(e.point[i],r.rect,i)){t[n]=r.ordinal,t[i]=r.id[Z[i]];return}}}function mZ(e,t,n,r){if(e[Z[n]]!==uZ.outside){for((e[Z[n]]===uZ.inCorner?r[Z[1-n]]:r[Z[n]]).resetLayoutIterator(tZ,n);tZ.next();)if(hZ(e.point[n],tZ.item)){t[n]=tZ.item.id[Z[n]];return}}}function hZ(e,t){return t.xy<=e&&e<=t.xy+t.wh}function gZ(e,t,n){return t[Z[n]]<=e&&e<=t[Z[n]]+t[um[n]]}function _Z(e){e.registerComponentModel(RX),e.registerComponentView(UX),e.registerCoordinateSystem(`matrix`,$X)}function vZ(e,t){let n=e.existing;if(t.id=e.keyInfo.id,!t.type&&n&&(t.type=n.type),t.parentId==null){let e=t.parentOption;e?t.parentId=e.id:n&&(t.parentId=n.parentId)}t.parentOption=null}function yZ(e,t){let n;return P(t,function(t){e[t]!=null&&e[t]!==`auto`&&(n=!0)}),n}function bZ(e,t,n){let r=j({},n),i=e[t],a=n.$action||`merge`;if(a===`merge`){if(i){if(typeof process<`u`&&process.env.NODE_ENV!==`production`){let e=n.type;H(!e||i.type===e,'Please set $action: "replace" to change `type`')}A(i,r,!0),h_(i,r,{ignoreSize:!0}),__(n,i),CZ(n,i),CZ(n,i,`shape`),CZ(n,i,`style`),CZ(n,i,`extra`),n.clipPath=i.clipPath}else e[t]=r}else a===`replace`?e[t]=r:a===`remove`&&i&&(e[t]=null)}const xZ=[`transition`,`enterFrom`,`leaveTo`],SZ=xZ.concat([`enterAnimation`,`updateAnimation`,`leaveAnimation`]);function CZ(e,t,n){if(n&&(!e[n]&&t[n]&&(e[n]={}),e=e[n],t=t[n]),!e||!t)return;let r=n?xZ:SZ;for(let n=0;n<r.length;n++){let i=r[n];e[i]==null&&t[i]!=null&&(e[i]=t[i])}}function wZ(e,t){if(e&&(e.hv=t.hv=[yZ(t,[`left`,`right`]),yZ(t,[`top`,`bottom`])],e.type===`group`)){let n=e,r=t;n.width==null&&(n.width=r.width=0),n.height==null&&(n.height=r.height=0)}}var TZ=class e extends b_{constructor(...t){super(...t),this.type=e.type,this.preventAutoZ=!0}mergeOption(e,t){let n=this.option.elements;this.option.elements=null,super.mergeOption(e,t),this.option.elements=n}optionUpdated(e,t){let n=this.option,r=(t?n:e).elements,i=n.elements=t?[]:n.elements,a=[];this._flatten(r,a,null);let o=Ts(i,a,`normalMerge`),s=this._elOptionsToUpdate=[];P(o,function(e,t){let n=e.newOption;typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(B(n)||e.existing,`Empty graphic option definition`),n&&(s.push(n),vZ(e,n),bZ(i,t,n),wZ(i[t],n))},this),n.elements=ce(i,e=>(e&&delete e.$action,e!=null))}_flatten(e,t,n){P(e,function(e){if(!e)return;n&&(e.parentOption=n),t.push(e);let r=e.children;r&&r.length&&this._flatten(r,t,e),delete e.children},this)}useElOptionsToUpdate(){let e=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,e}};TZ.type=`graphic`,TZ.defaultOption={elements:[]};const EZ={path:null,compoundPath:null,group:q,image:Fu,text:qu},DZ=Y();var OZ=class e extends Ib{constructor(...t){super(...t),this.type=e.type}init(){this._elMap=U()}render(e,t,n){e!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=e,this._updateElements(e),this._relocate(e,n)}_updateElements(e){let t=e.useElOptionsToUpdate();if(!t)return;let n=this._elMap,r=this.group,i=e.get(`z`),a=e.get(`zlevel`);P(t,function(t){let o=Ps(t.id,null),s=o==null?null:n.get(o),c=Ps(t.parentId,null),l=c==null?r:n.get(c),u=t.type,d=t.style;u===`text`&&d&&t.hv&&t.hv[1]&&(d.textVerticalAlign=d.textBaseline=d.verticalAlign=d.align=null);let f=t.textContent,p=t.textConfig;if(d&&gA(d,u,!!p,!!f)){let e=_A(d,u,!0);!p&&e.textConfig&&(p=t.textConfig=e.textConfig),!f&&e.textContent&&(f=e.textContent)}let m=NZ(t);typeof process<`u`&&process.env.NODE_ENV!==`production`&&s&&H(l===s.parent,`Changing parent is not supported.`);let h=t.$action||`merge`,g=h===`merge`,_=h===`replace`;if(g){let r=!s,c=s;r?c=AZ(o,l,t.type,n):(c&&(DZ(c).isNew=!1),_q(c)),c&&(ZK(c,m,e,{isInit:r}),MZ(c,t,i,a))}else if(_){jZ(s,t,n,e);let r=AZ(o,l,t.type,n);r&&(ZK(r,m,e,{isInit:!0}),MZ(r,t,i,a))}else h===`remove`&&(QK(s,t),jZ(s,t,n,e));let v=n.get(o);if(v&&f){if(g){let e=v.getTextContent();e?e.attr(f):v.setTextContent(new qu(f))}else _&&v.setTextContent(new qu(f))}if(v){let n=t.clipPath;if(n){let t=n.type,r,i=!1;if(g){let e=v.getClipPath();i=!e||DZ(e).type!==t,r=i?kZ(t):e}else _&&(i=!0,r=kZ(t));v.setClipPath(r),ZK(r,n,e,{isInit:i}),vq(r,n.keyframeAnimation,e)}let r=DZ(v);v.setTextConfig(p),r.option=t,PZ(v,e,t),Bm({el:v,componentModel:e,itemName:v.name,itemTooltipOption:t.tooltip}),vq(v,t.keyframeAnimation,e)}})}_relocate(e,t){let n=e.option.elements,r=this.group,i=this._elMap,a=t.getWidth(),o=t.getHeight(),s=[`x`,`y`];for(let e=0;e<n.length;e++){let t=n[e],s=Ps(t.id,null),c=s==null?null:i.get(s);if(!c||!c.isGroup)continue;let l=c.parent,u=l===r,d=DZ(c),f=DZ(l);d.width=J(d.option.width,u?a:f.width)||0,d.height=J(d.option.height,u?o:f.height)||0}for(let t=n.length-1;t>=0;t--){let c=n[t],l=Ps(c.id,null),u=l==null?null:i.get(l);if(!u)continue;let d=u.parent,f=DZ(d),p=d===r?{width:a,height:o}:{width:f.width,height:f.height},m={},h=f_(u,c,p,null,{hv:c.hv,boundingMode:c.bounding},m);if(!DZ(u).isNew&&h){let t=c.transition,n={};for(let e=0;e<s.length;e++){let r=s[e],i=m[r];t&&(eq(t)||N(t,r)>=0)?n[r]=i:u[r]=i}em(u,n,e,0)}else u.attr(m)}}_clear(){let e=this._elMap;e.each(t=>{jZ(t,DZ(t).option,e,this._lastGraphicModel)}),this._elMap=U()}dispose(){this._clear()}};OZ.type=`graphic`;function kZ(e){typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(e,`graphic type MUST be set`);let t=W(EZ,e)?EZ[e]:hm(e);typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(t,`graphic type ${e} can not be found`);let n=new t({});return DZ(n).type=e,n}function AZ(e,t,n,r){let i=kZ(n);return t.add(i),r.set(e,i),DZ(i).id=e,DZ(i).isNew=!0,i}function jZ(e,t,n,r){e&&e.parent&&(e.type===`group`&&e.traverse(function(e){jZ(e,t,n,r)}),$K(e,t,r),n.removeKey(DZ(e).id))}function MZ(e,t,n,r){e.isGroup||P([[`cursor`,yl.prototype.cursor],[`zlevel`,r||0],[`z`,n||0],[`z2`,0]],n=>{let r=n[0];W(t,r)?e[r]=V(t[r],n[1]):e[r]==null&&(e[r]=n[1])}),P(ue(t),n=>{if(n.indexOf(`on`)===0){let r=t[n];e[n]=R(r)?r:null}}),W(t,`draggable`)&&(e.draggable=t.draggable),t.name!=null&&(e.name=t.name),t.id!=null&&(e.id=t.id)}function NZ(e){return e=j({},e),P([`id`,`parentId`,`$action`,`hv`,`bounding`,`textContent`,`clipPath`].concat(t_),function(t){delete e[t]}),e}function PZ(e,t,n){let r=X(e).eventData;!e.silent&&!e.ignore&&!r&&(r=X(e).eventData={componentType:`graphic`,componentIndex:t.componentIndex,name:e.name}),r&&(r.info=n.info)}function FZ(e){e.registerComponentModel(TZ),e.registerComponentView(OZ),e.registerPreprocessor(function(e){let t=e.graphic;L(t)?e.graphic=!t[0]||!t[0].elements?[{elements:t}]:[e.graphic[0]]:t&&!t.elements&&(e.graphic=[{elements:[t]}])})}const IZ=[`x`,`y`,`radius`,`angle`,`single`],LZ=Y(),RZ=[`cartesian2d`,`polar`,`singleAxis`];function zZ(e){let t=e.get(`coordinateSystem`);return N(RZ,t)>=0}function BZ(e){return typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(e),e+`Axis`}function VZ(e,t){let n=U(),r=[],i=U();e.eachComponent({mainType:`dataZoom`,query:t},function(e){i.get(e.uid)||s(e)});let a;do a=!1,e.eachComponent(`dataZoom`,o);while(a);function o(e){!i.get(e.uid)&&c(e)&&(s(e),a=!0)}function s(e){i.set(e.uid,!0),r.push(e),l(e)}function c(e){let t=!1;return e.eachTargetAxis(function(e,r){let i=n.get(e);i&&i[r]&&(t=!0)}),t}function l(e){e.eachTargetAxis(function(e,t){(n.get(e)||n.set(e,[]))[t]=!0})}return r}function HZ(e){let t=e.ecModel,n={infoList:[],infoMap:U()};return e.eachTargetAxis(function(e,r){let i=t.getComponent(BZ(e),r);if(!i)return;let a=i.getCoordSysModel();if(!a)return;let o=a.uid,s=n.infoMap.get(o);s||(s={model:a,axisModels:[]},n.infoList.push(s),n.infoMap.set(o,s)),s.axisModels.push(i)}),n}function UZ(e){let t=LZ(Qx(e));return t.axisProxyMap||(t.axisProxyMap=U())}function WZ(e){if(e)return typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(e.ecModel),UZ(e.ecModel).get(e.uid)}function GZ(e,t){typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(e.ecModel),UZ(e.ecModel).set(e.uid,t)}function KZ(e,t){let n=t.getAxisModel().axis.__alignTo;return n&&e.getAxisProxy(n.dim,n.model.componentIndex)?WZ(n.model):null}var qZ=class{constructor(){this.indexList=[],this.indexMap=[]}add(e){this.indexMap[e]||(this.indexList.push(e),this.indexMap[e]=!0)}},JZ=class e extends b_{constructor(...t){super(...t),this.type=e.type,this._autoThrottle=!0,this._noTarget=!0,this._rangePropMode=[`percent`,`percent`]}init(e,t,n){let r=YZ(e);this.settledOption=r,this.mergeDefaultAndTheme(e,n),this._doInit(r)}mergeOption(e){let t=YZ(e);A(this.option,e,!0),A(this.settledOption,t,!0),this._doInit(t)}_doInit(e){let t=this.option;this._setDefaultThrottle(e),this._updateRangeUse(e);let n=this.settledOption;P([[`start`,`startValue`],[`end`,`endValue`]],function(e,r){this._rangePropMode[r]===`value`&&(t[e[0]]=n[e[0]]=null)},this),this._resetTarget()}_resetTarget(){let e=this.get(`orient`,!0),t=this._targetAxisInfoMap=U();this._fillSpecifiedTargetAxis(t)?this._orient=e||this._makeAutoOrientByTargetAxis():(this._orient=e||`horizontal`,this._fillAutoTargetAxisByOrient(t,this._orient)),this._noTarget=!0,t.each(function(e){e.indexList.length&&(this._noTarget=!1)},this)}_fillSpecifiedTargetAxis(e){let t=!1;return P(IZ,function(n){let r=this.getReferringComponents(BZ(n),Js);if(!r.specified)return;t=!0;let i=new qZ;P(r.models,function(e){i.add(e.componentIndex)}),e.set(n,i)},this),t}_fillAutoTargetAxisByOrient(e,t){let n=this.ecModel,r=!0;if(r){let e=t===`vertical`?`y`:`x`;i(n.findComponents({mainType:e+`Axis`}),e)}r&&i(n.findComponents({mainType:`singleAxis`,filter:e=>e.get(`orient`,!0)===t}),`single`);function i(t,n){let i=t[0];if(!i)return;let a=new qZ;if(a.add(i.componentIndex),e.set(n,a),r=!1,n===`x`||n===`y`){let e=i.getReferringComponents(`grid`,qs).models[0];e&&P(t,function(t){i.componentIndex!==t.componentIndex&&e===t.getReferringComponents(`grid`,qs).models[0]&&a.add(t.componentIndex)})}}r&&P(IZ,function(t){if(!r)return;let i=n.findComponents({mainType:BZ(t),filter:e=>e.get(`type`,!0)===`category`});if(i[0]){let n=new qZ;n.add(i[0].componentIndex),e.set(t,n),r=!1}},this)}_makeAutoOrientByTargetAxis(){let e;return this.eachTargetAxis(function(t){!e&&(e=t)},this),e===`y`?`vertical`:`horizontal`}_setDefaultThrottle(e){if(e.hasOwnProperty(`throttle`)&&(this._autoThrottle=!1),this._autoThrottle){let e=this.ecModel.option;this.option.throttle=e.animation&&e.animationDurationUpdate>0?100:20}}_updateRangeUse(e){let t=this._rangePropMode,n=this.get(`rangeMode`);P([[`start`,`startValue`],[`end`,`endValue`]],function(r,i){let a=e[r[0]]!=null,o=e[r[1]]!=null;a&&!o?t[i]=`percent`:!a&&o?t[i]=`value`:n?t[i]=n[i]:a&&(t[i]=`percent`)})}noTarget(){return this._noTarget}getFirstTargetAxisModel(){let e;return this.eachTargetAxis(function(t,n){e==null&&(e=this.ecModel.getComponent(BZ(t),n))},this),e}eachTargetAxis(e,t){this._targetAxisInfoMap.each(function(n,r){P(n.indexList,function(n){e.call(t,r,n)})})}getAxisProxy(e,t){return WZ(this.getAxisModel(e,t))}getAxisModel(e,t){typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(e&&t!=null);let n=this._targetAxisInfoMap.get(e);if(n&&n.indexMap[t])return this.ecModel.getComponent(BZ(e),t)}setRawRange(e){let t=this.option,n=this.settledOption;P([[`start`,`startValue`],[`end`,`endValue`]],function(r){(e[r[0]]!=null||e[r[1]]!=null)&&(t[r[0]]=n[r[0]]=e[r[0]],t[r[1]]=n[r[1]]=e[r[1]])},this),this._updateRangeUse(e)}setCalculatedRange(e){let t=this.option;P([`start`,`startValue`,`end`,`endValue`],function(n){t[n]=e[n]})}getPercentRange(){let e=this.findRepresentativeAxisProxy();if(e)return e.getWindow().percent}getValueRange(e,t){if(e==null&&t==null){let e=this.findRepresentativeAxisProxy();if(e)return e.getWindow().value}else return this.getAxisProxy(e,t).getWindow().value}findRepresentativeAxisProxy(e){if(e)return WZ(e);let t,n=this._targetAxisInfoMap.keys();for(let e=0;e<n.length;e++){let r=n[e],i=this._targetAxisInfoMap.get(r);for(let e=0;e<i.indexList.length;e++){let n=this.getAxisProxy(r,i.indexList[e]);if(n.hostedBy(this))return n;t||(t=n)}}return t}getRangePropMode(){return this._rangePropMode.slice()}getOrient(){return typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(this._orient),this._orient}};JZ.type=`dataZoom`,JZ.dependencies=[`xAxis`,`yAxis`,`radiusAxis`,`angleAxis`,`singleAxis`,`series`,`toolbox`],JZ.defaultOption={z:4,filterMode:`filter`,start:0,end:100};function YZ(e){let t={};return P([`start`,`end`,`startValue`,`endValue`,`throttle`],function(n){e.hasOwnProperty(n)&&(t[n]=e[n])}),t}var XZ=class e extends JZ{constructor(...t){super(...t),this.type=e.type}};XZ.type=`dataZoom.select`;var ZZ=class e extends Ib{constructor(...t){super(...t),this.type=e.type}render(e,t,n,r){this.dataZoomModel=e,this.ecModel=t,this.api=n}};ZZ.type=`dataZoom`;var QZ=class e extends ZZ{constructor(...t){super(...t),this.type=e.type}};QZ.type=`dataZoom.select`;var $Z=class{constructor(e,t,n,r){this._dimName=e,this._axisIndex=t,this.ecModel=r,this._dataZoomModel=n}hostedBy(e){return this._dataZoomModel===e}getWindow(){return k(this._window)}getTargetSeriesModels(){let e=[];return this.ecModel.eachSeries(function(t){if(zZ(t)){let n=BZ(this._dimName),r=t.getReferringComponents(n,qs).models[0];r&&this._axisIndex===r.componentIndex&&e.push(t)}},this),e}getAxisModel(){return this.ecModel.getComponent(this._dimName+`Axis`,this._axisIndex)}getMinMaxSpan(){return k(this._minMaxSpan)}calculateDataWindow(e){let t=this._extent,n=this.getAxisModel().axis,r=n.scale,i=this._dataZoomModel.getRangePropMode(),a=[0,100],o=[],s=[],c,l=[!1,!1];P([`start`,`end`],function(n,u){let d=e[n],f=e[n+`Value`];i[u]===`percent`?(d==null&&(d=a[u]),f=Ao(d,a,t),l[u]=!0):(c=!0,f==null?f=t[u]:(f=r.parse(f),r.sanitize&&(f=r.sanitize(f,t))),d=Ao(f,t,a)),s[u]=f==null||isNaN(f)?t[u]:f,o[u]=d==null||isNaN(d)?a[u]:d}),Lo(s),Lo(o);let u=this._minMaxSpan;c?d(s,o,t,a,!1):d(o,s,a,t,!0);function d(e,t,n,r,i){let a=i?`Span`:`ValueSpan`;_H(0,e,n,`all`,u[`min`+a],u[`max`+a]);for(let a=0;a<2;a++)t[a]=Ao(e[a],n,r,!0),i&&(t[a]=t[a],l[a]=!0);fc(t)}let f=WT(r)||HT(r),p=n.getExtent(),m=xo(p[1]-p[0]),h=f?0:Vo(s,m,.5);P([[0,wo],[1,Co]],function([e,n]){l[e]&&isFinite(h)&&(s[e]=Fo(s[e],h),s[e]=yo(t[1],bo(t[0],s[e])),o[e]===a[e]&&(s[e]=t[e],f&&(s[e]=n(s[e]))))}),fc(s);let g=[Ao(s[0],t,a,!0),Ao(s[1],t,a,!0)];return fc(g),{value:s,percent:o,percentInverted:g,valuePrecision:h}}reset(e,t){if(!this.hostedBy(e))return;let n=this.getAxisModel().axis;gD(n,2);let r=n.scale.rawExtentInfo;this._extent=r.makeNoZoom(),this._updateMinMaxSpan();let i=e.settledOption;t&&(i=M({start:t[0],end:t[1]},i));let{percent:a,value:o}=this._window=this.calculateDataWindow(i);a[0]!==0&&r.setZoomMM(0,o[0]),a[1]!==100&&r.setZoomMM(1,o[1])}filterData(e,t){if(!this.hostedBy(e))return;let n=this._dimName,r=this.getTargetSeriesModels(),i=e.get(`filterMode`),a=this._window.value;if(i===`none`)return;P(r,function(e){let t=e.getData(),r=t.mapDimensionsAll(n);if(r.length){if(i===`weakFilter`){let e=t.getStore(),n=F(r,e=>t.getDimensionIndex(e),t);t.filterSelf(function(t){let i,o,s;for(let c=0;c<r.length;c++){let r=e.get(n[c],t),l=!isNaN(r),u=r<a[0],d=r>a[1];if(l&&!u&&!d)return!0;l&&(s=!0),u&&(i=!0),d&&(o=!0)}return s&&i&&o})}else P(r,function(n){if(i===`empty`)e.setData(t=t.map(n,function(e){return o(e)?e:NaN}));else{let e={};e[n]=a,t.selectRange(e)}});P(r,function(e){t.setApproximateExtent(a,e)})}});function o(e){return e>=a[0]&&e<=a[1]}}_updateMinMaxSpan(){let e=this._minMaxSpan={},t=this._dataZoomModel,n=this._extent;P([`min`,`max`],function(r){let i=t.get(r+`Span`),a=t.get(r+`ValueSpan`);a!=null&&(a=this.getAxisModel().axis.scale.parse(a)),a==null?i!=null&&(a=Ao(i,[0,100],n,!0)-n[0]):i=Ao(n[0]+a,n,[0,100],!0),e[r+`Span`]=i,e[r+`ValueSpan`]=a},this)}};const eQ={dirtyOnOverallProgress:!0,getTargetSeries(e){function t(t){e.eachComponent(`dataZoom`,function(n){n.eachTargetAxis(function(r,i){t(r,i,e.getComponent(BZ(r),i),n)})})}let n=[];t(function(t,r,i,a){if(!WZ(i)){let o=new $Z(t,r,a,e);n.push(o),GZ(i,o)}});let r=U();return P(n,function(e){P(e.getTargetSeriesModels(),function(e){r.set(e.uid,e)})}),r},overallReset(e,t){e.eachComponent(`dataZoom`,function(e){let n=[];e.eachTargetAxis(function(t,r){let i=e.getAxisProxy(t,r),a=KZ(e,i);a?n.push([i,a]):i.reset(e,null)}),P(n,function(t){t[0].reset(e,t[1].getWindow().percentInverted)}),e.eachTargetAxis(function(n,r){e.getAxisProxy(n,r).filterData(e,t)})}),e.eachComponent(`dataZoom`,function(e){let t=e.findRepresentativeAxisProxy();if(t){let{percent:n,value:r}=t.getWindow();e.setCalculatedRange({start:n[0],end:n[1],startValue:r[0],endValue:r[1]})}})}};function tQ(e){e.registerAction(`dataZoom`,function(e,t){P(VZ(t,e),function(t){t.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})})}const nQ=pc();function rQ(e){nQ(e,function(){e.registerProcessor(e.PRIORITY.PROCESSOR.FILTER,eQ),tQ(e),e.registerSubTypeDefaulter(`dataZoom`,function(){return`slider`})})}function iQ(e){e.registerComponentModel(XZ),e.registerComponentView(QZ),rQ(e)}var aQ=class{};const oQ={};function sQ(e,t){oQ[e]=t}function cQ(e){return oQ[e]}var lQ=class e extends b_{constructor(...t){super(...t),this.type=e.type}init(e,t,n){let r=n.getTheme().get(`toolbox`),i=r?r.feature:null;i&&(this._themeFeatureOption=j({},i),r.feature={}),super.init(e,t,n),i&&(r.feature=i)}optionUpdated(){P(this.option.feature,function(e,t){let n=this._themeFeatureOption,r=cQ(t);r&&(r.getDefaultOption&&(r.defaultOption=r.getDefaultOption(this.ecModel)),n&&n[t]&&(A(e,n[t]),n[t]=null),A(e,r.defaultOption))},this)}};lQ.type=`toolbox`,lQ.layoutMode={type:`box`,ignoreSize:!0},lQ.defaultOption={show:!0,z:6,orient:`horizontal`,left:`right`,top:`top`,backgroundColor:`transparent`,borderColor:Q.color.border,borderRadius:0,borderWidth:0,padding:Q.size.m,itemSize:15,itemGap:Q.size.s,showTitle:!0,iconStyle:{borderColor:Q.color.accent50,color:`none`},emphasis:{iconStyle:{borderColor:Q.color.accent70}},tooltip:{show:!1,position:`bottom`}};function uQ(e,t){let n=Ng(t.get(`padding`)),r=t.getItemStyle([`color`,`opacity`]);return r.fill=t.get(`backgroundColor`),new Uu({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 dQ=class extends Ib{render(e,t,n,r){let i=this.group;if(i.removeAll(),!e.get(`show`))return;let a=+e.get(`itemSize`),o=e.get(`orient`)===`vertical`,s=e.get(`feature`)||{},c=this._features||(this._features=U()),l=[];P(s,function(e,t){l.push(t)}),new Pw(this._featureNames||[],l).add(u).update(u).remove(fe(u,null)).execute(),this._featureNames=ce(l,function(e){return c.hasKey(e)});function u(i,a){let o=i!=null&&a==null,u=i!=null&&a!=null,f=i==null,p=o||u?l[i]:l[a],m=s[p],h=o||u?new kh(m,e,t):null,g=h&&h.get(`show`),_;if(o){if(!g)return;if(fQ(p))_={onclick:h.option.onclick,featureName:p};else{let e=cQ(p);if(!e)return;_=new e}c.set(p,_)}else _=c.get(p);f||!g?(pQ(_)&&_.dispose&&_.dispose(t,n),c.removeKey(p)):(r&&r.newTitle!=null&&r.featureName===p&&(m.title=r.newTitle),o&&(_.uid=jh(`toolbox-feature`)),_.model=h,_.ecModel=t,_.api=n,d(h,_,p),h.setIconStatus=function(e,t){let n=this.option,r=this.iconPaths;n.iconStatus=n.iconStatus||{},n.iconStatus[e]=t,r[e]&&(t===`emphasis`?Zd:Qd)(r[e])},pQ(_)&&_.render&&_.render(h,t,n,r))}function d(r,s,c){let l=r.getModel(`iconStyle`),u=r.getModel([`emphasis`,`iconStyle`]),d=s instanceof aQ&&s.getIcons?s.getIcons():r.get(`icon`),f=r.get(`title`)||{},p,m;z(d)?(p={},p[c]=d):p=d,z(f)?(m={},m[c]=f):m=f;let h=r.iconPaths={};P(p,function(c,d){let f=Mm(c,{},{x:-a/2,y:-a/2,width:a,height:a});f.setStyle(l.getItemStyle());let p=f.ensureState(`emphasis`);p.style=u.getItemStyle();let g=new qu({style:{text:m[d],align:u.get(`textAlign`),borderRadius:u.get(`textBorderRadius`),padding:u.get(`textPadding`),fill:null,font:mh({fontStyle:u.get(`textFontStyle`),fontFamily:u.get(`textFontFamily`),fontSize:u.get(`textFontSize`),fontWeight:u.get(`textFontWeight`)},t)},ignore:!0});f.setTextContent(g),Bm({el:f,componentModel:e,itemName:d,formatterParamsExtra:{title:m[d]}}),f.__title=m[d],f.on(`mouseover`,function(){let t=u.getItemStyle(),r=o?e.get(`right`)==null&&e.get(`left`)!==`right`?`right`:`left`:e.get(`bottom`)==null&&e.get(`top`)!==`bottom`?`bottom`:`top`;g.setStyle({fill:u.get(`textFill`)||t.fill||t.stroke||Q.color.neutral99,backgroundColor:u.get(`textBackgroundColor`)}),f.setTextConfig({position:u.get(`textPosition`)||r}),g.ignore=!e.get(`showTitle`),n.enterEmphasis(this)}).on(`mouseout`,function(){r.get([`iconStatus`,d])!==`emphasis`&&n.leaveEmphasis(this),g.hide()}),(r.get([`iconStatus`,d])===`emphasis`?Zd:Qd)(f),i.add(f),f.on(`click`,I(s.onclick,s,t,n,d)),h[d]=f})}let f=d_(e,n).refContainer,p=e.getBoxLayoutParams(),m=e.get(`padding`),h=c_(p,f,m);i_(e.get(`orient`),i,e.get(`itemGap`),h.width,h.height),f_(i,p,f,m),i.add(uQ(i.getBoundingRect(),e)),o||i.eachChild(function(e){let t=e.__title,r=e.ensureState(`emphasis`),o=r.textConfig||(r.textConfig={}),s=e.getTextContent(),c=s&&s.ensureState(`emphasis`);if(c&&!R(c)&&t){let r=c.style||(c.style={}),s=Ma(t,qu.makeFont(r)),l=e.x+i.x,u=e.y+i.y+a,d=!1;u+s.height>n.getHeight()&&(o.position=`top`,d=!0);let f=d?-5-s.height:a+10;l+s.width/2>n.getWidth()?(o.position=[`100%`,f],r.align=`right`):l-s.width/2<0&&(o.position=[0,f],r.align=`left`)}})}updateView(e,t,n,r){P(this._features,function(e){e&&e instanceof aQ&&e.updateView&&e.updateView(e.model,t,n,r)})}dispose(e,t){P(this._features,function(n){n&&n instanceof aQ&&n.dispose&&n.dispose(e,t)})}};dQ.type=`toolbox`;function fQ(e){return e.indexOf(`my`)===0}function pQ(e){return e instanceof aQ}var mQ=class extends aQ{onclick(e,t){let n=this.model,r=n.get(`name`)||e.get(`title.0.text`)||`SparkNG Charts`,i=t.getZr().painter.getType()===`svg`,a=i?`svg`:n.get(`type`,!0)||`png`,o=t.getConnectedDataURL({type:a,backgroundColor:n.get(`backgroundColor`,!0)||e.get(`backgroundColor`)||Q.color.neutral00,connectedBackgroundColor:n.get(`connectedBackgroundColor`),excludeComponents:n.get(`excludeComponents`),pixelRatio:n.get(`pixelRatio`)}),c=s.browser;if(typeof MouseEvent==`function`&&(c.newEdge||!c.ie&&!c.edge)){let e=document.createElement(`a`);e.download=r+`.`+a,e.target=`_blank`,e.href=o;let t=new MouseEvent(`click`,{view:document.defaultView,bubbles:!0,cancelable:!1});e.dispatchEvent(t)}else if(window.navigator.msSaveOrOpenBlob||i){let e=o.split(`,`),t=e[0].indexOf(`base64`)>-1,n=i?decodeURIComponent(e[1]):e[1];t&&(n=window.atob(n));let s=r+`.`+a;if(window.navigator.msSaveOrOpenBlob){let e=n.length,t=new Uint8Array(e);for(;e--;)t[e]=n.charCodeAt(e);let r=new Blob([t]);window.navigator.msSaveOrOpenBlob(r,s)}else{let e=document.createElement(`iframe`);document.body.appendChild(e);let t=e.contentWindow,r=t.document;r.open(`image/svg+xml`,`replace`),r.write(n),r.close(),t.focus(),r.execCommand(`SaveAs`,!0,s),document.body.removeChild(e)}}else{let e=n.get(`lang`),t=`<body style="margin:0;"><img src="`+o+`" style="max-width:100%;" title="`+(e&&e[0]||``)+`" /></body>`,i=window.open();i.document.write(t),i.document.title=r}}static getDefaultOption(e){return{show:!0,icon:`M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0`,title:e.getLocaleModel().get([`toolbox`,`saveAsImage`,`title`]),type:`png`,connectedBackgroundColor:Q.color.neutral00,name:``,excludeComponents:[`toolbox`],lang:e.getLocaleModel().get([`toolbox`,`saveAsImage`,`lang`])}}};const hQ=`__ec_magicType_stack__`,gQ=[[`line`,`bar`],[`stack`]];var _Q=class extends aQ{getIcons(){let e=this.model,t=e.get(`icon`),n={};return P(e.get(`type`),function(e){t[e]&&(n[e]=t[e])}),n}static getDefaultOption(e){return{show:!0,type:[],icon:{line:`M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4`,bar:`M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7`,stack:`M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z`},title:e.getLocaleModel().get([`toolbox`,`magicType`,`title`]),option:{},seriesIndex:{}}}onclick(e,t,n){let r=this.model,i=r.get([`seriesIndex`,n]);if(!vQ[n])return;let a={series:[]};P(gQ,function(e){N(e,n)>=0&&P(e,function(e){r.setIconStatus(e,`normal`)})}),r.setIconStatus(n,`emphasis`),e.eachComponent({mainType:`series`,query:i==null?null:{seriesIndex:i}},function(e){let t=e.subType,i=e.id,o=vQ[n](t,i,e,r);o&&(M(o,e.option),a.series.push(o));let s=e.coordinateSystem;if(s&&s.type===`cartesian2d`&&(n===`line`||n===`bar`)){let t=s.getAxesByScale(`ordinal`)[0];if(t){let r=t.dim+`Axis`,i=e.getReferringComponents(r,qs).models[0].componentIndex;a[r]=a[r]||[];for(let e=0;e<=i;e++)a[r][i]=a[r][i]||{};a[r][i].boundaryGap=n===`bar`}}});let o,s=n;n===`stack`&&(o=A({stack:r.option.title.tiled,tiled:r.option.title.stack},r.option.title),r.get([`iconStatus`,n])!==`emphasis`&&(s=`tiled`)),t.dispatchAction({type:`changeMagicType`,currentType:s,newOption:a,newTitle:o,featureName:`magicType`})}};const vQ={line:function(e,t,n,r){if(e===`bar`)return A({id:t,type:`line`,data:n.get(`data`),stack:n.get(`stack`),markPoint:n.get(`markPoint`),markLine:n.get(`markLine`)},r.get([`option`,`line`])||{},!0)},bar:function(e,t,n,r){if(e===`line`)return A({id:t,type:`bar`,data:n.get(`data`),stack:n.get(`stack`),markPoint:n.get(`markPoint`),markLine:n.get(`markLine`)},r.get([`option`,`bar`])||{},!0)},stack:function(e,t,n,r){let i=n.get(`stack`)===hQ;if(e===`line`||e===`bar`)return r.setIconStatus(`stack`,i?`normal`:`emphasis`),A({id:t,stack:i?``:hQ},r.get([`option`,`stack`])||{},!0)}};_w({type:`changeMagicType`,event:`magicTypeChanged`,update:`prepareAndUpdate`},function(e,t){t.mergeOption(e.newOption)});const yQ=Array(60).join(`-`);function bQ(e){let t={},n=[],r=[];return e.eachRawSeries(function(e){let i=e.coordinateSystem;if(i&&(i.type===`cartesian2d`||i.type===`polar`)){let a=i.getBaseAxis();if(a.type===`category`){let n=zj(a);t[n]||(t[n]={categoryAxis:a,valueAxis:i.getOtherAxis(a),series:[]},r.push({axisDim:a.dim,axisIndex:a.index})),t[n].series.push(e)}else n.push(e)}else n.push(e)}),{seriesGroupByCategoryAxis:t,other:n,meta:r}}function xQ(e){let t=[];return P(e,function(e,n){let r=e.categoryAxis,i=e.valueAxis.dim,a=[` `].concat(F(e.series,function(e){return e.name})),o=[r.model.getCategories()];P(e.series,function(e){let t=e.getRawData();o.push(e.getRawData().mapArray(t.mapDimension(i),function(e){return e}))});let s=[a.join(` `)];for(let e=0;e<o[0].length;e++){let t=[];for(let n=0;n<o.length;n++)t.push(o[n][e]);s.push(t.join(` `))}t.push(s.join(`
35
+ `))}),t.join(`
36
+
37
+ `+yQ+`
38
+
39
+ `)}function SQ(e){return F(e,function(e){let t=e.getRawData(),n=[e.name],r=[];return t.each(t.dimensions,function(){let e=arguments.length,i=arguments[e-1],a=t.getName(i);for(let t=0;t<e-1;t++)r[t]=arguments[t];n.push((a?a+` `:``)+r.join(` `))}),n.join(`
40
+ `)}).join(`
41
+
42
+ `+yQ+`
43
+
44
+ `)}function CQ(e){let t=bQ(e);return{value:ce([xQ(t.seriesGroupByCategoryAxis),SQ(t.other)],function(e){return!!e.replace(/[\n\t\s]/g,``)}).join(`
45
+
46
+ `+yQ+`
47
+
48
+ `),meta:t.meta}}function wQ(e){return e.replace(/^\s\s*/,``).replace(/\s\s*$/,``)}function TQ(e){if(e.slice(0,e.indexOf(`
49
+ `)).indexOf(` `)>=0)return!0}const EQ=/* @__PURE__ */ RegExp(`[ ]+`,`g`);function DQ(e){let t=e.split(/\n+/g),n=wQ(t.shift()).split(EQ),r=[],i=F(n,function(e){return{name:e,data:[]}});for(let e=0;e<t.length;e++){let n=wQ(t[e]).split(EQ);r.push(n.shift());for(let t=0;t<n.length;t++)i[t]&&(i[t].data[e]=n[t])}return{series:i,categories:r}}function OQ(e){let t=e.split(/\n+/g),n=wQ(t.shift()),r=[];for(let e=0;e<t.length;e++){let n=wQ(t[e]);if(!n)continue;let i=n.split(EQ),a=``,o,s=!1;isNaN(i[0])?(s=!0,a=i[0],i=i.slice(1),r[e]={name:a,value:[]},o=r[e].value):o=r[e]=[];for(let e=0;e<i.length;e++)o.push(+i[e]);o.length===1&&(s?r[e].value=o[0]:r[e]=o[0])}return{name:n,data:r}}function kQ(e,t){let n=e.split(RegExp(`
50
+ *`+yQ+`
51
+ *`,`g`)),r={series:[]};return P(n,function(e,n){if(TQ(e)){let i=DQ(e),a=t[n],o=a.axisDim+`Axis`;a&&(r[o]=r[o]||[],r[o][a.axisIndex]={data:i.categories},r.series=r.series.concat(i.series))}else{let t=OQ(e);r.series.push(t)}}),r}var AQ=class extends aQ{onclick(e,t){setTimeout(()=>{t.dispatchAction({type:`hideTip`})});let n=t.getDom(),r=this.model;this._dom&&n.removeChild(this._dom);let i=document.createElement(`div`);i.style.cssText=`position:absolute;top:0;bottom:0;left:0;right:0;padding:5px`,i.style.backgroundColor=r.get(`backgroundColor`)||Q.color.neutral00;let a=document.createElement(`h4`),o=r.get(`lang`)||[];a.innerHTML=o[0]||r.get(`title`),a.style.cssText=`margin:10px 20px`,a.style.color=r.get(`textColor`);let s=document.createElement(`div`),c=document.createElement(`textarea`);s.style.cssText=`overflow:auto`;let l=r.get(`optionToContent`),u=r.get(`contentToOption`),d=CQ(e);if(R(l)){let e=l(t.getOption());z(e)?s.innerHTML=e:_e(e)&&s.appendChild(e)}else{c.readOnly=r.get(`readOnly`);let e=c.style;e.cssText=`display:block;width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;resize:none;box-sizing:border-box;outline:none`,e.color=r.get(`textColor`),e.borderColor=r.get(`textareaBorderColor`),e.backgroundColor=r.get(`textareaColor`),c.value=d.value,s.appendChild(c)}let f=d.meta,p=document.createElement(`div`);p.style.cssText=`position:absolute;bottom:5px;left:0;right:0`;let m=`float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px`,h=document.createElement(`div`),g=document.createElement(`div`);m+=`;background-color:`+r.get(`buttonColor`),m+=`;color:`+r.get(`buttonTextColor`);let _=this;function v(){n.removeChild(i),_._dom=null}Lt(h,`click`,v),Lt(g,`click`,function(){if(u==null&&l!=null||u!=null&&l==null){typeof process<`u`&&process.env.NODE_ENV!==`production`&&ds("It seems you have just provided one of `contentToOption` and `optionToContent` functions but missed the other one. Data change is ignored."),v();return}let e;try{e=R(u)?u(s,t.getOption()):kQ(c.value,f)}catch(e){throw v(),Error(`Data view format error `+e)}e&&t.dispatchAction({type:`changeDataView`,newOption:e}),v()}),h.innerHTML=o[1],g.innerHTML=o[2],g.style.cssText=h.style.cssText=m,!r.get(`readOnly`)&&p.appendChild(g),p.appendChild(h),i.appendChild(a),i.appendChild(s),i.appendChild(p),s.style.height=n.clientHeight-80+`px`,n.appendChild(i),this._dom=i}dispose(e,t){this._dom&&t.getDom().removeChild(this._dom)}static getDefaultOption(e){return{show:!0,readOnly:!1,optionToContent:null,contentToOption:null,icon:`M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28`,title:e.getLocaleModel().get([`toolbox`,`dataView`,`title`]),lang:e.getLocaleModel().get([`toolbox`,`dataView`,`lang`]),backgroundColor:Q.color.background,textColor:Q.color.primary,textareaColor:Q.color.background,textareaBorderColor:Q.color.border,buttonColor:Q.color.accent50,buttonTextColor:Q.color.neutral00}}};function jQ(e,t){return F(e,function(e,n){let r=t&&t[n];if(B(r)&&!L(r)){(!B(e)||L(e))&&(e={value:e});let t=r.name!=null&&e.name==null;return e=M(e,r),t&&delete e.name,e}return e})}_w({type:`changeDataView`,event:`dataViewChanged`,update:`prepareAndUpdate`},function(e,t){let n=[];P(e.newOption.series,function(e){let r=t.getSeriesByName(e.name)[0];if(!r)n.push(j({type:`scatter`},e));else{let t=r.get(`data`);n.push({name:e.name,data:jQ(e.data,t)})}}),t.mergeOption(M({series:n},e.newOption))});const MQ=P,NQ=Y();function PQ(e,t){let n=RQ(e);MQ(t,function(t,r){let i=n.length-1;for(;i>=0&&!n[i][r];i--);if(i<0){let t=e.queryComponents({mainType:`dataZoom`,subType:`select`,id:r})[0];if(t){let e=t.getPercentRange();n[0][r]={dataZoomId:r,start:e[0],end:e[1]}}}}),n.push(t)}function FQ(e){let t=RQ(e),n=t[t.length-1];t.length>1&&t.pop();let r={};return MQ(n,function(e,n){for(let i=t.length-1;i>=0;i--)if(e=t[i][n],e){r[n]=e;break}}),r}function IQ(e){NQ(e).snapshots=null}function LQ(e){return RQ(e).length}function RQ(e){let t=NQ(e);return t.snapshots||(t.snapshots=[{}]),t.snapshots}var zQ=class extends aQ{onclick(e,t){IQ(e),t.dispatchAction({type:`restore`,from:this.uid})}static getDefaultOption(e){return{show:!0,icon:`M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5`,title:e.getLocaleModel().get([`toolbox`,`restore`,`title`])}}};_w({type:`restore`,event:`restore`,update:`prepareAndUpdate`},function(e,t){t.resetOption(`recreate`)});const BQ=[`grid`,`xAxis`,`yAxis`,`geo`,`graph`,`polar`,`radiusAxis`,`angleAxis`,`bmap`];var VQ=class{constructor(e,t,n){this._targetInfoList=[];let r=UQ(t,e);P(WQ,(e,t)=>{(!n||!n.include||N(n.include,t)>=0)&&e(r,this._targetInfoList)})}setOutputRanges(e,t){return this.matchOutputRanges(e,t,function(e,t,n){if((e.coordRanges||(e.coordRanges=[])).push(t),!e.coordRange){e.coordRange=t;let r=qQ[e.brushType](0,n,t);e.__rangeOffset={offset:YQ[e.brushType](r.values,e.range,[1,1]),xyMinMax:r.xyMinMax}}}),e}matchOutputRanges(e,t,n){P(e,function(e){let r=this.findTargetInfo(e,t);r&&r!==!0&&P(r.coordSyses,function(r){n(e,qQ[e.brushType](1,r,e.range,!0).values,r,t)})},this)}setInputRanges(e,t){P(e,function(e){let n=this.findTargetInfo(e,t);if(typeof process<`u`&&process.env.NODE_ENV!==`production`&&(H(!n||n===!0||e.coordRange,`coordRange must be specified when coord index specified.`),H(!n||n!==!0||e.range,`range must be specified in global brush.`)),e.range=e.range||[],n&&n!==!0){e.panelId=n.panelId;let t=qQ[e.brushType](0,n.coordSys,e.coordRange),r=e.__rangeOffset;e.range=r?YQ[e.brushType](t.values,r.offset,ZQ(t.xyMinMax,r.xyMinMax)):t.values}},this)}makePanelOpts(e,t){return F(this._targetInfoList,function(n){let r=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:t?t(n):null,clipPath:vU(r),isTargetByCursor:bU(r,e,n.coordSysModel),getLinearBrushOtherExtent:yU(r)}})}controlSeries(e,t,n){let r=this.findTargetInfo(e,n);return r===!0||r&&N(r.coordSyses,t.coordinateSystem)>=0}findTargetInfo(e,t){let n=this._targetInfoList,r=UQ(t,e);for(let t=0;t<n.length;t++){let i=n[t],a=e.panelId;if(a){if(i.panelId===a)return i}else for(let e=0;e<GQ.length;e++)if(GQ[e](r,i))return i}return!0}};function HQ(e){return e[0]>e[1]&&e.reverse(),e}function UQ(e,t){return Gs(e,t,{includeMainTypes:BQ})}const WQ={grid:function(e,t){let n=e.xAxisModels,r=e.yAxisModels,i=e.gridModels,a=U(),o={},s={};(n||r||i)&&(P(n,function(e){let t=e.axis.grid.model;a.set(t.id,t),o[t.id]=!0}),P(r,function(e){let t=e.axis.grid.model;a.set(t.id,t),s[t.id]=!0}),P(i,function(e){a.set(e.id,e),o[e.id]=!0,s[e.id]=!0}),a.each(function(e){let i=e.coordinateSystem,a=[];P(i.getCartesians(),function(e,t){(N(n,e.getAxis(`x`).model)>=0||N(r,e.getAxis(`y`).model)>=0)&&a.push(e)}),t.push({panelId:`grid--`+e.id,gridModel:e,coordSysModel:e,coordSys:a[0],coordSyses:a,getPanelRect:KQ.grid,xAxisDeclared:o[e.id],yAxisDeclared:s[e.id]})}))},geo:function(e,t){P(e.geoModels,function(e){let n=e.coordinateSystem;t.push({panelId:`geo--`+e.id,geoModel:e,coordSysModel:e,coordSys:n,coordSyses:[n],getPanelRect:KQ.geo})})}},GQ=[function(e,t){let n=e.xAxisModel,r=e.yAxisModel,i=e.gridModel;return!i&&n&&(i=n.axis.grid.model),!i&&r&&(i=r.axis.grid.model),i&&i===t.gridModel},function(e,t){let n=e.geoModel;return n&&n===t.geoModel}],KQ={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){let e=this.coordSys.view,t=cI(null,e);return yn(t,t,oI(null,e)),t}},qQ={lineX:fe(JQ,0),lineY:fe(JQ,1),rect:function(e,t,n,r){let i=e?t.pointToData([n[0][0],n[1][0]],r):t.dataToPoint([n[0][0],n[1][0]],r),a=e?t.pointToData([n[0][1],n[1][1]],r):t.dataToPoint([n[0][1],n[1][1]],r),o=[HQ([i[0],a[0]]),HQ([i[1],a[1]])];return{values:o,xyMinMax:o}},polygon:function(e,t,n,r){let i=[ic(),ic()];return{values:F(n,function(n){let a=e?t.pointToData(n,r):t.dataToPoint(n,r);return i[0][0]=Math.min(i[0][0],a[0]),i[1][0]=Math.min(i[1][0],a[1]),i[0][1]=Math.max(i[0][1],a[0]),i[1][1]=Math.max(i[1][1],a[1]),a}),xyMinMax:i}}};function JQ(e,t,n,r){typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(n.type===`cartesian2d`,`lineX/lineY brush is available only in cartesian2d.`);let i=n.getAxis([`x`,`y`][e]),a=HQ(F([0,1],function(e){return t?i.coordToData(i.toLocalCoord(r[e]),!0):i.toGlobalCoord(i.dataToCoord(r[e]))})),o=[];return o[e]=a,o[1-e]=[NaN,NaN],{values:a,xyMinMax:o}}const YQ={lineX:fe(XQ,0),lineY:fe(XQ,1),rect:function(e,t,n){return[[e[0][0]-n[0]*t[0][0],e[0][1]-n[0]*t[0][1]],[e[1][0]-n[1]*t[1][0],e[1][1]-n[1]*t[1][1]]]},polygon:function(e,t,n){return F(e,function(e,r){return[e[0]-n[0]*t[r][0],e[1]-n[1]*t[r][1]]})}};function XQ(e,t,n,r){return[t[0]-r[e]*n[0],t[1]-r[e]*n[1]]}function ZQ(e,t){let n=QQ(e),r=QQ(t),i=[n[0]/r[0],n[1]/r[1]];return isNaN(i[0])&&(i[0]=1),isNaN(i[1])&&(i[1]=1),i}function QQ(e){return e?[e[0][1]-e[0][0],e[1][1]-e[1][0]]:[NaN,NaN]}const $Q=P,e$=zs(`toolbox-dataZoom_`),t$={x:`width`,y:`height`};var n$=class extends aQ{render(e,t,n,r){this._brushController||(this._brushController=new FH(n.getZr()),this._brushController.on(`brush`,I(this._onBrush,this)).mount()),o$(e,t,this,r,n),a$(e,t)}onclick(e,t,n){r$[n].call(this)}dispose(e,t){this._brushController&&this._brushController.dispose()}_onBrush(e){let t=e.areas;if(!e.isEnd||!t.length)return;let n={},r=this.ecModel;this._brushController.updateCovers([]),new VQ(i$(this.model),r,{include:[`grid`]}).matchOutputRanges(t,r,function(e,t,n){if(n.type!==`cartesian2d`)return;let r=n.master.getRect().clone(),a=e.brushType;a===`rect`?(i(`x`,n,r,t[0]),i(`y`,n,r,t[1])):i({lineX:`x`,lineY:`y`}[a],n,r,t)}),PQ(r,n),this._dispatchZoomAction(n);function i(e,t,i,o){let s=t.getAxis(e),c=s.model,l=a(e,c,r),u=l.findRepresentativeAxisProxy(c).getMinMaxSpan(),d=s.scale.getExtent();(u.minValueSpan!=null||u.maxValueSpan!=null)&&(o=_H(0,o.slice(),d,0,u.minValueSpan,u.maxValueSpan));let f=Vo(d,i[t$[e]],.5);l&&(n[l.id]={dataZoomId:l.id,startValue:isFinite(f)?Fo(o[0],f):o[0],endValue:isFinite(f)?Fo(o[1],f):o[1]})}function a(e,t,n){let r;return n.eachComponent({mainType:`dataZoom`,subType:`select`},function(n){n.getAxisModel(e,t.componentIndex)&&(r=n)}),r}}_dispatchZoomAction(e){let t=[];$Q(e,function(e,n){t.push(k(e))}),t.length&&this.api.dispatchAction({type:`dataZoom`,from:this.uid,batch:t})}static getDefaultOption(e){return{show:!0,filterMode:`filter`,icon:{zoom:`M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1`,back:`M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26`},title:e.getLocaleModel().get([`toolbox`,`dataZoom`,`title`]),brushStyle:{borderWidth:0,color:Q.color.backgroundTint}}}};const r$={zoom:function(){let e=!this._isZoomActive;this.api.dispatchAction({type:`takeGlobalCursor`,key:`dataZoomSelect`,dataZoomSelectActive:e})},back:function(){this._dispatchZoomAction(FQ(this.ecModel))}};function i$(e){let t={xAxisIndex:e.get(`xAxisIndex`,!0),yAxisIndex:e.get(`yAxisIndex`,!0),xAxisId:e.get(`xAxisId`,!0),yAxisId:e.get(`yAxisId`,!0)};return t.xAxisIndex==null&&t.xAxisId==null&&(t.xAxisIndex=`all`),t.yAxisIndex==null&&t.yAxisId==null&&(t.yAxisIndex=`all`),t}function a$(e,t){e.setIconStatus(`back`,LQ(t)>1?`emphasis`:`normal`)}function o$(e,t,n,r,i){let a=n._isZoomActive;r&&r.type===`takeGlobalCursor`&&(a=r.key===`dataZoomSelect`&&r.dataZoomSelectActive),n._isZoomActive=a,e.setIconStatus(`zoom`,a?`emphasis`:`normal`);let o=new VQ(i$(e),t,{include:[`grid`]}).makePanelOpts(i,function(e){return e.xAxisDeclared&&!e.yAxisDeclared?`lineX`:!e.xAxisDeclared&&e.yAxisDeclared?`lineY`:`rect`});n._brushController.setPanels(o).enableBrush(a&&o.length?{brushType:`auto`,brushStyle:e.getModel(`brushStyle`).getItemStyle()}:!1)}R_(`dataZoom`,function(e){let t=e.getComponent(`toolbox`,0),n=[`feature`,`dataZoom`];if(!t||t.get(n)==null)return;let r=t.getModel(n),i=[],a=Gs(e,i$(r));$Q(a.xAxisModels,e=>o(e,`xAxis`,`xAxisIndex`)),$Q(a.yAxisModels,e=>o(e,`yAxis`,`yAxisIndex`));function o(e,t,n){let a=e.componentIndex,o={type:`select`,$fromToolbox:!0,filterMode:r.get(`filterMode`,!0)||`filter`,id:e$+t+a};o[n]=a,i.push(o)}return i});function s$(e){e.registerComponentModel(lQ),e.registerComponentView(dQ),sQ(`saveAsImage`,mQ),sQ(`magicType`,_Q),sQ(`dataView`,AQ),sQ(`dataZoom`,n$),sQ(`restore`,zQ),BD(iQ)}var c$=class e extends b_{constructor(...t){super(...t),this.type=e.type}};c$.type=`tooltip`,c$.dependencies=[`axisPointer`],c$.defaultOption={z:60,show:!0,showContent:!0,trigger:`item`,triggerOn:`mousemove|click|mousewheel`,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}};function l$(e){let t=e.get(`confine`);return t==null?e.get(`renderMode`)===`richText`:!!t}function u$(e){if(!s.domSupported)return;let t=document.documentElement.style;for(let n=0,r=e.length;n<r;n++)if(e[n]in t)return e[n]}const d$=u$([`transform`,`webkitTransform`,`OTransform`,`MozTransform`,`msTransform`]),f$=u$([`webkitTransition`,`transition`,`OTransition`,`MozTransition`,`msTransition`]);function p$(e,t){if(!e)return t;t=Mg(t,!0);let n=e.indexOf(t);return e=n===-1?t:`-${e.slice(0,n)}-${t}`,e.toLowerCase()}function m$(e,t){let n=e.currentStyle||document.defaultView&&document.defaultView.getComputedStyle(e);return n?t?n[t]:n:null}const h$=p$(f$,`transition`),g$=p$(d$,`transform`),_$=`position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;${s.transform3dSupported?`will-change:transform;`:``}`;function v$(e){return e=e===`left`?`right`:e===`right`?`left`:e===`top`?`bottom`:`top`,e}function y$(e,t,n){if(!z(n)||n===`inside`)return``;let r=e.get(`backgroundColor`),i=e.get(`borderWidth`);t=Hg(t);let a=v$(n),o=Math.max(Math.round(i)*1.5,6),s=``,c=g$+`:`,l;N([`left`,`right`],a)>-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)`);let 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`;let m=`${t} solid ${i}px;`;return`<div style="${[`position:absolute;width:${o}px;height:${o}px;z-index:-1;`,`${s};${c};`,`border-bottom:${m}`,`border-right:${m}`,`background-color:${r};`].join(``)}"></div>`}function b$(e,t,n){let r=`cubic-bezier(0.23,1,0.32,1)`,i=``,a=``;return n&&(i=` ${e/2}s ${r}`,a=`opacity${i},visibility${i}`),t||(i=` ${e}s ${r}`,a+=(a.length?`,`:``)+(s.transformSupported?`${g$}${i}`:`,left${i},top${i}`)),h$+`:`+a}function x$(e,t,n){let r=e.toFixed(0)+`px`,i=t.toFixed(0)+`px`;if(!s.transformSupported)return n?`top:${i};left:${r};`:[[`top`,i],[`left`,r]];let a=s.transform3dSupported,o=`translate${a?`3d`:``}(${r},${i}${a?`,0`:``})`;return n?`top:0;left:0;`+g$+`:`+o+`;`:[[`top`,0],[`left`,0],[d$,o]]}function S$(e){let t=[],n=e.get(`fontSize`),r=e.getTextColor();r&&t.push(`color:`+r),t.push(`font:`+e.getFont());let i=V(e.get(`lineHeight`),Math.round(n*3/2));n&&t.push(`line-height:`+i+`px`);let 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),P([`decoration`,`align`],function(n){let r=e.get(n);r&&t.push(`text-`+n+`:`+r)}),t.join(`;`)}function C$(e,t,n,r){let 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=yb(e,`html`),p=`${l}px ${u}px ${s}px ${c}`;return i.push(`box-shadow:`+p),t&&a>0&&i.push(b$(a,n,r)),o&&i.push(`background-color:`+o),P([`width`,`color`,`radius`],function(t){let n=`border-`+t,r=Mg(n),a=e.get(r);a!=null&&i.push(n+`:`+a+(t===`color`?``:`px`))}),i.push(S$(d)),f!=null&&i.push(`padding:`+Ng(f).join(`px `)+`px`),i.join(`;`)+`;`}function w$(e,t,n,r,i){let a=t&&t.painter;if(n){let t=a&&a.getViewportRoot();t&&bt(e,t,n,r,i)}else{e[0]=r,e[1]=i;let t=a&&a.getViewportRootOffset();t&&(e[0]+=t.offsetLeft,e[1]+=t.offsetTop)}e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var T$=class{constructor(e,t){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,s.wxa)return null;let n=document.createElement(`div`);n.domBelongToZr=!0,this.el=n;let r=this._zr=e.getZr(),i=t.appendTo,a=i&&(z(i)?document.querySelector(i):_e(i)?i:R(i)&&i(e.getDom()));w$(this._styleCoord,r,a,e.getWidth()/2,e.getHeight()/2),(a||e.getDom()).appendChild(n),this._api=e,this._container=a;let o=this;n.onmouseenter=function(){o._enterable&&(clearTimeout(o._hideTimeout),o._show=!0),o._inContent=!0},n.onmousemove=function(e){if(e=e||window.event,!o._enterable){let t=r.handler;Ft(r.painter.getViewportRoot(),e,!0),t.dispatch(`mousemove`,e)}},n.onmouseleave=function(){o._inContent=!1,o._enterable&&o._show&&o.hideLater(o._hideDelay)}}update(e){if(!this._container){let e=this._api.getDom(),t=m$(e,`position`),n=e.style;n.position!==`absolute`&&t!==`absolute`&&(n.position=`relative`)}let t=e.get(`alwaysShowContent`);t&&this._moveIfResized(),this._alwaysShowContent=t,this._enableDisplayTransition=e.get(`displayTransition`)&&e.get(`transitionDuration`)>0,this.el.className=e.get(`className`)||``}show(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);let n=this.el,r=n.style,i=this._styleCoord;n.innerHTML?r.cssText=_$+C$(e,!this._firstShow,this._longHide,this._enableDisplayTransition)+x$(i[0],i[1],!0)+`border-color:${Hg(t)};`+(e.get(`extraCssText`)||``)+`;pointer-events:${this._enterable?`auto`:`none`}`:r.display=`none`,this._show=!0,this._firstShow=!1,this._longHide=!1}setContent(e,t,n,r,i){let a=this.el;if(e==null){a.innerHTML=``;return}let o=``;if(z(i)&&n.get(`trigger`)===`item`&&!l$(n)&&(o=y$(n,r,i)),z(e))a.innerHTML=e+o;else if(e){a.innerHTML=``,L(e)||(e=[e]);for(let t=0;t<e.length;t++)_e(e[t])&&e[t].parentNode!==a&&a.appendChild(e[t]);if(o&&a.childNodes.length){let e=document.createElement(`div`);e.innerHTML=o,a.appendChild(e)}}}setEnterable(e){this._enterable=e}getSize(){let e=this.el;return e?[e.offsetWidth,e.offsetHeight]:[0,0]}moveTo(e,t){if(!this.el)return;let n=this._styleCoord;if(w$(n,this._zr,this._container,e,t),n[0]!=null&&n[1]!=null){let e=this.el.style;P(x$(n[0],n[1]),t=>{e[t[0]]=t[1]})}}_moveIfResized(){let e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())}hide(){let e=this.el.style;this._enableDisplayTransition?(e.visibility=`hidden`,e.opacity=`0`):e.display=`none`,s.transform3dSupported&&(e.willChange=``),this._show=!1,this._longHideTimeout=setTimeout(()=>this._longHide=!0,500)}hideLater(e){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(I(this.hide,this),e)):this.hide())}isShow(){return this._show}dispose(){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);let e=this._zr;xt(e&&e.painter&&e.painter.getViewportRoot(),this._container);let t=this.el;if(t){t.onmouseenter=t.onmousemove=t.onmouseleave=null;let e=t.parentNode;e&&e.removeChild(t)}this.el=this._container=null}},E$=class{constructor(e){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=e.getZr(),k$(this._styleCoord,this._zr,e.getWidth()/2,e.getHeight()/2)}update(e){let t=e.get(`alwaysShowContent`);t&&this._moveIfResized(),this._alwaysShowContent=t}show(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0}setContent(e,t,n,r,i){B(e)&&gs(typeof process<`u`&&process.env.NODE_ENV!==`production`?`Passing DOM nodes as content is not supported in richText tooltip!`:``),this.el&&this._zr.remove(this.el);let a=n.getModel(`textStyle`);this.el=new qu({style:{rich:t.richTextStyles,text:e,lineHeight:22,borderWidth:1,borderColor:r,textShadowColor:a.get(`textShadowColor`),fill:n.get([`textStyle`,`color`]),padding:yb(n,`richText`),verticalAlign:`top`,align:`left`},z:n.get(`z`)}),P([`backgroundColor`,`borderRadius`,`shadowColor`,`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`],e=>{this.el.style[e]=n.get(e)}),P([`textShadowBlur`,`textShadowOffsetX`,`textShadowOffsetY`],e=>{this.el.style[e]=a.get(e)||0}),this._zr.add(this.el);let o=this;this.el.on(`mouseover`,function(){o._enterable&&(clearTimeout(o._hideTimeout),o._show=!0),o._inContent=!0}),this.el.on(`mouseout`,function(){o._enterable&&o._show&&o.hideLater(o._hideDelay),o._inContent=!1})}setEnterable(e){this._enterable=e}getSize(){let e=this.el,t=this.el.getBoundingRect(),n=O$(e.style);return[t.width+n.left+n.right,t.height+n.top+n.bottom]}moveTo(e,t){let n=this.el;if(n){let r=this._styleCoord;k$(r,this._zr,e,t),e=r[0],t=r[1];let i=n.style,a=D$(i.borderWidth||0),o=O$(i);n.x=e+a+o.left,n.y=t+a+o.top,n.markRedraw()}}_moveIfResized(){let e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())}hide(){this.el&&this.el.hide(),this._show=!1}hideLater(e){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(I(this.hide,this),e)):this.hide())}isShow(){return this._show}dispose(){this._zr.remove(this.el)}};function D$(e){return Math.max(0,e)}function O$(e){let t=D$(e.shadowBlur||0),n=D$(e.shadowOffsetX||0),r=D$(e.shadowOffsetY||0);return{left:D$(t-n),right:D$(t+n),top:D$(t-r),bottom:D$(t+r)}}function k$(e,t,n,r){e[0]=n,e[1]=r,e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}const A$=new Uu({shape:{x:-1,y:-1,width:2,height:2}});var j$=class e extends Ib{constructor(...t){super(...t),this.type=e.type}init(e,t){if(s.node||!t.getDom())return;let n=e.getComponent(`tooltip`),r=this._renderMode=$s(n.get(`renderMode`));this._tooltipContent=r===`richText`?new E$(t):new T$(t,{appendTo:n.get(`appendToBody`,!0)?`body`:n.get(`appendTo`,!0)})}render(e,t,n){if(s.node||!n.getDom())return;this.group.removeAll(),this._tooltipModel=e,this._ecModel=t,this._api=n;let r=this._tooltipContent;r.update(e),r.setEnterable(e.get(`enterable`)),this._initGlobalListener(),this._keepShow(),this._renderMode!==`richText`&&e.get(`transitionDuration`)?Zb(this,`_updatePosition`,50,`fixRate`):Qb(this,`_updatePosition`)}_initGlobalListener(){let e=this._tooltipModel.get(`triggerOn`);AJ(`itemTooltip`,this._api,I(function(t,n,r){e!==`none`&&(e.indexOf(t)>=0?this._tryShow(n,r):t===`leave`&&this._hide(r))},this))}_keepShow(){let e=this._tooltipModel,t=this._ecModel,n=this._api,r=e.get(`triggerOn`);if(e.get(`trigger`)!==`axis`&&(this._lastDataByCoordSys=null,this._cbParamsList=null),this._lastX!=null&&this._lastY!=null&&r!==`none`&&r!==`click`){let r=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!n.isDisposed()&&r.manuallyShowTip(e,t,n,{x:r._lastX,y:r._lastY,dataByCoordSys:r._lastDataByCoordSys})})}}manuallyShowTip(e,t,n,r){if(r.from===this.uid||s.node||!n.getDom())return;let i=N$(r,n);this._ticket=``;let a=r.dataByCoordSys,o=R$(r,t,n);if(o){let e=o.el.getBoundingRect().clone();e.applyTransform(o.el.transform),this._tryShow({offsetX:e.x+e.width/2,offsetY:e.y+e.height/2,target:o.el,position:r.position,positionDefault:`bottom`},i)}else if(r.tooltip&&r.x!=null&&r.y!=null){let e=A$;e.x=r.x,e.y=r.y,e.update(),X(e).tooltipConfig={name:null,option:r.tooltip},this._tryShow({offsetX:r.x,offsetY:r.y,target:e},i)}else if(a)this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,dataByCoordSys:a,tooltipOption:r.tooltipOption},i);else if(r.seriesIndex!=null){if(this._manuallyAxisShowTip(e,t,n,r))return;let a=RJ(r,t),o=a.point[0],s=a.point[1];o!=null&&s!=null&&this._tryShow({offsetX:o,offsetY:s,target:a.el,position:r.position,positionDefault:`bottom`},i)}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},i))}manuallyHideTip(e,t,n,r){let i=this._tooltipContent;this._tooltipModel&&i.hideLater(this._tooltipModel.get(`hideDelay`)),this._lastX=this._lastY=this._lastDataByCoordSys=null,this._cbParamsList=null,r.from!==this.uid&&this._hide(N$(r,n))}_manuallyAxisShowTip(e,t,n,r){let i=r.seriesIndex,a=r.dataIndex,o=t.getComponent(`axisPointer`).coordSysAxesInfo;if(i==null||a==null||o==null)return;let s=t.getSeriesByIndex(i);if(s&&M$([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}_tryShow(e,t){let n=e.target;if(!this._tooltipModel)return;this._lastX=e.offsetX,this._lastY=e.offsetY;let r=e.dataByCoordSys;if(r&&r.length)this._showAxisTooltip(r,e);else if(n){if(X(n).ssrType===`legend`)return;this._lastDataByCoordSys=null,this._cbParamsList=null;let r,i;Vx(n,function(e){if(e.tooltipDisabled)return r=i=null,!0;r||i||(X(e).dataIndex==null?X(e).tooltipConfig!=null&&(i=e):r=e)},!0),r?this._showSeriesItemTooltip(e,r,t):i?this._showComponentItemTooltip(e,i,t):this._hide(t)}else this._lastDataByCoordSys=null,this._cbParamsList=null,this._hide(t)}_showOrMove(e,t){let n=e.get(`showDelay`);t=I(t,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(t,n):t()}_showAxisTooltip(e,t){let n=this._ecModel,r=this._tooltipModel,i=[t.offsetX,t.offsetY],a=M$([t.tooltipOption],r),o=this._renderMode,s=[],c=ab(`section`,{blocks:[],noHeader:!0}),l=[],u=new bb;P(e,function(e){P(e.dataByAxis,function(e){let t=n.getComponent(e.axisDim+`Axis`,e.axisIndex),i=e.value,a=t.axis,d=a.scale.parse(i);if(!t||i==null)return;let f=hJ(i,a,n,e.seriesDataIndices,e.valueLabelOpt),p=ab(`section`,{header:f,noHeader:!Ee(f),sortBlocks:!0,blocks:[]});c.blocks.push(p),P(e.seriesDataIndices,function(i){let a=n.getSeriesByIndex(i.seriesIndex),c=i.dataIndexInside,m=a.getDataParams(c);if(m.dataIndex<0)return;m.axisDim=e.axisDim,m.axisIndex=e.axisIndex,m.axisType=e.axisType,m.axisId=e.axisId,m.axisValue=DE(t.axis,{value:d}),m.axisValueLabel=f,m.marker=u.makeTooltipMarker(`item`,Hg(m.color),o);let h=gy(a.formatTooltip(c,!0,null)),g=h.frag;if(g){let e=M$([a],r).get(`valueFormatter`);p.blocks.push(e?j({valueFormatter:e},g):g)}h.text&&l.push(h.text),s.push(m)})})}),c.blocks.reverse(),l.reverse();let d=t.position,f=db(c,u,o,a.get(`order`),n.get(`useUTC`),a.get(`textStyle`));f&&l.unshift(f);let p=o===`richText`?`
52
+
53
+ `:`<br/>`,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)})}_showSeriesItemTooltip(e,t,n){let r=this._ecModel,i=X(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=M$([u.getItemModel(c),s,o&&(o.coordinateSystem||{}).model],this._tooltipModel,f?{position:f}:null),m=p.get(`trigger`);if(m!=null&&m!==`item`)return;let h=s.getDataParams(c,l),g=new bb;h.marker=g.makeTooltipMarker(`item`,Hg(h.color),d);let _=gy(s.formatTooltip(c,!1,l)),v=p.get(`order`),y=p.get(`valueFormatter`),b=_.frag,x=b?db(y?j({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})}_showComponentItemTooltip(e,t,n){let r=this._renderMode===`html`,i=X(t),a=i.tooltipConfig.option||{},o=a.encodeHTMLContent;if(z(a)){let e=a;a={content:e,formatter:e},o=!0}o&&r&&a.content&&(a=k(a),a.content=Ot(a.content));let s=[a],c=this._ecModel.getComponent(i.componentMainType,i.componentIndex);c&&s.push(c),s.push({formatter:a.content});let l=e.positionDefault,u=M$(s,this._tooltipModel,l?{position:l}:null),d=u.get(`content`),f=Math.random()+``,p=new bb;this._showOrMove(u,function(){let n=k(u.get(`formatterParams`)||{});this._showTooltipContent(u,d,n,f,e.offsetX,e.offsetY,e.position,t,p)}),n({type:`showTip`,from:this.uid})}_showTooltipContent(e,t,n,r,i,a,o,s,c){if(this._ticket=``,!e.get(`showContent`)||!e.get(`show`))return;let l=this._tooltipContent;l.setEnterable(e.get(`enterable`));let u=e.get(`formatter`);o=o||e.get(`position`);let d=t,f=this._getNearestPoint([i,a],n,e.get(`trigger`),e.get(`borderColor`),e.get(`defaultBorderColor`,!0)).color;if(u){if(z(u)){let t=e.ecModel.get(`useUTC`),r=L(n)?n[0]:n,i=r&&r.axisType&&r.axisType.indexOf(`time`)>=0;d=u,i&&(d=fg(r.axisValue,d,t)),d=Lg(d,n,!0)}else if(R(u)){let t=I(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,t)}else d=u}l.setContent(d,c,e,f,o),l.show(e,f),this._updatePosition(e,o,i,a,l,n,s)}_getNearestPoint(e,t,n,r,i){if(n===`axis`||L(t))return{color:r||i};if(!L(t))return{color:r||t.color||t.borderColor}}_updatePosition(e,t,n,r,i,a,o){let s=this._api.getWidth(),c=this._api.getHeight();t=t||e.get(`position`);let l=i.getSize(),u=e.get(`align`),d=e.get(`verticalAlign`),f=o&&o.getBoundingRect().clone();if(o&&f.applyTransform(o.transform),R(t)&&(t=t([n,r],a,i.el,f,{viewSize:[s,c],contentSize:l.slice()})),L(t))n=J(t[0],s),r=J(t[1],c);else if(B(t)){let e=t;e.width=l[0],e.height=l[1];let i=c_(e,{width:s,height:c});n=i.x,r=i.y,u=null,d=null}else if(z(t)&&o){let i=I$(t,f,l,e.get(`borderWidth`));n=i[0],r=i[1]}else{let e=P$(n,r,i,s,c,u?null:20,d?null:20);n=e[0],r=e[1]}if(u&&(n-=L$(u)?l[0]/2:u===`right`?l[0]:0),d&&(r-=L$(d)?l[1]/2:d===`bottom`?l[1]:0),l$(e)){let e=F$(n,r,i,s,c);n=e[0],r=e[1]}i.moveTo(n,r)}_updateContentNotChangedOnAxis(e,t){let n=this._lastDataByCoordSys,r=this._cbParamsList,i=!!n&&n.length===e.length;return i&&P(n,(n,a)=>{let o=n.dataByAxis||[],s=(e[a]||{}).dataByAxis||[];i=i&&o.length===s.length,i&&P(o,(e,n)=>{let 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&&P(o,(e,t)=>{let n=c[t];i=i&&e.seriesIndex===n.seriesIndex&&e.dataIndex===n.dataIndex}),r&&P(e.seriesDataIndices,e=>{let n=e.seriesIndex,a=t[n],o=r[n];a&&o&&o.data!==a.data&&(i=!1)})})}),this._lastDataByCoordSys=e,this._cbParamsList=t,!!i}_hide(e){this._lastDataByCoordSys=null,this._cbParamsList=null,e({type:`hideTip`,from:this.uid})}dispose(e,t){!s.node&&t.getDom()&&(Qb(this,`_updatePosition`),this._tooltipContent.dispose(),IJ(`itemTooltip`,t),this._tooltipContent=null,this._tooltipModel=null,this._lastDataByCoordSys=null,this._cbParamsList=null)}};j$.type=`tooltip`;function M$(e,t,n){let r=t.ecModel,i;n?(i=new kh(n,r,r),i=new kh(t.option,i,r)):i=t;for(let t=e.length-1;t>=0;t--){let n=e[t];n&&(n instanceof kh&&(n=n.get(`tooltip`,!0)),z(n)&&(n={formatter:n}),n&&(i=new kh(n,i,r)))}return i}function N$(e,t){return e.dispatchAction||I(t.dispatchAction,t)}function P$(e,t,n,r,i,a,o){let 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 F$(e,t,n,r,i){let 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 I$(e,t,n,r){let 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 L$(e){return e===`center`||e===`middle`}function R$(e,t,n){let{queryOptionMap:r}=Ks(e),i=r.keys()[0];if(!i||i===`series`)return;let a=Ys(t,i,r.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];if(!a)return;let o=n.getViewOfComponentModel(a),s;if(o.group.traverse(t=>{let n=X(t).tooltipConfig;if(n&&n.name===e.name)return s=t,!0}),s)return{componentMainType:i,componentIndex:a.componentIndex,el:s}}function z$(e){BD(ZJ),e.registerComponentModel(c$),e.registerComponentView(j$),e.registerAction({type:`showTip`,event:`showTip`,update:`tooltip:manuallyShowTip`},Le),e.registerAction({type:`hideTip`,event:`hideTip`,update:`tooltip:manuallyHideTip`},Le)}const B$=[`rect`,`polygon`,`keep`,`clear`];function V$(e,t){let n=bs(e?e.brush:[]);if(!n.length)return;let r=[];P(n,function(e){let t=e.hasOwnProperty(`toolbox`)?e.toolbox:[];t instanceof Array&&(r=r.concat(t))});let i=e&&e.toolbox;L(i)&&(i=i[0]),i||(i={feature:{}},e.toolbox=[i]);let a=i.feature||(i.feature={}),o=a.brush||(a.brush={}),s=o.type||(o.type=[]);s.push.apply(s,r),hc(s,e=>e+``,null),t&&!s.length&&s.push.apply(s,B$)}const H$=P;function U$(e){if(e){for(let t in e)if(e.hasOwnProperty(t))return!0}}function W$(e,t,n){let r={};return H$(t,function(t){let a=r[t]=i();H$(e[t],function(e,r){if(!Oz.isValidType(r))return;let i={type:r,visual:e};n&&n(i,t),a[r]=new Oz(i),r===`opacity`&&(i=k(i),i.type=`colorAlpha`,a.__hidden.__alphaForOpacity=new Oz(i))})}),r;function i(){let e=function(){};return e.prototype.__hidden=e.prototype,new e}}function G$(e,t,n){let r;P(n,function(e){t.hasOwnProperty(e)&&U$(t[e])&&(r=!0)}),r&&P(n,function(n){t.hasOwnProperty(n)&&U$(t[n])?e[n]=k(t[n]):delete e[n]})}function K$(e,t,n,r,i,a){let o={};P(e,function(e){let n=Oz.prepareVisualTypes(t[e]);o[e]=n});let s;function c(e){return Fx(n,s,e)}function l(e,t){Lx(n,s,e,t)}a==null?n.each(u):n.each([a],u);function u(e,u){s=a==null?e:u;let d=n.getRawDataItem(s);if(d&&d.visualMap===!1)return;let f=r.call(i,e),p=t[f],m=o[f];for(let t=0,n=m.length;t<n;t++){let n=m[t];p[n]&&p[n].applyVisual(e,c,l)}}}function q$(e,t,n,r){let i={};return P(e,function(e){let n=Oz.prepareVisualTypes(t[e]);i[e]=n}),{progress:function(e,a){let o;r!=null&&(o=a.getDimensionIndex(r));function s(e){return Fx(a,l,e)}function c(e,t){Lx(a,l,e,t)}let l,u=a.getStore();for(;(l=e.next())!=null;){let e=a.getRawDataItem(l);if(e&&e.visualMap===!1)continue;let d=r==null?l:u.get(o,l),f=n(d),p=t[f],m=i[f];for(let e=0,t=m.length;e<t;e++){let t=m[e];p[t]&&p[t].applyVisual(d,s,c)}}}}}function J$(e){let t=e.brushType,n={point(r){return Y$[t].point(r,n,e)},rect(r){return Y$[t].rect(r,n,e)}};return n}const Y$={lineX:X$(0),lineY:X$(1),rect:{point:function(e,t,n){return e&&n.boundingRect.contain(e[0],e[1])},rect:function(e,t,n){return e&&n.boundingRect.intersect(e)}},polygon:{point:function(e,t,n){return e&&n.boundingRect.contain(e[0],e[1])&&HD(n.range,e[0],e[1])},rect:function(e,t,n){let r=n.range;if(!e||r.length<=1)return!1;let i=e.x,a=e.y,o=e.width,s=e.height,c=r[0];if(HD(r,i,a)||HD(r,i+o,a)||HD(r,i,a+s)||HD(r,i+o,a+s)||K.create(e).contain(c[0],c[1])||Nm(i,a,i+o,a,r)||Nm(i,a,i,a+s,r)||Nm(i+o,a,i+o,a+s,r)||Nm(i,a+s,i+o,a+s,r))return!0}}};function X$(e){let t=[`x`,`y`],n=[`width`,`height`];return{point:function(t,n,r){if(t){let n=r.range,i=t[e];return Z$(i,n)}},rect:function(r,i,a){if(r){let i=a.range,o=[r[t[e]],r[t[e]]+r[n[e]]];return o[1]<o[0]&&o.reverse(),Z$(o[0],i)||Z$(o[1],i)||Z$(i[0],o)||Z$(i[1],o)}}}}function Z$(e,t){return t[0]<=e&&e<=t[1]}const Q$=[`inBrush`,`outOfBrush`],$$=`__ecBrushSelect`,e1=`__ecInBrushSelectEvent`;function t1(e){e.eachComponent({mainType:`brush`},function(t){(t.brushTargetManager=new VQ(t.option,e)).setInputRanges(t.areas,e)})}const n1=Sc(r1);function r1(e,t,n){let r=[],i,a;e.eachComponent({mainType:`brush`},function(e){n&&n.type===`takeGlobalCursor`&&e.setBrushOption(n.key===`brush`?n.brushOption:{brushType:!1})}),t1(e),e.eachComponent({mainType:`brush`},function(t,n){let o={brushId:t.id,brushIndex:n,brushName:t.name,areas:k(t.areas),selected:[]};r.push(o);let s=t.option,c=s.brushLink,l=[],u=[],d=[],f=!1;n||(i=s.throttleType,a=s.throttleDelay);let p=F(t.areas,function(e){let t=c1[e.brushType],n=M({boundingRect:t?t(e):void 0},e);return n.selectors=J$(n),n}),m=W$(t.option,Q$,function(e){e.mappingMethod=`fixed`});L(c)&&P(c,function(e){l[e]=1});function h(e){return c===`all`||!!l[e]}function g(e){return!!e.length}e.eachSeries(function(e,t){let n=d[t]=[];e.subType===`parallel`?_(e,t):v(e,t,n)});function _(e,t){let n=e.coordinateSystem;f=f||n.hasAxisBrushed(),h(t)&&n.eachActiveState(e.getData(),function(e,t){e===`active`&&(u[t]=1)})}function v(n,r,i){if(n.brushSelector&&!s1(t,r)&&(P(p,function(r){t.brushTargetManager.controlSeries(r,n,e)&&i.push(r),f=f||g(i)}),h(r)&&g(i))){let e=n.getData();e.each(function(t){o1(n,i,e,t)&&(u[t]=1)})}}e.eachSeries(function(e,t){let n={seriesId:e.id,seriesIndex:t,seriesName:e.name,dataIndex:[]};o.selected.push(n);let r=d[t],i=e.getData(),a=h(t)?function(e){return u[e]?(n.dataIndex.push(i.getRawIndex(e)),`inBrush`):`outOfBrush`}:function(t){return o1(e,r,i,t)?(n.dataIndex.push(i.getRawIndex(t)),`inBrush`):`outOfBrush`};(h(t)?f:g(r))&&K$(Q$,m,i,a)})}),i1(t,i,a,r,n)}function i1(e,t,n,r,i){if(!i)return;let a=e.getZr();a[e1]||(a[$$]||(a[$$]=a1),Zb(a,$$,n,t)(e,r))}function a1(e,t){if(!e.isDisposed()){let n=e.getZr();n[e1]=!0,e.dispatchAction({type:`brushSelect`,batch:t}),n[e1]=!1}}function o1(e,t,n,r){for(let i=0,a=t.length;i<a;i++){let a=t[i];if(e.brushSelector(r,n,a.selectors,a))return!0}}function s1(e,t){let n=e.option.seriesIndex;return n!=null&&n!==`all`&&(L(n)?N(n,t)<0:t!==n)}const c1={rect:function(e){return l1(e.range)},polygon:function(e){let t,n=e.range;for(let e=0,r=n.length;e<r;e++){t=t||[ic(),ic()];let r=n[e];r[0]<t[0][0]&&(t[0][0]=r[0]),r[0]>t[0][1]&&(t[0][1]=r[0]),r[1]<t[1][0]&&(t[1][0]=r[1]),r[1]>t[1][1]&&(t[1][1]=r[1])}return t&&l1(t)}};function l1(e){return new K(e[0][0],e[1][0],e[0][1]-e[0][0],e[1][1]-e[1][0])}var u1=class e extends Ib{constructor(...t){super(...t),this.type=e.type}init(e,t){this.ecModel=e,this.api=t,this.model,(this._brushController=new FH(t.getZr())).on(`brush`,I(this._onBrush,this)).mount()}render(e,t,n,r){this.model=e,this._updateController(e,t,n,r)}updateTransform(e,t,n,r){t1(t),this._updateController(e,t,n,r)}updateVisual(e,t,n,r){this.updateTransform(e,t,n,r)}updateView(e,t,n,r){this._updateController(e,t,n,r)}_updateController(e,t,n,r){(!r||r.$from!==e.id)&&this._brushController.setPanels(e.brushTargetManager.makePanelOpts(n)).enableBrush(e.brushOption).updateCovers(e.areas.slice())}dispose(){this._brushController.dispose()}_onBrush(e){let t=this.model.id,n=this.model.brushTargetManager.setOutputRanges(e.areas,this.ecModel);(!e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:`brush`,brushId:t,areas:k(n),$from:t}),e.isEnd&&this.api.dispatchAction({type:`brushEnd`,brushId:t,areas:k(n),$from:t})}};u1.type=`brush`;var d1=class e extends b_{constructor(...t){super(...t),this.type=e.type,this.areas=[],this.brushOption={}}optionUpdated(e,t){let n=this.option;!t&&G$(n,e,[`inBrush`,`outOfBrush`]);let r=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:this.option.defaultOutOfBrushColor},r.hasOwnProperty(`liftZ`)||(r.liftZ=5)}setAreas(e){typeof process<`u`&&process.env.NODE_ENV!==`production`&&(H(L(e)),P(e,function(e){H(e.brushType,`Illegal areas`)})),e&&(this.areas=F(e,function(e){return f1(this.option,e)},this))}setBrushOption(e){this.brushOption=f1(this.option,e),this.brushType=this.brushOption.brushType}};d1.type=`brush`,d1.dependencies=[`geo`,`grid`,`xAxis`,`yAxis`,`parallel`,`series`],d1.defaultOption={seriesIndex:`all`,brushType:`rect`,brushMode:`single`,transformable:!0,brushStyle:{borderWidth:1,color:Q.color.backgroundTint,borderColor:Q.color.borderTint},throttleType:`fixRate`,throttleDelay:0,removeOnClick:!0,z:1e4,defaultOutOfBrushColor:Q.color.disabled};function f1(e,t){return A({brushType:e.brushType,brushMode:e.brushMode,transformable:e.transformable,brushStyle:new kh(e.brushStyle).getItemStyle(),removeOnClick:e.removeOnClick,z:e.z},t,!0)}const p1=[`rect`,`polygon`,`lineX`,`lineY`,`keep`,`clear`];var m1=class extends aQ{render(e,t,n){let r,i,a;t.eachComponent({mainType:`brush`},function(e){r=e.brushType,i=e.brushOption.brushMode||`single`,a=a||!!e.areas.length}),this._brushType=r,this._brushMode=i,P(e.get(`type`,!0),function(t){e.setIconStatus(t,(t===`keep`?i===`multiple`:t===`clear`?a:t===r)?`emphasis`:`normal`)})}updateView(e,t,n){this.render(e,t,n)}getIcons(){let e=this.model,t=e.get(`icon`,!0),n={};return P(e.get(`type`,!0),function(e){t[e]&&(n[e]=t[e])}),n}onclick(e,t,n){let r=this._brushType,i=this._brushMode;n===`clear`?(t.dispatchAction({type:`axisAreaSelect`,intervals:[]}),t.dispatchAction({type:`brush`,command:`clear`,areas:[]})):t.dispatchAction({type:`takeGlobalCursor`,key:`brush`,brushOption:{brushType:n===`keep`?r:r!==n&&n,brushMode:n===`keep`?i===`multiple`?`single`:`multiple`:i}})}static getDefaultOption(e){return{show:!0,type:p1.slice(),icon:{rect:`M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13`,polygon:`M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2`,lineX:`M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4`,lineY:`M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4`,keep:`M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z`,clear:`M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2`},title:e.getLocaleModel().get([`toolbox`,`brush`,`title`])}}};function h1(e){e.registerComponentView(u1),e.registerComponentModel(d1),e.registerPreprocessor(V$),e.registerVisual(e.PRIORITY.VISUAL.BRUSH,n1),e.registerAction({type:`brush`,event:`brush`,update:`updateVisual`},function(e,t){t.eachComponent({mainType:`brush`,query:e},function(t){t.setAreas(e.areas)})}),e.registerAction({type:`brushSelect`,event:`brushSelected`,update:`none`},Le),e.registerAction({type:`brushEnd`,event:`brushEnd`,update:`none`},Le),sQ(`brush`,m1)}var g1=class e extends b_{constructor(...t){super(...t),this.type=e.type,this.layoutMode={type:`box`,ignoreSize:!0}}};g1.type=`title`,g1.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}};var _1=class e extends Ib{constructor(...t){super(...t),this.type=e.type}render(e,t,n){if(this.group.removeAll(),!e.get(`show`))return;let r=this.group,i=e.getModel(`textStyle`),a=e.getModel(`subtextStyle`),o=e.get(`textAlign`),s=V(e.get(`textBaseline`),e.get(`textVerticalAlign`)),c=new qu({style:oh(i,{text:e.get(`text`),fill:i.getTextColor()},{disableBox:!0}),z2:10}),l=c.getBoundingRect(),u=e.get(`subtext`),d=new qu({style:oh(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(){Ug(f,`_`+e.get(`target`))}),p&&d.on(`click`,function(){Ug(p,`_`+e.get(`subtarget`))}),X(c).eventData=X(d).eventData=m?{componentType:`title`,componentIndex:e.componentIndex}:null,r.add(c),u&&r.add(d);let h=r.getBoundingRect(),g=e.getBoxLayoutParams();g.width=h.width,g.height=h.height;let _=c_(g,d_(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=s||`top`),r.x=_.x,r.y=_.y,r.markRedraw();let v={align:o,verticalAlign:s};c.setStyle(v),d.setStyle(v),h=r.getBoundingRect();let y=_.margin,b=e.getItemStyle([`color`,`opacity`]);b.fill=e.get(`backgroundColor`);let x=new Uu({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)}};_1.type=`title`;function v1(e){e.registerComponentModel(g1),e.registerComponentView(_1)}var y1=class e extends b_{constructor(...t){super(...t),this.type=e.type,this.layoutMode=`box`}init(e,t,n){this.mergeDefaultAndTheme(e,n),this._initData()}mergeOption(e){super.mergeOption.apply(this,arguments),this._initData()}setCurrentIndex(e){e==null&&(e=this.option.currentIndex);let t=this._data.count();this.option.loop?e=(e%t+t)%t:(e>=t&&(e=t-1),e<0&&(e=0)),this.option.currentIndex=e}getCurrentIndex(){return this.option.currentIndex}isIndexMax(){return this.getCurrentIndex()>=this._data.count()-1}setPlayState(e){this.option.autoPlay=!!e}getPlayState(){return!!this.option.autoPlay}_initData(){let e=this.option,t=e.data||[],n=e.axisType,r=this._names=[],i;n===`category`?(i=[],P(t,function(e,t){let n=Ps(Cs(e),``),a;B(e)?(a=k(e),a.value=t):a=t,i.push(a),r.push(n)})):i=t;let a={category:`ordinal`,time:`time`,value:`number`}[n]||`number`;(this._data=new sT([{name:`value`,type:a}],this)).initData(i,r)}getData(){return this._data}getCategories(){if(this.get(`axisType`)===`category`)return this._names.slice()}};y1.type=`timeline`,y1.defaultOption={z:4,show:!0,axisType:`time`,realtime:!0,left:`20%`,top:null,right:`20%`,bottom:0,width:null,height:40,padding:Q.size.m,controlPosition:`left`,autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:Q.color.secondary},data:[]};var b1=class e extends y1{constructor(...t){super(...t),this.type=e.type}};b1.type=`timeline.slider`,b1.defaultOption=Ph(y1.defaultOption,{backgroundColor:`rgba(0,0,0,0)`,borderColor:Q.color.border,borderWidth:0,orient:`horizontal`,inverse:!1,tooltip:{trigger:`item`},symbol:`circle`,symbolSize:12,lineStyle:{show:!0,width:2,color:Q.color.accent10},label:{position:`auto`,show:!0,interval:`auto`,rotate:0,color:Q.color.tertiary},itemStyle:{color:Q.color.accent20,borderWidth:0},checkpointStyle:{symbol:`circle`,symbolSize:15,color:Q.color.accent50,borderColor:Q.color.accent50,borderWidth:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:`rgba(0, 0, 0, 0)`,animation:!0,animationDuration:300,animationEasing:`quinticInOut`},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:`left`,playIcon:`path://M15 0C23.2843 0 30 6.71573 30 15C30 23.2843 23.2843 30 15 30C6.71573 30 0 23.2843 0 15C0 6.71573 6.71573 0 15 0ZM15 3C8.37258 3 3 8.37258 3 15C3 21.6274 8.37258 27 15 27C21.6274 27 27 21.6274 27 15C27 8.37258 21.6274 3 15 3ZM11.5 10.6699C11.5 9.90014 12.3333 9.41887 13 9.80371L20.5 14.1338C21.1667 14.5187 21.1667 15.4813 20.5 15.8662L13 20.1963C12.3333 20.5811 11.5 20.0999 11.5 19.3301V10.6699Z`,stopIcon:`path://M15 0C23.2843 0 30 6.71573 30 15C30 23.2843 23.2843 30 15 30C6.71573 30 0 23.2843 0 15C0 6.71573 6.71573 0 15 0ZM15 3C8.37258 3 3 8.37258 3 15C3 21.6274 8.37258 27 15 27C21.6274 27 27 21.6274 27 15C27 8.37258 21.6274 3 15 3ZM11.5 10C12.3284 10 13 10.6716 13 11.5V18.5C13 19.3284 12.3284 20 11.5 20C10.6716 20 10 19.3284 10 18.5V11.5C10 10.6716 10.6716 10 11.5 10ZM18.5 10C19.3284 10 20 10.6716 20 11.5V18.5C20 19.3284 19.3284 20 18.5 20C17.6716 20 17 19.3284 17 18.5V11.5C17 10.6716 17.6716 10 18.5 10Z`,nextIcon:`path://M0.838834 18.7383C0.253048 18.1525 0.253048 17.2028 0.838834 16.617L7.55635 9.89949L0.838834 3.18198C0.253048 2.59619 0.253048 1.64645 0.838834 1.06066C1.42462 0.474874 2.37437 0.474874 2.96015 1.06066L10.7383 8.83883L10.8412 8.95277C11.2897 9.50267 11.2897 10.2963 10.8412 10.8462L10.7383 10.9602L2.96015 18.7383C2.37437 19.3241 1.42462 19.3241 0.838834 18.7383Z`,prevIcon:`path://M10.9602 1.06066C11.5459 1.64645 11.5459 2.59619 10.9602 3.18198L4.24264 9.89949L10.9602 16.617C11.5459 17.2028 11.5459 18.1525 10.9602 18.7383C10.3744 19.3241 9.42462 19.3241 8.83883 18.7383L1.06066 10.9602L0.957771 10.8462C0.509245 10.2963 0.509245 9.50267 0.957771 8.95277L1.06066 8.83883L8.83883 1.06066C9.42462 0.474874 10.3744 0.474874 10.9602 1.06066Z`,prevBtnSize:18,nextBtnSize:18,color:Q.color.accent50,borderColor:Q.color.accent50,borderWidth:0},emphasis:{label:{show:!0,color:Q.color.accent60},itemStyle:{color:Q.color.accent60,borderColor:Q.color.accent60},controlStyle:{color:Q.color.accent70,borderColor:Q.color.accent70}},progress:{lineStyle:{color:Q.color.accent30},itemStyle:{color:Q.color.accent40}},data:[]}),ae(b1,hy.prototype);var x1=class e extends Ib{constructor(...t){super(...t),this.type=e.type}};x1.type=`timeline`;var S1=class extends NO{constructor(e,t,n,r){super(e,t,n),this.type=r||`value`}getLabelModel(){return this.model.getModel(`label`)}isHorizontal(){return this.model.get(`orient`)===`horizontal`}};const C1=Math.PI,w1=Y();var T1=class e extends x1{constructor(...t){super(...t),this.type=e.type}init(e,t){this.api=t}render(e,t,n){if(this.model=e,this.api=n,this.ecModel=t,this.group.removeAll(),e.get(`show`,!0)){let t=this._layout(e,n),r=this._createGroup(`_mainGroup`),i=this._createGroup(`_labelGroup`),a=this._axis=this._createAxis(t,e);e.formatTooltip=function(e){return ab(`nameValue`,{noName:!0,value:a.scale.getLabel({value:e})})},P([`AxisLine`,`AxisTick`,`Control`,`CurrentPointer`],function(n){this[`_render`+n](t,r,a,e)},this),this._renderAxisLabel(t,i,a,e),this._position(t,e)}this._doPlayStop(),this._updateTicksStatus()}remove(){this._clearTimer(),this.group.removeAll()}dispose(){this._clearTimer()}_layout(e,t){let n=e.get([`label`,`position`]),r=e.get(`orient`),i=E1(e,t),a;a=n==null||n===`auto`?r===`horizontal`?i.y+i.height/2<t.getHeight()/2?`-`:`+`:i.x+i.width/2<t.getWidth()/2?`+`:`-`:z(n)?{horizontal:{top:`-`,bottom:`+`},vertical:{left:`-`,right:`+`}}[r][n]:n;let o={horizontal:`center`,vertical:a>=0||a===`+`?`left`:`right`},s={horizontal:a>=0||a===`+`?`top`:`bottom`,vertical:`middle`},c={horizontal:0,vertical:C1/2},l=r===`vertical`?i.height:i.width,u=e.getModel(`controlStyle`),d=u.get(`show`,!0),f=d?u.get(`itemSize`):0,p=d?u.get(`itemGap`):0,m=f+p,h=e.get([`label`,`rotate`])||0;h=h*C1/180;let g,_,v,y=u.get(`position`,!0),b=d&&u.get(`showPlayBtn`,!0),x=d&&u.get(`showPrevBtn`,!0),S=d&&u.get(`showNextBtn`,!0),C=0,w=l;y===`left`||y===`bottom`?(b&&(g=[0,0],C+=m),x&&(_=[C,0],C+=m),S&&(v=[w-f,0],w-=m)):(b&&(g=[w-f,0],w-=m),x&&(_=[0,0],C+=m),S&&(v=[w-f,0],w-=m));let T=[C,w];return e.get(`inverse`)&&T.reverse(),{viewRect:i,mainLength:l,orient:r,rotation:c[r],labelRotation:h,labelPosOpt:a,labelAlign:e.get([`label`,`align`])||o[r],labelBaseline:e.get([`label`,`verticalAlign`])||e.get([`label`,`baseline`])||s[r],playPosition:g,prevBtnPosition:_,nextBtnPosition:v,axisExtent:T,controlSize:f,controlGap:p}}_position(e,t){let n=this._mainGroup,r=this._labelGroup,i=e.viewRect;if(e.orient===`vertical`){let e=Kt(),t=i.x,n=i.y+i.height;Xt(e,e,[-t,-n]),Zt(e,e,-C1/2),Xt(e,e,[t,n]),i=i.clone(),i.applyTransform(e)}let a=f(i),o=f(n.getBoundingRect()),s=f(r.getBoundingRect()),c=[n.x,n.y],l=[r.x,r.y];l[0]=c[0]=a[0][0];let u=e.labelPosOpt;if(u==null||z(u)){let e=u===`+`?0:1;p(c,o,a,1,e),p(l,s,a,1,1-e)}else p(c,o,a,1,u>=0?0:1),l[1]=c[1]+u;n.setPosition(c),r.setPosition(l),n.rotation=r.rotation=e.rotation,d(n),d(r);function d(e){e.originX=a[0][0]-e.x,e.originY=a[1][0]-e.y}function f(e){return[[e.x,e.x+e.width],[e.y,e.y+e.height]]}function p(e,t,n,r,i){e[r]+=n[r][i]-t[r][i]}}_createAxis(e,t){let n=t.getData(),r=t.get(`axisType`)||t.get(`type`);r!==`category`&&r!==`time`&&(r=`value`);let i=SE(t,r,!1);i.getTicks=function(){return n.mapArray([`value`],function(e){return{value:e}})};let a=n.getDataExtent(`value`);i.setExtent(a[0],a[1]),AD(i,{fixMinMax:[!0,!0]});let o=new S1(`value`,i,e.axisExtent,r);return o.model=t,o}_createGroup(e){let t=this[e]=new q;return this.group.add(t),t}_renderAxisLine(e,t,n,r){let i=n.getExtent();if(!r.get([`lineStyle`,`show`]))return;let a=new kp({shape:{x1:i[0],y1:0,x2:i[1],y2:0},style:j({lineCap:`round`},r.getModel(`lineStyle`).getLineStyle()),silent:!0,z2:1});t.add(a);let o=this._progressLine=new kp({shape:{x1:i[0],x2:this._currentPointer?this._currentPointer.x:i[0],y1:0,y2:0},style:M({lineCap:`round`,lineWidth:a.style.lineWidth},r.getModel([`progress`,`lineStyle`]).getLineStyle()),silent:!0,z2:1});t.add(o)}_renderAxisTick(e,t,n,r){let i=r.getData(),a=n.scale.getTicks();this._tickSymbols=[],P(a,e=>{let a=n.dataToCoord(e.value),o=i.getItemModel(e.value),s=o.getModel(`itemStyle`),c=o.getModel([`emphasis`,`itemStyle`]),l=o.getModel([`progress`,`itemStyle`]),u=O1(o,s,t,{x:a,y:0,onclick:I(this._changeTimeline,this,e.value)});u.ensureState(`emphasis`).style=c.getItemStyle(),u.ensureState(`progress`).style=l.getItemStyle(),hf(u);let d=X(u);o.get(`tooltip`)?(d.dataIndex=e.value,d.dataModel=r):d.dataIndex=d.dataModel=null,this._tickSymbols.push(u)})}_renderAxisLabel(e,t,n,r){if(!n.getLabelModel().get(`show`))return;let i=r.getData(),a=n.getViewLabels();this._tickLabels=[],P(a,r=>{if(r.tick.offInterval)return;let a=r.tick.value,o=i.getItemModel(a),s=o.getModel(`label`),c=o.getModel([`emphasis`,`label`]),l=o.getModel([`progress`,`label`]),u=new qu({x:n.dataToCoord(a),y:0,rotation:e.labelRotation-e.rotation,onclick:I(this._changeTimeline,this,a),silent:!1,style:oh(s,{text:r.formattedLabel,align:e.labelAlign,verticalAlign:e.labelBaseline})});u.ensureState(`emphasis`).style=oh(c),u.ensureState(`progress`).style=oh(l),t.add(u),hf(u),w1(u).dataIndex=a,this._tickLabels.push(u)})}_renderControl(e,t,n,r){let i=e.controlSize,a=e.rotation,o=r.getModel(`controlStyle`).getItemStyle(),s=r.getModel([`emphasis`,`controlStyle`]).getItemStyle(),c=r.getPlayState(),l=r.get(`inverse`,!0);u(e.nextBtnPosition,`next`,I(this._changeTimeline,this,l?`-`:`+`)),u(e.prevBtnPosition,`prev`,I(this._changeTimeline,this,l?`+`:`-`)),u(e.playPosition,c?`stop`:`play`,I(this._handlePlayClick,this,!c),!0);function u(e,n,c,l){if(!e)return;let u=Ia(V(r.get([`controlStyle`,n+`BtnSize`]),i),i),d=[0,-u/2,u,u],f=D1(r,n+`Icon`,d,{x:e[0],y:e[1],originX:i/2,originY:0,rotation:l?-a:0,rectHover:!0,style:o,onclick:c});f.ensureState(`emphasis`).style=s,t.add(f),hf(f)}}_renderCurrentPointer(e,t,n,r){let i=r.getData(),a=r.getCurrentIndex(),o=i.getItemModel(a).getModel(`checkpointStyle`),s=this,c={onCreate(e){e.draggable=!0,e.drift=I(s._handlePointerDrag,s),e.ondragend=I(s._handlePointerDragend,s),k1(e,s._progressLine,a,n,r,!0)},onUpdate(e){k1(e,s._progressLine,a,n,r)}};this._currentPointer=O1(o,o,this._mainGroup,{},this._currentPointer,c)}_handlePlayClick(e){this._clearTimer(),this.api.dispatchAction({type:`timelinePlayChange`,playState:e,from:this.uid})}_handlePointerDrag(e,t,n){this._clearTimer(),this._pointerChangeTimeline([n.offsetX,n.offsetY])}_handlePointerDragend(e){this._pointerChangeTimeline([e.offsetX,e.offsetY],!0)}_pointerChangeTimeline(e,t){let n=this._toAxisCoord(e)[0],r=this._axis,i=Lo(r.getExtent().slice());n>i[1]&&(n=i[1]),n<i[0]&&(n=i[0]),this._currentPointer.x=n,this._currentPointer.markRedraw();let a=this._progressLine;a&&(a.shape.x2=n,a.dirty());let o=this._findNearestTick(n),s=this.model;(t||o!==s.getCurrentIndex()&&s.get(`realtime`))&&this._changeTimeline(o)}_doPlayStop(){this._clearTimer(),this.model.getPlayState()&&(this._timer=setTimeout(()=>{let e=this.model;this._changeTimeline(e.getCurrentIndex()+(e.get(`rewind`,!0)?-1:1))},this.model.get(`playInterval`)))}_toAxisCoord(e){return Tm(e,this._mainGroup.getLocalTransform(),!0)}_findNearestTick(e){let t=this.model.getData(),n=1/0,r,i=this._axis;return t.each([`value`],function(t,a){let o=i.dataToCoord(t),s=Math.abs(o-e);s<n&&(n=s,r=a)}),r}_clearTimer(){this._timer&&(clearTimeout(this._timer),this._timer=null)}_changeTimeline(e){let t=this.model.getCurrentIndex();e===`+`?e=t+1:e===`-`&&(e=t-1),this.api.dispatchAction({type:`timelineChange`,currentIndex:e,from:this.uid})}_updateTicksStatus(){let e=this.model.getCurrentIndex(),t=this._tickSymbols,n=this._tickLabels;if(t)for(let n=0;n<t.length;n++)t&&t[n]&&t[n].toggleState(`progress`,n<e);if(n)for(let t=0;t<n.length;t++)n&&n[t]&&n[t].toggleState(`progress`,w1(n[t]).dataIndex<=e)}};T1.type=`timeline.slider`;function E1(e,t){return c_(e.getBoxLayoutParams(),d_(e,t).refContainer,e.get(`padding`))}function D1(e,t,n,r){let i=r.style,a=Mm(e.get([`controlStyle`,t]),r||{},new K(n[0],n[1],n[2],n[3]));return i&&a.setStyle(i),a}function O1(e,t,n,r,i,a){let o=t.get(`color`);i?(i.setColor(o),n.add(i),a&&a.onUpdate(i)):(i=lS(e.get(`symbol`),-1,-1,2,2,o),i.setStyle(`strokeNoScale`,!0),n.add(i),a&&a.onCreate(i));let s=t.getItemStyle([`color`]);i.setStyle(s),r=A({rectHover:!0,z2:100},r,!0);let c=uS(e.get(`symbolSize`));r.scaleX=c[0]/2,r.scaleY=c[1]/2;let l=dS(e.get(`symbolOffset`),c);l&&(r.x=(r.x||0)+l[0],r.y=(r.y||0)+l[1]);let u=e.get(`symbolRotate`);return r.rotation=(u||0)*Math.PI/180||0,i.attr(r),i.updateTransform(),i}function k1(e,t,n,r,i,a){if(e.dragging)return;let o=i.getModel(`checkpointStyle`),s=r.dataToCoord(i.getData().get(`value`,n));if(a||!o.get(`animation`,!0))e.attr({x:s,y:0}),t&&t.attr({shape:{x2:s}});else{let n={duration:o.get(`animationDuration`,!0),easing:o.get(`animationEasing`,!0)};e.stopAnimation(null,!0),e.animateTo({x:s,y:0},n),t&&t.animateTo({shape:{x2:s}},n)}}function A1(e){e.registerAction({type:`timelineChange`,event:`timelineChanged`,update:`prepareAndUpdate`},function(e,t,n){let r=t.getComponent(`timeline`);return r&&e.currentIndex!=null&&(r.setCurrentIndex(e.currentIndex),!r.get(`loop`,!0)&&r.isIndexMax()&&r.getPlayState()&&(r.setPlayState(!1),n.dispatchAction({type:`timelinePlayChange`,playState:!1,from:e.from}))),t.resetOption(`timeline`,{replaceMerge:r.get(`replaceMerge`,!0)}),M({currentIndex:r.option.currentIndex},e)}),e.registerAction({type:`timelinePlayChange`,event:`timelinePlayChanged`,update:`update`},function(e,t){let n=t.getComponent(`timeline`);n&&e.playState!=null&&n.setPlayState(e.playState)})}function j1(e){let t=e&&e.timeline;L(t)||(t=t?[t]:[]),P(t,function(e){e&&M1(e)})}function M1(e){let t=e.type,n={number:`value`,time:`time`};if(n[t]&&(e.axisType=n[t],delete e.type),N1(e),P1(e,`controlPosition`)){let t=e.controlStyle||(e.controlStyle={});P1(t,`position`)||(t.position=e.controlPosition),t.position===`none`&&!P1(t,`show`)&&(t.show=!1,delete t.position),delete e.controlPosition}P(e.data||[],function(e){B(e)&&!L(e)&&(!P1(e,`value`)&&P1(e,`name`)&&(e.value=e.name),N1(e))})}function N1(e){let t=e.itemStyle||(e.itemStyle={}),n=t.emphasis||(t.emphasis={}),r=e.label||e.label||{},i=r.normal||(r.normal={}),a={normal:1,emphasis:1};P(r,function(e,t){!a[t]&&!P1(i,t)&&(i[t]=e)}),n.label&&!P1(r,`emphasis`)&&(r.emphasis=n.label,delete n.label)}function P1(e,t){return e.hasOwnProperty(t)}function F1(e){e.registerComponentModel(b1),e.registerComponentView(T1),e.registerSubTypeDefaulter(`timeline`,function(){return`slider`}),A1(e),e.registerPreprocessor(j1)}function I1(e,t){if(!e)return!1;let n=L(e)?e:[e];for(let e=0;e<n.length;e++)if(n[e]&&n[e][t])return!0;return!1}function L1(e){xs(e,`label`,[`show`])}const R1=Y();var z1=class e extends b_{constructor(...t){super(...t),this.type=e.type,this.createdBySelf=!1,this.preventAutoZ=!0}init(e,t,n){if(typeof process<`u`&&process.env.NODE_ENV!==`production`&&this.type===`marker`)throw Error(`Marker component is abstract component. Use markLine, markPoint, markArea instead.`);this.mergeDefaultAndTheme(e,n),this._mergeOption(e,n,!1,!0)}isAnimationEnabled(){if(s.node)return!1;let e=this.__hostSeries;return this.getShallow(`animation`)&&e&&e.isAnimationEnabled()}mergeOption(e,t){this._mergeOption(e,t,!1,!1)}_mergeOption(e,t,n,r){let i=this.mainType;n||t.eachSeries(function(e){let n=e.get(this.mainType,!0),a=R1(e)[i];!n||!n.data?R1(e)[i]=null:(a?a._mergeOption(n,t,!0):(r&&L1(n),P(n.data,function(e){e instanceof Array?(L1(e[0]),L1(e[1])):L1(e)}),a=this.createMarkerModelFromSeries(n,this,t),j(a,{mainType:this.mainType,seriesIndex:e.seriesIndex,name:e.name,createdBySelf:!0}),a.__hostSeries=e),R1(e)[i]=a)},this)}formatTooltip(e,t,n){let r=this.getData(),i=this.getRawValue(e),a=r.getName(e);return ab(`section`,{header:this.name,blocks:[ab(`nameValue`,{name:a,value:i,noName:!a,noValue:i==null})]})}getData(){return this._data}setData(e){this._data=e}getDataParams(e,t){let n=hy.prototype.getDataParams.call(this,e,t),r=this.__hostSeries;return r&&(n.seriesId=r.id,n.seriesName=r.name,n.seriesType=r.subType),n}static getMarkerModelFromSeries(e,t){return R1(e)[t]}};z1.type=`marker`,z1.dependencies=[`series`,`grid`,`polar`,`geo`],ae(z1,hy.prototype);var B1=class e extends z1{constructor(...t){super(...t),this.type=e.type}createMarkerModelFromSeries(t,n,r){return new e(t,n,r)}};B1.type=`markPoint`,B1.defaultOption={z:5,symbol:`pin`,symbolSize:50,tooltip:{trigger:`item`},label:{show:!0,position:`inside`},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}};function V1(e){return!(isNaN(parseFloat(e.x))&&isNaN(parseFloat(e.y)))}function H1(e){return!isNaN(parseFloat(e.x))&&!isNaN(parseFloat(e.y))}function U1(e,t,n,r,i,a,o){let s=[],c=vT(t,i)?t.getCalculationInfo(`stackResultDimension`):i,l=Z1(t,c,e),u=t.hostModel.indicesOfNearest(n,c,l)[0];s[a]=t.get(r,u),s[o]=t.get(c,u);let d=t.get(i,u),f=Ro(t.get(i,u));return f=Math.min(f,20),f>=0&&(s[o]=+s[o].toFixed(f)),[s,d]}const W1={min:fe(U1,`min`),max:fe(U1,`max`),average:fe(U1,`average`),median:fe(U1,`median`)};function G1(e,t){if(!t)return;let n=e.getData(),r=e.coordinateSystem,i=r&&r.dimensions;if(!H1(t)&&!L(t.coord)&&L(i)){let a=K1(t,n,r,e);if(t=k(t),t.type&&W1[t.type]&&a.baseAxis&&a.valueAxis){let e=N(i,a.baseAxis.dim),r=N(i,a.valueAxis.dim),o=W1[t.type](n,a.valueAxis.dim,a.baseDataDim,a.valueDataDim,e,r);t.coord=o[0],t.value=o[1]}else t.coord=[t.xAxis==null?t.radiusAxis:t.xAxis,t.yAxis==null?t.angleAxis:t.yAxis]}if(t.coord==null||!L(i)){t.coord=[];let i=e.getBaseAxis();if(i&&t.type&&W1[t.type]){let e=r.getOtherAxis(i);e&&(t.value=Z1(n,n.mapDimension(e.dim),t.type))}}else{let e=t.coord;for(let t=0;t<2;t++)W1[e[t]]&&(e[t]=Z1(n,n.mapDimension(i[t]),e[t]))}return t}function K1(e,t,n,r){let i={};return e.valueIndex!=null||e.valueDim!=null?(i.valueDataDim=e.valueIndex==null?e.valueDim:t.getDimension(e.valueIndex),i.valueAxis=n.getAxis(q1(r,i.valueDataDim)),i.baseAxis=n.getOtherAxis(i.valueAxis),i.baseDataDim=t.mapDimension(i.baseAxis.dim)):(i.baseAxis=r.getBaseAxis(),i.valueAxis=n.getOtherAxis(i.baseAxis),i.baseDataDim=t.mapDimension(i.baseAxis.dim),i.valueDataDim=t.mapDimension(i.valueAxis.dim)),i}function q1(e,t){let n=e.getData().getDimensionInfo(t);return n&&n.coordDim}function J1(e,t){return e&&e.containData&&t.coord&&!V1(t)?e.containData(t.coord):!0}function Y1(e,t,n){return e&&e.containZone&&t.coord&&n.coord&&!V1(t)&&!V1(n)?e.containZone(t.coord,n.coord):!0}function X1(e,t){return e?function(e,n,r,i){return by(i<2?e.coord&&e.coord[i]:e.value,t[i])}:function(e,n,r,i){return by(e.value,t[i])}}function Z1(e,t,n){if(n===`average`){let n=0,r=0;return e.each(t,function(e,t){isNaN(e)||(n+=e,r++)}),n/r}return n===`median`?e.getMedian(t):e.getDataExtent(t)[+(n===`max`)]}const Q1=Y();var $1=class e extends Ib{constructor(...t){super(...t),this.type=e.type}init(){this.markerGroupMap=U()}render(e,t,n){let r=this.markerGroupMap;r.each(function(e){Q1(e).keep=!1}),t.eachSeries(e=>{let r=z1.getMarkerModelFromSeries(e,this.type);r&&this.renderSeries(e,r,t,n)}),r.each(e=>{!Q1(e).keep&&this.group.remove(e.group)}),e0(t,r,this.type)}markKeep(e){Q1(e).keep=!0}toggleBlurSeries(e,t){P(e,e=>{let n=z1.getMarkerModelFromSeries(e,this.type);n&&n.getData().eachItemGraphicEl(function(e){e&&(t?$d(e):ef(e))})})}};$1.type=`marker`;function e0(e,t,n){e.eachSeries(e=>{let r=z1.getMarkerModelFromSeries(e,n),i=t.get(e.id);if(r&&i&&i.group){let{z:e,zlevel:t}=qm(r);Ym(i.group,e,t)}})}function t0(e,t,n){let r=t.coordinateSystem,i=n.getWidth(),a=n.getHeight(),o=r&&r.getArea&&r.getArea();e.each(function(n){let s=e.getItemModel(n),c=s.get(`relativeTo`)===`coordinate`,l=c?o?o.width:0:i,u=c?o?o.height:0:a,d=c&&o?o.x:0,f=c&&o?o.y:0,p,m=J(s.get(`x`),l)+d,h=J(s.get(`y`),u)+f;if(!isNaN(m)&&!isNaN(h))p=[m,h];else if(t.getMarkerPosition)p=t.getMarkerPosition(e.getValues(e.dimensions,n));else if(r){let t=e.get(r.dimensions[0],n),i=e.get(r.dimensions[1],n);p=r.dataToPoint([t,i])}isNaN(m)||(p[0]=m),isNaN(h)||(p[1]=h),e.setItemLayout(n,p)})}var n0=class e extends $1{constructor(...t){super(...t),this.type=e.type}updateTransform(e,t,n){t.eachSeries(function(e){let t=z1.getMarkerModelFromSeries(e,`markPoint`);t&&(t0(t.getData(),e,n),this.markerGroupMap.get(e.id).updateLayout())},this)}renderSeries(e,t,n,r){let i=e.coordinateSystem,a=e.id,o=e.getData(),s=this.markerGroupMap,c=s.get(a)||s.set(a,new Wk),l=r0(i,e,t);t.setData(l),t0(t.getData(),e,r),l.each(function(e){let n=l.getItemModel(e),r=n.getShallow(`symbol`),i=n.getShallow(`symbolSize`),a=n.getShallow(`symbolRotate`),s=n.getShallow(`symbolOffset`),c=n.getShallow(`symbolKeepAspect`);if(R(r)||R(i)||R(a)||R(s)){let n=t.getRawValue(e),o=t.getDataParams(e);R(r)&&(r=r(n,o)),R(i)&&(i=i(n,o)),R(a)&&(a=a(n,o)),R(s)&&(s=s(n,o))}let u=n.getModel(`itemStyle`).getItemStyle(),d=n.get(`z2`),f=Ix(o,`color`);u.fill||(u.fill=f),l.setItemVisual(e,{z2:V(d,0),symbol:r,symbolSize:i,symbolRotate:a,symbolOffset:s,symbolKeepAspect:c,style:u})}),c.updateData(l),this.group.add(c.group),l.eachItemGraphicEl(function(e){e.traverse(function(e){X(e).dataModel=t})}),this.markKeep(c),c.group.silent=t.get(`silent`)||e.get(`silent`)}};n0.type=`markPoint`;function r0(e,t,n){let r;r=e?F(e&&e.dimensions,function(e){let n=t.getData();return j(j({},n.getDimensionInfo(n.mapDimension(e))||{}),{name:e,ordinalMeta:null})}):[{name:`value`,type:`float`}];let i=new sT(r,n),a=F(n.get(`data`),fe(G1,t));e&&(a=ce(a,fe(J1,e)));let o=X1(!!e,r);return i.initData(a,null,o),i}function i0(e){e.registerComponentModel(B1),e.registerComponentView(n0),e.registerPreprocessor(function(e){I1(e.series,`markPoint`)&&(e.markPoint=e.markPoint||{})})}var a0=class e extends z1{constructor(...t){super(...t),this.type=e.type}createMarkerModelFromSeries(t,n,r){return new e(t,n,r)}};a0.type=`markLine`,a0.defaultOption={z:5,symbol:[`circle`,`arrow`],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:`item`},label:{show:!0,position:`end`,distance:5},lineStyle:{type:`dashed`},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:`linear`};const o0=Y(),s0=function(e,t,n,r){let i=e.getData(),a;if(L(r))a=r;else{let o=r.type;if(o===`min`||o===`max`||o===`average`||o===`median`||r.xAxis!=null||r.yAxis!=null){let s,c;if(r.yAxis!=null||r.xAxis!=null)s=t.getAxis(r.yAxis==null?`x`:`y`),c=Se(r.yAxis,r.xAxis);else{let n=K1(r,i,t,e);s=n.valueAxis,c=Z1(i,yT(i,n.valueDataDim),o)}let l=s.dim===`x`?0:1,u=1-l,d=k(r),f={coord:[]};d.type=null,d.coord=[],d.coord[u]=-1/0,f.coord[u]=1/0;let p=n.get(`precision`);p>=0&&me(c)&&(c=+c.toFixed(Math.min(p,20))),d.coord[l]=f.coord[l]=c,a=[d,f,{type:o,valueIndex:r.valueIndex,value:c}]}else typeof process<`u`&&process.env.NODE_ENV!==`production`&&ee(`Invalid markLine data.`),a=[]}let o=[G1(e,a[0]),G1(e,a[1]),j({},a[2])];return o[2].type=o[2].type||null,A(o[2],o[0]),A(o[2],o[1]),o};function c0(e){return!isNaN(e)&&!isFinite(e)}function l0(e,t,n,r){let i=1-e,a=r.dimensions[e];return c0(t[i])&&c0(n[i])&&t[e]===n[e]&&r.getAxis(a).containData(t[e])}function u0(e,t){if(e.type===`cartesian2d`){let n=t[0].coord,r=t[1].coord;if(n&&r&&(l0(1,n,r,e)||l0(0,n,r,e)))return!0}return J1(e,t[0])&&J1(e,t[1])}function d0(e,t,n,r,i){let a=r.coordinateSystem,o=e.getItemModel(t),s,c=J(o.get(`x`),i.getWidth()),l=J(o.get(`y`),i.getHeight());if(!isNaN(c)&&!isNaN(l))s=[c,l];else{if(r.getMarkerPosition)s=r.getMarkerPosition(e.getValues(e.dimensions,t));else{let n=a.dimensions,r=e.get(n[0],t),i=e.get(n[1],t);s=a.dataToPoint([r,i])}if(pA(a,`cartesian2d`)){let r=a.getAxis(`x`),i=a.getAxis(`y`),o=a.dimensions;c0(e.get(o[0],t))?s[0]=r.toGlobalCoord(r.getExtent()[+!n]):c0(e.get(o[1],t))&&(s[1]=i.toGlobalCoord(i.getExtent()[+!n]))}isNaN(c)||(s[0]=c),isNaN(l)||(s[1]=l)}e.setItemLayout(t,s)}var f0=class e extends $1{constructor(...t){super(...t),this.type=e.type}updateTransform(e,t,n){t.eachSeries(function(e){let t=z1.getMarkerModelFromSeries(e,`markLine`);if(t){let r=t.getData(),i=o0(t).from,a=o0(t).to;i.each(function(t){d0(i,t,!0,e,n),d0(a,t,!1,e,n)}),r.each(function(e){r.setItemLayout(e,[i.getItemLayout(e),a.getItemLayout(e)])}),this.markerGroupMap.get(e.id).updateLayout()}},this)}renderSeries(e,t,n,r){let i=e.coordinateSystem,a=e.id,o=e.getData(),s=this.markerGroupMap,c=s.get(a)||s.set(a,new ZB);this.group.add(c.group);let l=p0(i,e,t),u=l.from,d=l.to,f=l.line;o0(t).from=u,o0(t).to=d,t.setData(f);let p=t.get(`symbol`),m=t.get(`symbolSize`),h=t.get(`symbolRotate`),g=t.get(`symbolOffset`);L(p)||(p=[p,p]),L(m)||(m=[m,m]),L(h)||(h=[h,h]),L(g)||(g=[g,g]),l.from.each(function(e){_(u,e,!0),_(d,e,!1)}),f.each(function(e){let t=f.getItemModel(e),n=t.getModel(`lineStyle`).getLineStyle();f.setItemLayout(e,[u.getItemLayout(e),d.getItemLayout(e)]);let r=t.get(`z2`);n.stroke==null&&(n.stroke=u.getItemVisual(e,`style`).fill),f.setItemVisual(e,{z2:V(r,0),fromSymbolKeepAspect:u.getItemVisual(e,`symbolKeepAspect`),fromSymbolOffset:u.getItemVisual(e,`symbolOffset`),fromSymbolRotate:u.getItemVisual(e,`symbolRotate`),fromSymbolSize:u.getItemVisual(e,`symbolSize`),fromSymbol:u.getItemVisual(e,`symbol`),toSymbolKeepAspect:d.getItemVisual(e,`symbolKeepAspect`),toSymbolOffset:d.getItemVisual(e,`symbolOffset`),toSymbolRotate:d.getItemVisual(e,`symbolRotate`),toSymbolSize:d.getItemVisual(e,`symbolSize`),toSymbol:d.getItemVisual(e,`symbol`),style:n})}),c.updateData(f),l.line.eachItemGraphicEl(function(e){X(e).dataModel=t,e.traverse(function(e){X(e).dataModel=t})});function _(t,n,i){let a=t.getItemModel(n);d0(t,n,i,e,r);let s=a.getModel(`itemStyle`).getItemStyle();s.fill==null&&(s.fill=Ix(o,`color`)),t.setItemVisual(n,{symbolKeepAspect:a.get(`symbolKeepAspect`),symbolOffset:V(a.get(`symbolOffset`,!0),g[+!i]),symbolRotate:V(a.get(`symbolRotate`,!0),h[+!i]),symbolSize:V(a.get(`symbolSize`),m[+!i]),symbol:V(a.get(`symbol`,!0),p[+!i]),style:s})}this.markKeep(c),c.group.silent=t.get(`silent`)||e.get(`silent`)}};f0.type=`markLine`;function p0(e,t,n){let r;r=e?F(e&&e.dimensions,function(e){let n=t.getData();return j(j({},n.getDimensionInfo(n.mapDimension(e))||{}),{name:e,ordinalMeta:null})}):[{name:`value`,type:`float`}];let i=new sT(r,n),a=new sT(r,n),o=new sT([],n),s=F(n.get(`data`),fe(s0,t,e,n));e&&(s=ce(s,fe(u0,e)));let c=X1(!!e,r);return i.initData(F(s,function(e){return e[0]}),null,c),a.initData(F(s,function(e){return e[1]}),null,c),o.initData(F(s,function(e){return e[2]})),o.hasItemOption=!0,{from:i,to:a,line:o}}function m0(e){e.registerComponentModel(a0),e.registerComponentView(f0),e.registerPreprocessor(function(e){I1(e.series,`markLine`)&&(e.markLine=e.markLine||{})})}var h0=class e extends z1{constructor(...t){super(...t),this.type=e.type}createMarkerModelFromSeries(t,n,r){return new e(t,n,r)}};h0.type=`markArea`,h0.defaultOption={z:1,tooltip:{trigger:`item`},animation:!1,label:{show:!0,position:`top`},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:`top`}}};const g0=Y(),_0=function(e,t,n,r){let i=r[0],a=r[1];if(!i||!a)return;let o=G1(e,i),s=G1(e,a),c=o.coord,l=s.coord;c[0]=Se(c[0],-1/0),c[1]=Se(c[1],-1/0),l[0]=Se(l[0],1/0),l[1]=Se(l[1],1/0);let u=te([{},o,s]);return u.coord=[o.coord,s.coord],u.x0=o.x,u.y0=o.y,u.x1=s.x,u.y1=s.y,u};function v0(e){return!isNaN(e)&&!isFinite(e)}function y0(e,t,n,r){let i=1-e;return v0(t[i])&&v0(n[i])}function b0(e,t){let n=t.coord[0],r=t.coord[1],i={coord:n,x:t.x0,y:t.y0},a={coord:r,x:t.x1,y:t.y1};return pA(e,`cartesian2d`)?n&&r&&(y0(1,n,r,e)||y0(0,n,r,e))?!0:Y1(e,i,a):J1(e,i)||J1(e,a)}function x0(e,t,n,r,i){let a=r.coordinateSystem,o=e.getItemModel(t),s,c=J(o.get(n[0]),i.getWidth()),l=J(o.get(n[1]),i.getHeight());if(!isNaN(c)&&!isNaN(l))s=[c,l];else{if(r.getMarkerPosition){let i=e.getValues([`x0`,`y0`],t),o=e.getValues([`x1`,`y1`],t),c=a.clampData(i),l=a.clampData(o),u=[];u[0]=n[0]===`x0`?c[0]>l[0]?o[0]:i[0]:c[0]>l[0]?i[0]:o[0],u[1]=n[1]===`y0`?c[1]>l[1]?o[1]:i[1]:c[1]>l[1]?i[1]:o[1],s=r.getMarkerPosition(u,n,!0)}else{let r=[e.get(n[0],t),e.get(n[1],t)];a.clampData&&a.clampData(r,r),s=a.dataToPoint(r,!0)}if(pA(a,`cartesian2d`)){let r=a.getAxis(`x`),i=a.getAxis(`y`),o=e.get(n[0],t),c=e.get(n[1],t);v0(o)?s[0]=r.toGlobalCoord(r.getExtent()[n[0]===`x0`?0:1]):v0(c)&&(s[1]=i.toGlobalCoord(i.getExtent()[n[1]===`y0`?0:1]))}isNaN(c)||(s[0]=c),isNaN(l)||(s[1]=l)}return s}const S0=[[`x0`,`y0`],[`x1`,`y0`],[`x1`,`y1`],[`x0`,`y1`]];var C0=class e extends $1{constructor(...t){super(...t),this.type=e.type}updateTransform(e,t,n){t.eachSeries(function(e){let t=z1.getMarkerModelFromSeries(e,`markArea`);if(t){let r=t.getData();r.each(function(t){let i=F(S0,function(i){return x0(r,t,i,e,n)});r.setItemLayout(t,i),r.getItemGraphicEl(t).setShape(`points`,i)})}},this)}renderSeries(e,t,n,r){let i=e.coordinateSystem,a=e.id,o=e.getData(),s=this.markerGroupMap,c=s.get(a)||s.set(a,{group:new q});this.group.add(c.group),this.markKeep(c);let l=w0(i,e,t);t.setData(l),l.each(function(t){let n=F(S0,function(n){return x0(l,t,n,e,r)}),a=i.getAxis(`x`).scale,s=i.getAxis(`y`).scale,c=a.getExtent(),u=s.getExtent(),d=[a.parse(l.get(`x0`,t)),a.parse(l.get(`x1`,t))],f=[s.parse(l.get(`y0`,t)),s.parse(l.get(`y1`,t))];Lo(d),Lo(f);let p=c[0]>d[1]||c[1]<d[0]||u[0]>f[1]||u[1]<f[0];l.setItemLayout(t,{points:n,allClipped:p});let m=l.getItemModel(t),h=m.getModel(`itemStyle`).getItemStyle(),g=m.get(`z2`),_=Ix(o,`color`);h.fill||(h.fill=_,z(h.fill)&&(h.fill=$r(h.fill,.4))),h.stroke||(h.stroke=_),l.setItemVisual(t,`style`,h),l.setItemVisual(t,`z2`,V(g,0))}),l.diff(g0(c).data).add(function(e){let t=l.getItemLayout(e),n=l.getItemVisual(e,`z2`);if(!t.allClipped){let r=new wp({z2:V(n,0),shape:{points:t.points}});l.setItemGraphicEl(e,r),c.group.add(r)}}).update(function(e,n){let r=g0(c).data.getItemGraphicEl(n),i=l.getItemLayout(e),a=l.getItemVisual(e,`z2`);i.allClipped?r&&c.group.remove(r):(r?em(r,{z2:V(a,0),shape:{points:i.points}},t,e):r=new wp({shape:{points:i.points}}),l.setItemGraphicEl(e,r),c.group.add(r))}).remove(function(e){let t=g0(c).data.getItemGraphicEl(e);c.group.remove(t)}).execute(),l.eachItemGraphicEl(function(e,n){let r=l.getItemModel(n),i=l.getItemVisual(n,`style`);e.useStyle(l.getItemVisual(n,`style`)),ih(e,ah(r),{labelFetcher:t,labelDataIndex:n,defaultText:l.getName(n)||``,inheritColor:z(i.fill)?$r(i.fill,1):Q.color.neutral99}),xf(e,r),_f(e,null,null,r.get([`emphasis`,`disabled`])),X(e).dataModel=t}),g0(c).data=l,c.group.silent=t.get(`silent`)||e.get(`silent`)}};C0.type=`markArea`;function w0(e,t,n){let r,i,a=[`x0`,`y0`,`x1`,`y1`];if(e){let o=F(e&&e.dimensions,function(e){let n=t.getData();return j(j({},n.getDimensionInfo(n.mapDimension(e))||{}),{name:e,ordinalMeta:null})});i=F(a,(e,t)=>({name:e,type:o[t%2].type})),r=new sT(i,n)}else i=[{name:`value`,type:`float`}],r=new sT(i,n);let o=F(n.get(`data`),fe(_0,t,e,n));e&&(o=ce(o,fe(b0,e)));let s=e?function(e,t,n,r){let a=e.coord[Math.floor(r/2)][r%2];return by(a,i[r])}:function(e,t,n,r){return by(e.value,i[r])};return r.initData(o,null,s),r.hasItemOption=!0,r}function T0(e){e.registerComponentModel(h0),e.registerComponentView(C0),e.registerPreprocessor(function(e){I1(e.series,`markArea`)&&(e.markArea=e.markArea||{})})}const E0=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`])}};var D0=class e extends b_{constructor(...t){super(...t),this.type=e.type,this.layoutMode={type:`box`,ignoreSize:!0}}init(e,t,n){this.mergeDefaultAndTheme(e,n),e.selected=e.selected||{},this._updateSelector(e)}mergeOption(e,t){super.mergeOption(e,t),this._updateSelector(e)}_updateSelector(e){let t=e.selector,{ecModel:n}=this;t===!0&&(t=e.selector=[`all`,`inverse`]),L(t)&&P(t,function(e,r){z(e)&&(e={type:e}),t[r]=A(e,E0(n,e.type))})}optionUpdated(){this._updateData(this.ecModel);let e=this._data;if(e[0]&&this.get(`selectedMode`)===`single`){let t=!1;for(let n=0;n<e.length;n++){let r=e[n].get(`name`);if(this.isSelected(r)){this.select(r),t=!0;break}}!t&&this.select(e[0].get(`name`))}}_updateData(e){let t=[],n=[];e.eachRawSeries(function(r){let i=r.name;n.push(i);let a;if(r.legendVisualProvider){let i=r.legendVisualProvider.getAllNames();e.isSeriesFiltered(r)||(n=n.concat(i)),i.length?t=t.concat(i):a=!0}else a=!0;a&&Ls(r)&&t.push(r.name)}),this._availableNames=n;let r=this.get(`data`)||t,i=U(),a=F(r,function(e){return(z(e)||me(e))&&(e={name:e}),i.get(e.name)?null:(i.set(e.name,!0),new kh(e,this,this.ecModel))},this);this._data=ce(a,e=>!!e)}getData(){return this._data}select(e){let t=this.option.selected;if(this.get(`selectedMode`)===`single`){let e=this._data;P(e,function(e){t[e.get(`name`)]=!1})}t[e]=!0}unSelect(e){this.get(`selectedMode`)!==`single`&&(this.option.selected[e]=!1)}toggleSelected(e){let t=this.option.selected;t.hasOwnProperty(e)||(t[e]=!0),this[t[e]?`unSelect`:`select`](e)}allSelect(){let e=this._data,t=this.option.selected;P(e,function(e){t[e.get(`name`,!0)]=!0})}inverseSelect(){let e=this._data,t=this.option.selected;P(e,function(e){let n=e.get(`name`,!0);t.hasOwnProperty(n)||(t[n]=!0),t[n]=!t[n]})}isSelected(e){let t=this.option.selected;return!(t.hasOwnProperty(e)&&!t[e])&&N(this._availableNames,e)>=0}getOrient(){return this.get(`orient`)===`vertical`?{index:1,name:`vertical`}:{index:0,name:`horizontal`}}};D0.type=`legend.plain`,D0.dependencies=[`series`],D0.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};const O0=fe,k0=P,A0=q;var j0=class e extends Ib{constructor(...t){super(...t),this.type=e.type,this.newlineDisabled=!1}init(){this.group.add(this._contentGroup=new A0),this.group.add(this._selectorGroup=new A0),this._isFirstRender=!0}getContentGroup(){return this._contentGroup}getSelectorGroup(){return this._selectorGroup}render(e,t,n){let r=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!e.get(`show`,!0))return;let i=e.get(`align`),a=e.get(`orient`);(!i||i===`auto`)&&(i=e.get(`left`)===`right`&&a===`vertical`?`right`:`left`);let 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);let c=d_(e,n).refContainer,l=e.getBoxLayoutParams(),u=e.get(`padding`),d=c_(l,c,u),f=this.layoutInner(e,i,d,r,o,s),p=c_(M({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=uQ(f,e))}resetInner(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()}renderInner(e,t,n,r,i,a,o){let s=this.getContentGroup(),c=U(),l=t.get(`selectedMode`),u=t.get(`triggerEvent`),d=[];n.eachRawSeries(function(e){!e.get(`legendHoverLink`)&&d.push(e.id)}),k0(t.getData(),function(i,a){let o=i.get(`name`);if(!this.newlineDisabled&&(o===``||o===`
54
+ `)){let e=new A0;e.newline=!0,s.add(e);return}let f=n.getSeriesByName(o)[0];if(!c.get(o)){if(f){let s=f.getData(),p=s.getVisual(`legendLineStyle`)||{},m=s.getVisual(`legendIcon`),h=s.getVisual(`style`),g=this._createItem(f,o,a,i,t,e,p,h,m,l,r);g.on(`click`,O0(P0,o,null,r,d)).on(`mouseover`,O0(F0,f.name,null,r,d)).on(`mouseout`,O0(I0,f.name,null,r,d)),n.ssr&&g.eachChild(e=>{let t=X(e);t.seriesIndex=f.seriesIndex,t.dataIndex=a,t.ssrType=`legend`}),u&&g.eachChild(e=>{this.packEventData(e,t,f,a,o)}),c.set(o,!0)}else n.eachRawSeries(function(s){if(!c.get(o)&&s.legendVisualProvider){let f=s.legendVisualProvider;if(!f.containName(o))return;let p=f.indexOfName(o),m=f.getItemVisual(p,`style`),h=f.getItemVisual(p,`legendIcon`),g=Ur(m.fill);g&&g[3]===0&&(g[3]=.2,m=j(j({},m),{fill:ei(g,`rgba`)}));let _=this._createItem(s,o,a,i,t,e,{},m,h,l,r);_.on(`click`,O0(P0,null,o,r,d)).on(`mouseover`,O0(F0,null,o,r,d)).on(`mouseout`,O0(I0,null,o,r,d)),n.ssr&&_.eachChild(e=>{let t=X(e);t.seriesIndex=s.seriesIndex,t.dataIndex=a,t.ssrType=`legend`}),u&&_.eachChild(e=>{this.packEventData(e,t,s,a,o)}),c.set(o,!0)}},this);typeof process<`u`&&process.env.NODE_ENV!==`production`&&(c.get(o)||console.warn(o+` series not exists. Legend data should be same with series name or data name.`))}},this),i&&this._createSelector(i,t,r,a,o)}packEventData(e,t,n,r,i){let a={componentType:`legend`,componentIndex:t.componentIndex,dataIndex:r,value:i,seriesIndex:n.seriesIndex};X(e).eventData=a}_createSelector(e,t,n,r,i){let a=this.getSelectorGroup();k0(e,function(e){let r=e.type,i=new qu({style:{x:0,y:0,align:`center`,verticalAlign:`middle`},onclick(){n.dispatchAction({type:r===`all`?`legendAllSelect`:`legendInverseSelect`,legendId:t.id})}});a.add(i),ih(i,{normal:t.getModel(`selectorLabel`),emphasis:t.getModel([`emphasis`,`selectorLabel`])},{defaultText:e.title}),hf(i)})}_createItem(e,t,n,r,i,a,o,s,c,l,u){let 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`;let v=M0(c,r,o,s,d,m,u),y=new A0,b=r.getModel(`textStyle`);if(R(e.getLegendIcon)&&(!_||_===`inherit`))y.add(e.getLegendIcon({itemWidth:f,itemHeight:p,icon:c,iconRotate:h,itemStyle:v.itemStyle,lineStyle:v.lineStyle,symbolKeepAspect:g}));else{let t=_===`inherit`&&e.getData().getVisual(`symbol`)?h===`inherit`?e.getData().getVisual(`symbolRotate`):h:0;y.add(N0({itemWidth:f,itemHeight:p,icon:c,iconRotate:t,itemStyle:v.itemStyle,lineStyle:v.lineStyle,symbolKeepAspect:g}))}let x=a===`left`?f+5:-5,S=a,C=i.get(`formatter`),w=t;z(C)&&C?w=C.replace(`{name}`,t==null?``:t):R(C)&&(w=C(t));let T=m?b.getTextColor():r.get(`inactiveColor`);y.add(new qu({style:oh(b,{text:w,x,y:p/2,fill:T,align:S,verticalAlign:`middle`},{inheritColor:T})}));let E=new Uu({shape:y.getBoundingRect(),style:{fill:`transparent`}}),D=r.getModel(`tooltip`);return D.get(`show`)&&Bm({el:E,componentModel:i,itemName:t,itemTooltipOption:D.option}),y.add(E),y.eachChild(function(e){e.silent=!0}),E.silent=!l,this.getContentGroup().add(y),hf(y),y.__legendDataIndex=n,y}layoutInner(e,t,n,r,i,a){let o=this.getContentGroup(),s=this.getSelectorGroup();i_(e.get(`orient`),o,e.get(`itemGap`),n.width,n.height);let c=o.getBoundingRect(),l=[-c.x,-c.y];if(s.markRedraw(),o.markRedraw(),i){i_(`horizontal`,s,e.get(`selectorItemGap`,!0));let t=s.getBoundingRect(),n=[-t.x,-t.y],r=e.get(`selectorButtonGap`,!0),i=e.getOrient().index,u=i===0?`width`:`height`,d=i===0?`height`:`width`,f=i===0?`y`:`x`;a===`end`?n[i]+=c[u]+r:l[i]+=t[u]+r,n[1-i]+=c[d]/2-t[d]/2,s.x=n[0],s.y=n[1],o.x=l[0],o.y=l[1];let p={x:0,y:0};return p[u]=c[u]+r+t[u],p[d]=Math.max(c[d],t[d]),p[f]=Math.min(0,t[f]+n[1-i]),p}return o.x=l[0],o.y=l[1],this.group.getBoundingRect()}remove(){this.getContentGroup().removeAll(),this._isFirstRender=!0}};j0.type=`legend.plain`;function M0(e,t,n,r,i,a,o){function s(e,t){e.lineWidth===`auto`&&(e.lineWidth=t.lineWidth>0?2:0),k0(e,(n,r)=>{e[r]===`inherit`&&(e[r]=t[r])})}let 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:JS(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);let 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){let e=t.get(`inactiveBorderWidth`),n=l[u];l.lineWidth=e===`auto`?r.lineWidth>0&&n?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 N0(e){let t=e.icon||`roundRect`,n=lS(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 P0(e,t,n,r){I0(e,t,n,r),n.dispatchAction({type:`legendToggleSelect`,name:e==null?t:e}),F0(e,t,n,r)}function F0(e,t,n,r){n.usingTHL()||n.dispatchAction({type:`highlight`,seriesName:e,name:t,excludeSeriesId:r})}function I0(e,t,n,r){n.usingTHL()||n.dispatchAction({type:`downplay`,seriesName:e,name:t,excludeSeriesId:r})}function L0(e,t,n){let r=e===`allSelect`||e===`inverseSelect`,i={},a=[];n.eachComponent({mainType:`legend`,query:t},function(n){r?n[e]():n[e](t.name),R0(n,i),a.push(n.componentIndex)});let o={};return n.eachComponent(`legend`,function(e){P(i,function(t,n){e[t?`select`:`unSelect`](n)}),R0(e,o)}),r?{selected:o,legendIndex:a}:{name:t.name,selected:o}}function R0(e,t){let n=t||{};return P(e.getData(),function(t){let r=t.get(`name`);if(r===`
55
+ `||r===``)return;let i=e.isSelected(r);W(n,r)?n[r]=n[r]&&i:n[r]=i}),n}function z0(e){e.registerAction(`legendToggleSelect`,`legendselectchanged`,fe(L0,`toggleSelected`)),e.registerAction(`legendAllSelect`,`legendselectall`,fe(L0,`allSelect`)),e.registerAction(`legendInverseSelect`,`legendinverseselect`,fe(L0,`inverseSelect`)),e.registerAction(`legendSelect`,`legendselected`,fe(L0,`select`)),e.registerAction(`legendUnSelect`,`legendunselected`,fe(L0,`unSelect`))}const B0=Sc(V0);function V0(e){let t=e.findComponents({mainType:`legend`});t&&t.length&&e.filterSeries(function(e){for(let n=0;n<t.length;n++)if(!t[n].isSelected(e.name))return!1;return!0})}function H0(e){e.registerComponentModel(D0),e.registerComponentView(j0),e.registerProcessor(e.PRIORITY.PROCESSOR.SERIES_FILTER,B0),e.registerSubTypeDefaulter(`legend`,function(){return`plain`}),z0(e)}var U0=class e extends D0{constructor(...t){super(...t),this.type=e.type}setScrollDataIndex(e){this.option.scrollDataIndex=e}init(e,t,n){let r=g_(e);super.init(e,t,n),W0(this,e,r)}mergeOption(e,t){super.mergeOption(e,t),W0(this,this.option,e)}};U0.type=`legend.scroll`,U0.defaultOption=Ph(D0.defaultOption,{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:`end`,pageFormatter:`{current}/{total}`,pageIcons:{horizontal:[`M0,0L12,-10L12,10z`,`M0,0L-12,-10L-12,10z`],vertical:[`M0,0L20,0L10,-20z`,`M0,0L20,0L10,20z`]},pageIconColor:Q.color.accent50,pageIconInactiveColor:Q.color.accent10,pageIconSize:15,pageTextStyle:{color:Q.color.tertiary},animationDurationUpdate:800});function W0(e,t,n){let r=e.getOrient(),i=[1,1];i[r.index]=0,h_(t,n,{type:`box`,ignoreSize:!!i})}const G0=q,K0=[`width`,`height`],q0=[`x`,`y`];var J0=class e extends j0{constructor(...t){super(...t),this.type=e.type,this.newlineDisabled=!0,this._currentIndex=0}init(){super.init(),this.group.add(this._containerGroup=new G0),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new G0)}resetInner(){super.resetInner(),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null}renderInner(e,t,n,r,i,a,o){let s=this;super.renderInner(e,t,n,r,i,a,o);let c=this._controllerGroup,l=t.get(`pageIconSize`,!0),u=L(l)?l:[l,l];f(`pagePrev`,0);let d=t.getModel(`pageTextStyle`);c.add(new qu({name:`pageText`,style:{text:`xx/xx`,fill:d.getTextColor(),font:d.getFont(),verticalAlign:`middle`,align:`center`},silent:!0})),f(`pageNext`,1);function f(e,n){let i=e+`DataIndex`,a=Mm(t.get(`pageIcons`,!0)[t.getOrient().name][n],{onclick:I(s._pageGo,s,i,t,r)},{x:-u[0]/2,y:-u[1]/2,width:u[0],height:u[1]});a.name=e,c.add(a)}}layoutInner(e,t,n,r,i,a){let o=this.getSelectorGroup(),s=e.getOrient().index,c=K0[s],l=q0[s],u=K0[1-s],d=q0[1-s];i&&i_(`horizontal`,o,e.get(`selectorItemGap`,!0));let f=e.get(`selectorButtonGap`,!0),p=o.getBoundingRect(),m=[-p.x,-p.y],h=k(n);i&&(h[c]=n[c]-p[c]-f);let g=this._layoutContentAndController(e,r,h,s,c,u,d,l);if(i){if(a===`end`)m[s]+=g[c]+f;else{let e=p[c]+f;m[s]-=e,g[l]-=e}g[c]+=p[c]+f,m[1-s]+=g[d]+g[u]/2-p[u]/2,g[u]=Math.max(g[u],p[u]),g[d]=Math.min(g[d],p[d]+m[1-s]),o.x=m[0],o.y=m[1],o.markRedraw()}return g}_layoutContentAndController(e,t,n,r,i,a,o,s){let c=this.getContentGroup(),l=this._containerGroup,u=this._controllerGroup;i_(e.get(`orient`),c,e.get(`itemGap`),r?n.width:null,r?null:n.height),i_(`horizontal`,u,e.get(`pageButtonItemGap`,!0));let d=c.getBoundingRect(),f=u.getBoundingRect(),p=this._showController=d[i]>n[i],m=[-d.x,-d.y];t||(m[r]=c[s]);let h=[0,0],g=[-f.x,-f.y],_=V(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);let 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){let e={x:0,y:0};e[i]=Math.max(n[i]-f[i]-_,0),e[a]=v[a],l.setClipPath(new Uu({shape:e})),l.__rectSize=e[i]}else u.eachChild(function(e){e.attr({invisible:!0,silent:!0})});let y=this._getPageInfo(e);return y.pageIndex!=null&&em(c,{x:y.contentPosition[0],y:y.contentPosition[1]},p?e:null),this._updatePageInfoView(e,y),v}_pageGo(e,t,n){let r=this._getPageInfo(t)[e];r!=null&&n.dispatchAction({type:`legendScroll`,scrollDataIndex:r,legendId:t.id})}_updatePageInfoView(e,t){let n=this._controllerGroup;P([`pagePrev`,`pageNext`],function(r){let 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`)});let 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`,z(i)?i.replace(`{current}`,o==null?``:o+``).replace(`{total}`,s==null?``:s+``):i({current:o,total:s}))}_getPageInfo(e){let t=e.get(`scrollDataIndex`,!0),n=this.getContentGroup(),r=this._containerGroup.__rectSize,i=e.getOrient().index,a=K0[i],o=q0[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;let p=m(l);f.contentPosition[i]=-p.s;for(let e=s+1,t=p,n=p,i=null;e<=u;++e)i=m(c[e]),(!i&&n.e>t.s+r||i&&!h(i,t.s))&&(t=n.i>t.i?n:i,t&&(f.pageNextDataIndex==null&&(f.pageNextDataIndex=t.i),++f.pageCount)),n=i;for(let e=s-1,t=p,n=p,r=null;e>=-1;--e)r=m(c[e]),(!r||!h(n,r.s))&&t.i<n.i&&(n=t,f.pagePrevDataIndex==null&&(f.pagePrevDataIndex=t.i),++f.pageCount,++f.pageIndex),t=r;return f;function m(e){if(e){let t=e.getBoundingRect(),n=t[o]+e[o];return{s:n,e:n+t[a],i:e.__legendDataIndex}}}function h(e,t){return e.e>=t&&e.s<=t+r}}_findTargetItemIndex(e){if(!this._showController)return 0;let t,n=this.getContentGroup(),r;return n.eachChild(function(n,i){let a=n.__legendDataIndex;r==null&&a!=null&&(r=i),a===e&&(t=i)}),t==null?r:t}};J0.type=`legend.scroll`;function Y0(e){e.registerAction(`legendScroll`,`legendscroll`,function(e,t){let n=e.scrollDataIndex;n!=null&&t.eachComponent({mainType:`legend`,subType:`scroll`,query:e},function(e){e.setScrollDataIndex(n)})})}function X0(e){BD(H0),e.registerComponentModel(U0),e.registerComponentView(J0),Y0(e)}function Z0(e){BD(H0),BD(X0)}var Q0=class e extends JZ{constructor(...t){super(...t),this.type=e.type}};Q0.type=`dataZoom.inside`,Q0.defaultOption=Ph(JZ.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0});const $0=Y();function e2(e,t,n){$0(e).coordSysRecordMap.each(function(e){let r=e.dataZoomInfoMap.get(t.uid);r&&(r.getRange=n)})}function t2(e,t){let n=$0(e).coordSysRecordMap,r=n.keys();for(let e=0;e<r.length;e++){let i=r[e],a=n.get(i),o=a.dataZoomInfoMap;if(o){let e=t.uid;o.get(e)&&(o.removeKey(e),o.keys().length||n2(n,a))}}}function n2(e,t){if(t){e.removeKey(t.model.uid);let n=t.controller;n&&n.dispose()}}function r2(e,t){let n={model:t,containsPoint:fe(a2,t),dispatchAction:fe(i2,e),dataZoomInfoMap:null,controller:null},r=n.controller=new rF(e.getZr());return P([`pan`,`zoom`,`scrollMove`],function(e){r.on(e,function(t){let r=[];n.dataZoomInfoMap.each(function(i){if(!t.isAvailableBehavior(i.model.option))return;let a=(i.getRange||{})[e],o=a&&a(i.dzReferCoordSysInfo,n.model.mainType,n.controller,t);!i.model.get(`disabled`,!0)&&o&&r.push({dataZoomId:i.model.id,start:o[0],end:o[1]})}),r.length&&n.dispatchAction(r)})}),n}function i2(e,t){e.isDisposed()||e.dispatchAction({type:`dataZoom`,animation:{easing:`cubicOut`,duration:100},batch:t})}function a2(e,t,n,r){return e.coordinateSystem.containPoint([n,r])}function o2(e,t,n){let r,i=`type_`,a={type_true:2,type_move:1,type_false:0,type_undefined:-1},o=!0,s,c;return e.each(function(e){let t=e.model,n=t.get(`disabled`,!0)?!1:!t.get(`zoomLock`,!0)||`move`;a[i+n]>a[i+r]&&(r=n),o=o&&t.get(`preventDefaultMouseMove`,!0),s=V(t.get(`cursorGrab`,!0),s),c=V(t.get(`cursorGrabbing`,!0),c)}),{controlType:r,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!o,api:n,zInfo:{component:t.model},triggerInfo:{roamTrigger:null,isInSelf:t.containsPoint},cursorGrab:s,cursorGrabbing:c}}}function s2(e){e.registerUpdateLifecycle(`coordsys:aftercreate`,(e,t)=>{let n=$0(t),r=n.coordSysRecordMap||(n.coordSysRecordMap=U());r.each(function(e){e.dataZoomInfoMap=null}),e.eachComponent({mainType:`dataZoom`,subType:`inside`},function(e){P(HZ(e).infoList,function(n){let i=n.model.uid,a=r.get(i)||r.set(i,r2(t,n.model));(a.dataZoomInfoMap||(a.dataZoomInfoMap=U())).set(e.uid,{dzReferCoordSysInfo:n,model:e,getRange:null})})}),r.each(function(e){let n=e.controller,i,a=e.dataZoomInfoMap;if(a){let e=a.keys()[0];e!=null&&(i=a.get(e))}if(!i){n2(r,e);return}let o=o2(a,e,t);n.enable(o.controlType,o.opt),Zb(e,`dispatchAction`,i.model.get(`throttle`,!0),`fixRate`)})})}var c2=class extends ZZ{constructor(...e){super(...e),this.type=`dataZoom.inside`}render(e,t,n){super.render.apply(this,arguments),e.noTarget()?this._clear():(this.range=e.getPercentRange(),e2(n,e,{pan:I(l2.pan,this),zoom:I(l2.zoom,this),scrollMove:I(l2.scrollMove,this)}))}dispose(){this._clear(),super.dispose.apply(this,arguments)}_clear(){t2(this.api,this.dataZoomModel),this.range=null}};c2.type=`dataZoom.inside`;const l2={zoom(e,t,n,r){let i=this.range,a=i.slice(),o=e.axisModels[0];if(!o)return;let s=d2[t](null,[r.originX,r.originY],o,n,e),c=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(a[1]-a[0])+a[0],l=Math.max(1/r.scale,0);a[0]=(a[0]-c)*l+c,a[1]=(a[1]-c)*l+c;let u=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(_H(0,a,[0,100],0,u.minSpan,u.maxSpan),this.range=a,i[0]!==a[0]||i[1]!==a[1])return a},pan:u2(function(e,t,n,r,i,a){let o=d2[r]([a.oldX,a.oldY],[a.newX,a.newY],t,i,n);return o.signal*(e[1]-e[0])*o.pixel/o.pixelLength}),scrollMove:u2(function(e,t,n,r,i,a){return d2[r]([0,0],[a.scrollDelta,a.scrollDelta],t,i,n).signal*(e[1]-e[0])*a.scrollDelta})};function u2(e){return function(t,n,r,i){let a=this.range,o=a.slice(),s=t.axisModels[0];if(s&&(_H(e(o,s,t,n,r,i),o,[0,100],`all`),this.range=o,a[0]!==o[0]||a[1]!==o[1]))return o}}const d2={grid(e,t,n,r,i){let a=n.axis,o={},s=i.model.coordinateSystem.getRect();return e=e||[0,0],a.dim===`x`?(o.pixel=t[0]-e[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=a.inverse?1:-1):(o.pixel=t[1]-e[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=a.inverse?-1:1),o},polar(e,t,n,r,i){let a=n.axis,o={},s=i.model.coordinateSystem,c=s.getRadiusAxis().getExtent(),l=s.getAngleAxis().getExtent();return e=e?s.pointToCoord(e):[0,0],t=s.pointToCoord(t),n.mainType===`radiusAxis`?(o.pixel=t[0]-e[0],o.pixelLength=c[1]-c[0],o.pixelStart=c[0],o.signal=a.inverse?1:-1):(o.pixel=t[1]-e[1],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=a.inverse?-1:1),o},singleAxis(e,t,n,r,i){let a=n.axis,o=i.model.coordinateSystem.getRect(),s={};return e=e||[0,0],a.orient===`horizontal`?(s.pixel=t[0]-e[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=a.inverse?1:-1):(s.pixel=t[1]-e[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=a.inverse?-1:1),s}};function f2(e){rQ(e),e.registerComponentModel(Q0),e.registerComponentView(c2),s2(e)}var p2=class e extends JZ{constructor(...t){super(...t),this.type=e.type}};p2.type=`dataZoom.slider`,p2.layoutMode=`box`,p2.defaultOption=Ph(JZ.defaultOption,{show:!0,right:`ph`,top:`ph`,width:`ph`,height:`ph`,left:null,bottom:null,borderColor:Q.color.accent10,borderRadius:0,backgroundColor:Q.color.transparent,dataBackground:{lineStyle:{color:Q.color.accent30,width:.5},areaStyle:{color:Q.color.accent20,opacity:.2}},selectedDataBackground:{lineStyle:{color:Q.color.accent40,width:.5},areaStyle:{color:Q.color.accent20,opacity:.3}},fillerColor:`rgba(135,175,274,0.2)`,handleIcon:`path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z`,handleSize:`100%`,handleStyle:{color:Q.color.neutral00,borderColor:Q.color.accent20},moveHandleSize:7,moveHandleIcon:`path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z`,moveHandleStyle:{color:Q.color.accent40,opacity:.5},showDetail:!0,showDataShadow:`auto`,realtime:!0,zoomLock:!1,textStyle:{color:Q.color.tertiary},brushSelect:!0,brushStyle:{color:Q.color.accent30,opacity:.3},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:Q.color.accent40},moveHandleStyle:{opacity:.8}},defaultLocationEdgeGap:15});const m2=Uu,h2=`horizontal`,g2=`vertical`,_2=[`line`,`bar`,`candlestick`,`scatter`],v2={easing:`cubicOut`,duration:100,delay:0};var y2=class e extends ZZ{constructor(...t){super(...t),this.type=e.type,this._displayables={}}init(e,t){this.api=t,this._onBrush=I(this._onBrush,this),this._onBrushEnd=I(this._onBrushEnd,this)}render(e,t,n,r){super.render.apply(this,arguments),Zb(this,`_dispatchZoomAction`,e.get(`throttle`),`fixRate`),this._orient=e.getOrient(),e.get(`show`)===!1?this.group.removeAll():e.noTarget()?(this._clear(),this.group.removeAll()):((!r||r.type!==`dataZoom`||r.from!==this.uid)&&this._buildView(),this._updateView())}dispose(){this._clear(),super.dispose.apply(this,arguments)}_clear(){Qb(this,`_dispatchZoomAction`);let e=this.api.getZr();e.off(`mousemove`,this._onBrush),e.off(`mouseup`,this._onBrushEnd)}_buildView(){let e=this.group;e.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();let t=this._displayables.sliderGroup=new q;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),e.add(t),this._positionGroup()}_resetLocation(){let e=this.dataZoomModel,t=this.api,n=e.get(`brushSelect`)?7:0,r=d_(e,t).refContainer,i=this._findCoordRect(),a=e.get(`defaultLocationEdgeGap`,!0)||0,o=this._orient===h2?{right:r.width-i.x-i.width,top:r.height-30-a-n,width:i.width,height:30}:{right:a,top:i.y,width:30,height:i.height},s=g_(e.option);P([`right`,`top`,`width`,`height`],function(e){s[e]===`ph`&&(s[e]=o[e])});let c=c_(s,r);this._location={x:c.x,y:c.y},this._size=[c.width,c.height],this._orient===g2&&this._size.reverse()}_positionGroup(){let e=this.group,t=this._location,n=this._orient,r=this.dataZoomModel.getFirstTargetAxisModel(),i=r&&r.get(`inverse`),a=this._displayables.sliderGroup,o=(this._dataShadowInfo||{}).otherAxisInverse;a.attr(n===h2&&!i?{scaleY:o?1:-1,scaleX:1}:n===h2&&i?{scaleY:o?1:-1,scaleX:-1}:n===g2&&!i?{scaleY:o?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:o?-1:1,scaleX:-1,rotation:Math.PI/2});let s=e.getBoundingRect([a]),c=isNaN(s.x)?0:s.x,l=isNaN(s.y)?0:s.y;e.x=t.x-c,e.y=t.y-l,e.markRedraw()}_getViewExtent(){return[0,this._size[0]]}_renderBackground(){let e=this.dataZoomModel,t=this._size,n=this._displayables.sliderGroup,r=e.get(`brushSelect`);n.add(new m2({silent:!0,shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:e.get(`backgroundColor`)},z2:-40}));let i=new m2({shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:`transparent`},z2:0,onclick:I(this._onClickPanel,this)}),a=this.api.getZr();r?(i.on(`mousedown`,this._onBrushStart,this),i.cursor=`crosshair`,a.on(`mousemove`,this._onBrush),a.on(`mouseup`,this._onBrushEnd)):(a.off(`mousemove`,this._onBrush),a.off(`mouseup`,this._onBrushEnd)),n.add(i)}_renderDataShadow(){let e=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!e)return;let t=this._size,n=this._shadowSize||[],r=e.series,i=r.getRawData(),a=r.getShadowDim&&r.getShadowDim(),o=a&&i.getDimensionInfo(a)?r.getShadowDim():e.otherDim;if(o==null)return;let s=this._shadowPolygonPts,c=this._shadowPolylinePts;if(i!==this._shadowData||o!==this._shadowDim||t[0]!==n[0]||t[1]!==n[1]){let n=i.getDataExtent(e.thisDim),r=i.getDataExtent(o),a=(r[1]-r[0])*.3;r=[r[0]-a,r[1]+a];let l=[0,t[1]],u=[0,t[0]],d=[[t[0],0],[0,0]],f=[],p=u[1]/Math.max(1,i.count()-1),m=t[0]/(n[1]-n[0]),h=e.thisAxis.type===`time`,g=-p,_=Math.round(i.count()/t[0]),v;i.each([e.thisDim,o],function(e,t,i){if(_>0&&i%_){h||(g+=p);return}g=h?(+e-n[0])*m:g+p;let a=t==null||isNaN(t)||t===``,o=a?0:Ao(t,r,l,!0);a&&!v&&i?(d.push([d[d.length-1][0],0]),f.push([f[f.length-1][0],0])):!a&&v&&(d.push([g,0]),f.push([g,0])),a||(d.push([g,o]),f.push([g,o])),v=a}),s=this._shadowPolygonPts=d,c=this._shadowPolylinePts=f}this._shadowData=i,this._shadowDim=o,this._shadowSize=[t[0],t[1]];let l=this.dataZoomModel;function u(e){let t=l.getModel(e?`selectedDataBackground`:`dataBackground`),n=new q,r=new wp({shape:{points:s},segmentIgnoreThreshold:1,style:t.getModel(`areaStyle`).getAreaStyle(),silent:!0,z2:-20}),i=new Ep({shape:{points:c},segmentIgnoreThreshold:1,style:t.getModel(`lineStyle`).getLineStyle(),silent:!0,z2:-19});return n.add(r),n.add(i),n}for(let e=0;e<3;e++){let t=u(e===1);this._displayables.sliderGroup.add(t),this._displayables.dataShadowSegs.push(t)}}_prepareDataShadowInfo(){let e=this.dataZoomModel,t=e.get(`showDataShadow`);if(t===!1)return;let n,r=this.ecModel;return e.eachTargetAxis(function(i,a){P(e.getAxisProxy(i,a).getTargetSeriesModels(),function(e){if(n||t!==!0&&N(_2,e.get(`type`))<0)return;let o=r.getComponent(BZ(i),a).axis,s=x2(i),c,l=e.coordinateSystem;s!=null&&l.getOtherAxis&&(c=l.getOtherAxis(o).inverse),s=e.getData().mapDimension(s),n={thisAxis:o,series:e,thisDim:e.getData().mapDimension(i),otherDim:s,otherAxisInverse:c}},this)},this),n}_renderHandle(){let e=this.group,t=this._displayables,n=t.handles=[null,null],r=t.handleLabels=[null,null],i=this._displayables.sliderGroup,a=this._size,o=this.dataZoomModel,s=this.api,c=o.get(`borderRadius`)||0,l=o.get(`brushSelect`),u=t.filler=new m2({silent:l,style:{fill:o.get(`fillerColor`)},textConfig:{position:`inside`}});i.add(u),i.add(new m2({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:a[0],height:a[1],r:c},style:{stroke:o.get(`dataBackgroundColor`)||o.get(`borderColor`),lineWidth:1,fill:Q.color.transparent}})),P([0,1],function(t){let a=o.get(`handleIcon`);!oS[a]&&a.indexOf(`path://`)<0&&a.indexOf(`image://`)<0&&(a=`path://`+a,typeof process<`u`&&process.env.NODE_ENV!==`production`&&ps(`handleIcon now needs 'path://' prefix when using a path string`));let s=lS(a,-1,0,2,2,null,!0);s.attr({cursor:S2(this._orient),draggable:!0,drift:I(this._onDragMove,this,t),ondragend:I(this._onDragEnd,this),onmouseover:I(this._onOverDataInfoTriggerArea,this,!0),onmouseout:I(this._onOverDataInfoTriggerArea,this,!1),z2:5});let c=s.getBoundingRect(),l=o.get(`handleSize`);this._handleHeight=J(l,this._size[1]),this._handleWidth=c.width/c.height*this._handleHeight,s.setStyle(o.getModel(`handleStyle`).getItemStyle()),s.style.strokeNoScale=!0,s.rectHover=!0,s.ensureState(`emphasis`).style=o.getModel([`emphasis`,`handleStyle`]).getItemStyle(),hf(s);let u=o.get(`handleColor`);u!=null&&(s.style.fill=u),i.add(n[t]=s);let d=o.getModel(`textStyle`),f=(o.get(`handleLabel`)||{}).show||!1;e.add(r[t]=new qu({silent:!0,invisible:!f,style:oh(d,{x:0,y:0,text:``,verticalAlign:`middle`,align:`center`,fill:d.getTextColor(),font:d.getFont()}),z2:10}))},this);let d=u;if(l){let e=J(o.get(`moveHandleSize`),a[1]),n=t.moveHandle=new Uu({style:o.getModel(`moveHandleStyle`).getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:a[1]-.5,height:e}}),r=e*.8,c=t.moveHandleIcon=lS(o.get(`moveHandleIcon`),-r/2,-r/2,r,r,Q.color.neutral00,!0);c.silent=!0,c.y=a[1]+e/2-.5,n.ensureState(`emphasis`).style=o.getModel([`emphasis`,`moveHandleStyle`]).getItemStyle();let l=Math.min(a[1]/2,Math.max(e,10));d=t.moveZone=new Uu({invisible:!0,shape:{y:a[1]-l,height:e+l}}),d.on(`mouseover`,()=>{s.enterEmphasis(n)}).on(`mouseout`,()=>{s.leaveEmphasis(n)}),i.add(n),i.add(c),i.add(d)}d.attr({draggable:!0,cursor:`grab`,drift:I(this._onActualMoveZoneDrift,this),ondragstart:I(this._onActualMoveZoneDragStart,this),ondragend:I(this._onActualMoveZoneDragEnd,this),onmouseover:I(this._onOverDataInfoTriggerArea,this,!0),onmouseout:I(this._onOverDataInfoTriggerArea,this,!1)})}_resetInterval(){let e=this._range=this.dataZoomModel.getPercentRange(),t=this._getViewExtent();this._handleEnds=[Ao(e[0],[0,100],t,!0),Ao(e[1],[0,100],t,!0)]}_updateInterval(e,t){let n=this.dataZoomModel,r=this._handleEnds,i=this._getViewExtent(),a=n.findRepresentativeAxisProxy().getMinMaxSpan(),o=[0,100];_H(t,r,i,n.get(`zoomLock`)?`all`:e,a.minSpan==null?null:Ao(a.minSpan,o,i,!0),a.maxSpan==null?null:Ao(a.maxSpan,o,i,!0));let s=this._range,c=this._range=Lo([Ao(r[0],i,o,!0),Ao(r[1],i,o,!0)]);return!s||s[0]!==c[0]||s[1]!==c[1]}_updateView(e){let t=this._displayables,n=this._handleEnds,r=Lo(n.slice()),i=this._size;P([0,1],function(e){let r=t.handles[e],a=this._handleHeight;r.attr({scaleX:a/2,scaleY:a/2,x:n[e]+(e?-1:1),y:i[1]/2-a/2})},this),t.filler.setShape({x:r[0],y:0,width:r[1]-r[0],height:i[1]});let a={x:r[0],width:r[1]-r[0]};t.moveHandle&&(t.moveHandle.setShape(a),t.moveZone.setShape(a),t.moveZone.getBoundingRect(),t.moveHandleIcon&&t.moveHandleIcon.attr(`x`,a.x+a.width/2));let o=t.dataShadowSegs,s=[0,r[0],r[1],i[0]];for(let e=0;e<o.length;e++){let t=o[e],n=t.getClipPath();n||(n=new Uu,t.setClipPath(n)),n.setShape({x:s[e],y:0,width:s[e+1]-s[e],height:i[1]})}this._updateDataInfo(e)}_updateDataInfo(e){let t=this.dataZoomModel,n=this._displayables,r=n.handleLabels,i=this._orient,a=[``,``];if(t.get(`showDetail`)){let n=t.findRepresentativeAxisProxy(),r=n.getAxisModel().axis.scale;if(n){let i=this._range,o;if(e){let e={start:i[0],end:i[1]},r=KZ(t,n);if(r){let t=r.calculateDataWindow(e).percentInverted;e={start:t[0],end:t[1]}}o=n.calculateDataWindow(e)}else o=n.getWindow();a=[b2(t,0,o,r),b2(t,1,o,r)]}}let o=Lo(this._handleEnds.slice());s.call(this,0),s.call(this,1);function s(e){let t=wm(n.handles[e].parent,this.group),s=Em(e===0?`right`:`left`,t),c=this._handleWidth/2+5,l=Tm([o[e]+(e===0?-c:c),this._size[1]/2],t);r[e].setStyle({x:l[0],y:l[1],verticalAlign:i===h2?`middle`:s,align:i===h2?s:`center`,text:a[e]})}}_onOverDataInfoTriggerArea(e){this._isOverDataInfoTriggerArea=e,this._showDataInfo(e)}_showDataInfo(e){let t=(this.dataZoomModel.get(`handleLabel`)||{}).show||!1,n=this.dataZoomModel.getModel([`emphasis`,`handleLabel`]).get(`show`)||!1,r=e||this._dragging?n:t,i=this._displayables,a=i.handleLabels;a[0].attr(`invisible`,!r),a[1].attr(`invisible`,!r),i.moveHandle&&this.api[r?`enterEmphasis`:`leaveEmphasis`](i.moveHandle,1)}_onActualMoveZoneDrift(e,t,n){this.api.getZr().setCursorStyle(`grabbing`),this._onDragMove(`all`,e,t,n)}_onActualMoveZoneDragStart(e){e.target.attr(`cursor`,`grabbing`),this._showDataInfo(!0)}_onActualMoveZoneDragEnd(e){e.target.attr(`cursor`,`grab`),this._onDragEnd()}_onDragMove(e,t,n,r){this._dragging=!0,zt(r.event);let i=this._displayables.sliderGroup.getLocalTransform(),a=Tm([t,n],i,!0),o=this._updateInterval(e,a[0]),s=this.dataZoomModel.get(`realtime`);this._updateView(!s),o&&s&&this._dispatchZoomAction(!0)}_onDragEnd(){this._dragging=!1,this._isOverDataInfoTriggerArea||this._showDataInfo(!1),!this.dataZoomModel.get(`realtime`)&&this._dispatchZoomAction(!1)}_onClickPanel(e){let t=this._size,n=this._displayables.sliderGroup.transformCoordToLocal(e.offsetX,e.offsetY);if(n[0]<0||n[0]>t[0]||n[1]<0||n[1]>t[1])return;let r=this._handleEnds,i=(r[0]+r[1])/2,a=this._updateInterval(`all`,n[0]-i);this._updateView(),a&&this._dispatchZoomAction(!1)}_onBrushStart(e){let t=e.offsetX,n=e.offsetY;this._brushStart=new G(t,n),this._brushing=!0,this._brushStartTime=+/* @__PURE__ */ new Date}_onBrushEnd(e){if(!this._brushing)return;let t=this._displayables.brushRect;if(this._brushing=!1,!t)return;t.attr(`ignore`,!0);let n=t.shape;if(+/* @__PURE__ */ new Date-this._brushStartTime<200&&Math.abs(n.width)<5)return;let r=this._getViewExtent(),i=[0,100],a=this._handleEnds=[n.x,n.x+n.width],o=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();_H(0,a,r,0,o.minSpan==null?null:Ao(o.minSpan,i,r,!0),o.maxSpan==null?null:Ao(o.maxSpan,i,r,!0)),this._range=Lo([Ao(a[0],r,i,!0),Ao(a[1],r,i,!0)]),this._updateView(),this._dispatchZoomAction(!1)}_onBrush(e){this._brushing&&(zt(e.event),this._updateBrushRect(e.offsetX,e.offsetY))}_updateBrushRect(e,t){let n=this._displayables,r=this.dataZoomModel,i=n.brushRect;i||(i=n.brushRect=new m2({silent:!0,style:r.getModel(`brushStyle`).getItemStyle()}),n.sliderGroup.add(i)),i.attr(`ignore`,!1);let a=this._brushStart,o=this._displayables.sliderGroup,s=o.transformCoordToLocal(e,t),c=o.transformCoordToLocal(a.x,a.y),l=this._size;s[0]=Math.max(Math.min(l[0],s[0]),0),i.setShape({x:c[0],y:0,width:s[0]-c[0],height:l[1]})}_dispatchZoomAction(e){let t=this._range;this.api.dispatchAction({type:`dataZoom`,from:this.uid,dataZoomId:this.dataZoomModel.id,animation:e?v2:null,start:t[0],end:t[1]})}_findCoordRect(){let e,t=HZ(this.dataZoomModel).infoList;if(!e&&t.length){let n=t[0].model.coordinateSystem;e=n.getRect&&n.getRect()}if(!e){let t=this.api.getWidth(),n=this.api.getHeight();e={x:t*.2,y:n*.2,width:t*.6,height:n*.6}}return e}};y2.type=`dataZoom.slider`;function b2(e,t,n,r){let i=e.get(`labelFormatter`),a=e.get(`labelPrecision`);(a==null||a===`auto`)&&(a=n.valuePrecision);let o=n.value[t],s=o==null||isNaN(o)?``:WT(r)||HT(r)?r.getLabel({value:Math.round(o)}):isFinite(a)?Fo(o,a,!0):o+``;return R(i)?i(o,s):z(i)?i.replace(`{value}`,s):s}function x2(e){return{x:`y`,y:`x`,radius:`angle`,angle:`radius`}[e]}function S2(e){return e===`vertical`?`ns-resize`:`ew-resize`}function C2(e){e.registerComponentModel(p2),e.registerComponentView(y2),rQ(e)}function w2(e){BD(f2),BD(C2)}const T2={get:function(e,t,n){let r=k((E2[e]||{})[t]);return n&&L(r)?r[r.length-1]:r}},E2={color:{active:[`#006edd`,`#e0ffff`],inactive:[Q.color.transparent]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:[`circle`,`roundRect`,`diamond`],inactive:[`none`]},symbolSize:{active:[10,50],inactive:[0,0]}},D2=Oz.mapVisual,O2=Oz.eachVisual,k2=L,A2=P,j2=Lo,M2=Ao;var N2=class e extends b_{constructor(...t){super(...t),this.type=e.type,this.stateList=[`inRange`,`outOfRange`],this.replacableOptionKeys=[`inRange`,`outOfRange`,`target`,`controller`,`color`],this.layoutMode={type:`box`,ignoreSize:!0},this.dataBound=[-1/0,1/0],this.targetVisuals={},this.controllerVisuals={}}init(e,t,n){this.mergeDefaultAndTheme(e,n)}optionUpdated(e,t){let n=this.option;!t&&G$(n,e,this.replacableOptionKeys),this.textStyleModel=this.getModel(`textStyle`),this.resetItemSize(),this.completeVisualOption()}resetVisual(e){let t=this.stateList;e=I(e,this),this.controllerVisuals=W$(this.option.controller,t,e),this.targetVisuals=W$(this.option.target,t,e)}getItemSymbol(){return null}getTargetSeriesIndices(){let e=this.option.seriesTargets;if(e){let t=[];return A2(e,e=>{if(e.seriesIndex!=null)t.push(e.seriesIndex);else if(e.seriesId!=null){let n;this.ecModel.eachSeries(function(t){t.id===e.seriesId&&(n=t)}),n&&t.push(n.componentIndex)}}),t}let t=this.option.seriesId,n=this.option.seriesIndex;n==null&&t==null&&(n=`all`);let r=Ys(this.ecModel,`series`,{index:n,id:t},{useDefault:!1,enableAll:!0,enableNone:!1}).models;return F(r,e=>e.componentIndex)}eachTargetSeries(e,t){P(this.getTargetSeriesIndices(),function(n){let r=this.ecModel.getSeriesByIndex(n);r&&e.call(t,r)},this)}isTargetSeries(e){let t=!1;return this.eachTargetSeries(function(n){n===e&&(t=!0)}),t}formatValueText(e,t,n){let r=this.option,i=r.precision,a=this.dataBound,o=r.formatter,s;n=n||[`<`,`>`],L(e)&&(e=e.slice(),s=!0);let c=t?e:s?[l(e[0]),l(e[1])]:l(e);return z(o)?o.replace(`{value}`,s?c[0]:c).replace(`{value2}`,s?c[1]:c):R(o)?s?o(e[0],e[1]):o(e):s?e[0]===a[0]?n[0]+` `+c[1]:e[1]===a[1]?n[1]+` `+c[0]:c[0]+` - `+c[1]:c;function l(e){return e===a[0]?`min`:e===a[1]?`max`:(+e).toFixed(Math.min(i,20))}}resetExtent(){let e=this.option,t=j2([e.min,e.max]);this._dataExtent=t}getDimension(e){let t=this.option.seriesTargets;if(t){let n=le(t,t=>t.seriesIndex!=null&&t.seriesIndex===e||t.seriesId!=null&&t.seriesId===this.ecModel.getSeriesByIndex(e).id);if(n)return n.dimension}return this.option.dimension}getDataDimensionIndex(e){let t=e.hostModel.seriesIndex,n=this.getDimension(t);if(n!=null)return e.getDimensionIndex(n);let r=e.dimensions;for(let t=r.length-1;t>=0;t--){let n=r[t],i=e.getDimensionInfo(n);if(!i.isCalculationCoord)return i.storeDimIndex}}getExtent(){return this._dataExtent.slice()}completeVisualOption(){let e=this.ecModel,t=this.option,n={inRange:t.inRange,outOfRange:t.outOfRange},r=t.target||(t.target={}),i=t.controller||(t.controller={});A(r,n),A(i,n);let a=this.isCategory();o.call(this,r),o.call(this,i),s.call(this,r,`inRange`,`outOfRange`),c.call(this,i);function o(n){k2(t.color)&&!n.inRange&&(n.inRange={color:t.color.slice().reverse()}),n.inRange=n.inRange||{color:e.get(`gradientColor`)}}function s(e,t,n){let r=e[t],i=e[n];r&&!i&&(i=e[n]={},A2(r,function(e,t){if(!Oz.isValidType(t))return;let n=T2.get(t,`inactive`,a);n!=null&&(i[t]=n,t===`color`&&!i.hasOwnProperty(`opacity`)&&!i.hasOwnProperty(`colorAlpha`)&&(i.opacity=[0,0]))}))}function c(e){let t=(e.inRange||{}).symbol||(e.outOfRange||{}).symbol,n=(e.inRange||{}).symbolSize||(e.outOfRange||{}).symbolSize,r=this.get(`inactiveColor`),i=this.getItemSymbol()||`roundRect`;A2(this.stateList,function(o){let s=this.itemSize,c=e[o];c||(c=e[o]={color:a?r:[r]}),c.symbol==null&&(c.symbol=t&&k(t)||(a?i:[i])),c.symbolSize==null&&(c.symbolSize=n&&k(n)||(a?s[0]:[s[0],s[0]])),c.symbol=D2(c.symbol,function(e){return e===`none`?i:e});let l=c.symbolSize;if(l!=null){let e=-1/0;O2(l,function(t){t>e&&(e=t)}),c.symbolSize=D2(l,function(t){return M2(t,[0,e],[0,s[0]],!0)})}},this)}}resetItemSize(){this.itemSize=[parseFloat(this.get(`itemWidth`)),parseFloat(this.get(`itemHeight`))]}isCategory(){return!!this.option.categories}setSelected(e){}getSelected(){return null}getValueState(e){return null}getVisualMeta(e){return null}};N2.type=`visualMap`,N2.dependencies=[`series`],N2.defaultOption={show:!0,z:4,min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:`vertical`,backgroundColor:Q.color.transparent,borderColor:Q.color.borderTint,contentColor:Q.color.theme[0],inactiveColor:Q.color.disabled,borderWidth:0,padding:Q.size.m,textGap:10,precision:0,textStyle:{color:Q.color.secondary}};const P2=[20,140];var F2=class e extends N2{constructor(...t){super(...t),this.type=e.type}optionUpdated(e,t){super.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(e){e.mappingMethod=`linear`,e.dataExtent=this.getExtent()}),this._resetRange()}resetItemSize(){super.resetItemSize.apply(this,arguments);let e=this.itemSize;(e[0]==null||isNaN(e[0]))&&(e[0]=P2[0]),(e[1]==null||isNaN(e[1]))&&(e[1]=P2[1])}_resetRange(){let e=this.getExtent(),t=this.option.range;!t||t.auto?(e.auto=1,this.option.range=e):L(t)&&(t[0]>t[1]&&t.reverse(),t[0]=Math.max(t[0],e[0]),t[1]=Math.min(t[1],e[1]))}completeVisualOption(){super.completeVisualOption.apply(this,arguments),P(this.stateList,function(e){let t=this.option.controller[e].symbolSize;t&&t[0]!==t[1]&&(t[0]=t[1]/3)},this)}setSelected(e){this.option.range=e.slice(),this._resetRange()}getSelected(){let e=this.getExtent(),t=Lo((this.get(`range`)||[]).slice());return t[0]>e[1]&&(t[0]=e[1]),t[1]>e[1]&&(t[1]=e[1]),t[0]<e[0]&&(t[0]=e[0]),t[1]<e[0]&&(t[1]=e[0]),t}getValueState(e){let t=this.option.range,n=this.getExtent(),r=V(this.option.unboundedRange,!0);return(r&&t[0]<=n[0]||t[0]<=e)&&(r&&t[1]>=n[1]||e<=t[1])?`inRange`:`outOfRange`}findTargetDataIndices(e){let t=[];return this.eachTargetSeries(function(n){let r=[],i=n.getData();i.each(this.getDataDimensionIndex(i),function(t,n){e[0]<=t&&t<=e[1]&&r.push(n)},this),t.push({seriesId:n.id,dataIndex:r})},this),t}getVisualMeta(e){let t=I2(this,`outOfRange`,this.getExtent()),n=I2(this,`inRange`,this.option.range.slice()),r=[];function i(t,n){r.push({value:t,color:e(t,n)})}let a=0,o=0,s=n.length,c=t.length;for(;o<c&&(!n.length||t[o]<=n[0]);o++)t[o]<n[a]&&i(t[o],`outOfRange`);for(let e=1;a<s;a++,e=0)e&&r.length&&i(n[a],`outOfRange`),i(n[a],`inRange`);for(let e=1;o<c;o++)(!n.length||n[n.length-1]<t[o])&&(e&&(r.length&&i(r[r.length-1].value,`outOfRange`),e=0),i(t[o],`outOfRange`));let l=r.length;return{stops:r,outerColors:[l?r[0].color:`transparent`,l?r[l-1].color:`transparent`]}}};F2.type=`visualMap.continuous`,F2.defaultOption=Ph(N2.defaultOption,{align:`auto`,calculable:!1,hoverLink:!0,realtime:!0,handleIcon:`path://M-11.39,9.77h0a3.5,3.5,0,0,1-3.5,3.5h-22a3.5,3.5,0,0,1-3.5-3.5h0a3.5,3.5,0,0,1,3.5-3.5h22A3.5,3.5,0,0,1-11.39,9.77Z`,handleSize:`120%`,handleStyle:{borderColor:Q.color.neutral00,borderWidth:1},indicatorIcon:`circle`,indicatorSize:`50%`,indicatorStyle:{borderColor:Q.color.neutral00,borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:Q.color.shadow}});function I2(e,t,n){if(n[0]===n[1])return n.slice();let r=(n[1]-n[0])/200,i=n[0],a=[];for(let e=0;e<=200&&i<n[1];e++)a.push(i),i+=r;return a.push(n[1]),a}var L2=class e extends Ib{constructor(...t){super(...t),this.type=e.type,this.autoPositionValues={left:1,right:1,top:1,bottom:1}}init(e,t){this.ecModel=e,this.api=t}render(e,t,n,r){this.visualMapModel=e,e.get(`show`)===!1?this.group.removeAll():this.doRender(e,t,n,r)}renderBackground(e){let t=this.visualMapModel,n=Ng(t.get(`padding`)||0),r=e.getBoundingRect();e.add(new Uu({z2:-1,silent:!0,shape:{x:r.x-n[3],y:r.y-n[0],width:r.width+n[3]+n[1],height:r.height+n[0]+n[2]},style:{fill:t.get(`backgroundColor`),stroke:t.get(`borderColor`),lineWidth:t.get(`borderWidth`)}}))}getControllerVisual(e,t,n){n=n||{};let r=n.forceState,i=this.visualMapModel,a={};t===`color`&&(a.color=i.get(`contentColor`));function o(e){return a[e]}function s(e,t){a[e]=t}let c=i.controllerVisuals[r||i.getValueState(e)];return P(Oz.prepareVisualTypes(c),function(r){let i=c[r];n.convertOpacityToAlpha&&r===`opacity`&&(r=`colorAlpha`,i=c.__alphaForOpacity),Oz.dependsOn(r,t)&&i&&i.applyVisual(e,o,s)}),a[t]}positionGroup(e){let t=this.visualMapModel,n=this.api,r=d_(t,n).refContainer;f_(e,t.getBoxLayoutParams(),r)}doRender(e,t,n,r){}};L2.type=`visualMap`;const R2=[[`left`,`right`,`width`],[`top`,`bottom`,`height`]];function z2(e,t,n){let r=e.option,i=r.align;if(i!=null&&i!==`auto`)return i;let a={width:t.getWidth(),height:t.getHeight()},o=+(r.orient===`horizontal`),s=R2[o],c=[0,null,10],l={};for(let e=0;e<3;e++)l[R2[1-o][e]]=c[e],l[s[e]]=e===2?n[0]:r[s[e]];let u=[[`x`,`width`,3],[`y`,`height`,0]][o],d=c_(l,a,r.padding);return s[(d.margin[u[2]]||0)+d[u[0]]+d[u[1]]*.5<a[u[1]]*.5?0:1]}function B2(e,t){return P(e||[],function(e){e.dataIndex!=null&&(e.dataIndexInside=e.dataIndex,e.dataIndex=null),e.highlightKey=`visualMap`+(t?t.componentIndex:``)}),e}const V2=Y();var H2=class e extends L2{constructor(...t){super(...t),this.type=e.type,this._shapes={},this._dataInterval=[],this._handleEnds=[],this._hoverLinkDataIndices=[]}init(e,t){super.init(e,t),this._hoverLinkFromSeriesMouseOver=I(this._hoverLinkFromSeriesMouseOver,this),this._hideIndicator=I(this._hideIndicator,this)}doRender(e,t,n,r){(!r||r.type!==`selectDataRange`||r.from!==this.uid)&&this._buildView()}_buildView(){this.group.removeAll();let e=this.visualMapModel,t=this.group;this._orient=e.get(`orient`),this._useHandle=e.get(`calculable`),this._resetInterval(),this._renderBar(t);let n=e.get(`text`);this._renderEndsText(t,n,0),this._renderEndsText(t,n,1),this._updateView(!0),this.renderBackground(t),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(t)}_renderEndsText(e,t,n){if(!t)return;let r=t[1-n];r=r==null?``:r+``;let i=this.visualMapModel,a=i.get(`textGap`),o=i.itemSize,s=this._shapes.mainGroup,c=this._applyTransform([o[0]/2,n===0?-a:o[1]+a],s),l=this._applyTransform(n===0?`bottom`:`top`,s),u=this._orient,d=this.visualMapModel.textStyleModel;this.group.add(new qu({style:oh(d,{x:c[0],y:c[1],verticalAlign:d.get(`verticalAlign`)||(u===`horizontal`?`middle`:l),align:d.get(`align`)||(u===`horizontal`?l:`center`),text:r})}))}_renderBar(e){let t=this.visualMapModel,n=this._shapes,r=t.itemSize,i=this._orient,a=this._useHandle,o=z2(t,this.api,r),s=n.mainGroup=this._createBarGroup(o),c=new q;s.add(c),c.add(n.outOfRange=U2()),c.add(n.inRange=U2(null,a?K2(this._orient):null)),this._mountDrag(n.inRange,`all`),c.setClipPath(new Uu({shape:{x:0,y:0,width:r[0],height:r[1],r:3}}));let l=t.textStyleModel.getTextRect(`国`),u=bo(l.width,l.height);a&&(n.handleThumbs=[],n.handleLabels=[],n.handleLabelPoints=[],this._createHandle(t,s,0,r,u,i),this._createHandle(t,s,1,r,u,i)),this._createIndicator(t,s,r,u,i),e.add(s)}_createHandle(e,t,n,r,i,a){let o=Ia(e.get(`handleSize`),r[0]),s=lS(e.get(`handleIcon`),-o/2,-o/2,o,o,null,!0),c=K2(this._orient);s.attr({cursor:c,onmousemove(e){zt(e.event)}}),this._mountDrag(s,n),s.x=r[0]/2,s.useStyle(e.getModel(`handleStyle`).getItemStyle()),s.setStyle({strokeNoScale:!0,strokeFirst:!0}),s.style.lineWidth*=2,s.ensureState(`emphasis`).style=e.getModel([`emphasis`,`handleStyle`]).getItemStyle(),Sf(s,!0),t.add(s);let l=this.visualMapModel.textStyleModel,u=new qu({cursor:c,onmousemove(e){zt(e.event)},style:oh(l,{x:0,y:0,text:``})});this._mountDrag(u,n),u.ensureState(`blur`).style={opacity:.1},u.stateTransition={duration:200},this.group.add(u);let d=this._shapes;d.handleThumbs[n]=s,d.handleLabelPoints[n]=[o,0],d.handleLabels[n]=u}_createIndicator(e,t,n,r,i){let a=Ia(e.get(`indicatorSize`),n[0]),o=lS(e.get(`indicatorIcon`),-a/2,-a/2,a,a,null,!0);o.attr({cursor:`move`,invisible:!0,silent:!0,x:n[0]/2});let s=e.getModel(`indicatorStyle`).getItemStyle();if(o instanceof Fu){let e=o.style;o.useStyle(j({image:e.image,x:e.x,y:e.y,width:e.width,height:e.height},s))}else o.useStyle(s);t.add(o);let c=this.visualMapModel.textStyleModel,l=new qu({silent:!0,invisible:!0,style:oh(c,{x:0,y:0,text:``})});this.group.add(l);let u=[(i===`horizontal`?r/2:6)+n[0]/2,0],d=this._shapes;d.indicator=o,d.indicatorLabel=l,d.indicatorLabelPoint=u,this._firstShowIndicator=!0}_mountDrag(e,t){e.attr({draggable:!0,drift:I(this._dragHandle,this,e,!1),ondragend:I(this._dragHandle,this,e,!0)}),V2(e).hdlIdx=t}_dragHandle(e,t,n,r){if(!this._useHandle)return;let i=V2(e).hdlIdx;if(typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(i!=null),this._dragging=!t,!t){let e=this._applyTransform([n,r],this._shapes.mainGroup,!0);this._updateInterval(i,e[1]),this._hideIndicator(),this._updateView()}if(t===!this.visualMapModel.get(`realtime`)&&this.api.dispatchAction({type:`selectDataRange`,from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),t)!this._hovering&&this._clearHoverLinkToSeries();else if(G2(this.visualMapModel)){let e=i===`all`?(this._handleEnds[0]+this._handleEnds[1])/2:this._handleEnds[i];this._doHoverLinkToSeries(e,!1)}}_resetInterval(){let e=this.visualMapModel,t=this._dataInterval=e.getSelected(),n=e.getExtent(),r=[0,e.itemSize[1]];this._handleEnds=[Ao(t[0],n,r,!0),Ao(t[1],n,r,!0)]}_updateInterval(e,t){t=t||0;let n=this.visualMapModel,r=this._handleEnds,i=[0,n.itemSize[1]];_H(t,r,i,e,0);let a=n.getExtent();this._dataInterval=[Ao(r[0],i,a,!0),Ao(r[1],i,a,!0)]}_updateView(e){let t=this.visualMapModel,n=t.getExtent(),r=this._shapes,i=[0,t.itemSize[1]],a=e?i:this._handleEnds,o=this._createBarVisual(this._dataInterval,n,a,`inRange`),s=this._createBarVisual(n,n,i,`outOfRange`);r.inRange.setStyle({fill:o.barColor}).setShape(`points`,o.barPoints),r.outOfRange.setStyle({fill:s.barColor}).setShape(`points`,s.barPoints),this._updateHandle(a,o)}_createBarVisual(e,t,n,r){let i={forceState:r,convertOpacityToAlpha:!0},a=this._makeColorGradient(e,i),o=[this.getControllerVisual(e[0],`symbolSize`,i),this.getControllerVisual(e[1],`symbolSize`,i)],s=this._createBarPoints(n,o);return{barColor:new Rp(0,0,0,1,a),barPoints:s,handlesColor:[a[0].color,a[a.length-1].color]}}_makeColorGradient(e,t){let n=[],r=(e[1]-e[0])/100;n.push({color:this.getControllerVisual(e[0],`color`,t),offset:0});for(let i=1;i<100;i++){let a=e[0]+r*i;if(a>e[1])break;n.push({color:this.getControllerVisual(a,`color`,t),offset:i/100})}return n.push({color:this.getControllerVisual(e[1],`color`,t),offset:1}),n}_createBarPoints(e,t){let n=this.visualMapModel.itemSize;return[[n[0]-t[0],e[0]],[n[0],e[0]],[n[0],e[1]],[n[0]-t[1],e[1]]]}_createBarGroup(e){let t=this._orient===`vertical`,n=e===`bottom`,r=e===`left`,i=this.visualMapModel.get(`inverse`);return new q(!t&&!i?{scaleX:n?1:-1,rotation:Oo/2}:!t&&i?{scaleX:n?-1:1,rotation:-Oo/2}:t&&!i?{scaleX:r?1:-1,scaleY:-1}:{scaleX:r?1:-1})}_updateHandle(e,t){if(!this._useHandle)return;let n=this._shapes,r=this.visualMapModel,i=n.handleThumbs,a=n.handleLabels,o=r.itemSize,s=r.getExtent(),c=n.mainGroup,l=this._applyTransform(`left`,c),u=this._orient===`vertical`,d=[],f=[];P([0,1],function(p){let m=i[p];m.setStyle(`fill`,t.handlesColor[p]),m.y=e[p];let h=Ao(e[p],[0,o[1]],s,!0),g=this.getControllerVisual(h,`symbolSize`);m.scaleX=m.scaleY=g/o[0],m.x=o[0]-g/2;let _=Tm(n.handleLabelPoints[p],wm(m,this.group));if(!u){let e=l===`left`||l===`top`?(o[0]-g)/2:(o[0]-g)/-2;_[1]+=e}a[p].setStyle({x:_[0],y:_[1],text:r.formatValueText(this._dataInterval[p]),verticalAlign:`middle`,align:u?this._applyTransform(`left`,c):`center`}),V2(a[p]).hdlIdx=p,d[p]=new G(_[0],_[1]),f[p]=a[p].getBoundingRect().clone(),Lm(f[p],2,!1,!0)},this);let p=new G,m=this._applyTransform([0,1],c);K.intersect(f[0],f[1],p,{direction:Math.atan2(m[1],m[0]),bidirectional:!1})&&(d[0].scaleAndAdd(p,-.5),d[1].scaleAndAdd(p,.5),a[0].setStyle(d[0]),a[1].setStyle(d[1]),V2(a[0]).hdlIdx=V2(a[1]).hdlIdx=`all`)}_showIndicator(e,t,n,r){let i=this.visualMapModel,a=i.getExtent(),o=i.itemSize,s=[0,o[1]],c=this._shapes,l=c.indicator;if(!l)return;l.attr(`invisible`,!1);let u=this.getControllerVisual(e,`color`,{convertOpacityToAlpha:!0}),d=this.getControllerVisual(e,`symbolSize`),f=Ao(e,a,s,!0),p=o[0]-d/2,m={x:l.x,y:l.y};l.y=f,l.x=p;let h=Tm(c.indicatorLabelPoint,wm(l,this.group)),g=c.indicatorLabel;g.attr(`invisible`,!1);let _=this._applyTransform(`left`,c.mainGroup),v=this._orient===`horizontal`;g.setStyle({text:(n||``)+i.formatValueText(t),verticalAlign:v?_:`middle`,align:v?`center`:_});let y={x:p,y:f,style:{fill:u}},b={style:{x:h[0],y:h[1]}};if(i.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){let e={duration:100,easing:`cubicInOut`,additive:!0};l.x=m.x,l.y=m.y,l.animateTo(y,e),g.animateTo(b,e)}else l.attr(y),g.attr(b);this._firstShowIndicator=!1;let x=this._shapes.handleLabels;if(x)for(let e=0;e<x.length;e++)this.api.enterBlur(x[e])}_enableHoverLinkToSeries(){let e=this;this._shapes.mainGroup.on(`mousemove`,function(t){if(e._hovering=!0,!e._dragging){let n=e.visualMapModel.itemSize,r=e._applyTransform([t.offsetX,t.offsetY],e._shapes.mainGroup,!0,!0);r[1]=yo(bo(0,r[1]),n[1]),e._doHoverLinkToSeries(r[1],0<=r[0]&&r[0]<=n[0])}}).on(`mouseout`,function(){e._hovering=!1,!e._dragging&&e._clearHoverLinkToSeries()})}_enableHoverLinkFromSeries(){let e=this.api.getZr();this.visualMapModel.option.hoverLink?(e.on(`mouseover`,this._hoverLinkFromSeriesMouseOver,this),e.on(`mouseout`,this._hideIndicator,this)):this._clearHoverLinkFromSeries()}_doHoverLinkToSeries(e,t){let n=this.visualMapModel,r=n.itemSize;if(!n.option.hoverLink)return;let i=[0,r[1]],a=n.getExtent();e=yo(bo(i[0],e),i[1]);let o=W2(n,a,i),s=[e-o,e+o],c=Ao(e,i,a,!0),l=[Ao(s[0],i,a,!0),Ao(s[1],i,a,!0)];s[0]<i[0]&&(l[0]=-1/0),s[1]>i[1]&&(l[1]=1/0),t&&(l[0]===-1/0?this._showIndicator(c,l[1],`< `,o):l[1]===1/0?this._showIndicator(c,l[0],`> `,o):this._showIndicator(c,c,`≈ `,o));let u=this._hoverLinkDataIndices,d=[];(t||G2(n))&&(d=this._hoverLinkDataIndices=n.findTargetDataIndices(l));let f=Hs(u,d);this._dispatchHighDown(`downplay`,B2(f[0],n)),this._dispatchHighDown(`highlight`,B2(f[1],n))}_hoverLinkFromSeriesMouseOver(e){let t;if(Vx(e.target,e=>{let n=X(e);if(n.dataIndex!=null)return t=n,!0},!0),!t)return;let n=this.ecModel.getSeriesByIndex(t.seriesIndex),r=this.visualMapModel;if(!r.isTargetSeries(n))return;let i=n.getData(t.dataType),a=i.getStore().get(r.getDataDimensionIndex(i),t.dataIndex);isNaN(a)||this._showIndicator(a,a)}_hideIndicator(){let e=this._shapes;e.indicator&&e.indicator.attr(`invisible`,!0),e.indicatorLabel&&e.indicatorLabel.attr(`invisible`,!0);let t=this._shapes.handleLabels;if(t)for(let e=0;e<t.length;e++)this.api.leaveBlur(t[e])}_clearHoverLinkToSeries(){this._hideIndicator();let e=this._hoverLinkDataIndices;this._dispatchHighDown(`downplay`,B2(e,this.visualMapModel)),e.length=0}_clearHoverLinkFromSeries(){this._hideIndicator();let e=this.api.getZr();e.off(`mouseover`,this._hoverLinkFromSeriesMouseOver),e.off(`mouseout`,this._hideIndicator)}_applyTransform(e,t,n,r){let i=wm(t,r?null:this.group);return L(e)?Tm(e,i,n):Em(e,i,n)}_dispatchHighDown(e,t){t&&t.length&&this.api.dispatchAction({type:e,batch:t})}dispose(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()}};H2.type=`visualMap.continuous`;function U2(e,t){return new wp({shape:{points:e},cursor:t,onmousemove(e){zt(e.event)}})}function W2(e,t,n){let r=6,i=e.get(`hoverLinkDataSize`);return i&&(r=Ao(i,t,n,!0)/2),r}function G2(e){let t=e.get(`hoverLinkOnHandle`);return!!(t==null?e.get(`realtime`):t)}function K2(e){return e===`vertical`?`ns-resize`:`ew-resize`}const q2={type:`selectDataRange`,event:`dataRangeSelected`,update:`update`},J2=function(e,t){t.eachComponent({mainType:`visualMap`,query:e},function(t){t.setSelected(e.selected)})},Y2=[{createOnAllSeries:!0,reset:function(e,t){let n=[];return t.eachComponent(`visualMap`,function(t){let r=e.pipelineContext;!t.isTargetSeries(e)||r&&r.large||n.push(q$(t.stateList,t.targetVisuals,I(t.getValueState,t),t.getDataDimensionIndex(e.getData())))}),n}},{createOnAllSeries:!0,reset:function(e,t){let n=e.getData(),r=[];t.eachComponent(`visualMap`,function(t){if(t.isTargetSeries(e)){let i=t.getVisualMeta(I(X2,null,e,t))||{stops:[],outerColors:[]},a=t.getDataDimensionIndex(n);a>=0&&(i.dimension=a,r.push(i))}}),e.getData().setVisual(`visualMeta`,r)}}];function X2(e,t,n,r){let i=t.targetVisuals[r],a=Oz.prepareVisualTypes(i),o={color:Ix(e.getData(),`color`)};for(let e=0,t=a.length;e<t;e++){let t=a[e],r=i[t===`opacity`?`__alphaForOpacity`:t];r&&r.applyVisual(n,s,c)}return o.color;function s(e){return o[e]}function c(e,t){o[e]=t}}const Z2=P;function Q2(e){let t=e&&e.visualMap;L(t)||(t=t?[t]:[]),Z2(t,function(e){if(!e)return;$2(e,`splitList`)&&!$2(e,`pieces`)&&(e.pieces=e.splitList,delete e.splitList);let t=e.pieces;if(t&&L(t)&&Z2(t,function(e){B(e)&&($2(e,`start`)&&!$2(e,`min`)&&(e.min=e.start),$2(e,`end`)&&!$2(e,`max`)&&(e.max=e.end))}),typeof process<`u`&&process.env.NODE_ENV!==`production`){let t=e.seriesTargets;t&&L(t)&&Z2(t,function(e){(!B(e)||e.dimension==null)&&console.warn(`Each seriesTarget should have a dimension property`),e.seriesIndex==null&&e.seriesId==null&&console.warn(`Each seriesTarget should have either seriesIndex or seriesId`)})}})}function $2(e,t){return e&&e.hasOwnProperty&&e.hasOwnProperty(t)}let e4=!1;function t4(e){e4||(e4=!0,e.registerSubTypeDefaulter(`visualMap`,function(e){return!e.categories&&(!(e.pieces?e.pieces.length>0:e.splitNumber>0)||e.calculable)?`continuous`:`piecewise`}),e.registerAction(q2,J2),P(Y2,t=>{e.registerVisual(e.PRIORITY.VISUAL.COMPONENT,t)}),e.registerPreprocessor(Q2))}function n4(e){e.registerComponentModel(F2),e.registerComponentView(H2),t4(e)}var r4=class e extends N2{constructor(...t){super(...t),this.type=e.type,this._pieceList=[]}optionUpdated(e,t){super.optionUpdated.apply(this,arguments),this.resetExtent();let n=this._mode=this._determineMode();this._pieceList=[],i4[this._mode].call(this,this._pieceList),this._resetSelected(e,t);let r=this.option.categories;this.resetVisual(function(e,t){n===`categories`?(e.mappingMethod=`category`,e.categories=k(r)):(e.dataExtent=this.getExtent(),e.mappingMethod=`piecewise`,e.pieceList=F(this._pieceList,function(e){return e=k(e),t!==`inRange`&&(e.visual=null),e}))})}completeVisualOption(){let e=this.option,t={},n=Oz.listVisualTypes(),r=this.isCategory();P(e.pieces,function(e){P(n,function(n){e.hasOwnProperty(n)&&(t[n]=1)})}),P(t,function(t,n){let a=!1;P(this.stateList,function(t){a=a||i(e,t,n)||i(e.target,t,n)},this),!a&&P(this.stateList,function(t){(e[t]||(e[t]={}))[n]=T2.get(n,t===`inRange`?`active`:`inactive`,r)})},this);function i(e,t,n){return e&&e[t]&&e[t].hasOwnProperty(n)}super.completeVisualOption.apply(this,arguments)}_resetSelected(e,t){let n=this.option,r=this._pieceList,i=(t?n:e).selected||{};if(n.selected=i,P(r,function(e,t){let n=this.getSelectedMapKey(e);i.hasOwnProperty(n)||(i[n]=!0)},this),n.selectedMode===`single`){let e=!1;P(r,function(t,n){let r=this.getSelectedMapKey(t);i[r]&&(e?i[r]=!1:e=!0)},this)}}getItemSymbol(){return this.get(`itemSymbol`)}getSelectedMapKey(e){return this._mode===`categories`?e.value+``:e.index+``}getPieceList(){return this._pieceList}_determineMode(){let e=this.option;return e.pieces&&e.pieces.length>0?`pieces`:this.option.categories?`categories`:`splitNumber`}setSelected(e){this.option.selected=k(e)}getValueState(e){let t=Oz.findPieceIndex(e,this._pieceList);return t==null?`outOfRange`:this.option.selected[this.getSelectedMapKey(this._pieceList[t])]?`inRange`:`outOfRange`}findTargetDataIndices(e){let t=[],n=this._pieceList;return this.eachTargetSeries(function(r){let i=[],a=r.getData();a.each(this.getDataDimensionIndex(a),function(t,r){Oz.findPieceIndex(t,n)===e&&i.push(r)},this),t.push({seriesId:r.id,dataIndex:i})},this),t}getRepresentValue(e){let t;if(this.isCategory())t=e.value;else if(e.value!=null)t=e.value;else{let n=e.interval||[];t=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return t}getVisualMeta(e){if(this.isCategory())return;let t=[],n=[``,``],r=this;function i(i,a){let o=r.getRepresentValue({interval:i});a||(a=r.getValueState(o));let s=e(o,a);i[0]===-1/0?n[0]=s:i[1]===1/0?n[1]=s:t.push({value:i[0],color:s},{value:i[1],color:s})}let a=this._pieceList.slice();if(!a.length)a.push({interval:[-1/0,1/0]});else{let e=a[0].interval[0];e!==-1/0&&a.unshift({interval:[-1/0,e]}),e=a[a.length-1].interval[1],e!==1/0&&a.push({interval:[e,1/0]})}let o=-1/0;return P(a,function(e){let t=e.interval;t&&(t[0]>o&&i([o,t[0]],`outOfRange`),i(t.slice()),o=t[1])},this),{stops:t,outerColors:n}}};r4.type=`visualMap.piecewise`,r4.defaultOption=Ph(N2.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:`auto`,itemWidth:20,itemHeight:14,itemSymbol:`roundRect`,pieces:null,categories:null,splitNumber:5,selectedMode:`multiple`,itemGap:10,hoverLink:!0});const i4={splitNumber(e){let t=this.option,n=Math.min(t.precision,20),r=this.getExtent(),i=t.splitNumber;i=Math.max(parseInt(i,10),1),t.splitNumber=i;let a=(r[1]-r[0])/i;for(;+a.toFixed(n)!==a&&n<5;)n++;t.precision=n,a=+a.toFixed(n),t.minOpen&&e.push({interval:[-1/0,r[0]],close:[0,0]});for(let t=0,n=r[0];t<i;n+=a,t++){let o=t===i-1?r[1]:n+a;e.push({interval:[n,o],close:[1,1]})}t.maxOpen&&e.push({interval:[r[1],1/0],close:[0,0]}),es(e),P(e,function(e,t){e.index=t,e.text=this.formatValueText(e.interval)},this)},categories(e){let t=this.option;P(t.categories,function(t){e.push({text:this.formatValueText(t,!0),value:t})},this),a4(t,e)},pieces(e){let t=this.option;P(t.pieces,function(t,n){B(t)||(t={value:t});let r={text:``,index:n};if(t.label!=null&&(r.text=t.label),t.hasOwnProperty(`value`)){let e=r.value=t.value;r.interval=[e,e],r.close=[1,1]}else{let e=r.interval=[],i=r.close=[0,0],a=[1,0,1],o=[-1/0,1/0],s=[];for(let n=0;n<2;n++){let r=[[`gte`,`gt`,`min`],[`lte`,`lt`,`max`]][n];for(let o=0;o<3&&e[n]==null;o++)e[n]=t[r[o]],i[n]=a[o],s[n]=o===2;e[n]==null&&(e[n]=o[n])}s[0]&&e[1]===1/0&&(i[0]=0),s[1]&&e[0]===-1/0&&(i[1]=0),typeof process<`u`&&process.env.NODE_ENV!==`production`&&e[0]>e[1]&&console.warn(`Piece `+n+`is illegal: `+e+` lower bound should not greater then uppper bound.`),e[0]===e[1]&&i[0]&&i[1]&&(r.value=e[0])}r.visual=Oz.retrieveVisuals(t),e.push(r)},this),a4(t,e),es(e),P(e,function(e){let t=e.close,n=[[`<`,`≤`][t[1]],[`>`,`≥`][t[0]]];e.text=e.text||this.formatValueText(e.value==null?e.interval:e.value,!1,n)},this)}};function a4(e,t){let n=e.inverse;(e.orient===`vertical`?!n:n)&&t.reverse()}var o4=class e extends L2{constructor(...t){super(...t),this.type=e.type}doRender(){let e=this.group;e.removeAll();let t=this.visualMapModel,n=t.get(`textGap`),r=t.textStyleModel,i=this._getItemAlign(),a=t.itemSize,o=this._getViewData(),s=o.endsText,c=Se(t.get(`showLabel`,!0),!s),l=!t.get(`selectedMode`);s&&this._renderEndsText(e,s[0],a,c,i),P(o.viewPieceList,function(o){let s=o.piece,u=new q;u.onclick=I(this._onItemClick,this,s),this._enableHoverLink(u,o.indexInModelPieceList);let d=t.getRepresentValue(s);if(this._createItemSymbol(u,d,[0,0,a[0],a[1]],l),c){let e=this.visualMapModel.getValueState(d),t=r.get(`align`)||i;u.add(new qu({style:oh(r,{x:t===`right`?-n:a[0]+n,y:a[1]/2,text:s.text,verticalAlign:r.get(`verticalAlign`)||`middle`,align:t,opacity:V(r.get(`opacity`),e===`outOfRange`?.5:1)}),silent:l}))}e.add(u)},this),s&&this._renderEndsText(e,s[1],a,c,i),i_(t.get(`orient`),e,t.get(`itemGap`)),this.renderBackground(e),this.positionGroup(e)}_enableHoverLink(e,t){e.on(`mouseover`,()=>n(`highlight`)).on(`mouseout`,()=>n(`downplay`));let n=e=>{let n=this.visualMapModel;n.option.hoverLink&&this.api.dispatchAction({type:e,batch:B2(n.findTargetDataIndices(t),n)})}}_getItemAlign(){let e=this.visualMapModel,t=e.option;if(t.orient===`vertical`)return z2(e,this.api,e.itemSize);{let e=t.align;return(!e||e===`auto`)&&(e=`left`),e}}_renderEndsText(e,t,n,r,i){if(!t)return;let a=new q,o=this.visualMapModel.textStyleModel;a.add(new qu({style:oh(o,{x:r?i===`right`?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:`middle`,align:r?i:`center`,text:t})})),e.add(a)}_getViewData(){let e=this.visualMapModel,t=F(e.getPieceList(),function(e,t){return{piece:e,indexInModelPieceList:t}}),n=e.get(`text`),r=e.get(`orient`),i=e.get(`inverse`);return(r===`horizontal`?i:!i)?t.reverse():n&&(n=n.slice().reverse()),{viewPieceList:t,endsText:n}}_createItemSymbol(e,t,n,r){let i=lS(this.getControllerVisual(t,`symbol`),n[0],n[1],n[2],n[3],this.getControllerVisual(t,`color`));i.silent=r,e.add(i)}_onItemClick(e){let t=this.visualMapModel,n=t.option,r=n.selectedMode;if(!r)return;let i=k(n.selected),a=t.getSelectedMapKey(e);r===`single`||r===!0?(i[a]=!0,P(i,function(e,t){i[t]=t===a})):i[a]=!i[a],this.api.dispatchAction({type:`selectDataRange`,from:this.uid,visualMapId:this.visualMapModel.id,selected:i})}};o4.type=`visualMap.piecewise`;function s4(e){e.registerComponentModel(r4),e.registerComponentView(o4),t4(e)}function c4(e){BD(n4),BD(s4)}var l4=class{constructor(e){this._thumbnailModel=e}reset(e){this._renderVersion=e.getECUpdateCycleVersion()}renderContent(e){let t=e.api.getViewOfComponentModel(this._thumbnailModel);t&&(e.group.silent=!0,t.renderContent({group:e.group,targetTrans:e.targetTrans,z2Range:Jm(e.group),roamType:e.roamType,viewportRect:e.viewportRect,renderVersion:this._renderVersion}))}updateWindow(e,t){let n=t.getViewOfComponentModel(this._thumbnailModel);n&&n.updateWindow({targetTrans:e,renderVersion:this._renderVersion})}},u4=class e extends b_{constructor(...t){super(...t),this.type=e.type,this.preventAutoZ=!0}optionUpdated(e,t){this._updateBridge()}_updateBridge(){let e=this._birdge=this._birdge||new l4(this);this._target=null,this.ecModel.eachSeries(e=>{fV(e,null)}),this.shouldShow()&&fV(this.getTarget().baseMapProvider,e)}shouldShow(){return this.getShallow(`show`,!0)}getBridge(){return this._birdge}getTarget(){if(this._target)return this._target;let e=this.getReferringComponents(`series`,{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];return e?e.subType!==`graph`&&(e=null,typeof process<`u`&&process.env.NODE_ENV!==`production`&&fs(`series.${e.subType} is not supported in thumbnail.`,!0)):e=this.ecModel.queryComponents({mainType:`series`,subType:`graph`})[0],this._target={baseMapProvider:e},this._target}};u4.type=`thumbnail`,u4.layoutMode=`box`,u4.dependencies=[`series`,`geo`],u4.defaultOption={show:!0,right:1,bottom:1,height:`25%`,width:`25%`,itemStyle:{borderColor:Q.color.border,borderWidth:2},windowStyle:{borderWidth:1,color:Q.color.neutral30,borderColor:Q.color.neutral40,opacity:.3},z:10};var d4=class e extends Ib{constructor(...t){super(...t),this.type=e.type}render(e,t,n){if(this._api=n,this._model=e,this._coordSys||(this._coordSys=new iI),!this._isEnabled()){this._clear();return}this._renderVersion=n.getECUpdateCycleVersion();let r=this.group;r.removeAll();let i=e.getModel(`itemStyle`),a=i.getItemStyle();a.fill==null&&(a.fill=t.get(`backgroundColor`)||Q.color.neutral00);let o=d_(e,n).refContainer,s=c_(a_(e,!0),o),c=a.lineWidth||0,l=this._contentRect=Lm(s.clone(),c/2,!0,!0),u=new q;r.add(u),u.setClipPath(new Uu({shape:l.plain()}));let d=this._targetGroup=new q;u.add(d);let f=s.plain();f.r=i.getShallow(`borderRadius`,!0),r.add(this._bgRect=new Uu({style:a,shape:f,silent:!1,cursor:`grab`}));let p=e.getModel(`windowStyle`),m=p.getShallow(`borderRadius`,!0);u.add(this._windowRect=new Uu({shape:{x:0,y:0,width:0,height:0,r:m},style:p.getItemStyle(),silent:!1,cursor:`grab`})),this._dealRenderContent(),this._dealUpdateWindow(),p4(e,this)}renderContent(e){this._bridgeRendered=e,this._isEnabled()&&(this._dealRenderContent(),this._dealUpdateWindow(),p4(this._model,this))}_dealRenderContent(){let e=this._bridgeRendered;if(!e||e.renderVersion!==this._renderVersion)return;let t=this._targetGroup,n=this._coordSys,r=this._contentRect;if(t.removeAll(),!e)return;let i=e.group,a=i.getBoundingRect();t.add(i),this._bgRect.z2=e.z2Range.min-10,gI(n,a.x,a.y,a.width,a.height);let o=c_({left:`center`,top:`center`,aspect:a.width/a.height},r);_I(n,o.x,o.y,o.width,o.height),uI(i,n,0),i.dirty(),this._windowRect.z2=e.z2Range.max+10,this._resetRoamController(e.roamType)}updateWindow(e){let t=this._bridgeRendered;t&&t.renderVersion===e.renderVersion&&(t.targetTrans=e.targetTrans),this._isEnabled()&&this._dealUpdateWindow()}_dealUpdateWindow(){let e=this._bridgeRendered;if(!e||e.renderVersion!==this._renderVersion)return;let t=$t([],e.targetTrans),n=Yt([],oI(null,this._coordSys),t);this._transThisToTarget=$t([],n);let r=e.viewportRect;r=r?r.clone():new K(0,0,this._api.getWidth(),this._api.getHeight()),r.applyTransform(n);let i=this._windowRect,a=i.shape.r;i.setShape(M({r:a},r))}_resetRoamController(e){let t=this._api,n=this._roamController;n||(n=this._roamController=new rF(t.getZr())),!e||!this._isEnabled()?n.disable():(n.enable(e,{api:t,zInfo:{component:this._model},triggerInfo:{roamTrigger:null,isInSelf:(e,t,n)=>this._contentRect.contain(t,n)}}),n.off(`pan`).off(`zoom`).on(`pan`,I(this._onPan,this)).on(`zoom`,I(this._onZoom,this)))}_onPan(e){let t=this._transThisToTarget;if(!this._isEnabled()||!t)return;let n=lt([],[e.oldX,e.oldY],t),r=lt([],[e.oldX-e.dx,e.oldY-e.dy],t);this._api.dispatchAction(f4(this._model.getTarget().baseMapProvider,{dx:r[0]-n[0],dy:r[1]-n[1]}))}_onZoom(e){let t=this._transThisToTarget;if(!this._isEnabled()||!t)return;let n=lt([],[e.originX,e.originY],t);this._api.dispatchAction(f4(this._model.getTarget().baseMapProvider,{zoom:1/e.scale,originX:n[0],originY:n[1]}))}_isEnabled(){let e=this._model;return!(!e||!e.shouldShow()||!e.getTarget().baseMapProvider)}_clear(){this.group.removeAll(),this._bridgeRendered=null,this._roamController&&this._roamController.disable()}remove(){this._clear()}dispose(){this._clear()}};d4.type=`thumbnail`;function f4(e,t){let n={type:e.mainType===`series`?`${e.subType}Roam`:`${e.mainType}Roam`};return n[`${e.mainType}Id`]=e.id,j(n,t),n}function p4(e,t){let n=qm(e);Ym(t.group,n.z,n.zlevel)}function m4(e){e.registerComponentModel(u4),e.registerComponentView(d4)}const h4={label:{enabled:!0},decal:{show:!1}},g4=Y(),_4=Y(),v4=Sc(y4);function y4(e,t){let n=e.getModel(`aria`);if(!n.get(`enabled`))return;let r=_4(e).scope||(_4(e).scope={}),i=k(h4);A(i.label,e.getLocaleModel().get(`aria`),!1),A(n.option,i,!1),a(),o();function a(){if(n.getModel(`decal`).get(`show`)){let t=U();e.eachSeries(e=>{e.isColorBySeries()||(g4(e).scope=t.get(e.type)||t.set(e.type,{}))}),e.eachSeries(t=>{if(R(t.enableAriaDecal)){t.enableAriaDecal();return}let n=t.getData();if(t.isColorBySeries()){let a=U_(t.ecModel,t.name,r,e.getSeriesCount()),o=n.getVisual(`decal`);n.setVisual(`decal`,i(o,a))}else{let e=t.getRawData(),r={},a=g4(t).scope;n.each(function(e){let t=n.getRawIndex(e);r[t]=e});let o=e.count();e.each(s=>{let c=r[s],l=e.getName(s)||s+``,u=U_(t.ecModel,l,a,o),d=n.getItemVisual(c,`decal`);n.setItemVisual(c,`decal`,i(d,u))})}function i(e,t){let n=e?j(j({},t),e):t;return n.dirty=!0,n}})}}function o(){let r=t.getZr().dom;if(!r)return;let i=e.getLocaleModel().get(`aria`),a=n.getModel(`label`);if(a.option=M(a.option,i),!a.get(`enabled`))return;if(r.setAttribute(`role`,`img`),a.get(`description`)){r.setAttribute(`aria-label`,a.get(`description`));return}let o=e.getSeriesCount(),u=a.get([`data`,`maxCount`])||10,d=a.get([`series`,`maxCount`])||10,f=Math.min(o,d),p;if(!(o<1)){let t=c();p=t?s(a.get([`general`,`withTitle`]),{title:t}):a.get([`general`,`withoutTitle`]);let n=[],i=o>1?a.get([`series`,`multiple`,`prefix`]):a.get([`series`,`single`,`prefix`]);p+=s(i,{seriesCount:o}),e.eachSeries(function(e,t){if(t<f){let t,r=e.get(`name`)?`withName`:`withoutName`;t=o>1?a.get([`series`,`multiple`,r]):a.get([`series`,`single`,r]),t=s(t,{seriesId:e.seriesIndex,seriesName:e.get(`name`),seriesType:l(e.subType)});let i=e.getData();if(i.count()>u){let e=a.get([`data`,`partialData`]);t+=s(e,{displayCnt:u})}else t+=a.get([`data`,`allData`]);let c=a.get([`data`,`separator`,`middle`]),d=a.get([`data`,`separator`,`end`]),f=a.get([`data`,`excludeDimensionId`]),p=[];for(let e=0;e<i.count();e++)if(e<u){let t=i.getName(e),n=f?ce(i.getValues(e),(e,t)=>N(f,t)===-1):i.getValues(e),r=a.get([`data`,t?`withName`:`withoutName`]);p.push(s(r,{name:t,value:n.join(c)}))}t+=p.join(c)+d,n.push(t)}});let d=a.getModel([`series`,`multiple`,`separator`]),m=d.get(`middle`),h=d.get(`end`);p+=n.join(m)+h,r.setAttribute(`aria-label`,p)}}function s(e,t){if(!z(e))return e;let n=e;return P(t,function(e,t){n=n.replace(RegExp(`\\{\\s*`+t+`\\s*\\}`,`g`),e)}),n}function c(){let t=e.get(`title`);return t&&t.length&&(t=t[0]),t&&t.text}function l(t){let n=e.getLocaleModel().get([`series`,`typeNames`]);return n[t]||n.chart}}function b4(e){if(!e||!e.aria)return;let t=e.aria;t.show!=null&&(t.enabled=t.show),t.label=t.label||{},P([`description`,`general`,`series`,`data`],e=>{t[e]!=null&&(t.label[e]=t[e])})}function x4(e){e.registerPreprocessor(b4),e.registerVisual(e.PRIORITY.VISUAL.ARIA,v4)}const S4={value:`eq`,"<":`lt`,"<=":`lte`,">":`gt`,">=":`gte`,"=":`eq`,"!=":`ne`,"<>":`ne`};var C4=class{constructor(e){if((this._condVal=z(e)?new RegExp(e):be(e)?e:null)==null){let t=``;typeof process<`u`&&process.env.NODE_ENV!==`production`&&(t=hs(`Illegal regexp`,e,`in`)),gs(t)}}evaluate(e){let t=typeof e;return z(t)?this._condVal.test(e):me(t)?this._condVal.test(e+``):!1}},w4=class{evaluate(){return this.value}},T4=class{evaluate(){let e=this.children;for(let t=0;t<e.length;t++)if(!e[t].evaluate())return!1;return!0}},E4=class{evaluate(){let e=this.children;for(let t=0;t<e.length;t++)if(e[t].evaluate())return!0;return!1}},D4=class{evaluate(){return!this.child.evaluate()}},O4=class{evaluate(){let e=!!this.valueParser,t=this.getValue,n=t(this.valueGetterParam),r=e?this.valueParser(n):null;for(let t=0;t<this.subCondList.length;t++)if(!this.subCondList[t].evaluate(e?r:n))return!1;return!0}};function k4(e,t){if(e===!0||e===!1){let t=new w4;return t.value=e,t}let n=``;return N4(e)||(typeof process<`u`&&process.env.NODE_ENV!==`production`&&(n=hs(`Illegal config. Expect a plain object but actually`,e)),gs(n)),e.and?A4(`and`,e,t):e.or?A4(`or`,e,t):e.not?j4(e,t):M4(e,t)}function A4(e,t,n){let r=t[e],i=``;typeof process<`u`&&process.env.NODE_ENV!==`production`&&(i=hs('"and"/"or" condition should only be `'+e+": [...]` and must not be empty array.",`Illegal condition:`,t)),L(r)||gs(i),r.length||gs(i);let a=e===`and`?new T4:new E4;return a.children=F(r,e=>k4(e,n)),a.children.length||gs(i),a}function j4(e,t){let n=e.not,r=``;typeof process<`u`&&process.env.NODE_ENV!==`production`&&(r=hs('"not" condition should only be `not: {}`.',`Illegal condition:`,e)),N4(n)||gs(r);let i=new D4;return i.child=k4(n,t),i.child||gs(r),i}function M4(e,t){let n=``,r=t.prepareGetValue(e),i=[],a=ue(e),o=e.parser,s=o?Sy(o):null;for(let r=0;r<a.length;r++){let o=a[r];if(o===`parser`||t.valueGetterAttrMap.get(o))continue;let c=W(S4,o)?S4[o]:o,l=e[o],u=s?s(l):l,d=Dy(c,u)||c===`reg`&&new C4(u);d||(typeof process<`u`&&process.env.NODE_ENV!==`production`&&(n=hs(`Illegal relational operation: "`+o+`" in condition:`,e)),gs(n)),i.push(d)}i.length||(typeof process<`u`&&process.env.NODE_ENV!==`production`&&(n=hs(`Relational condition must have at least one operator.`,`Illegal condition:`,e)),gs(n));let c=new O4;return c.valueGetterParam=r,c.valueParser=s,c.getValue=t.getValue,c.subCondList=i,c}function N4(e){return B(e)&&!oe(e)}var P4=class{constructor(e,t){this._cond=k4(e,t)}evaluate(){return this._cond.evaluate()}};function F4(e,t){return new P4(e,t)}const I4={type:`sparkng:filter`,transform:function(e){let t=e.upstream,n,r=F4(e.config,{valueGetterAttrMap:U({dimension:!0}),prepareGetValue:function(e){let n=``,r=e.dimension;W(e,`dimension`)||(typeof process<`u`&&process.env.NODE_ENV!==`production`&&(n=hs(`Relation condition must has prop "dimension" specified.`,`Illegal condition:`,e)),gs(n));let i=t.getDimensionInfo(r);return i||(typeof process<`u`&&process.env.NODE_ENV!==`production`&&(n=hs(`Can not find dimension info via: `+r+`.
56
+ `,`Existing dimensions: `,t.cloneAllDimensionInfo(),`.
57
+ `,`Illegal condition:`,e,`.
58
+ `)),gs(n)),{dimIdx:i.index}},getValue:function(e){return t.retrieveValueFromItem(n,e.dimIdx)}}),i=[];for(let e=0,a=t.count();e<a;e++)n=t.getRawDataItem(e),r.evaluate()&&i.push(n);return{data:i}}};let L4=``;typeof process<`u`&&process.env.NODE_ENV!==`production`&&(L4=[`Valid config is like:`,`{ dimension: "age", order: "asc" }`,`or [{ dimension: "age", order: "asc"], { dimension: "date", order: "desc" }]`].join(` `));const R4={type:`sparkng:sort`,transform:function(e){let t=e.upstream,n=e.config,r=``,i=bs(n);i.length||(typeof process<`u`&&process.env.NODE_ENV!==`production`&&(r="Empty `config` in sort transform."),gs(r));let a=[];P(i,function(e){let n=e.dimension,i=e.order,o=e.parser,s=e.incomparable;if(n==null&&(typeof process<`u`&&process.env.NODE_ENV!==`production`&&(r=`Sort transform config must has "dimension" specified.`+L4),gs(r)),i!==`asc`&&i!==`desc`&&(typeof process<`u`&&process.env.NODE_ENV!==`production`&&(r=`Sort transform config must has "order" specified.`+L4),gs(r)),s&&s!==`min`&&s!==`max`){let e=``;typeof process<`u`&&process.env.NODE_ENV!==`production`&&(e=`incomparable must be "min" or "max" rather than "`+s+`".`),gs(e)}if(i!==`asc`&&i!==`desc`){let e=``;typeof process<`u`&&process.env.NODE_ENV!==`production`&&(e=`order must be "asc" or "desc" rather than "`+i+`".`),gs(e)}let c=t.getDimensionInfo(n);c||(typeof process<`u`&&process.env.NODE_ENV!==`production`&&(r=hs(`Can not find dimension info via: `+n+`.
59
+ `,`Existing dimensions: `,t.cloneAllDimensionInfo(),`.
60
+ `,`Illegal config:`,e,`.
61
+ `)),gs(r));let l=o?Sy(o):null;o&&!l&&(typeof process<`u`&&process.env.NODE_ENV!==`production`&&(r=hs(`Invalid parser name `+o+`.
62
+ `,`Illegal config:`,e,`.
63
+ `)),gs(r)),a.push({dimIdx:c.index,parser:l,comparator:new Ty(i,s)})});let o=t.sourceFormat;o!==`arrayRows`&&o!==`objectRows`&&(typeof process<`u`&&process.env.NODE_ENV!==`production`&&(r=`sourceFormat "`+o+`" is not supported yet`),gs(r));let s=[];for(let e=0,n=t.count();e<n;e++)s.push(t.getRawDataItem(e));return s.sort(function(e,n){for(let r=0;r<a.length;r++){let i=a[r],o=t.retrieveValueFromItem(e,i.dimIdx),s=t.retrieveValueFromItem(n,i.dimIdx);i.parser&&(o=i.parser(o),s=i.parser(s));let c=i.comparator.evaluate(o,s);if(c!==0)return c}return 0}),{data:s}}};function z4(e){e.registerTransform(I4),e.registerTransform(R4)}var B4=class extends b_{constructor(...e){super(...e),this.type=`dataset`}init(e,t,n){super.init(e,t,n),this._sourceManager=new Zy(this),Qy(this)}mergeOption(e,t){super.mergeOption(e,t),Qy(this)}optionUpdated(){this._sourceManager.dirty()}getSourceManager(){return this._sourceManager}};B4.type=`dataset`,B4.defaultOption={seriesLayoutBy:hd};var V4=class extends Ib{constructor(...e){super(...e),this.type=`dataset`}};V4.type=`dataset`;function H4(e){e.registerComponentModel(B4),e.registerComponentView(V4)}const U4=Math.sin,W4=Math.cos,G4=Math.PI,K4=Math.PI*2,q4=180/G4;var J4=class{reset(e){this._start=!0,this._d=[],this._str=``,this._p=Math.pow(10,e||4)}moveTo(e,t){this._add(`M`,e,t)}lineTo(e,t){this._add(`L`,e,t)}bezierCurveTo(e,t,n,r,i,a){this._add(`C`,e,t,n,r,i,a)}quadraticCurveTo(e,t,n,r){this._add(`Q`,e,t,n,r)}arc(e,t,n,r,i,a){this.ellipse(e,t,n,n,0,r,i,a)}ellipse(e,t,n,r,i,a,o,s){let c=o-a,l=!s,u=Math.abs(c),d=si(u-K4)||(l?c>=K4:-c>=K4),f=c>0?c%K4:c%K4+K4,p=!1;p=d?!0:!si(u)&&f>=G4==!!l;let m=e+n*W4(a),h=t+r*U4(a);this._start&&this._add(`M`,m,h);let g=Math.round(i*q4);if(d){let i=1/this._p,o=(l?1:-1)*(K4-i);this._add(`A`,n,r,g,1,+l,e+n*W4(a+o),t+r*U4(a+o)),i>.01&&this._add(`A`,n,r,g,0,+l,m,h)}else{let i=e+n*W4(o),a=t+r*U4(o);this._add(`A`,n,r,g,+p,+l,i,a)}}rect(e,t,n,r){this._add(`M`,e,t),this._add(`l`,n,0),this._add(`l`,0,r),this._add(`l`,-n,0),this._add(`Z`)}closePath(){this._d.length>0&&this._add(`Z`)}_add(e,t,n,r,i,a,o,s,c){let l=[],u=this._p;for(let e=1;e<arguments.length;e++){let t=arguments[e];if(isNaN(t)){this._invalid=!0;return}l.push(Math.round(t*u)/u)}this._d.push(e+l.join(` `)),this._start=e===`Z`}generateStr(){this._str=this._invalid?``:this._d.join(``),this._d=[]}getStr(){return this._str}};const Y4=`none`,X4=Math.round;function Z4(e){let t=e.fill;return t!=null&&t!==Y4}function Q4(e){let t=e.stroke;return t!=null&&t!==Y4}const $4=[`lineCap`,`miterLimit`,`lineJoin`],e3=F($4,e=>`stroke-${e.toLowerCase()}`);function t3(e,t,n,r){let i=t.opacity==null?1:t.opacity;if(n instanceof Fu)e(`opacity`,i);else{if(Z4(t)){let n=oi(t.fill);e(`fill`,n.color);let a=t.fillOpacity==null?n.opacity*i:t.fillOpacity*n.opacity*i;(r||a<1)&&e(`fill-opacity`,a)}else e(`fill`,Y4);if(Q4(t)){let a=oi(t.stroke);e(`stroke`,a.color);let o=t.strokeNoScale?n.getLineScale():1,s=o?(t.lineWidth||0)/o:0,c=t.strokeOpacity==null?a.opacity*i:t.strokeOpacity*a.opacity*i,l=t.strokeFirst;if((r||s!==1)&&e(`stroke-width`,s),(r||l)&&e(`paint-order`,l?`stroke`:`fill`),(r||c<1)&&e(`stroke-opacity`,c),t.lineDash){let[t,i]=bS(n);t&&(i=X4(i||0),e(`stroke-dasharray`,t.join(`,`)),(i||r)&&e(`stroke-dashoffset`,i))}else r&&e(`stroke-dasharray`,Y4);for(let n=0;n<$4.length;n++){let i=$4[n];if(r||t[i]!==Tu[i]){let r=t[i]||Tu[i];r&&e(e3[n],r)}}}else r&&e(`stroke`,Y4)}}const n3=`http://www.w3.org/2000/svg`,r3=`http://www.w3.org/1999/xlink`;function i3(e){return document.createElementNS(n3,e)}function a3(e,t,n,r,i){return{tag:e,attrs:n||{},children:r,text:i,key:t}}function o3(e,t){let n=[];if(t)for(let e in t){let r=t[e],i=e;r!==!1&&(r!==!0&&r!=null&&(i+=`="${r}"`),n.push(i))}return`<${e} ${n.join(` `)}>`}function s3(e){return`</${e}>`}function c3(e,t){t=t||{};let n=t.newline?`
64
+ `:``;function r(e){let{children:t,tag:i,attrs:a,text:o}=e;return o3(i,a)+(i===`style`?o||``:Ot(o))+(t?`${n}${F(t,e=>r(e)).join(n)}${n}`:``)+s3(i)}return r(e)}function l3(e,t,n){n=n||{};let r=n.newline?`
65
+ `:``,i=` {${r}`,a=`${r}}`,o=F(ue(e),t=>t+i+F(ue(e[t]),n=>`${n}:${e[t][n]};`).join(r)+a).join(r),s=F(ue(t),e=>`@keyframes ${e}${i}`+F(ue(t[e]),n=>n+i+F(ue(t[e][n]),r=>{let i=t[e][n][r];return r===`d`&&(i=`path("${i}")`),`${r}:${i};`}).join(r)+a).join(r)+a).join(r);return!o&&!s?``:[`<![CDATA[`,o,s,`]]>`].join(r)}function u3(e){return{zrId:e,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function d3(e,t,n,r){return a3(`svg`,`root`,{width:e,height:t,xmlns:n3,"xmlns:xlink":r3,version:`1.1`,baseProfile:`full`,viewBox:r?`0 0 ${e} ${t}`:!1},n)}let f3=0;function p3(){return f3++}const m3={cubicIn:`0.32,0,0.67,0`,cubicOut:`0.33,1,0.68,1`,cubicInOut:`0.65,0,0.35,1`,quadraticIn:`0.11,0,0.5,0`,quadraticOut:`0.5,1,0.89,1`,quadraticInOut:`0.45,0,0.55,1`,quarticIn:`0.5,0,0.75,0`,quarticOut:`0.25,1,0.5,1`,quarticInOut:`0.76,0,0.24,1`,quinticIn:`0.64,0,0.78,0`,quinticOut:`0.22,1,0.36,1`,quinticInOut:`0.83,0,0.17,1`,sinusoidalIn:`0.12,0,0.39,0`,sinusoidalOut:`0.61,1,0.88,1`,sinusoidalInOut:`0.37,0,0.63,1`,exponentialIn:`0.7,0,0.84,0`,exponentialOut:`0.16,1,0.3,1`,exponentialInOut:`0.87,0,0.13,1`,circularIn:`0.55,0,1,0.45`,circularOut:`0,0.55,0.45,1`,circularInOut:`0.85,0,0.15,1`},h3=`transform-origin`;function g3(e,t,n){let r=j({},e.shape);j(r,t),e.buildPath(n,r);let i=new J4;return i.reset(Si(e)),n.rebuildPath(i,1),i.generateStr(),i.getStr()}function _3(e,t){let{originX:n,originY:r}=t;(n||r)&&(e[h3]=`${n}px ${r}px`)}const v3={fill:`fill`,opacity:`opacity`,lineWidth:`stroke-width`,lineDashOffset:`stroke-dashoffset`};function y3(e,t){let n=t.zrId+`-ani-`+t.cssAnimIdx++;return t.cssAnims[n]=e,n}function b3(e,t,n){let r=e.shape.paths,i={},a,o;if(P(r,e=>{let t=u3(n.zrId);t.animation=!0,S3(e,{},t,!0);let r=t.cssAnims,s=t.cssNodes,c=ue(r),l=c.length;if(!l)return;o=c[l-1];let u=r[o];for(let e in u){let t=u[e];i[e]=i[e]||{d:``},i[e].d+=t.d||``}for(let e in s){let t=s[e].animation;t.indexOf(o)>=0&&(a=t)}}),!a)return;t.d=!1;let s=y3(i,n);return a.replace(o,s)}function x3(e){return z(e)?m3[e]?`cubic-bezier(${m3[e]})`:wr(e)?e:``:``}function S3(e,t,n,r){let i=e.animators,a=i.length,o=[];if(e instanceof Ip){let r=b3(e,t,n);if(r)o.push(r);else if(!a)return}else if(!a)return;let s={};for(let e=0;e<a;e++){let t=i[e],n=[t.getMaxTime()/1e3+`s`],r=x3(t.getClip().easing),a=t.getDelay();r?n.push(r):n.push(`linear`),a&&n.push(a/1e3+`s`),t.getLoop()&&n.push(`infinite`);let o=n.join(` `);s[o]=s[o]||[o,[]],s[o][1].push(t)}function c(i){let a=i[1],o=a.length,s={},c={},l={},u=`animation-timing-function`;function d(e,t,n){let r=e.getTracks(),i=e.getMaxTime();for(let e=0;e<r.length;e++){let a=r[e];if(a.needsAnimate()){let e=a.keyframes,r=a.propName;if(n&&(r=n(r)),r)for(let n=0;n<e.length;n++){let a=e[n],o=Math.round(a.time/i*100)+`%`,s=x3(a.easing),c=a.rawValue;(z(c)||me(c))&&(t[o]=t[o]||{},t[o][r]=a.rawValue,s&&(t[o][u]=s))}}}}for(let e=0;e<o;e++){let t=a[e],n=t.targetName;n?n===`shape`&&d(t,c):!r&&d(t,s)}for(let t in s){let n={};Ca(n,e),j(n,s[t]);let r=Ci(n),i=s[t][u];l[t]=r?{transform:r}:{},_3(l[t],n),i&&(l[t][u]=i)}let f,p=!0;for(let t in c){l[t]=l[t]||{};let n=!f,r=c[t][u];n&&(f=new ru);let i=f.len();f.reset(),l[t].d=g3(e,c[t],f);let a=f.len();if(!n&&i!==a){p=!1;break}r&&(l[t][u]=r)}if(!p)for(let e in l)delete l[e].d;if(!r)for(let e=0;e<o;e++){let t=a[e];t.targetName===`style`&&d(t,l,e=>v3[e])}let m=ue(l),h=!0,g;for(let e=1;e<m.length;e++){let t=m[e-1],n=m[e];if(l[t][h3]!==l[n][h3]){h=!1;break}g=l[t][h3]}if(h&&g){for(let e in l)l[e][h3]&&delete l[e][h3];t[h3]=g}if(ce(m,e=>ue(l[e]).length>0).length)return`${y3(l,n)} ${i[0]} both`}for(let e in s){let t=c(s[e]);t&&o.push(t)}if(o.length){let e=n.zrId+`-cls-`+p3();n.cssNodes[`.`+e]={animation:o.join(`,`)},t.class=e}}function C3(e,t,n){if(!e.ignore){if(e.isSilent())w3({"pointer-events":`none`},t,n,!0);else{let r=e.states.emphasis&&e.states.emphasis.style?e.states.emphasis.style:{},i=r.fill;if(!i){let t=e.style&&e.style.fill,n=e.states.select&&e.states.select.style&&e.states.select.style.fill,r=e.currentStates.indexOf(`select`)>=0&&n||t;r&&(i=ii(r))}let a=r.lineWidth;if(a){let t=!r.strokeNoScale&&e.transform?e.transform[0]:1;a/=t}let o={cursor:`pointer`};i&&(o.fill=i),r.stroke&&(o.stroke=r.stroke),a&&(o[`stroke-width`]=a),w3(o,t,n,!0)}}}function w3(e,t,n,r){let i=JSON.stringify(e),a=n.cssStyleCache[i];a||(a=n.zrId+`-cls-`+p3(),n.cssStyleCache[i]=a,n.cssNodes[`.`+a+(r?`:hover`:``)]=e),t.class=t.class?t.class+` `+a:a}const T3=Math.round;function E3(e){return e&&z(e.src)}function D3(e){return e&&R(e.toDataURL)}function O3(e,t,n,r){t3((i,a)=>{let o=i===`fill`||i===`stroke`;o&&bi(a)?U3(t,e,i,r):o&&_i(a)?W3(n,e,i,r):e[i]=a,o&&r.ssr&&a===`none`&&(e[`pointer-events`]=`visible`)},t,n,!1),H3(n,e,r)}function k3(e,t){let n=ho(t);n&&(n.each((t,n)=>{t!=null&&(e[(`ecmeta_`+n).toLowerCase()]=t+``)}),t.isSilent()&&(e.ecmeta_silent=`true`))}function A3(e){return si(e[0]-1)&&si(e[1])&&si(e[2])&&si(e[3]-1)}function j3(e){return si(e[4])&&si(e[5])}function M3(e,t,n){if(t&&!(j3(t)&&A3(t))){let r=n?10:1e4;e.transform=A3(t)?`translate(${T3(t[4]*r)/r} ${T3(t[5]*r)/r})`:ui(t)}}function N3(e,t,n){let r=e.points,i=[];for(let e=0;e<r.length;e++)i.push(T3(r[e][0]*n)/n),i.push(T3(r[e][1]*n)/n);t.points=i.join(` `)}function P3(e){return!e.smooth}function F3(e){let t=F(e,e=>typeof e==`string`?[e,e]:e);return function(e,n,r){for(let i=0;i<t.length;i++){let a=t[i],o=e[a[0]];o!=null&&(n[a[1]]=T3(o*r)/r)}}}const I3={circle:[F3([`cx`,`cy`,`r`])],polyline:[N3,P3],polygon:[N3,P3]};function L3(e){let t=e.animators;for(let e=0;e<t.length;e++)if(t[e].targetName===`shape`)return!0;return!1}function R3(e,t){let n=e.style,r=e.shape,i=I3[e.type],a={},o=t.animation,s=`path`,c=e.style.strokePercent,l=t.compress&&Si(e)||4;if(i&&!t.willUpdate&&(!i[1]||i[1](r))&&!(o&&L3(e))&&!(c<1)){s=e.type;let t=Math.pow(10,l);i[0](r,a,t)}else{let t=!e.path||e.shapeChanged();e.path||e.createPathProxy();let n=e.path;t&&(n.beginPath(),e.buildPath(n,e.shape),e.pathUpdated());let r=n.getVersion(),i=e,o=i.__svgPathBuilder;(i.__svgPathVersion!==r||!o||c!==i.__svgPathStrokePercent)&&(o||(o=i.__svgPathBuilder=new J4),o.reset(l),n.rebuildPath(o,c),o.generateStr(),i.__svgPathVersion=r,i.__svgPathStrokePercent=c),a.d=o.getStr()}return M3(a,e.transform),O3(a,n,e,t),k3(a,e),t.animation&&S3(e,a,t),t.emphasis&&C3(e,a,t),a3(s,e.id+``,a)}function z3(e,t){let n=e.style,r=n.image;if(r&&!z(r)&&(E3(r)?r=r.src:D3(r)&&(r=r.toDataURL())),!r)return;let i=n.x||0,a=n.y||0,o=n.width,s=n.height,c={href:r,width:o,height:s};return i&&(c.x=i),a&&(c.y=a),M3(c,e.transform),O3(c,n,e,t),k3(c,e),t.animation&&S3(e,c,t),a3(`image`,e.id+``,c)}function B3(e,t){let n=e.style,r=n.text;if(r!=null&&(r+=``),!r||isNaN(n.x)||isNaN(n.y))return;let i=n.font||l,a=n.x||0,o=fi(n.y||0,Fa(i),n.textBaseline),s={"dominant-baseline":`central`,"text-anchor":di[n.textAlign]||n.textAlign};if($u(n)){let e=``,t=n.fontStyle,r=Zu(n.fontSize);if(!parseFloat(r))return;let i=n.fontFamily||`sans-serif`,a=n.fontWeight;e+=`font-size:${r};font-family:${i};`,t&&t!==`normal`&&(e+=`font-style:${t};`),a&&a!==`normal`&&(e+=`font-weight:${a};`),s.style=e}else s.style=`font: ${i}`;return r.match(/\s/)&&(s[`xml:space`]=`preserve`),a&&(s.x=a),o&&(s.y=o),M3(s,e.transform),O3(s,n,e,t),k3(s,e),t.animation&&S3(e,s,t),a3(`text`,e.id+``,s,void 0,r)}function V3(e,t){if(e instanceof Ou)return R3(e,t);if(e instanceof Fu)return z3(e,t);if(e instanceof ju)return B3(e,t)}function H3(e,t,n){let r=e.style;if(pi(r)){let i=mi(e),a=n.shadowCache,o=a[i];if(!o){let t=e.getGlobalScale(),s=t[0],c=t[1];if(!s||!c)return;let l=r.shadowOffsetX||0,u=r.shadowOffsetY||0,d=r.shadowBlur,{opacity:f,color:p}=oi(r.shadowColor),m=d/2/s,h=d/2/c,g=m+` `+h;o=n.zrId+`-s`+n.shadowIdx++,n.defs[o]=a3(`filter`,o,{id:o,x:`-100%`,y:`-100%`,width:`300%`,height:`300%`},[a3(`feDropShadow`,``,{dx:l/s,dy:u/c,stdDeviation:g,"flood-color":p,"flood-opacity":f})]),a[i]=o}t.filter=xi(o)}}function U3(e,t,n,r){let i=e[n],a,o={gradientUnits:i.global?`userSpaceOnUse`:`objectBoundingBox`};if(vi(i))a=`linearGradient`,o.x1=i.x,o.y1=i.y,o.x2=i.x2,o.y2=i.y2;else if(yi(i))a=`radialGradient`,o.cx=V(i.x,.5),o.cy=V(i.y,.5),o.r=V(i.r,.5);else return;let s=i.colorStops,c=[];for(let e=0,t=s.length;e<t;++e){let t=li(s[e].offset)*100+`%`,n=s[e].color,{color:r,opacity:i}=oi(n),a={offset:t};a[`stop-color`]=r,i<1&&(a[`stop-opacity`]=i),c.push(a3(`stop`,e+``,a))}let l=c3(a3(a,``,o,c)),u=r.gradientCache,d=u[l];d||(d=r.zrId+`-g`+r.gradientIdx++,u[l]=d,o.id=d,r.defs[d]=a3(a,d,o,c)),t[n]=xi(d)}function W3(e,t,n,r){let i=e.style[n],a=e.getBoundingRect(),o={},s=i.repeat,c=s===`no-repeat`,l=s===`repeat-x`,u=s===`repeat-y`,d;if(hi(i)){let t=i.imageWidth,n=i.imageHeight,r,s=i.image;if(z(s)?r=s:E3(s)?r=s.src:D3(s)&&(r=s.toDataURL()),typeof Image>`u`){let e=`Image width/height must been given explictly in svg-ssr renderer.`;H(t,e),H(n,e)}else if(t==null||n==null){let i=(e,r)=>{if(e){let i=e.elm,o=t||r.width,s=n||r.height;e.tag===`pattern`&&(l?(s=1,o/=a.width):u&&(o=1,s/=a.height)),e.attrs.width=o,e.attrs.height=s,i&&(i.setAttribute(`width`,o),i.setAttribute(`height`,s))}},o=Vc(r,null,e,e=>{c||i(h,e),i(d,e)});o&&o.width&&o.height&&(t=t||o.width,n=n||o.height)}d=a3(`image`,`img`,{href:r,width:t,height:n}),o.width=t,o.height=n}else i.svgElement&&(d=k(i.svgElement),o.width=i.svgWidth,o.height=i.svgHeight);if(!d)return;let f,p;c?f=p=1:l?(p=1,f=o.width/a.width):u?(f=1,p=o.height/a.height):o.patternUnits=`userSpaceOnUse`,f!=null&&!isNaN(f)&&(o.width=f),p!=null&&!isNaN(p)&&(o.height=p);let m=Ci(i);m&&(o.patternTransform=m);let h=a3(`pattern`,``,o,[d]),g=c3(h),_=r.patternCache,v=_[g];v||(v=r.zrId+`-p`+r.patternIdx++,_[g]=v,o.id=v,h=r.defs[v]=a3(`pattern`,v,o,[d])),t[n]=xi(v)}function G3(e,t,n){let{clipPathCache:r,defs:i}=n,a=r[e.id];if(!a){a=n.zrId+`-c`+n.clipPathIdx++;let t={id:a};r[e.id]=a,i[a]=a3(`clipPath`,a,t,[R3(e,n)])}t[`clip-path`]=xi(a)}function K3(e){return document.createTextNode(e)}function q3(e,t,n){e.insertBefore(t,n)}function J3(e,t){e.removeChild(t)}function Y3(e,t){e.appendChild(t)}function X3(e){return e.parentNode}function Z3(e){return e.nextSibling}function Q3(e,t){e.textContent=t}const $3=a3(``,``);function e6(e){return e===void 0}function t6(e){return e!==void 0}function n6(e,t,n){let r={};for(let i=t;i<=n;++i){let t=e[i].key;t!==void 0&&(r[t]=i)}return r}function r6(e,t){let n=e.key===t.key;return e.tag===t.tag&&n}function i6(e){let t,n=e.children,r=e.tag;if(t6(r)){let i=e.elm=i3(r);if(s6($3,e),L(n))for(t=0;t<n.length;++t){let e=n[t];e!=null&&Y3(i,i6(e))}else t6(e.text)&&!B(e.text)&&Y3(i,K3(e.text))}else e.elm=K3(e.text);return e.elm}function a6(e,t,n,r,i){for(;r<=i;++r){let i=n[r];i!=null&&q3(e,i6(i),t)}}function o6(e,t,n,r){for(;n<=r;++n){let r=t[n];r!=null&&(t6(r.tag)?J3(X3(r.elm),r.elm):J3(e,r.elm))}}function s6(e,t){let n,r=t.elm,i=e&&e.attrs||{},a=t.attrs||{};if(i!==a){for(n in a){let e=a[n];i[n]!==e&&(e===!0?r.setAttribute(n,``):e===!1?r.removeAttribute(n):n===`style`?r.style.cssText=e:n.charCodeAt(0)===120?n===`xmlns:xlink`||n===`xmlns`?r.setAttributeNS(`http://www.w3.org/2000/xmlns/`,n,e):n.charCodeAt(3)===58?r.setAttributeNS(`http://www.w3.org/XML/1998/namespace`,n,e):n.charCodeAt(5)===58?r.setAttributeNS(r3,n,e):r.setAttribute(n,e):r.setAttribute(n,e))}for(n in i)n in a||r.removeAttribute(n)}}function c6(e,t,n){let r=0,i=0,a=t.length-1,o=t[0],s=t[a],c=n.length-1,l=n[0],u=n[c],d,f,p,m;for(;r<=a&&i<=c;)o==null?o=t[++r]:s==null?s=t[--a]:l==null?l=n[++i]:u==null?u=n[--c]:r6(o,l)?(l6(o,l),o=t[++r],l=n[++i]):r6(s,u)?(l6(s,u),s=t[--a],u=n[--c]):r6(o,u)?(l6(o,u),q3(e,o.elm,Z3(s.elm)),o=t[++r],u=n[--c]):r6(s,l)?(l6(s,l),q3(e,s.elm,o.elm),s=t[--a],l=n[++i]):(e6(d)&&(d=n6(t,r,a)),f=d[l.key],e6(f)?q3(e,i6(l),o.elm):(p=t[f],p.tag===l.tag?(l6(p,l),t[f]=void 0,q3(e,p.elm,o.elm)):q3(e,i6(l),o.elm)),l=n[++i]);(r<=a||i<=c)&&(r>a?(m=n[c+1]==null?null:n[c+1].elm,a6(e,m,n,i,c)):o6(e,t,r,a))}function l6(e,t){let n=t.elm=e.elm,r=e.children,i=t.children;e!==t&&(s6(e,t),e6(t.text)?t6(r)&&t6(i)?r!==i&&c6(n,r,i):t6(i)?(t6(e.text)&&Q3(n,``),a6(n,null,i,0,i.length-1)):t6(r)?o6(n,r,0,r.length-1):t6(e.text)&&Q3(n,``):e.text!==t.text&&(t6(r)&&o6(n,r,0,r.length-1),Q3(n,t.text)))}function u6(e,t){if(r6(e,t))l6(e,t);else{let n=e.elm,r=X3(n);i6(t),r!==null&&(q3(r,t.elm,Z3(n)),o6(r,[e],0,0))}return t}let d6=0;var f6=class{constructor(e,t,n){if(a(this,`type`,`svg`),a(this,`configLayer`,p6(`configLayer`)),this.storage=t,this._opts=n=j({},n),this.root=e,this._id=`zr`+d6++,this._oldVNode=d3(n.width,n.height),e&&!n.ssr){let t=this._viewport=document.createElement(`div`);t.style.cssText=`position:relative;overflow:hidden`;let n=this._svgDom=this._oldVNode.elm=i3(`svg`);s6(null,this._oldVNode),t.appendChild(n),e.appendChild(t)}this.resize(n.width,n.height)}getType(){return this.type}getViewportRoot(){return this._viewport}getViewportRootOffset(){let e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}}getSvgDom(){return this._svgDom}refresh(){if(this.root){let e=this.renderToVNode({willUpdate:!0});e.attrs.style=`position:absolute;left:0;top:0;user-select:none`,u6(this._oldVNode,e),this._oldVNode=e}}renderOneToVNode(e){return V3(e,u3(this._id))}renderToVNode(e){e=e||{};let t=this.storage.getDisplayList(!0),n=this._width,r=this._height,i=u3(this._id);i.animation=e.animation,i.willUpdate=e.willUpdate,i.compress=e.compress,i.emphasis=e.emphasis,i.ssr=this._opts.ssr;let a=[],o=this._bgVNode=m6(n,r,this._backgroundColor,i);o&&a.push(o);let s=e.compress?null:this._mainVNode=a3(`g`,`main`,{},[]);this._paintList(t,i,s?s.children:a),s&&a.push(s);let c=F(ue(i.defs),e=>i.defs[e]);if(c.length&&a.push(a3(`defs`,`defs`,{},c)),e.animation){let e=l3(i.cssNodes,i.cssAnims,{newline:!0});if(e){let t=a3(`style`,`stl`,{},[],e);a.push(t)}}return d3(n,r,a,e.useViewBox)}renderToString(e){return e=e||{},c3(this.renderToVNode({animation:V(e.cssAnimation,!0),emphasis:V(e.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:V(e.useViewBox,!0)}),{newline:!0})}setBackgroundColor(e){this._backgroundColor=e}getSvgRoot(){return this._mainVNode&&this._mainVNode.elm}_paintList(e,t,n){let r=e.length,i=[],a=0,o,s,c=0;for(let l=0;l<r;l++){let r=e[l];if(!r.invisible){let e=r.__clipPaths,l=e&&e.length||0,u=s&&s.length||0,d;for(d=Math.max(l-1,u-1);d>=0&&!(e&&s&&e[d]===s[d]);d--);for(let e=u-1;e>d;e--)a--,o=i[a-1];for(let r=d+1;r<l;r++){let s={};G3(e[r],s,t);let l=a3(`g`,`clip-g-`+c++,s,[]);(o?o.children:n).push(l),i[a++]=l,o=l}s=e;let f=V3(r,t);f&&(o?o.children:n).push(f)}}}resize(e,t){let n=this._opts,r=this.root,i=this._viewport;if(e!=null&&(n.width=e),t!=null&&(n.height=t),r&&i&&(i.style.display=`none`,e=vS(r,0,n),t=vS(r,1,n),i.style.display=``),this._width!==e||this._height!==t){if(this._width=e,this._height=t,i){let n=i.style;n.width=e+`px`,n.height=t+`px`}if(_i(this._backgroundColor))this.refresh();else{let n=this._svgDom;n&&(n.setAttribute(`width`,e),n.setAttribute(`height`,t));let r=this._bgVNode&&this._bgVNode.elm;r&&(r.setAttribute(`width`,e),r.setAttribute(`height`,t))}}}getWidth(){return this._width}getHeight(){return this._height}dispose(){this.root&&(this.root.innerHTML=``),this._svgDom=this._viewport=this.storage=this._oldVNode=this._bgVNode=this._mainVNode=null}clear(){this._svgDom&&(this._svgDom.innerHTML=null),this._oldVNode=null}toDataURL(e){let t=this.renderToString(),n=`data:image/svg+xml;`;return e?(t=wi(t),t&&n+`base64,`+t):n+`charset=UTF-8,`+encodeURIComponent(t)}};function p6(e){return function(){}}function m6(e,t,n,r){let i;if(n&&n!==`none`){if(i=a3(`rect`,`bg`,{width:e,height:t,x:`0`,y:`0`}),bi(n))U3({fill:n},i.attrs,`fill`,r);else if(_i(n))W3({style:{fill:n},dirty:Le,getBoundingRect:()=>({width:e,height:t})},i.attrs,`fill`,r);else{let{color:e,opacity:t}=oi(n);i.attrs.fill=e,t<1&&(i.attrs[`fill-opacity`]=t)}}return i}function h6(e){e.registerPainter(`svg`,f6)}function g6(e,t,n){let 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}function _6(e){return!e.__cursors.get(0)}function v6(e){let t=e.__cursors.get(0);return{startIdx:t?t.startIdx:0,endIdx:t?t.endIdx:0}}var y6=class extends mt{constructor(e,t,n){super(),a(this,`motionBlur`,!1),a(this,`lastFrameAlpha`,.7),a(this,`dpr`,1),a(this,`virtual`,!1),a(this,`config`,{}),a(this,`zlevel`,0),a(this,`zlevel2`,0),a(this,`maxRepaintRectCount`,5),a(this,`__dirty`,!0),a(this,`__firstTimePaint`,!0),a(this,`__prevIdx`,{startIdx:0,endIdx:0});let r;n=n||ca,typeof e==`string`?r=g6(e,t,n):B(e)&&(r=e,e=r.id),this.id=e,this.dom=r;let i=r.style;i&&(Ie(r),r.onselectstart=()=>!1,i.padding=`0`,i.margin=`0`,i.borderWidth=`0`),this.painter=t,this.dpr=n}afterBrush(){this.__prevIdx=v6(this)}initContext(){this.ctx=this.dom.getContext(`2d`),this.ctx.dpr=this.dpr}setUnpainted(){this.__firstTimePaint=!0}createBackBuffer(){let e=this.dpr;this.domBack=g6(`back-`+this.id,this.painter,e),this.ctxBack=this.domBack.getContext(`2d`),e!==1&&this.ctxBack.scale(e,e)}createRepaintRects(e,t,n,r){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;let i=[],a=this.maxRepaintRectCount,o=!1,s=new K(0,0,0,0);function c(e){if(e.isFinite()&&!e.isZero()){if(i.length===0){let t=new K(0,0,0,0);t.copy(e),i.push(t)}else{let t=!1,n=1/0,r=0;for(let a=0;a<i.length;++a){let c=i[a];if(c.intersect(e)){let n=new K(0,0,0,0);n.copy(c),n.union(e),i[a]=n,t=!0;break}if(o){s.copy(e),s.union(c);let t=e.width*e.height,i=c.width*c.height,o=s.width*s.height-t-i;o<n&&(n=o,r=a)}}if(o&&(i[r].union(e),t=!0),!t){let t=new K(0,0,0,0);t.copy(e),i.push(t)}o||(o=i.length>=a)}}}let l=v6(this);for(let t=l.startIdx;t<l.endIdx;++t){let i=e[t];if(i){let e=i.shouldBePainted(n,r,!0,!0),t=i.__isRendered&&(i.__dirty&1||!e)?i.getPrevPaintRect():null;t&&c(t);let a=e&&(i.__dirty&1||!i.__isRendered)?i.getPaintRect():null;a&&c(a)}}let u=this.__prevIdx;for(let e=u.startIdx;e<u.endIdx;++e){let i=t[e],a=i&&i.shouldBePainted(n,r,!0,!0);if(i&&(!a||!i.__zr)&&i.__isRendered){let e=i.getPrevPaintRect();e&&c(e)}}let d;do{d=!1;for(let e=0;e<i.length;)if(i[e].isZero())i.splice(e,1);else{for(let t=e+1;t<i.length;)i[e].intersect(i[t])?(d=!0,i[e].union(i[t]),i.splice(t,1)):t++;e++}}while(d);return this._paintRects=i,i}debugGetPaintRects(){return(this._paintRects||[]).slice()}resize(e,t){let n=this.dpr,r=this.dom,i=r.style,a=this.domBack;i&&(i.width=e+`px`,i.height=t+`px`),r.width=e*n,r.height=t*n,a&&(a.width=e*n,a.height=t*n,n!==1&&this.ctxBack.scale(n,n))}clear(e,t,n){let r=this.dom,i=this.ctx,a=r.width,o=r.height;t=t||this.clearColor;let s=this.motionBlur&&!e,c=this.lastFrameAlpha,l=this.dpr,u=this;s&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation=`copy`,this.ctxBack.drawImage(r,0,0,a/l,o/l));let d=this.domBack;function f(e,n,r,a){if(i.clearRect(e,n,r,a),t&&t!==`transparent`){let o;ve(t)?(o=(t.global||t.__width===r&&t.__height===a)&&t.__canvasGradient||hS(i,t,{x:0,y:0,width:r,height:a}),t.__canvasGradient=o,t.__width=r,t.__height=a):ye(t)&&(t.scaleX=t.scaleX||l,t.scaleY=t.scaleY||l,o=DS(i,t,{dirty(){u.setUnpainted(),u.painter.refresh()}})),i.save(),i.fillStyle=o||t,i.fillRect(e,n,r,a),i.restore()}s&&(i.save(),i.globalAlpha=c,i.drawImage(d,e,n,r,a),i.restore())}!n||s?f(0,0,a,o):n.length&&P(n,e=>{f(e.x*l,e.y*l,e.width*l,e.height*l)})}};const b6=1e5,x6=314159;function S6(e){return e?e.__builtin__?!0:typeof e.resize==`function`&&typeof e.refresh==`function`:!1}function C6(e,t){let n=document.createElement(`div`);return n.style.cssText=[`position:relative`,`width:`+e+`px`,`height:`+t+`px`,`padding:0`,`margin:0`,`border-width:0`].join(`;`)+`;`,n}function w6(e,t,n,r){let i=new y6(e,t,t.dpr);return i.zlevel=n,i.zlevel2=r,i.__builtin__=!0,T6(i),i}function T6(e){e.__cursorStack=[],e.__cursors=U()}function E6(e){return e.startIdx=e.drawIdx=e.endIdx=e.endIdxNew=0,e.used=!1,e.first=e.last=NaN,e.notClearIdx=-1,e}function D6(e,t){let n=e.__cursors,r=+t;return n.get(r)||(e.__cursorStack.push(r),n.set(r,E6({key:r})))}function O6(e,t){let n=e.__cursorStack;for(let r=0;r<n.length;r++)t(e.__cursors.get(n[r]))}function k6(e,t){let n=e.layers;return n[t]||(n[t]=[,,,])}function A6(e,t,n){let r=e.layerStack;for(let i=0;i<r.length;i++){let a=r[i].zl,o=r[i].zl2,s=e.layers[a][o];(!n||(!(n&j6)||s.__builtin__)&&(!(n&M6)||!s.__builtin__)&&(!(n&N6)||s!==e.hoverlayer))&&t(s,a,o,i)}}const j6=1,M6=2,N6=4;var P6=class{constructor(e,t,n,r){a(this,`type`,`canvas`),a(this,`_prevDisplayList`,[]),a(this,`_layerConfig`,{}),a(this,`_needsManuallyCompositing`,!1),this.type=`canvas`,this._i={layerStack:[],layers:[]};let i=!e.nodeName||e.nodeName.toUpperCase()===`CANVAS`;if(this._opts=n=j({},n||{}),this.dpr=n.devicePixelRatio||ca,this._singleCanvas=i,this.root=e,e.style&&(Ie(e),e.innerHTML=``),this.storage=t,this._prevDisplayList=[],i){let t=e,r=t.width,i=t.height;n.width!=null&&(r=n.width),n.height!=null&&(i=n.height),this.dpr=n.devicePixelRatio||1,t.width=r*this.dpr,t.height=i*this.dpr,this._width=r,this._height=i;let a=w6(t,this,x6,0);a.initContext(),this._insertLayer(a,x6,0,!0),this._domRoot=e}else{this._width=vS(e,0,n),this._height=vS(e,1,n);let t=this._domRoot=C6(this._width,this._height);e.appendChild(t)}}getType(){return`canvas`}isSingleCanvas(){return this._singleCanvas}getViewportRoot(){return this._domRoot}getViewportRootOffset(){let e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}}refresh(e){let t;t=e&&!B(e)?{paintAll:!!e}:e||{};let n=V(t.refresh,!0),r=V(t.refreshHover,!1);if(r&&(this._hoverLayerDirty=2),!n)return r&&this._paintHoverList(this.storage.getDisplayList(!1)),this;let i=this.storage.getDisplayList(!0);this._updateLayerStatus(i,t.paintAll),this._redrawId=Math.random();let a=this._prevDisplayList;this._paintList(i,a,this._redrawId);let o=this._backgroundColor;return A6(this._i,function(e,t,n,r){e.refresh&&e.refresh(r===0?o:null)},2),this._opts.useDirtyRect&&(this._prevDisplayList=i.slice()),this}_paintHoverList(e){let t=this._i.hoverlayer,n=this._hoverLayerDirty;if(this._hoverLayerDirty=void 0,n===void 0||(!t&&n===2&&(t=this._i.hoverlayer=this._ensureLayer(b6)),!t))return;t.clear();let r={inHover:!0,viewWidth:this._width,viewHeight:this._height,beforeBrushParam:{}},i;for(let n=0,a=e.length;n<a;n++){let a=e[n];if(!a.__inHover)continue;i||(i=t.ctx,i.save());let o=a.__hoverStyle,s;o&&(s=a.style,a.style=o),HS(i,a,r),o&&(a.style=s)}i&&(US(i,r),i.restore())}getHoverLayer(){return this._ensureLayer(b6)}paintOne(e,t){VS(e,t)}_paintList(e,t,n){if(this._redrawId!==n)return;let r=this._doPaintList(e,t);if(this._needsManuallyCompositing&&this._compositeManually(),r)A6(this._i,function(e){e.afterBrush&&e.afterBrush()},5),this._paintHoverList(e);else{let r=this;Xn(function(){r._paintList(e,t,n)})}}_compositeManually(){let e=this._ensureLayer(x6).ctx,t=this._domRoot.width,n=this._domRoot.height;e.clearRect(0,0,t,n),A6(this._i,function(r){r.virtual&&e.drawImage(r.dom,0,0,t,n)},1)}_doPaintList(e,t){let n=this,r=!0;return A6(this._i,function(i){let a=!1;if(O6(i,function(e){(e.drawIdx<e.endIdx||e.notClearIdx>=0)&&(a=!0)}),!a&&!i.__dirty)return;let o=n._opts.useDirtyRect&&!_6(i)?i.createRepaintRects(e,t,n._width,n._height):null,s=n._i.layerStack[0],c=!0;if(i.__dirty){c=!1,i.__dirty=!1;let e=i.zlevel===s.zl&&i.zlevel2===s.zl2?n._backgroundColor:null;i.clear(!1,e,o)}O6(i,function(t){let a=n._paintPerCursor(i,t,e,o,c);r=r&&a})},5),s.wxa&&A6(this._i,function(e){e&&e.ctx&&e.ctx.draw&&e.ctx.draw()}),r}_paintPerCursor(e,t,n,r,i){let a=e.ctx;if(r){if(!r.length)t.drawIdx=t.endIdx;else{let o=this.dpr;for(let s=0;s<r.length;++s){let c=r[s];a.save(),a.beginPath(),a.rect(c.x*o,c.y*o,c.width*o,c.height*o),a.clip(),this._paintPerCursorInRect(e,t,n,c,i),a.restore()}}}else a.save(),this._paintPerCursorInRect(e,t,n,null,i),a.restore();return t.drawIdx>=t.endIdx}_paintPerCursorInRect(e,t,n,r,i){let a={inHover:!1,allClipped:!1,prevEl:null,viewWidth:this._width,viewHeight:this._height,beforeBrushParam:{contentRetained:i}},o=e.ctx,s=_6(e),c=s&&f.getTime(),l=t.drawIdx,u=t.notClearIdx,d=u>=0?Math.min(u,l):l;for(;d<t.endIdx;d++){let e=n[d];if(!(d<l&&!e.notClear)){if(e.__inHover&&(this._hoverLayerDirty=2),r!=null){let t=e.getPaintRect();t&&t.intersect(r)&&(HS(o,e,a),e.setPrevPaintRect(t))}else HS(o,e,a);if(s&&f.getTime()-c>15){d++;break}}}US(o,a),t.drawIdx=Math.max(d,l)}getLayer(e,t){return this._ensureLayer(e,0,t)}_ensureLayer(e,t,n){t=t||0;let r=this._singleCanvas;r&&!this._needsManuallyCompositing&&(e=x6,t=0);let i=k6(this._i,e)[t];return i||(i=w6(`zr_`+e+`.`+t,this,e,t),this._layerConfig[e]&&A(i,this._layerConfig[e],!0),(n||r&&e!==x6)&&(i.virtual=!0),this._insertLayer(i,e,t,!1),i.initContext()),i}insertLayer(e,t){this._insertLayer(t,e,0,!1)}_insertLayer(e,t,n,r){let i=this._i,a=i.layers,o=i.layerStack,s=this._domRoot,c=null;if(a[t]&&a[t][n]||!S6(e))return;let l=o.length,u=0;for(;u<l&&(o[u].zl<t||o[u].zl===t&&o[u].zl2<n);)u++;if(u>0&&(c=k6(i,o[u-1].zl)[o[u-1].zl2]),o.splice(u,0,{zl:t,zl2:n}),k6(i,t)[n]=e,!r&&!e.virtual){if(c){let t=c.dom;t.nextSibling?s.insertBefore(e.dom,t.nextSibling):s.appendChild(e.dom)}else s.firstChild?s.insertBefore(e.dom,s.firstChild):s.appendChild(e.dom)}e.painter||(e.painter=this)}eachLayer(e,t){return A6(this._i,function(n,r){e.call(t,n,r)})}eachBuiltinLayer(e,t){return A6(this._i,function(n,r){e.call(t,n,r)},1)}eachOtherLayer(e,t){return A6(this._i,function(n,r){e.call(t,n,r)},2)}getLayers(){let e={};return A6(this._i,function(t,n,r){e[t.id]=t}),e}_updateLayerStatus(e,t){let n=this;if(n._singleCanvas)for(let t=1;t<e.length;t++){let r=e[t];if(r.zlevel!==e[t-1].zlevel||r.incremental){n._needsManuallyCompositing=!0;break}}A6(n._i,function(e){e.__dirty=!1,O6(e,function(e){e.used=!1,e.endIdxNew=0,e.notClearIdx=-1})},5);let r,i=null,a=null,o=!1;for(let s=0,c=e.length;s<c;s++){let c=e[s],l=c.zlevel,u=c.incremental,d;if(r!==l&&(r=l,o=!1),u?(o=!0,d=1):d=o?2:0,(!i||l!==i.zlevel||d!==i.zlevel2)&&(i=n._ensureLayer(l,d),a=null,!i.__builtin__))ee(`ZLevel `+l+` has been used by unknown layer `+i.id);else{if((!a||u!==a.key)&&(a=D6(i,u),!a.used)){if(a.used=!0,!t&&a.first===c.id){let e=s-a.startIdx;a.startIdx=s,a.drawIdx+=e,a.endIdx+=e}else i.__dirty=!0,a.first=c.id,a.startIdx=a.drawIdx=s,a.endIdx=s+1}a.endIdxNew=s+1,c.__dirty&1&&!c.__inHover&&((!u||!c.notClear&&s<a.drawIdx)&&(i.__dirty=!0),u&&c.notClear&&a.notClearIdx<0&&(a.notClearIdx=s))}}A6(n._i,function(t){let r=t.__cursorStack,i=t.__cursors;for(let n=r.length-1;n>=0;n--){let a=i.get(r[n]);if(!a.used)t.__dirty=!0,i.removeKey(r[n]),r.splice(n,1);else{let n=a.endIdxNew;(_6(t)?n<a.drawIdx:n!==a.endIdx||!n||e[n-1].id!==a.last)&&(t.__dirty=!0),a.endIdx=a.endIdxNew,a.last=n?e[n-1].id:NaN}}t.__dirty&&(O6(t,function(e){e.drawIdx=e.startIdx}),n._hoverLayerDirty===void 0&&(n._hoverLayerDirty=1))},5)}clear(){return A6(this._i,function(e){e.clear(),T6(e)},1),this}setBackgroundColor(e){this._backgroundColor=e,A6(this._i,function(e){e.setUnpainted()})}configLayer(e,t){if(t){let n=this._layerConfig;n[e]?A(n[e],t,!0):n[e]=t,A6(this._i,function(e,t){A(e,n[t],!0)})}}delLayer(e){let t=this._i.layerStack,n=this._i.layers;for(let r=t.length-1;r>=0;r--){let i=t[r];if(i.zl===e){let a=n[e][i.zl2];if(a.__builtin__)continue;if(t.splice(r,1),n[e][i.zl2]=void 0,!a.virtual){let e=a.dom.parentNode;e&&e.removeChild(a.dom)}}}}resize(e,t){if(this._domRoot.style){let n=this._domRoot;n.style.display=`none`;let r=this._opts,i=this.root;e!=null&&(r.width=e),t!=null&&(r.height=t),e=vS(i,0,r),t=vS(i,1,r),n.style.display=``,(this._width!==e||t!==this._height)&&(n.style.width=e+`px`,n.style.height=t+`px`,A6(this._i,function(n){n.resize(e,t)}),this.refresh({paintAll:!0})),this._width=e,this._height=t}else{if(e==null||t==null)return;this._width=e,this._height=t,this._ensureLayer(x6).resize(e,t)}return this}clearLayer(e){P(this._i.layers[e],function(e){e&&!e.__builtin__&&e.clear()})}dispose(){this.root.innerHTML=``,this.root=this.storage=this._domRoot=this._i=null}getRenderedCanvas(e){if(e=e||{},this._singleCanvas&&!this._compositeManually)return this._i.layers[x6][0].dom;let t=new y6(`image`,this,e.pixelRatio||this.dpr);t.initContext(),t.clear(!1,e.backgroundColor||this._backgroundColor);let n=t.ctx;if(e.pixelRatio<=this.dpr){this.refresh();let e=t.dom.width,r=t.dom.height;A6(this._i,function(t){t.__builtin__?n.drawImage(t.dom,0,0,e,r):t.renderToCanvas&&(n.save(),t.renderToCanvas(n),n.restore())})}else{let e={inHover:!1,viewWidth:this._width,viewHeight:this._height,beforeBrushParam:{}},t=this.storage.getDisplayList(!0);for(let r=0,i=t.length;r<i;r++){let i=t[r];HS(n,i,e)}US(n,e)}return t.dom}getWidth(){return this._width}getHeight(){return this._height}};function F6(e){e.registerPainter(`canvas`,P6)}const I6=ru.CMD;function L6(e,t){return Math.abs(e-t)<1e-5}function R6(e){let t=e.data,n=e.len(),r=[],i,a=0,o=0,s=0,c=0;function l(e,t){i&&i.length>2&&r.push(i),i=[e,t]}function u(e,t,n,r){L6(e,n)&&L6(t,r)||i.push(e,t,n,r,n,r)}function d(e,t,n,r,a,o){let s=Math.abs(t-e),c=Math.tan(s/4)*4/3,l=t<e?-1:1,u=Math.cos(e),d=Math.sin(e),f=Math.cos(t),p=Math.sin(t),m=u*a+n,h=d*o+r,g=f*a+n,_=p*o+r,v=a*c*l,y=o*c*l;i.push(m-v*d,h+y*u,g+v*p,_-y*f,g,_)}let f,p,m,h;for(let e=0;e<n;){let n=t[e++],r=e===1;switch(r&&(a=t[e],o=t[e+1],s=a,c=o,(n===I6.L||n===I6.C||n===I6.Q)&&(i=[s,c])),n){case I6.M:a=s=t[e++],o=c=t[e++],l(s,c);break;case I6.L:f=t[e++],p=t[e++],u(a,o,f,p),a=f,o=p;break;case I6.C:i.push(t[e++],t[e++],t[e++],t[e++],a=t[e++],o=t[e++]);break;case I6.Q:f=t[e++],p=t[e++],m=t[e++],h=t[e++],i.push(a+2/3*(f-a),o+2/3*(p-o),m+2/3*(f-m),h+2/3*(p-h),m,h),a=m,o=h;break;case I6.A:let n=t[e++],g=t[e++],_=t[e++],v=t[e++],y=t[e++],b=t[e++]+y;e+=1;let x=!t[e++];f=Math.cos(y)*_+n,p=Math.sin(y)*v+g,r?(s=f,c=p,l(s,c)):u(a,o,f,p),a=Math.cos(b)*_+n,o=Math.sin(b)*v+g;let S=(x?-1:1)*Math.PI/2;for(let e=y;x?e>b:e<b;e+=S){let t=x?Math.max(e+S,b):Math.min(e+S,b);d(e,t,n,g,_,v)}break;case I6.R:s=a=t[e++],c=o=t[e++],f=s+t[e++],p=c+t[e++],l(f,c),u(f,c,f,p),u(f,p,s,p),u(s,p,s,c),u(s,c,f,c);break;case I6.Z:i&&u(a,o,s,c),a=s,o=c}}return i&&i.length>2&&r.push(i),r}function z6(e,t,n,r,i,a,o,s,c,l){if(L6(e,n)&&L6(t,r)&&L6(i,o)&&L6(a,s)){c.push(o,s);return}let u=2/l,d=u*u,f=o-e,p=s-t,m=Math.sqrt(f*f+p*p);f/=m,p/=m;let h=n-e,g=r-t,_=i-o,v=a-s,y=h*h+g*g,b=_*_+v*v;if(y<d&&b<d){c.push(o,s);return}let x=f*h+p*g,S=-f*_-p*v,C=y-x*x,w=b-S*S;if(C<d&&x>=0&&w<d&&S>=0){c.push(o,s);return}let T=[],E=[];pr(e,n,i,o,.5,T),pr(t,r,a,s,.5,E),z6(T[0],E[0],T[1],E[1],T[2],E[2],T[3],E[3],c,l),z6(T[4],E[4],T[5],E[5],T[6],E[6],T[7],E[7],c,l)}function B6(e,t){let n=R6(e),r=[];t=t||1;for(let e=0;e<n.length;e++){let i=n[e],a=[],o=i[0],s=i[1];a.push(o,s);for(let e=2;e<i.length;){let n=i[e++],r=i[e++],c=i[e++],l=i[e++],u=i[e++],d=i[e++];z6(o,s,n,r,c,l,u,d,a,t),o=u,s=d}r.push(a)}return r}function V6(e,t,n){let r=e[t],i=e[1-t],a=Math.abs(r/i),o=Math.ceil(Math.sqrt(a*n)),s=Math.floor(n/o);s===0&&(s=1,o=n);let c=[];for(let e=0;e<o;e++)c.push(s);let l=n-o*s;if(l>0)for(let e=0;e<l;e++)c[e%o]+=1;return c}function H6(e,t,n){let r=e.r0,i=e.r,a=e.startAngle,o=e.endAngle,s=Math.abs(o-a),c=s*i,l=i-r,u=c>Math.abs(l),d=V6([c,l],+!u,t),f=(u?s:l)/d.length;for(let t=0;t<d.length;t++){let i=(u?l:s)/d[t];for(let o=0;o<d[t];o++){let s={};u?(s.startAngle=a+f*t,s.endAngle=a+f*(t+1),s.r0=r+i*o,s.r=r+i*(o+1)):(s.startAngle=a+i*o,s.endAngle=a+i*(o+1),s.r0=r+f*t,s.r=r+f*(t+1)),s.clockwise=e.clockwise,s.cx=e.cx,s.cy=e.cy,n.push(s)}}}function U6(e,t,n){let r=e.width,i=e.height,a=r>i,o=V6([r,i],+!a,t),s=a?`width`:`height`,c=a?`height`:`width`,l=a?`x`:`y`,u=a?`y`:`x`,d=e[s]/o.length;for(let t=0;t<o.length;t++){let r=e[c]/o[t];for(let i=0;i<o[t];i++){let a={};a[l]=t*d,a[u]=i*r,a[s]=d,a[c]=r,a.x+=e.x,a.y+=e.y,n.push(a)}}}function W6(e,t,n,r){return e*r-n*t}function G6(e,t,n,r,i,a,o,s){let c=n-e,l=r-t,u=o-i,d=s-a,f=W6(u,d,c,l);if(Math.abs(f)<1e-6)return null;let p=W6(e-i,t-a,u,d)/f;return p<0||p>1?null:new G(p*c+e,p*l+t)}function K6(e,t,n){let r=new G;G.sub(r,n,t),r.normalize();let i=new G;return G.sub(i,e,t),i.dot(r)}function q6(e,t){let n=e[e.length-1];n&&n[0]===t[0]&&n[1]===t[1]||e.push(t)}function J6(e,t,n){let r=e.length,i=[];for(let a=0;a<r;a++){let o=e[a],s=e[(a+1)%r],c=G6(o[0],o[1],s[0],s[1],t.x,t.y,n.x,n.y);c&&i.push({projPt:K6(c,t,n),pt:c,idx:a})}if(i.length<2)return[{points:e},{points:e}];i.sort((e,t)=>e.projPt-t.projPt);let a=i[0],o=i[i.length-1];if(o.idx<a.idx){let e=a;a=o,o=e}let s=[a.pt.x,a.pt.y],c=[o.pt.x,o.pt.y],l=[s],u=[c];for(let t=a.idx+1;t<=o.idx;t++)q6(l,e[t].slice());q6(l,c),q6(l,s);for(let t=o.idx+1;t<=a.idx+r;t++)q6(u,e[t%r].slice());return q6(u,s),q6(u,c),[{points:l},{points:u}]}function Y6(e){let t=e.points,n=[],r=[];jl(t,n,r);let i=new K(n[0],n[1],r[0]-n[0],r[1]-n[1]),a=i.width,o=i.height,s=i.x,c=i.y,l=new G,u=new G;return a>o?(l.x=u.x=s+a/2,l.y=c,u.y=c+o):(l.y=u.y=c+o/2,l.x=s,u.x=s+a),J6(t,l,u)}function X6(e,t,n,r){if(n===1)r.push(t);else{let i=Math.floor(n/2),a=e(t);X6(e,a[0],i,r),X6(e,a[1],n-i,r)}return r}function Z6(e,t){let n=[];for(let r=0;r<t;r++)n.push(Zf(e));return n}function Q6(e,t){t.setStyle(e.style),t.z=e.z,t.z2=e.z2,t.zlevel=e.zlevel}function $6(e){let t=[];for(let n=0;n<e.length;)t.push([e[n++],e[n++]]);return t}function e8(e,t){let n=[],r=e.shape,i;switch(e.type){case`rect`:U6(r,t,n),i=Uu;break;case`sector`:H6(r,t,n),i=vp;break;case`circle`:H6({r0:0,r:r.r,startAngle:0,endAngle:Math.PI*2,cx:r.cx,cy:r.cy},t,n),i=vp;break;default:let a=e.getComputedTransform(),o=a?Math.sqrt(Math.max(a[0]*a[0]+a[1]*a[1],a[2]*a[2]+a[3]*a[3])):1,s=F(B6(e.getUpdatedPathProxy(),o),e=>$6(e)),c=s.length;if(c===0)X6(Y6,{points:s[0]},t,n);else if(c===t)for(let e=0;e<c;e++)n.push({points:s[e]});else{let e=0,r=F(s,t=>{let n=[],r=[];jl(t,n,r);let i=(r[1]-n[1])*(r[0]-n[0]);return e+=i,{poly:t,area:i}});r.sort((e,t)=>t.area-e.area);let i=t;for(let a=0;a<c;a++){let o=r[a];if(i<=0)break;let s=a===c-1?i:Math.ceil(o.area/e*t);s<0||(X6(Y6,{points:o.poly},s,n),i-=s)}}i=wp}if(!i)return Z6(e,t);let a=[];for(let t=0;t<n.length;t++){let r=new i;r.setShape(n[t]),Q6(e,r),a.push(r)}return a}function t8(e,t){let n=e.length,r=t.length;if(n===r)return[e,t];let i=[],a=[],o=n<r?e:t,s=Math.min(n,r),c=Math.abs(r-n)/6,l=(s-2)/6,u=Math.ceil(c/l)+1,d=[o[0],o[1]],f=c;for(let e=2;e<s;){let t=o[e-2],n=o[e-1],r=o[e++],s=o[e++],c=o[e++],l=o[e++],p=o[e++],m=o[e++];if(f<=0){d.push(r,s,c,l,p,m);continue}let h=Math.min(f,u-1)+1;for(let e=1;e<=h;e++){let o=e/h;pr(t,r,c,p,o,i),pr(n,s,l,m,o,a),t=i[3],n=a[3],d.push(i[1],a[1],i[2],a[2],t,n),r=i[5],s=a[5],c=i[6],l=a[6]}f-=h-1}return o===e?[d,t]:[e,d]}function n8(e,t){let n=e.length,r=e[n-2],i=e[n-1],a=[];for(let e=0;e<t.length;)a[e++]=r,a[e++]=i;return a}function r8(e,t){let n,r,i=[],a=[];for(let o=0;o<Math.max(e.length,t.length);o++){let s=e[o],c=t[o],l,u;s?c?([l,u]=t8(s,c),n=l,r=u):(u=n8(r||s,s),l=s):(l=n8(n||c,c),u=c),i.push(l),a.push(u)}return[i,a]}function i8(e){let t=0,n=0,r=0,i=e.length;for(let a=0,o=i-2;a<i;o=a,a+=2){let i=e[o],s=e[o+1],c=e[a],l=e[a+1],u=i*l-c*s;t+=u,n+=(i+c)*u,r+=(s+l)*u}return t===0?[e[0]||0,e[1]||0]:[n/t/3,r/t/3,t]}function a8(e,t,n,r){let i=(e.length-2)/6,a=1/0,o=0,s=e.length,c=s-2;for(let l=0;l<i;l++){let i=l*6,u=0;for(let a=0;a<s;a+=2){let o=a===0?i:(i+a-2)%c+2,s=e[o]-n[0],l=e[o+1]-n[1],d=t[a]-r[0],f=t[a+1]-r[1],p=d-s,m=f-l;u+=p*p+m*m}u<a&&(a=u,o=l)}return o}function o8(e){let t=[],n=e.length;for(let r=0;r<n;r+=2)t[r]=e[n-r-2],t[r+1]=e[n-r-1];return t}function s8(e,t,n,r){let i=[],a;for(let o=0;o<e.length;o++){let s=e[o],c=t[o],l=i8(s),u=i8(c);a==null&&(a=l[2]<0!=u[2]<0);let d=[],f=[],p=0,m=1/0,h=[],g=s.length;a&&(s=o8(s));let _=a8(s,c,l,u)*6,v=g-2;for(let e=0;e<v;e+=2){let t=(_+e)%v+2;d[e+2]=s[t]-l[0],d[e+3]=s[t+1]-l[1]}if(d[0]=s[_]-l[0],d[1]=s[_+1]-l[1],n>0){let e=r/n;for(let t=-r/2;t<=r/2;t+=e){let e=Math.sin(t),n=Math.cos(t),r=0;for(let t=0;t<s.length;t+=2){let i=d[t],a=d[t+1],o=c[t]-u[0],s=c[t+1]-u[1],l=o*n-s*e,f=o*e+s*n;h[t]=l,h[t+1]=f;let p=l-i,m=f-a;r+=p*p+m*m}if(r<m){m=r,p=t;for(let e=0;e<h.length;e++)f[e]=h[e]}}}else for(let e=0;e<g;e+=2)f[e]=c[e]-u[0],f[e+1]=c[e+1]-u[1];i.push({from:d,to:f,fromCp:l,toCp:u,rotation:-p})}return i}function c8(e){return e.__isCombineMorphing}const l8=`__mOriginal_`;function u8(e,t,n){let r=l8+t,i=e[r]||e[t];e[r]||(e[r]=e[t]);let a=n.replace,o=n.after,s=n.before;e[t]=function(){let e=arguments,t;return s&&s.apply(this,e),t=a?a.apply(this,e):i.apply(this,e),o&&o.apply(this,e),t}}function d8(e,t){let n=l8+t;e[n]&&(e[t]=e[n],e[n]=null)}function f8(e,t){for(let n=0;n<e.length;n++){let r=e[n];for(let e=0;e<r.length;){let n=r[e],i=r[e+1];r[e++]=t[0]*n+t[2]*i+t[4],r[e++]=t[1]*n+t[3]*i+t[5]}}}function p8(e,t){let n=e.getUpdatedPathProxy(),r=t.getUpdatedPathProxy(),[i,a]=r8(R6(n),R6(r)),o=e.getComputedTransform(),s=t.getComputedTransform();function c(){this.transform=null}o&&f8(i,o),s&&f8(a,s),u8(t,`updateTransform`,{replace:c}),t.transform=null;let l=s8(i,a,10,Math.PI),u=[];u8(t,`buildPath`,{replace(e){let n=t.__morphT,r=1-n,i=[];for(let t=0;t<l.length;t++){let a=l[t],o=a.from,s=a.to,c=a.rotation*n,d=a.fromCp,f=a.toCp,p=Math.sin(c),m=Math.cos(c);ct(i,d,f,n);for(let e=0;e<o.length;e+=2){let t=o[e],a=o[e+1],c=s[e],l=s[e+1],d=t*r+c*n,f=a*r+l*n;u[e]=d*m-f*p+i[0],u[e+1]=d*p+f*m+i[1]}let h=u[0],g=u[1];e.moveTo(h,g);for(let t=2;t<o.length;){let n=u[t++],r=u[t++],i=u[t++],a=u[t++],o=u[t++],s=u[t++];h===n&&g===r&&i===o&&a===s?e.lineTo(o,s):e.bezierCurveTo(n,r,i,a,o,s),h=o,g=s}}}})}function m8(e,t,n){if(!e||!t)return t;let r=n.done,i=n.during;p8(e,t),t.__morphT=0;function a(){d8(t,`buildPath`),d8(t,`updateTransform`),t.__morphT=-1,t.createPathProxy(),t.dirtyShape()}return t.animateTo({__morphT:1},M({during(e){t.dirtyShape(),i&&i(e)},done(){a(),r&&r()}},n)),t}function h8(e,t,n,r,i,a){e=i===n?0:Math.round(32767*(e-n)/(i-n)),t=a===r?0:Math.round(32767*(t-r)/(a-r));let o=0,s;for(let n=32768;n>0;n/=2){let r=0,i=0;(e&n)>0&&(r=1),(t&n)>0&&(i=1),o+=n*n*(3*r^i),i===0&&(r===1&&(e=n-1-e,t=n-1-t),s=e,e=t,t=s)}return o}function g8(e){let t=1/0,n=1/0,r=-1/0,i=-1/0;return F(F(e,e=>{let a=e.getBoundingRect(),o=e.getComputedTransform(),s=a.x+a.width/2+(o?o[4]:0),c=a.y+a.height/2+(o?o[5]:0);return t=Math.min(s,t),n=Math.min(c,n),r=Math.max(s,r),i=Math.max(c,i),[s,c]}),(a,o)=>({cp:a,z:h8(a[0],a[1],t,n,r,i),path:e[o]})).sort((e,t)=>e.z-t.z).map(e=>e.path)}function _8(e){return e8(e.path,e.count)}function v8(){return{fromIndividuals:[],toIndividuals:[],count:0}}function y8(e,t,n){let r=[];function i(e){for(let t=0;t<e.length;t++){let n=e[t];c8(n)?i(n.childrenRef()):n instanceof Ou&&r.push(n)}}i(e);let a=r.length;if(!a)return v8();let o=(n.dividePath||_8)({path:t,count:a});if(o.length!==a)return console.error(`Invalid morphing: unmatched splitted path`),v8();r=g8(r),o=g8(o);let s=n.done,c=n.during,l=n.individualDelay,u=new ya;for(let e=0;e<a;e++){let n=r[e],i=o[e];i.parent=t,i.copyTransform(u),l||p8(n,i)}t.__isCombineMorphing=!0,t.childrenRef=function(){return o};function d(e){for(let t=0;t<o.length;t++)o[t].addSelfToZr(e)}u8(t,`addSelfToZr`,{after(e){d(e)}}),u8(t,`removeSelfFromZr`,{after(e){for(let t=0;t<o.length;t++)o[t].removeSelfFromZr(e)}});function f(){t.__isCombineMorphing=!1,t.__morphT=-1,t.childrenRef=null,d8(t,`addSelfToZr`),d8(t,`removeSelfFromZr`)}let p=o.length;if(l){let e=p,t=()=>{e--,e===0&&(f(),s&&s())};for(let e=0;e<p;e++){let i=l?M({delay:(n.delay||0)+l(e,p,r[e],o[e]),done:t},n):n;m8(r[e],o[e],i)}}else t.__morphT=0,t.animateTo({__morphT:1},M({during(e){for(let e=0;e<p;e++){let n=o[e];n.__morphT=t.__morphT,n.dirtyShape()}c&&c(e)},done(){f();for(let t=0;t<e.length;t++)d8(e[t],`updateTransform`);s&&s()}},n));return t.__zr&&d(t.__zr),{fromIndividuals:r,toIndividuals:o,count:p}}function b8(e,t,n){let r=t.length,i=[],a=n.dividePath||_8;function o(e){for(let t=0;t<e.length;t++){let n=e[t];c8(n)?o(n.childrenRef()):n instanceof Ou&&i.push(n)}}if(c8(e)){o(e.childrenRef());let t=i.length;if(t<r){let e=0;for(let n=t;n<r;n++)i.push(Zf(i[e++%t]))}i.length=r}else{i=a({path:e,count:r});let t=e.getComputedTransform();for(let e=0;e<i.length;e++)i[e].setLocalTransform(t);if(i.length!==r)return console.error(`Invalid morphing: unmatched splitted path`),v8()}i=g8(i),t=g8(t);let s=n.individualDelay;for(let e=0;e<r;e++){let a=s?M({delay:(n.delay||0)+s(e,r,i[e],t[e])},n):n;m8(i[e],t[e],a)}return{fromIndividuals:i,toIndividuals:t,count:t.length}}function x8(e){return L(e[0])}function S8(e,t){let n=[],r=e.length;for(let t=0;t<r;t++)n.push({one:e[t],many:[]});for(let e=0;e<t.length;e++){let i=t[e].length,a=0;for(;a<i;a++)n[a%r].many.push(t[e][a])}let i=0;for(let e=r-1;e>=0;e--)if(!n[e].many.length){let t=n[i].many;if(t.length<=1){if(i)i=0;else return n}let r=t.length,a=Math.ceil(r/2);n[e].many=t.slice(a,r),n[i].many=t.slice(0,a),i++}return n}const C8={clone(e){let t=[],n=1-Math.pow(1-e.path.style.opacity,1/e.count);for(let r=0;r<e.count;r++){let r=Zf(e.path);r.setStyle(`opacity`,n),t.push(r)}return t},split:null};function w8(e,t,n,r,i,a){if(!e.length||!t.length)return;let o=Qp(`update`,r,i);if(!(o&&o.duration>0))return;let s=r.getModel(`universalTransition`).get(`delay`),c=j({setToFinal:!0},o),l,u;x8(e)&&(l=e,u=t),x8(t)&&(l=t,u=e);function d(e,t,r,i,o){let l=e.many,u=e.one;if(l.length===1&&!o){let e=t?l[0]:u,n=t?u:l[0];if(c8(e))d({many:[e],one:n},!0,r,i,!0);else{let t=s?M({delay:s(r,i)},c):c;m8(e,n,t),a(e,n,e,n,t)}}else{let o=M({dividePath:C8[n],individualDelay:s&&function(e,t,n,a){return s(e+r,i)}},c),{fromIndividuals:d,toIndividuals:f}=t?y8(l,u,o):b8(u,l,o),p=d.length;for(let n=0;n<p;n++){let r=s?M({delay:s(n,p)},c):c;a(d[n],f[n],t?l[n]:e.one,t?e.one:l[n],r)}}}let f=l?l===e:e.length>t.length,p=l?S8(u,l):S8(f?t:e,[f?e:t]),m=0;for(let e=0;e<p.length;e++)m+=p[e].many.length;let h=0;for(let e=0;e<p.length;e++)d(p[e],f,h,m),h+=p[e].many.length}function T8(e){if(!e)return[];if(L(e)){let t=[];for(let n=0;n<e.length;n++)t.push(T8(e[n]));return t}let t=[];return e.traverse(e=>{e instanceof Ou&&!e.disableMorphing&&!e.invisible&&!e.ignore&&t.push(e)}),t}const E8=1e4,D8=Y();function O8(e,t){let n=e.dimensions;for(let r=0;r<n.length;r++){let i=e.getDimensionInfo(n[r]);if(i&&i.otherDims[t]===0)return n[r]}}function k8(e,t,n){let r=e.getDimensionInfo(n),i=r&&r.ordinalMeta;if(r){let n=e.get(r.name,t);return i&&i.categories[n]||n+``}}function A8(e,t,n,r){let i=O8(e,r?`itemChildGroupId`:`itemGroupId`);if(i)return k8(e,t,i);let a=e.getRawDataItem(t),o=r?`childGroupId`:`groupId`;if(a&&a[o])return a[o]+``;if(!r)return n||e.getId(t)}function j8(e){let t=[];return P(e,e=>{let n=e.data,r=e.dataGroupId;if(n.count()>E8){typeof process<`u`&&process.env.NODE_ENV!==`production`&&ds(`Universal transition is disabled on large data > 10k.`);return}let i=n.getIndices();for(let a=0;a<i.length;a++)t.push({data:n,groupId:A8(n,a,r,!1),childGroupId:A8(n,a,r,!0),divide:e.divide,dataIndex:a})}),t}function M8(e,t,n){e.traverse(e=>{e instanceof Ou&&tm(e,{style:{opacity:0}},t,{dataIndex:n,isFrom:!0})})}function N8(e){if(e.parent){let t=e.getComputedTransform();e.setLocalTransform(t),e.parent.remove(e)}}function P8(e){e.stopAnimation(),e.isGroup&&e.traverse(e=>{e.stopAnimation()})}function F8(e,t,n){let r=Qp(`update`,n,t);r&&e.traverse(e=>{if(e instanceof yl){let t=sm(e);t&&e.animateFrom({style:t},r)}})}function I8(e,t){let n=e.length;if(n!==t.length)return!1;for(let r=0;r<n;r++){let n=e[r],i=t[r];if(n.data.getId(n.dataIndex)!==i.data.getId(i.dataIndex))return!1}return!0}function L8(e,t,n){let r=j8(e),i=j8(t);function a(e,t,n,r,i){(n||e)&&t.animateFrom({style:n&&n!==e?j(j({},n.style),e.style):e.style},i)}let o=!1,s=0,c=U(),l=U();P(r,function(e){e.groupId&&c.set(e.groupId,!0),e.childGroupId&&l.set(e.childGroupId,!0)});for(let e=0;e<i.length;e++){let t=i[e].groupId;if(l.get(t)){s=1;break}let n=i[e].childGroupId;if(n&&c.get(n)){s=2;break}}function u(e,t){return function(n){let r=n.data,i=n.dataIndex;return t?r.getId(i):e?s===1?n.childGroupId:n.groupId:s===2?n.childGroupId:n.groupId}}let d=I8(r,i),f={};if(!d)for(let e=0;e<i.length;e++){let t=i[e],n=t.data.getItemGraphicEl(t.dataIndex);n&&(f[n.id]=!0)}function p(e,t){let n=r[t],s=i[e],c=s.data.hostModel,l=n.data.getItemGraphicEl(n.dataIndex),u=s.data.getItemGraphicEl(s.dataIndex);l===u?u&&F8(u,s.dataIndex,c):l&&f[l.id]||u&&(P8(u),l?(P8(l),N8(l),o=!0,w8(T8(l),T8(u),s.divide,c,e,a)):M8(u,c,e))}new Pw(r,i,u(!0,d),u(!1,d),null,`multiple`).update(p).updateManyToOne(function(e,t){let n=i[e],s=n.data,c=s.hostModel,l=s.getItemGraphicEl(n.dataIndex),u=ce(F(t,e=>r[e].data.getItemGraphicEl(r[e].dataIndex)),e=>e&&e!==l&&!f[e.id]);l&&(P8(l),u.length?(P(u,e=>{P8(e),N8(e)}),o=!0,w8(T8(u),T8(l),n.divide,c,e,a)):M8(l,c,n.dataIndex))}).updateOneToMany(function(e,t){let n=r[t],s=n.data.getItemGraphicEl(n.dataIndex);if(s&&f[s.id])return;let c=ce(F(e,e=>i[e].data.getItemGraphicEl(i[e].dataIndex)),e=>e&&e!==s),l=i[e[0]].data.hostModel;c.length&&(P(c,e=>P8(e)),s?(P8(s),N8(s),o=!0,w8(T8(s),T8(c),n.divide,l,e[0],a)):P(c,t=>M8(t,l,e[0])))}).updateManyToMany(function(e,t){new Pw(t,e,e=>r[e].data.getId(r[e].dataIndex),e=>i[e].data.getId(i[e].dataIndex)).update((n,r)=>{p(e[n],t[r])}).execute()}).execute(),o&&P(t,({data:e})=>{let t=e.hostModel,r=t&&n.getViewOfSeriesModel(t),i=Qp(`update`,t,0);r&&t.isAnimationEnabled()&&i&&i.duration>0&&r.group.traverse(e=>{e instanceof Ou&&!e.animators.length&&e.animateFrom({style:{opacity:0}},i)})})}function R8(e){return e.getModel(`universalTransition`).get(`seriesKey`)||e.id}function z8(e){return L(e)?e.sort().join(`,`):e}function B8(e){if(e.hostModel)return e.hostModel.getModel(`universalTransition`).get(`divideShape`)}function V8(e,t){let n=U(),r=U(),i=U();P(e.oldSeries,(t,n)=>{let a=e.oldDataGroupIds[n],o=e.oldData[n],s=R8(t),c=z8(s);r.set(c,{dataGroupId:a,data:o}),L(s)&&P(s,e=>{i.set(e,{key:c,dataGroupId:a,data:o})})});function a(e){n.get(e)&&ds(`Duplicated seriesKey in universalTransition ${e}`)}return P(t.updatedSeries,e=>{if(e.isUniversalTransitionEnabled()&&e.isAnimationEnabled()){let t=e.get(`dataGroupId`),o=e.getData(),s=R8(e),c=z8(s),l=r.get(c);if(l)typeof process<`u`&&process.env.NODE_ENV!==`production`&&a(c),n.set(c,{oldSeries:[{dataGroupId:l.dataGroupId,divide:B8(l.data),data:l.data}],newSeries:[{dataGroupId:t,divide:B8(o),data:o}]});else if(L(s)){typeof process<`u`&&process.env.NODE_ENV!==`production`&&a(c);let e=[];P(s,t=>{let n=r.get(t);n.data&&e.push({dataGroupId:n.dataGroupId,divide:B8(n.data),data:n.data})}),e.length&&n.set(c,{oldSeries:e,newSeries:[{dataGroupId:t,data:o,divide:B8(o)}]})}else{let e=i.get(s);if(e){let r=n.get(e.key);r||(r={oldSeries:[{dataGroupId:e.dataGroupId,data:e.data,divide:B8(e.data)}],newSeries:[]},n.set(e.key,r)),r.newSeries.push({dataGroupId:t,data:o,divide:B8(o)})}}}}),n}function H8(e,t){for(let n=0;n<e.length;n++)if(t.seriesIndex!=null&&t.seriesIndex===e[n].seriesIndex||t.seriesId!=null&&t.seriesId===e[n].id)return n}function U8(e,t,n,r){let i=[],a=[];P(bs(e.from),e=>{let n=H8(t.oldSeries,e);n>=0&&i.push({dataGroupId:t.oldDataGroupIds[n],data:t.oldData[n],divide:B8(t.oldData[n]),groupIdDim:e.dimension})}),P(bs(e.to),e=>{let r=H8(n.updatedSeries,e);if(r>=0){let i=n.updatedSeries[r].getData();a.push({dataGroupId:t.oldDataGroupIds[r],data:i,divide:B8(i),groupIdDim:e.dimension})}}),i.length>0&&a.length>0&&L8(i,a,r)}function W8(e){e.registerUpdateLifecycle(`series:beforeupdate`,(e,t,n)=>{P(bs(n.seriesTransition),e=>{P(bs(e.to),e=>{let t=n.updatedSeries;for(let n=0;n<t.length;n++)(e.seriesIndex!=null&&e.seriesIndex===t[n].seriesIndex||e.seriesId!=null&&e.seriesId===t[n].id)&&(t[n][Eb]=!0)})})}),e.registerUpdateLifecycle(`series:transition`,(e,t,n)=>{let r=D8(t);if(r.oldSeries&&n.updatedSeries&&n.optionChanged){let e=n.seriesTransition;if(e)P(bs(e),e=>{U8(e,r,n,t)});else{let e=V8(r,n);P(e.keys(),n=>{let r=e.get(n);L8(r.oldSeries,r.newSeries,t)})}P(n.updatedSeries,e=>{e.__universalTransitionEnabled&&(e[Eb]=!1)})}let i=e.getSeries(),a=r.oldSeries=[],o=r.oldDataGroupIds=[],s=r.oldData=[];for(let e=0;e<i.length;e++){let t=i[e].getData();t.count()<E8&&(a.push(i[e]),o.push(i[e].get(`dataGroupId`)),s.push(t))}})}var G8=class e{constructor(t,n){jT(this,e.decoratedMethods),this._outOfBrk=LT(null,n);let r=this._linear=LT(null,n);MT(this,r),this.breaks=t&&t.breaks||[]}hasBreaks(){return!!this.breaks.length}calcNiceTickMultiple(e,t){for(let n=0;n<this.breaks.length;n++){let r=this.breaks[n];if(r.vmin<e&&e<r.vmax){let n=t(e,r.vmax);return typeof process<`u`&&process.env.NODE_ENV!==`production`&&H(n>=0&&So(n)===n),n}}return 0}};G8.decoratedMethods={needTransform(){return!this.breaks.length},getExtent(){return this._outOfBrk.getExtent()},getExtentUnsafe(e,t){return t==null||t===2?this._outOfBrk.getExtentUnsafe(e,null):this._linear.getExtentUnsafe(e,null)},setExtent(e,t){this.setExtent2(0,e,t)},setExtent2(e,t,n){uc(t,n)&&(e===0&&Y8(this,[t,n]),this._outOfBrk.setExtent2(e,t,n),this._linear.setExtent2(e,this.transformIn(t,null),this.transformIn(n,null)))},normalize(e){return this._linear.normalize(this.transformIn(e,null))},scale(e){return this.transformOut(this._linear.scale(e),null)},contain(e){return this._outOfBrk.contain(e)},transformIn(e,t){if(t&&t.depth===2)return e;let n=q8,r=J8,i=!0;for(let t=0;t<this.breaks.length;t++){let a=this.breaks[t];if(e<=a.vmax){e>a.vmin?n+=a.vmin-r+(e-a.vmin)/(a.vmax-a.vmin)*a.gapReal:n+=e-r,r=a.vmax,i=!1;break}n+=a.vmin-r+a.gapReal,r=a.vmax}return i&&(n+=e-r),n},transformOut(e,t){if(t&&t.depth===2)return e;let n=q8,r=J8,i=!0,a=0;for(let t=0;t<this.breaks.length;t++){let o=this.breaks[t],s=n+o.vmin-r,c=s+o.gapReal;if(e<=c){a=e>s?o.vmin+(e-s)/(c-s)*(o.vmax-o.vmin):r+e-n,r=o.vmax,i=!1;break}n=c,r=o.vmax}return i&&(a=r+e-n),a}};function K8(e,t){return new G8(e,t)}const q8=0,J8=0;function Y8(e,t){let n=0,r={tpAbs:{span:0,val:0},tpPrct:{span:0,val:0}},i=()=>({has:!1,span:NaN,inExtFrac:NaN,val:NaN}),a={S:{tpAbs:i(),tpPrct:i()},E:{tpAbs:i(),tpPrct:i()}};P(e.breaks,e=>{let i=e.gapParsed;i.type===`tpPrct`&&(n+=i.val);let o=Q8(e,t);if(o){let t=o.vmin!==e.vmin,n=o.vmax!==e.vmax,s=o.vmax-o.vmin;if(!(t&&n)){if(t||n){let n=t?`S`:`E`;a[n][i.type].has=!0,a[n][i.type].span=s,a[n][i.type].inExtFrac=s/(e.vmax-e.vmin),a[n][i.type].val=i.val}else r[i.type].span+=s,r[i.type].val+=i.val}}});let o=n*(0+(t[1]-t[0])+(r.tpAbs.val-r.tpAbs.span)+(a.S.tpAbs.has?(a.S.tpAbs.val-a.S.tpAbs.span)*a.S.tpAbs.inExtFrac:0)+(a.E.tpAbs.has?(a.E.tpAbs.val-a.E.tpAbs.span)*a.E.tpAbs.inExtFrac:0)-r.tpPrct.span-(a.S.tpPrct.has?a.S.tpPrct.span*a.S.tpPrct.inExtFrac:0)-(a.E.tpPrct.has?a.E.tpPrct.span*a.E.tpPrct.inExtFrac:0))/(1-r.tpPrct.val-(a.S.tpPrct.has?a.S.tpPrct.val*a.S.tpPrct.inExtFrac:0)-(a.E.tpPrct.has?a.E.tpPrct.val*a.E.tpPrct.inExtFrac:0));P(e.breaks,e=>{let t=e.gapParsed;t.type===`tpPrct`&&(e.gapReal=n===0?0:bo(o,0)*t.val/n),t.type===`tpAbs`&&(e.gapReal=t.val),e.gapReal==null&&(e.gapReal=0)})}function X8(e,t,n,r,i,a){e!==`no`&&P(n,n=>{let o=Q8(n,a);if(o)for(let n=t.length-1;n>=0;n--){let s=t[n],c=r(s),l=i*3/4;c>o.vmin-l&&c<o.vmax+l&&(e!==`preserve_extent_bound`||c!==a[0]&&c!==a[1])&&t.splice(n,1)}})}function Z8(e,t,n,r){P(t,t=>{let i=Q8(t,n);i&&(e.push({value:i.vmin,break:{type:`vmin`,parsedBreak:i},time:r?r(i):void 0}),e.push({value:i.vmax,break:{type:`vmax`,parsedBreak:i},time:r?r(i):void 0}))}),t.length&&e.sort((e,t)=>e.value-t.value)}function Q8(e,t){let n=bo(e.vmin,t[0]),r=yo(e.vmax,t[1]);return n<r||n===r&&n>t[0]&&n<t[1]?{vmin:n,vmax:r,breakOption:e.breakOption,gapParsed:e.gapParsed,gapReal:e.gapReal}:null}function $8(e,t,n){let r=[];if(!e)return{breaks:r};function i(e,t){return e>=0&&e<.99999||(typeof process<`u`&&process.env.NODE_ENV!==`production`&&fs(`${t} must be >= 0 and < 1, rather than ${e} .`),!1)}P(e,e=>{if(!e||e.start==null||e.end==null){typeof process<`u`&&process.env.NODE_ENV!==`production`&&fs(`The input axis breaks start/end should not be empty.`);return}if(e.isExpanded)return;let a={breakOption:k(e),vmin:t.parse(e.start),vmax:t.parse(e.end),gapParsed:{type:`tpAbs`,val:0},gapReal:null};if(e.gap!=null){let n=!1;if(z(e.gap)){let t=Ee(e.gap);if(t.match(/%$/)){let e=parseFloat(t)/100;i(e,`Percent gap`)||(e=0),a.gapParsed.type=`tpPrct`,a.gapParsed.val=e,n=!0}}if(!n){let n=t.parse(e.gap);(!isFinite(n)||n<0)&&(typeof process<`u`&&process.env.NODE_ENV!==`production`&&fs(`Axis breaks gap must positive finite rather than (${e.gap}).`),n=0),a.gapParsed.type=`tpAbs`,a.gapParsed.val=n}}if(a.vmin===a.vmax&&(a.gapParsed.type=`tpAbs`,a.gapParsed.val=0),n&&n.noNegative&&P([`vmin`,`vmax`],e=>{a[e]<0&&(typeof process<`u`&&process.env.NODE_ENV!==`production`&&fs(`Axis break.${e} must not be negative.`),a[e]=0)}),a.vmin>a.vmax){let e=a.vmax;a.vmax=a.vmin,a.vmin=e}r.push(a)}),r.sort((e,t)=>e.vmin-t.vmin);let a=-1/0;return P(r,(e,t)=>{a>e.vmin&&(typeof process<`u`&&process.env.NODE_ENV!==`production`&&fs(`Axis breaks must not overlap.`),r[t]=null),a=e.vmax}),{breaks:ce(r,e=>!!e)}}function e5(e,t){return t5(t)===t5(e)}function t5(e){return e.start+`_\0_`+e.end}function n5(e,t,n){let r=[];P(e,(e,n)=>{let i=t(e);i&&i.type===`vmin`&&r.push([n])}),P(e,(n,i)=>{let a=t(n);if(a&&a.type===`vmax`){let n=le(r,n=>e5(t(e[n[0]]).parsedBreak.breakOption,a.parsedBreak.breakOption));n&&n.push(i)}});let i=[];return P(r,t=>{t.length===2&&i.push(n?t:[e[t[0]],e[t[1]]])}),i}function r5(e,t,n,r){if(!t.break)return;let i=t.break.parsedBreak,a=le(n,e=>e5(e.breakOption,t.break.parsedBreak.breakOption)),o={lookup:r,depth:2},s={vmin:e.transformOut(i.vmin,o),vmax:e.transformOut(i.vmax,o),breakOption:i.breakOption,gapParsed:k(a.gapParsed),gapReal:i.gapReal};return{tickVal:s[t.break.type],vBreak:{type:t.break.type,parsedBreak:s}}}function i5(e,t,n,r,i){i.original=$8(e,t,n);let a=i.transformed=$8(e,t,n),o=i.lookup;a.breaks=F(a.breaks,(e,n)=>{let i={depth:2},a=t.transformIn(e.vmin,i),s=t.transformIn(e.vmax,i),c={type:e.gapParsed.type,val:e.gapParsed.type===`tpAbs`?t.transformIn(e.vmin+e.gapParsed.val,i)-a:e.gapParsed.val};return o.from[r+n]=a,o.to[r+n]=e.vmin,o.from[r+n+1]=s,o.to[r+n+1]=e.vmax,{vmin:a,vmax:s,gapParsed:c,gapReal:e.gapReal,breakOption:e.breakOption}})}const a5={vmin:`start`,vmax:`end`};function o5(e,t){return t&&(e=e||{},e.break={type:a5[t.type],start:t.parsedBreak.vmin,end:t.parsedBreak.vmax}),e}function s5(){Gh({createBreakScaleMapper:K8,pruneTicksByBreak:X8,addBreaksToTicks:Z8,parseAxisBreakOption:$8,identifyAxisBreak:e5,serializeAxisBreakIdentifier:t5,retrieveAxisBreakPairs:n5,getTicksBreakOutwardTransform:r5,parseAxisBreakOptionInwardTransform:i5,makeAxisLabelFormatterParamBreak:o5})}const c5=Y();function l5(e,t){let n=le(e,e=>Kh().identifyAxisBreak(e.parsedBreak.breakOption,t.breakOption));return n||e.push(n={zigzagRandomList:[],parsedBreak:t,shouldRemove:!1}),n}function u5(e){P(e,e=>e.shouldRemove=!0)}function d5(e){for(let t=e.length-1;t>=0;t--)e[t].shouldRemove&&e.splice(t,1)}function f5(e,t,n,r,i){let a=n.axis;if(a.scale.isBlank()||!Kh())return;let o=Kh().retrieveAxisBreakPairs(a.scale.getTicks({breakTicks:`only_break`}),e=>e.break,!1);if(!o.length)return;let s=n.getModel(`breakArea`),c=s.get(`zigzagAmplitude`),l=s.get(`zigzagMinSpan`),u=s.get(`zigzagMaxSpan`);l=Math.max(2,l||0),u=Math.max(l,u||0);let d=s.get(`expandOnClick`),f=s.get(`zigzagZ`),p=s.getModel(`itemStyle`).getItemStyle(),m=p.stroke,h=p.lineWidth,g=p.lineDash,_=p.fill,v=new q({ignoreModelZ:!0}),y=a.isHorizontal(),b=c5(t).visualList||(c5(t).visualList=[]);u5(b);for(let e=0;e<o.length;e++){let t=o[e][0].break.parsedBreak,r=[];r[0]=a.toGlobalCoord(a.dataToCoord(t.vmin,!0)),r[1]=a.toGlobalCoord(a.dataToCoord(t.vmax,!0)),r[1]<r[0]&&r.reverse();let s=l5(b,t);s.shouldRemove=!1;let c=new q;x(s.zigzagRandomList,c,r[0],r[1],y,t),d&&c.on(`click`,()=>{let e={type:JA,breaks:[{start:t.breakOption.start,end:t.breakOption.end}]};e[`${a.dim}AxisIndex`]=n.componentIndex,i.dispatchAction(e)}),c.silent=!d,v.add(c)}e.add(v),d5(b);function x(e,t,n,i,a,o){let s={stroke:m,lineWidth:h,lineDash:g,fill:`none`},d=+!a,v=1-d,y=r[Z[v]]+r[um[v]];function b(e){let t=[],n=[];t[d]=n[d]=e,t[v]=r[Z[v]],n[v]=y;let i={x1:t[0],y1:t[1],x2:n[0],y2:n[1]};return Ru(i,i,{lineWidth:1}),t[0]=i.x1,t[1]=i.y1,t[d]}n=b(n),i=b(i);let x=[],S=[],C=!0,w=r[Z[v]];for(let t=0;;t++){let a=w===r[Z[v]],o=w>=y;o&&(w=y);let s=[],f=[];s[d]=n,f[d]=i,!a&&!o&&(s[d]+=C?-c:c,f[d]-=C?c:-c),s[v]=w,f[v]=w,x.push(s),S.push(f);let p;if(t<e.length?p=e[t]:(p=Math.random(),e.push(p)),w+=p*(u-l)+l,C=!C,o)break}let T=Kh().serializeAxisBreakIdentifier(o.breakOption);if(t.add(new Ep({anid:`break_a_${T}`,shape:{points:x},style:s,z:f})),o.gapReal!==0){t.add(new Ep({anid:`break_b_${T}`,shape:{points:S},style:s,z:f}));let e=S.slice();e.reverse();let n=x.concat(e);t.add(new wp({anid:`break_c_${T}`,shape:{points:n},style:{fill:_,opacity:p.opacity},z:f}))}}}function p5(e,t,n,r){let i=e.axis,a=n.transform;H(r.style);let o=i.getExtent();i.inverse&&(o=o.slice(),o.reverse());let s=F(Kh().retrieveAxisBreakPairs(i.scale.getTicks({breakTicks:`only_break`}),e=>e.break,!1),e=>{let t=e[0].break.parsedBreak,n=[i.dataToCoord(t.vmin,!0),i.dataToCoord(t.vmax,!0)];return n[0]>n[1]&&n.reverse(),{coordPair:n,brkId:Kh().serializeAxisBreakIdentifier(t.breakOption)}});s.sort((e,t)=>e.coordPair[0]-t.coordPair[0]);let c=o[0],l=null;for(let e=0;e<s.length;e++){let t=s[e],n=Math.max(t.coordPair[0],o[0]),r=Math.min(t.coordPair[1],o[1]);c<=n&&u(c,n,l,t),c=r,l=t}c<=o[1]&&u(c,o[1],l,null);function u(e,n,i,o){function s(e,t){a&&(lt(e,e,a),lt(t,t,a))}function c(e,t){let n={x1:e[0],y1:e[1],x2:t[0],y2:t[1]};Ru(n,n,r.style),e[0]=n.x1,e[1]=n.y1,t[0]=n.x2,t[1]=n.y2}let l=[e,0],u=[n,0],d=[e,5],f=[n,5];s(l,d),c(l,d),s(u,f),c(u,f),c(l,u);let p=new kp(j({shape:{x1:l[0],y1:l[1],x2:u[0],y2:u[1]}},r));t.add(p),p.anid=`breakLine_${i?i.brkId:`\0`}_\0_${o?o.brkId:`\0`}`}}function m5(e,t,n){if(le(n,e=>!e))return;let r=new G;if(!Ck(n[0],n[1],r,{direction:-(e?t+Math.PI:t),touchThreshold:0,bidirectional:!1}))return;let i=Kt();Zt(i,i,-t);let a=F(n,e=>e.transform?Yt(Kt(),i,e.transform):i);function o(e){let t=n[0].localRect,r=new G(t[um[e]]*a[0][0],t[um[e]]*a[0][1]);return Math.abs(r.y)<1e-5}let s=.5;if(o(0)||o(1)){let e=F(n,(e,t)=>{let n=e.localRect.clone();return n.applyTransform(a[t]),n}),t=new G;t.copy(n[0].label).add(n[1].label).scale(.5),t.transform(i);let o=r.clone().transform(i),c=(e[0].x+e[1].x+(o.x>=0?e[0].width:e[1].width)+o.x)/2-t.x,l=Math.min(c,c-o.x),u=Math.max(c,c-o.x);s=(c-(u<0?u:l>0?l:0))/o.x}let c=new G,l=new G;G.scale(c,r,-s),G.scale(l,r,1-s),_k(n[0],c),_k(n[1],l)}function h5(e,t){let n={breaks:[]};return P(t.breaks,r=>{if(!r)return;let i=le(e.get(`breaks`,!0),e=>Kh().identifyAxisBreak(e,r));if(!i){typeof process<`u`&&process.env.NODE_ENV!==`production`&&ds(`Can not find axis break by start: ${r.start}, end: ${r.end}`);return}let a=t.type,o={isExpanded:!!i.isExpanded};i.isExpanded=a===`expandAxisBreak`?!0:a===`collapseAxisBreak`?!1:a===`toggleAxisBreak`?!i.isExpanded:i.isExpanded,n.breaks.push({start:i.start,end:i.end,isExpanded:!!i.isExpanded,old:o})}),n}function g5(){KA({adjustBreakLabelPair:m5,buildAxisBreakLine:p5,rectCoordBuildBreakAxis:f5,updateModelAxisBreak:h5})}function _5(e){ej(e),s5(),g5()}function v5(){GN(y5)}function y5(e,t){P(e,function(e){if(!e.model.get([`axisLabel`,`inside`])){let n=b5(e);if(n){let r=e.isHorizontal()?`height`:`width`,i=e.model.get([`axisLabel`,`margin`]);t[r]-=n[r]+i,e.position===`top`?t.y+=n.height+i:e.position===`left`&&(t.x+=n.width+i)}}})}function b5(e){let t=e.model,n=e.scale;if(!t.get([`axisLabel`,`show`])||n.isBlank())return;let r,i,a=n.getExtent();n instanceof $T?i=n.count():(r=n.getTicks(),i=r.length);let o=e.getLabelModel(),s=EE(e),c,l=1;i>40&&(l=Math.ceil(i/40));for(let e=0;e<i;e+=l){let t=s(r?r[e]:{value:a[0]+e},e),n=u(o.getTextRect(t),o.get(`rotate`)||0);c?c.union(n):c=n}return c;function u(e,t){let n=t*Math.PI/180,r=e.width,i=e.height,a=r*Math.abs(Math.cos(n))+Math.abs(i*Math.sin(n)),o=r*Math.abs(Math.sin(n))+Math.abs(i*Math.cos(n));return new K(e.x,e.y,a,o)}}BD([F6]),BD([h6]),BD([UA,KM,hN,jP,XP,VL,IR,Qz,vV,AV,LV,JV,AU,lW,OW,rG,lG,wG,AG,iK,pK,kK,nJ]),BD(QJ),BD(zY),BD(FL),BD(rX),BD(kU),BD(uX),BD(_Z),BD(FZ),BD(s$),BD(z$),BD(ZJ),BD(h1),BD(v1),BD(F1),BD(i0),BD(m0),BD(T0),BD(Z0),BD(w2),BD(f2),BD(C2),BD(c4),BD(n4),BD(s4),BD(m4),BD(x4),BD(z4),BD(H4),BD(W8),BD(Pk),BD(_5),BD(v5),BD(MP);export{x4 as AriaComponent,NO as Axis,_5 as AxisBreak,ZJ as AxisPointerComponent,KM as BarChart,OW as BoxplotChart,h1 as BrushComponent,uX as CalendarComponent,rG as CandlestickChart,F6 as CanvasRenderer,Vb as ChartView,AV as ChordChart,b_ as ComponentModel,Ib as ComponentView,nJ as CustomChart,w2 as DataZoomComponent,f2 as DataZoomInsideComponent,C2 as DataZoomSliderComponent,H4 as DatasetComponent,lG as EffectScatterChart,JV as FunnelChart,LV as GaugeChart,FL as GeoComponent,vV as GraphChart,FZ as GraphicComponent,QJ as GridComponent,bP as GridSimpleComponent,AG as HeatmapChart,Pk as LabelLayout,v5 as LegacyGridContainLabel,Z0 as LegendComponent,H0 as LegendPlainComponent,X0 as LegendScrollComponent,UA as LineChart,wG as LinesChart,sT as List,VL as MapChart,T0 as MarkAreaComponent,m0 as MarkLineComponent,i0 as MarkPointComponent,_Z as MatrixComponent,kh as Model,uC as PRIORITY,AU as ParallelChart,kU as ParallelComponent,iK as PictorialBarChart,hN as PieChart,zY as PolarComponent,XP as RadarChart,GP as RadarComponent,h6 as SVGRenderer,lW as SankeyChart,jP as ScatterChart,MP as ScatterJitter,Db as SeriesModel,rX as SingleAxisComponent,kK as SunburstChart,pK as ThemeRiverChart,m4 as ThumbnailComponent,F1 as TimelineComponent,v1 as TitleComponent,s$ as ToolboxComponent,z$ as TooltipComponent,z4 as TransformComponent,IR as TreeChart,Qz as TreemapChart,W8 as UniversalTransition,c4 as VisualMapComponent,n4 as VisualMapContinuousComponent,s4 as VisualMapPiecewiseComponent,kr as color,aw as connect,jw as dataTool,rC as dependencies,sw as disConnect,ow as disconnect,cw as dispose,s as env,zO as extendChartView,IO as extendComponentModel,LO as extendComponentView,RO as extendSeriesModel,aO as format,yw as getCoordinateSystemDimensions,lw as getInstanceByDom,uw as getInstanceById,Ow as getMap,iO as graphic,MD as helper,iw as init,VS as innerDrawElementOnCanvas,Gt as matrix,nO as number,tO as parseGeoJSON,tO as parseGeoJson,_w as registerAction,vw as registerCoordinateSystem,bw as registerCustomSeries,xw as registerLayout,Tw as registerLoading,Bh as registerLocale,Dw as registerMap,mw as registerPostInit,hw as registerPostUpdate,fw as registerPreprocessor,pw as registerProcessor,dw as registerTheme,kw as registerTransform,gw as registerUpdateLifecycle,Sw as registerVisual,Ew as setCanvasCreator,p as setPlatformAPI,Xb as throttle,rO as time,BD as use,oO as util,Be as vector,nC as version,m as zrUtil,no as zrender};
66
+ //# sourceMappingURL=index.js.map