x-runtime-lib 0.9.63 → 0.10.0
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/emscripten-module.wasm +0 -0
- package/dist/index.d.ts +1 -2
- package/dist/index.js +4 -4
- package/dist/vendor.1xvdyxmb.js +288 -0
- package/package.json +34 -14
- package/dist/vendor.btdd68dz.js +0 -283
package/dist/vendor.btdd68dz.js
DELETED
|
@@ -1,283 +0,0 @@
|
|
|
1
|
-
import{n as e,r as t,t as n}from"./rolldown-runtime.81faoggt.js";import{computed as r,createBlock as i,createCommentVNode as a,createElementBlock as o,createVNode as s,defineComponent as c,getCurrentInstance as l,getCurrentScope as u,hasInjectionContext as d,inject as f,mergeDefaults as p,nextTick as m,onBeforeUnmount as h,onMounted as g,onScopeDispose as _,onUnmounted as v,openBlock as y,provide as b,reactive as x,readonly as S,ref as C,render as w,shallowReadonly as T,shallowRef as E,toRefs as D,toValue as O,unref as k,useAttrs as A,useSlots as j,watch as M,watchEffect as N}from"vue";import*as P from"three";import{AdditiveBlending as ee,Audio as te,AudioListener as ne,AudioLoader as re,Box2 as ie,Box3 as ae,BufferAttribute as oe,BufferGeometry as se,Color as ce,DoubleSide as le,Euler as ue,FramebufferTexture as F,HalfFloatType as de,InterleavedBuffer as fe,InterleavedBufferAttribute as pe,Line3 as me,MOUSE as he,Material as ge,MathUtils as _e,Matrix4 as ve,Mesh as ye,MeshBasicMaterial as be,NoToneMapping as xe,Object3D as Se,OrthographicCamera as Ce,PerspectiveCamera as we,Plane as Te,PlaneGeometry as Ee,Quaternion as De,REVISION as Oe,RawShaderMaterial as ke,Ray as Ae,Raycaster as je,ShaderMaterial as Me,Sphere as Ne,SphereGeometry as Pe,Spherical as Fe,TOUCH as Ie,Triangle as Le,UniformsUtils as Re,UnsignedByteType as ze,Vector2 as Be,Vector3 as I,Vector4 as Ve,WebGLRenderTarget as He,WebGLRenderer as Ue}from"three";import"three/examples/jsm/helpers/RectAreaLightHelper.js";var We=typeof global==`object`&&global&&global.Object===Object&&global,Ge=typeof self==`object`&&self&&self.Object===Object&&self,Ke=We||Ge||Function(`return this`)(),qe=Ke.Symbol;function Je(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var Ye=Array.isArray,Xe=Object.prototype,Ze=Xe.hasOwnProperty,Qe=Xe.toString,$e=qe?qe.toStringTag:void 0;function et(e){var t=Ze.call(e,$e),n=e[$e];try{e[$e]=void 0;var r=!0}catch{}var i=Qe.call(e);return r&&(t?e[$e]=n:delete e[$e]),i}var tt=Object.prototype.toString;function nt(e){return tt.call(e)}var rt=`[object Null]`,it=`[object Undefined]`,at=qe?qe.toStringTag:void 0;function ot(e){return e==null?e===void 0?it:rt:at&&at in Object(e)?et(e):nt(e)}function st(e){return typeof e==`object`&&!!e}var ct=`[object Symbol]`;function lt(e){return typeof e==`symbol`||st(e)&&ot(e)==ct}var ut=1/0,dt=qe?qe.prototype:void 0,ft=dt?dt.toString:void 0;function pt(e){if(typeof e==`string`)return e;if(Ye(e))return Je(e,pt)+``;if(lt(e))return ft?ft.call(e):``;var t=e+``;return t==`0`&&1/e==-ut?`-0`:t}function mt(e){return e==null?``:pt(e)}function ht(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(i);++r<i;)a[r]=e[r+t];return a}function gt(e,t,n){var r=e.length;return n=n===void 0?r:n,!t&&n>=r?e:ht(e,t,n)}var _t=RegExp(`[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]`);function vt(e){return _t.test(e)}function yt(e){return e.split(``)}var bt=`\\ud800-\\udfff`,xt=`\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff`,St=`\\ufe0e\\ufe0f`,Ct=`[`+bt+`]`,wt=`[`+xt+`]`,Tt=`\\ud83c[\\udffb-\\udfff]`,Et=`(?:`+wt+`|`+Tt+`)`,Dt=`[^`+bt+`]`,Ot=`(?:\\ud83c[\\udde6-\\uddff]){2}`,kt=`[\\ud800-\\udbff][\\udc00-\\udfff]`,At=`\\u200d`,jt=Et+`?`,Mt=`[`+St+`]?`,Nt=`(?:`+At+`(?:`+[Dt,Ot,kt].join(`|`)+`)`+Mt+jt+`)*`,Pt=Mt+jt+Nt,Ft=`(?:`+[Dt+wt+`?`,wt,Ot,kt,Ct].join(`|`)+`)`,It=RegExp(Tt+`(?=`+Tt+`)|`+Ft+Pt,`g`);function Lt(e){return e.match(It)||[]}function Rt(e){return vt(e)?Lt(e):yt(e)}function zt(e){return function(t){t=mt(t);var n=vt(t)?Rt(t):void 0,r=n?n[0]:t.charAt(0),i=n?gt(n,1).join(``):t.slice(1);return r[e]()+i}}var Bt=zt(`toUpperCase`);function Vt(e){return Bt(mt(e).toLowerCase())}function Ht(){this.__data__=[],this.size=0}function Ut(e,t){return e===t||e!==e&&t!==t}function Wt(e,t){for(var n=e.length;n--;)if(Ut(e[n][0],t))return n;return-1}var Gt=Array.prototype.splice;function Kt(e){var t=this.__data__,n=Wt(t,e);return n<0?!1:(n==t.length-1?t.pop():Gt.call(t,n,1),--this.size,!0)}function qt(e){var t=this.__data__,n=Wt(t,e);return n<0?void 0:t[n][1]}function Jt(e){return Wt(this.__data__,e)>-1}function Yt(e,t){var n=this.__data__,r=Wt(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function Xt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Xt.prototype.clear=Ht,Xt.prototype.delete=Kt,Xt.prototype.get=qt,Xt.prototype.has=Jt,Xt.prototype.set=Yt;function Zt(){this.__data__=new Xt,this.size=0}function Qt(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function $t(e){return this.__data__.get(e)}function en(e){return this.__data__.has(e)}function tn(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}var nn=`[object AsyncFunction]`,rn=`[object Function]`,an=`[object GeneratorFunction]`,on=`[object Proxy]`;function sn(e){if(!tn(e))return!1;var t=ot(e);return t==rn||t==an||t==nn||t==on}var cn=Ke[`__core-js_shared__`],ln=function(){var e=/[^.]+$/.exec(cn&&cn.keys&&cn.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``}();function un(e){return!!ln&&ln in e}var dn=Function.prototype.toString;function fn(e){if(e!=null){try{return dn.call(e)}catch{}try{return e+``}catch{}}return``}var pn=/[\\^$.*+?()[\]{}|]/g,mn=/^\[object .+?Constructor\]$/,hn=Function.prototype,gn=Object.prototype,_n=hn.toString,vn=gn.hasOwnProperty,yn=RegExp(`^`+_n.call(vn).replace(pn,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`);function bn(e){return!tn(e)||un(e)?!1:(sn(e)?yn:mn).test(fn(e))}function xn(e,t){return e?.[t]}function Sn(e,t){var n=xn(e,t);return bn(n)?n:void 0}var Cn=Sn(Ke,`Map`),wn=Sn(Object,`create`);function Tn(){this.__data__=wn?wn(null):{},this.size=0}function En(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=+!!t,t}var Dn=`__lodash_hash_undefined__`,On=Object.prototype.hasOwnProperty;function kn(e){var t=this.__data__;if(wn){var n=t[e];return n===Dn?void 0:n}return On.call(t,e)?t[e]:void 0}var An=Object.prototype.hasOwnProperty;function jn(e){var t=this.__data__;return wn?t[e]!==void 0:An.call(t,e)}var Mn=`__lodash_hash_undefined__`;function Nn(e,t){var n=this.__data__;return this.size+=+!this.has(e),n[e]=wn&&t===void 0?Mn:t,this}function Pn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Pn.prototype.clear=Tn,Pn.prototype.delete=En,Pn.prototype.get=kn,Pn.prototype.has=jn,Pn.prototype.set=Nn;function Fn(){this.size=0,this.__data__={hash:new Pn,map:new(Cn||Xt),string:new Pn}}function In(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}function Ln(e,t){var n=e.__data__;return In(t)?n[typeof t==`string`?`string`:`hash`]:n.map}function Rn(e){var t=Ln(this,e).delete(e);return this.size-=+!!t,t}function zn(e){return Ln(this,e).get(e)}function Bn(e){return Ln(this,e).has(e)}function Vn(e,t){var n=Ln(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function Hn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Hn.prototype.clear=Fn,Hn.prototype.delete=Rn,Hn.prototype.get=zn,Hn.prototype.has=Bn,Hn.prototype.set=Vn;var Un=200;function Wn(e,t){var n=this.__data__;if(n instanceof Xt){var r=n.__data__;if(!Cn||r.length<Un-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Hn(r)}return n.set(e,t),this.size=n.size,this}function Gn(e){var t=this.__data__=new Xt(e);this.size=t.size}Gn.prototype.clear=Zt,Gn.prototype.delete=Qt,Gn.prototype.get=$t,Gn.prototype.has=en,Gn.prototype.set=Wn;function Kn(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var qn=function(){try{var e=Sn(Object,`defineProperty`);return e({},``,{}),e}catch{}}();function Jn(e,t,n){t==`__proto__`&&qn?qn(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var Yn=Object.prototype.hasOwnProperty;function Xn(e,t,n){var r=e[t];(!(Yn.call(e,t)&&Ut(r,n))||n===void 0&&!(t in e))&&Jn(e,t,n)}function Zn(e,t,n,r){var i=!n;n||={};for(var a=-1,o=t.length;++a<o;){var s=t[a],c=r?r(n[s],e[s],s,n,e):void 0;c===void 0&&(c=e[s]),i?Jn(n,s,c):Xn(n,s,c)}return n}function Qn(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var $n=`[object Arguments]`;function er(e){return st(e)&&ot(e)==$n}var tr=Object.prototype,nr=tr.hasOwnProperty,rr=tr.propertyIsEnumerable,ir=er(function(){return arguments}())?er:function(e){return st(e)&&nr.call(e,`callee`)&&!rr.call(e,`callee`)};function ar(){return!1}var or=typeof exports==`object`&&exports&&!exports.nodeType&&exports,sr=or&&typeof module==`object`&&module&&!module.nodeType&&module,cr=sr&&sr.exports===or?Ke.Buffer:void 0,lr=(cr?cr.isBuffer:void 0)||ar,ur=9007199254740991,dr=/^(?:0|[1-9]\d*)$/;function fr(e,t){var n=typeof e;return t??=ur,!!t&&(n==`number`||n!=`symbol`&&dr.test(e))&&e>-1&&e%1==0&&e<t}var pr=9007199254740991;function mr(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=pr}var hr=`[object Arguments]`,gr=`[object Array]`,_r=`[object Boolean]`,vr=`[object Date]`,yr=`[object Error]`,br=`[object Function]`,xr=`[object Map]`,Sr=`[object Number]`,Cr=`[object Object]`,wr=`[object RegExp]`,Tr=`[object Set]`,Er=`[object String]`,Dr=`[object WeakMap]`,Or=`[object ArrayBuffer]`,kr=`[object DataView]`,Ar=`[object Float32Array]`,jr=`[object Float64Array]`,Mr=`[object Int8Array]`,Nr=`[object Int16Array]`,Pr=`[object Int32Array]`,Fr=`[object Uint8Array]`,Ir=`[object Uint8ClampedArray]`,Lr=`[object Uint16Array]`,Rr=`[object Uint32Array]`,zr={};zr[Ar]=zr[jr]=zr[Mr]=zr[Nr]=zr[Pr]=zr[Fr]=zr[Ir]=zr[Lr]=zr[Rr]=!0,zr[hr]=zr[gr]=zr[Or]=zr[_r]=zr[kr]=zr[vr]=zr[yr]=zr[br]=zr[xr]=zr[Sr]=zr[Cr]=zr[wr]=zr[Tr]=zr[Er]=zr[Dr]=!1;function Br(e){return st(e)&&mr(e.length)&&!!zr[ot(e)]}function Vr(e){return function(t){return e(t)}}var Hr=typeof exports==`object`&&exports&&!exports.nodeType&&exports,Ur=Hr&&typeof module==`object`&&module&&!module.nodeType&&module,Wr=Ur&&Ur.exports===Hr&&We.process,Gr=function(){try{return Ur&&Ur.require&&Ur.require(`util`).types||Wr&&Wr.binding&&Wr.binding(`util`)}catch{}}(),Kr=Gr&&Gr.isTypedArray,qr=Kr?Vr(Kr):Br,Jr=Object.prototype.hasOwnProperty;function Yr(e,t){var n=Ye(e),r=!n&&ir(e),i=!n&&!r&&lr(e),a=!n&&!r&&!i&&qr(e),o=n||r||i||a,s=o?Qn(e.length,String):[],c=s.length;for(var l in e)(t||Jr.call(e,l))&&!(o&&(l==`length`||i&&(l==`offset`||l==`parent`)||a&&(l==`buffer`||l==`byteLength`||l==`byteOffset`)||fr(l,c)))&&s.push(l);return s}var Xr=Object.prototype;function Zr(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||Xr)}function Qr(e,t){return function(n){return e(t(n))}}var $r=Qr(Object.keys,Object),ei=Object.prototype.hasOwnProperty;function ti(e){if(!Zr(e))return $r(e);var t=[];for(var n in Object(e))ei.call(e,n)&&n!=`constructor`&&t.push(n);return t}function ni(e){return e!=null&&mr(e.length)&&!sn(e)}function ri(e){return ni(e)?Yr(e):ti(e)}function ii(e,t){return e&&Zn(t,ri(t),e)}function ai(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var oi=Object.prototype.hasOwnProperty;function si(e){if(!tn(e))return ai(e);var t=Zr(e),n=[];for(var r in e)r==`constructor`&&(t||!oi.call(e,r))||n.push(r);return n}function ci(e){return ni(e)?Yr(e,!0):si(e)}function li(e,t){return e&&Zn(t,ci(t),e)}var ui=typeof exports==`object`&&exports&&!exports.nodeType&&exports,di=ui&&typeof module==`object`&&module&&!module.nodeType&&module,fi=di&&di.exports===ui?Ke.Buffer:void 0,pi=fi?fi.allocUnsafe:void 0;function mi(e,t){if(t)return e.slice();var n=e.length,r=pi?pi(n):new e.constructor(n);return e.copy(r),r}function hi(e,t){var n=-1,r=e.length;for(t||=Array(r);++n<r;)t[n]=e[n];return t}function gi(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}function _i(){return[]}var vi=Object.prototype.propertyIsEnumerable,yi=Object.getOwnPropertySymbols,bi=yi?function(e){return e==null?[]:(e=Object(e),gi(yi(e),function(t){return vi.call(e,t)}))}:_i;function xi(e,t){return Zn(e,bi(e),t)}function Si(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var Ci=Qr(Object.getPrototypeOf,Object),wi=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)Si(t,bi(e)),e=Ci(e);return t}:_i;function Ti(e,t){return Zn(e,wi(e),t)}function Ei(e,t,n){var r=t(e);return Ye(e)?r:Si(r,n(e))}function Di(e){return Ei(e,ri,bi)}function Oi(e){return Ei(e,ci,wi)}var ki=Sn(Ke,`DataView`),Ai=Sn(Ke,`Promise`),ji=Sn(Ke,`Set`),Mi=Sn(Ke,`WeakMap`),Ni=`[object Map]`,Pi=`[object Object]`,Fi=`[object Promise]`,Ii=`[object Set]`,Li=`[object WeakMap]`,Ri=`[object DataView]`,zi=fn(ki),Bi=fn(Cn),Vi=fn(Ai),Hi=fn(ji),Ui=fn(Mi),Wi=ot;(ki&&Wi(new ki(new ArrayBuffer(1)))!=Ri||Cn&&Wi(new Cn)!=Ni||Ai&&Wi(Ai.resolve())!=Fi||ji&&Wi(new ji)!=Ii||Mi&&Wi(new Mi)!=Li)&&(Wi=function(e){var t=ot(e),n=t==Pi?e.constructor:void 0,r=n?fn(n):``;if(r)switch(r){case zi:return Ri;case Bi:return Ni;case Vi:return Fi;case Hi:return Ii;case Ui:return Li}return t});var Gi=Wi,Ki=Object.prototype.hasOwnProperty;function qi(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]==`string`&&Ki.call(e,`index`)&&(n.index=e.index,n.input=e.input),n}var Ji=Ke.Uint8Array;function Yi(e){var t=new e.constructor(e.byteLength);return new Ji(t).set(new Ji(e)),t}function Xi(e,t){var n=t?Yi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var Zi=/\w*$/;function Qi(e){var t=new e.constructor(e.source,Zi.exec(e));return t.lastIndex=e.lastIndex,t}var $i=qe?qe.prototype:void 0,ea=$i?$i.valueOf:void 0;function ta(e){return ea?Object(ea.call(e)):{}}function na(e,t){var n=t?Yi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var ra=`[object Boolean]`,ia=`[object Date]`,aa=`[object Map]`,oa=`[object Number]`,sa=`[object RegExp]`,ca=`[object Set]`,la=`[object String]`,ua=`[object Symbol]`,da=`[object ArrayBuffer]`,fa=`[object DataView]`,pa=`[object Float32Array]`,ma=`[object Float64Array]`,ha=`[object Int8Array]`,ga=`[object Int16Array]`,_a=`[object Int32Array]`,va=`[object Uint8Array]`,ya=`[object Uint8ClampedArray]`,ba=`[object Uint16Array]`,xa=`[object Uint32Array]`;function Sa(e,t,n){var r=e.constructor;switch(t){case da:return Yi(e);case ra:case ia:return new r(+e);case fa:return Xi(e,n);case pa:case ma:case ha:case ga:case _a:case va:case ya:case ba:case xa:return na(e,n);case aa:return new r;case oa:case la:return new r(e);case sa:return Qi(e);case ca:return new r;case ua:return ta(e)}}var Ca=Object.create,wa=function(){function e(){}return function(t){if(!tn(t))return{};if(Ca)return Ca(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function Ta(e){return typeof e.constructor==`function`&&!Zr(e)?wa(Ci(e)):{}}var Ea=`[object Map]`;function Da(e){return st(e)&&Gi(e)==Ea}var Oa=Gr&&Gr.isMap,ka=Oa?Vr(Oa):Da,Aa=`[object Set]`;function ja(e){return st(e)&&Gi(e)==Aa}var Ma=Gr&&Gr.isSet,Na=Ma?Vr(Ma):ja,Pa=1,Fa=2,Ia=4,La=`[object Arguments]`,Ra=`[object Array]`,za=`[object Boolean]`,Ba=`[object Date]`,Va=`[object Error]`,Ha=`[object Function]`,Ua=`[object GeneratorFunction]`,Wa=`[object Map]`,Ga=`[object Number]`,Ka=`[object Object]`,qa=`[object RegExp]`,Ja=`[object Set]`,Ya=`[object String]`,Xa=`[object Symbol]`,Za=`[object WeakMap]`,Qa=`[object ArrayBuffer]`,$a=`[object DataView]`,eo=`[object Float32Array]`,to=`[object Float64Array]`,no=`[object Int8Array]`,ro=`[object Int16Array]`,io=`[object Int32Array]`,ao=`[object Uint8Array]`,oo=`[object Uint8ClampedArray]`,so=`[object Uint16Array]`,co=`[object Uint32Array]`,lo={};lo[La]=lo[Ra]=lo[Qa]=lo[$a]=lo[za]=lo[Ba]=lo[eo]=lo[to]=lo[no]=lo[ro]=lo[io]=lo[Wa]=lo[Ga]=lo[Ka]=lo[qa]=lo[Ja]=lo[Ya]=lo[Xa]=lo[ao]=lo[oo]=lo[so]=lo[co]=!0,lo[Va]=lo[Ha]=lo[Za]=!1;function uo(e,t,n,r,i,a){var o,s=t&Pa,c=t&Fa,l=t&Ia;if(n&&(o=i?n(e,r,i,a):n(e)),o!==void 0)return o;if(!tn(e))return e;var u=Ye(e);if(u){if(o=qi(e),!s)return hi(e,o)}else{var d=Gi(e),f=d==Ha||d==Ua;if(lr(e))return mi(e,s);if(d==Ka||d==La||f&&!i){if(o=c||f?{}:Ta(e),!s)return c?Ti(e,li(o,e)):xi(e,ii(o,e))}else{if(!lo[d])return i?e:{};o=Sa(e,d,s)}}a||=new Gn;var p=a.get(e);if(p)return p;a.set(e,o),Na(e)?e.forEach(function(r){o.add(uo(r,t,n,r,e,a))}):ka(e)&&e.forEach(function(r,i){o.set(i,uo(r,t,n,i,e,a))});var m=u?void 0:(l?c?Oi:Di:c?ci:ri)(e);return Kn(m||e,function(r,i){m&&(i=r,r=e[i]),Xn(o,i,uo(r,t,n,i,e,a))}),o}var fo=1,po=4;function mo(e){return uo(e,fo|po)}var ho=`[object Map]`,go=`[object Set]`,_o=Object.prototype.hasOwnProperty;function vo(e){if(e==null)return!0;if(ni(e)&&(Ye(e)||typeof e==`string`||typeof e.splice==`function`||lr(e)||qr(e)||ir(e)))return!e.length;var t=Gi(e);if(t==ho||t==go)return!e.size;if(Zr(e))return!ti(e).length;for(var n in e)if(_o.call(e,n))return!1;return!0}var yo=`__lodash_hash_undefined__`;function bo(e){return this.__data__.set(e,yo),this}function xo(e){return this.__data__.has(e)}function So(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Hn;++t<n;)this.add(e[t])}So.prototype.add=So.prototype.push=bo,So.prototype.has=xo;function Co(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function wo(e,t){return e.has(t)}var To=1,Eo=2;function Do(e,t,n,r,i,a){var o=n&To,s=e.length,c=t.length;if(s!=c&&!(o&&c>s))return!1;var l=a.get(e),u=a.get(t);if(l&&u)return l==t&&u==e;var d=-1,f=!0,p=n&Eo?new So:void 0;for(a.set(e,t),a.set(t,e);++d<s;){var m=e[d],h=t[d];if(r)var g=o?r(h,m,d,t,e,a):r(m,h,d,e,t,a);if(g!==void 0){if(g)continue;f=!1;break}if(p){if(!Co(t,function(e,t){if(!wo(p,t)&&(m===e||i(m,e,n,r,a)))return p.push(t)})){f=!1;break}}else if(!(m===h||i(m,h,n,r,a))){f=!1;break}}return a.delete(e),a.delete(t),f}function Oo(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function ko(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var Ao=1,jo=2,Mo=`[object Boolean]`,No=`[object Date]`,Po=`[object Error]`,Fo=`[object Map]`,Io=`[object Number]`,Lo=`[object RegExp]`,Ro=`[object Set]`,zo=`[object String]`,Bo=`[object Symbol]`,Vo=`[object ArrayBuffer]`,Ho=`[object DataView]`,Uo=qe?qe.prototype:void 0,Wo=Uo?Uo.valueOf:void 0;function Go(e,t,n,r,i,a,o){switch(n){case Ho:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Vo:return!(e.byteLength!=t.byteLength||!a(new Ji(e),new Ji(t)));case Mo:case No:case Io:return Ut(+e,+t);case Po:return e.name==t.name&&e.message==t.message;case Lo:case zo:return e==t+``;case Fo:var s=Oo;case Ro:var c=r&Ao;if(s||=ko,e.size!=t.size&&!c)return!1;var l=o.get(e);if(l)return l==t;r|=jo,o.set(e,t);var u=Do(s(e),s(t),r,i,a,o);return o.delete(e),u;case Bo:if(Wo)return Wo.call(e)==Wo.call(t)}return!1}var Ko=1,qo=Object.prototype.hasOwnProperty;function Jo(e,t,n,r,i,a){var o=n&Ko,s=Di(e),c=s.length;if(c!=Di(t).length&&!o)return!1;for(var l=c;l--;){var u=s[l];if(!(o?u in t:qo.call(t,u)))return!1}var d=a.get(e),f=a.get(t);if(d&&f)return d==t&&f==e;var p=!0;a.set(e,t),a.set(t,e);for(var m=o;++l<c;){u=s[l];var h=e[u],g=t[u];if(r)var _=o?r(g,h,u,t,e,a):r(h,g,u,e,t,a);if(!(_===void 0?h===g||i(h,g,n,r,a):_)){p=!1;break}m||=u==`constructor`}if(p&&!m){var v=e.constructor,y=t.constructor;v!=y&&`constructor`in e&&`constructor`in t&&!(typeof v==`function`&&v instanceof v&&typeof y==`function`&&y instanceof y)&&(p=!1)}return a.delete(e),a.delete(t),p}var Yo=1,Xo=`[object Arguments]`,Zo=`[object Array]`,Qo=`[object Object]`,$o=Object.prototype.hasOwnProperty;function es(e,t,n,r,i,a){var o=Ye(e),s=Ye(t),c=o?Zo:Gi(e),l=s?Zo:Gi(t);c=c==Xo?Qo:c,l=l==Xo?Qo:l;var u=c==Qo,d=l==Qo,f=c==l;if(f&&lr(e)){if(!lr(t))return!1;o=!0,u=!1}if(f&&!u)return a||=new Gn,o||qr(e)?Do(e,t,n,r,i,a):Go(e,t,c,n,r,i,a);if(!(n&Yo)){var p=u&&$o.call(e,`__wrapped__`),m=d&&$o.call(t,`__wrapped__`);if(p||m){var h=p?e.value():e,g=m?t.value():t;return a||=new Gn,i(h,g,n,r,a)}}return f?(a||=new Gn,Jo(e,t,n,r,i,a)):!1}function ts(e,t,n,r,i){return e===t?!0:e==null||t==null||!st(e)&&!st(t)?e!==e&&t!==t:es(e,t,n,r,ts,i)}function ns(e,t){return ts(e,t)}const rs=62n,is=new globalThis.TextEncoder,as=new globalThis.TextDecoder;function os(e,t){if(typeof e!=`string`)throw TypeError(`The \`${t}\` parameter must be a string, got \`${e}\` (${typeof e}).`)}function ss(e){if(typeof e!=`string`)throw TypeError(`The alphabet must be a string, got \`${e}\` (${typeof e}).`);if(e.length!==62)throw TypeError(`The alphabet must be exactly 62 characters long, got ${e.length}.`);let t=new Set(e);if(t.size!==62)throw TypeError(`The alphabet must contain 62 unique characters, got ${t.size}.`)}const cs=new class{constructor(e={}){let t=e.alphabet??`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz`;ss(t),this.alphabet=[...t],this.indices=new Map(this.alphabet.map((e,t)=>[e,t]))}#e(e){let t=this.indices.get(e);if(t===void 0)throw TypeError(`Unexpected character for Base62 encoding: \`${e}\`.`);return t}encodeString(e){return os(e,`string`),this.encodeBytes(is.encode(e))}decodeString(e){return os(e,`encodedString`),as.decode(this.decodeBytes(e))}encodeBytes(e){if(!(e instanceof Uint8Array))throw TypeError("The `bytes` parameter must be an instance of Uint8Array.");if(e.length===0)return``;let t=1n;for(let n of e)t=t<<8n|BigInt(n);return this.encodeBigInt(t)}decodeBytes(e){if(os(e,`encodedString`),e.length===0)return new Uint8Array;let t=this.decodeBigInt(e),n=[];for(;t>0n;)n.push(Number(t&255n)),t>>=8n;return Uint8Array.from(n.reverse().slice(1))}encodeInteger(e){if(!Number.isInteger(e))throw TypeError(`Expected an integer, got \`${e}\` (${typeof e}).`);if(e<0)throw TypeError(`The integer must be non-negative.`);if(e===0)return this.alphabet[0];let t=``;for(;e>0;)t=this.alphabet[e%62]+t,e=Math.floor(e/62);return t}decodeInteger(e){os(e,`encodedString`);let t=0;for(let n of e)t=t*62+this.#e(n);return t}encodeBigInt(e){if(typeof e!=`bigint`)throw TypeError(`Expected a bigint, got \`${e}\` (${typeof e}).`);if(e<0)throw TypeError(`The bigint must be non-negative.`);if(e===0n)return this.alphabet[0];let t=``;for(;e>0n;)t=this.alphabet[Number(e%rs)]+t,e/=rs;return t}decodeBigInt(e){os(e,`encodedString`);let t=0n;for(let n of e)t=t*rs+BigInt(this.#e(n));return t}},ls=e=>cs.encodeString(e);function us(e){return{all:e||=new Map,on:function(t,n){var r=e.get(t);r?r.push(n):e.set(t,[n])},off:function(t,n){var r=e.get(t);r&&(n?r.splice(r.indexOf(n)>>>0,1):e.set(t,[]))},emit:function(t,n){var r=e.get(t);r&&r.slice().map(function(e){e(n)}),(r=e.get(`*`))&&r.slice().map(function(e){e(t,n)})}}}function ds(e,t){return u()?(_(e,t),!0):!1}function fs(){let e=new Set,t=t=>{e.delete(t)};return{on:n=>{e.add(n);let r=()=>t(n);return ds(r),{off:r}},off:t,trigger:(...t)=>Promise.all(Array.from(e).map(e=>e(...t))),clear:()=>{e.clear()}}}const ps=new WeakMap,ms=(...e)=>{let t=e[0],n=l()?.proxy??u();if(n==null&&!d())throw Error(`injectLocal must be called in setup`);return n&&ps.has(n)&&t in ps.get(n)?ps.get(n)[t]:f(...e)};function hs(e,t){let n=l()?.proxy??u();if(n==null)throw Error(`provideLocal must be called in setup`);ps.has(n)||ps.set(n,Object.create(null));let r=ps.get(n);return r[e]=t,b(e,t)}function gs(e,t){let n=t?.injectionKey||Symbol(e.name||`InjectionState`),r=t?.defaultValue;return[(...t)=>{let r=e(...t);return hs(n,r),r},()=>ms(n,r)]}const _s=typeof window<`u`&&typeof document<`u`;typeof WorkerGlobalScope<`u`&&globalThis instanceof WorkerGlobalScope;const vs=Object.prototype.toString,ys=e=>vs.call(e)===`[object Object]`,bs=()=>{};function xs(e,t){function n(...n){return new Promise((r,i)=>{Promise.resolve(e(()=>t.apply(this,n),{fn:t,thisArg:this,args:n})).then(r).catch(i)})}return n}function Ss(e,t={}){let n,r,i=bs,a=e=>{clearTimeout(e),i(),i=bs},o;return s=>{let c=O(e),l=O(t.maxWait);return n&&a(n),c<=0||l!==void 0&&l<=0?(r&&=(a(r),void 0),Promise.resolve(s())):new Promise((e,u)=>{i=t.rejectOnCancel?u:e,o=s,l&&!r&&(r=setTimeout(()=>{n&&a(n),r=void 0,e(o())},l)),n=setTimeout(()=>{r&&a(r),r=void 0,e(s())},c)})}}function Cs(e){return e.endsWith(`rem`)?Number.parseFloat(e)*16:Number.parseFloat(e)}function ws(e){return Array.isArray(e)?e:[e]}function Ts(e){return e||l()}function Es(e,t=200,n={}){return xs(Ss(t,n),e)}function Ds(e,t=200,n={}){let r=C(O(e)),i=Es(()=>{r.value=e.value},t,n);return M(e,()=>i()),T(r)}function Os(e,t=!0,n){Ts(n)?g(e,n):t?e():m(e)}function ks(e,t,n={}){let{immediate:r=!0,immediateCallback:i=!1}=n,a=E(!1),o;function s(){o&&=(clearTimeout(o),void 0)}function c(){a.value=!1,s()}function l(...n){i&&e(),s(),a.value=!0,o=setTimeout(()=>{a.value=!1,o=void 0,e(...n)},O(t))}return r&&(a.value=!0,_s&&l()),ds(c),{isPending:T(a),start:l,stop:c}}function As(e=1e3,t={}){let{controls:n=!1,callback:i}=t,a=ks(i??bs,e,t),o=r(()=>!a.isPending.value);return n?{ready:o,...a}:o}function js(e,t,n){return M(e,t,{...n,immediate:!0})}function Ms(e,t,n){let r=M(e,(e,i,a)=>{e&&(n?.once&&m(()=>r()),t(e,i,a))},{...n,once:!1});return r}const Ns=_s?window:void 0;_s&&window.document,_s&&window.navigator,_s&&window.location;function Ps(e){let t=O(e);return t?.$el??t}function Fs(...e){let t=(e,t,n,r)=>(e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)),n=r(()=>{let t=ws(O(e[0])).filter(e=>e!=null);return t.every(e=>typeof e!=`string`)?t:void 0});return js(()=>[n.value?.map(e=>Ps(e))??[Ns].filter(e=>e!=null),ws(O(n.value?e[1]:e[0])),ws(k(n.value?e[2]:e[1])),O(n.value?e[3]:e[2])],([e,n,r,i],a,o)=>{if(!e?.length||!n?.length||!r?.length)return;let s=ys(i)?{...i}:i,c=e.flatMap(e=>n.flatMap(n=>r.map(r=>t(e,n,r,s))));o(()=>{c.forEach(e=>e())})},{flush:`post`})}function Is(){let e=E(!1),t=l();return t&&g(()=>{e.value=!0},t),e}function Ls(e){let t=Is();return r(()=>(t.value,!!e()))}function Rs(e,t={}){let{immediate:n=!0,fpsLimit:i=null,window:a=Ns,once:o=!1}=t,s=E(!1),c=r(()=>{let e=O(i);return e?1e3/e:null}),l=0,u=null;function d(t){if(!s.value||!a)return;l||=t;let n=t-l;if(c.value&&n<c.value){u=a.requestAnimationFrame(d);return}if(l=t,e({delta:n,timestamp:t}),o){s.value=!1,u=null;return}u=a.requestAnimationFrame(d)}function f(){!s.value&&a&&(s.value=!0,l=0,u=a.requestAnimationFrame(d))}function p(){s.value=!1,u!=null&&a&&(a.cancelAnimationFrame(u),u=null)}return n&&f(),ds(p),{isActive:T(s),pause:p,resume:f}}const zs=Symbol(`vueuse-ssr-width`);function Bs(){let e=d()?ms(zs,null):null;return typeof e==`number`?e:void 0}function Vs(e,t={}){let{window:n=Ns,ssrWidth:i=Bs()}=t,a=Ls(()=>n&&`matchMedia`in n&&typeof n.matchMedia==`function`),o=E(typeof i==`number`),s=E(),c=E(!1);return N(()=>{if(o.value){o.value=!a.value,c.value=O(e).split(`,`).some(e=>{let t=e.includes(`not all`),n=e.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),r=e.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),a=!!(n||r);return n&&a&&(a=i>=Cs(n[1])),r&&a&&(a=i<=Cs(r[1])),t?!a:a});return}a.value&&(s.value=n.matchMedia(O(e)),c.value=s.value.matches)}),Fs(s,`change`,e=>{c.value=e.matches},{passive:!0}),r(()=>c.value)}function Hs(e={}){let{window:t=Ns}=e,n=E(1),r=Vs(()=>`(resolution: ${n.value}dppx)`,e),i=bs;return t&&(i=js(r,()=>n.value=t.devicePixelRatio)),{pixelRatio:T(n),stop:i}}function Us(e,t,n={}){let{window:i=Ns,...a}=n,o,s=Ls(()=>i&&`ResizeObserver`in i),c=()=>{o&&=(o.disconnect(),void 0)},l=M(r(()=>{let t=O(e);return Array.isArray(t)?t.map(e=>Ps(e)):[Ps(t)]}),e=>{if(c(),s.value&&i){o=new ResizeObserver(t);for(let t of e)t&&o.observe(t,a)}},{immediate:!0,flush:`post`}),u=()=>{c(),l()};return ds(u),{isSupported:s,stop:u}}function Ws(e,t={width:0,height:0},n={}){let{window:i=Ns,box:a=`content-box`}=n,o=r(()=>{var t;return(t=Ps(e))==null||(t=t.namespaceURI)==null?void 0:t.includes(`svg`)}),s=E(t.width),c=E(t.height),{stop:l}=Us(e,([t])=>{let n=a===`border-box`?t.borderBoxSize:a===`content-box`?t.contentBoxSize:t.devicePixelContentBoxSize;if(i&&o.value){let t=Ps(e);if(t){let e=t.getBoundingClientRect();s.value=e.width,c.value=e.height}}else if(n){let e=ws(n);s.value=e.reduce((e,{inlineSize:t})=>e+t,0),c.value=e.reduce((e,{blockSize:t})=>e+t,0)}else s.value=t.contentRect.width,c.value=t.contentRect.height},n);Os(()=>{let n=Ps(e);n&&(s.value=`offsetWidth`in n?n.offsetWidth:t.width,c.value=`offsetHeight`in n?n.offsetHeight:t.height)});let u=M(()=>Ps(e),e=>{s.value=e?t.width:0,c.value=e?t.height:0});function d(){l(),u()}return{width:s,height:c,stop:d}}const Gs={ctrl:`control`,command:`meta`,cmd:`meta`,option:`alt`,up:`arrowup`,down:`arrowdown`,left:`arrowleft`,right:`arrowright`};function Ks(e={}){let{reactive:t=!1,target:n=Ns,aliasMap:i=Gs,passive:a=!0,onEventFired:o=bs}=e,s=x(new Set),c={toJSON(){return{}},current:s},l=t?x(c):c,u=new Set,d=new Map([[`Meta`,u],[`Shift`,new Set],[`Alt`,new Set]]),f=new Set;function p(e,n){e in l&&(t?l[e]=n:l[e].value=n)}function m(){s.clear();for(let e of f)p(e,!1)}function h(e,t,n){if(!(!e||typeof t.getModifierState!=`function`)){for(let[e,r]of d)if(t.getModifierState(e)){n.forEach(e=>r.add(e));break}}}function g(e,t){if(e)return;let n=`${t[0].toUpperCase()}${t.slice(1)}`,r=d.get(n);if(![`shift`,`alt`].includes(t)||!r)return;let i=Array.from(r),a=i.indexOf(t);i.forEach((e,t)=>{t>=a&&(s.delete(e),p(e,!1))}),r.clear()}function _(e,t){let n=e.key?.toLowerCase(),r=[e.code?.toLowerCase(),n].filter(Boolean);if(n){n&&(t?s.add(n):s.delete(n));for(let e of r)f.add(e),p(e,t);h(t,e,[...s,...r]),g(t,n),n===`meta`&&!t&&(u.forEach(e=>{s.delete(e),p(e,!1)}),u.clear())}}Fs(n,`keydown`,e=>(_(e,!0),o(e)),{passive:a}),Fs(n,`keyup`,e=>(_(e,!1),o(e)),{passive:a}),Fs(`blur`,m,{passive:a}),Fs(`focus`,m,{passive:a});let v=new Proxy(l,{get(e,n,a){if(typeof n!=`string`)return Reflect.get(e,n,a);if(n=n.toLowerCase(),n in i&&(n=i[n]),!(n in l))if(/[+_-]/.test(n)){let e=n.split(/[+_-]/g).map(e=>e.trim());l[n]=r(()=>e.map(e=>O(v[e])).every(Boolean))}else l[n]=E(!1);let o=Reflect.get(e,n,a);return t?O(o):o}});return v}function qs(e={}){let{window:t=Ns,initialWidth:n=1/0,initialHeight:r=1/0,listenOrientation:i=!0,includeScrollbar:a=!0,type:o=`inner`}=e,s=E(n),c=E(r),l=()=>{if(t)if(o===`outer`)s.value=t.outerWidth,c.value=t.outerHeight;else if(o===`visual`&&t.visualViewport){let{width:e,height:n,scale:r}=t.visualViewport;s.value=Math.round(e*r),c.value=Math.round(n*r)}else a?(s.value=t.innerWidth,c.value=t.innerHeight):(s.value=t.document.documentElement.clientWidth,c.value=t.document.documentElement.clientHeight)};l(),Os(l);let u={passive:!0};return Fs(`resize`,l,u),t&&o===`visual`&&t.visualViewport&&Fs(t.visualViewport,`resize`,l,u),i&&M(Vs(`(orientation: portrait)`),()=>l()),{width:s,height:c}}new Map(Object.entries({Æ:`Ae`,Ð:`D`,Ø:`O`,Þ:`Th`,ß:`ss`,æ:`ae`,ð:`d`,ø:`o`,þ:`th`,Đ:`D`,đ:`d`,Ħ:`H`,ħ:`h`,ı:`i`,IJ:`IJ`,ij:`ij`,ĸ:`k`,Ŀ:`L`,ŀ:`l`,Ł:`L`,ł:`l`,ʼn:`'n`,Ŋ:`N`,ŋ:`n`,Œ:`Oe`,œ:`oe`,Ŧ:`T`,ŧ:`t`,ſ:`s`}));function Js(e){return typeof e==`function`}function Ys(e){return typeof e==`number`&&!Number.isNaN(e)}function Xs(e){return Zs(e,`[object Object]`)}function Zs(e,t){return Object.prototype.toString.call(e)===t}var Qs=class{nativeEvent;NONE=0;CAPTURING_PHASE=1;AT_TARGET=2;BUBBLING_PHASE=3;relatedTarget=null;get altKey(){return this.getFromNative(`altKey`,!1)}get button(){return this.getFromNative(`button`,0)}get buttons(){return this.getFromNative(`buttons`,0)}get clientX(){return this.getFromNative(`clientX`,0)}get clientY(){return this.getFromNative(`clientY`,0)}get ctrlKey(){return this.getFromNative(`ctrlKey`,!1)}get layerX(){return this.getFromNative(`layerX`,0)}get layerY(){return this.getFromNative(`layerY`,0)}get metaKey(){return this.getFromNative(`metaKey`,!1)}get movementX(){return this.getFromNative(`movementX`,0)}get movementY(){return this.getFromNative(`movementY`,0)}get offsetX(){return this.getFromNative(`offsetX`,0)}get offsetY(){return this.getFromNative(`offsetY`,0)}get pageX(){return this.getFromNative(`pageX`,0)}get pageY(){return this.getFromNative(`pageY`,0)}get screenX(){return this.getFromNative(`screenX`,0)}get screenY(){return this.getFromNative(`screenY`,0)}get shiftKey(){return this.getFromNative(`shiftKey`,!1)}get x(){return this.getFromNative(`x`,0)}get y(){return this.getFromNative(`y`,0)}get detail(){return this.getFromNative(`detail`,0)}get view(){return this.getFromNative(`view`,null)}get which(){return this.getFromNative(`which`,0)}get cancelBubble(){return this.getFromNative(`cancelBubble`,!1)}get composed(){return this.getFromNative(`composed`,!1)}get eventPhase(){return this.getFromNative(`eventPhase`,0)}get isTrusted(){return this.getFromNative(`isTrusted`,!1)}get returnValue(){return this.getFromNative(`returnValue`,!1)}get timeStamp(){return this.getFromNative(`timeStamp`,0)}get cancelable(){return this.getFromNative(`cancelable`,!1)}get defaultPrevented(){return this.getFromNative(`defaultPrevented`,!1)}constructor(e){this.nativeEvent=e}getFromNative(e,t){return e in this.nativeEvent?this.nativeEvent[e]:t}};const $s=new I;var ec=class e extends Qs{type;bubbles;internalPointer;intersection;camera;currentObject;object;propagationState;get pointerId(){return this.internalPointer.id}get pointerType(){return this.internalPointer.type}get pointerState(){return this.internalPointer.state}get distance(){return this.intersection.distance}get distanceToRay(){return this.intersection.distanceToRay}get point(){return this.intersection.point}get index(){return this.intersection.index}get face(){return this.intersection.face}get faceIndex(){return this.intersection.faceIndex}get uv(){return this.intersection.uv}get uv1(){return this.intersection.uv1}get normal(){return this.intersection.normal}get instanceId(){return this.intersection.instanceId}get pointOnLine(){return this.intersection.pointOnLine}get batchId(){return this.intersection.batchId}get pointerPosition(){return this.intersection.pointerPosition}get pointerQuaternion(){return this.intersection.pointerQuaternion}get pointOnFace(){return this.intersection.pointOnFace}get localPoint(){return this.intersection.localPoint}get details(){return this.intersection.details}get target(){return this.object}get currentTarget(){return this.currentObject}get eventObject(){return this.currentObject}get srcElement(){return this.currentObject}_pointer;get pointer(){return this._pointer??=($s.copy(this.intersection.point).project(this.camera),new Be($s.x,$s.y)),this._pointer}_ray;get ray(){if(this._ray!=null)return this._ray;switch(this.intersection.details.type){case`screen-ray`:case`ray`:case`sphere`:return this._ray=new Ae(this.intersection.pointerPosition,new I(0,0,-1).applyQuaternion(this.intersection.pointerQuaternion));case`lines`:return this._ray=new Ae(this.intersection.details.line.start,this.intersection.details.line.end.clone().sub(this.intersection.details.line.start).normalize())}}_intersections=[];get intersections(){return this._intersections??=[{...this.intersection,eventObject:this.currentObject}],this._intersections}_unprojectedPoint;get unprojectedPoint(){if(this._unprojectedPoint==null){let e=this.pointer;this._unprojectedPoint=new I(e.x,e.y,0).unproject(this.camera)}return this._unprojectedPoint}get stopped(){return this.propagationState.stoppedImmediate||this.propagationState.stopped}get stoppedImmediate(){return this.propagationState.stoppedImmediate}get delta(){throw Error(`not supported`)}constructor(e,t,n,r,i,a,o=i.object,s=o,c={stopped:!t,stoppedImmediate:!1}){super(n),this.type=e,this.bubbles=t,this.internalPointer=r,this.intersection=i,this.camera=a,this.currentObject=o,this.object=s,this.propagationState=c}stopPropagation(){this.propagationState.stopped=!0}stopImmediatePropagation(){this.propagationState.stoppedImmediate=!0}retarget(t){return new e(this.type,this.bubbles,this.nativeEvent,this.internalPointer,this.intersection,this.camera,t,this.target,this.propagationState)}},tc=class e extends ec{get deltaX(){return this.nativeEvent.deltaX}get deltaY(){return this.nativeEvent.deltaY}get deltaZ(){return this.nativeEvent.deltaZ}constructor(e,t,n,r,i,a){super(`wheel`,!0,e,t,n,r,i,a)}retarget(t){return new e(this.nativeEvent,this.internalPointer,this.intersection,this.camera,t,this.target)}};function nc(e){rc(e,e.currentObject)}function rc(e,t){if(t==null)return;let n=oc(t,e.type);if(n!=null&&n.length>0){let r=e.retarget(t),i=n.length;for(let e=0;e<i&&!r.stoppedImmediate;e++)n[e](r)}e.stopped||rc(e,t.parent)}const ic={click:`onClick`,contextmenu:`onContextMenu`,dblclick:`onDoubleClick`,pointercancel:`onPointerCancel`,pointerdown:`onPointerDown`,pointerenter:`onPointerEnter`,pointerleave:`onPointerLeave`,pointermove:`onPointerMove`,pointerout:`onPointerOut`,pointerover:`onPointerOver`,pointerup:`onPointerUp`,wheel:`onWheel`},ac=Object.keys(ic);function oc(e,t){if(e._listeners!=null&&t in e._listeners)return e._listeners[t];let n;if(e.isVoidObject&&t===`click`&&e.parent?.__r3f!=null&&(n=e.parent.__r3f.root.getState().onPointerMissed),e.__r3f!=null&&(n=e.__r3f.handlers[ic[t]]),n!=null)return[n]}const sc=new Pe(1e10),cc=new Map;function lc(e){let t=cc.get(e);return t??(t=new ye(sc),t.isVoidObject=!0,t.parent=e,t.pointerEventsOrder=-1/0,cc.set(e,t)),t}function uc(e,t,n){let r=t.normal??t.face?.normal;return r==null?!1:(e.setFromNormalAndCoplanarPoint(r,t.localPoint),e.applyMatrix4(n),!0)}function dc(e,t,n){if(t===`none`||t===`listener`&&!e)return!1;if(n===`all`)return!0;if(typeof n==`function`)return({id:e,type:t,state:r})=>n(e,t,r);let r,i;return`deny`in n?(i=!0,r=n.deny):(i=!1,r=n.allow),Array.isArray(r)?e=>fc(r.includes(e.type),i):e=>fc(r===e.type,i)}function fc(e,t){return t?!e:e}function pc(e,t,n,r=!1,i,a,o){let s=r||mc(e,t),c=t.pointerEvents??i,l=c??t.defaultPointerEvents??`listener`,u=t.pointerEventsType??a??`all`,d=t.pointerEventsOrder??o??0,f=dc(s,l,u),p=n.length;if(p===1)(f===!0||typeof f==`function`&&f(n[0]))&&hc(n[0],t,l,u,d);else if(f===!0)for(let e=0;e<p;e++)hc(n[e],t,l,u,d);else if(typeof f==`function`)for(let e=0;e<p;e++){let r=n[e];f(r)&&hc(r,t,l,u,d)}if(t.children.length===0||t.intersectChildren===!1)return;let m=t.interactableDescendants??t.children,h=m.length;for(let t=0;t<h;t++)pc(e,m[t],n,s,c,u,d)}function mc(e,t){if(t.ancestorsHaveListeners||e===`pointer`&&t.ancestorsHavePointerListeners||e===`wheel`&&t.ancestorsHaveWheelListeners||t.__r3f!=null&&t.__r3f?.eventCount>0&&(e===`wheel`&&t.__r3f.handlers.onWheel!=null||e===`pointer`&&Object.keys(t.__r3f.handlers).some(e=>e!=`onWheel`)))return!0;if(t._listeners==null)return!1;if(e===`wheel`){let e=t._listeners.wheel;return e!=null&&e.length>0}let n=Object.entries(t._listeners),r=n.length;for(let e=0;e<r;e++){let t=n[e];if(t[0]!==`wheel`&&ac.includes(t[0])&&t[1]!=null&&t[1].length>0)return!0}return!1}function hc({intersector:e,options:t},n,r,i,a){t.filter?.(n,r,i,a)!==!1&&e.executeIntersection(n,a)}function gc(e,t,{customSort:n=_c}={},r){let i,a,o,s=e.length;for(let c=0;c<s;c++){let s=e[c];if(r?.(s)===!1)continue;let l=t?.[c];(i==null||n(s,l,i,a)<0)&&(o=c,i=s,a=l)}return o}function _c(e,t=0,n,r=0){return t==r?e.distance-n.distance:r-t}const vc=1e7;function yc(e,t,n,r,i,a=0){let o=t.direction.clone().multiplyScalar(vc),s=vc;return{distance:s+a,object:lc(e),point:o,normal:t.origin.clone().sub(o).normalize(),details:n(o,s),pointerPosition:r,pointerQuaternion:i,pointOnFace:o,localPoint:o}}function bc(e,t,n){for(;n>0;)e.push(t),--n}const xc=Symbol(`buttonsDownTime`),Sc=Symbol(`buttonsClickTime`);globalThis.pointerEventspointerMap??=new Map,Se.prototype.setPointerCapture=function(e){Cc(e)?.setCapture(this)},Se.prototype.releasePointerCapture=function(e){let t=Cc(e);t==null||!t.hasCaptured(this)||t.setCapture(void 0)},Se.prototype.hasPointerCapture=function(e){return Cc(e)?.hasCaptured(this)??!1};function Cc(e){return globalThis.pointerEventspointerMap?.get(e)}var wc=class{id;type;state;intersector;getCamera;onMoveCommited;parentSetPointerCapture;parentReleasePointerCapture;options;prevIntersection;intersection;prevEnabled=!0;enabled=!0;wheelIntersection;pointerEntered=[];pointerEnteredHelper=[];pointerCapture;buttonsDownTime=new Map;buttonsDown=new Set;wasMoved=!1;onFirstMove=[];constructor(e,t,n,r,i,a,o,s,c={}){this.id=e,this.type=t,this.state=n,this.intersector=r,this.getCamera=i,this.onMoveCommited=a,this.parentSetPointerCapture=o,this.parentReleasePointerCapture=s,this.options=c,globalThis.pointerEventspointerMap?.set(e,this)}getPointerCapture(){return this.pointerCapture}hasCaptured(e){return this.pointerCapture?.object===e}setCapture(e){this.pointerCapture?.object!==e&&(this.clearPointerCapture(),e!=null&&this.intersection!=null&&(this.pointerCapture={object:e,intersection:this.intersection},this.parentSetPointerCapture?.()))}getButtonsDown(){return this.buttonsDown}getIntersection(){return this.intersection}getEnabled(){return this.enabled}setEnabled(e,t,n=!0){this.enabled!==e&&(!e&&this.pointerCapture!=null&&this.clearPointerCapture(),this.enabled=e,n&&this.commit(t,!1))}computeIntersection(e,t,n){return this.pointerCapture==null?(this.intersector.startIntersection(n),pc(e,t,[this]),this.intersector.finalizeIntersection(t)):this.intersector.intersectPointerCapture(this.pointerCapture,n)}setIntersection(e){this.intersection=e}commit(e,t){let n=this.getCamera(),r=this.prevEnabled?this.prevIntersection:void 0,i=this.enabled?this.intersection:void 0;r!=null&&r.object!=i?.object&&nc(new ec(`pointerout`,!0,e,this,r,n));let a=this.pointerEntered;this.pointerEntered=[],this.pointerEnteredHelper.length=0,Tc(i?.object,this.pointerEntered,a,this.pointerEnteredHelper);let o=a.length;for(let t=0;t<o;t++){let i=a[t];nc(new ec(`pointerleave`,!1,e,this,r,n,i))}i!=null&&r?.object!=i.object&&nc(new ec(`pointerover`,!0,e,this,i,n));for(let t=this.pointerEnteredHelper.length-1;t>=0;t--){let r=this.pointerEnteredHelper[t];nc(new ec(`pointerenter`,!1,e,this,i,n,r))}if(t&&i!=null&&nc(new ec(`pointermove`,!0,e,this,i,n)),this.prevIntersection=this.intersection,this.prevEnabled=this.enabled,!this.wasMoved&&this.intersector.isReady()){this.wasMoved=!0;let e=this.onFirstMove.length;for(let t=0;t<e;t++)this.onFirstMove[t](n);this.onFirstMove.length=0}this.onMoveCommited?.(this)}move(e,t){this.intersection=this.computeIntersection(`pointer`,e,t),this.commit(t,!0)}over(e,t){this.wasMoved||(this.intersection=this.computeIntersection(`pointer`,e,t),this.commit(t,!1))}emitMove(e){this.intersection!=null&&nc(new ec(`pointermove`,!0,e,this,this.intersection,this.getCamera()))}down(e){if(this.buttonsDown.add(e.button),!this.enabled)return;if(!this.wasMoved){this.onFirstMove.push(this.down.bind(this,e));return}if(this.intersection==null)return;nc(new ec(`pointerdown`,!0,e,this,this.intersection,this.getCamera()));let{object:t}=this.intersection;t[xc]??=new Map,t[xc].set(e.button,e.timeStamp),this.buttonsDownTime.set(e.button,e.timeStamp)}up(e){if(this.buttonsDown.delete(e.button),!this.enabled)return;if(!this.wasMoved){this.onFirstMove.push(this.up.bind(this,e));return}if(this.intersection==null)return;let{clickThesholdMs:t,contextMenuButton:n=2,dblClickThresholdMs:r=500,clickThresholdMs:i=t??300}=this.options;this.clearPointerCapture();let a=Ec(this.buttonsDownTime,this.intersection.object[xc],e.button,e.timeStamp,i),o=this.getCamera();if(a&&e.button===n&&nc(new ec(`contextmenu`,!0,e,this,this.intersection,o)),nc(new ec(`pointerup`,!0,e,this,this.intersection,o)),!a||e.button===n)return;nc(new ec(`click`,!0,e,this,this.intersection,o));let{object:s}=this.intersection,c=s[Sc]??=new Map,l=c.get(e.button);if(l==null||e.timeStamp-l>r){c.set(e.button,e.timeStamp);return}nc(new ec(`dblclick`,!0,e,this,this.intersection,o)),c.delete(e.button)}cancel(e){this.buttonsDown.clear(),this.buttonsDownTime.clear(),this.clearPointerCapture(),this.onFirstMove.length=0,!(!this.enabled||!this.wasMoved||this.intersection==null)&&nc(new ec(`pointercancel`,!0,e,this,this.intersection,this.getCamera()))}wheel(e,t,n=!1){if(!this.enabled)return;if(!this.wasMoved&&n){this.onFirstMove.push(this.wheel.bind(this,e,t,n));return}n||(this.wheelIntersection=this.computeIntersection(`wheel`,e,t));let r=n?this.intersection:this.wheelIntersection;r!=null&&nc(new tc(t,this,r,this.getCamera()))}emitWheel(e,t=!1){if(!this.enabled)return;if(!this.wasMoved&&t){this.onFirstMove.push(this.emitWheel.bind(this,e,t));return}let n=t?this.intersection:this.wheelIntersection;n!=null&&nc(new tc(e,this,n,this.getCamera()))}exit(e){(this.buttonsDown.size>0||this.pointerCapture!=null)&&this.cancel(e),this.wasMoved&&(this.intersection=void 0,this.commit(e,!1)),this.onFirstMove.length=0,this.wasMoved=!1}clearPointerCapture(){this.pointerCapture!=null&&(this.parentReleasePointerCapture?.(),this.pointerCapture=void 0)}};function Tc(e,t,n,r){if(e==null)return;let i=n.indexOf(e);i==-1?r.push(e):n.splice(i,1),t.push(e),Tc(e.parent,t,n,r)}function Ec(e,t,n,r,i){if(t==null)return!1;let a=t.get(n);return!(a==null||r-a>i||a!=e.get(n))}const Dc=new Le,Oc=new Le,kc=new Be,Ac=new Be,jc=new Be,Mc=new I,Nc=new ve,Pc=new I;function Fc(e,t,n){Pc.copy(t).applyMatrix4(Nc.copy(n.matrixWorld).invert());let r=n.geometry.attributes.uv;if(r==null||!(r instanceof oe))return!1;let i;return Ic(n,(e,t,a)=>{n.getVertexPosition(e,Dc.a),n.getVertexPosition(t,Dc.b),n.getVertexPosition(a,Dc.c);let o=Dc.closestPointToPoint(Pc,Mc).distanceTo(Pc);i!=null&&o>=i||(i=o,Oc.copy(Dc),kc.fromBufferAttribute(r,e),Ac.fromBufferAttribute(r,t),jc.fromBufferAttribute(r,a))}),i==null?!1:(Oc.closestPointToPoint(Pc,Mc),Oc.getInterpolation(Mc,kc,Ac,jc,e),!0)}function Ic(e,t){let n=e.geometry.drawRange;if(e.geometry.index!=null){let r=e.geometry.index,i=Math.max(0,n.start),a=Math.min(r.count,n.start+n.count);for(let e=i;e<a;e+=3)t(r.getX(e),r.getX(e+1),r.getX(e+2));return}let r=e.geometry.attributes.position;if(r==null)return;let i=Math.max(0,n.start),a=Math.min(r.count,n.start+n.count);for(let e=i;e<a;e+=3)t(e,e+1,e+2)}new ve,new me,new I,new Te,new Ae,new Be,new I(0,0,0),new I(0,0,1);const Lc=new ve,Rc=new I;new I(0,0,-1),new Te;const zc=new Be,Bc=new I;var Vc=class{prepareTransformation;options;raycaster=new je;cameraQuaternion=new De;fromPosition=new I;fromQuaternion=new De;coords=new Be;viewPlane=new Te;intersects=[];pointerEventsOrders=[];constructor(e,t){this.prepareTransformation=e,this.options=t}isReady(){return!0}intersectPointerCapture({intersection:e,object:t},n){let r=e.details;if(r.type!=`screen-ray`)throw Error(`unable to process a pointer capture of type "${e.details.type}" with a camera ray intersector`);if(!this.startIntersection(n))return e;this.viewPlane.constant-=r.distanceViewPlane;let i=this.raycaster.ray.intersectPlane(this.viewPlane,new I);if(i==null)return e;e.object.updateWorldMatrix(!0,!1),uc(this.viewPlane,e,e.object.matrixWorld);let a=e.uv;return e.object instanceof ye&&Fc(zc,i,e.object)&&(a=zc.clone()),{...e,details:{...r,direction:this.raycaster.ray.direction.clone(),screenPoint:this.coords.clone()},uv:a,object:t,point:i,pointOnFace:i,pointerPosition:this.raycaster.ray.origin.clone(),pointerQuaternion:this.cameraQuaternion.clone()}}startIntersection(e){let t=this.prepareTransformation(e,this.coords);return t==null?!1:(t.updateWorldMatrix(!0,!1),t.matrixWorld.decompose(this.fromPosition,this.fromQuaternion,Rc),this.raycaster.setFromCamera(this.coords,t),this.viewPlane.setFromNormalAndCoplanarPoint(t.getWorldDirection(Bc),this.raycaster.ray.origin),!0)}executeIntersection(e,t){let n=this.intersects.length;e.raycast(this.raycaster,this.intersects),bc(this.pointerEventsOrders,t,this.intersects.length-n)}finalizeIntersection(e){let t=this.fromPosition.clone(),n=this.cameraQuaternion.clone(),r=this.raycaster.ray.direction.clone(),i=gc(this.intersects,this.pointerEventsOrders,this.options),a=i==null?void 0:this.intersects[i];return this.intersects.length=0,this.pointerEventsOrders.length=0,a==null?yc(e,this.raycaster.ray,(e,t)=>({type:`screen-ray`,distanceViewPlane:t,screenPoint:this.coords.clone(),direction:r}),t,n):(a.object.updateWorldMatrix(!0,!1),Lc.copy(a.object.matrixWorld).invert(),Object.assign(a,{details:{type:`screen-ray`,distanceViewPlane:this.viewPlane.distanceToPoint(a.point),screenPoint:this.coords.clone(),direction:r},pointOnFace:a.point,pointerPosition:t,pointerQuaternion:n,localPoint:a.point.clone().applyMatrix4(Lc)}))}};new I,new Be,new ve,new I,new De,new Te,new Ne,new I,new I,new I,new I(1e-4,1e-4,1e-4),new ve;let Hc=23412;function Uc(){return Hc++}function Wc(e,t,n){if(!(t instanceof globalThis.MouseEvent))return n.set(0,0);let{width:r,height:i,top:a,left:o}=e.getBoundingClientRect(),s=t.clientX-o,c=t.clientY-a;return n.set(s/r*2-1,-(c/i)*2+1)}function Gc(e,t,n,r){return Kc(e,typeof t==`function`?t:()=>t,n,Wc.bind(null,e),e.setPointerCapture.bind(e),t=>{e.hasPointerCapture(t)&&e.releasePointerCapture(t)},{pointerTypePrefix:`screen-`,...r})}function Kc(e,t,n,r,i,a,o={}){let s=o?.forwardPointerCapture??!0,c=new Map,l=o.pointerTypePrefix??`forward-`,u=(e,u)=>{let d=c.get(e.pointerId);return d??(d=new wc(Uc(),`${l}${e.pointerType}`,e.pointerState,new Vc((e,n)=>(r(e,n),t()),o),t,void 0,s?i.bind(null,e.pointerId):void 0,s?a.bind(null,e.pointerId):void 0,o),u!=`move`&&u!=`wheel`&&(d.setIntersection(d.computeIntersection(`pointer`,n,e)),d.commit(e,!1)),c.set(e.pointerId,d),d)},d=new Map,f=new Map,p=[],m=[],h=(e,t,r)=>{switch(e){case`move`:r.move(n,t);return;case`over`:r.move(n,t);return;case`wheel`:r.wheel(n,t);return;case`cancel`:r.cancel(t);return;case`down`:if(!qc(t))return;r.down(t);return;case`up`:if(!qc(t))return;r.up(t);return;case`exit`:f.delete(r),d.delete(r),r.exit(t);return}},g=(e,t)=>{let n=u(t,e);e===`move`&&f.set(n,t),e===`wheel`&&d.set(n,t),o.batchEvents??!0?m.push({type:e,event:t}):h(e,t,n)},_=g.bind(null,`move`),v=g.bind(null,`over`),y=g.bind(null,`cancel`),b=g.bind(null,`down`),x=g.bind(null,`up`),S=g.bind(null,`wheel`),C=g.bind(null,`exit`);return e.addEventListener(`pointermove`,_),e.addEventListener(`pointerover`,v),e.addEventListener(`pointercancel`,y),e.addEventListener(`pointerdown`,b),e.addEventListener(`pointerup`,x),e.addEventListener(`wheel`,S),e.addEventListener(`pointerleave`,C),{destroy(){e.removeEventListener(`pointermove`,_),e.removeEventListener(`pointerover`,v),e.removeEventListener(`pointercancel`,y),e.removeEventListener(`pointerdown`,b),e.removeEventListener(`pointerup`,x),e.removeEventListener(`wheel`,S),e.removeEventListener(`pointerleave`,C),f.clear(),d.clear()},update(){let e=m.length;for(let t=0;t<e;t++){let{type:e,event:n}=m[t],r=u(n,e);if(e===`move`&&(p.push(r),f.get(r)!=n)){r.emitMove(n);continue}if(e===`wheel`&&d.get(r)!=n){r.emitWheel(n);continue}h(e,n,r)}if(m.length=0,o.intersectEveryFrame??!1)for(let[e,t]of f.entries())p.includes(e)||e.move(n,t);p.length=0}}}function qc(e){return e.button!=null}
|
|
2
|
-
/*! #__NO_SIDE_EFFECTS__ */
|
|
3
|
-
const Jc=e=>t=>Xs(t)&&e in t&&!!t[e],Yc=Jc(`isCamera`),Xc=Jc(`isPerspectiveCamera`);function Zc(){try{let e=import.meta.env?.MODE;if(e)return e}catch{}return typeof process<`u`&&process.env,`production`}Zc();const Qc=`[TresJS ▲ ■ ●] `;function $c(...e){typeof e[0]==`string`?e[0]=Qc+e[0]:e.unshift(Qc),console.warn(...e)}const el=({sizes:e})=>{let t=C([]),n=r(()=>t.value[0]),i=e=>{let n=Yc(e)?e:t.value.find(t=>t.uuid===e);n&&(t.value=[n,...t.value.filter(({uuid:e})=>e!==n.uuid)])};return N(()=>{e.aspectRatio.value&&t.value.forEach(t=>{Xc(t)&&(t.aspect=e.aspectRatio.value,t.updateProjectionMatrix())})}),{activeCamera:n,cameras:t,registerCamera:(e,n=!1)=>{t.value.some(({uuid:t})=>t===e.uuid)||(t.value.push(e),n&&i(e.uuid))},deregisterCamera:e=>{t.value=t.value.filter(({uuid:t})=>t!==e.uuid)},setActiveCamera:i}};function tl(){let e=new Map,t=new Set,n=0,r=!1,i=()=>{let n=Array.from(e.entries()).sort((e,t)=>{let n=e[1].priority-t[1].priority;return n===0?e[1].addI-t[1].addI:n});t.clear(),n.forEach(e=>t.add(e[0]))},a=n=>{e.delete(n),t.delete(n)};return{on:(t,i=0)=>{e.set(t,{priority:i,addI:n++});let o=()=>a(t);return ds(o),r=!0,{off:o}},off:a,trigger:(...e)=>(r&&=(i(),!1),Promise.all(Array.from(t).map(t=>t(...e)))),dispose:()=>{e.clear(),t.clear()},get count(){return e.size}}}const nl=C({}),rl=e=>Object.assign(nl.value,e),il=(e,t,n)=>{if(!Js(e.setPixelRatio))return;let r=0;if(n&&Array.isArray(n)&&n.length>=2){let[e,i]=n;r=_e.clamp(t,e,i)}else r=Ys(n)?n:t;r!==e.getPixelRatio?.()&&e.setPixelRatio(r)},al=Number.parseInt(Oe.replace(`dev`,``));function ol(){if(al>=179){let e=new P.Timer;return{getDelta:()=>e.getDelta(),getElapsed:()=>e.getElapsed(),update:()=>e.update(),start:()=>{typeof document<`u`&&e.connect(document)},stop:()=>e.disconnect()}}else{let e=new P.Clock;return{getDelta:()=>e.getDelta(),getElapsed:()=>e.elapsedTime,update:()=>{},start:()=>e.start(),stop:()=>e.stop()}}}const sl=(e,{fpsLimit:t}={})=>{let n=ol(),r={before:fs(),after:fs()},{pause:i,resume:a,isActive:o}=Rs(()=>{n.update();let t={delta:n.getDelta(),elapsed:n.getElapsed()};r.before.trigger(t),e(),r.after.trigger(t)},{immediate:!1,fpsLimit:t});return{start:()=>{n.start(),a()},stop:()=>{n.stop(),i()},isActive:o,onBeforeLoop:r.before.on,onLoop:r.after.on}};var cl=class extends Error{name=`TresRendererError`;constructor(e,t,n){super(e,n),this.code=t}};function ll({scene:e,canvas:t,options:n,fpsLimit:i,contextParts:{sizes:a,camera:o}}){let s=Js(n.renderer)?n.renderer({sizes:a,scene:e,camera:o,canvas:t}):new Ue({...n,canvas:Ps(t)}),c=C(O(n.renderMode)===`manual`?0:1),l=r(()=>O(n.renderMode)===`on-demand`&&c.value===0),u=()=>e.value.traverse(e=>{e instanceof ye&&e.material instanceof ge&&(e.material.needsUpdate=!0)}),d=(e=1)=>{l.value&&(c.value=Math.min(60,c.value+e))},f=()=>{if(O(n.renderMode)!==`manual`)throw Error(`advance can only be called in manual render mode.`);c.value=1},p=()=>{O(n.renderMode)===`on-demand`&&d()},h=r(()=>O(n.renderMode)===`always`),g=e=>Xs(e)&&`isRenderer`in e&&!!e.isRenderer,_=fs(),y=fs(),b=!1,x=C(!1),S=C(null),w=async()=>{try{g(s)&&await s.init(),x.value=!0}catch(e){let t=new cl(e instanceof Error?e.message:`Unknown error`,`INITIALIZATION_FAILED`,{cause:e instanceof Error?e:void 0});S.value=t,console.error(`[TresJS] Renderer initialization failed. This may occur if:
|
|
4
|
-
- WebGPU is not supported by your browser
|
|
5
|
-
- GPU is not available or lacks required features
|
|
6
|
-
- GPU drivers are outdated
|
|
7
|
-
Error details: ${t.message}`,t),y.trigger(t)}},T=fs(),E=()=>{c.value=h.value?1:Math.max(0,c.value-1),T.trigger(s)},D=t=>{o.activeCamera.value&&(s.render(e.value,o.activeCamera.value),t())},k=e=>{D=e},A=sl(()=>{c.value&&D(E)},{fpsLimit:i});_.on(()=>{x.value&&A.start()}),M([a.width,a.height,x],()=>{x.value&&(s.setSize(a.width.value,a.height.value),!b&&s.domElement.width&&s.domElement.height&&(b=!0,m(()=>{_.trigger(s)})),p())},{immediate:!0}),N(()=>{x.value&&il(s,a.pixelRatio.value,O(n.dpr))}),w(),O(n.renderMode)===`on-demand`&&d(),O(n.renderMode)===`manual`&&As(100,{callback:f});let j=r(()=>{let e=O(n.clearColor),t=O(n.clearAlpha),r=typeof e==`string`&&e.length===9&&e.startsWith(`#`);return r&&t!==void 0&&$c(`clearColor with alpha (e.g. ${e}) and clearAlpha cannot both be set, using clearColor as source of truth`),r?{alpha:Number.parseInt(e.slice(7,9),16)/255,color:e.slice(0,7)}:{alpha:t,color:e}});return N(()=>{if(!x.value)return;let e=j.value;e.color===void 0||e.alpha===void 0||s.setClearColor(e.color,e.alpha)}),N(()=>{if(!x.value)return;let e=n.toneMapping;e&&(s.toneMapping=e)}),N(()=>{if(!x.value)return;let e=n.toneMappingExposure;e&&(s.toneMappingExposure=e)}),N(()=>{if(!x.value)return;let e=n.outputColorSpace;e&&(s.outputColorSpace=e)}),N(()=>{if(!x.value)return;let e=n.shadows;e!==void 0&&(s.shadowMap.enabled=e,u())}),N(()=>{if(!x.value)return;let e=n.shadowMapType;e!==void 0&&(s.shadowMap.type=e,u())}),v(()=>{s.dispose(),`forceContextLoss`in s&&s.forceContextLoss()}),{loop:A,instance:s,advance:f,onReady:_.on,onRender:T.on,onError:y.on,invalidate:d,canBeInvalidated:l,mode:O(n.renderMode),replaceRenderFunction:k,isInitialized:x,error:S}}function ul(e,t,n=10){let{pixelRatio:i}=Hs(),a=O(e)?qs():Ws(r(()=>O(t).parentElement)),o=S(Ds(a.width,n)),s=S(Ds(a.height,n));return{width:o,height:s,pixelRatio:i,aspectRatio:r(()=>o.value/s.value)}}function dl({canvas:e,contextParts:{scene:t,camera:n,renderer:r}}){let{update:i,destroy:a}=Gc(O(e),()=>O(n.activeCamera),t.value),{off:o}=r.loop.onLoop(i);v(a),v(o);let s=lc(t.value),c=fs();return s.addEventListener(`click`,c.trigger),{onPointerMissed:c.on}}const[fl,pl]=gs(({scene:e,canvas:t,fpsLimit:n,windowSize:r,rendererOptions:i})=>{let a=E(e),o=ul(r,t),s=el({sizes:o}),c=ll({scene:a,canvas:t,options:i,fpsLimit:n,contextParts:{sizes:o,camera:s}}),l=dl({canvas:t,contextParts:{scene:a,camera:s,renderer:c}}),u={sizes:o,scene:a,camera:s,renderer:c,controls:C(null),extend:rl,events:l};return u.scene.value.__tres={root:u,objects:[],isUnmounting:!1},u},{injectionKey:`useTres`}),ml=()=>{let e=pl();if(!e)throw Error(`useTresContext must be used together with useTresContextProvider.
|
|
8
|
-
You probably tried to use it above or on the same level as a TresCanvas component.
|
|
9
|
-
It should be used in child components of a TresCanvas instance.`);return e};function hl(){let{scene:e,renderer:t,camera:n,sizes:r,controls:i,extend:a,events:o}=ml();return{scene:e,renderer:t.instance,camera:n.activeCamera,sizes:r,controls:i,extend:a,events:o,invalidate:t.invalidate,advance:t.advance}}const gl=()=>{let e=hl(),{renderer:t}=ml(),n=tl(),r=tl();t.loop.onBeforeLoop(t=>{n.trigger({...e,...t})}),t.loop.onLoop(t=>{r.trigger({...e,...t})});let i=t.replaceRenderFunction;return{stop:t.loop.stop,start:t.loop.start,isActive:t.loop.isActive,onBeforeRender:n.on,onRender:r.on,render:i}};P.Mesh;const _l=parseInt(Oe.replace(/\D+/g,``));var vl=Object.defineProperty,yl=(e,t,n)=>t in e?vl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,bl=(e,t,n)=>(yl(e,typeof t==`symbol`?t:t+``,n),n);const xl=(()=>{let e=class extends ye{constructor(t,n={}){super(t),this.isReflector=!0,this.type=`Reflector`,this.camera=new we;let r=this,i=n.color===void 0?new ce(8355711):new ce(n.color),a=n.textureWidth||512,o=n.textureHeight||512,s=n.clipBias||0,c=n.shader||e.ReflectorShader,l=n.multisample===void 0?4:n.multisample,u=new Te,d=new I,f=new I,p=new I,m=new ve,h=new I(0,0,-1),g=new Ve,_=new I,v=new I,y=new Ve,b=new ve,x=this.camera,S=new He(a,o,{samples:l,type:de}),C=new Me({uniforms:Re.clone(c.uniforms),fragmentShader:c.fragmentShader,vertexShader:c.vertexShader});C.uniforms.tDiffuse.value=S.texture,C.uniforms.color.value=i,C.uniforms.textureMatrix.value=b,this.material=C,this.onBeforeRender=function(e,t,n){if(f.setFromMatrixPosition(r.matrixWorld),p.setFromMatrixPosition(n.matrixWorld),m.extractRotation(r.matrixWorld),d.set(0,0,1),d.applyMatrix4(m),_.subVectors(f,p),_.dot(d)>0)return;_.reflect(d).negate(),_.add(f),m.extractRotation(n.matrixWorld),h.set(0,0,-1),h.applyMatrix4(m),h.add(p),v.subVectors(f,h),v.reflect(d).negate(),v.add(f),x.position.copy(_),x.up.set(0,1,0),x.up.applyMatrix4(m),x.up.reflect(d),x.lookAt(v),x.far=n.far,x.updateMatrixWorld(),x.projectionMatrix.copy(n.projectionMatrix),b.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),b.multiply(x.projectionMatrix),b.multiply(x.matrixWorldInverse),b.multiply(r.matrixWorld),u.setFromNormalAndCoplanarPoint(d,f),u.applyMatrix4(x.matrixWorldInverse),g.set(u.normal.x,u.normal.y,u.normal.z,u.constant);let i=x.projectionMatrix;y.x=(Math.sign(g.x)+i.elements[8])/i.elements[0],y.y=(Math.sign(g.y)+i.elements[9])/i.elements[5],y.z=-1,y.w=(1+i.elements[10])/i.elements[14],g.multiplyScalar(2/g.dot(y)),i.elements[2]=g.x,i.elements[6]=g.y,i.elements[10]=g.z+1-s,i.elements[14]=g.w,r.visible=!1;let a=e.getRenderTarget(),o=e.xr.enabled,c=e.shadowMap.autoUpdate,l=e.toneMapping,C=!1;C=`outputColorSpace`in e?e.outputColorSpace===`srgb`:e.outputEncoding===3001,e.xr.enabled=!1,e.shadowMap.autoUpdate=!1,`outputColorSpace`in e?e.outputColorSpace=`srgb-linear`:e.outputEncoding=3e3,e.toneMapping=xe,e.setRenderTarget(S),e.state.buffers.depth.setMask(!0),e.autoClear===!1&&e.clear(),e.render(t,x),e.xr.enabled=o,e.shadowMap.autoUpdate=c,e.toneMapping=l,`outputColorSpace`in e?e.outputColorSpace=C?`srgb`:`srgb-linear`:e.outputEncoding=C?3001:3e3,e.setRenderTarget(a);let w=n.viewport;w!==void 0&&e.state.viewport(w),r.visible=!0},this.getRenderTarget=function(){return S},this.dispose=function(){S.dispose(),r.material.dispose()}}},t=e;return bl(t,`ReflectorShader`,{uniforms:{color:{value:null},tDiffuse:{value:null},textureMatrix:{value:null}},vertexShader:`
|
|
10
|
-
uniform mat4 textureMatrix;
|
|
11
|
-
varying vec4 vUv;
|
|
12
|
-
|
|
13
|
-
#include <common>
|
|
14
|
-
#include <logdepthbuf_pars_vertex>
|
|
15
|
-
|
|
16
|
-
void main() {
|
|
17
|
-
|
|
18
|
-
vUv = textureMatrix * vec4( position, 1.0 );
|
|
19
|
-
|
|
20
|
-
gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
|
|
21
|
-
|
|
22
|
-
#include <logdepthbuf_vertex>
|
|
23
|
-
|
|
24
|
-
}`,fragmentShader:`
|
|
25
|
-
uniform vec3 color;
|
|
26
|
-
uniform sampler2D tDiffuse;
|
|
27
|
-
varying vec4 vUv;
|
|
28
|
-
|
|
29
|
-
#include <logdepthbuf_pars_fragment>
|
|
30
|
-
|
|
31
|
-
float blendOverlay( float base, float blend ) {
|
|
32
|
-
|
|
33
|
-
return( base < 0.5 ? ( 2.0 * base * blend ) : ( 1.0 - 2.0 * ( 1.0 - base ) * ( 1.0 - blend ) ) );
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
vec3 blendOverlay( vec3 base, vec3 blend ) {
|
|
38
|
-
|
|
39
|
-
return vec3( blendOverlay( base.r, blend.r ), blendOverlay( base.g, blend.g ), blendOverlay( base.b, blend.b ) );
|
|
40
|
-
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
void main() {
|
|
44
|
-
|
|
45
|
-
#include <logdepthbuf_fragment>
|
|
46
|
-
|
|
47
|
-
vec4 base = texture2DProj( tDiffuse, vUv );
|
|
48
|
-
gl_FragColor = vec4( blendOverlay( base.rgb, color ), 1.0 );
|
|
49
|
-
|
|
50
|
-
#include <tonemapping_fragment>
|
|
51
|
-
#include <${_l>=154?`colorspace_fragment`:`encodings_fragment`}>
|
|
52
|
-
|
|
53
|
-
}`}),t})();var Sl=Object.defineProperty,Cl=(e,t,n)=>t in e?Sl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,wl=(e,t,n)=>(Cl(e,typeof t==`symbol`?t:t+``,n),n),Tl=class{constructor(){wl(this,`_listeners`)}addEventListener(e,t){this._listeners===void 0&&(this._listeners={});let n=this._listeners;n[e]===void 0&&(n[e]=[]),n[e].indexOf(t)===-1&&n[e].push(t)}hasEventListener(e,t){if(this._listeners===void 0)return!1;let n=this._listeners;return n[e]!==void 0&&n[e].indexOf(t)!==-1}removeEventListener(e,t){if(this._listeners===void 0)return;let n=this._listeners[e];if(n!==void 0){let e=n.indexOf(t);e!==-1&&n.splice(e,1)}}dispatchEvent(e){if(this._listeners===void 0)return;let t=this._listeners[e.type];if(t!==void 0){e.target=this;let n=t.slice(0);for(let t=0,r=n.length;t<r;t++)n[t].call(this,e);e.target=null}}},El=Object.defineProperty,Dl=(e,t,n)=>t in e?El(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ol=(e,t,n)=>(Dl(e,typeof t==`symbol`?t:t+``,n),n);const kl=new ue(0,0,0,`YXZ`),Al=new I,jl={type:`change`},Ml={type:`lock`},Nl={type:`unlock`},Pl=.002,Fl=Math.PI/2;var Il=class extends Tl{constructor(e,t){super(),Ol(this,`camera`),Ol(this,`domElement`),Ol(this,`isLocked`),Ol(this,`minPolarAngle`),Ol(this,`maxPolarAngle`),Ol(this,`pointerSpeed`),Ol(this,`onMouseMove`,e=>{!this.domElement||this.isLocked===!1||(kl.setFromQuaternion(this.camera.quaternion),kl.y-=e.movementX*Pl*this.pointerSpeed,kl.x-=e.movementY*Pl*this.pointerSpeed,kl.x=Math.max(Fl-this.maxPolarAngle,Math.min(Fl-this.minPolarAngle,kl.x)),this.camera.quaternion.setFromEuler(kl),this.dispatchEvent(jl))}),Ol(this,`onPointerlockChange`,()=>{this.domElement&&(this.domElement.ownerDocument.pointerLockElement===this.domElement?(this.dispatchEvent(Ml),this.isLocked=!0):(this.dispatchEvent(Nl),this.isLocked=!1))}),Ol(this,`onPointerlockError`,()=>{console.error(`THREE.PointerLockControls: Unable to use Pointer Lock API`)}),Ol(this,`connect`,e=>{this.domElement=e||this.domElement,this.domElement&&(this.domElement.ownerDocument.addEventListener(`mousemove`,this.onMouseMove),this.domElement.ownerDocument.addEventListener(`pointerlockchange`,this.onPointerlockChange),this.domElement.ownerDocument.addEventListener(`pointerlockerror`,this.onPointerlockError))}),Ol(this,`disconnect`,()=>{this.domElement&&(this.domElement.ownerDocument.removeEventListener(`mousemove`,this.onMouseMove),this.domElement.ownerDocument.removeEventListener(`pointerlockchange`,this.onPointerlockChange),this.domElement.ownerDocument.removeEventListener(`pointerlockerror`,this.onPointerlockError))}),Ol(this,`dispose`,()=>{this.disconnect()}),Ol(this,`getObject`,()=>this.camera),Ol(this,`direction`,new I(0,0,-1)),Ol(this,`getDirection`,e=>e.copy(this.direction).applyQuaternion(this.camera.quaternion)),Ol(this,`moveForward`,e=>{Al.setFromMatrixColumn(this.camera.matrix,0),Al.crossVectors(this.camera.up,Al),this.camera.position.addScaledVector(Al,e)}),Ol(this,`moveRight`,e=>{Al.setFromMatrixColumn(this.camera.matrix,0),this.camera.position.addScaledVector(Al,e)}),Ol(this,`lock`,()=>{this.domElement&&this.domElement.requestPointerLock()}),Ol(this,`unlock`,()=>{this.domElement&&this.domElement.ownerDocument.exitPointerLock()}),this.camera=e,this.domElement=t,this.isLocked=!1,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.pointerSpeed=1,t&&this.connect(t)}},Ll=Object.defineProperty,Rl=(e,t,n)=>t in e?Ll(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,L=(e,t,n)=>(Rl(e,typeof t==`symbol`?t:t+``,n),n);const zl=new Ae,Bl=new Te,Vl=Math.cos(Math.PI/180*70),Hl=(e,t)=>(e%t+t)%t;var Ul=class extends Tl{constructor(e,t){super(),L(this,`object`),L(this,`domElement`),L(this,`enabled`,!0),L(this,`target`,new I),L(this,`minDistance`,0),L(this,`maxDistance`,1/0),L(this,`minZoom`,0),L(this,`maxZoom`,1/0),L(this,`minPolarAngle`,0),L(this,`maxPolarAngle`,Math.PI),L(this,`minAzimuthAngle`,-1/0),L(this,`maxAzimuthAngle`,1/0),L(this,`enableDamping`,!1),L(this,`dampingFactor`,.05),L(this,`enableZoom`,!0),L(this,`zoomSpeed`,1),L(this,`enableRotate`,!0),L(this,`rotateSpeed`,1),L(this,`enablePan`,!0),L(this,`panSpeed`,1),L(this,`screenSpacePanning`,!0),L(this,`keyPanSpeed`,7),L(this,`zoomToCursor`,!1),L(this,`autoRotate`,!1),L(this,`autoRotateSpeed`,2),L(this,`reverseOrbit`,!1),L(this,`reverseHorizontalOrbit`,!1),L(this,`reverseVerticalOrbit`,!1),L(this,`keys`,{LEFT:`ArrowLeft`,UP:`ArrowUp`,RIGHT:`ArrowRight`,BOTTOM:`ArrowDown`}),L(this,`mouseButtons`,{LEFT:he.ROTATE,MIDDLE:he.DOLLY,RIGHT:he.PAN}),L(this,`touches`,{ONE:Ie.ROTATE,TWO:Ie.DOLLY_PAN}),L(this,`target0`),L(this,`position0`),L(this,`zoom0`),L(this,`_domElementKeyEvents`,null),L(this,`getPolarAngle`),L(this,`getAzimuthalAngle`),L(this,`setPolarAngle`),L(this,`setAzimuthalAngle`),L(this,`getDistance`),L(this,`getZoomScale`),L(this,`listenToKeyEvents`),L(this,`stopListenToKeyEvents`),L(this,`saveState`),L(this,`reset`),L(this,`update`),L(this,`connect`),L(this,`dispose`),L(this,`dollyIn`),L(this,`dollyOut`),L(this,`getScale`),L(this,`setScale`),this.object=e,this.domElement=t,this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this.getPolarAngle=()=>l.phi,this.getAzimuthalAngle=()=>l.theta,this.setPolarAngle=e=>{let t=Hl(e,2*Math.PI),r=l.phi;r<0&&(r+=2*Math.PI),t<0&&(t+=2*Math.PI);let i=Math.abs(t-r);2*Math.PI-i<i&&(t<r?t+=2*Math.PI:r+=2*Math.PI),u.phi=t-r,n.update()},this.setAzimuthalAngle=e=>{let t=Hl(e,2*Math.PI),r=l.theta;r<0&&(r+=2*Math.PI),t<0&&(t+=2*Math.PI);let i=Math.abs(t-r);2*Math.PI-i<i&&(t<r?t+=2*Math.PI:r+=2*Math.PI),u.theta=t-r,n.update()},this.getDistance=()=>n.object.position.distanceTo(n.target),this.listenToKeyEvents=e=>{e.addEventListener(`keydown`,je),this._domElementKeyEvents=e},this.stopListenToKeyEvents=()=>{this._domElementKeyEvents.removeEventListener(`keydown`,je),this._domElementKeyEvents=null},this.saveState=()=>{n.target0.copy(n.target),n.position0.copy(n.object.position),n.zoom0=n.object.zoom},this.reset=()=>{n.target.copy(n.target0),n.object.position.copy(n.position0),n.object.zoom=n.zoom0,n.object.updateProjectionMatrix(),n.dispatchEvent(r),n.update(),s=o.NONE},this.update=(()=>{let t=new I,i=new I(0,1,0),a=new De().setFromUnitVectors(e.up,i),p=a.clone().invert(),m=new I,h=new De,g=2*Math.PI;return function(){let _=n.object.position;a.setFromUnitVectors(e.up,i),p.copy(a).invert(),t.copy(_).sub(n.target),t.applyQuaternion(a),l.setFromVector3(t),n.autoRotate&&s===o.NONE&&k(D()),n.enableDamping?(l.theta+=u.theta*n.dampingFactor,l.phi+=u.phi*n.dampingFactor):(l.theta+=u.theta,l.phi+=u.phi);let v=n.minAzimuthAngle,y=n.maxAzimuthAngle;isFinite(v)&&isFinite(y)&&(v<-Math.PI?v+=g:v>Math.PI&&(v-=g),y<-Math.PI?y+=g:y>Math.PI&&(y-=g),v<=y?l.theta=Math.max(v,Math.min(y,l.theta)):l.theta=l.theta>(v+y)/2?Math.max(v,l.theta):Math.min(y,l.theta)),l.phi=Math.max(n.minPolarAngle,Math.min(n.maxPolarAngle,l.phi)),l.makeSafe(),n.enableDamping===!0?n.target.addScaledVector(f,n.dampingFactor):n.target.add(f),n.zoomToCursor&&w||n.object.isOrthographicCamera?l.radius=re(l.radius):l.radius=re(l.radius*d),t.setFromSpherical(l),t.applyQuaternion(p),_.copy(n.target).add(t),n.object.matrixAutoUpdate||n.object.updateMatrix(),n.object.lookAt(n.target),n.enableDamping===!0?(u.theta*=1-n.dampingFactor,u.phi*=1-n.dampingFactor,f.multiplyScalar(1-n.dampingFactor)):(u.set(0,0,0),f.set(0,0,0));let b=!1;if(n.zoomToCursor&&w){let r=null;if(n.object instanceof we&&n.object.isPerspectiveCamera){let e=t.length();r=re(e*d);let i=e-r;n.object.position.addScaledVector(S,i),n.object.updateMatrixWorld()}else if(n.object.isOrthographicCamera){let e=new I(C.x,C.y,0);e.unproject(n.object),n.object.zoom=Math.max(n.minZoom,Math.min(n.maxZoom,n.object.zoom/d)),n.object.updateProjectionMatrix(),b=!0;let i=new I(C.x,C.y,0);i.unproject(n.object),n.object.position.sub(i).add(e),n.object.updateMatrixWorld(),r=t.length()}else console.warn(`WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled.`),n.zoomToCursor=!1;r!==null&&(n.screenSpacePanning?n.target.set(0,0,-1).transformDirection(n.object.matrix).multiplyScalar(r).add(n.object.position):(zl.origin.copy(n.object.position),zl.direction.set(0,0,-1).transformDirection(n.object.matrix),Math.abs(n.object.up.dot(zl.direction))<Vl?e.lookAt(n.target):(Bl.setFromNormalAndCoplanarPoint(n.object.up,n.target),zl.intersectPlane(Bl,n.target))))}else n.object instanceof Ce&&n.object.isOrthographicCamera&&(b=d!==1,b&&(n.object.zoom=Math.max(n.minZoom,Math.min(n.maxZoom,n.object.zoom/d)),n.object.updateProjectionMatrix()));return d=1,w=!1,b||m.distanceToSquared(n.object.position)>c||8*(1-h.dot(n.object.quaternion))>c?(n.dispatchEvent(r),m.copy(n.object.position),h.copy(n.object.quaternion),b=!1,!0):!1}})(),this.connect=e=>{n.domElement=e,n.domElement.style.touchAction=`none`,n.domElement.addEventListener(`contextmenu`,Pe),n.domElement.addEventListener(`pointerdown`,Se),n.domElement.addEventListener(`pointercancel`,Ee),n.domElement.addEventListener(`wheel`,Ae)},this.dispose=()=>{var e,t,r,i,a,o;n.domElement&&(n.domElement.style.touchAction=`auto`),(e=n.domElement)==null||e.removeEventListener(`contextmenu`,Pe),(t=n.domElement)==null||t.removeEventListener(`pointerdown`,Se),(r=n.domElement)==null||r.removeEventListener(`pointercancel`,Ee),(i=n.domElement)==null||i.removeEventListener(`wheel`,Ae),(a=n.domElement)==null||a.ownerDocument.removeEventListener(`pointermove`,Te),(o=n.domElement)==null||o.ownerDocument.removeEventListener(`pointerup`,Ee),n._domElementKeyEvents!==null&&n._domElementKeyEvents.removeEventListener(`keydown`,je)};let n=this,r={type:`change`},i={type:`start`},a={type:`end`},o={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6},s=o.NONE,c=1e-6,l=new Fe,u=new Fe,d=1,f=new I,p=new Be,m=new Be,h=new Be,g=new Be,_=new Be,v=new Be,y=new Be,b=new Be,x=new Be,S=new I,C=new Be,w=!1,T=[],E={};function D(){return 2*Math.PI/60/60*n.autoRotateSpeed}function O(){return .95**n.zoomSpeed}function k(e){n.reverseOrbit||n.reverseHorizontalOrbit?u.theta+=e:u.theta-=e}function A(e){n.reverseOrbit||n.reverseVerticalOrbit?u.phi+=e:u.phi-=e}let j=(()=>{let e=new I;return function(t,n){e.setFromMatrixColumn(n,0),e.multiplyScalar(-t),f.add(e)}})(),M=(()=>{let e=new I;return function(t,r){n.screenSpacePanning===!0?e.setFromMatrixColumn(r,1):(e.setFromMatrixColumn(r,0),e.crossVectors(n.object.up,e)),e.multiplyScalar(t),f.add(e)}})(),N=(()=>{let e=new I;return function(t,r){let i=n.domElement;if(i&&n.object instanceof we&&n.object.isPerspectiveCamera){let a=n.object.position;e.copy(a).sub(n.target);let o=e.length();o*=Math.tan(n.object.fov/2*Math.PI/180),j(2*t*o/i.clientHeight,n.object.matrix),M(2*r*o/i.clientHeight,n.object.matrix)}else i&&n.object instanceof Ce&&n.object.isOrthographicCamera?(j(t*(n.object.right-n.object.left)/n.object.zoom/i.clientWidth,n.object.matrix),M(r*(n.object.top-n.object.bottom)/n.object.zoom/i.clientHeight,n.object.matrix)):(console.warn(`WARNING: OrbitControls.js encountered an unknown camera type - pan disabled.`),n.enablePan=!1)}})();function P(e){n.object instanceof we&&n.object.isPerspectiveCamera||n.object instanceof Ce&&n.object.isOrthographicCamera?d=e:(console.warn(`WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled.`),n.enableZoom=!1)}function ee(e){P(d/e)}function te(e){P(d*e)}function ne(e){if(!n.zoomToCursor||!n.domElement)return;w=!0;let t=n.domElement.getBoundingClientRect(),r=e.clientX-t.left,i=e.clientY-t.top,a=t.width,o=t.height;C.x=r/a*2-1,C.y=-(i/o)*2+1,S.set(C.x,C.y,1).unproject(n.object).sub(n.object.position).normalize()}function re(e){return Math.max(n.minDistance,Math.min(n.maxDistance,e))}function ie(e){p.set(e.clientX,e.clientY)}function ae(e){ne(e),y.set(e.clientX,e.clientY)}function oe(e){g.set(e.clientX,e.clientY)}function se(e){m.set(e.clientX,e.clientY),h.subVectors(m,p).multiplyScalar(n.rotateSpeed);let t=n.domElement;t&&(k(2*Math.PI*h.x/t.clientHeight),A(2*Math.PI*h.y/t.clientHeight)),p.copy(m),n.update()}function ce(e){b.set(e.clientX,e.clientY),x.subVectors(b,y),x.y>0?ee(O()):x.y<0&&te(O()),y.copy(b),n.update()}function le(e){_.set(e.clientX,e.clientY),v.subVectors(_,g).multiplyScalar(n.panSpeed),N(v.x,v.y),g.copy(_),n.update()}function ue(e){ne(e),e.deltaY<0?te(O()):e.deltaY>0&&ee(O()),n.update()}function F(e){let t=!1;switch(e.code){case n.keys.UP:N(0,n.keyPanSpeed),t=!0;break;case n.keys.BOTTOM:N(0,-n.keyPanSpeed),t=!0;break;case n.keys.LEFT:N(n.keyPanSpeed,0),t=!0;break;case n.keys.RIGHT:N(-n.keyPanSpeed,0),t=!0;break}t&&(e.preventDefault(),n.update())}function de(){if(T.length==1)p.set(T[0].pageX,T[0].pageY);else{let e=.5*(T[0].pageX+T[1].pageX),t=.5*(T[0].pageY+T[1].pageY);p.set(e,t)}}function fe(){if(T.length==1)g.set(T[0].pageX,T[0].pageY);else{let e=.5*(T[0].pageX+T[1].pageX),t=.5*(T[0].pageY+T[1].pageY);g.set(e,t)}}function pe(){let e=T[0].pageX-T[1].pageX,t=T[0].pageY-T[1].pageY,n=Math.sqrt(e*e+t*t);y.set(0,n)}function me(){n.enableZoom&&pe(),n.enablePan&&fe()}function ge(){n.enableZoom&&pe(),n.enableRotate&&de()}function _e(e){if(T.length==1)m.set(e.pageX,e.pageY);else{let t=Ve(e),n=.5*(e.pageX+t.x),r=.5*(e.pageY+t.y);m.set(n,r)}h.subVectors(m,p).multiplyScalar(n.rotateSpeed);let t=n.domElement;t&&(k(2*Math.PI*h.x/t.clientHeight),A(2*Math.PI*h.y/t.clientHeight)),p.copy(m)}function ve(e){if(T.length==1)_.set(e.pageX,e.pageY);else{let t=Ve(e),n=.5*(e.pageX+t.x),r=.5*(e.pageY+t.y);_.set(n,r)}v.subVectors(_,g).multiplyScalar(n.panSpeed),N(v.x,v.y),g.copy(_)}function ye(e){let t=Ve(e),r=e.pageX-t.x,i=e.pageY-t.y,a=Math.sqrt(r*r+i*i);b.set(0,a),x.set(0,(b.y/y.y)**+n.zoomSpeed),ee(x.y),y.copy(b)}function be(e){n.enableZoom&&ye(e),n.enablePan&&ve(e)}function xe(e){n.enableZoom&&ye(e),n.enableRotate&&_e(e)}function Se(e){var t,r;n.enabled!==!1&&(T.length===0&&((t=n.domElement)==null||t.ownerDocument.addEventListener(`pointermove`,Te),(r=n.domElement)==null||r.ownerDocument.addEventListener(`pointerup`,Ee)),Le(e),e.pointerType===`touch`?Me(e):Oe(e))}function Te(e){n.enabled!==!1&&(e.pointerType===`touch`?Ne(e):ke(e))}function Ee(e){var t,r,i;Re(e),T.length===0&&((t=n.domElement)==null||t.releasePointerCapture(e.pointerId),(r=n.domElement)==null||r.ownerDocument.removeEventListener(`pointermove`,Te),(i=n.domElement)==null||i.ownerDocument.removeEventListener(`pointerup`,Ee)),n.dispatchEvent(a),s=o.NONE}function Oe(e){let t;switch(e.button){case 0:t=n.mouseButtons.LEFT;break;case 1:t=n.mouseButtons.MIDDLE;break;case 2:t=n.mouseButtons.RIGHT;break;default:t=-1}switch(t){case he.DOLLY:if(n.enableZoom===!1)return;ae(e),s=o.DOLLY;break;case he.ROTATE:if(e.ctrlKey||e.metaKey||e.shiftKey){if(n.enablePan===!1)return;oe(e),s=o.PAN}else{if(n.enableRotate===!1)return;ie(e),s=o.ROTATE}break;case he.PAN:if(e.ctrlKey||e.metaKey||e.shiftKey){if(n.enableRotate===!1)return;ie(e),s=o.ROTATE}else{if(n.enablePan===!1)return;oe(e),s=o.PAN}break;default:s=o.NONE}s!==o.NONE&&n.dispatchEvent(i)}function ke(e){if(n.enabled!==!1)switch(s){case o.ROTATE:if(n.enableRotate===!1)return;se(e);break;case o.DOLLY:if(n.enableZoom===!1)return;ce(e);break;case o.PAN:if(n.enablePan===!1)return;le(e);break}}function Ae(e){n.enabled===!1||n.enableZoom===!1||s!==o.NONE&&s!==o.ROTATE||(e.preventDefault(),n.dispatchEvent(i),ue(e),n.dispatchEvent(a))}function je(e){n.enabled===!1||n.enablePan===!1||F(e)}function Me(e){switch(ze(e),T.length){case 1:switch(n.touches.ONE){case Ie.ROTATE:if(n.enableRotate===!1)return;de(),s=o.TOUCH_ROTATE;break;case Ie.PAN:if(n.enablePan===!1)return;fe(),s=o.TOUCH_PAN;break;default:s=o.NONE}break;case 2:switch(n.touches.TWO){case Ie.DOLLY_PAN:if(n.enableZoom===!1&&n.enablePan===!1)return;me(),s=o.TOUCH_DOLLY_PAN;break;case Ie.DOLLY_ROTATE:if(n.enableZoom===!1&&n.enableRotate===!1)return;ge(),s=o.TOUCH_DOLLY_ROTATE;break;default:s=o.NONE}break;default:s=o.NONE}s!==o.NONE&&n.dispatchEvent(i)}function Ne(e){switch(ze(e),s){case o.TOUCH_ROTATE:if(n.enableRotate===!1)return;_e(e),n.update();break;case o.TOUCH_PAN:if(n.enablePan===!1)return;ve(e),n.update();break;case o.TOUCH_DOLLY_PAN:if(n.enableZoom===!1&&n.enablePan===!1)return;be(e),n.update();break;case o.TOUCH_DOLLY_ROTATE:if(n.enableZoom===!1&&n.enableRotate===!1)return;xe(e),n.update();break;default:s=o.NONE}}function Pe(e){n.enabled!==!1&&e.preventDefault()}function Le(e){T.push(e)}function Re(e){delete E[e.pointerId];for(let t=0;t<T.length;t++)if(T[t].pointerId==e.pointerId){T.splice(t,1);return}}function ze(e){let t=E[e.pointerId];t===void 0&&(t=new Be,E[e.pointerId]=t),t.set(e.pageX,e.pageY)}function Ve(e){return E[(e.pointerId===T[0].pointerId?T[1]:T[0]).pointerId]}this.dollyIn=(e=O())=>{te(e),n.update()},this.dollyOut=(e=O())=>{ee(e),n.update()},this.getScale=()=>d,this.setScale=e=>{P(e),n.update()},this.getZoomScale=()=>O(),t!==void 0&&this.connect(t),this.update()}},Wl=class extends Ul{constructor(e,t){super(e,t),this.screenSpacePanning=!1,this.mouseButtons.LEFT=he.PAN,this.mouseButtons.RIGHT=he.ROTATE,this.touches.ONE=Ie.PAN,this.touches.TWO=Ie.DOLLY_ROTATE}}
|
|
54
|
-
/*!
|
|
55
|
-
* camera-controls
|
|
56
|
-
* https://github.com/yomotsu/camera-controls
|
|
57
|
-
* (c) 2017 @yomotsu
|
|
58
|
-
* Released under the MIT License.
|
|
59
|
-
*/
|
|
60
|
-
;Object.freeze({NONE:0,ROTATE:1,TRUCK:2,SCREEN_PAN:4,OFFSET:8,DOLLY:16,ZOOM:32,TOUCH_ROTATE:64,TOUCH_TRUCK:128,TOUCH_SCREEN_PAN:256,TOUCH_OFFSET:512,TOUCH_DOLLY:1024,TOUCH_ZOOM:2048,TOUCH_DOLLY_TRUCK:4096,TOUCH_DOLLY_SCREEN_PAN:8192,TOUCH_DOLLY_OFFSET:16384,TOUCH_DOLLY_ROTATE:32768,TOUCH_ZOOM_TRUCK:65536,TOUCH_ZOOM_OFFSET:131072,TOUCH_ZOOM_SCREEN_PAN:262144,TOUCH_ZOOM_ROTATE:524288}),Math.PI*2,Math.PI/2,Math.PI/180,/Mac/.test(globalThis?.navigator?.platform);var Gl=t(n(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):n.Stats=r()})(e,function(){var e=function(){function t(e){return i.appendChild(e.dom),e}function n(e){for(var t=0;t<i.children.length;t++)i.children[t].style.display=t===e?`block`:`none`;r=e}var r=0,i=document.createElement(`div`);i.style.cssText=`position:fixed;top:0;left:0;cursor:pointer;opacity:0.9;z-index:10000`,i.addEventListener(`click`,function(e){e.preventDefault(),n(++r%i.children.length)},!1);var a=(performance||Date).now(),o=a,s=0,c=t(new e.Panel(`FPS`,`#0ff`,`#002`)),l=t(new e.Panel(`MS`,`#0f0`,`#020`));if(self.performance&&self.performance.memory)var u=t(new e.Panel(`MB`,`#f08`,`#201`));return n(0),{REVISION:16,dom:i,addPanel:t,showPanel:n,begin:function(){a=(performance||Date).now()},end:function(){s++;var e=(performance||Date).now();if(l.update(e-a,200),e>o+1e3&&(c.update(1e3*s/(e-o),100),o=e,s=0,u)){var t=performance.memory;u.update(t.usedJSHeapSize/1048576,t.jsHeapSizeLimit/1048576)}return e},update:function(){a=this.end()},domElement:i,setMode:n}};return e.Panel=function(e,t,n){var r=1/0,i=0,a=Math.round,o=a(window.devicePixelRatio||1),s=80*o,c=48*o,l=3*o,u=2*o,d=3*o,f=15*o,p=74*o,m=30*o,h=document.createElement(`canvas`);h.width=s,h.height=c,h.style.cssText=`width:80px;height:48px`;var g=h.getContext(`2d`);return g.font=`bold `+9*o+`px Helvetica,Arial,sans-serif`,g.textBaseline=`top`,g.fillStyle=n,g.fillRect(0,0,s,c),g.fillStyle=t,g.fillText(e,l,u),g.fillRect(d,f,p,m),g.fillStyle=n,g.globalAlpha=.9,g.fillRect(d,f,p,m),{dom:h,update:function(c,_){r=Math.min(r,c),i=Math.max(i,c),g.fillStyle=n,g.globalAlpha=1,g.fillRect(0,0,s,f),g.fillStyle=t,g.fillText(a(c)+` `+e+` (`+a(r)+`-`+a(i)+`)`,l,u),g.drawImage(h,d+o,f,p-o,m,d,f,p-o,m),g.fillRect(d+p-o,f,o,m),g.fillStyle=n,g.globalAlpha=.9,g.fillRect(d+p-o,f,o,a((1-c/_)*m))}}},e})}))(),1),Kl=class{constructor({trackGPU:e=!1,trackCPT:t=!1,trackHz:n=!1,trackFPS:r=!0,logsPerSecond:i=4,graphsPerSecond:a=30,samplesLog:o=40,samplesGraph:s=10,precision:c=2}={}){this.gl=null,this.ext=null,this.gpuDevice=null,this.gpuBackend=null,this.renderer=null,this.activeQuery=null,this.gpuQueries=[],this.threeRendererPatched=!1,this.webgpuNative=!1,this.gpuQuerySet=null,this.gpuResolveBuffer=null,this.gpuReadBuffers=[],this.gpuWriteBufferIndex=0,this.gpuFrameCount=0,this.pendingResolve=null,this.frameTimes=[],this.frameTimesHead=0,this.renderCount=0,this.cpuStartTime=0,this.totalCpuDuration=0,this.totalGpuDuration=0,this.totalGpuDurationCompute=0,this.averageFps={logs:[],graph:[]},this.averageCpu={logs:[],graph:[]},this.averageGpu={logs:[],graph:[]},this.averageGpuCompute={logs:[],graph:[]},this.trackGPU=e,this.trackCPT=t,this.trackHz=n,this.trackFPS=r,this.samplesLog=o,this.samplesGraph=s,this.precision=c,this.logsPerSecond=i,this.graphsPerSecond=a;let l=performance.now();this.prevGraphTime=l,this.beginTime=l,this.prevTextTime=l,this.prevCpuTime=l}async init(e){if(!e){console.error(`Stats: The "canvas" parameter is undefined.`);return}if(!this.handleThreeRenderer(e)&&!await this.handleWebGPURenderer(e)&&!this.handleNativeWebGPU(e))if(this.initializeWebGL(e)){this.trackGPU&&this.initializeGPUTracking();return}else console.error(`Stats-gl: Failed to initialize WebGL context`)}handleNativeWebGPU(e){return e&&typeof e.createCommandEncoder==`function`&&typeof e.createQuerySet==`function`&&e.queue?(this.gpuDevice=e,this.webgpuNative=!0,this.trackGPU&&e.features?.has(`timestamp-query`)&&(this.initializeWebGPUTiming(),this.onWebGPUTimestampSupported()),!0):!1}initializeWebGPUTiming(){if(this.gpuDevice){this.gpuQuerySet=this.gpuDevice.createQuerySet({type:`timestamp`,count:2}),this.gpuResolveBuffer=this.gpuDevice.createBuffer({size:16,usage:GPUBufferUsage.QUERY_RESOLVE|GPUBufferUsage.COPY_SRC});for(let e=0;e<2;e++)this.gpuReadBuffers.push(this.gpuDevice.createBuffer({size:16,usage:GPUBufferUsage.COPY_DST|GPUBufferUsage.MAP_READ}))}}handleThreeRenderer(e){return e.isWebGLRenderer&&!this.threeRendererPatched?(this.patchThreeRenderer(e),this.gl=e.getContext(),this.trackGPU&&this.initializeGPUTracking(),!0):!1}async handleWebGPURenderer(e){return e.isWebGPURenderer?(this.renderer=e,(this.trackGPU||this.trackCPT)&&(e.backend.trackTimestamp=!0,e._initialized||await e.init(),e.hasFeature(`timestamp-query`)&&this.onWebGPUTimestampSupported()),this.info=e.info,this.gpuBackend=e.backend,this.gpuDevice=e.backend?.device||null,this.patchThreeWebGPU(e),!0):!1}onWebGPUTimestampSupported(){}initializeWebGL(e){if(e instanceof WebGL2RenderingContext)this.gl=e;else if(e instanceof HTMLCanvasElement||e instanceof OffscreenCanvas){if(this.gl=e.getContext(`webgl2`),!this.gl)return console.error(`Stats: Unable to obtain WebGL2 context.`),!1}else return console.error(`Stats: Invalid input type. Expected WebGL2RenderingContext, HTMLCanvasElement, or OffscreenCanvas.`),!1;return!0}initializeGPUTracking(){this.gl&&(this.ext=this.gl.getExtension(`EXT_disjoint_timer_query_webgl2`),this.ext&&this.onGPUTrackingInitialized())}onGPUTrackingInitialized(){}getTimestampWrites(){if(!(!this.webgpuNative||!this.gpuQuerySet))return{querySet:this.gpuQuerySet,beginningOfPassWriteIndex:0,endOfPassWriteIndex:1}}begin(e){this.beginProfiling(),!this.webgpuNative&&(!this.gl||!this.ext||(this.activeQuery&&this.gl.endQuery(this.ext.TIME_ELAPSED_EXT),this.activeQuery=this.gl.createQuery(),this.activeQuery&&this.gl.beginQuery(this.ext.TIME_ELAPSED_EXT,this.activeQuery)))}end(e){if(this.renderCount++,this.webgpuNative&&e&&this.gpuQuerySet&&this.gpuResolveBuffer&&this.gpuReadBuffers.length>0){this.gpuFrameCount++;let t=this.gpuReadBuffers[this.gpuWriteBufferIndex];t.mapState===`unmapped`&&(e.resolveQuerySet(this.gpuQuerySet,0,2,this.gpuResolveBuffer,0),e.copyBufferToBuffer(this.gpuResolveBuffer,0,t,0,16)),this.endProfiling();return}this.gl&&this.ext&&this.activeQuery&&(this.gl.endQuery(this.ext.TIME_ELAPSED_EXT),this.gpuQueries.push({query:this.activeQuery}),this.activeQuery=null),this.endProfiling()}async resolveTimestampsAsync(){if(!this.webgpuNative||this.gpuReadBuffers.length===0)return this.totalGpuDuration;if(this.pendingResolve)return this.pendingResolve;let e=(this.gpuWriteBufferIndex+1)%2,t=this.gpuReadBuffers[e];if(this.gpuWriteBufferIndex=(this.gpuWriteBufferIndex+1)%2,this.gpuFrameCount<2||t.mapState!==`unmapped`)return this.totalGpuDuration;this.pendingResolve=this._resolveTimestamps(t);try{return await this.pendingResolve}finally{this.pendingResolve=null}}async _resolveTimestamps(e){try{await e.mapAsync(GPUMapMode.READ);let t=new BigInt64Array(e.getMappedRange()),n=t[0],r=t[1];e.unmap();let i=Number(r-n);return this.totalGpuDuration=i/1e6,this.totalGpuDuration}catch{return this.totalGpuDuration}}processGpuQueries(){if(!(!this.gl||!this.ext)){this.totalGpuDuration=0;for(let e=this.gpuQueries.length-1;e>=0;e--){let t=this.gpuQueries[e],n=this.gl.getQueryParameter(t.query,this.gl.QUERY_RESULT_AVAILABLE),r=this.gl.getParameter(this.ext.GPU_DISJOINT_EXT);if(n&&!r){let n=this.gl.getQueryParameter(t.query,this.gl.QUERY_RESULT)*1e-6;this.totalGpuDuration+=n,this.gl.deleteQuery(t.query),this.gpuQueries.splice(e,1)}}}}processWebGPUTimestamps(){this.totalGpuDuration=this.info.render.timestamp,this.totalGpuDurationCompute=this.info.compute.timestamp}beginProfiling(){this.cpuStartTime=performance.now()}endProfiling(){this.totalCpuDuration+=performance.now()-this.cpuStartTime}calculateFps(){let e=performance.now(),t=e-1e3;for(this.frameTimes.push(e);this.frameTimesHead<this.frameTimes.length&&this.frameTimes[this.frameTimesHead]<=t;)this.frameTimesHead++;return this.frameTimesHead>128&&(this.frameTimes=this.frameTimes.slice(this.frameTimesHead),this.frameTimesHead=0),Math.round(this.frameTimes.length-this.frameTimesHead)}updateAverages(){this.addToAverage(this.totalCpuDuration,this.averageCpu),this.addToAverage(this.totalGpuDuration,this.averageGpu),this.info&&this.totalGpuDurationCompute!==void 0&&this.addToAverage(this.totalGpuDurationCompute,this.averageGpuCompute)}addToAverage(e,t){for(t.logs.push(e);t.logs.length>this.samplesLog;)t.logs.shift();for(t.graph.push(e);t.graph.length>this.samplesGraph;)t.graph.shift()}resetCounters(){this.renderCount=0,this.totalCpuDuration=0,this.beginTime=performance.now()}getData(){let e=this.averageFps.logs,t=this.averageCpu.logs,n=this.averageGpu.logs,r=this.averageGpuCompute.logs;return{fps:e.length>0?e[e.length-1]:0,cpu:t.length>0?t[t.length-1]:0,gpu:n.length>0?n[n.length-1]:0,gpuCompute:r.length>0?r[r.length-1]:0}}patchThreeWebGPU(e){let t=e.info.reset,n=this;e.info.reset=function(){n.beginProfiling(),t.call(this)}}patchThreeRenderer(e){let t=e.render,n=this;e.render=function(e,r){n.begin(),t.call(this,e,r),n.end()},this.threeRendererPatched=!0}dispose(){if(this.gl){if(this.activeQuery&&this.ext){try{this.gl.endQuery(this.ext.TIME_ELAPSED_EXT)}catch{}this.gl.deleteQuery(this.activeQuery),this.activeQuery=null}for(let e of this.gpuQueries)this.gl.deleteQuery(e.query);this.gpuQueries.length=0}this.gpuQuerySet&&=(this.gpuQuerySet.destroy(),null),this.gpuResolveBuffer&&=(this.gpuResolveBuffer.destroy(),null);for(let e of this.gpuReadBuffers)e.mapState===`mapped`&&e.unmap(),e.destroy();this.gpuReadBuffers.length=0,this.gpuFrameCount=0,this.pendingResolve=null,this.webgpuNative=!1,this.gl=null,this.ext=null,this.info=void 0,this.gpuDevice=null,this.gpuBackend=null,this.renderer=null,this.frameTimes.length=0,this.frameTimesHead=0,this.averageFps.logs.length=0,this.averageFps.graph.length=0,this.averageCpu.logs.length=0,this.averageCpu.graph.length=0,this.averageGpu.logs.length=0,this.averageGpu.graph.length=0,this.averageGpuCompute.logs.length=0,this.averageGpuCompute.graph.length=0}},ql=class{constructor(e,t,n){this.id=0,this.name=e,this.fg=t,this.bg=n,this.gradient=null,this.PR=Math.round(typeof window<`u`&&window.devicePixelRatio||1),this.WIDTH=90*this.PR,this.HEIGHT=48*this.PR,this.TEXT_X=3*this.PR,this.TEXT_Y=2*this.PR,this.GRAPH_X=3*this.PR,this.GRAPH_Y=15*this.PR,this.GRAPH_WIDTH=84*this.PR,this.GRAPH_HEIGHT=30*this.PR,this.canvas=typeof document<`u`?document.createElement(`canvas`):new OffscreenCanvas(this.WIDTH,this.HEIGHT),this.canvas.width=this.WIDTH,this.canvas.height=this.HEIGHT,this.canvas.style.width=`90px`,this.canvas.style.height=`48px`,this.canvas.style.position=`absolute`,this.canvas.style.cssText=`width:90px;height:48px;background-color: transparent !important;`,this.context=this.canvas.getContext(`2d`),this.initializeCanvas()}createGradient(){if(!this.context)throw Error(`No context`);let e=this.context.createLinearGradient(0,this.GRAPH_Y,0,this.GRAPH_Y+this.GRAPH_HEIGHT),t,n=this.fg;switch(this.fg.toLowerCase()){case`#0ff`:t=`#006666`;break;case`#0f0`:t=`#006600`;break;case`#ff0`:t=`#666600`;break;case`#e1e1e1`:t=`#666666`;break;default:t=this.bg;break}return e.addColorStop(0,t),e.addColorStop(1,n),e}initializeCanvas(){this.context&&(this.context.imageSmoothingEnabled=!1,this.context.font=`bold `+9*this.PR+`px Helvetica,Arial,sans-serif`,this.context.textBaseline=`top`,this.gradient=this.createGradient(),this.context.fillStyle=this.bg,this.context.fillRect(0,0,this.WIDTH,this.HEIGHT),this.context.fillStyle=this.fg,this.context.fillText(this.name,this.TEXT_X,this.TEXT_Y),this.context.fillStyle=this.bg,this.context.globalAlpha=.9,this.context.fillRect(this.GRAPH_X,this.GRAPH_Y,this.GRAPH_WIDTH,this.GRAPH_HEIGHT))}update(e,t,n=0,r=``){if(!this.context||!this.gradient)return;let i=Math.min(1/0,e),a=Math.max(t,e);this.context.globalAlpha=1,this.context.fillStyle=this.bg,this.context.fillRect(0,0,this.WIDTH,this.GRAPH_Y);let o=`${e.toFixed(n)} ${this.name}`;this.context.fillStyle=this.fg,this.context.fillText(o,this.TEXT_X,this.TEXT_Y);let s=this.TEXT_X+this.context.measureText(o).width;r&&(this.context.fillStyle=`#f90`,this.context.fillText(r,s,this.TEXT_Y),s+=this.context.measureText(r).width),this.context.fillStyle=this.fg,this.context.fillText(` (${i.toFixed(n)}-${parseFloat(a.toFixed(n))})`,s,this.TEXT_Y)}updateGraph(e,t){if(!this.context||!this.gradient)return;e===0&&t===0&&(t=1),t=Math.max(t,e,.1),e=Math.max(e,0);let n=Math.round(this.GRAPH_X),r=Math.round(this.GRAPH_Y),i=Math.round(this.GRAPH_WIDTH),a=Math.round(this.GRAPH_HEIGHT),o=Math.round(this.PR);this.context.drawImage(this.canvas,n+o,r,i-o,a,n,r,i-o,a),this.context.fillStyle=this.bg,this.context.fillRect(n+i-o,r,o,a);let s=Math.min(a,Math.round(e/t*a));s>0&&(this.context.globalAlpha=.9,this.context.fillStyle=this.gradient,this.context.fillRect(n+i-o,r+(a-s),o,s)),this.context.globalAlpha=1}},Jl=class extends ql{constructor(e,t,n){super(e,t,n),this.vsyncValue=0,this.SMALL_HEIGHT=9*this.PR,this.HEIGHT=this.SMALL_HEIGHT,this.WIDTH=35*this.PR,this.TEXT_Y=0*this.PR,this.canvas.height=this.HEIGHT,this.canvas.width=this.WIDTH,this.canvas.style.height=`9px`,this.canvas.style.width=`35px`,this.canvas.style.cssText=`
|
|
61
|
-
width: 35px;
|
|
62
|
-
height: 9px;
|
|
63
|
-
position: absolute;
|
|
64
|
-
top: 0;
|
|
65
|
-
left: 0;
|
|
66
|
-
background-color: transparent !important;
|
|
67
|
-
pointer-events: none;
|
|
68
|
-
`,this.initializeCanvas()}initializeCanvas(){this.context&&(this.context.imageSmoothingEnabled=!1,this.context.font=`bold `+9*this.PR+`px Helvetica,Arial,sans-serif`,this.context.textBaseline=`top`,this.context.globalAlpha=1)}update(e,t,n=0){this.context&&(this.vsyncValue=e,this.context.clearRect(0,0,this.WIDTH,this.HEIGHT),this.context.globalAlpha=1,this.context.fillStyle=this.bg,this.context.fillText(`${e.toFixed(0)}Hz`,this.TEXT_X,this.TEXT_Y))}updateGraph(e,t){}setOffset(e,t){this.canvas.style.transform=`translate(${e}px, ${t}px)`}},Yl=class extends ql{constructor(e){super(e,`#fff`,`#111`),this.currentBitmap=null,this.sourceAspect=1,this.initializeCanvas()}initializeCanvas(){this.context&&(this.context.imageSmoothingEnabled=!0,this.context.font=`bold `+9*this.PR+`px Helvetica,Arial,sans-serif`,this.context.textBaseline=`top`,this.context.fillStyle=`#000`,this.context.fillRect(0,0,this.WIDTH,this.HEIGHT),this.drawLabelOverlay())}drawLabelOverlay(){this.context&&(this.context.fillStyle=`rgba(0, 0, 0, 0.5)`,this.context.fillRect(0,0,this.WIDTH,this.GRAPH_Y),this.context.fillStyle=this.fg,this.context.fillText(this.name,this.TEXT_X,this.TEXT_Y))}setSourceSize(e,t){this.sourceAspect=e/t}updateTexture(e){if(!this.context)return;this.currentBitmap&&this.currentBitmap.close(),this.currentBitmap=e,this.context.fillStyle=`#000`,this.context.fillRect(0,0,this.WIDTH,this.HEIGHT);let t=this.WIDTH/this.HEIGHT,n,r,i,a;this.sourceAspect>t?(n=this.WIDTH,r=this.WIDTH/this.sourceAspect,i=0,a=(this.HEIGHT-r)/2):(r=this.HEIGHT,n=this.HEIGHT*this.sourceAspect,i=(this.WIDTH-n)/2,a=0),this.context.drawImage(e,i,a,n,r),this.drawLabelOverlay()}setLabel(e){this.name=e,this.drawLabelOverlay()}update(e,t,n=0,r=``){}updateGraph(e,t){}dispose(){this.currentBitmap&&=(this.currentBitmap.close(),null)}},Xl=class{constructor(e,t=90,n=48){this.previewFbo=null,this.previewTexture=null,this.gl=e,this.previewWidth=t,this.previewHeight=n,this.pixels=new Uint8Array(t*n*4),this.flippedPixels=new Uint8Array(t*n*4),this.initResources()}resize(e,t){e===this.previewWidth&&t===this.previewHeight||(this.previewWidth=e,this.previewHeight=t,this.pixels=new Uint8Array(e*t*4),this.flippedPixels=new Uint8Array(e*t*4),this.dispose(),this.initResources())}initResources(){let e=this.gl;this.previewTexture=e.createTexture(),e.bindTexture(e.TEXTURE_2D,this.previewTexture),e.texImage2D(e.TEXTURE_2D,0,e.RGBA8,this.previewWidth,this.previewHeight,0,e.RGBA,e.UNSIGNED_BYTE,null),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),this.previewFbo=e.createFramebuffer(),e.bindFramebuffer(e.FRAMEBUFFER,this.previewFbo),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,this.previewTexture,0),e.bindFramebuffer(e.FRAMEBUFFER,null),e.bindTexture(e.TEXTURE_2D,null)}async capture(e,t,n,r=`default`){let i=this.gl,a=i.getParameter(i.READ_FRAMEBUFFER_BINDING),o=i.getParameter(i.DRAW_FRAMEBUFFER_BINDING);i.bindFramebuffer(i.READ_FRAMEBUFFER,e),i.bindFramebuffer(i.DRAW_FRAMEBUFFER,this.previewFbo),i.blitFramebuffer(0,0,t,n,0,0,this.previewWidth,this.previewHeight,i.COLOR_BUFFER_BIT,i.LINEAR),i.bindFramebuffer(i.READ_FRAMEBUFFER,this.previewFbo),i.readPixels(0,0,this.previewWidth,this.previewHeight,i.RGBA,i.UNSIGNED_BYTE,this.pixels),i.bindFramebuffer(i.READ_FRAMEBUFFER,a),i.bindFramebuffer(i.DRAW_FRAMEBUFFER,o);let s=this.flipY(this.pixels,this.previewWidth,this.previewHeight),c=new ImageData(new Uint8ClampedArray(s),this.previewWidth,this.previewHeight);return createImageBitmap(c)}flipY(e,t,n){let r=t*4;for(let t=0;t<n;t++){let i=t*r,a=(n-1-t)*r;this.flippedPixels.set(e.subarray(i,i+r),a)}return this.flippedPixels}removeSource(e){}dispose(){let e=this.gl;this.previewFbo&&=(e.deleteFramebuffer(this.previewFbo),null),this.previewTexture&&=(e.deleteTexture(this.previewTexture),null)}},Zl=class{constructor(e,t=90,n=48){this.previewTexture=null,this.stagingBuffer=null,this.blitPipeline=null,this.sampler=null,this.bindGroupLayout=null,this.initialized=!1,this.device=e,this.previewWidth=t,this.previewHeight=n,this.pixelsBuffer=new Uint8ClampedArray(t*n*4)}resize(e,t){e===this.previewWidth&&t===this.previewHeight||(this.previewWidth=e,this.previewHeight=t,this.pixelsBuffer=new Uint8ClampedArray(e*t*4),this.previewTexture&&this.previewTexture.destroy(),this.stagingBuffer&&this.stagingBuffer.destroy(),this.previewTexture=null,this.stagingBuffer=null,this.initialized&&this.createSizeResources())}createSizeResources(){let e=this.device;this.previewTexture=e.createTexture({size:{width:this.previewWidth,height:this.previewHeight},format:`rgba8unorm`,usage:GPUTextureUsage.RENDER_ATTACHMENT|GPUTextureUsage.COPY_SRC});let t=Math.ceil(this.previewWidth*4/256)*256;this.stagingBuffer=e.createBuffer({size:t*this.previewHeight,usage:GPUBufferUsage.COPY_DST|GPUBufferUsage.MAP_READ})}async initResources(){if(this.initialized)return;let e=this.device;this.createSizeResources(),this.sampler=e.createSampler({minFilter:`linear`,magFilter:`linear`});let t=e.createShaderModule({code:`
|
|
69
|
-
@group(0) @binding(0) var texSampler: sampler;
|
|
70
|
-
@group(0) @binding(1) var texInput: texture_2d<f32>;
|
|
71
|
-
|
|
72
|
-
struct VertexOutput {
|
|
73
|
-
@builtin(position) position: vec4f,
|
|
74
|
-
@location(0) uv: vec2f
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
@vertex
|
|
78
|
-
fn vertexMain(@builtin(vertex_index) vertexIndex: u32) -> VertexOutput {
|
|
79
|
-
var positions = array<vec2f, 3>(
|
|
80
|
-
vec2f(-1.0, -1.0),
|
|
81
|
-
vec2f(3.0, -1.0),
|
|
82
|
-
vec2f(-1.0, 3.0)
|
|
83
|
-
);
|
|
84
|
-
var uvs = array<vec2f, 3>(
|
|
85
|
-
vec2f(0.0, 1.0),
|
|
86
|
-
vec2f(2.0, 1.0),
|
|
87
|
-
vec2f(0.0, -1.0)
|
|
88
|
-
);
|
|
89
|
-
|
|
90
|
-
var output: VertexOutput;
|
|
91
|
-
output.position = vec4f(positions[vertexIndex], 0.0, 1.0);
|
|
92
|
-
output.uv = uvs[vertexIndex];
|
|
93
|
-
return output;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
@fragment
|
|
97
|
-
fn fragmentMain(@location(0) uv: vec2f) -> @location(0) vec4f {
|
|
98
|
-
return textureSample(texInput, texSampler, uv);
|
|
99
|
-
}
|
|
100
|
-
`});this.bindGroupLayout=e.createBindGroupLayout({entries:[{binding:0,visibility:GPUShaderStage.FRAGMENT,sampler:{type:`filtering`}},{binding:1,visibility:GPUShaderStage.FRAGMENT,texture:{sampleType:`float`}}]}),this.blitPipeline=e.createRenderPipeline({layout:e.createPipelineLayout({bindGroupLayouts:[this.bindGroupLayout]}),vertex:{module:t,entryPoint:`vertexMain`},fragment:{module:t,entryPoint:`fragmentMain`,targets:[{format:`rgba8unorm`}]},primitive:{topology:`triangle-list`}}),this.initialized=!0}async capture(e){if(await this.initResources(),!this.previewTexture||!this.stagingBuffer||!this.blitPipeline||!this.sampler||!this.bindGroupLayout)return null;let t=this.device,n=t.createBindGroup({layout:this.bindGroupLayout,entries:[{binding:0,resource:this.sampler},{binding:1,resource:e.createView()}]}),r=t.createCommandEncoder(),i=r.beginRenderPass({colorAttachments:[{view:this.previewTexture.createView(),loadOp:`clear`,storeOp:`store`,clearValue:{r:0,g:0,b:0,a:1}}]});i.setPipeline(this.blitPipeline),i.setBindGroup(0,n),i.draw(3),i.end();let a=Math.ceil(this.previewWidth*4/256)*256;r.copyTextureToBuffer({texture:this.previewTexture},{buffer:this.stagingBuffer,bytesPerRow:a},{width:this.previewWidth,height:this.previewHeight}),t.queue.submit([r.finish()]),await this.stagingBuffer.mapAsync(GPUMapMode.READ);let o=new Uint8Array(this.stagingBuffer.getMappedRange());for(let e=0;e<this.previewHeight;e++){let t=e*a,n=e*this.previewWidth*4;this.pixelsBuffer.set(o.subarray(t,t+this.previewWidth*4),n)}this.stagingBuffer.unmap();let s=new ImageData(new Uint8ClampedArray(this.pixelsBuffer),this.previewWidth,this.previewHeight);return createImageBitmap(s)}dispose(){this.previewTexture&&this.previewTexture.destroy(),this.stagingBuffer&&this.stagingBuffer.destroy(),this.previewTexture=null,this.stagingBuffer=null,this.blitPipeline=null,this.sampler=null,this.bindGroupLayout=null,this.initialized=!1}};function Ql(e,t){return e.isWebGLRenderTarget&&e.__webglFramebuffer?{framebuffer:e.__webglFramebuffer,width:e.width||1,height:e.height||1}:null}function $l(e,t){return e.isRenderTarget&&e.texture&&t.get&&t.get(e.texture)?.texture||null}const eu=class e extends Kl{constructor({trackGPU:t=!1,trackCPT:n=!1,trackHz:r=!1,trackFPS:i=!0,logsPerSecond:a=4,graphsPerSecond:o=30,samplesLog:s=40,samplesGraph:c=10,precision:l=2,minimal:u=!1,horizontal:d=!0,mode:f=0}={}){super({trackGPU:t,trackCPT:n,trackHz:r,trackFPS:i,logsPerSecond:a,graphsPerSecond:o,samplesLog:s,samplesGraph:c,precision:l}),this.fpsPanel=null,this.msPanel=null,this.gpuPanel=null,this.gpuPanelCompute=null,this.vsyncPanel=null,this.workerCpuPanel=null,this.texturePanels=new Map,this.texturePanelRow=null,this.textureCaptureWebGL=null,this.textureCaptureWebGPU=null,this.textureSourcesWebGL=new Map,this.textureSourcesWebGPU=new Map,this.texturePreviewWidth=90,this.texturePreviewHeight=48,this.lastRendererWidth=0,this.lastRendererHeight=0,this.textureUpdatePending=!1,this.updateCounter=0,this.lastMin={},this.lastMax={},this.lastValue={},this.VSYNC_RATES=[{refreshRate:60,frameTime:16.67},{refreshRate:75,frameTime:13.33},{refreshRate:90,frameTime:11.11},{refreshRate:120,frameTime:8.33},{refreshRate:144,frameTime:6.94},{refreshRate:165,frameTime:6.06},{refreshRate:240,frameTime:4.17}],this.detectedVSync=null,this.frameTimeHistory=[],this.HISTORY_SIZE=120,this.VSYNC_THRESHOLD=.05,this.lastFrameTime=0,this.externalData=null,this.hasNewExternalData=!1,this.isWorker=!1,this.averageWorkerCpu={logs:[],graph:[]},this.handleClick=e=>{e.preventDefault(),this.showPanel(++this.mode%this.dom.children.length)},this.handleResize=()=>{this.fpsPanel&&this.resizePanel(this.fpsPanel),this.msPanel&&this.resizePanel(this.msPanel),this.workerCpuPanel&&this.resizePanel(this.workerCpuPanel),this.gpuPanel&&this.resizePanel(this.gpuPanel),this.gpuPanelCompute&&this.resizePanel(this.gpuPanelCompute)},this.mode=f,this.horizontal=d,this.minimal=u,this.dom=document.createElement(`div`),this.initializeDOM(),this._panelId=0,this.trackFPS&&(this.fpsPanel=this.addPanel(new e.Panel(`FPS`,`#0ff`,`#002`)),this.msPanel=this.addPanel(new e.Panel(`CPU`,`#0f0`,`#020`))),this.trackGPU&&(this.gpuPanel=this.addPanel(new e.Panel(`GPU`,`#ff0`,`#220`))),this.trackCPT&&(this.gpuPanelCompute=this.addPanel(new e.Panel(`CPT`,`#e1e1e1`,`#212121`))),this.trackHz===!0&&(this.vsyncPanel=new Jl(``,`#f0f`,`#202`),this.dom.appendChild(this.vsyncPanel.canvas),this.vsyncPanel.setOffset(56,35)),this.setupEventListeners()}initializeDOM(){this.dom.style.cssText=`
|
|
101
|
-
position: fixed;
|
|
102
|
-
top: 0;
|
|
103
|
-
left: 0;
|
|
104
|
-
opacity: 0.9;
|
|
105
|
-
z-index: 10000;
|
|
106
|
-
${this.minimal?`cursor: pointer;`:``}
|
|
107
|
-
`}setupEventListeners(){this.minimal?(this.dom.addEventListener(`click`,this.handleClick),this.showPanel(this.mode)):window.addEventListener(`resize`,this.handleResize)}updateTexturePreviewDimensions(){if(!this.renderer)return;let e=this.renderer.domElement?.width||0,t=this.renderer.domElement?.height||0;if(e===this.lastRendererWidth&&t===this.lastRendererHeight||e===0||t===0)return;this.lastRendererWidth=e,this.lastRendererHeight=t;let n=e/t,r,i;if(n>1.875?(r=90,i=Math.round(90/n)):(i=48,r=Math.round(48*n)),r=Math.max(r,16),i=Math.max(i,16),r!==this.texturePreviewWidth||i!==this.texturePreviewHeight){this.texturePreviewWidth=r,this.texturePreviewHeight=i,this.textureCaptureWebGL&&this.textureCaptureWebGL.resize(r,i),this.textureCaptureWebGPU&&this.textureCaptureWebGPU.resize(r,i);for(let n of this.texturePanels.values())n.setSourceSize(e,t)}}onWebGPUTimestampSupported(){}onGPUTrackingInitialized(){}setData(t){if(this.externalData=t,this.hasNewExternalData=!0,!this.isWorker&&this.msPanel){this.isWorker=!0,this.workerCpuPanel=new e.Panel(`WRK`,`#f90`,`#220`);let t=this.msPanel.id+1;this.workerCpuPanel.id=t,this.gpuPanel&&this.gpuPanel.id>=t&&(this.gpuPanel.id++,this.resizePanel(this.gpuPanel)),this.gpuPanelCompute&&this.gpuPanelCompute.id>=t&&(this.gpuPanelCompute.id++,this.resizePanel(this.gpuPanelCompute));let n=this.msPanel.canvas;n.nextSibling?this.dom.insertBefore(this.workerCpuPanel.canvas,n.nextSibling):this.dom.appendChild(this.workerCpuPanel.canvas),this.resizePanel(this.workerCpuPanel),this._panelId++}}update(){this.externalData?this.updateFromExternalData():this.updateFromInternalData()}updateFromExternalData(){let e=this.externalData;this.endProfiling(),this.addToAverage(this.totalCpuDuration,this.averageCpu),this.totalCpuDuration=0,this.hasNewExternalData&&=(this.addToAverage(e.cpu,this.averageWorkerCpu),this.addToAverage(e.fps,this.averageFps),this.addToAverage(e.gpu,this.averageGpu),this.addToAverage(e.gpuCompute,this.averageGpuCompute),!1),this.renderPanels()}updateFromInternalData(){this.endProfiling(),this.webgpuNative?this.resolveTimestampsAsync():this.info?this.processWebGPUTimestamps():this.processGpuQueries(),this.updateAverages(),this.resetCounters(),this.renderPanels()}renderPanels(){let e=performance.now();if(!this.isWorker){for(this.frameTimes.push(e);this.frameTimes.length>0&&this.frameTimes[0]<=e-1e3;)this.frameTimes.shift();let t=Math.round(this.frameTimes.length);this.addToAverage(t,this.averageFps)}let t=e>=this.prevTextTime+1e3/this.logsPerSecond,n=e>=this.prevGraphTime+1e3/this.graphsPerSecond,r=this.isWorker?` ⛭`:``;if(this.updatePanelComponents(this.fpsPanel,this.averageFps,0,t,n,r),this.updatePanelComponents(this.msPanel,this.averageCpu,this.precision,t,n,``),this.workerCpuPanel&&this.isWorker&&this.updatePanelComponents(this.workerCpuPanel,this.averageWorkerCpu,this.precision,t,n,` ⛭`),this.gpuPanel&&this.updatePanelComponents(this.gpuPanel,this.averageGpu,this.precision,t,n,r),this.trackCPT&&this.gpuPanelCompute&&this.updatePanelComponents(this.gpuPanelCompute,this.averageGpuCompute,this.precision,t,n,r),t&&(this.prevTextTime=e),n&&(this.prevGraphTime=e,this.texturePanels.size>0&&!this.textureUpdatePending&&(this.textureUpdatePending=!0,this.updateTexturePanels().finally(()=>{this.textureUpdatePending=!1})),this.captureStatsGLNodes()),this.vsyncPanel!==null){this.detectVSync(e);let n=this.detectedVSync?.refreshRate||0;t&&n>0&&this.vsyncPanel.update(n,n)}}resetCounters(){this.renderCount=0,this.totalCpuDuration=0,this.beginTime=performance.now()}resizePanel(e){e.canvas.style.position=`absolute`,this.minimal?e.canvas.style.display=`none`:(e.canvas.style.display=`block`,this.horizontal?(e.canvas.style.top=`0px`,e.canvas.style.left=e.id*e.WIDTH/e.PR+`px`):(e.canvas.style.left=`0px`,e.canvas.style.top=e.id*e.HEIGHT/e.PR+`px`))}addPanel(e){return e.canvas&&(this.dom.appendChild(e.canvas),e.id=this._panelId,this.resizePanel(e),this._panelId++),e}showPanel(e){for(let t=0;t<this.dom.children.length;t++){let n=this.dom.children[t];n.style.display=t===e?`block`:`none`}this.mode=e}addTexturePanel(e){this.texturePanelRow||(this.texturePanelRow=document.createElement(`div`),this.texturePanelRow.style.cssText=`
|
|
108
|
-
position: absolute;
|
|
109
|
-
top: 48px;
|
|
110
|
-
left: 0;
|
|
111
|
-
display: flex;
|
|
112
|
-
flex-direction: row;
|
|
113
|
-
`,this.dom.appendChild(this.texturePanelRow));let t=new Yl(e);return t.canvas.style.position=`relative`,t.canvas.style.left=``,t.canvas.style.top=``,this.texturePanelRow.appendChild(t.canvas),this.texturePanels.set(e,t),t}setTexture(e,t){this.updateTexturePreviewDimensions(),this.gl&&!this.textureCaptureWebGL&&(this.textureCaptureWebGL=new Xl(this.gl,this.texturePreviewWidth,this.texturePreviewHeight)),this.gpuDevice&&!this.textureCaptureWebGPU&&(this.textureCaptureWebGPU=new Zl(this.gpuDevice,this.texturePreviewWidth,this.texturePreviewHeight));let n=this.texturePanels.get(e);if(t.isWebGLRenderTarget&&this.gl){let r=Ql(t,this.gl);r&&(this.textureSourcesWebGL.set(e,{target:t,...r}),n&&n.setSourceSize(r.width,r.height));return}if(t.isRenderTarget&&this.gpuBackend){let r=$l(t,this.gpuBackend);r&&(this.textureSourcesWebGPU.set(e,r),n&&t.width&&t.height&&n.setSourceSize(t.width,t.height));return}if(t&&typeof t.createView==`function`){this.textureSourcesWebGPU.set(e,t);return}}setTextureWebGL(e,t,n,r){this.updateTexturePreviewDimensions(),this.gl&&!this.textureCaptureWebGL&&(this.textureCaptureWebGL=new Xl(this.gl,this.texturePreviewWidth,this.texturePreviewHeight)),this.textureSourcesWebGL.set(e,{target:{isWebGLRenderTarget:!0},framebuffer:t,width:n,height:r});let i=this.texturePanels.get(e);i&&i.setSourceSize(n,r)}setTextureBitmap(e,t,n,r){let i=this.texturePanels.get(e);i&&(n!==void 0&&r!==void 0&&i.setSourceSize(n,r),i.updateTexture(t))}removeTexturePanel(e){let t=this.texturePanels.get(e);t&&(t.dispose(),t.canvas.remove(),this.texturePanels.delete(e),this.textureSourcesWebGL.delete(e),this.textureSourcesWebGPU.delete(e))}async updateTexturePanels(){if(this.updateTexturePreviewDimensions(),this.textureCaptureWebGL)for(let[e,t]of this.textureSourcesWebGL){let n=this.texturePanels.get(e);if(n){let r=t.framebuffer,i=t.width,a=t.height;t.target.isWebGLRenderTarget&&t.target.__webglFramebuffer&&(r=t.target.__webglFramebuffer,i=t.target.width||i,a=t.target.height||a);let o=await this.textureCaptureWebGL.capture(r,i,a,e);o&&n.updateTexture(o)}}if(this.textureCaptureWebGPU)for(let[e,t]of this.textureSourcesWebGPU){let n=this.texturePanels.get(e);if(n){let e=await this.textureCaptureWebGPU.capture(t);e&&n.updateTexture(e)}}}captureStatsGLNodes(){let e=this._statsGLCaptures;if(!(!e||e.size===0||!this.renderer))for(let t of e.values())t.capture&&t.capture(this.renderer)}detectVSync(e){if(this.lastFrameTime===0){this.lastFrameTime=e;return}let t=e-this.lastFrameTime;if(this.lastFrameTime=e,this.frameTimeHistory.push(t),this.frameTimeHistory.length>this.HISTORY_SIZE&&this.frameTimeHistory.shift(),this.frameTimeHistory.length<60)return;let n=this.frameTimeHistory.reduce((e,t)=>e+t)/this.frameTimeHistory.length,r=this.frameTimeHistory.reduce((e,t)=>e+(t-n)**2,0)/this.frameTimeHistory.length;if(Math.sqrt(r)>2){this.detectedVSync=null;return}let i=null,a=1/0;for(let e of this.VSYNC_RATES){let t=Math.abs(n-e.frameTime);t<a&&(a=t,i=e)}i&&a/i.frameTime<=this.VSYNC_THRESHOLD?this.detectedVSync=i:this.detectedVSync=null}updatePanelComponents(e,t,n,r,i,a=``){if(!e||t.logs.length===0)return;let o=String(e.id);o in this.lastMin||(this.lastMin[o]=1/0,this.lastMax[o]=0,this.lastValue[o]=0);let s=t.logs[t.logs.length-1];this.lastMax[o]=Math.max(...t.logs),this.lastMin[o]=Math.min(this.lastMin[o],s),this.lastValue[o]=this.lastValue[o]*.7+s*.3;let c=Math.max(Math.max(...t.logs),...t.graph.slice(-this.samplesGraph));this.updateCounter++,r&&e.update(this.lastValue[o],this.lastMax[o],n,a),i&&e.updateGraph(s,c)}updatePanel(e,t,n=2){if(!e||t.logs.length===0)return;let r=performance.now();e.name in this.lastMin||(this.lastMin[e.name]=1/0,this.lastMax[e.name]=0,this.lastValue[e.name]=0);let i=t.logs[t.logs.length-1],a=Math.max(...t.logs.slice(-30));this.lastMin[e.name]=Math.min(this.lastMin[e.name],i),this.lastMax[e.name]=Math.max(this.lastMax[e.name],i),this.lastValue[e.name]=this.lastValue[e.name]*.7+i*.3;let o=Math.max(a,...t.graph.slice(-this.samplesGraph));this.updateCounter++,this.updateCounter%(this.logsPerSecond*2)==0&&(this.lastMax[e.name]=a,this.lastMin[e.name]=i),e.update&&(r>=this.prevCpuTime+1e3/this.logsPerSecond&&e.update(this.lastValue[e.name],i,this.lastMax[e.name],o,n),r>=this.prevGraphTime+1e3/this.graphsPerSecond&&(e.updateGraph(i,o),this.prevGraphTime=r))}get domElement(){return this.dom}dispose(){this.minimal?this.dom.removeEventListener(`click`,this.handleClick):window.removeEventListener(`resize`,this.handleResize),this.textureCaptureWebGL&&=(this.textureCaptureWebGL.dispose(),null),this.textureCaptureWebGPU&&=(this.textureCaptureWebGPU.dispose(),null);for(let e of this.texturePanels.values())e.dispose();this.texturePanels.clear(),this.textureSourcesWebGL.clear(),this.textureSourcesWebGPU.clear();let e=this._statsGLCaptures;if(e){for(let t of e.values())t.dispose&&t.dispose();e.clear()}this.texturePanelRow&&=(this.texturePanelRow.remove(),null),this.dom.remove(),this.fpsPanel=null,this.msPanel=null,this.gpuPanel=null,this.gpuPanelCompute=null,this.vsyncPanel=null,this.workerCpuPanel=null,this.frameTimeHistory.length=0,this.averageWorkerCpu.logs.length=0,this.averageWorkerCpu.graph.length=0,super.dispose()}};eu.Panel=ql,eu.PanelTexture=Yl;let tu=eu;const R={diffuse:`csm_DiffuseColor`,roughness:`csm_Roughness`,metalness:`csm_Metalness`,emissive:`csm_Emissive`,ao:`csm_AO`,fragNormal:`csm_FragNormal`,clearcoat:`csm_Clearcoat`,clearcoatRoughness:`csm_ClearcoatRoughness`,clearcoatNormal:`csm_ClearcoatNormal`,transmission:`csm_Transmission`,thickness:`csm_Thickness`,iridescence:`csm_Iridescence`,pointSize:`csm_PointSize`,fragColor:`csm_FragColor`,depthAlpha:`csm_DepthAlpha`,unlitFac:`csm_UnlitFac`,position:`csm_Position`,positionRaw:`csm_PositionRaw`,normal:`csm_Normal`};`${R.position}`,`${R.positionRaw}`,`${R.normal}`,`${R.depthAlpha}`,`${R.pointSize}`,`${R.diffuse}`,`${R.fragColor}`,`${R.fragNormal}`,`${R.unlitFac}`,`${R.emissive}`,`${R.roughness}`,`${R.metalness}`,`${R.iridescence}`,`${R.ao}`,`${R.clearcoat}`,`${R.clearcoatRoughness}`,`${R.clearcoatNormal}`,`${R.transmission}`,`${R.thickness}`,P.ShaderChunk.lights_physical_fragment,P.ShaderChunk.transmission_fragment,`${R.normal}`,`${R.normal}`,`${R.position}`,`${R.position}`,`${R.positionRaw}`,`${R.positionRaw}`,`${R.pointSize}`,`${R.pointSize}`,`${R.diffuse}`,`${R.diffuse}`,`${R.fragColor}`,`${R.fragColor}${R.unlitFac}`,`${R.emissive}`,`${R.emissive}`,`${R.roughness}`,`${R.roughness}`,`${R.metalness}`,`${R.metalness}`,`${R.ao}`,`${R.ao}`,`${R.fragNormal}`,`${R.fragNormal}`,`${R.depthAlpha}`,`${R.depthAlpha}`,`${R.depthAlpha}`,`${R.depthAlpha}`,`${R.clearcoat}`,`${R.clearcoat}`,`${R.clearcoatRoughness}`,`${R.clearcoatRoughness}`,`${R.clearcoatNormal}`,`${R.transmission}`,`${R.transmission}`,`${R.thickness}`,`${R.thickness}`,`${R.iridescence}`,`${R.iridescence}`,R.clearcoat,R.clearcoatNormal,R.clearcoatRoughness,R.transmission,R.iridescence,P.Material,new ve,new I,new I,new ve,new ae,Array.from({length:8},()=>new I),new I,new I,new I,new I,new I,new I,Object.freeze(new I(0,0,1)),(()=>{let e=new ye;return e.matrixAutoUpdate=!1,e.matrixWorldAutoUpdate=!1,e})(),new ce(`black`),new Be(1,1),new P.Vector3,new P.Vector3,new P.Vector3;var nu=c({__name:`KeyboardControls`,props:{makeDefault:{type:Boolean,required:!1,default:!0},camera:{type:Object,required:!1},domElement:{type:null,required:!1},moveSpeed:{type:Number,required:!1,default:.2},selector:{type:String,required:!1}},emits:[`isLock`,`change`],setup(e,{expose:t,emit:n}){let r=e,o=n,{moveSpeed:s}=D(r),{camera:c,controls:l,renderer:u,invalidate:d}=hl();M(r,()=>{d()});let f=C(0),p=C(0),{KeyW:m,KeyA:h,KeyS:g,KeyD:_,Up:v,Down:b,Left:x,Right:S}=Ks();N(()=>{h.value||x.value?f.value=-s.value:_.value||S.value?f.value=s.value:f.value=0,m.value||v.value?p.value=s.value:g.value||b.value?p.value=-s.value:p.value=0}),t({instance:l});let w=e=>{o(`isLock`,e)},T=e=>{o(`change`,e)},E=new I,O=new I,A=new De,j=(e,t)=>{if(!c.value?.position&&!E)return;let n=c.value,r=e*.001;n?.translateZ(-t),A.set(O.x*r,O.y*r,O.z*r,1).normalize(),n?.quaternion.multiply(A),(f.value||p.value)&&(d(),o(`change`,l.value))},{onBeforeRender:P}=gl();return P(({delta:e})=>{l.value instanceof Il&&l.value?.isLocked&&(j(e,p.value),l.value.moveRight(f.value))}),(t,n)=>k(u)?(y(),i(k(uu),{key:0,selector:e.selector,"make-default":e.makeDefault,camera:e.camera||k(c),"dom-element":e.domElement||k(u).domElement,onIsLock:w,onChange:T},null,8,[`selector`,`make-default`,`camera`,`dom-element`])):a(`v-if`,!0)}});const ru={makeDefault:!1,autoRotate:!1,autoRotateSpeed:2,enableDamping:!0,dampingFactor:.05,enablePan:!0,keyPanSpeed:7,maxAzimuthAngle:1/0,minAzimuthAngle:-1/0,maxPolarAngle:Math.PI,minPolarAngle:0,minDistance:0,maxDistance:1/0,minZoom:0,maxZoom:1/0,enableZoom:!0,zoomSpeed:1,enableRotate:!0,rotateSpeed:1,target:()=>[0,0,0]};function iu(e,t,n){let{controls:r,invalidate:i}=hl();M(t,()=>{i()}),Ms(e,a=>{a.addEventListener(`change`,()=>{i(),a&&n(`change`,e.value)}),a.addEventListener(`start`,()=>{e.value&&n(`start`,e.value)}),a.addEventListener(`end`,()=>{e.value&&n(`end`,e.value)}),t.makeDefault?r.value=a:r.value=null},{once:!0});let{onBeforeRender:a}=gl();a(()=>{e.value&&e.value.enabled&&(t.enableDamping||t.autoRotate)&&e.value.update()}),v(()=>{e.value&&e.value.dispose()})}const au=[`args`,`target`,`auto-rotate`,`auto-rotate-speed`,`enable-damping`,`damping-factor`,`enable-pan`,`key-pan-speed`,`keys`,`max-azimuth-angle`,`min-azimuth-angle`,`max-polar-angle`,`min-polar-angle`,`min-distance`,`max-distance`,`min-zoom`,`max-zoom`,`touches`,`enable-zoom`,`zoom-speed`,`enable-rotate`,`rotate-speed`,`mouse-buttons`,`screen-space-panning`];var ou=c({__name:`MapControls`,props:p({makeDefault:{type:Boolean,required:!1},camera:{type:Object,required:!1},domElement:{type:null,required:!1},target:{type:null,required:!1},enableDamping:{type:Boolean,required:!1},dampingFactor:{type:Number,required:!1},autoRotate:{type:Boolean,required:!1},autoRotateSpeed:{type:Number,required:!1},enablePan:{type:Boolean,required:!1},keyPanSpeed:{type:Number,required:!1},keys:{type:Object,required:!1},maxAzimuthAngle:{type:Number,required:!1},minAzimuthAngle:{type:Number,required:!1},maxPolarAngle:{type:Number,required:!1},minPolarAngle:{type:Number,required:!1},minDistance:{type:Number,required:!1},maxDistance:{type:Number,required:!1},minZoom:{type:Number,required:!1},maxZoom:{type:Number,required:!1},touches:{type:Object,required:!1},enableZoom:{type:Boolean,required:!1},zoomSpeed:{type:Number,required:!1},enableRotate:{type:Boolean,required:!1},rotateSpeed:{type:Number,required:!1},mouseButtons:{type:Object,required:!1},screenSpacePanning:{type:Boolean,required:!1}},{...ru,touches:()=>({ONE:Ie.PAN,TWO:Ie.DOLLY_ROTATE}),mouseButtons:()=>({LEFT:he.PAN,MIDDLE:he.DOLLY,RIGHT:he.ROTATE}),screenSpacePanning:!1}),emits:[`change`,`start`,`end`],setup(e,{expose:t,emit:n}){let r=e,i=n,{camera:s,renderer:c,extend:l}=hl(),u=E(null);return l({MapControls:Wl}),iu(u,r,i),t({instance:u}),(t,n)=>(e.camera||k(s))&&(e.domElement||k(c).domElement)?(y(),o(`TresMapControls`,{key:0,ref_key:`controlsRef`,ref:u,args:[e.camera||k(s),e.domElement||k(c).domElement],target:e.target,"auto-rotate":e.autoRotate,"auto-rotate-speed":e.autoRotateSpeed,"enable-damping":e.enableDamping,"damping-factor":e.dampingFactor,"enable-pan":e.enablePan,"key-pan-speed":e.keyPanSpeed,keys:e.keys,"max-azimuth-angle":e.maxAzimuthAngle,"min-azimuth-angle":e.minAzimuthAngle,"max-polar-angle":e.maxPolarAngle,"min-polar-angle":e.minPolarAngle,"min-distance":e.minDistance,"max-distance":e.maxDistance,"min-zoom":e.minZoom,"max-zoom":e.maxZoom,touches:e.touches,"enable-zoom":e.enableZoom,"zoom-speed":e.zoomSpeed,"enable-rotate":e.enableRotate,"rotate-speed":e.rotateSpeed,"mouse-buttons":e.mouseButtons,"screen-space-panning":e.screenSpacePanning},null,8,au)):a(`v-if`,!0)}});const su=[`args`,`target`,`auto-rotate`,`auto-rotate-speed`,`enable-damping`,`damping-factor`,`enable-pan`,`key-pan-speed`,`keys`,`max-azimuth-angle`,`min-azimuth-angle`,`max-polar-angle`,`min-polar-angle`,`min-distance`,`max-distance`,`min-zoom`,`max-zoom`,`touches`,`enable-zoom`,`zoom-speed`,`enable-rotate`,`rotate-speed`,`mouse-buttons`,`screen-space-panning`];var cu=c({__name:`OrbitControls`,props:p({mouseButtons:{type:Object,required:!1},makeDefault:{type:Boolean,required:!1},camera:{type:Object,required:!1},domElement:{type:null,required:!1},target:{type:null,required:!1},enableDamping:{type:Boolean,required:!1},dampingFactor:{type:Number,required:!1},autoRotate:{type:Boolean,required:!1},autoRotateSpeed:{type:Number,required:!1},enablePan:{type:Boolean,required:!1},keyPanSpeed:{type:Number,required:!1},keys:{type:Object,required:!1},maxAzimuthAngle:{type:Number,required:!1},minAzimuthAngle:{type:Number,required:!1},maxPolarAngle:{type:Number,required:!1},minPolarAngle:{type:Number,required:!1},minDistance:{type:Number,required:!1},maxDistance:{type:Number,required:!1},minZoom:{type:Number,required:!1},maxZoom:{type:Number,required:!1},touches:{type:Object,required:!1},enableZoom:{type:Boolean,required:!1},zoomSpeed:{type:Number,required:!1},enableRotate:{type:Boolean,required:!1},rotateSpeed:{type:Number,required:!1},screenSpacePanning:{type:Boolean,required:!1}},{...ru,touches:()=>({ONE:Ie.ROTATE,TWO:Ie.DOLLY_PAN}),mouseButtons:()=>({LEFT:he.ROTATE,MIDDLE:he.DOLLY,RIGHT:he.PAN}),screenSpacePanning:!0}),emits:[`change`,`start`,`end`],setup(e,{expose:t,emit:n}){let r=e,i=n,{camera:s,renderer:c,extend:l}=hl(),u=E(null);return l({OrbitControls:Ul}),iu(u,r,i),t({instance:u}),(t,n)=>(e.camera||k(s))&&(e.domElement||k(c).domElement)?(y(),o(`TresOrbitControls`,{ref_key:`controlsRef`,ref:u,key:(e.camera||k(s))?.uuid,args:[e.camera||k(s),e.domElement||k(c).domElement],target:e.target,"auto-rotate":e.autoRotate,"auto-rotate-speed":e.autoRotateSpeed,"enable-damping":e.enableDamping,"damping-factor":e.dampingFactor,"enable-pan":e.enablePan,"key-pan-speed":e.keyPanSpeed,keys:e.keys,"max-azimuth-angle":e.maxAzimuthAngle,"min-azimuth-angle":e.minAzimuthAngle,"max-polar-angle":e.maxPolarAngle,"min-polar-angle":e.minPolarAngle,"min-distance":e.minDistance,"max-distance":e.maxDistance,"min-zoom":e.minZoom,"max-zoom":e.maxZoom,touches:e.touches,"enable-zoom":e.enableZoom,"zoom-speed":e.zoomSpeed,"enable-rotate":e.enableRotate,"rotate-speed":e.rotateSpeed,"mouse-buttons":e.mouseButtons,"screen-space-panning":e.screenSpacePanning},null,8,su)):a(`v-if`,!0)}});const lu=[`args`];var uu=c({__name:`PointerLockControls`,props:{makeDefault:{type:Boolean,required:!1,default:!1},camera:{type:Object,required:!1},domElement:{type:null,required:!1},selector:{type:String,required:!1}},emits:[`isLock`,`change`],setup(e,{expose:t,emit:n}){let r=e,i=n,{camera:s,renderer:c,extend:l,controls:u,invalidate:d}=hl();M(r,()=>{d()});let f=E(null),p;l({PointerLockControls:Il});let m=()=>i(`isLock`,!0),h=()=>i(`isLock`,!1),g=()=>d();return M(f,(e,t)=>{if(t&&(t.removeEventListener(`lock`,m),t.removeEventListener(`unlock`,h),t.removeEventListener(`change`,g)),!e){u.value=null;return}r.makeDefault&&(u.value=e),e.addEventListener(`lock`,m),e.addEventListener(`unlock`,h),e.addEventListener(`change`,g),p=document.getElementById(r.selector||``)||c.domElement,Fs(p,`click`,()=>{e.lock(),d()})}),v(()=>{let e=f.value;e&&(e.removeEventListener(`lock`,m),e.removeEventListener(`unlock`,h),e.removeEventListener(`change`,g),e.dispose())}),t({instance:u}),(t,n)=>(e.camera||k(s))&&(e.domElement||k(c).domElement)?(y(),o(`TresPointerLockControls`,{key:0,ref_key:`controlsRef`,ref:f,args:[e.camera||k(s),e.domElement||k(c).domElement]},null,8,lu)):a(`v-if`,!0)}});function du(e,t,...n){let r=E(),{scene:i}=hl(),a;return N(()=>{e&&O(e)&&t&&(r.value=a=new t(O(e),...n)),a&&(a.traverse(e=>e.raycast=()=>null),i.value.add(a))}),h(()=>{r.value=void 0,i.value.remove(a),a.dispose?.()}),gl().onBeforeRender(()=>{r.value?.update?.()}),r}var fu=c({__name:`component`,props:{type:{type:null,required:!0},args:{type:Array,required:!1}},setup(e){let t=e,n=E(),r=E();return N(()=>{n.value&&n.value.parent&&(r.value=n.value.parent)}),du(r,t.type,...t.args??[]),(e,t)=>(y(),o(`TresObject3D`,{ref_key:`objRef`,ref:n},null,512))}});c({name:`Stats`,props:{showPanel:{type:Number,default:0}},setup(e,{expose:t}){let n=new Gl.default;t({instance:n});let r=document.body;n.showPanel(e.showPanel||0),r?.appendChild(n.dom);let{onBeforeRender:i,onRender:a}=gl();i(()=>n.begin(),-1/0),a(()=>n.end(),1/0),v(()=>{r?.removeChild(n.dom)})}}),c({name:`StatsGl`,props:[`logsPerSecond`,`samplesLog`,`samplesGraph`,`precision`,`horizontal`,`minimal`,`mode`],setup(e,{expose:t}){let n=new tu({logsPerSecond:e.logsPerSecond,samplesLog:e.samplesLog,samplesGraph:e.samplesGraph,precision:e.precision,horizontal:e.horizontal,minimal:e.minimal,mode:e.mode});t({instance:n});let r=document.body,i=n.domElement;r?.appendChild(i);let{renderer:a}=ml(),{onRender:o}=gl();n.init(a.instance),o(()=>n.update(),1/0),v(()=>{r?.removeChild(i)})}}),new ce,c({name:`BakeShadows`,setup(){let{renderer:e}=hl();N(()=>{e instanceof Ue&&(e.shadowMap.autoUpdate=!1,e.shadowMap.needsUpdate=!0)})}});var pu=class e extends ye{static Geometry;isLensflare=!0;type=`Lensflare`;addElement(e){}dispose(){}constructor(){super(e.Geometry,new be({opacity:0,transparent:!0})),this.frustumCulled=!1,this.renderOrder=1/0;let t=new I,n=new I,r=new F(16,16),i=new F(16,16),a=ze,o=e.Geometry,s=new ke({uniforms:{scale:{value:null},screenPosition:{value:null}},vertexShader:`
|
|
114
|
-
|
|
115
|
-
precision highp float;
|
|
116
|
-
|
|
117
|
-
uniform vec3 screenPosition;
|
|
118
|
-
uniform vec2 scale;
|
|
119
|
-
|
|
120
|
-
attribute vec3 position;
|
|
121
|
-
|
|
122
|
-
void main() {
|
|
123
|
-
|
|
124
|
-
gl_Position = vec4( position.xy * scale + screenPosition.xy, screenPosition.z, 1.0 );
|
|
125
|
-
|
|
126
|
-
}`,fragmentShader:`
|
|
127
|
-
|
|
128
|
-
precision highp float;
|
|
129
|
-
|
|
130
|
-
void main() {
|
|
131
|
-
|
|
132
|
-
gl_FragColor = vec4( 1.0, 0.0, 1.0, 1.0 );
|
|
133
|
-
|
|
134
|
-
}`,depthTest:!0,depthWrite:!1,transparent:!1}),c=new ke({uniforms:{map:{value:r},scale:{value:null},screenPosition:{value:null}},vertexShader:`
|
|
135
|
-
|
|
136
|
-
precision highp float;
|
|
137
|
-
|
|
138
|
-
uniform vec3 screenPosition;
|
|
139
|
-
uniform vec2 scale;
|
|
140
|
-
|
|
141
|
-
attribute vec3 position;
|
|
142
|
-
attribute vec2 uv;
|
|
143
|
-
|
|
144
|
-
varying vec2 vUV;
|
|
145
|
-
|
|
146
|
-
void main() {
|
|
147
|
-
|
|
148
|
-
vUV = uv;
|
|
149
|
-
|
|
150
|
-
gl_Position = vec4( position.xy * scale + screenPosition.xy, screenPosition.z, 1.0 );
|
|
151
|
-
|
|
152
|
-
}`,fragmentShader:`
|
|
153
|
-
|
|
154
|
-
precision highp float;
|
|
155
|
-
|
|
156
|
-
uniform sampler2D map;
|
|
157
|
-
|
|
158
|
-
varying vec2 vUV;
|
|
159
|
-
|
|
160
|
-
void main() {
|
|
161
|
-
|
|
162
|
-
gl_FragColor = texture2D( map, vUV );
|
|
163
|
-
|
|
164
|
-
}`,depthTest:!1,depthWrite:!1,transparent:!1}),l=new ye(o,s),u=[],d=mu.Shader,f=new ke({name:d.name,uniforms:{map:{value:null},occlusionMap:{value:i},color:{value:new ce(16777215)},scale:{value:new Be},screenPosition:{value:new I}},vertexShader:d.vertexShader,fragmentShader:d.fragmentShader,blending:ee,transparent:!0,depthWrite:!1}),p=new ye(o,f);this.addElement=function(e){u.push(e)};let m=new Be,h=new Be,g=new ie,_=new Ve;this.onBeforeRender=function(e,d,v){e.getCurrentViewport(_);let y=e.getRenderTarget(),b=y===null?ze:y.texture.type;a!==b&&(r.dispose(),i.dispose(),r.type=i.type=b,a=b);let x=_.w/_.z,S=_.z/2,C=_.w/2,w=16/_.w;if(m.set(w*x,w),g.min.set(_.x,_.y),g.max.set(_.x+(_.z-16),_.y+(_.w-16)),n.setFromMatrixPosition(this.matrixWorld),n.applyMatrix4(v.matrixWorldInverse),!(n.z>0)&&(t.copy(n).applyMatrix4(v.projectionMatrix),h.x=_.x+t.x*S+S-8,h.y=_.y+t.y*C+C-8,g.containsPoint(h))){e.copyFramebufferToTexture(r,h);let n=s.uniforms;n.scale.value=m,n.screenPosition.value=t,e.renderBufferDirect(v,null,o,s,l,null),e.copyFramebufferToTexture(i,h),n=c.uniforms,n.scale.value=m,n.screenPosition.value=t,e.renderBufferDirect(v,null,o,c,l,null);let a=-t.x*2,d=-t.y*2;for(let n=0,r=u.length;n<r;n++){let r=u[n],i=f.uniforms;i.color.value.copy(r.color),i.map.value=r.texture,i.screenPosition.value.x=t.x+a*r.distance,i.screenPosition.value.y=t.y+d*r.distance,w=r.size/_.w;let s=_.w/_.z;i.scale.value.set(w*s,w),f.uniformsNeedUpdate=!0,e.renderBufferDirect(v,null,o,f,p,null)}}},this.dispose=function(){s.dispose(),c.dispose(),f.dispose(),r.dispose(),i.dispose();for(let e=0,t=u.length;e<t;e++)u[e].texture.dispose()}}},mu=class{texture;size;distance;color;static Shader;constructor(e,t=1,n=0,r=new ce(16777215)){this.texture=e,this.size=t,this.distance=n,this.color=r}};mu.Shader={name:`LensflareElementShader`,uniforms:{map:{value:null},occlusionMap:{value:null},color:{value:null},scale:{value:null},screenPosition:{value:null}},vertexShader:`
|
|
165
|
-
|
|
166
|
-
precision highp float;
|
|
167
|
-
|
|
168
|
-
uniform vec3 screenPosition;
|
|
169
|
-
uniform vec2 scale;
|
|
170
|
-
|
|
171
|
-
uniform sampler2D occlusionMap;
|
|
172
|
-
|
|
173
|
-
attribute vec3 position;
|
|
174
|
-
attribute vec2 uv;
|
|
175
|
-
|
|
176
|
-
varying vec2 vUV;
|
|
177
|
-
varying float vVisibility;
|
|
178
|
-
|
|
179
|
-
void main() {
|
|
180
|
-
|
|
181
|
-
vUV = uv;
|
|
182
|
-
|
|
183
|
-
vec2 pos = position.xy;
|
|
184
|
-
|
|
185
|
-
vec4 visibility = texture2D( occlusionMap, vec2( 0.1, 0.1 ) );
|
|
186
|
-
visibility += texture2D( occlusionMap, vec2( 0.5, 0.1 ) );
|
|
187
|
-
visibility += texture2D( occlusionMap, vec2( 0.9, 0.1 ) );
|
|
188
|
-
visibility += texture2D( occlusionMap, vec2( 0.9, 0.5 ) );
|
|
189
|
-
visibility += texture2D( occlusionMap, vec2( 0.9, 0.9 ) );
|
|
190
|
-
visibility += texture2D( occlusionMap, vec2( 0.5, 0.9 ) );
|
|
191
|
-
visibility += texture2D( occlusionMap, vec2( 0.1, 0.9 ) );
|
|
192
|
-
visibility += texture2D( occlusionMap, vec2( 0.1, 0.5 ) );
|
|
193
|
-
visibility += texture2D( occlusionMap, vec2( 0.5, 0.5 ) );
|
|
194
|
-
|
|
195
|
-
vVisibility = visibility.r / 9.0;
|
|
196
|
-
vVisibility *= 1.0 - visibility.g / 9.0;
|
|
197
|
-
vVisibility *= visibility.b / 9.0;
|
|
198
|
-
|
|
199
|
-
gl_Position = vec4( ( pos * scale + screenPosition.xy ).xy, screenPosition.z, 1.0 );
|
|
200
|
-
|
|
201
|
-
}`,fragmentShader:`
|
|
202
|
-
|
|
203
|
-
precision highp float;
|
|
204
|
-
|
|
205
|
-
uniform sampler2D map;
|
|
206
|
-
uniform vec3 color;
|
|
207
|
-
|
|
208
|
-
varying vec2 vUV;
|
|
209
|
-
varying float vVisibility;
|
|
210
|
-
|
|
211
|
-
void main() {
|
|
212
|
-
|
|
213
|
-
vec4 texture = texture2D( map, vUV );
|
|
214
|
-
texture.a *= vVisibility;
|
|
215
|
-
gl_FragColor = texture;
|
|
216
|
-
gl_FragColor.rgb *= color;
|
|
217
|
-
|
|
218
|
-
}`},pu.Geometry=(function(){let e=new se,t=new fe(new Float32Array([-1,-1,0,0,0,1,-1,0,1,0,1,1,0,1,1,-1,1,0,0,1]),5);return e.setIndex([0,1,2,0,2,3]),e.setAttribute(`position`,new pe(t,3,0,!1)),e.setAttribute(`uv`,new pe(t,2,3,!1)),e})(),_e.clamp,_e.lerp,c({name:`GlobalAudio`,props:[`src`,`loop`,`volume`,`playbackRate`,`playTrigger`,`stopTrigger`],async setup(e,{expose:t,emit:n}){let{camera:r,renderer:i}=ml(),a=new ne;r.activeCamera.value?.add(a);let o=new te(a),s=new re;t({instance:o}),v(()=>{o&&o.disconnect()}),M(()=>[e.playbackRate],()=>o.setPlaybackRate(e.playbackRate??1),{immediate:!0}),M(()=>[e.volume],()=>o.setVolume(e.volume??.5),{immediate:!0}),M(()=>[e.loop],()=>o.setLoop(e.loop??!1),{immediate:!0}),M(()=>[e.src],async()=>{let t=await s.loadAsync(e.src);o.setBuffer(t)},{immediate:!0}),Fs(document.getElementById(e.playTrigger??``)||i.instance.domElement,`click`,()=>{o.isPlaying?o.pause():o.play(),n(`isPlaying`,o.isPlaying)});let c=document.getElementById(e.stopTrigger??``);return c&&Fs(c,`click`,()=>{o.stop(),n(`isPlaying`,o.isPlaying)}),null}});var hu=`void main() {
|
|
219
|
-
gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);
|
|
220
|
-
}`,gu=`#include <common>
|
|
221
|
-
|
|
222
|
-
uniform float uWidth;
|
|
223
|
-
uniform float uHeight;
|
|
224
|
-
|
|
225
|
-
void main() {
|
|
226
|
-
|
|
227
|
-
vec4 mvPosition = modelViewMatrix * vec4(0.0, 0.0, 0.0, 1.0);
|
|
228
|
-
|
|
229
|
-
vec2 quad = position.xy;
|
|
230
|
-
|
|
231
|
-
vec2 alignedPosition = quad * vec2(uWidth, uHeight);
|
|
232
|
-
|
|
233
|
-
mvPosition.xy += alignedPosition;
|
|
234
|
-
|
|
235
|
-
gl_Position = projectionMatrix * mvPosition;
|
|
236
|
-
}`,_u=`#include <common>
|
|
237
|
-
|
|
238
|
-
void main() {
|
|
239
|
-
gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
|
|
240
|
-
}`;const vu=new I(0,0,0),yu=new I(0,0,0),bu=new I(0,0,0);function xu(e,t,n){let r=vu.setFromMatrixPosition(e.matrixWorld);r.project(t);let i=n.width/2,a=n.height/2;return[(Number.isNaN(r.x)?0:r.x)*i+i,-(r.y*a)+a,r.z]}function Su(e,t){let n=vu.setFromMatrixPosition(e.matrixWorld),r=yu.setFromMatrixPosition(t.matrixWorld),i=n.sub(r),a=t.getWorldDirection(bu);return i.angleTo(a)>Math.PI/2}function Cu(e,t,n,r){let i=vu.setFromMatrixPosition(e.matrixWorld),a=i.clone();a.project(t),n.setFromCamera(new Be(a.x,a.y),t);let o=n.intersectObjects(r,!0);if(o.length>0){let e=o[0].distance;return i.distanceTo(n.ray.origin)<e}return!0}function wu(e,t=new I(0,0,0),n){let{width:r,height:i}=n,a=r/i,o=vu,s=yu;s.copy(t);let c=e.getWorldPosition(o).distanceTo(s);if(e instanceof Ce)return 1;let l=e.fov*Math.PI/180;return r/(2*Math.tan(l/2)*c*a)}function Tu(e,t){if(t instanceof Ce)return t.zoom;if(t instanceof we){let n=vu.setFromMatrixPosition(e.matrixWorld),r=yu.setFromMatrixPosition(t.matrixWorld),i=t.fov*Math.PI/180,a=n.distanceTo(r);return 1/(2*Math.tan(i/2)*a)}else return 1}function Eu(e,t,n){if(t instanceof we||t instanceof Ce){let r=vu.setFromMatrixPosition(e.matrixWorld),i=yu.setFromMatrixPosition(t.matrixWorld),a=r.distanceTo(i),o=(n[1]-n[0])/(t.far-t.near),s=n[1]-o*t.far;return Math.round(o*a+s)}}const Du=e=>Math.abs(e)<1e-10?0:e;function Ou(e,t,n=``){let r=`matrix3d(`;for(let n=0;n!==16;n++)r+=Du(t[n]*e.elements[n])+(n===15?`)`:`,`);return n+r}const ku=(e=>t=>Ou(t,e))([1,-1,1,1,1,-1,1,1,1,-1,1,1,1,-1,1,1]),Au=(e,t)=>Ou(e,[1/t,1/t,1/t,1,-1/t,-1/t,-1/t,-1,1/t,1/t,1/t,1,1,1,1,1],`translate(-50%,-50%)`),ju=[`material`,`cast-shadow`,`receive-shadow`,`geometry`];var Mu=c({__name:`HTML`,props:{geometry:{type:null,required:!1},material:{type:null,required:!1},as:{type:String,required:!1,default:`div`},transform:{type:Boolean,required:!1,default:!1},prepend:{type:Boolean,required:!1,default:!1},portal:{type:null,required:!1},wrapperClass:{type:String,required:!1},eps:{type:Number,required:!1,default:1e-4},distanceFactor:{type:Number,required:!1},fullscreen:{type:Boolean,required:!1},center:{type:Boolean,required:!1},pointerEvents:{type:String,required:!1,default:`auto`},sprite:{type:Boolean,required:!1,default:!1},transparentMaterial:{type:Boolean,required:!1,default:!1},zIndexRange:{type:Array,required:!1,default:()=>[16777271,0]},calculatePosition:{type:null,required:!1,default:()=>xu},occlude:{type:[Object,null,Array,Boolean,String],required:!1},castShadow:{type:Boolean,required:!1,default:!1},receiveShadow:{type:Boolean,required:!1,default:!1}},emits:[`onOcclude`],setup(e,{expose:t,emit:n}){let i=e,c=n,l=j(),{geometry:u,material:d,as:f,transform:p,portal:m,wrapperClass:h,eps:g,distanceFactor:_,fullscreen:b,center:x,pointerEvents:S,sprite:T,prepend:O,occlude:P,zIndexRange:ee,castShadow:te,receiveShadow:ne,transparentMaterial:re,calculatePosition:ie}=D(i),ae=A(),oe=E(null),se=E(null),ce=new Ee,{renderer:ue,scene:F,camera:de,sizes:fe}=ml(),pe=r(()=>document.createElement(f.value)),me=new je,he=new I,ge=new ve,_e=new De,ye=C([0,0,0]),be=C(0),xe=C(null),Se=C(!0),we=C(!1),Te=r(()=>({position:`absolute`,top:`0`,left:`0`,willChange:`transform`,pointerEvents:S.value,...typeof ae.style==`object`?ae.style:{}})),Oe=r(()=>{let e=fe.width.value,t=fe.height.value;return p.value?{...Te.value,transformStyle:`preserve-3d`,pointerEvents:`none`,width:`${e}px`,height:`${t}px`}:{...Te.value,transform:x.value?`translate3d(-50%,-50%,0)`:`none`,...b.value&&{top:`-${t/2}px`,left:`-${e/2}px`,width:`${e}px`,height:`${t}px`},pointerEvents:b.value?`none`:S.value}}),ke=r(()=>({position:`absolute`,pointerEvents:S.value})),Ae=r(()=>{let e=P.value;return e&&e!==`blending`&&(Array.isArray(e)?e.length&&typeof e[0]!=`boolean`:!0)}),Ne=r(()=>d.value?d.value:new Me({vertexShader:T.value?gu:p.value?_u:gu,fragmentShader:hu,side:le,transparent:re.value,uniforms:{uWidth:{value:1},uHeight:{value:1}}}));N(()=>{Ne.value.transparent=re.value}),M([P,()=>ue.instance],([e,t])=>{if(!t||e!==`blending`)return;let n=t.domElement;n.style.zIndex=`${Math.floor(ee.value[0]/2)}`,n.style.position=`absolute`},{immediate:!0}),M(()=>[oe.value,ue.instance,fe.width.value,fe.height.value,l.default?.(),de.activeCamera.value],([e,t])=>{if(!e||!t||!de.activeCamera.value)return;we.value=!1,F.value?.updateMatrixWorld();let n=pe.value.style;n.position=`absolute`,n.top=`0`,n.left=`0`,p.value?(n.pointerEvents=`none`,n.overflow=`hidden`,n.transformStyle=`preserve-3d`):(n.transformOrigin=`0 0`,n.willChange=`transform`,P.value||(n.zIndex=`${ee.value[0]}`));let r=m.value||t.domElement?.parentNode;r&&!pe.value.parentNode&&(O.value?r.prepend(pe.value):r.appendChild(pe.value)),xe.value=p.value?s(`div`,{style:Oe.value},[s(`div`,{style:ke.value},[s(`div`,{key:oe.value?.uuid,class:ae.class,style:ae.style},l.default?.())])]):s(`div`,{key:oe.value?.uuid,style:Oe.value,class:ae.class},l.default?.()),w(xe.value,pe.value)}),N(()=>{h.value&&(pe.value.className=h.value)});let{onBeforeRender:Pe}=gl();return Pe(({invalidate:e})=>{let t=oe.value,n=de.activeCamera.value,r=ue.instance;if(!t||!n||!r)return;n.updateMatrixWorld(),t.updateWorldMatrix(!0,!1);let i=fe.width.value,a=fe.height.value,o=i*.5,s=a*.5,l=p.value?ye.value:ie.value(t,n,{width:i,height:a}),d=Math.abs(be.value-n.zoom)>g.value||Math.abs(ye.value[0]-l[0])>g.value||Math.abs(ye.value[1]-l[1])>g.value||Math.abs(ye.value[2]-l[2])>g.value,f=p.value||d,m=!0,h=Su(t,n);if(Ae.value){let e=!1;Array.isArray(P.value)?e=P.value:P.value!==`blending`&&(e=[F.value]),e&&(m=Cu(t,n,me,e)&&!h)}else m=!h;m!==Se.value&&(Se.value=m,pe.value.style.display=m?`block`:`none`,c(`onOcclude`,!m),f=!0);let v=Math.floor(ee.value[0]/2),y=P.value?Ae.value?[ee.value[0],v]:[v-1,0]:ee.value;if(pe.value.style.zIndex=`${Eu(t,n,y)}`,p.value){let e=n.projectionMatrix.elements[5]*s,r=ku(n.matrixWorldInverse),c=n instanceof Ce,l=c?`scale(${e})translate(${Du(-(n.right+n.left)/2)}px,${Du((n.top+n.bottom)/2)}px)`:`translateZ(${e}px)`,u=t.matrixWorld;if(T.value){ge.copy(t.matrixWorld);let e=n.matrixWorldInverse.clone().transpose();_e.setFromRotationMatrix(e),ge.makeRotationFromQuaternion(_e),t.getWorldPosition(he),ge.setPosition(he),ge.scale(t.scale),ge.elements[3]=ge.elements[7]=ge.elements[11]=0,ge.elements[15]=1,u=ge}let d=pe.value.style;if(d.width=`${i}px`,d.height=`${a}px`,d.perspective=c?``:`${e}px`,xe.value?.el){xe.value.el.style.transform=`${l}${r}translate(${o}px,${s}px)`;let e;Array.isArray(xe.value.children)&&(e=xe.value.children[0]),e?.el&&(e.el.style.transform=Au(u,1/((_.value||10)/400)))}}else{let e=_.value===void 0?1:Tu(t,n)*_.value;pe.value.style.transform=`translate3d(${l[0]}px,${l[1]}px,0) scale(${e})`}if(ye.value=[l[0],l[1],l[2]],be.value=n.zoom,!Ae.value&&se.value&&!we.value){let e=se.value;if(p.value){let t=xe.value?.children;if(Array.isArray(t)){let r=t[0]?.el;if(r){let t=n instanceof Ce;if(t&&u.value&&ae.scale)Array.isArray(ae.scale)?ae.scale instanceof I?e.scale.copy(ae.scale):e.scale.set(1/ae.scale[0],1/ae.scale[1],1/ae.scale[2]):e.scale.setScalar(1/ae.scale);else if(!t&&!u.value){let t=(_.value||10)/400;if(T.value)Ne.value.uniforms.uWidth.value=r.clientWidth*t,Ne.value.uniforms.uHeight.value=r.clientHeight*t,e.lookAt(n.position),e.scale.set(1,1,1);else{let n=r.clientWidth*t,i=r.clientHeight*t;e.scale.set(n,i,1)}}we.value=!0}}}else{let r=pe.value.children[0];if(r?.clientWidth&&r?.clientHeight){t.getWorldPosition(he);let o=1/wu(n,he,{width:i,height:a});Ne.value.uniforms.uWidth.value=r.clientWidth*o,Ne.value.uniforms.uHeight.value=r.clientHeight*o,e.scale.set(1,1,1),e.lookAt(n.position),we.value=!0}}}f&&e()}),v(()=>{ce?.dispose(),Ne.value?.dispose(),pe.value?.parentNode&&pe.value.parentNode.removeChild(pe.value)}),t({instance:oe,isVisible:Se,occlusionMesh:se}),(e,t)=>(y(),o(`TresGroup`,{ref_key:`groupRef`,ref:oe},[k(P)&&!Ae.value?(y(),o(`TresMesh`,{key:0,ref_key:`occlusionMeshRef`,ref:se,material:Ne.value,"cast-shadow":k(te),"receive-shadow":k(ne),geometry:k(u)||k(ce)},null,8,ju)):a(`v-if`,!0)],512))}});xl.ReflectorShader,new ce(16777215);
|
|
241
|
-
/*! *****************************************************************************
|
|
242
|
-
Copyright (c) Microsoft Corporation.
|
|
243
|
-
|
|
244
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
245
|
-
purpose with or without fee is hereby granted.
|
|
246
|
-
|
|
247
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
248
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
249
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
250
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
251
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
252
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
253
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
254
|
-
***************************************************************************** */
|
|
255
|
-
var Nu=function(e,t){return Nu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Nu(e,t)};function z(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Class extends value `+String(t)+` is not a constructor or null`);Nu(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Pu=`12px sans-serif`,Fu=20,Iu=100,Lu=`007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N`;function Ru(e){var t={};if(typeof JSON>`u`)return t;for(var n=0;n<e.length;n++){var r=String.fromCharCode(n+32);t[r]=(e.charCodeAt(n)-Fu)/Iu}return t}var zu=Ru(Lu),Bu={createCanvas:function(){return typeof document<`u`&&document.createElement(`canvas`)},measureText:(function(){var e,t;return function(n,r){if(!e){var i=Bu.createCanvas();e=i&&i.getContext(`2d`)}if(e)return t!==r&&(t=e.font=r||`12px sans-serif`),e.measureText(n);n||=``,r||=`12px sans-serif`;var a=/((?:\d+)?\.?\d*)px/.exec(r),o=a&&+a[1]||12,s=0;if(r.indexOf(`mono`)>=0)s=o*n.length;else for(var c=0;c<n.length;c++){var l=zu[n[c]];s+=l==null?o:l*o}return{width:s}}})(),loadImage:function(e,t,n){var r=new Image;return r.onload=t,r.onerror=n,r.src=e,r},getTime:function(){return Date.now?Date.now():+new Date}};function Vu(e){for(var t in Bu)Bu.hasOwnProperty(t)&&e[t]&&(Bu[t]=e[t])}var Hu=e({EPSILON:()=>Jd,HashMap:()=>Vd,RADIAN_TO_DEGREE:()=>qd,assert:()=>Nd,assignProps:()=>od,bind:()=>vd,clone:()=>B,concatArray:()=>Hd,createCanvas:()=>cd,createHashMap:()=>Y,createObject:()=>Ud,curry:()=>yd,defaults:()=>sd,disableUserSelect:()=>Wd,each:()=>H,eqNaN:()=>Od,extend:()=>V,filter:()=>md,find:()=>hd,guid:()=>nd,hasOwn:()=>Gd,indexOf:()=>ld,inherits:()=>ud,isArray:()=>W,isArrayLike:()=>fd,isBuiltInObject:()=>Sd,isDom:()=>wd,isFunction:()=>G,isGradientObject:()=>Td,isImagePatternObject:()=>Ed,isNumber:()=>xd,isObject:()=>q,isPrimitive:()=>Ld,isRegExp:()=>Dd,isString:()=>K,isStringSafe:()=>bd,isTypedArray:()=>Cd,keys:()=>gd,logError:()=>rd,map:()=>U,merge:()=>id,mergeAll:()=>ad,mixin:()=>dd,noop:()=>Kd,normalizeCssArray:()=>Md,reduce:()=>pd,retrieve:()=>kd,retrieve2:()=>J,retrieve3:()=>Ad,setAsPrimitive:()=>Id,slice:()=>jd,trim:()=>Pd}),Uu=pd([`Function`,`RegExp`,`Date`,`Error`,`CanvasGradient`,`CanvasPattern`,`Image`,`Canvas`],function(e,t){return e[`[object `+t+`]`]=!0,e},{}),Wu=pd([`Int8`,`Uint8`,`Uint8Clamped`,`Int16`,`Uint16`,`Int32`,`Uint32`,`Float32`,`Float64`],function(e,t){return e[`[object `+t+`Array]`]=!0,e},{}),Gu=Object.prototype.toString,Ku=Array.prototype,qu=Ku.forEach,Ju=Ku.filter,Yu=Ku.slice,Xu=Ku.map,Zu=function(){}.constructor,Qu=Zu?Zu.prototype:null,$u=`__proto__`,ed=2311,td=2**53-1;function nd(){return ed>=td&&(ed=0),ed++}function rd(){var e=[...arguments];typeof console<`u`&&console.error.apply(console,e)}function B(e){if(typeof e!=`object`||!e)return e;var t=e,n=Gu.call(e);if(n===`[object Array]`){if(!Ld(e)){t=[];for(var r=0,i=e.length;r<i;r++)t[r]=B(e[r])}}else if(Wu[n]){if(!Ld(e)){var a=e.constructor;if(a.from)t=a.from(e);else{t=new a(e.length);for(var r=0,i=e.length;r<i;r++)t[r]=e[r]}}}else if(!Uu[n]&&!Ld(e)&&!wd(e))for(var o in t={},e)e.hasOwnProperty(o)&&o!==$u&&(t[o]=B(e[o]));return t}function id(e,t,n){if(!q(t)||!q(e))return n?B(t):e;for(var r in t)if(t.hasOwnProperty(r)&&r!==$u){var i=e[r],a=t[r];q(a)&&q(i)&&!W(a)&&!W(i)&&!wd(a)&&!wd(i)&&!Sd(a)&&!Sd(i)&&!Ld(a)&&!Ld(i)?id(i,a,n):(n||!(r in e))&&(e[r]=B(t[r]))}return e}function ad(e,t){for(var n=e[0],r=1,i=e.length;r<i;r++)n=id(n,e[r],t);return n}function V(e,t){if(Object.assign)Object.assign(e,t);else for(var n in t)t.hasOwnProperty(n)&&n!==$u&&(e[n]=t[n]);return e}function od(e,t,n){e||={};for(var r=0;r<n.length;r++){var i=n[r];e[i]=t[i]}return e}function sd(e,t,n){for(var r=gd(t),i=0,a=r.length;i<a;i++){var o=r[i];(n?t[o]!=null:e[o]==null)&&(e[o]=t[o])}return e}var cd=Bu.createCanvas;function ld(e,t){if(e){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n}return-1}function ud(e,t){var n=e.prototype;function r(){}for(var i in r.prototype=t.prototype,e.prototype=new r,n)n.hasOwnProperty(i)&&(e.prototype[i]=n[i]);e.prototype.constructor=e,e.superClass=t}function dd(e,t,n){if(e=`prototype`in e?e.prototype:e,t=`prototype`in t?t.prototype:t,Object.getOwnPropertyNames)for(var r=Object.getOwnPropertyNames(t),i=0;i<r.length;i++){var a=r[i];a!==`constructor`&&(n?t[a]!=null:e[a]==null)&&(e[a]=t[a])}else sd(e,t,n)}function fd(e){return!e||typeof e==`string`?!1:typeof e.length==`number`}function H(e,t,n){if(e&&t)if(e.forEach&&e.forEach===qu)e.forEach(t,n);else if(e.length===+e.length)for(var r=0,i=e.length;r<i;r++)t.call(n,e[r],r,e);else for(var a in e)e.hasOwnProperty(a)&&t.call(n,e[a],a,e)}function U(e,t,n){if(!e)return[];if(!t)return jd(e);if(e.map&&e.map===Xu)return e.map(t,n);for(var r=[],i=0,a=e.length;i<a;i++)r.push(t.call(n,e[i],i,e));return r}function pd(e,t,n,r){if(e&&t){for(var i=0,a=e.length;i<a;i++)n=t.call(r,n,e[i],i,e);return n}}function md(e,t,n){if(!e)return[];if(!t)return jd(e);if(e.filter&&e.filter===Ju)return e.filter(t,n);for(var r=[],i=0,a=e.length;i<a;i++)t.call(n,e[i],i,e)&&r.push(e[i]);return r}function hd(e,t,n){if(e&&t){for(var r=0,i=e.length;r<i;r++)if(t.call(n,e[r],r,e))return e[r]}}function gd(e){if(!e)return[];if(Object.keys)return Object.keys(e);var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t}function _d(e,t){var n=[...arguments].slice(2);return function(){return e.apply(t,n.concat(Yu.call(arguments)))}}var vd=Qu&&G(Qu.bind)?Qu.call.bind(Qu.bind):_d;function yd(e){var t=[...arguments].slice(1);return function(){return e.apply(this,t.concat(Yu.call(arguments)))}}function W(e){return Array.isArray?Array.isArray(e):Gu.call(e)===`[object Array]`}function G(e){return typeof e==`function`}function K(e){return typeof e==`string`}function bd(e){return Gu.call(e)===`[object String]`}function xd(e){return typeof e==`number`}function q(e){var t=typeof e;return t===`function`||!!e&&t===`object`}function Sd(e){return!!Uu[Gu.call(e)]}function Cd(e){return!!Wu[Gu.call(e)]}function wd(e){return typeof e==`object`&&typeof e.nodeType==`number`&&typeof e.ownerDocument==`object`}function Td(e){return e.colorStops!=null}function Ed(e){return e.image!=null}function Dd(e){return Gu.call(e)===`[object RegExp]`}function Od(e){return e!==e}function kd(){for(var e=[...arguments],t=0,n=e.length;t<n;t++)if(e[t]!=null)return e[t]}function J(e,t){return e??t}function Ad(e,t,n){return e??t??n}function jd(e){var t=[...arguments].slice(1);return Yu.apply(e,t)}function Md(e){if(typeof e==`number`)return[e,e,e,e];var 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 Nd(e,t){if(!e)throw Error(t)}function Pd(e){return e==null?null:typeof e.trim==`function`?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,``)}var Fd=`__ec_primitive__`;function Id(e){e[Fd]=!0}function Ld(e){return e[Fd]}var Rd=function(){function e(){this.data={}}return e.prototype.delete=function(e){var t=this.has(e);return t&&delete this.data[e],t},e.prototype.has=function(e){return this.data.hasOwnProperty(e)},e.prototype.get=function(e){return this.data[e]},e.prototype.set=function(e,t){return this.data[e]=t,this},e.prototype.keys=function(){return gd(this.data)},e.prototype.forEach=function(e){var t=this.data;for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)},e}(),zd=typeof Map==`function`;function Bd(){return zd?new Map:new Rd}var Vd=function(){function e(t){var n=W(t);this.data=Bd();var r=this;t instanceof e?t.each(i):t&&H(t,i);function i(e,t){n?r.set(e,t):r.set(t,e)}}return e.prototype.hasKey=function(e){return this.data.has(e)},e.prototype.get=function(e){return this.data.get(e)},e.prototype.set=function(e,t){return this.data.set(e,t),t},e.prototype.each=function(e,t){this.data.forEach(function(n,r){e.call(t,n,r)})},e.prototype.keys=function(){var e=this.data.keys();return zd?Array.from(e):e},e.prototype.removeKey=function(e){this.data.delete(e)},e}();function Y(e){return new Vd(e)}function Hd(e,t){for(var n=new e.constructor(e.length+t.length),r=0;r<e.length;r++)n[r]=e[r];for(var i=e.length,r=0;r<t.length;r++)n[r+i]=t[r];return n}function Ud(e,t){var n;if(Object.create)n=Object.create(e);else{var r=function(){};r.prototype=e,n=new r}return t&&V(n,t),n}function Wd(e){var t=e.style;t.webkitUserSelect=`none`,t.userSelect=`none`,t.webkitTapHighlightColor=`rgba(0,0,0,0)`,t[`-webkit-touch-callout`]=`none`}function Gd(e,t){return e.hasOwnProperty(t)}function Kd(){}var qd=180/Math.PI,Jd=2**-52||2**-52,Yd=function(){function e(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return e}(),X=new(function(){function e(){this.browser=new Yd,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow=typeof window<`u`}return e}());typeof wx==`object`&&typeof wx.getSystemInfoSync==`function`?(X.wxa=!0,X.touchEventsSupported=!0):typeof document>`u`&&typeof self<`u`?X.worker=!0:!X.hasGlobalWindow||`Deno`in window||typeof navigator<`u`&&typeof navigator.userAgent==`string`&&navigator.userAgent.indexOf(`Node.js`)>-1?(X.node=!0,X.svgSupported=!0):Xd(navigator.userAgent,X);function Xd(e,t){var n=t.browser,r=e.match(/Firefox\/([\d.]+)/),i=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),a=e.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(e);if(r&&(n.firefox=!0,n.version=r[1]),i&&(n.ie=!0,n.version=i[1]),a&&(n.edge=!0,n.version=a[1],n.newEdge=+a[1].split(`.`)[0]>18),o&&(n.weChat=!0),t.svgSupported=typeof SVGRect<`u`,t.touchEventsSupported=`ontouchstart`in window&&!n.ie&&!n.edge,t.pointerEventsSupported=`onpointerdown`in window&&(n.edge||n.ie&&+n.version>=11),t.domSupported=typeof document<`u`){var s=document.documentElement.style;t.transform3dSupported=(n.ie&&`transition`in s||n.edge||`WebKitCSSMatrix`in window&&`m11`in new WebKitCSSMatrix||`MozPerspective`in s)&&!(`OTransition`in s),t.transformSupported=t.transform3dSupported||n.ie&&+n.version>=9}}var Zd=`.`,Qd=`___EC__COMPONENT__CONTAINER___`,$d=`___EC__EXTENDED_CLASS___`;function ef(e){var t={main:``,sub:``};if(e){var n=e.split(Zd);t.main=n[0]||``,t.sub=n[1]||``}return t}function tf(e){Nd(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(e),`componentType "`+e+`" illegal`)}function nf(e){return!!(e&&e[$d])}function rf(e,t){e.$constructor=e,e.extend=function(e){var t=this,n;return af(t)?n=function(e){z(t,e);function t(){return e.apply(this,arguments)||this}return t}(t):(n=function(){(e.$constructor||t).apply(this,arguments)},ud(n,this)),V(n.prototype,e),n[$d]=!0,n.extend=this.extend,n.superCall=lf,n.superApply=uf,n.superClass=t,n}}function af(e){return G(e)&&/^class\s/.test(Function.prototype.toString.call(e))}function of(e,t){e.extend=t.extend}var sf=Math.round(Math.random()*10);function cf(e){var t=[`__\0is_clz`,sf++].join(`_`);e.prototype[t]=!0,e.isInstance=function(e){return!!(e&&e[t])}}function lf(e,t){var n=[...arguments].slice(2);return this.superClass.prototype[t].apply(e,n)}function uf(e,t,n){return this.superClass.prototype[t].apply(e,n)}function df(e){var t={};e.registerClass=function(e){var r=e.type||e.prototype.type;if(r){tf(r),e.prototype.type=r;var i=ef(r);if(!i.sub)t[i.main]=e;else if(i.sub!==Qd){var a=n(i);a[i.sub]=e}}return e},e.getClass=function(e,n,r){var i=t[e];if(i&&i[Qd]&&(i=n?i[n]:null),r&&!i)throw Error(n?`Component `+e+`.`+(n||``)+` is used but not imported.`:e+`.type should be specified.`);return i},e.getClassesByMainType=function(e){var n=ef(e),r=[],i=t[n.main];return i&&i[Qd]?H(i,function(e,t){t!==Qd&&r.push(e)}):r.push(i),r},e.hasClass=function(e){return!!t[ef(e).main]},e.getAllClassMainTypes=function(){var e=[];return H(t,function(t,n){e.push(n)}),e},e.hasSubTypes=function(e){var n=t[ef(e).main];return n&&n[Qd]};function n(e){var n=t[e.main];return(!n||!n[Qd])&&(n=t[e.main]={},n[Qd]=!0),n}}function ff(e,t){for(var n=0;n<e.length;n++)e[n][1]||(e[n][1]=e[n][0]);return t||=!1,function(n,r,i){for(var a={},o=0;o<e.length;o++){var s=e[o][1];if(!(r&&ld(r,s)>=0||i&&ld(i,s)<0)){var c=n.getShallow(s,t);c!=null&&(a[e[o][0]]=c)}}return a}}var pf=ff([[`fill`,`color`],[`shadowBlur`],[`shadowOffsetX`],[`shadowOffsetY`],[`opacity`],[`shadowColor`]]),mf=function(){function e(){}return e.prototype.getAreaStyle=function(e,t){return pf(this,e,t)},e}(),hf=function(){function e(e){this.value=e}return e}(),gf=function(){function e(){this._len=0}return e.prototype.insert=function(e){var t=new hf(e);return this.insertEntry(t),t},e.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},e.prototype.remove=function(e){var t=e.prev,n=e.next;t?t.next=n:this.head=n,n?n.prev=t:this.tail=t,e.next=e.prev=null,this._len--},e.prototype.len=function(){return this._len},e.prototype.clear=function(){this.head=this.tail=null,this._len=0},e}(),_f=function(){function e(e){this._list=new gf,this._maxSize=10,this._map={},this._maxSize=e}return e.prototype.put=function(e,t){var n=this._list,r=this._map,i=null;if(r[e]==null){var a=n.len(),o=this._lastRemovedEntry;if(a>=this._maxSize&&a>0){var s=n.head;n.remove(s),delete r[s.key],i=s.value,this._lastRemovedEntry=s}o?o.value=t:o=new hf(t),o.key=e,n.insertEntry(o),r[e]=o}return i},e.prototype.get=function(e){var t=this._map[e],n=this._list;if(t!=null)return t!==n.tail&&(n.remove(t),n.insertEntry(t)),t.value},e.prototype.clear=function(){this._list.clear(),this._map={}},e.prototype.len=function(){return this._list.len()},e}(),vf=new _f(50);function yf(e){if(typeof e==`string`){var t=vf.get(e);return t&&t.image}else return e}function bf(e,t,n,r,i){if(!e)return t;if(typeof e==`string`){if(t&&t.__zrImageSrc===e||!n)return t;var a=vf.get(e),o={hostEl:n,cb:r,cbPayload:i};return a?(t=a.image,!Sf(t)&&a.pending.push(o)):(t=Bu.loadImage(e,xf,xf),t.__zrImageSrc=e,vf.put(e,t.__cachedImgObj={image:t,pending:[o]})),t}else return e}function xf(){var e=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t<e.pending.length;t++){var n=e.pending[t],r=n.cb;r&&r(this,n.cbPayload),n.hostEl.dirty()}e.pending.length=0}function Sf(e){return e&&e.width&&e.height}var Cf=e({clone:()=>Mf,copy:()=>Ef,create:()=>wf,identity:()=>Tf,invert:()=>jf,mul:()=>Df,rotate:()=>kf,scale:()=>Af,translate:()=>Of});function wf(){return[1,0,0,1,0,0]}function Tf(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function Ef(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 Df(e,t,n){var r=t[0]*n[0]+t[2]*n[1],i=t[1]*n[0]+t[3]*n[1],a=t[0]*n[2]+t[2]*n[3],o=t[1]*n[2]+t[3]*n[3],s=t[0]*n[4]+t[2]*n[5]+t[4],c=t[1]*n[4]+t[3]*n[5]+t[5];return e[0]=r,e[1]=i,e[2]=a,e[3]=o,e[4]=s,e[5]=c,e}function Of(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 kf(e,t,n,r){r===void 0&&(r=[0,0]);var i=t[0],a=t[2],o=t[4],s=t[1],c=t[3],l=t[5],u=Math.sin(n),d=Math.cos(n);return e[0]=i*d+s*u,e[1]=-i*u+s*d,e[2]=a*d+c*u,e[3]=-a*u+d*c,e[4]=d*(o-r[0])+u*(l-r[1])+r[0],e[5]=d*(l-r[1])-u*(o-r[0])+r[1],e}function Af(e,t,n){var r=n[0],i=n[1];return e[0]=t[0]*r,e[1]=t[1]*i,e[2]=t[2]*r,e[3]=t[3]*i,e[4]=t[4]*r,e[5]=t[5]*i,e}function jf(e,t){var n=t[0],r=t[2],i=t[4],a=t[1],o=t[3],s=t[5],c=n*o-a*r;return c?(c=1/c,e[0]=o*c,e[1]=-a*c,e[2]=-r*c,e[3]=n*c,e[4]=(r*s-o*i)*c,e[5]=(a*i-n*s)*c,e):null}function Mf(e){var t=wf();return Ef(t,e),t}var Nf=e({add:()=>Rf,applyTransform:()=>np,clone:()=>If,copy:()=>Ff,create:()=>Pf,dist:()=>Zf,distSquare:()=>$f,distance:()=>Xf,distanceSquare:()=>Qf,div:()=>Kf,dot:()=>qf,len:()=>Vf,lenSquare:()=>Uf,length:()=>Hf,lengthSquare:()=>Wf,lerp:()=>tp,max:()=>ip,min:()=>rp,mul:()=>Gf,negate:()=>ep,normalize:()=>Yf,scale:()=>Jf,scaleAndAdd:()=>zf,set:()=>Lf,sub:()=>Bf});function Pf(e,t){return e??=0,t??=0,[e,t]}function Ff(e,t){return e[0]=t[0],e[1]=t[1],e}function If(e){return[e[0],e[1]]}function Lf(e,t,n){return e[0]=t,e[1]=n,e}function Rf(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e}function zf(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e}function Bf(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e}function Vf(e){return Math.sqrt(Uf(e))}var Hf=Vf;function Uf(e){return e[0]*e[0]+e[1]*e[1]}var Wf=Uf;function Gf(e,t,n){return e[0]=t[0]*n[0],e[1]=t[1]*n[1],e}function Kf(e,t,n){return e[0]=t[0]/n[0],e[1]=t[1]/n[1],e}function qf(e,t){return e[0]*t[0]+e[1]*t[1]}function Jf(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e}function Yf(e,t){var n=Vf(t);return n===0?(e[0]=0,e[1]=0):(e[0]=t[0]/n,e[1]=t[1]/n),e}function Xf(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}var Zf=Xf;function Qf(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])}var $f=Qf;function ep(e,t){return e[0]=-t[0],e[1]=-t[1],e}function tp(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 np(e,t,n){var r=t[0],i=t[1];return e[0]=n[0]*r+n[2]*i+n[4],e[1]=n[1]*r+n[3]*i+n[5],e}function rp(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e}function ip(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e}var ap=function(){function e(e,t){this.x=e||0,this.y=t||0}return e.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.set=function(e,t){return this.x=e,this.y=t,this},e.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},e.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},e.prototype.scale=function(e){this.x*=e,this.y*=e},e.prototype.scaleAndAdd=function(e,t){this.x+=e.x*t,this.y+=e.y*t},e.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},e.prototype.dot=function(e){return this.x*e.x+this.y*e.y},e.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},e.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},e.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},e.prototype.distance=function(e){var t=this.x-e.x,n=this.y-e.y;return Math.sqrt(t*t+n*n)},e.prototype.distanceSquare=function(e){var t=this.x-e.x,n=this.y-e.y;return t*t+n*n},e.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},e.prototype.transform=function(e){if(e){var t=this.x,n=this.y;return this.x=e[0]*t+e[2]*n+e[4],this.y=e[1]*t+e[3]*n+e[5],this}},e.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},e.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},e.set=function(e,t,n){e.x=t,e.y=n},e.copy=function(e,t){e.x=t.x,e.y=t.y},e.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},e.lenSquare=function(e){return e.x*e.x+e.y*e.y},e.dot=function(e,t){return e.x*t.x+e.y*t.y},e.add=function(e,t,n){e.x=t.x+n.x,e.y=t.y+n.y},e.sub=function(e,t,n){e.x=t.x-n.x,e.y=t.y-n.y},e.scale=function(e,t,n){e.x=t.x*n,e.y=t.y*n},e.scaleAndAdd=function(e,t,n,r){e.x=t.x+n.x*r,e.y=t.y+n.y*r},e.lerp=function(e,t,n,r){var i=1-r;e.x=i*t.x+r*n.x,e.y=i*t.y+r*n.y},e}(),op=Math.min,sp=Math.max,cp=Math.abs,lp=[`x`,`y`],up=[`width`,`height`],dp=new ap,fp=new ap,pp=new ap,mp=new ap,hp=kp(),gp=hp.minTv,_p=hp.maxTv,vp=[0,0],Z=function(){function e(e,t,n,r){bp(this,e,t,n,r)}return e.set=function(e,t,n,r,i){return r<0&&(t+=r,r=-r),i<0&&(n+=i,i=-i),e.x=t,e.y=n,e.width=r,e.height=i,e},e.prototype.union=function(e){var t=op(e.x,this.x),n=op(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=sp(e.x+e.width,this.x+this.width)-t:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=sp(e.y+e.height,this.y+this.height)-n:this.height=e.height,this.x=t,this.y=n},e.prototype.applyTransform=function(t){e.applyTransform(this,this,t)},e.prototype.calculateTransform=function(e){return Sp(wf(),this,e)},e.prototype.intersect=function(t,n,r){return e.intersect(this,t,n,r)},e.intersect=function(t,n,r,i){r&&ap.set(r,0,0);var a=i&&i.outIntersectRect||null,o=i&&i.clamp;if(a&&(a.x=a.y=a.width=a.height=NaN),!t||!n)return!1;t instanceof e||(t=bp(Tp,t.x,t.y,t.width,t.height)),n instanceof e||(n=bp(Ep,n.x,n.y,n.width,n.height));var s=!!r;hp.reset(i,s);var c=hp.touchThreshold,l=t.x+c,u=t.x+t.width-c,d=t.y+c,f=t.y+t.height-c,p=n.x+c,m=n.x+n.width-c,h=n.y+c,g=n.y+n.height-c;if(l>u||d>f||p>m||h>g)return!1;var _=!(u<p||m<l||f<h||g<d);return(s||a)&&(vp[0]=1/0,vp[1]=0,Op(l,u,p,m,0,s,a,o),Op(d,f,h,g,1,s,a,o),s&&ap.copy(r,_?hp.useDir?hp.dirMinTv:gp:_p)),_},e.contain=function(e,t,n){return t>=e.x&&t<=e.x+e.width&&n>=e.y&&n<=e.y+e.height},e.prototype.contain=function(t,n){return e.contain(this,t,n)},e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.copy=function(e){xp(this,e)},e.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},e.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},e.prototype.isZero=function(){return this.width===0||this.height===0},e.create=function(t){return new e(t?t.x:0,t?t.y:0,t?t.width:0,t?t.height:0)},e.copy=function(e,t){return e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height,e},e.applyTransform=function(e,t,n){if(!n){e!==t&&xp(e,t);return}if(n[1]<1e-5&&n[1]>-1e-5&&n[2]<1e-5&&n[2]>-1e-5){var 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}dp.x=pp.x=t.x,dp.y=mp.y=t.y,fp.x=mp.x=t.x+t.width,fp.y=pp.y=t.y+t.height,dp.transform(n),mp.transform(n),fp.transform(n),pp.transform(n),e.x=op(dp.x,fp.x,pp.x,mp.x),e.y=op(dp.y,fp.y,pp.y,mp.y);var s=sp(dp.x,fp.x,pp.x,mp.x),c=sp(dp.y,fp.y,pp.y,mp.y);e.width=s-e.x,e.height=c-e.y},e.calculateTransform=function(e,t,n){var r=n.width/t.width,i=n.height/t.height;return e=Tf(e||[]),Of(e,e,Lf(Dp,-t.x,-t.y)),Af(e,e,Lf(Dp,r,i)),Of(e,e,Lf(Dp,n.x,n.y)),e},e}(),yp=Z.create,bp=Z.set,xp=Z.copy,Sp=Z.calculateTransform,Cp=Z.applyTransform,wp=Z.contain,Tp=new Z(0,0,0,0),Ep=new Z(0,0,0,0),Dp=[];function Op(e,t,n,r,i,a,o,s){var c=cp(t-n),l=cp(r-e),u=op(c,l),d=lp[i],f=lp[1-i],p=up[i];t<n||r<e?c<l?(a&&(_p[d]=-c),s&&(o[d]=t,o[p]=0)):(a&&(_p[d]=l),s&&(o[d]=e,o[p]=0)):(o&&(o[d]=sp(e,n),o[p]=op(t,r)-o[d]),a&&(u<vp[0]||hp.useDir)&&(vp[0]=op(u,vp[0]),(c<l||!hp.bidirectional)&&(gp[d]=c,gp[f]=0,hp.useDir&&hp.calcDirMTV()),(c>=l||!hp.bidirectional)&&(gp[d]=-l,gp[f]=0,hp.useDir&&hp.calcDirMTV())))}function kp(){var e=0,t=new ap,n=new ap,r={minTv:new ap,maxTv:new ap,useDir:!1,dirMinTv:new ap,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(i,a){r.touchThreshold=0,i&&i.touchThreshold!=null&&(r.touchThreshold=sp(0,i.touchThreshold)),r.negativeSize=!1,a&&(r.minTv.set(1/0,1/0),r.maxTv.set(0,0),r.useDir=!1,i&&i.direction!=null&&(r.useDir=!0,r.dirMinTv.copy(r.minTv),n.copy(r.minTv),e=i.direction,r.bidirectional=i.bidirectional==null||!!i.bidirectional,r.bidirectional||t.set(Math.cos(e),Math.sin(e))))},calcDirMTV:function(){var a=r.minTv,o=r.dirMinTv,s=a.y*a.y+a.x*a.x,c=Math.sin(e),l=Math.cos(e),u=c*a.y+l*a.x;if(i(u)){i(a.x)&&i(a.y)&&o.set(0,0);return}if(n.x=s*l/u,n.y=s*c/u,i(n.x)&&i(n.y)){o.set(0,0);return}(r.bidirectional||t.dot(n)>0)&&n.len()<o.len()&&o.copy(n)}};function i(e){return cp(e)<1e-10}return r}function Ap(e){jp||=new _f(100),e||=`12px sans-serif`;var t=jp.get(e);return t||(t={font:e,strWidthCache:new _f(500),asciiWidthMap:null,asciiWidthMapTried:!1,stWideCharWidth:Bu.measureText(`国`,e).width,asciiCharWidth:Bu.measureText(`a`,e).width},jp.put(e,t)),t}var jp;function Mp(e){if(!(Np>=Pp)){e||=`12px sans-serif`;for(var t=[],n=+new Date,r=0;r<=127;r++)t[r]=Bu.measureText(String.fromCharCode(r),e).width;var i=+new Date-n;return i>16?Np=Pp:i>2&&Np++,t}}var Np=0,Pp=5;function Fp(e,t){return e.asciiWidthMapTried||=(e.asciiWidthMap=Mp(e.font),!0),0<=t&&t<=127?e.asciiWidthMap==null?e.asciiCharWidth:e.asciiWidthMap[t]:e.stWideCharWidth}function Ip(e,t){var n=e.strWidthCache,r=n.get(t);return r??(r=Bu.measureText(t,e.font).width,n.put(t,r)),r}function Lp(e,t,n,r){var i=Ip(Ap(t),e),a=Vp(t);return new Z(zp(0,i,n),Bp(0,a,r),i,a)}function Rp(e,t,n,r){var i=((e||``)+``).split(`
|
|
256
|
-
`);if(i.length===1)return Lp(i[0],t,n,r);for(var a=new Z(0,0,0,0),o=0;o<i.length;o++){var s=Lp(i[o],t,n,r);o===0?a.copy(s):a.union(s)}return a}function zp(e,t,n,r){return n===`right`?r?e+=t:e-=t:n===`center`&&(r?e+=t/2:e-=t/2),e}function Bp(e,t,n,r){return n===`middle`?r?e+=t/2:e-=t/2:n===`bottom`&&(r?e+=t:e-=t),e}function Vp(e){return Ap(e).stWideCharWidth}function Hp(e,t){return typeof e==`string`?e.lastIndexOf(`%`)>=0?parseFloat(e)/100*t:parseFloat(e):e}function Up(e,t,n){var r=t.position||`inside`,i=t.distance==null?5:t.distance,a=n.height,o=n.width,s=a/2,c=n.x,l=n.y,u=`left`,d=`top`;if(r instanceof Array)c+=Hp(r[0],n.width),l+=Hp(r[1],n.height),u=null,d=null;else switch(r){case`left`:c-=i,l+=s,u=`right`,d=`middle`;break;case`right`:c+=i+o,l+=s,d=`middle`;break;case`top`:c+=o/2,l-=i,u=`center`,d=`bottom`;break;case`bottom`:c+=o/2,l+=a+i,u=`center`;break;case`inside`:c+=o/2,l+=s,u=`center`,d=`middle`;break;case`insideLeft`:c+=i,l+=s,d=`middle`;break;case`insideRight`:c+=o-i,l+=s,u=`right`,d=`middle`;break;case`insideTop`:c+=o/2,l+=i,u=`center`;break;case`insideBottom`:c+=o/2,l+=a-i,u=`center`,d=`bottom`;break;case`insideTopLeft`:c+=i,l+=i;break;case`insideTopRight`:c+=o-i,l+=i,u=`right`;break;case`insideBottomLeft`:c+=i,l+=a-i,d=`bottom`;break;case`insideBottomRight`:c+=o-i,l+=a-i,u=`right`,d=`bottom`;break}return e||={},e.x=c,e.y=l,e.align=u,e.verticalAlign=d,e}var Wp=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function Gp(e,t,n,r,i){var a={};return Kp(a,e,t,n,r,i),a.text}function Kp(e,t,n,r,i,a){if(!n){e.text=``,e.isTruncated=!1;return}var o=(t+``).split(`
|
|
257
|
-
`);a=qp(n,r,i,a);for(var s=!1,c={},l=0,u=o.length;l<u;l++)Jp(c,o[l],a),o[l]=c.textLine,s||=c.isTruncated;e.text=o.join(`
|
|
258
|
-
`),e.isTruncated=s}function qp(e,t,n,r){r||={};var i=V({},r);n=J(n,`...`),i.maxIterations=J(r.maxIterations,2);var a=i.minChar=J(r.minChar,0),o=i.fontMeasureInfo=Ap(t),s=o.asciiCharWidth;i.placeholder=J(r.placeholder,``);for(var c=e=Math.max(0,e-1),l=0;l<a&&c>=s;l++)c-=s;var u=Ip(o,n);return u>c&&(n=``,u=0),c=e-u,i.ellipsis=n,i.ellipsisWidth=u,i.contentWidth=c,i.containerWidth=e,i}function Jp(e,t,n){var r=n.containerWidth,i=n.contentWidth,a=n.fontMeasureInfo;if(!r){e.textLine=``,e.isTruncated=!1;return}var o=Ip(a,t);if(o<=r){e.textLine=t,e.isTruncated=!1;return}for(var s=0;;s++){if(o<=i||s>=n.maxIterations){t+=n.ellipsis;break}var c=s===0?Yp(t,i,a):o>0?Math.floor(t.length*i/o):0;t=t.substr(0,c),o=Ip(a,t)}t===``&&(t=n.placeholder),e.textLine=t,e.isTruncated=!0}function Yp(e,t,n){for(var r=0,i=0,a=e.length;i<a&&r<t;i++)r+=Fp(n,e.charCodeAt(i));return i}function Xp(e,t,n,r){var i=lm(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=Vp(l),f=J(t.lineHeight,d),p=t.lineOverflow===`truncate`,m=!1,h=t.width;h==null&&n!=null&&(h=n-s);var g=t.height;g==null&&r!=null&&(g=r-c);var _=h!=null&&(a===`break`||a===`breakAll`)?i?am(i,t.font,h,a===`breakAll`,0).lines:[]:i?i.split(`
|
|
259
|
-
`):[],v=_.length*f;if(g??=v,v>g&&p){var y=Math.floor(g/f);m||=_.length>y,_=_.slice(0,y),v=_.length*f}if(i&&u&&h!=null)for(var b=qp(h,l,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),x={},S=0;S<_.length;S++)Jp(x,_[S],b),_[S]=x.textLine,m||=x.isTruncated;for(var C=g,w=0,T=Ap(l),S=0;S<_.length;S++)w=Math.max(Ip(T,_[S]),w);h??=w;var E=h;return C+=c,E+=s,{lines:_,height:g,outerWidth:E,outerHeight:C,lineHeight:f,calculatedLineHeight:d,contentWidth:w,contentHeight:v,width:h,isTruncated:m}}var Zp=function(){function e(){}return e}(),Qp=function(){function e(e){this.tokens=[],e&&(this.tokens=e)}return e}(),$p=function(){function e(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[],this.isTruncated=!1}return e}();function em(e,t,n,r,i){var a=new $p,o=lm(e);if(!o)return a;var s=t.padding,c=s?s[1]+s[3]:0,l=s?s[0]+s[2]:0,u=t.width;u==null&&n!=null&&(u=n-c);var d=t.height;d==null&&r!=null&&(d=r-l);for(var f=t.overflow,p=(f===`break`||f===`breakAll`)&&u!=null?{width:u,accumWidth:0,breakAll:f===`breakAll`}:null,m=Wp.lastIndex=0,h;(h=Wp.exec(o))!=null;){var g=h.index;g>m&&tm(a,o.substring(m,g),t,p),tm(a,h[2],t,p,h[1]),m=Wp.lastIndex}m<o.length&&tm(a,o.substring(m,o.length),t,p);var _=[],v=0,y=0,b=f===`truncate`,x=t.lineOverflow===`truncate`,S={};function C(e,t,n){e.width=t,e.lineHeight=n,v+=n,y=Math.max(y,t)}outer:for(var w=0;w<a.lines.length;w++){for(var T=a.lines[w],E=0,D=0,O=0;O<T.tokens.length;O++){var k=T.tokens[O],A=k.styleName&&t.rich[k.styleName]||{},j=k.textPadding=A.padding,M=j?j[1]+j[3]:0,N=k.font=A.font||t.font;k.contentHeight=Vp(N);var P=J(A.height,k.contentHeight);if(k.innerHeight=P,j&&(P+=j[0]+j[2]),k.height=P,k.lineHeight=Ad(A.lineHeight,t.lineHeight,P),k.align=A&&A.align||i,k.verticalAlign=A&&A.verticalAlign||`middle`,x&&d!=null&&v+k.lineHeight>d){var ee=a.lines.length;O>0?(T.tokens=T.tokens.slice(0,O),C(T,D,E),a.lines=a.lines.slice(0,w+1)):a.lines=a.lines.slice(0,w),a.isTruncated=a.isTruncated||a.lines.length<ee;break outer}var te=A.width,ne=te==null||te===`auto`;if(typeof te==`string`&&te.charAt(te.length-1)===`%`)k.percentWidth=te,_.push(k),k.contentWidth=Ip(Ap(N),k.text);else{if(ne){var re=A.backgroundColor,ie=re&&re.image;ie&&(ie=yf(ie),Sf(ie)&&(k.width=Math.max(k.width,ie.width*P/ie.height)))}var ae=b&&u!=null?u-D:null;ae!=null&&ae<k.width?!ne||ae<M?(k.text=``,k.width=k.contentWidth=0):(Kp(S,k.text,ae-M,N,t.ellipsis,{minChar:t.truncateMinChar}),k.text=S.text,a.isTruncated=a.isTruncated||S.isTruncated,k.width=k.contentWidth=Ip(Ap(N),k.text)):k.contentWidth=Ip(Ap(N),k.text)}k.width+=M,D+=k.width,A&&(E=Math.max(E,k.lineHeight))}C(T,D,E)}a.outerWidth=a.width=J(u,y),a.outerHeight=a.height=J(d,v),a.contentHeight=v,a.contentWidth=y,a.outerWidth+=c,a.outerHeight+=l;for(var w=0;w<_.length;w++){var k=_[w],oe=k.percentWidth;k.width=parseInt(oe,10)/100*a.width}return a}function tm(e,t,n,r,i){var a=t===``,o=i&&n.rich[i]||{},s=e.lines,c=o.font||n.font,l=!1,u,d;if(r){var f=o.padding,p=f?f[1]+f[3]:0;if(o.width!=null&&o.width!==`auto`){var m=Hp(o.width,r.width)+p;s.length>0&&m+r.accumWidth>r.width&&(u=t.split(`
|
|
260
|
-
`),l=!0),r.accumWidth=m}else{var h=am(t,c,r.width,r.breakAll,r.accumWidth);r.accumWidth=h.accumWidth+p,d=h.linesWidths,u=h.lines}}u||=t.split(`
|
|
261
|
-
`);for(var g=Ap(c),_=0;_<u.length;_++){var v=u[_],y=new Zp;if(y.styleName=i,y.text=v,y.isLineHolder=!v&&!a,typeof o.width==`number`?y.width=o.width:y.width=d?d[_]:Ip(g,v),!_&&!l){var b=(s[s.length-1]||(s[0]=new Qp)).tokens,x=b.length;x===1&&b[0].isLineHolder?b[0]=y:(v||!x||a)&&b.push(y)}else s.push(new Qp([y]))}}function nm(e){var t=e.charCodeAt(0);return t>=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}var rm=pd(`,&?/;] `.split(``),function(e,t){return e[t]=!0,e},{});function im(e){return nm(e)?!!rm[e]:!0}function am(e,t,n,r,i){for(var a=[],o=[],s=``,c=``,l=0,u=0,d=Ap(t),f=0;f<e.length;f++){var p=e.charAt(f);if(p===`
|
|
262
|
-
`){c&&(s+=c,u+=l),a.push(s),o.push(u),s=``,c=``,l=0,u=0;continue}var m=Fp(d,p.charCodeAt(0)),h=r?!1:!im(p);if(a.length?u+m>n:i+u+m>n){u?(s||c)&&(h?(s||(s=c,c=``,l=0,u=l),a.push(s),o.push(u-l),c+=p,l+=m,s=``,u=l):(c&&(s+=c,c=``,l=0),a.push(s),o.push(u),s=p,u=m)):h?(a.push(c),o.push(l),c=p,l=m):(a.push(p),o.push(m));continue}u+=m,h?(c+=p,l+=m):(c&&(s+=c,c=``,l=0),s+=p)}return c&&(s+=c),s&&(a.push(s),o.push(u)),a.length===1&&(u+=i),{accumWidth:u,lines:a,linesWidths:o}}function om(e,t,n,r,i,a){if(e.baseX=n,e.baseY=r,e.outerWidth=e.outerHeight=null,t){var o=t.width*2,s=t.height*2;Z.set(sm,zp(n,o,i),Bp(r,s,a),o,s),Z.intersect(t,sm,null,cm);var c=cm.outIntersectRect;e.outerWidth=c.width,e.outerHeight=c.height,e.baseX=zp(c.x,c.width,i,!0),e.baseY=Bp(c.y,c.height,a,!0)}}var sm=new Z(0,0,0,0),cm={outIntersectRect:{},clamp:!0};function lm(e){return e==null?e=``:e+=``}function um(e){var t=lm(e.text),n=e.font;return dm(e,Ip(Ap(n),t),Vp(n),null)}function dm(e,t,n,r){var i=new Z(zp(e.x||0,t,e.textAlign),Bp(e.y||0,n,e.textBaseline),t,n),a=r??(fm(e)?e.lineWidth:0);return a>0&&(i.x-=a/2,i.y-=a/2,i.width+=a,i.height+=a),i}function fm(e){var t=e.stroke;return t!=null&&t!==`none`&&e.lineWidth>0}var pm=Tf,mm=5e-5;function hm(e){return e>mm||e<-mm}var gm=[],_m=[],vm=wf(),ym=Math.abs,bm=function(){function e(){}return e.prototype.getLocalTransform=function(e){return xm(this,e)},e.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},e.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},e.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},e.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},e.prototype.needLocalTransform=function(){return hm(this.rotation)||hm(this.x)||hm(this.y)||hm(this.scaleX-1)||hm(this.scaleY-1)||hm(this.skewX)||hm(this.skewY)},e.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),n=this.transform;if(!(t||e)){n&&(pm(n),this.invTransform=null);return}n||=wf(),t?this.getLocalTransform(n):pm(n),e&&(t?Df(n,e,n):Ef(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n),this.invTransform=this.invTransform||wf(),jf(this.invTransform,n)},e.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(t!=null&&t!==1){this.getGlobalScale(gm);var n=gm[0]<0?-1:1,r=gm[1]<0?-1:1,i=((gm[0]-n)*t+n)/gm[0]||0,a=((gm[1]-r)*t+r)/gm[1]||0;e[0]*=i,e[1]*=i,e[2]*=a,e[3]*=a}},e.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},e.prototype.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],r=Math.atan2(e[1],e[0]),i=Math.PI/2+r-Math.atan2(e[3],e[2]);n=Math.sqrt(n)*Math.cos(i),t=Math.sqrt(t),this.skewX=i,this.skewY=0,this.rotation=-r,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=n,this.originX=0,this.originY=0}},e.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||wf(),Df(_m,e.invTransform,t),t=_m);var n=this.originX,r=this.originY;(n||r)&&(vm[4]=n,vm[5]=r,Df(_m,t,vm),_m[4]-=n,_m[5]-=r,t=_m),this.setLocalTransform(t)}},e.prototype.getGlobalScale=function(e){var t=this.transform;return e||=[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},e.prototype.transformCoordToLocal=function(e,t){var n=[e,t],r=this.invTransform;return r&&np(n,n,r),n},e.prototype.transformCoordToGlobal=function(e,t){var n=[e,t],r=this.transform;return r&&np(n,n,r),n},e.prototype.getLineScale=function(){var e=this.transform;return e&&ym(e[0]-1)>1e-10&&ym(e[3]-1)>1e-10?Math.sqrt(ym(e[0]*e[3]-e[2]*e[1])):1},e.prototype.copyTransform=function(e){wm(this,e)},e.getLocalTransform=function(e,t){t||=[];var n=e.originX||0,r=e.originY||0,i=e.scaleX,a=e.scaleY,o=e.anchorX,s=e.anchorY,c=e.rotation||0,l=e.x,u=e.y,d=e.skewX?Math.tan(e.skewX):0,f=e.skewY?Math.tan(-e.skewY):0;if(n||r||o||s){var p=n+o,m=r+s;t[4]=-p*i-d*m*a,t[5]=-m*a-f*p*i}else t[4]=t[5]=0;return t[0]=i,t[3]=a,t[1]=f*i,t[2]=d*a,c&&kf(t,t,c),t[4]+=n+l,t[5]+=r+u,t},e.initDefaultProps=(function(){var t=e.prototype;t.scaleX=t.scaleY=t.globalScaleRatio=1,t.x=t.y=t.originX=t.originY=t.skewX=t.skewY=t.rotation=t.anchorX=t.anchorY=0})(),e}(),xm=bm.getLocalTransform;function Sm(){return new bm}var Cm=[`x`,`y`,`originX`,`originY`,`anchorX`,`anchorY`,`rotation`,`scaleX`,`scaleY`,`skewX`,`skewY`];function wm(e,t){return od(e,t,Cm)}var Tm={linear:function(e){return e},quadraticIn:function(e){return e*e},quadraticOut:function(e){return e*(2-e)},quadraticInOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},cubicIn:function(e){return e*e*e},cubicOut:function(e){return--e*e*e+1},cubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},quarticIn:function(e){return e*e*e*e},quarticOut:function(e){return 1- --e*e*e*e},quarticInOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},quinticIn:function(e){return e*e*e*e*e},quinticOut:function(e){return--e*e*e*e*e+1},quinticInOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},sinusoidalIn:function(e){return 1-Math.cos(e*Math.PI/2)},sinusoidalOut:function(e){return Math.sin(e*Math.PI/2)},sinusoidalInOut:function(e){return .5*(1-Math.cos(Math.PI*e))},exponentialIn:function(e){return e===0?0:1024**(e-1)},exponentialOut:function(e){return e===1?1:1-2**(-10*e)},exponentialInOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*1024**(e-1):.5*(-(2**(-10*(e-1)))+2)},circularIn:function(e){return 1-Math.sqrt(1-e*e)},circularOut:function(e){return Math.sqrt(1- --e*e)},circularInOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},elasticIn:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),-(n*2**(10*--e)*Math.sin((e-t)*(2*Math.PI)/r)))},elasticOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),n*2**(-10*e)*Math.sin((e-t)*(2*Math.PI)/r)+1)},elasticInOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),(e*=2)<1?-.5*(n*2**(10*--e)*Math.sin((e-t)*(2*Math.PI)/r)):n*2**(-10*--e)*Math.sin((e-t)*(2*Math.PI)/r)*.5+1)},backIn:function(e){var t=1.70158;return e*e*((t+1)*e-t)},backOut:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},backInOut:function(e){var t=1.70158*1.525;return(e*=2)<1?.5*(e*e*((t+1)*e-t)):.5*((e-=2)*e*((t+1)*e+t)+2)},bounceIn:function(e){return 1-Tm.bounceOut(1-e)},bounceOut:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},bounceInOut:function(e){return e<.5?Tm.bounceIn(e*2)*.5:Tm.bounceOut(e*2-1)*.5+.5}},Em=Math.pow,Dm=Math.sqrt,Om=1e-8,km=1e-4,Am=Dm(3),jm=1/3,Mm=Pf(),Nm=Pf(),Pm=Pf();function Fm(e){return e>-Om&&e<Om}function Im(e){return e>Om||e<-Om}function Lm(e,t,n,r,i){var a=1-i;return a*a*(a*e+3*i*t)+i*i*(i*r+3*a*n)}function Rm(e,t,n,r,i){var a=1-i;return 3*(((t-e)*a+2*(n-t)*i)*a+(r-n)*i*i)}function zm(e,t,n,r,i,a){var o=r+3*(t-n)-e,s=3*(n-t*2+e),c=3*(t-e),l=e-i,u=s*s-3*o*c,d=s*c-9*o*l,f=c*c-3*s*l,p=0;if(Fm(u)&&Fm(d))if(Fm(s))a[0]=0;else{var m=-c/s;m>=0&&m<=1&&(a[p++]=m)}else{var h=d*d-4*u*f;if(Fm(h)){var g=d/u,m=-s/o+g,_=-g/2;m>=0&&m<=1&&(a[p++]=m),_>=0&&_<=1&&(a[p++]=_)}else if(h>0){var v=Dm(h),y=u*s+1.5*o*(-d+v),b=u*s+1.5*o*(-d-v);y=y<0?-Em(-y,jm):Em(y,jm),b=b<0?-Em(-b,jm):Em(b,jm);var m=(-s-(y+b))/(3*o);m>=0&&m<=1&&(a[p++]=m)}else{var x=(2*u*s-3*o*d)/(2*Dm(u*u*u)),S=Math.acos(x)/3,C=Dm(u),w=Math.cos(S),m=(-s-2*C*w)/(3*o),_=(-s+C*(w+Am*Math.sin(S)))/(3*o),T=(-s+C*(w-Am*Math.sin(S)))/(3*o);m>=0&&m<=1&&(a[p++]=m),_>=0&&_<=1&&(a[p++]=_),T>=0&&T<=1&&(a[p++]=T)}}return p}function Bm(e,t,n,r,i){var a=6*n-12*t+6*e,o=9*t+3*r-3*e-9*n,s=3*t-3*e,c=0;if(Fm(o)){if(Im(a)){var l=-s/a;l>=0&&l<=1&&(i[c++]=l)}}else{var u=a*a-4*o*s;if(Fm(u))i[0]=-a/(2*o);else if(u>0){var d=Dm(u),l=(-a+d)/(2*o),f=(-a-d)/(2*o);l>=0&&l<=1&&(i[c++]=l),f>=0&&f<=1&&(i[c++]=f)}}return c}function Vm(e,t,n,r,i,a){var o=(t-e)*i+e,s=(n-t)*i+t,c=(r-n)*i+n,l=(s-o)*i+o,u=(c-s)*i+s,d=(u-l)*i+l;a[0]=e,a[1]=o,a[2]=l,a[3]=d,a[4]=d,a[5]=u,a[6]=c,a[7]=r}function Hm(e,t,n,r,i,a,o,s,c,l,u){var d,f=.005,p=1/0,m,h,g,_;Mm[0]=c,Mm[1]=l;for(var v=0;v<1;v+=.05)Nm[0]=Lm(e,n,i,o,v),Nm[1]=Lm(t,r,a,s,v),g=$f(Mm,Nm),g<p&&(d=v,p=g);p=1/0;for(var y=0;y<32&&!(f<km);y++)m=d-f,h=d+f,Nm[0]=Lm(e,n,i,o,m),Nm[1]=Lm(t,r,a,s,m),g=$f(Nm,Mm),m>=0&&g<p?(d=m,p=g):(Pm[0]=Lm(e,n,i,o,h),Pm[1]=Lm(t,r,a,s,h),_=$f(Pm,Mm),h<=1&&_<p?(d=h,p=_):f*=.5);return u&&(u[0]=Lm(e,n,i,o,d),u[1]=Lm(t,r,a,s,d)),Dm(p)}function Um(e,t,n,r,i,a,o,s,c){for(var l=e,u=t,d=0,f=1/c,p=1;p<=c;p++){var m=p*f,h=Lm(e,n,i,o,m),g=Lm(t,r,a,s,m),_=h-l,v=g-u;d+=Math.sqrt(_*_+v*v),l=h,u=g}return d}function Wm(e,t,n,r){var i=1-r;return i*(i*e+2*r*t)+r*r*n}function Gm(e,t,n,r){return 2*((1-r)*(t-e)+r*(n-t))}function Km(e,t,n,r,i){var a=e-2*t+n,o=2*(t-e),s=e-r,c=0;if(Fm(a)){if(Im(o)){var l=-s/o;l>=0&&l<=1&&(i[c++]=l)}}else{var u=o*o-4*a*s;if(Fm(u)){var l=-o/(2*a);l>=0&&l<=1&&(i[c++]=l)}else if(u>0){var d=Dm(u),l=(-o+d)/(2*a),f=(-o-d)/(2*a);l>=0&&l<=1&&(i[c++]=l),f>=0&&f<=1&&(i[c++]=f)}}return c}function qm(e,t,n){var r=e+n-2*t;return r===0?.5:(e-t)/r}function Jm(e,t,n,r,i){var a=(t-e)*r+e,o=(n-t)*r+t,s=(o-a)*r+a;i[0]=e,i[1]=a,i[2]=s,i[3]=s,i[4]=o,i[5]=n}function Ym(e,t,n,r,i,a,o,s,c){var l,u=.005,d=1/0;Mm[0]=o,Mm[1]=s;for(var f=0;f<1;f+=.05){Nm[0]=Wm(e,n,i,f),Nm[1]=Wm(t,r,a,f);var p=$f(Mm,Nm);p<d&&(l=f,d=p)}d=1/0;for(var m=0;m<32&&!(u<km);m++){var h=l-u,g=l+u;Nm[0]=Wm(e,n,i,h),Nm[1]=Wm(t,r,a,h);var p=$f(Nm,Mm);if(h>=0&&p<d)l=h,d=p;else{Pm[0]=Wm(e,n,i,g),Pm[1]=Wm(t,r,a,g);var _=$f(Pm,Mm);g<=1&&_<d?(l=g,d=_):u*=.5}}return c&&(c[0]=Wm(e,n,i,l),c[1]=Wm(t,r,a,l)),Dm(d)}function Xm(e,t,n,r,i,a,o){for(var s=e,c=t,l=0,u=1/o,d=1;d<=o;d++){var f=d*u,p=Wm(e,n,i,f),m=Wm(t,r,a,f),h=p-s,g=m-c;l+=Math.sqrt(h*h+g*g),s=p,c=m}return l}var Zm=/cubic-bezier\(([0-9,\.e ]+)\)/;function Qm(e){var t=e&&Zm.exec(e);if(t){var n=t[1].split(`,`),r=+Pd(n[0]),i=+Pd(n[1]),a=+Pd(n[2]),o=+Pd(n[3]);if(isNaN(r+i+a+o))return;var s=[];return function(e){return e<=0?0:e>=1?1:zm(0,r,a,1,e,s)&&Lm(0,i,o,1,s[0])}}}var $m=function(){function e(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||Kd,this.ondestroy=e.ondestroy||Kd,this.onrestart=e.onrestart||Kd,e.easing&&this.setEasing(e.easing)}return e.prototype.step=function(e,t){if(this._inited||=(this._startTime=e+this._delay,!0),this._paused){this._pausedTime+=t;return}var n=this._life,r=e-this._startTime-this._pausedTime,i=r/n;i<0&&(i=0),i=Math.min(i,1);var a=this.easingFunc,o=a?a(i):i;if(this.onframe(o),i===1)if(this.loop){var s=r%n;this._startTime=e-s,this._pausedTime=0,this.onrestart()}else return!0;return!1},e.prototype.pause=function(){this._paused=!0},e.prototype.resume=function(){this._paused=!1},e.prototype.setEasing=function(e){this.easing=e,this.easingFunc=G(e)?e:Tm[e]||Qm(e)},e}(),eh=e({fastLerp:()=>yh,fastMapToColor:()=>bh,lerp:()=>xh,lift:()=>_h,liftColor:()=>kh,lum:()=>Eh,mapToColor:()=>Sh,modifyAlpha:()=>wh,modifyHSL:()=>Ch,parse:()=>mh,parseCssFloat:()=>oh,parseCssInt:()=>ah,random:()=>Dh,stringify:()=>Th,toHex:()=>vh}),th={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 nh(e){return e=Math.round(e),e<0?0:e>255?255:e}function rh(e){return e=Math.round(e),e<0?0:e>360?360:e}function ih(e){return e<0?0:e>1?1:e}function ah(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?nh(parseFloat(t)/100*255):nh(parseInt(t,10))}function oh(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?ih(parseFloat(t)/100):ih(parseFloat(t))}function sh(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 ch(e,t,n){return e+(t-e)*n}function lh(e,t,n,r,i){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e}function uh(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var dh=new _f(20),fh=null;function ph(e,t){fh&&uh(fh,t),fh=dh.put(e,fh||t.slice())}function mh(e,t){if(e){t||=[];var n=dh.get(e);if(n)return uh(t,n);e+=``;var r=e.replace(/ /g,``).toLowerCase();if(r in th)return uh(t,th[r]),ph(e,t),t;var i=r.length;if(r.charAt(0)===`#`){if(i===4||i===5){var a=parseInt(r.slice(1,4),16);if(!(a>=0&&a<=4095)){lh(t,0,0,0,1);return}return lh(t,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,i===5?parseInt(r.slice(4),16)/15:1),ph(e,t),t}else if(i===7||i===9){var a=parseInt(r.slice(1,7),16);if(!(a>=0&&a<=16777215)){lh(t,0,0,0,1);return}return lh(t,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(r.slice(7),16)/255:1),ph(e,t),t}return}var o=r.indexOf(`(`),s=r.indexOf(`)`);if(o!==-1&&s+1===i){var c=r.substr(0,o),l=r.substr(o+1,s-(o+1)).split(`,`),u=1;switch(c){case`rgba`:if(l.length!==4)return l.length===3?lh(t,+l[0],+l[1],+l[2],1):lh(t,0,0,0,1);u=oh(l.pop());case`rgb`:if(l.length>=3)return lh(t,ah(l[0]),ah(l[1]),ah(l[2]),l.length===3?u:oh(l[3])),ph(e,t),t;lh(t,0,0,0,1);return;case`hsla`:if(l.length!==4){lh(t,0,0,0,1);return}return l[3]=oh(l[3]),hh(l,t),ph(e,t),t;case`hsl`:if(l.length!==3){lh(t,0,0,0,1);return}return hh(l,t),ph(e,t),t;default:return}}lh(t,0,0,0,1)}}function hh(e,t){var n=(parseFloat(e[0])%360+360)%360/360,r=oh(e[1]),i=oh(e[2]),a=i<=.5?i*(r+1):i+r-i*r,o=i*2-a;return t||=[],lh(t,nh(sh(o,a,n+1/3)*255),nh(sh(o,a,n)*255),nh(sh(o,a,n-1/3)*255),1),e.length===4&&(t[3]=e[3]),t}function gh(e){if(e){var t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=a-i,s=(a+i)/2,c,l;if(o===0)c=0,l=0;else{l=s<.5?o/(a+i):o/(2-a-i);var u=((a-t)/6+o/2)/o,d=((a-n)/6+o/2)/o,f=((a-r)/6+o/2)/o;t===a?c=f-d:n===a?c=1/3+u-f:r===a&&(c=2/3+d-u),c<0&&(c+=1),c>1&&--c}var p=[c*360,l,s];return e[3]!=null&&p.push(e[3]),p}}function _h(e,t){var n=mh(e);if(n){for(var r=0;r<3;r++)t<0?n[r]=n[r]*(1-t)|0:n[r]=(255-n[r])*t+n[r]|0,n[r]>255?n[r]=255:n[r]<0&&(n[r]=0);return Th(n,n.length===4?`rgba`:`rgb`)}}function vh(e){var t=mh(e);if(t)return((1<<24)+(t[0]<<16)+(t[1]<<8)+ +t[2]).toString(16).slice(1)}function yh(e,t,n){if(!(!(t&&t.length)||!(e>=0&&e<=1))){n||=[];var r=e*(t.length-1),i=Math.floor(r),a=Math.ceil(r),o=t[i],s=t[a],c=r-i;return n[0]=nh(ch(o[0],s[0],c)),n[1]=nh(ch(o[1],s[1],c)),n[2]=nh(ch(o[2],s[2],c)),n[3]=ih(ch(o[3],s[3],c)),n}}var bh=yh;function xh(e,t,n){if(!(!(t&&t.length)||!(e>=0&&e<=1))){var r=e*(t.length-1),i=Math.floor(r),a=Math.ceil(r),o=mh(t[i]),s=mh(t[a]),c=r-i,l=Th([nh(ch(o[0],s[0],c)),nh(ch(o[1],s[1],c)),nh(ch(o[2],s[2],c)),ih(ch(o[3],s[3],c))],`rgba`);return n?{color:l,leftIndex:i,rightIndex:a,value:r}:l}}var Sh=xh;function Ch(e,t,n,r){var i=mh(e);if(e)return i=gh(i),t!=null&&(i[0]=rh(G(t)?t(i[0]):t)),n!=null&&(i[1]=oh(G(n)?n(i[1]):n)),r!=null&&(i[2]=oh(G(r)?r(i[2]):r)),Th(hh(i),`rgba`)}function wh(e,t){var n=mh(e);if(n&&t!=null)return n[3]=ih(t),Th(n,`rgba`)}function Th(e,t){if(!(!e||!e.length)){var n=e[0]+`,`+e[1]+`,`+e[2];return(t===`rgba`||t===`hsva`||t===`hsla`)&&(n+=`,`+e[3]),t+`(`+n+`)`}}function Eh(e,t){var n=mh(e);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*t:0}function Dh(){return Th([Math.round(Math.random()*255),Math.round(Math.random()*255),Math.round(Math.random()*255)],`rgb`)}var Oh=new _f(100);function kh(e){if(K(e)){var t=Oh.get(e);return t||(t=_h(e,-.1),Oh.put(e,t)),t}else if(Td(e)){var n=V({},e);return n.colorStops=U(e.colorStops,function(e){return{offset:e.offset,color:_h(e.color,-.1)}}),n}return e}function Ah(e){return e.type===`linear`}function jh(e){return e.type===`radial`}(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}})();var Mh=Array.prototype.slice;function Nh(e,t,n){return(t-e)*n+e}function Ph(e,t,n,r){for(var i=t.length,a=0;a<i;a++)e[a]=Nh(t[a],n[a],r);return e}function Fh(e,t,n,r){for(var i=t.length,a=i&&t[0].length,o=0;o<i;o++){e[o]||(e[o]=[]);for(var s=0;s<a;s++)e[o][s]=Nh(t[o][s],n[o][s],r)}return e}function Ih(e,t,n,r){for(var i=t.length,a=0;a<i;a++)e[a]=t[a]+n[a]*r;return e}function Lh(e,t,n,r){for(var i=t.length,a=i&&t[0].length,o=0;o<i;o++){e[o]||(e[o]=[]);for(var s=0;s<a;s++)e[o][s]=t[o][s]+n[o][s]*r}return e}function Rh(e,t){for(var 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},s=a;s<Math.max(n,r);s++)i.push({offset:o.offset,color:o.color.slice()})}function zh(e,t,n){var r=e,i=t;if(!(!r.push||!i.push)){var a=r.length,o=i.length;if(a!==o)if(a>o)r.length=o;else for(var s=a;s<o;s++)r.push(n===1?i[s]:Mh.call(i[s]));for(var c=r[0]&&r[0].length,s=0;s<r.length;s++)if(n===1)isNaN(r[s])&&(r[s]=i[s]);else for(var l=0;l<c;l++)isNaN(r[s][l])&&(r[s][l]=i[s][l])}}function Bh(e){if(fd(e)){var t=e.length;if(fd(e[0])){for(var n=[],r=0;r<t;r++)n.push(Mh.call(e[r]));return n}return Mh.call(e)}return e}function Vh(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 Hh(e){return fd(e&&e[0])?2:1}var Uh=0,Wh=1,Gh=2,Kh=3,qh=4,Jh=5,Yh=6;function Xh(e){return e===qh||e===Jh}function Zh(e){return e===Wh||e===Gh}var Qh=[0,0,0,0],$h=function(){function e(e){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=e}return e.prototype.isFinished=function(){return this._finished},e.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},e.prototype.needsAnimate=function(){return this.keyframes.length>=1},e.prototype.getAdditiveTrack=function(){return this._additiveTrack},e.prototype.addKeyframe=function(e,t,n){this._needsSort=!0;var r=this.keyframes,i=r.length,a=!1,o=Yh,s=t;if(fd(t)){var c=Hh(t);o=c,(c===1&&!xd(t[0])||c===2&&!xd(t[0][0]))&&(a=!0)}else if(xd(t)&&!Od(t))o=Uh;else if(K(t))if(!isNaN(+t))o=Uh;else{var l=mh(t);l&&(s=l,o=Kh)}else if(Td(t)){var u=V({},s);u.colorStops=U(t.colorStops,function(e){return{offset:e.offset,color:mh(e.color)}}),Ah(t)?o=qh:jh(t)&&(o=Jh),s=u}i===0?this.valType=o:(o!==this.valType||o===Yh)&&(a=!0),this.discrete=this.discrete||a;var d={time:e,value:s,rawValue:t,percent:0};return n&&(d.easing=n,d.easingFunc=G(n)?n:Tm[n]||Qm(n)),r.push(d),d},e.prototype.prepare=function(e,t){var n=this.keyframes;this._needsSort&&n.sort(function(e,t){return e.time-t.time});for(var r=this.valType,i=n.length,a=n[i-1],o=this.discrete,s=Zh(r),c=Xh(r),l=0;l<i;l++){var u=n[l],d=u.value,f=a.value;u.percent=u.time/e,o||(s&&l!==i-1?zh(d,f,r):c&&Rh(d.colorStops,f.colorStops))}if(!o&&r!==Jh&&t&&this.needsAnimate()&&t.needsAnimate()&&r===t.valType&&!t._finished){this._additiveTrack=t;for(var p=n[0].value,l=0;l<i;l++)r===Uh?n[l].additiveValue=n[l].value-p:r===Kh?n[l].additiveValue=Ih([],n[l].value,p,-1):Zh(r)&&(n[l].additiveValue=r===Wh?Ih([],n[l].value,p,-1):Lh([],n[l].value,p,-1))}},e.prototype.step=function(e,t){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var n=this._additiveTrack!=null,r=n?`additiveValue`:`value`,i=this.valType,a=this.keyframes,o=a.length,s=this.propName,c=i===Kh,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){this._lastFr=l,this._lastFrP=t;var m=p.percent-f.percent,h=m===0?1:d((t-f.percent)/m,1);p.easingFunc&&(h=p.easingFunc(h));var g=n?this._additiveValue:c?Qh:e[s];if((Zh(i)||c)&&!g&&(g=this._additiveValue=[]),this.discrete)e[s]=h<1?f.rawValue:p.rawValue;else if(Zh(i))i===Wh?Ph(g,f[r],p[r],h):Fh(g,f[r],p[r],h);else if(Xh(i)){var _=f[r],v=p[r],y=i===qh;e[s]={type:y?`linear`:`radial`,x:Nh(_.x,v.x,h),y:Nh(_.y,v.y,h),colorStops:U(_.colorStops,function(e,t){var n=v.colorStops[t];return{offset:Nh(e.offset,n.offset,h),color:Vh(Ph([],e.color,n.color,h))}}),global:v.global},y?(e[s].x2=Nh(_.x2,v.x2,h),e[s].y2=Nh(_.y2,v.y2,h)):e[s].r=Nh(_.r,v.r,h)}else if(c)Ph(g,f[r],p[r],h),n||(e[s]=Vh(g));else{var b=Nh(f[r],p[r],h);n?this._additiveValue=b:e[s]=b}n&&this._addToTarget(e)}}},e.prototype._addToTarget=function(e){var t=this.valType,n=this.propName,r=this._additiveValue;t===Uh?e[n]=e[n]+r:t===Kh?(mh(e[n],Qh),Ih(Qh,Qh,r,1),e[n]=Vh(Qh)):t===Wh?Ih(e[n],e[n],r,1):t===Gh&&Lh(e[n],e[n],r,1)},e}(),eg=function(){function e(e,t,n,r){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&r){rd(`Can' use additive animation on looped animation.`);return}this._additiveAnimators=r,this._allowDiscrete=n}return e.prototype.getMaxTime=function(){return this._maxTime},e.prototype.getDelay=function(){return this._delay},e.prototype.getLoop=function(){return this._loop},e.prototype.getTarget=function(){return this._target},e.prototype.changeTarget=function(e){this._target=e},e.prototype.when=function(e,t,n){return this.whenWithKeys(e,t,gd(t),n)},e.prototype.whenWithKeys=function(e,t,n,r){for(var i=this._tracks,a=0;a<n.length;a++){var o=n[a],s=i[o];if(!s){s=i[o]=new $h(o);var c=void 0,l=this._getAdditiveTrack(o);if(l){var u=l.keyframes,d=u[u.length-1];c=d&&d.value,l.valType===Kh&&c&&(c=Vh(c))}else c=this._target[o];if(c==null)continue;e>0&&s.addKeyframe(0,Bh(c),r),this._trackKeys.push(o)}s.addKeyframe(e,Bh(t[o]),r)}return this._maxTime=Math.max(this._maxTime,e),this},e.prototype.pause=function(){this._clip.pause(),this._paused=!0},e.prototype.resume=function(){this._clip.resume(),this._paused=!1},e.prototype.isPaused=function(){return!!this._paused},e.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},e.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,n=0;n<t;n++)e[n].call(this)},e.prototype._abortedCallback=function(){this._setTracksFinished();var e=this.animation,t=this._abortedCbs;if(e&&e.removeClip(this._clip),this._clip=null,t)for(var n=0;n<t.length;n++)t[n].call(this)},e.prototype._setTracksFinished=function(){for(var e=this._tracks,t=this._trackKeys,n=0;n<t.length;n++)e[t[n]].setFinished()},e.prototype._getAdditiveTrack=function(e){var t,n=this._additiveAnimators;if(n)for(var r=0;r<n.length;r++){var i=n[r].getTrack(e);i&&(t=i)}return t},e.prototype.start=function(e){if(!(this._started>0)){this._started=1;for(var t=this,n=[],r=this._maxTime||0,i=0;i<this._trackKeys.length;i++){var a=this._trackKeys[i],o=this._tracks[a],s=this._getAdditiveTrack(a),c=o.keyframes,l=c.length;if(o.prepare(r,s),o.needsAnimate())if(!this._allowDiscrete&&o.discrete){var u=c[l-1];u&&(t._target[o.propName]=u.rawValue),o.setFinished()}else n.push(o)}if(n.length||this._force){var d=new $m({life:r,loop:this._loop,delay:this._delay||0,onframe:function(e){t._started=2;var r=t._additiveAnimators;if(r){for(var i=!1,a=0;a<r.length;a++)if(r[a]._clip){i=!0;break}i||(t._additiveAnimators=null)}for(var a=0;a<n.length;a++)n[a].step(t._target,e);var o=t._onframeCbs;if(o)for(var a=0;a<o.length;a++)o[a](t._target,e)},ondestroy:function(){t._doneCallback()}});this._clip=d,this.animation&&this.animation.addClip(d),e&&d.setEasing(e)}else this._doneCallback();return this}},e.prototype.stop=function(e){if(this._clip){var t=this._clip;e&&t.onframe(1),this._abortedCallback()}},e.prototype.delay=function(e){return this._delay=e,this},e.prototype.during=function(e){return e&&(this._onframeCbs||=[],this._onframeCbs.push(e)),this},e.prototype.done=function(e){return e&&(this._doneCbs||=[],this._doneCbs.push(e)),this},e.prototype.aborted=function(e){return e&&(this._abortedCbs||=[],this._abortedCbs.push(e)),this},e.prototype.getClip=function(){return this._clip},e.prototype.getTrack=function(e){return this._tracks[e]},e.prototype.getTracks=function(){var e=this;return U(this._trackKeys,function(t){return e._tracks[t]})},e.prototype.stopTracks=function(e,t){if(!e.length||!this._clip)return!0;for(var n=this._tracks,r=this._trackKeys,i=0;i<e.length;i++){var a=n[e[i]];a&&!a.isFinished()&&(t?a.step(this._target,1):this._started===1&&a.step(this._target,0),a.setFinished())}for(var o=!0,i=0;i<r.length;i++)if(!n[r[i]].isFinished()){o=!1;break}return o&&this._abortedCallback(),o},e.prototype.saveTo=function(e,t,n){if(e){t||=this._trackKeys;for(var r=0;r<t.length;r++){var i=t[r],a=this._tracks[i];if(!(!a||a.isFinished())){var o=a.keyframes,s=o[n?0:o.length-1];s&&(e[i]=Bh(s.rawValue))}}}},e.prototype.__changeFinalValue=function(e,t){t||=gd(e);for(var n=0;n<t.length;n++){var r=t[n],i=this._tracks[r];if(i){var a=i.keyframes;if(a.length>1){var o=a.pop();i.addKeyframe(o.time,e[r]),i.prepare(this._maxTime,i.getAdditiveTrack())}}}},e}(),tg=function(){function e(e){e&&(this._$eventProcessor=e)}return e.prototype.on=function(e,t,n,r){this._$handlers||={};var i=this._$handlers;if(typeof t==`function`&&(r=n,n=t,t=null),!n||!e)return this;var a=this._$eventProcessor;t!=null&&a&&a.normalizeQuery&&(t=a.normalizeQuery(t)),i[e]||(i[e]=[]);for(var o=0;o<i[e].length;o++)if(i[e][o].h===n)return this;var s={h:n,query:t,ctx:r||this,callAtLast:n.zrEventfulCallAtLast},c=i[e].length-1,l=i[e][c];return l&&l.callAtLast?i[e].splice(c,0,s):i[e].push(s),this},e.prototype.isSilent=function(e){var t=this._$handlers;return!t||!t[e]||!t[e].length},e.prototype.off=function(e,t){var n=this._$handlers;if(!n)return this;if(!e)return this._$handlers={},this;if(t){if(n[e]){for(var r=[],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},e.prototype.trigger=function(e){var t=[...arguments].slice(1);if(!this._$handlers)return this;var n=this._$handlers[e],r=this._$eventProcessor;if(n)for(var i=t.length,a=n.length,o=0;o<a;o++){var s=n[o];if(!(r&&r.filter&&s.query!=null&&!r.filter(e,s.query)))switch(i){case 0:s.h.call(s.ctx);break;case 1:s.h.call(s.ctx,t[0]);break;case 2:s.h.call(s.ctx,t[0],t[1]);break;default:s.h.apply(s.ctx,t);break}}return r&&r.afterTrigger&&r.afterTrigger(e),this},e.prototype.triggerWithContext=function(e){var t=[...arguments].slice(1);if(!this._$handlers)return this;var n=this._$handlers[e],r=this._$eventProcessor;if(n)for(var i=t.length,a=t[i-1],o=n.length,s=0;s<o;s++){var c=n[s];if(!(r&&r.filter&&c.query!=null&&!r.filter(e,c.query)))switch(i){case 0:c.h.call(a);break;case 1:c.h.call(a,t[0]);break;case 2:c.h.call(a,t[0],t[1]);break;default:c.h.apply(a,t.slice(1,i-1));break}}return r&&r.afterTrigger&&r.afterTrigger(e),this},e}(),ng=1;X.hasGlobalWindow&&(ng=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var rg=ng,ig=.4,ag=`#333`,og=`#ccc`,sg=`#eee`,cg=`__zr_normal__`,lg=Cm.concat([`ignore`]),ug=pd(Cm,function(e,t){return e[t]=!0,e},{ignore:!1}),dg={},fg=new Z(0,0,0,0),pg=[],mg=function(){function e(e){this.id=nd(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return e.prototype._init=function(e){this.attr(e)},e.prototype.drift=function(e,t,n){switch(this.draggable){case`horizontal`:t=0;break;case`vertical`:e=0;break}var r=this.transform;r||=this.transform=[1,0,0,1,0,0],r[4]+=e,r[5]+=t,this.decomposeTransform(),this.markRedraw()},e.prototype.beforeUpdate=function(){},e.prototype.afterUpdate=function(){},e.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},e.prototype.updateInnerText=function(e){var t=this._textContent;if(t&&(!t.ignore||e)){this.textConfig||={};var n=this.textConfig,r=n.local,i=t.innerTransformable,a=void 0,o=void 0,s=!1;i.parent=r?this:null;var c=!1;i.copyTransform(t);var l=n.position!=null,u=n.autoOverflowArea,d=void 0;if((u||l)&&(d=fg,n.layoutRect?d.copy(n.layoutRect):d.copy(this.getBoundingRect()),r||d.applyTransform(this.transform)),l){this.calculateTextPosition?this.calculateTextPosition(dg,n,d):Up(dg,n,d),i.x=dg.x,i.y=dg.y,a=dg.align,o=dg.verticalAlign;var f=n.origin;if(f&&n.rotation!=null){var p=void 0,m=void 0;f===`center`?(p=d.width*.5,m=d.height*.5):(p=Hp(f[0],d.width),m=Hp(f[1],d.height)),c=!0,i.originX=-i.x+p+(r?0:d.x),i.originY=-i.y+m+(r?0:d.y)}}n.rotation!=null&&(i.rotation=n.rotation);var h=n.offset;h&&(i.x+=h[0],i.y+=h[1],c||(i.originX=-h[0],i.originY=-h[1]));var g=this._innerTextDefaultStyle||={};if(u){var _=g.overflowRect=g.overflowRect||new Z(0,0,0,0);i.getLocalTransform(pg),jf(pg,pg),Z.copy(_,d),_.applyTransform(pg)}else g.overflowRect=null;var v=n.inside==null?typeof n.position==`string`&&n.position.indexOf(`inside`)>=0:n.inside,y=void 0,b=void 0,x=void 0;v&&this.canBeInsideText()?(y=n.insideFill,b=n.insideStroke,(y==null||y===`auto`)&&(y=this.getInsideTextFill()),(b==null||b===`auto`)&&(b=this.getInsideTextStroke(y),x=!0)):(y=n.outsideFill,b=n.outsideStroke,(y==null||y===`auto`)&&(y=this.getOutsideFill()),(b==null||b===`auto`)&&(b=this.getOutsideStroke(y),x=!0)),y||=`#000`,(y!==g.fill||b!==g.stroke||x!==g.autoStroke||a!==g.align||o!==g.verticalAlign)&&(s=!0,g.fill=y,g.stroke=b,g.autoStroke=x,g.align=a,g.verticalAlign=o,t.setDefaultTextStyle(g)),t.__dirty|=1,s&&t.dirtyStyle(!0)}},e.prototype.canBeInsideText=function(){return!0},e.prototype.getInsideTextFill=function(){return`#fff`},e.prototype.getInsideTextStroke=function(e){return`#000`},e.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?og:ag},e.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),n=typeof t==`string`&&mh(t);n||=[255,255,255,1];for(var r=n[3],i=this.__zr.isDarkMode(),a=0;a<3;a++)n[a]=n[a]*r+(i?0:255)*(1-r);return n[3]=1,Th(n,`rgba`)},e.prototype.traverse=function(e,t){},e.prototype.attrKV=function(e,t){e===`textConfig`?this.setTextConfig(t):e===`textContent`?this.setTextContent(t):e===`clipPath`?this.setClipPath(t):e===`extra`?(this.extra=this.extra||{},V(this.extra,t)):this[e]=t},e.prototype.hide=function(){this.ignore=!0,this.markRedraw()},e.prototype.show=function(){this.ignore=!1,this.markRedraw()},e.prototype.attr=function(e,t){if(typeof e==`string`)this.attrKV(e,t);else if(q(e))for(var n=gd(e),r=0;r<n.length;r++){var i=n[r];this.attrKV(i,e[i])}return this.markRedraw(),this},e.prototype.saveCurrentToNormalState=function(e){this._innerSaveToNormal(e);for(var t=this._normalState,n=0;n<this.animators.length;n++){var r=this.animators[n],i=r.__fromStateTransition;if(!(r.getLoop()||i&&i!==`__zr_normal__`)){var a=r.targetName,o=a?t[a]:t;r.saveTo(o)}}},e.prototype._innerSaveToNormal=function(e){var t=this._normalState;t||=this._normalState={},e.textConfig&&!t.textConfig&&(t.textConfig=this.textConfig),this._savePrimaryToNormal(e,t,lg)},e.prototype._savePrimaryToNormal=function(e,t,n){for(var r=0;r<n.length;r++){var i=n[r];e[i]!=null&&!(i in t)&&(t[i]=this[i])}},e.prototype.hasState=function(){return this.currentStates.length>0},e.prototype.getState=function(e){return this.states[e]},e.prototype.ensureState=function(e){var t=this.states;return t[e]||(t[e]={}),t[e]},e.prototype.clearStates=function(e){this.useState(cg,!1,e)},e.prototype.useState=function(e,t,n,r){var i=e===cg;if(!(!this.hasState()&&i)){var a=this.currentStates,o=this.stateTransition;if(!(ld(a,e)>=0&&(t||a.length===1))){var s;if(this.stateProxy&&!i&&(s=this.stateProxy(e)),s||=this.states&&this.states[e],!s&&!i){rd(`State `+e+` not exists.`);return}i||this.saveCurrentToNormalState(s);var c=this._textContent,l=Sg(this,c,s,r);l&&!this.__inHover&&(this.__inHover=l),this._applyStateObj(e,s,this._normalState,t,wg(this,n,o),o);var 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}}},e.prototype.useStates=function(e,t,n){if(!e.length)this.clearStates();else{var r=[],i=this.currentStates,a=e.length,o=a===i.length;if(o){for(var s=0;s<a;s++)if(e[s]!==i[s]){o=!1;break}}if(o)return;for(var s=0;s<a;s++){var c=e[s],l=void 0;this.stateProxy&&(l=this.stateProxy(c,e)),l||=this.states[c],l&&r.push(l)}var u=r[a-1],d=this._textContent,f=Sg(this,d,u,n);f&&!this.__inHover&&(this.__inHover=f);var p=this._mergeStates(r),m=this.stateTransition;this.saveCurrentToNormalState(p),this._applyStateObj(e.join(`,`),p,this._normalState,!1,wg(this,t,m),m);var h=this._textGuide;d&&d.useStates(e,t,!!f),h&&h.useStates(e,t,!!f),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!f&&this.__inHover&&(this.__inHover=0,this.__dirty&=-2)}},e.prototype.isSilent=function(){for(var e=this;e;){if(e.silent)return!0;var t=e.__hostTarget;e=t?e.ignoreHostSilent?null:t:e.parent}return!1},e.prototype._updateAnimationTargets=function(){for(var e=0;e<this.animators.length;e++){var t=this.animators[e];t.targetName&&t.changeTarget(this[t.targetName])}},e.prototype.removeState=function(e){var t=ld(this.currentStates,e);if(t>=0){var n=this.currentStates.slice();n.splice(t,1),this.useStates(n)}},e.prototype.replaceState=function(e,t,n){var r=this.currentStates.slice(),i=ld(r,e),a=ld(r,t)>=0;i>=0?a?r.splice(i,1):r[i]=t:n&&!a&&r.push(t),this.useStates(r)},e.prototype.toggleState=function(e,t){t?this.useState(e,!0):this.removeState(e)},e.prototype._mergeStates=function(e){for(var t={},n,r=0;r<e.length;r++){var i=e[r];V(t,i),i.textConfig&&(n||={},V(n,i.textConfig))}return n&&(t.textConfig=n),t},e.prototype._applyStateObj=function(e,t,n,r,i,a){if(this.__inHover!==1){var o=!(t&&r);t&&t.textConfig?(this.textConfig=V({},r?this.textConfig:n.textConfig),V(this.textConfig,t.textConfig)):o&&n.textConfig&&(this.textConfig=n.textConfig);for(var s={},c=!1,l=0;l<lg.length;l++){var u=lg[l],d=i&&ug[u];t&&t[u]!=null?d?(c=!0,s[u]=t[u]):this[u]=t[u]:o&&n[u]!=null&&(d?(c=!0,s[u]=n[u]):this[u]=n[u])}if(!i)for(var l=0;l<this.animators.length;l++){var f=this.animators[l],p=f.targetName;f.getLoop()||f.__changeFinalValue(p?(t||n)[p]:t||n)}c&&this._transitionState(e,s,a)}},e.prototype._attachComponent=function(e){if(!(e.__zr&&!e.__hostTarget)&&e!==this){var t=this.__zr;t&&e.addSelfToZr(t),e.__zr=t,e.__hostTarget=this}},e.prototype._detachComponent=function(e){e.__zr&&e.removeSelfFromZr(e.__zr),e.__zr=null,e.__hostTarget=null},e.prototype.getClipPath=function(){return this._clipPath},e.prototype.setClipPath=function(e){this._clipPath&&this._clipPath!==e&&this.removeClipPath(),this._attachComponent(e),this._clipPath=e,this.markRedraw()},e.prototype.removeClipPath=function(){var e=this._clipPath;e&&(this._detachComponent(e),this._clipPath=null,this.markRedraw())},e.prototype.getTextContent=function(){return this._textContent},e.prototype.setTextContent=function(e){var t=this._textContent;t!==e&&(t&&t!==e&&this.removeTextContent(),e.innerTransformable=new bm,this._attachComponent(e),this._textContent=e,this.markRedraw())},e.prototype.setTextConfig=function(e){this.textConfig||={},V(this.textConfig,e),this.markRedraw()},e.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},e.prototype.removeTextContent=function(){var e=this._textContent;e&&(e.innerTransformable=null,this._detachComponent(e),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},e.prototype.getTextGuideLine=function(){return this._textGuide},e.prototype.setTextGuideLine=function(e){this._textGuide&&this._textGuide!==e&&this.removeTextGuideLine(),this._attachComponent(e),this._textGuide=e,this.markRedraw()},e.prototype.removeTextGuideLine=function(){var e=this._textGuide;e&&(this._detachComponent(e),this._textGuide=null,this.markRedraw())},e.prototype.markRedraw=function(){this.__dirty|=1;var e=this.__zr;e&&(this.__inHover?e.refreshHover():e.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},e.prototype.dirty=function(){this.markRedraw()},e.prototype.addSelfToZr=function(e){if(this.__zr!==e){this.__zr=e;var t=this.animators;if(t)for(var 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)}},e.prototype.removeSelfFromZr=function(e){if(this.__zr){this.__zr=null;var t=this.animators;if(t)for(var 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)}},e.prototype.animate=function(e,t,n){var r=new eg(e?this[e]:this,t,n);return e&&(r.targetName=e),this.addAnimator(r,e),r},e.prototype.addAnimator=function(e,t){var n=this.__zr,r=this;e.during(function(){r.updateDuringAnimation(t)}).done(function(){var t=r.animators,n=ld(t,e);n>=0&&t.splice(n,1)}),this.animators.push(e),n&&n.animation.addAnimator(e),n&&n.wakeUp()},e.prototype.updateDuringAnimation=function(e){this.markRedraw()},e.prototype.stopAnimation=function(e,t){for(var n=this.animators,r=n.length,i=[],a=0;a<r;a++){var o=n[a];!e||e===o.scope?o.stop(t):i.push(o)}return this.animators=i,this},e.prototype.animateTo=function(e,t,n){hg(this,e,t,n)},e.prototype.animateFrom=function(e,t,n){hg(this,e,t,n,!0)},e.prototype._transitionState=function(e,t,n,r){for(var i=hg(this,t,n,r),a=0;a<i.length;a++)i[a].__fromStateTransition=e},e.prototype.getBoundingRect=function(){return null},e.prototype.getPaintRect=function(){return null},e.initDefaultProps=(function(){var t=e.prototype;t.type=`element`,t.name=``,t.ignore=t.silent=t.ignoreHostSilent=t.isGroup=t.draggable=t.dragging=t.ignoreClip=!1,t.__inHover=0,t.__dirty=1;function n(e,n,r,i){Object.defineProperty(t,e,{get:function(){if(!this[n]){var e=this[n]=[];a(this,e)}return this[n]},set:function(e){this[r]=e[0],this[i]=e[1],this[n]=e,a(this,e)}});function a(e,t){Object.defineProperty(t,0,{get:function(){return e[r]},set:function(t){e[r]=t}}),Object.defineProperty(t,1,{get:function(){return e[i]},set:function(t){e[i]=t}})}}Object.defineProperty&&(n(`position`,`_legacyPos`,`x`,`y`),n(`scale`,`_legacyScale`,`scaleX`,`scaleY`),n(`origin`,`_legacyOrigin`,`originX`,`originY`))})(),e}();dd(mg,tg),dd(mg,bm);function hg(e,t,n,r,i){n||={};var a=[];xg(e,``,e,t,n,r,a,i);var o=a.length,s=!1,c=n.done,l=n.aborted,u=function(){s=!0,o--,o<=0&&(s?c&&c():l&&l())},d=function(){o--,o<=0&&(s?c&&c():l&&l())};o||c&&c(),a.length>0&&n.during&&a[0].during(function(e,t){n.during(t)});for(var f=0;f<a.length;f++){var p=a[f];u&&p.done(u),d&&p.aborted(d),n.force&&p.duration(n.duration),p.start(n.easing)}return a}function gg(e,t,n){for(var r=0;r<n;r++)e[r]=t[r]}function _g(e){return fd(e[0])}function vg(e,t,n){if(fd(t[n]))if(fd(e[n])||(e[n]=[]),Cd(t[n])){var r=t[n].length;e[n].length!==r&&(e[n]=new t[n].constructor(r),gg(e[n],t[n],r))}else{var i=t[n],a=e[n],o=i.length;if(_g(i))for(var s=i[0].length,c=0;c<o;c++)a[c]?gg(a[c],i[c],s):a[c]=Array.prototype.slice.call(i[c]);else gg(a,i,o);a.length=i.length}else e[n]=t[n]}function yg(e,t){return e===t||fd(e)&&fd(t)&&bg(e,t)}function bg(e,t){var n=e.length;if(n!==t.length)return!1;for(var r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}function xg(e,t,n,r,i,a,o,s){for(var c=gd(r),l=i.duration,u=i.delay,d=i.additive,f=i.setToFinal,p=!q(a),m=e.animators,h=[],g=0;g<c.length;g++){var _=c[g],v=r[_];if(v!=null&&n[_]!=null&&(p||a[_]))if(q(v)&&!fd(v)&&!Td(v)){if(t){s||(n[_]=v,e.updateDuringAnimation(t));continue}xg(e,_,n[_],v,i,a&&a[_],o,s)}else h.push(_);else s||(n[_]=v,e.updateDuringAnimation(t),h.push(_))}var y=h.length;if(!d&&y)for(var b=0;b<m.length;b++){var x=m[b];if(x.targetName===t&&x.stopTracks(h)){var S=ld(m,x);m.splice(S,1)}}if(i.force||(h=md(h,function(e){return!yg(r[e],n[e])}),y=h.length),y>0||i.force&&!o.length){var C=void 0,w=void 0,T=void 0;if(s){w={},f&&(C={});for(var b=0;b<y;b++){var _=h[b];w[_]=n[_],f?C[_]=r[_]:n[_]=r[_]}}else if(f){T={};for(var b=0;b<y;b++){var _=h[b];T[_]=Bh(n[_]),vg(n,r,_)}}var x=new eg(n,!1,!1,d?md(m,function(e){return e.targetName===t}):null);x.targetName=t,i.scope&&(x.scope=i.scope),f&&C&&x.whenWithKeys(0,C,h),T&&x.whenWithKeys(0,T,h),x.whenWithKeys(l??500,s?w:r,h).delay(u||0),e.addAnimator(x,t),o.push(x)}}function Sg(e,t,n,r){return!(n&&n.hoverLayer||r)||Cg(e)||t&&Cg(t)?0:1}function Cg(e){return e.type===`text`||e.type===`tspan`}function wg(e,t,n){return!t&&!e.__inHover&&n&&n.duration>0}var Tg=`__zr_style_`+Math.round(Math.random()*10),Eg={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:`#000`,opacity:1,blend:`source-over`},Dg={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};Eg[Tg]=!0;var Og=[`z`,`z2`,`invisible`],kg=[`invisible`],Ag=function(e){z(t,e);function t(t){return e.call(this,t)||this}return t.prototype._init=function(t){for(var n=gd(t),r=0;r<n.length;r++){var i=n[r];i===`style`?this.useStyle(t[i]):e.prototype.attrKV.call(this,i,t[i])}this.style||this.useStyle({})},t.prototype.beforeBrush=function(e){},t.prototype.afterBrush=function(){},t.prototype.innerBeforeBrush=function(){},t.prototype.innerAfterBrush=function(){},t.prototype.shouldBePainted=function(e,t,n,r){var i=this.transform;if(this.ignore||this.invisible||this.style.opacity===0||this.culling&&Ng(this,e,t)||i&&!i[0]&&!i[3])return!1;if(n&&this.__clipPaths&&this.__clipPaths.length){for(var a=0;a<this.__clipPaths.length;++a)if(this.__clipPaths[a].isZeroArea())return!1}if(r&&this.parent)for(var o=this.parent;o;){if(o.ignore)return!1;o=o.parent}return!0},t.prototype.contain=function(e,t){return this.rectContain(e,t)},t.prototype.traverse=function(e,t){e.call(t,this)},t.prototype.rectContain=function(e,t){var n=this.transformCoordToLocal(e,t);return this.getBoundingRect().contain(n[0],n[1])},t.prototype.getPaintRect=function(){var e=this._paintRect;if(!this._paintRect||this.__dirty){var t=this.transform,n=this.getBoundingRect(),r=this.style,i=r.shadowBlur||0,a=r.shadowOffsetX||0,o=r.shadowOffsetY||0;e=this._paintRect||=new Z(0,0,0,0),t?Z.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));var 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},t.prototype.setPrevPaintRect=function(e){e?(this._prevPaintRect=this._prevPaintRect||new Z(0,0,0,0),this._prevPaintRect.copy(e)):this._prevPaintRect=null},t.prototype.getPrevPaintRect=function(){return this._prevPaintRect},t.prototype.animateStyle=function(e){return this.animate(`style`,e)},t.prototype.updateDuringAnimation=function(e){e===`style`?this.dirtyStyle():this.markRedraw()},t.prototype.attrKV=function(t,n){t===`style`?this.style?this.setStyle(n):this.useStyle(n):e.prototype.attrKV.call(this,t,n)},t.prototype.setStyle=function(e,t){return typeof e==`string`?this.style[e]=t:V(this.style,e),this.dirtyStyle(),this},t.prototype.dirtyStyle=function(e){e||this.markRedraw(),this.__dirty|=2,this._rect&&=null},t.prototype.dirty=function(){this.dirtyStyle()},t.prototype.styleChanged=function(){return!!(this.__dirty&2)},t.prototype.styleUpdated=function(){this.__dirty&=-3},t.prototype.createStyle=function(e){return Ud(Eg,e)},t.prototype.useStyle=function(e){e[Tg]||(e=this.createStyle(e)),this.style=e,this.dirtyStyle()},t.prototype._useHoverStyle=function(e){this.__hoverStyle=e},t.prototype.isStyleObject=function(e){return e[Tg]},t.prototype._innerSaveToNormal=function(t){e.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.style&&!n.style&&(n.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(t,n,Og)},t.prototype._applyStateObj=function(t,n,r,i,a,o){e.prototype._applyStateObj.call(this,t,n,r,i,a,o);var s=!(n&&i),c=this.__inHover===1,l;if(n&&n.style?a?i?l=n.style:(l=this._mergeStyle(this.createStyle(),r.style),this._mergeStyle(l,n.style)):(l=this._mergeStyle(this.createStyle(),i?this.style:r.style),this._mergeStyle(l,n.style)):s&&(l=r.style),l)if(a){var u=this.style;if(this.style=this.createStyle(s?{}:u),s)for(var d=gd(u),f=0;f<d.length;f++){var p=d[f];p in l&&(l[p]=l[p],this.style[p]=u[p])}for(var m=gd(l),f=0;f<m.length;f++){var p=m[f];this.style[p]=this.style[p]}this._transitionState(t,{style:l},o,this.getAnimationStyleProps())}else c?this._useHoverStyle(l):this.useStyle(l);if(!c)for(var h=this.__inHover?kg:Og,f=0;f<h.length;f++){var p=h[f];n&&n[p]!=null?this[p]=n[p]:s&&r[p]!=null&&(this[p]=r[p])}},t.prototype._mergeStates=function(t){for(var n=e.prototype._mergeStates.call(this,t),r,i=0;i<t.length;i++){var a=t[i];a.style&&(r||={},this._mergeStyle(r,a.style))}return r&&(n.style=r),n},t.prototype._mergeStyle=function(e,t){return V(e,t),e},t.prototype.getAnimationStyleProps=function(){return Dg},t.initDefaultProps=(function(){var e=t.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})(),t}(mg),jg=new Z(0,0,0,0),Mg=new Z(0,0,0,0);function Ng(e,t,n){return jg.copy(e.getBoundingRect()),e.transform&&jg.applyTransform(e.transform),Mg.width=t,Mg.height=n,!jg.intersect(Mg)}var Pg=Math.min,Fg=Math.max,Ig=Math.sin,Lg=Math.cos,Rg=Math.PI*2,zg=Pf(),Bg=Pf(),Vg=Pf();function Hg(e,t,n){if(e.length!==0){for(var r=e[0],i=r[0],a=r[0],o=r[1],s=r[1],c=1;c<e.length;c++)r=e[c],i=Pg(i,r[0]),a=Fg(a,r[0]),o=Pg(o,r[1]),s=Fg(s,r[1]);t[0]=i,t[1]=o,n[0]=a,n[1]=s}}function Ug(e,t,n,r,i,a){i[0]=Pg(e,n),i[1]=Pg(t,r),a[0]=Fg(e,n),a[1]=Fg(t,r)}var Wg=[],Gg=[];function Kg(e,t,n,r,i,a,o,s,c,l){var u=Bm,d=Lm,f=u(e,n,i,o,Wg);c[0]=1/0,c[1]=1/0,l[0]=-1/0,l[1]=-1/0;for(var p=0;p<f;p++){var m=d(e,n,i,o,Wg[p]);c[0]=Pg(m,c[0]),l[0]=Fg(m,l[0])}f=u(t,r,a,s,Gg);for(var p=0;p<f;p++){var h=d(t,r,a,s,Gg[p]);c[1]=Pg(h,c[1]),l[1]=Fg(h,l[1])}c[0]=Pg(e,c[0]),l[0]=Fg(e,l[0]),c[0]=Pg(o,c[0]),l[0]=Fg(o,l[0]),c[1]=Pg(t,c[1]),l[1]=Fg(t,l[1]),c[1]=Pg(s,c[1]),l[1]=Fg(s,l[1])}function qg(e,t,n,r,i,a,o,s){var c=qm,l=Wm,u=Fg(Pg(c(e,n,i),1),0),d=Fg(Pg(c(t,r,a),1),0),f=l(e,n,i,u),p=l(t,r,a,d);o[0]=Pg(e,i,f),o[1]=Pg(t,a,p),s[0]=Fg(e,i,f),s[1]=Fg(t,a,p)}function Jg(e,t,n,r,i,a,o,s,c){var l=rp,u=ip,d=Math.abs(i-a);if(d%Rg<1e-4&&d>1e-4){s[0]=e-n,s[1]=t-r,c[0]=e+n,c[1]=t+r;return}if(zg[0]=Lg(i)*n+e,zg[1]=Ig(i)*r+t,Bg[0]=Lg(a)*n+e,Bg[1]=Ig(a)*r+t,l(s,zg,Bg),u(c,zg,Bg),i%=Rg,i<0&&(i+=Rg),a%=Rg,a<0&&(a+=Rg),i>a&&!o?a+=Rg:i<a&&o&&(i+=Rg),o){var f=a;a=i,i=f}for(var p=0;p<a;p+=Math.PI/2)p>i&&(Vg[0]=Lg(p)*n+e,Vg[1]=Ig(p)*r+t,l(s,Vg,s),u(c,Vg,c))}var Yg={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Xg=[],Zg=[],Qg=[],$g=[],e_=[],t_=[],n_=Math.min,r_=Math.max,i_=Math.cos,a_=Math.sin,o_=Math.abs,s_=Math.PI,c_=s_*2,l_=typeof Float32Array<`u`,u_=[];function d_(e){return Math.round(e/s_*1e8)/1e8%2*s_}function f_(e,t){var n=d_(e[0]);n<0&&(n+=c_);var r=n-e[0],i=e[1];i+=r,!t&&i-n>=c_?i=n+c_:t&&n-i>=c_?i=n-c_:!t&&n>i?i=n+(c_-d_(n-i)):t&&n<i&&(i=n-(c_-d_(i-n))),e[0]=n,e[1]=i}var p_=function(){function e(e){this.dpr=1,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._len=0,e&&(this._saveData=!1),this._saveData&&(this.data=[])}return e.prototype.increaseVersion=function(){this._version++},e.prototype.getVersion=function(){return this._version},e.prototype.setScale=function(e,t,n){n||=0,n>0&&(this._ux=o_(n/rg/e)||0,this._uy=o_(n/rg/t)||0)},e.prototype.setDPR=function(e){this.dpr=e},e.prototype.setContext=function(e){this._ctx=e},e.prototype.getContext=function(){return this._ctx},e.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},e.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},e.prototype.moveTo=function(e,t){return this._drawPendingPt(),this.addData(Yg.M,e,t),this._ctx&&this._ctx.moveTo(e,t),this._x0=e,this._y0=t,this._xi=e,this._yi=t,this},e.prototype.lineTo=function(e,t){var n=o_(e-this._xi),r=o_(t-this._yi),i=n>this._ux||r>this._uy;if(this.addData(Yg.L,e,t),this._ctx&&i&&this._ctx.lineTo(e,t),i)this._xi=e,this._yi=t,this._pendingPtDist=0;else{var a=n*n+r*r;a>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=t,this._pendingPtDist=a)}return this},e.prototype.bezierCurveTo=function(e,t,n,r,i,a){return this._drawPendingPt(),this.addData(Yg.C,e,t,n,r,i,a),this._ctx&&this._ctx.bezierCurveTo(e,t,n,r,i,a),this._xi=i,this._yi=a,this},e.prototype.quadraticCurveTo=function(e,t,n,r){return this._drawPendingPt(),this.addData(Yg.Q,e,t,n,r),this._ctx&&this._ctx.quadraticCurveTo(e,t,n,r),this._xi=n,this._yi=r,this},e.prototype.arc=function(e,t,n,r,i,a){this._drawPendingPt(),u_[0]=r,u_[1]=i,f_(u_,a),r=u_[0],i=u_[1];var o=i-r;return this.addData(Yg.A,e,t,n,n,r,o,0,+!a),this._ctx&&this._ctx.arc(e,t,n,r,i,a),this._xi=i_(i)*n+e,this._yi=a_(i)*n+t,this},e.prototype.arcTo=function(e,t,n,r,i){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,t,n,r,i),this},e.prototype.rect=function(e,t,n,r){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,t,n,r),this.addData(Yg.R,e,t,n,r),this},e.prototype.closePath=function(){this._drawPendingPt(),this.addData(Yg.Z);var e=this._ctx,t=this._x0,n=this._y0;return e&&e.closePath(),this._xi=t,this._yi=n,this},e.prototype.fill=function(e){e&&e.fill(),this.toStatic()},e.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},e.prototype.len=function(){return this._len},e.prototype.setData=function(e){if(this._saveData){var t=e.length;!(this.data&&this.data.length===t)&&l_&&(this.data=new Float32Array(t));for(var n=0;n<t;n++)this.data[n]=e[n];this._len=t}},e.prototype.appendPath=function(e){if(this._saveData){e instanceof Array||(e=[e]);for(var t=e.length,n=0,r=this._len,i=0;i<t;i++)n+=e[i].len();var a=this.data;if(l_&&(a instanceof Float32Array||!a)&&(this.data=new Float32Array(r+n),r>0&&a))for(var o=0;o<r;o++)this.data[o]=a[o];for(var i=0;i<t;i++)for(var s=e[i].data,o=0;o<s.length;o++)this.data[r++]=s[o];this._len=r}},e.prototype.addData=function(e,t,n,r,i,a,o,s,c){if(this._saveData){var l=this.data;this._len+arguments.length>l.length&&(this._expandData(),l=this.data);for(var u=0;u<arguments.length;u++)l[this._len++]=arguments[u]}},e.prototype._drawPendingPt=function(){this._pendingPtDist>0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},e.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],t=0;t<this._len;t++)e[t]=this.data[t];this.data=e}},e.prototype.toStatic=function(){if(this._saveData){this._drawPendingPt();var e=this.data;e instanceof Array&&(e.length=this._len,l_&&this._len>11&&(this.data=new Float32Array(e)))}},e.prototype.getBoundingRect=function(){Qg[0]=Qg[1]=e_[0]=e_[1]=Number.MAX_VALUE,$g[0]=$g[1]=t_[0]=t_[1]=-Number.MAX_VALUE;var e=this.data,t=0,n=0,r=0,i=0,a;for(a=0;a<this._len;){var o=e[a++],s=a===1;switch(s&&(t=e[a],n=e[a+1],r=t,i=n),o){case Yg.M:t=r=e[a++],n=i=e[a++],e_[0]=r,e_[1]=i,t_[0]=r,t_[1]=i;break;case Yg.L:Ug(t,n,e[a],e[a+1],e_,t_),t=e[a++],n=e[a++];break;case Yg.C:Kg(t,n,e[a++],e[a++],e[a++],e[a++],e[a],e[a+1],e_,t_),t=e[a++],n=e[a++];break;case Yg.Q:qg(t,n,e[a++],e[a++],e[a],e[a+1],e_,t_),t=e[a++],n=e[a++];break;case Yg.A:var c=e[a++],l=e[a++],u=e[a++],d=e[a++],f=e[a++],p=e[a++]+f;a+=1;var m=!e[a++];s&&(r=i_(f)*u+c,i=a_(f)*d+l),Jg(c,l,u,d,f,p,m,e_,t_),t=i_(p)*u+c,n=a_(p)*d+l;break;case Yg.R:r=t=e[a++],i=n=e[a++];var h=e[a++],g=e[a++];Ug(r,i,r+h,i+g,e_,t_);break;case Yg.Z:t=r,n=i;break}rp(Qg,Qg,e_),ip($g,$g,t_)}return a===0&&(Qg[0]=Qg[1]=$g[0]=$g[1]=0),new Z(Qg[0],Qg[1],$g[0]-Qg[0],$g[1]-Qg[1])},e.prototype._calculateLength=function(){var e=this.data,t=this._len,n=this._ux,r=this._uy,i=0,a=0,o=0,s=0;this._pathSegLen||=[];for(var c=this._pathSegLen,l=0,u=0,d=0;d<t;){var f=e[d++],p=d===1;p&&(i=e[d],a=e[d+1],o=i,s=a);var m=-1;switch(f){case Yg.M:i=o=e[d++],a=s=e[d++];break;case Yg.L:var h=e[d++],g=e[d++],_=h-i,v=g-a;(o_(_)>n||o_(v)>r||d===t-1)&&(m=Math.sqrt(_*_+v*v),i=h,a=g);break;case Yg.C:var y=e[d++],b=e[d++],h=e[d++],g=e[d++],x=e[d++],S=e[d++];m=Um(i,a,y,b,h,g,x,S,10),i=x,a=S;break;case Yg.Q:var y=e[d++],b=e[d++],h=e[d++],g=e[d++];m=Xm(i,a,y,b,h,g,10),i=h,a=g;break;case Yg.A:var C=e[d++],w=e[d++],T=e[d++],E=e[d++],D=e[d++],O=e[d++],k=O+D;d+=1,p&&(o=i_(D)*T+C,s=a_(D)*E+w),m=r_(T,E)*n_(c_,Math.abs(O)),i=i_(k)*T+C,a=a_(k)*E+w;break;case Yg.R:o=i=e[d++],s=a=e[d++];var A=e[d++],j=e[d++];m=A*2+j*2;break;case Yg.Z:var _=o-i,v=s-a;m=Math.sqrt(_*_+v*v),i=o,a=s;break}m>=0&&(c[u++]=m,l+=m)}return this._pathLen=l,l},e.prototype.rebuildPath=function(e,t){var n=this.data,r=this._ux,i=this._uy,a=this._len,o,s,c,l,u,d,f=t<1,p,m,h=0,g=0,_,v=0,y,b;if(!(f&&(this._pathSegLen||this._calculateLength(),p=this._pathSegLen,m=this._pathLen,_=t*m,!_)))lo:for(var x=0;x<a;){var S=n[x++],C=x===1;switch(C&&(c=n[x],l=n[x+1],o=c,s=l),S!==Yg.L&&v>0&&(e.lineTo(y,b),v=0),S){case Yg.M:o=c=n[x++],s=l=n[x++],e.moveTo(c,l);break;case Yg.L:u=n[x++],d=n[x++];var w=o_(u-c),T=o_(d-l);if(w>r||T>i){if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;e.lineTo(c*(1-D)+u*D,l*(1-D)+d*D);break lo}h+=E}e.lineTo(u,d),c=u,l=d,v=0}else{var O=w*w+T*T;O>v&&(y=u,b=d,v=O)}break;case Yg.C:var k=n[x++],A=n[x++],j=n[x++],M=n[x++],N=n[x++],P=n[x++];if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;Vm(c,k,j,N,D,Xg),Vm(l,A,M,P,D,Zg),e.bezierCurveTo(Xg[1],Zg[1],Xg[2],Zg[2],Xg[3],Zg[3]);break lo}h+=E}e.bezierCurveTo(k,A,j,M,N,P),c=N,l=P;break;case Yg.Q:var k=n[x++],A=n[x++],j=n[x++],M=n[x++];if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;Jm(c,k,j,D,Xg),Jm(l,A,M,D,Zg),e.quadraticCurveTo(Xg[1],Zg[1],Xg[2],Zg[2]);break lo}h+=E}e.quadraticCurveTo(k,A,j,M),c=j,l=M;break;case Yg.A:var ee=n[x++],te=n[x++],ne=n[x++],re=n[x++],ie=n[x++],ae=n[x++],oe=n[x++],se=!n[x++],ce=ne>re?ne:re,le=o_(ne-re)>.001,ue=ie+ae,F=!1;if(f){var E=p[g++];h+E>_&&(ue=ie+ae*(_-h)/E,F=!0),h+=E}if(le&&e.ellipse?e.ellipse(ee,te,ne,re,oe,ie,ue,se):e.arc(ee,te,ce,ie,ue,se),F)break lo;C&&(o=i_(ie)*ne+ee,s=a_(ie)*re+te),c=i_(ue)*ne+ee,l=a_(ue)*re+te;break;case Yg.R:o=c=n[x],s=l=n[x+1],u=n[x++],d=n[x++];var de=n[x++],fe=n[x++];if(f){var E=p[g++];if(h+E>_){var pe=_-h;e.moveTo(u,d),e.lineTo(u+n_(pe,de),d),pe-=de,pe>0&&e.lineTo(u+de,d+n_(pe,fe)),pe-=fe,pe>0&&e.lineTo(u+r_(de-pe,0),d+fe),pe-=de,pe>0&&e.lineTo(u,d+r_(fe-pe,0));break lo}h+=E}e.rect(u,d,de,fe);break;case Yg.Z:if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;e.lineTo(c*(1-D)+o*D,l*(1-D)+s*D);break lo}h+=E}e.closePath(),c=o,l=s}}},e.prototype.clone=function(){var t=new e,n=this.data;return t.data=n.slice?n.slice():Array.prototype.slice.call(n),t._len=this._len,t},e.prototype.canSave=function(){return!!this._saveData},e.CMD=Yg,e.initDefaultProps=(function(){var t=e.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0})(),e}();function m_(e,t,n,r,i,a,o){if(i===0)return!1;var s=i,c=0,l=e;if(o>t+s&&o>r+s||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;var u=c*a-o+l;return u*u/(c*c+1)<=s/2*s/2}function h_(e,t,n,r,i,a,o,s,c,l,u){if(c===0)return!1;var 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:Hm(e,t,n,r,i,a,o,s,l,u,null)<=d/2}function g_(e,t,n,r,i,a,o,s,c){if(o===0)return!1;var 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:Ym(e,t,n,r,i,a,s,c,null)<=l/2}var __=Math.PI*2;function v_(e){return e%=__,e<0&&(e+=__),e}var y_=Math.PI*2;function b_(e,t,n,r,i,a,o,s,c){if(o===0)return!1;var l=o;s-=e,c-=t;var u=Math.sqrt(s*s+c*c);if(u-l>n||u+l<n)return!1;if(Math.abs(r-i)%y_<1e-4)return!0;if(a){var d=r;r=v_(i),i=v_(d)}else r=v_(r),i=v_(i);r>i&&(i+=y_);var f=Math.atan2(c,s);return f<0&&(f+=y_),f>=r&&f<=i||f+y_>=r&&f+y_<=i}function x_(e,t,n,r,i,a){if(a>t&&a>r||a<t&&a<r||r===t)return 0;var o=(a-t)/(r-t),s=r<t?1:-1;(o===1||o===0)&&(s=r<t?.5:-.5);var c=o*(n-e)+e;return c===i?1/0:c>i?s:0}var S_=p_.CMD,C_=Math.PI*2,w_=1e-4;function T_(e,t){return Math.abs(e-t)<w_}var E_=[-1,-1,-1],D_=[-1,-1];function O_(){var e=D_[0];D_[0]=D_[1],D_[1]=e}function k_(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;var u=zm(t,r,a,s,l,E_);if(u===0)return 0;for(var d=0,f=-1,p=void 0,m=void 0,h=0;h<u;h++){var g=E_[h],_=g===0||g===1?.5:1;Lm(e,n,i,o,g)<c||(f<0&&(f=Bm(t,r,a,s,D_),D_[1]<D_[0]&&f>1&&O_(),p=Lm(t,r,a,s,D_[0]),f>1&&(m=Lm(t,r,a,s,D_[1]))),f===2?g<D_[0]?d+=p<t?_:-_:g<D_[1]?d+=m<p?_:-_:d+=s<m?_:-_:g<D_[0]?d+=p<t?_:-_:d+=s<p?_:-_)}return d}function A_(e,t,n,r,i,a,o,s){if(s>t&&s>r&&s>a||s<t&&s<r&&s<a)return 0;var c=Km(t,r,a,s,E_);if(c===0)return 0;var l=qm(t,r,a);if(l>=0&&l<=1){for(var u=0,d=Wm(t,r,a,l),f=0;f<c;f++){var p=E_[f]===0||E_[f]===1?.5:1,m=Wm(e,n,i,E_[f]);m<o||(E_[f]<l?u+=d<t?p:-p:u+=a<d?p:-p)}return u}else{var p=E_[0]===0||E_[0]===1?.5:1,m=Wm(e,n,i,E_[0]);return m<o?0:a<t?p:-p}}function j_(e,t,n,r,i,a,o,s){if(s-=t,s>n||s<-n)return 0;var c=Math.sqrt(n*n-s*s);E_[0]=-c,E_[1]=c;var l=Math.abs(r-i);if(l<1e-4)return 0;if(l>=C_-1e-4){r=0,i=C_;var u=a?1:-1;return o>=E_[0]+e&&o<=E_[1]+e?u:0}if(r>i){var d=r;r=i,i=d}r<0&&(r+=C_,i+=C_);for(var f=0,p=0;p<2;p++){var m=E_[p];if(m+e>o){var h=Math.atan2(s,m),u=a?1:-1;h<0&&(h=C_+h),(h>=r&&h<=i||h+C_>=r&&h+C_<=i)&&(h>Math.PI/2&&h<Math.PI*1.5&&(u=-u),f+=u)}}return f}function M_(e,t,n,r,i){for(var a=e.data,o=e.len(),s=0,c=0,l=0,u=0,d=0,f,p,m=0;m<o;){var h=a[m++],g=m===1;switch(h===S_.M&&m>1&&(n||(s+=x_(c,l,u,d,r,i))),g&&(c=a[m],l=a[m+1],u=c,d=l),h){case S_.M:u=a[m++],d=a[m++],c=u,l=d;break;case S_.L:if(n){if(m_(c,l,a[m],a[m+1],t,r,i))return!0}else s+=x_(c,l,a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case S_.C:if(n){if(h_(c,l,a[m++],a[m++],a[m++],a[m++],a[m],a[m+1],t,r,i))return!0}else s+=k_(c,l,a[m++],a[m++],a[m++],a[m++],a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case S_.Q:if(n){if(g_(c,l,a[m++],a[m++],a[m],a[m+1],t,r,i))return!0}else s+=A_(c,l,a[m++],a[m++],a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case S_.A:var _=a[m++],v=a[m++],y=a[m++],b=a[m++],x=a[m++],S=a[m++];m+=1;var C=!!(1-a[m++]);f=Math.cos(x)*y+_,p=Math.sin(x)*b+v,g?(u=f,d=p):s+=x_(c,l,f,p,r,i);var w=(r-_)*b/y+_;if(n){if(b_(_,v,b,x,x+S,C,t,w,i))return!0}else s+=j_(_,v,b,x,x+S,C,w,i);c=Math.cos(x+S)*y+_,l=Math.sin(x+S)*b+v;break;case S_.R:u=c=a[m++],d=l=a[m++];var T=a[m++],E=a[m++];if(f=u+T,p=d+E,n){if(m_(u,d,f,d,t,r,i)||m_(f,d,f,p,t,r,i)||m_(f,p,u,p,t,r,i)||m_(u,p,u,d,t,r,i))return!0}else s+=x_(f,d,f,p,r,i),s+=x_(u,p,u,d,r,i);break;case S_.Z:if(n){if(m_(c,l,u,d,t,r,i))return!0}else s+=x_(c,l,u,d,r,i);c=u,l=d;break}}return!n&&!T_(l,d)&&(s+=x_(c,l,u,d,r,i)||0),s!==0}function N_(e,t,n){return M_(e,0,!1,t,n)}function P_(e,t,n,r){return M_(e,t,!0,n,r)}var F_=sd({fill:`#000`,stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:`butt`,miterLimit:10,strokeNoScale:!1,strokeFirst:!1},Eg),I_={style:sd({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},Dg.style)},L_=Cm.concat([`invisible`,`culling`,`z`,`z2`,`zlevel`,`parent`]),R_=function(e){z(t,e);function t(t){return e.call(this,t)||this}return t.prototype.update=function(){var n=this;e.prototype.update.call(this);var r=this.style;if(r.decal){var i=this._decalEl=this._decalEl||new t;i.buildPath===t.prototype.buildPath&&(i.buildPath=function(e){n.buildPath(e,n.shape)}),i.silent=!0;var a=i.style;for(var o in r)a[o]!==r[o]&&(a[o]=r[o]);a.fill=r.fill?r.decal:null,a.decal=null,a.shadowColor=null,r.strokeFirst&&(a.stroke=null);for(var s=0;s<L_.length;++s)i[L_[s]]=this[L_[s]];i.__dirty|=1}else this._decalEl&&=null},t.prototype.getDecalElement=function(){return this._decalEl},t.prototype._init=function(t){var n=gd(t);this.shape=this.getDefaultShape();var r=this.getDefaultStyle();r&&this.useStyle(r);for(var i=0;i<n.length;i++){var a=n[i],o=t[a];a===`style`?this.style?V(this.style,o):this.useStyle(o):a===`shape`?V(this.shape,o):e.prototype.attrKV.call(this,a,o)}this.style||this.useStyle({})},t.prototype.getDefaultStyle=function(){return null},t.prototype.getDefaultShape=function(){return{}},t.prototype.canBeInsideText=function(){return this.hasFill()},t.prototype.getInsideTextFill=function(){var e=this.style.fill;if(e!==`none`){if(K(e)){var t=Eh(e,0);return t>.5?ag:t>.2?sg:og}else if(e)return og}return ag},t.prototype.getInsideTextStroke=function(e){var t=this.style.fill;if(K(t)){var n=this.__zr;if(!!(n&&n.isDarkMode())==Eh(e,0)<.4)return t}},t.prototype.buildPath=function(e,t,n){},t.prototype.pathUpdated=function(){this.__dirty&=-5},t.prototype.getUpdatedPathProxy=function(e){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,e),this.path},t.prototype.createPathProxy=function(){this.path=new p_(!1)},t.prototype.hasStroke=function(){var e=this.style,t=e.stroke;return!(t==null||t===`none`||!(e.lineWidth>0))},t.prototype.hasFill=function(){var e=this.style.fill;return e!=null&&e!==`none`},t.prototype.getBoundingRect=function(){var e=this._rect,t=this.style,n=!e;if(n){var r=!1;this.path||(r=!0,this.createPathProxy());var i=this.path;(r||this.__dirty&4)&&(i.beginPath(),this.buildPath(i,this.shape,!1),this.pathUpdated()),e=i.getBoundingRect()}if(this._rect=e,this.hasStroke()&&this.path&&this.path.len()>0){var a=this._rectStroke||=e.clone();if(this.__dirty||n){a.copy(e);var o=t.strokeNoScale?this.getLineScale():1,s=t.lineWidth;if(!this.hasFill()){var c=this.strokeContainThreshold;s=Math.max(s,c??4)}o>1e-10&&(a.width+=s/o,a.height+=s/o,a.x-=s/o/2,a.y-=s/o/2)}return a}return e},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t),r=this.getBoundingRect(),i=this.style;if(e=n[0],t=n[1],r.contain(e,t)){var a=this.path;if(this.hasStroke()){var o=i.lineWidth,s=i.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(this.hasFill()||(o=Math.max(o,this.strokeContainThreshold)),P_(a,o/s,e,t)))return!0}if(this.hasFill())return N_(a,e,t)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=4,this._rect&&=null,this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},t.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},t.prototype.animateShape=function(e){return this.animate(`shape`,e)},t.prototype.updateDuringAnimation=function(e){e===`style`?this.dirtyStyle():e===`shape`?this.dirtyShape():this.markRedraw()},t.prototype.attrKV=function(t,n){t===`shape`?this.setShape(n):e.prototype.attrKV.call(this,t,n)},t.prototype.setShape=function(e,t){var n=this.shape;return n||=this.shape={},typeof e==`string`?n[e]=t:V(n,e),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(this.__dirty&4)},t.prototype.createStyle=function(e){return Ud(F_,e)},t.prototype._innerSaveToNormal=function(t){e.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.shape&&!n.shape&&(n.shape=V({},this.shape))},t.prototype._applyStateObj=function(t,n,r,i,a,o){if(e.prototype._applyStateObj.call(this,t,n,r,i,a,o),this.__inHover!==1){var s=!(n&&i),c;if(n&&n.shape?a?i?c=n.shape:(c=V({},r.shape),V(c,n.shape)):(c=V({},i?this.shape:r.shape),V(c,n.shape)):s&&(c=r.shape),c)if(a){this.shape=V({},this.shape);for(var l={},u=gd(c),d=0;d<u.length;d++){var f=u[d];typeof c[f]==`object`?this.shape[f]=c[f]:l[f]=c[f]}this._transitionState(t,{shape:l},o)}else this.shape=c,this.dirtyShape()}},t.prototype._mergeStates=function(t){for(var n=e.prototype._mergeStates.call(this,t),r,i=0;i<t.length;i++){var a=t[i];a.shape&&(r||={},this._mergeStyle(r,a.shape))}return r&&(n.shape=r),n},t.prototype.getAnimationStyleProps=function(){return I_},t.prototype.isZeroArea=function(){return!1},t.extend=function(e){var n=function(t){z(n,t);function n(n){var r=t.call(this,n)||this;return e.init&&e.init.call(r,n),r}return n.prototype.getDefaultStyle=function(){return B(e.style)},n.prototype.getDefaultShape=function(){return B(e.shape)},n}(t);for(var r in e)typeof e[r]==`function`&&(n.prototype[r]=e[r]);return n},t.initDefaultProps=(function(){var e=t.prototype;e.type=`path`,e.strokeContainThreshold=5,e.segmentIgnoreThreshold=0,e.subPixelOptimize=!1,e.autoBatch=!1,e.__dirty=7})(),t}(Ag),z_=sd({strokeFirst:!0,font:Pu,x:0,y:0,textAlign:`left`,textBaseline:`top`,miterLimit:2},F_),B_=function(e){z(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.hasStroke=function(){return fm(this.style)},t.prototype.hasFill=function(){var e=this.style.fill;return e!=null&&e!==`none`},t.prototype.createStyle=function(e){return Ud(z_,e)},t.prototype.setBoundingRect=function(e){this._rect=e},t.prototype.getBoundingRect=function(){return this._rect||=um(this.style),this._rect},t.initDefaultProps=(function(){var e=t.prototype;e.dirtyRectTolerance=10})(),t}(Ag);B_.prototype.type=`tspan`;var V_=sd({x:0,y:0},Eg),H_={style:sd({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},Dg.style)};function U_(e){return!!(e&&typeof e!=`string`&&e.width&&e.height)}var W_=function(e){z(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.createStyle=function(e){return Ud(V_,e)},t.prototype._getSize=function(e){var t=this.style,n=t[e];if(n!=null)return n;var r=U_(t.image)?t.image:this.__image;if(!r)return 0;var i=e===`width`?`height`:`width`,a=t[i];return a==null?r[e]:r[e]/r[i]*a},t.prototype.getWidth=function(){return this._getSize(`width`)},t.prototype.getHeight=function(){return this._getSize(`height`)},t.prototype.getAnimationStyleProps=function(){return H_},t.prototype.getBoundingRect=function(){var e=this.style;return this._rect||=new Z(e.x||0,e.y||0,this.getWidth(),this.getHeight()),this._rect},t}(Ag);W_.prototype.type=`image`;function G_(e,t){var 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;var 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()}var K_=Math.round;function q_(e,t,n){if(t){var r=t.x1,i=t.x2,a=t.y1,o=t.y2;e.x1=r,e.x2=i,e.y1=a,e.y2=o;var s=n&&n.lineWidth;return s?(K_(r*2)===K_(i*2)&&(e.x1=e.x2=Y_(r,s,!0)),K_(a*2)===K_(o*2)&&(e.y1=e.y2=Y_(a,s,!0)),e):e}}function J_(e,t,n){if(t){var r=t.x,i=t.y,a=t.width,o=t.height;e.x=r,e.y=i,e.width=a,e.height=o;var s=n&&n.lineWidth;return s?(e.x=Y_(r,s,!0),e.y=Y_(i,s,!0),e.width=Math.max(Y_(r+a,s,!1)-e.x,a===0?0:1),e.height=Math.max(Y_(i+o,s,!1)-e.y,o===0?0:1),e):e}}function Y_(e,t,n){if(!t)return e;var r=K_(e*2);return(r+K_(t))%2==0?r/2:(r+(n?1:-1))/2}var X_=function(){function e(){this.x=0,this.y=0,this.width=0,this.height=0}return e}(),Z_={},Q_=function(e){z(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new X_},t.prototype.buildPath=function(e,t){var n,r,i,a;if(this.subPixelOptimize){var o=J_(Z_,t,this.style);n=o.x,r=o.y,i=o.width,a=o.height,o.r=t.r,t=o}else n=t.x,r=t.y,i=t.width,a=t.height;t.r?G_(e,t):e.rect(n,r,i,a)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t}(R_);Q_.prototype.type=`rect`;var $_={fill:`#000`},ev=2,tv={},nv={style:sd({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},Dg.style)},rv=function(e){z(t,e);function t(t){var n=e.call(this)||this;return n.type=`text`,n._children=[],n._defaultStyle=$_,n.attr(t),n}return t.prototype.childrenRef=function(){return this._children},t.prototype.update=function(){e.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var t=0;t<this._children.length;t++){var n=this._children[t];n.zlevel=this.zlevel,n.z=this.z,n.z2=this.z2,n.culling=this.culling,n.cursor=this.cursor,n.invisible=this.invisible}},t.prototype.updateTransform=function(){var t=this.innerTransformable;t?(t.updateTransform(),t.transform&&(this.transform=t.transform)):e.prototype.updateTransform.call(this)},t.prototype.getLocalTransform=function(t){var n=this.innerTransformable;return n?n.getLocalTransform(t):e.prototype.getLocalTransform.call(this,t)},t.prototype.getComputedTransform=function(){return this.__hostTarget&&(this.__hostTarget.getComputedTransform(),this.__hostTarget.updateInnerText(!0)),e.prototype.getComputedTransform.call(this)},t.prototype._updateSubTexts=function(){this._childCursor=0,uv(this.style),this.style.rich?this._updateRichTexts():this._updatePlainTexts(),this._children.length=this._childCursor,this.styleUpdated()},t.prototype.addSelfToZr=function(t){e.prototype.addSelfToZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].__zr=t},t.prototype.removeSelfFromZr=function(t){e.prototype.removeSelfFromZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].__zr=null},t.prototype.getBoundingRect=function(){if(this.styleChanged()&&this._updateSubTexts(),!this._rect){for(var e=new Z(0,0,0,0),t=this._children,n=[],r=null,i=0;i<t.length;i++){var a=t[i],o=a.getBoundingRect(),s=a.getLocalTransform(n);s?(e.copy(o),e.applyTransform(s),r||=e.clone(),r.union(e)):(r||=o.clone(),r.union(o))}this._rect=r||e}return this._rect},t.prototype.setDefaultTextStyle=function(e){this._defaultStyle=e||$_},t.prototype.setTextContent=function(e){},t.prototype._mergeStyle=function(e,t){if(!t)return e;var n=t.rich,r=e.rich||n&&{};return V(e,t),n&&r?(this._mergeRich(r,n),e.rich=r):r&&(e.rich=r),e},t.prototype._mergeRich=function(e,t){for(var n=gd(t),r=0;r<n.length;r++){var i=n[r];e[i]=e[i]||{},V(e[i],t[i])}},t.prototype.getAnimationStyleProps=function(){return nv},t.prototype._getOrCreateChild=function(e){var 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},t.prototype._updatePlainTexts=function(){var e=this.style,t=e.font||`12px sans-serif`,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`;om(tv,r.overflowRect,i,a,o,s),i=tv.baseX,a=tv.baseY;var c=Xp(hv(e),e,tv.outerWidth,tv.outerHeight),l=gv(e),u=!!e.backgroundColor,d=c.outerHeight,f=c.outerWidth,p=c.lines,m=c.lineHeight;this.isTruncated=!!c.isTruncated;var h=i,g=Bp(a,c.contentHeight,s);if(l||n){var _=zp(i,f,o),v=Bp(a,d,s);l&&this._renderBackground(e,e,_,v,f,d)}g+=m/2,n&&(h=mv(i,o,n),s===`top`?g+=n[0]:s===`bottom`&&(g-=n[2]));for(var y=0,b=!1,x=!1,S=pv(`fill`in e?e.fill:(x=!0,r.fill)),C=fv(`stroke`in e?e.stroke:!u&&(!r.autoStroke||x)?(y=ev,b=!0,r.stroke):null),w=e.textShadowBlur>0,T=0;T<p.length;T++){var E=this._getOrCreateChild(B_),D=E.createStyle();E.useStyle(D),D.text=p[T],D.x=h,D.y=g,o&&(D.textAlign=o),D.textBaseline=`middle`,D.opacity=e.opacity,D.strokeFirst=!0,w&&(D.shadowBlur=e.textShadowBlur||0,D.shadowColor=e.textShadowColor||`transparent`,D.shadowOffsetX=e.textShadowOffsetX||0,D.shadowOffsetY=e.textShadowOffsetY||0),D.stroke=C,D.fill=S,C&&(D.lineWidth=e.lineWidth||y,D.lineDash=e.lineDash,D.lineDashOffset=e.lineDashOffset||0),D.font=t,cv(D,e),g+=m,E.setBoundingRect(dm(D,c.contentWidth,c.calculatedLineHeight,b?0:null))}},t.prototype._updateRichTexts=function(){var e=this.style,t=this._defaultStyle,n=e.align||t.align,r=e.verticalAlign||t.verticalAlign,i=e.x||0,a=e.y||0;om(tv,t.overflowRect,i,a,n,r),i=tv.baseX,a=tv.baseY;var o=em(hv(e),e,tv.outerWidth,tv.outerHeight,n),s=o.width,c=o.outerWidth,l=o.outerHeight,u=e.padding;this.isTruncated=!!o.isTruncated;var d=zp(i,c,n),f=Bp(a,l,r),p=d,m=f;u&&(p+=u[3],m+=u[0]);var h=p+s;gv(e)&&this._renderBackground(e,e,d,f,c,l);for(var g=!!e.backgroundColor,_=0;_<o.lines.length;_++){for(var v=o.lines[_],y=v.tokens,b=y.length,x=v.lineHeight,S=v.width,C=0,w=p,T=h,E=b-1,D=void 0;C<b&&(D=y[C],!D.align||D.align===`left`);)this._placeToken(D,e,x,m,w,`left`,g),S-=D.width,w+=D.width,C++;for(;E>=0&&(D=y[E],D.align===`right`);)this._placeToken(D,e,x,m,T,`right`,g),S-=D.width,T-=D.width,E--;for(w+=(s-(w-p)-(h-T)-S)/2;C<=E;)D=y[C],this._placeToken(D,e,x,m,w+D.width/2,`center`,g),w+=D.width,C++;m+=x}},t.prototype._placeToken=function(e,t,n,r,i,a,o){var s=t.rich[e.styleName]||{};s.text=e.text;var c=e.verticalAlign,l=r+n/2;c===`top`?l=r+e.height/2:c===`bottom`&&(l=r+n-e.height/2),!e.isLineHolder&&gv(s)&&this._renderBackground(s,t,a===`right`?i-e.width:a===`center`?i-e.width/2:i,l-e.height/2,e.width,e.height);var u=!!s.backgroundColor,d=e.textPadding;d&&(i=mv(i,a,d),l-=e.height/2-d[0]-e.innerHeight/2);var f=this._getOrCreateChild(B_),p=f.createStyle();f.useStyle(p);var m=this._defaultStyle,h=!1,g=0,_=!1,v=pv(`fill`in s?s.fill:`fill`in t?t.fill:(h=!0,m.fill)),y=fv(`stroke`in s?s.stroke:`stroke`in t?t.stroke:!u&&!o&&(!m.autoStroke||h)?(g=ev,_=!0,m.stroke):null),b=s.textShadowBlur>0||t.textShadowBlur>0;p.text=e.text,p.x=i,p.y=l,b&&(p.shadowBlur=s.textShadowBlur||t.textShadowBlur||0,p.shadowColor=s.textShadowColor||t.textShadowColor||`transparent`,p.shadowOffsetX=s.textShadowOffsetX||t.textShadowOffsetX||0,p.shadowOffsetY=s.textShadowOffsetY||t.textShadowOffsetY||0),p.textAlign=a,p.textBaseline=`middle`,p.font=e.font||`12px sans-serif`,p.opacity=Ad(s.opacity,t.opacity,1),cv(p,s),y&&(p.lineWidth=Ad(s.lineWidth,t.lineWidth,g),p.lineDash=J(s.lineDash,t.lineDash),p.lineDashOffset=t.lineDashOffset||0,p.stroke=y),v&&(p.fill=v),f.setBoundingRect(dm(p,e.contentWidth,e.contentHeight,_?0:null))},t.prototype._renderBackground=function(e,t,n,r,i,a){var o=e.backgroundColor,s=e.borderWidth,c=e.borderColor,l=o&&o.image,u=o&&!l,d=e.borderRadius,f=this,p,m;if(u||e.lineHeight||s&&c){p=this._getOrCreateChild(Q_),p.useStyle(p.createStyle()),p.style.fill=null;var h=p.shape;h.x=n,h.y=r,h.width=i,h.height=a,h.r=d,p.dirtyShape()}if(u){var g=p.style;g.fill=o||null,g.fillOpacity=J(e.fillOpacity,1)}else if(l){m=this._getOrCreateChild(W_),m.onload=function(){f.dirtyStyle()};var _=m.style;_.image=o.image,_.x=n,_.y=r,_.width=i,_.height=a}if(s&&c){var g=p.style;g.lineWidth=s,g.stroke=c,g.strokeOpacity=J(e.strokeOpacity,1),g.lineDash=e.borderDash,g.lineDashOffset=e.borderDashOffset||0,p.strokeContainThreshold=0,p.hasFill()&&p.hasStroke()&&(g.strokeFirst=!0,g.lineWidth*=2)}var v=(p||m).style;v.shadowBlur=e.shadowBlur||0,v.shadowColor=e.shadowColor||`transparent`,v.shadowOffsetX=e.shadowOffsetX||0,v.shadowOffsetY=e.shadowOffsetY||0,v.opacity=Ad(e.opacity,t.opacity,1)},t.makeFont=function(e){var t=``;return lv(e)&&(t=[e.fontStyle,e.fontWeight,sv(e.fontSize),e.fontFamily||`sans-serif`].join(` `)),t&&Pd(t)||e.textFont||e.font},t}(Ag),iv={left:!0,right:1,center:1},av={top:1,bottom:1,middle:1},ov=[`fontStyle`,`fontWeight`,`fontSize`,`fontFamily`];function sv(e){return typeof e==`string`&&(e.indexOf(`px`)!==-1||e.indexOf(`rem`)!==-1||e.indexOf(`em`)!==-1)?e:isNaN(+e)?`12px`:e+`px`}function cv(e,t){for(var n=0;n<ov.length;n++){var r=ov[n],i=t[r];i!=null&&(e[r]=i)}}function lv(e){return e.fontSize!=null||e.fontFamily||e.fontWeight}function uv(e){return dv(e),H(e.rich,dv),e}function dv(e){if(e){e.font=rv.makeFont(e);var t=e.align;t===`middle`&&(t=`center`),e.align=t==null||iv[t]?t:`left`;var n=e.verticalAlign;n===`center`&&(n=`middle`),e.verticalAlign=n==null||av[n]?n:`top`,e.padding&&=Md(e.padding)}}function fv(e,t){return e==null||t<=0||e===`transparent`||e===`none`?null:e.image||e.colorStops?`#000`:e}function pv(e){return e==null||e===`none`?null:e.image||e.colorStops?`#000`:e}function mv(e,t,n){return t===`right`?e-n[1]:t===`center`?e+n[3]/2-n[1]/2:e+n[3]}function hv(e){var t=e.text;return t!=null&&(t+=``),t}function gv(e){return!!(e.backgroundColor||e.lineHeight||e.borderWidth&&e.borderColor)}var _v=1e-4,vv=20;function yv(e){return e.replace(/^\s+|\s+$/g,``)}var bv=Math.min,xv=Math.max,Sv=Math.abs,Cv=Math.round,wv=Math.floor,Tv=Math.ceil,Ev=Math.pow,Dv=Math.log,Ov=Math.LN10,kv=Math.PI,Av=Math.random;function jv(e,t,n,r){var 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}var Mv=Nv;function Nv(e,t,n){switch(e){case`center`:case`middle`:e=`50%`;break;case`left`:case`top`:e=`0%`;break;case`right`:case`bottom`:e=`100%`;break}return Pv(e,t,n)}function Pv(e,t,n){return K(e)?Iv(e)?parseFloat(e)/100*t+(n||0):parseFloat(e):e==null?NaN:+e}function Fv(e){return K(e)&&Iv(e)}function Iv(e){return!!yv(e).match(/%$/)}function Lv(e,t,n){return isNaN(t)?n?``+e:+e:(t=bv(xv(0,t),vv),e=(+e).toFixed(t),n?e:+e)}function Rv(e,t,n){return t??=10,Lv(e,t,n)}function zv(e){return e.sort(function(e,t){return e-t}),e}function Bv(e){if(e=+e,isNaN(e))return 0;if(e>1e-14){for(var t=1,n=0;n<15;n++,t*=10)if(Cv(e*t)/t===e)return n}return Vv(e)}function Vv(e){var t=e.toString().toLowerCase(),n=t.indexOf(`e`),r=n>0?+t.slice(n+1):0,i=n>0?n:t.length,a=t.indexOf(`.`);return xv(0,(a<0?0:i-1-a)-r)}function Hv(e,t){var n=wv(Dv(e[1]-e[0])/Ov),r=Cv(Dv(Sv(t[1]-t[0]))/Ov),i=bv(xv(-n+r,0),vv);return isFinite(i)?i:vv}function Uv(e,t,n){var r=Sv(e[1]-e[0]);if(!isFinite(r)||r===0)return NaN;var i=Dv(2*Sv(n||1)*Sv(r))/Ov,a=Dv(Sv(t))/Ov,o=xv(0,Tv(-i+a));return isFinite(o)||(o=NaN),o}function Wv(e,t,n){return e[t]&&Gv(e,n)[t]||0}function Gv(e,t){var n=pd(e,function(e,t){return e+(isNaN(t)?0:t)},0);if(n===0)return[];for(var r=Ev(10,t),i=U(e,function(e){return(isNaN(e)?0:e)/n*r*100}),a=r*100,o=U(i,function(e){return wv(e)}),s=pd(o,function(e,t){return e+t},0),c=U(i,function(e,t){return e-o[t]});s<a;){for(var l=-1/0,u=null,d=0,f=c.length;d<f;++d)c[d]>l&&(l=c[d],u=d);++o[u],c[u]=0,++s}return U(o,function(e){return e/r})}function Kv(e,t){var n=xv(Bv(e),Bv(t)),r=e+t;return n>vv?r:Lv(r,n)}var qv=Ev(2,53)-1;function Jv(e){var t=kv*2;return(e%t+t)%t}function Yv(e){return e>-_v&&e<_v}var Xv=/^(?:(\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 Zv(e){if(e instanceof Date)return e;if(K(e)){var t=Xv.exec(e);if(!t)return new Date(NaN);if(t[8]){var n=+t[4]||0;return t[8].toUpperCase()!==`Z`&&(n-=+t[8].slice(0,3)),new Date(Date.UTC(+t[1],(t[2]||1)-1,+t[3]||1,n,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0))}else 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)}else if(e==null)return new Date(NaN);return new Date(Cv(e))}function Qv(e){return Ev(10,$v(e))}function $v(e){if(e===0)return 0;var t=wv(Dv(e)/Ov);return e/Ev(10,t)>=10&&t++,t}function ey(e,t){var n=$v(e),r=Ev(10,n),i=e/r;return e=(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)*r,Lv(e,-n)}function ty(e,t){var n=(e.length-1)*t+1,r=wv(n),i=+e[r-1],a=n-r;return a?i+a*(e[r]-i):i}function ny(e){e.sort(function(e,t){return s(e,t,0)?-1:1});for(var t=-1/0,n=1,r=0;r<e.length;){for(var i=e[r].interval,a=e[r].close,o=0;o<2;o++)i[o]<=t&&(i[o]=t,a[o]=o?1:1-n),t=i[o],n=a[o];i[0]===i[1]&&a[0]*a[1]!==1?e.splice(r,1):r++}return e;function s(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&&s(e,t,1))}}function ry(e){var t=parseFloat(e);return t==e&&(t!==0||!K(e)||e.indexOf(`x`)<=0)?t:NaN}function iy(e){return!isNaN(ry(e))}function ay(){return Cv(Av()*9)}function oy(e,t){return t===0?e:oy(t,e%t)}function sy(e,t){return e==null?t:t==null?e:e*t/oy(e,t)}function cy(e){return e!=null&&isFinite(e)}var ly=`[ECharts] `,uy={},dy=typeof console<`u`&&console.warn&&console.log;function fy(e,t,n){if(dy){if(n){if(uy[t])return;uy[t]=!0}console[e](ly+t)}}function py(e,t){fy(`error`,e,t)}function my(e){throw Error(e)}function hy(e,t,n){return(t-e)*n+e}var gy=`series\0`,_y=`\0_ec_\0`;function vy(e){return e instanceof Array?e:e==null?[]:[e]}function yy(e,t,n){if(e){e[t]=e[t]||{},e.emphasis=e.emphasis||{},e.emphasis[t]=e.emphasis[t]||{};for(var r=0,i=n.length;r<i;r++){var a=n[r];!e.emphasis[t].hasOwnProperty(a)&&e[t].hasOwnProperty(a)&&(e.emphasis[t][a]=e[t][a])}}}var by=`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 xy(e){return q(e)&&!W(e)&&!(e instanceof Date)?e.value:e}function Sy(e){return q(e)&&!(e instanceof Array)}function Cy(e,t,n){var r=n===`normalMerge`,i=n===`replaceMerge`,a=n===`replaceAll`;e||=[],t=(t||[]).slice();var o=Y();H(t,function(e,n){if(!q(e)){t[n]=null;return}});var s=wy(e,o,n);return(r||i)&&Ty(s,e,o,t),r&&Ey(s,t),r||i?Dy(s,t,i):a&&Oy(s,t),ky(s),s}function wy(e,t,n){var r=[];if(n===`replaceAll`)return r;for(var i=0;i<e.length;i++){var a=e[i];a&&a.id!=null&&t.set(a.id,i),r.push({existing:n===`replaceMerge`||Py(a)?null:a,newOption:null,keyInfo:null,brandNew:null})}return r}function Ty(e,t,n,r){H(r,function(i,a){if(!(!i||i.id==null)){var o=jy(i.id),s=n.get(o);if(s!=null){var c=e[s];Nd(!c.newOption,`Duplicated option on id "`+o+`".`),c.newOption=i,c.existing=t[s],r[a]=null}}})}function Ey(e,t){H(t,function(n,r){if(!(!n||n.name==null))for(var i=0;i<e.length;i++){var a=e[i].existing;if(!e[i].newOption&&a&&(a.id==null||n.id==null)&&!Py(n)&&!Py(a)&&Ay(`name`,a,n)){e[i].newOption=n,t[r]=null;return}}})}function Dy(e,t,n){H(t,function(t){if(t){for(var r,i=0;(r=e[i])&&(r.newOption||Py(r.existing)||r.existing&&t.id!=null&&!Ay(`id`,t,r.existing));)i++;r?(r.newOption=t,r.brandNew=n):e.push({newOption:t,brandNew:n,existing:null,keyInfo:null}),i++}})}function Oy(e,t){H(t,function(t){e.push({newOption:t,brandNew:!0,existing:null,keyInfo:null})})}function ky(e){var t=Y();H(e,function(e){var n=e.existing;n&&t.set(n.id,e)}),H(e,function(e){var n=e.newOption;Nd(!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={})}),H(e,function(e,n){var r=e.existing,i=e.newOption,a=e.keyInfo;if(q(i)){if(a.name=i.name==null?r?r.name:gy+n:jy(i.name),r)a.id=jy(r.id);else if(i.id!=null)a.id=jy(i.id);else{var o=0;do a.id=`\0`+a.name+`\0`+o++;while(t.get(a.id))}t.set(a.id,e)}})}function Ay(e,t,n){var r=My(t[e],null),i=My(n[e],null);return r!=null&&i!=null&&r===i}function jy(e){return My(e,``)}function My(e,t){return e==null?t:K(e)?e:xd(e)||bd(e)?e+``:t}function Ny(e){var t=e.name;return!!(t&&t.indexOf(gy))}function Py(e){return e&&e.id!=null&&jy(e.id).indexOf(_y)===0}function Fy(e,t,n){H(e,function(e){var r=e.newOption;q(r)&&(e.keyInfo.mainType=t,e.keyInfo.subType=Iy(t,r,e.existing,n))})}function Iy(e,t,n,r){return t.type?t.type:n?n.subType:r.determineSubType(e,t)}function Ly(e,t){if(t.dataIndexInside!=null)return t.dataIndexInside;if(t.dataIndex!=null)return W(t.dataIndex)?U(t.dataIndex,function(t){return e.indexOfRawIndex(t)}):e.indexOfRawIndex(t.dataIndex);if(t.name!=null)return W(t.name)?U(t.name,function(t){return e.indexOfName(t)}):e.indexOfName(t.name)}function Ry(){var e=`__ec_inner_`+zy++;return function(t){return t[e]||(t[e]={})}}var zy=ay();function By(e,t,n){var r=Vy(t,n),i=r.mainTypeSpecified,a=r.queryOptionMap,o=r.others,s=n?n.defaultMainType:null;return!i&&s&&a.set(s,{}),a.each(function(t,r){var i=Uy(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 Vy(e,t){var n;if(K(e)){var r={};r[e+`Index`]=0,n=r}else n=e;var i=Y(),a={},o=!1;return H(n,function(e,n){if(n===`dataIndex`||n===`dataIndexInside`){a[n]=e;return}var r=n.match(/^(\w+)(Index|Id|Name)$/)||[],s=r[1],c=(r[2]||``).toLowerCase();if(!(!s||!c||t&&t.includeMainTypes&&ld(t.includeMainTypes,s)<0)){o||=!!s;var l=i.get(s)||i.set(s,{});l[c]=e}}),{mainTypeSpecified:o,queryOptionMap:i,others:a}}var Hy={useDefault:!0,enableAll:!1,enableNone:!1};function Uy(e,t,n,r){r||=Hy;var i=n.index,a=n.id,o=n.name,s={models:null,specified:i!=null||a!=null||o!=null};if(!s.specified){var c=void 0;return s.models=r.useDefault&&(c=e.getComponent(t))?[c]:[],s}if(i===`none`||i===!1){if(r.enableNone)return s.models=[],s;i=-1}return i===`all`&&(i=r.enableAll?a=o=null:-1),s.models=e.queryComponents({mainType:t,index:i,id:a,name:o}),s}function Wy(e,t,n){var r={};r[t+`Id`]=e[t+`Id`],r[t+`Index`]=e[t+`Index`],r[t+`Name`]=e[t+`Name`];var i={mainType:t,query:r};return n&&(i.subType=n),i}function Gy(e,t,n){e.setAttribute?e.setAttribute(t,n):e[t]=n}function Ky(e,t){return e.getAttribute?e.getAttribute(t):e[t]}function qy(e){return e===`auto`?X.domSupported?`html`:`richText`:e||`html`}function Jy(e,t,n,r,i){var a=t==null||t===`auto`;if(r==null)return r;if(xd(r)){var o=hy(n||0,r,i);return Lv(o,a?Math.max(Bv(n||0),Bv(r)):t)}else if(K(r))return i<1?n:r;else{for(var s=[],c=n,l=r,u=Math.max(c?c.length:0,l.length),d=0;d<u;++d){var f=e.getDimensionInfo(d);if(f&&f.type===`ordinal`)s[d]=(i<1&&c?c:l)[d];else{var p=c&&c[d]?c[d]:0,m=l[d],o=hy(p,m,i);s[d]=Lv(o,a?Math.max(Bv(p),Bv(m)):t)}}return s}}(function(){function e(){}return e.prototype.reset=function(e,t,n,r){return this._list=e,this._step=r||=1,this._idx=t,this._end=n??(r>0?e.length:0),this.item=null,this.key=NaN,this},e.prototype.next=function(){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):!1},e})();function Yy(){return[1/0,-1/0]}function Xy(e,t){eb(t)&&(t<e[0]&&(e[0]=t),t>e[1]&&(e[1]=t))}function Zy(e,t){eb(t)&&t<e[0]&&(e[0]=t)}function Qy(e,t){eb(t)&&t>e[1]&&(e[1]=t)}function $y(e,t){tb(t[0],t[1])&&(t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1]))}function eb(e){return e!=null&&isFinite(e)}function tb(e,t){return eb(e)&&eb(t)&&e<=t}function nb(e){var t=e[1]-e[0];return isFinite(t)&&t>=0}function rb(e){tb(e[0],e[1])&&e[0]>e[1]&&(e[0]=e[1])}function ib(){var e=`__ec_once_`+ab++;return function(t,n){Gd(t,e)||(t[e]=1,n())}}var ab=ay();function ob(e,t,n){var r=Y(),i=0;H(e,function(a){var o=t(a),s=r.get(o)||0;n&&n(a,s),!s&&!n&&(e[i++]=a),r.set(o,s+1)}),n||(e.length=i)}function sb(e){return e.value+``}function cb(e){return e+``}function lb(e,t){return J(t,!0)?e.seriesIndex+2:0}function ub(e,t,n){var 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 db(e,t){return{seriesType:e,overallReset:t}}function fb(e){return{overallReset:e}}var pb=Ry(),mb=function(e,t,n,r){if(r){var i=pb(r);i.dataIndex=n,i.dataType=t,i.seriesIndex=e,i.ssrType=`chart`,r.type===`group`&&r.traverse(function(r){var i=pb(r);i.seriesIndex=e,i.dataIndex=n,i.dataType=t,i.ssrType=`chart`})}},hb=`series`,gb=Y([`tooltip`,`label`,`itemName`,`itemId`,`itemGroupId`,`itemChildGroupId`,`seriesName`]),_b=`original`,vb=`arrayRows`,yb=`objectRows`,bb=`keyedColumns`,xb=`typedArray`,Sb=`unknown`,Cb=`column`,wb=`Roam`,Tb=[`getDom`,`getZr`,`getWidth`,`getHeight`,`getDevicePixelRatio`,`dispatchAction`,`isSSR`,`isDisposed`,`on`,`off`,`getDataURL`,`getConnectedDataURL`,`getOption`,`getId`,`updateLabelLayout`],Eb=function(){function e(e){H(Tb,function(t){this[t]=vd(e[t],e)},this)}return e}();function Db(e,t){return t.mainType===`series`?e.getViewOfSeriesModel(t):e.getViewOfComponentModel(t)}var Ob=1,kb={},Ab=Ry(),jb=Ry(),Mb=[`emphasis`,`blur`,`select`],Nb=[`normal`,`emphasis`,`blur`,`select`],Pb=`highlight`,Fb=`downplay`,Ib=`select`,Lb=`unselect`,Rb=`toggleSelect`,zb=`selectchanged`;function Bb(e){return e!=null&&e!==`none`}function Vb(e,t,n){e.onHoverStateChange&&(e.hoverState||0)!==n&&e.onHoverStateChange(t),e.hoverState=n}function Hb(e){Vb(e,`emphasis`,2)}function Ub(e){e.hoverState===2&&Vb(e,`normal`,0)}function Wb(e){Vb(e,`blur`,1)}function Gb(e){e.hoverState===1&&Vb(e,`normal`,0)}function Kb(e){e.selected=!0}function qb(e){e.selected=!1}function Jb(e,t,n){t(e,n)}function Yb(e,t,n){Jb(e,t,n),e.isGroup&&e.traverse(function(e){Jb(e,t,n)})}function Xb(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 Zb(e,t,n,r){for(var i=e.style,a={},o=0;o<t.length;o++){var s=t[o];a[s]=i[s]??(r&&r[s])}for(var o=0;o<e.animators.length;o++){var c=e.animators[o];c.__fromStateTransition&&c.__fromStateTransition.indexOf(n)<0&&c.targetName===`style`&&c.saveTo(a,t)}return a}function Qb(e,t,n,r){var i=n&&ld(n,`select`)>=0,a=!1;if(e instanceof R_){var o=Ab(e),s=i&&o.selectFill||o.normalFill,c=i&&o.selectStroke||o.normalStroke;if(Bb(s)||Bb(c)){r||={};var l=r.style||{};l.fill===`inherit`?(a=!0,r=V({},r),l=V({},l),l.fill=s):!Bb(l.fill)&&Bb(s)?(a=!0,r=V({},r),l=V({},l),l.fill=kh(s)):!Bb(l.stroke)&&Bb(c)&&(a||(r=V({},r),l=V({},l)),l.stroke=kh(c)),r.style=l}}if(r&&r.z2==null){a||(r=V({},r));var u=e.z2EmphasisLift;r.z2=e.z2+(u??10)}return r}function $b(e,t,n){if(n&&n.z2==null){n=V({},n);var r=e.z2SelectLift;n.z2=e.z2+(r??9)}return n}function ex(e,t,n){var r=ld(e.currentStates,t)>=0,i=e.style.opacity,a=r?null:Zb(e,[`opacity`],t,{opacity:1});n||={};var o=n.style||{};return o.opacity??(n=V({},n),o=V({opacity:r?i:a.opacity*.1},o),n.style=o),n}function tx(e,t){var n=this.states[e];if(this.style){if(e===`emphasis`)return Qb(this,e,t,n);if(e===`blur`)return ex(this,e,n);if(e===`select`)return $b(this,e,n)}return n}function nx(e){e.stateProxy=tx;var t=e.getTextContent(),n=e.getTextGuideLine();t&&(t.stateProxy=tx),n&&(n.stateProxy=tx)}function rx(e,t){!dx(e,t)&&!e.__highByOuter&&Yb(e,Hb)}function ix(e,t){!dx(e,t)&&!e.__highByOuter&&Yb(e,Ub)}function ax(e,t){e.__highByOuter|=1<<(t||0),Yb(e,Hb)}function ox(e,t){!(e.__highByOuter&=~(1<<(t||0)))&&Yb(e,Ub)}function sx(e){Yb(e,Wb)}function cx(e){Yb(e,Gb)}function lx(e){Yb(e,Kb)}function ux(e){Yb(e,qb)}function dx(e,t){return e.__highDownSilentOnTouch&&t.zrByTouch}function fx(e){var t=e.getModel(),n=[],r=[];t.eachComponent(function(t,i){var a=jb(i),o=Db(e,i),s=t===`series`;!s&&r.push(o),a.isBlured&&(o.group.traverse(function(e){Gb(e)}),s&&n.push(i)),a.isBlured=!1}),H(r,function(e){e&&e.toggleBlurSeries&&e.toggleBlurSeries(n,!1,t)})}function px(e,t,n,r){var i=r.getModel();n||=`coordinateSystem`;function a(e,t){for(var n=0;n<t.length;n++){var r=e.getItemGraphicEl(t[n]);r&&cx(r)}}if(e!=null&&!(!t||t===`none`)){var o=i.getSeriesByIndex(e),s=o.coordinateSystem;s&&s.master&&(s=s.master);var c=[];i.eachSeries(function(e){var 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`||Wb(e)}),fd(t))a(e.getData(),t);else if(q(t))for(var u=gd(t),d=0;d<u.length;d++)a(e.getData(u[d]),t[u[d]]);c.push(e),jb(e).isBlured=!0}}),i.eachComponent(function(e,t){if(e!==`series`){var n=r.getViewOfComponentModel(t);n&&n.toggleBlurSeries&&n.toggleBlurSeries(c,!0,i)}})}}function mx(e,t,n){if(!(e==null||t==null)){var r=n.getModel().getComponent(e,t);if(r){jb(r).isBlured=!0;var i=n.getViewOfComponentModel(r);!i||!i.focusBlurEnabled||i.group.traverse(function(e){Wb(e)})}}}function hx(e,t,n){var r=e.seriesIndex,i=e.getData(t.dataType);if(i){var a=Ly(i,t);a=(W(a)?a[0]:a)||0;var o=i.getItemGraphicEl(a);if(!o)for(var s=i.count(),c=0;!o&&c<s;)o=i.getItemGraphicEl(c++);if(o){var l=pb(o);px(r,l.focus,l.blurScope,n)}else{var u=e.get([`emphasis`,`focus`]),d=e.get([`emphasis`,`blurScope`]);u!=null&&px(r,u,d,n)}}}function gx(e,t,n,r){var i={focusSelf:!1,dispatchers:null};if(e==null||e===`series`||t==null||n==null)return i;var a=r.getModel().getComponent(e,t);if(!a)return i;var o=r.getViewOfComponentModel(a);if(!o||!o.findHighDownDispatchers)return i;for(var s=o.findHighDownDispatchers(n),c,l=0;l<s.length;l++)if(pb(s[l]).focus===`self`){c=!0;break}return{focusSelf:c,dispatchers:s}}function _x(e,t,n){var r=pb(e),i=gx(r.componentMainType,r.componentIndex,r.componentHighDownName,n),a=i.dispatchers,o=i.focusSelf;a?(o&&mx(r.componentMainType,r.componentIndex,n),H(a,function(e){return rx(e,t)})):(px(r.seriesIndex,r.focus,r.blurScope,n),r.focus===`self`&&mx(r.componentMainType,r.componentIndex,n),rx(e,t))}function vx(e,t,n){fx(n);var r=pb(e),i=gx(r.componentMainType,r.componentIndex,r.componentHighDownName,n).dispatchers;i?H(i,function(e){return ix(e,t)}):ix(e,t)}function yx(e,t,n){if(Nx(t)){var r=t.dataType,i=Ly(e.getData(r),t);W(i)||(i=[i]),e[t.type===`toggleSelect`?`toggleSelect`:t.type===`select`?`select`:`unselect`](i,r)}}function bx(e){H(e.getAllData(),function(t){var n=t.data,r=t.type;n.eachItemGraphicEl(function(t,n){e.isSelected(n,r)?lx(t):ux(t)})})}function xx(e){var t=[];return e.eachSeries(function(e){H(e.getAllData(),function(n){n.data;var r=n.type,i=e.getSelectedDataIndices();if(i.length>0){var a={dataIndex:i,seriesIndex:e.seriesIndex};r!=null&&(a.dataType=r),t.push(a)}})}),t}function Sx(e,t,n){Ax(e,!0),Yb(e,nx),Ex(e,t,n)}function Cx(e){Ax(e,!1)}function Tx(e,t,n,r){r?Cx(e):Sx(e,t,n)}function Ex(e,t,n){var r=pb(e);t==null?r.focus&&=null:(r.focus=t,r.blurScope=n)}var Dx=[`emphasis`,`blur`,`select`],Ox={itemStyle:`getItemStyle`,lineStyle:`getLineStyle`,areaStyle:`getAreaStyle`};function kx(e,t,n,r){n||=`itemStyle`;for(var i=0;i<Dx.length;i++){var a=Dx[i],o=t.getModel([a,n]),s=e.ensureState(a);s.style=r?r(o):o[Ox[n]]()}}function Ax(e,t){var n=t===!1,r=e;e.highDownSilentOnTouch&&(r.__highDownSilentOnTouch=e.highDownSilentOnTouch),(!n||r.__highDownDispatcher)&&(r.__highByOuter=r.__highByOuter||0,r.__highDownDispatcher=!n)}function jx(e){return!!(e&&e.__highDownDispatcher)}function Mx(e){var t=kb[e];return t==null&&Ob<=32&&(t=kb[e]=Ob++),t}function Nx(e){var t=e.type;return t===`select`||t===`unselect`||t===`toggleSelect`}function Px(e){var t=e.type;return t===`highlight`||t===`downplay`}function Fx(e){var t=Ab(e);t.normalFill=e.style.fill,t.normalStroke=e.style.stroke;var n=e.states.select||{};t.selectFill=n.style&&n.style.fill||null,t.selectStroke=n.style&&n.style.stroke||null}var Ix=p_.CMD,Lx=[[],[],[]],Rx=Math.sqrt,zx=Math.atan2;function Bx(e,t){if(t){var n=e.data,r=e.len(),i,a,o,s,c,l,u=Ix.M,d=Ix.C,f=Ix.L,p=Ix.R,m=Ix.A,h=Ix.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:var g=t[4],_=t[5],v=Rx(t[0]*t[0]+t[1]*t[1]),y=Rx(t[2]*t[2]+t[3]*t[3]),b=zx(-t[1]/y,t[0]/v);n[o]*=v,n[o++]+=g,n[o]*=y,n[o++]+=_,n[o++]*=v,n[o++]*=y,n[o++]+=b,n[o++]+=b,o+=2,s=o;break;case p:l[0]=n[o++],l[1]=n[o++],np(l,l,t),n[s++]=l[0],n[s++]=l[1],l[0]+=n[o++],l[1]+=n[o++],np(l,l,t),n[s++]=l[0],n[s++]=l[1]}for(c=0;c<a;c++){var x=Lx[c];x[0]=n[o++],x[1]=n[o++],np(x,x,t),n[s++]=x[0],n[s++]=x[1]}}e.increaseVersion()}}var Vx=Math.sqrt,Hx=Math.sin,Ux=Math.cos,Wx=Math.PI;function Gx(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function Kx(e,t){return(e[0]*t[0]+e[1]*t[1])/(Gx(e)*Gx(t))}function qx(e,t){return(e[0]*t[1]<e[1]*t[0]?-1:1)*Math.acos(Kx(e,t))}function Jx(e,t,n,r,i,a,o,s,c,l,u){var d=Wx/180*c,f=Ux(d)*(e-n)/2+Hx(d)*(t-r)/2,p=-1*Hx(d)*(e-n)/2+Ux(d)*(t-r)/2,m=f*f/(o*o)+p*p/(s*s);m>1&&(o*=Vx(m),s*=Vx(m));var h=(i===a?-1:1)*Vx((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+Ux(d)*g-Hx(d)*_,y=(t+r)/2+Hx(d)*g+Ux(d)*_,b=qx([1,0],[(f-g)/o,(p-_)/s]),x=[(f-g)/o,(p-_)/s],S=[(-1*f-g)/o,(-1*p-_)/s],C=qx(x,S);if(Kx(x,S)<=-1&&(C=Wx),Kx(x,S)>=1&&(C=0),C<0){var w=Math.round(C/Wx*1e6)/1e6;C=Wx*2+w%2*Wx}u.addData(l,v,y,o,s,b,C,d,a)}var Yx=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,Xx=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function Zx(e){var t=new p_;if(!e)return t;var n=0,r=0,i=n,a=r,o,s=p_.CMD,c=e.match(Yx);if(!c)return t;for(var l=0;l<c.length;l++){for(var u=c[l],d=u.charAt(0),f=void 0,p=u.match(Xx)||[],m=p.length,h=0;h<m;h++)p[h]=parseFloat(p[h]);for(var g=0;g<m;){var _=void 0,v=void 0,y=void 0,b=void 0,x=void 0,S=void 0,C=void 0,w=n,T=r,E=void 0,D=void 0;switch(d){case`l`:n+=p[g++],r+=p[g++],f=s.L,t.addData(f,n,r);break;case`L`:n=p[g++],r=p[g++],f=s.L,t.addData(f,n,r);break;case`m`:n+=p[g++],r+=p[g++],f=s.M,t.addData(f,n,r),i=n,a=r,d=`l`;break;case`M`:n=p[g++],r=p[g++],f=s.M,t.addData(f,n,r),i=n,a=r,d=`L`;break;case`h`:n+=p[g++],f=s.L,t.addData(f,n,r);break;case`H`:n=p[g++],f=s.L,t.addData(f,n,r);break;case`v`:r+=p[g++],f=s.L,t.addData(f,n,r);break;case`V`:r=p[g++],f=s.L,t.addData(f,n,r);break;case`C`:f=s.C,t.addData(f,p[g++],p[g++],p[g++],p[g++],p[g++],p[g++]),n=p[g-2],r=p[g-1];break;case`c`:f=s.C,t.addData(f,p[g++]+n,p[g++]+r,p[g++]+n,p[g++]+r,p[g++]+n,p[g++]+r),n+=p[g-2],r+=p[g-1];break;case`S`:_=n,v=r,E=t.len(),D=t.data,o===s.C&&(_+=n-D[E-4],v+=r-D[E-3]),f=s.C,w=p[g++],T=p[g++],n=p[g++],r=p[g++],t.addData(f,_,v,w,T,n,r);break;case`s`:_=n,v=r,E=t.len(),D=t.data,o===s.C&&(_+=n-D[E-4],v+=r-D[E-3]),f=s.C,w=n+p[g++],T=r+p[g++],n+=p[g++],r+=p[g++],t.addData(f,_,v,w,T,n,r);break;case`Q`:w=p[g++],T=p[g++],n=p[g++],r=p[g++],f=s.Q,t.addData(f,w,T,n,r);break;case`q`:w=p[g++]+n,T=p[g++]+r,n+=p[g++],r+=p[g++],f=s.Q,t.addData(f,w,T,n,r);break;case`T`:_=n,v=r,E=t.len(),D=t.data,o===s.Q&&(_+=n-D[E-4],v+=r-D[E-3]),n=p[g++],r=p[g++],f=s.Q,t.addData(f,_,v,n,r);break;case`t`:_=n,v=r,E=t.len(),D=t.data,o===s.Q&&(_+=n-D[E-4],v+=r-D[E-3]),n+=p[g++],r+=p[g++],f=s.Q,t.addData(f,_,v,n,r);break;case`A`:y=p[g++],b=p[g++],x=p[g++],S=p[g++],C=p[g++],w=n,T=r,n=p[g++],r=p[g++],f=s.A,Jx(w,T,n,r,S,C,y,b,x,f,t);break;case`a`:y=p[g++],b=p[g++],x=p[g++],S=p[g++],C=p[g++],w=n,T=r,n+=p[g++],r+=p[g++],f=s.A,Jx(w,T,n,r,S,C,y,b,x,f,t);break}}(d===`z`||d===`Z`)&&(f=s.Z,t.addData(f),n=i,r=a),o=f}return t.toStatic(),t}var Qx=function(e){z(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.applyTransform=function(e){},t}(R_);function $x(e){return e.setData!=null}function eS(e,t){var n=Zx(e),r=V({},t);return r.buildPath=function(e){var t=$x(e);if(t&&e.canSave()){e.appendPath(n);var r=e.getContext();r&&e.rebuildPath(r,1)}else{var r=t?e.getContext():e;r&&n.rebuildPath(r,1)}},r.applyTransform=function(e){Bx(n,e),this.dirtyShape()},r}function tS(e,t){return new Qx(eS(e,t))}function nS(e,t){var n=eS(e,t);return function(e){z(t,e);function t(t){var r=e.call(this,t)||this;return r.applyTransform=n.applyTransform,r.buildPath=n.buildPath,r}return t}(Qx)}function rS(e,t){for(var n=[],r=e.length,i=0;i<r;i++){var a=e[i];n.push(a.getUpdatedPathProxy(!0))}var o=new R_(t);return o.createPathProxy(),o.buildPath=function(e){if($x(e)){e.appendPath(n);var t=e.getContext();t&&e.rebuildPath(t,1)}},o}var iS=function(e){z(t,e);function t(t){var n=e.call(this)||this;return n.isGroup=!0,n._children=[],n.attr(t),n}return t.prototype.childrenRef=function(){return this._children},t.prototype.children=function(){return this._children.slice()},t.prototype.childAt=function(e){return this._children[e]},t.prototype.childOfName=function(e){for(var t=this._children,n=0;n<t.length;n++)if(t[n].name===e)return t[n]},t.prototype.childCount=function(){return this._children.length},t.prototype.add=function(e){return e&&e!==this&&e.parent!==this&&(this._children.push(e),this._doAdd(e)),this},t.prototype.addBefore=function(e,t){if(e&&e!==this&&e.parent!==this&&t&&t.parent===this){var n=this._children,r=n.indexOf(t);r>=0&&(n.splice(r,0,e),this._doAdd(e))}return this},t.prototype.replace=function(e,t){var n=ld(this._children,e);return n>=0&&this.replaceAt(t,n),this},t.prototype.replaceAt=function(e,t){var n=this._children,r=n[t];if(e&&e!==this&&e.parent!==this&&e!==r){n[t]=e,r.parent=null;var i=this.__zr;i&&r.removeSelfFromZr(i),this._doAdd(e)}return this},t.prototype._doAdd=function(e){e.parent&&e.parent.remove(e),e.parent=this;var t=this.__zr;t&&t!==e.__zr&&e.addSelfToZr(t),t&&t.refresh()},t.prototype.remove=function(e){var t=this.__zr,n=this._children,r=ld(n,e);return r<0?this:(n.splice(r,1),e.parent=null,t&&e.removeSelfFromZr(t),t&&t.refresh(),this)},t.prototype.removeAll=function(){for(var e=this._children,t=this.__zr,n=0;n<e.length;n++){var r=e[n];t&&r.removeSelfFromZr(t),r.parent=null}return e.length=0,this},t.prototype.eachChild=function(e,t){for(var n=this._children,r=0;r<n.length;r++){var i=n[r];e.call(t,i,r)}return this},t.prototype.traverse=function(e,t){for(var n=0;n<this._children.length;n++){var r=this._children[n],i=e.call(t,r);r.isGroup&&!i&&r.traverse(e,t)}return this},t.prototype.addSelfToZr=function(t){e.prototype.addSelfToZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].addSelfToZr(t)},t.prototype.removeSelfFromZr=function(t){e.prototype.removeSelfFromZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].removeSelfFromZr(t)},t.prototype.getBoundingRect=function(e){for(var t=new Z(0,0,0,0),n=e||this._children,r=[],i=null,a=0;a<n.length;a++){var o=n[a];if(!(o.ignore||o.invisible)){var s=o.getBoundingRect(),c=o.getLocalTransform(r);c?(Z.applyTransform(t,s,c),i||=t.clone(),i.union(t)):(i||=s.clone(),i.union(s))}}return i||t},t}(mg);iS.prototype.type=`group`;var aS=function(){function e(){this.cx=0,this.cy=0,this.r=0}return e}(),oS=function(e){z(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new aS},t.prototype.buildPath=function(e,t){e.moveTo(t.cx+t.r,t.cy),e.arc(t.cx,t.cy,t.r,0,Math.PI*2)},t}(R_);oS.prototype.type=`circle`;var sS=function(){function e(){this.cx=0,this.cy=0,this.rx=0,this.ry=0}return e}(),cS=function(e){z(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new sS},t.prototype.buildPath=function(e,t){var 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()},t}(R_);cS.prototype.type=`ellipse`;var lS=Math.PI,uS=lS*2,dS=Math.sin,fS=Math.cos,pS=Math.acos,mS=Math.atan2,hS=Math.abs,gS=Math.sqrt,_S=Math.max,vS=Math.min,yS=1e-4;function bS(e,t,n,r,i,a,o,s){var c=n-e,l=r-t,u=o-i,d=s-a,f=d*c-u*l;if(!(f*f<yS))return f=(u*(t-a)-d*(e-i))/f,[e+f*c,t+f*l]}function xS(e,t,n,r,i,a,o){var s=e-n,c=t-r,l=(o?a:-a)/gS(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)*gS(_S(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,k=T-_,A=E-g,j=D-_;return O*O+k*k>A*A+j*j&&(w=E,T=D),{cx:w,cy:T,x0:-u,y0:-d,x1:w*(i/x-1),y1:T*(i/x-1)}}function SS(e){var t;if(W(e)){var n=e.length;if(!n)return e;t=n===1?[e[0],e[0],0,0]:n===2?[e[0],e[0],e[1],e[1]]:n===3?e.concat(e[2]):e}else t=[e,e,e,e];return t}function CS(e,t){var n,r=_S(t.r,0),i=_S(t.r0||0,0),a=r>0;if(!(!a&&!(i>0))){if(a||(r=i,i=0),i>r){var o=r;r=i,i=o}var s=t.startAngle,c=t.endAngle;if(!(isNaN(s)||isNaN(c))){var l=t.cx,u=t.cy,d=!!t.clockwise,f=hS(c-s),p=f>uS&&f%uS;if(p>yS&&(f=p),!(r>yS))e.moveTo(l,u);else if(f>uS-yS)e.moveTo(l+r*fS(s),u+r*dS(s)),e.arc(l,u,r,s,c,!d),i>yS&&(e.moveTo(l+i*fS(c),u+i*dS(c)),e.arc(l,u,i,c,s,d));else{var m=void 0,h=void 0,g=void 0,_=void 0,v=void 0,y=void 0,b=void 0,x=void 0,S=void 0,C=void 0,w=void 0,T=void 0,E=void 0,D=void 0,O=void 0,k=void 0,A=r*fS(s),j=r*dS(s),M=i*fS(c),N=i*dS(c),P=f>yS;if(P){var ee=t.cornerRadius;ee&&(n=SS(ee),m=n[0],h=n[1],g=n[2],_=n[3]);var te=hS(r-i)/2;if(v=vS(te,g),y=vS(te,_),b=vS(te,m),x=vS(te,h),w=S=_S(v,y),T=C=_S(b,x),(S>yS||C>yS)&&(E=r*fS(c),D=r*dS(c),O=i*fS(s),k=i*dS(s),f<lS)){var ne=bS(A,j,O,k,E,D,M,N);if(ne){var re=A-ne[0],ie=j-ne[1],ae=E-ne[0],oe=D-ne[1],se=1/dS(pS((re*ae+ie*oe)/(gS(re*re+ie*ie)*gS(ae*ae+oe*oe)))/2),ce=gS(ne[0]*ne[0]+ne[1]*ne[1]);w=vS(S,(r-ce)/(se+1)),T=vS(C,(i-ce)/(se-1))}}}if(!P)e.moveTo(l+A,u+j);else if(w>yS){var le=vS(g,w),ue=vS(_,w),F=xS(O,k,A,j,r,le,d),de=xS(E,D,M,N,r,ue,d);e.moveTo(l+F.cx+F.x0,u+F.cy+F.y0),w<S&&le===ue?e.arc(l+F.cx,u+F.cy,w,mS(F.y0,F.x0),mS(de.y0,de.x0),!d):(le>0&&e.arc(l+F.cx,u+F.cy,le,mS(F.y0,F.x0),mS(F.y1,F.x1),!d),e.arc(l,u,r,mS(F.cy+F.y1,F.cx+F.x1),mS(de.cy+de.y1,de.cx+de.x1),!d),ue>0&&e.arc(l+de.cx,u+de.cy,ue,mS(de.y1,de.x1),mS(de.y0,de.x0),!d))}else e.moveTo(l+A,u+j),e.arc(l,u,r,s,c,!d);if(!(i>yS)||!P)e.lineTo(l+M,u+N);else if(T>yS){var le=vS(m,T),ue=vS(h,T),F=xS(M,N,E,D,i,-ue,d),de=xS(A,j,O,k,i,-le,d);e.lineTo(l+F.cx+F.x0,u+F.cy+F.y0),T<C&&le===ue?e.arc(l+F.cx,u+F.cy,T,mS(F.y0,F.x0),mS(de.y0,de.x0),!d):(ue>0&&e.arc(l+F.cx,u+F.cy,ue,mS(F.y0,F.x0),mS(F.y1,F.x1),!d),e.arc(l,u,i,mS(F.cy+F.y1,F.cx+F.x1),mS(de.cy+de.y1,de.cx+de.x1),d),le>0&&e.arc(l+de.cx,u+de.cy,le,mS(de.y1,de.x1),mS(de.y0,de.x0),!d))}else e.lineTo(l+M,u+N),e.arc(l,u,i,c,s,d)}e.closePath()}}}var wS=function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0,this.cornerRadius=0}return e}(),TS=function(e){z(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new wS},t.prototype.buildPath=function(e,t){CS(e,t)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t}(R_);TS.prototype.type=`sector`;var ES=function(){function e(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return e}(),DS=function(e){z(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new ES},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=Math.PI*2;e.moveTo(n+t.r,r),e.arc(n,r,t.r,0,i,!1),e.moveTo(n+t.r0,r),e.arc(n,r,t.r0,0,i,!0)},t}(R_);DS.prototype.type=`ring`;function OS(e,t,n,r){var i=[],a=[],o=[],s=[],c,l,u,d;if(r){u=[1/0,1/0],d=[-1/0,-1/0];for(var f=0,p=e.length;f<p;f++)rp(u,u,e[f]),ip(d,d,e[f]);rp(u,u,r[0]),ip(d,d,r[1])}for(var f=0,p=e.length;f<p;f++){var 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(If(e[f]));continue}else c=e[f-1],l=e[f+1];Bf(a,l,c),Jf(a,a,t);var h=Xf(m,c),g=Xf(m,l),_=h+g;_!==0&&(h/=_,g/=_),Jf(o,a,-h),Jf(s,a,g);var v=Rf([],m,o),y=Rf([],m,s);r&&(ip(v,v,u),rp(v,v,d),ip(y,y,u),rp(y,y,d)),i.push(v),i.push(y)}return n&&i.push(i.shift()),i}function kS(e,t,n){var r=t.smooth,i=t.points;if(i&&i.length>=2){if(r){var a=OS(i,r,n,t.smoothConstraint);e.moveTo(i[0][0],i[0][1]);for(var o=i.length,s=0;s<(n?o:o-1);s++){var c=a[s*2],l=a[s*2+1],u=i[(s+1)%o];e.bezierCurveTo(c[0],c[1],l[0],l[1],u[0],u[1])}}else{e.moveTo(i[0][0],i[0][1]);for(var s=1,d=i.length;s<d;s++)e.lineTo(i[s][0],i[s][1])}n&&e.closePath()}}var AS=function(){function e(){this.points=null,this.smooth=0,this.smoothConstraint=null}return e}(),jS=function(e){z(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new AS},t.prototype.buildPath=function(e,t){kS(e,t,!0)},t}(R_);jS.prototype.type=`polygon`;var MS=function(){function e(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null}return e}(),NS=function(e){z(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultStyle=function(){return{stroke:`#000`,fill:null}},t.prototype.getDefaultShape=function(){return new MS},t.prototype.buildPath=function(e,t){kS(e,t,!1)},t}(R_);NS.prototype.type=`polyline`;var PS={},FS=function(){function e(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return e}(),IS=function(e){z(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultStyle=function(){return{stroke:`#000`,fill:null}},t.prototype.getDefaultShape=function(){return new FS},t.prototype.buildPath=function(e,t){var n,r,i,a;if(this.subPixelOptimize){var o=q_(PS,t,this.style);n=o.x1,r=o.y1,i=o.x2,a=o.y2}else n=t.x1,r=t.y1,i=t.x2,a=t.y2;var s=t.percent;s!==0&&(e.moveTo(n,r),s<1&&(i=n*(1-s)+i*s,a=r*(1-s)+a*s),e.lineTo(i,a))},t.prototype.pointAt=function(e){var t=this.shape;return[t.x1*(1-e)+t.x2*e,t.y1*(1-e)+t.y2*e]},t}(R_);IS.prototype.type=`line`;var LS=[],RS=function(){function e(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1}return e}();function zS(e,t,n){var r=e.cpx2,i=e.cpy2;return r!=null||i!=null?[(n?Rm:Lm)(e.x1,e.cpx1,e.cpx2,e.x2,t),(n?Rm:Lm)(e.y1,e.cpy1,e.cpy2,e.y2,t)]:[(n?Gm:Wm)(e.x1,e.cpx1,e.x2,t),(n?Gm:Wm)(e.y1,e.cpy1,e.y2,t)]}var BS=function(e){z(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultStyle=function(){return{stroke:`#000`,fill:null}},t.prototype.getDefaultShape=function(){return new RS},t.prototype.buildPath=function(e,t){var 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&&(Jm(n,o,i,u,LS),o=LS[1],i=LS[2],Jm(r,s,a,u,LS),s=LS[1],a=LS[2]),e.quadraticCurveTo(o,s,i,a)):(u<1&&(Vm(n,o,c,i,u,LS),o=LS[1],c=LS[2],i=LS[3],Vm(r,s,l,a,u,LS),s=LS[1],l=LS[2],a=LS[3]),e.bezierCurveTo(o,s,c,l,i,a)))},t.prototype.pointAt=function(e){return zS(this.shape,e,!1)},t.prototype.tangentAt=function(e){var t=zS(this.shape,e,!0);return Yf(t,t)},t}(R_);BS.prototype.type=`bezier-curve`;var VS=function(){function e(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return e}(),HS=function(e){z(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultStyle=function(){return{stroke:`#000`,fill:null}},t.prototype.getDefaultShape=function(){return new VS},t.prototype.buildPath=function(e,t){var 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)},t}(R_);HS.prototype.type=`arc`;var US=function(e){z(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=`compound`,t}return t.prototype._updatePathDirty=function(){for(var e=this.shape.paths,t=this.shapeChanged(),n=0;n<e.length;n++)t||=e[n].shapeChanged();t&&this.dirtyShape()},t.prototype.beforeBrush=function(){this._updatePathDirty();for(var e=this.shape.paths||[],t=this.getGlobalScale(),n=0;n<e.length;n++)e[n].path||e[n].createPathProxy(),e[n].path.setScale(t[0],t[1],e[n].segmentIgnoreThreshold)},t.prototype.buildPath=function(e,t){for(var n=t.paths||[],r=0;r<n.length;r++)n[r].buildPath(e,n[r].shape,!0)},t.prototype.afterBrush=function(){for(var e=this.shape.paths||[],t=0;t<e.length;t++)e[t].pathUpdated()},t.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),R_.prototype.getBoundingRect.call(this)},t}(R_),WS=function(){function e(e){this.colorStops=e||[]}return e.prototype.addColorStop=function(e,t){this.colorStops.push({offset:e,color:t})},e}(),GS=function(e){z(t,e);function t(t,n,r,i,a,o){var s=e.call(this,a)||this;return s.x=t??0,s.y=n??0,s.x2=r??1,s.y2=i??0,s.type=`linear`,s.global=o||!1,s}return t}(WS),KS=function(e){z(t,e);function t(t,n,r,i,a){var o=e.call(this,i)||this;return o.x=t??.5,o.y=n??.5,o.r=r??.5,o.type=`radial`,o.global=a||!1,o}return t}(WS),qS=Math.min,JS=Math.max,YS=Math.abs,XS=[0,0],ZS=[0,0],QS=kp(),$S=QS.minTv,eC=QS.maxTv,tC=function(){function e(e,t){this._corners=[],this._axes=[],this._origin=[0,0];for(var n=0;n<4;n++)this._corners[n]=new ap;for(var n=0;n<2;n++)this._axes[n]=new ap;e&&this.fromBoundingRect(e,t)}return e.prototype.fromBoundingRect=function(e,t){var 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(var c=0;c<4;c++)n[c].transform(t);ap.sub(r[0],n[1],n[0]),ap.sub(r[1],n[3],n[0]),r[0].normalize(),r[1].normalize();for(var c=0;c<2;c++)this._origin[c]=r[c].dot(n[0])},e.prototype.intersect=function(e,t,n){var r=!0,i=!t;return t&&ap.set(t,0,0),QS.reset(n,!i),!this._intersectCheckOneSide(this,e,i,1)&&(r=!1,i)||!this._intersectCheckOneSide(e,this,i,-1)&&(r=!1,i)||!i&&!QS.negativeSize&&ap.copy(t,r?QS.useDir?QS.dirMinTv:$S:eC),r},e.prototype._intersectCheckOneSide=function(e,t,n,r){for(var i=!0,a=0;a<2;a++){var o=e._axes[a];if(e._getProjMinMaxOnAxis(a,e._corners,XS),e._getProjMinMaxOnAxis(a,t._corners,ZS),QS.negativeSize||XS[1]<ZS[0]||XS[0]>ZS[1]){if(i=!1,QS.negativeSize||n)return i;var s=YS(ZS[0]-XS[1]),c=YS(XS[0]-ZS[1]);qS(s,c)>eC.len()&&(s<c?ap.scale(eC,o,-s*r):ap.scale(eC,o,c*r))}else if(!n){var s=YS(ZS[0]-XS[1]),c=YS(XS[0]-ZS[1]);(QS.useDir||qS(s,c)<$S.len())&&((s<c||!QS.bidirectional)&&(ap.scale($S,o,s*r),QS.useDir&&QS.calcDirMTV()),(s>=c||!QS.bidirectional)&&(ap.scale($S,o,-c*r),QS.useDir&&QS.calcDirMTV()))}}return i},e.prototype._getProjMinMaxOnAxis=function(e,t,n){for(var r=this._axes[e],i=this._origin,a=t[0].dot(r)+i[e],o=a,s=a,c=1;c<t.length;c++){var l=t[c].dot(r)+i[e];o=qS(l,o),s=JS(l,s)}n[0]=o+QS.touchThreshold,n[1]=s-QS.touchThreshold,QS.negativeSize=n[1]<n[0]},e}(),nC=[],rC=function(e){z(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.notClear=!0,t.incremental=1,t._displayables=[],t._temporaryDisplayables=[],t._cursor=0,t}return t.prototype.traverse=function(e,t){e.call(t,this)},t.prototype.useStyle=function(){this.style={}},t.prototype._useHoverStyle=function(){this.__hoverStyle=null},t.prototype.getCursor=function(){return this._cursor},t.prototype.innerAfterBrush=function(){this._cursor=this._displayables.length},t.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.markRedraw(),this.notClear=!1},t.prototype.clearTemporalDisplayables=function(){this._temporaryDisplayables=[]},t.prototype.addDisplayable=function(e,t){t?this._temporaryDisplayables.push(e):this._displayables.push(e),this.markRedraw()},t.prototype.addDisplayables=function(e,t){t||=!1;for(var n=0;n<e.length;n++)this.addDisplayable(e[n],t)},t.prototype.getDisplayables=function(){return this._displayables},t.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},t.prototype.eachPendingDisplayable=function(e){for(var t=this._cursor;t<this._displayables.length;t++)e&&e(this._displayables[t]);for(var t=0;t<this._temporaryDisplayables.length;t++)e&&e(this._temporaryDisplayables[t])},t.prototype.update=function(){this.updateTransform();for(var e=this._cursor;e<this._displayables.length;e++){var t=this._displayables[e];t.parent=this,t.update(),t.parent=null}for(var e=0;e<this._temporaryDisplayables.length;e++){var t=this._temporaryDisplayables[e];t.parent=this,t.update(),t.parent=null}},t.prototype.getBoundingRect=function(){if(!this._rect){for(var e=new Z(1/0,1/0,-1/0,-1/0),t=0;t<this._displayables.length;t++){var n=this._displayables[t],r=n.getBoundingRect().clone();n.needLocalTransform()&&r.applyTransform(n.getLocalTransform(nC)),e.union(r)}this._rect=e}return this._rect},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t);if(this.getBoundingRect().contain(n[0],n[1])){for(var r=0;r<this._displayables.length;r++)if(this._displayables[r].contain(e,t))return!0}return!1},t}(Ag),iC=Ry();function aC(e,t,n,r,i){var a;if(t&&t.ecModel){var o=t.ecModel.getUpdatePayload();a=o&&o.animation}var s=t&&t.isAnimationEnabled(),c=e===`update`;if(s){var l=void 0,u=void 0,d=void 0;return r?(l=J(r.duration,200),u=J(r.easing,`cubicOut`),d=0):(l=t.getShallow(c?`animationDurationUpdate`:`animationDuration`),u=t.getShallow(c?`animationEasingUpdate`:`animationEasing`),d=t.getShallow(c?`animationDelayUpdate`:`animationDelay`)),a&&(a.duration!=null&&(l=a.duration),a.easing!=null&&(u=a.easing),a.delay!=null&&(d=a.delay)),G(d)&&(d=d(n,i)),G(l)&&(l=l(n)),{duration:l||0,delay:d,easing:u}}else return null}function oC(e,t,n,r,i,a,o){var s=!1,c;G(i)?(o=a,a=i,i=null):q(i)&&(a=i.cb,o=i.during,s=i.isFrom,c=i.removeOpt,i=i.dataIndex);var l=e===`leave`;l||t.stopAnimation(`leave`);var u=aC(e,r,i,l?c||{}:null,r&&r.getAnimationDelayParams?r.getAnimationDelayParams(t,i):null);if(u&&u.duration>0){var d=u.duration,f=u.delay,p=u.easing,m={duration:d,delay:f||0,easing:p,done:a,force:!!a||!!o,setToFinal:!l,scope:e,during:o};s?t.animateFrom(n,m):t.animateTo(n,m)}else t.stopAnimation(),!s&&t.attr(n),o&&o(1),a&&a()}function sC(e,t,n,r,i,a){oC(`update`,e,t,n,r,i,a)}function cC(e,t,n,r,i,a){oC(`enter`,e,t,n,r,i,a)}function lC(e){if(!e.__zr)return!0;for(var t=0;t<e.animators.length;t++)if(e.animators[t].scope===`leave`)return!0;return!1}function uC(e,t,n,r,i,a){lC(e)||oC(`leave`,e,t,n,r,i,a)}function dC(e,t,n,r){e.removeTextContent(),e.removeTextGuideLine(),uC(e,{style:{opacity:0}},t,n,r)}function fC(e,t,n){function r(){e.parent&&e.parent.remove(e)}e.isGroup?e.traverse(function(e){e.isGroup||dC(e,t,n,r)}):dC(e,t,n,r)}function pC(e){iC(e).oldStyle=e.style}var mC=e({Arc:()=>HS,BezierCurve:()=>BS,BoundingRect:()=>Z,Circle:()=>oS,CompoundPath:()=>US,Ellipse:()=>cS,Group:()=>iS,HOVER_LAYER_FOR_INCREMENTAL:()=>2,HOVER_LAYER_FROM_THRESHOLD:()=>1,HOVER_LAYER_NO:()=>0,Image:()=>W_,IncrementalDisplayable:()=>rC,Line:()=>IS,LinearGradient:()=>GS,OrientedBoundingRect:()=>tC,Path:()=>R_,Point:()=>ap,Polygon:()=>jS,Polyline:()=>NS,RadialGradient:()=>KS,Rect:()=>Q_,Ring:()=>DS,Sector:()=>TS,Text:()=>rv,WH:()=>_C,XY:()=>gC,applyTransform:()=>MC,calcZ2Range:()=>tw,clipPointsByRect:()=>LC,clipRectByRect:()=>RC,createIcon:()=>zC,decomposeTransform:()=>aw,ensureCopyRect:()=>QC,ensureCopyTransform:()=>$C,expandOrShrinkRect:()=>WC,extendPath:()=>bC,extendShape:()=>vC,getCurrentCanvasPainter:()=>sw,getShapeClass:()=>SC,getTransform:()=>jC,groupTransition:()=>IC,initProps:()=>cC,isBoundingRectAxisAligned:()=>XC,isElementRemoved:()=>lC,lineLineIntersect:()=>VC,linePolygonIntersect:()=>BC,makeImage:()=>wC,makePath:()=>CC,mergePath:()=>EC,payloadDisableAnimation:()=>iw,registerShape:()=>xC,removeElement:()=>uC,removeElementWithFadeOut:()=>fC,resizePath:()=>DC,retrieveZInfo:()=>ew,setTooltipConfig:()=>qC,subPixelOptimize:()=>AC,subPixelOptimizeLine:()=>OC,subPixelOptimizeRect:()=>kC,transformDirection:()=>NC,traverseElements:()=>YC,traverseUpdateZ:()=>nw,updateProps:()=>sC}),hC={},gC=[`x`,`y`],_C=[`width`,`height`];function vC(e){return R_.extend(e)}var yC=nS;function bC(e,t){return yC(e,t)}function xC(e,t){hC[e]=t}function SC(e){if(hC.hasOwnProperty(e))return hC[e]}function CC(e,t,n,r){var i=tS(e,t);return n&&(r===`center`&&(n=TC(n,i.getBoundingRect())),DC(i,n)),i}function wC(e,t,n){var r=new W_({style:{image:e,x:t.x,y:t.y,width:t.width,height:t.height},onload:function(e){if(n===`center`){var i={width:e.width,height:e.height};r.setStyle(TC(t,i))}}});return r}function TC(e,t){var n=t.width/t.height,r=e.height*n,i;r<=e.width?i=e.height:(r=e.width,i=r/n);var a=e.x+e.width/2,o=e.y+e.height/2;return{x:a-r/2,y:o-i/2,width:r,height:i}}var EC=rS;function DC(e,t){if(e.applyTransform){var n=e.getBoundingRect().calculateTransform(t);e.applyTransform(n)}}function OC(e,t){return q_(e,e,{lineWidth:t}),e}function kC(e,t){return J_(e,e,t),e}var AC=Y_;function jC(e,t){for(var n=Tf([]);e&&e!==t;)Df(n,e.getLocalTransform(),n),e=e.parent;return n}function MC(e,t,n){return t&&!fd(t)&&(t=bm.getLocalTransform(t)),n&&(t=jf([],t)),np([],e,t)}function NC(e,t,n){var r=t[4]===0||t[5]===0||t[0]===0?1:Sv(2*t[4]/t[0]),i=t[4]===0||t[5]===0||t[2]===0?1:Sv(2*t[4]/t[2]),a=[e===`left`?-r:e===`right`?r:0,e===`top`?-i:e===`bottom`?i:0];return a=MC(a,t,n),Sv(a[0])>Sv(a[1])?a[0]>0?`right`:`left`:a[1]>0?`bottom`:`top`}function PC(e){return!e.isGroup}function FC(e){return e.shape!=null}function IC(e,t,n){if(!e||!t)return;function r(e){var t={};return e.traverse(function(e){PC(e)&&e.anid&&(t[e.anid]=e)}),t}function i(e){var t={x:e.x,y:e.y,rotation:e.rotation};return FC(e)&&(t.shape=B(e.shape)),t}var a=r(e);t.traverse(function(e){if(PC(e)&&e.anid){var t=a[e.anid];if(t){var r=i(e);e.attr(i(t)),sC(e,r,n,pb(e).dataIndex)}}})}function LC(e,t){return U(e,function(e){var n=e[0];n=xv(n,t.x),n=bv(n,t.x+t.width);var r=e[1];return r=xv(r,t.y),r=bv(r,t.y+t.height),[n,r]})}function RC(e,t){var n=xv(e.x,t.x),r=bv(e.x+e.width,t.x+t.width),i=xv(e.y,t.y),a=bv(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 zC(e,t,n){var r=V({rectHover:!0},t),i=r.style={strokeNoScale:!0};if(n||={x:-1,y:-1,width:2,height:2},e)return e.indexOf(`image://`)===0?(i.image=e.slice(8),sd(i,n),new W_(r)):CC(e.replace(`path://`,``),r,n,`center`)}function BC(e,t,n,r,i){for(var a=0,o=i[i.length-1];a<i.length;a++){var s=i[a];if(VC(e,t,n,r,s[0],s[1],o[0],o[1]))return!0;o=s}}function VC(e,t,n,r,i,a,o,s){var c=n-e,l=r-t,u=o-i,d=s-a,f=HC(u,d,c,l);if(UC(f))return!1;var p=e-i,m=t-a,h=HC(p,m,c,l)/f;if(h<0||h>1)return!1;var g=HC(p,m,u,d)/f;return!(g<0||g>1)}function HC(e,t,n,r){return e*r-n*t}function UC(e){return e<=1e-6&&e>=-1e-6}function WC(e,t,n,r,i){return t==null?e:(xd(t)?GC[0]=GC[1]=GC[2]=GC[3]=t:(GC[0]=t[0],GC[1]=t[1],GC[2]=t[2],GC[3]=t[3]),r&&(GC[0]=xv(0,GC[0]),GC[1]=xv(0,GC[1]),GC[2]=xv(0,GC[2]),GC[3]=xv(0,GC[3])),n&&(GC[0]=-GC[0],GC[1]=-GC[1],GC[2]=-GC[2],GC[3]=-GC[3]),KC(e,GC,`x`,`width`,3,1,i&&i[0]||0),KC(e,GC,`y`,`height`,0,2,i&&i[1]||0),e)}var GC=[0,0,0,0];function KC(e,t,n,r,i,a,o){var s=t[a]+t[i],c=e[r];e[r]+=s,o=xv(0,bv(o,c)),e[r]<o?(e[r]=o,e[n]+=t[i]>=0?-t[i]:t[a]>=0?c+t[a]:Sv(s)>1e-8?(c-o)*t[i]/s:0):e[n]-=t[i]}function qC(e){var t=e.itemTooltipOption,n=e.componentModel,r=e.itemName,i=K(t)?{formatter:t}:t,a=n.mainType,o=n.componentIndex,s={componentType:a,name:r,$vars:[`name`]};s[a+`Index`]=o;var c=e.formatterParamsExtra;c&&H(gd(c),function(e){Gd(s,e)||(s[e]=c[e],s.$vars.push(e))});var l=pb(e.el);l.componentMainType=a,l.componentIndex=o,l.tooltipConfig={name:r,option:sd({content:r,encodeHTMLContent:!0,formatterParams:s},i)}}function JC(e,t){var n;e.isGroup&&(n=t(e)),n||e.traverse(t)}function YC(e,t){if(e)if(W(e))for(var n=0;n<e.length;n++)JC(e[n],t);else JC(e,t)}function XC(e){return!e||Sv(e[1])<ZC&&Sv(e[2])<ZC||Sv(e[0])<ZC&&Sv(e[3])<ZC}var ZC=1e-5;function QC(e,t){return e?Z.copy(e,t):t.clone()}function $C(e,t){return t?Ef(e||wf(),t):void 0}function ew(e){return{z:e.get(`z`)||0,zlevel:e.get(`zlevel`)||0}}function tw(e){var t=-1/0,n=1/0;JC(e,function(e){r(e),r(e.getTextContent()),r(e.getTextGuideLine())});function r(e){if(!(!e||e.isGroup)){var t=e.currentStates;if(t.length)for(var n=0;n<t.length;n++)i(e.states[t[n]]);i(e)}}function i(e){if(e){var r=e.z2;r>t&&(t=r),r<n&&(n=r)}}return n>t&&(n=t=0),{min:n,max:t}}function nw(e,t,n){rw(e,t,n,-1/0)}function rw(e,t,n,r){if(e.ignoreModelZ)return r;var i=e.getTextContent(),a=e.getTextGuideLine();if(e.isGroup)for(var o=e.childrenRef(),s=0;s<o.length;s++)r=xv(rw(o[s],t,n,r),r);else e.z=t,e.zlevel=n,r=xv(e.z2||0,r);if(i&&(i.z=t,i.zlevel=n,isFinite(r)&&(i.z2=r+2)),a){var c=e.textGuideLineConfig;a.z=t,a.zlevel=n,isFinite(r)&&(a.z2=r+(c&&c.showAbove?1:-1))}return r}function iw(e){return e.animation={duration:0},e}function aw(e,t){return t?Ef(ow.transform,t):Tf(ow.transform),ow.decomposeTransform(),wm(e,ow),e}var ow=new bm;ow.transform=wf();function sw(e){var t=e.getZr().painter;return t.getType()===`canvas`?t:null}xC(`circle`,oS),xC(`ellipse`,cS),xC(`sector`,TS),xC(`ring`,DS),xC(`polygon`,jS),xC(`polyline`,NS),xC(`rect`,Q_),xC(`line`,IS),xC(`bezierCurve`,BS),xC(`arc`,HS);var cw={};function lw(e,t){for(var n=0;n<Mb.length;n++){var r=Mb[n],i=t[r],a=e.ensureState(r);a.style=a.style||{},a.style.text=i}var o=e.currentStates.slice();e.clearStates(!0),e.setStyle({text:t.normal}),e.useStates(o,!0)}function uw(e,t,n){var 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??=G(e.defaultText)?e.defaultText(i,e,n):e.defaultText;for(var c={normal:s},l=0;l<Mb.length;l++){var u=Mb[l],d=t[u];c[u]=J(r?r.getFormattedLabel(i,u,null,a,d&&d.get(`formatter`)):null,s)}return c}function dw(e,t,n,r){n||=cw;for(var i=e instanceof rv,a=!1,o=0;o<Nb.length;o++){var s=t[Nb[o]];if(s&&s.getShallow(`show`)){a=!0;break}}var c=i?e:e.getTextContent();if(a){i||(c||(c=new rv,e.setTextContent(c)),e.stateProxy&&(c.stateProxy=e.stateProxy));var l=uw(n,t),u=t.normal,d=!!u.getShallow(`show`),f=pw(u,r&&r.normal,n,!1,!i);f.text=l.normal,i||e.setTextConfig(mw(u,n,!1));for(var o=0;o<Mb.length;o++){var p=Mb[o],s=t[p];if(s){var m=c.ensureState(p),h=!!J(s.getShallow(`show`),d);if(h!==d&&(m.ignore=!h),m.style=pw(s,r&&r[p],n,!0,!i),m.style.text=l[p],!i){var g=e.ensureState(p);g.textConfig=mw(s,n,!0)}}}c.silent=!!u.getShallow(`silent`),c.style.x!=null&&(f.x=c.style.x),c.style.y!=null&&(f.y=c.style.y),c.ignore=!d,c.useStyle(f),c.dirty(),n.enableTextSetter&&(Sw(c).setLabelText=function(e){var r=uw(n,t,e);lw(c,r)})}else c&&(c.ignore=!0);e.dirty()}function fw(e,t){t||=`label`;for(var n={normal:e.getModel(t)},r=0;r<Mb.length;r++){var i=Mb[r];n[i]=e.getModel([i,t])}return n}function pw(e,t,n,r,i){var a={};return hw(a,e,n,r,i),t&&V(a,t),a}function mw(e,t,n){t||={};var r={},i,a=e.getShallow(`rotate`),o=J(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 hw(e,t,n,r,i){n||=cw;var a=t.ecModel,o=a&&a.option.textStyle,s=gw(t),c;if(s){c={};var l=`richInheritPlainLabel`,u=J(t.get(l),a?a.get(l):void 0);for(var d in s)if(s.hasOwnProperty(d)){var f=t.getModel([`rich`,d]);bw(c[d]={},f,o,t,u,n,r,i,!1,!0)}}c&&(e.rich=c);var p=t.get(`overflow`);p&&(e.overflow=p);var m=t.get(`lineOverflow`);m&&(e.lineOverflow=m);var h=e,g=t.get(`minMargin`);if(g!=null)g=xd(g)?g/2:0,h.margin=[g,g,g,g],h.__marginType=ww.minMargin;else{var _=t.get(`textMargin`);_!=null&&(h.margin=Md(_),h.__marginType=ww.textMargin)}bw(e,t,o,null,null,n,r,i,!0,!1)}function gw(e){for(var t;e&&e!==e.ecModel;){var n=(e.option||cw).rich;if(n){t||={};for(var r=gd(n),i=0;i<r.length;i++){var a=r[i];t[a]=1}}e=e.parentModel}return t}var _w=[`fontStyle`,`fontWeight`,`fontSize`,`fontFamily`,`textShadowColor`,`textShadowBlur`,`textShadowOffsetX`,`textShadowOffsetY`],vw=[`align`,`lineHeight`,`width`,`height`,`tag`,`verticalAlign`,`ellipsis`],yw=[`padding`,`borderWidth`,`borderRadius`,`borderDashOffset`,`backgroundColor`,`borderColor`,`shadowColor`,`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`];function bw(e,t,n,r,i,a,o,s,c,l){n=!o&&n||cw;var u=a&&a.inheritColor,d=t.getShallow(`color`),f=t.getShallow(`textBorderColor`),p=J(t.getShallow(`opacity`),n.opacity);(d===`inherit`||d===`auto`)&&(d=u||null),(f===`inherit`||f===`auto`)&&(f=u||null),s||(d||=n.color,f||=n.textBorderColor),d!=null&&(e.fill=d),f!=null&&(e.stroke=f);var m=J(t.getShallow(`textBorderWidth`),n.textBorderWidth);m!=null&&(e.lineWidth=m);var h=J(t.getShallow(`textBorderType`),n.textBorderType);h!=null&&(e.lineDash=h);var g=J(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(var _=0;_<_w.length;_++){var v=_w[_],y=i!==!1&&r?Ad(t.getShallow(v),r.getShallow(v),n[v]):J(t.getShallow(v),n[v]);y!=null&&(e[v]=y)}for(var _=0;_<vw.length;_++){var v=vw[_],y=t.getShallow(v);y!=null&&(e[v]=y)}if(e.verticalAlign==null){var b=t.getShallow(`baseline`);b!=null&&(e.verticalAlign=b)}if(!c||!a.disableBox){for(var _=0;_<yw.length;_++){var v=yw[_],y=t.getShallow(v);y!=null&&(e[v]=y)}var x=t.getShallow(`borderType`);x!=null&&(e.borderDash=x),(e.backgroundColor===`auto`||e.backgroundColor===`inherit`)&&u&&(e.backgroundColor=u),(e.borderColor===`auto`||e.borderColor===`inherit`)&&u&&(e.borderColor=u)}}function xw(e,t){var n=t&&t.getModel(`textStyle`);return Pd([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(` `))}var Sw=Ry();function Cw(e,t,n,r){if(e){var i=Sw(e);i.prevValue=i.value,i.value=n;var a=t.normal;i.valueAnimation=a.get(`valueAnimation`),i.valueAnimation&&(i.precision=a.get(`precision`),i.defaultInterpolatedText=r,i.statesModels=t)}}var ww={minMargin:1,textMargin:2},Tw=[`textStyle`,`color`],Ew=[`fontStyle`,`fontWeight`,`fontSize`,`fontFamily`,`padding`,`lineHeight`,`rich`,`width`,`height`,`overflow`],Dw=new rv,Ow=function(){function e(){}return e.prototype.getTextColor=function(e){var t=this.ecModel;return this.getShallow(`color`)||(!e&&t?t.get(Tw):null)},e.prototype.getFont=function(){return xw({fontStyle:this.getShallow(`fontStyle`),fontWeight:this.getShallow(`fontWeight`),fontSize:this.getShallow(`fontSize`),fontFamily:this.getShallow(`fontFamily`)},this.ecModel)},e.prototype.getTextRect=function(e){for(var t={text:e,verticalAlign:this.getShallow(`verticalAlign`)||this.getShallow(`baseline`)},n=0;n<Ew.length;n++)t[Ew[n]]=this.getShallow(Ew[n]);return Dw.useStyle(t),Dw.update(),Dw.getBoundingRect()},e}(),kw=[[`lineWidth`,`width`],[`stroke`,`color`],[`opacity`],[`shadowBlur`],[`shadowOffsetX`],[`shadowOffsetY`],[`shadowColor`],[`lineDash`,`type`],[`lineDashOffset`,`dashOffset`],[`lineCap`,`cap`],[`lineJoin`,`join`],[`miterLimit`]],Aw=ff(kw),jw=function(){function e(){}return e.prototype.getLineStyle=function(e){return Aw(this,e)},e}(),Mw=[[`fill`,`color`],[`stroke`,`borderColor`],[`lineWidth`,`borderWidth`],[`opacity`],[`shadowBlur`],[`shadowOffsetX`],[`shadowOffsetY`],[`shadowColor`],[`lineDash`,`borderType`],[`lineDashOffset`,`borderDashOffset`],[`lineCap`,`borderCap`],[`lineJoin`,`borderJoin`],[`miterLimit`,`borderMiterLimit`]],Nw=ff(Mw),Pw=function(){function e(){}return e.prototype.getItemStyle=function(e,t){return Nw(this,e,t)},e}(),Fw=function(){function e(e,t,n){this.parentModel=t,this.ecModel=n,this.option=e}return e.prototype.init=function(e,t,n){},e.prototype.mergeOption=function(e,t){id(this.option,e,!0)},e.prototype.get=function(e,t){return e==null?this.option:this._doGet(this.parsePath(e),!t&&this.parentModel)},e.prototype.getShallow=function(e,t){var n=this.option,r=n==null?n:n[e];if(r==null&&!t){var i=this.parentModel;i&&(r=i.getShallow(e))}return r},e.prototype.getModel=function(t,n){var r=t!=null,i=r?this.parsePath(t):null,a=r?this._doGet(i):this.option;return n||=this.parentModel&&this.parentModel.getModel(this.resolveParentPath(i)),new e(a,n,this.ecModel)},e.prototype.isEmpty=function(){return this.option==null},e.prototype.restoreData=function(){},e.prototype.clone=function(){var e=this.constructor;return new e(B(this.option))},e.prototype.parsePath=function(e){return typeof e==`string`?e.split(`.`):e},e.prototype.resolveParentPath=function(e){return e},e.prototype.isAnimationEnabled=function(){if(!X.node&&this.option){if(this.option.animation!=null)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}},e.prototype._doGet=function(e,t){var n=this.option;if(!e)return n;for(var r=0;r<e.length&&!(e[r]&&(n=n&&typeof n==`object`?n[e[r]]:null,n==null));r++);return n==null&&t&&(n=t._doGet(this.resolveParentPath(e),t.parentModel)),n},e}();rf(Fw),cf(Fw),dd(Fw,jw),dd(Fw,Pw),dd(Fw,mf),dd(Fw,Ow);function Iw(e){return e==null?0:e.length||1}function Lw(e){return e}var Rw=function(){function e(e,t,n,r,i,a){this._old=e,this._new=t,this._oldKeyGetter=n||Lw,this._newKeyGetter=r||Lw,this.context=i,this._diffModeMultiple=a===`multiple`}return e.prototype.add=function(e){return this._add=e,this},e.prototype.update=function(e){return this._update=e,this},e.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},e.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},e.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},e.prototype.remove=function(e){return this._remove=e,this},e.prototype.execute=function(){this[this._diffModeMultiple?`_executeMultiple`:`_executeOneToOne`]()},e.prototype._executeOneToOne=function(){var e=this._old,t=this._new,n={},r=Array(e.length),i=Array(t.length);this._initIndexMap(e,null,r,`_oldKeyGetter`),this._initIndexMap(t,n,i,`_newKeyGetter`);for(var a=0;a<e.length;a++){var o=r[a],s=n[o],c=Iw(s);if(c>1){var l=s.shift();s.length===1&&(n[o]=s[0]),this._update&&this._update(l,a)}else c===1?(n[o]=null,this._update&&this._update(s,a)):this._remove&&this._remove(a)}this._performRestAdd(i,n)},e.prototype._executeMultiple=function(){var e=this._old,t=this._new,n={},r={},i=[],a=[];this._initIndexMap(e,n,i,`_oldKeyGetter`),this._initIndexMap(t,r,a,`_newKeyGetter`);for(var o=0;o<i.length;o++){var s=i[o],c=n[s],l=r[s],u=Iw(c),d=Iw(l);if(u>1&&d===1)this._updateManyToOne&&this._updateManyToOne(l,c),r[s]=null;else if(u===1&&d>1)this._updateOneToMany&&this._updateOneToMany(l,c),r[s]=null;else if(u===1&&d===1)this._update&&this._update(l,c),r[s]=null;else if(u>1&&d>1)this._updateManyToMany&&this._updateManyToMany(l,c),r[s]=null;else if(u>1)for(var f=0;f<u;f++)this._remove&&this._remove(c[f]);else this._remove&&this._remove(c)}this._performRestAdd(a,r)},e.prototype._performRestAdd=function(e,t){for(var n=0;n<e.length;n++){var r=e[n],i=t[r],a=Iw(i);if(a>1)for(var o=0;o<a;o++)this._add&&this._add(i[o]);else a===1&&this._add&&this._add(i);t[r]=null}},e.prototype._initIndexMap=function(e,t,n,r){for(var i=this._diffModeMultiple,a=0;a<e.length;a++){var o=`_ec_`+this[r](e[a],a);if(i||(n[a]=o),t){var s=t[o],c=Iw(s);c===0?(t[o]=a,i&&n.push(o)):c===1?t[o]=[s,a]:s.push(a)}}},e}(),zw={Must:1,Might:2,Not:3},Bw=Ry();function Vw(e){Bw(e).datasetMap=Y()}function Hw(e,t,n){var r={},i=Uw(t);if(!i||!e)return r;var a=[],o=[],s=t.ecModel,c=Bw(s).datasetMap,l=i.uid+`_`+n.seriesLayoutBy,u,d;e=e.slice(),H(e,function(t,n){var i=q(t)?t:e[n]={name:t};i.type===`ordinal`&&u==null&&(u=n,d=m(i)),r[i.name]=[]});var f=c.get(l)||c.set(l,{categoryWayDim:d,valueWayDim:0});H(e,function(e,t){var n=e.name,i=m(e);if(u==null){var s=f.valueWayDim;p(r[n],s,i),p(o,s,i),f.valueWayDim+=i}else if(u===t)p(r[n],0,i),p(a,0,i);else{var s=f.categoryWayDim;p(r[n],s,i),p(o,s,i),f.categoryWayDim+=i}});function p(e,t,n){for(var r=0;r<n;r++)e.push(t+r)}function m(e){var t=e.dimsDef;return t?t.length:1}return a.length&&(r.itemName=a),o.length&&(r.seriesName=o),r}function Uw(e){if(!e.get(`data`,!0))return Uy(e.ecModel,`dataset`,{index:e.get(`datasetIndex`,!0),id:e.get(`datasetId`,!0)},Hy).models[0]}function Ww(e){return!e.get(`transform`,!0)&&!e.get(`fromTransformResult`,!0)?[]:Uy(e.ecModel,`dataset`,{index:e.get(`fromDatasetIndex`,!0),id:e.get(`fromDatasetId`,!0)},Hy).models}function Gw(e,t){return Kw(e.data,e.sourceFormat,e.seriesLayoutBy,e.dimensionsDefine,e.startIndex,t)}function Kw(e,t,n,r,i,a){var o,s=5;if(Cd(e))return zw.Not;var c,l;if(r){var u=r[a];q(u)?(c=u.name,l=u.type):K(u)&&(c=u)}if(l!=null)return l===`ordinal`?zw.Must:zw.Not;if(t===`arrayRows`){var d=e;if(n===`row`){for(var f=d[a],p=0;p<(f||[]).length&&p<s;p++)if((o=b(f[i+p]))!=null)return o}else for(var p=0;p<d.length&&p<s;p++){var m=d[i+p];if(m&&(o=b(m[a]))!=null)return o}}else if(t===`objectRows`){var h=e;if(!c)return zw.Not;for(var p=0;p<h.length&&p<s;p++){var g=h[p];if(g&&(o=b(g[c]))!=null)return o}}else if(t===`keyedColumns`){var _=e;if(!c)return zw.Not;var f=_[c];if(!f||Cd(f))return zw.Not;for(var p=0;p<f.length&&p<s;p++)if((o=b(f[p]))!=null)return o}else if(t===`original`)for(var v=e,p=0;p<v.length&&p<s;p++){var g=v[p],y=xy(g);if(!W(y))return zw.Not;if((o=b(y[a]))!=null)return o}function b(e){var t=K(e);if(e!=null&&isFinite(Number(e))&&e!==``)return t?zw.Might:zw.Not;if(t&&e!==`-`)return zw.Must}return zw.Not}var qw=function(){function e(e){this.data=e.data||(e.sourceFormat===`keyedColumns`?{}:[]),this.sourceFormat=e.sourceFormat||`unknown`,this.seriesLayoutBy=e.seriesLayoutBy||`column`,this.startIndex=e.startIndex||0,this.dimensionsDetectedCount=e.dimensionsDetectedCount,this.metaRawOption=e.metaRawOption;var t=this.dimensionsDefine=e.dimensionsDefine;if(t)for(var n=0;n<t.length;n++){var r=t[n];r.type==null&&Gw(this,n)===zw.Must&&(r.type=`ordinal`)}}return e}();function Jw(e){return e instanceof qw}function Yw(e,t,n){n||=Qw(e);var r=t.seriesLayoutBy,i=$w(e,n,r,t.sourceHeader,t.dimensions);return new qw({data:e,sourceFormat:n,seriesLayoutBy:r,dimensionsDefine:i.dimensionsDefine,startIndex:i.startIndex,dimensionsDetectedCount:i.dimensionsDetectedCount,metaRawOption:B(t)})}function Xw(e){return new qw({data:e,sourceFormat:Cd(e)?xb:_b})}function Zw(e){return new qw({data:e.data,sourceFormat:e.sourceFormat,seriesLayoutBy:e.seriesLayoutBy,dimensionsDefine:B(e.dimensionsDefine),startIndex:e.startIndex,dimensionsDetectedCount:e.dimensionsDetectedCount})}function Qw(e){var t=Sb;if(Cd(e))t=xb;else if(W(e)){e.length===0&&(t=vb);for(var n=0,r=e.length;n<r;n++){var i=e[n];if(i!=null){if(W(i)||Cd(i)){t=vb;break}else if(q(i)){t=yb;break}}}}else if(q(e)){for(var a in e)if(Gd(e,a)&&fd(e[a])){t=bb;break}}return t}function $w(e,t,n,r,i){var a,o;if(!e)return{dimensionsDefine:tT(i),startIndex:o,dimensionsDetectedCount:a};if(t===`arrayRows`){var s=e;r===`auto`||r==null?nT(function(e){e!=null&&e!==`-`&&(K(e)?o??=1:o=0)},n,s,10):o=xd(r)?r:+!!r,!i&&o===1&&(i=[],nT(function(e,t){i[t]=e==null?``:e+``},n,s,1/0)),a=i?i.length:n===`row`?s.length:s[0]?s[0].length:null}else if(t===`objectRows`)i||=eT(e);else if(t===`keyedColumns`)i||(i=[],H(e,function(e,t){i.push(t)}));else if(t===`original`){var c=xy(e[0]);a=W(c)&&c.length||1}return{startIndex:o,dimensionsDefine:tT(i),dimensionsDetectedCount:a}}function eT(e){for(var t=0,n;t<e.length&&!(n=e[t++]););if(n)return gd(n)}function tT(e){if(e){var t=Y();return U(e,function(e,n){e=q(e)?e:{name:e};var r={name:e.name,displayName:e.displayName,type:e.type};if(r.name==null)return r;r.name+=``,r.displayName??=r.name;var i=t.get(r.name);return i?r.name+=`-`+i.count++:t.set(r.name,{count:1}),r})}}function nT(e,t,n,r){if(t===`row`)for(var i=0;i<n.length&&i<r;i++)e(n[i]?n[i][0]:null,i);else for(var a=n[0]||[],i=0;i<a.length&&i<r;i++)e(a[i],i)}function rT(e){var t=e.sourceFormat;return t===`objectRows`||t===`keyedColumns`}var iT,aT,oT,sT,cT,lT,uT=function(){function e(e,t){var n=Jw(e)?e:Xw(e);this._source=n;var r=this._data=n.data,i=n.sourceFormat;n.seriesLayoutBy,i===`typedArray`&&(this._offset=0,this._dimSize=t,this._data=r),lT(this,r,n)}return e.prototype.getSource=function(){return this._source},e.prototype.count=function(){return 0},e.prototype.getItem=function(e,t){},e.prototype.appendData=function(e){},e.prototype.clean=function(){},e.protoInitialize=function(){var t=e.prototype;t.pure=!1,t.persistent=!0}(),e.internalField=function(){var e;lT=function(e,i,a){var o=a.sourceFormat,s=a.seriesLayoutBy,c=a.startIndex,l=a.dimensionsDefine,u=cT[xT(o,s)];V(e,u),o===`typedArray`?(e.getItem=t,e.count=r,e.fillStorage=n):(e.getItem=vd(mT(o,s),null,i,c,l),e.count=vd(_T(o,s),null,i,c,l))};var t=function(e,t){e-=this._offset,t||=[];for(var n=this._data,r=this._dimSize,i=r*e,a=0;a<r;a++)t[a]=n[i+a];return t},n=function(e,t,n,r){for(var i=this._data,a=this._dimSize,o=0;o<a;o++){for(var 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],f=0;f<u;f++){var p=i[f*a+o];d[e+f]=p,p<c&&(c=p),p>l&&(l=p)}s[0]=c,s[1]=l}},r=function(){return this._data?this._data.length/this._dimSize:0};cT=(e={},e[vb+`_`+Cb]={pure:!0,appendData:i},e[vb+`_row`]={pure:!0,appendData:function(){throw Error(`Do not support appendData when set seriesLayoutBy: "row".`)}},e[yb]={pure:!0,appendData:i},e[bb]={pure:!0,appendData:function(e){var t=this._data;H(e,function(e,n){for(var r=t[n]||(t[n]=[]),i=0;i<(e||[]).length;i++)r.push(e[i])})}},e[_b]={appendData:i},e[xb]={persistent:!1,pure:!0,appendData:function(e){this._data=e},clean:function(){this._offset+=this.count(),this._data=null}},e);function i(e){for(var t=0;t<e.length;t++)this._data.push(e[t])}}(),e}(),dT=function(e){W(e)||py(`series.data or dataset.source must be an array.`)};iT={},iT[vb+`_`+Cb]=dT,iT[vb+`_row`]=dT,iT[yb]=dT,iT[bb]=function(e,t){for(var n=0;n<t.length;n++)t[n].name??py(`dimension name must not be null/undefined.`)},iT[_b]=dT;var fT=function(e,t,n,r){return e[r]},pT=(aT={},aT[vb+`_`+Cb]=function(e,t,n,r){return e[r+t]},aT[vb+`_row`]=function(e,t,n,r,i){r+=t;for(var a=i||[],o=e,s=0;s<o.length;s++){var c=o[s];a[s]=c?c[r]:null}return a},aT[yb]=fT,aT[bb]=function(e,t,n,r,i){for(var a=i||[],o=0;o<n.length;o++){var s=n[o].name,c=s==null?null:e[s];a[o]=c?c[r]:null}return a},aT[_b]=fT,aT);function mT(e,t){return pT[xT(e,t)]}var hT=function(e,t,n){return e.length},gT=(oT={},oT[vb+`_`+Cb]=function(e,t,n){return Math.max(0,e.length-t)},oT[vb+`_row`]=function(e,t,n){var r=e[0];return r?Math.max(0,r.length-t):0},oT[yb]=hT,oT[bb]=function(e,t,n){var r=n[0].name,i=r==null?null:e[r];return i?i.length:0},oT[_b]=hT,oT);function _T(e,t){return gT[xT(e,t)]}var vT=function(e,t,n){return e[t]},yT=(sT={},sT[vb]=vT,sT[yb]=function(e,t,n){return e[n]},sT[bb]=vT,sT[_b]=function(e,t,n){var r=xy(e);return r instanceof Array?r[t]:r},sT[xb]=vT,sT);function bT(e){return yT[e]}function xT(e,t){return e===`arrayRows`?e+`_`+t:e}function ST(e,t,n){if(e){var r=e.getRawDataItem(t);if(r!=null){var i=e.getStore(),a=i.getSource().sourceFormat;if(n!=null){var o=e.getDimensionIndex(n),s=i.getDimensionProperty(o);return bT(a)(r,o,s)}else{var c=r;return a===`original`&&(c=xy(r)),c}}}}var CT=function(){function e(e,t){this._encode=e,this._schema=t}return e.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},e.prototype._getFullDimensionNames=function(){return this._cachedDimNames||=this._schema?this._schema.makeOutputDimensionNames():[],this._cachedDimNames},e}();function wT(e,t){var n={},r=n.encode={},i=Y(),a=[],o=[],s={};H(e.dimensions,function(t){var n=e.getDimensionInfo(t),c=n.coordDim;if(c){var l=n.coordDimIndex;TT(r,c)[l]=t,n.isExtraCoord||(i.set(c,1),DT(n.type)&&(a[0]=t),TT(s,c)[l]=e.getDimensionIndex(n.name)),n.defaultTooltip&&o.push(t)}gb.each(function(e,t){var i=TT(r,t),a=n.otherDims[t];a!=null&&a!==!1&&(i[a]=n.name)})});var c=[],l={};i.each(function(e,t){var n=r[t];l[t]=n[0],c=c.concat(n)}),n.dataDimsOnCoord=c,n.dataDimIndicesOnCoord=U(c,function(t){return e.getDimensionInfo(t).storeDimIndex}),n.encodeFirstDimNotExtra=l;var u=r.label;u&&u.length&&(a=u.slice());var d=r.tooltip;return d&&d.length?o=d.slice():o.length||(o=a.slice()),r.defaultedLabel=a,r.defaultedTooltip=o,n.userOutput=new CT(s,t),n}function TT(e,t){return e.hasOwnProperty(t)||(e[t]=[]),e[t]}function ET(e){return e===`category`?`ordinal`:e===`time`?`time`:`float`}function DT(e){return!(e===`ordinal`||e===`time`)}var OT=function(){function e(e){this.otherDims={},e!=null&&V(this,e)}return e}();function kT(e,t){var n=t&&t.type;return n===`ordinal`?e:(n===`time`&&!xd(e)&&e!=null&&e!==`-`&&(e=+Zv(e)),e==null||e===``?NaN:Number(e))}Y({number:function(e){return parseFloat(e)},time:function(e){return+Zv(e)},trim:function(e){return K(e)?Pd(e):e}});var AT={lt:function(e,t){return e<t},lte:function(e,t){return e<=t},gt:function(e,t){return e>t},gte:function(e,t){return e>=t}};(function(){function e(e,t){xd(t)||my(``),this._opFn=AT[e],this._rvalFloat=ry(t)}return e.prototype.evaluate=function(e){return xd(e)?this._opFn(e,this._rvalFloat):this._opFn(ry(e),this._rvalFloat)},e})();var jT=function(){function e(e,t){var n=e===`desc`;this._resultLT=n?1:-1,t??=n?`min`:`max`,this._incomparable=t===`min`?-1/0:1/0}return e.prototype.evaluate=function(e,t){var n=xd(e)?e:ry(e),r=xd(t)?t:ry(t),i=isNaN(n),a=isNaN(r);if(i&&(n=this._incomparable),a&&(r=this._incomparable),i&&a){var o=K(e),s=K(t);o&&(n=s?e:0),s&&(r=o?t:0)}return n<r?this._resultLT:n>r?-this._resultLT:0},e}();(function(){function e(e,t){this._rval=t,this._isEQ=e,this._rvalTypeof=typeof t,this._rvalFloat=ry(t)}return e.prototype.evaluate=function(e){var t=e===this._rval;if(!t){var n=typeof e;n!==this._rvalTypeof&&(n===`number`||this._rvalTypeof===`number`)&&(t=ry(e)===this._rvalFloat)}return this._isEQ?t:!t},e})();function MT(e){var 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 NT(e,t){return t>e.g&&t>=e.ge&&t<e.l&&t<=e.le}var PT=typeof Uint32Array>`u`?Array:Uint32Array,FT=typeof Uint16Array>`u`?Array:Uint16Array,IT=typeof Int32Array>`u`?Array:Int32Array,LT=typeof Float64Array>`u`?Array:Float64Array,RT={float:LT,int:IT,ordinal:Array,number:Array,time:LT},zT;function BT(e){return e>65535?PT:FT}function VT(e){var t=e.constructor;return t===Array?e.slice():new t(e)}function HT(e,t,n,r,i){var a=RT[n||`float`];if(i){var o=e[t],s=o&&o.length;if(s!==r){for(var c=new a(r),l=0;l<s;l++)c[l]=o[l];e[t]=c}}else e[t]=new a(r)}var UT=function(){function e(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=Y()}return e.prototype.initData=function(e,t,n){this._provider=e,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var r=e.getSource(),i=this.defaultDimValueGetter=zT[r.sourceFormat];this._dimValueGetter=n||i,this._rawExtent=[],rT(r),this._dimensions=U(t,function(e){return{type:e.type,property:e.property}}),this._initDataFromProvider(0,e.count())},e.prototype.getProvider=function(){return this._provider},e.prototype.getSource=function(){return this._provider.getSource()},e.prototype.ensureCalculationDimension=function(e,t){var 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 RT[t||`float`](this._rawCount),this._rawExtent[i]=Yy(),i},e.prototype.collectOrdinalMeta=function(e,t){var n=this._chunks[e],r=this._dimensions[e],i=this._rawExtent,a=r.ordinalOffset||0,o=n.length;a===0&&(i[e]=Yy());for(var s=i[e],c=a;c<o;c++){var l=n[c]=t.parseAndCollect(n[c]);isNaN(l)||(s[0]=Math.min(l,s[0]),s[1]=Math.max(l,s[1]))}r.ordinalMeta=t,r.ordinalOffset=o,r.type=`ordinal`},e.prototype.getOrdinalMeta=function(e){return this._dimensions[e].ordinalMeta},e.prototype.getDimensionProperty=function(e){var t=this._dimensions[e];return t&&t.property},e.prototype.appendData=function(e){var t=this._provider,n=this.count();t.appendData(e);var r=t.count();return t.persistent||(r+=n),n<r&&this._initDataFromProvider(n,r,!0),[n,r]},e.prototype.appendValues=function(e,t){for(var n=this._chunks,r=this._dimensions,i=r.length,a=this._rawExtent,o=this.count(),s=o+Math.max(e.length,t||0),c=0;c<i;c++){var l=r[c];HT(n,c,l.type,s,!0)}for(var u=[],d=o;d<s;d++)for(var f=d-o,p=0;p<i;p++){var l=r[p],m=zT.arrayRows.call(this,e[f]||u,l.property,f,p);n[p][d]=m;var h=a[p];m<h[0]&&(h[0]=m),m>h[1]&&(h[1]=m)}return this._rawCount=this._count=s,{start:o,end:s}},e.prototype._initDataFromProvider=function(e,t,n){for(var r=this._provider,i=this._chunks,a=this._dimensions,o=a.length,s=this._rawExtent,c=U(a,function(e){return e.property}),l=0;l<o;l++){var u=a[l];s[l]||(s[l]=Yy()),HT(i,l,u.type,t,n)}if(r.fillStorage)r.fillStorage(e,t,i,s);else for(var d=[],f=e;f<t;f++){d=r.getItem(f,d);for(var p=0;p<o;p++){var m=i[p],h=this._dimValueGetter(d,c[p],f,p);m[f]=h;var g=s[p];h<g[0]&&(g[0]=h),h>g[1]&&(g[1]=h)}}!r.persistent&&r.clean&&r.clean(),this._rawCount=this._count=t,this._extent=[]},e.prototype.count=function(){return this._count},e.prototype.get=function(e,t){if(!(t>=0&&t<this._count))return NaN;var n=this._chunks[e];return n?n[this.getRawIndex(t)]:NaN},e.prototype.getValues=function(e,t){var n=[],r=[];if(t==null){t=e,e=[];for(var i=0;i<this._dimensions.length;i++)r.push(i)}else r=e;for(var i=0,a=r.length;i<a;i++)n.push(this.get(r[i],t));return n},e.prototype.getByRawIndex=function(e,t){if(!(t>=0&&t<this._rawCount))return NaN;var n=this._chunks[e];return n?n[t]:NaN},e.prototype.getSum=function(e){var t=this._chunks[e],n=0;if(t)for(var r=0,i=this.count();r<i;r++){var a=this.get(e,r);isNaN(a)||(n+=a)}return n},e.prototype.getMedian=function(e){var t=[];this.each([e],function(e){isNaN(e)||t.push(e)}),zv(t);var n=this.count();return n===0?0:n%2==1?t[(n-1)/2]:(t[n/2]+t[n/2-1])/2},e.prototype.indexOfRawIndex=function(e){if(e>=this._rawCount||e<0)return-1;if(!this._indices)return e;var t=this._indices,n=t[e];if(n!=null&&n<this._count&&n===e)return e;for(var r=0,i=this._count-1;r<=i;){var a=(r+i)/2|0;if(t[a]<e)r=a+1;else if(t[a]>e)i=a-1;else return a}return-1},e.prototype.getIndices=function(){var e,t=this._indices;if(t){var n=t.constructor,r=this._count;if(n===Array){e=new n(r);for(var i=0;i<r;i++)e[i]=t[i]}else e=new n(t.buffer,0,r)}else{var n=BT(this._rawCount);e=new n(this.count());for(var i=0;i<e.length;i++)e[i]=i}return e},e.prototype.filter=function(e,t){if(!this._count)return this;for(var n=this.clone(),r=n.count(),i=new(BT(n._rawCount))(r),a=[],o=e.length,s=0,c=e[0],l=n._chunks,u=0;u<r;u++){var d=void 0,f=n.getRawIndex(u);if(o===0)d=t(u);else if(o===1){var p=l[c][f];d=t(p,u)}else{for(var m=0;m<o;m++)a[m]=l[e[m]][f];a[m]=u,d=t.apply(null,a)}d&&(i[s++]=f)}return s<r&&(n._indices=i),n._count=s,n._extent=[],n._updateGetRawIdx(),n},e.prototype.selectRange=function(e){var t=this.clone(),n=t._count;if(!n)return this;var r=gd(e),i=r.length;if(!i)return this;var a=t.count(),o=new(BT(t._rawCount))(a),s=0,c=r[0],l=e[c][0],u=e[c][1],d=t._chunks,f=!1;if(!t._indices){var p=0;if(i===1){for(var m=d[r[0]],h=0;h<n;h++){var g=m[h];(g>=l&&g<=u||isNaN(g))&&(o[s++]=p),p++}f=!0}else if(i===2){for(var m=d[r[0]],_=d[r[1]],v=e[r[1]][0],y=e[r[1]][1],h=0;h<n;h++){var g=m[h],b=_[h];(g>=l&&g<=u||isNaN(g))&&(b>=v&&b<=y||isNaN(b))&&(o[s++]=p),p++}f=!0}}if(!f)if(i===1)for(var h=0;h<a;h++){var x=t.getRawIndex(h),g=d[r[0]][x];(g>=l&&g<=u||isNaN(g))&&(o[s++]=x)}else for(var h=0;h<a;h++){for(var S=!0,x=t.getRawIndex(h),C=0;C<i;C++){var w=r[C],g=d[w][x];(g<e[w][0]||g>e[w][1])&&(S=!1)}S&&(o[s++]=t.getRawIndex(h))}return s<a&&(t._indices=o),t._count=s,t._extent=[],t._updateGetRawIdx(),t},e.prototype.map=function(e,t){var n=this.clone(e);return this._updateDims(n,e,t),n},e.prototype.modify=function(e,t){this._updateDims(this,e,t)},e.prototype._updateDims=function(e,t,n){for(var r=e._chunks,i=[],a=t.length,o=e.count(),s=[],c=e._rawExtent,l=0;l<t.length;l++)c[t[l]]=Yy();for(var u=0;u<o;u++){for(var d=e.getRawIndex(u),f=0;f<a;f++)s[f]=r[t[f]][d];s[a]=u;var p=n&&n.apply(null,s);if(p!=null){typeof p!=`object`&&(i[0]=p,p=i);for(var l=0;l<p.length;l++){var m=t[l],h=p[l],g=c[m],_=r[m];_&&(_[d]=h),h<g[0]&&(g[0]=h),h>g[1]&&(g[1]=h)}}}},e.prototype.lttbDownSample=function(e,t){var n=this.clone([e],!0),r=n._chunks[e],i=this.count(),a=0,o=Math.floor(1/t),s=this.getRawIndex(0),c,l,u,d=new(BT(this._rawCount))(Math.min((Math.ceil(i/o)+2)*2,i));d[a++]=s;for(var f=1;f<i-1;f+=o){for(var p=Math.min(f+o,i-1),m=Math.min(f+o*2,i),h=(m+p)/2,g=0,_=p;_<m;_++){var v=this.getRawIndex(_),y=r[v];isNaN(y)||(g+=y)}g/=m-p;var b=f,x=Math.min(f+o,i),S=f-1,C=r[s];c=-1,u=b;for(var w=-1,T=0,_=b;_<x;_++){var v=this.getRawIndex(_),y=r[v];if(isNaN(y)){T++,w<0&&(w=v);continue}l=Math.abs((S-h)*(y-C)-(S-_)*(g-C)),l>c&&(c=l,u=v)}T>0&&T<x-b&&(d[a++]=Math.min(w,u),u=Math.max(w,u)),d[a++]=u,s=u}return d[a++]=this.getRawIndex(i-1),n._count=a,n._indices=d,n.getRawIndex=this._getRawIdx,n},e.prototype.minmaxDownSample=function(e,t){for(var n=this.clone([e],!0),r=n._chunks,i=Math.floor(1/t),a=r[e],o=this.count(),s=new(BT(this._rawCount))(Math.ceil(o/i)*2),c=0,l=0;l<o;l+=i){var u=l,d=a[this.getRawIndex(u)],f=l,p=a[this.getRawIndex(f)],m=i;l+i>o&&(m=o-l);for(var h=0;h<m;h++){var g=a[this.getRawIndex(l+h)];g<d&&(d=g,u=l+h),g>p&&(p=g,f=l+h)}var _=this.getRawIndex(u),v=this.getRawIndex(f);u<f?(s[c++]=_,s[c++]=v):(s[c++]=v,s[c++]=_)}return n._count=c,n._indices=s,n._updateGetRawIdx(),n},e.prototype.downSample=function(e,t,n,r){for(var i=this.clone([e],!0),a=i._chunks,o=[],s=Math.floor(1/t),c=a[e],l=this.count(),u=i._rawExtent[e]=Yy(),d=new(BT(this._rawCount))(Math.ceil(l/s)),f=0,p=0;p<l;p+=s){s>l-p&&(s=l-p,o.length=s);for(var m=0;m<s;m++)o[m]=c[this.getRawIndex(p+m)];var h=n(o),g=this.getRawIndex(Math.min(p+r(o,h)||0,l-1));c[g]=h,h<u[0]&&(u[0]=h),h>u[1]&&(u[1]=h),d[f++]=g}return i._count=f,i._indices=d,i._updateGetRawIdx(),i},e.prototype.each=function(e,t){if(this._count)for(var n=e.length,r=this._chunks,i=0,a=this.count();i<a;i++){var o=this.getRawIndex(i);switch(n){case 0:t(i);break;case 1:t(r[e[0]][o],i);break;case 2:t(r[e[0]][o],r[e[1]][o],i);break;default:for(var s=0,c=[];s<n;s++)c[s]=r[e[s]][o];c[s]=i,t.apply(null,c)}}},e.prototype.getDataExtent=function(e,t){var n=this._chunks[e],r=Yy();if(!n)return r;var i=this.count();if(!this._indices&&!t)return this._rawExtent[e].slice();var a=this._extent,o=a[e]||(a[e]={}),s=MT(t),c=s.key,l=o[c];if(l)return l.slice();for(var u=r[0],d=r[1],f=0;f<i;f++){var p=n[this.getRawIndex(f)];(!t||NT(s,p))&&(p<u&&(u=p),p>d&&(d=p))}return o[c]=[u,d]},e.prototype.getRawDataItem=function(e){var t=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(t);for(var n=[],r=this._chunks,i=0;i<r.length;i++)n.push(r[i][t]);return n},e.prototype.clone=function(t,n){var r=new e,i=this._chunks,a=t&&pd(t,function(e,t){return e[t]=!0,e},{});if(a)for(var o=0;o<i.length;o++)r._chunks[o]=a[o]?VT(i[o]):i[o];else r._chunks=i;return this._copyCommonProps(r),n||(r._indices=this._cloneIndices()),r._updateGetRawIdx(),r},e.prototype._copyCommonProps=function(e){e._count=this._count,e._rawCount=this._rawCount,e._provider=this._provider,e._dimensions=this._dimensions,e._extent=B(this._extent),e._rawExtent=B(this._rawExtent)},e.prototype._cloneIndices=function(){if(this._indices){var e=this._indices.constructor,t=void 0;if(e===Array){var n=this._indices.length;t=new e(n);for(var r=0;r<n;r++)t[r]=this._indices[r]}else t=new e(this._indices);return t}return null},e.prototype._getRawIdxIdentity=function(e){return e},e.prototype._getRawIdx=function(e){return e<this._count&&e>=0?this._indices[e]:-1},e.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},e.internalField=function(){function e(e,t,n,r){return kT(e[r],this._dimensions[r])}zT={arrayRows:e,objectRows:function(e,t,n,r){return kT(e[t],this._dimensions[r])},keyedColumns:e,original:function(e,t,n,r){var i=e&&(e.value==null?e:e.value);return kT(i instanceof Array?i[r]:i,this._dimensions[r])},typedArray:function(e,t,n,r){return e[r]}}}(),e}(),WT=Ry(),GT={float:`f`,int:`i`,ordinal:`o`,number:`n`,time:`t`},KT=function(){function e(e){this.dimensions=e.dimensions,this._dimOmitted=e.dimensionOmitted,this.source=e.source,this._fullDimCount=e.fullDimensionCount,this._updateDimOmitted(e.dimensionOmitted)}return e.prototype.isDimensionOmitted=function(){return this._dimOmitted},e.prototype._updateDimOmitted=function(e){this._dimOmitted=e,e&&(this._dimNameMap||=YT(this.source))},e.prototype.getSourceDimensionIndex=function(e){return J(this._dimNameMap.get(e),-1)},e.prototype.getSourceDimension=function(e){var t=this.source.dimensionsDefine;if(t)return t[e]},e.prototype.makeStoreSchema=function(){for(var e=this._fullDimCount,t=rT(this.source),n=!XT(e),r=``,i=[],a=0,o=0;a<e;a++){var s=void 0,c=void 0,l=void 0,u=this.dimensions[o];if(u&&u.storeDimIndex===a)s=t?u.name:null,c=u.type,l=u.ordinalMeta,o++;else{var d=this.getSourceDimension(a);d&&(s=t?d.name:null,c=d.type)}i.push({property:s,type:c,ordinalMeta:l}),t&&s!=null&&(!u||!u.isCalculationCoord)&&(r+=n?s.replace(/\`/g,"`1").replace(/\$/g,"`2"):s),r+=`$`,r+=GT[c]||`f`,l&&(r+=l.uid),r+=`$`}var f=this.source;return{dimensions:i,hash:[f.seriesLayoutBy,f.startIndex,r].join(`$$`)}},e.prototype.makeOutputDimensionNames=function(){for(var e=[],t=0,n=0;t<this._fullDimCount;t++){var r=void 0,i=this.dimensions[n];if(i&&i.storeDimIndex===t)i.isCalculationCoord||(r=i.name),n++;else{var a=this.getSourceDimension(t);a&&(r=a.name)}e.push(r)}return e},e.prototype.appendCalculationDimension=function(e){this.dimensions.push(e),e.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},e}();function qT(e){return e instanceof KT}function JT(e){for(var t=Y(),n=0;n<(e||[]).length;n++){var r=e[n],i=q(r)?r.name:r;i!=null&&t.get(i)==null&&t.set(i,n)}return t}function YT(e){var t=WT(e);return t.dimNameMap||=JT(e.dimensionsDefine)}function XT(e){return e>30}var ZT=q,QT=U,$T=typeof Int32Array>`u`?Array:Int32Array,eE=`e\0\0`,tE=-1,nE=[`hasItemOption`,`_nameList`,`_idList`,`_invertedIndicesMap`,`_dimSummary`,`userOutput`,`_rawData`,`_dimValueGetter`,`_nameDimIdx`,`_idDimIdx`,`_nameRepeatCount`],rE=[`_approximateExtent`],iE,aE,oE,sE,cE,lE,uE,dE=function(){function e(e,t){this.type=`list`,this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=[`cloneShallow`,`downSample`,`minmaxDownSample`,`lttbDownSample`,`map`],this.CHANGABLE_METHODS=[`filterSelf`,`selectRange`],this.DOWNSAMPLE_METHODS=[`downSample`,`minmaxDownSample`,`lttbDownSample`];var n,r=!1;qT(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(r=!0,n=e),n||=[`x`,`y`];for(var i={},a=[],o={},s=!1,c={},l=0;l<n.length;l++){var u=n[l],d=K(u)?new OT({name:u}):u instanceof OT?u:new OT(u),f=d.name;d.type=d.type||`float`,d.coordDim||(d.coordDim=f,d.coordDimIndex=0);var p=d.otherDims=d.otherDims||{};a.push(f),i[f]=d,c[f]!=null&&(s=!0),d.createInvertedIndices&&(o[f]=[]),r&&(d.storeDimIndex=l),p.itemName===0&&(this._nameDimIdx=d.storeDimIndex),p.itemId===0&&(this._idDimIdx=d.storeDimIndex)}if(this.dimensions=a,this._dimInfos=i,this._initGetDimensionInfo(s),this.hostModel=t,this._invertedIndicesMap=o,this._dimOmitted){var m=this._dimIdxToName=Y();H(a,function(e){m.set(i[e].storeDimIndex,e)})}}return e.prototype.getDimension=function(e){var t=this._recognizeDimIndex(e);if(t==null)return e;if(t=e,!this._dimOmitted)return this.dimensions[t];var n=this._dimIdxToName.get(t);if(n!=null)return n;var r=this._schema.getSourceDimension(t);if(r)return r.name},e.prototype.getDimensionIndex=function(e){var t=this._recognizeDimIndex(e);if(t!=null)return t;if(e==null)return-1;var n=this._getDimInfo(e);return n?n.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(e):-1},e.prototype._recognizeDimIndex=function(e){if(xd(e)||e!=null&&!isNaN(e)&&!this._getDimInfo(e)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(e)<0))return+e},e.prototype._getStoreDimIndex=function(e){return this.getDimensionIndex(e)},e.prototype.getDimensionInfo=function(e){return this._getDimInfo(this.getDimension(e))},e.prototype._initGetDimensionInfo=function(e){var t=this._dimInfos;this._getDimInfo=e?function(e){return t.hasOwnProperty(e)?t[e]:void 0}:function(e){return t[e]}},e.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},e.prototype.mapDimension=function(e,t){var n=this._dimSummary;if(t==null)return n.encodeFirstDimNotExtra[e];var r=n.encode[e];return r?r[t]:null},e.prototype.mapDimensionsAll=function(e){return(this._dimSummary.encode[e]||[]).slice()},e.prototype.getStore=function(){return this._store},e.prototype.initData=function(e,t,n){var r=this,i;if(e instanceof UT&&(i=e),!i){var a=this.dimensions,o=Jw(e)||fd(e)?new uT(e,a.length):e;i=new UT;var s=QT(a,function(e){return{type:r._dimInfos[e].type,property:e}});i.initData(o,s,n)}this._store=i,this._nameList=(t||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,i.count()),this._dimSummary=wT(this,this._schema),this.userOutput=this._dimSummary.userOutput},e.prototype.appendData=function(e){var t=this._store.appendData(e);this._doInit(t[0],t[1])},e.prototype.appendValues=function(e,t){var n=this._store.appendValues(e,t&&t.length),r=n.start,i=n.end,a=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),t)for(var o=r;o<i;o++){var s=o-r;this._nameList[o]=t[s],a&&uE(this,o)}},e.prototype._updateOrdinalMeta=function(){for(var e=this._store,t=this.dimensions,n=0;n<t.length;n++){var r=this._dimInfos[t[n]];r.ordinalMeta&&e.collectOrdinalMeta(r.storeDimIndex,r.ordinalMeta)}},e.prototype._shouldMakeIdFromName=function(){var e=this._store.getProvider();return this._idDimIdx==null&&e.getSource().sourceFormat!==`typedArray`&&!e.fillStorage},e.prototype._doInit=function(e,t){if(!(e>=t)){var n=this._store.getProvider();this._updateOrdinalMeta();var r=this._nameList,i=this._idList;if(n.getSource().sourceFormat===`original`&&!n.pure)for(var a=[],o=e;o<t;o++){var s=n.getItem(o,a);if(!this.hasItemOption&&Sy(s)&&(this.hasItemOption=!0),s){var c=s.name;r[o]==null&&c!=null&&(r[o]=My(c,null));var l=s.id;i[o]==null&&l!=null&&(i[o]=My(l,null))}}if(this._shouldMakeIdFromName())for(var o=e;o<t;o++)uE(this,o);iE(this)}},e.prototype.getApproximateExtent=function(e,t){return this._approximateExtent[e]||this._store.getDataExtent(this._getStoreDimIndex(e),t)},e.prototype.setApproximateExtent=function(e,t){t=this.getDimension(t),this._approximateExtent[t]=e.slice()},e.prototype.getCalculationInfo=function(e){return this._calculationInfo[e]},e.prototype.setCalculationInfo=function(e,t){ZT(e)?V(this._calculationInfo,e):this._calculationInfo[e]=t},e.prototype.getName=function(e){var t=this.getRawIndex(e),n=this._nameList[t];return n==null&&this._nameDimIdx!=null&&(n=oE(this,this._nameDimIdx,t)),n??=``,n},e.prototype._getCategory=function(e,t){var n=this._store.get(e,t),r=this._store.getOrdinalMeta(e);return r?r.categories[n]:n},e.prototype.getId=function(e){return aE(this,this.getRawIndex(e))},e.prototype.count=function(){return this._store.count()},e.prototype.get=function(e,t){var n=this._store,r=this._dimInfos[e];if(r)return n.get(r.storeDimIndex,t)},e.prototype.getByRawIndex=function(e,t){var n=this._store,r=this._dimInfos[e];if(r)return n.getByRawIndex(r.storeDimIndex,t)},e.prototype.getIndices=function(){return this._store.getIndices()},e.prototype.getDataExtent=function(e){return this._store.getDataExtent(this._getStoreDimIndex(e),null)},e.prototype.getSum=function(e){return this._store.getSum(this._getStoreDimIndex(e))},e.prototype.getMedian=function(e){return this._store.getMedian(this._getStoreDimIndex(e))},e.prototype.getValues=function(e,t){var n=this,r=this._store;return W(e)?r.getValues(QT(e,function(e){return n._getStoreDimIndex(e)}),t):r.getValues(e)},e.prototype.hasValue=function(e){for(var t=this._dimSummary.dataDimIndicesOnCoord,n=0,r=t.length;n<r;n++)if(isNaN(this._store.get(t[n],e)))return!1;return!0},e.prototype.indexOfName=function(e){for(var t=0,n=this._store.count();t<n;t++)if(this.getName(t)===e)return t;return-1},e.prototype.getRawIndex=function(e){return this._store.getRawIndex(e)},e.prototype.indexOfRawIndex=function(e){return this._store.indexOfRawIndex(e)},e.prototype.rawIndexOf=function(e,t){var n=e&&this._invertedIndicesMap[e],r=n&&n[t];return r==null||isNaN(r)?tE:r},e.prototype.each=function(e,t,n){G(e)&&(n=t,t=e,e=[]);var r=n||this,i=QT(sE(e),this._getStoreDimIndex,this);this._store.each(i,r?vd(t,r):t)},e.prototype.filterSelf=function(e,t,n){G(e)&&(n=t,t=e,e=[]);var r=n||this,i=QT(sE(e),this._getStoreDimIndex,this);return this._store=this._store.filter(i,r?vd(t,r):t),this},e.prototype.selectRange=function(e){var t=this,n={},r=gd(e),i=[];return H(r,function(r){var a=t._getStoreDimIndex(r);n[a]=e[r],i.push(a)}),this._store=this._store.selectRange(n),this},e.prototype.mapArray=function(e,t,n){G(e)&&(n=t,t=e,e=[]),n||=this;var r=[];return this.each(e,function(){r.push(t&&t.apply(this,arguments))},n),r},e.prototype.map=function(e,t,n,r){var i=n||r||this,a=QT(sE(e),this._getStoreDimIndex,this),o=lE(this);return o._store=this._store.map(a,i?vd(t,i):t),o},e.prototype.modify=function(e,t,n,r){var i=n||r||this,a=QT(sE(e),this._getStoreDimIndex,this);this._store.modify(a,i?vd(t,i):t)},e.prototype.downSample=function(e,t,n,r){var i=lE(this);return i._store=this._store.downSample(this._getStoreDimIndex(e),t,n,r),i},e.prototype.minmaxDownSample=function(e,t){var n=lE(this);return n._store=this._store.minmaxDownSample(this._getStoreDimIndex(e),t),n},e.prototype.lttbDownSample=function(e,t){var n=lE(this);return n._store=this._store.lttbDownSample(this._getStoreDimIndex(e),t),n},e.prototype.getRawDataItem=function(e){return this._store.getRawDataItem(e)},e.prototype.getItemModel=function(e){var t=this.hostModel;return new Fw(this.getRawDataItem(e),t,t&&t.ecModel)},e.prototype.diff=function(e){var t=this;return new Rw(e?e.getStore().getIndices():[],this.getStore().getIndices(),function(t){return aE(e,t)},function(e){return aE(t,e)})},e.prototype.getVisual=function(e){var t=this._visual;return t&&t[e]},e.prototype.setVisual=function(e,t){this._visual=this._visual||{},ZT(e)?V(this._visual,e):this._visual[e]=t},e.prototype.getItemVisual=function(e,t){var n=this._itemVisuals[e];return(n&&n[t])??this.getVisual(t)},e.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},e.prototype.ensureUniqueItemVisual=function(e,t){var n=this._itemVisuals,r=n[e];r||=n[e]={};var i=r[t];return i??(i=this.getVisual(t),W(i)?i=i.slice():ZT(i)&&(i=V({},i)),r[t]=i),i},e.prototype.setItemVisual=function(e,t,n){var r=this._itemVisuals[e]||{};this._itemVisuals[e]=r,ZT(t)?V(r,t):r[t]=n},e.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},e.prototype.setLayout=function(e,t){ZT(e)?V(this._layout,e):this._layout[e]=t},e.prototype.getLayout=function(e){return this._layout[e]},e.prototype.getItemLayout=function(e){return this._itemLayouts[e]},e.prototype.setItemLayout=function(e,t,n){this._itemLayouts[e]=n?V(this._itemLayouts[e]||{},t):t},e.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},e.prototype.setItemGraphicEl=function(e,t){mb(this.hostModel&&this.hostModel.seriesIndex,this.dataType,e,t),this._graphicEls[e]=t},e.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},e.prototype.eachItemGraphicEl=function(e,t){H(this._graphicEls,function(n,r){n&&e&&e.call(t,n,r)})},e.prototype.cloneShallow=function(t){return t||=new e(this._schema?this._schema:QT(this.dimensions,this._getDimInfo,this),this.hostModel),cE(t,this),t._store=this._store,t},e.prototype.wrapMethod=function(e,t){var n=this[e];G(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var e=n.apply(this,arguments);return t.apply(this,[e].concat(jd(arguments)))})},e.internalField=function(){iE=function(e){var t=e._invertedIndicesMap;H(t,function(n,r){var i=e._dimInfos[r],a=i.ordinalMeta,o=e._store;if(a){n=t[r]=new $T(a.categories.length);for(var s=0;s<n.length;s++)n[s]=tE;for(var s=0;s<o.count();s++)n[o.get(i.storeDimIndex,s)]=s}})},oE=function(e,t,n){return My(e._getCategory(t,n),null)},aE=function(e,t){var n=e._idList[t];return n==null&&e._idDimIdx!=null&&(n=oE(e,e._idDimIdx,t)),n??=eE+t,n},sE=function(e){return W(e)||(e=e==null?[]:[e]),e},lE=function(t){var n=new e(t._schema?t._schema:QT(t.dimensions,t._getDimInfo,t),t.hostModel);return cE(n,t),n},cE=function(e,t){H(nE.concat(t.__wrappedMethods||[]),function(n){t.hasOwnProperty(n)&&(e[n]=t[n])}),e.__wrappedMethods=t.__wrappedMethods,H(rE,function(n){e[n]=B(t[n])}),e._calculationInfo=V({},t._calculationInfo)},uE=function(e,t){var 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=oE(e,i,t)),s==null&&a!=null&&(r[t]=s=oE(e,a,t)),s==null&&o!=null){var c=e._nameRepeatCount,l=c[o]=(c[o]||0)+1;s=o,l>1&&(s+=`__ec__`+l),r[t]=s}}}(),e}();function fE(e,t){return pE(e,t).dimensions}function pE(e,t){Jw(e)||(e=Xw(e)),t||={};var n=t.coordDimensions||[],r=t.dimensionsDefine||e.dimensionsDefine||[],i=Y(),a=[],o=mE(e,n,r,t.dimensionsCount),s=t.canOmitUnusedDimensions&&XT(o),c=r===e.dimensionsDefine,l=c?YT(e):JT(r),u=t.encodeDefine;!u&&t.encodeDefaulter&&(u=t.encodeDefaulter(e,o));for(var d=Y(u),f=new IT(o),p=0;p<f.length;p++)f[p]=-1;function m(e){var t=f[e];if(t<0){var n=r[e],i=q(n)?n:{name:n},o=new OT,s=i.name;return s!=null&&l.get(s)!=null&&(o.name=o.displayName=s),i.type!=null&&(o.type=i.type),i.displayName!=null&&(o.displayName=i.displayName),f[e]=a.length,o.storeDimIndex=e,a.push(o),o}return a[t]}if(!s)for(var p=0;p<o;p++)m(p);d.each(function(e,t){var n=vy(e).slice();if(n.length===1&&!K(n[0])&&n[0]<0){d.set(t,!1);return}var r=d.set(t,[]);H(n,function(e,n){var i=K(e)?l.get(e):e;i!=null&&i<o&&(r[n]=i,g(m(i),t,n))})});var h=0;H(n,function(e){var t,n,r,i;if(K(e))t=e,i={};else{i=e,t=i.name;var a=i.ordinalMeta;i.ordinalMeta=null,i=V({},i),i.ordinalMeta=a,n=i.dimsDef,r=i.otherDims,i.name=i.coordDim=i.coordDimIndex=i.dimsDef=i.otherDims=null}var s=d.get(t);if(s!==!1){if(s=vy(s),!s.length)for(var l=0;l<(n&&n.length||1);l++){for(;h<o&&m(h).coordDim!=null;)h++;h<o&&s.push(h++)}H(s,function(e,a){var o=m(e);if(c&&i.type!=null&&(o.type=i.type),g(sd(o,i),t,a),o.name==null&&n){var s=n[a];!q(s)&&(s={name:s}),o.name=o.displayName=s.name,o.defaultTooltip=s.defaultTooltip}r&&sd(o.otherDims,r)})}});function g(e,t,n){gb.get(t)==null?(e.coordDim=t,e.coordDimIndex=n,i.set(t,!0)):e.otherDims[t]=n}var _=t.generateCoord,v=t.generateCoordCount,y=v!=null;v=_?v||1:0;var b=_||`value`;function x(e){e.name??=e.coordDim}if(s)H(a,function(e){x(e)}),a.sort(function(e,t){return e.storeDimIndex-t.storeDimIndex});else for(var S=0;S<o;S++){var C=m(S);C.coordDim??(C.coordDim=hE(b,i,y),C.coordDimIndex=0,(!_||v<=0)&&(C.isExtraCoord=!0),v--),x(C),C.type==null&&(Gw(e,S)===zw.Must||C.isExtraCoord&&(C.otherDims.itemName!=null||C.otherDims.seriesName!=null))&&(C.type=`ordinal`)}return ob(a,function(e){return e.name},function(e,t){t>0&&(e.name+=t-1)}),new KT({source:e,dimensions:a,fullDimensionCount:o,dimensionOmitted:s})}function mE(e,t,n,r){var i=Math.max(e.dimensionsDetectedCount||1,t.length,n.length,r||0);return H(t,function(e){var t;q(e)&&(t=e.dimsDef)&&(i=Math.max(i,t.length))}),i}function hE(e,t,n){if(n||t.hasKey(e)){for(var r=0;t.hasKey(e+r);)r++;e+=r}return t.set(e,!0),e}var gE={},_E={},vE=function(){function e(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return e.prototype.create=function(e,t){this._nonSeriesBoxMasterList=n(gE,!0),this._normalMasterList=n(_E,!1);function n(n,r){var i=[];return H(n,function(n,r){var a=n.create(e,t);i=i.concat(a||[])}),i}},e.prototype.update=function(e,t){H(this._normalMasterList,function(n){n.update&&n.update(e,t)})},e.prototype.getCoordinateSystems=function(){return this._normalMasterList.concat(this._nonSeriesBoxMasterList)},e.register=function(e,t){if(e===`matrix`||e===`calendar`){gE[e]=t;return}_E[e]=t},e.get=function(e){return _E[e]||gE[e]},e}();function yE(e){return!!gE[e]}var bE=Y();function xE(e){var t=e.getShallow(`coord`,!0),n=1;if(t==null){var r=bE.get(e.type);r&&r.getCoord2&&(n=2,t=r.getCoord2(e))}return{coord:t,from:n}}function SE(e,t){var n=e.getShallow(`coordinateSystem`),r=e.getShallow(`coordinateSystemUsage`,!0),i=0;if(n){var a=e.mainType===`series`;r??=a?`data`:`box`,r===`data`?(i=1,a||(i=0)):r===`box`&&(i=2,!a&&!yE(n)&&(i=0))}return{coordSysType:n,kind:i}}function CE(e){var t=e.targetModel,n=e.coordSysType,r=e.coordSysProvider,i=e.isDefaultDataCoordSys;e.allowNotFound;var a=SE(t,!0),o=a.kind,s=a.coordSysType;if(i&&o!==1&&(o=1,s=n),o===0||s!==n)return 0;var c=r(n,t);return c?(o===1?t.coordinateSystem=c:t.boxCoordinateSystem=c,o):0}var wE=function(){function e(e){this.coordSysDims=[],this.axisMap=Y(),this.categoryAxisMap=Y(),this.coordSysName=e}return e}();function TE(e){var t=e.get(`coordinateSystem`),n=new wE(t),r=EE[t];if(r)return r(e,n,n.axisMap,n.categoryAxisMap),n}var EE={cartesian2d:function(e,t,n,r){var i=e.getReferringComponents(`xAxis`,Hy).models[0],a=e.getReferringComponents(`yAxis`,Hy).models[0];t.coordSysDims=[`x`,`y`],n.set(`x`,i),n.set(`y`,a),DE(i)&&(r.set(`x`,i),t.firstCategoryDimIndex=0),DE(a)&&(r.set(`y`,a),t.firstCategoryDimIndex??=1)},singleAxis:function(e,t,n,r){var i=e.getReferringComponents(`singleAxis`,Hy).models[0];t.coordSysDims=[`single`],n.set(`single`,i),DE(i)&&(r.set(`single`,i),t.firstCategoryDimIndex=0)},polar:function(e,t,n,r){var i=e.getReferringComponents(`polar`,Hy).models[0],a=i.findAxisModel(`radiusAxis`),o=i.findAxisModel(`angleAxis`);t.coordSysDims=[`radius`,`angle`],n.set(`radius`,a),n.set(`angle`,o),DE(a)&&(r.set(`radius`,a),t.firstCategoryDimIndex=0),DE(o)&&(r.set(`angle`,o),t.firstCategoryDimIndex??=1)},geo:function(e,t,n,r){t.coordSysDims=[`lng`,`lat`]},parallel:function(e,t,n,r){var i=e.ecModel,a=i.getComponent(`parallel`,e.get(`parallelIndex`)),o=t.coordSysDims=a.dimensions.slice();H(a.parallelAxisIndex,function(e,a){var s=i.getComponent(`parallelAxis`,e),c=o[a];n.set(c,s),DE(s)&&(r.set(c,s),t.firstCategoryDimIndex??=a)})},matrix:function(e,t,n,r){var i=e.getReferringComponents(`matrix`,Hy).models[0];t.coordSysDims=[`x`,`y`];var a=i.getDimensionModel(`x`),o=i.getDimensionModel(`y`);n.set(`x`,a),n.set(`y`,o),r.set(`x`,a),r.set(`y`,o)}};function DE(e){return e.get(`type`)===`category`}function OE(e,t,n){n||={};var r=n.byIndex,i=n.stackedCoordDimension,a,o,s;kE(t)?a=t:(o=t.schema,a=o.dimensions,s=t.store);var c=!!(e&&e.get(`stack`)),l,u,d,f,p=!0;function m(e){return e.type!==`ordinal`&&e.type!==`time`}if(H(a,function(e,t){K(e)&&(a[t]=e={name:e}),m(e)||(p=!1)}),H(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);var h=u.coordDim,g=u.type,_=0;H(a,function(e){e.coordDim===h&&_++});var v={name:d,coordDim:h,coordDimIndex:_,type:g,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},y={name:f,coordDim:f,coordDimIndex:_+1,type:g,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(v.storeDimIndex=s.ensureCalculationDimension(f,g),y.storeDimIndex=s.ensureCalculationDimension(d,g)),o.appendCalculationDimension(v),o.appendCalculationDimension(y)):(a.push(v),a.push(y))}return{stackedDimension:u&&u.name,stackedByDimension:l&&l.name,isStackedByIndex:r,stackedOverDimension:f,stackResultDimension:d}}function kE(e){return!qT(e.schema)}function AE(e,t){return!!t&&t===e.getCalculationInfo(`stackedDimension`)}function jE(e,t){return AE(e,t)?e.getCalculationInfo(`stackResultDimension`):t}function ME(e,t){var n=e.get(`coordinateSystem`),r=vE.get(n),i;return t&&t.coordSysDims&&(i=U(t.coordSysDims,function(e){var n={name:e},r=t.axisMap.get(e);return r&&(n.type=ET(r.get(`type`))),n})),i||=r&&(r.getDimensionsInfo?r.getDimensionsInfo():r.dimensions.slice())||[`x`,`y`],i}function NE(e,t,n){var r,i;return n&&H(e,function(e,a){var o=e.coordDim,s=n.categoryAxisMap.get(o);s&&(r??=a,e.ordinalMeta=s.getOrdinalMeta(),t&&(e.createInvertedIndices=!0)),e.otherDims.itemName!=null&&(i=!0)}),!i&&r!=null&&(e[r].otherDims.itemName=0),r}function PE(e,t,n){n||={};var r=t.getSourceManager(),i,a=!1;e?(a=!0,i=Xw(e)):(i=r.getSource(),a=i.sourceFormat===_b);var o=TE(t),s=ME(t,o),c=n.useEncodeDefaulter,l=G(c)?c:c?yd(Hw,s,t):null,u={coordDimensions:s,generateCoord:n.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:l,canOmitUnusedDimensions:!a},d=pE(i,u),f=NE(d.dimensions,n.createInvertedIndices,o),p=a?null:r.getSharedDataStore(d),m=OE(t,{schema:d,store:p}),h=new dE(d,t);h.setCalculationInfo(m);var g=f!=null&&FE(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 FE(e){if(e.sourceFormat===`original`)return!W(xy(IE(e.data||[])))}function IE(e){for(var t=0;t<e.length&&e[t]==null;)t++;return e[t]}var LE=Math.round(Math.random()*10);function RE(e){return[e||``,LE++].join(`_`)}function zE(e){var t={};e.registerSubTypeDefaulter=function(e,n){var r=ef(e);t[r.main]=n},e.determineSubType=function(n,r){var i=r.type;if(!i){var a=ef(n).main;e.hasSubTypes(n)&&t[a]&&(i=t[a](r))}return i}}function BE(e,t){e.topologicalTravel=function(e,t,r,i){if(!e.length)return;var a=n(t),o=a.graph,s=a.noEntryList,c={};for(H(e,function(e){c[e]=!0});s.length;){var l=s.pop(),u=o[l],d=!!c[l];d&&(r.call(i,l,u.originalDeps.slice()),delete c[l]),H(u.successor,d?p:f)}H(c,function(){throw Error(``)});function f(e){o[e].entryCount--,o[e].entryCount===0&&s.push(e)}function p(e){c[e]=!0,f(e)}};function n(e){var n={},a=[];return H(e,function(o){var s=r(n,o),c=i(s.originalDeps=t(o),e);s.entryCount=c.length,s.entryCount===0&&a.push(o),H(c,function(e){ld(s.predecessor,e)<0&&s.predecessor.push(e);var t=r(n,e);ld(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){var n=[];return H(e,function(e){ld(t,e)>=0&&n.push(e)}),n}}function VE(e,t){return id(id({},e,!0),t,!0)}var HE=Math.log(2);function UE(e,t,n,r,i,a){var o=r+`-`+i,s=e.length;if(a.hasOwnProperty(o))return a[o];if(t===1){var c=Math.round(Math.log((1<<s)-1&~i)/HE);return e[n][c]}for(var l=r|1<<n,u=n+1;r&1<<u;)u++;for(var d=0,f=0,p=0;f<s;f++){var m=1<<f;m&i||(d+=(p%2?-1:1)*e[n][f]*UE(e,t-1,u,l,i|m,a),p++)}return a[o]=d,d}function WE(e,t){var 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=UE(n,8,0,0,0,r);if(i!==0){for(var a=[],o=0;o<8;o++)for(var s=0;s<8;s++)a[s]??(a[s]=0),a[s]+=((o+s)%2?-1:1)*UE(n,7,+(o===0),1<<o,1<<s,r)/i*t[o];return function(e,t,n){var 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}}}var GE=`___zrEVENTSAVED`,KE=[];function qE(e,t,n,r,i){return YE(KE,t,r,i,!0)&&YE(e,n,KE[0],KE[1])}function JE(e,t){e&&n(e),t&&n(t);function n(e){var t=e[GE];t&&(t.clearMarkers&&t.clearMarkers(),delete e[GE])}}function YE(e,t,n,r,i){if(t.getBoundingClientRect&&X.domSupported&&!QE(t)){var a=t[GE]||(t[GE]={}),o=ZE(XE(t,a),a,i);if(o)return o(e,n,r),!0}return!1}function XE(e,t){var n=t.markers;if(n)return n;n=t.markers=[];for(var r=[`left`,`right`],i=[`top`,`bottom`],a=0;a<4;a++){var o=document.createElement(`div`),s=o.style,c=a%2,l=(a>>1)%2;s.cssText=[`position: absolute`,`visibility: hidden`,`padding: 0`,`margin: 0`,`border-width: 0`,`user-select: none`,`width:0`,`height:0`,r[c]+`:0`,i[l]+`:0`,r[1-c]+`:auto`,i[1-l]+`:auto`,``].join(`!important;`),e.appendChild(o),n.push(o)}return t.clearMarkers=function(){H(n,function(e){e.parentNode&&e.parentNode.removeChild(e)})},n}function ZE(e,t,n){for(var r=n?`invTrans`:`trans`,i=t[r],a=t.srcCoords,o=[],s=[],c=!0,l=0;l<4;l++){var u=e[l].getBoundingClientRect(),d=2*l,f=u.left,p=u.top;o.push(f,p),c=c&&a&&f===a[d]&&p===a[d+1],s.push(e[l].offsetLeft,e[l].offsetTop)}return c&&i?i:(t.srcCoords=o,t[r]=n?WE(s,o):WE(o,s))}function QE(e){return e.nodeName.toUpperCase()===`CANVAS`}var $E=/([&<>"'])/g,eD={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`};function tD(e){return e==null?``:(e+``).replace($E,function(e,t){return eD[t]})}var nD={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:`. `}}}},rD={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:``}}}},iD=`ZH`,aD=`EN`,oD=aD,sD={},cD={},lD=X.domSupported?function(){return(document.documentElement.lang||navigator.language||navigator.browserLanguage||oD).toUpperCase().indexOf(iD)>-1?iD:oD}():oD;function uD(e,t){e=e.toUpperCase(),cD[e]=new Fw(t),sD[e]=t}function dD(e){if(K(e)){var t=sD[e.toUpperCase()]||{};return e===iD||e===aD?B(t):id(B(t),B(sD[oD]),!1)}else return id(B(e),B(sD[oD]),!1)}function fD(e){return cD[e]}function pD(){return cD[oD]}uD(aD,nD),uD(iD,rD);var mD=null;function hD(){return mD}function gD(e,t){var n=hD(),r=t.breakOption,i=t.breakParsed;return!i&&n&&(i=n.parseAxisBreakOption(r,e)),i}function _D(e){var t=e.brk;return t?t.breaks:[]}function vD(e){var t=e.brk;return t?t.hasBreaks():!1}var yD=1e3,bD=yD*60,xD=bD*60,SD=xD*24,CD=SD*365,wD={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})/},TD={year:`{yyyy}`,month:`{MMM}`,day:`{d}`,hour:`{HH}:{mm}`,minute:`{HH}:{mm}`,second:`{HH}:{mm}:{ss}`,millisecond:`{HH}:{mm}:{ss} {SSS}`},ED=`{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}`,DD=`{yyyy}-{MM}-{dd}`,OD={year:`{yyyy}`,month:`{yyyy}-{MM}`,day:DD,hour:DD+` `+TD.hour,minute:DD+` `+TD.minute,second:DD+` `+TD.second,millisecond:ED},kD=[`year`,`month`,`day`,`hour`,`minute`,`second`,`millisecond`],AD=[`year`,`half-year`,`quarter`,`month`,`week`,`half-week`,`day`,`half-day`,`quarter-day`,`hour`,`minute`,`second`,`millisecond`];function jD(e){return!K(e)&&!G(e)?MD(e):e}function MD(e){e||={};var t={},n=!0;return H(kD,function(t){n&&=e[t]==null}),H(kD,function(r,i){var a=e[r];t[r]={};for(var o=null,s=i;s>=0;s--){var c=kD[s],l=q(a)&&!W(a)?a[c]:a,u=void 0;W(l)?(u=l.slice(),o=u[0]||``):K(l)?(o=l,u=[o]):(o==null?o=TD[r]:wD[c].test(o)||(o=t[c][c][0]+` `+o),u=[o],n&&(u[1]=`{primary|`+o+`}`)),t[r][c]=u}}),t}function ND(e,t){return e+=``,`0000`.substr(0,t-e.length)+e}function PD(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 FD(e){return e===PD(e)}function ID(e){switch(e){case`year`:case`month`:return`day`;case`millisecond`:return`millisecond`;default:return`second`}}function LD(e,t,n,r){var i=Zv(e),a=i[VD(n)](),o=i[HD(n)]()+1,s=Math.floor((o-1)/3)+1,c=i[UD(n)](),l=i[`get`+(n?`UTC`:``)+`Day`](),u=i[WD(n)](),d=(u-1)%12+1,f=i[GD(n)](),p=i[KD(n)](),m=i[qD(n)](),h=u>=12?`pm`:`am`,g=h.toUpperCase(),_=(r instanceof Fw?r:fD(r||lD)||pD()).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,ND(a%100+``,2)).replace(/{Q}/g,s+``).replace(/{MMMM}/g,v[o-1]).replace(/{MMM}/g,y[o-1]).replace(/{MM}/g,ND(o,2)).replace(/{M}/g,o+``).replace(/{dd}/g,ND(c,2)).replace(/{d}/g,c+``).replace(/{eeee}/g,b[l]).replace(/{ee}/g,x[l]).replace(/{e}/g,l+``).replace(/{HH}/g,ND(u,2)).replace(/{H}/g,u+``).replace(/{hh}/g,ND(d+``,2)).replace(/{h}/g,d+``).replace(/{mm}/g,ND(f,2)).replace(/{m}/g,f+``).replace(/{ss}/g,ND(p,2)).replace(/{s}/g,p+``).replace(/{SSS}/g,ND(m,3)).replace(/{S}/g,m+``)}function RD(e,t,n,r,i){var a=null;if(K(n))a=n;else if(G(n)){var o={time:e.time,level:e.time?e.time.level:0},s=hD();s&&s.makeAxisLabelFormatterParamBreak(o,e.break),a=n(e.value,t,o)}else{var c=e.time;if(c){var l=n[c.lowerTimeUnit][c.upperTimeUnit];a=l[Math.min(c.level,l.length-1)]||``}else{var u=zD(e.value,i);a=n[u][u][0]}}return LD(new Date(e.value),a,i,r)}function zD(e,t){var n=Zv(e),r=n[HD(t)]()+1,i=n[UD(t)](),a=n[WD(t)](),o=n[GD(t)](),s=n[KD(t)](),c=n[qD(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 BD(e,t,n){switch(t){case`year`:e[YD(n)](0);case`month`:e[XD(n)](1);case`day`:e[ZD(n)](0);case`hour`:e[QD(n)](0);case`minute`:e[$D(n)](0);case`second`:e[eO(n)](0)}return e}function VD(e){return e?`getUTCFullYear`:`getFullYear`}function HD(e){return e?`getUTCMonth`:`getMonth`}function UD(e){return e?`getUTCDate`:`getDate`}function WD(e){return e?`getUTCHours`:`getHours`}function GD(e){return e?`getUTCMinutes`:`getMinutes`}function KD(e){return e?`getUTCSeconds`:`getSeconds`}function qD(e){return e?`getUTCMilliseconds`:`getMilliseconds`}function JD(e){return e?`setUTCFullYear`:`setFullYear`}function YD(e){return e?`setUTCMonth`:`setMonth`}function XD(e){return e?`setUTCDate`:`setDate`}function ZD(e){return e?`setUTCHours`:`setHours`}function QD(e){return e?`setUTCMinutes`:`setMinutes`}function $D(e){return e?`setUTCSeconds`:`setSeconds`}function eO(e){return e?`setUTCMilliseconds`:`setMilliseconds`}function tO(e,t,n,r,i,a,o,s){return new rv({style:{text:e,font:t,align:n,verticalAlign:r,padding:i,rich:a,overflow:o?`truncate`:null,lineHeight:s}}).getBoundingRect()}function nO(e){if(!iy(e))return K(e)?e:`-`;var t=(e+``).split(`.`);return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,`$1,`)+(t.length>1?`.`+t[1]:``)}function rO(e,t){return e=(e||``).toLowerCase().replace(/-(.)/g,function(e,t){return t.toUpperCase()}),t&&e&&(e=e.charAt(0).toUpperCase()+e.slice(1)),e}var iO=Md;function aO(e,t,n){var r=`{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}`;function i(e){return e&&Pd(e)?e:`-`}function a(e){return cy(e)}var o=t===`time`,s=e instanceof Date;if(o||s){var c=o?Zv(e):e;if(!isNaN(+c))return LD(c,r,n);if(s)return`-`}if(t===`ordinal`)return bd(e)?i(e):xd(e)&&a(e)?e+``:`-`;var l=ry(e);return a(l)?nO(l):bd(e)?i(e):typeof e==`boolean`?e+``:`-`}var oO=[`a`,`b`,`c`,`d`,`e`,`f`,`g`],sO=function(e,t){return`{`+e+(t??``)+`}`};function cO(e,t,n){W(t)||(t=[t]);var r=t.length;if(!r)return``;for(var i=t[0].$vars||[],a=0;a<i.length;a++){var o=oO[a];e=e.replace(sO(o),sO(o,0))}for(var s=0;s<r;s++)for(var c=0;c<i.length;c++){var l=t[s][i[c]];e=e.replace(sO(oO[c],s),n?tD(l):l)}return e}function lO(e,t){var n=K(e)?{color:e,extraCssText:t}:e||{},r=n.color,i=n.type;t=n.extraCssText;var 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:`+tD(r)+`;`+(t||``)+`"></span>`:`<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:`+tD(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 uO(e,t,n){(e===`week`||e===`month`||e===`quarter`||e===`half-year`||e===`year`)&&(e=`MM-dd
|
|
263
|
-
yyyy`);var r=Zv(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`,ND(o,2)).replace(`M`,o).replace(`yyyy`,a).replace(`yy`,ND(a%100+``,2)).replace(`dd`,ND(s,2)).replace(`d`,s).replace(`hh`,ND(c,2)).replace(`h`,c).replace(`mm`,ND(l,2)).replace(`m`,l).replace(`ss`,ND(u,2)).replace(`s`,u).replace(`SSS`,ND(d,3)),e}function dO(e){return e&&e.charAt(0).toUpperCase()+e.substr(1)}function fO(e,t){return t||=`transparent`,K(e)?e:q(e)&&e.colorStops&&(e.colorStops[0]||{}).color||t}function pO(e,t){if(t===`_blank`||t===`blank`){var n=window.open();n.opener=null,n.location.href=e}else window.open(e,t)}var mO=H,hO=[`left`,`right`,`top`,`bottom`,`width`,`height`],gO=[[`width`,`left`,`right`],[`height`,`top`,`bottom`]];function _O(e,t,n,r,i){var a=0,o=0;r??=1/0,i??=1/0;var s=0;t.eachChild(function(c,l){var u=c.getBoundingRect(),d=t.childAt(l+1),f=d&&d.getBoundingRect(),p,m;if(e===`horizontal`){var h=u.width+(f?-f.x+u.x:0);p=a+h,p>r||c.newline?(a=0,p=h,o+=s+n,s=u.height):s=Math.max(s,u.height)}else{var g=u.height+(f?-f.y+u.y:0);m=o+g,m>i||c.newline?(a+=s+n,o=0,m=g,s=u.width):s=Math.max(s,u.width)}c.newline||(c.x=a,c.y=o,c.markRedraw(),e===`horizontal`?a=p+n:o=m+n)})}var vO=_O;yd(_O,`vertical`),yd(_O,`horizontal`);function yO(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 bO(e,t,n){n=iO(n||0);var r=t.width,i=t.height,a=Mv(e.left,r),o=Mv(e.top,i),s=Mv(e.right,r),c=Mv(e.bottom,i),l=Mv(e.width,r),u=Mv(e.height,i),d=n[2]+n[0],f=n[1]+n[3],p=e.aspect;switch(isNaN(l)&&(l=r-s-f-a),isNaN(u)&&(u=i-c-d-o),p!=null&&(isNaN(l)&&isNaN(u)&&(p>r/i?l=r*.8:u=i*.8),isNaN(l)&&(l=p*u),isNaN(u)&&(u=l/p)),isNaN(a)&&(a=r-s-l-f),isNaN(o)&&(o=i-c-u-d),e.left||e.right){case`center`:a=r/2-l/2-n[3];break;case`right`:a=r-l-f;break}switch(e.top||e.bottom){case`middle`:case`center`:o=i/2-u/2-n[0];break;case`bottom`:o=i-u-d;break}a||=0,o||=0,isNaN(l)&&(l=r-f-a-(s||0)),isNaN(u)&&(u=i-d-o-(c||0));var m=new Z((t.x||0)+a+n[3],(t.y||0)+o+n[0],l,u);return m.margin=n,m}function xO(e,t,n){var r=e.getShallow(`preserveAspect`,!0);if(!r)return t;var i=t.width/t.height;if(Math.abs(Math.atan(n)-Math.atan(i))<1e-9)return t;var 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`),bO(s,t)}var SO={rect:1,point:2};function CO(e,t,n){var r,i,a,o=e.boxCoordinateSystem,s;if(o){var c=xE(e),l=c.coord,u=c.from;if(o.dataToLayout){a=SO.rect,s=u;var d=o.dataToLayout(l);r=d.contentRect||d.rect}else n&&n.enableLayoutOnlyByCenter&&o.dataToPoint&&(a=SO.point,s=u,i=o.dataToPoint(l))}return a??=SO.rect,a===SO.rect&&(r||={x:0,y:0,width:t.getWidth(),height:t.getHeight()},i=[r.x+r.width/2,r.y+r.height/2]),{type:a,refContainer:r,refPoint:i,boxCoordFrom:s}}function wO(e){var t=e.layoutMode||e.constructor.layoutMode;return q(t)?t:t?{type:t}:null}function TO(e,t,n){var r=n&&n.ignoreSize;!W(r)&&(r=[r,r]);var i=o(gO[0],0),a=o(gO[1],1);c(gO[0],e,i),c(gO[1],e,a);function o(n,i){var a={},o=0,c={},l=0,u=2;if(mO(n,function(t){c[t]=e[t]}),mO(n,function(e){Gd(t,e)&&(a[e]=c[e]=t[e]),s(a,e)&&o++,s(c,e)&&l++}),r[i])return s(t,n[1])?c[n[2]]=null:s(t,n[2])&&(c[n[1]]=null),c;if(l===u||!o)return c;if(o>=u)return a;for(var d=0;d<n.length;d++){var f=n[d];if(!Gd(a,f)&&Gd(e,f)){a[f]=e[f];break}}return a}function s(e,t){return e[t]!=null&&e[t]!==`auto`}function c(e,t,n){mO(e,function(e){t[e]=n[e]})}}function EO(e){return DO({},e)}function DO(e,t){return t&&e&&mO(hO,function(n){Gd(t,n)&&(e[n]=t[n])}),e}var OO=Ry(),kO=function(e){z(t,e);function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.uid=RE(`ec_cpt_model`),i}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n)},t.prototype.mergeDefaultAndTheme=function(e,t){var n=wO(this),r=n?EO(e):{};id(e,t.getTheme().get(this.mainType)),id(e,this.getDefaultOption()),n&&TO(e,r,n)},t.prototype.mergeOption=function(e,t){id(this.option,e,!0);var n=wO(this);n&&TO(this.option,e,n)},t.prototype.optionUpdated=function(e,t){},t.prototype.getDefaultOption=function(){var e=this.constructor;if(!nf(e))return e.defaultOption;var t=OO(this);if(!t.defaultOption){for(var n=[],r=e;r;){var i=r.prototype.defaultOption;i&&n.push(i),r=r.superClass}for(var a={},o=n.length-1;o>=0;o--)a=id(a,n[o],!0);t.defaultOption=a}return t.defaultOption},t.prototype.getReferringComponents=function(e,t){var n=e+`Index`,r=e+`Id`;return Uy(this.ecModel,e,{index:this.get(n,!0),id:this.get(r,!0)},t)},t.prototype.getBoxLayoutParams=function(){return yO(this,!1)},t.prototype.getZLevelKey=function(){return``},t.prototype.setZLevel=function(e){this.option.zlevel=e},t.protoInitialize=function(){var e=t.prototype;e.type=`component`,e.id=``,e.name=``,e.mainType=``,e.subType=``,e.componentIndex=0}(),t}(Fw);of(kO,Fw),df(kO),zE(kO),BE(kO,AO);function AO(e){var t=[];return H(kO.getClassesByMainType(e),function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])}),t=U(t,function(e){return ef(e).main}),e!==`dataset`&&ld(t,`dataset`)<=0&&t.unshift(`dataset`),t}var jO=Ry();Ry();var MO=function(){function e(){}return e.prototype.getColorFromPalette=function(e,t,n){var r=vy(this.get(`color`,!0)),i=this.get(`colorLayer`,!0);return PO(this,jO,r,i,e,t,n)},e.prototype.clearColorPalette=function(){FO(this,jO)},e}();function NO(e,t){for(var n=e.length,r=0;r<n;r++)if(e[r].length>t)return e[r];return e[n-1]}function PO(e,t,n,r,i,a,o){a||=e;var s=t(a),c=s.paletteIdx||0,l=s.paletteNameMap=s.paletteNameMap||{};if(l.hasOwnProperty(i))return l[i];var u=o==null||!r?n:NO(r,o);if(u||=n,!(!u||!u.length)){var d=u[c];return i&&(l[i]=d),s.paletteIdx=(c+1)%u.length,d}}function FO(e,t){t(e).paletteIdx=0,t(e).paletteNameMap={}}var IO=/\{@(.+?)\}/g,LO=function(){function e(){}return e.prototype.getDataParams=function(e,t){var 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`]}},e.prototype.getFormattedLabel=function(e,t,n,r,i,a){t||=`normal`;var o=this.getData(n),s=this.getDataParams(e,n);if(a&&(s.value=a.interpolatedValue),r!=null&&W(s.value)&&(s.value=s.value[r]),i||=o.getItemModel(e).get(t===`normal`?[`label`,`formatter`]:[t,`label`,`formatter`]),G(i))return s.status=t,s.dimensionIndex=r,i(s);if(K(i))return cO(i,s).replace(IO,function(t,n){var r=n.length,i=n;i.charAt(0)===`[`&&i.charAt(r-1)===`]`&&(i=+i.slice(1,r-1));var s=ST(o,e,i);if(a&&W(a.interpolatedValue)){var c=o.getDimensionIndex(i);c>=0&&(s=a.interpolatedValue[c])}return s==null?``:s+``})},e.prototype.getRawValue=function(e,t){return ST(this.getData(t),e)},e.prototype.formatTooltip=function(e,t,n){},e}();function RO(e){var t,n;return q(e)?e.type&&(n=e):t=e,{text:t,frag:n}}function zO(e){return new BO(e)}var BO=function(){function e(e){e||={},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return e.prototype.perform=function(e){var t=this._upstream,n=e&&e.skip;if(this._dirty&&t){var r=this.context;r.data=r.outputData=t.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var i;this._plan&&!n&&(i=this._plan(this.context));var a=l(this._modBy),o=this._modDataCount||0,s=l(e&&e.modBy),c=e&&e.modDataCount||0;(a!==s||o!==c)&&(i=`reset`);function l(e){return!(e>=1)&&(e=1),e}var u;(this._dirty||i===`reset`)&&(this._dirty=!1,u=this._doReset(n)),this._modBy=s,this._modDataCount=c;var d=e&&e.step;if(t?this._dueEnd=t._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var f=this._dueIndex,p=Math.min(d==null?1/0:this._dueIndex+d,this._dueEnd);if(!n&&(u||f<p)){var m=this._progress;if(W(m))for(var h=0;h<m.length;h++)this._doProgress(m[h],f,p,s,c);else this._doProgress(m,f,p,s,c)}this._dueIndex=p;var g=this._settedOutputEnd==null?p:this._settedOutputEnd;this._outputDueEnd=g}else this._dueIndex=this._outputDueEnd=this._settedOutputEnd==null?this._dueEnd:this._settedOutputEnd;return this.unfinished()},e.prototype.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},e.prototype._doProgress=function(e,t,n,r,i){VO.reset(t,n,r,i),this._callingProgress=e,this._callingProgress({start:t,end:n,count:n-t,next:VO.next},this.context)},e.prototype._doReset=function(e){this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null;var t,n;!e&&this._reset&&(t=this._reset(this.context),t&&t.progress&&(n=t.forceFirstProgress,t=t.progress),W(t)&&!t.length&&(t=null)),this._progress=t,this._modBy=this._modDataCount=null;var r=this._downstream;return r&&r.dirty(),n},e.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},e.prototype.pipe=function(e){(this._downstream!==e||this._dirty)&&(this._downstream=e,e._upstream=this,e.dirty())},e.prototype.dispose=function(){this._disposed||=(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,!0)},e.prototype.getUpstream=function(){return this._upstream},e.prototype.getDownstream=function(){return this._downstream},e.prototype.setOutputEnd=function(e){this._outputDueEnd=this._settedOutputEnd=e},e}(),VO=function(){var 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(){var a=t%i*n+Math.ceil(t/i),o=t>=e?null:a<r?a:t;return t++,o}}(),HO=function(){function e(){}return e.prototype.getRawData=function(){throw Error(`not supported`)},e.prototype.getRawDataItem=function(e){throw Error(`not supported`)},e.prototype.cloneRawData=function(){},e.prototype.getDimensionInfo=function(e){},e.prototype.cloneAllDimensionInfo=function(){},e.prototype.count=function(){},e.prototype.retrieveValue=function(e,t){},e.prototype.retrieveValueFromItem=function(e,t){},e.prototype.convertValue=function(e,t){return kT(e,t)},e}();function UO(e,t){var n=new HO,r=e.data,i=n.sourceFormat=e.sourceFormat,a=e.startIndex;e.seriesLayoutBy!==`column`&&my(``);var o=[],s={},c=e.dimensionsDefine;if(c)H(c,function(e,t){var n=e.name,r={index:t,name:n,displayName:e.displayName};o.push(r),n!=null&&(Gd(s,n)&&my(``),s[n]=r)});else for(var l=0;l<e.dimensionsDetectedCount;l++)o.push({index:l});var u=mT(i,Cb);t.__isBuiltIn&&(n.getRawDataItem=function(e){return u(r,a,o,e)},n.getRawData=vd(WO,null,e)),n.cloneRawData=vd(GO,null,e),n.count=vd(_T(i,Cb),null,r,a,o);var d=bT(i);n.retrieveValue=function(e,t){return f(u(r,a,o,e),t)};var f=n.retrieveValueFromItem=function(e,t){if(e!=null){var n=o[t];if(n)return d(e,t,n.name)}};return n.getDimensionInfo=vd(KO,null,o,s),n.cloneAllDimensionInfo=vd(qO,null,o),n}function WO(e){var t=e.sourceFormat;return QO(t)||my(``),e.data}function GO(e){var t=e.sourceFormat,n=e.data;if(QO(t)||my(``),t===`arrayRows`){for(var r=[],i=0,a=n.length;i<a;i++)r.push(n[i].slice());return r}else if(t===`objectRows`){for(var r=[],i=0,a=n.length;i<a;i++)r.push(V({},n[i]));return r}}function KO(e,t,n){if(n!=null){if(xd(n)||!isNaN(n)&&!Gd(t,n))return e[n];if(Gd(t,n))return t[n]}}function qO(e){return B(e)}var JO=Y();function YO(e){e=B(e);var t=e.type,n=``;t||my(n);var r=t.split(`:`);r.length!==2&&my(n);var i=!1;r[0]===`echarts`&&(t=r[1],i=!0),e.__isBuiltIn=i,JO.set(t,e)}function XO(e,t,n){var r=vy(e),i=r.length;i||my(``);for(var a=0,o=i;a<o;a++){var s=r[a];t=ZO(s,t,n,i===1?null:a),a!==o-1&&(t.length=Math.max(t.length,1))}return t}function ZO(e,t,n,r){var i=``;t.length||my(i),q(e)||my(i);var a=e.type,o=JO.get(a);o||my(i);var s=U(t,function(e){return UO(e,o)});return U(vy(o.transform({upstream:s[0],upstreamList:s,config:B(e.config)})),function(e,n){var r=``;q(e)||my(r),e.data||my(r),QO(Qw(e.data))||my(r);var i,a=t[0];if(a&&n===0&&!e.dimensions){var o=a.startIndex;o&&(e.data=a.data.slice(0,o).concat(e.data)),i={seriesLayoutBy:Cb,sourceHeader:o,dimensions:a.metaRawOption.dimensions}}else i={seriesLayoutBy:Cb,sourceHeader:0,dimensions:e.dimensions};return Yw(e.data,i,null)})}function QO(e){return e===`arrayRows`||e===`objectRows`}var $O=function(){function e(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}return e.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},e.prototype._setLocalSource=function(e,t){this._sourceList=e,this._upstreamSignList=t,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},e.prototype._getVersionSign=function(){return this._sourceHost.uid+`_`+this._versionSignBase},e.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},e.prototype._createSource=function(){this._setLocalSource([],[]);var e=this._sourceHost,t=this._getUpstreamSourceManagers(),n=!!t.length,r,i;if(ek(e)){var a=e,o=void 0,s=void 0,c=void 0;if(n){var l=t[0];l.prepareSource(),c=l.getSource(),o=c.data,s=c.sourceFormat,i=[l._getVersionSign()]}else o=a.get(`data`,!0),s=Cd(o)?xb:_b,i=[];var u=this._getSourceMetaRawOption()||{},d=c&&c.metaRawOption||{},f=J(u.seriesLayoutBy,d.seriesLayoutBy)||null,p=J(u.sourceHeader,d.sourceHeader),m=J(u.dimensions,d.dimensions);r=f!==d.seriesLayoutBy||!!p!=!!d.sourceHeader||m?[Yw(o,{seriesLayoutBy:f,sourceHeader:p,dimensions:m},s)]:[]}else{var h=e;if(n){var g=this._applyTransform(t);r=g.sourceList,i=g.upstreamSignList}else r=[Yw(h.get(`source`,!0),this._getSourceMetaRawOption(),null)],i=[]}this._setLocalSource(r,i)},e.prototype._applyTransform=function(e){var t=this._sourceHost,n=t.get(`transform`,!0),r=t.get(`fromTransformResult`,!0);r!=null&&e.length!==1&&tk(``);var i,a=[],o=[];return H(e,function(e){e.prepareSource();var t=e.getSource(r||0);r!=null&&!t&&tk(``),a.push(t),o.push(e._getVersionSign())}),n?i=XO(n,a,{datasetIndex:t.componentIndex}):r!=null&&(i=[Zw(a[0])]),{sourceList:i,upstreamSignList:o}},e.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),t=0;t<e.length;t++){var n=e[t];if(n._isDirty()||this._upstreamSignList[t]!==n._getVersionSign())return!0}},e.prototype.getSource=function(e){e||=0;var t=this._sourceList[e];if(!t){var n=this._getUpstreamSourceManagers();return n[0]&&n[0].getSource(e)}return t},e.prototype.getSharedDataStore=function(e){var t=e.makeStoreSchema();return this._innerGetDataStore(t.dimensions,e.source,t.hash)},e.prototype._innerGetDataStore=function(e,t,n){var r=0,i=this._storeList,a=i[r];a||=i[r]={};var o=a[n];if(!o){var s=this._getUpstreamSourceManagers()[0];ek(this._sourceHost)&&s?o=s._innerGetDataStore(e,t,n):(o=new UT,o.initData(new uT(t,e.length),e)),a[n]=o}return o},e.prototype._getUpstreamSourceManagers=function(){var e=this._sourceHost;if(ek(e)){var t=Uw(e);return t?[t.getSourceManager()]:[]}else return U(Ww(e),function(e){return e.getSourceManager()})},e.prototype._getSourceMetaRawOption=function(){var e=this._sourceHost,t,n,r;if(ek(e))t=e.get(`seriesLayoutBy`,!0),n=e.get(`sourceHeader`,!0),r=e.get(`dimensions`,!0);else if(!this._getUpstreamSourceManagers().length){var i=e;t=i.get(`seriesLayoutBy`,!0),n=i.get(`sourceHeader`,!0),r=i.get(`dimensions`,!0)}return{seriesLayoutBy:t,sourceHeader:n,dimensions:r}},e}();function ek(e){return e.mainType===`series`}function tk(e){throw Error(e)}var Q={color:{},darkColor:{},size:{}},nk=Q.color={theme:[`#5070dd`,`#b6d634`,`#505372`,`#ff994d`,`#0ca8df`,`#ffd10a`,`#fb628b`,`#785db0`,`#3fbe95`],neutral00:`#fff`,neutral05:`#f4f7fd`,neutral10:`#e8ebf0`,neutral15:`#dbdee4`,neutral20:`#cfd2d7`,neutral25:`#c3c5cb`,neutral30:`#b7b9be`,neutral35:`#aaacb2`,neutral40:`#9ea0a5`,neutral45:`#929399`,neutral50:`#86878c`,neutral55:`#797b7f`,neutral60:`#6d6e73`,neutral65:`#616266`,neutral70:`#54555a`,neutral75:`#48494d`,neutral80:`#3c3c41`,neutral85:`#303034`,neutral90:`#232328`,neutral95:`#17171b`,neutral99:`#000`,accent05:`#eff1f9`,accent10:`#e0e4f2`,accent15:`#d0d6ec`,accent20:`#c0c9e6`,accent25:`#b1bbdf`,accent30:`#a1aed9`,accent35:`#91a0d3`,accent40:`#8292cc`,accent45:`#7285c6`,accent50:`#6578ba`,accent55:`#5c6da9`,accent60:`#536298`,accent65:`#4a5787`,accent70:`#404c76`,accent75:`#374165`,accent80:`#2e3654`,accent85:`#252b43`,accent90:`#1b2032`,accent95:`#121521`,transparent:`rgba(0,0,0,0)`,highlight:`rgba(255,231,130,0.8)`};for(var rk in V(nk,{primary:nk.neutral80,secondary:nk.neutral70,tertiary:nk.neutral60,quaternary:nk.neutral50,disabled:nk.neutral20,border:nk.neutral30,borderTint:nk.neutral20,borderShade:nk.neutral40,background:nk.neutral05,backgroundTint:`rgba(234,237,245,0.5)`,backgroundTransparent:`rgba(255,255,255,0)`,backgroundShade:nk.neutral10,shadow:`rgba(0,0,0,0.2)`,shadowTint:`rgba(129,130,136,0.2)`,axisLine:nk.neutral70,axisLineTint:nk.neutral40,axisTick:nk.neutral70,axisTickMinor:nk.neutral60,axisLabel:nk.neutral70,axisSplitLine:nk.neutral15,axisMinorSplitLine:nk.neutral05}),nk)if(nk.hasOwnProperty(rk)){var ik=nk[rk];rk===`theme`?Q.darkColor.theme=nk.theme.slice():rk===`highlight`?Q.darkColor.highlight=`rgba(255,231,130,0.4)`:rk.indexOf(`accent`)===0?Q.darkColor[rk]=Ch(ik,null,function(e){return e*.5},function(e){return Math.min(1,1.3-e)}):Q.darkColor[rk]=Ch(ik,null,function(e){return e*.9},function(e){return 1-e**1.5})}Q.size={xxs:2,xs:5,s:10,m:15,l:20,xl:30,xxl:40,xxxl:50};var ak=`line-height:1`;function ok(e){var t=e.lineHeight;return t==null?ak:`line-height:`+tD(t+``)+`px`}function sk(e,t){var 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:`+tD(r+``)+`px;color:`+tD(n)+`;font-weight:`+tD(i+``),valueStyle:`font-size:`+tD(o+``)+`px;color:`+tD(a)+`;font-weight:`+tD(s+``)}:{nameStyle:{fontSize:r,fill:n,fontWeight:i},valueStyle:{fontSize:o,fill:a,fontWeight:s}}}var ck=[0,10,20,30],lk=[``,`
|
|
264
|
-
`,`
|
|
265
|
-
|
|
266
|
-
`,`
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
`];function uk(e,t){return t.type=e,t}function dk(e){return e.type===`section`}function fk(e){return dk(e)?mk:hk}function pk(e){if(dk(e)){var t=0,n=e.blocks.length,r=n>1||n>0&&!e.noHeader;return H(e.blocks,function(e){var n=pk(e);n>=t&&(t=n+ +(r&&(!n||dk(e)&&!e.noHeader)))}),t}return 0}function mk(e,t,n,r){var i=t.noHeader,a=_k(pk(t)),o=[],s=t.blocks||[];Nd(!s||W(s)),s||=[];var c=e.orderMode;if(t.sortBlocks&&c){s=s.slice();var l={valueAsc:`asc`,valueDesc:`desc`};if(Gd(l,c)){var u=new jT(l[c],null);s.sort(function(e,t){return u.evaluate(e.sortParam,t.sortParam)})}else c===`seriesDesc`&&s.reverse()}H(s,function(n,i){var s=t.valueFormatter,c=fk(n)(s?V(V({},e),{valueFormatter:s}):e,n,i>0?a.html:0,r);c!=null&&o.push(c)});var d=e.renderMode===`richText`?o.join(a.richText):vk(r,o.join(``),i?n:a.html);if(i)return d;var f=aO(t.header,`ordinal`,e.useUTC),p=sk(r,e.renderMode).nameStyle,m=ok(r);return e.renderMode===`richText`?xk(e,f,p)+a.richText+d:vk(r,`<div style="`+p+`;`+m+`;">`+tD(f)+`</div>`+d,n)}function hk(e,t,n,r){var i=e.renderMode,a=t.noName,o=t.noValue,s=!t.markerType,c=t.name,l=e.useUTC,u=t.valueFormatter||e.valueFormatter||function(e){return e=W(e)?e:[e],U(e,function(e,t){return aO(e,W(p)?p[t]:p,l)})};if(!(a&&o)){var d=s?``:e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||Q.color.secondary,i),f=a?``:aO(c,`ordinal`,l),p=t.valueType,m=o?[]:u(t.value,t.rawDataIndex),h=!s||!a,g=!s&&a,_=sk(r,i),v=_.nameStyle,y=_.valueStyle;return i===`richText`?(s?``:d)+(a?``:xk(e,f,v))+(o?``:Sk(e,m,h,g,y)):vk(r,(s?``:d)+(a?``:yk(f,!s,v))+(o?``:bk(m,h,g,y)),n)}}function gk(e,t,n,r,i,a){if(e)return fk(e)({useUTC:i,renderMode:n,orderMode:r,markupStyleCreator:t,valueFormatter:e.valueFormatter},e,0,a)}function _k(e){return{html:ck[e],richText:lk[e]}}function vk(e,t,n){var r=`<div style="clear:both"></div>`,i=`margin: `+n+`px 0 0`,a=ok(e);return`<div style="`+i+`;`+a+`;">`+t+r+`</div>`}function yk(e,t,n){var r=t?`margin-left:2px`:``;return`<span style="`+n+`;`+r+`">`+tD(e)+`</span>`}function bk(e,t,n,r){var i=t?`float:right;margin-left:`+(n?`10px`:`20px`):``;return e=W(e)?e:[e],`<span style="`+i+`;`+r+`">`+U(e,function(e){return tD(e)}).join(` `)+`</span>`}function xk(e,t,n){return e.markupStyleCreator.wrapRichTextStyle(t,n)}function Sk(e,t,n,r,i){var a=[i],o=r?10:20;return n&&a.push({padding:[0,0,0,o],align:`right`}),e.markupStyleCreator.wrapRichTextStyle(W(t)?t.join(` `):t,a)}function Ck(e,t){var n=e.getData().getItemVisual(t,`style`)[e.visualDrawType];return fO(n)}function wk(e,t){return e.get(`padding`)??(t===`richText`?[8,10]:10)}var Tk=function(){function e(){this.richTextStyles={},this._nextStyleNameId=ay()}return e.prototype._generateStyleName=function(){return`__EC_aUTo_`+this._nextStyleNameId++},e.prototype.makeTooltipMarker=function(e,t,n){var r=n===`richText`?this._generateStyleName():null,i=lO({color:t,type:e,renderMode:n,markerId:r});return K(i)?i:(this.richTextStyles[r]=i.style,i.content)},e.prototype.wrapRichTextStyle=function(e,t){var n={};W(t)?H(t,function(e){return V(n,e)}):V(n,t);var r=this._generateStyleName();return this.richTextStyles[r]=n,`{`+r+`|`+e+`}`},e}();function Ek(e){var t=e.series,n=e.dataIndex,r=e.multipleSeries,i=t.getData(),a=i.mapDimensionsAll(`defaultedTooltip`),o=a.length,s=t.getRawValue(n),c=W(s),l=Ck(t,n),u,d,f,p;if(o>1||c&&!o){var m=Dk(s,t,n,a,l);u=m.inlineValues,d=m.inlineValueTypes,f=m.blocks,p=m.inlineValues[0]}else if(o){var h=i.getDimensionInfo(a[0]);p=u=ST(i,n,a[0]),d=h.type}else p=u=c?s[0]:s;var g=Ny(t),_=g&&t.name||``,v=i.getName(n),y=r?_:v;return uk(`section`,{header:_,noHeader:r||!g,sortParam:p,blocks:[uk(`nameValue`,{markerType:`item`,markerColor:l,name:y,noName:!Pd(y),value:u,valueType:d,rawDataIndex:i.getRawIndex(n)})].concat(f||[])})}function Dk(e,t,n,r,i){var a=t.getData(),o=pd(e,function(e,t,n){var r=a.getDimensionInfo(n);return e||=r&&r.tooltip!==!1&&r.displayName!=null},!1),s=[],c=[],l=[];r.length?H(r,function(e){u(ST(a,n,e),e)}):H(e,u);function u(e,t){var n=a.getDimensionInfo(t);!n||n.otherDims.tooltip===!1||(o?l.push(uk(`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 Ok=Ry();function kk(e,t){return e.getName(t)||e.getId(t)}var Ak=function(e){z(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}return t.prototype.init=function(e,t,n){this.seriesIndex=this.componentIndex,this.dataTask=zO({count:Nk,reset:Pk}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n),(Ok(this).sourceManager=new $O(this)).prepareSource();var r=this.getInitialData(e,n);Ik(r,this),this.dataTask.context.data=r,Ok(this).dataBeforeProcessed=r,jk(this),this._initSelectedMapFromData(r)},t.prototype.mergeDefaultAndTheme=function(e,t){var n=wO(this),r=n?EO(e):{},i=this.subType;kO.hasClass(i)&&(i+=`Series`),id(e,t.getTheme().get(this.subType)),id(e,this.getDefaultOption()),yy(e,`label`,[`show`]),this.fillDataTextStyle(e.data),n&&TO(e,r,n)},t.prototype.mergeOption=function(e,t){e=id(this.option,e,!0),this.fillDataTextStyle(e.data);var n=wO(this);n&&TO(this.option,e,n);var r=Ok(this).sourceManager;r.dirty(),r.prepareSource();var i=this.getInitialData(e,t);Ik(i,this),this.dataTask.dirty(),this.dataTask.context.data=i,Ok(this).dataBeforeProcessed=i,jk(this),this._initSelectedMapFromData(i)},t.prototype.fillDataTextStyle=function(e){if(e&&!Cd(e))for(var t=[`show`],n=0;n<e.length;n++)e[n]&&e[n].label&&yy(e[n],`label`,t)},t.prototype.getInitialData=function(e,t){},t.prototype.appendData=function(e){this.getRawData().appendData(e.data)},t.prototype.getData=function(e){var t=Rk(this);if(t){var n=t.context.data;return e==null||!n.getLinkedData?n:n.getLinkedData(e)}else return Ok(this).data},t.prototype.getAllData=function(){var e=this.getData();return e&&e.getLinkedDataAll?e.getLinkedDataAll():[{data:e}]},t.prototype.setData=function(e){var t=Rk(this);if(t){var n=t.context;n.outputData=e,t!==this.dataTask&&(n.data=e)}Ok(this).data=e},t.prototype.getEncode=function(){var e=this.get(`encode`,!0);if(e)return Y(e)},t.prototype.getSourceManager=function(){return Ok(this).sourceManager},t.prototype.getSource=function(){return this.getSourceManager().getSource()},t.prototype.getRawData=function(){return Ok(this).dataBeforeProcessed},t.prototype.getColorBy=function(){return this.get(`colorBy`)||`series`},t.prototype.isColorBySeries=function(){return this.getColorBy()===`series`},t.prototype.getBaseAxis=function(){var e=this.coordinateSystem;return e&&e.getBaseAxis&&e.getBaseAxis()},t.prototype.indicesOfNearest=function(e,t,n,r){var i=this.getData(),a=this.coordinateSystem,o=a&&a.getAxis(e);if(!a||!o)return[];var s=o.dataToCoord(n);r??=1/0;for(var c=[],l=1/0,u=-1,d=0,f=i.getDimensionIndex(t),p=i.getStore(),m=0,h=p.count();m<h;m++){var g=p.get(f,m),_=s-o.dataToCoord(g),v=Math.abs(_);v<=r&&((v<l||v===l&&_>=0&&u<0)&&(l=v,u=_,d=0),_===u&&(c[d++]=m))}return c.length=d,c},t.prototype.formatTooltip=function(e,t,n){return Ek({series:this,dataIndex:e,multipleSeries:t})},t.prototype.isAnimationEnabled=function(){var e=this.ecModel;if(X.node&&!(e&&e.ssr))return!1;var t=this.getShallow(`animation`);return t&&this.getData().count()>this.getShallow(`animationThreshold`)&&(t=!1),!!t},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(e,t,n){var r=this.ecModel,i=MO.prototype.getColorFromPalette.call(this,e,t,n);return i||=r.getColorFromPalette(e,t,n),i},t.prototype.coordDimToDataDim=function(e){return this.getRawData().mapDimensionsAll(e)},t.prototype.getProgressive=function(){return this.get(`progressive`)},t.prototype.getProgressiveThreshold=function(){return this.get(`progressiveThreshold`)},t.prototype.select=function(e,t){this._innerSelect(this.getData(t),e)},t.prototype.unselect=function(e,t){var n=this.option.selectedMap;if(n){var r=this.option.selectedMode,i=this.getData(t);if(r===`series`||n===`all`){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var a=0;a<e.length;a++){var o=e[a],s=kk(i,o);n[s]=!1,this._selectedDataIndicesMap[s]=-1}}},t.prototype.toggleSelect=function(e,t){for(var n=[],r=0;r<e.length;r++)n[0]=e[r],this.isSelected(e[r],t)?this.unselect(n,t):this.select(n,t)},t.prototype.getSelectedDataIndices=function(){if(this.option.selectedMap===`all`)return[].slice.call(this.getData().getIndices());for(var e=this._selectedDataIndicesMap,t=gd(e),n=[],r=0;r<t.length;r++){var i=e[t[r]];i>=0&&n.push(i)}return n},t.prototype.isSelected=function(e,t){var n=this.option.selectedMap;if(!n)return!1;var r=this.getData(t);return(n===`all`||n[kk(r,e)])&&!r.getItemModel(e).get([`select`,`disabled`])},t.prototype.isUniversalTransitionEnabled=function(){if(this.__universalTransitionEnabled)return!0;var e=this.option.universalTransition;return e?e===!0?!0:e&&e.enabled:!1},t.prototype._innerSelect=function(e,t){var n,r,i=this.option,a=i.selectedMode,o=t.length;if(!(!a||!o)){if(a===`series`)i.selectedMap=`all`;else if(a===`multiple`){q(i.selectedMap)||(i.selectedMap={});for(var s=i.selectedMap,c=0;c<o;c++){var l=t[c],u=kk(e,l);s[u]=!0,this._selectedDataIndicesMap[u]=e.getRawIndex(l)}}else if(a===`single`||a===!0){var d=t[o-1],u=kk(e,d);i.selectedMap=(n={},n[u]=!0,n),this._selectedDataIndicesMap=(r={},r[u]=e.getRawIndex(d),r)}}},t.prototype._initSelectedMapFromData=function(e){if(!this.option.selectedMap){var t=[];e.hasItemOption&&e.each(function(n){var r=e.getRawDataItem(n);r&&r.selected&&t.push(n)}),t.length>0&&this._innerSelect(e,t)}},t.registerClass=function(e){return kO.registerClass(e)},t.protoInitialize=function(){var e=t.prototype;e.type=`series.__base__`,e.seriesIndex=0,e.ignoreStyleOnData=!1,e.hasSymbolVisual=!1,e.defaultSymbol=`circle`,e.visualStyleAccessPath=`itemStyle`,e.visualDrawType=`fill`}(),t}(kO);dd(Ak,LO),dd(Ak,MO),of(Ak,kO);function jk(e){var t=e.name;Ny(e)||(e.name=Mk(e)||t)}function Mk(e){var t=e.getRawData(),n=t.mapDimensionsAll(`seriesName`),r=[];return H(n,function(e){var n=t.getDimensionInfo(e);n.displayName&&r.push(n.displayName)}),r.join(` `)}function Nk(e){return e.model.getRawData().count()}function Pk(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),Fk}function Fk(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function Ik(e,t){H(Hd(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(n){e.wrapMethod(n,yd(Lk,t))})}function Lk(e,t){var n=Rk(e);return n&&n.setOutputEnd((t||this).count()),t}function Rk(e){var t=(e.ecModel||{}).scheduler,n=t&&t.getPipeline(e.uid);if(n){var r=n.currentTask;if(r){var i=r.agentStubMap;i&&(r=i.get(e.uid))}return r}}var zk=R_.extend({type:`triangle`,shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var 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()}}),Bk={line:IS,rect:Q_,roundRect:Q_,square:Q_,circle:oS,diamond:R_.extend({type:`diamond`,shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var 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:R_.extend({type:`pin`,shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var 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:R_.extend({type:`arrow`,shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var 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:zk},Vk={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){var 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}},Hk={};H(Bk,function(e,t){Hk[t]=new e});var Uk=R_.extend({type:`symbol`,shape:{symbolType:``,x:0,y:0,width:0,height:0},calculateTextPosition:function(e,t,n){var r=Up(e,t,n),i=this.shape;return i&&i.symbolType===`pin`&&t.position===`inside`&&(r.y=n.y+n.height*.4),r},buildPath:function(e,t,n){var r=t.symbolType;if(r!==`none`){var i=Hk[r];i||=(r=`rect`,Hk[r]),Vk[r](t.x,t.y,t.width,t.height,i.shape),i.buildPath(e,i.shape,n)}}});function Wk(e,t){if(this.type!==`image`){var 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 Gk(e,t,n,r,i,a,o){var s=e.indexOf(`empty`)===0;s&&(e=e.substr(5,1).toLowerCase()+e.substr(6));var c=e.indexOf(`image://`)===0?wC(e.slice(8),new Z(t,n,r,i),o?`center`:`cover`):e.indexOf(`path://`)===0?CC(e.slice(7),{},new Z(t,n,r,i),o?`center`:`cover`):new Uk({shape:{symbolType:e,x:t,y:n,width:r,height:i}});return c.__isEmptyBrush=s,c.setColor=Wk,a&&c.setColor(a),c}function Kk(e){return W(e)||(e=[+e,+e]),[e[0]||0,e[1]||0]}function qk(e,t){if(e!=null)return W(e)||(e=[e,e]),[Mv(e[0],t[0])||0,Mv(J(e[1],e[0]),t[1])||0]}var Jk=function(e){z(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return t.prototype.getInitialData=function(e){return PE(null,this,{useEncodeDefaulter:!0})},t.prototype.getLegendIcon=function(e){var t=new iS,n=Gk(`line`,0,e.itemHeight/2,e.itemWidth,0,e.lineStyle.stroke,!1);t.add(n),n.setStyle(e.lineStyle);var r=this.getData().getVisual(`symbol`),i=this.getData().getVisual(`symbolRotate`),a=r===`none`?`circle`:r,o=e.itemHeight*.8,s=Gk(a,(e.itemWidth-o)/2,(e.itemHeight-o)/2,o,o,e.itemStyle.fill);return t.add(s),s.setStyle(e.itemStyle),s.rotation=(e.iconRotate===`inherit`?i:e.iconRotate||0)*Math.PI/180,s.setOrigin([e.itemWidth/2,e.itemHeight/2]),a.indexOf(`empty`)>-1&&(s.style.stroke=s.style.fill,s.style.fill=Q.color.neutral00,s.style.lineWidth=2),t},t.type=`series.line`,t.dependencies=[`grid`,`polar`],t.defaultOption={z:3,coordinateSystem:`cartesian2d`,legendHoverLink:!0,clip:!0,label:{position:`top`},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:`solid`},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:`emptyCircle`,symbolSize:6,symbolRotate:null,showSymbol:!0,showAllSymbol:`auto`,connectNulls:!1,sampling:`none`,animationEasing:`linear`,progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:`clone`},triggerLineEvent:!1,triggerEvent:!1},t}(Ak);function Yk(e,t){var n=e.mapDimensionsAll(`defaultedLabel`),r=n.length;if(r===1){var i=ST(e,t,n[0]);return i==null?null:i+``}else if(r){for(var a=[],o=0;o<n.length;o++)a.push(ST(e,t,n[o]));return a.join(` `)}}function Xk(e,t){var n=e.mapDimensionsAll(`defaultedLabel`);if(!W(t))return t+``;for(var r=[],i=0;i<n.length;i++){var a=e.getDimensionIndex(n[i]);a>=0&&r.push(t[a])}return r.join(` `)}var Zk=function(e){z(t,e);function t(t,n,r,i){var a=e.call(this)||this;return a.updateData(t,n,r,i),a}return t.prototype._createSymbol=function(e,t,n,r,i,a){this.removeAll();var o=Gk(e,-1,-1,2,2,null,a);o.attr({z2:J(i,100),culling:!0,scaleX:r[0]/2,scaleY:r[1]/2}),o.drift=Qk,this._symbolType=e,this.add(o)},t.prototype.stopSymbolAnimation=function(e){this.childAt(0).stopAnimation(null,e)},t.prototype.getSymbolType=function(){return this._symbolType},t.prototype.getSymbolPath=function(){return this.childAt(0)},t.prototype.highlight=function(){ax(this.childAt(0))},t.prototype.downplay=function(){ox(this.childAt(0))},t.prototype.setZ=function(e,t){var n=this.childAt(0);n.zlevel=e,n.z=t},t.prototype.setDraggable=function(e,t){var n=this.childAt(0);n.draggable=e,n.cursor=!t&&e?`move`:n.cursor},t.prototype.updateData=function(e,n,r,i){this.silent=!1;var a=e.getItemVisual(n,`symbol`)||`circle`,o=e.hostModel,s=t.getSymbolSize(e,n),c=t.getSymbolZ2(e,n),l=a!==this._symbolType,u=i&&i.disableAnimation;if(l){var d=e.getItemVisual(n,`symbolKeepAspect`);this._createSymbol(a,e,n,s,c,d)}else{var f=this.childAt(0);f.silent=!1;var p={scaleX:s[0]/2,scaleY:s[1]/2};u?f.attr(p):sC(f,p,o,n),pC(f)}if(this._updateCommon(e,n,s,r,i),l){var f=this.childAt(0);if(!u){var p={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:f.style.opacity}};f.scaleX=f.scaleY=0,f.style.opacity=0,cC(f,p,o,n)}}u&&this.childAt(0).stopAnimation(`leave`)},t.prototype._updateCommon=function(e,t,n,r,i){var a=this.childAt(0),o=e.hostModel,s,c,l,u,d,f,p,m,h;if(r&&(s=r.emphasisItemStyle,c=r.blurItemStyle,l=r.selectItemStyle,u=r.focus,d=r.blurScope,p=r.labelStatesModels,m=r.hoverScale,h=r.cursorStyle,f=r.emphasisDisabled),!r||e.hasItemOption){var g=r&&r.itemModel?r.itemModel:e.getItemModel(t),_=g.getModel(`emphasis`);s=_.getModel(`itemStyle`).getItemStyle(),l=g.getModel([`select`,`itemStyle`]).getItemStyle(),c=g.getModel([`blur`,`itemStyle`]).getItemStyle(),u=_.get(`focus`),d=_.get(`blurScope`),f=_.get(`disabled`),p=fw(g),m=_.getShallow(`scale`),h=g.getShallow(`cursor`)}var v=e.getItemVisual(t,`symbolRotate`);a.attr(`rotation`,(v||0)*Math.PI/180||0);var y=qk(e.getItemVisual(t,`symbolOffset`),n);y&&(a.x=y[0],a.y=y[1]),h&&a.attr(`cursor`,h);var b=e.getItemVisual(t,`style`),x=b.fill;if(a instanceof W_){var S=a.style;a.useStyle(V({image:S.image,x:S.x,y:S.y,width:S.width,height:S.height},b))}else a.__isEmptyBrush?a.useStyle(V({},b)):a.useStyle(b),a.style.decal=null,a.setColor(x,i&&i.symbolInnerColor),a.style.strokeNoScale=!0;var C=e.getItemVisual(t,`liftZ`),w=this._z2;C==null?w!=null&&(a.z2=w,this._z2=null):w??(this._z2=a.z2,a.z2+=C);var T=i&&i.useNameLabel;dw(a,p,{labelFetcher:o,labelDataIndex:t,defaultText:E,inheritColor:x,defaultOpacity:b.opacity});function E(t){return T?e.getName(t):Yk(e,t)}this._sizeX=n[0]/2,this._sizeY=n[1]/2;var D=a.ensureState(`emphasis`);D.style=s,a.ensureState(`select`).style=l,a.ensureState(`blur`).style=c;var O=m==null||m===!0?Math.max(1.1,3/this._sizeY):isFinite(m)&&m>0?+m:1;D.scaleX=this._sizeX*O,D.scaleY=this._sizeY*O,this.setSymbolScale(1),Tx(this,u,d,f)},t.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},t.prototype.fadeOut=function(e,t,n){var r=this.childAt(0),i=pb(this).dataIndex,a=n&&n.animation;if(this.silent=r.silent=!0,n&&n.fadeLabel){var o=r.getTextContent();o&&uC(o,{style:{opacity:0}},t,{dataIndex:i,removeOpt:a,cb:function(){r.removeTextContent()}})}else r.removeTextContent();uC(r,{style:{opacity:0},scaleX:0,scaleY:0},t,{dataIndex:i,cb:e,removeOpt:a})},t.getSymbolSize=function(e,t){return Kk(e.getItemVisual(t,`symbolSize`))},t.getSymbolZ2=function(e,t){return e.getItemVisual(t,`z2`)},t}(iS);function Qk(e,t){this.parent.drift(e,t)}function $k(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 eA(e){return e!=null&&!q(e)&&(e={isIgnore:e}),e||{}}function tA(e){var t=e.hostModel,n=t.getModel(`emphasis`);return{emphasisItemStyle:n.getModel(`itemStyle`).getItemStyle(),blurItemStyle:t.getModel([`blur`,`itemStyle`]).getItemStyle(),selectItemStyle:t.getModel([`select`,`itemStyle`]).getItemStyle(),focus:n.get(`focus`),blurScope:n.get(`blurScope`),emphasisDisabled:n.get(`disabled`),hoverScale:n.get(`scale`),labelStatesModels:fw(t),cursorStyle:t.get(`cursor`)}}function nA(e,t,n,r,i,a,o){var s=new e(t,n,r,i);return s.setPosition(a),t.setItemGraphicEl(n,s),o.add(s),s}var rA=function(){function e(e){this.group=new iS,this._SymbolCtor=e||Zk}return e.prototype.updateData=function(e,t){this._progressiveEls=null,t=eA(t);var n=this.group,r=e.hostModel,i=this._data,a=this._SymbolCtor,o=t.disableAnimation,s=this._seriesScope=tA(e),c={disableAnimation:o},l=t.getSymbolPoint||function(t){return e.getItemLayout(t)};i||n.removeAll(),e.diff(i).add(function(r){var i=l(r);$k(e,i,r,t)&&nA(a,e,r,s,c,i,n)}).update(function(u,d){var f=i.getItemGraphicEl(d),p=l(u);if(!$k(e,p,u,t)){n.remove(f);return}var m=e.getItemVisual(u,`symbol`)||`circle`,h=f&&f.getSymbolType&&f.getSymbolType();if(!f||h&&h!==m)n.remove(f),f=new a(e,u,s,c),f.setPosition(p);else{f.updateData(e,u,s,c);var g={x:p[0],y:p[1]};o?f.attr(g):sC(f,g,r)}n.add(f),e.setItemGraphicEl(u,f)}).remove(function(e){var t=i.getItemGraphicEl(e);t&&t.fadeOut(function(){n.remove(t)},r)}).execute(),this._getSymbolPoint=l,this._data=e},e.prototype.updateLayout=function(e){var t=this._data;if(t)for(var n=this,r=t.getStore(),i=0,a=r.count();i<a;i++){var o=t.getItemGraphicEl(i),s=n._getSymbolPoint(i);$k(t,s,i,e)?(o||=nA(n._SymbolCtor,t,i,n._seriesScope,{disableAnimation:!0},s,n.group),o.stopAnimation(),o.setPosition(s),o.markRedraw()):o&&(n.group.remove(o),t.setItemGraphicEl(i,null))}},e.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=tA(e),this._data=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(e,t,n,r){this._progressiveEls=[],r=eA(r);function i(e){e.isGroup||(e.incremental=n,e.ensureState(`emphasis`).hoverLayer=2)}for(var a=e.start;a<e.end;a++){var o=t.getItemLayout(a);if($k(t,o,a,r)){var s=new this._SymbolCtor(t,a,this._seriesScope);s.traverse(i),s.setPosition(o),this.group.add(s),t.setItemGraphicEl(a,s),this._progressiveEls.push(s)}}},e.prototype.eachRendered=function(e){YC(this._progressiveEls||this.group,e)},e.prototype.remove=function(e){var t=this.group,n=this._data;n&&e?n.eachItemGraphicEl(function(e){e.fadeOut(function(){t.remove(e)},n.hostModel)}):t.removeAll()},e}();function iA(e,t,n){var r=e.getBaseAxis(),i=e.getOtherAxis(r),a=aA(i,n),o=r.dim,s=i.dim,c=t.mapDimension(s),l=t.mapDimension(o),u=+(s===`x`||s===`radius`),d=U(e.dimensions,function(e){return t.mapDimension(e)}),f=!1,p=t.getCalculationInfo(`stackResultDimension`);return AE(t,d[0])&&(f=!0,d[0]=p),AE(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 aA(e,t){var n=0,r=e.scale.getExtent();return t===`start`?n=r[0]:t===`end`?n=r[1]:xd(t)&&!isNaN(t)?n=t:r[0]>0?n=r[0]:r[1]<0&&(n=r[1]),n}function oA(e,t,n,r){var i=NaN;e.stacked&&(i=n.get(n.getCalculationInfo(`stackedOverDimension`),r)),isNaN(i)&&(i=e.valueStart);var a=e.baseDataOffset,o=[];return o[a]=n.get(e.baseDim,r),o[1-a]=i,t.dataToPoint(o)}function sA(e,t){return!isFinite(e)||!isFinite(t)}var cA=typeof Float32Array<`u`?Float32Array:void 0,lA=typeof Float64Array<`u`?Float64Array:void 0;function uA(e){return dA({ctor:cA},e).arr}function dA(e,t){var n=e.arr,r=e.ctor;if(t>qv&&(t=qv),!n||e.typed&&n.length<t){var i=void 0;if(r)try{i=new r(t),e.typed=!0,n&&i.set(n)}catch{}if(!i&&(i=[],e.typed=!1,n))for(var a=0,o=n.length;a<o;a++)i[a]=n[a];e.arr=i}return e}function fA(e,t){var n=[];return t.diff(e).add(function(e){n.push({cmd:`+`,idx:e})}).update(function(e,t){n.push({cmd:`=`,idx:t,idx1:e})}).remove(function(e){n.push({cmd:`-`,idx:e})}).execute(),n}function pA(e,t,n,r,i,a,o,s){for(var c=fA(e,t),l=[],u=[],d=[],f=[],p=[],m=[],h=[],g=iA(i,t,o),_=e.getLayout(`points`)||[],v=t.getLayout(`points`)||[],y=0;y<c.length;y++){var b=c[y],x=!0,S=void 0,C=void 0;switch(b.cmd){case`=`:S=b.idx*2,C=b.idx1*2;var w=_[S],T=_[S+1],E=v[C],D=v[C+1];(isNaN(w)||isNaN(T))&&(w=E,T=D),l.push(w,T),u.push(E,D),d.push(n[S],n[S+1]),f.push(r[C],r[C+1]),h.push(t.getRawIndex(b.idx1));break;case`+`:var O=b.idx,k=g.dataDimsForPoint,A=i.dataToPoint([t.get(k[0],O),t.get(k[1],O)]);C=O*2,l.push(A[0],A[1]),u.push(v[C],v[C+1]);var j=oA(g,i,t,O);d.push(j[0],j[1]),f.push(r[C],r[C+1]),h.push(t.getRawIndex(O));break;case`-`:x=!1}x&&(p.push(b),m.push(m.length))}m.sort(function(e,t){return h[e]-h[t]});for(var M=l.length,N=uA(M),P=uA(M),ee=uA(M),te=uA(M),ne=[],y=0;y<m.length;y++){var re=m[y],ie=y*2,ae=re*2;N[ie]=l[ae],N[ie+1]=l[ae+1],P[ie]=u[ae],P[ie+1]=u[ae+1],ee[ie]=d[ae],ee[ie+1]=d[ae+1],te[ie]=f[ae],te[ie+1]=f[ae+1],ne[y]=p[re]}return{current:N,next:P,stackedOnCurrent:ee,stackedOnNext:te,status:ne}}var mA=Math.min,hA=Math.max;function gA(e,t,n,r,i,a,o,s,c){for(var l,u,d,f,p,m,h=n,g=0;g<r;g++){var _=t[h*2],v=t[h*2+1];if(h>=i||h<0)break;if(sA(_,v)){if(c){h+=a;continue}break}if(h===n)e[a>0?`moveTo`:`lineTo`](_,v),d=_,f=v;else{var y=_-l,b=v-u;if(y*y+b*b<.5){h+=a;continue}if(o>0){for(var x=h+a,S=t[x*2],C=t[x*2+1];S===_&&C===v&&g<r;)g++,x+=a,h+=a,S=t[x*2],C=t[x*2+1],_=t[h*2],v=t[h*2+1],y=_-l,b=v-u;var w=g+1;if(c)for(;sA(S,C)&&w<r;)w++,x+=a,S=t[x*2],C=t[x*2+1];var T=.5,E=0,D=0,O=void 0,k=void 0;if(w>=r||sA(S,C))p=_,m=v;else{E=S-l,D=C-u;var A=_-l,j=S-_,M=v-u,N=C-v,P=void 0,ee=void 0;if(s===`x`){P=Math.abs(A),ee=Math.abs(j);var te=E>0?1:-1;p=_-te*P*o,m=v,O=_+te*ee*o,k=v}else if(s===`y`){P=Math.abs(M),ee=Math.abs(N);var ne=D>0?1:-1;p=_,m=v-ne*P*o,O=_,k=v+ne*ee*o}else P=Math.sqrt(A*A+M*M),ee=Math.sqrt(j*j+N*N),T=ee/(ee+P),p=_-E*o*(1-T),m=v-D*o*(1-T),O=_+E*o*T,k=v+D*o*T,O=mA(O,hA(S,_)),k=mA(k,hA(C,v)),O=hA(O,mA(S,_)),k=hA(k,mA(C,v)),E=O-_,D=k-v,p=_-E*P/ee,m=v-D*P/ee,p=mA(p,hA(l,_)),m=mA(m,hA(u,v)),p=hA(p,mA(l,_)),m=hA(m,mA(u,v)),E=_-p,D=v-m,O=_+E*ee/P,k=v+D*ee/P}e.bezierCurveTo(d,f,p,m,_,v),d=O,f=k}else e.lineTo(_,v)}l=_,u=v,h+=a}return g}var _A=function(){function e(){this.smooth=0,this.smoothConstraint=!0}return e}(),vA=function(e){z(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`ec-polyline`,n}return t.prototype.getDefaultStyle=function(){return{stroke:Q.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new _A},t.prototype.buildPath=function(e,t){var n=t.points,r=0,i=n.length/2;if(t.connectNulls){for(;i>0&&sA(n[i*2-2],n[i*2-1]);i--);for(;r<i&&sA(n[r*2],n[r*2+1]);r++);}for(;r<i;)r+=gA(e,n,r,i,i,1,t.smooth,t.smoothMonotone,t.connectNulls)+1},t.prototype.getPointOn=function(e,t){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var n=this.path.data,r=p_.CMD,i,a,o=t===`x`,s=[],c=0;c<n.length;){var l=n[c++],u=void 0,d=void 0,f=void 0,p=void 0,m=void 0,h=void 0,g=void 0;switch(l){case r.M:i=n[c++],a=n[c++];break;case r.L:if(u=n[c++],d=n[c++],g=o?(e-i)/(u-i):(e-a)/(d-a),g<=1&&g>=0){var _=o?(d-a)*g+a:(u-i)*g+i;return o?[e,_]:[_,e]}i=u,a=d;break;case r.C:u=n[c++],d=n[c++],f=n[c++],p=n[c++],m=n[c++],h=n[c++];var v=o?zm(i,u,f,m,e,s):zm(a,d,p,h,e,s);if(v>0)for(var y=0;y<v;y++){var b=s[y];if(b<=1&&b>=0){var _=o?Lm(a,d,p,h,b):Lm(i,u,f,m,b);return o?[e,_]:[_,e]}}i=m,a=h;break}}},t}(R_),yA=function(e){z(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(_A),bA=function(e){z(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`ec-polygon`,n}return t.prototype.getDefaultShape=function(){return new yA},t.prototype.buildPath=function(e,t){var n=t.points,r=t.stackedOnPoints,i=0,a=n.length/2,o=t.smoothMonotone;if(t.connectNulls){for(;a>0&&sA(n[a*2-2],n[a*2-1]);a--);for(;i<a&&sA(n[i*2],n[i*2+1]);i++);}for(;i<a;){var s=gA(e,n,i,a,a,1,t.smooth,o,t.connectNulls);gA(e,r,i+s-1,s,a,-1,t.stackedOnSmooth,o,t.connectNulls),i+=s+1,e.closePath()}},t}(R_);function xA(){var e=Ry();return function(t){var n=e(t),r=t.pipelineContext,i=!!n.large,a=!!n.progressiveRender,o=n.large=!!(r&&r.large),s=n.progressiveRender=!!(r&&r.progressiveRender);return(i!==o||a!==s)&&`reset`}}var SA=Ry(),CA=xA(),wA=function(){function e(){this.group=new iS,this.uid=RE(`viewChart`),this.renderTask=zO({plan:DA,reset:OA}),this.renderTask.context={view:this}}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,n,r){},e.prototype.highlight=function(e,t,n,r){var i=e.getData(r&&r.dataType);i&&EA(i,r,`emphasis`)},e.prototype.downplay=function(e,t,n,r){var i=e.getData(r&&r.dataType);i&&EA(i,r,`normal`)},e.prototype.remove=function(e,t){this.group.removeAll()},e.prototype.dispose=function(e,t){},e.prototype.updateView=function(e,t,n,r){this.render(e,t,n,r)},e.prototype.updateVisual=function(e,t,n,r){this.render(e,t,n,r)},e.prototype.eachRendered=function(e){YC(this.group,e)},e.markUpdateMethod=function(e,t){SA(e).updateMethod=t},e.protoInitialize=function(){var t=e.prototype;t.type=`chart`}(),e}();function TA(e,t,n){e&&jx(e)&&(t===`emphasis`?ax:ox)(e,n)}function EA(e,t,n){var r=Ly(e,t),i=t&&t.highlightKey!=null?Mx(t.highlightKey):null;r==null?e.eachItemGraphicEl(function(e){TA(e,n,i)}):H(vy(r),function(t){TA(e.getItemGraphicEl(t),n,i)})}rf(wA,[`dispose`]),df(wA);function DA(e){return CA(e.model)}function OA(e){var t=e.model,n=e.ecModel,r=e.api,i=e.payload,a=t.pipelineContext.progressiveRender,o=e.view,s=i&&SA(i).updateMethod,c=a?`incrementalPrepareRender`:s&&o[s]?s:`render`;return c!==`render`&&o[c](t,n,r,i),kA[c]}var kA={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)}}};function AA(e,t,n,r,i){var 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++);var d=new Q_({shape:{x:o,y:s,width:c,height:l}});if(t){var f=e.getBaseAxis(),p=f.isHorizontal(),m=f.inverse;p?(m&&(d.shape.x+=c),d.shape.width=0):(m||(d.shape.y+=l),d.shape.height=0);var h=G(i)?function(e){i(e,d)}:null;cC(d,{shape:{width:c,height:l,x:o,y:s}},n,null,r,h)}return d}function jA(e,t,n){var r=e.getArea(),i=Lv(r.r0,1),a=Lv(r.r,1),o=new TS({shape:{cx:Lv(e.cx,1),cy:Lv(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,cC(o,{shape:{endAngle:r.endAngle,r:a}},n)),o}function MA(e,t,n,r,i){return e?e.type===`polar`?jA(e,t,n):e.type===`cartesian2d`?AA(e,t,n,r,i):null:null}function NA(e,t){return e.type===t}var PA=function(){function e(){}return e.prototype.isBlank=function(){return this._isBlank},e.prototype.setBlank=function(e){this._isBlank=e},e}();df(PA);var FA=0,IA=function(){function e(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++FA,this._onCollect=e.onCollect}return e.createByAxisModel=function(t){var n=t.option,r=n.data,i=r&&U(r,LA);return new e({categories:i,needCollect:!i,deduplication:n.dedplication!==!1})},e.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},e.prototype.parseAndCollect=function(e){var t,n=this._needCollect;if(!K(e)&&!n)return e;if(n&&!this._deduplication)return t=this.categories.length,this.categories[t]=e,this._onCollect&&this._onCollect(e,t),t;var r=this._getOrCreateMap();return t=r.get(e),t??(n?(t=this.categories.length,this.categories[t]=e,r.set(e,t),this._onCollect&&this._onCollect(e,t)):t=NaN),t},e.prototype._getOrCreateMap=function(){return this._map||=Y(this.categories)},e}();function LA(e){return q(e)&&e.value!=null?e.value:e+``}var RA=gd({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 zA(e,t,n){var r;e||={};var i=hD();if(i){var a=i.createBreakScaleMapper(t,n);a.hasBreaks()&&(H(RA,function(t){a[t]&&(e[t]=vd(a[t],a))}),r=a)}return r??KA(e,n),{brk:r,mapper:e}}function BA(e,t){H(RA,function(n){e[n]=t[n]})}function VA(e,t){e.freeze=Kd}function HA(e){return e.getExtentUnsafe(0,2)}function UA(e,t){return e.getExtentUnsafe(1,t)||e.getExtentUnsafe(0,t)}function WA(e){var t=UA(e,3);return t[1]-t[0]}function GA(e){var t=e.getExtentUnsafe(0,3);return t[1]-t[0]}function KA(e,t){var n=e||{},r=[];return n._extents=r,r[0]=t?t.slice():Yy(),V(n,qA),n}var qA={needTransform:function(){return!1},normalize:function(e){var t=this._extents[1]||this._extents[0];return t[1]===t[0]?.5:(e-t[0])/(t[1]-t[0])},scale:function(e){var t=this._extents[1]||this._extents[0];return e*(t[1]-t[0])+t[0]},transformIn:function(e){return e},transformOut:function(e){return e},contain:function(e){var t=UA(this,null);return e>=t[0]&&e<=t[1]},getExtent:function(){return this._extents[0].slice()},getExtentUnsafe:function(e){return this._extents[e]},setExtent:function(e,t){JA(this._extents,0,e,t)},setExtent2:function(e,t,n){var r=this._extents;r[e]||(r[e]=r[0].slice()),JA(r,e,t,n)},freeze:function(){}};function JA(e,t,n,r){tb(n,r)&&(e[t][0]=n,e[t][1]=r)}function YA(e){return XA(e)||QA(e)}function XA(e){return e.type===`interval`}function ZA(e){return e.type===`time`}function QA(e){return e.type===`log`}function $A(e){return e.type===`ordinal`}function ej(e){var t=$v(e),n=Ev(10,t),r=Cv(e/n);return r?r===2?r=3:r===3?r=5:r*=2:r=1,Lv(r*n,-t)}function tj(e){return Bv(e)+2}function nj(e,t){return Dv(e)/Dv(t)}function rj(e,t,n){var r=n&&n.lookup;if(r){for(var i=0;i<r.from.length;i++)if(e===r.from[i])return r.to[i]}return Ev(t,e)}function ij(e,t,n){var r=e.slice();if(r[0]===r[1]){var i=n&&n.ctnShp;if(r[0]!==0){var a=Sv(r[0]);t[1]||(r[1]+=a/2),r[0]-=a/2}else i&&(r[0]=-1),r[1]=1}return(!eb(r[0])||!eb(r[1]))&&(r[0]=0,r[1]=1),r[1]<r[0]&&r.reverse(),r}function aj(e,t){return[e[0]!==t[0],e[1]!==t[1]]}function oj(e,t){return e||=t,Cv(xv(e,1))}function sj(e,t,n){var r=HA(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);for(var s=i;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 cj=function(e){z(t,e);function t(n){var r=e.call(this)||this;r.type=`ordinal`,r.parse=t.parse,BA(r,t.decoratedMethods);var i=n.ordinalMeta;i||=new IA({}),W(i)&&(i=new IA({categories:U(i,function(e){return q(e)?e.value:e})})),r._ordinalMeta=i;var a=zA(null,null,n.extent||[0,i.categories.length-1]);return r._mapper=a.mapper,VA(r,a.mapper),r}return t.parse=function(e){return e==null?e=NaN:K(e)?(e=this._ordinalMeta.getOrdinal(e),e??=NaN):e=Cv(e),e},t.prototype.getTicks=function(){var e=[];return sj(this,0,function(t){e.push(t)}),e},t.prototype.getMinorTicks=function(e){},t.prototype.setSortInfo=function(e){if(e==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var t=e.ordinalNumbers,n=this._ordinalNumbersByTick=[],r=this._ticksByOrdinalNumber=[],i=0,a=this._ordinalMeta.categories.length,o=bv(a,t.length);i<o;++i){var s=n[i]=t[i];r[s]=i}for(var c=0;i<a;++i){for(;r[c]!=null;)c++;n[i]=c,r[c]=i}},t.prototype._getTickNumber=function(e){var t=this._ticksByOrdinalNumber;return t&&e>=0&&e<t.length?t[e]:e},t.prototype.getRawOrdinalNumber=function(e){var t=this._ordinalNumbersByTick;return t&&e>=0&&e<t.length?t[e]:e},t.prototype.getLabel=function(e){if(!this.isBlank()){var t=this.getRawOrdinalNumber(e.value),n=this._ordinalMeta.categories[t];return n==null?``:n+``}},t.prototype.count=function(){var e=HA(this._mapper);return e[1]-e[0]+1},t.prototype.getOrdinalMeta=function(){return this._ordinalMeta},t.type=`ordinal`,t.decoratedMethods={needTransform:function(){return this._mapper.needTransform()},contain:function(e){return this._mapper.contain(this._getTickNumber(e))&&e>=0&&e<this._ordinalMeta.categories.length},normalize:function(e){return this._mapper.normalize(this._getTickNumber(e))},scale:function(e){return this.getRawOrdinalNumber(Cv(this._mapper.scale(e)))},transformIn:function(e,t){return this._mapper.transformIn(this._getTickNumber(e),t)},transformOut:function(e,t){return this.getRawOrdinalNumber(this._mapper.transformOut(e,t))},getExtent:function(){return this._mapper.getExtent()},getExtentUnsafe:function(e,t){return this._mapper.getExtentUnsafe(e,t)},setExtent:function(e,t){return this._mapper.setExtent(e,t)},setExtent2:function(e,t,n){return this._mapper.setExtent2(e,t,n)}},t}(PA);PA.registerClass(cj);function lj(e,t,n,r){for(var i=e.getTicks({expandToNicedExtent:!0}),a=[],o=e.getExtent(),s=1;s<i.length;s++){var c=i[s],l=i[s-1];if(!(l.break||c.break)){for(var u=0,d=[],f=(c.value-l.value)/t,p=tj(f);u<t-1;){var m=Lv(l.value+(u+1)*f,p);m>o[0]&&m<o[1]&&d.push(m),u++}var h=hD();h&&h.pruneTicksByBreak(`auto`,d,n,function(e){return e},r,o),a.push(d)}}return a}var uj=function(e){z(t,e);function t(n){var r=e.call(this)||this;return r.type=`interval`,r.parse=t.parse,n||={},r.brk=zA(r,gD(r,n),null).brk,r._cfg={interval:0,intervalPrecision:2,intervalCount:void 0,niceExtent:void 0},r}return t.parse=function(e){return e==null||e===``?NaN:Number(e)},t.prototype.getConfig=function(){return B(this._cfg)},t.prototype.setConfig=function(e){var t=HA(this);this._cfg=e=B(e),e.niceExtent??=t.slice(),e.intervalPrecision??=tj(e.interval)},t.prototype.getTicks=function(e){e||={};var t=this._cfg,n=t.interval,r=HA(this),i=t.niceExtent,a=t.intervalPrecision,o=hD(),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;var u=3e3;r[0]<i[0]&&l.push({value:e.expandToNicedExtent?Lv(i[0]-n,a):r[0]});for(var d=function(e,t){return Cv((t-e)/n)},f=t.intervalCount,p=i[0],m=0;;m++){if(f==null){if(p>i[1]||!isFinite(p)||!isFinite(i[1]))break}else{if(m>f)break;p=bv(p,i[1]),m===f&&(p=i[1])}if(l.push({value:p}),p=Lv(p+n,a),s){var h=s.calcNiceTickMultiple(p,d);h>=0&&(p=Lv(p+h*n,a))}if(l.length>0&&p===l[l.length-1].value)break;if(l.length>u)return[]}var g=l.length?l[l.length-1].value:i[1];return r[1]>g&&l.push({value:e.expandToNicedExtent?Lv(g+n,a):r[1]}),c&&o.pruneTicksByBreak(e.pruneByBreak,l,s.breaks,function(e){return e.value},t.interval,r),c&&e.breakTicks!==`none`&&o.addBreaksToTicks(l,s.breaks,r),l},t.prototype.getMinorTicks=function(e){return lj(this,e,_D(this),this._cfg.interval)},t.prototype.getLabel=function(e,t){if(e==null)return``;var n=t&&t.precision;return n==null?n=Bv(e.value)||0:n===`auto`&&(n=this._cfg.intervalPrecision),nO(Lv(e.value,n,!0))},t.type=`interval`,t}(PA);PA.registerClass(uj);var dj=function(e,t,n,r){for(;n<r;){var i=n+r>>>1;e[i][1]<t?n=i+1:r=i}return n},fj=function(e){z(t,e);function t(n){var r=e.call(this)||this;return r.type=`time`,r.parse=t.parse,r._locale=n.locale,r._useUTC=n.useUTC,r._interval=0,r.brk=zA(r,gD(r,n),null).brk,r}return t.prototype.getLabel=function(e){return LD(e.value,OD[ID(PD(this._minLevelUnit))]||OD.second,this._useUTC,this._locale)},t.prototype.getFormattedLabel=function(e,t,n){return RD(e,t,n,this._locale,this._useUTC)},t.prototype.getTicks=function(e){e||={};var t=this._interval,n=HA(this),r=hD(),i=this.brk,a=r&&i,o=[];if(!t)return o;var s=this._useUTC;if(a&&e.breakTicks===`only_break`)return hD().addBreaksToTicks(o,i.breaks,n),o;o=Sj(this._minLevelUnit,this._approxInterval,s,n,GA(this),i);var c=kD.length-1,l=0;return H(o,function(e){e.time&&(c=Math.min(c,ld(kD,e.time.upperTimeUnit)),l=Math.max(l,e.time.level))}),a&&hD().pruneTicksByBreak(e.pruneByBreak,o,i.breaks,function(e){return e.value},this._approxInterval,n),a&&e.breakTicks!==`none`&&hD().addBreaksToTicks(o,i.breaks,n,function(e){for(var t=Math.max(ld(kD,zD(e.vmin,s)),ld(kD,zD(e.vmax,s))),n=0,r=0;r<kD.length;r++)if(!mj(kD[r],e.vmin,e.vmax,s)){n=r;break}var i=Math.min(n,c);return{level:l,lowerTimeUnit:kD[Math.max(i,t)],upperTimeUnit:kD[i]}}),o},t.prototype.getMinorTicks=function(e){return lj(this,e,_D(this),this._interval)},t.prototype.setTimeInterval=function(e){this._interval=e.interval,this._approxInterval=e.approxInterval,this._minLevelUnit=e.minLevelUnit},t.parse=function(e){return xd(e)?Math.round(e):+Zv(e)},t.type=`time`,t}(PA),pj=[[`second`,yD],[`minute`,bD],[`hour`,xD],[`quarter-day`,xD*6],[`half-day`,xD*12],[`day`,SD*1.2],[`half-week`,SD*3.5],[`week`,SD*7],[`month`,SD*31],[`quarter`,SD*95],[`half-year`,CD/2],[`year`,CD]];function mj(e,t,n,r){return BD(new Date(t),e,r).getTime()===BD(new Date(n),e,r).getTime()}function hj(e,t){return e/=SD,e>16?16:e>7.5?7:e>3.5?4:e>1.5?2:1}function gj(e){var t=30*SD;return e/=t,e>6?6:e>3?3:e>2?2:1}function _j(e){return e/=xD,e>12?12:e>6?6:e>3.5?4:e>2?2:1}function vj(e,t){return e/=t?bD:yD,e>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}function yj(e){return xv(ey(e,!0),1)}function bj(e,t,n){var r=Math.max(0,ld(kD,t)-1);return BD(new Date(e),kD[r],n).getTime()}function xj(e,t){var n=new Date(0);n[e](1);var r=n.getTime();n[e](1+t);var i=n.getTime()-r;return function(e,t){return Math.max(0,Math.round((t-e)/i))}}function Sj(e,t,n,r,i,a){var o=3e3,s=AD,c=0;function l(e,t,n,i,s,l,u){for(var d=xj(s,e),f=t,p=new Date(f);f<n&&f<=r[1]&&(u.push({value:f}),!(c++>o));)if(p[s](p[i]()+e),f=p.getTime(),a){var m=a.calcNiceTickMultiple(f,d);m>0&&(p[s](p[i]()+m*e),f=p.getTime())}u.push({value:f,notAdd:f>r[1]})}function u(e,i,a){var o=[],s=!i.length;if(!mj(PD(e),r[0],r[1],n)){s&&(i=[{value:bj(r[0],e,n)},{value:r[1]}]);for(var c=0;c<i.length-1;c++){var u=i[c].value,d=i[c+1].value;if(u!==d){var f=void 0,p=void 0,m=void 0,h=!1;switch(e){case`year`:f=Math.max(1,Math.round(t/SD/365)),p=VD(n),m=JD(n);break;case`half-year`:case`quarter`:case`month`:f=gj(t),p=HD(n),m=YD(n);break;case`week`:case`half-week`:case`day`:f=hj(t,31),p=UD(n),m=XD(n),h=!0;break;case`half-day`:case`quarter-day`:case`hour`:f=_j(t),p=WD(n),m=ZD(n);break;case`minute`:f=vj(t,!0),p=GD(n),m=QD(n);break;case`second`:f=vj(t,!1),p=KD(n),m=$D(n);break;case`millisecond`:f=yj(t),p=qD(n),m=eO(n);break}d>=r[0]&&u<=r[1]&&l(f,u,d,p,m,h,o),e===`year`&&a.length>1&&c===0&&a.unshift({value:a[0].value-f})}}for(var c=0;c<o.length;c++)a.push(o[c])}}for(var d=[],f=[],p=0,m=0,h=0;h<s.length;++h){var g=PD(s[h]);if(FD(s[h])&&(u(s[h],d[d.length-1]||[],f),g!==(s[h+1]?PD(s[h+1]):null))){if(f.length){m=p,f.sort(function(e,t){return e.value-t.value});for(var _=[],v=0;v<f.length;++v){var y=f[v].value;(v===0||f[v-1].value!==y)&&(_.push(f[v]),y>=r[0]&&y<=r[1]&&p++)}var b=i/t;if(p>b*1.5&&m>b/1.5||(d.push(_),p>b||e===s[h]))break}f=[]}}for(var x=md(U(d,function(e){return md(e,function(e){return e.value>=r[0]&&e.value<=r[1]&&!e.notAdd})}),function(e){return e.length>0}),S=x.length-1,C=[],h=0;h<x.length;++h)for(var w=x[h],T=0;T<w.length;++T){var E=zD(w[T].value,n);C.push({value:w[T].value,time:{level:S-h,upperTimeUnit:E,lowerTimeUnit:E}})}ob(C,sb,null),C.sort(function(e,t){return e.value-t.value});var D=C[0],O=C[C.length-1],k=zD(r[0],n),A=zD(r[1],n);return(!D||D.value>r[0])&&C.unshift({value:r[0],time:{level:0,upperTimeUnit:k,lowerTimeUnit:k},notNice:!0}),(!O||O.value<r[1])&&C.push({value:r[1],time:{level:0,upperTimeUnit:A,lowerTimeUnit:A},notNice:!0}),C}var Cj=function(e,t){var n=e.getExtent();if(n[0]===n[1]&&(n[0]-=SD,n[1]+=SD),n[1]===-1/0&&n[0]===1/0){var r=new Date;n[1]=+new Date(r.getFullYear(),r.getMonth(),r.getDate()),n[0]=n[1]-SD}e.setExtent(n[0],n[1]);var i=oj(t.splitNumber,10),a=GA(e)/i,o=t.minInterval,s=t.maxInterval;o!=null&&a<o&&(a=o),s!=null&&a>s&&(a=s);var c=pj.length,l=Math.min(dj(pj,a,0,c),c-1),u=pj[l][1],d=pj[Math.max(l-1,0)][0];e.setTimeInterval({approxInterval:a,interval:u,minLevelUnit:d})};PA.registerClass(fj);var wj=0,Tj=1,Ej=2,Dj=function(e){z(t,e);function t(n){var r=e.call(this)||this;r.type=`log`,r.parse=uj.parse,r.base=n.logBase||10;var i=[],a=[],o=r._lookup={from:i,to:a};i[wj]=i[Tj]=a[wj]=a[Tj]=NaN,BA(r,t.mapperMethods);var s=hD(),c=n.breakOption,l={lookup:o};return s&&s.parseAxisBreakOptionInwardTransform(c,r,{noNegative:!0},Ej,l),r.powStub=new uj({breakParsed:l.original}),r.intervalStub=new uj({breakParsed:l.transformed}),VA(r,r.intervalStub),r}return t.prototype.getTicks=function(e){var t=this.base,n=this.powStub,r=hD(),i=this.intervalStub,a={lookup:{from:i.getExtent(),to:n.getExtent()}};return U(i.getTicks(e||{}),function(e){var i=e.value,o=rj(i,t,a),s;if(r){var c=r.getTicksBreakOutwardTransform(this,e,_D(n),this._lookup);c&&(s=c.vBreak,o=c.tickVal)}return{value:o,break:s}},this)},t.prototype.getMinorTicks=function(e){return lj(this,e,_D(this.powStub),this.intervalStub.getConfig().interval)},t.prototype.getLabel=function(e,t){return this.intervalStub.getLabel(e,t)},t.type=`log`,t.mapperMethods={needTransform:function(){return!0},normalize:function(e){return this.intervalStub.normalize(nj(e,this.base))},scale:function(e){return rj(this.intervalStub.scale(e),this.base,null)},transformIn:function(e,t){return e=nj(e,this.base),t&&t.depth===2?e:this.intervalStub.transformIn(e,t)},transformOut:function(e,t){var n=t?t.depth:null;return Oj.depth=n,kj.lookup=this._lookup,rj(n===2?e:this.intervalStub.transformOut(e,Oj),this.base,kj)},contain:function(e){return this.powStub.contain(e)},setExtent:function(e,t){this.setExtent2(0,e,t)},setExtent2:function(e,t,n){if(!(!tb(t,n)||t<=0||n<=0)){var r=Aj,i=Aj;if(e===0){var a=this._lookup;r=a.to,i=a.from}this.powStub.setExtent2(e,r[wj]=t,r[Tj]=n);var o=this.base;this.intervalStub.setExtent2(e,i[wj]=nj(t,o),i[Tj]=nj(n,o))}},getFilter:function(){return{g:0}},sanitize:function(e,t){return tb(t[0],t[1])&&cy(e)&&e<=0&&(e=t[0]),e},getDefaultStartValue:function(){return 1},getExtent:function(){return this.powStub.getExtent()},getExtentUnsafe:function(e,t){return t===null?this.powStub.getExtentUnsafe(e,null):this.intervalStub.getExtentUnsafe(e,t)}},t}(PA);PA.registerClass(Dj);var Oj={},kj={},Aj=[],jj={value:1,category:1,time:1,log:1},Mj=Ry();function Nj(e){var t=e.get(`type`);return(t==null||!Gd(jj,t)&&!PA.getClass(t))&&(t=`value`),t}function Pj(e,t,n){var r=hD(),i;switch(r&&(i=Gj(e,t,n)),t){case`category`:return new cj({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:Yy()});case`time`:return new fj({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get(`useUTC`),breakOption:i});case`log`:return new Dj({logBase:e.get(`logBase`),breakOption:i});case`value`:return new uj({breakOption:i});default:return new((PA.getClass(t))||uj)({})}}function Fj(e,t,n){var r=n?UA(e,null):e.getExtentUnsafe(0,null),i=r[0],a=r[1];return tb(i,a)?i===t||a===t?2:i<t&&a>t?1:3:3}function Ij(e){Mj(e).noOnMyZero=!0}function Lj(e){return Mj(e).noOnMyZero}function Rj(e){var t=e.getLabelModel().get(`formatter`);if(e.type===`time`){var n=jD(t);return function(t,r){return e.scale.getFormattedLabel(t,r,n)}}else if(K(t))return function(n){var r=e.scale.getLabel(n);return t.replace(`{value}`,r??``)};else if(G(t)){if(e.type===`category`)return function(n,r){return t(zj(e,n),n.value-e.scale.getExtent()[0],null)};var r=hD();return function(n,i){var a=null;return r&&(a=r.makeAxisLabelFormatterParamBreak(a,n.break)),t(zj(e,n),i,a)}}else return function(t){return e.scale.getLabel(t)}}function zj(e,t){var n=e.scale;return $A(n)?n.getLabel(t):t.value}function Bj(e){return e.get(`interval`)??`auto`}function Vj(e){return e.type===`category`&&Bj(e.getLabelModel())===0}function Hj(e,t){var n={};return H(e.mapDimensionsAll(t),function(t){n[jE(e,t)]=!0}),gd(n)}function Uj(e){return e===`middle`||e===`center`}function Wj(e){return e.getShallow(`show`)}function Gj(e,t,n){var r=e.get(`breaks`,!0);if(r!=null)return!hD()||!n||!Kj(t)?void 0:r}function Kj(e){return e!==`category`}function qj(e,t,n,r,i,a){var o=QA(e),s=o?e.intervalStub:e;if(s.setExtent(r[0],r[1]),o){var c=e.powStub,l={depth:2},u=e.transformOut(r[0],l),d=e.transformOut(r[1],l),f=aj(n,r);t[0]&&!f[0]&&(u=i[0]),t[1]&&!f[1]&&(d=i[1]),c.setExtent(u,d)}s.setConfig(a)}function Jj(e,t){return $A(e)?e.getRawOrdinalNumber(t.value):t.value}function Yj(e,t){return $A(e)&&!!t.get(`boundaryGap`)}function Xj(e,t){if(e.length===t.length){for(var n=0;n<e.length;n++)if(e[n]!==t[n])return;return!0}}function Zj(e){for(var t=Yy(),n=Yy(),r=0;r<e.length;){var i=e[r++],a=e[r++];sA(i,a)||(Xy(t,i),Xy(n,a))}return[t,n]}function Qj(e,t){var n=Zj(e),r=n[0],i=n[1],a=Zj(t),o=a[0],s=a[1];return Math.max(Math.abs(r[0]-o[0]),Math.abs(i[0]-s[0]),Math.abs(r[1]-o[1]),Math.abs(i[1]-s[1]))}function $j(e){return xd(e)?e:e?.5:0}function eM(e,t,n){if(n.valueDim==null)return[];for(var r=t.count(),i=uA(r*2),a=0;a<r;a++){var o=oA(n,e,t,a);i[a*2]=o[0],i[a*2+1]=o[1]}return i}function tM(e,t,n,r,i){var 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){var p=t||e;sA(p[c],p[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`:var m=(u[o]+d[o])/2,h=[];l[o]=h[o]=m,l[1-o]=u[1-o],h[1-o]=d[1-o],s.push(l[0],l[1]),s.push(h[0],h[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 nM(e,t){var n=[],r=e.length,i,a;function o(e,t,n){var r=e.coord;return{coord:n,color:xh((n-r)/(t.coord-r),[e.color,t.color])}}for(var s=0;s<r;s++){var c=e[s],l=c.coord;if(l<0)i=c;else if(l>t){a?n.push(o(a,c,t)):i&&n.push(o(i,c,0),o(i,c,t));break}else i&&=(n.push(o(i,c,0)),null),n.push(c),a=c}return n}function rM(e,t,n){var r=e.getVisual(`visualMeta`);if(!(!r||!r.length||!e.count())&&t.type===`cartesian2d`){for(var i,a,o=r.length-1;o>=0;o--){var s=e.getDimensionInfo(r[o].dimension);if(i=s&&s.coordDim,i===`x`||i===`y`){a=r[o];break}}if(a){var c=t.getAxis(i),l=U(a.stops,function(e){return{coord:c.toGlobalCoord(c.dataToCoord(e.value)),color:e.color}}),u=l.length,d=a.outerColors.slice();u&&l[0].coord>l[u-1].coord&&(l.reverse(),d.reverse());var f=nM(l,i===`x`?n.getWidth():n.getHeight()),p=f.length;if(!p&&u)return l[0].coord<0?d[1]?d[1]:l[u-1].color:d[0]?d[0]:l[0].color;var m=10,h=f[0].coord-m,g=f[p-1].coord+m,_=g-h;if(_<.001)return`transparent`;H(f,function(e){e.offset=(e.coord-h)/_}),f.push({offset:p?f[p-1].offset:.5,color:d[1]||`transparent`}),f.unshift({offset:p?f[0].offset:.5,color:d[0]||`transparent`});var v=new GS(0,0,0,0,f,!0);return v[i]=h,v[i+`2`]=g,v}}}function iM(e,t,n){var r=e.get(`showAllSymbol`),i=r===`auto`;if(!(r&&!i)){var a=n.getAxesByScale(`ordinal`)[0];if(a&&!(i&&aM(a,t))){var o=t.mapDimension(a.dim),s={};return H(a.getViewLabels(),function(e){e.tick.offInterval||(s[Jj(a.scale,e.tick)]=1)}),function(e){return!s.hasOwnProperty(t.get(o,e))}}}}function aM(e,t){var n=e.getExtent(),r=Math.abs(n[1]-n[0])/e.scale.count();isNaN(r)&&(r=0);for(var i=t.count(),a=Math.max(1,Math.round(i/5)),o=0;o<i;o+=a)if(Zk.getSymbolSize(t,o)[+!!e.isHorizontal()]*1.5>r)return!1;return!0}function oM(e){for(var t=e.length/2;t>0&&sA(e[t*2-2],e[t*2-1]);t--);return t-1}function sM(e,t){return[e[t*2],e[t*2+1]]}function cM(e,t,n){for(var r=e.length/2,i=n===`x`?0:1,a,o,s=0,c=-1,l=0;l<r;l++)if(o=e[l*2+i],!sA(o,e[l*2+1-i])){if(l===0){a=o;continue}if(a<=t&&o>=t||a>=t&&o<=t){c=l;break}s=l,a=o}return{range:[s,c],t:(t-a)/(o-a)}}function lM(e){if(e.get([`endLabel`,`show`]))return!0;for(var t=0;t<Mb.length;t++)if(e.get([Mb[t],`endLabel`,`show`]))return!0;return!1}function uM(e,t,n,r){if(NA(t,`cartesian2d`)){var i=r.getModel(`endLabel`),a=i.get(`valueAnimation`),o=r.getData(),s={lastFrameIndex:0},c=lM(r)?function(n,r){e._endLabelOnDuring(n,r,o,s,a,i,t)}:null,l=t.getBaseAxis().isHorizontal(),u=AA(t,n,r,function(){var t=e._endLabel;t&&n&&s.originalX!=null&&t.attr({x:s.originalX,y:s.originalY})},c);if(!r.get(`clip`,!0)){var d=u.shape,f=Math.max(d.width,d.height);l?(d.y-=f,d.height+=f*2):(d.x-=f,d.width+=f*2)}return c&&c(1,u),u}else return jA(t,n,r)}function dM(e,t){var 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 fM=function(e){z(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(){var e=new iS,t=new rA;this.group.add(t.group),this._symbolDraw=t,this._lineGroup=e,this._changePolyState=vd(this._changePolyState,this)},t.prototype.render=function(e,t,n){var 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=iA(r,a,_),y=g&&eM(r,a,v),b=e.get(`showSymbol`),x=e.get(`connectNulls`),S=b&&!l&&iM(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);var w=l?!1: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;var E=rM(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:function(e){return[c[e*2],c[e*2+1]]}}),h&&this._initSymbolLabelAnimation(a,r,T),w&&(y&&=tM(y,c,r,w,x),c=tM(c,null,r,w,x)),f=this._newPolyline(c),g?p=this._newPolygon(c,y):p&&=(m.remove(p),this._polygon=null),l||this._initOrUpdateEndLabel(e,r,fO(E)),m.setClipPath(uM(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,fO(E));var D=m.getClipPath();D?cC(D,{shape:uM(this,r,!1,e).shape},e):m.setClipPath(uM(this,r,!0,e)),b&&d.updateData(a,{isIgnore:S,clipShape:T,disableAnimation:!0,getSymbolPoint:function(e){return[c[e*2],c[e*2+1]]}}),(!Xj(this._stackedOnPoints,y)||!Xj(this._points,c))&&(h?this._doUpdateAnimation(a,y,r,n,w,_,x):(w&&(y&&=tM(y,c,r,w,x),c=tM(c,null,r,w,x)),f.setShape({points:c}),p&&p.setShape({points:c,stackedOnPoints:y})))}var O=e.getModel(`emphasis`),k=O.get(`focus`),A=O.get(`blurScope`),j=O.get(`disabled`);if(f.useStyle(sd(o.getLineStyle(),{fill:`none`,stroke:E,lineJoin:`bevel`})),kx(f,e,`lineStyle`),f.style.lineWidth>0&&e.get([`emphasis`,`lineStyle`,`width`])===`bolder`){var M=f.getState(`emphasis`).style;M.lineWidth=+f.style.lineWidth+1}pb(f).seriesIndex=e.seriesIndex,Tx(f,k,A,j);var N=$j(e.get(`smooth`)),P=e.get(`smoothMonotone`);if(f.setShape({smooth:N,smoothMonotone:P,connectNulls:x}),p){var ee=a.getCalculationInfo(`stackedOnSeries`),te=0;p.useStyle(sd(s.getAreaStyle(),{fill:E,opacity:.7,lineJoin:`bevel`,decal:a.getVisual(`style`).decal})),ee&&(te=$j(ee.get(`smooth`))),p.setShape({smooth:N,stackedOnSmooth:te,smoothMonotone:P,connectNulls:x}),kx(p,e,`areaStyle`),pb(p).seriesIndex=e.seriesIndex,Tx(p,k,A,j)}var ne=this._changePolyState;a.eachItemGraphicEl(function(e){e&&(e.onHoverStateChange=ne)}),this._polyline.onHoverStateChange=ne,this._data=a,this._coordSys=r,this._stackedOnPoints=y,this._points=c,this._step=w,this._valueOrigin=_;var re=e.get(`triggerEvent`),ie=e.get(`triggerLineEvent`),ae=ie===!0||re===!0||re===`line`,oe=ie===!0||re===!0||re===`area`;this.packEventData(e,f,ae),p&&this.packEventData(e,p,oe)},t.prototype.packEventData=function(e,t,n){pb(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},t.prototype.highlight=function(e,t,n,r){var i=e.getData(),a=Ly(i,r);if(this._changePolyState(`emphasis`),!(a instanceof Array)&&a!=null&&a>=0){var o=i.getLayout(`points`),s=i.getItemGraphicEl(a);if(!s){var c=o[a*2],l=o[a*2+1];if(sA(c,l)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(c,l))return;var u=e.get(`zlevel`)||0,d=e.get(`z`)||0;s=new Zk(i,a),s.x=c,s.y=l,s.setZ(u,d);var f=s.getSymbolPath().getTextContent();f&&(f.zlevel=u,f.z=d,f.z2=this._polyline.z2+1),s.__temp=!0,i.setItemGraphicEl(a,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}else wA.prototype.highlight.call(this,e,t,n,r)},t.prototype.downplay=function(e,t,n,r){var i=e.getData(),a=Ly(i,r);if(this._changePolyState(`normal`),a!=null&&a>=0){var o=i.getItemGraphicEl(a);o&&(o.__temp?(i.setItemGraphicEl(a,null),this.group.remove(o)):o.downplay())}else wA.prototype.downplay.call(this,e,t,n,r)},t.prototype._changePolyState=function(e){var t=this._polygon;Xb(this._polyline,e),t&&Xb(t,e)},t.prototype._newPolyline=function(e){var t=this._polyline;return t&&this._lineGroup.remove(t),t=new vA({shape:{points:e},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(t),this._polyline=t,t},t.prototype._newPolygon=function(e,t){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new bA({shape:{points:e,stackedOnPoints:t},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},t.prototype._initSymbolLabelAnimation=function(e,t,n){var r,i,a=t.getBaseAxis(),o=a.inverse;t.type===`cartesian2d`?(r=a.isHorizontal(),i=!1):t.type===`polar`&&(r=a.dim===`angle`,i=!0);var s=e.hostModel,c=s.get(`animationDuration`);G(c)&&(c=c(null));var l=s.get(`animationDelay`)||0,u=G(l)?l(null):l;e.eachItemGraphicEl(function(e,a){var s=e;if(s){var d=[e.x,e.y],f=void 0,p=void 0,m=void 0;if(n)if(i){var h=n,g=t.pointToCoord(d);r?(f=h.startAngle,p=h.endAngle,m=-g[1]/180*Math.PI):(f=h.r0,p=h.r,m=g[0])}else{var _=n;r?(f=_.x,p=_.x+_.width,m=e.x):(f=_.y+_.height,p=_.y,m=e.y)}var v=p===f?0:(m-f)/(p-f);o&&(v=1-v);var y=G(l)?l(a):c*v+u,b=s.getSymbolPath(),x=b.getTextContent();s.attr({scaleX:0,scaleY:0}),s.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:y}),x&&x.animateFrom({style:{opacity:0}},{duration:300,delay:y}),b.disableLabelAnimation=!0}})},t.prototype._initOrUpdateEndLabel=function(e,t,n){var r=e.getModel(`endLabel`);if(lM(e)){var i=e.getData(),a=this._polyline,o=i.getLayout(`points`);if(!o){a.removeTextContent(),this._endLabel=null;return}var s=this._endLabel;s||(s=this._endLabel=new rv({z2:200}),s.ignoreClip=!0,a.setTextContent(this._endLabel),a.disableLabelAnimation=!0);var c=oM(o);c>=0&&(dw(a,fw(e,`endLabel`),{inheritColor:n,labelFetcher:e,labelDataIndex:c,defaultText:function(e,t,n){return n==null?Yk(i,e):Xk(i,n)},enableTextSetter:!0},dM(r,t)),a.textConfig.position=null)}else this._endLabel&&=(this._polyline.removeTextContent(),null)},t.prototype._endLabelOnDuring=function(e,t,n,r,i,a,o){var s=this._endLabel,c=this._polyline;if(s){e<1&&r.originalX==null&&(r.originalX=s.x,r.originalY=s.y);var l=n.getLayout(`points`),u=n.hostModel,d=u.get(`connectNulls`),f=a.get(`precision`),p=a.get(`distance`)||0,m=o.getBaseAxis(),h=m.isHorizontal(),g=m.inverse,_=t.shape,v=g?h?_.x:_.y+_.height:h?_.x+_.width:_.y,y=(h?p:0)*(g?-1:1),b=(h?0:-p)*(g?-1:1),x=h?`x`:`y`,S=cM(l,v,x),C=S.range,w=C[1]-C[0],T=void 0;if(w>=1){if(w>1&&!d){var E=sM(l,C[0]);s.attr({x:E[0]+y,y:E[1]+b}),i&&(T=u.getRawValue(C[0]))}else{var E=c.getPointOn(v,x);E&&s.attr({x:E[0]+y,y:E[1]+b});var D=u.getRawValue(C[0]),O=u.getRawValue(C[1]);i&&(T=Jy(n,f,D,O,S.t))}r.lastFrameIndex=C[0]}else{var k=e===1||r.lastFrameIndex>0?C[0]:0,E=sM(l,k);i&&(T=u.getRawValue(k)),s.attr({x:E[0]+y,y:E[1]+b})}if(i){var A=Sw(s);typeof A.setLabelText==`function`&&A.setLabelText(T)}}},t.prototype._doUpdateAnimation=function(e,t,n,r,i,a,o){var s=this._polyline,c=this._polygon,l=e.hostModel,u=pA(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=tM(u.stackedOnCurrent,u.current,n,i,o),d=tM(u.current,null,n,i,o),m=tM(u.stackedOnNext,u.next,n,i,o),p=tM(u.next,null,n,i,o)),Qj(d,p)>3e3||c&&Qj(f,m)>3e3){s.stopAnimation(),s.setShape({points:p}),c&&(c.stopAnimation(),c.setShape({points:p,stackedOnPoints:m}));return}s.shape.__points=u.current,s.shape.points=d;var h={shape:{points:p}};u.current!==d&&(h.shape.__points=u.next),s.stopAnimation(),sC(s,h,l),c&&(c.setShape({points:d,stackedOnPoints:f}),c.stopAnimation(),sC(c,{shape:{stackedOnPoints:m}},l),s.shape.points!==c.shape.points&&(c.shape.points=s.shape.points));for(var g=[],_=u.status,v=0;v<_.length;v++)if(_[v].cmd===`=`){var y=e.getItemGraphicEl(_[v].idx1);y&&g.push({el:y,ptIdx:v})}s.animators&&s.animators.length&&s.animators[0].during(function(){c&&c.dirtyShape();for(var e=s.shape.__points,t=0;t<g.length;t++){var n=g[t].el,r=g[t].ptIdx*2;n.x=e[r],n.y=e[r+1],n.markRedraw()}})},t.prototype.remove=function(e){var 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},t.type=`line`,t}(wA);function pM(e,t){return{seriesType:e,plan:xA(),reset:function(e){var n=e.getData(),r=e.coordinateSystem,i=e.pipelineContext,a=t||i.large;if(r){var o=U(r.dimensions,function(e){return n.mapDimension(e)}).slice(0,2),s=o.length,c=n.getCalculationInfo(`stackResultDimension`);AE(n,o[0])&&(o[0]=c),AE(n,o[1])&&(o[1]=c);var l=n.getStore(),u=n.getDimensionIndex(o[0]),d=n.getDimensionIndex(o[1]);return s&&{progress:function(e,t){for(var n=e.end-e.start,i=a&&uA(n*s),o=[],c=[],f=e.start,p=0;f<e.end;f++){var m=void 0;if(s===1){var h=l.get(u,f);m=r.dataToPoint(h,null,c)}else o[0]=l.get(u,f),o[1]=l.get(d,f),m=r.dataToPoint(o,null,c);a?(i[p++]=m[0],i[p++]=m[1]):t.setItemLayout(f,m.slice())}a&&(t.setLayout(`points`,i),t.setLayout(`pointsRange`,{start:e.start,end:e.end}))}}}}}}var mM={average:function(e){for(var t=0,n=0,r=0;r<e.length;r++)isNaN(e[r])||(t+=e[r],n++);return n===0?NaN:t/n},sum:function(e){for(var t=0,n=0;n<e.length;n++)t+=e[n]||0;return t},max:function(e){for(var t=-1/0,n=0;n<e.length;n++)e[n]>t&&(t=e[n]);return isFinite(t)?t:NaN},min:function(e){for(var t=1/0,n=0;n<e.length;n++)e[n]<t&&(t=e[n]);return isFinite(t)?t:NaN},nearest:function(e){return e[0]}},hM=function(e){return Math.round(e.length/2)};function gM(e){return{seriesType:e,reset:function(e,t,n){var r=e.getData(),i=e.get(`sampling`),a=e.coordinateSystem,o=r.count();if(o>10&&a.type===`cartesian2d`&&i){var s=a.getBaseAxis(),c=a.getOtherAxis(s),l=s.getExtent(),u=n.getDevicePixelRatio(),d=Math.abs(l[1]-l[0])*(u||1),f=Math.round(o/d);if(isFinite(f)&&f>1){i===`lttb`?e.setData(r.lttbDownSample(r.mapDimension(c.dim),1/f)):i===`minmax`&&e.setData(r.minmaxDownSample(r.mapDimension(c.dim),1/f));var p=void 0;K(i)?p=mM[i]:G(i)&&(p=i),p&&e.setData(r.downSample(r.mapDimension(c.dim),1/f,p,hM))}}}}}function _M(e){e.registerChartView(fM),e.registerSeriesModel(Jk),e.registerLayout(pM(`line`,!0)),e.registerVisual({seriesType:`line`,reset:function(e){var t=e.getData(),n=e.getModel(`lineStyle`).getLineStyle();n&&!n.stroke&&(n.stroke=t.getVisual(`style`).fill),t.setVisual(`legendLineStyle`,n)}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,gM(`line`))}var vM=Ry(),yM=Ry(),bM={estimate:1,determine:2};function xM(e){return{out:{noPxChangeTryDetermine:[]},kind:e}}function SM(e,t){var n=e.getLabelModel().get(`customValues`);if(n){var r=e.scale;return{labels:U(wM(n,r),function(t,n){return{formattedLabel:Rj(e)(t,n),rawLabel:r.getLabel(t),tick:t}})}}return e.type===`category`?TM(e,t):OM(e)}function CM(e,t,n){var r=e.scale,i=e.getTickModel().get(`customValues`);return i?{ticks:wM(i,r)}:e.type===`category`?DM(e,t):{ticks:r.getTicks(n)}}function wM(e,t){var n=t.getExtent(),r=[];return H(e,function(e){e=t.parse(e),e>=n[0]&&e<=n[1]&&r.push(e)}),ob(r,cb,null),zv(r),U(r,function(e){return{value:e}})}function TM(e,t){var n=e.getLabelModel(),r=EM(e,n,t);return!n.get(`show`)||e.scale.isBlank()?{labels:[]}:r}function EM(e,t,n){var r=AM(e),i=Bj(t),a=n.kind===bM.estimate;if(!a){var o=MM(r,i);if(o)return o}var s,c;G(i)?s=zM(e,i,!1):(c=i===`auto`?PM(e,n):i,s=zM(e,c,!1));var l={labels:s,labelCategoryInterval:c};return a?n.out.noPxChangeTryDetermine.push(function(){return NM(r,i,l),!0}):NM(r,i,l),l}function DM(e,t){var n=kM(e),r=Bj(t),i=MM(n,r);if(i)return i;var a,o;if((!t.get(`show`)||e.scale.isBlank())&&(a=[]),G(r))a=zM(e,r,!0);else if(r===`auto`){var s=EM(e,e.getLabelModel(),xM(bM.determine));o=s.labelCategoryInterval,a=U(s.labels,function(e){return e.tick})}else o=r,a=zM(e,o,!0);return NM(n,r,{ticks:a,tickCategoryInterval:o})}function OM(e){var t=e.scale.getTicks(),n=Rj(e);return{labels:U(t,function(t,r){return{formattedLabel:n(t,r),rawLabel:e.scale.getLabel(t),tick:t}})}}var kM=jM(`axisTick`),AM=jM(`axisLabel`);function jM(e){return function(t){return yM(t)[e]||(yM(t)[e]={list:[]})}}function MM(e,t){for(var n=0;n<e.list.length;n++)if(e.list[n].key===t)return e.list[n].value}function NM(e,t,n){return e.list.push({key:t,value:n}),n}function PM(e,t){if(t.kind===bM.estimate){var n=e.calculateCategoryInterval(t);return t.out.noPxChangeTryDetermine.push(function(){return yM(e).autoInterval=n,!0}),n}return yM(e).autoInterval??(yM(e).autoInterval=e.calculateCategoryInterval(t))}function FM(e,t){var n=t.kind,r=RM(e),i=Rj(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;var l=1,u=40;c>u&&(l=Math.max(1,Math.floor(c/u)));for(var d=s[0],f=e.dataToCoord(d+1)-e.dataToCoord(d),p=Math.abs(f*Math.cos(a)),m=Math.abs(f*Math.sin(a)),h=0,g=0;d<=s[1];d+=l){var _=0,v=0,y=Rp(i({value:d}),r.font,`center`,`top`);_=y.width*1.3,v=y.height*1.3,h=Math.max(h,_,7),g=Math.max(g,v,7)}var b=h/p,x=g/m;isNaN(b)&&(b=1/0),isNaN(x)&&(x=1/0);var S=Math.max(0,Math.floor(Math.min(b,x)));return n===bM.estimate?(t.out.noPxChangeTryDetermine.push(vd(IM,null,e,S,c)),S):LM(e,S,c)??S}function IM(e,t,n){return LM(e,t,n)==null}function LM(e,t,n){var r=vM(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 RM(e){var t=e.getLabelModel();return{axisRotate:e.getRotate?e.getRotate():e.isHorizontal&&!e.isHorizontal()?90:0,labelRotate:t.get(`rotate`)||0,font:t.getFont()}}function zM(e,t,n){var r=Rj(e),i=e.scale,a=[],o=G(t);return sj(i,o?0:t,function(e,s){var c=i.getLabel(e);if(o){var l=!!t(e.value,c);if(e.offInterval=!l,!l&&!s)return}a.push(n?e:{formattedLabel:r(e),rawLabel:c,tick:e})}),a}var BM=Ry();function VM(e){BM(e).prepare={}}function HM(e){BM(e).fullUpdate={}}function UM(e){return BM(e).prepare}function WM(e){return BM(e).fullUpdate}var GM=ib(),KM=Ry(),qM=Ry();function JM(e,t){var n=e.model,r=KM(WM(n.ecModel)).keyed,i=r&&r.get(t);return i&&i.get(n.uid)}function YM(e,t){return QM(JM(e,t))}function XM(e,t){var n=[];return ZM(e.model.ecModel,function(e){for(var r=0;r<t.length;r++)t[r]&&e.serByIdx[t[r].seriesIndex]&&n.push(QM(e))}),n}function ZM(e,t){var n=KM(WM(e)).keyed;n&&n.each(function(e,n){e.each(function(e,r){t(e,n,r)})})}function QM(e){return{liPosMinGap:e?e.liPosMinGap:void 0}}function $M(e,t){var n=e.model.ecModel,r=KM(WM(n)).axSer;r&&tN(n,r.get(e.model.uid),t)}function eN(e,t,n){var r=JM(e,t);r&&tN(e.model.ecModel,r.sers,n)}function tN(e,t,n){if(t)for(var r=0;r<t.length;r++){var i=t[r];e.isSeriesFiltered(i)||n(i)}}function nN(e,t,n){var r=KM(WM(e)).keyed,i=r&&r.get(t);i&&i.each(function(e){n(e.axis)})}function rN(e,t){var n=e.model,r=KM(WM(n.ecModel)).keys;r&&H(r.get(n.uid),function(e){t(e)})}function iN(e){var t=qM(UM(e)),n=t.keyed||=Y();ZM(e,function(t,r,i){var a=n.get(r)||n.set(r,Y()),o=a.get(i)||a.set(i,{});t.metrics.liPosMinGap&&oN.liPosMinGap(e,t,o)})}function aN(e,t){oN[e]=t}var oN={};function sN(e,t,n){if(e){var r=t.ecModel,i=KM(WM(r)),a=e.model.uid,o=i.axSer||=Y();(o.get(a)||o.set(a,[])).push(t);var s=t.subType,c=t.getBaseAxis()===e,l=uN.get(cN(s,c,n))||uN.get(cN(s,c,null));if(l){var u=i.keyed||=Y(),d=i.keys||=Y(),f=l.key,p=u.get(f)||u.set(f,Y()),m=p.get(a);m||(m=p.set(a,{axis:e,sers:[],serByIdx:[]}),m.metrics=l.getMetrics(e),(d.get(a)||d.set(a,[])).push(f)),m.sers.push(t),m.serByIdx[t.seriesIndex]=t}}}function cN(e,t,n){return e+`|&`+J(t,!0)+`|&`+(n||``)}function lN(e,t){var n=cN(t.seriesType,t.baseAxis,t.coordSysType);uN.set(n,t),GM(e,function(){e.registerProcessor(e.PRIORITY.PROCESSOR.AXIS_STATISTICS,{overallReset:iN})})}var uN=Y(),dN=.8;function fN(e,t){t||={};var n={w:NaN,w2:NaN},r=e.scale,i=t.fromStat,a=t.min,o=WA(r);cy(o)||(o=NaN);var s=e.getExtent(),c=Sv(s[1]-s[0]);return $A(r)?pN(n,e,o,c):i&&mN(n,e,o,c,i),a!=null&&(n.w=cy(n.w)?xv(a,n.w):a),n}function pN(e,t,n,r){var i=t.onBand,a=n+ +!!i;a===0&&(a=1),e.w=r/a,!i&&n&&r&&(e.w2=e.w*n/r)}function mN(e,t,n,r,i){var a=!1,o=-1/0;H(i.key?[YM(t,i.key)]:XM(t,i.sers||[]),function(e){var t=e.liPosMinGap;t!=null&&(t>0?(t>o&&(o=t),a=!1):t===-2&&(a=!0))}),cy(n)&&n>0&&cy(o)?(e.w=r/n*o,e.w2=o):a&&(e.w=r*dN,e.w2=e.w*n/r)}var hN=[0,1],gN=function(){function e(e,t,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=n||[0,0]}return e.prototype.contain=function(e){var t=this._extent,n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]);return e>=n&&e<=r},e.prototype.containData=function(e){return this.scale.contain(this.scale.parse(e))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.setExtent=function(e,t){var n=this._extent;n[0]=e,n[1]=t},e.prototype.dataToCoord=function(e,t){var n=this.scale;return e=n.normalize(n.parse(e)),jv(e,hN,_N(this),t)},e.prototype.coordToData=function(e,t){var n=jv(e,_N(this),hN,t);return this.scale.scale(n)},e.prototype.pointToData=function(e,t){},e.prototype.getTicksCoords=function(e){e||={};var t=e.tickModel||this.getTickModel(),n=U(CM(this,t,{breakTicks:e.breakTicks,pruneByBreak:e.pruneByBreak}).ticks,function(e){return{coord:this.dataToCoord(Jj(this.scale,e)),tick:e}},this),r=t.get(`alignWithLabel`),i=vN(this,n,r);return U(n,function(e){return{coord:e.coord,tickValue:e.tick.value,onBand:i}})},e.prototype.getMinorTicksCoords=function(){if($A(this.scale))return[];var e=this.model.getModel(`minorTick`).get(`splitNumber`);return e>0&&e<100||(e=5),U(this.scale.getMinorTicks(e),function(e){return U(e,function(e){return{coord:this.dataToCoord(e),tickValue:e}},this)},this)},e.prototype.getViewLabels=function(e){return e||=xM(bM.determine),SM(this,e).labels},e.prototype.getLabelModel=function(){return this.model.getModel(`axisLabel`)},e.prototype.getTickModel=function(){return this.model.getModel(`axisTick`)},e.prototype.getBandWidth=function(){return fN(this,{min:1}).w},e.prototype.calculateCategoryInterval=function(e){return e||=xM(bM.determine),FM(this,e)},e}();function _N(e){var t=e.getExtent();if(e.onBand){var n=(t[1]-t[0])/e.scale.count()/2;t[0]+=n,t[1]-=n}return t}function vN(e,t,n){var r=t.length;if(!e.onBand||n||!r)return!1;var i=fN(e).w;if(!i)return!1;H(t,function(e){e.coord-=i/2});var 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}var yN=function(e){z(t,e);function t(t,n,r,i,a){var o=e.call(this,t,n,r)||this;return o.index=0,o.type=i||`value`,o.position=a||`bottom`,o}return t.prototype.isHorizontal=function(){var e=this.position;return e===`top`||e===`bottom`},t.prototype.getGlobalExtent=function(e){var t=this.getExtent();return t[0]=this.toGlobalCoord(t[0]),t[1]=this.toGlobalCoord(t[1]),e&&t[0]>t[1]&&t.reverse(),t},t.prototype.pointToData=function(e,t){return this.coordToData(this.toLocalCoord(e[this.dim===`x`?0:1]),t)},t.prototype.setCategorySortInfo=function(e){if(this.type!==`category`)return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)},t}(gN),bN=[`label`,`labelLine`,`layoutOption`,`priority`,`defaultAttr`,`marginForce`,`minMarginForce`,`marginDefault`,`suggestIgnore`],xN=1,SN=2,CN=xN|SN;function wN(e,t,n){n||=CN,t?e.dirty|=n:e.dirty&=~n}function TN(e,t){return t||=CN,e.dirty==null||!!(e.dirty&t)}function EN(e){if(e)return TN(e)&&DN(e,e.label,e),e}function DN(e,t,n){var r=t.getComputedTransform();e.transform=$C(e.transform,r);var i=e.localRect=QC(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=ww.textMargin);for(var d=0;d<4;d++)ON[d]=u===ww.minMargin&&c&&c[d]!=null?c[d]:s&&s[d]!=null?s[d]:o?o[d]:0;u===ww.textMargin&&WC(i,ON,!1,!1);var f=e.rect=QC(e.rect,i);return r&&f.applyTransform(r),u===ww.minMargin&&WC(f,ON,!1,!1),e.axisAligned=XC(r),(e.label=e.label||{}).ignore=t.ignore,wN(e,!1),wN(e,!0,SN),e}var ON=[0,0,0,0];function kN(e,t,n){return e.transform=$C(e.transform,n),e.localRect=QC(e.localRect,t),e.rect=QC(e.rect,t),n&&e.rect.applyTransform(n),e.axisAligned=XC(n),e.obb=void 0,(e.label=e.label||{}).ignore=!1,e}function AN(e,t){if(e){e.label.x+=t.x,e.label.y+=t.y,e.label.markRedraw();var n=e.transform;n&&(n[4]+=t.x,n[5]+=t.y);var r=e.rect;r&&(r.x+=t.x,r.y+=t.y);var i=e.obb;i&&i.fromBoundingRect(e.localRect,n)}}function jN(e,t){for(var n=0;n<bN.length;n++){var r=bN[n];e[r]??(e[r]=t[r])}return EN(e)}function MN(e){var t=e.obb;return(!t||TN(e,SN))&&(e.obb=t||=new tC,t.fromBoundingRect(e.localRect,e.transform),wN(e,!1,SN)),t}function NN(e){var t=[];e.sort(function(e,t){return!!t.suggestIgnore-+!!e.suggestIgnore||t.priority-e.priority});function n(e){if(!e.ignore){var t=e.ensureState(`emphasis`);t.ignore??=!1}e.ignore=!0}for(var r=0;r<e.length;r++){var i=EN(e[r]);if(!i.label.ignore){for(var a=i.label,o=i.labelLine,s=!1,c=0;c<t.length;c++)if(PN(i,t[c],null,{touchThreshold:.05})){s=!0;break}s?(n(a),o&&n(o)):t.push(i)}}}function PN(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:MN(e).intersect(MN(t),n,r)}var FN=null;function IN(){return FN}var LN=`expandAxisBreak`,RN=Math.PI,zN=[[1,2,1,2],[5,3,5,3],[8,3,8,3]],BN=[[0,1,0,1],[0,3,0,3],[0,3,0,3]],VN=Ry(),HN=Ry(),UN=function(){function e(e){this.recordMap={},this.resolveAxisNameOverlap=e}return e.prototype.ensureRecord=function(e){var t=e.axis.dim,n=e.componentIndex,r=this.recordMap,i=r[t]||(r[t]=[]);return i[n]||(i[n]={ready:{}})},e}();function WN(e,t,n,r){var i=n.axis,a=t.ensureRecord(n),o=[],s,c=mP(e.axisName)&&Uj(e.nameLocation);H(r,function(e){var t=EN(e);if(!(!t||t.label.ignore)){o.push(t);var n=a.transGroup;c&&(n.transform?jf(GN,n.transform):Tf(GN),t.transform&&Df(GN,GN,t.transform),Z.copy(KN,t.localRect),KN.applyTransform(GN),s?s.union(KN):Z.copy(s=new Z(0,0,0,0),KN))}});var l=Math.abs(a.dirVec.x)>.1?`x`:`y`,u=a.transGroup[l];if(o.sort(function(e,t){return Math.abs(e.label[l]-u)-Math.abs(t.label[l]-u)}),c&&s){var d=i.getExtent(),f=Math.min(d[0],d[1]),p=Math.max(d[0],d[1])-f;s.union(new Z(f,0,p,1))}a.stOccupiedRect=s,a.labelInfoList=o}var GN=wf(),KN=new Z(0,0,0,0),qN=function(e,t,n,r,i,a){if(Uj(e.nameLocation)){var o=a.stOccupiedRect;o&&JN(kN({},o,a.transGroup.transform),r,i)}else YN(a.labelInfoList,a.dirVec,r,i)};function JN(e,t,n){var r=new ap;PN(e,t,r,{direction:Math.atan2(n.y,n.x),bidirectional:!1,touchThreshold:.05})&&AN(t,r)}function YN(e,t,n,r){for(var i=ap.dot(r,t)>=0,a=0,o=e.length;a<o;a++){var s=e[i?a:o-1-a];s.label.ignore||JN(s,n,r)}}var XN=function(){function e(e,t,n,r){this.group=new iS,this._axisModel=e,this._api=t,this._local={},this._shared=r||new UN(qN),this._resetCfgDetermined(n)}return e.prototype.updateCfg=function(e){var t=this._cfg.raw;t.position=e.position,t.labelOffset=e.labelOffset,this._resetCfgDetermined(t)},e.prototype.__getRawCfg=function(){return this._cfg.raw},e.prototype._resetCfgDetermined=function(e){var t=this._axisModel,n=t.getDefaultOption?t.getDefaultOption():{},r=J(e.axisName,t.get(`name`)),i=t.get(`nameMoveOverlap`);(i==null||i===`auto`)&&(i=J(e.defaultNameMoveOverlap,!0));var a={raw:e,position:e.position,rotation:e.rotation,nameDirection:J(e.nameDirection,1),tickDirection:J(e.tickDirection,1),labelDirection:J(e.labelDirection,1),labelOffset:J(e.labelOffset,0),silent:J(e.silent,!0),axisName:r,nameLocation:Ad(t.get(`nameLocation`),n.nameLocation,`end`),shouldNameMoveOverlap:mP(r)&&i,optionHideOverlap:t.get([`axisLabel`,`hideOverlap`]),showMinorTicks:t.get([`minorTick`,`show`])};this._cfg=a;var o=new iS({x:a.position[0],y:a.position[1],rotation:a.rotation});o.updateTransform(),this._transformGroup=o;var s=this._shared.ensureRecord(t);s.transGroup=this._transformGroup,s.dirVec=new ap(Math.cos(-a.rotation),Math.sin(-a.rotation))},e.prototype.build=function(e,t){var n=this;return e||={axisLine:!0,axisTickLabelEstimate:!1,axisTickLabelDetermine:!0,axisName:!0},H(ZN,function(r){e[r]&&QN[r](n._cfg,n._local,n._shared,n._axisModel,n.group,n._transformGroup,n._api,t||{})}),this},e.innerTextLayout=function(e,t,n){var r=Jv(t-e),i,a;return Yv(r)?(a=n>0?`top`:`bottom`,i=`center`):Yv(r-RN)?(a=n>0?`bottom`:`top`,i=`center`):(a=`middle`,i=r>0&&r<RN?n>0?`right`:`left`:n>0?`left`:`right`),{rotation:r,textAlign:i,textVerticalAlign:a}},e.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+`Index`]=e.componentIndex,t},e.isLabelSilent=function(e){var t=e.get(`tooltip`);return e.get(`silent`)||!(e.get(`triggerEvent`)||t&&t.show)},e}(),ZN=[`axisLine`,`axisTickLabelEstimate`,`axisTickLabelDetermine`,`axisName`],QN={axisLine:function(e,t,n,r,i,a,o){var s=r.get([`axisLine`,`show`]);if(s===`auto`&&(s=!0,e.raw.axisLineAutoShow!=null&&(s=!!e.raw.axisLineAutoShow)),s){var c=r.axis.getExtent(),l=a.transform,u=[c[0],0],d=[c[1],0],f=u[0]>d[0];l&&(np(u,u,l),np(d,d,l));var p=V({lineCap:`round`},r.getModel([`axisLine`,`lineStyle`]).getLineStyle()),m={strokeContainThreshold:e.raw.strokeContainThreshold||5,silent:!0,z2:1,style:p};if(r.get([`axisLine`,`breakLine`])&&vD(r.axis.scale))IN().buildAxisBreakLine(r,i,a,m);else{var h=new IS(V({shape:{x1:u[0],y1:u[1],x2:d[0],y2:d[1]}},m));OC(h.shape,h.style.lineWidth),h.anid=`line`,i.add(h)}var g=r.get([`axisLine`,`symbol`]);if(g!=null){var _=r.get([`axisLine`,`symbolSize`]);K(g)&&(g=[g,g]),(K(_)||xd(_))&&(_=[_,_]);var v=qk(r.get([`axisLine`,`symbolOffset`])||0,_),y=_[0],b=_[1];H([{rotate:e.rotation+Math.PI/2,offset:v[0],r:0},{rotate:e.rotation-Math.PI/2,offset:v[1],r:Math.sqrt((u[0]-d[0])*(u[0]-d[0])+(u[1]-d[1])*(u[1]-d[1]))}],function(t,n){if(g[n]!==`none`&&g[n]!=null){var r=Gk(g[n],-y/2,-b/2,y,b,p.stroke,!0),a=t.r+t.offset,o=f?d:u;r.attr({rotation:t.rotate,x:o[0]+a*Math.cos(e.rotation),y:o[1]-a*Math.sin(e.rotation),silent:!0,z2:11}),i.add(r)}})}}},axisTickLabelEstimate:function(e,t,n,r,i,a,o,s){sP(t,i,s)&&$N(e,t,n,r,i,a,o,bM.estimate)},axisTickLabelDetermine:function(e,t,n,r,i,a,o,s){sP(t,i,s)&&$N(e,t,n,r,i,a,o,bM.determine);var c=aP(e,i,a,r);nP(e,t.labelLayoutList,c),oP(e,i,a,r,e.tickDirection)},axisName:function(e,t,n,r,i,a,o,s){var c=n.ensureRecord(r);t.nameEl&&=(i.remove(t.nameEl),c.nameLayout=c.nameLocation=null);var l=e.axisName;if(mP(l)){var u=e.nameLocation,d=e.nameDirection,f=r.getModel(`nameTextStyle`),p=r.get(`nameGap`)||0,m=r.axis.getExtent(),h=r.axis.inverse?-1:1,g=new ap(0,0),_=new ap(0,0);u===`start`?(g.x=m[0]-h*p,_.x=-h):u===`end`?(g.x=m[1]+h*p,_.x=h):(g.x=(m[0]+m[1])/2,g.y=e.labelOffset+d*p,_.y=d);var v=wf();_.transform(kf(v,v,e.rotation));var y=r.get(`nameRotate`);y!=null&&(y=y*RN/180);var b,x;Uj(u)?b=XN.innerTextLayout(e.rotation,y??e.rotation,d):(b=eP(e.rotation,u,y||0,m),x=e.raw.axisNameAvailableWidth,x!=null&&(x=Math.abs(x/Math.sin(b.rotation)),!isFinite(x)&&(x=null)));var S=f.getFont(),C=r.get(`nameTruncate`,!0)||{},w=C.ellipsis,T=kd(e.raw.nameTruncateMaxWidth,C.maxWidth,x),E=s.nameMarginLevel||0,D=new rv({x:g.x,y:g.y,rotation:b.rotation,silent:XN.isLabelSilent(r),style:pw(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(qC({el:D,componentModel:r,itemName:l}),D.__fullText=l,D.anid=`name`,r.get(`triggerEvent`)){var O=XN.makeAxisEventDataBase(r);O.targetType=`axisName`,O.name=l,pb(D).eventData=O}a.add(D),D.updateTransform(),t.nameEl=D;var k=c.nameLayout=EN({label:D,priority:D.z2,defaultAttr:{ignore:D.ignore},marginDefault:Uj(u)?zN[E]:BN[E]});if(c.nameLocation=u,i.add(D),D.decomposeTransform(),e.shouldNameMoveOverlap&&k){var A=n.ensureRecord(r);n.resolveAxisNameOverlap(e,n,r,k,_,A)}}}};function $N(e,t,n,r,i,a,o,s){lP(t)||cP(e,t,i,s,r,o);var c=t.labelLayoutList;dP(e,r,c,a),gP(r,e.rotation,c);var l=e.optionHideOverlap;tP(r,c,l),l&&NN(md(c,function(e){return e&&!e.label.ignore})),WN(e,n,r,c)}function eP(e,t,n,r){var i=Jv(n-e),a,o,s=r[0]>r[1],c=t===`start`&&!s||t!==`start`&&s;return Yv(i-RN/2)?(o=c?`bottom`:`top`,a=`center`):Yv(i-RN*1.5)?(o=c?`top`:`bottom`,a=`center`):(o=`middle`,a=i<RN*1.5&&i>RN/2?c?`left`:`right`:c?`right`:`left`),{rotation:i,textAlign:a,textVerticalAlign:o}}function tP(e,t,n){var r=e.axis,i=e.get([`axisLabel`,`customValues`]);if(Vj(r))return;function a(e,a,o){var s=EN(t[a]),c=EN(t[o]),l=r.scale;if(!(!s||!c)){if(e==null){if(!n&&i)return;var u=VN(s.label).labelInfo.tick;if(ZA(l)&&u.notNice||$A(l)&&u.offInterval){rP(s.label);return}}if(e===!1||s.suggestIgnore){rP(s.label);return}if(c.suggestIgnore){rP(c.label);return}var d=.1;if(!n){var f=[0,0,0,0];s=jN({marginForce:f},s),c=jN({marginForce:f},c)}PN(s,c,null,{touchThreshold:d})&&rP(e?c.label:s.label)}}var o=e.get([`axisLabel`,`showMinLabel`]),s=e.get([`axisLabel`,`showMaxLabel`]),c=t.length;a(o,0,1),a(s,c-1,c-2)}function nP(e,t,n){e.showMinorTicks||H(t,function(e){if(e&&e.label.ignore)for(var t=0;t<n.length;t++){var r=n[t],i=HN(r),a=VN(e.label);if(i.tickValue!=null&&!i.onBand&&i.tickValue===a.labelInfo.tick.value){rP(r);return}}})}function rP(e){e&&(e.ignore=!0)}function iP(e,t,n,r,i){for(var a=[],o=[],s=[],c=0;c<e.length;c++){var l=e[c].coord;o[0]=l,o[1]=0,s[0]=l,s[1]=n,t&&(np(o,o,t),np(s,s,t));var u=new IS({shape:{x1:o[0],y1:o[1],x2:s[0],y2:s[1]},style:r,z2:2,autoBatch:!0,silent:!0});OC(u.shape,u.style.lineWidth),u.anid=i+`_`+e[c].tickValue,a.push(u);var d=HN(u);d.onBand=!!e[c].onBand,d.tickValue=e[c].tickValue}return a}function aP(e,t,n,r){var 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[];for(var s=a.getModel(`lineStyle`),c=e.tickDirection*a.get(`length`),l=iP(i.getTicksCoords(),n.transform,c,sd(s.getLineStyle(),{stroke:r.get([`axisLine`,`lineStyle`,`color`])}),`ticks`),u=0;u<l.length;u++)t.add(l[u]);return l}function oP(e,t,n,r,i){var a=r.axis,o=r.getModel(`minorTick`);if(!(!e.showMinorTicks||a.scale.isBlank())){var s=a.getMinorTicksCoords();if(s.length)for(var c=o.getModel(`lineStyle`),l=i*o.get(`length`),u=sd(c.getLineStyle(),sd(r.getModel(`axisTick`).getLineStyle(),{stroke:r.get([`axisLine`,`lineStyle`,`color`])})),d=0;d<s.length;d++)for(var f=iP(s[d],n.transform,l,u,`minorticks_`+d),p=0;p<f.length;p++)t.add(f[p])}}function sP(e,t,n){if(lP(e)){var r=e.axisLabelsCreationContext.out.noPxChangeTryDetermine;if(n.noPxChange){for(var i=!0,a=0;a<r.length;a++)i&&=r[a]();if(i)return!1}r.length&&(t.remove(e.labelGroup),uP(e,null,null,null))}return!0}function cP(e,t,n,r,i,a){var o=i.axis,s=kd(e.raw.axisLabelShow,i.get([`axisLabel`,`show`])),c=new iS;n.add(c);var l=xM(r);if(!s||o.scale.isBlank()){uP(t,[],c,l);return}var u=i.getModel(`axisLabel`),d=o.getViewLabels(l),f=(kd(e.raw.labelRotate,u.get(`rotate`))||0)*RN/180,p=XN.innerTextLayout(e.rotation,f,e.labelDirection),m=i.getCategories&&i.getCategories(!0),h=[],g=i.get(`triggerEvent`),_=1/0,v=-1/0;H(d,function(e,t){var n=e.tick,r=e.formattedLabel,s=e.rawLabel,l=u,f=Jj(o.scale,n);if(m&&m[f]){var y=m[f];q(y)&&y.textStyle&&(l=new Fw(y.textStyle,u,i.ecModel))}var b=l.getTextColor()||i.get([`axisLine`,`lineStyle`,`color`]),x=l.getShallow(`align`,!0)||p.textAlign,S=J(l.getShallow(`alignMinLabel`,!0),x),C=J(l.getShallow(`alignMaxLabel`,!0),x),w=l.getShallow(`verticalAlign`,!0)||l.getShallow(`baseline`,!0)||p.textVerticalAlign,T=J(l.getShallow(`verticalAlignMinLabel`,!0),w),E=J(l.getShallow(`verticalAlignMaxLabel`,!0),w),D=10+(n.time?.level||0);_=Math.min(_,D),v=Math.max(v,D);var O=new rv({x:0,y:0,rotation:0,silent:XN.isLabelSilent(i),z2:D,style:pw(l,{text:r,align:t===0?S:t===d.length-1?C:x,verticalAlign:t===0?T:t===d.length-1?E:w,fill:G(b)?b(o.type===`category`?s:o.type===`value`?f+``:f,t):b})});O.anid=`label_`+f;var k=VN(O);if(k.labelInfo=e,k.layoutRotation=p.rotation,qC({el:O,componentModel:i,itemName:r,formatterParamsExtra:{isTruncated:function(){return O.isTruncated},value:s,tickIndex:t}}),g){var A=XN.makeAxisEventDataBase(i);A.targetType=`axisLabel`,A.value=s,A.tickIndex=t;var j=e.tick.break;if(j){var M=j.parsedBreak;A.break={start:M.vmin,end:M.vmax}}o.type===`category`&&(A.dataIndex=f),pb(O).eventData=A,j&&hP(i,a,O,j)}h.push(O),c.add(O)}),uP(t,U(h,function(e){return{label:e,priority:VN(e).labelInfo.tick.break?e.z2+(v-_+1):e.z2,defaultAttr:{ignore:e.ignore}}}),c,l)}function lP(e){return!!e.labelLayoutList}function uP(e,t,n,r){e.labelLayoutList=t,e.labelGroup=n,e.axisLabelsCreationContext=r}function dP(e,t,n,r){var i=t.get([`axisLabel`,`margin`]);H(n,function(n,a){var o=EN(n);if(o){var s=o.label,c=VN(s);o.suggestIgnore=s.ignore,s.ignore=!1,wm(fP,pP);var l=t.axis;fP.x=l.dataToCoord(Jj(l.scale,c.labelInfo.tick)),fP.y=e.labelOffset+e.labelDirection*i,fP.rotation=c.layoutRotation,r.add(fP),fP.updateTransform(),r.remove(fP),fP.decomposeTransform(),wm(s,fP),s.markRedraw(),wN(o,!0),EN(o)}})}var fP=new Q_,pP=new Q_;function mP(e){return!!e}function hP(e,t,n,r){n.on(`click`,function(n){var i={type:LN,breaks:[{start:r.parsedBreak.breakOption.start,end:r.parsedBreak.breakOption.end}]};i[e.axis.dim+`AxisIndex`]=e.componentIndex,t.dispatchAction(i)})}function gP(e,t,n){var r=hD();if(r){var i=r.retrieveAxisBreakPairs(n,function(e){return e&&VN(e.label).labelInfo.tick.break},!0),a=e.get([`breakLabelLayout`,`moveOverlap`],!0);(a===!0||a===`auto`)&&H(i,function(r){IN().adjustBreakLabelPair(e.axis.inverse,t,[EN(n[r[0]]),EN(n[r[1]])])})}}function _P(e,t,n){n||={};var 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){var p=a.toGlobalCoord(a.dataToCoord(0));f[u.onZero]=Math.max(Math.min(p,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),kd(n.labelInside,t.get([`axisLabel`,`inside`]))&&(i.labelDirection=-i.labelDirection);var m=t.get([`axisLabel`,`rotate`]);return i.labelRotate=s===`top`?-m:m,i.z2=1,i}function vP(e){return e.coordinateSystem&&e.coordinateSystem.type===`cartesian2d`}function yP(e){var t={xAxisModel:null,yAxisModel:null};return H(t,function(n,r){var i=r.replace(/Model$/,``);t[r]=e.getReferringComponents(i,Hy).models[0]}),t}function bP(e,t,n,r,i,a){for(var o=_P(e,n),s=!1,c=!1,l=0;l<t.length;l++)YA(t[l].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 XN(n,r,o,i)}function xP(e,t,n){var r=_P(t,n);e.updateCfg(r)}var SP=Ry(),CP=3,wP=function(){function e(e,t,n,r,i){var a=$A(e),o=a?t.getCategories().length:null,s;if(a){var c=t.getCategories(!0);s=c&&!c.length}var l=n.slice();(XA(e)||QA(e)||ZA(e))&&(Zy(l,EP(e,t.get(`dataMin`,!0))),Qy(l,EP(e,t.get(`dataMax`,!0)))),nb(l)||(l[0]=l[1]=NaN);var u=[],d=[!1,!1],f=t.get(`min`,!0);f===`dataMin`?(u[0]=l[0],d[0]=!0):(u[0]=EP(e,G(f)?f({min:l[0],max:l[1]}):f),d[0]=u[0]!=null);var p=t.get(`max`,!0);p===`dataMax`?(u[1]=l[1],d[1]=!0):(u[1]=EP(e,G(p)?p({min:l[0],max:l[1]}):p),d[1]=u[1]!=null);var m=DP(e,t),h=a?null:l[1]-l[0]||Math.abs(l[0]);u[0]??=a?s?l[0]:o?0:NaN:l[0]-m[0]*h,u[1]??=a?s?l[1]:o?o-1:NaN:l[1]+m[1]*h,!eb(u[0])&&(u[0]=NaN),!eb(u[1])&&(u[1]=NaN);var g=s||Od(u[0])||Od(u[1])||a&&!o,_=XA(e),v=_&&t.needIncludeZero&&t.needIncludeZero();v&&(u[0]>0&&u[1]>0&&!d[0]&&(u[0]=0),u[0]<0&&u[1]<0&&!d[1]&&(u[1]=0));var y=!1;u[0]>u[1]&&(u.reverse(),y=!0);var b=EP(e,t.get(`startValue`,!0)),x=b!=null;!cy(b)&&r&&(b=e.getDefaultStartValue?e.getDefaultStartValue():0),cy(b)&&(x||!_||v)&&(b<u[0]&&!d[0]?(u[0]=b,d[0]=!0):b>u[1]&&!d[1]&&(u[1]=b,d[1]=!0)),TP(this._i={scale:e,dataMM:l,noZoomEffMM:u,zoomMM:[],fixMM:d,zoomFixMM:[!1,!1],startValue:b,isBlank:g,incl0:v,tggAxInv:y,ctnShp:i},u)}return e.prototype.makeNoZoom=function(){return this._i.noZoomEffMM.slice()},e.prototype.makeFinal=function(){var 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),TP(e,o),a},e.prototype.makeRenderInfo=function(){return{startValue:this._i.startValue}},e.prototype.setZoomMM=function(e,t){this._i.zoomMM[e]=t},e}();function TP(e,t){var n=e.scale,r=e.dataMM;n.sanitize&&(t[0]=n.sanitize(t[0],r),t[1]=n.sanitize(t[1],r),rb(t))}function EP(e,t){return t==null?null:Od(t)?NaN:e.parse(t)}function DP(e,t){var n;if($A(e))n=[0,0];else{var r=t.get(`boundaryGap`);typeof r==`boolean`&&(r=null),n=W(r)?r:[r,r]}return[OP(n[0]),OP(n[1])]}function OP(e){return Hp(typeof e==`boolean`?0:e,1)||0}function kP(e){var t=SP(e.scale);return t.extent||=Yy(),t}function AP(e,t){kP(e).dimIdxInCoord=t.get(e.dim)}function jP(e,t){var n=e.scale,r=e.model,i=e.dim;n.rawExtentInfo||MP(n,e,i,r,t)}function MP(e,t,n,r,i){var a=kP(t),o=a.extent,s=!1;$M(t,function(r){if(r.boxCoordinateSystem){var i=xE(r).coord,c=a.dimIdxInCoord;if(c>=0&&W(i)){var l=i[c];l!=null&&!W(l)&&Xy(o,e.parse(l))}}else if(r.coordinateSystem){var u=r.getData();if(u){var d=e.getFilter?e.getFilter():null;H(Hj(u,n),function(e){$y(o,u.getApproximateExtent(e,d))})}r.__requireStartValue&&r.__requireStartValue(t)&&(s=!0)}});var c=RP(e,t,r);PP(e,new wP(e,r,o,s,c),i),a.extent=null}function NP(e,t){var n=e.scale;PP(n,new wP(n,e.model,t,!1,!1),CP)}function PP(e,t,n){e.rawExtentInfo=t,t.from=n}function FP(e,t){IP.set(e,t)}var IP=Y();function LP(e,t,n,r,i){e.rawExtentInfo||NP({scale:e,model:t},i||Yy());var 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 RP(e,t,n){var r=Yj(e,n),i=n.get(`containShape`,!0);if(i==null&&!r&&(i=!0),!i)return!1;var a=!1;return rN(t,function(e){a=!!IP.get(e)||a}),a}function zP(e,t,n,r){if(n.ctnShp){var i;if(rN(e,function(t){var n=IP.get(t);if(n){var a=n(e,r);a&&(i||=[0,0],Zy(i,a[0]),Qy(i,a[1]),Ij(e))}}),i){var a=t.getExtent();if($A(t))e.onBand||t.setExtent2(1,bv(a[0],a[0]+i[0]),xv(a[1],a[1]+i[1]));else{var o=a.slice();n.zoomFixMM[0]||(o[0]=bv(o[0],t.transformOut(t.transformIn(o[0],null)+i[0],null))),n.zoomFixMM[1]||(o[1]=xv(o[1],t.transformOut(t.transformIn(o[1],null)+i[1],null))),(o[0]<a[0]||o[1]>a[1])&&t.setExtent2(1,o[0],o[1])}}}}function BP(){aN(`liPosMinGap`,VP)}function VP(e,t,n){var r=Y(),i=n.serUids,a=n.liPosMinGap,o,s=t.axis,c=s.scale,l=c.needTransform(),u=c.getFilter?c.getFilter():null,d=MT(u);function f(n){tN(e,t.sers,function(e){var t=e.getRawData(),r=t.getDimensionIndex(t.mapDimension(s.dim));r>=0&&n(r,e,t.getStore())})}var 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}dA(HP,p);var m=0;f(function(e,t,n){for(var r=0,i=n.count();r<i;++r){var a=n.get(e,r);isFinite(a)&&(!u||NT(d,a))&&(l&&(a=c.transformIn(a,null)),HP.arr[m++]=a)}});var h=HP.typed?HP.arr.subarray(0,m):(HP.arr.length=m,HP.arr);HP.typed?h.sort():zv(h);for(var g=1/0,_=1;_<m;++_){var v=h[_]-h[_-1];v>0&&v<g&&(g=v)}n.liPosMinGap=t.liPosMinGap=cy(g)?g:m>0?-2:-1,n.serUids=r}var HP=dA({ctor:lA},50);function UP(e){return function(t,n){var r=fN(t,{fromStat:{key:e}});if(cy(r.w2))return[-r.w2/2,r.w2/2]}}function WP(e,t){return e+`|&`+t}function GP(e){return BP(),{liPosMinGap:!$A(e.scale)}}function KP(e,t,n,r){lN(e,{key:t,seriesType:n,coordSysType:r,getMetrics:GP})}function qP(e){return e.scale.rawExtentInfo.makeRenderInfo().startValue}var JP={left:0,right:0,top:0,bottom:0},YP=[`25%`,`25%`],XP=`cartesian2d`,ZP=function(e){z(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.mergeDefaultAndTheme=function(t,n){var r=EO(t.outerBounds);e.prototype.mergeDefaultAndTheme.apply(this,arguments),r&&t.outerBounds&&TO(t.outerBounds,r)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&t.outerBounds&&TO(this.option.outerBounds,t.outerBounds)},t.type=`grid`,t.dependencies=[`xAxis`,`yAxis`],t.layoutMode=`box`,t.defaultOption={show:!1,z:0,left:`15%`,top:65,right:`10%`,bottom:80,containLabel:!1,outerBoundsMode:`auto`,outerBounds:JP,outerBoundsContain:`all`,outerBoundsClampWidth:YP[0],outerBoundsClampHeight:YP[1],backgroundColor:Q.color.transparent,borderWidth:1,borderColor:Q.color.neutral30},t}(kO),QP=ib(),$P=`__ec_stack_`;function eF(e){return e.get(`stack`)||$P+e.seriesIndex}function tF(e,t){var n=nF(e,t);return n.columnMap=rF(n),n}function nF(e,t){var n=WP(t,XP),r=[],i=fN(e,{fromStat:{key:n},min:1});return eN(e,n,function(e){r.push({barWidth:Mv(e.get(`barWidth`),i.w),barMaxWidth:Mv(e.get(`barMaxWidth`),i.w),barMinWidth:Mv(e.get(`barMinWidth`)||(oF(e)?.5:1),i.w),barGap:e.get(`barGap`),barCategoryGap:e.get(`barCategoryGap`),defaultBarGap:e.get(`defaultBarGap`),stackId:eF(e)})}),{bandWidthResult:i,seriesInfo:r}}function rF(e){var t=e.bandWidthResult.w,n=t,r=0,i,a,o=[],s={};H(e.seriesInfo,function(e,t){t||(a=e.defaultBarGap||0);var c=e.stackId;Gd(s,c)||r++;var l=s[c];l||(l=s[c]={width:0,maxWidth:0},o.push(c));var u=e.barWidth;u&&!l.width&&(l.width=u,u=bv(n,u),n-=u);var d=e.barMaxWidth;d&&(l.maxWidth=d);var f=e.barMinWidth;f&&(l.minWidth=f);var p=e.barGap;p!=null&&(a=p);var m=e.barCategoryGap;m!=null&&(i=m)}),i??=xv(35-o.length*4,15)+`%`;var c=Mv(i,t),l=Mv(a,1),u=(n-c)/(r+(r-1)*l);u=xv(u,0),H(o,function(e){var t=s[e],i=t.maxWidth,a=t.minWidth;if(t.width){var o=t.width;i&&(o=bv(o,i)),a&&(o=xv(o,a)),t.width=o,n-=o+l*o,r--}else{var o=u;i&&i<o&&(o=bv(i,n)),a&&a>o&&(o=a),o!==u&&(t.width=o,n-=o+l*o,r--)}}),u=(n-c)/(r+(r-1)*l),u=xv(u,0);var d=0,f;H(o,function(e){var t=s[e];t.width||=u,f=t,d+=t.width*(1+l)}),f&&(d-=f.width*l);var p={},m=-d/2;return H(o,function(e){var n=s[e];p[e]=p[e]||{bandWidth:t,offset:m,width:n.width},m+=n.width*(1+l)}),p}function iF(e){return{seriesType:e,overallReset:function(t){var n=WP(e,XP);nN(t,n,function(t){var r=tF(t,e);eN(t,n,function(e){var t=r.columnMap[eF(e)];e.getData().setLayout({bandWidth:t.bandWidth,offset:t.offset,size:t.width})})})}}}function aF(e){return{seriesType:e,plan:xA(),reset:function(e){if(vP(e)){var t=e.getData(),n=e.coordinateSystem,r=n.getBaseAxis(),i=n.getOtherAxis(r),a=t.getDimensionIndex(t.mapDimension(i.dim)),o=t.getDimensionIndex(t.mapDimension(r.dim)),s=e.get(`showBackground`,!0),c=t.mapDimension(i.dim),l=t.getCalculationInfo(`stackResultDimension`),u=AE(t,c)&&!!t.getCalculationInfo(`stackedOnSeries`),d=i.isHorizontal(),f=i.toGlobalCoord(i.dataToCoord(qP(i))),p=oF(e),m=e.get(`barMinHeight`)||0,h=l&&t.getDimensionIndex(l),g=t.getLayout(`size`),_=t.getLayout(`offset`);return{progress:function(e,t){for(var r=e.count,i=p&&uA(r*3),c=p&&s&&uA(r*3),l=p&&uA(r),v=n.master.getRect(),y=d?v.width:v.height,b,x=t.getStore(),S=0;(b=e.next())!=null;){var C=x.get(u?h:a,b),w=x.get(o,b),T=f,E=void 0;u&&(E=+C-x.get(a,b));var D=void 0,O=void 0,k=void 0,A=void 0;if(d){var j=n.dataToPoint([C,w]);u&&(T=n.dataToPoint([E,w])[0]),D=T,O=j[1]+_,k=j[0]-T,A=g,Sv(k)<m&&(k=(k<0?-1:1)*m)}else{var j=n.dataToPoint([w,C]);u&&(T=n.dataToPoint([w,E])[1]),D=j[0]+_,O=T,k=g,A=j[1]-T,Sv(A)<m&&(A=(A<=0?-1:1)*m)}p?(i[S]=D,i[S+1]=O,i[S+2]=d?k:A,c&&(c[S]=d?v.x:D,c[S+1]=d?O:v.y,c[S+2]=y),l[b]=b):t.setItemLayout(b,{x:D,y:O,width:k,height:A}),S+=3}p&&t.setLayout({largePoints:i,largeDataIndices:l,largeBackgroundPoints:c,valueAxisHorizontal:d})}}}}}}function oF(e){return e.pipelineContext&&e.pipelineContext.large}function sF(e){return UP(WP(e,XP))}function cF(e){QP(e,function(){function t(t){var n=WP(t,XP);KP(e,n,t,XP),FP(n,sF(t))}t(`bar`),t(`pictorialBar`)})}var lF=function(e){z(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.getInitialData=function(e,t){return PE(null,this,{useEncodeDefaulter:!0})},t.prototype.getMarkerPosition=function(e,t,n){var r=this.coordinateSystem;if(r&&r.clampData){var i=r.clampData(e),a=r.dataToPoint(i);if(n)H(r.getAxes(),function(e,n){if(e.type===`category`&&t!=null){var r=e.getTicksCoords(),o=e.getTickModel().get(`alignWithLabel`),s=i[n],c=t[n]===`x1`||t[n]===`y1`;if(c&&!o&&(s+=1),r.length<2)return;if(r.length===2){a[n]=e.toGlobalCoord(e.getExtent()[+!!c]);return}for(var l=void 0,u=void 0,d=1,f=0;f<r.length;f++){var p=r[f].coord,m=f===r.length-1?r[f-1].tickValue+d:r[f].tickValue;if(m===s){u=p;break}else if(m<s)l=p;else if(l!=null&&m>s){u=(p+l)/2;break}f===1&&(d=m-r[0].tickValue)}u??(l?l&&(u=r[r.length-1].coord):u=r[0].coord),a[n]=e.toGlobalCoord(u)}});else{var o=this.getData(),s=o.getLayout(`offset`),c=o.getLayout(`size`),l=+!r.getBaseAxis().isHorizontal();a[l]+=s+c/2}return a}return[NaN,NaN]},t.prototype.__requireStartValue=function(e){return this.getBaseAxis()!==e},t.type=`series.__base_bar__`,t.defaultOption={z:2,coordinateSystem:`cartesian2d`,legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:`mod`,defaultBarGap:`10%`},t}(Ak);Ak.registerClass(lF);var uF=function(e){z(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.getInitialData=function(){return PE(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get(`realtimeSort`,!0)||null})},t.prototype.getProgressive=function(){return this.get(`large`)?this.get(`progressive`):!1},t.prototype.__preparePipelineContext=function(e,t){var n=ub(this,e,t);return n.progressiveRender&&(n.large=!0),n},t.prototype.brushSelector=function(e,t,n){return n.rect(t.getItemLayout(e))},t.type=`series.bar`,t.dependencies=[`grid`,`polar`],t.defaultOption=VE(lF.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:`rgba(180, 180, 180, 0.2)`,borderColor:null,borderWidth:0,borderType:`solid`,borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:Q.color.primary,borderWidth:2}},realtimeSort:!1}),t}(lF),dF=`\0__throttleOriginMethod`,fF=`\0__throttleRate`,pF=`\0__throttleType`;function mF(e,t,n){var r,i=0,a=0,o=null,s,c,l,u;t||=0;function d(){a=new Date().getTime(),o=null,e.apply(c,l||[])}var f=function(){var e=[...arguments];r=new Date().getTime(),c=this,l=e;var f=u||t,p=u||n;u=null,s=r-(p?i:a)-f,clearTimeout(o),p?o=setTimeout(d,f):s>=0?d():o=setTimeout(d,-s),i=r};return f.clear=function(){o&&=(clearTimeout(o),null)},f.debounceNextCall=function(e){u=e},f}function hF(e,t,n,r){var i=e[t];if(i){var a=i[dF]||i,o=i[pF];if(i[fF]!==n||o!==r){if(n==null||!r)return e[t]=a;i=e[t]=mF(a,n,r===`debounce`),i[dF]=a,i[pF]=r,i[fF]=n}return i}}function gF(e,t){var n=e[t];n&&n[dF]&&(n.clear&&n.clear(),e[t]=n[dF])}var _F=function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return e}(),vF=function(e){z(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`sausage`,n}return t.prototype.getDefaultShape=function(){return new _F},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=Math.max(t.r0||0,0),a=Math.max(t.r,0),o=(a-i)*.5,s=i+o,c=t.startAngle,l=t.endAngle,u=t.clockwise,d=Math.PI*2,f=u?l-c<d:c-l<d;f||(c=l-(u?d:-d));var 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)},t}(R_);function yF(e,t){t||={};var n=t.isRoundCap;return function(t,r,i){var a=r.position;if(!a||a instanceof Array)return Up(t,r,i);var 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)+xF(m,s+_,!1),x=u+p*y(m)+SF(m,s+_,!1),S=`right`,C=`middle`;break;case`insideStartAngle`:b=l+p*v(m)+xF(m,-s+_,!1),x=u+p*y(m)+SF(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)+xF(h,s+_,!0),x=u+p*y(h)+SF(h,s+_,!0),S=`left`,C=`middle`;break;case`insideEndAngle`:b=l+p*v(h)+xF(h,-s+_,!0),x=u+p*y(h)+SF(h,-s+_,!0),S=`right`,C=`middle`;break;default:return Up(t,r,i)}return t||={},t.x=b,t.y=x,t.align=S,t.verticalAlign=C,t}}function bF(e,t,n,r){if(xd(r)){e.setTextConfig({rotation:r});return}else if(W(t)){e.setTextConfig({rotation:0});return}var 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}var 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 xF(e,t,n){return t*Math.sin(e)*(n?-1:1)}function SF(e,t,n){return t*Math.cos(e)*(n?1:-1)}function CF(e,t,n){var r=e.get(`borderRadius`);if(r==null)return n?{cornerRadius:0}:null;W(r)||(r=[r,r,r,r]);var i=Math.abs(t.r||0-t.r0||0);return{cornerRadius:U(r,function(e){return Hp(e,i)})}}var wF=Math.max,TF=Math.min,EF=function(e){z(t,e);function t(){var t=e.call(this)||this;return t.type=`bar`,t._isFirstFrame=!0,t}return t.prototype.render=function(e,t,n,r){this._model=e,this._removeOnRenderedListener(n),this._updateDrawMode(e);var i=e.get(`coordinateSystem`);(i===`cartesian2d`||i===`polar`)&&(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(e,t,n):this._renderNormal(e,t,n,r))},t.prototype.incrementalPrepareRender=function(e){this._clear(),this._updateDrawMode(e),this._updateLargeClip(e)},t.prototype.incrementalRender=function(e,t){this._progressiveEls=[],this._incrementalRenderLarge(e,t)},t.prototype.eachRendered=function(e){YC(this._progressiveEls||this.group,e)},t.prototype._updateDrawMode=function(e){var t=e.pipelineContext.large;(this._isLargeDraw==null||t!==this._isLargeDraw)&&(this._isLargeDraw=t,this._clear())},t.prototype._renderNormal=function(e,t,n,r){var 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`);var u=e.isAnimationEnabled()?e:null,d=kF(e,s);d&&this._enableRealtimeSort(d,a,n);var f=e.get(`clip`,!0)||d,p=s.getArea();i.removeClipPath();var 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){var t=FF[s.type](a,e);if(!t)return null;var n=KF(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){var n=a.getItemModel(t),r=FF[s.type](a,t,n);if(r&&(h&&S(t),!(!a.hasValue(t)||!PF[s.type](r)))){var o=!1;f&&(o=DF[s.type](p,r));var g=OF[s.type](e,a,t,r,l,u,c.model,!1,m);d&&(g.forceLabelAnimation=!0),RF(g,a,t,n,r,e,l,s.type===`polar`),b?g.attr({shape:r}):d?AF(d,u,g,r,t,l,!1,!1):cC(g,{shape:r},e,t),a.setItemGraphicEl(t,g),i.add(g),g.ignore=o}}).update(function(t,n){var r=a.getItemModel(t),C=FF[s.type](a,t,r);if(C){if(h){var w=void 0;y.length===0?w=S(n):(w=y[n],w.useStyle(g.getItemStyle()),s.type===`cartesian2d`?w.setShape(`r`,_):w.setShape(`cornerRadius`,_),v[t]=w);var T=FF[s.type](a,t),E=GF(l,T,s);sC(w,{shape:E},u,t)}var D=o.getItemGraphicEl(n);if(!a.hasValue(t)||!PF[s.type](C)){i.remove(D);return}var O=!1;if(f&&(O=DF[s.type](p,C),O&&i.remove(D)),D&&(D.type===`sector`&&m||D.type===`sausage`&&!m)&&(D&&fC(D,e,n),D=null),D?pC(D):D=OF[s.type](e,a,t,C,l,u,c.model,!0,m),d&&(D.forceLabelAnimation=!0),x){var k=D.getTextContent();if(k){var A=Sw(k);A.prevValue!=null&&(A.prevValue=A.value)}}else RF(D,a,t,r,C,e,l,s.type===`polar`);b?D.attr({shape:C}):d?AF(d,u,D,C,t,l,!0,x):sC(D,{shape:C},e,t,null),a.setItemGraphicEl(t,D),D.ignore=O,i.add(D)}}).remove(function(t){var n=o.getItemGraphicEl(t);n&&fC(n,e,t)}).execute();var C=this._backgroundGroup||=new iS;C.removeAll();for(var w=0;w<v.length;++w)C.add(v[w]);i.add(C),this._backgroundEls=v,this._data=a},t.prototype._renderLarge=function(e,t,n){this._clear(),HF(e,this.group),this._updateLargeClip(e)},t.prototype._incrementalRenderLarge=function(e,t){this._removeBackground(),HF(t,this.group,this._progressiveEls,!0)},t.prototype._updateLargeClip=function(e){var t=e.get(`clip`,!0)&&MA(e.coordinateSystem,!1,e),n=this.group;t?n.setClipPath(t):n.removeClipPath()},t.prototype._enableRealtimeSort=function(e,t,n){var r=this;if(t.count()){var i=e.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(t,e,n),this._isFirstFrame=!1;else{var a=function(e){var n=t.getItemGraphicEl(e),r=n&&n.shape;return r&&Math.abs(i.isHorizontal()?r.height:r.width)||0};this._onRendered=function(){r._updateSortWithinSameData(t,a,i,n)},n.getZr().on(`rendered`,this._onRendered)}}},t.prototype._dataSort=function(e,t,n){var r=[];return e.each(e.mapDimension(t.dim),function(e,t){var i=n(t);i??=NaN,r.push({dataIndex:t,mappedValue:i,ordinalNumber:e})}),r.sort(function(e,t){return t.mappedValue-e.mappedValue}),{ordinalNumbers:U(r,function(e){return e.ordinalNumber})}},t.prototype._isOrderChangedWithinSameData=function(e,t,n){for(var r=n.scale,i=e.mapDimension(n.dim),a=Number.MAX_VALUE,o=0,s=r.getOrdinalMeta().categories.length;o<s;++o){var c=e.rawIndexOf(i,r.getRawOrdinalNumber(o)),l=c<0?Number.MIN_VALUE:t(e.indexOfRawIndex(c));if(l>a)return!0;a=l}return!1},t.prototype._isOrderDifferentInView=function(e,t){for(var n=t.scale,r=n.getExtent(),i=Math.max(0,r[0]),a=Math.min(r[1],n.getOrdinalMeta().categories.length-1);i<=a;++i)if(e.ordinalNumbers[i]!==n.getRawOrdinalNumber(i))return!0},t.prototype._updateSortWithinSameData=function(e,t,n,r){if(this._isOrderChangedWithinSameData(e,t,n)){var i=this._dataSort(e,n,t);this._isOrderDifferentInView(i,n)&&(this._removeOnRenderedListener(r),r.dispatchAction({type:`changeAxisOrder`,componentType:n.dim+`Axis`,axisId:n.index,sortInfo:i}))}},t.prototype._dispatchInitSort=function(e,t,n){var r=t.baseAxis,i=this._dataSort(e,r,function(n){return e.get(e.mapDimension(t.otherAxis.dim),n)});n.dispatchAction({type:`changeAxisOrder`,componentType:r.dim+`Axis`,isInitSort:!0,axisId:r.index,sortInfo:i})},t.prototype.remove=function(e,t){this._clear(this._model),this._removeOnRenderedListener(t)},t.prototype.dispose=function(e,t){this._removeOnRenderedListener(t)},t.prototype._removeOnRenderedListener=function(e){this._onRendered&&=(e.getZr().off(`rendered`,this._onRendered),null)},t.prototype._clear=function(e){var t=this.group,n=this._data;e&&e.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl(function(t){fC(t,e,pb(t).dataIndex)})):t.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type=`bar`,t}(wA),DF={cartesian2d:function(e,t){var n=t.width<0?-1:1,r=t.height<0?-1:1;n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height);var i=e.x+e.width,a=e.y+e.height,o=wF(t.x,e.x),s=TF(t.x+t.width,i),c=wF(t.y,e.y),l=TF(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:function(e,t){var n=t.r0<=t.r?1:-1;if(n<0){var r=t.r;t.r=t.r0,t.r0=r}var i=TF(t.r,e.r),a=wF(t.r0,e.r0);t.r=i,t.r0=a;var o=i-a<0;if(n<0){var r=t.r;t.r=t.r0,t.r0=r}return o}},OF={cartesian2d:function(e,t,n,r,i,a,o,s,c){var l=new Q_({shape:V({},r),z2:1});if(l.__dataIndex=n,l.name=`item`,a){var u=l.shape,d=i?`height`:`width`;u[d]=0}return l},polar:function(e,t,n,r,i,a,o,s,c){var l=!i&&c?vF:TS,u=new l({shape:r,z2:1});if(u.name=`item`,u.calculateTextPosition=yF(LF(i),{isRoundCap:l===vF}),a){var d=u.shape,f=i?`r`:`endAngle`,p={};d[f]=i?r.r0:r.startAngle,p[f]=r[f],(s?sC:cC)(u,{shape:p},a)}return u}};function kF(e,t){var n=e.get(`realtimeSort`,!0),r=t.getBaseAxis();if(n&&r.type===`category`&&t.type===`cartesian2d`)return{baseAxis:r,otherAxis:t.getOtherAxis(r)}}function AF(e,t,n,r,i,a,o,s){var c,l;a?(l={x:r.x,width:r.width},c={y:r.y,height:r.height}):(l={y:r.y,height:r.height},c={x:r.x,width:r.width}),s||(o?sC:cC)(n,{shape:c},t,i,null);var u=t?e.baseAxis.model:null;(o?sC:cC)(n,{shape:l},u,i)}function jF(e,t){for(var n=0;n<t.length;n++)if(!isFinite(e[t[n]]))return!0;return!1}var MF=[`x`,`y`,`width`,`height`],NF=[`cx`,`cy`,`r`,`startAngle`,`endAngle`],PF={cartesian2d:function(e){return!jF(e,MF)},polar:function(e){return!jF(e,NF)}},FF={cartesian2d:function(e,t,n){var r=e.getItemLayout(t);if(!r)return null;var i=n?zF(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:function(e,t,n){var r=e.getItemLayout(t);return{cx:r.cx,cy:r.cy,r0:r.r0,r:r.r,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}}};function IF(e){return e.startAngle!=null&&e.endAngle!=null&&e.startAngle===e.endAngle}function LF(e){return function(e){var t=e?`Arc`:`Angle`;return function(e){switch(e){case`start`:case`insideStart`:case`end`:case`insideEnd`:return e+t;default:return e}}}(e)}function RF(e,t,n,r,i,a,o,s){var c=t.getItemVisual(n,`style`);if(!s){var l=r.get([`itemStyle`,`borderRadius`])||0;e.setShape(`r`,l)}else if(!a.get(`roundCap`)){var u=e.shape;V(u,CF(r.getModel(`itemStyle`),u,!0)),e.setShape(u)}e.useStyle(c);var d=r.getShallow(`cursor`);d&&e.attr(`cursor`,d);var f=s?o?i.r>=i.r0?`endArc`:`startArc`:i.endAngle>=i.startAngle?`endAngle`:`startAngle`:o?qF(i,a.coordinateSystem):JF(i,a.coordinateSystem),p=fw(r);dw(e,p,{labelFetcher:a,labelDataIndex:n,defaultText:Yk(a.getData(),n),inheritColor:c.fill,defaultOpacity:c.opacity,defaultOutsidePosition:f});var m=e.getTextContent();if(s&&m){var h=r.get([`label`,`position`]);e.textConfig.inside=h===`middle`?!0:null,bF(e,h===`outside`?f:h,LF(o),r.get([`label`,`rotate`]))}Cw(m,p,a.getRawValue(n),function(e){return Xk(t,e)});var g=r.getModel([`emphasis`]);Tx(e,g.get(`focus`),g.get(`blurScope`),g.get(`disabled`)),kx(e,r),IF(i)&&(e.style.fill=`none`,e.style.stroke=`none`,H(e.states,function(e){e.style&&(e.style.fill=e.style.stroke=`none`)}))}function zF(e,t){var n=e.get([`itemStyle`,`borderColor`]);if(!n||n===`none`)return 0;var r=e.get([`itemStyle`,`borderWidth`])||0,i=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),a=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(r,i,a)}var BF=function(){function e(){}return e}(),VF=function(e){z(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`largeBar`,n}return t.prototype.getDefaultShape=function(){return new BF},t.prototype.buildPath=function(e,t){for(var n=t.points,r=this.baseDimIdx,i=1-this.baseDimIdx,a=[],o=[],s=this.barWidth,c=0;c<n.length;c+=3)o[r]=s,o[i]=n[c+2],a[r]=n[c+r],a[i]=n[c+i],e.rect(a[0],a[1],o[0],o[1])},t}(R_);function HF(e,t,n,r){var 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?lb(e):0;if(l){var d=new VF({shape:{points:l},incremental:u,silent:!0,z2:0});d.baseDimIdx=a,d.largeDataIndices=o,d.barWidth=s,d.useStyle(c.getItemStyle()),t.add(d),n&&n.push(d)}var f=new VF({shape:{points:i.getLayout(`largePoints`)},incremental:u,ignoreCoarsePointer:!0,z2:1});f.baseDimIdx=a,f.largeDataIndices=o,f.barWidth=s,t.add(f),f.useStyle(i.getVisual(`style`)),f.style.stroke=null,pb(f).seriesIndex=e.seriesIndex,e.get(`silent`)||(f.on(`mousedown`,UF),f.on(`mousemove`,UF)),n&&n.push(f)}var UF=mF(function(e){var t=this,n=WF(t,e.offsetX,e.offsetY);pb(t).dataIndex=n>=0?n:null},30,!1);function WF(e,t,n){for(var r=e.baseDimIdx,i=1-r,a=e.shape.points,o=e.largeDataIndices,s=[],c=[],l=e.barWidth,u=0,d=a.length/3;u<d;u++){var f=u*3;if(c[r]=l,c[i]=a[f+2],s[r]=a[f+r],s[i]=a[f+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[u]}return-1}function GF(e,t,n){if(NA(n,`cartesian2d`)){var r=t,i=n.getArea();return{x:e?r.x:i.x,y:e?i.y:r.y,width:e?r.width:i.width,height:e?i.height:r.height}}else{var i=n.getArea(),a=t;return{cx:i.cx,cy:i.cy,r0:e?i.r0:a.r0,r:e?i.r:a.r,startAngle:e?a.startAngle:0,endAngle:e?a.endAngle:Math.PI*2}}}function KF(e,t,n){return new(e.type===`polar`?TS:Q_)({shape:GF(t,n,e),silent:!0,z2:0})}function qF(e,t){return e.height===0?t.getOtherAxis(t.getBaseAxis()).inverse?`bottom`:`top`:e.height>0?`bottom`:`top`}function JF(e,t){return e.width===0?t.getOtherAxis(t.getBaseAxis()).inverse?`left`:`right`:e.width>=0?`right`:`left`}function YF(e){e.registerChartView(EF),e.registerSeriesModel(uF),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,iF(`bar`)),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,aF(`bar`)),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,gM(`bar`)),e.registerAction({type:`changeAxisOrder`,event:`changeAxisOrder`,update:`update`},function(e,t){var n=e.componentType||`series`;t.eachComponent({mainType:n,query:e},function(t){e.sortInfo&&t.axis.setCategorySortInfo(e.sortInfo)})}),cF(e)}function XF(e){return`_EC_`+e}var ZF=function(){function e(e){this.type=`graph`,this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=e||!1}return e.prototype.isDirected=function(){return this._directed},e.prototype.addNode=function(e,t){e=e==null?``+t:``+e;var n=this._nodesMap;if(!n[XF(e)]){var r=new QF(e,t);return r.hostGraph=this,this.nodes.push(r),n[XF(e)]=r,r}},e.prototype.getNodeByIndex=function(e){var t=this.data.getRawIndex(e);return this.nodes[t]},e.prototype.getNodeById=function(e){return this._nodesMap[XF(e)]},e.prototype.addEdge=function(e,t,n){var r=this._nodesMap,i=this._edgesMap;if(xd(e)&&(e=this.nodes[e]),xd(t)&&(t=this.nodes[t]),e instanceof QF||(e=r[XF(e)]),t instanceof QF||(t=r[XF(t)]),!(!e||!t)){var a=e.id+`-`+t.id,o=new $F(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}},e.prototype.getEdgeByIndex=function(e){var t=this.edgeData.getRawIndex(e);return this.edges[t]},e.prototype.getEdge=function(e,t){e instanceof QF&&(e=e.id),t instanceof QF&&(t=t.id);var n=this._edgesMap;return this._directed?n[e+`-`+t]:n[e+`-`+t]||n[t+`-`+e]},e.prototype.eachNode=function(e,t){for(var n=this.nodes,r=n.length,i=0;i<r;i++)n[i].dataIndex>=0&&e.call(t,n[i],i)},e.prototype.eachEdge=function(e,t){for(var n=this.edges,r=n.length,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)},e.prototype.breadthFirstTraverse=function(e,t,n,r){if(t instanceof QF||(t=this._nodesMap[XF(t)]),t){for(var i=n===`out`?`outEdges`:n===`in`?`inEdges`:`edges`,a=0;a<this.nodes.length;a++)this.nodes[a].__visited=!1;if(!e.call(r,t,null))for(var o=[t];o.length;)for(var s=o.shift(),c=s[i],a=0;a<c.length;a++){var l=c[a],u=l.node1===s?l.node2:l.node1;if(!u.__visited){if(e.call(r,u,s))return;o.push(u),u.__visited=!0}}}},e.prototype.update=function(){for(var e=this.data,t=this.edgeData,n=this.nodes,r=this.edges,i=0,a=n.length;i<a;i++)n[i].dataIndex=-1;for(var i=0,a=e.count();i<a;i++)n[e.getRawIndex(i)].dataIndex=i;t.filterSelf(function(e){var n=r[t.getRawIndex(e)];return n.node1.dataIndex>=0&&n.node2.dataIndex>=0});for(var i=0,a=r.length;i<a;i++)r[i].dataIndex=-1;for(var i=0,a=t.count();i<a;i++)r[t.getRawIndex(i)].dataIndex=i},e.prototype.clone=function(){for(var t=new e(this._directed),n=this.nodes,r=this.edges,i=0;i<n.length;i++)t.addNode(n[i].id,n[i].dataIndex);for(var i=0;i<r.length;i++){var a=r[i];t.addEdge(a.node1.id,a.node2.id,a.dataIndex)}return t},e}(),QF=function(){function e(e,t){this.inEdges=[],this.outEdges=[],this.edges=[],this.dataIndex=-1,this.id=e??``,this.dataIndex=t??-1}return e.prototype.degree=function(){return this.edges.length},e.prototype.inDegree=function(){return this.inEdges.length},e.prototype.outDegree=function(){return this.outEdges.length},e.prototype.getModel=function(e){if(!(this.dataIndex<0))return this.hostGraph.data.getItemModel(this.dataIndex).getModel(e)},e.prototype.getAdjacentDataIndices=function(){for(var e={edge:[],node:[]},t=0;t<this.edges.length;t++){var n=this.edges[t];n.dataIndex<0||(e.edge.push(n.dataIndex),e.node.push(n.node1.dataIndex,n.node2.dataIndex))}return e},e.prototype.getTrajectoryDataIndices=function(){for(var e=Y(),t=Y(),n=0,r=this.edges.length;n<r;n++){var i=this.edges[n];if(!(i.dataIndex<0)){e.set(i.dataIndex,!0);for(var a=[i.node1],o=[i.node2],s=0;s<a.length;){var c=a[s];s++,t.set(c.dataIndex,!0);for(var l=c.inEdges,u=0,d=l.length,f=void 0,p=void 0;u<d;u++)f=l[u],p=f.dataIndex,p>=0&&!e.hasKey(p)&&(e.set(p,!0),a.push(f.node1))}for(s=0;s<o.length;){var m=o[s];s++,t.set(m.dataIndex,!0);for(var h=m.outEdges,u=0,g=h.length,_=void 0,v=void 0;u<g;u++)_=h[u],v=_.dataIndex,v>=0&&!e.hasKey(v)&&(e.set(v,!0),o.push(_.node2))}}}return{edge:e.keys(),node:t.keys()}},e}(),$F=function(){function e(e,t,n){this.dataIndex=-1,this.node1=e,this.node2=t,this.dataIndex=n??-1}return e.prototype.getModel=function(e){if(!(this.dataIndex<0))return this.hostGraph.edgeData.getItemModel(this.dataIndex).getModel(e)},e.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},e.prototype.getTrajectoryDataIndices=function(){var e=Y(),t=Y();e.set(this.dataIndex,!0);for(var n=[this.node1],r=[this.node2],i=0;i<n.length;){var a=n[i];i++,t.set(a.dataIndex,!0);for(var o=a.inEdges,s=0,c=o.length,l=void 0,u=void 0;s<c;s++)l=a.inEdges[s],u=l.dataIndex,u>=0&&!e.hasKey(u)&&(e.set(u,!0),n.push(l.node1))}for(i=0;i<r.length;){var d=r[i];i++,t.set(d.dataIndex,!0);for(var f=d.outEdges,s=0,c=f.length,p=void 0,m=void 0;s<c;s++)p=d.outEdges[s],m=p.dataIndex,m>=0&&!e.hasKey(m)&&(e.set(m,!0),r.push(p.node2))}return{edge:e.keys(),node:t.keys()}},e}();function eI(e,t){return{getValue:function(n){var r=this[e][t];return r.getStore().get(r.getDimensionIndex(n||`value`),this.dataIndex)},setVisual:function(n,r){this.dataIndex>=0&&this[e][t].setItemVisual(this.dataIndex,n,r)},getVisual:function(n){return this[e][t].getItemVisual(this.dataIndex,n)},setLayout:function(n,r){this.dataIndex>=0&&this[e][t].setItemLayout(this.dataIndex,n,r)},getLayout:function(){return this[e][t].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[e][t].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[e][t].getRawIndex(this.dataIndex)}}}dd(QF,eI(`hostGraph`,`data`)),dd($F,eI(`hostGraph`,`edgeData`));var tI=Ry();function nI(e){var t=e.mainData,n=e.datas;n||(n={main:t},e.datasAttr={main:`data`}),e.datas=e.mainData=null,lI(t,n,e),H(n,function(n){H(t.TRANSFERABLE_METHODS,function(t){n.wrapMethod(t,yd(rI,e))})}),t.wrapMethod(`cloneShallow`,yd(aI,e)),H(t.CHANGABLE_METHODS,function(n){t.wrapMethod(n,yd(iI,e))}),Nd(n[t.dataType]===t)}function rI(e,t){if(cI(this)){var n=V({},tI(this).datas);n[this.dataType]=t,lI(t,n,e)}else uI(t,this.dataType,tI(this).mainData,e);return t}function iI(e,t){return e.struct&&e.struct.update(),t}function aI(e,t){return H(tI(t).datas,function(n,r){n!==t&&uI(n.cloneShallow(),r,t,e)}),t}function oI(e){var t=tI(this).mainData;return e==null||t==null?t:tI(t).datas[e]}function sI(){var e=tI(this).mainData;return e==null?[{data:e}]:U(gd(tI(e).datas),function(t){return{type:t,data:tI(e).datas[t]}})}function cI(e){return tI(e).mainData===e}function lI(e,t,n){tI(e).datas={},H(t,function(t,r){uI(t,r,e,n)})}function uI(e,t,n,r){tI(n).datas[t]=e,tI(e).mainData=n,e.dataType=t,r.struct&&(e[r.structAttr]=r.struct,r.struct[r.datasAttr[t]]=e),e.getLinkedData=oI,e.getLinkedDataAll=sI}function dI(e,t,n,r,i){for(var a=new ZF(r),o=0;o<e.length;o++)a.addNode(kd(e[o].id,e[o].name,o),o);for(var s=[],c=[],l=0,o=0;o<t.length;o++){var u=t[o],d=u.source,f=u.target;a.addEdge(d,f,l)&&(c.push(u),s.push(kd(My(u.id,null),d+` > `+f)),l++)}var p=n.get(`coordinateSystem`),m;if(p===`cartesian2d`||p===`polar`||p===`matrix`)m=PE(e,n);else{var h=vE.get(p),g=h&&h.dimensions||[];ld(g,`value`)<0&&g.concat([`value`]);var _=pE(e,{coordDimensions:g,encodeDefine:n.getEncode()}).dimensions;m=new dE(_,n),m.initData(e)}var v=new dE([`value`],n);return v.initData(c,s),i&&i(m,v),nI({mainData:m,struct:a,structAttr:`graph`,datas:{node:m,edge:v},datasAttr:{node:`data`,edge:`edgeData`}}),a.update(),a}var fI=function(){function e(e,t){this._getDataWithEncodedVisual=e,this._getRawData=t}return e.prototype.getAllNames=function(){var e=this._getRawData();return e.mapArray(e.getName)},e.prototype.containName=function(e){return this._getRawData().indexOfName(e)>=0},e.prototype.indexOfName=function(e){return this._getDataWithEncodedVisual().indexOfName(e)},e.prototype.getItemVisual=function(e,t){return this._getDataWithEncodedVisual().getItemVisual(e,t)},e}(),pI=`-->`,mI=function(e){return e.get(`autoCurveness`)||null},hI=function(e,t){var n=mI(e),r=20,i=[];if(xd(n))r=n;else if(W(n)){e.__curvenessList=n;return}t>r&&(r=t);var a=r%2?r+2:r+3;i=[];for(var o=0;o<a;o++)i.push((o%2?o+1:o)/10*(o%2?-1:1));e.__curvenessList=i},gI=function(e,t,n){var r=[e.id,e.dataIndex].join(`.`),i=[t.id,t.dataIndex].join(`.`);return[n.uid,r,i].join(pI)},_I=function(e){var t=e.split(pI);return[t[0],t[2],t[1]].join(pI)},vI=function(e,t){var n=gI(e.node1,e.node2,t);return t.__edgeMap[n]},yI=function(e,t){return bI(gI(e.node1,e.node2,t),t)+bI(gI(e.node2,e.node1,t),t)},bI=function(e,t){var n=t.__edgeMap;return n[e]?n[e].length:0};function xI(e){mI(e)&&(e.__curvenessList=[],e.__edgeMap={},hI(e))}function SI(e,t,n,r){if(mI(n)){var i=gI(e,t,n),a=n.__edgeMap,o=a[_I(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 CI(e,t,n,r){var i=mI(t),a=W(i);if(!i)return null;var o=vI(e,t);if(!o)return null;for(var s=-1,c=0;c<o.length;c++)if(o[c]===n){s=c;break}var l=yI(e,t);hI(t,l),e.lineStyle=e.lineStyle||{};var u=gI(e.node1,e.node2,t),d=t.__curvenessList,f=a||l%2?0:1;if(o.isForward)return d[f+s];var p=bI(_I(u),t),m=d[s+p+f];return r?a?i&&i[0]===0?(p+f)%2?m:-m:((p%2?0:1)+f)%2?m:-m:(p+f)%2?m:-m:d[s+p+f]}function wI(e){return e}var TI=`view`,EI=function(e){z(t,e);function t(t,n,r){var i=e.call(this)||this;i.type=TI,i.dimensions=[`x`,`y`];var a=wI(i);a.invertY=t,a.lgCt=n,a.lgGeo=r;var o=a.trans=[];return o[0]=Sm(),o[1]=Sm(),o[2]=Sm(),a.mtRaw=wf(),a.mtRawInv=wf(),a.mtOverall=wf(),a.mtOverallInv=wf(),a.zoom=1,i}return t.prototype.getBoundingRect=function(){return kI(null,this)},t.prototype.getViewRect=function(){return AI(null,this)},t.prototype.getRoamTransform=function(){return xm(wI(this).trans[1])},t.prototype.dataToPoint=function(e,t,n){var r=t?wI(this).mtRaw:wI(this).mtOverall;return n||=[],r?np(n,e,r):Ff(n,e)},t.prototype.pointToData=function(e,t,n){n||=[];var r=wI(this).mtOverallInv;return r?np(n,e,r):Ff(n,e)},t.prototype.convertToPixel=function(e,t,n){var r=XI(t);return r===this?r.dataToPoint(n):null},t.prototype.convertFromPixel=function(e,t,n){var r=XI(t);return r===this?r.pointToData(n):null},t.prototype.containPoint=function(e){var t=wI(this);return xp(DI,t.dataRect),Cp(DI,DI,t.mtOverall),wp(DI,e[0],e[1])},t.dimensions=[`x`,`y`],t}(bm),DI=yp();function OI(e,t){return Ef(e||[],wI(t).mtOverall)}function kI(e,t){return xp(e||yp(),wI(t).dataRect)}function AI(e,t){return xp(e||yp(),wI(t).viewRect)}function jI(e,t,n){return wm(e||Sm(),wI(t).trans[n])}function MI(e){return!!(e.dataRect&&e.viewRect)}function NI(e,t,n,r){r===1?qI(e,t.trans[0],n):wm(e,n)}function PI(e,t,n){xm(n,FI),Df(FI,FI,t.mtRawInv),aw(e,FI)}var FI=wf();function II(e,t){var n=wI(e);n.centerOption=t.getShallow(`center`);var r=n.zoomLimit=t.getShallow(`scaleLimit`);n.zoom=gL(t.getShallow(`zoom`)||1,r)||1,MI(n)&&zI(n)}function LI(e,t,n,r,i){var a=wI(e);a.dataRect=new Z(t,n,r,i),MI(a)&&zI(a)}function RI(e,t,n,r,i){var a=wI(e);a.viewRect=new Z(t,n,r,i),MI(a)&&zI(a)}function zI(e){BI(e),UI(e),GI(e)}function BI(e){var t=e.dataRect,n=e.viewRect,r=e.trans[0],i=e.invertY;i&&(t=xp(HI,t),t.y=-t.y-t.height),Sp(VI,t,n),aw(r,VI),i&&(r.scaleY=-r.scaleY);var a=xm(r,e.mtRaw);jf(e.mtRawInv,a)}var VI=wf(),HI=yp();function UI(e){var t=ZI(e),n=lL(WI,e,e.centerOption)?np(WI,WI,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}var WI=[];function GI(e){var t=e.trans,n=t[1],r=t[0],i=t[2];qI(i,r,n);var a=xm(i,e.mtOverall),o=jf(e.mtOverallInv,a);KI(e,i,a,o),KI(e.lgGeo,i,a,o)}function KI(e,t,n,r){e&&(wm(e,t),Ef(e.transform||=[],n),Ef(e.invTransform||=[],r))}function qI(e,t,n){xm(t,JI),xm(n,YI),Df(YI,YI,JI),aw(e,YI)}var JI=wf(),YI=wf();function XI(e){var t=e.seriesModel;return t?t.coordinateSystem:null}function ZI(e){var t=e.viewRect;return QI[0]=t.x+t.width/2,QI[1]=t.y+t.height/2,QI}var QI=[];function $I(e){return e&&e.type===`view`}function eL(e,t,n,r){var i=wI(n);i.syncBackEl=e,i.syncBackType=t,r?sC(e,jI(null,n,t),r):(jI(e,n,t),e.dirty())}function tL(e,t,n,r){var i=wI(e),a=i.syncBackEl;a?(a.stopAnimation(),NI(nL,i,a,i.syncBackType)):wm(nL,i.trans[2]),PI(rL,i,nL),r?sL(nL,rL,i,r):wm(nL,rL),PI(nL,i,nL),pL(i,t,n,nL)}var nL=Sm(),rL=Sm();function iL(e,t,n){var r=aL(t);r&&(tL(r,t,n,e),II(r,t))}function aL(e){return e.__ownRoamView?e.__ownRoamView():null}function oL(e,t,n,r){n.setUpdatePayload(iw(e));var i=Db(r,t);i&&i.__updateOnOwnRoam&&i.__updateOnOwnRoam(e,t,r)}function sL(e,t,n,r){r.dx!=null&&r.dy!=null&&(e.x+=r.dx,e.y+=r.dy);var i=r.zoom;if(i!=null){var a=cL(t),o=gL(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 cL(e){return e.scaleX}function lL(e,t,n){var r=t.dataRect;if(!n)return!1;var i=t.lgCt;return i?Lf(e,Mv(n[0],i.w),Mv(n[1],i.h)):r&&Lf(e,Mv(n[0],r.width,r.x),Mv(n[1],r.height,r.y)),!0}function uL(e,t){var n=e.centerOption,r=e.dataRect;return!n||e.lgCt?t.slice():[dL(0,t,n,r),dL(1,t,n,r)]}function dL(e,t,n,r){return n&&r&&r[_C[e]]&&Fv(n[e])?(t[e]-r[gC[e]])/r[_C[e]]*100+`%`:t[e]}function fL(e,t){return t&&e&&e.getShallow(`legacyViewCoordSysCenterBase`)?{w:t.getWidth(),h:t.getHeight()}:null}function pL(e,t,n,r){var i=ZI(e),a=cL(r),o=Sv(a)>1e-6;mL[0]=o?(i[0]-r.x)/a:i[0],mL[1]=o?(i[1]-r.y)/a:i[1],np(mL,mL,e.mtRawInv);var s=uL(e,mL);hL(t,s,a),H(n,function(e){e!==t&&hL(e,s.slice(),a)})}var mL=[];function hL(e,t,n){var r=e.option;r.center=t,r.zoom=n}function gL(e,t){if(t){var n=t.min||0,r=t.max||1/0;e=Math.max(Math.min(r,e),n)}return e}function _L(e,t){var n=t.getShallow(`nodeScaleRatio`,!0)||1,r=wI(e);return((r.zoom-1)*n+1)/(r.trans[2].scaleX||1)}var vL=`graph`,yL=function(e){z(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return t.prototype.init=function(t){e.prototype.init.apply(this,arguments);var n=this;function r(){return n._categoriesData}this.legendVisualProvider=new fI(r,r),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},t.prototype.mergeOption=function(t){e.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},t.prototype.mergeDefaultAndTheme=function(t){e.prototype.mergeDefaultAndTheme.apply(this,arguments),yy(t,`edgeLabel`,[`show`])},t.prototype.getInitialData=function(e,t){var n=e.edges||e.links||[],r=e.data||e.nodes||[],i=this;if(r&&n){xI(this);var a=dI(r,n,this,!0,o);return H(a.edges,function(e){SI(e.node1,e.node2,this,e.dataIndex)},this),a.data}function o(e,t){e.wrapMethod(`getItemModel`,function(e){var t=i._categoriesModels[e.getShallow(`category`)];return t&&(t.parentModel=e.parentModel,e.parentModel=t),e});var n=Fw.prototype.getModel;function r(e,t){var 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`)){var t=e.slice();return e[0]===`label`?t[0]=`edgeLabel`:e[1]===`label`&&(t[1]=`edgeLabel`),t}return e}}},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.getCategoriesData=function(){return this._categoriesData},t.prototype.formatTooltip=function(e,t,n){if(n===`edge`){var r=this.getData(),i=this.getDataParams(e,n),a=r.graph.getEdgeByIndex(e),o=r.getName(a.node1.dataIndex),s=r.getName(a.node2.dataIndex),c=[];return o!=null&&c.push(o),s!=null&&c.push(s),uk(`nameValue`,{name:c.join(` > `),value:i.value,noValue:i.value==null})}return Ek({series:this,dataIndex:e,multipleSeries:t})},t.prototype._updateCategoriesData=function(){var e=U(this.option.categories||[],function(e){return e.value==null?V({value:0},e):e}),t=new dE([`value`],this);t.initData(e),this._categoriesData=t,this._categoriesModels=t.mapArray(function(e){return t.getItemModel(e)})},t.prototype.isAnimationEnabled=function(){return e.prototype.isAnimationEnabled.call(this)&&!(this.get(`layout`)===`force`&&this.get([`force`,`layoutAnimation`]))},t.prototype.__ownRoamView=function(){var e=this.coordinateSystem;return $I(e)&&e},t.type=`series.`+vL,t.dependencies=[`grid`,`polar`,`geo`,`singleAxis`,`calendar`],t.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}}},t}(Ak);function bL(e){return e instanceof Array||(e=[e,e]),e}var xL=db(vL,SL);function SL(e){e.eachSeriesByType(vL,function(e){var t=e.getGraph(),n=e.getEdgeData(),r=bL(e.get(`edgeSymbol`)),i=bL(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){var r=n.getItemModel(e),i=t.getEdgeByIndex(e),a=bL(r.getShallow(`symbol`,!0)),o=bL(r.getShallow(`symbolSize`,!0)),s=r.getModel(`lineStyle`).getLineStyle(),c=n.ensureUniqueItemVisual(e,`style`);switch(V(c,s),c.stroke){case`source`:var l=i.node1.getVisual(`style`);c.stroke=l&&l.fill;break;case`target`:var l=i.node2.getVisual(`style`);c.stroke=l&&l.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 CL(e){var t=e.coordinateSystem;if(!(t&&t.type!==`view`)){var n=e.getGraph();n.eachNode(function(e){var t=e.getModel();e.setLayout([+t.get(`x`),+t.get(`y`)])}),wL(n,e)}}function wL(e,t){e.eachEdge(function(e,n){var r=Ad(e.getModel().get([`lineStyle`,`curveness`]),-CI(e,t,n,!0),0),i=If(e.node1.getLayout()),a=If(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)})}var TL=db(vL,EL);function EL(e,t){e.eachSeriesByType(vL,function(e){var t=e.get(`layout`),n=e.coordinateSystem;if(n&&n.type!==`view`){var r=e.getData(),i=[];H(n.dimensions,function(e){i=i.concat(r.mapDimensionsAll(e))});for(var a=0;a<r.count();a++){for(var o=[],s=!1,c=0;c<i.length;c++){var l=r.get(i[c],a);isNaN(l)||(s=!0),o.push(l)}s?r.setItemLayout(a,n.dataToPoint(o)):r.setItemLayout(a,[NaN,NaN])}wL(r.graph,e)}else(!t||t===`none`)&&CL(e)})}function DL(e){var t=e.coordinateSystem;return $I(t)?_L(t,e):1}function OL(e){var t=e.getVisual(`symbolSize`);return t instanceof Array&&(t=(t[0]+t[1])/2),+t}var kL=Math.PI,AL=[];function jL(e,t,n,r){var i=e.coordinateSystem;if(!(i&&i.type!==`view`)){var 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){var f=i.pointToData(r),p=f[0],m=f[1],h=[p-c,m-l];Yf(h,h),Jf(h,h,u),n.setLayout([c+h[0],l+h[1]],!0),NL(n,e.get([`circular`,`rotateLabel`]),c,l)}ML[t](e,s,o,u,c,l,d),s.eachEdge(function(t,n){var r=Ad(t.getModel().get([`lineStyle`,`curveness`]),CI(t,e,n),0),i=If(t.node1.getLayout()),a=If(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])})}}}var ML={value:function(e,t,n,r,i,a,o){var s=0,c=n.getSum(`value`),l=Math.PI*2/(c||o);t.eachNode(function(e){var 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:function(e,t,n,r,i,a,o){var s=0;AL.length=o;var c=DL(e);t.eachNode(function(e){var t=OL(e);isNaN(t)&&(t=2),t<0&&(t=0),t*=c;var n=Math.asin(t/2/r);isNaN(n)&&(n=kL/2),AL[e.dataIndex]=n,s+=n*2});var l=(2*kL-s)/o/2,u=0;t.eachNode(function(e){var t=l+AL[e.dataIndex];u+=t,(!e.getLayout()||!e.getLayout().fixed)&&e.setLayout([r*Math.cos(u)+i,r*Math.sin(u)+a]),u+=t})}};function NL(e,t,n,r){var i=e.getGraphicEl();if(i){var a=e.getModel().get([`label`,`rotate`])||0,o=i.getSymbolPath();if(t){var s=e.getLayout(),c=Math.atan2(s[1]-r,s[0]-n);c<0&&(c=Math.PI*2+c);var l=s[0]<n;l&&(c-=Math.PI);var u=l?`left`:`right`;o.setTextConfig({rotation:-c,position:u,origin:`center`});var d=o.ensureState(`emphasis`);V(d.textConfig||={},{position:u})}else o.setTextConfig({rotation:a*=Math.PI/180})}}var PL=db(vL,FL);function FL(e){e.eachSeriesByType(`graph`,function(e){e.get(`layout`)===`circular`&&jL(e,`symbolSize`)})}var IL=zf;function LL(e,t,n){for(var 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,u=0;u<r.length;u++){var d=r[u];d.p||=Pf(o*(Math.random()-.5)+c[0],s*(Math.random()-.5)+c[1]),d.pp=If(d.p),d.edges=null}var f=n.friction==null?.6:n.friction,p=f,m,h;return{warmUp:function(){p=f*.8},setFixed:function(e){r[e].fixed=!0},setUnfixed:function(e){r[e].fixed=!1},beforeStep:function(e){m=e},afterStep:function(e){h=e},step:function(e){m&&m(r,i);for(var t=[],n=r.length,a=0;a<i.length;a++){var o=i[a];if(!o.ignoreForceLayout){var s=o.n1,u=o.n2;Bf(t,u.p,s.p);var d=Vf(t)-o.d,f=u.w/(s.w+u.w);isNaN(f)&&(f=0),Yf(t,t),!s.fixed&&IL(s.p,s.p,t,f*d*p),!u.fixed&&IL(u.p,u.p,t,-(1-f)*d*p)}}for(var a=0;a<n;a++){var g=r[a];g.fixed||(Bf(t,c,g.p),IL(g.p,g.p,t,l*p))}for(var a=0;a<n;a++)for(var s=r[a],_=a+1;_<n;_++){var u=r[_];Bf(t,u.p,s.p);var d=Vf(t);d===0&&(Lf(t,Math.random()-.5,Math.random()-.5),d=1);var v=(s.rep+u.rep)/d/d;!s.fixed&&IL(s.pp,s.pp,t,v),!u.fixed&&IL(u.pp,u.pp,t,-v)}for(var y=[],a=0;a<n;a++){var g=r[a];g.fixed||(Bf(y,g.p,g.pp),IL(g.p,g.p,y,p),Ff(g.pp,g.p))}p*=.992;var b=p<.01;h&&h(r,i,b),e&&e(b)}}}var RL=db(vL,zL);function zL(e){e.eachSeriesByType(vL,function(e){var t=e.coordinateSystem;if(!(t&&t.type!==`view`))if(e.get(`layout`)===`force`){var 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){var t=i.getId(e);i.setItemLayout(e,n[t]||[NaN,NaN])}):!s||s===`none`?CL(e):s===`circular`&&jL(e,`value`);var c=i.getDataExtent(`value`),l=a.getDataExtent(`value`),u=o.get(`repulsion`),d=o.get(`edgeLength`),f=W(u)?u:[u,u],p=W(d)?d:[d,d];p=[p[1],p[0]];var m=i.mapArray(`value`,function(e,t){var n=i.getItemLayout(t),r=jv(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=LL(m,a.mapArray(`value`,function(t,n){var i=r.getEdgeByIndex(n),a=jv(t,l,p);isNaN(a)&&(a=(p[0]+p[1])/2);var o=i.getModel(),s=Ad(i.getModel().get([`lineStyle`,`curveness`]),-CI(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(var n=0,i=e.length;n<i;n++)e[n].fixed&&Ff(e[n].p,r.getNodeByIndex(n).getLayout())}),h.afterStep(function(e,t,a){for(var o=0,s=e.length;o<s;o++)e[o].fixed||r.getNodeByIndex(o).setLayout(e[o].p),n[i.getId(o)]=e[o].p;for(var o=0,s=t.length;o<s;o++){var c=t[o],l=r.getEdgeByIndex(o),u=c.n1.p,d=c.n2.p,f=l.getLayout();f=f?f.slice():[],f[0]=f[0]||[],f[1]=f[1]||[],Ff(f[0],u),Ff(f[1],d),+c.curveness&&(f[2]=[(u[0]+d[0])/2-(u[1]-d[1])*c.curveness,(u[1]+d[1])/2-(d[0]-u[0])*c.curveness]),l.setLayout(f)}}),e.forceLayout=h,e.preservedPoints=n,h.step()}else e.forceLayout=null})}function BL(e,t,n,r,i,a,o,s){if(!aL(e)){n.disable();return}n.enable(J(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){var r=e.mainType,i=iw(sd({type:HL(r,e.subType,wb)},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})})}new Z(0,0,0,0);function VL(e,t,n){var r=HL(t,n,wb);e.registerAction({type:r,event:r,update:`none`},function(e,r,i){r.eachComponent(Wy(e,t,n),function(t){iL(e,t),oL(e,t,r,i)})})}function HL(e,t,n){return(e===`series`?t===`map`?`geo`:t:e)+n}function UL(e){return e.zoom!=null}function WL(e,t,n,r,i,a,o){var s=new EI(null,fL(e.ecModel,t));return LI(s,n,r,i,a),o?RI(s,o.x,o.y,o.width,o.height):RI(s,n,r,i,a),II(s,e),s}function GL(e,t,n){var r=CO(e,t);return xO(e,bO(V(e.getBoxLayoutParams(),{aspect:n}),r.refContainer),n)}function KL(e,t){var n=[];return e.eachSeriesByType(`graph`,function(e){CE({targetModel:e,coordSysType:`view`,coordSysProvider:r,isDefaultDataCoordSys:!0});function r(){var r=e.getData(),i=r.mapArray(function(e){var t=r.getItemModel(e);return[+t.get(`x`),+t.get(`y`)]}),a=[],o=[];Hg(i,a,o),o[0]-a[0]===0&&(o[0]+=1,--a[0]),o[1]-a[1]===0&&(o[1]+=1,--a[1]);var s=(o[0]-a[0])/(o[1]-a[1]),c=GL(e,t,s);isNaN(s)&&(a=[c.x,c.y],o=[c.x+c.width,c.y+c.height]);var l=o[0]-a[0],u=o[1]-a[1],d=WL(e,t,a[0],a[1],l,u,c);return n.push(d),d}}),n}var qL=IS.prototype,JL=BS.prototype,YL=function(){function e(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return e}();(function(e){z(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t})(YL);function XL(e){return isNaN(+e.cpx1)||isNaN(+e.cpy1)}var ZL=function(e){z(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`ec-line`,n}return t.prototype.getDefaultStyle=function(){return{stroke:Q.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new YL},t.prototype.buildPath=function(e,t){XL(t)?qL.buildPath.call(this,e,t):JL.buildPath.call(this,e,t)},t.prototype.pointAt=function(e){return XL(this.shape)?qL.pointAt.call(this,e):JL.pointAt.call(this,e)},t.prototype.tangentAt=function(e){var t=this.shape,n=XL(t)?[t.x2-t.x1,t.y2-t.y1]:JL.tangentAt.call(this,e);return Yf(n,n)},t}(R_),QL=[`fromSymbol`,`toSymbol`];function $L(e){return`_`+e+`Type`}function eR(e,t,n){var r=t.getItemVisual(n,e);if(!r||r===`none`)return r;var 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=Kk(i),l=qk(o||0,c);return r+c+l+(a||``)+(s||``)}function tR(e,t,n){var r=t.getItemVisual(n,e);if(!(!r||r===`none`)){var 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=Kk(i),l=qk(o||0,c),u=Gk(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 nR(e){var t=new ZL({name:`line`,subPixelOptimize:!0});return rR(t.shape,e),t}function rR(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;var n=t[2];n?(e.cpx1=n[0],e.cpy1=n[1]):(e.cpx1=NaN,e.cpy1=NaN)}var iR=function(e){z(t,e);function t(t,n,r){var i=e.call(this)||this;return i._createLine(t,n,r),i}return t.prototype._createLine=function(e,t,n){var r=e.hostModel,i=e.getItemLayout(t),a=e.getItemVisual(t,`z2`),o=nR(i);o.shape.percent=0,cC(o,{z2:J(a,0),shape:{percent:1}},r,t),this.add(o),H(QL,function(n){var r=tR(n,e,t);this.add(r),this[$L(n)]=eR(n,e,t)},this),this._updateCommonStl(e,t,n)},t.prototype.updateData=function(e,t,n){var r=e.hostModel,i=this.childOfName(`line`),a=e.getItemLayout(t),o={shape:{}};rR(o.shape,a),sC(i,o,r,t),H(QL,function(n){var r=eR(n,e,t),i=$L(n);if(this[i]!==r){this.remove(this.childOfName(n));var a=tR(n,e,t);this.add(a)}this[i]=r},this),this._updateCommonStl(e,t,n)},t.prototype.getLinePath=function(){return this.childAt(0)},t.prototype._updateCommonStl=function(e,t,n){var 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){var f=e.getItemModel(t),p=f.getModel(`emphasis`);a=p.getModel(`lineStyle`).getLineStyle(),o=f.getModel([`blur`,`lineStyle`]).getLineStyle(),s=f.getModel([`select`,`lineStyle`]).getLineStyle(),l=p.get(`disabled`),u=p.get(`focus`),d=p.get(`blurScope`),c=fw(f)}var m=e.getItemVisual(t,`style`),h=m.stroke;i.useStyle(m),i.style.fill=null,i.style.strokeNoScale=!0,i.ensureState(`emphasis`).style=a,i.ensureState(`blur`).style=o,i.ensureState(`select`).style=s,H(QL,function(e){var t=this.childOfName(e);if(t){t.setColor(h),t.style.opacity=m.opacity;for(var n=0;n<Mb.length;n++){var r=Mb[n],a=i.getState(r);if(a){var o=a.style||{},s=t.ensureState(r),c=s.style||={};o.stroke!=null&&(c[t.__isEmptyBrush?`stroke`:`fill`]=o.stroke),o.opacity!=null&&(c.opacity=o.opacity)}}t.markRedraw()}},this);var g=r.getRawValue(t);dw(this,c,{labelDataIndex:t,labelFetcher:{getFormattedLabel:function(t,n){return r.getFormattedLabel(t,n,e.dataType)}},inheritColor:h||Q.color.neutral99,defaultOpacity:m.opacity,defaultText:(g==null?e.getName(t):isFinite(g)?Lv(g,10):g)+``});var _=this.getTextContent();if(_){var v=c.normal;_.__align=_.style.align,_.__verticalAlign=_.style.verticalAlign,_.__position=v.get(`position`)||`middle`;var y=v.get(`distance`);W(y)||(y=[y,y]),_.__labelDistance=y}this.setTextConfig({position:null,local:!0,inside:!1}),Tx(this,u,d,l)},t.prototype.highlight=function(){ax(this)},t.prototype.downplay=function(){ox(this)},t.prototype.updateLayout=function(e,t){this.childOfName(`line`).stopAnimation(),this.setLinePoints(e.getItemLayout(t))},t.prototype.setLinePoints=function(e){var t=this.childOfName(`line`);rR(t.shape,e),t.dirty()},t.prototype.beforeUpdate=function(){var e=this,t=e.childOfName(`fromSymbol`),n=e.childOfName(`toSymbol`),r=e.getTextContent();if(!t&&!n&&(!r||r.ignore))return;for(var i=1,a=this.parent;a;)a.scaleX&&(i/=a.scaleX),a=a.parent;var o=e.childOfName(`line`);if(!this.__dirty&&!o.__dirty)return;var s=o.shape.percent,c=o.pointAt(0),l=o.pointAt(s),u=Bf([],l,c);Yf(u,u);function d(e,t){var n=e.__specifiedRotation;if(n==null){var r=o.tangentAt(t);e.attr(`rotation`,(t===1?-1:1)*Math.PI/2-Math.atan2(r[1],r[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;var f=void 0,p=void 0,m=r.__labelDistance,h=m[0]*i,g=m[1]*i,_=s/2,v=o.tangentAt(_),y=[v[1],-v[0]],b=o.pointAt(_);y[1]>0&&(y[0]=-y[0],y[1]=-y[1]);var x=v[0]<0?-1:1;if(r.__position!==`start`&&r.__position!==`end`){var S=-Math.atan2(v[1],v[0]);l[0]<c[0]&&(S=Math.PI+S),r.rotation=S}var C=void 0;switch(r.__position){case`insideStartTop`:case`insideMiddleTop`:case`insideEndTop`:case`middle`:C=-g,p=`bottom`;break;case`insideStartBottom`:case`insideMiddleBottom`:case`insideEndBottom`:C=g,p=`top`;break;default:C=0,p=`middle`}switch(r.__position){case`end`:r.x=u[0]*h+l[0],r.y=u[1]*g+l[1],f=u[0]>.8?`left`:u[0]<-.8?`right`:`center`,p=u[1]>.8?`top`:u[1]<-.8?`bottom`:`middle`;break;case`start`:r.x=-u[0]*h+c[0],r.y=-u[1]*g+c[1],f=u[0]>.8?`right`:u[0]<-.8?`left`:`center`,p=u[1]>.8?`bottom`:u[1]<-.8?`top`:`middle`;break;case`insideStartTop`:case`insideStart`:case`insideStartBottom`:r.x=h*x+c[0],r.y=c[1]+C,f=v[0]<0?`right`:`left`,r.originX=-h*x,r.originY=-C;break;case`insideMiddleTop`:case`insideMiddle`:case`insideMiddleBottom`:case`middle`:r.x=b[0],r.y=b[1]+C,f=`center`,r.originY=-C;break;case`insideEndTop`:case`insideEnd`:case`insideEndBottom`:r.x=-h*x+l[0],r.y=l[1]+C,f=v[0]>=0?`right`:`left`,r.originX=h*x,r.originY=-C;break}r.scaleX=r.scaleY=i,r.setStyle({verticalAlign:r.__verticalAlign||p,align:r.__align||f})}},t}(iS),aR=function(){function e(e){this.group=new iS,this._LineCtor=e||iR}return e.prototype.updateData=function(e){var t=this;this._progressiveEls=null;var n=this,r=n.group,i=n._lineData;n._lineData=e,i||r.removeAll();var a=sR(e);e.diff(i).add(function(n){t._doAdd(e,n,a)}).update(function(n,r){t._doUpdate(i,e,r,n,a)}).remove(function(e){r.remove(i.getItemGraphicEl(e))}).execute()},e.prototype.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl(function(t,n){t.updateLayout(e,n)},this)},e.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=sR(e),this._lineData=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(e,t,n){this._progressiveEls=[];function r(e){!e.isGroup&&!oR(e)&&(e.incremental=n,e.ensureState(`emphasis`).hoverLayer=2)}for(var i=e.start;i<e.end;i++)if(lR(t.getItemLayout(i))){var a=new this._LineCtor(t,i,this._seriesScope);a.traverse(r),this.group.add(a),t.setItemGraphicEl(i,a),this._progressiveEls.push(a)}},e.prototype.remove=function(){this.group.removeAll()},e.prototype.eachRendered=function(e){YC(this._progressiveEls||this.group,e)},e.prototype._doAdd=function(e,t,n){if(lR(e.getItemLayout(t))){var r=new this._LineCtor(e,t,n);e.setItemGraphicEl(t,r),this.group.add(r)}},e.prototype._doUpdate=function(e,t,n,r,i){var a=e.getItemGraphicEl(n);if(!lR(t.getItemLayout(r))){this.group.remove(a);return}a?a.updateData(t,r,i):a=new this._LineCtor(t,r,i),t.setItemGraphicEl(r,a),this.group.add(a)},e}();function oR(e){return e.animators&&e.animators.length>0}function sR(e){var 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:fw(t)}}function cR(e){return isNaN(e[0])||isNaN(e[1])}function lR(e){return e&&!cR(e[0])&&!cR(e[1])}var uR=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,dR=[],fR=X.browser.firefox&&+X.browser.version.split(`.`)[0]<39;function pR(e,t,n,r){return n||={},r?mR(e,t,n):fR&&t.layerX!=null&&t.layerX!==t.offsetX?(n.zrX=t.layerX,n.zrY=t.layerY):t.offsetX==null?mR(e,t,n):(n.zrX=t.offsetX,n.zrY=t.offsetY),n}function mR(e,t,n){if(X.domSupported&&e.getBoundingClientRect){var r=t.clientX,i=t.clientY;if(QE(e)){var a=e.getBoundingClientRect();n.zrX=r-a.left,n.zrY=i-a.top;return}else if(YE(dR,e,r,i)){n.zrX=dR[0],n.zrY=dR[1];return}}n.zrX=n.zrY=0}function hR(e){return e||window.event}function gR(e,t,n){if(t=hR(t),t.zrX!=null)return t;var r=t.type;if(r&&r.indexOf(`touch`)>=0){var i=r===`touchend`?t.changedTouches[0]:t.targetTouches[0];i&&pR(e,i,t,n)}else{pR(e,t,t,n);var a=_R(t);t.zrDelta=a?a/120:-(t.detail||0)/3}var o=t.button;return t.which==null&&o!==void 0&&uR.test(t.type)&&(t.which=o&1?1:o&2?3:o&4?2:0),t}function _R(e){var t=e.wheelDelta;if(t)return t;var n=e.deltaX,r=e.deltaY;if(n==null||r==null)return t;var i=Math.abs(r===0?n:r),a=r>0?-1:r<0?1:n>0?-1:1;return 3*i*a}function vR(e,t,n,r){e.addEventListener(t,n,r)}function yR(e,t,n,r){e.removeEventListener(t,n,r)}var bR=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0};function xR(e){return e.which===2||e.which===3}var SR=function(){function e(e,t){this.target=e,this.topTarget=t&&t.topTarget}return e}(),CR=function(){function e(e){this.handler=e,e.on(`mousedown`,this._dragStart,this),e.on(`mousemove`,this._drag,this),e.on(`mouseup`,this._dragEnd,this)}return e.prototype._dragStart=function(e){for(var t=e.target;t&&!t.draggable;)t=t.parent||t.__hostTarget;t&&(this._draggingTarget=t,t.dragging=!0,this._x=e.offsetX,this._y=e.offsetY,this.handler.dispatchToElement(new SR(t,e),`dragstart`,e.event))},e.prototype._drag=function(e){var t=this._draggingTarget;if(t){var n=e.offsetX,r=e.offsetY,i=n-this._x,a=r-this._y;this._x=n,this._y=r,t.drift(i,a,e),this.handler.dispatchToElement(new SR(t,e),`drag`,e.event);var o=this.handler.findHover(n,r,t).target,s=this._dropTarget;this._dropTarget=o,t!==o&&(s&&o!==s&&this.handler.dispatchToElement(new SR(s,e),`dragleave`,e.event),o&&o!==s&&this.handler.dispatchToElement(new SR(o,e),`dragenter`,e.event))}},e.prototype._dragEnd=function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.handler.dispatchToElement(new SR(t,e),`dragend`,e.event),this._dropTarget&&this.handler.dispatchToElement(new SR(this._dropTarget,e),`drop`,e.event),this._draggingTarget=null,this._dropTarget=null},e}(),wR=function(){function e(){this._track=[]}return e.prototype.recognize=function(e,t,n){return this._doTrack(e,t,n),this._recognize(e)},e.prototype.clear=function(){return this._track.length=0,this},e.prototype._doTrack=function(e,t,n){var r=e.touches;if(r){for(var i={points:[],touches:[],target:t,event:e},a=0,o=r.length;a<o;a++){var s=r[a],c=pR(n,s,{});i.points.push([c.zrX,c.zrY]),i.touches.push(s)}this._track.push(i)}},e.prototype._recognize=function(e){for(var t in DR)if(DR.hasOwnProperty(t)){var n=DR[t](this._track,e);if(n)return n}},e}();function TR(e){var t=e[1][0]-e[0][0],n=e[1][1]-e[0][1];return Math.sqrt(t*t+n*n)}function ER(e){return[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]}var DR={pinch:function(e,t){var n=e.length;if(n){var r=(e[n-1]||{}).points,i=(e[n-2]||{}).points||r;if(i&&i.length>1&&r&&r.length>1){var a=TR(r)/TR(i);!isFinite(a)&&(a=1),t.pinchScale=a;var o=ER(r);return t.pinchX=o[0],t.pinchY=o[1],{type:`pinch`,target:e[0].target,event:t}}}}},OR=`silent`;function kR(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:AR}}function AR(){bR(this.event)}var jR=function(e){z(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.handler=null,t}return t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t}(tg),MR=function(){function e(e,t){this.x=e,this.y=t}return e}(),NR=[`click`,`dblclick`,`mousewheel`,`mouseout`,`mouseup`,`mousedown`,`mousemove`,`contextmenu`],PR=new Z(0,0,0,0),FR=function(e){z(t,e);function t(t,n,r,i,a){var o=e.call(this)||this;return o._hovered=new MR(0,0),o.storage=t,o.painter=n,o.painterRoot=i,o._pointerSize=a,r||=new jR,o.proxy=null,o.setHandlerProxy(r),o._draggingMgr=new CR(o),o}return t.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(H(NR,function(t){e.on&&e.on(t,this[t],this)},this),e.handler=this),this.proxy=e},t.prototype.mousemove=function(e){var t=e.zrX,n=e.zrY,r=RR(this,t,n),i=this._hovered,a=i.target;a&&!a.__zr&&(i=this.findHover(i.x,i.y),a=i.target);var o=this._hovered=r?new MR(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)},t.prototype.mouseout=function(e){var t=e.zrEventControl;t!==`only_globalout`&&this.dispatchToElement(this._hovered,`mouseout`,e),t!==`no_globalout`&&this.trigger(`globalout`,{type:`globalout`,event:e})},t.prototype.resize=function(){this._hovered=new MR(0,0)},t.prototype.dispatch=function(e,t){var n=this[e];n&&n.call(this,t)},t.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},t.prototype.setCursorStyle=function(e){var t=this.proxy;t.setCursor&&t.setCursor(e)},t.prototype.dispatchToElement=function(e,t,n){e||={};var r=e.target;if(!(r&&r.silent)){for(var i=`on`+t,a=kR(t,e,n);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)}))}},t.prototype.findHover=function(e,t,n){var r=this.storage.getDisplayList(),i=new MR(e,t);if(LR(r,i,e,t,n),this._pointerSize&&!i.target){for(var a=[],o=this._pointerSize,s=o/2,c=new Z(e-s,t-s,o,o),l=r.length-1;l>=0;l--){var u=r[l];u!==n&&!u.ignore&&!u.ignoreCoarsePointer&&(!u.parent||!u.parent.ignoreCoarsePointer)&&(PR.copy(u.getBoundingRect()),u.transform&&PR.applyTransform(u.transform),PR.intersect(c)&&a.push(u))}if(a.length){for(var d=4,f=Math.PI/12,p=Math.PI*2,m=0;m<s;m+=d)for(var h=0;h<p;h+=f)if(LR(a,i,e+m*Math.cos(h),t+m*Math.sin(h),n),i.target)return i}}return i},t.prototype.processGesture=function(e,t){this._gestureMgr||=new wR;var n=this._gestureMgr;t===`start`&&n.clear();var r=n.recognize(e,this.findHover(e.zrX,e.zrY,null).target,this.proxy.dom);if(t===`end`&&n.clear(),r){var i=r.type;e.gestureEvent=i;var a=new MR;a.target=r.target,this.dispatchToElement(a,i,r.event)}},t}(tg);H([`click`,`mousedown`,`mouseup`,`mousewheel`,`dblclick`,`contextmenu`],function(e){FR.prototype[e]=function(t){var n=t.zrX,r=t.zrY,i=RR(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||Zf(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(a,e,t)}});function IR(e,t,n){if(e[e.rectHover?`rectContain`:`contain`](t,n)){for(var r=e,i=void 0,a=!1;r;){if(r.ignoreClip&&(a=!0),!a){var o=r.getClipPath();if(o&&!o.contain(t,n))return!1}r.silent&&(i=!0);var s=r.__hostTarget;r=s?r.ignoreHostSilent?null:s:r.parent}return i?OR:!0}return!1}function LR(e,t,n,r,i){for(var a=e.length-1;a>=0;a--){var o=e[a],s=void 0;if(o!==i&&!o.ignore&&(s=IR(o,n,r))&&(!t.topTarget&&(t.topTarget=o),s!==OR)){t.target=o;break}}}function RR(e,t,n){var r=e.painter;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}var zR=32,BR=7;function VR(e){for(var t=0;e>=zR;)t|=e&1,e>>=1;return e+t}function HR(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++;UR(e,t,i)}else for(;i<n&&r(e[i],e[i-1])>=0;)i++;return i-t}function UR(e,t,n){for(n--;t<n;){var r=e[t];e[t++]=e[n],e[n--]=r}}function WR(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 GR(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 KR(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 qR(e,t){var n=BR,r,i,a=0,o=[];r=[],i=[];function s(e,t){r[a]=e,i[a]=t,a+=1}function c(){for(;a>1;){var e=a-2;if(e>=1&&i[e-1]<=i[e]+i[e+1]||e>=2&&i[e-2]<=i[e]+i[e-1])i[e-1]<i[e+1]&&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=KR(e[c],e,o,s,0,t);o+=u,s-=u,s!==0&&(l=GR(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];return}if(i===1){for(c=0;c<s;c++)e[d+c]=e[u+c];e[d+s]=o[l];return}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=KR(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=GR(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>=BR||m>=BR);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];return}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];return}for(var m=n;;){var h=0,g=0,_=!1;do if(t(o[u],e[l])<0){if(e[d--]=e[l--],h++,g=0,--i===0){_=!0;break}}else if(e[d--]=o[u--],g++,h=0,--s===1){_=!0;break}while((h|g)<m);if(_)break;do{if(h=i-KR(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-GR(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>=BR||g>=BR);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 JR(e,t,n,r){n||=0,r||=e.length;var i=r-n;if(!(i<2)){var a=0;if(i<zR){a=HR(e,n,r,t),WR(e,n,r,n+a,t);return}var o=qR(e,t),s=VR(i);do{if(a=HR(e,n,r,t),a<s){var c=i;c>s&&(c=s),WR(e,n,n+c,n+a,t),a=c}o.pushRun(n,a),o.mergeRuns(),i-=a,n+=a}while(i!==0);o.forceMergeRuns()}}var YR=!1;function XR(){YR||(YR=!0,console.warn(`z / z2 / zlevel of displayable is invalid, which may cause unexpected errors`))}function ZR(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var QR=function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=ZR}return e.prototype.traverse=function(e,t){for(var n=0;n<this._roots.length;n++)this._roots[n].traverse(e,t)},e.prototype.getDisplayList=function(e,t){t||=!1;var n=this._displayList;return(e||!n.length)&&this.updateDisplayList(t),n},e.prototype.updateDisplayList=function(e){this._displayListLen=0;for(var t=this._roots,n=this._displayList,r=0,i=t.length;r<i;r++)this._updateAndAddDisplayable(t[r],null,e);n.length=this._displayListLen,JR(n,ZR)},e.prototype._updateAndAddDisplayable=function(e,t,n){if(!(e.ignore&&!n)){e.beforeUpdate(),e.update(),e.afterUpdate();var r=e.getClipPath(),i=t&&t.length,a=0,o=e.__clipPaths;if(!e.ignoreClip&&(i||r)){if(o||=e.__clipPaths=[],i)for(var s=0;s<t.length;s++)o[a++]=t[s];for(var c=r,l=e;c;)c.parent=l,c.updateTransform(),o[a++]=c,l=c,c=c.getClipPath()}if(o&&(o.length=a),e.childrenRef){for(var u=e.childrenRef(),d=0;d<u.length;d++){var f=u[d];e.__dirty&&(f.__dirty|=1),this._updateAndAddDisplayable(f,o,n)}e.__dirty=0}else{var p=e;isNaN(p.z)&&(XR(),p.z=0),isNaN(p.z2)&&(XR(),p.z2=0),isNaN(p.zlevel)&&(XR(),p.zlevel=0),this._displayList[this._displayListLen++]=p}var m=e.getDecalElement&&e.getDecalElement();m&&this._updateAndAddDisplayable(m,o,n);var h=e.getTextGuideLine();h&&this._updateAndAddDisplayable(h,o,n);var g=e.getTextContent();g&&this._updateAndAddDisplayable(g,o,n)}},e.prototype.addRoot=function(e){e.__zr&&e.__zr.storage===this||this._roots.push(e)},e.prototype.delRoot=function(e){if(e instanceof Array){for(var t=0,n=e.length;t<n;t++)this.delRoot(e[t]);return}var r=ld(this._roots,e);r>=0&&this._roots.splice(r,1)},e.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},e.prototype.getRoots=function(){return this._roots},e.prototype.dispose=function(){this._displayList=null,this._roots=null},e}(),$R=X.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)};function ez(){return new Date().getTime()}var tz=function(e){z(t,e);function t(t){var n=e.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,t||={},n.stage=t.stage||{},n}return t.prototype.addClip=function(e){e.animation&&this.removeClip(e),this._head?(this._tail.next=e,e.prev=this._tail,e.next=null,this._tail=e):this._head=this._tail=e,e.animation=this},t.prototype.addAnimator=function(e){e.animation=this;var t=e.getClip();t&&this.addClip(t)},t.prototype.removeClip=function(e){if(e.animation){var t=e.prev,n=e.next;t?t.next=n:this._head=n,n?n.prev=t:this._tail=t,e.next=e.prev=e.animation=null}},t.prototype.removeAnimator=function(e){var t=e.getClip();t&&this.removeClip(t),e.animation=null},t.prototype.update=function(e){for(var t=ez()-this._pausedTime,n=t-this._time,r=this._head;r;){var i=r.next;r.step(t,n)?(r.ondestroy(),this.removeClip(r),r=i):r=i}this._time=t,e||(this.trigger(`frame`,n),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0;function t(){e._running&&($R(t),!e._paused&&e.update())}$R(t)},t.prototype.start=function(){this._running||(this._time=ez(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||=(this._pauseStart=ez(),!0)},t.prototype.resume=function(){this._paused&&=(this._pausedTime+=ez()-this._pauseStart,!1)},t.prototype.clear=function(){for(var e=this._head;e;){var t=e.next;e.prev=e.next=e.animation=null,e=t}this._head=this._tail=null},t.prototype.isFinished=function(){return this._head==null},t.prototype.animate=function(e,t){t||={},this.start();var n=new eg(e,t.loop);return this.addAnimator(n),n},t}(tg),nz=300,rz=X.domSupported,iz=(function(){var e=[`click`,`dblclick`,`mousewheel`,`wheel`,`mouseout`,`mouseup`,`mousedown`,`mousemove`,`contextmenu`],t=[`touchstart`,`touchend`,`touchmove`],n={pointerdown:1,pointerup:1,pointermove:1,pointerout:1};return{mouse:e,touch:t,pointer:U(e,function(e){var t=e.replace(`mouse`,`pointer`);return n.hasOwnProperty(t)?t:e})}})(),az={mouse:[`mousemove`,`mouseup`],pointer:[`pointermove`,`pointerup`]},oz=!1;function sz(e){var t=e.pointerType;return t===`pen`||t===`touch`}function cz(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 lz(e){e&&(e.zrByTouch=!0)}function uz(e,t){return gR(e.dom,new fz(e,t),!0)}function dz(e,t){for(var n=t,r=!1;n&&n.nodeType!==9&&!(r=n.domBelongToZr||n!==t&&n===e.painterRoot);)n=n.parentNode;return r}var fz=function(){function e(e,t){this.stopPropagation=Kd,this.stopImmediatePropagation=Kd,this.preventDefault=Kd,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}return e}(),pz={mousedown:function(e){e=gR(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger(`mousedown`,e)},mousemove:function(e){e=gR(this.dom,e);var t=this.__mayPointerCapture;t&&(e.zrX!==t[0]||e.zrY!==t[1])&&this.__togglePointerCapture(!0),this.trigger(`mousemove`,e)},mouseup:function(e){e=gR(this.dom,e),this.__togglePointerCapture(!1),this.trigger(`mouseup`,e)},mouseout:function(e){e=gR(this.dom,e);var t=e.toElement||e.relatedTarget;dz(this,t)||(this.__pointerCapturing&&(e.zrEventControl=`no_globalout`),this.trigger(`mouseout`,e))},wheel:function(e){oz=!0,e=gR(this.dom,e),this.trigger(`mousewheel`,e)},mousewheel:function(e){oz||(e=gR(this.dom,e),this.trigger(`mousewheel`,e))},touchstart:function(e){e=gR(this.dom,e),lz(e),this.__lastTouchMoment=new Date,this.handler.processGesture(e,`start`),pz.mousemove.call(this,e),pz.mousedown.call(this,e)},touchmove:function(e){e=gR(this.dom,e),lz(e),this.handler.processGesture(e,`change`),pz.mousemove.call(this,e)},touchend:function(e){e=gR(this.dom,e),lz(e),this.handler.processGesture(e,`end`),pz.mouseup.call(this,e),new Date-+this.__lastTouchMoment<nz&&pz.click.call(this,e)},pointerdown:function(e){pz.mousedown.call(this,e)},pointermove:function(e){sz(e)||pz.mousemove.call(this,e)},pointerup:function(e){pz.mouseup.call(this,e)},pointerout:function(e){sz(e)||pz.mouseout.call(this,e)}};H([`click`,`dblclick`,`contextmenu`],function(e){pz[e]=function(t){t=gR(this.dom,t),this.trigger(e,t)}});var mz={pointermove:function(e){sz(e)||mz.mousemove.call(this,e)},pointerup:function(e){mz.mouseup.call(this,e)},mousemove:function(e){this.trigger(`mousemove`,e)},mouseup:function(e){var t=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger(`mouseup`,e),t&&(e.zrEventControl=`only_globalout`,this.trigger(`mouseout`,e))}};function hz(e,t){var n=t.domHandlers;X.pointerEventsSupported?H(iz.pointer,function(r){_z(t,r,function(t){n[r].call(e,t)})}):(X.touchEventsSupported&&H(iz.touch,function(r){_z(t,r,function(i){n[r].call(e,i),cz(t)})}),H(iz.mouse,function(r){_z(t,r,function(i){i=hR(i),t.touching||n[r].call(e,i)})}))}function gz(e,t){X.pointerEventsSupported?H(az.pointer,n):X.touchEventsSupported||H(az.mouse,n);function n(n){function r(r){r=hR(r),dz(e,r.target)||(r=uz(e,r),t.domHandlers[n].call(e,r))}_z(t,n,r,{capture:!0})}}function _z(e,t,n,r){e.mounted[t]=n,e.listenerOpts[t]=r,vR(e.domTarget,t,n,r)}function vz(e){var t=e.mounted;for(var n in t)t.hasOwnProperty(n)&&yR(e.domTarget,n,t[n],e.listenerOpts[n]);e.mounted={}}var yz=function(){function e(e,t){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=e,this.domHandlers=t}return e}(),bz=function(e){z(t,e);function t(t,n){var r=e.call(this)||this;return r.__pointerCapturing=!1,r.dom=t,r.painterRoot=n,r._localHandlerScope=new yz(t,pz),rz&&(r._globalHandlerScope=new yz(document,mz)),hz(r,r._localHandlerScope),r}return t.prototype.dispose=function(){vz(this._localHandlerScope),rz&&vz(this._globalHandlerScope)},t.prototype.setCursor=function(e){this.dom.style&&(this.dom.style.cursor=e||`default`)},t.prototype.__togglePointerCapture=function(e){if(this.__mayPointerCapture=null,rz&&this.__pointerCapturing^+e){this.__pointerCapturing=e;var t=this._globalHandlerScope;e?gz(this,t):vz(t)}},t}(tg),xz=e({dispose:()=>Oz,disposeAll:()=>kz,getElementSSRData:()=>Nz,getInstance:()=>Az,init:()=>Dz,registerPainter:()=>jz,registerSSRDataGetter:()=>Pz,version:()=>Fz}),Sz={},Cz={}
|
|
270
|
-
/*!
|
|
271
|
-
* ZRender, a high performance 2d drawing library.
|
|
272
|
-
*
|
|
273
|
-
* Copyright (c) 2013, Baidu Inc.
|
|
274
|
-
* All rights reserved.
|
|
275
|
-
*
|
|
276
|
-
* LICENSE
|
|
277
|
-
* https://github.com/ecomfe/zrender/blob/master/LICENSE
|
|
278
|
-
*/
|
|
279
|
-
;function wz(e){delete Cz[e]}function Tz(e){if(!e)return!1;if(typeof e==`string`)return Eh(e,1)<ig;if(e.colorStops){for(var t=e.colorStops,n=0,r=t.length,i=0;i<r;i++)n+=Eh(t[i].color,1);return n/=r,n<ig}return!1}var Ez=function(){function e(e,t,n){var r=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!1,this._darkMode=!1,n||={},this.dom=t,this.id=e;var i=new QR,a=n.renderer||`canvas`;Sz[a]||(a=gd(Sz)[0]),n.useDirtyRect=n.useDirtyRect==null?!1:n.useDirtyRect;var o=new Sz[a](t,i,n,e),s=n.ssr||o.ssrOnly;this.storage=i,this.painter=o;var c=!X.node&&!X.worker&&!s?new bz(o.getViewportRoot(),o.root):null,l=n.useCoarsePointer,u=l==null||l===`auto`?X.touchEventsSupported:!!l,d=44,f;u&&(f=J(n.pointerSize,d)),this.handler=new FR(i,o,c,o.root,f),this.animation=new tz({stage:{update:s?null:function(){return r._flush(!1)}}}),s||this.animation.start()}return e.prototype.add=function(e){this._disposed||!e||(this.storage.addRoot(e),e.addSelfToZr(this),this.refresh())},e.prototype.remove=function(e){this._disposed||!e||(this.storage.delRoot(e),e.removeSelfFromZr(this),this.refresh())},e.prototype.configLayer=function(e,t){this._disposed||(this.painter.configLayer&&this.painter.configLayer(e,t),this.refresh())},e.prototype.setBackgroundColor=function(e){this._disposed||(this.painter.setBackgroundColor&&this.painter.setBackgroundColor(e),this.refresh(),this._backgroundColor=e,this._darkMode=Tz(e))},e.prototype.getBackgroundColor=function(){return this._backgroundColor},e.prototype.setDarkMode=function(e){this._darkMode=e},e.prototype.isDarkMode=function(){return this._darkMode},e.prototype.refreshImmediately=function(e){this._disposed||this._refresh({animUpdate:!e,refresh:!0,refreshHover:!1})},e.prototype._refresh=function(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},e.prototype.refresh=function(){this._disposed||(this._needsRefresh=!0,this.animation.start())},e.prototype.flush=function(){this._disposed||this._flush(!0)},e.prototype._flush=function(e){var t,n=ez(),r=this._needsRefresh,i=this._needsRefreshHover;(r||i)&&(t=!0,this._refresh({animUpdate:e,refresh:r,refreshHover:i}));var a=ez();t?(this._stillFrameAccum=0,this.trigger(`rendered`,{elapsedTime:a-n})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},e.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},e.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},e.prototype.refreshHover=function(){this._needsRefreshHover=!0},e.prototype.refreshHoverImmediately=function(){this._disposed||this._refresh({animUpdate:!1,refresh:!1,refreshHover:!0})},e.prototype.resize=function(e){this._disposed||(e||={},this.painter.resize(e.width,e.height),this.handler.resize())},e.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},e.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},e.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},e.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},e.prototype.findHover=function(e,t){if(!this._disposed)return this.handler.findHover(e,t)},e.prototype.on=function(e,t,n){return this._disposed||this.handler.on(e,t,n),this},e.prototype.off=function(e,t){this._disposed||this.handler.off(e,t)},e.prototype.trigger=function(e,t){this._disposed||this.handler.trigger(e,t)},e.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),t=0;t<e.length;t++)e[t]instanceof iS&&e[t].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()}},e.prototype.dispose=function(){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,wz(this.id))},e}();function Dz(e,t){var n=new Ez(nd(),e,t);return Cz[n.id]=n,n}function Oz(e){e.dispose()}function kz(){for(var e in Cz)Cz.hasOwnProperty(e)&&Cz[e].dispose();Cz={}}function Az(e){return Cz[e]}function jz(e,t){Sz[e]=t}var Mz;function Nz(e){if(typeof Mz==`function`)return Mz(e)}function Pz(e){Mz=e}var Fz=`6.1.0`,Iz=``;typeof navigator<`u`&&(Iz=navigator.platform||``);var Lz=`rgba(0, 0, 0, 0.2)`,Rz=Q.color.theme[0],zz=Ch(Rz,null,null,.9),Bz={darkMode:`auto`,colorBy:`series`,color:Q.color.theme,gradientColor:[zz,Rz],aria:{decal:{decals:[{color:Lz,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:Lz,symbol:`circle`,dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:Lz,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:Lz,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:Lz,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:Lz,symbol:`triangle`,dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:Iz.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},Vz=Y();function Hz(e,t,n){var r=Vz.get(t);if(!r)return n;var i=r(e);return i?n.concat(i):n}var Uz,Wz,Gz,Kz=`\0_ec_inner`,qz=1,Jz=function(e){z(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(e,t,n,r,i,a){r||={},this.option=null,this._theme=new Fw(r),this._locale=new Fw(i),this._optionManager=a},t.prototype.setOption=function(e,t,n){var r=$z(t);this._optionManager.setOption(e,n,r),this._resetOption(null,r)},t.prototype.resetOption=function(e,t){return this._resetOption(e,$z(t))},t.prototype._resetOption=function(e,t){var n=!1,r=this._optionManager;if(!e||e===`recreate`){var i=r.mountOption(e===`recreate`);!this.option||e===`recreate`?Gz(this,i):(this.restoreData(),this._mergeOption(i,t)),n=!0}if((e===`timeline`||e===`media`)&&this.restoreData(),!e||e===`recreate`||e===`timeline`){var a=r.getTimelineOption(this);a&&(n=!0,this._mergeOption(a,t))}if(!e||e===`recreate`||e===`media`){var o=r.getMediaOption(this);o.length&&H(o,function(e){n=!0,this._mergeOption(e,t)},this)}return n},t.prototype.mergeOption=function(e){this._mergeOption(e,null)},t.prototype._mergeOption=function(e,t){var n=this.option,r=this._componentsMap,i=this._componentsCount,a=[],o=Y(),s=t&&t.replaceMergeMainTypeMap;Vw(this),H(e,function(e,t){e!=null&&(kO.hasClass(t)?t&&(a.push(t),o.set(t,!0)):n[t]=n[t]==null?B(e):id(n[t],e,!0))}),s&&s.each(function(e,t){kO.hasClass(t)&&!o.get(t)&&(a.push(t),o.set(t,!0))}),kO.topologicalTravel(a,kO.getAllClassMainTypes(),c,this);function c(t){var a=Hz(this,t,vy(e[t])),o=r.get(t),c=Cy(o,a,o?s&&s.get(t)?`replaceMerge`:`normalMerge`:`replaceAll`);Fy(c,t,kO),n[t]=null,r.set(t,null),i.set(t,0);var l=[],u=[],d=0,f;H(c,function(e,n){var r=e.existing,i=e.newOption;if(!i)r&&(r.mergeOption({},this),r.optionUpdated({},!1));else{var a=t===`series`,o=kO.getClass(t,e.keyInfo.subType,!a);if(!o)return;if(t===`tooltip`){if(f)return;f=!0}if(r&&r.constructor===o)r.name=e.keyInfo.name,r.mergeOption(i,this),r.optionUpdated(i,!1);else{var s=V({componentIndex:n},e.keyInfo);r=new o(i,this,this,s),V(r,s),e.brandNew&&(r.__requireNewView=!0),r.init(i,this,this),r.optionUpdated(null,!0)}}r?(l.push(r.option),u.push(r),d++):(l.push(void 0),u.push(void 0))},this),n[t]=l,r.set(t,u),i.set(t,d),t===`series`&&Uz(this)}this._seriesIndices||Uz(this)},t.prototype.getOption=function(){var e=B(this.option);return H(e,function(t,n){if(kO.hasClass(n)){for(var r=vy(t),i=r.length,a=!1,o=i-1;o>=0;o--)r[o]&&!Py(r[o])?a=!0:(r[o]=null,!a&&i--);r.length=i,e[n]=r}}),delete e[Kz],e},t.prototype.setTheme=function(e){this._theme=new Fw(e),this._resetOption(`recreate`,null)},t.prototype.getTheme=function(){return this._theme},t.prototype.getLocaleModel=function(){return this._locale},t.prototype.setUpdatePayload=function(e){this._payload=e},t.prototype.getUpdatePayload=function(){return this._payload},t.prototype.getComponent=function(e,t){var n=this._componentsMap.get(e);if(n){var r=n[t||0];if(r)return r;if(t==null){for(var i=0;i<n.length;i++)if(n[i])return n[i]}}},t.prototype.queryComponents=function(e){var t=e.mainType;if(!t)return[];var n=e.index,r=e.id,i=e.name,a=this._componentsMap.get(t);if(!a||!a.length)return[];var o;return n==null?o=r==null?i==null?md(a,function(e){return!!e}):Zz(`name`,i,a):Zz(`id`,r,a):(o=[],H(vy(n),function(e){a[e]&&o.push(a[e])})),Qz(o,e)},t.prototype.findComponents=function(e){var t=e.query,n=e.mainType,r=i(t);return a(Qz(r?this.queryComponents(r):md(this._componentsMap.get(n),function(e){return!!e}),e));function i(e){var 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?md(t,e.filter):t}},t.prototype.eachComponent=function(e,t,n){var r=this._componentsMap;if(G(e)){var i=t,a=e;r.each(function(e,t){for(var n=0;e&&n<e.length;n++){var r=e[n];r&&a.call(i,t,r,r.componentIndex)}})}else for(var o=K(e)?r.get(e):q(e)?this.findComponents(e):null,s=0;o&&s<o.length;s++){var c=o[s];c&&t.call(n,c,c.componentIndex)}},t.prototype.getSeriesByName=function(e){var t=My(e,null);return md(this._componentsMap.get(`series`),function(e){return!!e&&t!=null&&e.name===t})},t.prototype.getSeriesByIndex=function(e){return this._componentsMap.get(`series`)[e]},t.prototype.getSeriesByType=function(e){return md(this._componentsMap.get(`series`),function(t){return!!t&&t.subType===e})},t.prototype.getSeries=function(){return md(this._componentsMap.get(`series`),function(e){return!!e})},t.prototype.getSeriesCount=function(){return this._componentsCount.get(`series`)},t.prototype.eachSeries=function(e,t){Wz(this),H(this._seriesIndices,function(n){var r=this._componentsMap.get(`series`)[n];e.call(t,r,n)},this)},t.prototype.eachRawSeries=function(e,t){H(this._componentsMap.get(`series`),function(n){n&&e.call(t,n,n.componentIndex)})},t.prototype.eachSeriesByType=function(e,t,n){Wz(this),H(this._seriesIndices,function(r){var i=this._componentsMap.get(`series`)[r];i.subType===e&&t.call(n,i,r)},this)},t.prototype.eachRawSeriesByType=function(e,t,n){return H(this.getSeriesByType(e),t,n)},t.prototype.isSeriesFiltered=function(e){return Wz(this),this._seriesIndicesMap.get(e.componentIndex)==null},t.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},t.prototype.filterSeries=function(e,t){Wz(this);var n=[];H(this._seriesIndices,function(r){var i=this._componentsMap.get(`series`)[r];e.call(t,i,r)&&n.push(r)},this),this._seriesIndices=n,this._seriesIndicesMap=Y(n)},t.prototype.restoreData=function(e){Uz(this);var t=this._componentsMap,n=[];t.each(function(e,t){kO.hasClass(t)&&n.push(t)}),kO.topologicalTravel(n,kO.getAllClassMainTypes(),function(n){H(t.get(n),function(t){t&&(n!==`series`||!Yz(t,e))&&t.restoreData()})})},t.internalField=function(){Uz=function(e){var t=e._seriesIndices=[];H(e._componentsMap.get(`series`),function(e){e&&t.push(e.componentIndex)}),e._seriesIndicesMap=Y(t)},Wz=function(e){},Gz=function(e,t){e.option={},e.option[Kz]=qz,e._componentsMap=Y({series:[]}),e._componentsCount=Y();var n=t.aria;q(n)&&n.enabled==null&&(n.enabled=!0),Xz(t,e._theme.option),id(t,Bz,!1),e._mergeOption(t,null)}}(),t}(Fw);function Yz(e,t){if(t){var 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 Xz(e,t){var n=e.color&&!e.colorLayer;H(t,function(t,r){r===`colorLayer`&&n||r===`color`&&e.color||kO.hasClass(r)||(typeof t==`object`?e[r]=e[r]?id(e[r],t,!1):B(t):e[r]??(e[r]=t))})}function Zz(e,t,n){if(W(t)){var r=Y();return H(t,function(e){e!=null&&My(e,null)!=null&&r.set(e,!0)}),md(n,function(t){return t&&r.get(t[e])})}else{var i=My(t,null);return md(n,function(t){return t&&i!=null&&t[e]===i})}}function Qz(e,t){return t.hasOwnProperty(`subType`)?md(e,function(e){return e&&e.subType===t.subType}):e}function $z(e){var t=Y();return e&&H(vy(e.replaceMerge),function(e){t.set(e,!0)}),{replaceMergeMainTypeMap:t}}dd(Jz,MO);var eB=/^(min|max)?(.+)$/,tB=function(){function e(e){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=e}return e.prototype.setOption=function(e,t,n){e&&(H(vy(e.series),function(e){e&&e.data&&Cd(e.data)&&Id(e.data)}),H(vy(e.dataset),function(e){e&&e.source&&Cd(e.source)&&Id(e.source)})),e=B(e);var r=this._optionBackup,i=nB(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},e.prototype.mountOption=function(e){var t=this._optionBackup;return this._timelineOptions=t.timelineOptions,this._mediaList=t.mediaList,this._mediaDefault=t.mediaDefault,this._currentMediaIndices=[],B(e?t.baseOption:this._newBaseOption)},e.prototype.getTimelineOption=function(e){var t,n=this._timelineOptions;if(n.length){var r=e.getComponent(`timeline`);r&&(t=B(n[r.getCurrentIndex()]))}return t},e.prototype.getMediaOption=function(e){var t=this._api.getWidth(),n=this._api.getHeight(),r=this._mediaList,i=this._mediaDefault,a=[],o=[];if(!r.length&&!i)return o;for(var s=0,c=r.length;s<c;s++)rB(r[s].query,t,n)&&a.push(s);return!a.length&&i&&(a=[-1]),a.length&&!aB(a,this._currentMediaIndices)&&(o=U(a,function(e){return B(e===-1?i.option:r[e].option)})),this._currentMediaIndices=a,o},e}();function nB(e,t,n){var 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||=s):((d||u)&&(e.options=e.media=null),a=e),u&&W(l)&&H(l,function(e){e&&e.option&&(e.query?r.push(e):i||=e)}),f(a),H(c,function(e){return f(e)}),H(r,function(e){return f(e.option)});function f(e){H(t,function(t){t(e,n)})}return{baseOption:a,timelineOptions:c||[],mediaDefault:i,mediaList:r}}function rB(e,t,n){var r={width:t,height:n,aspectratio:t/n},i=!0;return H(e,function(e,t){var n=t.match(eB);if(!(!n||!n[1]||!n[2])){var a=n[1];iB(r[n[2].toLowerCase()],e,a)||(i=!1)}}),i}function iB(e,t,n){return n===`min`?e>=t:n===`max`?e<=t:e===t}function aB(e,t){return e.join(`,`)===t.join(`,`)}var oB=H,sB=q,cB=[`areaStyle`,`lineStyle`,`nodeStyle`,`linkStyle`,`chordStyle`,`label`,`labelLine`];function lB(e){var t=e&&e.itemStyle;if(t)for(var n=0,r=cB.length;n<r;n++){var i=cB[n],a=t.normal,o=t.emphasis;a&&a[i]&&(e[i]=e[i]||{},e[i].normal?id(e[i].normal,a[i]):e[i].normal=a[i],a[i]=null),o&&o[i]&&(e[i]=e[i]||{},e[i].emphasis?id(e[i].emphasis,o[i]):e[i].emphasis=o[i],o[i]=null)}}function uB(e,t,n){if(e&&e[t]&&(e[t].normal||e[t].emphasis)){var r=e[t].normal,i=e[t].emphasis;r&&(n?(e[t].normal=e[t].emphasis=null,sd(e[t],r)):e[t]=r),i&&(e.emphasis=e.emphasis||{},e.emphasis[t]=i,i.focus&&(e.emphasis.focus=i.focus),i.blurScope&&(e.emphasis.blurScope=i.blurScope))}}function dB(e){uB(e,`itemStyle`),uB(e,`lineStyle`),uB(e,`areaStyle`),uB(e,`label`),uB(e,`labelLine`),uB(e,`upperLabel`),uB(e,`edgeLabel`)}function fB(e,t){var n=sB(e)&&e[t],r=sB(n)&&n.textStyle;if(r)for(var i=0,a=by.length;i<a;i++){var o=by[i];r.hasOwnProperty(o)&&(n[o]=r[o])}}function pB(e){e&&(dB(e),fB(e,`label`),e.emphasis&&fB(e.emphasis,`label`))}function mB(e){if(sB(e)){lB(e),dB(e),fB(e,`label`),fB(e,`upperLabel`),fB(e,`edgeLabel`),e.emphasis&&(fB(e.emphasis,`label`),fB(e.emphasis,`upperLabel`),fB(e.emphasis,`edgeLabel`));var t=e.markPoint;t&&(lB(t),pB(t));var n=e.markLine;n&&(lB(n),pB(n));var r=e.markArea;r&&pB(r);var i=e.data;if(e.type===`graph`){i||=e.nodes;var a=e.links||e.edges;if(a&&!Cd(a))for(var o=0;o<a.length;o++)pB(a[o]);H(e.categories,function(e){dB(e)})}if(i&&!Cd(i))for(var o=0;o<i.length;o++)pB(i[o]);if(t=e.markPoint,t&&t.data)for(var s=t.data,o=0;o<s.length;o++)pB(s[o]);if(n=e.markLine,n&&n.data)for(var c=n.data,o=0;o<c.length;o++)W(c[o])?(pB(c[o][0]),pB(c[o][1])):pB(c[o]);e.type===`gauge`?(fB(e,`axisLabel`),fB(e,`title`),fB(e,`detail`)):e.type===`treemap`?(uB(e.breadcrumb,`itemStyle`),H(e.levels,function(e){dB(e)})):e.type===`tree`&&dB(e.leaves)}}function hB(e){return W(e)?e:e?[e]:[]}function gB(e){return(W(e)?e[0]:e)||{}}function _B(e,t){oB(hB(e.series),function(e){sB(e)&&mB(e)});var n=[`xAxis`,`yAxis`,`radiusAxis`,`angleAxis`,`singleAxis`,`parallelAxis`,`radar`];t&&n.push(`valueAxis`,`categoryAxis`,`logAxis`,`timeAxis`),oB(n,function(t){oB(hB(e[t]),function(e){e&&(fB(e,`axisLabel`),fB(e.axisPointer,`label`))})}),oB(hB(e.parallel),function(e){var t=e&&e.parallelAxisDefault;fB(t,`axisLabel`),fB(t&&t.axisPointer,`label`)}),oB(hB(e.calendar),function(e){uB(e,`itemStyle`),fB(e,`dayLabel`),fB(e,`monthLabel`),fB(e,`yearLabel`)}),oB(hB(e.radar),function(e){fB(e,`name`),e.name&&e.axisName==null&&(e.axisName=e.name,delete e.name),e.nameGap!=null&&e.axisNameGap==null&&(e.axisNameGap=e.nameGap,delete e.nameGap)}),oB(hB(e.geo),function(e){sB(e)&&(pB(e),oB(hB(e.regions),function(e){pB(e)}))}),oB(hB(e.timeline),function(e){pB(e),uB(e,`label`),uB(e,`itemStyle`),uB(e,`controlStyle`,!0);var t=e.data;W(t)&&H(t,function(e){q(e)&&(uB(e,`label`),uB(e,`itemStyle`))})}),oB(hB(e.toolbox),function(e){uB(e,`iconStyle`),oB(e.feature,function(e){uB(e,`iconStyle`)})}),fB(gB(e.axisPointer),`label`),fB(gB(e.tooltip).axisPointer,`label`)}function vB(e,t){for(var n=t.split(`,`),r=e,i=0;i<n.length&&(r&&=r[n[i]],r!=null);i++);return r}function yB(e,t,n,r){for(var i=t.split(`,`),a=e,o,s=0;s<i.length-1;s++)o=i[s],a[o]??(a[o]={}),a=a[o];(r||a[i[s]]==null)&&(a[i[s]]=n)}function bB(e){e&&H(xB,function(t){t[0]in e&&!(t[1]in e)&&(e[t[1]]=e[t[0]])})}var xB=[[`x`,`left`],[`y`,`top`],[`x2`,`right`],[`y2`,`bottom`]],SB=[`grid`,`geo`,`parallel`,`legend`,`toolbox`,`title`,`visualMap`,`dataZoom`,`timeline`],CB=[[`borderRadius`,`barBorderRadius`],[`borderColor`,`barBorderColor`],[`borderWidth`,`barBorderWidth`]];function wB(e){var t=e&&e.itemStyle;if(t)for(var n=0;n<CB.length;n++){var r=CB[n][1],i=CB[n][0];t[r]!=null&&(t[i]=t[r])}}function TB(e){e&&e.alignTo===`edge`&&e.margin!=null&&e.edgeDistance==null&&(e.edgeDistance=e.margin)}function EB(e){e&&e.downplay&&!e.blur&&(e.blur=e.downplay)}function DB(e){e&&e.focusNodeAdjacency!=null&&(e.emphasis=e.emphasis||{},e.emphasis.focus??(e.emphasis.focus=`adjacency`))}function OB(e,t){if(e)for(var n=0;n<e.length;n++)t(e[n]),e[n]&&OB(e[n].children,t)}function kB(e,t){_B(e,t),e.series=vy(e.series),H(e.series,function(e){if(q(e)){var t=e.type;if(t===`line`)e.clipOverflow!=null&&(e.clip=e.clipOverflow);else if(t===`pie`||t===`gauge`){e.clockWise!=null&&(e.clockwise=e.clockWise),TB(e.label);var n=e.data;if(n&&!Cd(n))for(var r=0;r<n.length;r++)TB(n[r]);e.hoverOffset!=null&&(e.emphasis=e.emphasis||{},(e.emphasis.scaleSize=null)&&(e.emphasis.scaleSize=e.hoverOffset))}else if(t===`gauge`){var i=vB(e,`pointer.color`);i!=null&&yB(e,`itemStyle.color`,i)}else if(t===`bar`){wB(e),wB(e.backgroundStyle),wB(e.emphasis);var n=e.data;if(n&&!Cd(n))for(var r=0;r<n.length;r++)typeof n[r]==`object`&&(wB(n[r]),wB(n[r]&&n[r].emphasis))}else if(t===`sunburst`){var a=e.highlightPolicy;a&&(e.emphasis=e.emphasis||{},e.emphasis.focus||(e.emphasis.focus=a)),EB(e),OB(e.data,EB)}else t===`graph`||t===`sankey`?DB(e):t===`map`&&(e.mapType&&!e.map&&(e.map=e.mapType),e.mapLocation&&sd(e,e.mapLocation));e.hoverAnimation!=null&&(e.emphasis=e.emphasis||{},e.emphasis&&e.emphasis.scale==null&&(e.emphasis.scale=e.hoverAnimation)),bB(e)}}),e.dataRange&&(e.visualMap=e.dataRange),H(SB,function(t){var n=e[t];n&&(W(n)||(n=[n]),H(n,function(e){bB(e)}))})}var AB=fb(jB);function jB(e){var t=Y();e.eachSeries(function(e){var n=e.get(`stack`);if(n){var 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(),H(e,function(t,n){t.data.setCalculationInfo(`stackedOnSeries`,n>0?e[n-1].seriesModel:null)}),MB(e))})}function MB(e){H(e,function(t,n){var r=[],i=[NaN,NaN],a=[t.stackResultDimension,t.stackedOverDimension],o=t.data,s=t.isStackedByIndex,c=t.seriesModel.get(`stackStrategy`)||`samesign`;o.modify(a,function(a,l,u){var d=o.get(t.stackedDimension,u);if(isNaN(d))return i;var f,p;s?p=o.getRawIndex(u):f=o.get(t.stackedByDimension,u);for(var m=NaN,h=n-1;h>=0;h--){var g=e[h];if(s||(p=g.data.rawIndexOf(g.stackedByDimension,f)),p>=0){var _=g.data.getByRawIndex(g.stackResultDimension,p);if(c===`all`||c===`positive`&&_>0||c===`negative`&&_<0||c===`samesign`&&d>=0&&_>0||c===`samesign`&&d<=0&&_<0){d=Kv(d,_),m=_;break}}}return r[0]=d,r[1]=m,r})})}var NB=function(){function e(){this.group=new iS,this.uid=RE(`viewComponent`)}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,n,r){},e.prototype.dispose=function(e,t){},e.prototype.updateView=function(e,t,n,r){},e.prototype.updateLayout=function(e,t,n,r){},e.prototype.updateVisual=function(e,t,n,r){},e.prototype.toggleBlurSeries=function(e,t,n){},e.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},e}();rf(NB),df(NB);var PB=Ry(),FB={itemStyle:ff(Mw,!0),lineStyle:ff(kw,!0)},IB={lineStyle:`stroke`,itemStyle:`fill`};function LB(e,t){return e.visualStyleMapper||FB[t]||(console.warn(`Unknown style type '`+t+`'.`),FB.itemStyle)}function RB(e,t){return e.visualDrawType||IB[t]||(console.warn(`Unknown style type '`+t+`'.`),`fill`)}var zB={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData(),r=e.visualStyleAccessPath||`itemStyle`,i=e.getModel(r),a=LB(e,r)(i),o=i.getShallow(`decal`);o&&(n.setVisual(`decal`,o),o.dirty=!0);var s=RB(e,r),c=a[s],l=G(c)?c:null,u=a.fill===`auto`||a.stroke===`auto`;if(!a[s]||l||u){var d=e.getColorFromPalette(e.name,null,t.getSeriesCount());a[s]||(a[s]=d,n.setVisual(`colorFromPalette`,!0)),a.fill=a.fill===`auto`||G(a.fill)?d:a.fill,a.stroke=a.stroke===`auto`||G(a.stroke)?d:a.stroke}if(n.setVisual(`style`,a),n.setVisual(`drawType`,s),!t.isSeriesFiltered(e)&&l)return n.setVisual(`colorFromPalette`,!1),{dataEach:function(t,n){var r=e.getDataParams(n),i=V({},a);i[s]=l(r),t.setItemVisual(n,`style`,i)}}}},BB=new Fw,VB={createOnAllSeries:!0,reset:function(e,t){if(!e.ignoreStyleOnData){var n=e.getData(),r=e.visualStyleAccessPath||`itemStyle`,i=LB(e,r),a=n.getVisual(`drawType`);return{dataEach:n.hasItemOption?function(e,t){var n=e.getRawDataItem(t);if(n&&n[r]){BB.option=n[r];var o=i(BB);V(e.ensureUniqueItemVisual(t,`style`),o),BB.option.decal&&(e.setItemVisual(t,`decal`,BB.option.decal),BB.option.decal.dirty=!0),a in o&&e.setItemVisual(t,`colorFromPalette`,!1)}}:null}}}},HB={performRawSeries:!0,overallReset:function(e){var t=Y();e.eachSeries(function(e){if(!e.isColorBySeries()){var n=e.type+`-`+e.getColorBy();PB(e).scope=t.get(n)||t.set(n,{})}}),e.eachSeries(function(e){if(!e.isColorBySeries()){var t=e.getRawData(),n={},r=e.getData(),i=PB(e).scope,a=RB(e,e.visualStyleAccessPath||`itemStyle`);r.each(function(e){var t=r.getRawIndex(e);n[t]=e}),t.each(function(o){var s=n[o];if(r.getItemVisual(s,`colorFromPalette`)){var c=r.ensureUniqueItemVisual(s,`style`),l=t.getName(o)||o+``,u=t.count();c[a]=e.getColorFromPalette(l,i,u)}})}})}},UB=Math.PI;function WB(e,t){t||={},sd(t,{text:`loading`,textColor:Q.color.primary,fontSize:12,fontWeight:`normal`,fontStyle:`normal`,fontFamily:`sans-serif`,maskColor:`rgba(255,255,255,0.8)`,showSpinner:!0,color:Q.color.theme[0],spinnerRadius:10,lineWidth:5,zlevel:0});var n=new iS,r=new Q_({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});n.add(r);var i=new rv({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 Q_({style:{fill:`none`},textContent:i,textConfig:{position:`right`,distance:10},zlevel:t.zlevel,z:10001});n.add(a);var o;return t.showSpinner&&(o=new HS({shape:{startAngle:-UB/2,endAngle:-UB/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:UB*3/2}).start(`circularInOut`),o.animateShape(!0).when(1e3,{startAngle:UB*3/2}).delay(300).start(`circularInOut`),n.add(o)),n.resize=function(){var n=i.getBoundingRect().width,s=t.showSpinner?t.spinnerRadius:0,c=(e.getWidth()-s*2-(t.showSpinner&&n?10:0)-n)/2-(t.showSpinner&&n?0:5+n/2)+(t.showSpinner?0:n/2)+(n?0:s),l=e.getHeight()/2;t.showSpinner&&o.setShape({cx:c,cy:l}),a.setShape({x:c-s,y:l-s,width:s*2,height:s*2}),r.setShape({x:0,y:0,width:e.getWidth(),height:e.getHeight()})},n.resize(),n}var GB=function(){function e(e,t,n,r){this._stageTaskMap=Y(),this.ecInstance=e,this.api=t,n=this._dataProcessorHandlers=n.slice(),r=this._visualHandlers=r.slice(),this._allHandlers=n.concat(r)}return e.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each(function(e){var t=e.overallTask;t&&t.dirty()})},e.prototype.getPerformArgs=function(e,t){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),r=n.context,i=!t&&n.progressiveEnabled&&(!r||r.progressiveRender)&&e.__idxInPipeline>n.blockIndex?n.step:null,a=r&&r.modDataCount;return{step:i,modBy:a==null?null:Math.ceil(a/i),modDataCount:a}}},e.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},e.prototype.updateStreamModes=function(e,t){var n=this._pipelineMap.get(e.uid);e.pipelineContext=n.context=e.__preparePipelineContext?e.__preparePipelineContext(t,n):ub(e,t,n)},e.prototype.restorePipelines=function(e,t){var n=this,r=n._pipelineMap=Y();t.eachSeries(function(t){var 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)})},e.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),n=this.api;H(this._allHandlers,function(r){var i=e.get(r.uid)||e.set(r.uid,{});Nd(!(r.reset&&r.overallReset),``),r.reset&&this._createSeriesStageTask(r,i,t,n),r.overallReset&&this._createOverallStageTask(r,i,t,n)},this)},e.prototype.prepareView=function(e,t,n,r){var i=e.renderTask,a=i.context;a.model=t,a.ecModel=n,a.api=r,i.__block=!e.incrementalPrepareRender,this._pipe(t,i)},e.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},e.prototype.performVisualTasks=function(e,t,n){this._performStageTasks(this._visualHandlers,e,t,n)},e.prototype._performStageTasks=function(e,t,n,r){r||={};var i=!1,a=this;H(e,function(e,s){if(!(r.visualType&&r.visualType!==e.visualType)){var c=a._stageTaskMap.get(e.uid),l=c.seriesTaskMap,u=c.overallTask;if(u){var d,f=u.agentStubMap;f.each(function(e){o(r,e)&&(e.dirty(),d=!0)}),d&&u.dirty(),a.updatePayload(u,n);var p=a.getPerformArgs(u,r.block);f.each(function(e){e.perform(p)}),u.perform(p)&&(i=!0)}else l&&l.each(function(s,c){o(r,s)&&s.dirty();var l=a.getPerformArgs(s,r.block);l.skip=!e.performRawSeries&&t.isSeriesFiltered(s.context.model),a.updatePayload(s,n),s.perform(l)&&(i=!0)})}});function o(e,t){return e.setDirty&&(!e.dirtyMap||e.dirtyMap.get(t.__pipeline.id))}this.unfinished=i||this.unfinished},e.prototype.performSeriesTasks=function(e){var t;e.eachSeries(function(e){t=e.dataTask.perform()||t}),this.unfinished=t||this.unfinished},e.prototype.plan=function(){this._pipelineMap.each(function(e){var t=e.tail;do{if(t.__block){e.blockIndex=t.__idxInPipeline;break}t=t.getUpstream()}while(t)})},e.prototype.updatePayload=function(e,t){t!==`remain`&&(e.context.payload=t)},e.prototype._createSeriesStageTask=function(e,t,n,r){var i=this,a=t.seriesTaskMap,o=t.seriesTaskMap=Y(),s=e.seriesType,c=e.getTargetSeries;e.createOnAllSeries?n.eachRawSeries(l):s?n.eachRawSeriesByType(s,l):c&&c(n,r).each(l);function l(t){var s=t.uid,c=o.set(s,a&&a.get(s)||zO({plan:XB,reset:ZB,count:eV}));c.context={model:t,ecModel:n,api:r,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:i},i._pipe(t,c)}},e.prototype._createOverallStageTask=function(e,t,n,r){var i=this,a=t.overallTask=t.overallTask||zO({reset:KB});a.context={ecModel:n,api:r,overallReset:e.overallReset,scheduler:i};var o=a.agentStubMap,s=a.agentStubMap=Y(),c=e.seriesType,l=e.getTargetSeries,u=e.dirtyOnOverallProgress,d=!1;Nd(!e.createOnAllSeries,``),c?n.eachRawSeriesByType(c,f):l?l(n,r).each(f):H(n.getSeries(),f);function f(e){var t=e.uid,n=s.set(t,o&&o.get(t)||(d=!0,zO({reset:qB,onDirty:YB})));n.context={model:e,dirtyOnOverallProgress:u},n.agent=a,n.__block=u,i._pipe(e,n)}d&&a.dirty()},e.prototype._pipe=function(e,t){var n=e.uid,r=this._pipelineMap.get(n);!r.head&&(r.head=t),r.tail&&r.tail.pipe(t),r.tail=t,t.__idxInPipeline=r.count++,t.__pipeline=r},e.wrapStageHandler=function(e,t){return G(e)&&(e={overallReset:e,seriesType:tV(e)}),e.uid=RE(`stageHandler`),t&&(e.visualType=t),e},e}();function KB(e){e.overallReset(e.ecModel,e.api,e.payload)}function qB(e){return e.dirtyOnOverallProgress&&JB}function JB(){this.agent.dirty(),this.getDownstream().dirty()}function YB(){this.agent&&this.agent.dirty()}function XB(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function ZB(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=vy(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?U(t,function(e,t){return $B(t)}):QB}var QB=$B(0);function $B(e){return function(t,n){var r=n.data,i=n.resetDefines[e];if(i&&i.dataEach)for(var a=t.start;a<t.end;a++)i.dataEach(r,a);else i&&i.progress&&i.progress(t,r)}}function eV(e){return e.data.count()}function tV(e){iV=null;try{e(nV,rV)}catch{}return iV}var nV={},rV={},iV;aV(nV,Jz),aV(rV,Eb),nV.eachSeriesByType=nV.eachRawSeriesByType=function(e){iV=e},nV.eachComponent=function(e){e.mainType===`series`&&e.subType&&(iV=e.subType)};function aV(e,t){for(var n in t.prototype)e[n]=Kd}var $=Q.darkColor,oV=$.background,sV=function(){return{axisLine:{lineStyle:{color:$.axisLine}},splitLine:{lineStyle:{color:$.axisSplitLine}},splitArea:{areaStyle:{color:[$.backgroundTint,$.backgroundTransparent]}},minorSplitLine:{lineStyle:{color:$.axisMinorSplitLine}},axisLabel:{color:$.axisLabel},axisName:{}}},cV={label:{color:$.secondary},itemStyle:{borderColor:$.borderTint},dividerLineStyle:{color:$.border}},lV={darkMode:!0,color:$.theme,backgroundColor:oV,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:oV,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:cV,y:cV,backgroundColor:{borderColor:$.axisLine},body:{itemStyle:{borderColor:$.borderTint}}},timeAxis:sV(),logAxis:sV(),valueAxis:sV(),categoryAxis:sV(),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:function(){var e=sV();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}}}};lV.categoryAxis.splitLine.show=!1;var uV=function(){function e(){}return e.prototype.normalizeQuery=function(e){var t={},n={},r={};if(K(e)){var i=ef(e);t.mainType=i.main||null,t.subType=i.sub||null}else{var a=[`Index`,`Name`,`Id`],o={name:1,dataIndex:1,dataType:1};H(e,function(e,i){for(var s=!1,c=0;c<a.length;c++){var l=a[c],u=i.lastIndexOf(l);if(u>0&&u===i.length-l.length){var d=i.slice(0,u);d!==`data`&&(t.mainType=d,t[l.toLowerCase()]=e,s=!0)}}o.hasOwnProperty(i)&&(n[i]=e,s=!0),s||(r[i]=e)})}return{cptQuery:t,dataQuery:n,otherQuery:r}},e.prototype.filter=function(e,t){var n=this.eventInfo;if(!n)return!0;var r=n.targetEl,i=n.packedEvent,a=n.model,o=n.view;if(!a||!o)return!0;var s=t.cptQuery,c=t.dataQuery;return l(s,a,`mainType`)&&l(s,a,`subType`)&&l(s,a,`index`,`componentIndex`)&&l(s,a,`name`)&&l(s,a,`id`)&&l(c,i,`name`)&&l(c,i,`dataIndex`)&&l(c,i,`dataType`)&&(!o.filterForExposedEvent||o.filterForExposedEvent(e,t.otherQuery,r,i));function l(e,t,n,r){return e[n]==null||t[r||n]===e[n]}},e.prototype.afterTrigger=function(){this.eventInfo=null},e}(),dV=[`symbol`,`symbolSize`,`symbolRotate`,`symbolOffset`],fV=dV.concat([`symbolKeepAspect`]),pV={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData();if(e.legendIcon&&n.setVisual(`legendIcon`,e.legendIcon),!e.hasSymbolVisual)return;for(var r={},i={},a=!1,o=0;o<dV.length;o++){var s=dV[o],c=e.get(s);G(c)?(a=!0,i[s]=c):r[s]=c}if(r.symbol=r.symbol||e.defaultSymbol,n.setVisual(V({legendIcon:e.legendIcon||r.symbol,symbolKeepAspect:e.get(`symbolKeepAspect`)},r)),t.isSeriesFiltered(e))return;var l=gd(i);function u(t,n){for(var r=e.getRawValue(n),a=e.getDataParams(n),o=0;o<l.length;o++){var s=l[o];t.setItemVisual(n,s,i[s](r,a))}}return{dataEach:a?u:null}}},mV={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(!e.hasSymbolVisual||t.isSeriesFiltered(e))return;var n=e.getData();function r(e,t){for(var n=e.getItemModel(t),r=0;r<fV.length;r++){var i=fV[r],a=n.getShallow(i,!0);a!=null&&e.setItemVisual(t,i,a)}}return{dataEach:n.hasItemOption?r:null}}};function hV(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:}}function gV(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:}}function _V(e,t,n,r,i){var a=e+t;n.isSilent(a)||r.eachComponent({mainType:`series`,subType:`pie`},function(e){for(var t=e.seriesIndex,r=e.option.selectedMap,o=i.selected,s=0;s<o.length;s++)if(o[s].seriesIndex===t){var c=e.getData(),l=Ly(c,i.fromActionPayload);n.trigger(a,{type:a,seriesId:e.id,name:W(l)?c.getName(l[0]):c.getName(l),selected:K(r)?r:V({},r)})}})}function vV(e,t,n){e.on(`selectchanged`,function(e){var r=n.getModel();e.isFromClick?(_V(`map`,`selectchanged`,t,r,e),_V(`pie`,`selectchanged`,t,r,e)):e.fromAction===`select`?(_V(`map`,`selected`,t,r,e),_V(`pie`,`selected`,t,r,e)):e.fromAction===`unselect`&&(_V(`map`,`unselected`,t,r,e),_V(`pie`,`unselected`,t,r,e))})}function yV(e,t,n){for(var r;e&&!(t(e)&&(r=e,n));)e=e.__hostTarget||e.parent;return r}var bV=new tg,xV={};function SV(e,t){xV[e]=t}function CV(e){return xV[e]}var wV={};function TV(e,t){wV[e]=t}var EV=Math.round(Math.random()*9),DV=typeof Object.defineProperty==`function`,OV=function(){function e(){this._id=`__ec_inner_`+EV++}return e.prototype.get=function(e){return this._guard(e)[this._id]},e.prototype.set=function(e,t){var n=this._guard(e);return DV?Object.defineProperty(n,this._id,{value:t,enumerable:!1,configurable:!0}):n[this._id]=t,this},e.prototype.delete=function(e){return this.has(e)?(delete this._guard(e)[this._id],!0):!1},e.prototype.has=function(e){return!!this._guard(e)[this._id]},e.prototype._guard=function(e){if(e!==Object(e))throw TypeError(`Value of WeakMap is not a non-null object.`);return e},e}();function kV(e){return isFinite(e)}function AV(e,t,n){var 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=kV(r)?r:0,i=kV(i)?i:1,a=kV(a)?a:0,o=kV(o)?o:0,e.createLinearGradient(r,a,i,o)}function jV(e,t,n){var 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=kV(o)?o:.5,s=kV(s)?s:.5,c=c>=0&&kV(c)?c:.5,e.createRadialGradient(o,s,0,o,s,c)}function MV(e,t,n){for(var r=t.type===`radial`?jV(e,t,n):AV(e,t,n),i=t.colorStops,a=0;a<i.length;a++)r.addColorStop(i[a].offset,i[a].color);return r}function NV(e,t){if(e===t||!e&&!t)return!1;if(!e||!t||e.length!==t.length)return!0;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!0;return!1}function PV(e){return parseInt(e,10)}function FV(e,t,n){var 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]);var s=document.defaultView.getComputedStyle(e);return(e[i]||PV(s[r])||PV(e.style[r]))-(PV(s[a])||0)-(PV(s[o])||0)||0}function IV(e,t){return!e||e===`solid`||!(t>0)?null:e===`dashed`?[4*t,2*t]:e===`dotted`?[t]:xd(e)?[e]:W(e)?e:null}function LV(e){var t=e.style,n=t.lineDash&&t.lineWidth>0&&IV(t.lineDash,t.lineWidth),r=t.lineDashOffset;if(n){var i=t.strokeNoScale&&e.getLineScale?e.getLineScale():1;i&&i!==1&&(n=U(n,function(e){return e/i}),r/=i)}return[n,r]}var RV=new p_(!0);function zV(e){var t=e.stroke;return!(t==null||t===`none`||!(e.lineWidth>0))}function BV(e){return typeof e==`string`&&e!==`none`}function VV(e){var t=e.fill;return t!=null&&t!==`none`}function HV(e,t){if(t.fillOpacity!=null&&t.fillOpacity!==1){var n=e.globalAlpha;e.globalAlpha=t.fillOpacity*t.opacity,e.fill(),e.globalAlpha=n}else e.fill()}function UV(e,t){if(t.strokeOpacity!=null&&t.strokeOpacity!==1){var n=e.globalAlpha;e.globalAlpha=t.strokeOpacity*t.opacity,e.stroke(),e.globalAlpha=n}else e.stroke()}function WV(e,t,n){var r=bf(t.image,t.__image,n);if(Sf(r)){var i=e.createPattern(r,t.repeat||`repeat`);if(typeof DOMMatrix==`function`&&i&&i.setTransform){var a=new DOMMatrix;a.translateSelf(t.x||0,t.y||0),a.rotateSelf(0,0,(t.rotation||0)*qd),a.scaleSelf(t.scaleX||1,t.scaleY||1),i.setTransform(a)}return i}}function GV(e,t,n,r,i){var a,o=zV(n),s=VV(n),c=n.strokePercent,l=c<1,u=!t.path;(!t.silent||l)&&u&&t.createPathProxy();var d=t.path||RV,f=t.__dirty;if(!r){var p=n.fill,m=n.stroke,h=s&&!!p.colorStops,g=o&&!!m.colorStops,_=s&&!!p.image,v=o&&!!m.image,y=void 0,b=void 0,x=void 0,S=void 0,C=void 0;(h||g)&&(C=t.getBoundingRect()),h&&(y=f?MV(e,p,C):t.__canvasFillGradient,t.__canvasFillGradient=y),g&&(b=f?MV(e,m,C):t.__canvasStrokeGradient,t.__canvasStrokeGradient=b),_&&(x=f||!t.__canvasFillPattern?WV(e,p,t):t.__canvasFillPattern,t.__canvasFillPattern=x),v&&(S=f||!t.__canvasStrokePattern?WV(e,m,t):t.__canvasStrokePattern,t.__canvasStrokePattern=S),h?e.fillStyle=y:_&&(x?e.fillStyle=x:s=!1),g?e.strokeStyle=b:v&&(S?e.strokeStyle=S:o=!1)}var w=t.getGlobalScale();d.setScale(w[0],w[1],t.segmentIgnoreThreshold);var T,E;e.setLineDash&&n.lineDash&&(a=LV(t),T=a[0],E=a[1]);var D=!0;(u||f&4)&&(d.setDPR(e.dpr),l?d.setContext(null):(d.setContext(e),D=!1),d.reset(),t.buildPath(d,t.shape,r),d.toStatic(),t.pathUpdated()),D&&d.rebuildPath(e,l?c:1),T&&(e.setLineDash(T),e.lineDashOffset=E),r?(i.batchFill=s,i.batchStroke=o):n.strokeFirst?(o&&UV(e,n),s&&HV(e,n)):(s&&HV(e,n),o&&UV(e,n)),T&&e.setLineDash([])}function KV(e,t,n){var r=t.__image=bf(n.image,t.__image,t,t.onload);if(!(!r||!Sf(r))){var i=n.x||0,a=n.y||0,o=t.getWidth(),s=t.getHeight(),c=r.width/r.height;if(o==null&&s!=null?o=s*c:s==null&&o!=null?s=o/c:o==null&&s==null&&(o=r.width,s=r.height),n.sWidth&&n.sHeight){var l=n.sx||0,u=n.sy||0;e.drawImage(r,l,u,n.sWidth,n.sHeight,i,a,o,s)}else if(n.sx&&n.sy){var l=n.sx,u=n.sy,d=o-l,f=s-u;e.drawImage(r,l,u,d,f,i,a,o,s)}else e.drawImage(r,i,a,o,s)}}function qV(e,t,n){var r,i=n.text;if(i!=null&&(i+=``),i){e.font=n.font||`12px sans-serif`,e.textAlign=n.textAlign,e.textBaseline=n.textBaseline;var a=void 0,o=void 0;e.setLineDash&&n.lineDash&&(r=LV(t),a=r[0],o=r[1]),a&&(e.setLineDash(a),e.lineDashOffset=o),n.strokeFirst?(zV(n)&&e.strokeText(i,n.x,n.y),VV(n)&&e.fillText(i,n.x,n.y)):(VV(n)&&e.fillText(i,n.x,n.y),zV(n)&&e.strokeText(i,n.x,n.y)),a&&e.setLineDash([])}}var JV=[`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`],YV=[[`lineCap`,`butt`],[`lineJoin`,`miter`],[`miterLimit`,10]];function XV(e,t,n,r,i){var a=!1;if(!r&&(n||={},t===n))return!1;if(r||t.opacity!==n.opacity){sH(e,i),a=!0;var o=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(o)?Eg.opacity:o}(r||t.blend!==n.blend)&&(a||=(sH(e,i),!0),e.globalCompositeOperation=t.blend||Eg.blend);for(var s=0;s<JV.length;s++){var c=JV[s];(r||t[c]!==n[c])&&(a||=(sH(e,i),!0),e[c]=e.dpr*(t[c]||0))}return(r||t.shadowColor!==n.shadowColor)&&(a||=(sH(e,i),!0),e.shadowColor=t.shadowColor||Eg.shadowColor),a}function ZV(e,t,n,r,i){var a=t.style,o=r?null:n&&n.style||{};if(a===o)return!1;var s=XV(e,a,o,r,i);if((r||a.fill!==o.fill)&&(s||=(sH(e,i),!0),BV(a.fill)&&(e.fillStyle=a.fill)),(r||a.stroke!==o.stroke)&&(s||=(sH(e,i),!0),BV(a.stroke)&&(e.strokeStyle=a.stroke)),(r||a.opacity!==o.opacity)&&(s||=(sH(e,i),!0),e.globalAlpha=a.opacity==null?1:a.opacity),t.hasStroke()){var c=a.lineWidth/(a.strokeNoScale&&t.getLineScale?t.getLineScale():1);e.lineWidth!==c&&(s||=(sH(e,i),!0),e.lineWidth=c)}for(var l=0;l<YV.length;l++){var u=YV[l],d=u[0];(r||a[d]!==o[d])&&(s||=(sH(e,i),!0),e[d]=a[d]||u[1])}return s}function QV(e,t,n,r,i){return XV(e,t.style,n&&n.style,r,i)}function $V(e,t){var 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 eH(e,t,n){for(var r=!1,i=0;i<e.length;i++){var a=e[i];r||=a.isZeroArea(),$V(t,a),t.beginPath(),a.buildPath(t,a.shape),t.clip()}n.allClipped=r}function tH(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)}var nH=1,rH=2,iH=3,aH=4;function oH(e){var t=VV(e),n=zV(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 sH(e,t){t.batchFill&&(t.batchFill=!1,e.fill()),t.batchStroke&&(t.batchStroke=!1,e.stroke())}function cH(e,t){var n={inHover:!1,viewWidth:0,viewHeight:0,beforeBrushParam:{}};lH(e,t,n),uH(e,n)}function lH(e,t,n){var r=t.transform;if(!t.shouldBePainted(n.viewWidth,n.viewHeight,!1,!1)){t.__dirty&=-2,t.__isRendered=!1;return}var i=t.__clipPaths,a=n.prevElClipPaths,o=t.style,s=!1,c=!1;if((!a||NV(i,a))&&(a&&(sH(e,n),e.restore(),c=s=!0,n.prevElClipPaths=null,n.allClipped=!1,n.prevEl=null),i&&i.length&&(sH(e,n),e.save(),eH(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();var l=n.prevEl;l||(c=s=!0);var u=t instanceof R_&&t.autoBatch&&oH(o);s||tH(r,l.transform)?(sH(e,n),$V(e,t)):u||sH(e,n),t instanceof R_?(n.lastDrawType!==nH&&(c=!0,n.lastDrawType=nH),ZV(e,t,l,c,n),(!u||!n.batchFill&&!n.batchStroke)&&e.beginPath(),GV(e,t,o,u,n)):t instanceof B_?(n.lastDrawType!==iH&&(c=!0,n.lastDrawType=iH),ZV(e,t,l,c,n),qV(e,t,o)):t instanceof W_?(n.lastDrawType!==rH&&(c=!0,n.lastDrawType=rH),QV(e,t,l,c,n),KV(e,t,o)):t.getTemporalDisplayables&&(n.lastDrawType!==aH&&(c=!0,n.lastDrawType=aH),dH(e,t,n)),t.innerAfterBrush(),t.afterBrush&&(u&&sH(e,n),t.afterBrush()),n.prevEl=t,t.__dirty=0,t.__isRendered=!0}function uH(e,t){sH(e,t),t.prevElClipPaths&&e.restore()}function dH(e,t,n){var r=t.getDisplayables(),i=t.getTemporalDisplayables();e.save();var 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++){var c=r[o];c.beforeBrush&&c.beforeBrush(n.beforeBrushParam),c.innerBeforeBrush(),lH(e,c,a),c.innerAfterBrush(),c.afterBrush&&c.afterBrush(),a.prevEl=c}uH(e,a);for(var l=0,u=i.length;l<u;l++){var c=i[l];c.beforeBrush&&c.beforeBrush(n.beforeBrushParam),c.innerBeforeBrush(),lH(e,c,a),c.innerAfterBrush(),c.afterBrush&&c.afterBrush(),a.prevEl=c}uH(e,a),t.clearTemporalDisplayables(),t.notClear=!0,e.restore()}var fH=new OV,pH=new _f(100),mH=[`symbol`,`symbolSize`,`symbolKeepAspect`,`color`,`backgroundColor`,`dashArrayX`,`dashArrayY`,`maxTileWidth`,`maxTileHeight`];function hH(e,t){if(e===`none`)return null;var n=t.getDevicePixelRatio(),r=t.getZr(),i=r.painter.type===`svg`;e.dirty&&fH.delete(e);var a=fH.get(e);if(a)return a;var o=sd(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);var s={repeat:`repeat`};return c(s),s.rotation=o.rotation,s.scaleX=s.scaleY=i?1:1/n,fH.set(e,s),e.dirty=!1,s;function c(e){for(var t=[n],a=!0,s=0;s<mH.length;++s){var c=o[mH[s]];if(c!=null&&!W(c)&&!K(c)&&!xd(c)&&typeof c!=`boolean`){a=!1;break}t.push(c)}var l;if(a){l=t.join(`,`)+(i?`-svg`:``);var u=pH.get(l);u&&(i?e.svgElement=u:e.image=u)}var d=_H(o.dashArrayX),f=vH(o.dashArrayY),p=gH(o.symbol),m=yH(d),h=bH(f),g=!i&&Bu.createCanvas(),_=i&&{tag:`g`,attrs:{},key:`dcl`,children:[]},v=b(),y;g&&(g.width=v.width*n,g.height=v.height*n,y=g.getContext(`2d`)),x(),a&&pH.put(l,g||_),e.image=g,e.svgElement=_,e.svgWidth=v.width,e.svgHeight=v.height;function b(){for(var e=1,t=0,n=m.length;t<n;++t)e=sy(e,m[t]);for(var r=1,t=0,n=p.length;t<n;++t)r=sy(r,p[t].length);e*=r;var i=h*m.length*p.length;return{width:Math.max(1,Math.min(e,o.maxTileWidth)),height:Math.max(1,Math.min(i,o.maxTileHeight))}}function x(){y&&(y.clearRect(0,0,g.width,g.height),o.backgroundColor&&(y.fillStyle=o.backgroundColor,y.fillRect(0,0,g.width,g.height)));for(var e=0,t=0;t<f.length;++t)e+=f[t];if(e<=0)return;for(var a=-h,s=0,c=0,l=0;a<v.height;){if(s%2==0){for(var u=c/2%p.length,m=0,b=0,x=0;m<v.width*2;){for(var S=0,t=0;t<d[l].length;++t)S+=d[l][t];if(S<=0)break;if(b%2==0){var C=(1-o.symbolSize)*.5,w=m+d[l][b]*C,T=a+f[s]*C,E=d[l][b]*o.symbolSize,D=f[s]*o.symbolSize,O=x/2%p[u].length;k(w,T,E,D,p[u][O])}m+=d[l][b],++x,++b,b===d[l].length&&(b=0)}++l,l===d.length&&(l=0)}a+=f[s],++c,++s,s===f.length&&(s=0)}function k(e,t,a,s,c){var l=i?1:n,u=Gk(c,e*l,t*l,a*l,s*l,o.color,o.symbolKeepAspect);if(i){var d=r.painter.renderOneToVNode(u);d&&_.children.push(d)}else cH(y,u)}}}}function gH(e){if(!e||e.length===0)return[[`rect`]];if(K(e))return[[e]];for(var t=!0,n=0;n<e.length;++n)if(!K(e[n])){t=!1;break}if(t)return gH([e]);for(var r=[],n=0;n<e.length;++n)K(e[n])?r.push([e[n]]):r.push(e[n]);return r}function _H(e){if(!e||e.length===0)return[[0,0]];if(xd(e)){var t=Math.ceil(e);return[[t,t]]}for(var n=!0,r=0;r<e.length;++r)if(!xd(e[r])){n=!1;break}if(n)return _H([e]);for(var i=[],r=0;r<e.length;++r)if(xd(e[r])){var t=Math.ceil(e[r]);i.push([t,t])}else{var t=U(e[r],function(e){return Math.ceil(e)});t.length%2==1?i.push(t.concat(t)):i.push(t)}return i}function vH(e){if(!e||typeof e==`object`&&e.length===0)return[0,0];if(xd(e)){var t=Math.ceil(e);return[t,t]}var n=U(e,function(e){return Math.ceil(e)});return e.length%2?n.concat(n):n}function yH(e){return U(e,function(e){return bH(e)})}function bH(e){for(var t=0,n=0;n<e.length;++n)t+=e[n];return e.length%2==1?t*2:t}var xH=fb(SH);function SH(e,t){e.eachRawSeries(function(n){if(!e.isSeriesFiltered(n)){var r=n.getData();r.hasItemVisual()&&r.each(function(e){var n=r.getItemVisual(e,`decal`);if(n){var i=r.ensureUniqueItemVisual(e,`style`);i.decal=hH(n,t)}});var i=r.getVisual(`decal`);if(i){var a=r.getVisual(`style`);a.decal=hH(i,t)}}})}var CH=`6.1.0`,wH={zrender:`6.1.0`},TH=1,EH=800,DH=900,OH=920,kH=1e3,AH=2e3,jH=5e3,MH=1e3,NH=1100,PH=2e3,FH=3e3,IH=4e3,LH=4500,RH=4600,zH=5e3,BH=6e3,VH=7e3,HH={PROCESSOR:{SERIES_FILTER:EH,AXIS_STATISTICS:OH,FILTER:kH,STATISTIC:jH,STATISTICS:jH},VISUAL:{LAYOUT:MH,PROGRESSIVE_LAYOUT:NH,GLOBAL:PH,CHART:FH,POST_CHART_LAYOUT:RH,COMPONENT:IH,BRUSH:zH,CHART_ITEM:LH,ARIA:BH,DECAL:VH}},UH=`__flagInMainProcess`,WH=`__mainProcessVersion`,GH=`__pendingUpdate`,KH=`__needsUpdateStatus`,qH=/^[a-zA-Z0-9_]+$/,JH=`__connectUpdateStatus`,YH=0,XH=1,ZH=2;function QH(e){return function(){var t=[...arguments];if(this.isDisposed()){this.id;return}return eU(this,e,t)}}function $H(e){return function(){var t=[...arguments];return eU(this,e,t)}}function eU(e,t,n){return n[0]=n[0]&&n[0].toLowerCase(),tg.prototype[t].apply(e,n)}var tU=function(e){z(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(tg),nU=tU.prototype;nU.on=$H(`on`),nU.off=$H(`off`);var rU,iU,aU,oU,sU,cU,lU,uU,dU,fU,pU,mU,hU,gU,_U,vU,yU,bU,xU,SU=function(e){z(t,e);function t(t,n,r){var i=e.call(this,new uV)||this;i._chartsViews=[],i._chartsMap={},i._componentsViews=[],i._componentsMap={},i._pendingActions=[],r||={},i.__v_skip=!0,i._dom=t;var a=`canvas`,o=`auto`,s=!1;i[WH]=1,r.ssr&&Pz(function(e){var t=pb(e),n=t.dataIndex;if(n!=null){var r=Y();return r.set(`series_index`,t.seriesIndex),r.set(`data_index`,n),t.ssrType&&r.set(`ssr_type`,t.ssrType),r}});var c=i._zr=Dz(t,{renderer:r.renderer||a,devicePixelRatio:r.devicePixelRatio,width:r.width,height:r.height,ssr:r.ssr,useDirtyRect:J(r.useDirtyRect,s),useCoarsePointer:J(r.useCoarsePointer,o),pointerSize:r.pointerSize});i._ssr=r.ssr,i._throttledZrFlush=mF(vd(c.flush,c),17),i._updateTheme(n),i._locale=dD(r.locale||lD),i._coordSysMgr=new vE;var l=i._api=_U(i);function u(e,t){return e.__prio-t.__prio}return JR(AU,u),JR(OU,u),i._scheduler=new GB(i,l,OU,AU),i._messageCenter=new tU,i._initEvents(),i.resize=vd(i.resize,i),c.animation.on(`frame`,i._onframe,i),fU(c,i),pU(c,i),Id(i),i}return t.prototype._onframe=function(){if(!this._disposed){var e=this._scheduler,t=this._model,n=this._api;if(bU(this),this[GH]){var r=this[GH].silent;this[UH]=!0,xU(this);try{rU(this),oU.update.call(this,null,this[GH].updateParams)}catch(e){throw this[UH]=!1,this[GH]=null,e}this._zr.flush(),this[UH]=!1,this[GH]=null,uU.call(this,r),dU.call(this,r)}else if(e.unfinished){var i=TH;do{e.unfinished=!1;var a=Bu.getTime();e.performSeriesTasks(t),e.performDataProcessorTasks(t),cU(this,t),e.performVisualTasks(t),gU(this,this._model,n,`remain`,{}),i-=Bu.getTime()-a}while(i>0&&e.unfinished);e.unfinished||this._zr.flush()}}},t.prototype.getDom=function(){return this._dom},t.prototype.getId=function(){return this.id},t.prototype.getZr=function(){return this._zr},t.prototype.isSSR=function(){return this._ssr},t.prototype.setOption=function(e,t,n){if(!this[UH]){if(this._disposed){this.id;return}var r,i,a;if(q(t)&&(n=t.lazyUpdate,r=t.silent,i=t.replaceMerge,a=t.transition,t=t.notMerge),this[UH]=!0,xU(this),!this._model||t){var o=new tB(this._api),s=this._theme,c=this._model=new Jz;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,s,this._locale,o)}this._model.setOption(e,{replaceMerge:i},kU);var l={seriesTransition:a,optionChanged:!0};if(n)this[GH]={silent:r,updateParams:l},this[UH]=!1,this.getZr().wakeUp();else{try{rU(this),oU.update.call(this,null,l)}catch(e){throw this[GH]=null,this[UH]=!1,e}this._ssr||this._zr.flush(),this[GH]=null,this[UH]=!1,uU.call(this,r),dU.call(this,r)}}},t.prototype.setTheme=function(e,t){if(!this[UH]){if(this._disposed){this.id;return}var n=this._model;if(n){var r=t&&t.silent,i=null;this[GH]&&(r??=this[GH].silent,i=this[GH].updateParams,this[GH]=null),this[UH]=!0,xU(this);try{this._updateTheme(e),n.setTheme(this._theme),rU(this),oU.update.call(this,{type:`setTheme`},i)}catch(e){throw this[UH]=!1,e}this[UH]=!1,uU.call(this,r),dU.call(this,r)}}},t.prototype._updateTheme=function(e){K(e)&&(e=jU[e]),e&&(e=B(e),e&&kB(e,!0),this._theme=e)},t.prototype.getModel=function(){return this._model},t.prototype.getOption=function(){return this._model&&this._model.getOption()},t.prototype.getWidth=function(){return this._zr.getWidth()},t.prototype.getHeight=function(){return this._zr.getHeight()},t.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||X.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(e){return this.renderToCanvas(e)},t.prototype.renderToCanvas=function(e){return e||={},this._zr.painter.getRenderedCanvas({backgroundColor:e.backgroundColor||this._model.get(`backgroundColor`),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(e){return e||={},this._zr.painter.renderToString({useViewBox:e.useViewBox})},t.prototype.getSvgDataURL=function(){var e=this._zr;return H(e.storage.getDisplayList(),function(e){e.stopAnimation(null,!0)}),e.painter.toDataURL()},t.prototype.getDataURL=function(e){if(this._disposed){this.id;return}e||={};var t=e.excludeComponents,n=this._model,r=[],i=this;H(t,function(e){n.eachComponent({mainType:e},function(e){var t=i._componentsMap[e.__viewId];t.group.ignore||(r.push(t),t.group.ignore=!0)})});var a=this._zr.painter.getType()===`svg`?this.getSvgDataURL():this.renderToCanvas(e).toDataURL(`image/`+(e&&e.type||`png`));return H(r,function(e){e.group.ignore=!1}),a},t.prototype.getConnectedDataURL=function(e){if(this._disposed){this.id;return}var t=e.type===`svg`,n=this.group,r=Math.min,i=Math.max,a=1/0;if(PU[n]){var o=a,s=a,c=-a,l=-a,u=[],d=e&&e.pixelRatio||this.getDevicePixelRatio();H(NU,function(a,d){if(a.group===n){var f=t?a.getZr().painter.getSvgDom().innerHTML:a.renderToCanvas(B(e)),p=a.getDom().getBoundingClientRect();o=r(p.left,o),s=r(p.top,s),c=i(p.right,c),l=i(p.bottom,l),u.push({dom:f,left:p.left,top:p.top})}}),o*=d,s*=d,c*=d,l*=d;var f=c-o,p=l-s,m=Bu.createCanvas(),h=Dz(m,{renderer:t?`svg`:`canvas`});if(h.resize({width:f,height:p}),t){var g=``;return H(u,function(e){var t=e.left-o,n=e.top-s;g+=`<g transform="translate(`+t+`,`+n+`)">`+e.dom+`</g>`}),h.painter.getSvgRoot().innerHTML=g,e.connectedBackgroundColor&&h.painter.setBackgroundColor(e.connectedBackgroundColor),h.refreshImmediately(),h.painter.toDataURL()}else return e.connectedBackgroundColor&&h.add(new Q_({shape:{x:0,y:0,width:f,height:p},style:{fill:e.connectedBackgroundColor}})),H(u,function(e){var t=new W_({style:{x:e.left*d-o,y:e.top*d-s,image:e.dom}});h.add(t)}),h.refreshImmediately(),m.toDataURL(`image/`+(e&&e.type||`png`))}else return this.getDataURL(e)},t.prototype.convertToPixel=function(e,t,n){return sU(this,`convertToPixel`,e,t,n)},t.prototype.convertToLayout=function(e,t,n){return sU(this,`convertToLayout`,e,t,n)},t.prototype.convertFromPixel=function(e,t,n){return sU(this,`convertFromPixel`,e,t,n)},t.prototype.containPixel=function(e,t){if(this._disposed){this.id;return}var n=this._model,r;return H(By(n,e),function(e,n){n.indexOf(`Models`)>=0&&H(e,function(e){var i=e.coordinateSystem;if(i&&i.containPoint)r||=!!i.containPoint(t);else if(n===`seriesModels`){var a=this._chartsMap[e.__viewId];a&&a.containPoint&&(r||=a.containPoint(t,e))}},this)},this),!!r},t.prototype.getVisual=function(e,t){var n=this._model,r=By(n,e,{defaultMainType:`series`}),i=r.seriesModel.getData(),a=r.hasOwnProperty(`dataIndexInside`)?r.dataIndexInside:r.hasOwnProperty(`dataIndex`)?i.indexOfRawIndex(r.dataIndex):null;return a==null?gV(i,t):hV(i,a,t)},t.prototype.getViewOfComponentModel=function(e){return this._componentsMap[e.__viewId]},t.prototype.getViewOfSeriesModel=function(e){return this._chartsMap[e.__viewId]},t.prototype._initEvents=function(){var e=this;H(wU,function(t){var n=function(n){var r=e.getModel(),i=n.target,a;if(t===`globalout`?a={}:i&&yV(i,function(e){var t=pb(e);if(t&&t.dataIndex!=null){var n=t.dataModel||r.getSeriesByIndex(t.seriesIndex);return a=n&&n.getDataParams(t.dataIndex,t.dataType,i)||{},!0}else if(t.eventData)return a=V({},t.eventData),!0},!0),a){var o=a.componentType,s=a.componentIndex;(o===`markLine`||o===`markPoint`||o===`markArea`)&&(o=`series`,s=a.seriesIndex);var c=o&&s!=null&&r.getComponent(o,s),l=c&&e[c.mainType===`series`?`_chartsMap`:`_componentsMap`][c.__viewId];a.event=n,a.type=t,e._$eventProcessor.eventInfo={targetEl:i,packedEvent:a,model:c,view:l},e.trigger(t,a)}};n.zrEventfulCallAtLast=!0,e._zr.on(t,n,e)});var t=this._messageCenter;H(DU,function(n,r){t.on(r,function(t){e.trigger(r,t)})}),vV(t,this,this._api)},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0,this.getDom()&&Gy(this.getDom(),LU,``);var e=this,t=e._api,n=e._model;H(e._componentsViews,function(e){e.dispose(n,t)}),H(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 NU[e.id]},t.prototype.resize=function(e){if(!this[UH]){if(this._disposed){this.id;return}this._zr.resize(e);var t=this._model;if(this._loadingFX&&this._loadingFX.resize(),t){var n=t.resetOption(`media`),r=e&&e.silent;this[GH]&&(r??=this[GH].silent,n=!0,this[GH]=null),this[UH]=!0,xU(this);try{n&&rU(this),oU.update.call(this,{type:`resize`,animation:V({duration:0},e&&e.animation)})}catch(e){throw this[UH]=!1,e}this[UH]=!1,uU.call(this,r),dU.call(this,r)}}},t.prototype.showLoading=function(e,t){if(this._disposed){this.id;return}if(q(e)&&(t=e,e=``),e||=`default`,this.hideLoading(),MU[e]){var n=MU[e](this._api,t),r=this._zr;this._loadingFX=n,r.add(n)}},t.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},t.prototype.makeActionFromEvent=function(e){var t=V({},e);return t.type=EU[e.type],t},t.prototype.dispatchAction=function(e,t){if(this._disposed){this.id;return}if(q(t)||(t={silent:!!t}),TU[e.type]&&this._model){if(this[UH]){this._pendingActions.push(e);return}var n=t.silent;lU.call(this,e,n);var r=t.flush;r?this._zr.flush():r!==!1&&X.browser.weChat&&this._throttledZrFlush(),uU.call(this,n),dU.call(this,n)}},t.prototype.updateLabelLayout=function(){bV.trigger(`series:layoutlabels`,this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed){this.id;return}var t=e.seriesIndex;this.getModel().getSeriesByIndex(t).appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()},t.internalField=function(){rU=function(e){VM(e._model);var t=e._scheduler;t.restorePipelines(e._zr,e._model),t.prepareStageTasks(),iU(e,!0),iU(e,!1),t.plan()},iU=function(e,t){for(var n=e._model,r=e._scheduler,i=t?e._componentsViews:e._chartsViews,a=t?e._componentsMap:e._chartsMap,o=e._zr,s=e._api,c=0;c<i.length;c++)i[c].__alive=!1;t?n.eachComponent(function(e,t){e!==`series`&&l(t)}):n.eachSeries(l);function l(e){var c=e.__requireNewView;e.__requireNewView=!1;var l=`_ec_`+e.id+`_`+e.type,u=!c&&a[l];if(!u){var d=ef(e.type);u=new(t?NB.getClass(d.main,d.sub):wA.getClass(d.sub)),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(var c=0;c<i.length;){var u=i[c];u.__alive?c++:(!t&&u.renderTask.dispose(),o.remove(u.group),u.dispose(n,s),i.splice(c,1),a[u.__id]===u&&delete a[u.__id],u.__id=u.group.__ecComponentInfo=null)}},aU=function(e,t,n,r,i){var a=e._model;if(a.setUpdatePayload(n),!r){H([].concat(e._componentsViews,e._chartsViews),l);return}var o=Wy(n,r,i),s=n.excludeSeriesId,c;s!=null&&(c=Y(),H(vy(s),function(e){var t=My(e,null);t!=null&&c.set(t,!0)})),a&&a.eachComponent(o,function(t){if(!(c&&c.get(t.id)!=null))if(Px(n))if(t instanceof Ak)n.type===`highlight`&&!n.notBlur&&!t.get([`emphasis`,`disabled`])&&hx(t,n,e._api);else{var r=gx(t.mainType,t.componentIndex,n.name,e._api),i=r.focusSelf,a=r.dispatchers;n.type===`highlight`&&i&&!n.notBlur&&mx(t.mainType,t.componentIndex,e._api),a&&H(a,function(e){n.type===`highlight`?ax(e):ox(e)})}else Nx(n)&&t instanceof Ak&&(yx(t,n,e._api),bx(t),yU(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)}},oU={prepareAndUpdate:function(e){rU(this),oU.update.call(this,e,e&&{optionChanged:e.newOption!=null})},update:function(e,n){var r=this._model,i=this._api,a=this._zr,o=this._coordSysMgr,s=this._scheduler;if(r){HM(r),r.setUpdatePayload(e),s.restoreData(r,e),s.performSeriesTasks(r),o.create(r,i),bV.trigger(`coordsys:aftercreate`,r,i),s.performDataProcessorTasks(r,e),cU(this,r),o.update(r,i),t(r),s.performVisualTasks(r,e);var c=r.get(`backgroundColor`)||`transparent`;a.setBackgroundColor(c);var l=r.get(`darkMode`);l!=null&&l!==`auto`&&a.setDarkMode(l),mU(this,r,i,e,n),bV.trigger(`afterupdate`,r,i)}},updateTransform:function(e){var t=this,n=t._model,r=t._api;if(n){n.setUpdatePayload(e);var i=[];n.eachComponent(function(a,o){if(a!==`series`){var s=t.getViewOfComponentModel(o);if(s&&s.__alive)if(s.updateTransform){var c=s.updateTransform(o,n,r,e);c&&c.update&&i.push(s)}else i.push(s)}});var a=Y();n.eachSeries(function(i){var o=t._chartsMap[i.__viewId],s=i.pipelineContext;if(o.updateTransform&&!s.progressiveRender){var c=o.updateTransform(i,n,r,e);c&&c.update&&a.set(i.uid,1)}else a.set(i.uid,1)}),t._scheduler.performVisualTasks(n,e,{setDirty:!0,dirtyMap:a}),gU(t,n,r,e,{},a),bV.trigger(`afterupdate`,n,r)}},updateView:function(e){var n=this._model;n&&(n.setUpdatePayload(e),wA.markUpdateMethod(e,`updateView`),t(n),this._scheduler.performVisualTasks(n,e,{setDirty:!0}),mU(this,n,this._api,e,{}),bV.trigger(`afterupdate`,n,this._api))},updateVisual:function(e){var n=this,r=this._model;r&&(r.setUpdatePayload(e),r.eachSeries(function(e){e.getData().clearAllVisual()}),wA.markUpdateMethod(e,`updateVisual`),t(r),this._scheduler.performVisualTasks(r,e,{visualType:`visual`,setDirty:!0}),r.eachComponent(function(t,i){if(t!==`series`){var a=n.getViewOfComponentModel(i);a&&a.__alive&&a.updateVisual(i,r,n._api,e)}}),r.eachSeries(function(t){n._chartsMap[t.__viewId].updateVisual(t,r,n._api,e)}),bV.trigger(`afterupdate`,r,this._api))},updateLayout:function(e){oU.update.call(this,e)}};function e(e,t,n,r,i){if(e._disposed){e.id;return}for(var a=e._model,o=e._coordSysMgr.getCoordinateSystems(),s,c=By(a,n),l=0;l<o.length;l++){var u=o[l];if(u[t]&&(s=u[t](a,c,r,i))!=null)return s}}sU=e,cU=function(e,t){var n=e._chartsMap,r=e._scheduler;t.eachSeries(function(e){r.updateStreamModes(e,n[e.__viewId])})},lU=function(e,t){var n=this,r=this.getModel(),i=e.type,a=e.escapeConnect,o=TU[i],s=(o.update||`update`).split(`:`),c=s.pop(),l=s[0]!=null&&ef(s[0]);this[UH]=!0,xU(this);var u=[e],d=!1;e.batch&&(d=!0,u=U(e.batch,function(t){return t=sd(V({},t),e),t.batch=null,t}));var f=[],p,m=[],h=o.nonRefinedEventType,g=Nx(e),_=Px(e);if(_&&fx(this._api),H(u,function(t){var i=o.action(t,r,n._api);if(o.refineEvent?m.push(i):p=i,p||=V({},t),p.type=h,f.push(p),_){var a=Vy(e),s=a.queryOptionMap,u=a.mainTypeSpecified?s.keys()[0]:`series`;aU(n,c,t,u),yU(n)}else g?(aU(n,c,t,`series`),yU(n)):l&&aU(n,c,t,l.main,l.sub)}),c!==`none`&&!_&&!g&&!l)try{this[GH]?(rU(this),oU.update.call(this,e),this[GH]=null):oU[c].call(this,e)}catch(e){throw this[UH]=!1,e}if(p=d?{type:h,escapeConnect:a,batch:f}:f[0],this[UH]=!1,!t){var v=void 0;if(o.refineEvent){var y=o.refineEvent(m,e,r,this._api).eventContent;Nd(q(y)),v=sd({type:o.refinedEventType},y),v.fromAction=e.type,v.fromActionPayload=e,v.escapeConnect=!0}var b=this._messageCenter;b.trigger(p.type,p),v&&b.trigger(v.type,v)}},uU=function(e){for(var t=this._pendingActions;t.length;){var n=t.shift();lU.call(this,n,e)}},dU=function(e){!e&&this.trigger(`updated`)},fU=function(e,t){e.on(`rendered`,function(n){t.trigger(`rendered`,n),e.animation.isFinished()&&!t[GH]&&!t._scheduler.unfinished&&!t._pendingActions.length?t.trigger(`finished`):e.refresh()})},pU=function(e,t){e.on(`mouseover`,function(e){var n=e.target,r=yV(n,jx);r&&(_x(r,e,t._api),yU(t))}).on(`mouseout`,function(e){var n=e.target,r=yV(n,jx);r&&(vx(r,e,t._api),yU(t))}).on(`click`,function(e){var n=e.target,r=yV(n,function(e){return pb(e).dataIndex!=null},!0);if(r){var i=r.selected?`unselect`:`select`,a=pb(r);t._api.dispatchAction({type:i,dataType:a.dataType,dataIndexInside:a.dataIndex,seriesIndex:a.seriesIndex,isFromClick:!0})}})};function t(e){e.clearColorPalette(),e.eachSeries(function(e){e.clearColorPalette()})}function n(e){var t=[],n=[],r=!1;if(e.eachComponent(function(e,i){var a=i.get(`zlevel`)||0,o=i.get(`z`)||0,s=i.getZLevelKey();r||=!!s,(e===`series`?n:t).push({zlevel:a,z:o,idx:i.componentIndex,type:e,key:s})}),r){var i=t.concat(n),a,o;JR(i,function(e,t){return e.zlevel===t.zlevel?e.z-t.z:e.zlevel-t.zlevel}),H(i,function(t){var n=e.getComponent(t.type,t.idx),r=t.zlevel,i=t.key;a!=null&&(r=Math.max(a,r)),i?(r===a&&i!==o&&r++,o=i):o&&=(r===a&&r++,``),a=r,n.setZLevel(r)})}}mU=function(e,t,r,i,a){n(t),hU(e,t,r,i,a),H(e._chartsViews,function(e){e.__alive=!1}),gU(e,t,r,i,a),H(e._chartsViews,function(e){e.__alive||e.remove(t,r)})},hU=function(e,t,n,r,i,a){H(a||e._componentsViews,function(e){var i=e.__model;s(i,e),e.render(i,t,n,r),o(i,e),c(i,e)})},gU=function(e,t,n,r,l,u){var d=e._scheduler;l=V(l||{},{updatedSeries:t.getSeries()}),bV.trigger(`series:beforeupdate`,t,n,l);var f=!1;t.eachSeries(function(t){var n=e._chartsMap[t.__viewId];n.__alive=!0;var i=n.renderTask;d.updatePayload(i,r),s(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),bx(t)}),d.unfinished=f||d.unfinished,bV.trigger(`series:layoutlabels`,t,n,l),bV.trigger(`series:transition`,t,n,l),t.eachSeries(function(t){var n=e._chartsMap[t.__viewId];o(t,n),c(t,n)}),i(e,t),bV.trigger(`series:afterupdate`,t,n,l)},yU=function(e){e[KH]=!0,e.getZr().wakeUp()},xU=function(e){e[WH]=(e[WH]+1)%1e6},bU=function(e){e[KH]&&(e.getZr().storage.traverse(function(e){lC(e)||r(e)}),e[KH]=!1)};function r(e){for(var t=[],n=e.currentStates,r=0;r<n.length;r++){var i=n[r];i===`emphasis`||i===`blur`||i===`select`||t.push(i)}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){var n=e._zr;if(n.painter.type===`canvas`){var r=n.storage,i=0;r.traverse(function(e){e.isGroup||i++});var a=i>J(t.get(`hoverLayerThreshold`),Bz.hoverLayerThreshold)&&!X.node&&!X.worker;(e._usingTHL||a)&&(t.eachSeries(function(t){if(!t.preventUsingHoverLayer){var n=e._chartsMap[t.__viewId];n.__alive&&n.eachRendered(function(e){var t=e.states.emphasis;t&&t.hoverLayer!==2&&(t.hoverLayer=+!!a)})}}),e._usingTHL=a)}}function a(e,t){var n=e.get(`blendMode`)||null;t.eachRendered(function(e){e.isGroup||(e.style.blend=n)})}function o(e,t){if(!e.preventAutoZ){var n=ew(e);t.eachRendered(function(e){return nw(e,n.z,n.zlevel),!0})}}function s(e,t){t.eachRendered(function(e){if(!lC(e)){var t=e.getTextContent(),n=e.getTextGuideLine();e.stateTransition&&=null,t&&t.stateTransition&&(t.stateTransition=null),n&&n.stateTransition&&(n.stateTransition=null),e.hasState()?(e.prevStates=e.currentStates,e.clearStates()):e.prevStates&&=null}})}function c(e,t){var 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(lC(e))return;if(e instanceof R_&&Fx(e),e.__dirty){var t=e.prevStates;t&&e.useStates(t)}if(i){e.stateTransition=o;var n=e.getTextContent(),a=e.getTextGuideLine();n&&(n.stateTransition=o),a&&(a.stateTransition=o)}e.__dirty&&r(e)}})}_U=function(e){return new(function(t){z(n,t);function n(){return t!==null&&t.apply(this,arguments)||this}return n.prototype.getCoordinateSystems=function(){return e._coordSysMgr.getCoordinateSystems()},n.prototype.getComponentByElement=function(t){for(;t;){var n=t.__ecComponentInfo;if(n!=null)return e._model.getComponent(n.mainType,n.index);t=t.parent}},n.prototype.enterEmphasis=function(t,n){ax(t,n),yU(e)},n.prototype.leaveEmphasis=function(t,n){ox(t,n),yU(e)},n.prototype.enterBlur=function(t){sx(t),yU(e)},n.prototype.leaveBlur=function(t){cx(t),yU(e)},n.prototype.enterSelect=function(t){lx(t),yU(e)},n.prototype.leaveSelect=function(t){ux(t),yU(e)},n.prototype.getModel=function(){return e.getModel()},n.prototype.getViewOfComponentModel=function(t){return e.getViewOfComponentModel(t)},n.prototype.getViewOfSeriesModel=function(t){return e.getViewOfSeriesModel(t)},n.prototype.getECUpdateCycleVersion=function(){return e[WH]},n.prototype.usingTHL=function(){return e._usingTHL},n}(Eb))(e)},vU=function(e){function t(e,t){for(var n=0;n<e.length;n++){var r=e[n];r[JH]=t}}H(EU,function(n,r){e._messageCenter.on(r,function(n){if(PU[e.group]&&e[JH]!==YH){if(n&&n.escapeConnect)return;var r=e.makeActionFromEvent(n),i=[];H(NU,function(t){t!==e&&t.group===e.group&&i.push(t)}),t(i,YH),H(i,function(e){e[JH]!==XH&&e.dispatchAction(r)}),t(i,ZH)}})})}}(),t}(tg),CU=SU.prototype;CU.on=QH(`on`),CU.off=QH(`off`),CU.one=function(e,t,n){var r=this;function i(){var n=[...arguments];t&&t.apply&&t.apply(this,n),r.off(e,i)}this.on.call(this,e,i,n)};var wU=[`click`,`dblclick`,`mouseover`,`mouseout`,`mousemove`,`mousedown`,`mouseup`,`globalout`,`contextmenu`],TU={},EU={},DU={},OU=[],kU=[],AU=[],jU={},MU={},NU={},PU={},FU=new Date-0,IU=new Date-0,LU=`_echarts_instance_`;function RU(e,t,n){var r=!(n&&n.ssr);if(r){var i=UU(e);if(i)return i}var a=new SU(e,t,n);return a.id=`ec_`+FU++,NU[a.id]=a,r&&Gy(e,LU,a.id),vU(a),bV.trigger(`afterinit`,a),a}function zU(e){if(W(e)){var t=e;e=null,H(t,function(t){t.group!=null&&(e=t.group)}),e||=`g_`+IU++,H(t,function(t){t.group=e})}return PU[e]=!0,e}function BU(e){PU[e]=!1}var VU=BU;function HU(e){K(e)?e=NU[e]:e instanceof SU||(e=UU(e)),e instanceof SU&&!e.isDisposed()&&e.dispose()}function UU(e){return NU[Ky(e,LU)]}function WU(e){return NU[e]}function GU(e,t){jU[e]=t}function KU(e){ld(kU,e)<0&&kU.push(e)}function qU(e,t){iW(OU,e,t,AH)}function JU(e){XU(`afterinit`,e)}function YU(e){XU(`afterupdate`,e)}function XU(e,t){bV.on(e,t)}function ZU(e,t,n){var r,i,a,o,s;G(t)&&(n=t,t=``),q(e)?(r=e.type,i=e.event,o=e.update,s=e.publishNonRefinedEvent,n||=e.action,a=e.refineEvent):(r=e,i=t);function c(e){return e.toLowerCase()}i=c(i||r);var l=a?c(r):i;TU[r]||(Nd(qH.test(r)&&qH.test(i)),a&&Nd(i!==r),TU[r]={actionType:r,refinedEventType:i,nonRefinedEventType:l,update:o,action:n,refineEvent:a},DU[i]=1,a&&s&&(DU[l]=1),EU[l]=r)}function QU(e,t){vE.register(e,t)}function $U(e){var t=vE.get(e);if(t)return t.getDimensionsInfo?t.getDimensionsInfo():t.dimensions.slice()}function eW(e,t){TV(e,t)}function tW(e,t){iW(AU,e,t,MH,`layout`,!0)}function nW(e,t){iW(AU,e,t,FH,`visual`,!0)}var rW=[];function iW(e,t,n,r,i,a){if((G(t)||q(t))&&(n=t,t=r),!(ld(rW,n)>=0)){rW.push(n);var o=GB.wrapStageHandler(n,i);o.__prio=t,o.__raw=n,e.push(o)}}function aW(e,t){MU[e]=t}function oW(e){Vu({createCanvas:e})}function sW(e,t,n){var r=CV(`registerMap`);r&&r(e,t,n)}function cW(e){var t=CV(`getMap`);return t&&t(e)}var lW=YO;nW(PH,zB),nW(LH,VB),nW(LH,HB),nW(PH,pV),nW(LH,mV),nW(VH,xH),KU(kB),qU(DH,AB),aW(`default`,WB),ZU({type:Pb,event:Pb,update:Pb},Kd),ZU({type:Fb,event:Fb,update:Fb},Kd),ZU({type:Ib,event:zb,update:Ib,action:Kd,refineEvent:uW,publishNonRefinedEvent:!0}),ZU({type:Lb,event:zb,update:Lb,action:Kd,refineEvent:uW,publishNonRefinedEvent:!0}),ZU({type:Rb,event:zb,update:Rb,action:Kd,refineEvent:uW,publishNonRefinedEvent:!0});function uW(e,t,n,r){return{eventContent:{selected:xx(n),isFromClick:t.isFromClick||!1}}}GU(`default`,{}),GU(`dark`,lV);var dW={},fW=Ry();function pW(e,t){return!!fW(e)[t]}ZU({type:`takeGlobalCursor`,event:`globalCursorTaken`,update:`update`},Kd);var mW={axisPointer:1,tooltip:1,brush:1};function hW(e,t,n){var r=t.getComponentByElement(e.topTarget);if(!r||r===n||mW.hasOwnProperty(r.mainType))return!1;var i=r.coordinateSystem;if(!i||i.model===n)return!1;var a=ew(r),o=ew(n);return!((a.zlevel-o.zlevel||a.z-o.z)<=0)}var gW=function(e){z(t,e);function t(t){var n=e.call(this)||this;n._zr=t;var r=vd(n._mousedownHandler,n),i=vd(n._mousemoveHandler,n),a=vd(n._mouseupHandler,n),o=vd(n._mousewheelHandler,n),s=vd(n._pinchHandler,n);return n.enable=function(e,n){var c=n.zInfo,l=ew(c.component),u=l.z,d=l.zlevel,f={component:c.component,z:u,zlevel:d,z2:J(c.z2,-1/0)},p=V({},n.triggerInfo);this._opt=sd(V({},n),{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0,zInfoParsed:f,triggerInfo:p,cursorGrab:`grab`,cursorGrabbing:`grabbing`}),e??=!0,(!this._enabled||this._controlType!==e)&&(this.disable(),this._enabled=!0,(e===!0||e===`move`||e===`pan`)&&(bW(t,`mousedown`,r,f),bW(t,`mousemove`,i,f),bW(t,`mouseup`,a,f)),(e===!0||e===`scale`||e===`zoom`)&&(bW(t,`mousewheel`,o,f),bW(t,`pinch`,s,f)))},n.disable=function(){this._enabled&&(this._enabled=!1,xW(t,`mousedown`,r),xW(t,`mousemove`,i),xW(t,`mouseup`,a),xW(t,`mousewheel`,o),xW(t,`pinch`,s))},n}return t.prototype.isDragging=function(){return this._dragging},t.prototype.isPinching=function(){return this._pinching},t.prototype._checkPointer=function(e,t,n){var r=this._opt,i=r.zInfoParsed;if(hW(e,r.api,i.component))return!1;var a=r.triggerInfo,o=a.roamTrigger,s=!1;return o===`global`&&(s=!0),s||=a.isInSelf(e,t,n),s&&a.isInClip&&!a.isInClip(e,t,n)&&(s=!1),s},t.prototype._decideCursorStyle=function(e,t,n,r){var i=e.target;if(!i&&this._checkPointer(e,t,n))return this._opt.cursorGrab;if(r)return i&&i.cursor||`default`},t.prototype.dispose=function(){this.disable()},t.prototype._mousedownHandler=function(e){if(!(xR(e)||_W(e))){for(var t=e.target;t;){if(t.draggable)return;t=t.__hostTarget||t.parent}var n=e.offsetX,r=e.offsetY;this._checkPointer(e,n,r)&&(this._x=n,this._y=r,this._dragging=!0)}},t.prototype._mousemoveHandler=function(e){var t=this._zr;if(!(e.gestureEvent===`pinch`||pW(t,`globalPan`)||_W(e))){var n=e.offsetX,r=e.offsetY;if(!this._dragging||!TW(`moveOnMouseMove`,e,this._opt)){var i=this._decideCursorStyle(e,n,r,!1);i&&t.setCursorStyle(i);return}t.setCursorStyle(this._opt.cursorGrabbing);var a=this._x,o=this._y,s=n-a,c=r-o;this._x=n,this._y=r,this._opt.preventDefaultMouseMove&&bR(e.event),e.__ecRoamConsumed=!0,wW(this,`pan`,`moveOnMouseMove`,e,{dx:s,dy:c,oldX:a,oldY:o,newX:n,newY:r,isAvailableBehavior:null})}},t.prototype._mouseupHandler=function(e){if(!_W(e)){var t=this._zr;if(!xR(e)){this._dragging=!1;var n=this._decideCursorStyle(e,e.offsetX,e.offsetY,!0);n&&t.setCursorStyle(n)}}},t.prototype._mousewheelHandler=function(e){if(!_W(e)){var t=TW(`zoomOnMouseWheel`,e,this._opt),n=TW(`moveOnMouseWheel`,e,this._opt),r=e.wheelDelta,i=Math.abs(r),a=e.offsetX,o=e.offsetY;if(!(r===0||!t&&!n)){if(t){var s=i>3?1.4:i>1?1.2:1.1,c=r>0?s:1/s;this._checkTriggerMoveZoom(this,`zoom`,`zoomOnMouseWheel`,e,{scale:c,originX:a,originY:o,isAvailableBehavior:null})}if(n){var l=Math.abs(r),u=(r>0?1:-1)*(l>3?.4:l>1?.15:.05);this._checkTriggerMoveZoom(this,`scrollMove`,`moveOnMouseWheel`,e,{scrollDelta:u,originX:a,originY:o,isAvailableBehavior:null})}}}},t.prototype._pinchHandler=function(e){if(!(pW(this._zr,`globalPan`)||_W(e))){var 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})}},t.prototype._checkTriggerMoveZoom=function(e,t,n,r,i){e._checkPointer(r,i.originX,i.originY)&&(bR(r.event),r.__ecRoamConsumed=!0,wW(e,t,n,r,i))},t}(tg);function _W(e){return e.__ecRoamConsumed}var vW=Ry();function yW(e){var t=vW(e);return t.roam=t.roam||{},t.uniform=t.uniform||{},t}function bW(e,t,n,r){for(var i=yW(e).roam,a=i[t]=i[t]||[],o=0;o<a.length;o++){var s=a[o].zInfoParsed;if((s.zlevel-r.zlevel||s.z-r.z||s.z2-r.z2)<=0)break}a.splice(o,0,{listener:n,zInfoParsed:r}),SW(e,t)}function xW(e,t,n){for(var r=yW(e).roam[t]||[],i=0;i<r.length;i++)if(r[i].listener===n){r.splice(i,1),r.length||CW(e,t);return}}function SW(e,t){var n=yW(e);n.uniform[t]||e.on(t,n.uniform[t]=function(e){var r=n.roam[t];if(r)for(var i=0;i<r.length;i++)r[i].listener(e)})}function CW(e,t){var n=yW(e).uniform;n[t]&&(e.off(t,n[t]),n[t]=null)}function wW(e,t,n,r,i){i.isAvailableBehavior=vd(TW,null,n,r),e.trigger(t,i)}function TW(e,t,n){var r=n[e];return!e||r&&(!K(r)||t.event[r+`Key`])}var EW=[],DW=[],OW=[],kW=Wm,AW=$f,jW=Math.abs;function MW(e,t,n){for(var r=e[0],i=e[1],a=e[2],o=1/0,s,c=n*n,l=.1,u=.1;u<=.9;u+=.1){EW[0]=kW(r[0],i[0],a[0],u),EW[1]=kW(r[1],i[1],a[1],u);var d=jW(AW(EW,t)-c);d<o&&(o=d,s=u)}for(var f=0;f<32;f++){var p=s+l;DW[0]=kW(r[0],i[0],a[0],s),DW[1]=kW(r[1],i[1],a[1],s),OW[0]=kW(r[0],i[0],a[0],p),OW[1]=kW(r[1],i[1],a[1],p);var d=AW(DW,t)-c;if(jW(d)<.01)break;var m=AW(OW,t)-c;l/=2,d<0?m>=0?s+=l:s-=l:m>=0?s-=l:s+=l}return s}function NW(e,t){var n=[],r=Jm,i=[[],[],[]],a=[[],[]],o=[];t/=2,e.eachEdge(function(e,s){var c=e.getLayout(),l=e.getVisual(`fromSymbol`),u=e.getVisual(`toSymbol`);c.__original||(c.__original=[If(c[0]),If(c[1])],c[2]&&c.__original.push(If(c[2])));var d=c.__original;if(c[2]!=null){if(Ff(i[0],d[0]),Ff(i[1],d[2]),Ff(i[2],d[1]),l&&l!==`none`){var f=OL(e.node1),p=MW(i,d[0],f*t);r(i[0][0],i[1][0],i[2][0],p,n),i[0][0]=n[3],i[1][0]=n[4],r(i[0][1],i[1][1],i[2][1],p,n),i[0][1]=n[3],i[1][1]=n[4]}if(u&&u!==`none`){var f=OL(e.node2),p=MW(i,d[1],f*t);r(i[0][0],i[1][0],i[2][0],p,n),i[1][0]=n[1],i[2][0]=n[2],r(i[0][1],i[1][1],i[2][1],p,n),i[1][1]=n[1],i[2][1]=n[2]}Ff(c[0],i[0]),Ff(c[1],i[2]),Ff(c[2],i[1])}else{if(Ff(a[0],d[0]),Ff(a[1],d[1]),Bf(o,a[1],a[0]),Yf(o,o),l&&l!==`none`){var f=OL(e.node1);zf(a[0],a[0],o,f*t)}if(u&&u!==`none`){var f=OL(e.node2);zf(a[1],a[1],o,-f*t)}Ff(c[0],a[0]),Ff(c[1],a[1])}})}var PW=Ry();function FW(e){if(e)return PW(e).bridge}var IW=function(e){z(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=vL,t}return t.prototype.init=function(e,t){var n=new rA,r=new aR,i=this.group,a=new iS;this._controller=new gW(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},t.prototype.render=function(e,t,n){var r=this,i=aL(e),a=!1;this._model=e,this._api=n,this._active=!0;var o=this._mainGroup,s=this._getThumbnailInfo();s&&s.bridge.reset(n);var c=this._symbolDraw,l=this._lineDraw;i&&eL(o,2,i,this._firstRender?null:e),NW(e.getGraph(),DL(e));var u=e.getData();c.updateData(u);var d=e.getEdgeData();l.updateData(d),this._updateNodeAndLinkScale(),i&&BL(e,n,this._controller,function(t,n,r){return e.coordinateSystem.containPoint([n,r])},null),clearTimeout(this._layoutTimeout);var f=e.forceLayout,p=e.get([`force`,`layoutAnimation`]);f&&(a=!0,this._startForceLayoutIteration(f,n,p));var m=e.get(`layout`);u.graph.eachNode(function(t){var i=t.dataIndex,a=t.getGraphicEl(),o=t.getModel();if(a){a.off(`drag`).off(`dragend`);var s=o.get(`draggable`);s&&a.on(`drag`,function(o){switch(m){case`force`:f.warmUp(),!r._layouting&&r._startForceLayoutIteration(f,n,p),f.setFixed(i),u.setItemLayout(i,[a.x,a.y]);break;case`circular`:u.setItemLayout(i,[a.x,a.y]),t.setLayout({fixed:!0},!0),jL(e,`symbolSize`,t,[o.offsetX,o.offsetY]),r.updateLayout(e);break;default:u.setItemLayout(i,[a.x,a.y]),wL(e.getGraph(),e),r.updateLayout(e);break}}).on(`dragend`,function(){f&&f.setUnfixed(i)}),a.setDraggable(s,!!o.get(`cursor`)),o.get([`emphasis`,`focus`])===`adjacency`&&(pb(a).focus=t.getAdjacentDataIndices())}}),u.graph.eachEdge(function(e){var t=e.getGraphicEl(),n=e.getModel().get([`emphasis`,`focus`]);t&&n===`adjacency`&&(pb(t).focus={edge:[e.dataIndex],node:[e.node1.dataIndex,e.node2.dataIndex]})});var h=e.get(`layout`)===`circular`&&e.get([`circular`,`rotateLabel`]),g=u.getLayout(`cx`),_=u.getLayout(`cy`);u.graph.eachNode(function(e){NL(e,h,g,_)}),this._firstRender=!1,a||this._renderThumbnail(e,n,this._symbolDraw,this._lineDraw)},t.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose()},t.prototype._startForceLayoutIteration=function(e,t,n){var 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())})})()},t.prototype.__updateOnOwnRoam=function(e,t,n){var r=aL(t);!this._active||!r||(eL(this._mainGroup,2,r,null),UL(e)&&(this._updateNodeAndLinkScale(),NW(t.getGraph(),DL(t)),this._lineDraw.updateLayout(),n.updateLabelLayout()),this._updateThumbnailWindow())},t.prototype._updateNodeAndLinkScale=function(){var e=this._model,t=e.getData(),n=DL(e);t.eachItemGraphicEl(function(e,t){e&&e.setSymbolScale(n)})},t.prototype.updateLayout=function(e){this._active&&(NW(e.getGraph(),DL(e)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout())},t.prototype.remove=function(){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()},t.prototype._getThumbnailInfo=function(){var e=this._model,t=e.coordinateSystem;if(t.type===`view`){var n=FW(e);if(n)return{bridge:n,coordSys:t}}},t.prototype._updateThumbnailWindow=function(){var e=this._getThumbnailInfo();e&&e.bridge.updateWindow(OI(null,e.coordSys),this._api)},t.prototype._renderThumbnail=function(e,t,n,r){var i=this._getThumbnailInfo();if(i){var a=new iS,o=n.group.children(),s=r.group.children(),c=new iS,l=new iS;a.add(l),a.add(c);for(var u=0;u<o.length;u++){var d=o[u],f=d.children()[0],p=d.x,m=d.y,h=V(B(f.shape),{width:f.scaleX,height:f.scaleY,x:p-f.scaleX/2,y:m-f.scaleY/2}),g=B(f.style),_=new f.constructor({shape:h,style:g,z2:151});l.add(_)}for(var u=0;u<s.length;u++){var d=s[u],v=d.children()[0],g=B(v.style),h=B(v.shape),y=new ZL({style:g,shape:h,z2:151});c.add(y)}i.bridge.renderContent({api:t,roamType:e.get(`roam`),viewportRect:null,group:a,targetTrans:OI(null,i.coordSys)})}},t.type=vL,t}(wA),LW=db(vL,RW);function RW(e){var t=e.findComponents({mainType:`legend`});!t||!t.length||e.eachSeriesByType(vL,function(e){var n=e.getCategoriesData(),r=e.getGraph().data,i=n.mapArray(n.getName);r.filterSelf(function(e){var n=r.getItemModel(e).getShallow(`category`);if(n!=null){xd(n)&&(n=i[n]);for(var a=0;a<t.length;a++)if(!t[a].isSelected(n))return!1}return!0})})}var zW=db(vL,BW);function BW(e){var t={};e.eachSeriesByType(vL,function(e){var n=e.getCategoriesData(),r=e.getData(),i={};n.each(function(r){var a=n.getName(r);i[`ec-`+a]=r;var o=n.getItemModel(r),s=o.getModel(`itemStyle`).getItemStyle();s.fill||=e.getColorFromPalette(a,t),n.setItemVisual(r,`style`,s);for(var c=[`symbol`,`symbolSize`,`symbolKeepAspect`],l=0;l<c.length;l++){var u=o.getShallow(c[l],!0);u!=null&&n.setItemVisual(r,c[l],u)}}),n.count()&&r.each(function(e){var t=r.getItemModel(e).getShallow(`category`);if(t!=null){K(t)&&(t=i[`ec-`+t]);var a=n.getItemVisual(t,`style`);V(r.ensureUniqueItemVisual(e,`style`),a);for(var o=[`symbol`,`symbolSize`,`symbolKeepAspect`],s=0;s<o.length;s++)r.setItemVisual(e,o[s],n.getItemVisual(t,o[s]))}})})}function VW(e){e.registerChartView(IW),e.registerSeriesModel(yL),e.registerProcessor(LW),e.registerVisual(zW),e.registerVisual(xL),e.registerLayout(TL),e.registerLayout(e.PRIORITY.VISUAL.POST_CHART_LAYOUT,PL),e.registerLayout(RL),e.registerCoordinateSystem(`graphView`,{dimensions:EI.dimensions,create:KL}),e.registerAction({type:`focusNodeAdjacency`,event:`focusNodeAdjacency`,update:`series:focusNodeAdjacency`},Kd),e.registerAction({type:`unfocusNodeAdjacency`,event:`unfocusNodeAdjacency`,update:`series:unfocusNodeAdjacency`},Kd),VL(e,hb,vL)}var HW=function(){function e(){}return e.prototype.needIncludeZero=function(){return!this.option.scale},e.prototype.getCoordSysModel=function(){},e}(),UW=function(e){z(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents(`grid`,Hy).models[0]},t.type=`cartesian2dAxis`,t}(kO);dd(UW,HW);var WW={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`}},GW=id({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:`auto`,show:`auto`},axisLabel:{interval:`auto`}},WW),KW=id({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}}},WW),qW={category:GW,value:KW,time:id({splitNumber:6,axisLabel:{rich:{primary:{fontWeight:`bold`}}},splitLine:{show:!1}},KW),log:sd({logBase:10},KW)};function JW(e,t,n,r){H(jj,function(i,a){var o=id(id({},qW[a],!0),r,!0),s=function(e){z(n,e);function n(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t+`Axis.`+a,n}return n.prototype.mergeDefaultAndTheme=function(e,t){var n=wO(this),r=n?EO(e):{};id(e,t.getTheme().get(a+`Axis`)),id(e,this.getDefaultOption()),e.type=YW(e),n&&TO(e,r,n)},n.prototype.optionUpdated=function(){this.option.type===`category`&&(this.__ordinalMeta=IA.createByAxisModel(this))},n.prototype.getCategories=function(e){var t=this.option;if(t.type===`category`)return e?t.data:this.__ordinalMeta.categories},n.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},n.prototype.updateAxisBreaks=function(e){var t=IN();return t?t.updateModelAxisBreak(this,e):{breaks:[]}},n.type=t+`Axis.`+a,n.defaultOption=o,n}(n);e.registerComponentModel(s)}),e.registerSubTypeDefaulter(t+`Axis`,YW)}function YW(e){return e.type||(e.data?`category`:`value`)}var XW=function(){function e(e){this.type=`cartesian`,this._dimList=[],this._axes={},this.name=e||``}return e.prototype.getAxis=function(e){return this._axes[e]},e.prototype.getAxes=function(){return U(this._dimList,function(e){return this._axes[e]},this)},e.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),md(this.getAxes(),function(t){return t.scale.type===e})},e.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},e}(),ZW=[`x`,`y`];function QW(e){return(e.type===`interval`||e.type===`time`)&&!vD(e)}var $W=function(e){z(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=XP,t.dimensions=ZW,t}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis(`x`).scale,t=this.getAxis(`y`).scale;if(!(!QW(e)||!QW(t))){var n=UA(e,null),r=UA(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)){var c=(a[0]-i[0])/o,l=(a[1]-i[1])/s,u=i[0]-n[0]*c,d=i[1]-r[0]*l,f=this._transform=[c,0,0,l,u,d];this._invTransform=jf([],f)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale(`ordinal`)[0]||this.getAxesByScale(`time`)[0]||this.getAxis(`x`)},t.prototype.containPoint=function(e){var t=this.getAxis(`x`),n=this.getAxis(`y`);return t.contain(t.toLocalCoord(e[0]))&&n.contain(n.toLocalCoord(e[1]))},t.prototype.containData=function(e){return this.getAxis(`x`).containData(e[0])&&this.getAxis(`y`).containData(e[1])},t.prototype.containZone=function(e,t){var n=this.dataToPoint(e),r=this.dataToPoint(t),i=this.getArea(),a=new Z(n[0],n[1],r[0]-n[0],r[1]-n[1]);return i.intersect(a)},t.prototype.dataToPoint=function(e,t,n){n||=[];var r=e[0],i=e[1];if(this._transform&&r!=null&&isFinite(r)&&i!=null&&isFinite(i))return np(n,e,this._transform);var a=this.getAxis(`x`),o=this.getAxis(`y`);return n[0]=a.toGlobalCoord(a.dataToCoord(r,t)),n[1]=o.toGlobalCoord(o.dataToCoord(i,t)),n},t.prototype.clampData=function(e,t){var n=this.getAxis(`x`).scale,r=this.getAxis(`y`).scale,i=n.getExtent(),a=r.getExtent(),o=n.parse(e[0]),s=r.parse(e[1]);return t||=[],t[0]=Math.min(Math.max(Math.min(i[0],i[1]),o),Math.max(i[0],i[1])),t[1]=Math.min(Math.max(Math.min(a[0],a[1]),s),Math.max(a[0],a[1])),t},t.prototype.pointToData=function(e,t,n){if(n||=[],this._invTransform)return np(n,e,this._invTransform);var r=this.getAxis(`x`),i=this.getAxis(`y`);return n[0]=r.coordToData(r.toLocalCoord(e[0]),t),n[1]=i.coordToData(i.toLocalCoord(e[1]),t),n},t.prototype.getOtherAxis=function(e){return this.getAxis(e.dim===`x`?`y`:`x`)},t.prototype.getArea=function(e){e||=0;var t=this.getAxis(`x`).getGlobalExtent(),n=this.getAxis(`y`).getGlobalExtent(),r=Math.min(t[0],t[1])-e,i=Math.min(n[0],n[1])-e;return new Z(r,i,Math.max(t[0],t[1])-r+e,Math.max(n[0],n[1])-i+e)},t}(XW);function eG(e,t){var n=e.scale,r=e.model,i=LP(n,r,r.ecModel,e,null),a=QA(n),o=QA(t)?t.intervalStub:t,s=a?n.intervalStub:n,c=n.base,l=o.getTicks(),u=o.getTicks({expandToNicedExtent:!0}),d=l.length-1,f,p,m;if(d===1)f=p=0,m=1;else if(d===2){var h=Sv(l[0].value-l[1].value),g=Sv(l[1].value-l[2].value);f=p=0,h===g?m=2:(m=1,h<g?f=h/g:p=g/h)}else{var _=o.getConfig().interval;f=(1-(l[0].value-u[0].value)/_)%1,p=(1-(u[d].value-l[d].value)/_)%1,m=d-+!!f-!!p}var v=i.zoomFixMM,y=v[0]||v[1],b=[i.fixMM[0]||y,i.fixMM[1]||y],x=n.getExtent(),S=s.getExtent(),C=ij(S,b),w,T,E,D,O,k;function A(e){for(var t=50,n=0;n<t&&!e();n++)E=a?E*xv(c,2):ej(E),D=tj(E)}function j(){w=Lv(k-E*f,D)}function M(){T=Lv(O+E*p,D)}function N(){k=f?Lv(w+E*f,D):w}function P(){O=p?Lv(T-E*p,D):T}if(b[0]&&b[1]){w=C[0],T=C[1],E=(T-w)/(m+f+p);var ee=e.getExtent(),te=Sv(ee[1]-ee[0]);D=Uv([T,w],te,.5/m),N(),P(),cy(D)&&(E=Lv(E,D))}else{var ne=C[1]-C[0];E=a?xv(Qv(ne),1):ey(ne/m,2),D=tj(E),b[0]?(w=C[0],A(function(){if(N(),O=Lv(k+E*m,D),M(),T>=C[1])return!0})):b[1]?(T=C[1],A(function(){if(P(),k=Lv(O-E*m,D),j(),w<=C[0])return!0})):A(function(){k=Lv(Tv(C[0]/E)*E,D),O=Lv(wv(C[1]/E)*E,D);var e=Cv((O-k)/E);if(e<=m){var t=m-e,n=void 0,r=i.incl0||a;if(r&&C[0]===0)n=[0,t];else if(r&&C[1]===0)n=[t,0];else{var o=wv(t/2);n=t%2==0?[o,o]:w+T<C[0]+C[1]?[o,o+1]:[o+1,o]}if(k=Lv(k-E*n[0],D),O=Lv(O+E*n[1],D),j(),M(),w<=C[0]&&T>=C[1])return!0}})}qj(n,b,S,[w,T],x,{interval:E,intervalCount:m,intervalPrecision:D,niceExtent:[k,O]})}function tG(e,t){var n=QA(e),r=n?e.intervalStub:e,i=t.fixMinMax||[],a=n?e.getExtent():null,o=r.getExtent(),s=ij(o,i,t.rawExtentResult);r.setExtent(s[0],s[1]),s=r.getExtent();var c=n?rG(r,t):nG(r,t),l=c.intervalPrecision,u=c.interval,d=t.userInterval;d!=null&&(c.interval=d,c.intervalPrecision=tj(d)),i[0]||(s[0]=Lv(wv(s[0]/u)*u,l)),i[1]||(s[1]=Lv(Tv(s[1]/u)*u,l)),d!=null&&(c.niceExtent=s.slice()),qj(e,i,o,s,a,c)}function nG(e,t){var n=oj(t.splitNumber,5),r=GA(e),i=t.minInterval,a=t.maxInterval,o=ey(r/n,!0);i!=null&&o<i&&(o=i),a!=null&&o>a&&(o=a);var s=tj(o),c=e.getExtent(),l=[Lv(Tv(c[0]/o)*o,s),Lv(wv(c[1]/o)*o,s)];return{interval:o,intervalPrecision:s,niceExtent:l}}function rG(e,t){var n=oj(t.splitNumber,10),r=e.getExtent(),i=GA(e),a=xv(Qv(i),1);n/i*a<=.5&&(a*=10);var o=tj(a),s=[Lv(Tv(r[0]/a)*a,o),Lv(wv(r[1]/a)*a,o)];return{intervalPrecision:o,interval:a,niceExtent:s}}function iG(e){var t=e.scale,n=e.model,r=n.axis,i=n.ecModel;aG(t,n,r,i,null)}function aG(e,t,n,r,i){var a=LP(e,t,r,n,i),o=XA(e)||ZA(e);oG(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&&zP(n,e,a,r)}function oG(e,t){sG[e.type](e,t)}var sG={interval:tG,log:tG,time:Cj,ordinal:Kd},cG=[[3,1],[0,2]],lG=function(){function e(e,t,n){this.type=`grid`,this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=ZW,this._initCartesian(e,t,n),this.model=e}return e.prototype.getRect=function(){return this._rect},e.prototype.update=function(e,t){var n=this._axesMap;H(this._axesList,function(e){jP(e,1);var t=e.scale;$A(t)&&t.setSortInfo(e.model.get(`categorySortInfo`))});function r(e){for(var t=gd(e),n=[],r=t.length-1;r>=0;r--){var i=e[+t[r]];i.__alignTo?n.push(i):iG(i)}H(n,function(e){mG(e,e.__alignTo)?iG(e):eG(e,e.__alignTo.scale)})}r(n.x),r(n.y);var i={};H(n.x,function(e){dG(n,`y`,e,i)}),H(n.y,function(e){dG(n,`x`,e,i)}),this.resize(this.model,t)},e.prototype.resize=function(e,t,n){var r=CO(e,t),i=this._rect=bO(e.getBoxLayoutParams(),r.refContainer),a=this._axesMap,o=this._coordsList,s=e.get(`containLabel`);if(gG(a,i),!n){var c=bG(i,o,a,s,t),l=void 0;if(s)vG?(vG(this._axesList,i),gG(a,i)):l=yG(i.clone(),`axisLabel`,null,i,a,c,r);else{var u=SG(e,i,r),d=u.outerBoundsRect,f=u.parsedOuterBoundsContain,p=u.outerBoundsClamp;d&&(l=yG(d,f,p,i,a,c,r))}xG(i,a,bM.determine,null,l,r),H(this._coordsList,function(e){e.calcAffineTransform()})}},e.prototype.getAxis=function(e,t){var n=this._axesMap[e];if(n!=null)return n[t||0]},e.prototype.getAxes=function(){return this._axesList.slice()},e.prototype.getCartesian=function(e,t){if(e!=null&&t!=null){var n=`x`+e+`y`+t;return this._coordsMap[n]}q(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var r=0,i=this._coordsList;r<i.length;r++)if(i[r].getAxis(`x`).index===e||i[r].getAxis(`y`).index===t)return i[r]},e.prototype.getCartesians=function(){return this._coordsList.slice()},e.prototype.convertToPixel=function(e,t,n){var r=this._findConvertTarget(t);return r.cartesian?r.cartesian.dataToPoint(n):r.axis?r.axis.toGlobalCoord(r.axis.dataToCoord(n)):null},e.prototype.convertFromPixel=function(e,t,n){var r=this._findConvertTarget(t);return r.cartesian?r.cartesian.pointToData(n):r.axis?r.axis.coordToData(r.axis.toLocalCoord(n)):null},e.prototype._findConvertTarget=function(e){var t=e.seriesModel,n=e.xAxisModel||t&&t.getReferringComponents(`xAxis`,Hy).models[0],r=e.yAxisModel||t&&t.getReferringComponents(`yAxis`,Hy).models[0],i=e.gridModel,a=this._coordsList,o,s;return t?(o=t.coordinateSystem,ld(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}},e.prototype.containPoint=function(e){var t=this._coordsList[0];if(t)return t.containPoint(e)},e.prototype._initCartesian=function(e,t,n){var r=this,i=this,a={left:!1,right:!1,top:!1,bottom:!1},o={x:{},y:{}},s={x:0,y:0};if(t.eachComponent(`xAxis`,c(`x`),this),t.eachComponent(`yAxis`,c(`y`),this),!s.x||!s.y){this._axesMap={},this._axesList=[];return}this._axesMap=o,H(o.x,function(t,n){H(o.y,function(i,a){var o=`x`+n+`y`+a,s=new $W(o);s.master=r,s.model=e,r._coordsMap[o]=s,r._coordsList.push(s),s.addAxis(t),s.addAxis(i)})}),pG(o.x),pG(o.y);function c(t){return function(n,r){if(uG(n,e)){var c=n.get(`position`);t===`x`?c!==`top`&&c!==`bottom`&&(c=a.bottom?`top`:`bottom`):c!==`left`&&c!==`right`&&(c=a.left?`right`:`left`),a[c]=!0;var l=Nj(n),u=new yN(t,Pj(n,l,!0),[0,0],l,c);u.onBand=Yj(u.scale,n),u.inverse=n.get(`inverse`),n.axis=u,u.model=n,u.grid=i,u.index=r,i._axesList.push(u),o[t][r]=u,s[t]++}}}},e.prototype.getTooltipAxes=function(e){var t=[],n=[];return H(this.getCartesians(),function(r){var i=e!=null&&e!==`auto`?r.getAxis(e):r.getBaseAxis(),a=r.getOtherAxis(i);ld(t,i)<0&&t.push(i),ld(n,a)<0&&n.push(a)}),{baseAxes:t,otherAxes:n}},e.create=function(t,n){var r=[];return t.eachComponent(`grid`,function(i,a){var o=new e(i,t,n);o.name=`grid_`+a,o.resize(i,n,!0),i.coordinateSystem=o,r.push(o),H(o._axesList,function(t){AP(t,e.dimIdxMap)})}),t.eachSeries(function(e){var t,n;CE({targetModel:e,coordSysType:XP,coordSysProvider:r});function r(){var r=yP(e),i=r.xAxisModel,a=r.yAxisModel;return t=i.axis,n=a.axis,i.getCoordSysModel().coordinateSystem.getCartesian(i.componentIndex,a.componentIndex)}t&&n&&(sN(t,e,XP),sN(n,e,XP))},this),r},e.dimensions=ZW,e.dimIdxMap=JT(ZW),e}();function uG(e,t){return e.getCoordSysModel()===t}function dG(e,t,n,r){n.getAxesOnZeroOf=function(){return a?[a]:[]};var i=e[t],a,o=n.model,s=o.get([`axisLine`,`onZero`]),c=o.get([`axisLine`,`onZeroAxisIndex`]);if(!s)return;if(c!=null)fG(s,i[c])&&(a=i[c]);else for(var l in i)if(Gd(i,l)&&fG(s,i[l])&&!r[u(i[l])]){a=i[l];break}a&&(r[u(a)]=!0);function u(e){return e.dim+`_`+e.index}}function fG(e,t){if(!t)return!1;var n=t.scale,r=Fj(n,0,!1),i=t&&t.type!==`category`&&t.type!==`time`&&r!==3;return i&&e===`auto`&&Lj(t)&&(i=!1),i}function pG(e){for(var t=gd(e),n,r=[],i=t.length-1;i>=0;i--){var a=e[+t[i]];YA(a.scale)&&Gj(a.model,a.type,!0)==null&&(a.model.get(`alignTicks`)&&a.model.get(`interval`)==null?r.push(a):n=a)}n||=r.pop(),n&&H(r,function(e){e.__alignTo=n})}function mG(e,t){return vD(e.scale)||vD(t.scale)||t.scale.getTicks().length<2}function hG(e,t){var 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 gG(e,t){H(e.x,function(e){return _G(e,t.x,t.width)}),H(e.y,function(e){return _G(e,t.y,t.height)})}function _G(e,t,n){var r=[0,n],i=+!!e.inverse;e.setExtent(r[i],r[1-i]),hG(e,t)}var vG;function yG(e,t,n,r,i,a,o){xG(r,i,bM.estimate,t,!1,o);var s=[0,0,0,0];l(0),l(1),u(r,0,NaN),u(r,1,NaN);var c=hd(s,function(e){return e>0})==null;return WC(r,s,!0,!0,n),gG(i,r),c;function l(e){H(i[gC[e]],function(t){if(Wj(t.model)){var n=a.ensureRecord(t.model),r=n.labelInfoList;if(r)for(var i=0;i<r.length;i++){var o=r[i],s=t.scale.normalize(Jj(t.scale,VN(o.label).labelInfo.tick));s=e===1?1-s:s,u(o.rect,e,s),u(o.rect,1-e,NaN)}var c=n.nameLayout;if(c){var s=Uj(n.nameLocation)?.5:NaN;u(c.rect,e,s),u(c.rect,1-e,NaN)}}})}function u(t,n,r){var i=e[gC[n]]-t[gC[n]],a=t[_C[n]]+t[gC[n]]-(e[_C[n]]+e[gC[n]]);i=d(i,1-r),a=d(a,r);var o=cG[n][0],c=cG[n][1];s[o]=xv(s[o],i),s[c]=xv(s[c],a)}function d(e,t){return e>0&&!Od(t)&&t>1e-4&&(e/=t),e}}function bG(e,t,n,r,i){var a=new UN(CG);return H(n,function(n){return H(n,function(n){if(Wj(n.model)){var o=!r;n.axisBuilder=bP(e,t,n.model,i,a,o)}})}),a}function xG(e,t,n,r,i,a){var o=n===bM.determine;H(t,function(t){return H(t,function(t){Wj(t.model)&&(xP(t.axisBuilder,e,t.model),t.axisBuilder.build(o?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:i}))})});var s={x:0,y:0};c(0),c(1);function c(t){s[gC[1-t]]=e[_C[t]]<=a.refContainer[_C[t]]*.5?0:1-t==1?2:1}H(t,function(e,t){return H(e,function(e){Wj(e.model)&&((r===`all`||o)&&e.axisBuilder.build({axisName:!0},{nameMarginLevel:s[t]}),o&&e.axisBuilder.build({axisLine:!0}))})})}function SG(e,t,n){var r,i=e.get(`outerBoundsMode`,!0);i===`same`?r=t.clone():(i==null||i===`auto`)&&(r=bO(e.get(`outerBounds`,!0)||JP,n.refContainer));var a=e.get(`outerBoundsContain`,!0),o=a==null||a===`auto`||ld([`all`,`axisLabel`],a)<0?`all`:a,s=[Pv(J(e.get(`outerBoundsClampWidth`,!0),YP[0]),t.width),Pv(J(e.get(`outerBoundsClampHeight`,!0),YP[1]),t.height)];return{outerBoundsRect:r,parsedOuterBoundsContain:o,outerBoundsClamp:s}}var CG=function(e,t,n,r,i,a){var o=n.axis.dim===`x`?`y`:`x`;qN(e,t,n,r,i,a),Uj(e.nameLocation)||H(t.recordMap[o],function(e){e&&e.labelInfoList&&e.dirVec&&YN(e.labelInfoList,e.dirVec,r,i)})};function wG(e,t){var n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return TG(n,e,t),n.seriesInvolved&&DG(n,e),n}function TG(e,t,n){var r=t.getComponent(`tooltip`),i=t.getComponent(`axisPointer`),a=i.get(`link`,!0)||[],o=[];H(n.getCoordinateSystems(),function(n){if(!n.axisPointerEnabled)return;var s=PG(n.model),c=e.coordSysAxesInfo[s]={};e.coordSysMap[s]=n;var l=n.model.getModel(`tooltip`,r);if(H(n.getAxes(),yd(p,!1,null)),n.getTooltipAxes&&r&&l.get(`show`)){var u=l.get(`trigger`)===`axis`,d=l.get([`axisPointer`,`type`])===`cross`,f=n.getTooltipAxes(l.get([`axisPointer`,`axis`]));(u||d)&&H(f.baseAxes,yd(p,d?`cross`:!0,u)),d&&H(f.otherAxes,yd(p,`cross`,!1))}function p(r,s,u){var d=u.model.getModel(`axisPointer`,i),f=d.get(`show`);if(!(!f||f===`auto`&&!r&&!NG(d))){s??=d.get(`triggerTooltip`),d=r?EG(u,l,i,t,r,s):d;var p=d.get(`snap`),m=d.get(`triggerEmphasis`),h=PG(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:NG(d),seriesModels:[],linkGroup:null};c[h]=_,e.seriesInvolved=e.seriesInvolved||g;var v=OG(a,u);if(v!=null){var y=o[v]||(o[v]={axesInfo:{}});y.axesInfo[h]=_,y.mapper=a[v].mapper,_.linkGroup=y}}}})}function EG(e,t,n,r,i,a){var o=t.getModel(`axisPointer`),s=[`type`,`snap`,`lineStyle`,`shadowStyle`,`label`,`animation`,`animationDurationUpdate`,`animationEasingUpdate`,`z`],c={};H(s,function(e){c[e]=B(o.get(e))}),c.snap=e.type!==`category`&&!!a,o.get(`type`)===`cross`&&(c.type=`line`);var l=c.label||={};if(l.show??=!1,i===`cross`&&(l.show=o.get([`label`,`show`])??!0,!a)){var u=c.lineStyle=o.get(`crossStyle`);u&&sd(l,u.textStyle)}return e.model.getModel(`axisPointer`,new Fw(c,n,r))}function DG(e,t){t.eachSeries(function(t){var n=t.coordinateSystem,r=t.get([`tooltip`,`trigger`],!0),i=t.get([`tooltip`,`show`],!0);!n||!n.model||r===`none`||r===!1||r===`item`||i===!1||t.get([`axisPointer`,`show`],!0)===!1||H(e.coordSysAxesInfo[PG(n.model)],function(e){var r=e.axis;n.getAxis(r.dim)===r&&(e.seriesModels.push(t),e.seriesDataCount??=0,e.seriesDataCount+=t.getData().count())})})}function OG(e,t){for(var n=t.model,r=t.dim,i=0;i<e.length;i++){var a=e[i]||{};if(kG(a[r+`AxisId`],n.id)||kG(a[r+`AxisIndex`],n.componentIndex)||kG(a[r+`AxisName`],n.name))return i}}function kG(e,t){return e===`all`||W(e)&&ld(e,t)>=0||e===t}function AG(e){var t=jG(e);if(t){var n=t.axisPointerModel,r=t.axis.scale,i=n.option,a=n.get(`status`),o=n.get(`value`);o!=null&&(o=r.parse(o));var s=NG(n);a??(i.status=s?`show`:`hide`);var 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 jG(e){var t=(e.ecModel.getComponent(`axisPointer`)||{}).coordSysAxesInfo;return t&&t.axesInfo[PG(e)]}function MG(e){var t=jG(e);return t&&t.axisPointerModel}function NG(e){return!!e.get([`handle`,`show`])}function PG(e){return e.type+`||`+e.id}var FG={},IG=function(e){z(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(t,n,r,i){this.axisPointerClass&&AG(t),e.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(t,r,!0)},t.prototype.updateAxisPointer=function(e,t,n,r){this._doUpdateAxisPointerClass(e,n,!1)},t.prototype.remove=function(e,t){var n=this._axisPointer;n&&n.remove(t)},t.prototype.dispose=function(t,n){this._disposeAxisPointer(n),e.prototype.dispose.apply(this,arguments)},t.prototype._doUpdateAxisPointerClass=function(e,n,r){var i=t.getAxisPointerClass(this.axisPointerClass);if(i){var a=MG(e);a?(this._axisPointer||=new i).render(e,a,n,r):this._disposeAxisPointer(n)}},t.prototype._disposeAxisPointer=function(e){this._axisPointer&&this._axisPointer.dispose(e),this._axisPointer=null},t.registerAxisPointerClass=function(e,t){FG[e]=t},t.getAxisPointerClass=function(e){return e&&FG[e]},t.type=`axis`,t}(NB),LG=Ry();function RG(e,t,n,r){var i=n.axis;if(!i.scale.isBlank()){var 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){var u=s.length,d=LG(e).splitAreaColors,f=Y(),p=0;if(d)for(var m=0;m<l.length;m++){var h=d.get(l[m].tickValue);if(h!=null){p=(h+(u-1)*m)%u;break}}var g=i.toGlobalCoord(l[0].coord),_=o.getAreaStyle();s=W(s)?s:[s];for(var m=1;m<l.length;m++){var v=i.toGlobalCoord(l[m].coord),y=void 0,b=void 0,x=void 0,S=void 0;i.isHorizontal()?(y=g,b=c.y,x=v-y,S=c.height,g=y+x):(y=c.x,b=g,x=c.width,S=v-b,g=b+S);var C=l[m-1].tickValue;C!=null&&f.set(C,p),t.add(new Q_({anid:C==null?null:`area_`+C,shape:{x:y,y:b,width:x,height:S},style:sd({fill:s[p]},_),autoBatch:!0,silent:!0})),p=(p+1)%u}LG(e).splitAreaColors=f}}}function zG(e){LG(e).splitAreaColors=null}var BG=[`splitArea`,`splitLine`,`minorSplitLine`,`breakArea`],VG=function(e){z(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.axisPointerClass=`CartesianAxisPointer`,n}return t.prototype.render=function(t,n,r,i){this.group.removeAll();var a=this._axisGroup;this._axisGroup=new iS,this.group.add(this._axisGroup),Wj(t)&&(this._axisGroup.add(t.axis.axisBuilder.group),H(BG,function(e){t.get([e,`show`])&&HG[e](this,this._axisGroup,t,t.getCoordSysModel(),r)},this),i&&i.type===`changeAxisOrder`&&i.isInitSort||IC(a,this._axisGroup,t),e.prototype.render.call(this,t,n,r,i))},t.prototype.remove=function(){zG(this)},t.type=`cartesianAxis`,t}(IG),HG={splitLine:function(e,t,n,r,i){var a=n.axis;if(!a.scale.isBlank()){var o=n.getModel(`splitLine`),s=o.getModel(`lineStyle`),c=s.get(`color`),l=o.get(`showMinLine`)!==!1,u=o.get(`showMaxLine`)!==!1;c=W(c)?c:[c];for(var d=r.coordinateSystem.getRect(),f=a.isHorizontal(),p=0,m=a.getTicksCoords({tickModel:o,breakTicks:`none`,pruneByBreak:`preserve_extent_bound`}),h=[],g=[],_=s.getLineStyle(),v=0;v<m.length;v++){var y=a.toGlobalCoord(m[v].coord);if(!(v===0&&!l||v===m.length-1&&!u)){var b=m[v].tickValue;f?(h[0]=y,h[1]=d.y,g[0]=y,g[1]=d.y+d.height):(h[0]=d.x,h[1]=y,g[0]=d.x+d.width,g[1]=y);var x=p++%c.length,S=new IS({anid:b==null?null:`line_`+b,autoBatch:!0,shape:{x1:h[0],y1:h[1],x2:g[0],y2:g[1]},style:sd({stroke:c[x]},_),silent:!0});OC(S.shape,_.lineWidth),t.add(S)}}}},minorSplitLine:function(e,t,n,r,i){var a=n.axis,o=n.getModel(`minorSplitLine`).getModel(`lineStyle`),s=r.coordinateSystem.getRect(),c=a.isHorizontal(),l=a.getMinorTicksCoords();if(l.length)for(var u=[],d=[],f=o.getLineStyle(),p=0;p<l.length;p++)for(var m=0;m<l[p].length;m++){var h=a.toGlobalCoord(l[p][m].coord);c?(u[0]=h,u[1]=s.y,d[0]=h,d[1]=s.y+s.height):(u[0]=s.x,u[1]=h,d[0]=s.x+s.width,d[1]=h);var g=new IS({anid:`minor_line_`+l[p][m].tickValue,autoBatch:!0,shape:{x1:u[0],y1:u[1],x2:d[0],y2:d[1]},style:f,silent:!0});OC(g.shape,f.lineWidth),t.add(g)}},splitArea:function(e,t,n,r,i){RG(e,t,n,r)},breakArea:function(e,t,n,r,i){var a=IN(),o=n.axis.scale;a&&o.type!==`ordinal`&&a.rectCoordBuildBreakAxis(t,e,n,r.coordinateSystem.getRect(),i)}},UG=function(e){z(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`xAxis`,t}(VG),WG=function(e){z(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=UG.type,t}return t.type=`yAxis`,t}(VG),GG=function(e){z(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=`grid`,t}return t.prototype.render=function(e,t){this.group.removeAll(),e.get(`show`)&&this.group.add(new Q_({shape:e.coordinateSystem.getRect(),style:sd({fill:e.get(`backgroundColor`)},e.getItemStyle()),silent:!0,z2:-1}))},t.type=`grid`,t}(NB),KG={offset:0};function qG(e){e.registerComponentView(GG),e.registerComponentModel(ZP),e.registerCoordinateSystem(`cartesian2d`,lG),JW(e,`x`,UW,KG),JW(e,`y`,UW,KG),e.registerComponentView(UG),e.registerComponentView(WG),e.registerPreprocessor(function(e){e.xAxis&&e.yAxis&&!e.grid&&(e.grid={})})}var JG=Ry(),YG=B,XG=vd,ZG=function(){function e(){this._dragging=!1,this.animationThreshold=15}return e.prototype.render=function(e,t,n,r){var 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)){this._lastValue=i,this._lastStatus=a;var o=this._group,s=this._handle;if(!a||a===`hide`){o&&o.hide(),s&&s.hide();return}o&&o.show(),s&&s.show();var c={};this.makeElOption(c,i,e,t,n);var l=c.graphicKey;l!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=l;var u=this._moveAnimation=this.determineAnimation(e,t);if(!o)o=this._group=new iS,this.createPointerEl(o,c,e,t),this.createLabelEl(o,c,e,t),n.getZr().add(o);else{var d=yd(QG,t,u);this.updatePointerEl(o,c,d),this.updateLabelEl(o,c,d,t)}nK(o,t,!0),this._renderHandle(i)}},e.prototype.remove=function(e){this.clear(e)},e.prototype.dispose=function(e){this.clear(e)},e.prototype.determineAnimation=function(e,t){var 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){var o=this.animationThreshold;if(i&&fN(r).w>o)return!0;if(a){var s=jG(e).seriesDataCount,c=r.getExtent();return Math.abs(c[0]-c[1])/s>o}return!1}return n===!0},e.prototype.makeElOption=function(e,t,n,r,i){},e.prototype.createPointerEl=function(e,t,n,r){var i=t.pointer;if(i){var a=JG(e).pointerEl=new mC[i.type](YG(t.pointer));e.add(a)}},e.prototype.createLabelEl=function(e,t,n,r){if(t.label){var i=JG(e).labelEl=new rv(YG(t.label));e.add(i),eK(i,r)}},e.prototype.updatePointerEl=function(e,t,n){var r=JG(e).pointerEl;r&&t.pointer&&(r.setStyle(t.pointer.style),n(r,{shape:t.pointer.shape}))},e.prototype.updateLabelEl=function(e,t,n,r){var i=JG(e).labelEl;i&&(i.setStyle(t.label.style),n(i,{x:t.label.x,y:t.label.y}),eK(i,r))},e.prototype._renderHandle=function(e){if(!(this._dragging||!this.updateHandleTransform)){var t=this._axisPointerModel,n=this._api.getZr(),r=this._handle,i=t.getModel(`handle`),a=t.get(`status`);if(!i.get(`show`)||!a||a===`hide`){r&&n.remove(r),this._handle=null;return}var o;this._handle||(o=!0,r=this._handle=zC(i.get(`icon`),{cursor:`move`,draggable:!0,onmousemove:function(e){bR(e.event)},onmousedown:XG(this._onHandleDragMove,this,0,0),drift:XG(this._onHandleDragMove,this),ondragend:XG(this._onHandleDragEnd,this)}),n.add(r)),nK(r,t,!1),r.setStyle(i.getItemStyle(null,[`color`,`borderColor`,`borderWidth`,`opacity`,`shadowColor`,`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`]));var s=i.get(`size`);W(s)||(s=[s,s]),r.scaleX=s[0]/2,r.scaleY=s[1]/2,hF(this,`_doDispatchAxisPointer`,i.get(`throttle`)||0,`fixRate`),this._moveHandleToValue(e,o)}},e.prototype._moveHandleToValue=function(e,t){QG(this._axisPointerModel,!t&&this._moveAnimation,this._handle,tK(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},e.prototype._onHandleDragMove=function(e,t){var n=this._handle;if(n){this._dragging=!0;var r=this.updateHandleTransform(tK(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=r,n.stopAnimation(),n.attr(tK(r)),JG(n).lastProp=null,this._doDispatchAxisPointer()}},e.prototype._doDispatchAxisPointer=function(){if(this._handle){var e=this._payloadInfo,t=this._axisModel;this._api.dispatchAction({type:`updateAxisPointer`,x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:t.axis.dim,axisIndex:t.componentIndex}]})}},e.prototype._onHandleDragEnd=function(){if(this._dragging=!1,this._handle){var e=this._axisPointerModel.get(`value`);this._moveHandleToValue(e),this._api.dispatchAction({type:`hideTip`})}},e.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),n=this._group,r=this._handle;t&&n&&(this._lastGraphicKey=null,n&&t.remove(n),r&&t.remove(r),this._group=null,this._handle=null,this._payloadInfo=null),gF(this,`_doDispatchAxisPointer`)},e.prototype.doClear=function(){},e.prototype.buildLabel=function(e,t,n){return n||=0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}},e}();function QG(e,t,n,r){$G(JG(n).lastProp,r)||(JG(n).lastProp=r,t?sC(n,r,e):(n.stopAnimation(),n.attr(r)))}function $G(e,t){if(q(e)&&q(t)){var n=!0;return H(t,function(t,r){n&&=$G(e[r],t)}),!!n}else return e===t}function eK(e,t){e[t.get([`label`,`show`])?`show`:`hide`]()}function tK(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function nK(e,t,n){var r=t.get(`z`),i=t.get(`zlevel`);e&&e.traverse(function(e){e.type!==`group`&&(r!=null&&(e.z=r),i!=null&&(e.zlevel=i),e.silent=n)})}function rK(e){var t=e.get(`type`),n=e.getModel(t+`Style`),r;return t===`line`?(r=n.getLineStyle(),r.fill=null):t===`shadow`&&(r=n.getAreaStyle(),r.stroke=null),r}function iK(e,t,n,r,i){var a=oK(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=iO(o.get(`padding`)||0),c=o.getFont(),l=Rp(a,c),u=i.position,d=l.width+s[1]+s[3],f=l.height+s[0]+s[2],p=i.align;p===`right`&&(u[0]-=d),p===`center`&&(u[0]-=d/2);var m=i.verticalAlign;m===`bottom`&&(u[1]-=f),m===`middle`&&(u[1]-=f/2),aK(u,d,f,r);var h=o.get(`backgroundColor`);(!h||h===`auto`)&&(h=t.get([`axisLine`,`lineStyle`,`color`])),e.label={x:u[0],y:u[1],style:pw(o,{text:a,font:c,fill:o.getTextColor(),padding:s,backgroundColor:h}),z2:10}}function aK(e,t,n,r){var i=r.getWidth(),a=r.getHeight();e[0]=Math.min(e[0]+t,i)-t,e[1]=Math.min(e[1]+n,a)-n,e[0]=Math.max(e[0],0),e[1]=Math.max(e[1],0)}function oK(e,t,n,r,i){e=t.scale.parse(e);var a=t.scale.getLabel({value:e},{precision:i.precision}),o=i.formatter;if(o){var s={value:zj(t,{value:e}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};H(r,function(e){var t=n.getSeriesByIndex(e.seriesIndex),r=e.dataIndexInside,i=t&&t.getDataParams(r);i&&s.seriesData.push(i)}),K(o)?a=o.replace(`{value}`,a):G(o)&&(a=o(s))}return a}function sK(e,t,n){var r=wf();return kf(r,r,n.rotation),Of(r,r,n.position),MC([e.dataToCoord(t),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],r)}function cK(e,t,n,r,i,a){var o=XN.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=i.get([`label`,`margin`]),iK(t,r,i,a,{position:sK(r.axis,e,n),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function lK(e,t,n){return n||=0,{x1:e[n],y1:e[1-n],x2:t[n],y2:t[1-n]}}function uK(e,t,n){return n||=0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}}function dK(e,t,n){return fN(e,{fromStat:{sers:U(t,function(e){return n.getSeriesByIndex(e.seriesIndex)})},min:1}).w}function fK(e,t,n){return[xv(bv(t[0],t[1]),e-n/2),bv(e+n/2,xv(t[0],t[1]))]}var pK=function(e){z(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,t,n,r,i){var a=n.axis,o=a.grid,s=r.get(`type`),c=a.getGlobalExtent(),l=mK(o,a).getOtherAxis(a).getGlobalExtent(),u=a.toGlobalCoord(a.dataToCoord(t,!0));if(s&&s!==`none`){var d=rK(r),f=hK[s](a,u,c,l,r.get(`seriesDataIndices`),r.ecModel);f.style=d,e.graphicKey=f.type,e.pointer=f}cK(t,e,_P(o.getRect(),n),n,r,i)},t.prototype.getHandleTransform=function(e,t,n){var r=_P(t.axis.grid.getRect(),t,{labelInside:!1});r.labelMargin=n.get([`handle`,`margin`]);var i=sK(t.axis,e,r);return{x:i[0],y:i[1],rotation:r.rotation+(r.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,t,n,r){var i=n.axis,a=i.grid,o=i.getGlobalExtent(!0),s=mK(a,i).getOtherAxis(i).getGlobalExtent(),c=i.dim===`x`?0:1,l=[e.x,e.y];l[c]+=t[c],l[c]=bv(o[1],l[c]),l[c]=xv(o[0],l[c]);var u=(s[1]+s[0])/2,d=[u,u];return d[c]=l[c],{x:l[0],y:l[1],rotation:e.rotation,cursorPoint:d,tooltipOption:[{verticalAlign:`middle`},{align:`center`}][c]}},t}(ZG);function mK(e,t){var n={};return n[t.dim+`AxisIndex`]=t.index,e.getCartesian(n)}var hK={line:function(e,t,n,r){return{type:`Line`,subPixelOptimize:!0,shape:lK([t,r[0]],[t,r[1]],gK(e))}},shadow:function(e,t,n,r,i,a){var o=dK(e,i,a),s=r[1]-r[0],c=fK(t,n,o),l=c[0],u=c[1];return{type:`Rect`,shape:uK([l,r[0]],[u-l,s],gK(e))}}};function gK(e){return e.dim===`x`?0:1}var _K=function(e){z(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`axisPointer`,t.defaultOption={show:`auto`,z:50,type:`line`,snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:Q.color.border,width:1,type:`dashed`},shadowStyle:{color:Q.color.shadowTint},label:{show:!0,formatter:null,precision:`auto`,margin:3,color:Q.color.neutral00,padding:[5,7,5,7],backgroundColor:Q.color.accent60,borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:`M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z`,size:45,margin:50,color:Q.color.accent40,throttle:40}},t}(kO),vK=Ry(),yK=H;function bK(e,t,n){if(!X.node){var r=t.getZr();vK(r).records||(vK(r).records={}),xK(r,t);var i=vK(r).records[e]||(vK(r).records[e]={});i.handler=n}}function xK(e,t){if(vK(e).initialized)return;vK(e).initialized=!0,n(`click`,yd(wK,`click`)),n(`mousemove`,yd(wK,`mousemove`)),n(`mousewheel`,yd(wK,`mousewheel`)),n(`globalout`,CK);function n(n,r){e.on(n,function(n){var i=TK(t);yK(vK(e).records,function(e){e&&r(e,n,i.dispatchAction)}),SK(i.pendings,t)})}}function SK(e,t){var n=e.showTip.length,r=e.hideTip.length,i;n?i=e.showTip[n-1]:r&&(i=e.hideTip[r-1]),i&&(i.dispatchAction=null,t.dispatchAction(i))}function CK(e,t,n){e.handler(`leave`,null,n)}function wK(e,t,n,r){t.handler(e,n,r)}function TK(e){var t={showTip:[],hideTip:[]},n=function(r){var i=t[r.type];i?i.push(r):(r.dispatchAction=n,e.dispatchAction(r))};return{dispatchAction:n,pendings:t}}function EK(e,t){if(!X.node){var n=t.getZr();(vK(n).records||{})[e]&&(vK(n).records[e]=null)}}var DK=function(e){z(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){var r=t.getComponent(`tooltip`),i=e.get(`triggerOn`)||r&&r.get(`triggerOn`)||`mousemove|click|mousewheel`;bK(`axisPointer`,n,function(e,t,n){i!==`none`&&(e===`leave`||i.indexOf(e)>=0)&&n({type:`updateAxisPointer`,currTrigger:e,x:t&&t.offsetX,y:t&&t.offsetY})})},t.prototype.remove=function(e,t){EK(`axisPointer`,t)},t.prototype.dispose=function(e,t){EK(`axisPointer`,t)},t.type=`axisPointer`,t}(NB);function OK(e,t){var n=[],r=e.seriesIndex,i;if(r==null||!(i=t.getSeriesByIndex(r)))return{point:[]};var a=i.getData(),o=Ly(a,e);if(o==null||o<0||W(o))return{point:[]};var s=a.getItemGraphicEl(o),c=i.coordinateSystem;if(i.getTooltipPosition)n=i.getTooltipPosition(o)||[];else if(c&&c.dataToPoint)if(e.isStacked){var l=c.getBaseAxis(),u=c.getOtherAxis(l).dim,d=l.dim,f=+(u===`x`||u===`radius`),p=a.mapDimension(d),m=[];m[f]=a.get(p,o),m[1-f]=a.get(a.getCalculationInfo(`stackResultDimension`),o),n=c.dataToPoint(m)||[]}else n=c.dataToPoint(a.getValues(U(c.dimensions,function(e){return a.mapDimension(e)}),o))||[];else if(s){var h=s.getBoundingRect().clone();h.applyTransform(s.transform),n=[h.x+h.width/2,h.y+h.height/2]}return{point:n,el:s}}var kK=Ry();function AK(e,t,n){var r=e.currTrigger,i=[e.x,e.y],a=e,o=e.dispatchAction||vd(n.dispatchAction,n),s=t.getComponent(`axisPointer`).coordSysAxesInfo;if(s){BK(i)&&(i=OK({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},t).point);var c=BK(i),l=a.axesInfo,u=s.axesInfo,d=r===`leave`||BK(i),f={},p={},m={list:[],map:{}},h={showPointer:yd(NK,p),showTooltip:yd(PK,m)};H(s.coordSysMap,function(e,t){var n=c||e.containPoint(i);H(s.coordSysAxesInfo[t],function(e,t){var r=e.axis,a=RK(l,e);if(!d&&n&&(!l||a)){var o=a&&a.value;o==null&&!c&&(o=r.pointToData(i)),o!=null&&jK(e,o,h,!1,f)}})});var g={};return H(u,function(e,t){var n=e.linkGroup;n&&!p[t]&&H(n.axesInfo,function(t,r){var i=p[r];if(t!==e&&i){var a=i.value;n.mapper&&(a=e.axis.scale.parse(n.mapper(a,zK(t),zK(e)))),g[e.key]=a}})}),H(g,function(e,t){jK(u[t],e,h,!0,f)}),FK(p,u,f),IK(m,i,e,o),LK(u,o,n),f}}function jK(e,t,n,r,i){var a=e.axis;if(!(a.scale.isBlank()||!a.containData(t))){if(!e.involveSeries){n.showPointer(e,t);return}var o=MK(t,e),s=o.payloadBatch,c=o.snapToValue;s[0]&&i.seriesIndex==null&&V(i,s[0]),!r&&e.snap&&a.containData(c)&&c!=null&&(t=c),n.showPointer(e,t,s),n.showTooltip(e,o,c)}}function MK(e,t){var n=t.axis,r=n.dim,i=e,a=[],o=Number.MAX_VALUE,s=-1;return H(t.seriesModels,function(t,c){var l=t.getData().mapDimensionsAll(r),u,d;if(t.getAxisTooltipData){var f=t.getAxisTooltipData(l,e,n);d=f.dataIndices,u=f.nestestValue}else{if(d=t.indicesOfNearest(r,l[0],e,n.type===`category`?.5:null),!d.length)return;u=t.getData().get(l[0],d[0])}if(cy(u)){var p=e-u,m=Math.abs(p);m<=o&&((m<o||p>=0&&s<0)&&(o=m,s=p,i=u,a.length=0),H(d,function(e){a.push({seriesIndex:t.seriesIndex,dataIndexInside:e,dataIndex:t.getData().getRawIndex(e)})}))}}),{payloadBatch:a,snapToValue:i}}function NK(e,t,n,r){e[t.key]={value:n,payloadBatch:r}}function PK(e,t,n,r){var i=n.payloadBatch,a=t.axis,o=a.model,s=t.axisPointerModel;if(!(!t.triggerTooltip||!i.length)){var c=t.coordSys.model,l=PG(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 FK(e,t,n){var r=n.axesInfo=[];H(t,function(t,n){var i=t.axisPointerModel.option,a=e[n];a?(!t.useHandle&&(i.status=`show`),i.value=a.value,i.seriesDataIndices=(a.payloadBatch||[]).slice()):!t.useHandle&&(i.status=`hide`),i.status===`show`&&r.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:i.value})})}function IK(e,t,n,r){if(BK(t)||!e.list.length){r({type:`hideTip`});return}var i=((e.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};r({type:`showTip`,escapeConnect:!0,x:t[0],y:t[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:e.list})}function LK(e,t,n){var r=n.getZr(),i=`axisPointerLastHighlights`,a=kK(r)[i]||{},o=kK(r)[i]={};H(e,function(e,t){var n=e.axisPointerModel.option;n.status===`show`&&e.triggerEmphasis&&H(n.seriesDataIndices,function(e){o[e.seriesIndex+`|`+e.dataIndex]=e})});var s=[],c=[];function l(e){return{seriesIndex:e.seriesIndex,dataIndex:e.dataIndex}}H(a,function(e,t){!o[t]&&c.push(l(e))}),H(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 RK(e,t){for(var n=0;n<(e||[]).length;n++){var r=e[n];if(t.axis.dim===r.axisDim&&t.axis.model.componentIndex===r.axisIndex)return r}}function zK(e){var t=e.axis.model,n={},r=n.axisDim=e.axis.dim;return n.axisIndex=n[r+`AxisIndex`]=t.componentIndex,n.axisName=n[r+`AxisName`]=t.name,n.axisId=n[r+`AxisId`]=t.id,n}function BK(e){return!e||e[0]==null||isNaN(e[0])||e[1]==null||isNaN(e[1])}function VK(e){IG.registerAxisPointerClass(`CartesianAxisPointer`,pK),e.registerComponentModel(_K),e.registerComponentView(DK),e.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!W(t)&&(e.axisPointer.link=[t])}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,{overallReset:function(e,t){e.getComponent(`axisPointer`).coordSysAxesInfo=wG(e,t)}}),e.registerAction({type:`updateAxisPointer`,event:`updateAxisPointer`,update:`:updateAxisPointer`},AK)}var HK=[],UK={registerPreprocessor:KU,registerProcessor:qU,registerPostInit:JU,registerPostUpdate:YU,registerUpdateLifecycle:XU,registerAction:ZU,registerCoordinateSystem:QU,registerLayout:tW,registerVisual:nW,registerTransform:lW,registerLoading:aW,registerMap:sW,registerImpl:SV,PRIORITY:HH,ComponentModel:kO,ComponentView:NB,SeriesModel:Ak,ChartView:wA,registerComponentModel:function(e){kO.registerClass(e)},registerComponentView:function(e){NB.registerClass(e)},registerSeriesModel:function(e){Ak.registerClass(e)},registerChartView:function(e){wA.registerClass(e)},registerCustomSeries:function(e,t){TV(e,t)},registerSubTypeDefaulter:function(e,t){kO.registerSubTypeDefaulter(e,t)},registerPainter:function(e,t){jz(e,t)}};function WK(e){if(W(e)){H(e,function(e){WK(e)});return}ld(HK,e)>=0||(HK.push(e),G(e)&&(e={install:e}),e.install(UK))}function GK(e){WK(qG),WK(VK)}var KK=function(e){z(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`tooltip`,t.dependencies=[`axisPointer`],t.defaultOption={z:60,show:!0,showContent:!0,trigger:`item`,triggerOn:`mousemove|click|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}},t}(kO);function qK(e){var t=e.get(`confine`);return t==null?e.get(`renderMode`)===`richText`:!!t}function JK(e){if(X.domSupported){for(var t=document.documentElement.style,n=0,r=e.length;n<r;n++)if(e[n]in t)return e[n]}}var YK=JK([`transform`,`webkitTransform`,`OTransform`,`MozTransform`,`msTransform`]),XK=JK([`webkitTransition`,`transition`,`OTransition`,`MozTransition`,`msTransition`]);function ZK(e,t){if(!e)return t;t=rO(t,!0);var n=e.indexOf(t);return e=n===-1?t:`-`+e.slice(0,n)+`-`+t,e.toLowerCase()}function QK(e,t){var n=e.currentStyle||document.defaultView&&document.defaultView.getComputedStyle(e);return n?t?n[t]:n:null}var $K=ZK(XK,`transition`),eq=ZK(YK,`transform`),tq=`position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;`+(X.transform3dSupported?`will-change:transform;`:``);function nq(e){return e=e===`left`?`right`:e===`right`?`left`:e===`top`?`bottom`:`top`,e}function rq(e,t,n){if(!K(n)||n===`inside`)return``;var r=e.get(`backgroundColor`),i=e.get(`borderWidth`);t=fO(t);var a=nq(n),o=Math.max(Math.round(i)*1.5,6),s=``,c=eq+`:`,l;ld([`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)`);var u=l*Math.PI/180,d=o+i,f=d*Math.abs(Math.cos(u))+d*Math.abs(Math.sin(u)),p=Math.round(((f-Math.SQRT2*i)/2+Math.SQRT2*i-(f-d)/2)*100)/100;s+=`;`+a+`:-`+p+`px`;var m=t+` solid `+i+`px;`;return`<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 iq(e,t,n){var 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?`,`:``)+(X.transformSupported?``+eq+i:`,left`+i+`,top`+i)),$K+`:`+a}function aq(e,t,n){var r=e.toFixed(0)+`px`,i=t.toFixed(0)+`px`;if(!X.transformSupported)return n?`top:`+i+`;left:`+r+`;`:[[`top`,i],[`left`,r]];var a=X.transform3dSupported,o=`translate`+(a?`3d`:``)+`(`+r+`,`+i+(a?`,0`:``)+`)`;return n?`top:0;left:0;`+eq+`:`+o+`;`:[[`top`,0],[`left`,0],[YK,o]]}function oq(e){var t=[],n=e.get(`fontSize`),r=e.getTextColor();r&&t.push(`color:`+r),t.push(`font:`+e.getFont());var i=J(e.get(`lineHeight`),Math.round(n*3/2));n&&t.push(`line-height:`+i+`px`);var a=e.get(`textShadowColor`),o=e.get(`textShadowBlur`)||0,s=e.get(`textShadowOffsetX`)||0,c=e.get(`textShadowOffsetY`)||0;return a&&o&&t.push(`text-shadow:`+s+`px `+c+`px `+o+`px `+a),H([`decoration`,`align`],function(n){var r=e.get(n);r&&t.push(`text-`+n+`:`+r)}),t.join(`;`)}function sq(e,t,n,r){var i=[],a=e.get(`transitionDuration`),o=e.get(`backgroundColor`),s=e.get(`shadowBlur`),c=e.get(`shadowColor`),l=e.get(`shadowOffsetX`),u=e.get(`shadowOffsetY`),d=e.getModel(`textStyle`),f=wk(e,`html`),p=l+`px `+u+`px `+s+`px `+c;return i.push(`box-shadow:`+p),t&&a>0&&i.push(iq(a,n,r)),o&&i.push(`background-color:`+o),H([`width`,`color`,`radius`],function(t){var n=`border-`+t,r=rO(n),a=e.get(r);a!=null&&i.push(n+`:`+a+(t===`color`?``:`px`))}),i.push(oq(d)),f!=null&&i.push(`padding:`+iO(f).join(`px `)+`px`),i.join(`;`)+`;`}function cq(e,t,n,r,i){var a=t&&t.painter;if(n){var o=a&&a.getViewportRoot();o&&qE(e,o,n,r,i)}else{e[0]=r,e[1]=i;var s=a&&a.getViewportRootOffset();s&&(e[0]+=s.offsetLeft,e[1]+=s.offsetTop)}e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var lq=function(){function e(e,t){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,X.wxa)return null;var n=document.createElement(`div`);n.domBelongToZr=!0,this.el=n;var r=this._zr=e.getZr(),i=t.appendTo,a=i&&(K(i)?document.querySelector(i):wd(i)?i:G(i)&&i(e.getDom()));cq(this._styleCoord,r,a,e.getWidth()/2,e.getHeight()/2),(a||e.getDom()).appendChild(n),this._api=e,this._container=a;var o=this;n.onmouseenter=function(){o._enterable&&(clearTimeout(o._hideTimeout),o._show=!0),o._inContent=!0},n.onmousemove=function(e){if(e||=window.event,!o._enterable){var t=r.handler;gR(r.painter.getViewportRoot(),e,!0),t.dispatch(`mousemove`,e)}},n.onmouseleave=function(){o._inContent=!1,o._enterable&&o._show&&o.hideLater(o._hideDelay)}}return e.prototype.update=function(e){if(!this._container){var t=this._api.getDom(),n=QK(t,`position`),r=t.style;r.position!==`absolute`&&n!==`absolute`&&(r.position=`relative`)}var i=e.get(`alwaysShowContent`);i&&this._moveIfResized(),this._alwaysShowContent=i,this._enableDisplayTransition=e.get(`displayTransition`)&&e.get(`transitionDuration`)>0,this.el.className=e.get(`className`)||``},e.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,r=n.style,i=this._styleCoord;n.innerHTML?r.cssText=tq+sq(e,!this._firstShow,this._longHide,this._enableDisplayTransition)+aq(i[0],i[1],!0)+(`border-color:`+fO(t)+`;`)+(e.get(`extraCssText`)||``)+(`;pointer-events:`+(this._enterable?`auto`:`none`)):r.display=`none`,this._show=!0,this._firstShow=!1,this._longHide=!1},e.prototype.setContent=function(e,t,n,r,i){var a=this.el;if(e==null){a.innerHTML=``;return}var o=``;if(K(i)&&n.get(`trigger`)===`item`&&!qK(n)&&(o=rq(n,r,i)),K(e))a.innerHTML=e+o;else if(e){a.innerHTML=``,W(e)||(e=[e]);for(var s=0;s<e.length;s++)wd(e[s])&&e[s].parentNode!==a&&a.appendChild(e[s]);if(o&&a.childNodes.length){var c=document.createElement(`div`);c.innerHTML=o,a.appendChild(c)}}},e.prototype.setEnterable=function(e){this._enterable=e},e.prototype.getSize=function(){var e=this.el;return e?[e.offsetWidth,e.offsetHeight]:[0,0]},e.prototype.moveTo=function(e,t){if(this.el){var n=this._styleCoord;if(cq(n,this._zr,this._container,e,t),n[0]!=null&&n[1]!=null){var r=this.el.style;H(aq(n[0],n[1]),function(e){r[e[0]]=e[1]})}}},e.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},e.prototype.hide=function(){var e=this,t=this.el.style;this._enableDisplayTransition?(t.visibility=`hidden`,t.opacity=`0`):t.display=`none`,X.transform3dSupported&&(t.willChange=``),this._show=!1,this._longHideTimeout=setTimeout(function(){return e._longHide=!0},500)},e.prototype.hideLater=function(e){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(vd(this.hide,this),e)):this.hide())},e.prototype.isShow=function(){return this._show},e.prototype.dispose=function(){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var e=this._zr;JE(e&&e.painter&&e.painter.getViewportRoot(),this._container);var t=this.el;if(t){t.onmouseenter=t.onmousemove=t.onmouseleave=null;var n=t.parentNode;n&&n.removeChild(t)}this.el=this._container=null},e}(),uq=function(){function e(e){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=e.getZr(),pq(this._styleCoord,this._zr,e.getWidth()/2,e.getHeight()/2)}return e.prototype.update=function(e){var t=e.get(`alwaysShowContent`);t&&this._moveIfResized(),this._alwaysShowContent=t},e.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},e.prototype.setContent=function(e,t,n,r,i){var a=this;q(e)&&my(``),this.el&&this._zr.remove(this.el);var o=n.getModel(`textStyle`);this.el=new rv({style:{rich:t.richTextStyles,text:e,lineHeight:22,borderWidth:1,borderColor:r,textShadowColor:o.get(`textShadowColor`),fill:n.get([`textStyle`,`color`]),padding:wk(n,`richText`),verticalAlign:`top`,align:`left`},z:n.get(`z`)}),H([`backgroundColor`,`borderRadius`,`shadowColor`,`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`],function(e){a.el.style[e]=n.get(e)}),H([`textShadowBlur`,`textShadowOffsetX`,`textShadowOffsetY`],function(e){a.el.style[e]=o.get(e)||0}),this._zr.add(this.el);var s=this;this.el.on(`mouseover`,function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0}),this.el.on(`mouseout`,function(){s._enterable&&s._show&&s.hideLater(s._hideDelay),s._inContent=!1})},e.prototype.setEnterable=function(e){this._enterable=e},e.prototype.getSize=function(){var e=this.el,t=this.el.getBoundingRect(),n=fq(e.style);return[t.width+n.left+n.right,t.height+n.top+n.bottom]},e.prototype.moveTo=function(e,t){var n=this.el;if(n){var r=this._styleCoord;pq(r,this._zr,e,t),e=r[0],t=r[1];var i=n.style,a=dq(i.borderWidth||0),o=fq(i);n.x=e+a+o.left,n.y=t+a+o.top,n.markRedraw()}},e.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},e.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},e.prototype.hideLater=function(e){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(vd(this.hide,this),e)):this.hide())},e.prototype.isShow=function(){return this._show},e.prototype.dispose=function(){this._zr.remove(this.el)},e}();function dq(e){return Math.max(0,e)}function fq(e){var t=dq(e.shadowBlur||0),n=dq(e.shadowOffsetX||0),r=dq(e.shadowOffsetY||0);return{left:dq(t-n),right:dq(t+n),top:dq(t-r),bottom:dq(t+r)}}function pq(e,t,n,r){e[0]=n,e[1]=r,e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var mq=new Q_({shape:{x:-1,y:-1,width:2,height:2}}),hq=function(e){z(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.init=function(e,t){if(!(X.node||!t.getDom())){var n=e.getComponent(`tooltip`),r=this._renderMode=qy(n.get(`renderMode`));this._tooltipContent=r===`richText`?new uq(t):new lq(t,{appendTo:n.get(`appendToBody`,!0)?`body`:n.get(`appendTo`,!0)})}},t.prototype.render=function(e,t,n){if(!(X.node||!n.getDom())){this.group.removeAll(),this._tooltipModel=e,this._ecModel=t,this._api=n;var r=this._tooltipContent;r.update(e),r.setEnterable(e.get(`enterable`)),this._initGlobalListener(),this._keepShow(),this._renderMode!==`richText`&&e.get(`transitionDuration`)?hF(this,`_updatePosition`,50,`fixRate`):gF(this,`_updatePosition`)}},t.prototype._initGlobalListener=function(){var e=this._tooltipModel.get(`triggerOn`);bK(`itemTooltip`,this._api,vd(function(t,n,r){e!==`none`&&(e.indexOf(t)>=0?this._tryShow(n,r):t===`leave`&&this._hide(r))},this))},t.prototype._keepShow=function(){var e=this._tooltipModel,t=this._ecModel,n=this._api,r=e.get(`triggerOn`);if(e.get(`trigger`)!==`axis`&&(this._lastDataByCoordSys=null,this._cbParamsList=null),this._lastX!=null&&this._lastY!=null&&r!==`none`&&r!==`click`){var i=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!n.isDisposed()&&i.manuallyShowTip(e,t,n,{x:i._lastX,y:i._lastY,dataByCoordSys:i._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(e,t,n,r){if(!(r.from===this.uid||X.node||!n.getDom())){var i=_q(r,n);this._ticket=``;var a=r.dataByCoordSys,o=Sq(r,t,n);if(o){var s=o.el.getBoundingRect().clone();s.applyTransform(o.el.transform),this._tryShow({offsetX:s.x+s.width/2,offsetY:s.y+s.height/2,target:o.el,position:r.position,positionDefault:`bottom`},i)}else if(r.tooltip&&r.x!=null&&r.y!=null){var c=mq;c.x=r.x,c.y=r.y,c.update(),pb(c).tooltipConfig={name:null,option:r.tooltip},this._tryShow({offsetX:r.x,offsetY:r.y,target:c},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;var l=OK(r,t),u=l.point[0],d=l.point[1];u!=null&&d!=null&&this._tryShow({offsetX:u,offsetY:d,target:l.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))}},t.prototype.manuallyHideTip=function(e,t,n,r){var i=this._tooltipContent;this._tooltipModel&&i.hideLater(this._tooltipModel.get(`hideDelay`)),this._lastX=this._lastY=this._lastDataByCoordSys=null,this._cbParamsList=null,r.from!==this.uid&&this._hide(_q(r,n))},t.prototype._manuallyAxisShowTip=function(e,t,n,r){var i=r.seriesIndex,a=r.dataIndex,o=t.getComponent(`axisPointer`).coordSysAxesInfo;if(!(i==null||a==null||o==null)){var s=t.getSeriesByIndex(i);if(s&&gq([s.getData().getItemModel(a),s,(s.coordinateSystem||{}).model],this._tooltipModel).get(`trigger`)===`axis`)return n.dispatchAction({type:`updateAxisPointer`,seriesIndex:i,dataIndex:a,position:r.position}),!0}},t.prototype._tryShow=function(e,t){var n=e.target;if(this._tooltipModel){this._lastX=e.offsetX,this._lastY=e.offsetY;var r=e.dataByCoordSys;if(r&&r.length)this._showAxisTooltip(r,e);else if(n){if(pb(n).ssrType===`legend`)return;this._lastDataByCoordSys=null,this._cbParamsList=null;var i,a;yV(n,function(e){if(e.tooltipDisabled)return i=a=null,!0;i||a||(pb(e).dataIndex==null?pb(e).tooltipConfig!=null&&(a=e):i=e)},!0),i?this._showSeriesItemTooltip(e,i,t):a?this._showComponentItemTooltip(e,a,t):this._hide(t)}else this._lastDataByCoordSys=null,this._cbParamsList=null,this._hide(t)}},t.prototype._showOrMove=function(e,t){var n=e.get(`showDelay`);t=vd(t,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(t,n):t()},t.prototype._showAxisTooltip=function(e,t){var n=this._ecModel,r=this._tooltipModel,i=[t.offsetX,t.offsetY],a=gq([t.tooltipOption],r),o=this._renderMode,s=[],c=uk(`section`,{blocks:[],noHeader:!0}),l=[],u=new Tk;H(e,function(e){H(e.dataByAxis,function(e){var t=n.getComponent(e.axisDim+`Axis`,e.axisIndex),i=e.value,a=t.axis,d=a.scale.parse(i);if(!(!t||i==null)){var f=oK(i,a,n,e.seriesDataIndices,e.valueLabelOpt),p=uk(`section`,{header:f,noHeader:!Pd(f),sortBlocks:!0,blocks:[]});c.blocks.push(p),H(e.seriesDataIndices,function(i){var a=n.getSeriesByIndex(i.seriesIndex),c=i.dataIndexInside,m=a.getDataParams(c);if(!(m.dataIndex<0)){m.axisDim=e.axisDim,m.axisIndex=e.axisIndex,m.axisType=e.axisType,m.axisId=e.axisId,m.axisValue=zj(t.axis,{value:d}),m.axisValueLabel=f,m.marker=u.makeTooltipMarker(`item`,fO(m.color),o);var h=RO(a.formatTooltip(c,!0,null)),g=h.frag;if(g){var _=gq([a],r).get(`valueFormatter`);p.blocks.push(_?V({valueFormatter:_},g):g)}h.text&&l.push(h.text),s.push(m)}})}})}),c.blocks.reverse(),l.reverse();var d=t.position,f=gk(c,u,o,a.get(`order`),n.get(`useUTC`),a.get(`textStyle`));f&&l.unshift(f);var p=o===`richText`?`
|
|
280
|
-
|
|
281
|
-
`:`<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)})},t.prototype._showSeriesItemTooltip=function(e,t,n){var r=this._ecModel,i=pb(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=gq([u.getItemModel(c),s,o&&(o.coordinateSystem||{}).model],this._tooltipModel,f?{position:f}:null),m=p.get(`trigger`);if(!(m!=null&&m!==`item`)){var h=s.getDataParams(c,l),g=new Tk;h.marker=g.makeTooltipMarker(`item`,fO(h.color),d);var _=RO(s.formatTooltip(c,!1,l)),v=p.get(`order`),y=p.get(`valueFormatter`),b=_.frag,x=b?gk(y?V({valueFormatter:y},b):b,g,d,v,r.get(`useUTC`),p.get(`textStyle`)):_.text,S=`item_`+s.name+`_`+c;this._showOrMove(p,function(){this._showTooltipContent(p,x,h,S,e.offsetX,e.offsetY,e.position,e.target,g)}),n({type:`showTip`,dataIndexInside:c,dataIndex:u.getRawIndex(c),seriesIndex:a,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,t,n){var r=this._renderMode===`html`,i=pb(t),a=i.tooltipConfig.option||{},o=a.encodeHTMLContent;if(K(a)){var s=a;a={content:s,formatter:s},o=!0}o&&r&&a.content&&(a=B(a),a.content=tD(a.content));var c=[a],l=this._ecModel.getComponent(i.componentMainType,i.componentIndex);l&&c.push(l),c.push({formatter:a.content});var u=e.positionDefault,d=gq(c,this._tooltipModel,u?{position:u}:null),f=d.get(`content`),p=Math.random()+``,m=new Tk;this._showOrMove(d,function(){var n=B(d.get(`formatterParams`)||{});this._showTooltipContent(d,f,n,p,e.offsetX,e.offsetY,e.position,t,m)}),n({type:`showTip`,from:this.uid})},t.prototype._showTooltipContent=function(e,t,n,r,i,a,o,s,c){if(this._ticket=``,!(!e.get(`showContent`)||!e.get(`show`))){var l=this._tooltipContent;l.setEnterable(e.get(`enterable`));var u=e.get(`formatter`);o||=e.get(`position`);var d=t,f=this._getNearestPoint([i,a],n,e.get(`trigger`),e.get(`borderColor`),e.get(`defaultBorderColor`,!0)).color;if(u)if(K(u)){var p=e.ecModel.get(`useUTC`),m=W(n)?n[0]:n,h=m&&m.axisType&&m.axisType.indexOf(`time`)>=0;d=u,h&&(d=LD(m.axisValue,d,p)),d=cO(d,n,!0)}else if(G(u)){var g=vd(function(t,r){t===this._ticket&&(l.setContent(r,c,e,f,o),this._updatePosition(e,o,i,a,l,n,s))},this);this._ticket=r,d=u(n,r,g)}else d=u;l.setContent(d,c,e,f,o),l.show(e,f),this._updatePosition(e,o,i,a,l,n,s)}},t.prototype._getNearestPoint=function(e,t,n,r,i){if(n===`axis`||W(t))return{color:r||i};if(!W(t))return{color:r||t.color||t.borderColor}},t.prototype._updatePosition=function(e,t,n,r,i,a,o){var s=this._api.getWidth(),c=this._api.getHeight();t||=e.get(`position`);var l=i.getSize(),u=e.get(`align`),d=e.get(`verticalAlign`),f=o&&o.getBoundingRect().clone();if(o&&f.applyTransform(o.transform),G(t)&&(t=t([n,r],a,i.el,f,{viewSize:[s,c],contentSize:l.slice()})),W(t))n=Mv(t[0],s),r=Mv(t[1],c);else if(q(t)){var p=t;p.width=l[0],p.height=l[1];var m=bO(p,{width:s,height:c});n=m.x,r=m.y,u=null,d=null}else if(K(t)&&o){var h=bq(t,f,l,e.get(`borderWidth`));n=h[0],r=h[1]}else{var h=vq(n,r,i,s,c,u?null:20,d?null:20);n=h[0],r=h[1]}if(u&&(n-=xq(u)?l[0]/2:u===`right`?l[0]:0),d&&(r-=xq(d)?l[1]/2:d===`bottom`?l[1]:0),qK(e)){var h=yq(n,r,i,s,c);n=h[0],r=h[1]}i.moveTo(n,r)},t.prototype._updateContentNotChangedOnAxis=function(e,t){var n=this._lastDataByCoordSys,r=this._cbParamsList,i=!!n&&n.length===e.length;return i&&H(n,function(n,a){var o=n.dataByAxis||[],s=(e[a]||{}).dataByAxis||[];i&&=o.length===s.length,i&&H(o,function(e,n){var a=s[n]||{},o=e.seriesDataIndices||[],c=a.seriesDataIndices||[];i=i&&e.value===a.value&&e.axisType===a.axisType&&e.axisId===a.axisId&&o.length===c.length,i&&H(o,function(e,t){var n=c[t];i=i&&e.seriesIndex===n.seriesIndex&&e.dataIndex===n.dataIndex}),r&&H(e.seriesDataIndices,function(e){var n=e.seriesIndex,a=t[n],o=r[n];a&&o&&o.data!==a.data&&(i=!1)})})}),this._lastDataByCoordSys=e,this._cbParamsList=t,!!i},t.prototype._hide=function(e){this._lastDataByCoordSys=null,this._cbParamsList=null,e({type:`hideTip`,from:this.uid})},t.prototype.dispose=function(e,t){X.node||!t.getDom()||(gF(this,`_updatePosition`),this._tooltipContent.dispose(),EK(`itemTooltip`,t),this._tooltipContent=null,this._tooltipModel=null,this._lastDataByCoordSys=null,this._cbParamsList=null)},t.type=`tooltip`,t}(NB);function gq(e,t,n){var r=t.ecModel,i;n?(i=new Fw(n,r,r),i=new Fw(t.option,i,r)):i=t;for(var a=e.length-1;a>=0;a--){var o=e[a];o&&(o instanceof Fw&&(o=o.get(`tooltip`,!0)),K(o)&&(o={formatter:o}),o&&(i=new Fw(o,i,r)))}return i}function _q(e,t){return e.dispatchAction||vd(t.dispatchAction,t)}function vq(e,t,n,r,i,a,o){var s=n.getSize(),c=s[0],l=s[1];return a!=null&&(e+c+a+2>r?e-=c+a:e+=a),o!=null&&(t+l+o>i?t-=l+o:t+=o),[e,t]}function yq(e,t,n,r,i){var a=n.getSize(),o=a[0],s=a[1];return e=Math.min(e+o,r)-o,t=Math.min(t+s,i)-s,e=Math.max(e,0),t=Math.max(t,0),[e,t]}function bq(e,t,n,r){var i=n[0],a=n[1],o=Math.ceil(Math.SQRT2*r)+8,s=0,c=0,l=t.width,u=t.height;switch(e){case`inside`:s=t.x+l/2-i/2,c=t.y+u/2-a/2;break;case`top`:s=t.x+l/2-i/2,c=t.y-a-o;break;case`bottom`:s=t.x+l/2-i/2,c=t.y+u+o;break;case`left`:s=t.x-i-o,c=t.y+u/2-a/2;break;case`right`:s=t.x+l+o,c=t.y+u/2-a/2}return[s,c]}function xq(e){return e===`center`||e===`middle`}function Sq(e,t,n){var r=Vy(e).queryOptionMap,i=r.keys()[0];if(!(!i||i===`series`)){var a=Uy(t,i,r.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];if(a){var o=n.getViewOfComponentModel(a),s;if(o.group.traverse(function(t){var n=pb(t).tooltipConfig;if(n&&n.name===e.name)return s=t,!0}),s)return{componentMainType:i,componentIndex:a.componentIndex,el:s}}}}function Cq(e){WK(VK),e.registerComponentModel(KK),e.registerComponentView(hq),e.registerAction({type:`showTip`,event:`showTip`,update:`tooltip:manuallyShowTip`},Kd),e.registerAction({type:`hideTip`,event:`hideTip`,update:`tooltip:manuallyHideTip`},Kd)}var wq=function(e){z(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode={type:`box`,ignoreSize:!0},n}return t.type=`title`,t.defaultOption={z:6,show:!0,text:``,target:`blank`,subtext:``,subtarget:`blank`,left:`center`,top:Q.size.m,backgroundColor:Q.color.transparent,borderColor:Q.color.primary,borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:`bold`,color:Q.color.primary},subtextStyle:{fontSize:12,color:Q.color.quaternary}},t}(kO),Tq=function(e){z(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){if(this.group.removeAll(),e.get(`show`)){var r=this.group,i=e.getModel(`textStyle`),a=e.getModel(`subtextStyle`),o=e.get(`textAlign`),s=J(e.get(`textBaseline`),e.get(`textVerticalAlign`)),c=new rv({style:pw(i,{text:e.get(`text`),fill:i.getTextColor()},{disableBox:!0}),z2:10}),l=c.getBoundingRect(),u=e.get(`subtext`),d=new rv({style:pw(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(){pO(f,`_`+e.get(`target`))}),p&&d.on(`click`,function(){pO(p,`_`+e.get(`subtarget`))}),pb(c).eventData=pb(d).eventData=m?{componentType:`title`,componentIndex:e.componentIndex}:null,r.add(c),u&&r.add(d);var h=r.getBoundingRect(),g=e.getBoxLayoutParams();g.width=h.width,g.height=h.height;var _=bO(g,CO(e,n).refContainer,e.get(`padding`));o||(o=e.get(`left`)||e.get(`right`),o===`middle`&&(o=`center`),o===`right`?_.x+=_.width:o===`center`&&(_.x+=_.width/2)),s||(s=e.get(`top`)||e.get(`bottom`),s===`center`&&(s=`middle`),s===`bottom`?_.y+=_.height:s===`middle`&&(_.y+=_.height/2),s||=`top`),r.x=_.x,r.y=_.y,r.markRedraw();var v={align:o,verticalAlign:s};c.setStyle(v),d.setStyle(v),h=r.getBoundingRect();var y=_.margin,b=e.getItemStyle([`color`,`opacity`]);b.fill=e.get(`backgroundColor`);var x=new Q_({shape:{x:h.x-y[3],y:h.y-y[0],width:h.width+y[1]+y[3],height:h.height+y[0]+y[2],r:e.get(`borderRadius`)},style:b,subPixelOptimize:!0,silent:!0});r.add(x)}},t.type=`title`,t}(NB);function Eq(e){e.registerComponentModel(wq),e.registerComponentView(Tq)}var Dq=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`])}},Oq=function(e){z(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode={type:`box`,ignoreSize:!0},n}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n),e.selected=e.selected||{},this._updateSelector(e)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),this._updateSelector(t)},t.prototype._updateSelector=function(e){var t=e.selector,n=this.ecModel;t===!0&&(t=e.selector=[`all`,`inverse`]),W(t)&&H(t,function(e,r){K(e)&&(e={type:e}),t[r]=id(e,Dq(n,e.type))})},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var e=this._data;if(e[0]&&this.get(`selectedMode`)===`single`){for(var t=!1,n=0;n<e.length;n++){var r=e[n].get(`name`);if(this.isSelected(r)){this.select(r),t=!0;break}}!t&&this.select(e[0].get(`name`))}},t.prototype._updateData=function(e){var t=[],n=[];e.eachRawSeries(function(r){var i=r.name;n.push(i);var a;if(r.legendVisualProvider){var o=r.legendVisualProvider.getAllNames();e.isSeriesFiltered(r)||(n=n.concat(o)),o.length?t=t.concat(o):a=!0}else a=!0;a&&Ny(r)&&t.push(r.name)}),this._availableNames=n;var r=this.get(`data`)||t,i=Y(),a=U(r,function(e){return(K(e)||xd(e))&&(e={name:e}),i.get(e.name)?null:(i.set(e.name,!0),new Fw(e,this,this.ecModel))},this);this._data=md(a,function(e){return!!e})},t.prototype.getData=function(){return this._data},t.prototype.select=function(e){var t=this.option.selected;if(this.get(`selectedMode`)===`single`){var n=this._data;H(n,function(e){t[e.get(`name`)]=!1})}t[e]=!0},t.prototype.unSelect=function(e){this.get(`selectedMode`)!==`single`&&(this.option.selected[e]=!1)},t.prototype.toggleSelected=function(e){var t=this.option.selected;t.hasOwnProperty(e)||(t[e]=!0),this[t[e]?`unSelect`:`select`](e)},t.prototype.allSelect=function(){var e=this._data,t=this.option.selected;H(e,function(e){t[e.get(`name`,!0)]=!0})},t.prototype.inverseSelect=function(){var e=this._data,t=this.option.selected;H(e,function(e){var n=e.get(`name`,!0);t.hasOwnProperty(n)||(t[n]=!0),t[n]=!t[n]})},t.prototype.isSelected=function(e){var t=this.option.selected;return!(t.hasOwnProperty(e)&&!t[e])&&ld(this._availableNames,e)>=0},t.prototype.getOrient=function(){return this.get(`orient`)===`vertical`?{index:1,name:`vertical`}:{index:0,name:`horizontal`}},t.type=`legend.plain`,t.dependencies=[`series`],t.defaultOption={z:4,show:!0,orient:`horizontal`,left:`center`,bottom:Q.size.m,align:`auto`,backgroundColor:Q.color.transparent,borderColor:Q.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:`inherit`,symbolKeepAspect:!0,inactiveColor:Q.color.disabled,inactiveBorderColor:Q.color.disabled,inactiveBorderWidth:`auto`,itemStyle:{color:`inherit`,opacity:`inherit`,borderColor:`inherit`,borderWidth:`auto`,borderCap:`inherit`,borderJoin:`inherit`,borderDashOffset:`inherit`,borderMiterLimit:`inherit`},lineStyle:{width:`auto`,color:`inherit`,inactiveColor:Q.color.disabled,inactiveWidth:2,opacity:`inherit`,type:`inherit`,cap:`inherit`,join:`inherit`,dashOffset:`inherit`,miterLimit:`inherit`},textStyle:{color:Q.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:`sans-serif`,color:Q.color.tertiary,borderWidth:1,borderColor:Q.color.border},emphasis:{selectorLabel:{show:!0,color:Q.color.quaternary}},selectorPosition:`auto`,selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},t}(kO);function kq(e,t){var n=iO(t.get(`padding`)),r=t.getItemStyle([`color`,`opacity`]);return r.fill=t.get(`backgroundColor`),new Q_({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 Aq=yd,jq=H,Mq=iS,Nq=function(e){z(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!1,n}return t.prototype.init=function(){this.group.add(this._contentGroup=new Mq),this.group.add(this._selectorGroup=new Mq),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(e,t,n){var r=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),e.get(`show`,!0)){var i=e.get(`align`),a=e.get(`orient`);(!i||i===`auto`)&&(i=e.get(`left`)===`right`&&a===`vertical`?`right`:`left`);var o=e.get(`selector`,!0),s=e.get(`selectorPosition`,!0);o&&(!s||s===`auto`)&&(s=a===`horizontal`?`end`:`start`),this.renderInner(i,e,t,n,o,a,s);var c=CO(e,n).refContainer,l=e.getBoxLayoutParams(),u=e.get(`padding`),d=bO(l,c,u),f=this.layoutInner(e,i,d,r,o,s),p=bO(sd({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=kq(f,e))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(e,t,n,r,i,a,o){var s=this.getContentGroup(),c=Y(),l=t.get(`selectedMode`),u=t.get(`triggerEvent`),d=[];n.eachRawSeries(function(e){!e.get(`legendHoverLink`)&&d.push(e.id)}),jq(t.getData(),function(i,a){var o=this,f=i.get(`name`);if(!this.newlineDisabled&&(f===``||f===`
|
|
282
|
-
`)){var p=new Mq;p.newline=!0,s.add(p);return}var m=n.getSeriesByName(f)[0];if(!c.get(f))if(m){var h=m.getData(),g=h.getVisual(`legendLineStyle`)||{},_=h.getVisual(`legendIcon`),v=h.getVisual(`style`),y=this._createItem(m,f,a,i,t,e,g,v,_,l,r);y.on(`click`,Aq(Iq,f,null,r,d)).on(`mouseover`,Aq(Lq,m.name,null,r,d)).on(`mouseout`,Aq(Rq,m.name,null,r,d)),n.ssr&&y.eachChild(function(e){var t=pb(e);t.seriesIndex=m.seriesIndex,t.dataIndex=a,t.ssrType=`legend`}),u&&y.eachChild(function(e){o.packEventData(e,t,m,a,f)}),c.set(f,!0)}else n.eachRawSeries(function(o){var s=this;if(!c.get(f)&&o.legendVisualProvider){var p=o.legendVisualProvider;if(!p.containName(f))return;var m=p.indexOfName(f),h=p.getItemVisual(m,`style`),g=p.getItemVisual(m,`legendIcon`),_=mh(h.fill);_&&_[3]===0&&(_[3]=.2,h=V(V({},h),{fill:Th(_,`rgba`)}));var v=this._createItem(o,f,a,i,t,e,{},h,g,l,r);v.on(`click`,Aq(Iq,null,f,r,d)).on(`mouseover`,Aq(Lq,null,f,r,d)).on(`mouseout`,Aq(Rq,null,f,r,d)),n.ssr&&v.eachChild(function(e){var t=pb(e);t.seriesIndex=o.seriesIndex,t.dataIndex=a,t.ssrType=`legend`}),u&&v.eachChild(function(e){s.packEventData(e,t,o,a,f)}),c.set(f,!0)}},this)},this),i&&this._createSelector(i,t,r,a,o)},t.prototype.packEventData=function(e,t,n,r,i){var a={componentType:`legend`,componentIndex:t.componentIndex,dataIndex:r,value:i,seriesIndex:n.seriesIndex};pb(e).eventData=a},t.prototype._createSelector=function(e,t,n,r,i){var a=this.getSelectorGroup();jq(e,function(e){var r=e.type,i=new rv({style:{x:0,y:0,align:`center`,verticalAlign:`middle`},onclick:function(){n.dispatchAction({type:r===`all`?`legendAllSelect`:`legendInverseSelect`,legendId:t.id})}});a.add(i),dw(i,{normal:t.getModel(`selectorLabel`),emphasis:t.getModel([`emphasis`,`selectorLabel`])},{defaultText:e.title}),Sx(i)})},t.prototype._createItem=function(e,t,n,r,i,a,o,s,c,l,u){var d=e.visualDrawType,f=i.get(`itemWidth`),p=i.get(`itemHeight`),m=i.isSelected(t),h=r.get(`symbolRotate`),g=r.get(`symbolKeepAspect`),_=r.get(`icon`);c=_||c||`roundRect`;var v=Pq(c,r,o,s,d,m,u),y=new Mq,b=r.getModel(`textStyle`);if(G(e.getLegendIcon)&&(!_||_===`inherit`))y.add(e.getLegendIcon({itemWidth:f,itemHeight:p,icon:c,iconRotate:h,itemStyle:v.itemStyle,lineStyle:v.lineStyle,symbolKeepAspect:g}));else{var x=_===`inherit`&&e.getData().getVisual(`symbol`)?h===`inherit`?e.getData().getVisual(`symbolRotate`):h:0;y.add(Fq({itemWidth:f,itemHeight:p,icon:c,iconRotate:x,itemStyle:v.itemStyle,lineStyle:v.lineStyle,symbolKeepAspect:g}))}var S=a===`left`?f+5:-5,C=a,w=i.get(`formatter`),T=t;K(w)&&w?T=w.replace(`{name}`,t??``):G(w)&&(T=w(t));var E=m?b.getTextColor():r.get(`inactiveColor`);y.add(new rv({style:pw(b,{text:T,x:S,y:p/2,fill:E,align:C,verticalAlign:`middle`},{inheritColor:E})}));var D=new Q_({shape:y.getBoundingRect(),style:{fill:`transparent`}}),O=r.getModel(`tooltip`);return O.get(`show`)&&qC({el:D,componentModel:i,itemName:t,itemTooltipOption:O.option}),y.add(D),y.eachChild(function(e){e.silent=!0}),D.silent=!l,this.getContentGroup().add(y),Sx(y),y.__legendDataIndex=n,y},t.prototype.layoutInner=function(e,t,n,r,i,a){var o=this.getContentGroup(),s=this.getSelectorGroup();vO(e.get(`orient`),o,e.get(`itemGap`),n.width,n.height);var c=o.getBoundingRect(),l=[-c.x,-c.y];if(s.markRedraw(),o.markRedraw(),i){vO(`horizontal`,s,e.get(`selectorItemGap`,!0));var u=s.getBoundingRect(),d=[-u.x,-u.y],f=e.get(`selectorButtonGap`,!0),p=e.getOrient().index,m=p===0?`width`:`height`,h=p===0?`height`:`width`,g=p===0?`y`:`x`;a===`end`?d[p]+=c[m]+f:l[p]+=u[m]+f,d[1-p]+=c[h]/2-u[h]/2,s.x=d[0],s.y=d[1],o.x=l[0],o.y=l[1];var _={x:0,y:0};return _[m]=c[m]+f+u[m],_[h]=Math.max(c[h],u[h]),_[g]=Math.min(0,u[g]+d[1-p]),_}else return o.x=l[0],o.y=l[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type=`legend.plain`,t}(NB);function Pq(e,t,n,r,i,a,o){function s(e,t){e.lineWidth===`auto`&&(e.lineWidth=t.lineWidth>0?2:0),jq(e,function(n,r){e[r]===`inherit`&&(e[r]=t[r])})}var c=t.getModel(`itemStyle`),l=c.getItemStyle(),u=e.lastIndexOf(`empty`,0)===0?`fill`:`stroke`,d=c.getShallow(`decal`);l.decal=!d||d===`inherit`?r.decal:hH(d,o),l.fill===`inherit`&&(l.fill=r[i]),l.stroke===`inherit`&&(l.stroke=r[u]),l.opacity===`inherit`&&(l.opacity=(i===`fill`?r:n).opacity),s(l,r);var f=t.getModel(`lineStyle`),p=f.getLineStyle();if(s(p,n),l.fill===`auto`&&(l.fill=r.fill),l.stroke===`auto`&&(l.stroke=r.fill),p.stroke===`auto`&&(p.stroke=r.fill),!a){var m=t.get(`inactiveBorderWidth`),h=l[u];l.lineWidth=m===`auto`?r.lineWidth>0&&h?2:0:l.lineWidth,l.fill=t.get(`inactiveColor`),l.stroke=t.get(`inactiveBorderColor`),p.stroke=f.get(`inactiveColor`),p.lineWidth=f.get(`inactiveWidth`)}return{itemStyle:l,lineStyle:p}}function Fq(e){var t=e.icon||`roundRect`,n=Gk(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 Iq(e,t,n,r){Rq(e,t,n,r),n.dispatchAction({type:`legendToggleSelect`,name:e??t}),Lq(e,t,n,r)}function Lq(e,t,n,r){n.usingTHL()||n.dispatchAction({type:`highlight`,seriesName:e,name:t,excludeSeriesId:r})}function Rq(e,t,n,r){n.usingTHL()||n.dispatchAction({type:`downplay`,seriesName:e,name:t,excludeSeriesId:r})}function zq(e,t,n){var r=e===`allSelect`||e===`inverseSelect`,i={},a=[];n.eachComponent({mainType:`legend`,query:t},function(n){r?n[e]():n[e](t.name),Bq(n,i),a.push(n.componentIndex)});var o={};return n.eachComponent(`legend`,function(e){H(i,function(t,n){e[t?`select`:`unSelect`](n)}),Bq(e,o)}),r?{selected:o,legendIndex:a}:{name:t.name,selected:o}}function Bq(e,t){var n=t||{};return H(e.getData(),function(t){var r=t.get(`name`);if(!(r===`
|
|
283
|
-
`||r===``)){var i=e.isSelected(r);Gd(n,r)?n[r]=n[r]&&i:n[r]=i}}),n}function Vq(e){e.registerAction(`legendToggleSelect`,`legendselectchanged`,yd(zq,`toggleSelected`)),e.registerAction(`legendAllSelect`,`legendselectall`,yd(zq,`allSelect`)),e.registerAction(`legendInverseSelect`,`legendinverseselect`,yd(zq,`inverseSelect`)),e.registerAction(`legendSelect`,`legendselected`,yd(zq,`select`)),e.registerAction(`legendUnSelect`,`legendunselected`,yd(zq,`unSelect`))}var Hq=fb(Uq);function Uq(e){var t=e.findComponents({mainType:`legend`});t&&t.length&&e.filterSeries(function(e){for(var n=0;n<t.length;n++)if(!t[n].isSelected(e.name))return!1;return!0})}function Wq(e){e.registerComponentModel(Oq),e.registerComponentView(Nq),e.registerProcessor(e.PRIORITY.PROCESSOR.SERIES_FILTER,Hq),e.registerSubTypeDefaulter(`legend`,function(){return`plain`}),Vq(e)}var Gq=function(e){z(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.setScrollDataIndex=function(e){this.option.scrollDataIndex=e},t.prototype.init=function(t,n,r){var i=EO(t);e.prototype.init.call(this,t,n,r),Kq(this,t,i)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),Kq(this,this.option,t)},t.type=`legend.scroll`,t.defaultOption=VE(Oq.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}),t}(Oq);function Kq(e,t,n){var r=e.getOrient(),i=[1,1];i[r.index]=0,TO(t,n,{type:`box`,ignoreSize:!!i})}var qq=iS,Jq=[`width`,`height`],Yq=[`x`,`y`],Xq=function(e){z(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!0,n._currentIndex=0,n}return t.prototype.init=function(){e.prototype.init.call(this),this.group.add(this._containerGroup=new qq),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new qq)},t.prototype.resetInner=function(){e.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},t.prototype.renderInner=function(t,n,r,i,a,o,s){var c=this;e.prototype.renderInner.call(this,t,n,r,i,a,o,s);var l=this._controllerGroup,u=n.get(`pageIconSize`,!0),d=W(u)?u:[u,u];p(`pagePrev`,0);var f=n.getModel(`pageTextStyle`);l.add(new rv({name:`pageText`,style:{text:`xx/xx`,fill:f.getTextColor(),font:f.getFont(),verticalAlign:`middle`,align:`center`},silent:!0})),p(`pageNext`,1);function p(e,t){var r=e+`DataIndex`,a=zC(n.get(`pageIcons`,!0)[n.getOrient().name][t],{onclick:vd(c._pageGo,c,r,n,i)},{x:-d[0]/2,y:-d[1]/2,width:d[0],height:d[1]});a.name=e,l.add(a)}},t.prototype.layoutInner=function(e,t,n,r,i,a){var o=this.getSelectorGroup(),s=e.getOrient().index,c=Jq[s],l=Yq[s],u=Jq[1-s],d=Yq[1-s];i&&vO(`horizontal`,o,e.get(`selectorItemGap`,!0));var f=e.get(`selectorButtonGap`,!0),p=o.getBoundingRect(),m=[-p.x,-p.y],h=B(n);i&&(h[c]=n[c]-p[c]-f);var g=this._layoutContentAndController(e,r,h,s,c,u,d,l);if(i){if(a===`end`)m[s]+=g[c]+f;else{var _=p[c]+f;m[s]-=_,g[l]-=_}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},t.prototype._layoutContentAndController=function(e,t,n,r,i,a,o,s){var c=this.getContentGroup(),l=this._containerGroup,u=this._controllerGroup;vO(e.get(`orient`),c,e.get(`itemGap`),r?n.width:null,r?null:n.height),vO(`horizontal`,u,e.get(`pageButtonItemGap`,!0));var d=c.getBoundingRect(),f=u.getBoundingRect(),p=this._showController=d[i]>n[i],m=[-d.x,-d.y];t||(m[r]=c[s]);var h=[0,0],g=[-f.x,-f.y],_=J(e.get(`pageButtonGap`,!0),e.get(`itemGap`,!0));p&&(e.get(`pageButtonPosition`,!0)===`end`?g[r]+=n[i]-f[i]:h[r]+=f[i]+_),g[1-r]+=d[a]/2-f[a]/2,c.setPosition(m),l.setPosition(h),u.setPosition(g);var v={x:0,y:0};if(v[i]=p?n[i]:d[i],v[a]=Math.max(d[a],f[a]),v[o]=Math.min(0,f[o]+g[1-r]),l.__rectSize=n[i],p){var y={x:0,y:0};y[i]=Math.max(n[i]-f[i]-_,0),y[a]=v[a],l.setClipPath(new Q_({shape:y})),l.__rectSize=y[i]}else u.eachChild(function(e){e.attr({invisible:!0,silent:!0})});var b=this._getPageInfo(e);return b.pageIndex!=null&&sC(c,{x:b.contentPosition[0],y:b.contentPosition[1]},p?e:null),this._updatePageInfoView(e,b),v},t.prototype._pageGo=function(e,t,n){var r=this._getPageInfo(t)[e];r!=null&&n.dispatchAction({type:`legendScroll`,scrollDataIndex:r,legendId:t.id})},t.prototype._updatePageInfoView=function(e,t){var n=this._controllerGroup;H([`pagePrev`,`pageNext`],function(r){var i=t[r+`DataIndex`]!=null,a=n.childOfName(r);a&&(a.setStyle(`fill`,i?e.get(`pageIconColor`,!0):e.get(`pageIconInactiveColor`,!0)),a.cursor=i?`pointer`:`default`)});var r=n.childOfName(`pageText`),i=e.get(`pageFormatter`),a=t.pageIndex,o=a==null?0:a+1,s=t.pageCount;r&&i&&r.setStyle(`text`,K(i)?i.replace(`{current}`,o==null?``:o+``).replace(`{total}`,s==null?``:s+``):i({current:o,total:s}))},t.prototype._getPageInfo=function(e){var t=e.get(`scrollDataIndex`,!0),n=this.getContentGroup(),r=this._containerGroup.__rectSize,i=e.getOrient().index,a=Jq[i],o=Yq[i],s=this._findTargetItemIndex(t),c=n.children(),l=c[s],u=c.length,d=+!!u,f={contentPosition:[n.x,n.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!l)return f;var p=v(l);f.contentPosition[i]=-p.s;for(var m=s+1,h=p,g=p,_=null;m<=u;++m)_=v(c[m]),(!_&&g.e>h.s+r||_&&!y(_,h.s))&&(h=g.i>h.i?g:_,h&&(f.pageNextDataIndex??=h.i,++f.pageCount)),g=_;for(var m=s-1,h=p,g=p,_=null;m>=-1;--m)_=v(c[m]),(!_||!y(g,_.s))&&h.i<g.i&&(g=h,f.pagePrevDataIndex??=h.i,++f.pageCount,++f.pageIndex),h=_;return f;function v(e){if(e){var t=e.getBoundingRect(),n=t[o]+e[o];return{s:n,e:n+t[a],i:e.__legendDataIndex}}}function y(e,t){return e.e>=t&&e.s<=t+r}},t.prototype._findTargetItemIndex=function(e){if(!this._showController)return 0;var t,n=this.getContentGroup(),r;return n.eachChild(function(n,i){var a=n.__legendDataIndex;r==null&&a!=null&&(r=i),a===e&&(t=i)}),t??r},t.type=`legend.scroll`,t}(Nq);function Zq(e){e.registerAction(`legendScroll`,`legendscroll`,function(e,t){var n=e.scrollDataIndex;n!=null&&t.eachComponent({mainType:`legend`,subType:`scroll`,query:e},function(e){e.setScrollDataIndex(n)})})}function Qq(e){WK(Wq),e.registerComponentModel(Gq),e.registerComponentView(Xq),Zq(e)}function $q(e){WK(Wq),WK(Qq)}var eJ=e({createDimensions:()=>fE,createList:()=>tJ,createScale:()=>rJ,createSymbol:()=>Gk,createTextStyle:()=>aJ,dataStack:()=>nJ,enableHoverEmphasis:()=>Sx,getECData:()=>pb,getLayoutRect:()=>bO,mixinAxisModelCommonMethods:()=>iJ});function tJ(e){return PE(null,e)}var nJ={isDimensionStacked:AE,enableDataStack:OE,getStackedDimension:jE};function rJ(e,t){var n=t;t instanceof Fw||(n=new Fw(t));var r=Nj(n),i=Pj(n,r,!1);return e[1]<e[0]&&(e=e.slice().reverse()),aG(i,n,null,null,e),i}function iJ(e){dd(e,HW)}function aJ(e,t){return t||={},pw(e,null,null,t.state!==`normal`)}var oJ=1e-8;function sJ(e,t){return Math.abs(e-t)<oJ}function cJ(e,t,n){var r=0,i=e[0];if(!i)return!1;for(var a=1;a<e.length;a++){var o=e[a];r+=x_(i[0],i[1],o[0],o[1],t,n),i=o}var s=e[0];return(!sJ(i[0],s[0])||!sJ(i[1],s[1]))&&(r+=x_(i[0],i[1],s[0],s[1],t,n)),r!==0}var lJ=[];function uJ(e,t){for(var n=0;n<e.length;n++)np(e[n],e[n],t)}function dJ(e,t,n,r){for(var i=0;i<e.length;i++){var a=e[i];r&&(a=r.project(a)),a&&isFinite(a[0])&&isFinite(a[1])&&(rp(t,t,a),ip(n,n,a))}}function fJ(e){for(var t=0,n=0,r=0,i=e.length,a=e[i-1][0],o=e[i-1][1],s=0;s<i;s++){var c=e[s][0],l=e[s][1],u=a*l-c*o;t+=u,n+=(a+c)*u,r+=(o+l)*u,a=c,o=l}return t?[n/t/3,r/t/3,t]:[e[0][0]||0,e[0][1]||0]}var pJ=function(){function e(e){this.name=e}return e.prototype.setCenter=function(e){this._center=e},e.prototype.getCenter=function(){var e=this._center;return e||=this._center=this.calcCenter(),e},e}(),mJ=function(){function e(e,t){this.type=`polygon`,this.exterior=e,this.interiors=t}return e}(),hJ=function(){function e(e){this.type=`linestring`,this.points=e}return e}(),gJ=function(e){z(t,e);function t(t,n,r){var i=e.call(this,t)||this;return i.type=`geoJSON`,i.geometries=n,i._center=r&&[r[0],r[1]],i}return t.prototype.calcCenter=function(){for(var e=this.geometries,t,n=0,r=0;r<e.length;r++){var i=e[r],a=i.exterior,o=a&&a.length;o>n&&(t=i,n=o)}if(t)return fJ(t.exterior);var s=this.getBoundingRect();return[s.x+s.width/2,s.y+s.height/2]},t.prototype.getBoundingRect=function(e){var t=this._rect;if(t&&!e)return t;var n=[1/0,1/0],r=[-1/0,-1/0],i=this.geometries;return H(i,function(t){t.type===`polygon`?dJ(t.exterior,n,r,e):H(t.points,function(t){dJ(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 Z(n[0],n[1],r[0]-n[0],r[1]-n[1]),e||(this._rect=t),t},t.prototype.contain=function(e){var t=this.getBoundingRect(),n=this.geometries;if(!t.contain(e[0],e[1]))return!1;loopGeo:for(var r=0,i=n.length;r<i;r++){var a=n[r];if(a.type===`polygon`){var o=a.exterior,s=a.interiors;if(cJ(o,e[0],e[1])){for(var c=0;c<(s?s.length:0);c++)if(cJ(s[c],e[0],e[1]))continue loopGeo;return!0}}}return!1},t.prototype.transformTo=function(e,t,n,r){var i=this.getBoundingRect(),a=i.width/i.height;n?r||=n/a:n=a*r;for(var o=new Z(e,t,n,r),s=i.calculateTransform(o),c=this.geometries,l=0;l<c.length;l++){var u=c[l];u.type===`polygon`?(uJ(u.exterior,s),H(u.interiors,function(e){uJ(e,s)})):H(u.points,function(e){uJ(e,s)})}i=this._rect,i.copy(o),this._center=[i.x+i.width/2,i.y+i.height/2]},t.prototype.cloneShallow=function(e){e??=this.name;var n=new t(e,this.geometries,this._center);return n._rect=this._rect,n.transformTo=null,n},t}(pJ);(function(e){z(t,e);function t(t,n){var r=e.call(this,t)||this;return r.type=`geoSVG`,r._elOnlyForCalculate=n,r}return t.prototype.calcCenter=function(){for(var e=this._elOnlyForCalculate,t=e.getBoundingRect(),n=[t.x+t.width/2,t.y+t.height/2],r=Tf(lJ),i=e;i&&!i.isGeoSVGGraphicRoot;)Df(r,i.getLocalTransform(),r),i=i.parent;return jf(r,r),np(n,n,r),n},t})(pJ);function _J(e){if(!e.UTF8Encoding)return e;var t=e,n=t.UTF8Scale;n??=1024;var r=t.features;return H(r,function(e){var t=e.geometry,r=t.encodeOffsets,i=t.coordinates;if(r)switch(t.type){case`LineString`:t.coordinates=yJ(i,r,n);break;case`Polygon`:vJ(i,r,n);break;case`MultiLineString`:vJ(i,r,n);break;case`MultiPolygon`:H(i,function(e,t){return vJ(e,r[t],n)})}}),t.UTF8Encoding=!1,t}function vJ(e,t,n){for(var r=0;r<e.length;r++)e[r]=yJ(e[r],t[r],n)}function yJ(e,t,n){for(var r=[],i=t[0],a=t[1],o=0;o<e.length;o+=2){var s=e.charCodeAt(o)-64,c=e.charCodeAt(o+1)-64;s=s>>1^-(s&1),c=c>>1^-(c&1),s+=i,c+=a,i=s,a=c,r.push([s/n,c/n])}return r}function bJ(e,t){return e=_J(e),U(md(e.features,function(e){return e.geometry&&e.properties&&e.geometry.coordinates.length>0}),function(e){var n=e.properties,r=e.geometry,i=[];switch(r.type){case`Polygon`:var a=r.coordinates;i.push(new mJ(a[0],a.slice(1)));break;case`MultiPolygon`:H(r.coordinates,function(e){e[0]&&i.push(new mJ(e[0],e.slice(1)))});break;case`LineString`:i.push(new hJ([r.coordinates]));break;case`MultiLineString`:i.push(new hJ(r.coordinates))}var o=new gJ(n[t||`name`],i,n.cp);return o.properties=n,o})}var xJ=e({MAX_SAFE_INTEGER:()=>qv,asc:()=>zv,getPercentWithPrecision:()=>Wv,getPixelPrecision:()=>Hv,getPrecision:()=>Bv,getPrecisionSafe:()=>Vv,isNumeric:()=>iy,isRadianAroundZero:()=>Yv,linearMap:()=>jv,nice:()=>ey,numericToNumber:()=>ry,parseDate:()=>Zv,parsePercent:()=>Mv,quantile:()=>ty,quantity:()=>Qv,quantityExponent:()=>$v,reformIntervals:()=>ny,remRadian:()=>Jv,round:()=>Rv}),SJ=e({format:()=>LD,parse:()=>Zv,roundTime:()=>BD}),CJ=e({Arc:()=>HS,BezierCurve:()=>BS,BoundingRect:()=>Z,Circle:()=>oS,CompoundPath:()=>US,Ellipse:()=>cS,Group:()=>iS,Image:()=>W_,IncrementalDisplayable:()=>rC,Line:()=>IS,LinearGradient:()=>GS,Polygon:()=>jS,Polyline:()=>NS,RadialGradient:()=>KS,Rect:()=>Q_,Ring:()=>DS,Sector:()=>TS,Text:()=>rv,clipPointsByRect:()=>LC,clipRectByRect:()=>RC,createIcon:()=>zC,extendPath:()=>bC,extendShape:()=>vC,getShapeClass:()=>SC,getTransform:()=>jC,initProps:()=>cC,makeImage:()=>wC,makePath:()=>CC,mergePath:()=>EC,registerShape:()=>xC,resizePath:()=>DC,updateProps:()=>sC}),wJ=e({addCommas:()=>nO,capitalFirst:()=>dO,encodeHTML:()=>tD,formatTime:()=>uO,formatTpl:()=>cO,getTextRect:()=>tO,getTooltipMarker:()=>lO,normalizeCssArray:()=>iO,toCamelCase:()=>rO,truncateText:()=>Gp}),TJ=e({bind:()=>vd,clone:()=>B,curry:()=>yd,defaults:()=>sd,each:()=>H,extend:()=>V,filter:()=>md,indexOf:()=>ld,inherits:()=>ud,isArray:()=>W,isFunction:()=>G,isObject:()=>q,isString:()=>K,map:()=>U,merge:()=>id,reduce:()=>pd});function EJ(e){var t=kO.extend(e);return kO.registerClass(t),t}function DJ(e){var t=NB.extend(e);return NB.registerClass(t),t}function OJ(e){var t=Ak.extend(e);return Ak.registerClass(t),t}function kJ(e){var t=wA.extend(e);return wA.registerClass(t),t}var AJ=e({Axis:()=>gN,ChartView:()=>wA,ComponentModel:()=>kO,ComponentView:()=>NB,List:()=>dE,Model:()=>Fw,PRIORITY:()=>HH,SeriesModel:()=>Ak,color:()=>eh,connect:()=>zU,dataTool:()=>dW,dependencies:()=>wH,disConnect:()=>VU,disconnect:()=>BU,dispose:()=>HU,env:()=>X,extendChartView:()=>kJ,extendComponentModel:()=>EJ,extendComponentView:()=>DJ,extendSeriesModel:()=>OJ,format:()=>wJ,getCoordinateSystemDimensions:()=>$U,getInstanceByDom:()=>UU,getInstanceById:()=>WU,getMap:()=>cW,graphic:()=>CJ,helper:()=>eJ,init:()=>RU,innerDrawElementOnCanvas:()=>cH,matrix:()=>Cf,number:()=>xJ,parseGeoJSON:()=>bJ,parseGeoJson:()=>bJ,registerAction:()=>ZU,registerCoordinateSystem:()=>QU,registerCustomSeries:()=>eW,registerLayout:()=>tW,registerLoading:()=>aW,registerLocale:()=>uD,registerMap:()=>sW,registerPostInit:()=>JU,registerPostUpdate:()=>YU,registerPreprocessor:()=>KU,registerProcessor:()=>qU,registerTheme:()=>GU,registerTransform:()=>lW,registerUpdateLifecycle:()=>XU,registerVisual:()=>nW,setCanvasCreator:()=>oW,setPlatformAPI:()=>Vu,throttle:()=>mF,time:()=>SJ,use:()=>WK,util:()=>TJ,vector:()=>Nf,version:()=>CH,zrUtil:()=>Hu,zrender:()=>xz});function jJ(e,t,n){var r=Bu.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 MJ(e){return!e.__cursors.get(0)}function NJ(e){var t=e.__cursors.get(0);return{startIdx:t?t.startIdx:0,endIdx:t?t.endIdx:0}}var PJ=function(e){z(t,e);function t(t,n,r){var i=e.call(this)||this;i.motionBlur=!1,i.lastFrameAlpha=.7,i.dpr=1,i.virtual=!1,i.config={},i.zlevel=0,i.zlevel2=0,i.maxRepaintRectCount=5,i.__dirty=!0,i.__firstTimePaint=!0,i.__prevIdx={startIdx:0,endIdx:0};var a;r||=rg,typeof t==`string`?a=jJ(t,n,r):q(t)&&(a=t,t=a.id),i.id=t,i.dom=a;var o=a.style;return o&&(Wd(a),a.onselectstart=function(){return!1},o.padding=`0`,o.margin=`0`,o.borderWidth=`0`),i.painter=n,i.dpr=r,i}return t.prototype.afterBrush=function(){this.__prevIdx=NJ(this)},t.prototype.initContext=function(){this.ctx=this.dom.getContext(`2d`),this.ctx.dpr=this.dpr},t.prototype.setUnpainted=function(){this.__firstTimePaint=!0},t.prototype.createBackBuffer=function(){var e=this.dpr;this.domBack=jJ(`back-`+this.id,this.painter,e),this.ctxBack=this.domBack.getContext(`2d`),e!==1&&this.ctxBack.scale(e,e)},t.prototype.createRepaintRects=function(e,t,n,r){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var i=[],a=this.maxRepaintRectCount,o=!1,s=new Z(0,0,0,0);function c(e){if(!(!e.isFinite()||e.isZero()))if(i.length===0){var t=new Z(0,0,0,0);t.copy(e),i.push(t)}else{for(var n=!1,r=1/0,c=0,l=0;l<i.length;++l){var u=i[l];if(u.intersect(e)){var d=new Z(0,0,0,0);d.copy(u),d.union(e),i[l]=d,n=!0;break}else if(o){s.copy(e),s.union(u);var f=e.width*e.height,p=u.width*u.height,m=s.width*s.height-f-p;m<r&&(r=m,c=l)}}if(o&&(i[c].union(e),n=!0),!n){var t=new Z(0,0,0,0);t.copy(e),i.push(t)}o||=i.length>=a}}for(var l=NJ(this),u=l.startIdx;u<l.endIdx;++u){var d=e[u];if(d){var f=d.shouldBePainted(n,r,!0,!0),p=d.__isRendered&&(d.__dirty&1||!f)?d.getPrevPaintRect():null;p&&c(p);var m=f&&(d.__dirty&1||!d.__isRendered)?d.getPaintRect():null;m&&c(m)}}for(var h=this.__prevIdx,u=h.startIdx;u<h.endIdx;++u){var d=t[u],f=d&&d.shouldBePainted(n,r,!0,!0);if(d&&(!f||!d.__zr)&&d.__isRendered){var p=d.getPrevPaintRect();p&&c(p)}}var g;do{g=!1;for(var u=0;u<i.length;){if(i[u].isZero()){i.splice(u,1);continue}for(var _=u+1;_<i.length;)i[u].intersect(i[_])?(g=!0,i[u].union(i[_]),i.splice(_,1)):_++;u++}}while(g);return this._paintRects=i,i},t.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},t.prototype.resize=function(e,t){var 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))},t.prototype.clear=function(e,t,n){var r=this.dom,i=this.ctx,a=r.width,o=r.height;t||=this.clearColor;var 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));var d=this.domBack;function f(e,n,r,a){if(i.clearRect(e,n,r,a),t&&t!==`transparent`){var o=void 0;Td(t)?(o=(t.global||t.__width===r&&t.__height===a)&&t.__canvasGradient||MV(i,t,{x:0,y:0,width:r,height:a}),t.__canvasGradient=o,t.__width=r,t.__height=a):Ed(t)&&(t.scaleX=t.scaleX||l,t.scaleY=t.scaleY||l,o=WV(i,t,{dirty:function(){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&&H(n,function(e){f(e.x*l,e.y*l,e.width*l,e.height*l)})},t}(tg),FJ=1e5,IJ=314159,LJ=void 0,RJ=1,zJ=2;function BJ(e){return e?e.__builtin__?!0:!(typeof e.resize!=`function`||typeof e.refresh!=`function`):!1}function VJ(e,t){var 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 HJ(e,t,n,r){var i=new PJ(e,t,t.dpr);return i.zlevel=n,i.zlevel2=r,i.__builtin__=!0,UJ(i),i}function UJ(e){e.__cursorStack=[],e.__cursors=Y()}function WJ(e){return e.startIdx=e.drawIdx=e.endIdx=e.endIdxNew=0,e.used=!1,e.first=e.last=NaN,e.notClearIdx=-1,e}function GJ(e,t){var n=e.__cursors,r=+t;return n.get(r)||(e.__cursorStack.push(r),n.set(r,WJ({key:r})))}function KJ(e,t){for(var n=e.__cursorStack,r=0;r<n.length;r++)t(e.__cursors.get(n[r]))}function qJ(e,t){var n=e.layers;return n[t]||(n[t]=[,,,])}function JJ(e,t,n){for(var r=e.layerStack,i=0;i<r.length;i++){var a=r[i].zl,o=r[i].zl2,s=e.layers[a][o];(!n||(!(n&YJ)||s.__builtin__)&&(!(n&XJ)||!s.__builtin__)&&(!(n&ZJ)||s!==e.hoverlayer))&&t(s,a,o,i)}}var YJ=1,XJ=2,ZJ=4,QJ=YJ|ZJ,$J=function(){function e(e,t,n,r){this.type=`canvas`,this._prevDisplayList=[],this._layerConfig={},this._needsManuallyCompositing=!1,this.type=`canvas`,this._i={layerStack:[],layers:[]};var i=!e.nodeName||e.nodeName.toUpperCase()===`CANVAS`;if(this._opts=n=V({},n||{}),this.dpr=n.devicePixelRatio||rg,this._singleCanvas=i,this.root=e,e.style&&(Wd(e),e.innerHTML=``),this.storage=t,this._prevDisplayList=[],i){var a=e,o=a.width,s=a.height;n.width!=null&&(o=n.width),n.height!=null&&(s=n.height),this.dpr=n.devicePixelRatio||1,a.width=o*this.dpr,a.height=s*this.dpr,this._width=o,this._height=s;var c=HJ(a,this,IJ,0);c.initContext(),this._insertLayer(c,IJ,0,!0),this._domRoot=e}else{this._width=FV(e,0,n),this._height=FV(e,1,n);var l=this._domRoot=VJ(this._width,this._height);e.appendChild(l)}}return e.prototype.getType=function(){return`canvas`},e.prototype.isSingleCanvas=function(){return this._singleCanvas},e.prototype.getViewportRoot=function(){return this._domRoot},e.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},e.prototype.refresh=function(e){var t=e&&!q(e)?{paintAll:!!e}:e||{},n=J(t.refresh,!0),r=J(t.refreshHover,!1);if(r&&(this._hoverLayerDirty=zJ),!n)return r&&this._paintHoverList(this.storage.getDisplayList(!1)),this;var i=this.storage.getDisplayList(!0);this._updateLayerStatus(i,t.paintAll),this._redrawId=Math.random();var a=this._prevDisplayList;this._paintList(i,a,this._redrawId);var o=this._backgroundColor;return JJ(this._i,function(e,t,n,r){e.refresh&&e.refresh(r===0?o:null)},XJ),this._opts.useDirtyRect&&(this._prevDisplayList=i.slice()),this},e.prototype._paintHoverList=function(e){var t=this._i.hoverlayer,n=this._hoverLayerDirty;if(this._hoverLayerDirty=LJ,n!==LJ&&(!t&&n===zJ&&(t=this._i.hoverlayer=this._ensureLayer(FJ)),t)){t.clear();for(var r={inHover:!0,viewWidth:this._width,viewHeight:this._height,beforeBrushParam:{}},i,a=0,o=e.length;a<o;a++){var s=e[a];if(s.__inHover){i||(i=t.ctx,i.save());var c=s.__hoverStyle,l=void 0;c&&(l=s.style,s.style=c),lH(i,s,r),c&&(s.style=l)}}i&&(uH(i,r),i.restore())}},e.prototype.getHoverLayer=function(){return this._ensureLayer(FJ)},e.prototype.paintOne=function(e,t){cH(e,t)},e.prototype._paintList=function(e,t,n){if(this._redrawId===n){var r=this._doPaintList(e,t);if(this._needsManuallyCompositing&&this._compositeManually(),r)JJ(this._i,function(e){e.afterBrush&&e.afterBrush()},QJ),this._paintHoverList(e);else{var i=this;$R(function(){i._paintList(e,t,n)})}}},e.prototype._compositeManually=function(){var e=this._ensureLayer(IJ).ctx,t=this._domRoot.width,n=this._domRoot.height;e.clearRect(0,0,t,n),JJ(this._i,function(r){r.virtual&&e.drawImage(r.dom,0,0,t,n)},YJ)},e.prototype._doPaintList=function(e,t){var n=this,r=!0;return JJ(this._i,function(i){var a=!1;if(KJ(i,function(e){(e.drawIdx<e.endIdx||e.notClearIdx>=0)&&(a=!0)}),!(!a&&!i.__dirty)){var o=n._opts.useDirtyRect&&!MJ(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;var l=i.zlevel===s.zl&&i.zlevel2===s.zl2?n._backgroundColor:null;i.clear(!1,l,o)}KJ(i,function(t){var a=n._paintPerCursor(i,t,e,o,c);r&&=a})}},QJ),X.wxa&&JJ(this._i,function(e){e&&e.ctx&&e.ctx.draw&&e.ctx.draw()}),r},e.prototype._paintPerCursor=function(e,t,n,r,i){var a=e.ctx;if(r)if(!r.length)t.drawIdx=t.endIdx;else for(var o=this.dpr,s=0;s<r.length;++s){var 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},e.prototype._paintPerCursorInRect=function(e,t,n,r,i){for(var a={inHover:!1,allClipped:!1,prevEl:null,viewWidth:this._width,viewHeight:this._height,beforeBrushParam:{contentRetained:i}},o=e.ctx,s=MJ(e),c=s&&Bu.getTime(),l=t.drawIdx,u=t.notClearIdx,d=u>=0?Math.min(u,l):l;d<t.endIdx;d++){var f=n[d];if(!(d<l&&!f.notClear)){if(f.__inHover&&(this._hoverLayerDirty=zJ),r!=null){var p=f.getPaintRect();p&&p.intersect(r)&&(lH(o,f,a),f.setPrevPaintRect(p))}else lH(o,f,a);if(s&&Bu.getTime()-c>15){d++;break}}}uH(o,a),t.drawIdx=Math.max(d,l)},e.prototype.getLayer=function(e,t){return this._ensureLayer(e,0,t)},e.prototype._ensureLayer=function(e,t,n){t||=0;var r=this._singleCanvas;r&&!this._needsManuallyCompositing&&(e=IJ,t=0);var i=qJ(this._i,e)[t];return i||(i=HJ(`zr_`+e+`.`+t,this,e,t),this._layerConfig[e]&&id(i,this._layerConfig[e],!0),(n||r&&e!==IJ)&&(i.virtual=!0),this._insertLayer(i,e,t,!1),i.initContext()),i},e.prototype.insertLayer=function(e,t){this._insertLayer(t,e,0,!1)},e.prototype._insertLayer=function(e,t,n,r){var i=this._i,a=i.layers,o=i.layerStack,s=this._domRoot,c=null;if(!(a[t]&&a[t][n])&&BJ(e)){for(var l=o.length,u=0;u<l&&(o[u].zl<t||o[u].zl===t&&o[u].zl2<n);)u++;if(u>0&&(c=qJ(i,o[u-1].zl)[o[u-1].zl2]),o.splice(u,0,{zl:t,zl2:n}),qJ(i,t)[n]=e,!r&&!e.virtual)if(c){var d=c.dom;d.nextSibling?s.insertBefore(e.dom,d.nextSibling):s.appendChild(e.dom)}else s.firstChild?s.insertBefore(e.dom,s.firstChild):s.appendChild(e.dom);e.painter||=this}},e.prototype.eachLayer=function(e,t){return JJ(this._i,function(n,r){e.call(t,n,r)})},e.prototype.eachBuiltinLayer=function(e,t){return JJ(this._i,function(n,r){e.call(t,n,r)},YJ)},e.prototype.eachOtherLayer=function(e,t){return JJ(this._i,function(n,r){e.call(t,n,r)},XJ)},e.prototype.getLayers=function(){var e={};return JJ(this._i,function(t,n,r){e[t.id]=t}),e},e.prototype._updateLayerStatus=function(e,t){var n=this;if(n._singleCanvas)for(var r=1;r<e.length;r++){var i=e[r];if(i.zlevel!==e[r-1].zlevel||i.incremental){n._needsManuallyCompositing=!0;break}}JJ(n._i,function(e){e.__dirty=!1,KJ(e,function(e){e.used=!1,e.endIdxNew=0,e.notClearIdx=-1})},QJ);for(var a,o=null,s=null,c=!1,l=0,u=e.length;l<u;l++){var i=e[l],d=i.zlevel,f=i.incremental,p=void 0;if(a!==d&&(a=d,c=!1),f?(c=!0,p=1):p=c?2:0,(!o||d!==o.zlevel||p!==o.zlevel2)&&(o=n._ensureLayer(d,p),s=null,!o.__builtin__)){rd(`ZLevel `+d+` has been used by unknown layer `+o.id);continue}if((!s||f!==s.key)&&(s=GJ(o,f),!s.used))if(s.used=!0,!t&&s.first===i.id){var m=l-s.startIdx;s.startIdx=l,s.drawIdx+=m,s.endIdx+=m}else o.__dirty=!0,s.first=i.id,s.startIdx=s.drawIdx=l,s.endIdx=l+1;s.endIdxNew=l+1,i.__dirty&1&&!i.__inHover&&((!f||!i.notClear&&l<s.drawIdx)&&(o.__dirty=!0),f&&i.notClear&&s.notClearIdx<0&&(s.notClearIdx=l))}JJ(n._i,function(t){for(var r=t.__cursorStack,i=t.__cursors,a=r.length-1;a>=0;a--){var o=i.get(r[a]);if(!o.used)t.__dirty=!0,i.removeKey(r[a]),r.splice(a,1);else{var s=o.endIdxNew;(MJ(t)?s<o.drawIdx:s!==o.endIdx||!s||e[s-1].id!==o.last)&&(t.__dirty=!0),o.endIdx=o.endIdxNew,o.last=s?e[s-1].id:NaN}}t.__dirty&&(KJ(t,function(e){e.drawIdx=e.startIdx}),n._hoverLayerDirty===LJ&&(n._hoverLayerDirty=RJ))},QJ)},e.prototype.clear=function(){return JJ(this._i,function(e){e.clear(),UJ(e)},YJ),this},e.prototype.setBackgroundColor=function(e){this._backgroundColor=e,JJ(this._i,function(e){e.setUnpainted()})},e.prototype.configLayer=function(e,t){if(t){var n=this._layerConfig;n[e]?id(n[e],t,!0):n[e]=t,JJ(this._i,function(e,t){id(e,n[t],!0)})}},e.prototype.delLayer=function(e){for(var t=this._i.layerStack,n=this._i.layers,r=t.length-1;r>=0;r--){var i=t[r];if(i.zl===e){var a=n[e][i.zl2];if(a.__builtin__)continue;if(t.splice(r,1),n[e][i.zl2]=void 0,!a.virtual){var o=a.dom.parentNode;o&&o.removeChild(a.dom)}}}},e.prototype.resize=function(e,t){if(this._domRoot.style){var n=this._domRoot;n.style.display=`none`;var r=this._opts,i=this.root;e!=null&&(r.width=e),t!=null&&(r.height=t),e=FV(i,0,r),t=FV(i,1,r),n.style.display=``,(this._width!==e||t!==this._height)&&(n.style.width=e+`px`,n.style.height=t+`px`,JJ(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(IJ).resize(e,t)}return this},e.prototype.clearLayer=function(e){H(this._i.layers[e],function(e){e&&!e.__builtin__&&e.clear()})},e.prototype.dispose=function(){this.root.innerHTML=``,this.root=this.storage=this._domRoot=this._i=null},e.prototype.getRenderedCanvas=function(e){if(e||={},this._singleCanvas&&!this._compositeManually)return this._i.layers[IJ][0].dom;var t=new PJ(`image`,this,e.pixelRatio||this.dpr);t.initContext(),t.clear(!1,e.backgroundColor||this._backgroundColor);var n=t.ctx;if(e.pixelRatio<=this.dpr){this.refresh();var r=t.dom.width,i=t.dom.height;JJ(this._i,function(e){e.__builtin__?n.drawImage(e.dom,0,0,r,i):e.renderToCanvas&&(n.save(),e.renderToCanvas(n),n.restore())})}else{for(var a={inHover:!1,viewWidth:this._width,viewHeight:this._height,beforeBrushParam:{}},o=this.storage.getDisplayList(!0),s=0,c=o.length;s<c;s++){var l=o[s];lH(n,l,a)}uH(n,a)}return t.dom},e.prototype.getWidth=function(){return this._width},e.prototype.getHeight=function(){return this._height},e}();function eY(e){e.registerPainter(`canvas`,$J)}var tY=[234,()=>[],[]],nY=[235,e=>[e],[``,``,``]],rY=[236,e=>[Record,e,e,e],[``,``,``,``,``,``,``]],iY=[237,e=>[e,nY,Array],[``,``,``,``]],aY=[238,e=>[Record,e,rY,Array],[``,``,``,``,``]],oY=[239,e=>[tY,Record,e,e,e,iY,e,aY,Map],[``,``,``,``,``,``,``,``,``,``]],sY=[240,(e,t)=>[tY,Record,t,oY,t,e,t,e,nY,t,rY,t,e,t,e,nY,t,rY,t,e,t,e,t,t,e,e],`................................................`.split(`.`)];export{mo as C,vo as S,cu as _,$q as a,ls as b,GK as c,GU as d,YF as f,ou as g,nu as h,AJ as i,WK as l,Mu as m,tY as n,Eq as o,_M as p,eY as r,Cq as s,sY as t,VW as u,fu as v,Vt as w,ns as x,us as y};
|