You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

164 lines
1.2 MiB

!(function(){var hr=Math.pow;(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[270],{92296:function(Fe,Wn,J){"use strict";J.d(Wn,{Z:function(){return kht}});var tt={};J.r(tt),J.d(tt,{add:function(){return a6},adjoint:function(){return YD},clone:function(){return D_},copy:function(){return Ws},create:function(){return On},determinant:function(){return F_},equals:function(){return l6},exactEquals:function(){return c6},frob:function(){return i6},fromQuat:function(){return gg},fromQuat2:function(){return ZD},fromRotation:function(){return VD},fromRotationTranslation:function(){return H_},fromRotationTranslationScale:function(){return KD},fromRotationTranslationScaleOrigin:function(){return Bu},fromScaling:function(){return Y_},fromTranslation:function(){return W_},fromValues:function(){return WD},fromXRotation:function(){return UD},fromYRotation:function(){return XD},fromZRotation:function(){return qD},frustum:function(){return QD},getRotation:function(){return oh},getScaling:function(){return tl},getTranslation:function(){return ah},identity:function(){return Du},invert:function(){return Aa},lookAt:function(){return q_},mul:function(){return u6},multiply:function(){return Ur},multiplyScalar:function(){return o6},multiplyScalarAndAdd:function(){return s6},ortho:function(){return U_},orthoNO:function(){return V_},orthoZO:function(){return X_},perspective:function(){return JD},perspectiveFromFieldOfView:function(){return e6},perspectiveNO:function(){return $_},perspectiveZO:function(){return t6},rotate:function(){return HD},rotateX:function(){return z_},rotateY:function(){return G_},rotateZ:function(){return $D},scale:function(){return ih},set:function(){return vg},str:function(){return r6},sub:function(){return f6},subtract:function(){return Z_},targetTo:function(){return n6},translate:function(){return Do},transpose:function(){return B_}});var at={};J.r(at),J.d(at,{area:function(){return E$},bottom:function(){return bo},bottomLeft:function(){return bo},bottomRight:function(){return bo},inside:function(){return bo},left:function(){return bo},outside:function(){return T$},right:function(){return bo},spider:function(){return k$},surround:function(){return N$},top:function(){return bo},topLeft:function(){return bo},topRight:function(){return bo}});var Qt={};J.r(Qt),J.d(Qt,{interpolateBlues:function(){return iU},interpolateBrBG:function(){return DV},interpolateBuGn:function(){return VV},interpolateBuPu:function(){return UV},interpolateCividis:function(){return uU},interpolateCool:function(){return gU},interpolateCubehelixDefault:function(){return pU},interpolateGnBu:function(){return XV},interpolateGreens:function(){return aU},interpolateGreys:function(){return oU},interpolateInferno:function(){return SU},interpolateMagma:function(){return wU},interpolateOrRd:function(){return qV},interpolateOranges:function(){return lU},interpolatePRGn:function(){return BV},interpolatePiYG:function(){return FV},interpolatePlasma:function(){return MU},interpolatePuBu:function(){return KV},interpolatePuBuGn:function(){return ZV},interpolatePuOr:function(){return zV},interpolatePuRd:function(){return QV},interpolatePurples:function(){return sU},interpolateRainbow:function(){return yU},interpolateRdBu:function(){return GV},interpolateRdGy:function(){return WV},interpolateRdPu:function(){return JV},interpolateRdYlBu:function(){return YV},interpolateRdYlGn:function(){return HV},interpolateReds:function(){return cU},interpolateSinebow:function(){return xU},interpolateSpectral:function(){return $V},interpolateTurbo:function(){return _U},interpolateViridis:function(){return OU},interpolateWarm:function(){return vU},interpolateYlGn:function(){return eU},interpolateYlGnBu:function(){return tU},interpolateYlOrBr:function(){return nU},interpolateYlOrRd:function(){return rU},schemeAccent:function(){return _V},schemeBlues:function(){return TE},schemeBrBG:function(){return cE},schemeBuGn:function(){return yE},schemeBuPu:function(){return mE},schemeCategory10:function(){return xV},schemeDark2:function(){return OV},schemeGnBu:function(){return bE},schemeGreens:function(){return CE},schemeGreys:function(){return kE},schemeObservable10:function(){return wV},schemeOrRd:function(){return xE},schemeOranges:function(){return IE},schemePRGn:function(){return lE},schemePaired:function(){return SV},schemePastel1:function(){return MV},schemePastel2:function(){return EV},schemePiYG:function(){return uE},schemePuBu:function(){return OE},schemePuBuGn:function(){return _E},schemePuOr:function(){return fE},schemePuRd:function(){return wE},schemePurples:function(){return LE},schemeRdBu:function(){return dE},schemeRdGy:function(){return hE},schemeRdPu:function(){return SE},schemeRdYlBu:function(){return pE},schemeRdYlGn:function(){return vE},schemeReds:function(){return NE},schemeSet1:function(){return PV},schemeSet2:function(){return AV},schemeSet3:function(){return TV},schemeSpectral:function(){return gE},schemeTableau10:function(){return CV},schemeYlGn:function(){return EE},schemeYlGnBu:function(){return ME},schemeYlOrBr:function(){return PE},schemeYlOrRd:function(){return AE}});var xe={};J.r(xe),J.d(xe,{geoAlbers:function(){return WL},geoAlbersUsa:function(){return Frt},geoAzimuthalEqualArea:function(){return zrt},geoAzimuthalEqualAreaRaw:function(){return Qb},geoAzimuthalEquidistant:function(){return Grt},geoAzimuthalEquidistantRaw:function(){return Jb},geoConicConformal:function(){return Yrt},geoConicConformalRaw:function(){return $L},geoConicEqualArea:function(){return Z0},geoConicEqualAreaRaw:function(){return GL},geoConicEquidistant:function(){return $rt},geoConicEquidistantRaw:function(){return VL},geoEqualEarth:function(){return Urt},geoEqualEarthRaw:function(){return tx},geoEquirectangular:function(){return Hrt},geoEquirectangularRaw:function(){return yd},geoGnomonic:function(){return Xrt},geoGnomonicRaw:function(){return ex},geoIdentity:function(){return qrt},geoMercator:function(){return Wrt},geoMercatorRaw:function(){return gd},geoNaturalEarth1:function(){return Zrt},geoNaturalEarth1Raw:function(){return nx},geoOrthographic:function(){return Krt},geoOrthographicRaw:function(){return rx},geoProjection:function(){return Xa},geoProjectionMutator:function(){return Zb},geoStereographic:function(){return Qrt},geoStereographicRaw:function(){return ix},geoTransverseMercator:function(){return Jrt},geoTransverseMercatorRaw:function(){return ax}});var $t={};J.r($t),J.d($t,{frequency:function(){return Jat},id:function(){return tot},name:function(){return eot},weight:function(){return Qat}});var bt=J(67294),gt=J(73935),Pt=J.t(gt,2),et=function(){return et=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},et.apply(this,arguments)},zt=function(t,e,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{l(r.next(u))}catch(f){o(f)}}function c(u){try{l(r.throw(u))}catch(f){o(f)}}function l(u){u.done?a(u.value):i(u.value).then(s,c)}l((r=r.apply(t,e||[])).next())})},Et=function(t,e){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,l[0]&&(n=0)),n;)try{if(r=1,i&&(a=l[0]&2?i.return:l[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,l[1])).done)return a;switch(i=0,a&&(l=[l[0]&2,a.value]),l[0]){case 0:case 1:a=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]<a[3])){n.label=l[1];break}if(l[0]===6&&n.label<a[1]){n.label=a[1],a=l;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(l);break}a[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=a=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},Nt=et({},Pt),Tt=Nt.version,vt=Nt.render,ft=Nt.unmountComponentAtNode,lt;try{var mt=Number((Tt||"").split(".")[0]);mt>=18&&(lt=Nt.createRoot)}catch(t){}function qt(t){var e=Nt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;e&&typeof e=="object"&&(e.usingClientEntryPoint=t)}var le="__rc_react_root__";function Ue(t,e){qt(!0);var n=e[le]||lt(e);qt(!1),n.render(t),e[le]=n}function je(t,e){vt(t,e)}function ze(t,e){}function He(t,e){if(lt){Ue(t,e);return}je(t,e)}function Ae(t){return zt(this,void 0,void 0,function(){return Et(this,function(e){return[2,Promise.resolve().then(function(){var n;(n=t[le])===null||n===void 0||n.unmount(),delete t[le]})]})})}function nn(t){ft(t)}function Ke(t){}function ee(t){return zt(this,void 0,void 0,function(){return Et(this,function(e){return lt!==void 0?[2,Ae(t)]:(nn(t),[2])})})}var Jt=new Map;Jt.set("tooltip",document.createElement("div"));var Yn=function(t,e){e===void 0&&(e=!1);var n=null;if(e)n=Jt.get("tooltip");else if(n=document.createElement("div"),t!=null&&t.key){var r=Jt.get(t.key);r?n=r:Jt.set(t.key,n)}return He(t,n),n},Xe=function(t){var e=t.attachShadow({mode:"open"}),n=document.createElement("div"),r=document.createElement("style");r.innerHTML=`.loading {
display: inline-block;
position: relative;
width: 80px;
height: 80px;
}
.loading div {
position: absolute;
top: 33px;
width: 13px;
height: 13px;
border-radius: 50%;
background: #ccc;
animation-timing-function: cubic-bezier(0, 1, 1, 0);
}
.loading div:nth-child(1) {
left: 8px;
animation: loading1 0.6s infinite;
}
.loading div:nth-child(2) {
left: 8px;
animation: loading2 0.6s infinite;
}
.loading div:nth-child(3) {
left: 32px;
animation: loading2 0.6s infinite;
}
.loading div:nth-child(4) {
left: 56px;
animation: loading3 0.6s infinite;
}
@keyframes loading1 {
0% {
transform: scale(0);
}
100% {
transform: scale(1);
}
}
@keyframes loading3 {
0% {
transform: scale(1);
}
100% {
transform: scale(0);
}
}
@keyframes loading2 {
0% {
transform: translate(0, 0);
}
100% {
transform: translate(24px, 0);
}
}
`,n.classList.add("loading"),n.innerHTML="<div></div><div></div><div></div><div></div>",e.appendChild(r),e.appendChild(n)},Pr=function(t){var e=t.loadingTemplate,n=t.theme,r=n===void 0?"light":n,i=bt.useRef(null);bt.useEffect(function(){!e&&i.current&&Xe(i.current)},[]);var a=function(){return e||bt.createElement("div",{ref:i})};return bt.createElement("div",{className:"charts-loading-container",style:{position:"absolute",width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",left:0,top:0,zIndex:99,backgroundColor:r==="dark"?"rgb(20, 20, 20)":"rgb(255, 255, 255)"}},a())},Rr=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),pr=function(t){Rr(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.state={hasError:!1},n.renderError=function(r){var i=n.props.errorTemplate;switch(r){default:return typeof i=="function"?i(r):i||bt.createElement("h5",null,"\u7EC4\u4EF6\u51FA\u9519\u4E86\uFF0C\u8BF7\u6838\u67E5\u540E\u91CD\u8BD5\uFF1A ",r.message)}},n}return e.getDerivedStateFromError=function(n){return{hasError:!0,error:n}},e.getDerivedStateFromProps=function(n,r){return r.children!==n.children?{children:n.children,hasError:!1,error:void 0}:null},e.prototype.render=function(){return this.state.hasError?this.renderError(this.state.error):bt.createElement(bt.Fragment,null,this.props.children)},e}(bt.Component),Dr=typeof global=="object"&&global&&global.Object===Object&&global,Ti=Dr,Yi=typeof self=="object"&&self&&self.Object===Object&&self,ca=Ti||Yi||Function("return this")(),Jn=ca,ri=Jn.Symbol,ar=ri,Ar=Object.prototype,fn=Ar.hasOwnProperty,la=Ar.toString,ua=ar?ar.toStringTag:void 0;function jd(t){var e=fn.call(t,ua),n=t[ua];try{t[ua]=void 0;var r=!0}catch(a){}var i=la.call(t);return r&&(e?t[ua]=n:delete t[ua]),i}var xs=jd,_s=Object.prototype,fa=_s.toString;function lu(t){return fa.call(t)}var Ac=lu,Tc="[object Null]",uu="[object Undefined]",To=ar?ar.toStringTag:void 0;function Os(t){return t==null?t===void 0?uu:Tc:To&&To in Object(t)?xs(t):Ac(t)}var xr=Os;function ws(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var or=ws,fu="[object AsyncFunction]",Ss="[object Function]",du="[object GeneratorFunction]",Ms="[object Proxy]";function da(t){if(!or(t))return!1;var e=xr(t);return e==Ss||e==du||e==fu||e==Ms}var Ma=da,hu=function(t){var e=/react|\.jsx|children:\[\(|return\s+[A-Za-z0-9].createElement\((?!['"][g|circle|ellipse|image|rect|line|polyline|polygon|text|path|html|mesh]['"])([^\)])*,/i;return e.test(t)},qa=Array.isArray,Re=qa;function tr(){this.__data__=[],this.size=0}var Es=tr;function Cc(t,e){return t===e||t!==t&&e!==e}var hi=Cc;function Hi(t,e){for(var n=t.length;n--;)if(hi(t[n][0],e))return n;return-1}var sr=Hi,Ps=Array.prototype,As=Ps.splice;function kc(t){var e=this.__data__,n=sr(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():As.call(e,n,1),--this.size,!0}var Lc=kc;function pu(t){var e=this.__data__,n=sr(e,t);return n<0?void 0:e[n][1]}var vu=pu;function gu(t){return sr(this.__data__,t)>-1}var pi=gu;function yu(t,e){var n=this.__data__,r=sr(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}var mu=yu;function Bt(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Bt.prototype.clear=Es,Bt.prototype.delete=Lc,Bt.prototype.get=vu,Bt.prototype.has=pi,Bt.prototype.set=mu;var Co=Bt;function bu(){this.__data__=new Co,this.size=0}var Za=bu;function vi(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}var ko=vi;function Nc(t){return this.__data__.get(t)}var xu=Nc;function _u(t){return this.__data__.has(t)}var Ka=_u,Qa=Jn["__core-js_shared__"],Ea=Qa,Ic=function(){var t=/[^.]+$/.exec(Ea&&Ea.keys&&Ea.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function Ou(t){return!!Ic&&Ic in t}var wu=Ou,Su=Function.prototype,Mu=Su.toString;function Rd(t){if(t!=null){try{return Mu.call(t)}catch(e){}try{return t+""}catch(e){}}return""}var Pa=Rd,jc=/[\\^$.*+?()[\]{}|]/g,Tr=/^\[object .+?Constructor\]$/,_r=Function.prototype,k=Object.prototype,I=_r.toString,z=k.hasOwnProperty,W=RegExp("^"+I.call(z).replace(jc,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function q(t){if(!or(t)||wu(t))return!1;var e=Ma(t)?W:Tr;return e.test(Pa(t))}var Z=q;function H(t,e){return t==null?void 0:t[e]}var $=H;function K(t,e){var n=$(t,e);return Z(n)?n:void 0}var Q=K,St=Q(Jn,"Map"),Mt=St,Ht=Q(Object,"create"),_t=Ht;function Dt(){this.__data__=_t?_t(null):{},this.size=0}var It=Dt;function xt(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var Zt=xt,Wt="__lodash_hash_undefined__",Kt=Object.prototype,Rt=Kt.hasOwnProperty;function Xt(t){var e=this.__data__;if(_t){var n=e[t];return n===Wt?void 0:n}return Rt.call(e,t)?e[t]:void 0}var _e=Xt,Br=Object.prototype,Yr=Br.hasOwnProperty;function Cr(t){var e=this.__data__;return _t?e[t]!==void 0:Yr.call(e,t)}var Fr=Cr,ii="__lodash_hash_undefined__";function An(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=_t&&e===void 0?ii:e,this}var gn=An;function Ci(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Ci.prototype.clear=It,Ci.prototype.delete=Zt,Ci.prototype.get=_e,Ci.prototype.has=Fr,Ci.prototype.set=gn;var Rc=Ci;function Ja(){this.size=0,this.__data__={hash:new Rc,map:new(Mt||Co),string:new Rc}}var ki=Ja;function vr(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var ha=vr;function to(t,e){var n=t.__data__;return ha(e)?n[typeof e=="string"?"string":"hash"]:n.map}var $i=to;function Vi(t){var e=$i(this,t).delete(t);return this.size-=e?1:0,e}var Sv=Vi;function Mv(t){return $i(this,t).get(t)}var Ev=Mv;function Pv(t){return $i(this,t).has(t)}var Av=Pv;function Tv(t,e){var n=$i(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}var Cv=Tv;function Lo(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Lo.prototype.clear=ki,Lo.prototype.delete=Sv,Lo.prototype.get=Ev,Lo.prototype.has=Av,Lo.prototype.set=Cv;var Dc=Lo,kv=200;function Dd(t,e){var n=this.__data__;if(n instanceof Co){var r=n.__data__;if(!Mt||r.length<kv-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Dc(r)}return n.set(t,e),this.size=n.size,this}var Lv=Dd;function No(t){var e=this.__data__=new Co(t);this.size=e.size}No.prototype.clear=Za,No.prototype.delete=ko,No.prototype.get=xu,No.prototype.has=Ka,No.prototype.set=Lv;var Io=No,eo="__lodash_hash_undefined__";function Nv(t){return this.__data__.set(t,eo),this}var Iv=Nv;function X(t){return this.__data__.has(t)}var F=X;function rt(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new Dc;++e<n;)this.add(t[e])}rt.prototype.add=rt.prototype.push=Iv,rt.prototype.has=F;var st=rt;function jt(t,e){for(var n=-1,r=t==null?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}var ne=jt;function ve(t,e){return t.has(e)}var ae=ve,me=1,Le=2;function Ne(t,e,n,r,i,a){var o=n&me,s=t.length,c=e.length;if(s!=c&&!(o&&c>s))return!1;var l=a.get(t),u=a.get(e);if(l&&u)return l==e&&u==t;var f=-1,d=!0,h=n&Le?new st:void 0;for(a.set(t,e),a.set(e,t);++f<s;){var p=t[f],v=e[f];if(r)var g=o?r(v,p,f,e,t,a):r(p,v,f,t,e,a);if(g!==void 0){if(g)continue;d=!1;break}if(h){if(!ne(e,function(y,m){if(!ae(h,m)&&(p===y||i(p,y,n,r,a)))return h.push(m)})){d=!1;break}}else if(!(p===v||i(p,v,n,r,a))){d=!1;break}}return a.delete(t),a.delete(e),d}var ce=Ne,Oe=Jn.Uint8Array,dn=Oe;function Or(t){var e=-1,n=Array(t.size);return t.forEach(function(r,i){n[++e]=[i,r]}),n}var ai=Or;function Li(t){var e=-1,n=Array(t.size);return t.forEach(function(r){n[++e]=r}),n}var yn=Li,Hr=1,Ui=2,gr="[object Boolean]",gi="[object Date]",$r="[object Error]",Ts="[object Map]",no="[object Number]",jo="[object RegExp]",ro="[object Set]",io="[object String]",Cs="[object Symbol]",ks="[object ArrayBuffer]",Eu="[object DataView]",Bc=ar?ar.prototype:void 0,Fc=Bc?Bc.valueOf:void 0;function Bd(t,e,n,r,i,a,o){switch(n){case Eu:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case ks:return!(t.byteLength!=e.byteLength||!a(new dn(t),new dn(e)));case gr:case gi:case no:return hi(+t,+e);case $r:return t.name==e.name&&t.message==e.message;case jo:case io:return t==e+"";case Ts:var s=ai;case ro:var c=r&Hr;if(s||(s=yn),t.size!=e.size&&!c)return!1;var l=o.get(t);if(l)return l==e;r|=Ui,o.set(t,e);var u=ce(s(t),s(e),r,i,a,o);return o.delete(t),u;case Cs:if(Fc)return Fc.call(t)==Fc.call(e)}return!1}var jv=Bd;function Fd(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}var zc=Fd;function Rv(t,e,n){var r=e(t);return Re(t)?r:zc(r,n(t))}var zd=Rv;function Dv(t,e){for(var n=-1,r=t==null?0:t.length,i=0,a=[];++n<r;){var o=t[n];e(o,n,t)&&(a[i++]=o)}return a}var Pu=Dv;function ao(){return[]}var Gc=ao,Ls=Object.prototype,Bv=Ls.propertyIsEnumerable,Gd=Object.getOwnPropertySymbols,Wc=Gd?function(t){return t==null?[]:(t=Object(t),Pu(Gd(t),function(e){return Bv.call(t,e)}))}:Gc,Au=Wc;function Wd(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}var Yc=Wd;function Fv(t){return t!=null&&typeof t=="object"}var wr=Fv,zv="[object Arguments]";function Gv(t){return wr(t)&&xr(t)==zv}var Hc=Gv,Yd=Object.prototype,Qe=Yd.hasOwnProperty,Hd=Yd.propertyIsEnumerable,$d=Hc(function(){return arguments}())?Hc:function(t){return wr(t)&&Qe.call(t,"callee")&&!Hd.call(t,"callee")},yi=$d;function Wv(){return!1}var Vd=Wv,$c=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Vc=$c&&typeof module=="object"&&module&&!module.nodeType&&module,Tu=Vc&&Vc.exports===$c,Uc=Tu?Jn.Buffer:void 0,Yv=Uc?Uc.isBuffer:void 0,Hv=Yv||Vd,Ns=Hv,$v=9007199254740991,Ud=/^(?:0|[1-9]\d*)$/;function Xc(t,e){var n=typeof t;return e=e==null?$v:e,!!e&&(n=="number"||n!="symbol"&&Ud.test(t))&&t>-1&&t%1==0&&t<e}var yr=Xc,Hn=9007199254740991;function cr(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Hn}var pa=cr,Ni="[object Arguments]",va="[object Array]",Is="[object Boolean]",js="[object Date]",Vv="[object Error]",$4="[object Function]",V4="[object Map]",U4="[object Number]",X4="[object Object]",q4="[object RegExp]",Z4="[object Set]",K4="[object String]",Q4="[object WeakMap]",J4="[object ArrayBuffer]",tI="[object DataView]",eI="[object Float32Array]",nI="[object Float64Array]",rI="[object Int8Array]",iI="[object Int16Array]",aI="[object Int32Array]",oI="[object Uint8Array]",sI="[object Uint8ClampedArray]",cI="[object Uint16Array]",lI="[object Uint32Array]",Rn={};Rn[eI]=Rn[nI]=Rn[rI]=Rn[iI]=Rn[aI]=Rn[oI]=Rn[sI]=Rn[cI]=Rn[lI]=!0,Rn[Ni]=Rn[va]=Rn[J4]=Rn[Is]=Rn[tI]=Rn[js]=Rn[Vv]=Rn[$4]=Rn[V4]=Rn[U4]=Rn[X4]=Rn[q4]=Rn[Z4]=Rn[K4]=Rn[Q4]=!1;function uI(t){return wr(t)&&pa(t.length)&&!!Rn[xr(t)]}var fI=uI;function dI(t){return function(e){return t(e)}}var Uv=dI,Zx=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Cu=Zx&&typeof module=="object"&&module&&!module.nodeType&&module,hI=Cu&&Cu.exports===Zx,Xv=hI&&Ti.process,pI=function(){try{var t=Cu&&Cu.require&&Cu.require("util").types;return t||Xv&&Xv.binding&&Xv.binding("util")}catch(e){}}(),qc=pI,Kx=qc&&qc.isTypedArray,vI=Kx?Uv(Kx):fI,qv=vI,gI=Object.prototype,yI=gI.hasOwnProperty;function mI(t,e){var n=Re(t),r=!n&&yi(t),i=!n&&!r&&Ns(t),a=!n&&!r&&!i&&qv(t),o=n||r||i||a,s=o?Yc(t.length,String):[],c=s.length;for(var l in t)(e||yI.call(t,l))&&!(o&&(l=="length"||i&&(l=="offset"||l=="parent")||a&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||yr(l,c)))&&s.push(l);return s}var Qx=mI,bI=Object.prototype;function xI(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||bI;return t===n}var Xd=xI;function _I(t,e){return function(n){return t(e(n))}}var Jx=_I,OI=Jx(Object.keys,Object),wI=OI,SI=Object.prototype,MI=SI.hasOwnProperty;function EI(t){if(!Xd(t))return wI(t);var e=[];for(var n in Object(t))MI.call(t,n)&&n!="constructor"&&e.push(n);return e}var PI=EI;function AI(t){return t!=null&&pa(t.length)&&!Ma(t)}var Ro=AI;function TI(t){return Ro(t)?Qx(t):PI(t)}var Rs=TI;function CI(t){return zd(t,Rs,Au)}var Zv=CI,kI=1,LI=Object.prototype,NI=LI.hasOwnProperty;function II(t,e,n,r,i,a){var o=n&kI,s=Zv(t),c=s.length,l=Zv(e),u=l.length;if(c!=u&&!o)return!1;for(var f=c;f--;){var d=s[f];if(!(o?d in e:NI.call(e,d)))return!1}var h=a.get(t),p=a.get(e);if(h&&p)return h==e&&p==t;var v=!0;a.set(t,e),a.set(e,t);for(var g=o;++f<c;){d=s[f];var y=t[d],m=e[d];if(r)var b=o?r(m,y,d,e,t,a):r(y,m,d,t,e,a);if(!(b===void 0?y===m||i(y,m,n,r,a):b)){v=!1;break}g||(g=d=="constructor")}if(v&&!g){var x=t.constructor,_=e.constructor;x!=_&&"constructor"in t&&"constructor"in e&&!(typeof x=="function"&&x instanceof x&&typeof _=="function"&&_ instanceof _)&&(v=!1)}return a.delete(t),a.delete(e),v}var jI=II,RI=Q(Jn,"DataView"),Kv=RI,DI=Q(Jn,"Promise"),Qv=DI,BI=Q(Jn,"Set"),Zc=BI,FI=Q(Jn,"WeakMap"),ku=FI,t_="[object Map]",zI="[object Object]",e_="[object Promise]",n_="[object Set]",r_="[object WeakMap]",i_="[object DataView]",GI=Pa(Kv),WI=Pa(Mt),YI=Pa(Qv),HI=Pa(Zc),$I=Pa(ku),Ds=xr;(Kv&&Ds(new Kv(new ArrayBuffer(1)))!=i_||Mt&&Ds(new Mt)!=t_||Qv&&Ds(Qv.resolve())!=e_||Zc&&Ds(new Zc)!=n_||ku&&Ds(new ku)!=r_)&&(Ds=function(t){var e=xr(t),n=e==zI?t.constructor:void 0,r=n?Pa(n):"";if(r)switch(r){case GI:return i_;case WI:return t_;case YI:return e_;case HI:return n_;case $I:return r_}return e});var Lu=Ds,VI=1,a_="[object Arguments]",o_="[object Array]",qd="[object Object]",UI=Object.prototype,s_=UI.hasOwnProperty;function XI(t,e,n,r,i,a){var o=Re(t),s=Re(e),c=o?o_:Lu(t),l=s?o_:Lu(e);c=c==a_?qd:c,l=l==a_?qd:l;var u=c==qd,f=l==qd,d=c==l;if(d&&Ns(t)){if(!Ns(e))return!1;o=!0,u=!1}if(d&&!u)return a||(a=new Io),o||qv(t)?ce(t,e,n,r,i,a):jv(t,e,c,n,r,i,a);if(!(n&VI)){var h=u&&s_.call(t,"__wrapped__"),p=f&&s_.call(e,"__wrapped__");if(h||p){var v=h?t.value():t,g=p?e.value():e;return a||(a=new Io),i(v,g,n,r,a)}}return d?(a||(a=new Io),jI(t,e,n,r,i,a)):!1}var qI=XI;function c_(t,e,n,r,i){return t===e?!0:t==null||e==null||!wr(t)&&!wr(e)?t!==t&&e!==e:qI(t,e,n,r,c_,i)}var Jv=c_;function ZI(t,e){return Jv(t,e)}var l_=ZI;function KI(t,e){for(var n=-1,r=t==null?0:t.length;++n<r&&e(t[n],n,t)!==!1;);return t}var QI=KI,JI=function(){try{var t=Q(Object,"defineProperty");return t({},"",{}),t}catch(e){}}(),Zd=JI;function tj(t,e,n){e=="__proto__"&&Zd?Zd(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}var Kd=tj,ej=Object.prototype,nj=ej.hasOwnProperty;function rj(t,e,n){var r=t[e];(!(nj.call(t,e)&&hi(r,n))||n===void 0&&!(e in t))&&Kd(t,e,n)}var Qd=rj;function ij(t,e,n,r){var i=!n;n||(n={});for(var a=-1,o=e.length;++a<o;){var s=e[a],c=r?r(n[s],t[s],s,n,t):void 0;c===void 0&&(c=t[s]),i?Kd(n,s,c):Qd(n,s,c)}return n}var Bs=ij;function aj(t,e){return t&&Bs(e,Rs(e),t)}var oj=aj;function sj(t){var e=[];if(t!=null)for(var n in Object(t))e.push(n);return e}var cj=sj,lj=Object.prototype,uj=lj.hasOwnProperty;function fj(t){if(!or(t))return cj(t);var e=Xd(t),n=[];for(var r in t)r=="constructor"&&(e||!uj.call(t,r))||n.push(r);return n}var dj=fj;function hj(t){return Ro(t)?Qx(t,!0):dj(t)}var Nu=hj;function pj(t,e){return t&&Bs(e,Nu(e),t)}var vj=pj,u_=typeof exports=="object"&&exports&&!exports.nodeType&&exports,f_=u_&&typeof module=="object"&&module&&!module.nodeType&&module,gj=f_&&f_.exports===u_,d_=gj?Jn.Buffer:void 0,h_=d_?d_.allocUnsafe:void 0;function yj(t,e){if(e)return t.slice();var n=t.length,r=h_?h_(n):new t.constructor(n);return t.copy(r),r}var p_=yj;function mj(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}var tg=mj;function bj(t,e){return Bs(t,Au(t),e)}var xj=bj,_j=Jx(Object.getPrototypeOf,Object),eg=_j,Oj=Object.getOwnPropertySymbols,wj=Oj?function(t){for(var e=[];t;)zc(e,Au(t)),t=eg(t);return e}:Gc,v_=wj;function Sj(t,e){return Bs(t,v_(t),e)}var Mj=Sj;function Ej(t){return zd(t,Nu,v_)}var g_=Ej,Pj=Object.prototype,Aj=Pj.hasOwnProperty;function Tj(t){var e=t.length,n=new t.constructor(e);return e&&typeof t[0]=="string"&&Aj.call(t,"index")&&(n.index=t.index,n.input=t.input),n}var Cj=Tj;function kj(t){var e=new t.constructor(t.byteLength);return new dn(e).set(new dn(t)),e}var ng=kj;function Lj(t,e){var n=e?ng(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}var Nj=Lj,Ij=/\w*$/;function jj(t){var e=new t.constructor(t.source,Ij.exec(t));return e.lastIndex=t.lastIndex,e}var Rj=jj,y_=ar?ar.prototype:void 0,m_=y_?y_.valueOf:void 0;function Dj(t){return m_?Object(m_.call(t)):{}}var Bj=Dj;function Fj(t,e){var n=e?ng(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}var b_=Fj,zj="[object Boolean]",Gj="[object Date]",Wj="[object Map]",Yj="[object Number]",Hj="[object RegExp]",$j="[object Set]",Vj="[object String]",Uj="[object Symbol]",Xj="[object ArrayBuffer]",qj="[object DataView]",Zj="[object Float32Array]",Kj="[object Float64Array]",Qj="[object Int8Array]",Jj="[object Int16Array]",tR="[object Int32Array]",eR="[object Uint8Array]",nR="[object Uint8ClampedArray]",rR="[object Uint16Array]",iR="[object Uint32Array]";function aR(t,e,n){var r=t.constructor;switch(e){case Xj:return ng(t);case zj:case Gj:return new r(+t);case qj:return Nj(t,n);case Zj:case Kj:case Qj:case Jj:case tR:case eR:case nR:case rR:case iR:return b_(t,n);case Wj:return new r;case Yj:case Vj:return new r(t);case Hj:return Rj(t);case $j:return new r;case Uj:return Bj(t)}}var oR=aR,x_=Object.create,sR=function(){function t(){}return function(e){if(!or(e))return{};if(x_)return x_(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}(),rg=sR;function cR(t){return typeof t.constructor=="function"&&!Xd(t)?rg(eg(t)):{}}var __=cR,lR="[object Map]";function uR(t){return wr(t)&&Lu(t)==lR}var fR=uR,O_=qc&&qc.isMap,dR=O_?Uv(O_):fR,hR=dR,pR="[object Set]";function vR(t){return wr(t)&&Lu(t)==pR}var gR=vR,w_=qc&&qc.isSet,yR=w_?Uv(w_):gR,mR=yR,bR=1,xR=2,_R=4,S_="[object Arguments]",OR="[object Array]",wR="[object Boolean]",SR="[object Date]",MR="[object Error]",M_="[object Function]",ER="[object GeneratorFunction]",PR="[object Map]",AR="[object Number]",E_="[object Object]",TR="[object RegExp]",CR="[object Set]",kR="[object String]",LR="[object Symbol]",NR="[object WeakMap]",IR="[object ArrayBuffer]",jR="[object DataView]",RR="[object Float32Array]",DR="[object Float64Array]",BR="[object Int8Array]",FR="[object Int16Array]",zR="[object Int32Array]",GR="[object Uint8Array]",WR="[object Uint8ClampedArray]",YR="[object Uint16Array]",HR="[object Uint32Array]",Tn={};Tn[S_]=Tn[OR]=Tn[IR]=Tn[jR]=Tn[wR]=Tn[SR]=Tn[RR]=Tn[DR]=Tn[BR]=Tn[FR]=Tn[zR]=Tn[PR]=Tn[AR]=Tn[E_]=Tn[TR]=Tn[CR]=Tn[kR]=Tn[LR]=Tn[GR]=Tn[WR]=Tn[YR]=Tn[HR]=!0,Tn[MR]=Tn[M_]=Tn[NR]=!1;function Jd(t,e,n,r,i,a){var o,s=e&bR,c=e&xR,l=e&_R;if(n&&(o=i?n(t,r,i,a):n(t)),o!==void 0)return o;if(!or(t))return t;var u=Re(t);if(u){if(o=Cj(t),!s)return tg(t,o)}else{var f=Lu(t),d=f==M_||f==ER;if(Ns(t))return p_(t,s);if(f==E_||f==S_||d&&!i){if(o=c||d?{}:__(t),!s)return c?Mj(t,vj(o,t)):xj(t,oj(o,t))}else{if(!Tn[f])return i?t:{};o=oR(t,f,s)}}a||(a=new Io);var h=a.get(t);if(h)return h;a.set(t,o),mR(t)?t.forEach(function(g){o.add(Jd(g,e,n,g,t,a))}):hR(t)&&t.forEach(function(g,y){o.set(y,Jd(g,e,n,y,t,a))});var p=l?c?g_:Zv:c?Nu:Rs,v=u?void 0:p(t);return QI(v||t,function(g,y){v&&(y=g,g=t[y]),Qd(o,y,Jd(g,e,n,y,t,a))}),o}var P_=Jd,$R=1,VR=4;function UR(t){return P_(t,$R|VR)}var A_=UR,XR="[object Symbol]";function qR(t){return typeof t=="symbol"||wr(t)&&xr(t)==XR}var Iu=qR,ZR=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,KR=/^\w*$/;function QR(t,e){if(Re(t))return!1;var n=typeof t;return n=="number"||n=="symbol"||n=="boolean"||t==null||Iu(t)?!0:KR.test(t)||!ZR.test(t)||e!=null&&t in Object(e)}var ig=QR,JR="Expected a function";function ag(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(JR);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=t.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(ag.Cache||Dc),n}ag.Cache=Dc;var tD=ag,eD=500;function nD(t){var e=tD(t,function(r){return n.size===eD&&n.clear(),r}),n=e.cache;return e}var rD=nD,iD=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,aD=/\\(\\)?/g,oD=rD(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(iD,function(n,r,i,a){e.push(i?a.replace(aD,"$1"):r||n)}),e}),sD=oD;function cD(t,e){for(var n=-1,r=t==null?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}var th=cD,lD=1/0,T_=ar?ar.prototype:void 0,C_=T_?T_.toString:void 0;function k_(t){if(typeof t=="string")return t;if(Re(t))return th(t,k_)+"";if(Iu(t))return C_?C_.call(t):"";var e=t+"";return e=="0"&&1/t==-lD?"-0":e}var og=k_;function uD(t){return t==null?"":og(t)}var sg=uD;function fD(t,e){return Re(t)?t:ig(t,e)?[t]:sD(sg(t))}var Kc=fD,dD=1/0;function hD(t){if(typeof t=="string"||Iu(t))return t;var e=t+"";return e=="0"&&1/t==-dD?"-0":e}var Qc=hD;function pD(t,e){e=Kc(e,t);for(var n=0,r=e.length;t!=null&&n<r;)t=t[Qc(e[n++])];return n&&n==r?t:void 0}var eh=pD;function vD(t,e,n){var r=t==null?void 0:eh(t,e);return r===void 0?n:r}var _n=vD,cg=function(){return cg=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},cg.apply(this,arguments)},L_=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function gD(t,e){var n=(0,bt.useRef)(),r=(0,bt.useRef)(),i=(0,bt.useRef)(null),a=e.onReady,o=e.onEvent,s=function(u,f){var d;u===void 0&&(u="image/png");var h=(d=i.current)===null||d===void 0?void 0:d.getElementsByTagName("canvas")[0];return h==null?void 0:h.toDataURL(u,f)},c=function(u,f,d){u===void 0&&(u="download"),f===void 0&&(f="image/png");var h=u;u.indexOf(".")===-1&&(h="".concat(u,".").concat(f.split("/")[1]));var p=s(f,d),v=document.createElement("a");return v.href=p,v.download=h,document.body.appendChild(v),v.click(),document.body.removeChild(v),v=null,h},l=function(u,f){f===void 0&&(f=!1);var d=Object.keys(u),h=f;d.forEach(function(p){var v=u[p];p==="tooltip"&&(h=!0),Ma(v)&&hu("".concat(v))?u[p]=function(){for(var g=[],y=0;y<arguments.length;y++)g[y]=arguments[y];return Yn(v.apply(void 0,g),h)}:Re(v)?v.forEach(function(g){l(g,h)}):or(v)?l(v,h):h=f})};return(0,bt.useEffect)(function(){if(n.current&&!l_(r.current,e)){var u=!1;if(r.current){var f=r.current,d=f.data,h=L_(f,["data"]),p=e.data,v=L_(e,["data"]);u=l_(h,v)}r.current=A_(e),u?n.current.changeData(_n(e,"data")):(l(e),n.current.update(e),n.current.render())}},[e]),(0,bt.useEffect)(function(){if(!i.current)return function(){return null};r.current||(r.current=A_(e)),l(e);var u=new t(i.current,cg({},e));u.toDataURL=s,u.downloadImage=c,u.render(),n.current=u,a&&a(u);var f=function(d){o&&o(u,d)};return u.on("*",f),function(){n.current&&(n.current.destroy(),n.current.off("*",f),n.current=void 0)}},[]),{chart:n,container:i}}var yD="*",mD=function(){function t(){this._events={}}return t.prototype.on=function(e,n,r){return this._events[e]||(this._events[e]=[]),this._events[e].push({callback:n,once:!!r}),this},t.prototype.once=function(e,n){return this.on(e,n,!0)},t.prototype.emit=function(e){for(var n=this,r=[],i=1;i<arguments.length;i++)r[i-1]=arguments[i];var a=this._events[e]||[],o=this._events[yD]||[],s=function(c){for(var l=c.length,u=0;u<l;u++)if(c[u]){var f=c[u],d=f.callback,h=f.once;h&&(c.splice(u,1),c.length===0&&delete n._events[e],l--,u--),d.apply(n,r)}};s(a),s(o)},t.prototype.off=function(e,n){if(!e)this._events={};else if(!n)delete this._events[e];else{for(var r=this._events[e]||[],i=r.length,a=0;a<i;a++)r[a].callback===n&&(r.splice(a,1),i--,a--);r.length===0&&delete this._events[e]}return this},t.prototype.getEvents=function(){return this._events},t}(),lg=mD,ug=function(t,e){return ug=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},ug(t,e)};function Yt(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");ug(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var nt=function(){return nt=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},nt.apply(this,arguments)};function rn(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}function bD(t,e,n,r){var i=arguments.length,a=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,n,a):o(e,n))||a);return i>3&&a&&Object.defineProperty(e,n,a),a}function xD(t,e){return function(n,r){e(n,r,t)}}function jht(t,e,n,r,i,a){function o(y){if(y!==void 0&&typeof y!="function")throw new TypeError("Function expected");return y}for(var s=r.kind,c=s==="getter"?"get":s==="setter"?"set":"value",l=!e&&t?r.static?t:t.prototype:null,u=e||(l?Object.getOwnPropertyDescriptor(l,r.name):{}),f,d=!1,h=n.length-1;h>=0;h--){var p={};for(var v in r)p[v]=v==="access"?{}:r[v];for(var v in r.access)p.access[v]=r.access[v];p.addInitializer=function(y){if(d)throw new TypeError("Cannot add initializers after decoration has completed");a.push(o(y||null))};var g=(0,n[h])(s==="accessor"?{get:u.get,set:u.set}:u[c],p);if(s==="accessor"){if(g===void 0)continue;if(g===null||typeof g!="object")throw new TypeError("Object expected");(f=o(g.get))&&(u.get=f),(f=o(g.set))&&(u.set=f),(f=o(g.init))&&i.unshift(f)}else(f=o(g))&&(s==="field"?i.unshift(f):u[c]=f)}l&&Object.defineProperty(l,r.name,u),d=!0}function Rht(t,e,n){for(var r=arguments.length>2,i=0;i<e.length;i++)n=r?e[i].call(t,n):e[i].call(t);return r?n:void 0}function Dht(t){return typeof t=="symbol"?t:"".concat(t)}function Bht(t,e,n){return typeof e=="symbol"&&(e=e.description?"[".concat(e.description,"]"):""),Object.defineProperty(t,"name",{configurable:!0,value:n?"".concat(n," ",e):e})}function _D(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}function Fs(t,e,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{l(r.next(u))}catch(f){o(f)}}function c(u){try{l(r.throw(u))}catch(f){o(f)}}function l(u){u.done?a(u.value):i(u.value).then(s,c)}l((r=r.apply(t,e||[])).next())})}function zs(t,e){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,l[0]&&(n=0)),n;)try{if(r=1,i&&(a=l[0]&2?i.return:l[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,l[1])).done)return a;switch(i=0,a&&(l=[l[0]&2,a.value]),l[0]){case 0:case 1:a=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]<a[3])){n.label=l[1];break}if(l[0]===6&&n.label<a[1]){n.label=a[1],a=l;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(l);break}a[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=a=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}var fg=Object.create?function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]};function OD(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&fg(e,t,n)}function Vr(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function R(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,a=[],o;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function wD(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(R(arguments[e]));return t}function N_(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;for(var r=Array(t),i=0,e=0;e<n;e++)for(var a=arguments[e],o=0,s=a.length;o<s;o++,i++)r[i]=a[o];return r}function yt(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,a;r<i;r++)(a||!(r in e))&&(a||(a=Array.prototype.slice.call(e,0,r)),a[r]=e[r]);return t.concat(a||Array.prototype.slice.call(e))}function ju(t){return this instanceof ju?(this.v=t,this):new ju(t)}function SD(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(t,e||[]),i,a=[];return i={},o("next"),o("throw"),o("return"),i[Symbol.asyncIterator]=function(){return this},i;function o(d){r[d]&&(i[d]=function(h){return new Promise(function(p,v){a.push([d,h,p,v])>1||s(d,h)})})}function s(d,h){try{c(r[d](h))}catch(p){f(a[0][3],p)}}function c(d){d.value instanceof ju?Promise.resolve(d.value.v).then(l,u):f(a[0][2],d)}function l(d){s("next",d)}function u(d){s("throw",d)}function f(d,h){d(h),a.shift(),a.length&&s(a[0][0],a[0][1])}}function MD(t){var e,n;return e={},r("next"),r("throw",function(i){throw i}),r("return"),e[Symbol.iterator]=function(){return this},e;function r(i,a){e[i]=t[i]?function(o){return(n=!n)?{value:ju(t[i](o)),done:!1}:a?a(o):o}:a}}function ED(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],n;return e?e.call(t):(t=typeof Vr=="function"?Vr(t):t[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(a){n[a]=t[a]&&function(o){return new Promise(function(s,c){o=t[a](o),i(s,c,o.done,o.value)})}}function i(a,o,s,c){Promise.resolve(c).then(function(l){a({value:l,done:s})},o)}}function PD(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}var AD=Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e};function TD(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&fg(e,t,n);return AD(e,t),e}function CD(t){return t&&t.__esModule?t:{default:t}}function nh(t,e,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(t):r?r.value:e.get(t)}function kD(t,e,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(t,n):i?i.value=n:e.set(t,n),n}function LD(t,e){if(e===null||typeof e!="object"&&typeof e!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof t=="function"?e===t:t.has(e)}function ND(t,e,n){if(e!=null){if(typeof e!="object"&&typeof e!="function")throw new TypeError("Object expected.");var r;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");r=e[Symbol.asyncDispose]}if(r===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");r=e[Symbol.dispose]}if(typeof r!="function")throw new TypeError("Object not disposable.");t.stack.push({value:e,dispose:r,async:n})}else n&&t.stack.push({async:!0});return e}var ID=typeof SuppressedError=="function"?SuppressedError:function(t,e,n){var r=new Error(n);return r.name="SuppressedError",r.error=t,r.suppressed=e,r};function jD(t){function e(r){t.error=t.hasError?new ID(r,t.error,"An error was suppressed during disposal."):r,t.hasError=!0}function n(){for(;t.stack.length;){var r=t.stack.pop();try{var i=r.dispose&&r.dispose.call(r.value);if(r.async)return Promise.resolve(i).then(n,function(a){return e(a),n()})}catch(a){e(a)}}if(t.hasError)throw t.error}return n()}var Fht={__extends:Yt,__assign:nt,__rest:rn,__decorate:bD,__param:xD,__metadata:_D,__awaiter:Fs,__generator:zs,__createBinding:fg,__exportStar:OD,__values:Vr,__read:R,__spread:wD,__spreadArrays:N_,__spreadArray:yt,__await:ju,__asyncGenerator:SD,__asyncDelegator:MD,__asyncValues:ED,__makeTemplateObject:PD,__importStar:TD,__importDefault:CD,__classPrivateFieldGet:nh,__classPrivateFieldSet:kD,__classPrivateFieldIn:LD,__addDisposableResource:ND,__disposeResources:jD},RD=J(38554),dg=RD,ln=1e-6,$n=typeof Float32Array!="undefined"?Float32Array:Array,zht=Math.random;function Ght(t){$n=t}var DD=Math.PI/180;function Wht(t){return t*DD}function Yht(t,e){return Math.abs(t-e)<=ln*Math.max(1,Math.abs(t),Math.abs(e))}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});function Te(){var t=new $n(3);return $n!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function oo(t){var e=new $n(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function so(t){var e=t[0],n=t[1],r=t[2];return Math.hypot(e,n,r)}function Ge(t,e,n){var r=new $n(3);return r[0]=t,r[1]=e,r[2]=n,r}function mi(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function ga(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}function Jc(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function I_(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function BD(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t}function Hht(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t}function $ht(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t}function Vht(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t}function Uht(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t}function Xht(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t}function qht(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t}function hg(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function Zht(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t}function FD(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return Math.hypot(n,r,i)}function Kht(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return n*n+r*r+i*i}function Qht(t){var e=t[0],n=t[1],r=t[2];return e*e+n*n+r*r}function Jht(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t}function tpt(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t}function Gs(t,e){var n=e[0],r=e[1],i=e[2],a=n*n+r*r+i*i;return a>0&&(a=1/Math.sqrt(a)),t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a,t}function ya(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function rh(t,e,n){var r=e[0],i=e[1],a=e[2],o=n[0],s=n[1],c=n[2];return t[0]=i*c-a*s,t[1]=a*o-r*c,t[2]=r*s-i*o,t}function pg(t,e,n,r){var i=e[0],a=e[1],o=e[2];return t[0]=i+r*(n[0]-i),t[1]=a+r*(n[1]-a),t[2]=o+r*(n[2]-o),t}function ept(t,e,n,r,i,a){var o=a*a,s=o*(2*a-3)+1,c=o*(a-2)+a,l=o*(a-1),u=o*(3-2*a);return t[0]=e[0]*s+n[0]*c+r[0]*l+i[0]*u,t[1]=e[1]*s+n[1]*c+r[1]*l+i[1]*u,t[2]=e[2]*s+n[2]*c+r[2]*l+i[2]*u,t}function npt(t,e,n,r,i,a){var o=1-a,s=o*o,c=a*a,l=s*o,u=3*a*s,f=3*c*o,d=c*a;return t[0]=e[0]*l+n[0]*u+r[0]*f+i[0]*d,t[1]=e[1]*l+n[1]*u+r[1]*f+i[1]*d,t[2]=e[2]*l+n[2]*u+r[2]*f+i[2]*d,t}function rpt(t,e){e=e||1;var n=glMatrix.RANDOM()*2*Math.PI,r=glMatrix.RANDOM()*2-1,i=Math.sqrt(1-r*r)*e;return t[0]=Math.cos(n)*i,t[1]=Math.sin(n)*i,t[2]=r*e,t}function Sr(t,e,n){var r=e[0],i=e[1],a=e[2],o=n[3]*r+n[7]*i+n[11]*a+n[15];return o=o||1,t[0]=(n[0]*r+n[4]*i+n[8]*a+n[12])/o,t[1]=(n[1]*r+n[5]*i+n[9]*a+n[13])/o,t[2]=(n[2]*r+n[6]*i+n[10]*a+n[14])/o,t}function zD(t,e,n){var r=e[0],i=e[1],a=e[2];return t[0]=r*n[0]+i*n[3]+a*n[6],t[1]=r*n[1]+i*n[4]+a*n[7],t[2]=r*n[2]+i*n[5]+a*n[8],t}function GD(t,e,n){var r=n[0],i=n[1],a=n[2],o=n[3],s=e[0],c=e[1],l=e[2],u=i*l-a*c,f=a*s-r*l,d=r*c-i*s,h=i*d-a*f,p=a*u-r*d,v=r*f-i*u,g=o*2;return u*=g,f*=g,d*=g,h*=2,p*=2,v*=2,t[0]=s+u+h,t[1]=c+f+p,t[2]=l+d+v,t}function ipt(t,e,n,r){var i=[],a=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],a[0]=i[0],a[1]=i[1]*Math.cos(r)-i[2]*Math.sin(r),a[2]=i[1]*Math.sin(r)+i[2]*Math.cos(r),t[0]=a[0]+n[0],t[1]=a[1]+n[1],t[2]=a[2]+n[2],t}function apt(t,e,n,r){var i=[],a=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],a[0]=i[2]*Math.sin(r)+i[0]*Math.cos(r),a[1]=i[1],a[2]=i[2]*Math.cos(r)-i[0]*Math.sin(r),t[0]=a[0]+n[0],t[1]=a[1]+n[1],t[2]=a[2]+n[2],t}function opt(t,e,n,r){var i=[],a=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],a[0]=i[0]*Math.cos(r)-i[1]*Math.sin(r),a[1]=i[0]*Math.sin(r)+i[1]*Math.cos(r),a[2]=i[2],t[0]=a[0]+n[0],t[1]=a[1]+n[1],t[2]=a[2]+n[2],t}function spt(t,e){var n=t[0],r=t[1],i=t[2],a=e[0],o=e[1],s=e[2],c=Math.sqrt(n*n+r*r+i*i),l=Math.sqrt(a*a+o*o+s*s),u=c*l,f=u&&ya(t,e)/u;return Math.acos(Math.min(Math.max(f,-1),1))}function cpt(t){return t[0]=0,t[1]=0,t[2]=0,t}function lpt(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"}function upt(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}function Ru(t,e){var n=t[0],r=t[1],i=t[2],a=e[0],o=e[1],s=e[2];return Math.abs(n-a)<=ln*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(r-o)<=ln*Math.max(1,Math.abs(r),Math.abs(o))&&Math.abs(i-s)<=ln*Math.max(1,Math.abs(i),Math.abs(s))}var fpt=null,dpt=null,hpt=null,j_=FD,ppt=null,R_=so,vpt=null,gpt=function(){var t=Te();return function(e,n,r,i,a,o){var s,c;for(n||(n=3),r||(r=0),i?c=Math.min(i*n+r,e.length):c=e.length,s=r;s<c;s+=n)t[0]=e[s],t[1]=e[s+1],t[2]=e[s+2],a(t,t,o),e[s]=t[0],e[s+1]=t[1],e[s+2]=t[2];return e}}();function On(){var t=new $n(16);return $n!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t}function D_(t){var e=new $n(16);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[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function Ws(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function WD(t,e,n,r,i,a,o,s,c,l,u,f,d,h,p,v){var g=new $n(16);return g[0]=t,g[1]=e,g[2]=n,g[3]=r,g[4]=i,g[5]=a,g[6]=o,g[7]=s,g[8]=c,g[9]=l,g[10]=u,g[11]=f,g[12]=d,g[13]=h,g[14]=p,g[15]=v,g}function vg(t,e,n,r,i,a,o,s,c,l,u,f,d,h,p,v,g){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=c,t[8]=l,t[9]=u,t[10]=f,t[11]=d,t[12]=h,t[13]=p,t[14]=v,t[15]=g,t}function Du(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function B_(t,e){if(t===e){var n=e[1],r=e[2],i=e[3],a=e[6],o=e[7],s=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[6]=e[9],t[7]=e[13],t[8]=r,t[9]=a,t[11]=e[14],t[12]=i,t[13]=o,t[14]=s}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}function Aa(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],s=e[5],c=e[6],l=e[7],u=e[8],f=e[9],d=e[10],h=e[11],p=e[12],v=e[13],g=e[14],y=e[15],m=n*s-r*o,b=n*c-i*o,x=n*l-a*o,_=r*c-i*s,O=r*l-a*s,w=i*l-a*c,S=u*v-f*p,M=u*g-d*p,E=u*y-h*p,P=f*g-d*v,L=f*y-h*v,A=d*y-h*g,T=m*A-b*L+x*P+_*E-O*M+w*S;return T?(T=1/T,t[0]=(s*A-c*L+l*P)*T,t[1]=(i*L-r*A-a*P)*T,t[2]=(v*w-g*O+y*_)*T,t[3]=(d*O-f*w-h*_)*T,t[4]=(c*E-o*A-l*M)*T,t[5]=(n*A-i*E+a*M)*T,t[6]=(g*x-p*w-y*b)*T,t[7]=(u*w-d*x+h*b)*T,t[8]=(o*L-s*E+l*S)*T,t[9]=(r*E-n*L-a*S)*T,t[10]=(p*O-v*x+y*m)*T,t[11]=(f*x-u*O-h*m)*T,t[12]=(s*M-o*P-c*S)*T,t[13]=(n*P-r*M+i*S)*T,t[14]=(v*b-p*_-g*m)*T,t[15]=(u*_-f*b+d*m)*T,t):null}function YD(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],s=e[5],c=e[6],l=e[7],u=e[8],f=e[9],d=e[10],h=e[11],p=e[12],v=e[13],g=e[14],y=e[15];return t[0]=s*(d*y-h*g)-f*(c*y-l*g)+v*(c*h-l*d),t[1]=-(r*(d*y-h*g)-f*(i*y-a*g)+v*(i*h-a*d)),t[2]=r*(c*y-l*g)-s*(i*y-a*g)+v*(i*l-a*c),t[3]=-(r*(c*h-l*d)-s*(i*h-a*d)+f*(i*l-a*c)),t[4]=-(o*(d*y-h*g)-u*(c*y-l*g)+p*(c*h-l*d)),t[5]=n*(d*y-h*g)-u*(i*y-a*g)+p*(i*h-a*d),t[6]=-(n*(c*y-l*g)-o*(i*y-a*g)+p*(i*l-a*c)),t[7]=n*(c*h-l*d)-o*(i*h-a*d)+u*(i*l-a*c),t[8]=o*(f*y-h*v)-u*(s*y-l*v)+p*(s*h-l*f),t[9]=-(n*(f*y-h*v)-u*(r*y-a*v)+p*(r*h-a*f)),t[10]=n*(s*y-l*v)-o*(r*y-a*v)+p*(r*l-a*s),t[11]=-(n*(s*h-l*f)-o*(r*h-a*f)+u*(r*l-a*s)),t[12]=-(o*(f*g-d*v)-u*(s*g-c*v)+p*(s*d-c*f)),t[13]=n*(f*g-d*v)-u*(r*g-i*v)+p*(r*d-i*f),t[14]=-(n*(s*g-c*v)-o*(r*g-i*v)+p*(r*c-i*s)),t[15]=n*(s*d-c*f)-o*(r*d-i*f)+u*(r*c-i*s),t}function F_(t){var e=t[0],n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7],l=t[8],u=t[9],f=t[10],d=t[11],h=t[12],p=t[13],v=t[14],g=t[15],y=e*o-n*a,m=e*s-r*a,b=e*c-i*a,x=n*s-r*o,_=n*c-i*o,O=r*c-i*s,w=l*p-u*h,S=l*v-f*h,M=l*g-d*h,E=u*v-f*p,P=u*g-d*p,L=f*g-d*v;return y*L-m*P+b*E+x*M-_*S+O*w}function Ur(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],c=e[5],l=e[6],u=e[7],f=e[8],d=e[9],h=e[10],p=e[11],v=e[12],g=e[13],y=e[14],m=e[15],b=n[0],x=n[1],_=n[2],O=n[3];return t[0]=b*r+x*s+_*f+O*v,t[1]=b*i+x*c+_*d+O*g,t[2]=b*a+x*l+_*h+O*y,t[3]=b*o+x*u+_*p+O*m,b=n[4],x=n[5],_=n[6],O=n[7],t[4]=b*r+x*s+_*f+O*v,t[5]=b*i+x*c+_*d+O*g,t[6]=b*a+x*l+_*h+O*y,t[7]=b*o+x*u+_*p+O*m,b=n[8],x=n[9],_=n[10],O=n[11],t[8]=b*r+x*s+_*f+O*v,t[9]=b*i+x*c+_*d+O*g,t[10]=b*a+x*l+_*h+O*y,t[11]=b*o+x*u+_*p+O*m,b=n[12],x=n[13],_=n[14],O=n[15],t[12]=b*r+x*s+_*f+O*v,t[13]=b*i+x*c+_*d+O*g,t[14]=b*a+x*l+_*h+O*y,t[15]=b*o+x*u+_*p+O*m,t}function Do(t,e,n){var r=n[0],i=n[1],a=n[2],o,s,c,l,u,f,d,h,p,v,g,y;return e===t?(t[12]=e[0]*r+e[4]*i+e[8]*a+e[12],t[13]=e[1]*r+e[5]*i+e[9]*a+e[13],t[14]=e[2]*r+e[6]*i+e[10]*a+e[14],t[15]=e[3]*r+e[7]*i+e[11]*a+e[15]):(o=e[0],s=e[1],c=e[2],l=e[3],u=e[4],f=e[5],d=e[6],h=e[7],p=e[8],v=e[9],g=e[10],y=e[11],t[0]=o,t[1]=s,t[2]=c,t[3]=l,t[4]=u,t[5]=f,t[6]=d,t[7]=h,t[8]=p,t[9]=v,t[10]=g,t[11]=y,t[12]=o*r+u*i+p*a+e[12],t[13]=s*r+f*i+v*a+e[13],t[14]=c*r+d*i+g*a+e[14],t[15]=l*r+h*i+y*a+e[15]),t}function ih(t,e,n){var r=n[0],i=n[1],a=n[2];return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*a,t[9]=e[9]*a,t[10]=e[10]*a,t[11]=e[11]*a,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function HD(t,e,n,r){var i=r[0],a=r[1],o=r[2],s=Math.hypot(i,a,o),c,l,u,f,d,h,p,v,g,y,m,b,x,_,O,w,S,M,E,P,L,A,T,C;return s<ln?null:(s=1/s,i*=s,a*=s,o*=s,c=Math.sin(n),l=Math.cos(n),u=1-l,f=e[0],d=e[1],h=e[2],p=e[3],v=e[4],g=e[5],y=e[6],m=e[7],b=e[8],x=e[9],_=e[10],O=e[11],w=i*i*u+l,S=a*i*u+o*c,M=o*i*u-a*c,E=i*a*u-o*c,P=a*a*u+l,L=o*a*u+i*c,A=i*o*u+a*c,T=a*o*u-i*c,C=o*o*u+l,t[0]=f*w+v*S+b*M,t[1]=d*w+g*S+x*M,t[2]=h*w+y*S+_*M,t[3]=p*w+m*S+O*M,t[4]=f*E+v*P+b*L,t[5]=d*E+g*P+x*L,t[6]=h*E+y*P+_*L,t[7]=p*E+m*P+O*L,t[8]=f*A+v*T+b*C,t[9]=d*A+g*T+x*C,t[10]=h*A+y*T+_*C,t[11]=p*A+m*T+O*C,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)}function z_(t,e,n){var r=Math.sin(n),i=Math.cos(n),a=e[4],o=e[5],s=e[6],c=e[7],l=e[8],u=e[9],f=e[10],d=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=a*i+l*r,t[5]=o*i+u*r,t[6]=s*i+f*r,t[7]=c*i+d*r,t[8]=l*i-a*r,t[9]=u*i-o*r,t[10]=f*i-s*r,t[11]=d*i-c*r,t}function G_(t,e,n){var r=Math.sin(n),i=Math.cos(n),a=e[0],o=e[1],s=e[2],c=e[3],l=e[8],u=e[9],f=e[10],d=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=a*i-l*r,t[1]=o*i-u*r,t[2]=s*i-f*r,t[3]=c*i-d*r,t[8]=a*r+l*i,t[9]=o*r+u*i,t[10]=s*r+f*i,t[11]=c*r+d*i,t}function $D(t,e,n){var r=Math.sin(n),i=Math.cos(n),a=e[0],o=e[1],s=e[2],c=e[3],l=e[4],u=e[5],f=e[6],d=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=a*i+l*r,t[1]=o*i+u*r,t[2]=s*i+f*r,t[3]=c*i+d*r,t[4]=l*i-a*r,t[5]=u*i-o*r,t[6]=f*i-s*r,t[7]=d*i-c*r,t}function W_(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function Y_(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function VD(t,e,n){var r=n[0],i=n[1],a=n[2],o=Math.hypot(r,i,a),s,c,l;return o<ln?null:(o=1/o,r*=o,i*=o,a*=o,s=Math.sin(e),c=Math.cos(e),l=1-c,t[0]=r*r*l+c,t[1]=i*r*l+a*s,t[2]=a*r*l-i*s,t[3]=0,t[4]=r*i*l-a*s,t[5]=i*i*l+c,t[6]=a*i*l+r*s,t[7]=0,t[8]=r*a*l+i*s,t[9]=i*a*l-r*s,t[10]=a*a*l+c,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)}function UD(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=r,t[6]=n,t[7]=0,t[8]=0,t[9]=-n,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function XD(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=0,t[2]=-n,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=n,t[9]=0,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function qD(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=0,t[3]=0,t[4]=-n,t[5]=r,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function H_(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3],s=r+r,c=i+i,l=a+a,u=r*s,f=r*c,d=r*l,h=i*c,p=i*l,v=a*l,g=o*s,y=o*c,m=o*l;return t[0]=1-(h+v),t[1]=f+m,t[2]=d-y,t[3]=0,t[4]=f-m,t[5]=1-(u+v),t[6]=p+g,t[7]=0,t[8]=d+y,t[9]=p-g,t[10]=1-(u+h),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function ZD(t,e){var n=new $n(3),r=-e[0],i=-e[1],a=-e[2],o=e[3],s=e[4],c=e[5],l=e[6],u=e[7],f=r*r+i*i+a*a+o*o;return f>0?(n[0]=(s*o+u*r+c*a-l*i)*2/f,n[1]=(c*o+u*i+l*r-s*a)*2/f,n[2]=(l*o+u*a+s*i-c*r)*2/f):(n[0]=(s*o+u*r+c*a-l*i)*2,n[1]=(c*o+u*i+l*r-s*a)*2,n[2]=(l*o+u*a+s*i-c*r)*2),H_(t,e,n),t}function ah(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t}function tl(t,e){var n=e[0],r=e[1],i=e[2],a=e[4],o=e[5],s=e[6],c=e[8],l=e[9],u=e[10];return t[0]=Math.hypot(n,r,i),t[1]=Math.hypot(a,o,s),t[2]=Math.hypot(c,l,u),t}function oh(t,e){var n=new $n(3);tl(n,e);var r=1/n[0],i=1/n[1],a=1/n[2],o=e[0]*r,s=e[1]*i,c=e[2]*a,l=e[4]*r,u=e[5]*i,f=e[6]*a,d=e[8]*r,h=e[9]*i,p=e[10]*a,v=o+u+p,g=0;return v>0?(g=Math.sqrt(v+1)*2,t[3]=.25*g,t[0]=(f-h)/g,t[1]=(d-c)/g,t[2]=(s-l)/g):o>u&&o>p?(g=Math.sqrt(1+o-u-p)*2,t[3]=(f-h)/g,t[0]=.25*g,t[1]=(s+l)/g,t[2]=(d+c)/g):u>p?(g=Math.sqrt(1+u-o-p)*2,t[3]=(d-c)/g,t[0]=(s+l)/g,t[1]=.25*g,t[2]=(f+h)/g):(g=Math.sqrt(1+p-o-u)*2,t[3]=(s-l)/g,t[0]=(d+c)/g,t[1]=(f+h)/g,t[2]=.25*g),t}function KD(t,e,n,r){var i=e[0],a=e[1],o=e[2],s=e[3],c=i+i,l=a+a,u=o+o,f=i*c,d=i*l,h=i*u,p=a*l,v=a*u,g=o*u,y=s*c,m=s*l,b=s*u,x=r[0],_=r[1],O=r[2];return t[0]=(1-(p+g))*x,t[1]=(d+b)*x,t[2]=(h-m)*x,t[3]=0,t[4]=(d-b)*_,t[5]=(1-(f+g))*_,t[6]=(v+y)*_,t[7]=0,t[8]=(h+m)*O,t[9]=(v-y)*O,t[10]=(1-(f+p))*O,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function Bu(t,e,n,r,i){var a=e[0],o=e[1],s=e[2],c=e[3],l=a+a,u=o+o,f=s+s,d=a*l,h=a*u,p=a*f,v=o*u,g=o*f,y=s*f,m=c*l,b=c*u,x=c*f,_=r[0],O=r[1],w=r[2],S=i[0],M=i[1],E=i[2],P=(1-(v+y))*_,L=(h+x)*_,A=(p-b)*_,T=(h-x)*O,C=(1-(d+y))*O,N=(g+m)*O,B=(p+b)*w,j=(g-m)*w,D=(1-(d+v))*w;return t[0]=P,t[1]=L,t[2]=A,t[3]=0,t[4]=T,t[5]=C,t[6]=N,t[7]=0,t[8]=B,t[9]=j,t[10]=D,t[11]=0,t[12]=n[0]+S-(P*S+T*M+B*E),t[13]=n[1]+M-(L*S+C*M+j*E),t[14]=n[2]+E-(A*S+N*M+D*E),t[15]=1,t}function gg(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=n+n,s=r+r,c=i+i,l=n*o,u=r*o,f=r*s,d=i*o,h=i*s,p=i*c,v=a*o,g=a*s,y=a*c;return t[0]=1-f-p,t[1]=u+y,t[2]=d-g,t[3]=0,t[4]=u-y,t[5]=1-l-p,t[6]=h+v,t[7]=0,t[8]=d+g,t[9]=h-v,t[10]=1-l-f,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function QD(t,e,n,r,i,a,o){var s=1/(n-e),c=1/(i-r),l=1/(a-o);return t[0]=a*2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a*2*c,t[6]=0,t[7]=0,t[8]=(n+e)*s,t[9]=(i+r)*c,t[10]=(o+a)*l,t[11]=-1,t[12]=0,t[13]=0,t[14]=o*a*2*l,t[15]=0,t}function $_(t,e,n,r,i){var a=1/Math.tan(e/2),o;return t[0]=a/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,i!=null&&i!==1/0?(o=1/(r-i),t[10]=(i+r)*o,t[14]=2*i*r*o):(t[10]=-1,t[14]=-2*r),t}var JD=$_;function t6(t,e,n,r,i){var a=1/Math.tan(e/2),o;return t[0]=a/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,i!=null&&i!==1/0?(o=1/(r-i),t[10]=i*o,t[14]=i*r*o):(t[10]=-1,t[14]=-r),t}function e6(t,e,n,r){var i=Math.tan(e.upDegrees*Math.PI/180),a=Math.tan(e.downDegrees*Math.PI/180),o=Math.tan(e.leftDegrees*Math.PI/180),s=Math.tan(e.rightDegrees*Math.PI/180),c=2/(o+s),l=2/(i+a);return t[0]=c,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=l,t[6]=0,t[7]=0,t[8]=-((o-s)*c*.5),t[9]=(i-a)*l*.5,t[10]=r/(n-r),t[11]=-1,t[12]=0,t[13]=0,t[14]=r*n/(n-r),t[15]=0,t}function V_(t,e,n,r,i,a,o){var s=1/(e-n),c=1/(r-i),l=1/(a-o);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*c,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*l,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*c,t[14]=(o+a)*l,t[15]=1,t}var U_=V_;function X_(t,e,n,r,i,a,o){var s=1/(e-n),c=1/(r-i),l=1/(a-o);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*c,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=l,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*c,t[14]=a*l,t[15]=1,t}function q_(t,e,n,r){var i,a,o,s,c,l,u,f,d,h,p=e[0],v=e[1],g=e[2],y=r[0],m=r[1],b=r[2],x=n[0],_=n[1],O=n[2];return Math.abs(p-x)<ln&&Math.abs(v-_)<ln&&Math.abs(g-O)<ln?Du(t):(u=p-x,f=v-_,d=g-O,h=1/Math.hypot(u,f,d),u*=h,f*=h,d*=h,i=m*d-b*f,a=b*u-y*d,o=y*f-m*u,h=Math.hypot(i,a,o),h?(h=1/h,i*=h,a*=h,o*=h):(i=0,a=0,o=0),s=f*o-d*a,c=d*i-u*o,l=u*a-f*i,h=Math.hypot(s,c,l),h?(h=1/h,s*=h,c*=h,l*=h):(s=0,c=0,l=0),t[0]=i,t[1]=s,t[2]=u,t[3]=0,t[4]=a,t[5]=c,t[6]=f,t[7]=0,t[8]=o,t[9]=l,t[10]=d,t[11]=0,t[12]=-(i*p+a*v+o*g),t[13]=-(s*p+c*v+l*g),t[14]=-(u*p+f*v+d*g),t[15]=1,t)}function n6(t,e,n,r){var i=e[0],a=e[1],o=e[2],s=r[0],c=r[1],l=r[2],u=i-n[0],f=a-n[1],d=o-n[2],h=u*u+f*f+d*d;h>0&&(h=1/Math.sqrt(h),u*=h,f*=h,d*=h);var p=c*d-l*f,v=l*u-s*d,g=s*f-c*u;return h=p*p+v*v+g*g,h>0&&(h=1/Math.sqrt(h),p*=h,v*=h,g*=h),t[0]=p,t[1]=v,t[2]=g,t[3]=0,t[4]=f*g-d*v,t[5]=d*p-u*g,t[6]=u*v-f*p,t[7]=0,t[8]=u,t[9]=f,t[10]=d,t[11]=0,t[12]=i,t[13]=a,t[14]=o,t[15]=1,t}function r6(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"}function i6(t){return Math.hypot(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])}function a6(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t[9]=e[9]+n[9],t[10]=e[10]+n[10],t[11]=e[11]+n[11],t[12]=e[12]+n[12],t[13]=e[13]+n[13],t[14]=e[14]+n[14],t[15]=e[15]+n[15],t}function Z_(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t[9]=e[9]-n[9],t[10]=e[10]-n[10],t[11]=e[11]-n[11],t[12]=e[12]-n[12],t[13]=e[13]-n[13],t[14]=e[14]-n[14],t[15]=e[15]-n[15],t}function o6(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12]*n,t[13]=e[13]*n,t[14]=e[14]*n,t[15]=e[15]*n,t}function s6(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t[9]=e[9]+n[9]*r,t[10]=e[10]+n[10]*r,t[11]=e[11]+n[11]*r,t[12]=e[12]+n[12]*r,t[13]=e[13]+n[13]*r,t[14]=e[14]+n[14]*r,t[15]=e[15]+n[15]*r,t}function c6(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]&&t[9]===e[9]&&t[10]===e[10]&&t[11]===e[11]&&t[12]===e[12]&&t[13]===e[13]&&t[14]===e[14]&&t[15]===e[15]}function l6(t,e){var n=t[0],r=t[1],i=t[2],a=t[3],o=t[4],s=t[5],c=t[6],l=t[7],u=t[8],f=t[9],d=t[10],h=t[11],p=t[12],v=t[13],g=t[14],y=t[15],m=e[0],b=e[1],x=e[2],_=e[3],O=e[4],w=e[5],S=e[6],M=e[7],E=e[8],P=e[9],L=e[10],A=e[11],T=e[12],C=e[13],N=e[14],B=e[15];return Math.abs(n-m)<=ln*Math.max(1,Math.abs(n),Math.abs(m))&&Math.abs(r-b)<=ln*Math.max(1,Math.abs(r),Math.abs(b))&&Math.abs(i-x)<=ln*Math.max(1,Math.abs(i),Math.abs(x))&&Math.abs(a-_)<=ln*Math.max(1,Math.abs(a),Math.abs(_))&&Math.abs(o-O)<=ln*Math.max(1,Math.abs(o),Math.abs(O))&&Math.abs(s-w)<=ln*Math.max(1,Math.abs(s),Math.abs(w))&&Math.abs(c-S)<=ln*Math.max(1,Math.abs(c),Math.abs(S))&&Math.abs(l-M)<=ln*Math.max(1,Math.abs(l),Math.abs(M))&&Math.abs(u-E)<=ln*Math.max(1,Math.abs(u),Math.abs(E))&&Math.abs(f-P)<=ln*Math.max(1,Math.abs(f),Math.abs(P))&&Math.abs(d-L)<=ln*Math.max(1,Math.abs(d),Math.abs(L))&&Math.abs(h-A)<=ln*Math.max(1,Math.abs(h),Math.abs(A))&&Math.abs(p-T)<=ln*Math.max(1,Math.abs(p),Math.abs(T))&&Math.abs(v-C)<=ln*Math.max(1,Math.abs(v),Math.abs(C))&&Math.abs(g-N)<=ln*Math.max(1,Math.abs(g),Math.abs(N))&&Math.abs(y-B)<=ln*Math.max(1,Math.abs(y),Math.abs(B))}var u6=Ur,f6=Z_;function K_(){var t=new $n(9);return $n!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t}function d6(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t}function ypt(t){var e=new glMatrix.ARRAY_TYPE(9);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[6]=t[6],e[7]=t[7],e[8]=t[8],e}function mpt(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t}function h6(t,e,n,r,i,a,o,s,c){var l=new $n(9);return l[0]=t,l[1]=e,l[2]=n,l[3]=r,l[4]=i,l[5]=a,l[6]=o,l[7]=s,l[8]=c,l}function bpt(t,e,n,r,i,a,o,s,c,l){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=c,t[8]=l,t}function xpt(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}function _pt(t,e){if(t===e){var n=e[1],r=e[2],i=e[5];t[1]=e[3],t[2]=e[6],t[3]=n,t[5]=e[7],t[6]=r,t[7]=i}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t}function Opt(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],s=e[5],c=e[6],l=e[7],u=e[8],f=u*o-s*l,d=-u*a+s*c,h=l*a-o*c,p=n*f+r*d+i*h;return p?(p=1/p,t[0]=f*p,t[1]=(-u*r+i*l)*p,t[2]=(s*r-i*o)*p,t[3]=d*p,t[4]=(u*n-i*c)*p,t[5]=(-s*n+i*a)*p,t[6]=h*p,t[7]=(-l*n+r*c)*p,t[8]=(o*n-r*a)*p,t):null}function wpt(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],s=e[5],c=e[6],l=e[7],u=e[8];return t[0]=o*u-s*l,t[1]=i*l-r*u,t[2]=r*s-i*o,t[3]=s*c-a*u,t[4]=n*u-i*c,t[5]=i*a-n*s,t[6]=a*l-o*c,t[7]=r*c-n*l,t[8]=n*o-r*a,t}function Spt(t){var e=t[0],n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7],l=t[8];return e*(l*a-o*c)+n*(-l*i+o*s)+r*(c*i-a*s)}function Mpt(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],c=e[5],l=e[6],u=e[7],f=e[8],d=n[0],h=n[1],p=n[2],v=n[3],g=n[4],y=n[5],m=n[6],b=n[7],x=n[8];return t[0]=d*r+h*o+p*l,t[1]=d*i+h*s+p*u,t[2]=d*a+h*c+p*f,t[3]=v*r+g*o+y*l,t[4]=v*i+g*s+y*u,t[5]=v*a+g*c+y*f,t[6]=m*r+b*o+x*l,t[7]=m*i+b*s+x*u,t[8]=m*a+b*c+x*f,t}function Ept(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],c=e[5],l=e[6],u=e[7],f=e[8],d=n[0],h=n[1];return t[0]=r,t[1]=i,t[2]=a,t[3]=o,t[4]=s,t[5]=c,t[6]=d*r+h*o+l,t[7]=d*i+h*s+u,t[8]=d*a+h*c+f,t}function Ppt(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],c=e[5],l=e[6],u=e[7],f=e[8],d=Math.sin(n),h=Math.cos(n);return t[0]=h*r+d*o,t[1]=h*i+d*s,t[2]=h*a+d*c,t[3]=h*o-d*r,t[4]=h*s-d*i,t[5]=h*c-d*a,t[6]=l,t[7]=u,t[8]=f,t}function Apt(t,e,n){var r=n[0],i=n[1];return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=i*e[3],t[4]=i*e[4],t[5]=i*e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t}function Tpt(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=e[0],t[7]=e[1],t[8]=1,t}function Cpt(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=0,t[3]=-n,t[4]=r,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}function kpt(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=e[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t}function Lpt(t,e){return t[0]=e[0],t[1]=e[1],t[2]=0,t[3]=e[2],t[4]=e[3],t[5]=0,t[6]=e[4],t[7]=e[5],t[8]=1,t}function Npt(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=n+n,s=r+r,c=i+i,l=n*o,u=r*o,f=r*s,d=i*o,h=i*s,p=i*c,v=a*o,g=a*s,y=a*c;return t[0]=1-f-p,t[3]=u-y,t[6]=d+g,t[1]=u+y,t[4]=1-l-p,t[7]=h-v,t[2]=d-g,t[5]=h+v,t[8]=1-l-f,t}function Ipt(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],s=e[5],c=e[6],l=e[7],u=e[8],f=e[9],d=e[10],h=e[11],p=e[12],v=e[13],g=e[14],y=e[15],m=n*s-r*o,b=n*c-i*o,x=n*l-a*o,_=r*c-i*s,O=r*l-a*s,w=i*l-a*c,S=u*v-f*p,M=u*g-d*p,E=u*y-h*p,P=f*g-d*v,L=f*y-h*v,A=d*y-h*g,T=m*A-b*L+x*P+_*E-O*M+w*S;return T?(T=1/T,t[0]=(s*A-c*L+l*P)*T,t[1]=(c*E-o*A-l*M)*T,t[2]=(o*L-s*E+l*S)*T,t[3]=(i*L-r*A-a*P)*T,t[4]=(n*A-i*E+a*M)*T,t[5]=(r*E-n*L-a*S)*T,t[6]=(v*w-g*O+y*_)*T,t[7]=(g*x-p*w-y*b)*T,t[8]=(p*O-v*x+y*m)*T,t):null}function jpt(t,e,n){return t[0]=2/e,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/n,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t}function Rpt(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"}function Dpt(t){return Math.hypot(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8])}function Bpt(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t}function Fpt(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t}function zpt(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t}function Gpt(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t}function Wpt(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]}function Ypt(t,e){var n=t[0],r=t[1],i=t[2],a=t[3],o=t[4],s=t[5],c=t[6],l=t[7],u=t[8],f=e[0],d=e[1],h=e[2],p=e[3],v=e[4],g=e[5],y=e[6],m=e[7],b=e[8];return Math.abs(n-f)<=glMatrix.EPSILON*Math.max(1,Math.abs(n),Math.abs(f))&&Math.abs(r-d)<=glMatrix.EPSILON*Math.max(1,Math.abs(r),Math.abs(d))&&Math.abs(i-h)<=glMatrix.EPSILON*Math.max(1,Math.abs(i),Math.abs(h))&&Math.abs(a-p)<=glMatrix.EPSILON*Math.max(1,Math.abs(a),Math.abs(p))&&Math.abs(o-v)<=glMatrix.EPSILON*Math.max(1,Math.abs(o),Math.abs(v))&&Math.abs(s-g)<=glMatrix.EPSILON*Math.max(1,Math.abs(s),Math.abs(g))&&Math.abs(c-y)<=glMatrix.EPSILON*Math.max(1,Math.abs(c),Math.abs(y))&&Math.abs(l-m)<=glMatrix.EPSILON*Math.max(1,Math.abs(l),Math.abs(m))&&Math.abs(u-b)<=glMatrix.EPSILON*Math.max(1,Math.abs(u),Math.abs(b))}var Hpt=null,$pt=null;function el(){var t=new $n(4);return $n!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}function p6(t){var e=new $n(4);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function v6(t,e,n,r){var i=new $n(4);return i[0]=t,i[1]=e,i[2]=n,i[3]=r,i}function g6(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function y6(t,e,n,r,i){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t}function m6(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t}function Vpt(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t}function Upt(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t[3]=e[3]*n[3],t}function Xpt(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t[3]=e[3]/n[3],t}function qpt(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t[3]=Math.ceil(e[3]),t}function Zpt(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t[3]=Math.floor(e[3]),t}function Kpt(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t[3]=Math.min(e[3],n[3]),t}function Qpt(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t[3]=Math.max(e[3],n[3]),t}function Jpt(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t[3]=Math.round(e[3]),t}function b6(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t}function t0t(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t}function e0t(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2],a=e[3]-t[3];return Math.hypot(n,r,i,a)}function n0t(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2],a=e[3]-t[3];return n*n+r*r+i*i+a*a}function x6(t){var e=t[0],n=t[1],r=t[2],i=t[3];return Math.hypot(e,n,r,i)}function _6(t){var e=t[0],n=t[1],r=t[2],i=t[3];return e*e+n*n+r*r+i*i}function r0t(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t}function i0t(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t[3]=1/e[3],t}function O6(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=n*n+r*r+i*i+a*a;return o>0&&(o=1/Math.sqrt(o)),t[0]=n*o,t[1]=r*o,t[2]=i*o,t[3]=a*o,t}function w6(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}function a0t(t,e,n,r){var i=n[0]*r[1]-n[1]*r[0],a=n[0]*r[2]-n[2]*r[0],o=n[0]*r[3]-n[3]*r[0],s=n[1]*r[2]-n[2]*r[1],c=n[1]*r[3]-n[3]*r[1],l=n[2]*r[3]-n[3]*r[2],u=e[0],f=e[1],d=e[2],h=e[3];return t[0]=f*l-d*c+h*s,t[1]=-(u*l)+d*o-h*a,t[2]=u*c-f*o+h*i,t[3]=-(u*s)+f*a-d*i,t}function S6(t,e,n,r){var i=e[0],a=e[1],o=e[2],s=e[3];return t[0]=i+r*(n[0]-i),t[1]=a+r*(n[1]-a),t[2]=o+r*(n[2]-o),t[3]=s+r*(n[3]-s),t}function o0t(t,e){e=e||1;var n,r,i,a,o,s;do n=glMatrix.RANDOM()*2-1,r=glMatrix.RANDOM()*2-1,o=n*n+r*r;while(o>=1);do i=glMatrix.RANDOM()*2-1,a=glMatrix.RANDOM()*2-1,s=i*i+a*a;while(s>=1);var c=Math.sqrt((1-o)/s);return t[0]=e*n,t[1]=e*r,t[2]=e*i*c,t[3]=e*a*c,t}function Fu(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3];return t[0]=n[0]*r+n[4]*i+n[8]*a+n[12]*o,t[1]=n[1]*r+n[5]*i+n[9]*a+n[13]*o,t[2]=n[2]*r+n[6]*i+n[10]*a+n[14]*o,t[3]=n[3]*r+n[7]*i+n[11]*a+n[15]*o,t}function s0t(t,e,n){var r=e[0],i=e[1],a=e[2],o=n[0],s=n[1],c=n[2],l=n[3],u=l*r+s*a-c*i,f=l*i+c*r-o*a,d=l*a+o*i-s*r,h=-o*r-s*i-c*a;return t[0]=u*l+h*-o+f*-c-d*-s,t[1]=f*l+h*-s+d*-o-u*-c,t[2]=d*l+h*-c+u*-s-f*-o,t[3]=e[3],t}function c0t(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t}function l0t(t){return"vec4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"}function M6(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]}function E6(t,e){var n=t[0],r=t[1],i=t[2],a=t[3],o=e[0],s=e[1],c=e[2],l=e[3];return Math.abs(n-o)<=ln*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(r-s)<=ln*Math.max(1,Math.abs(r),Math.abs(s))&&Math.abs(i-c)<=ln*Math.max(1,Math.abs(i),Math.abs(c))&&Math.abs(a-l)<=ln*Math.max(1,Math.abs(a),Math.abs(l))}var u0t=null,f0t=null,d0t=null,h0t=null,p0t=null,v0t=null,g0t=null,y0t=function(){var t=el();return function(e,n,r,i,a,o){var s,c;for(n||(n=4),r||(r=0),i?c=Math.min(i*n+r,e.length):c=e.length,s=r;s<c;s+=n)t[0]=e[s],t[1]=e[s+1],t[2]=e[s+2],t[3]=e[s+3],a(t,t,o),e[s]=t[0],e[s+1]=t[1],e[s+2]=t[2],e[s+3]=t[3];return e}}();function lr(){var t=new $n(4);return $n!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function m0t(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t}function Bo(t,e,n){n=n*.5;var r=Math.sin(n);return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=Math.cos(n),t}function b0t(t,e){var n=Math.acos(e[3])*2,r=Math.sin(n/2);return r>glMatrix.EPSILON?(t[0]=e[0]/r,t[1]=e[1]/r,t[2]=e[2]/r):(t[0]=1,t[1]=0,t[2]=0),n}function x0t(t,e){var n=k6(t,e);return Math.acos(2*n*n-1)}function Fo(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3],s=n[0],c=n[1],l=n[2],u=n[3];return t[0]=r*u+o*s+i*l-a*c,t[1]=i*u+o*c+a*s-r*l,t[2]=a*u+o*l+r*c-i*s,t[3]=o*u-r*s-i*c-a*l,t}function _0t(t,e,n){n*=.5;var r=e[0],i=e[1],a=e[2],o=e[3],s=Math.sin(n),c=Math.cos(n);return t[0]=r*c+o*s,t[1]=i*c+a*s,t[2]=a*c-i*s,t[3]=o*c-r*s,t}function O0t(t,e,n){n*=.5;var r=e[0],i=e[1],a=e[2],o=e[3],s=Math.sin(n),c=Math.cos(n);return t[0]=r*c-a*s,t[1]=i*c+o*s,t[2]=a*c+r*s,t[3]=o*c-i*s,t}function w0t(t,e,n){n*=.5;var r=e[0],i=e[1],a=e[2],o=e[3],s=Math.sin(n),c=Math.cos(n);return t[0]=r*c+i*s,t[1]=i*c-r*s,t[2]=a*c+o*s,t[3]=o*c-a*s,t}function S0t(t,e){var n=e[0],r=e[1],i=e[2];return t[0]=n,t[1]=r,t[2]=i,t[3]=Math.sqrt(Math.abs(1-n*n-r*r-i*i)),t}function P6(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=Math.sqrt(n*n+r*r+i*i),s=Math.exp(a),c=o>0?s*Math.sin(o)/o:0;return t[0]=n*c,t[1]=r*c,t[2]=i*c,t[3]=s*Math.cos(o),t}function A6(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=Math.sqrt(n*n+r*r+i*i),s=o>0?Math.atan2(o,a)/o:0;return t[0]=n*s,t[1]=r*s,t[2]=i*s,t[3]=.5*Math.log(n*n+r*r+i*i+a*a),t}function M0t(t,e,n){return A6(t,e),C6(t,t,n),P6(t,t),t}function yg(t,e,n,r){var i=e[0],a=e[1],o=e[2],s=e[3],c=n[0],l=n[1],u=n[2],f=n[3],d,h,p,v,g;return h=i*c+a*l+o*u+s*f,h<0&&(h=-h,c=-c,l=-l,u=-u,f=-f),1-h>ln?(d=Math.acos(h),p=Math.sin(d),v=Math.sin((1-r)*d)/p,g=Math.sin(r*d)/p):(v=1-r,g=r),t[0]=v*i+g*c,t[1]=v*a+g*l,t[2]=v*o+g*u,t[3]=v*s+g*f,t}function E0t(t){var e=glMatrix.RANDOM(),n=glMatrix.RANDOM(),r=glMatrix.RANDOM(),i=Math.sqrt(1-e),a=Math.sqrt(e);return t[0]=i*Math.sin(2*Math.PI*n),t[1]=i*Math.cos(2*Math.PI*n),t[2]=a*Math.sin(2*Math.PI*r),t[3]=a*Math.cos(2*Math.PI*r),t}function mg(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=n*n+r*r+i*i+a*a,s=o?1/o:0;return t[0]=-n*s,t[1]=-r*s,t[2]=-i*s,t[3]=a*s,t}function P0t(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t}function T6(t,e){var n=e[0]+e[4]+e[8],r;if(n>0)r=Math.sqrt(n+1),t[3]=.5*r,r=.5/r,t[0]=(e[5]-e[7])*r,t[1]=(e[6]-e[2])*r,t[2]=(e[1]-e[3])*r;else{var i=0;e[4]>e[0]&&(i=1),e[8]>e[i*3+i]&&(i=2);var a=(i+1)%3,o=(i+2)%3;r=Math.sqrt(e[i*3+i]-e[a*3+a]-e[o*3+o]+1),t[i]=.5*r,r=.5/r,t[3]=(e[a*3+o]-e[o*3+a])*r,t[a]=(e[a*3+i]+e[i*3+a])*r,t[o]=(e[o*3+i]+e[i*3+o])*r}return t}function sh(t,e,n,r){var i=.5*Math.PI/180;e*=i,n*=i,r*=i;var a=Math.sin(e),o=Math.cos(e),s=Math.sin(n),c=Math.cos(n),l=Math.sin(r),u=Math.cos(r);return t[0]=a*c*u-o*s*l,t[1]=o*s*u+a*c*l,t[2]=o*c*l-a*s*u,t[3]=o*c*u+a*s*l,t}function A0t(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"}var T0t=p6,bg=v6,ch=g6,C0t=y6,k0t=m6,Q_=Fo,C6=b6,k6=w6,L0t=S6,N0t=x6,I0t=null,j0t=_6,R0t=null,lh=O6,D0t=M6,B0t=E6,F0t=function(){var t=Te(),e=Ge(1,0,0),n=Ge(0,1,0);return function(r,i,a){var o=ya(i,a);return o<-.999999?(rh(t,e,i),R_(t)<1e-6&&rh(t,n,i),Gs(t,t),Bo(r,t,Math.PI),r):o>.999999?(r[0]=0,r[1]=0,r[2]=0,r[3]=1,r):(rh(t,i,a),r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=1+o,lh(r,r))}}(),z0t=function(){var t=lr(),e=lr();return function(n,r,i,a,o,s){return yg(t,r,o,s),yg(e,i,a,s),yg(n,t,e,2*s*(1-s)),n}}(),G0t=function(){var t=K_();return function(e,n,r,i){return t[0]=r[0],t[3]=r[1],t[6]=r[2],t[1]=i[0],t[4]=i[1],t[7]=i[2],t[2]=-n[0],t[5]=-n[1],t[8]=-n[2],lh(e,T6(e,t))}}();function L6(){var t=new $n(2);return $n!=Float32Array&&(t[0]=0,t[1]=0),t}function W0t(t){var e=new glMatrix.ARRAY_TYPE(2);return e[0]=t[0],e[1]=t[1],e}function N6(t,e){var n=new $n(2);return n[0]=t,n[1]=e,n}function I6(t,e){return t[0]=e[0],t[1]=e[1],t}function Y0t(t,e,n){return t[0]=e,t[1]=n,t}function H0t(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}function $0t(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t}function V0t(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t}function U0t(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t}function X0t(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t}function q0t(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t}function Z0t(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t}function K0t(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t}function Q0t(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t}function J0t(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t}function tvt(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t}function evt(t,e){var n=e[0]-t[0],r=e[1]-t[1];return Math.hypot(n,r)}function nvt(t,e){var n=e[0]-t[0],r=e[1]-t[1];return n*n+r*r}function rvt(t){var e=t[0],n=t[1];return Math.hypot(e,n)}function ivt(t){var e=t[0],n=t[1];return e*e+n*n}function avt(t,e){return t[0]=-e[0],t[1]=-e[1],t}function ovt(t,e){return t[0]=1/e[0],t[1]=1/e[1],t}function j6(t,e){var n=e[0],r=e[1],i=n*n+r*r;return i>0&&(i=1/Math.sqrt(i)),t[0]=e[0]*i,t[1]=e[1]*i,t}function R6(t,e){return t[0]*e[0]+t[1]*e[1]}function svt(t,e,n){var r=e[0]*n[1]-e[1]*n[0];return t[0]=t[1]=0,t[2]=r,t}function cvt(t,e,n,r){var i=e[0],a=e[1];return t[0]=i+r*(n[0]-i),t[1]=a+r*(n[1]-a),t}function lvt(t,e){e=e||1;var n=glMatrix.RANDOM()*2*Math.PI;return t[0]=Math.cos(n)*e,t[1]=Math.sin(n)*e,t}function uvt(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i,t[1]=n[1]*r+n[3]*i,t}function fvt(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i+n[4],t[1]=n[1]*r+n[3]*i+n[5],t}function dvt(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[3]*i+n[6],t[1]=n[1]*r+n[4]*i+n[7],t}function hvt(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[4]*i+n[12],t[1]=n[1]*r+n[5]*i+n[13],t}function pvt(t,e,n,r){var i=e[0]-n[0],a=e[1]-n[1],o=Math.sin(r),s=Math.cos(r);return t[0]=i*s-a*o+n[0],t[1]=i*o+a*s+n[1],t}function vvt(t,e){var n=t[0],r=t[1],i=e[0],a=e[1],o=Math.sqrt(n*n+r*r)*Math.sqrt(i*i+a*a),s=o&&(n*i+r*a)/o;return Math.acos(Math.min(Math.max(s,-1),1))}function gvt(t){return t[0]=0,t[1]=0,t}function yvt(t){return"vec2("+t[0]+", "+t[1]+")"}function D6(t,e){return t[0]===e[0]&&t[1]===e[1]}function mvt(t,e){var n=t[0],r=t[1],i=e[0],a=e[1];return Math.abs(n-i)<=glMatrix.EPSILON*Math.max(1,Math.abs(n),Math.abs(i))&&Math.abs(r-a)<=glMatrix.EPSILON*Math.max(1,Math.abs(r),Math.abs(a))}var bvt=null,xvt=null,_vt=null,Ovt=null,wvt=null,Svt=null,Mvt=null,Evt=function(){var t=L6();return function(e,n,r,i,a,o){var s,c;for(n||(n=2),r||(r=0),i?c=Math.min(i*n+r,e.length):c=e.length,s=r;s<c;s+=n)t[0]=e[s],t[1]=e[s+1],a(t,t,o),e[s]=t[0],e[s+1]=t[1];return e}}(),B6={}.toString,F6=function(t,e){return B6.call(t)==="[object "+e+"]"},zu=F6,z6=function(t){return zu(t,"Number")},er=z6;function bi(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}var G6=function(t){return t==null},Ft=G6,Dn=function(t){return zu(t,"String")},W6=function(t,e,n){return t<e?e:t>n?n:t},Vn=W6,Gu={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0};function J_(t){return Array.isArray(t)&&t.every(function(e){var n=e[0].toLowerCase();return Gu[n]===e.length-1&&"achlmqstvz".includes(n)})}function t2(t){return J_(t)&&t.every(function(e){var n=e[0];return n===n.toUpperCase()})}function e2(t){return t2(t)&&t.every(function(e){var n=e[0];return"ACLMQZ".includes(n)})}var n2={x1:0,y1:0,x2:0,y2:0,x:0,y:0,qx:null,qy:null};function r2(t){for(var e=t.pathValue[t.segmentStart],n=e.toLowerCase(),r=t.data;r.length>=Gu[n]&&(n==="m"&&r.length>2?(t.segments.push([e].concat(r.splice(0,2))),n="l",e=e==="m"?"l":"L"):t.segments.push([e].concat(r.splice(0,Gu[n]))),!!Gu[n]););}function Y6(t){var e=t.index,n=t.pathValue,r=n.charCodeAt(e);if(r===48){t.param=0,t.index+=1;return}if(r===49){t.param=1,t.index+=1;return}t.err='[path-util]: invalid Arc flag "'+n[e]+'", expecting 0 or 1 at index '+e}function H6(t){return t>=48&&t<=57||t===43||t===45||t===46}function nl(t){return t>=48&&t<=57}function $6(t){var e=t.max,n=t.pathValue,r=t.index,i=r,a=!1,o=!1,s=!1,c=!1,l;if(i>=e){t.err="[path-util]: Invalid path value at index "+i+', "pathValue" is missing param';return}if(l=n.charCodeAt(i),(l===43||l===45)&&(i+=1,l=n.charCodeAt(i)),!nl(l)&&l!==46){t.err="[path-util]: Invalid path value at index "+i+', "'+n[i]+'" is not a number';return}if(l!==46){if(a=l===48,i+=1,l=n.charCodeAt(i),a&&i<e&&l&&nl(l)){t.err="[path-util]: Invalid path value at index "+r+', "'+n[r]+'" illegal number';return}for(;i<e&&nl(n.charCodeAt(i));)i+=1,o=!0;l=n.charCodeAt(i)}if(l===46){for(c=!0,i+=1;nl(n.charCodeAt(i));)i+=1,s=!0;l=n.charCodeAt(i)}if(l===101||l===69){if(c&&!o&&!s){t.err="[path-util]: Invalid path value at index "+i+', "'+n[i]+'" invalid float exponent';return}if(i+=1,l=n.charCodeAt(i),(l===43||l===45)&&(i+=1),i<e&&nl(n.charCodeAt(i)))for(;i<e&&nl(n.charCodeAt(i));)i+=1;else{t.err="[path-util]: Invalid path value at index "+i+', "'+n[i]+'" invalid integer exponent';return}}t.index=i,t.param=+t.pathValue.slice(r,i)}function V6(t){var e=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279];return t===10||t===13||t===8232||t===8233||t===32||t===9||t===11||t===12||t===160||t>=5760&&e.includes(t)}function uh(t){for(var e=t.pathValue,n=t.max;t.index<n&&V6(e.charCodeAt(t.index));)t.index+=1}function U6(t){switch(t|32){case 109:case 122:case 108:case 104:case 118:case 99:case 115:case 113:case 116:case 97:return!0;default:return!1}}function X6(t){return(t|32)===97}function q6(t){var e=t.max,n=t.pathValue,r=t.index,i=n.charCodeAt(r),a=Gu[n[r].toLowerCase()];if(t.segmentStart=r,!U6(i)){t.err='[path-util]: Invalid path value "'+n[r]+'" is not a path command';return}if(t.index+=1,uh(t),t.data=[],!a){r2(t);return}for(;;){for(var o=a;o>0;o-=1){if(X6(i)&&(o===3||o===4)?Y6(t):$6(t),t.err.length)return;t.data.push(t.param),uh(t),t.index<e&&n.charCodeAt(t.index)===44&&(t.index+=1,uh(t))}if(t.index>=t.max||!H6(n.charCodeAt(t.index)))break}r2(t)}var Z6=function(){function t(e){this.pathValue=e,this.segments=[],this.max=e.length,this.index=0,this.param=0,this.segmentStart=0,this.data=[],this.err=""}return t}();function K6(t){if(J_(t))return[].concat(t);var e=new Z6(t);for(uh(e);e.index<e.max&&!e.err.length;)q6(e);return e.err?e.err:e.segments}function Q6(t){if(t2(t))return[].concat(t);var e=K6(t),n=0,r=0,i=0,a=0;return e.map(function(o){var s=o.slice(1).map(Number),c=o[0],l=c.toUpperCase();if(c==="M")return n=s[0],r=s[1],i=n,a=r,["M",n,r];var u;if(c!==l)switch(l){case"A":u=[l,s[0],s[1],s[2],s[3],s[4],s[5]+n,s[6]+r];break;case"V":u=[l,s[0]+r];break;case"H":u=[l,s[0]+n];break;default:{var f=s.map(function(h,p){return h+(p%2?r:n)});u=[l].concat(f)}}else u=[l].concat(s);var d=u.length;switch(l){case"Z":n=i,r=a;break;case"H":n=u[1];break;case"V":r=u[1];break;default:n=u[d-2],r=u[d-1],l==="M"&&(i=n,a=r)}return u})}function J6(t,e){var n=t[0],r=e.x1,i=e.y1,a=e.x2,o=e.y2,s=t.slice(1).map(Number),c=t;if("TQ".includes(n)||(e.qx=null,e.qy=null),n==="H")c=["L",t[1],i];else if(n==="V")c=["L",r,t[1]];else if(n==="S"){var l=r*2-a,u=i*2-o;e.x1=l,e.y1=u,c=["C",l,u].concat(s)}else if(n==="T"){var f=r*2-e.qx,d=i*2-e.qy;e.qx=f,e.qy=d,c=["Q",f,d].concat(s)}else if(n==="Q"){var h=s[0],p=s[1];e.qx=h,e.qy=p}return c}function fh(t){if(e2(t))return[].concat(t);for(var e=Q6(t),n=nt({},n2),r=0;r<e.length;r+=1){e[r]=J6(e[r],n);var i=e[r],a=i.length;n.x1=+i[a-2],n.y1=+i[a-1],n.x2=+i[a-4]||n.x1,n.y2=+i[a-3]||n.y1}return e}function zo(t,e,n){var r=t[0],i=t[1],a=e[0],o=e[1];return[r+(a-r)*n,i+(o-i)*n]}function xg(t,e,n,r,i){var a=bi([t,e],[n,r]),o={x:0,y:0};if(typeof i=="number")if(i<=0)o={x:t,y:e};else if(i>=a)o={x:n,y:r};else{var s=zo([t,e],[n,r],i/a),c=s[0],l=s[1];o={x:c,y:l}}return{length:a,point:o,min:{x:Math.min(t,n),y:Math.min(e,r)},max:{x:Math.max(t,n),y:Math.max(e,r)}}}function i2(t,e){var n=t.x,r=t.y,i=e.x,a=e.y,o=n*i+r*a,s=Math.sqrt((Math.pow(n,2)+Math.pow(r,2))*(Math.pow(i,2)+Math.pow(a,2))),c=n*a-r*i<0?-1:1,l=c*Math.acos(o/s);return l}function t8(t,e,n,r,i,a,o,s,c,l){var u=Math.abs,f=Math.sin,d=Math.cos,h=Math.sqrt,p=Math.PI,v=u(n),g=u(r),y=(i%360+360)%360,m=y*(p/180);if(t===s&&e===c)return{x:t,y:e};if(v===0||g===0)return xg(t,e,s,c,l).point;var b=(t-s)/2,x=(e-c)/2,_={x:d(m)*b+f(m)*x,y:-f(m)*b+d(m)*x},O=Math.pow(_.x,2)/Math.pow(v,2)+Math.pow(_.y,2)/Math.pow(g,2);O>1&&(v*=h(O),g*=h(O));var w=Math.pow(v,2)*Math.pow(g,2)-Math.pow(v,2)*Math.pow(_.y,2)-Math.pow(g,2)*Math.pow(_.x,2),S=Math.pow(v,2)*Math.pow(_.y,2)+Math.pow(g,2)*Math.pow(_.x,2),M=w/S;M=M<0?0:M;var E=(a!==o?1:-1)*h(M),P={x:E*(v*_.y/g),y:E*(-(g*_.x)/v)},L={x:d(m)*P.x-f(m)*P.y+(t+s)/2,y:f(m)*P.x+d(m)*P.y+(e+c)/2},A={x:(_.x-P.x)/v,y:(_.y-P.y)/g},T=i2({x:1,y:0},A),C={x:(-_.x-P.x)/v,y:(-_.y-P.y)/g},N=i2(A,C);!o&&N>0?N-=2*p:o&&N<0&&(N+=2*p),N%=2*p;var B=T+N*l,j=v*d(B),D=g*f(B),G={x:d(m)*j-f(m)*D+L.x,y:f(m)*j+d(m)*D+L.y};return G}function e8(t,e,n,r,i,a,o,s,c,l,u){var f,d=u.bbox,h=d===void 0?!0:d,p=u.length,v=p===void 0?!0:p,g=u.sampleSize,y=g===void 0?30:g,m=typeof l=="number",b=t,x=e,_=0,O=[b,x,_],w=[b,x],S=0,M={x:0,y:0},E=[{x:b,y:x}];m&&l<=0&&(M={x:b,y:x});for(var P=0;P<=y;P+=1){if(S=P/y,f=t8(t,e,n,r,i,a,o,s,c,S),b=f.x,x=f.y,h&&E.push({x:b,y:x}),v&&(_+=bi(w,[b,x])),w=[b,x],m&&_>=l&&l>O[2]){var L=(_-l)/(_-O[2]);M={x:w[0]*(1-L)+O[0]*L,y:w[1]*(1-L)+O[1]*L}}O=[b,x,_]}return m&&l>=_&&(M={x:s,y:c}),{length:_,point:M,min:{x:Math.min.apply(null,E.map(function(A){return A.x})),y:Math.min.apply(null,E.map(function(A){return A.y}))},max:{x:Math.max.apply(null,E.map(function(A){return A.x})),y:Math.max.apply(null,E.map(function(A){return A.y}))}}}function n8(t,e,n,r,i,a,o,s,c){var l=1-c;return{x:Math.pow(l,3)*t+3*Math.pow(l,2)*c*n+3*l*Math.pow(c,2)*i+Math.pow(c,3)*o,y:Math.pow(l,3)*e+3*Math.pow(l,2)*c*r+3*l*Math.pow(c,2)*a+Math.pow(c,3)*s}}function a2(t,e,n,r,i,a,o,s,c,l){var u,f=l.bbox,d=f===void 0?!0:f,h=l.length,p=h===void 0?!0:h,v=l.sampleSize,g=v===void 0?10:v,y=typeof c=="number",m=t,b=e,x=0,_=[m,b,x],O=[m,b],w=0,S={x:0,y:0},M=[{x:m,y:b}];y&&c<=0&&(S={x:m,y:b});for(var E=0;E<=g;E+=1){if(w=E/g,u=n8(t,e,n,r,i,a,o,s,w),m=u.x,b=u.y,d&&M.push({x:m,y:b}),p&&(x+=bi(O,[m,b])),O=[m,b],y&&x>=c&&c>_[2]){var P=(x-c)/(x-_[2]);S={x:O[0]*(1-P)+_[0]*P,y:O[1]*(1-P)+_[1]*P}}_=[m,b,x]}return y&&c>=x&&(S={x:o,y:s}),{length:x,point:S,min:{x:Math.min.apply(null,M.map(function(L){return L.x})),y:Math.min.apply(null,M.map(function(L){return L.y}))},max:{x:Math.max.apply(null,M.map(function(L){return L.x})),y:Math.max.apply(null,M.map(function(L){return L.y}))}}}function r8(t,e,n,r,i,a,o){var s=1-o;return{x:Math.pow(s,2)*t+2*s*o*n+Math.pow(o,2)*i,y:Math.pow(s,2)*e+2*s*o*r+Math.pow(o,2)*a}}function i8(t,e,n,r,i,a,o,s){var c,l=s.bbox,u=l===void 0?!0:l,f=s.length,d=f===void 0?!0:f,h=s.sampleSize,p=h===void 0?10:h,v=typeof o=="number",g=t,y=e,m=0,b=[g,y,m],x=[g,y],_=0,O={x:0,y:0},w=[{x:g,y}];v&&o<=0&&(O={x:g,y});for(var S=0;S<=p;S+=1){if(_=S/p,c=r8(t,e,n,r,i,a,_),g=c.x,y=c.y,u&&w.push({x:g,y}),d&&(m+=bi(x,[g,y])),x=[g,y],v&&m>=o&&o>b[2]){var M=(m-o)/(m-b[2]);O={x:x[0]*(1-M)+b[0]*M,y:x[1]*(1-M)+b[1]*M}}b=[g,y,m]}return v&&o>=m&&(O={x:i,y:a}),{length:m,point:O,min:{x:Math.min.apply(null,w.map(function(E){return E.x})),y:Math.min.apply(null,w.map(function(E){return E.y}))},max:{x:Math.max.apply(null,w.map(function(E){return E.x})),y:Math.max.apply(null,w.map(function(E){return E.y}))}}}function o2(t,e,n){for(var r,i,a,o,s,c,l=fh(t),u=typeof e=="number",f,d=[],h,p=0,v=0,g=0,y=0,m,b=[],x=[],_=0,O={x:0,y:0},w=O,S=O,M=O,E=0,P=0,L=l.length;P<L;P+=1)m=l[P],h=m[0],f=h==="M",d=f?d:[p,v].concat(m.slice(1)),f?(g=m[1],y=m[2],O={x:g,y},w=O,_=0,u&&e<.001&&(M=O)):h==="L"?(r=xg(d[0],d[1],d[2],d[3],(e||0)-E),_=r.length,O=r.min,w=r.max,S=r.point):h==="A"?(i=e8(d[0],d[1],d[2],d[3],d[4],d[5],d[6],d[7],d[8],(e||0)-E,n||{}),_=i.length,O=i.min,w=i.max,S=i.point):h==="C"?(a=a2(d[0],d[1],d[2],d[3],d[4],d[5],d[6],d[7],(e||0)-E,n||{}),_=a.length,O=a.min,w=a.max,S=a.point):h==="Q"?(o=i8(d[0],d[1],d[2],d[3],d[4],d[5],(e||0)-E,n||{}),_=o.length,O=o.min,w=o.max,S=o.point):h==="Z"&&(d=[p,v,g,y],s=xg(d[0],d[1],d[2],d[3],(e||0)-E),_=s.length,O=s.min,w=s.max,S=s.point),u&&E<e&&E+_>=e&&(M=S),x.push(w),b.push(O),E+=_,c=h!=="Z"?m.slice(-2):[g,y],p=c[0],v=c[1];return u&&e>=E&&(M={x:p,y:v}),{length:E,point:M,min:{x:Math.min.apply(null,b.map(function(A){return A.x})),y:Math.min.apply(null,b.map(function(A){return A.y}))},max:{x:Math.max.apply(null,x.map(function(A){return A.x})),y:Math.max.apply(null,x.map(function(A){return A.y}))}}}function a8(t,e){return o2(t,void 0,nt(nt({},e),{bbox:!1,length:!0})).length}var mr=function(t){return Array.isArray?Array.isArray(t):zu(t,"Array")},dh=function(t){if(mr(t))return t.reduce(function(e,n){return Math.min(e,n)},t[0])},hh=function(t){if(mr(t))return t.reduce(function(e,n){return Math.max(e,n)},t[0])},o8=1e-5;function Wu(t,e,n){return n===void 0&&(n=o8),Math.abs(t-e)<n}var s8=function(t,e){return(t%e+e)%e},s2=s8;function c8(t,e,n){if(t[n].length>7){t[n].shift();for(var r=t[n],i=n;r.length;)e[n]="A",t.splice(i+=1,0,["C"].concat(r.splice(0,6)));t.splice(n,1)}}function l8(t){return e2(t)&&t.every(function(e){var n=e[0];return"MC".includes(n)})}function ph(t,e,n){var r=t*Math.cos(n)-e*Math.sin(n),i=t*Math.sin(n)+e*Math.cos(n);return{x:r,y:i}}function _g(t,e,n,r,i,a,o,s,c,l){var u=t,f=e,d=n,h=r,p=s,v=c,g=Math.PI*120/180,y=Math.PI/180*(+i||0),m=[],b,x,_,O,w;if(l)x=l[0],_=l[1],O=l[2],w=l[3];else{b=ph(u,f,-y),u=b.x,f=b.y,b=ph(p,v,-y),p=b.x,v=b.y;var S=(u-p)/2,M=(f-v)/2,E=S*S/(d*d)+M*M/(h*h);E>1&&(E=Math.sqrt(E),d*=E,h*=E);var P=d*d,L=h*h,A=(a===o?-1:1)*Math.sqrt(Math.abs((P*L-P*M*M-L*S*S)/(P*M*M+L*S*S)));O=A*d*M/h+(u+p)/2,w=A*-h*S/d+(f+v)/2,x=Math.asin(((f-w)/h*Math.pow(10,9)>>0)/Math.pow(10,9)),_=Math.asin(((v-w)/h*Math.pow(10,9)>>0)/Math.pow(10,9)),x=u<O?Math.PI-x:x,_=p<O?Math.PI-_:_,x<0&&(x=Math.PI*2+x),_<0&&(_=Math.PI*2+_),o&&x>_&&(x-=Math.PI*2),!o&&_>x&&(_-=Math.PI*2)}var T=_-x;if(Math.abs(T)>g){var C=_,N=p,B=v;_=x+g*(o&&_>x?1:-1),p=O+d*Math.cos(_),v=w+h*Math.sin(_),m=_g(p,v,d,h,i,0,o,N,B,[_,C,O,w])}T=_-x;var j=Math.cos(x),D=Math.sin(x),G=Math.cos(_),Y=Math.sin(_),U=Math.tan(T/4),V=4/3*d*U,it=4/3*h*U,pt=[u,f],Ot=[u+V*D,f-it*j],ht=[p+V*Y,v-it*G],ut=[p,v];if(Ot[0]=2*pt[0]-Ot[0],Ot[1]=2*pt[1]-Ot[1],l)return Ot.concat(ht,ut,m);m=Ot.concat(ht,ut,m);for(var Lt=[],wt=0,Gt=m.length;wt<Gt;wt+=1)Lt[wt]=wt%2?ph(m[wt-1],m[wt],y).y:ph(m[wt],m[wt+1],y).x;return Lt}function u8(t,e,n,r,i,a){var o=.3333333333333333,s=2/3;return[o*t+s*n,o*e+s*r,o*i+s*n,o*a+s*r,i,a]}var c2=function(t,e,n,r){var i=.5,a=zo([t,e],[n,r],i);return yt(yt([],a,!0),[n,r,n,r],!1)};function f8(t,e){var n=t[0],r=t.slice(1).map(Number),i=r[0],a=r[1],o,s=e.x1,c=e.y1,l=e.x,u=e.y;switch("TQ".includes(n)||(e.qx=null,e.qy=null),n){case"M":return e.x=i,e.y=a,t;case"A":return o=[s,c].concat(r),["C"].concat(_g(o[0],o[1],o[2],o[3],o[4],o[5],o[6],o[7],o[8],o[9]));case"Q":return e.qx=i,e.qy=a,o=[s,c].concat(r),["C"].concat(u8(o[0],o[1],o[2],o[3],o[4],o[5]));case"L":return["C"].concat(c2(s,c,i,a));case"Z":return s===l&&c===u?["C",s,c,l,u,l,u]:["C"].concat(c2(s,c,l,u));default:}return t}function Og(t,e){if(e===void 0&&(e=!1),l8(t)){var n=[].concat(t);return e?[n,[]]:n}for(var r=fh(t),i=nt({},n2),a=[],o="",s=r.length,c,l,u=[],f=0;f<s;f+=1){r[f]&&(o=r[f][0]),a[f]=o;var d=f8(r[f],i);r[f]=d,c8(r,a,f),s=r.length,o==="Z"&&u.push(f),c=r[f],l=c.length,i.x1=+c[l-2],i.y1=+c[l-1],i.x2=+c[l-4]||i.x1,i.y2=+c[l-3]||i.y1}return e?[r,u]:r}function d8(t,e){e===void 0&&(e=.5);var n=t.slice(0,2),r=t.slice(2,4),i=t.slice(4,6),a=t.slice(6,8),o=zo(n,r,e),s=zo(r,i,e),c=zo(i,a,e),l=zo(o,s,e),u=zo(s,c,e),f=zo(l,u,e);return[["C"].concat(o,l,f),["C"].concat(u,c,a)]}function l2(t){return t.map(function(e,n,r){var i=n&&r[n-1].slice(-2).concat(e.slice(1)),a=n?a2(i[0],i[1],i[2],i[3],i[4],i[5],i[6],i[7],i[8],{bbox:!1}).length:0,o;return n?o=a?d8(i):[e,e]:o=[e],{s:e,ss:o,l:a}})}function u2(t,e,n){var r=l2(t),i=l2(e),a=r.length,o=i.length,s=r.filter(function(g){return g.l}).length,c=i.filter(function(g){return g.l}).length,l=r.filter(function(g){return g.l}).reduce(function(g,y){var m=y.l;return g+m},0)/s||0,u=i.filter(function(g){return g.l}).reduce(function(g,y){var m=y.l;return g+m},0)/c||0,f=n||Math.max(a,o),d=[l,u],h=[f-a,f-o],p=0,v=[r,i].map(function(g,y){return g.l===f?g.map(function(m){return m.s}):g.map(function(m,b){return p=b&&h[y]&&m.l>=d[y],h[y]-=p?1:0,p?m.ss:[m.s]}).flat()});return v[0].length===v[1].length?v:u2(v[0],v[1],f)}function h8(t,e,n,r,i,a,o,s){return 3*((s-e)*(n+i)-(o-t)*(r+a)+r*(t-i)-n*(e-a)+s*(i+t/3)-o*(a+e/3))/20}function p8(t){var e=0,n=0,r=0;return Og(t).map(function(i){var a;switch(i[0]){case"M":return e=i[1],n=i[2],0;default:var o=i.slice(1),s=o[0],c=o[1],l=o[2],u=o[3],f=o[4],d=o[5];return r=h8(e,n,s,c,l,u,f,d),a=i.slice(-2),e=a[0],n=a[1],r}}).reduce(function(i,a){return i+a},0)}function f2(t){return p8(t)>=0}function v8(t){var e=t.slice(1).map(function(n,r,i){return r?i[r-1].slice(-2).concat(n.slice(1)):t[0].slice(1).concat(n.slice(1))}).map(function(n){return n.map(function(r,i){return n[n.length-i-2*(1-i%2)]})}).reverse();return[["M"].concat(e[0].slice(0,2))].concat(e.map(function(n){return["C"].concat(n.slice(2))}))}function g8(t){return t.map(function(e){return Array.isArray(e)?[].concat(e):e})}function y8(t){var e=t.length,n=e-1;return t.map(function(r,i){return t.map(function(a,o){var s=i+o,c;return o===0||t[s]&&t[s][0]==="M"?(c=t[s],["M"].concat(c.slice(-2))):(s>=e&&(s-=n),t[s])})})}function m8(t,e){var n=t.length-1,r=[],i=0,a=0,o=y8(t);return o.forEach(function(s,c){t.slice(1).forEach(function(l,u){a+=bi(t[(c+u)%n].slice(-2),e[u%n].slice(-2))}),r[c]=a,a=0}),i=r.indexOf(Math.min.apply(null,r)),o[i]}var b8=function(t){return zu(t,"Boolean")},d2=b8,Ys=function(t){var e=typeof t;return t!==null&&e==="object"||e==="function"},x8=function(t){return t===void 0},Cn=x8;function _8(t,e,n){return o2(t,e,nt(nt({},n),{bbox:!1,length:!0})).point}function vh(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function wg(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function rl(){}var Hs=.7,il=1/Hs,al="\\s*([+-]?\\d+)\\s*",Yu="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ta="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",O8=/^#([0-9a-f]{3,8})$/,w8=new RegExp("^rgb\\("+[al,al,al]+"\\)$"),S8=new RegExp("^rgb\\("+[Ta,Ta,Ta]+"\\)$"),M8=new RegExp("^rgba\\("+[al,al,al,Yu]+"\\)$"),E8=new RegExp("^rgba\\("+[Ta,Ta,Ta,Yu]+"\\)$"),P8=new RegExp("^hsl\\("+[Yu,Ta,Ta]+"\\)$"),A8=new RegExp("^hsla\\("+[Yu,Ta,Ta,Yu]+"\\)$"),h2={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};vh(rl,gh,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:p2,formatHex:p2,formatHsl:T8,formatRgb:v2,toString:v2});function p2(){return this.rgb().formatHex()}function T8(){return _2(this).formatHsl()}function v2(){return this.rgb().formatRgb()}function gh(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=O8.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?g2(e):n===3?new oi(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?yh(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?yh(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=w8.exec(t))?new oi(e[1],e[2],e[3],1):(e=S8.exec(t))?new oi(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=M8.exec(t))?yh(e[1],e[2],e[3],e[4]):(e=E8.exec(t))?yh(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=P8.exec(t))?x2(e[1],e[2]/100,e[3]/100,1):(e=A8.exec(t))?x2(e[1],e[2]/100,e[3]/100,e[4]):h2.hasOwnProperty(t)?g2(h2[t]):t==="transparent"?new oi(NaN,NaN,NaN,0):null}function g2(t){return new oi(t>>16&255,t>>8&255,t&255,1)}function yh(t,e,n,r){return r<=0&&(t=e=n=NaN),new oi(t,e,n,r)}function y2(t){return t instanceof rl||(t=gh(t)),t?(t=t.rgb(),new oi(t.r,t.g,t.b,t.opacity)):new oi}function Hu(t,e,n,r){return arguments.length===1?y2(t):new oi(t,e,n,r==null?1:r)}function oi(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}vh(oi,Hu,wg(rl,{brighter:function(t){return t=t==null?il:Math.pow(il,t),new oi(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=t==null?Hs:Math.pow(Hs,t),new oi(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:m2,formatHex:m2,formatRgb:b2,toString:b2}));function m2(){return"#"+Sg(this.r)+Sg(this.g)+Sg(this.b)}function b2(){var t=this.opacity;return t=isNaN(t)?1:Math.max(0,Math.min(1,t)),(t===1?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(t===1?")":", "+t+")")}function Sg(t){return t=Math.max(0,Math.min(255,Math.round(t)||0)),(t<16?"0":"")+t.toString(16)}function x2(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Ca(t,e,n,r)}function _2(t){if(t instanceof Ca)return new Ca(t.h,t.s,t.l,t.opacity);if(t instanceof rl||(t=gh(t)),!t)return new Ca;if(t instanceof Ca)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(e===a?o=(n-r)/s+(n<r)*6:n===a?o=(r-e)/s+2:o=(e-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new Ca(o,s,c,t.opacity)}function C8(t,e,n,r){return arguments.length===1?_2(t):new Ca(t,e,n,r==null?1:r)}function Ca(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}vh(Ca,C8,wg(rl,{brighter:function(t){return t=t==null?il:Math.pow(il,t),new Ca(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=t==null?Hs:Math.pow(Hs,t),new Ca(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new oi(Mg(t>=240?t-240:t+120,i,r),Mg(t,i,r),Mg(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return t=isNaN(t)?1:Math.max(0,Math.min(1,t)),(t===1?"hsl(":"hsla(")+(this.h||0)+", "+(this.s||0)*100+"%, "+(this.l||0)*100+"%"+(t===1?")":", "+t+")")}}));function Mg(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}function Xr(t,e,n,r){var i=t-n,a=e-r;return Math.sqrt(i*i+a*a)}function mh(t,e){var n=Math.min.apply(Math,yt([],R(t),!1)),r=Math.min.apply(Math,yt([],R(e),!1)),i=Math.max.apply(Math,yt([],R(t),!1)),a=Math.max.apply(Math,yt([],R(e),!1));return{x:n,y:r,width:i-n,height:a-r}}function O2(t){return(t+Math.PI*2)%(Math.PI*2)}function w2(t,e){var n=Math.abs(t);return e>0?n:n*-1}function k8(t,e,n,r,i,a){var o=n,s=r;if(o===0||s===0)return{x:t,y:e};for(var c=i-t,l=a-e,u=Math.abs(c),f=Math.abs(l),d=o*o,h=s*s,p=Math.PI/4,v=0,g=0,y=0;y<4;y++){v=o*Math.cos(p),g=s*Math.sin(p);var m=(d-h)*Math.pow(Math.cos(p),3)/o,b=(h-d)*Math.pow(Math.sin(p),3)/s,x=v-m,_=g-b,O=u-m,w=f-b,S=Math.hypot(_,x),M=Math.hypot(w,O),E=S*Math.asin((x*w-_*O)/(S*M)),P=E/Math.sqrt(d+h-v*v-g*g);p+=P,p=Math.min(Math.PI/2,Math.max(0,p))}return{x:t+w2(v,c),y:e+w2(g,l)}}function L8(t,e,n,r,i,a,o,s){return-1*n*Math.cos(i)*Math.sin(s)-r*Math.sin(i)*Math.cos(s)}function N8(t,e,n,r,i,a,o,s){return-1*n*Math.sin(i)*Math.sin(s)+r*Math.cos(i)*Math.cos(s)}function I8(t,e,n){return Math.atan(-e/t*Math.tan(n))}function j8(t,e,n){return Math.atan(e/(t*Math.tan(n)))}function R8(t,e,n,r,i,a){return n*Math.cos(i)*Math.cos(a)-r*Math.sin(i)*Math.sin(a)+t}function D8(t,e,n,r,i,a){return n*Math.sin(i)*Math.cos(a)+r*Math.cos(i)*Math.sin(a)+e}function B8(t,e,n,r){var i=Math.atan2(r*t,n*e);return(i+Math.PI*2)%(Math.PI*2)}function S2(t,e,n){return{x:t*Math.cos(n),y:e*Math.sin(n)}}function M2(t,e,n){var r=Math.cos(n),i=Math.sin(n);return[t*r-e*i,t*i+e*r]}function F8(t,e,n,r,i,a,o){for(var s=I8(n,r,i),c=1/0,l=-1/0,u=[a,o],f=-Math.PI*2;f<=Math.PI*2;f+=Math.PI){var d=s+f;a<o?a<d&&d<o&&u.push(d):o<d&&d<a&&u.push(d)}for(var f=0;f<u.length;f++){var h=R8(t,e,n,r,i,u[f]);h<c&&(c=h),h>l&&(l=h)}for(var p=j8(n,r,i),v=1/0,g=-1/0,y=[a,o],f=-Math.PI*2;f<=Math.PI*2;f+=Math.PI){var m=p+f;a<o?a<m&&m<o&&y.push(m):o<m&&m<a&&y.push(m)}for(var f=0;f<y.length;f++){var b=D8(t,e,n,r,i,y[f]);b<v&&(v=b),b>g&&(g=b)}return{x:c,y:v,width:l-c,height:g-v}}function Pvt(t,e,n,r,i,a,o,s,c){var l=M2(s-t,c-e,-i),u=__read(l,2),f=u[0],d=u[1],h=k8(0,0,n,r,f,d),p=B8(n,r,h.x,h.y);p<a?h=S2(n,r,a):p>o&&(h=S2(n,r,o));var v=M2(h.x,h.y,i);return{x:v[0]+t,y:v[1]+e}}function Avt(t,e,n,r,i,a,o,s){var c=(o-a)*s+a,l=L8(t,e,n,r,i,a,o,c),u=N8(t,e,n,r,i,a,o,c);return O2(Math.atan2(u,l))}var z8=1e-4;function E2(t,e,n,r,i,a){var o=-1,s=1/0,c=[n,r],l=20;a&&a>200&&(l=a/10);for(var u=1/l,f=u/10,d=0;d<=l;d++){var h=d*u,p=[i.apply(void 0,yt([],R(t.concat([h])),!1)),i.apply(void 0,yt([],R(e.concat([h])),!1))],v=Xr(c[0],c[1],p[0],p[1]);v<s&&(o=h,s=v)}if(o===0)return{x:t[0],y:e[0]};if(o===1){var g=t.length;return{x:t[g-1],y:e[g-1]}}s=1/0;for(var d=0;d<32&&!(f<z8);d++){var y=o-f,m=o+f,p=[i.apply(void 0,yt([],R(t.concat([y])),!1)),i.apply(void 0,yt([],R(e.concat([y])),!1))],v=Xr(c[0],c[1],p[0],p[1]);if(y>=0&&v<s)o=y,s=v;else{var b=[i.apply(void 0,yt([],R(t.concat([m])),!1)),i.apply(void 0,yt([],R(e.concat([m])),!1))],x=Xr(c[0],c[1],b[0],b[1]);m<=1&&x<s?(o=m,s=x):f*=.5}}return{x:i.apply(void 0,yt([],R(t.concat([o])),!1)),y:i.apply(void 0,yt([],R(e.concat([o])),!1))}}function G8(t,e){for(var n=0,r=t.length,i=0;i<r;i++){var a=t[i],o=e[i],s=t[(i+1)%r],c=e[(i+1)%r];n+=Xr(a,o,s,c)}return n/2}function Tvt(t,e,n,r){return mh([t,n],[e,r])}function P2(t,e,n,r){return Xr(t,e,n,r)}function ka(t,e,n,r,i){return{x:(1-i)*t+i*n,y:(1-i)*e+i*r}}function W8(t,e,n,r,i,a){var o=(n-t)*(i-t)+(r-e)*(a-e);if(o<0)return Xr(t,e,i,a);var s=(n-t)*(n-t)+(r-e)*(r-e);return o>s?Xr(n,r,i,a):A2(t,e,n,r,i,a)}function A2(t,e,n,r,i,a){var o=[n-t,r-e];if(D6(o,[0,0]))return Math.sqrt((i-t)*(i-t)+(a-e)*(a-e));var s=[-o[1],o[0]];j6(s,s);var c=[i-t,a-e];return Math.abs(R6(c,s))}function Cvt(t,e,n,r){return Math.atan2(r-e,n-t)}function $s(t,e,n,r,i){var a=1-i;return a*a*a*t+3*e*i*a*a+3*n*i*i*a+r*i*i*i}function T2(t,e,n,r,i){var a=1-i;return 3*(a*a*(e-t)+2*a*i*(n-e)+i*i*(r-n))}function C2(t,e,n,r){var i=-3*t+9*e-9*n+3*r,a=6*t-12*e+6*n,o=3*e-3*t,s=[],c,l,u;if(Wu(i,0))Wu(a,0)||(c=-o/a,c>=0&&c<=1&&s.push(c));else{var f=a*a-4*i*o;Wu(f,0)?s.push(-a/(2*i)):f>0&&(u=Math.sqrt(f),c=(-a+u)/(2*i),l=(-a-u)/(2*i),c>=0&&c<=1&&s.push(c),l>=0&&l<=1&&s.push(l))}return s}function Y8(t,e,n,r,i,a,o,s,c){var l=$s(t,n,i,o,c),u=$s(e,r,a,s,c),f=ka(t,e,n,r,c),d=ka(n,r,i,a,c),h=ka(i,a,o,s,c),p=ka(f.x,f.y,d.x,d.y,c),v=ka(d.x,d.y,h.x,h.y,c);return[[t,e,f.x,f.y,p.x,p.y,l,u],[l,u,v.x,v.y,h.x,h.y,o,s]]}function Eg(t,e,n,r,i,a,o,s,c){if(c===0)return G8([t,n,i,o],[e,r,a,s]);var l=Y8(t,e,n,r,i,a,o,s,.5),u=__spreadArray(__spreadArray([],__read(l[0]),!1),[c-1],!1),f=__spreadArray(__spreadArray([],__read(l[1]),!1),[c-1],!1);return Eg.apply(void 0,__spreadArray([],__read(u),!1))+Eg.apply(void 0,__spreadArray([],__read(f),!1))}function H8(t,e,n,r,i,a,o,s){for(var c=[t,o],l=[e,s],u=C2(t,n,i,o),f=C2(e,r,a,s),d=0;d<u.length;d++)c.push($s(t,n,i,o,u[d]));for(var d=0;d<f.length;d++)l.push($s(e,r,a,s,f[d]));return mh(c,l)}function kvt(t,e,n,r,i,a,o,s){return Eg(t,e,n,r,i,a,o,s,3)}function $8(t,e,n,r,i,a,o,s,c,l,u){return E2([t,n,i,o],[e,r,a,s],c,l,$s,u)}function k2(t,e,n,r,i,a,o,s,c,l,u){var f=$8(t,e,n,r,i,a,o,s,c,l,u);return Xr(f.x,f.y,c,l)}function Lvt(t,e,n,r,i,a,o,s,c){return{x:$s(t,n,i,o,c),y:$s(e,r,a,s,c)}}function Nvt(t,e,n,r,i,a,o,s,c){var l=T2(t,n,i,o,c),u=T2(e,r,a,s,c);return O2(Math.atan2(u,l))}function L2(t){for(var e=0,n=[],r=0;r<t.length-1;r++){var i=t[r],a=t[r+1],o=Xr(i[0],i[1],a[0],a[1]),s={from:i,to:a,length:o};n.push(s),e+=o}return{segments:n,totalLength:e}}function N2(t){if(t.length<2)return 0;for(var e=0,n=0;n<t.length-1;n++){var r=t[n],i=t[n+1];e+=Xr(r[0],r[1],i[0],i[1])}return e}function I2(t,e){if(e>1||e<0||t.length<2)return null;var n=L2(t),r=n.segments,i=n.totalLength;if(i===0)return{x:t[0][0],y:t[0][1]};for(var a=0,o=null,s=0;s<r.length;s++){var c=r[s],l=c.from,u=c.to,f=c.length/i;if(e>=a&&e<=a+f){var d=(e-a)/f;o=ka(l[0],l[1],u[0],u[1],d);break}a+=f}return o}function j2(t,e){if(e>1||e<0||t.length<2)return 0;for(var n=L2(t),r=n.segments,i=n.totalLength,a=0,o=0,s=0;s<r.length;s++){var c=r[s],l=c.from,u=c.to,f=c.length/i;if(e>=a&&e<=a+f){o=Math.atan2(u[1]-l[1],u[0]-l[0]);break}a+=f}return o}function R2(t,e,n){for(var r=1/0,i=0;i<t.length-1;i++){var a=t[i],o=t[i+1],s=W8(a[0],a[1],o[0],o[1],e,n);s<r&&(r=s)}return r}function V8(t){for(var e=[],n=[],r=0;r<t.length;r++){var i=t[r];e.push(i[0]),n.push(i[1])}return mh(e,n)}function U8(t){return N2(t)}function Ivt(t,e){return I2(t,e)}function jvt(t,e,n){return R2(t,e,n)}function Rvt(t,e){return j2(t,e)}function bh(t){var e=t.slice(0);return t.length&&e.push(t[0]),e}function Dvt(t){return V8(t)}function Bvt(t){return N2(bh(t))}function Fvt(t,e){return I2(bh(t),e)}function zvt(t,e,n){return R2(bh(t),e,n)}function Gvt(t,e){return j2(bh(t),e)}function $u(t,e,n,r){var i=1-r;return i*i*t+2*r*i*e+r*r*n}function D2(t,e,n){var r=t+n-2*e;if(Wu(r,0))return[.5];var i=(t-e)/r;return i<=1&&i>=0?[i]:[]}function X8(t,e,n,r,i,a,o){var s=$u(t,n,i,o),c=$u(e,r,a,o),l=ka(t,e,n,r,o),u=ka(n,r,i,a,o);return[[t,e,l.x,l.y,s,c],[s,c,u.x,u.y,i,a]]}function Pg(t,e,n,r,i,a,o){if(o===0)return(Xr(t,e,n,r)+Xr(n,r,i,a)+Xr(t,e,i,a))/2;var s=X8(t,e,n,r,i,a,.5),c=s[0],l=s[1];return c.push(o-1),l.push(o-1),Pg.apply(void 0,__spreadArray([],__read(c),!1))+Pg.apply(void 0,__spreadArray([],__read(l),!1))}function q8(t,e,n,r,i,a){var o=D2(t,n,i)[0],s=D2(e,r,a)[0],c=[t,i],l=[e,a];return o!==void 0&&c.push($u(t,n,i,o)),s!==void 0&&l.push($u(e,r,a,s)),mh(c,l)}function Wvt(t,e,n,r,i,a){return Pg(t,e,n,r,i,a,3)}function Z8(t,e,n,r,i,a,o,s){return E2([t,n,i],[e,r,a],o,s,$u)}function K8(t,e,n,r,i,a,o,s){var c=Z8(t,e,n,r,i,a,o,s);return Xr(c.x,c.y,o,s)}var Q8=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof J.g!="undefined"?J.g:typeof self!="undefined"?self:{},B2={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(Q8,function(){function n(_,O,w,S,M){r(_,O,w||0,S||_.length-1,M||a)}function r(_,O,w,S,M){for(;S>w;){if(S-w>600){var E=S-w+1,P=O-w+1,L=Math.log(E),A=.5*Math.exp(2*L/3),T=.5*Math.sqrt(L*A*(E-A)/E)*(P-E/2<0?-1:1),C=Math.max(w,Math.floor(O-P*A/E+T)),N=Math.min(S,Math.floor(O+(E-P)*A/E+T));r(_,O,C,N,M)}var B=_[O],j=w,D=S;for(i(_,w,O),M(_[S],B)>0&&i(_,w,S);j<D;){for(i(_,j,D),j++,D--;M(_[j],B)<0;)j++;for(;M(_[D],B)>0;)D--}M(_[w],B)===0?i(_,w,D):(D++,i(_,D,S)),D<=O&&(w=D+1),O<=D&&(S=D-1)}}function i(_,O,w){var S=_[O];_[O]=_[w],_[w]=S}function a(_,O){return _<O?-1:_>O?1:0}var o=function(O){O===void 0&&(O=9),this._maxEntries=Math.max(4,O),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()};o.prototype.all=function(){return this._all(this.data,[])},o.prototype.search=function(O){var w=this.data,S=[];if(!m(O,w))return S;for(var M=this.toBBox,E=[];w;){for(var P=0;P<w.children.length;P++){var L=w.children[P],A=w.leaf?M(L):L;m(O,A)&&(w.leaf?S.push(L):y(O,A)?this._all(L,S):E.push(L))}w=E.pop()}return S},o.prototype.collides=function(O){var w=this.data;if(!m(O,w))return!1;for(var S=[];w;){for(var M=0;M<w.children.length;M++){var E=w.children[M],P=w.leaf?this.toBBox(E):E;if(m(O,P)){if(w.leaf||y(O,P))return!0;S.push(E)}}w=S.pop()}return!1},o.prototype.load=function(O){if(!(O&&O.length))return this;if(O.length<this._minEntries){for(var w=0;w<O.length;w++)this.insert(O[w]);return this}var S=this._build(O.slice(),0,O.length-1,0);if(!this.data.children.length)this.data=S;else if(this.data.height===S.height)this._splitRoot(this.data,S);else{if(this.data.height<S.height){var M=this.data;this.data=S,S=M}this._insert(S,this.data.height-S.height-1,!0)}return this},o.prototype.insert=function(O){return O&&this._insert(O,this.data.height-1),this},o.prototype.clear=function(){return this.data=b([]),this},o.prototype.remove=function(O,w){if(!O)return this;for(var S=this.data,M=this.toBBox(O),E=[],P=[],L,A,T;S||E.length;){if(S||(S=E.pop(),A=E[E.length-1],L=P.pop(),T=!0),S.leaf){var C=s(O,S.children,w);if(C!==-1)return S.children.splice(C,1),E.push(S),this._condense(E),this}!T&&!S.leaf&&y(S,M)?(E.push(S),P.push(L),L=0,A=S,S=S.children[0]):A?(L++,S=A.children[L],T=!1):S=null}return this},o.prototype.toBBox=function(O){return O},o.prototype.compareMinX=function(O,w){return O.minX-w.minX},o.prototype.compareMinY=function(O,w){return O.minY-w.minY},o.prototype.toJSON=function(){return this.data},o.prototype.fromJSON=function(O){return this.data=O,this},o.prototype._all=function(O,w){for(var S=[];O;)O.leaf?w.push.apply(w,O.children):S.push.apply(S,O.children),O=S.pop();return w},o.prototype._build=function(O,w,S,M){var E=S-w+1,P=this._maxEntries,L;if(E<=P)return L=b(O.slice(w,S+1)),c(L,this.toBBox),L;M||(M=Math.ceil(Math.log(E)/Math.log(P)),P=Math.ceil(E/Math.pow(P,M-1))),L=b([]),L.leaf=!1,L.height=M;var A=Math.ceil(E/P),T=A*Math.ceil(Math.sqrt(P));x(O,w,S,T,this.compareMinX);for(var C=w;C<=S;C+=T){var N=Math.min(C+T-1,S);x(O,C,N,A,this.compareMinY);for(var B=C;B<=N;B+=A){var j=Math.min(B+A-1,N);L.children.push(this._build(O,B,j,M-1))}}return c(L,this.toBBox),L},o.prototype._chooseSubtree=function(O,w,S,M){for(;M.push(w),!(w.leaf||M.length-1===S);){for(var E=1/0,P=1/0,L=void 0,A=0;A<w.children.length;A++){var T=w.children[A],C=h(T),N=v(O,T)-C;N<P?(P=N,E=C<E?C:E,L=T):N===P&&C<E&&(E=C,L=T)}w=L||w.children[0]}return w},o.prototype._insert=function(O,w,S){var M=S?O:this.toBBox(O),E=[],P=this._chooseSubtree(M,this.data,w,E);for(P.children.push(O),u(P,M);w>=0&&E[w].children.length>this._maxEntries;)this._split(E,w),w--;this._adjustParentBBoxes(M,E,w)},o.prototype._split=function(O,w){var S=O[w],M=S.children.length,E=this._minEntries;this._chooseSplitAxis(S,E,M);var P=this._chooseSplitIndex(S,E,M),L=b(S.children.splice(P,S.children.length-P));L.height=S.height,L.leaf=S.leaf,c(S,this.toBBox),c(L,this.toBBox),w?O[w-1].children.push(L):this._splitRoot(S,L)},o.prototype._splitRoot=function(O,w){this.data=b([O,w]),this.data.height=O.height+1,this.data.leaf=!1,c(this.data,this.toBBox)},o.prototype._chooseSplitIndex=function(O,w,S){for(var M,E=1/0,P=1/0,L=w;L<=S-w;L++){var A=l(O,0,L,this.toBBox),T=l(O,L,S,this.toBBox),C=g(A,T),N=h(A)+h(T);C<E?(E=C,M=L,P=N<P?N:P):C===E&&N<P&&(P=N,M=L)}return M||S-w},o.prototype._chooseSplitAxis=function(O,w,S){var M=O.leaf?this.compareMinX:f,E=O.leaf?this.compareMinY:d,P=this._allDistMargin(O,w,S,M),L=this._allDistMargin(O,w,S,E);P<L&&O.children.sort(M)},o.prototype._allDistMargin=function(O,w,S,M){O.children.sort(M);for(var E=this.toBBox,P=l(O,0,w,E),L=l(O,S-w,S,E),A=p(P)+p(L),T=w;T<S-w;T++){var C=O.children[T];u(P,O.leaf?E(C):C),A+=p(P)}for(var N=S-w-1;N>=w;N--){var B=O.children[N];u(L,O.leaf?E(B):B),A+=p(L)}return A},o.prototype._adjustParentBBoxes=function(O,w,S){for(var M=S;M>=0;M--)u(w[M],O)},o.prototype._condense=function(O){for(var w=O.length-1,S=void 0;w>=0;w--)O[w].children.length===0?w>0?(S=O[w-1].children,S.splice(S.indexOf(O[w]),1)):this.clear():c(O[w],this.toBBox)};function s(_,O,w){if(!w)return O.indexOf(_);for(var S=0;S<O.length;S++)if(w(_,O[S]))return S;return-1}function c(_,O){l(_,0,_.children.length,O,_)}function l(_,O,w,S,M){M||(M=b(null)),M.minX=1/0,M.minY=1/0,M.maxX=-1/0,M.maxY=-1/0;for(var E=O;E<w;E++){var P=_.children[E];u(M,_.leaf?S(P):P)}return M}function u(_,O){return _.minX=Math.min(_.minX,O.minX),_.minY=Math.min(_.minY,O.minY),_.maxX=Math.max(_.maxX,O.maxX),_.maxY=Math.max(_.maxY,O.maxY),_}function f(_,O){return _.minX-O.minX}function d(_,O){return _.minY-O.minY}function h(_){return(_.maxX-_.minX)*(_.maxY-_.minY)}function p(_){return _.maxX-_.minX+(_.maxY-_.minY)}function v(_,O){return(Math.max(O.maxX,_.maxX)-Math.min(O.minX,_.minX))*(Math.max(O.maxY,_.maxY)-Math.min(O.minY,_.minY))}function g(_,O){var w=Math.max(_.minX,O.minX),S=Math.max(_.minY,O.minY),M=Math.min(_.maxX,O.maxX),E=Math.min(_.maxY,O.maxY);return Math.max(0,M-w)*Math.max(0,E-S)}function y(_,O){return _.minX<=O.minX&&_.minY<=O.minY&&O.maxX<=_.maxX&&O.maxY<=_.maxY}function m(_,O){return O.minX<=_.maxX&&O.minY<=_.maxY&&O.maxX>=_.minX&&O.maxY>=_.minY}function b(_){return{children:_,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function x(_,O,w,S,M){for(var E=[O,w];E.length;)if(w=E.pop(),O=E.pop(),!(w-O<=S)){var P=O+Math.ceil((w-O)/S/2)*S;n(_,P,O,w,M),E.push(O,P,P,w)}}return o})})(B2);var J8=B2.exports,ot;(function(t){t.GROUP="g",t.CIRCLE="circle",t.ELLIPSE="ellipse",t.IMAGE="image",t.RECT="rect",t.LINE="line",t.POLYLINE="polyline",t.POLYGON="polygon",t.TEXT="text",t.PATH="path",t.HTML="html",t.MESH="mesh"})(ot||(ot={}));var ol;(function(t){t[t.ZERO=0]="ZERO",t[t.NEGATIVE_ONE=1]="NEGATIVE_ONE"})(ol||(ol={}));var Go=function(){function t(){this.plugins=[]}return t.prototype.addRenderingPlugin=function(e){this.plugins.push(e),this.context.renderingPlugins.push(e)},t.prototype.removeAllRenderingPlugins=function(){var e=this;this.plugins.forEach(function(n){var r=e.context.renderingPlugins.indexOf(n);r>=0&&e.context.renderingPlugins.splice(r,1)})},t}(),tB=function(){function t(e){this.clipSpaceNearZ=ol.NEGATIVE_ONE,this.plugins=[],this.config=nt({enableDirtyCheck:!0,enableCulling:!1,enableAutoRendering:!0,enableDirtyRectangleRendering:!0,enableDirtyRectangleRenderingDebug:!1,enableSizeAttenuation:!0},e)}return t.prototype.registerPlugin=function(e){var n=this.plugins.findIndex(function(r){return r===e});n===-1&&this.plugins.push(e)},t.prototype.unregisterPlugin=function(e){var n=this.plugins.findIndex(function(r){return r===e});n>-1&&this.plugins.splice(n,1)},t.prototype.getPlugins=function(){return this.plugins},t.prototype.getPlugin=function(e){return this.plugins.find(function(n){return n.name===e})},t.prototype.getConfig=function(){return this.config},t.prototype.setConfig=function(e){Object.assign(this.config,e)},t}();function sl(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function Ag(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function xh(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function F2(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function eB(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t}function nB(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t}function cl(t){return t===void 0?0:t>360||t<-360?t%360:t}function si(t,e,n){return e===void 0&&(e=0),n===void 0&&(n=0),Array.isArray(t)&&t.length===3?oo(t):er(t)?Ge(t,e,n):Ge(t[0],t[1]||e,t[2]||n)}function Gn(t){return t*(Math.PI/180)}function Xi(t){return t*(180/Math.PI)}function Yvt(t){return t=t%400,t<0&&(t+=400),t/400*360}function Hvt(t){return t/360}function rB(t){return 360*t}function iB(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=n*n,s=r*r,c=i*i,l=a*a,u=o+s+c+l,f=n*a-r*i;return f>.499995*u?(t[0]=Math.PI/2,t[1]=2*Math.atan2(r,n),t[2]=0):f<-.499995*u?(t[0]=-Math.PI/2,t[1]=2*Math.atan2(r,n),t[2]=0):(t[0]=Math.asin(2*(n*i-a*r)),t[1]=Math.atan2(2*(n*a+r*i),1-2*(c+l)),t[2]=Math.atan2(2*(n*r+i*a),1-2*(s+c))),t}function aB(t,e){var n,r,i=Math.PI*.5,a=R(tl(Te(),e),3),o=a[0],s=a[1],c=a[2],l=Math.asin(-e[2]/o);return l<i?l>-i?(n=Math.atan2(e[6]/s,e[10]/c),r=Math.atan2(e[1]/o,e[0]/o)):(r=0,n=-Math.atan2(e[4]/s,e[5]/s)):(r=0,n=Math.atan2(e[4]/s,e[5]/s)),t[0]=n,t[1]=l,t[2]=r,t}function Tg(t,e){return e.length===16?aB(t,e):iB(t,e)}function oB(t,e,n,r,i){var a=Math.cos(t),o=Math.sin(t);return h6(r*a,i*o,0,-r*o,i*a,0,e,n,1)}function sB(t,e,n,r,i,a,o,s){s===void 0&&(s=!1);var c=2*a/(n-e),l=2*a/(r-i),u=(n+e)/(n-e),f=(r+i)/(r-i),d,h;return s?(d=-o/(o-a),h=-o*a/(o-a)):(d=-(o+a)/(o-a),h=-2*o*a/(o-a)),t[0]=c,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=l,t[6]=0,t[7]=0,t[8]=u,t[9]=f,t[10]=d,t[11]=-1,t[12]=0,t[13]=0,t[14]=h,t[15]=0,t}function z2(t){var e=t[0],n=t[1],r=t[3],i=t[4],a=Math.sqrt(e*e+n*n),o=Math.sqrt(r*r+i*i),s=e*i-n*r;s<0&&(e<i?a=-a:o=-o),a&&(e*=1/a,n*=1/a),o&&(r*=1/o,i*=1/o);var c=Math.atan2(n,e),l=Xi(c);return[t[6],t[7],a,o,l]}var La=On(),ma=On(),Vu=el(),fe=[Te(),Te(),Te()],G2=Te();function cB(t,e,n,r,i,a){if(!lB(La,t)||(Ws(ma,La),ma[3]=0,ma[7]=0,ma[11]=0,ma[15]=1,Math.abs(F_(ma))<1e-8))return!1;var o=La[3],s=La[7],c=La[11],l=La[12],u=La[13],f=La[14],d=La[15];if(o!==0||s!==0||c!==0){Vu[0]=o,Vu[1]=s,Vu[2]=c,Vu[3]=d;var h=Aa(ma,ma);if(!h)return!1;B_(ma,ma),Fu(i,Vu,ma)}else i[0]=i[1]=i[2]=0,i[3]=1;if(e[0]=l,e[1]=u,e[2]=f,uB(fe,La),n[0]=so(fe[0]),Gs(fe[0],fe[0]),r[0]=ya(fe[0],fe[1]),Cg(fe[1],fe[1],fe[0],1,-r[0]),n[1]=so(fe[1]),Gs(fe[1],fe[1]),r[0]/=n[1],r[1]=ya(fe[0],fe[2]),Cg(fe[2],fe[2],fe[0],1,-r[1]),r[2]=ya(fe[1],fe[2]),Cg(fe[2],fe[2],fe[1],1,-r[2]),n[2]=so(fe[2]),Gs(fe[2],fe[2]),r[1]/=n[2],r[2]/=n[2],rh(G2,fe[1],fe[2]),ya(fe[0],G2)<0)for(var p=0;p<3;p++)n[p]*=-1,fe[p][0]*=-1,fe[p][1]*=-1,fe[p][2]*=-1;return a[0]=.5*Math.sqrt(Math.max(1+fe[0][0]-fe[1][1]-fe[2][2],0)),a[1]=.5*Math.sqrt(Math.max(1-fe[0][0]+fe[1][1]-fe[2][2],0)),a[2]=.5*Math.sqrt(Math.max(1-fe[0][0]-fe[1][1]+fe[2][2],0)),a[3]=.5*Math.sqrt(Math.max(1+fe[0][0]+fe[1][1]+fe[2][2],0)),fe[2][1]>fe[1][2]&&(a[0]=-a[0]),fe[0][2]>fe[2][0]&&(a[1]=-a[1]),fe[1][0]>fe[0][1]&&(a[2]=-a[2]),!0}function lB(t,e){var n=e[15];if(n===0)return!1;for(var r=1/n,i=0;i<16;i++)t[i]=e[i]*r;return!0}function uB(t,e){t[0][0]=e[0],t[0][1]=e[1],t[0][2]=e[2],t[1][0]=e[4],t[1][1]=e[5],t[1][2]=e[6],t[2][0]=e[8],t[2][1]=e[9],t[2][2]=e[10]}function Cg(t,e,n,r,i){t[0]=e[0]*r+n[0]*i,t[1]=e[1]*r+n[1]*i,t[2]=e[2]*r+n[2]*i}var ur=function(){function t(){this.center=[0,0,0],this.halfExtents=[0,0,0],this.min=[0,0,0],this.max=[0,0,0]}return t.isEmpty=function(e){return!e||e.halfExtents[0]===0&&e.halfExtents[1]===0&&e.halfExtents[2]===0},t.prototype.update=function(e,n){sl(this.center,e),sl(this.halfExtents,n),Ag(this.min,this.center,this.halfExtents),xh(this.max,this.center,this.halfExtents)},t.prototype.setMinMax=function(e,n){xh(this.center,n,e),F2(this.center,this.center,.5),Ag(this.halfExtents,n,e),F2(this.halfExtents,this.halfExtents,.5),sl(this.min,e),sl(this.max,n)},t.prototype.getMin=function(){return this.min},t.prototype.getMax=function(){return this.max},t.prototype.add=function(e){if(!t.isEmpty(e)){if(t.isEmpty(this)){this.setMinMax(e.getMin(),e.getMax());return}var n=this.center,r=n[0],i=n[1],a=n[2],o=this.halfExtents,s=o[0],c=o[1],l=o[2],u=r-s,f=r+s,d=i-c,h=i+c,p=a-l,v=a+l,g=e.center,y=g[0],m=g[1],b=g[2],x=e.halfExtents,_=x[0],O=x[1],w=x[2],S=y-_,M=y+_,E=m-O,P=m+O,L=b-w,A=b+w;S<u&&(u=S),M>f&&(f=M),E<d&&(d=E),P>h&&(h=P),L<p&&(p=L),A>v&&(v=A),n[0]=(u+f)*.5,n[1]=(d+h)*.5,n[2]=(p+v)*.5,o[0]=(f-u)*.5,o[1]=(h-d)*.5,o[2]=(v-p)*.5,this.min[0]=u,this.min[1]=d,this.min[2]=p,this.max[0]=f,this.max[1]=h,this.max[2]=v}},t.prototype.setFromTransformedAABB=function(e,n){var r=this.center,i=this.halfExtents,a=e.center,o=e.halfExtents,s=n[0],c=n[4],l=n[8],u=n[1],f=n[5],d=n[9],h=n[2],p=n[6],v=n[10],g=Math.abs(s),y=Math.abs(c),m=Math.abs(l),b=Math.abs(u),x=Math.abs(f),_=Math.abs(d),O=Math.abs(h),w=Math.abs(p),S=Math.abs(v);r[0]=n[12]+s*a[0]+c*a[1]+l*a[2],r[1]=n[13]+u*a[0]+f*a[1]+d*a[2],r[2]=n[14]+h*a[0]+p*a[1]+v*a[2],i[0]=g*o[0]+y*o[1]+m*o[2],i[1]=b*o[0]+x*o[1]+_*o[2],i[2]=O*o[0]+w*o[1]+S*o[2],Ag(this.min,r,i),xh(this.max,r,i)},t.prototype.intersects=function(e){var n=this.getMax(),r=this.getMin(),i=e.getMax(),a=e.getMin();return r[0]<=i[0]&&n[0]>=a[0]&&r[1]<=i[1]&&n[1]>=a[1]&&r[2]<=i[2]&&n[2]>=a[2]},t.prototype.intersection=function(e){if(!this.intersects(e))return null;var n=new t,r=eB([0,0,0],this.getMin(),e.getMin()),i=nB([0,0,0],this.getMax(),e.getMax());return n.setMinMax(r,i),n},t.prototype.getNegativeFarPoint=function(e){return e.pnVertexFlag===273?sl([0,0,0],this.min):e.pnVertexFlag===272?[this.min[0],this.min[1],this.max[2]]:e.pnVertexFlag===257?[this.min[0],this.max[1],this.min[2]]:e.pnVertexFlag===256?[this.min[0],this.max[1],this.max[2]]:e.pnVertexFlag===17?[this.max[0],this.min[1],this.min[2]]:e.pnVertexFlag===16?[this.max[0],this.min[1],this.max[2]]:e.pnVertexFlag===1?[this.max[0],this.max[1],this.min[2]]:[this.max[0],this.max[1],this.max[2]]},t.prototype.getPositiveFarPoint=function(e){return e.pnVertexFlag===273?sl([0,0,0],this.max):e.pnVertexFlag===272?[this.max[0],this.max[1],this.min[2]]:e.pnVertexFlag===257?[this.max[0],this.min[1],this.max[2]]:e.pnVertexFlag===256?[this.max[0],this.min[1],this.min[2]]:e.pnVertexFlag===17?[this.min[0],this.max[1],this.max[2]]:e.pnVertexFlag===16?[this.min[0],this.max[1],this.min[2]]:e.pnVertexFlag===1?[this.min[0],this.min[1],this.max[2]]:[this.min[0],this.min[1],this.min[2]]},t}(),fB=function(){function t(e,n){this.distance=e||0,this.normal=n||Ge(0,1,0),this.updatePNVertexFlag()}return t.prototype.updatePNVertexFlag=function(){this.pnVertexFlag=(+(this.normal[0]>=0)<<8)+(+(this.normal[1]>=0)<<4)+ +(this.normal[2]>=0)},t.prototype.distanceToPoint=function(e){return ya(e,this.normal)-this.distance},t.prototype.normalize=function(){var e=1/R_(this.normal);hg(this.normal,this.normal,e),this.distance*=e},t.prototype.intersectsLine=function(e,n,r){var i=this.distanceToPoint(e),a=this.distanceToPoint(n),o=i/(i-a),s=o>=0&&o<=1;return s&&r&&pg(r,e,n,o),s},t}(),Wo;(function(t){t[t.OUTSIDE=4294967295]="OUTSIDE",t[t.INSIDE=0]="INSIDE",t[t.INDETERMINATE=2147483647]="INDETERMINATE"})(Wo||(Wo={}));var dB=function(){function t(e){if(this.planes=[],e)this.planes=e;else for(var n=0;n<6;n++)this.planes.push(new fB)}return t.prototype.extractFromVPMatrix=function(e){var n=R(e,16),r=n[0],i=n[1],a=n[2],o=n[3],s=n[4],c=n[5],l=n[6],u=n[7],f=n[8],d=n[9],h=n[10],p=n[11],v=n[12],g=n[13],y=n[14],m=n[15];ga(this.planes[0].normal,o-r,u-s,p-f),this.planes[0].distance=m-v,ga(this.planes[1].normal,o+r,u+s,p+f),this.planes[1].distance=m+v,ga(this.planes[2].normal,o+i,u+c,p+d),this.planes[2].distance=m+g,ga(this.planes[3].normal,o-i,u-c,p-d),this.planes[3].distance=m-g,ga(this.planes[4].normal,o-a,u-l,p-h),this.planes[4].distance=m-y,ga(this.planes[5].normal,o+a,u+l,p+h),this.planes[5].distance=m+y,this.planes.forEach(function(b){b.normalize(),b.updatePNVertexFlag()})},t}(),kr=function(){function t(e,n){e===void 0&&(e=0),n===void 0&&(n=0),this.x=0,this.y=0,this.x=e,this.y=n}return t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.copyFrom=function(e){this.x=e.x,this.y=e.y},t}(),Vs=function(){function t(e,n,r,i){this.x=e,this.y=n,this.width=r,this.height=i,this.left=e,this.right=e+r,this.top=n,this.bottom=n+i}return t.prototype.toJSON=function(){},t}(),hn="Method not implemented.",ll="Use document.documentElement instead.",hB="Cannot append a destroyed element.",an;(function(t){t[t.ORBITING=0]="ORBITING",t[t.EXPLORING=1]="EXPLORING",t[t.TRACKING=2]="TRACKING"})(an||(an={}));var Uu;(function(t){t[t.DEFAULT=0]="DEFAULT",t[t.ROTATIONAL=1]="ROTATIONAL",t[t.TRANSLATIONAL=2]="TRANSLATIONAL",t[t.CINEMATIC=3]="CINEMATIC"})(Uu||(Uu={}));var xi;(function(t){t[t.ORTHOGRAPHIC=0]="ORTHOGRAPHIC",t[t.PERSPECTIVE=1]="PERSPECTIVE"})(xi||(xi={}));var W2={UPDATED:"updated"},Y2=2e-4,H2=function(){function t(){this.clipSpaceNearZ=ol.NEGATIVE_ONE,this.eventEmitter=new dg,this.matrix=On(),this.right=Ge(1,0,0),this.up=Ge(0,1,0),this.forward=Ge(0,0,1),this.position=Ge(0,0,1),this.focalPoint=Ge(0,0,0),this.distanceVector=Ge(0,0,-1),this.distance=1,this.azimuth=0,this.elevation=0,this.roll=0,this.relAzimuth=0,this.relElevation=0,this.relRoll=0,this.dollyingStep=0,this.maxDistance=1/0,this.minDistance=-1/0,this.zoom=1,this.rotateWorld=!1,this.fov=30,this.near=.1,this.far=1e3,this.aspect=1,this.projectionMatrix=On(),this.projectionMatrixInverse=On(),this.jitteredProjectionMatrix=void 0,this.enableUpdate=!0,this.type=an.EXPLORING,this.trackingMode=Uu.DEFAULT,this.projectionMode=xi.PERSPECTIVE,this.frustum=new dB,this.orthoMatrix=On()}return t.prototype.isOrtho=function(){return this.projectionMode===xi.ORTHOGRAPHIC},t.prototype.getProjectionMode=function(){return this.projectionMode},t.prototype.getPerspective=function(){return this.jitteredProjectionMatrix||this.projectionMatrix},t.prototype.getPerspectiveInverse=function(){return this.projectionMatrixInverse},t.prototype.getFrustum=function(){return this.frustum},t.prototype.getPosition=function(){return this.position},t.prototype.getFocalPoint=function(){return this.focalPoint},t.prototype.getDollyingStep=function(){return this.dollyingStep},t.prototype.getNear=function(){return this.near},t.prototype.getFar=function(){return this.far},t.prototype.getZoom=function(){return this.zoom},t.prototype.getOrthoMatrix=function(){return this.orthoMatrix},t.prototype.getView=function(){return this.view},t.prototype.setEnableUpdate=function(e){this.enableUpdate=e},t.prototype.setType=function(e,n){return this.type=e,this.type===an.EXPLORING?this.setWorldRotation(!0):this.setWorldRotation(!1),this._getAngles(),this.type===an.TRACKING&&n!==void 0&&this.setTrackingMode(n),this},t.prototype.setProjectionMode=function(e){return this.projectionMode=e,this},t.prototype.setTrackingMode=function(e){if(this.type!==an.TRACKING)throw new Error("Impossible to set a tracking mode if the camera is not of tracking type");return this.trackingMode=e,this},t.prototype.setWorldRotation=function(e){return this.rotateWorld=e,this._getAngles(),this},t.prototype.getViewTransform=function(){return Aa(On(),this.matrix)},t.prototype.getWorldTransform=function(){return this.matrix},t.prototype.jitterProjectionMatrix=function(e,n){var r=W_(On(),[e,n,0]);this.jitteredProjectionMatrix=Ur(On(),r,this.projectionMatrix)},t.prototype.clearJitterProjectionMatrix=function(){this.jitteredProjectionMatrix=void 0},t.prototype.setMatrix=function(e){return this.matrix=e,this._update(),this},t.prototype.setFov=function(e){return this.setPerspective(this.near,this.far,e,this.aspect),this},t.prototype.setAspect=function(e){return this.setPerspective(this.near,this.far,this.fov,e),this},t.prototype.setNear=function(e){return this.projectionMode===xi.PERSPECTIVE?this.setPerspective(e,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,e,this.far),this},t.prototype.setFar=function(e){return this.projectionMode===xi.PERSPECTIVE?this.setPerspective(this.near,e,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,e),this},t.prototype.setViewOffset=function(e,n,r,i,a,o){return this.aspect=e/n,this.view===void 0&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=n,this.view.offsetX=r,this.view.offsetY=i,this.view.width=a,this.view.height=o,this.projectionMode===xi.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this},t.prototype.clearViewOffset=function(){return this.view!==void 0&&(this.view.enabled=!1),this.projectionMode===xi.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this},t.prototype.setZoom=function(e){return this.zoom=e,this.projectionMode===xi.ORTHOGRAPHIC?this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far):this.projectionMode===xi.PERSPECTIVE&&this.setPerspective(this.near,this.far,this.fov,this.aspect),this},t.prototype.setZoomByViewportPoint=function(e,n){var r=this.canvas.viewport2Canvas({x:n[0],y:n[1]}),i=r.x,a=r.y,o=this.roll;this.rotate(0,0,-o),this.setPosition(i,a),this.setFocalPoint(i,a),this.setZoom(e),this.rotate(0,0,o);var s=this.canvas.viewport2Canvas({x:n[0],y:n[1]}),c=s.x,l=s.y,u=Ge(c-i,l-a,0),f=ya(u,this.right)/so(this.right),d=ya(u,this.up)/so(this.up);return this.pan(-f,-d),this},t.prototype.setPerspective=function(e,n,r,i){var a;this.projectionMode=xi.PERSPECTIVE,this.fov=r,this.near=e,this.far=n,this.aspect=i;var o=this.near*Math.tan(Gn(.5*this.fov))/this.zoom,s=2*o,c=this.aspect*s,l=-.5*c;if(!((a=this.view)===null||a===void 0)&&a.enabled){var u=this.view.fullWidth,f=this.view.fullHeight;l+=this.view.offsetX*c/u,o-=this.view.offsetY*s/f,c*=this.view.width/u,s*=this.view.height/f}return sB(this.projectionMatrix,l,l+c,o,o-s,e,this.far,this.clipSpaceNearZ===ol.ZERO),ih(this.projectionMatrix,this.projectionMatrix,Ge(1,-1,1)),Aa(this.projectionMatrixInverse,this.projectionMatrix),this.triggerUpdate(),this},t.prototype.setOrthographic=function(e,n,r,i,a,o){var s;this.projectionMode=xi.ORTHOGRAPHIC,this.rright=n,this.left=e,this.top=r,this.bottom=i,this.near=a,this.far=o;var c=(this.rright-this.left)/(2*this.zoom),l=(this.top-this.bottom)/(2*this.zoom),u=(this.rright+this.left)/2,f=(this.top+this.bottom)/2,d=u-c,h=u+c,p=f+l,v=f-l;if(!((s=this.view)===null||s===void 0)&&s.enabled){var g=(this.rright-this.left)/this.view.fullWidth/this.zoom,y=(this.top-this.bottom)/this.view.fullHeight/this.zoom;d+=g*this.view.offsetX,h=d+g*this.view.width,p-=y*this.view.offsetY,v=p-y*this.view.height}return this.clipSpaceNearZ===ol.NEGATIVE_ONE?U_(this.projectionMatrix,d,h,v,p,a,o):X_(this.projectionMatrix,d,h,v,p,a,o),ih(this.projectionMatrix,this.projectionMatrix,Ge(1,-1,1)),Aa(this.projectionMatrixInverse,this.projectionMatrix),this._getOrthoMatrix(),this.triggerUpdate(),this},t.prototype.setPosition=function(e,n,r){n===void 0&&(n=this.position[1]),r===void 0&&(r=this.position[2]);var i=si(e,n,r);return this._setPosition(i),this.setFocalPoint(this.focalPoint),this.triggerUpdate(),this},t.prototype.setFocalPoint=function(e,n,r){n===void 0&&(n=this.focalPoint[1]),r===void 0&&(r=this.focalPoint[2]);var i=Ge(0,1,0);if(this.focalPoint=si(e,n,r),this.trackingMode===Uu.CINEMATIC){var a=I_(Te(),this.focalPoint,this.position);e=a[0],n=a[1],r=a[2];var o=so(a),s=Xi(Math.asin(n/o)),c=90+Xi(Math.atan2(r,e)),l=On();G_(l,l,Gn(c)),z_(l,l,Gn(s)),i=Sr(Te(),[0,1,0],l)}return Aa(this.matrix,q_(On(),this.position,this.focalPoint,i)),this._getAxes(),this._getDistance(),this._getAngles(),this.triggerUpdate(),this},t.prototype.getDistance=function(){return this.distance},t.prototype.getDistanceVector=function(){return this.distanceVector},t.prototype.setDistance=function(e){if(this.distance===e||e<0)return this;this.distance=e,this.distance<Y2&&(this.distance=Y2),this.dollyingStep=this.distance/100;var n=Te();e=this.distance;var r=this.forward,i=this.focalPoint;return n[0]=e*r[0]+i[0],n[1]=e*r[1]+i[1],n[2]=e*r[2]+i[2],this._setPosition(n),this.triggerUpdate(),this},t.prototype.setMaxDistance=function(e){return this.maxDistance=e,this},t.prototype.setMinDistance=function(e){return this.minDistance=e,this},t.prototype.setAzimuth=function(e){return this.azimuth=cl(e),this.computeMatrix(),this._getAxes(),this.type===an.ORBITING||this.type===an.EXPLORING?this._getPosition():this.type===an.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},t.prototype.getAzimuth=function(){return this.azimuth},t.prototype.setElevation=function(e){return this.elevation=cl(e),this.computeMatrix(),this._getAxes(),this.type===an.ORBITING||this.type===an.EXPLORING?this._getPosition():this.type===an.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},t.prototype.getElevation=function(){return this.elevation},t.prototype.setRoll=function(e){return this.roll=cl(e),this.computeMatrix(),this._getAxes(),this.type===an.ORBITING||this.type===an.EXPLORING?this._getPosition():this.type===an.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},t.prototype.getRoll=function(){return this.roll},t.prototype._update=function(){this._getAxes(),this._getPosition(),this._getDistance(),this._getAngles(),this._getOrthoMatrix(),this.triggerUpdate()},t.prototype.computeMatrix=function(){var e=Bo(lr(),[0,0,1],Gn(this.roll));Du(this.matrix);var n=Bo(lr(),[1,0,0],Gn((this.rotateWorld&&this.type!==an.TRACKING||this.type===an.TRACKING?1:-1)*this.elevation)),r=Bo(lr(),[0,1,0],Gn((this.rotateWorld&&this.type!==an.TRACKING||this.type===an.TRACKING?1:-1)*this.azimuth)),i=Fo(lr(),r,n);i=Fo(lr(),i,e);var a=gg(On(),i);this.type===an.ORBITING||this.type===an.EXPLORING?(Do(this.matrix,this.matrix,this.focalPoint),Ur(this.matrix,this.matrix,a),Do(this.matrix,this.matrix,[0,0,this.distance])):this.type===an.TRACKING&&(Do(this.matrix,this.matrix,this.position),Ur(this.matrix,this.matrix,a))},t.prototype._setPosition=function(e,n,r){this.position=si(e,n,r);var i=this.matrix;i[12]=this.position[0],i[13]=this.position[1],i[14]=this.position[2],i[15]=1,this._getOrthoMatrix()},t.prototype._getAxes=function(){mi(this.right,si(Fu(el(),[1,0,0,0],this.matrix))),mi(this.up,si(Fu(el(),[0,1,0,0],this.matrix))),mi(this.forward,si(Fu(el(),[0,0,1,0],this.matrix))),Gs(this.right,this.right),Gs(this.up,this.up),Gs(this.forward,this.forward)},t.prototype._getAngles=function(){var e=this.distanceVector[0],n=this.distanceVector[1],r=this.distanceVector[2],i=so(this.distanceVector);if(i===0){this.elevation=0,this.azimuth=0;return}this.type===an.TRACKING?(this.elevation=Xi(Math.asin(n/i)),this.azimuth=Xi(Math.atan2(-e,-r))):this.rotateWorld?(this.elevation=Xi(Math.asin(n/i)),this.azimuth=Xi(Math.atan2(-e,-r))):(this.elevation=-Xi(Math.asin(n/i)),this.azimuth=-Xi(Math.atan2(-e,-r)))},t.prototype._getPosition=function(){mi(this.position,si(Fu(el(),[0,0,0,1],this.matrix))),this._getDistance()},t.prototype._getFocalPoint=function(){zD(this.distanceVector,[0,0,-this.distance],d6(K_(),this.matrix)),Jc(this.focalPoint,this.position,this.distanceVector),this._getDistance()},t.prototype._getDistance=function(){this.distanceVector=I_(Te(),this.focalPoint,this.position),this.distance=so(this.distanceVector),this.dollyingStep=this.distance/100},t.prototype._getOrthoMatrix=function(){if(this.projectionMode===xi.ORTHOGRAPHIC){var e=this.position,n=Bo(lr(),[0,0,1],-this.roll*Math.PI/180);Bu(this.orthoMatrix,n,Ge((this.rright-this.left)/2-e[0],(this.top-this.bottom)/2-e[1],0),Ge(this.zoom,this.zoom,1),e)}},t.prototype.triggerUpdate=function(){if(this.enableUpdate){var e=this.getViewTransform(),n=Ur(On(),this.getPerspective(),e);this.getFrustum().extractFromVPMatrix(n),this.eventEmitter.emit(W2.UPDATED)}},t.prototype.rotate=function(e,n,r){throw new Error(hn)},t.prototype.pan=function(e,n){throw new Error(hn)},t.prototype.dolly=function(e){throw new Error(hn)},t.prototype.createLandmark=function(e,n){throw new Error(hn)},t.prototype.gotoLandmark=function(e,n){throw new Error(hn)},t.prototype.cancelLandmarkAnimation=function(){throw new Error(hn)},t}();function zr(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError("Expected a function");var n=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var a=e?e.apply(this,r):r[0],o=n.cache;if(o.has(a))return o.get(a);var s=t.apply(this,r);return n.cache=o.set(a,s)||o,s};return n.cache=new(zr.Cache||Map),n}zr.Cache=Map;var Ct;(function(t){t[t.kUnknown=0]="kUnknown",t[t.kNumber=1]="kNumber",t[t.kPercentage=2]="kPercentage",t[t.kEms=3]="kEms",t[t.kPixels=4]="kPixels",t[t.kRems=5]="kRems",t[t.kDegrees=6]="kDegrees",t[t.kRadians=7]="kRadians",t[t.kGradians=8]="kGradians",t[t.kTurns=9]="kTurns",t[t.kMilliseconds=10]="kMilliseconds",t[t.kSeconds=11]="kSeconds",t[t.kInteger=12]="kInteger"})(Ct||(Ct={}));var Ii;(function(t){t[t.kUNumber=0]="kUNumber",t[t.kUPercent=1]="kUPercent",t[t.kULength=2]="kULength",t[t.kUAngle=3]="kUAngle",t[t.kUTime=4]="kUTime",t[t.kUOther=5]="kUOther"})(Ii||(Ii={}));var $2;(function(t){t[t.kAll=0]="kAll",t[t.kNonNegative=1]="kNonNegative",t[t.kInteger=2]="kInteger",t[t.kNonNegativeInteger=3]="kNonNegativeInteger",t[t.kPositiveInteger=4]="kPositiveInteger"})($2||($2={}));var kg;(function(t){t[t.kYes=0]="kYes",t[t.kNo=1]="kNo"})(kg||(kg={}));var Lg;(function(t){t[t.kYes=0]="kYes",t[t.kNo=1]="kNo"})(Lg||(Lg={}));var pB=[{name:"em",unit_type:Ct.kEms},{name:"px",unit_type:Ct.kPixels},{name:"deg",unit_type:Ct.kDegrees},{name:"rad",unit_type:Ct.kRadians},{name:"grad",unit_type:Ct.kGradians},{name:"ms",unit_type:Ct.kMilliseconds},{name:"s",unit_type:Ct.kSeconds},{name:"rem",unit_type:Ct.kRems},{name:"turn",unit_type:Ct.kTurns}],Yo;(function(t){t[t.kUnknownType=0]="kUnknownType",t[t.kUnparsedType=1]="kUnparsedType",t[t.kKeywordType=2]="kKeywordType",t[t.kUnitType=3]="kUnitType",t[t.kSumType=4]="kSumType",t[t.kProductType=5]="kProductType",t[t.kNegateType=6]="kNegateType",t[t.kInvertType=7]="kInvertType",t[t.kMinType=8]="kMinType",t[t.kMaxType=9]="kMaxType",t[t.kClampType=10]="kClampType",t[t.kTransformType=11]="kTransformType",t[t.kPositionType=12]="kPositionType",t[t.kURLImageType=13]="kURLImageType",t[t.kColorType=14]="kColorType",t[t.kUnsupportedColorType=15]="kUnsupportedColorType"})(Yo||(Yo={}));var vB=function(t){return pB.find(function(e){return e.name===t}).unit_type},gB=function(t){return t?t==="number"?Ct.kNumber:t==="percent"||t==="%"?Ct.kPercentage:vB(t):Ct.kUnknown},yB=function(t){switch(t){case Ct.kNumber:case Ct.kInteger:return Ii.kUNumber;case Ct.kPercentage:return Ii.kUPercent;case Ct.kPixels:return Ii.kULength;case Ct.kMilliseconds:case Ct.kSeconds:return Ii.kUTime;case Ct.kDegrees:case Ct.kRadians:case Ct.kGradians:case Ct.kTurns:return Ii.kUAngle;default:return Ii.kUOther}},mB=function(t){switch(t){case Ii.kUNumber:return Ct.kNumber;case Ii.kULength:return Ct.kPixels;case Ii.kUPercent:return Ct.kPercentage;case Ii.kUTime:return Ct.kSeconds;case Ii.kUAngle:return Ct.kDegrees;default:return Ct.kUnknown}},V2=function(t){var e=1;switch(t){case Ct.kPixels:case Ct.kDegrees:case Ct.kSeconds:break;case Ct.kMilliseconds:e=.001;break;case Ct.kRadians:e=180/Math.PI;break;case Ct.kGradians:e=.9;break;case Ct.kTurns:e=360;break}return e},Ng=function(t){switch(t){case Ct.kNumber:case Ct.kInteger:return"";case Ct.kPercentage:return"%";case Ct.kEms:return"em";case Ct.kRems:return"rem";case Ct.kPixels:return"px";case Ct.kDegrees:return"deg";case Ct.kRadians:return"rad";case Ct.kGradians:return"grad";case Ct.kMilliseconds:return"ms";case Ct.kSeconds:return"s";case Ct.kTurns:return"turn"}return""},_h=function(){function t(){}return t.isAngle=function(e){return e===Ct.kDegrees||e===Ct.kRadians||e===Ct.kGradians||e===Ct.kTurns},t.isLength=function(e){return e>=Ct.kEms&&e<Ct.kDegrees},t.isRelativeUnit=function(e){return e===Ct.kPercentage||e===Ct.kEms||e===Ct.kRems},t.isTime=function(e){return e===Ct.kSeconds||e===Ct.kMilliseconds},t.prototype.toString=function(){return this.buildCSSText(kg.kNo,Lg.kNo,"")},t.prototype.isNumericValue=function(){return this.getType()>=Yo.kUnitType&&this.getType()<=Yo.kClampType},t}(),bB=function(t){Yt(e,t);function e(n){var r=t.call(this)||this;return r.colorSpace=n,r}return e.prototype.getType=function(){return Yo.kColorType},e.prototype.to=function(n){return this},e}(_h),Na;(function(t){t[t.Constant=0]="Constant",t[t.LinearGradient=1]="LinearGradient",t[t.RadialGradient=2]="RadialGradient"})(Na||(Na={}));var Oh=function(t){Yt(e,t);function e(n,r){var i=t.call(this)||this;return i.type=n,i.value=r,i}return e.prototype.clone=function(){return new e(this.type,this.value)},e.prototype.buildCSSText=function(n,r,i){return i},e.prototype.getType=function(){return Yo.kColorType},e}(_h),_i=function(t){Yt(e,t);function e(n){var r=t.call(this)||this;return r.value=n,r}return e.prototype.clone=function(){return new e(this.value)},e.prototype.getType=function(){return Yo.kKeywordType},e.prototype.buildCSSText=function(n,r,i){return i+this.value},e}(_h),xB=zr(function(t){return t===void 0&&(t=""),t.replace(/-([a-z])/g,function(e){return e[1].toUpperCase()})}),U2=function(t){return t.split("").map(function(e,n){return e.toUpperCase()===e?"".concat(n!==0?"-":"").concat(e.toLowerCase()):e}).join("")};function _B(t){if(!t)throw new Error}function ul(t){return typeof t=="function"}function OB(t){return typeof t=="symbol"}var $vt=function(t){return Object.fromEntries(Object.entries(t).filter(function(e){var n=__read(e,2),r=n[1];return r!==void 0}))},wB={d:{alias:"path"},strokeDasharray:{alias:"lineDash"},strokeWidth:{alias:"lineWidth"},textAnchor:{alias:"textAlign"},src:{alias:"img"}},Ig=zr(function(t){var e=xB(t),n=wB[e];return e=(n==null?void 0:n.alias)||e,e}),SB=function(t,e){e===void 0&&(e="");var n="";return Number.isFinite(t)?(_B(Number.isNaN(t)),n="NaN"):t>0?n="infinity":n="-infinity",n+=e},jg=function(t){return mB(yB(t))},pn=function(t){Yt(e,t);function e(n,r){r===void 0&&(r=Ct.kNumber);var i=t.call(this)||this,a;return typeof r=="string"?a=gB(r):a=r,i.unit=a,i.value=n,i}return e.prototype.clone=function(){return new e(this.value,this.unit)},e.prototype.equals=function(n){var r=n;return this.value===r.value&&this.unit===r.unit},e.prototype.getType=function(){return Yo.kUnitType},e.prototype.convertTo=function(n){if(this.unit===n)return new e(this.value,this.unit);var r=jg(this.unit);if(r!==jg(n)||r===Ct.kUnknown)return null;var i=V2(this.unit)/V2(n);return new e(this.value*i,n)},e.prototype.buildCSSText=function(n,r,i){var a;switch(this.unit){case Ct.kUnknown:break;case Ct.kInteger:a=Number(this.value).toFixed(0);break;case Ct.kNumber:case Ct.kPercentage:case Ct.kEms:case Ct.kRems:case Ct.kPixels:case Ct.kDegrees:case Ct.kRadians:case Ct.kGradians:case Ct.kMilliseconds:case Ct.kSeconds:case Ct.kTurns:{var o=-999999,s=999999,c=this.value,l=Ng(this.unit);if(c<o||c>s){var u=Ng(this.unit);!Number.isFinite(c)||Number.isNaN(c)?a=SB(c,u):a=c+(u||"")}else a="".concat(c).concat(l)}}return i+=a,i},e}(_h),Mr=new pn(0,"px");new pn(1,"px");var ba=new pn(0,"deg"),Rg=function(t){Yt(e,t);function e(n,r,i,a,o){a===void 0&&(a=1),o===void 0&&(o=!1);var s=t.call(this,"rgb")||this;return s.r=n,s.g=r,s.b=i,s.alpha=a,s.isNone=o,s}return e.prototype.clone=function(){return new e(this.r,this.g,this.b,this.alpha)},e.prototype.buildCSSText=function(n,r,i){return i+"rgba(".concat(this.r,",").concat(this.g,",").concat(this.b,",").concat(this.alpha,")")},e}(bB),wn=new _i("unset"),MB=new _i("initial"),EB=new _i("inherit"),Dg={"":wn,unset:wn,initial:MB,inherit:EB},Bg=function(t){return Dg[t]||(Dg[t]=new _i(t)),Dg[t]},Fg=new Rg(0,0,0,0,!0),X2=new Rg(0,0,0,0),PB=zr(function(t,e,n,r){return new Rg(t,e,n,r)},function(t,e,n,r){return"rgba(".concat(t,",").concat(e,",").concat(n,",").concat(r,")")}),mn=function(t,e){return e===void 0&&(e=Ct.kNumber),new pn(t,e)},wh=new pn(50,"%"),zg;(function(t){t[t.Standard=0]="Standard"})(zg||(zg={}));var fl;(function(t){t[t.ADDED=0]="ADDED",t[t.REMOVED=1]="REMOVED",t[t.Z_INDEX_CHANGED=2]="Z_INDEX_CHANGED"})(fl||(fl={}));var q2={absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new Vs(0,0,0,0)},kt;(function(t){t.COORDINATE="<coordinate>",t.COLOR="<color>",t.PAINT="<paint>",t.NUMBER="<number>",t.ANGLE="<angle>",t.OPACITY_VALUE="<opacity-value>",t.SHADOW_BLUR="<shadow-blur>",t.LENGTH="<length>",t.PERCENTAGE="<percentage>",t.LENGTH_PERCENTAGE="<length> | <percentage>",t.LENGTH_PERCENTAGE_12="[<length> | <percentage>]{1,2}",t.LENGTH_PERCENTAGE_14="[<length> | <percentage>]{1,4}",t.LIST_OF_POINTS="<list-of-points>",t.PATH="<path>",t.FILTER="<filter>",t.Z_INDEX="<z-index>",t.OFFSET_DISTANCE="<offset-distance>",t.DEFINED_PATH="<defined-path>",t.MARKER="<marker>",t.TRANSFORM="<transform>",t.TRANSFORM_ORIGIN="<transform-origin>",t.TEXT="<text>",t.TEXT_TRANSFORM="<text-transform>"})(kt||(kt={}));function AB(t){var e=t.type,n=t.value;return e==="hex"?"#".concat(n):e==="literal"?n:e==="rgb"?"rgb(".concat(n.join(","),")"):"rgba(".concat(n.join(","),")")}var TB=function(){var t={linearGradient:/^(linear\-gradient)/i,repeatingLinearGradient:/^(repeating\-linear\-gradient)/i,radialGradient:/^(radial\-gradient)/i,repeatingRadialGradient:/^(repeating\-radial\-gradient)/i,conicGradient:/^(conic\-gradient)/i,sideOrCorner:/^to (left (top|bottom)|right (top|bottom)|top (left|right)|bottom (left|right)|left|right|top|bottom)/i,extentKeywords:/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,positionKeywords:/^(left|center|right|top|bottom)/i,pixelValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,percentageValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,emValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,angleValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,startCall:/^\(/,endCall:/^\)/,comma:/^,/,hexColor:/^\#([0-9a-fA-F]+)/,literalColor:/^([a-zA-Z]+)/,rgbColor:/^rgb/i,rgbaColor:/^rgba/i,number:/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/},e="";function n(B){throw new Error(e+": "+B)}function r(){var B=i();return e.length>0&&n("Invalid input not EOF"),B}function i(){return b(a)}function a(){return o("linear-gradient",t.linearGradient,c)||o("repeating-linear-gradient",t.repeatingLinearGradient,c)||o("radial-gradient",t.radialGradient,f)||o("repeating-radial-gradient",t.repeatingRadialGradient,f)||o("conic-gradient",t.conicGradient,f)}function o(B,j,D){return s(j,function(G){var Y=D();return Y&&(C(t.comma)||n("Missing comma before color stops")),{type:B,orientation:Y,colorStops:b(x)}})}function s(B,j){var D=C(B);if(D){C(t.startCall)||n("Missing (");var G=j(D);return C(t.endCall)||n("Missing )"),G}}function c(){return l()||u()}function l(){return T("directional",t.sideOrCorner,1)}function u(){return T("angular",t.angleValue,1)}function f(){var B,j=d(),D;return j&&(B=[],B.push(j),D=e,C(t.comma)&&(j=d(),j?B.push(j):e=D)),B}function d(){var B=h()||p();if(B)B.at=g();else{var j=v();if(j){B=j;var D=g();D&&(B.at=D)}else{var G=y();G&&(B={type:"default-radial",at:G})}}return B}function h(){var B=T("shape",/^(circle)/i,0);return B&&(B.style=A()||v()),B}function p(){var B=T("shape",/^(ellipse)/i,0);return B&&(B.style=P()||v()),B}function v(){return T("extent-keyword",t.extentKeywords,1)}function g(){if(T("position",/^at/,0)){var B=y();return B||n("Missing positioning value"),B}}function y(){var B=m();if(B.x||B.y)return{type:"position",value:B}}function m(){return{x:P(),y:P()}}function b(B){var j=B(),D=[];if(j)for(D.push(j);C(t.comma);)j=B(),j?D.push(j):n("One extra comma");return D}function x(){var B=_();return B||n("Expected color definition"),B.length=P(),B}function _(){return w()||M()||S()||O()}function O(){return T("literal",t.literalColor,0)}function w(){return T("hex",t.hexColor,1)}function S(){return s(t.rgbColor,function(){return{type:"rgb",value:b(E)}})}function M(){return s(t.rgbaColor,function(){return{type:"rgba",value:b(E)}})}function E(){return C(t.number)[1]}function P(){return T("%",t.percentageValue,1)||L()||A()}function L(){return T("position-keyword",t.positionKeywords,1)}function A(){return T("px",t.pixelValue,1)||T("em",t.emValue,1)}function T(B,j,D){var G=C(j);if(G)return{type:B,value:G[D]}}function C(B){var j=/^[\n\r\t\s]+/.exec(e);j&&N(j[0].length);var D=B.exec(e);return D&&N(D[0].length),D}function N(B){e=e.substring(B)}return function(B){return e=B,r()}}();function CB(t,e,n){var r=Gn(n.value),i=0,a=0,o=i+t/2,s=a+e/2,c=Math.abs(t*Math.cos(r))+Math.abs(e*Math.sin(r)),l=o-Math.cos(r)*c/2,u=s-Math.sin(r)*c/2,f=o+Math.cos(r)*c/2,d=s+Math.sin(r)*c/2;return{x1:l,y1:u,x2:f,y2:d}}function kB(t,e,n,r,i){var a=n.value,o=r.value;n.unit===Ct.kPercentage&&(a=n.value/100*t),r.unit===Ct.kPercentage&&(o=r.value/100*e);var s=Math.max(bi([0,0],[a,o]),bi([0,e],[a,o]),bi([t,e],[a,o]),bi([t,0],[a,o]));return i&&(i instanceof pn?s=i.value:i instanceof _i&&(i.value==="closest-side"?s=Math.min(a,t-a,o,e-o):i.value==="farthest-side"?s=Math.max(a,t-a,o,e-o):i.value==="closest-corner"&&(s=Math.min(bi([0,0],[a,o]),bi([0,e],[a,o]),bi([t,e],[a,o]),bi([t,0],[a,o]))))),{x:a,y:o,r:s}}var LB=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,NB=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,IB=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,Z2=/[\d.]+:(#[^\s]+|[^\)]+\))/gi;function jB(t){var e,n,r,i=t.length;t[i-1].length=(e=t[i-1].length)!==null&&e!==void 0?e:{type:"%",value:"100"},i>1&&(t[0].length=(n=t[0].length)!==null&&n!==void 0?n:{type:"%",value:"0"});for(var a=0,o=Number(t[0].length.value),s=1;s<i;s++){var c=(r=t[s].length)===null||r===void 0?void 0:r.value;if(!Ft(c)&&!Ft(o)){for(var l=1;l<s-a;l++)t[a+l].length={type:"%",value:"".concat(o+(Number(c)-o)*l/(s-a))};a=s,o=Number(c)}}}var RB={left:270-90,top:0-90,bottom:180-90,right:90-90,"left top":315-90,"top left":315-90,"left bottom":225-90,"bottom left":225-90,"right top":45-90,"top right":45-90,"right bottom":135-90,"bottom right":135-90},DB=zr(function(t){var e;return t.type==="angular"?e=Number(t.value):e=RB[t.value]||0,mn(e,"deg")}),BB=zr(function(t){var e=50,n=50,r="%",i="%";if((t==null?void 0:t.type)==="position"){var a=t.value,o=a.x,s=a.y;(o==null?void 0:o.type)==="position-keyword"&&(o.value==="left"?e=0:o.value==="center"?e=50:o.value==="right"?e=100:o.value==="top"?n=0:o.value==="bottom"&&(n=100)),(s==null?void 0:s.type)==="position-keyword"&&(s.value==="left"?e=0:s.value==="center"?n=50:s.value==="right"?e=100:s.value==="top"?n=0:s.value==="bottom"&&(n=100)),((o==null?void 0:o.type)==="px"||(o==null?void 0:o.type)==="%"||(o==null?void 0:o.type)==="em")&&(r=o==null?void 0:o.type,e=Number(o.value)),((s==null?void 0:s.type)==="px"||(s==null?void 0:s.type)==="%"||(s==null?void 0:s.type)==="em")&&(i=s==null?void 0:s.type,n=Number(s.value))}return{cx:mn(e,r),cy:mn(n,i)}}),FB=zr(function(t){var e;if(t.indexOf("linear")>-1||t.indexOf("radial")>-1){var n=TB(t);return n.map(function(s){var c=s.type,l=s.orientation,u=s.colorStops;jB(u);var f=u.map(function(b){return{offset:mn(Number(b.length.value),"%"),color:AB(b)}});if(c==="linear-gradient")return new Oh(Na.LinearGradient,{angle:l?DB(l):ba,steps:f});if(c==="radial-gradient"&&(l||(l=[{type:"shape",value:"circle"}]),l[0].type==="shape"&&l[0].value==="circle")){var d=BB(l[0].at),h=d.cx,p=d.cy,v=void 0;if(l[0].style){var g=l[0].style,y=g.type,m=g.value;y==="extent-keyword"?v=Bg(m):v=mn(m,y)}return new Oh(Na.RadialGradient,{cx:h,cy:p,size:v,steps:f})}})}var r=t[0];if(t[1]==="("||t[2]==="("){if(r==="l"){var i=LB.exec(t);if(i){var a=((e=i[2].match(Z2))===null||e===void 0?void 0:e.map(function(s){return s.split(":")}))||[];return[new Oh(Na.LinearGradient,{angle:mn(parseFloat(i[1]),"deg"),steps:a.map(function(s){var c=R(s,2),l=c[0],u=c[1];return{offset:mn(Number(l)*100,"%"),color:u}})})]}}else if(r==="r"){var o=zB(t);if(o)if(Dn(o))t=o;else return[new Oh(Na.RadialGradient,o)]}else if(r==="p")return GB(t)}});function zB(t){var e,n=NB.exec(t);if(n){var r=((e=n[4].match(Z2))===null||e===void 0?void 0:e.map(function(i){return i.split(":")}))||[];return{cx:mn(50,"%"),cy:mn(50,"%"),steps:r.map(function(i){var a=R(i,2),o=a[0],s=a[1];return{offset:mn(Number(o)*100,"%"),color:s}})}}return null}function GB(t){var e=IB.exec(t);if(e){var n=e[1],r=e[2];switch(n){case"a":n="repeat";break;case"x":n="repeat-x";break;case"y":n="repeat-y";break;case"n":n="no-repeat";break;default:n="no-repeat"}return{image:r,repetition:n}}return null}function Vvt(t){return!!t.type&&!!t.value}function Xu(t){return t&&!!t.image}function Sh(t){return t&&!Ft(t.r)&&!Ft(t.g)&&!Ft(t.b)}var co=zr(function(t){if(Xu(t))return nt({repetition:"repeat"},t);if(Ft(t)&&(t=""),t==="transparent")return X2;t==="currentColor"&&(t="black");var e=FB(t);if(e)return e;var n=gh(t),r=[0,0,0,0];return n!==null&&(r[0]=n.r||0,r[1]=n.g||0,r[2]=n.b||0,r[3]=n.opacity),PB.apply(void 0,yt([],R(r),!1))});function WB(t,e){if(!(!Sh(t)||!Sh(e)))return[[Number(t.r),Number(t.g),Number(t.b),Number(t.alpha)],[Number(e.r),Number(e.g),Number(e.b),Number(e.alpha)],function(n){var r=n.slice();if(r[3])for(var i=0;i<3;i++)r[i]=Math.round(Vn(r[i],0,255));return r[3]=Vn(r[3],0,1),"rgba(".concat(r.join(","),")")}]}function qu(t,e){if(Ft(e))return mn(0,"px");if(e="".concat(e).trim().toLowerCase(),isFinite(Number(e))){if("px".search(t)>=0)return mn(Number(e),"px");if("deg".search(t)>=0)return mn(Number(e),"deg")}var n=[];e=e.replace(t,function(i){return n.push(i),"U"+i});var r="U("+t.source+")";return n.map(function(i){return mn(Number(e.replace(new RegExp("U"+i,"g"),"").replace(new RegExp(r,"g"),"*0")),i)})[0]}var K2=function(t){return qu(new RegExp("px","g"),t)},YB=zr(K2),HB=function(t){return qu(new RegExp("%","g"),t)};zr(HB);var Zu=function(t){return er(t)||isFinite(Number(t))?mn(Number(t)||0,"px"):qu(new RegExp("px|%|em|rem","g"),t)},dl=zr(Zu),Gg=function(t){return qu(new RegExp("deg|rad|grad|turn","g"),t)},Q2=zr(Gg);function $B(t,e,n,r,i){i===void 0&&(i=0);var a="",o=t.value||0,s=e.value||0,c=jg(t.unit),l=t.convertTo(c),u=e.convertTo(c);return l&&u?(o=l.value,s=u.value,a=Ng(t.unit)):(pn.isLength(t.unit)||pn.isLength(e.unit))&&(o=Ri(t,i,n),s=Ri(e,i,n),a="px"),[o,s,function(f){return r&&(f=Math.max(f,0)),f+a}]}function ji(t){var e=0;return t.unit===Ct.kDegrees?e=t.value:t.unit===Ct.kRadians?e=Xi(Number(t.value)):t.unit===Ct.kTurns&&(e=rB(Number(t.value))),e}function Wg(t,e){var n;return Array.isArray(t)?n=t.map(function(r){return Number(r)}):Dn(t)?n=t.split(" ").map(function(r){return Number(r)}):er(t)&&(n=[t]),e===2?n.length===1?[n[0],n[0]]:[n[0],n[1]]:n.length===1?[n[0],n[0],n[0],n[0]]:n.length===2?[n[0],n[1],n[0],n[1]]:n.length===3?[n[0],n[1],n[2],n[1]]:[n[0],n[1],n[2],n[3]]}function J2(t){return Dn(t)?t.split(" ").map(function(e){return dl(e)}):t.map(function(e){return dl(e.toString())})}function Ri(t,e,n){if(t.value===0)return 0;if(t.unit===Ct.kPixels)return Number(t.value);if(t.unit===Ct.kPercentage&&n){var r=n.nodeName===ot.GROUP?n.getLocalBounds():n.geometry.contentBounds;return t.value/100*r.halfExtents[e]*2}return 0}var VB=function(t){return qu(/deg|rad|grad|turn|px|%/g,t)},UB=["blur","brightness","drop-shadow","contrast","grayscale","sepia","saturate","hue-rotate","invert"];function tO(t){if(t===void 0&&(t=""),t=t.toLowerCase().trim(),t==="none")return[];for(var e=/\s*([\w-]+)\(([^)]*)\)/g,n=[],r,i=0;r=e.exec(t);){if(r.index!==i)return[];if(i=r.index+r[0].length,UB.indexOf(r[1])>-1&&n.push({name:r[1],params:r[2].split(" ").map(function(a){return VB(a)||co(a)})}),e.lastIndex===t.length)return n}return[]}function eO(t){return t.toString()}var hl=function(t){return typeof t=="number"?mn(t):/^\s*[-+]?(\d*\.)?\d+\s*$/.test(t)?mn(Number(t)):mn(0)},Us=zr(hl);zr(function(t){return Dn(t)?t.split(" ").map(Us):t.map(Us)});function Yg(t,e){return[t,e,eO]}function Hg(t,e){return function(n,r){return[n,r,function(i){return eO(Vn(i,t,e))}]}}function nO(t,e){if(t.length===e.length)return[t,e,function(n){return n}]}function $g(t){return t.parsedStyle.path.totalLength===0&&(t.parsedStyle.path.totalLength=a8(t.parsedStyle.path.absolutePath)),t.parsedStyle.path.totalLength}function XB(t){for(var e=0;e<t.length;e++){var n=t[e-1],r=t[e],i=r[0];if(i==="M"&&n){var a=n[0],o=[r[1],r[2]],s=void 0;a==="L"||a==="M"?s=[n[1],n[2]]:(a==="C"||a==="A"||a==="Q")&&(s=[n[n.length-2],n[n.length-1]]),s&&Mh(o,s)&&(t.splice(e,1),e--)}}}function qB(t){for(var e=!1,n=t.length,r=0;r<n;r++){var i=t[r],a=i[0];if(a==="C"||a==="A"||a==="Q"){e=!0;break}}return e}function ZB(t){for(var e=[],n=[],r=[],i=0;i<t.length;i++){var a=t[i],o=a[0];o==="M"?(r.length&&(n.push(r),r=[]),r.push([a[1],a[2]])):o==="Z"?r.length&&(e.push(r),r=[]):r.push([a[1],a[2]])}return r.length>0&&n.push(r),{polygons:e,polylines:n}}function Mh(t,e){return t[0]===e[0]&&t[1]===e[1]}function KB(t,e){for(var n=[],r=[],i=[],a=0;a<t.length;a++){var o=t[a],s=o.currentPoint,c=o.params,l=o.prePoint,u=void 0;switch(o.command){case"Q":u=q8(l[0],l[1],c[1],c[2],c[3],c[4]);break;case"C":u=H8(l[0],l[1],c[1],c[2],c[3],c[4],c[5],c[6]);break;case"A":var f=o.arcParams;u=F8(f.cx,f.cy,f.rx,f.ry,f.xRotation,f.startAngle,f.endAngle);break;default:n.push(s[0]),r.push(s[1]);break}u&&(o.box=u,n.push(u.x,u.x+u.width),r.push(u.y,u.y+u.height)),e&&(o.command==="L"||o.command==="M")&&o.prePoint&&o.nextPoint&&i.push(o)}n=n.filter(function(y){return!Number.isNaN(y)&&y!==1/0&&y!==-1/0}),r=r.filter(function(y){return!Number.isNaN(y)&&y!==1/0&&y!==-1/0});var d=dh(n),h=dh(r),p=hh(n),v=hh(r);if(i.length===0)return{x:d,y:h,width:p-d,height:v-h};for(var a=0;a<i.length;a++){var o=i[a],s=o.currentPoint,g=void 0;s[0]===d?(g=Eh(o,e),d=d-g.xExtra):s[0]===p&&(g=Eh(o,e),p=p+g.xExtra),s[1]===h?(g=Eh(o,e),h=h-g.yExtra):s[1]===v&&(g=Eh(o,e),v=v+g.yExtra)}return{x:d,y:h,width:p-d,height:v-h}}function Eh(t,e){var n=t.prePoint,r=t.currentPoint,i=t.nextPoint,a=Math.pow(r[0]-n[0],2)+Math.pow(r[1]-n[1],2),o=Math.pow(r[0]-i[0],2)+Math.pow(r[1]-i[1],2),s=Math.pow(n[0]-i[0],2)+Math.pow(n[1]-i[1],2),c=Math.acos((a+o-s)/(2*Math.sqrt(a)*Math.sqrt(o)));if(!c||Math.sin(c)===0||Wu(c,0))return{xExtra:0,yExtra:0};var l=Math.abs(Math.atan2(i[1]-r[1],i[0]-r[0])),u=Math.abs(Math.atan2(i[0]-r[0],i[1]-r[1]));l=l>Math.PI/2?Math.PI-l:l,u=u>Math.PI/2?Math.PI-u:u;var f={xExtra:Math.cos(c/2-l)*(e/2*(1/Math.sin(c/2)))-e/2||0,yExtra:Math.cos(u-c/2)*(e/2*(1/Math.sin(c/2)))-e/2||0};return f}function rO(t,e){return[e[0]+(e[0]-t[0]),e[1]+(e[1]-t[1])]}var iO=function(t,e){var n=t.x*e.x+t.y*e.y,r=Math.sqrt((Math.pow(t.x,2)+Math.pow(t.y,2))*(Math.pow(e.x,2)+Math.pow(e.y,2))),i=t.x*e.y-t.y*e.x<0?-1:1,a=i*Math.acos(n/r);return a},aO=function(t,e,n,r,i,a,o,s){e=Math.abs(e),n=Math.abs(n),r=s2(r,360);var c=Gn(r);if(t.x===o.x&&t.y===o.y)return{x:t.x,y:t.y,ellipticalArcAngle:0};if(e===0||n===0)return{x:0,y:0,ellipticalArcAngle:0};var l=(t.x-o.x)/2,u=(t.y-o.y)/2,f={x:Math.cos(c)*l+Math.sin(c)*u,y:-Math.sin(c)*l+Math.cos(c)*u},d=Math.pow(f.x,2)/Math.pow(e,2)+Math.pow(f.y,2)/Math.pow(n,2);d>1&&(e=Math.sqrt(d)*e,n=Math.sqrt(d)*n);var h=Math.pow(e,2)*Math.pow(n,2)-Math.pow(e,2)*Math.pow(f.y,2)-Math.pow(n,2)*Math.pow(f.x,2),p=Math.pow(e,2)*Math.pow(f.y,2)+Math.pow(n,2)*Math.pow(f.x,2),v=h/p;v=v<0?0:v;var g=(i!==a?1:-1)*Math.sqrt(v),y={x:g*(e*f.y/n),y:g*(-(n*f.x)/e)},m={x:Math.cos(c)*y.x-Math.sin(c)*y.y+(t.x+o.x)/2,y:Math.sin(c)*y.x+Math.cos(c)*y.y+(t.y+o.y)/2},b={x:(f.x-y.x)/e,y:(f.y-y.y)/n},x=iO({x:1,y:0},b),_={x:(-f.x-y.x)/e,y:(-f.y-y.y)/n},O=iO(b,_);!a&&O>0?O-=2*Math.PI:a&&O<0&&(O+=2*Math.PI),O%=2*Math.PI;var w=x+O*s,S=e*Math.cos(w),M=n*Math.sin(w),E={x:Math.cos(c)*S-Math.sin(c)*M+m.x,y:Math.sin(c)*S+Math.cos(c)*M+m.y,ellipticalArcStartAngle:x,ellipticalArcEndAngle:x+O,ellipticalArcAngle:w,ellipticalArcCenter:m,resultantRx:e,resultantRy:n};return E};function QB(t){for(var e=[],n=null,r=null,i=null,a=0,o=t.length,s=0;s<o;s++){var c=t[s];r=t[s+1];var l=c[0],u={command:l,prePoint:n,params:c,startTangent:null,endTangent:null,currentPoint:null,nextPoint:null,arcParams:null,box:null,cubicParams:null};switch(l){case"M":i=[c[1],c[2]],a=s;break;case"A":var f=JB(n,c);u.arcParams=f;break}if(l==="Z")n=i,r=t[a+1];else{var d=c.length;n=[c[d-2],c[d-1]]}r&&r[0]==="Z"&&(r=t[a],e[a]&&(e[a].prePoint=n)),u.currentPoint=n,e[a]&&Mh(n,e[a].currentPoint)&&(e[a].prePoint=u.prePoint);var h=r?[r[r.length-2],r[r.length-1]]:null;u.nextPoint=h;var p=u.prePoint;if(["L","H","V"].includes(l))u.startTangent=[p[0]-n[0],p[1]-n[1]],u.endTangent=[n[0]-p[0],n[1]-p[1]];else if(l==="Q"){var v=[c[1],c[2]];u.startTangent=[p[0]-v[0],p[1]-v[1]],u.endTangent=[n[0]-v[0],n[1]-v[1]]}else if(l==="T"){var g=e[s-1],v=rO(g.currentPoint,p);g.command==="Q"?(u.command="Q",u.startTangent=[p[0]-v[0],p[1]-v[1]],u.endTangent=[n[0]-v[0],n[1]-v[1]]):(u.command="TL",u.startTangent=[p[0]-n[0],p[1]-n[1]],u.endTangent=[n[0]-p[0],n[1]-p[1]])}else if(l==="C"){var y=[c[1],c[2]],m=[c[3],c[4]];u.startTangent=[p[0]-y[0],p[1]-y[1]],u.endTangent=[n[0]-m[0],n[1]-m[1]],u.startTangent[0]===0&&u.startTangent[1]===0&&(u.startTangent=[y[0]-m[0],y[1]-m[1]]),u.endTangent[0]===0&&u.endTangent[1]===0&&(u.endTangent=[m[0]-y[0],m[1]-y[1]])}else if(l==="S"){var g=e[s-1],y=rO(g.currentPoint,p),m=[c[1],c[2]];g.command==="C"?(u.command="C",u.startTangent=[p[0]-y[0],p[1]-y[1]],u.endTangent=[n[0]-m[0],n[1]-m[1]]):(u.command="SQ",u.startTangent=[p[0]-m[0],p[1]-m[1]],u.endTangent=[n[0]-m[0],n[1]-m[1]])}else if(l==="A"){var b=oO(u,0),x=b.x,_=b.y,O=oO(u,1,!1),w=O.x,S=O.y;u.startTangent=[x,_],u.endTangent=[w,S]}e.push(u)}return e}function oO(t,e,n){n===void 0&&(n=!0);var r=t.arcParams,i=r.rx,a=i===void 0?0:i,o=r.ry,s=o===void 0?0:o,c=r.xRotation,l=r.arcFlag,u=r.sweepFlag,f=aO({x:t.prePoint[0],y:t.prePoint[1]},a,s,c,!!l,!!u,{x:t.currentPoint[0],y:t.currentPoint[1]},e),d=aO({x:t.prePoint[0],y:t.prePoint[1]},a,s,c,!!l,!!u,{x:t.currentPoint[0],y:t.currentPoint[1]},n?e+.005:e-.005),h=d.x-f.x,p=d.y-f.y,v=Math.sqrt(h*h+p*p);return{x:-h/v,y:-p/v}}function Ph(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function Vg(t,e){return Ph(t)*Ph(e)?(t[0]*e[0]+t[1]*e[1])/(Ph(t)*Ph(e)):1}function sO(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(Vg(t,e))}function JB(t,e){var n=e[1],r=e[2],i=s2(Gn(e[3]),Math.PI*2),a=e[4],o=e[5],s=t[0],c=t[1],l=e[6],u=e[7],f=Math.cos(i)*(s-l)/2+Math.sin(i)*(c-u)/2,d=-1*Math.sin(i)*(s-l)/2+Math.cos(i)*(c-u)/2,h=f*f/(n*n)+d*d/(r*r);h>1&&(n*=Math.sqrt(h),r*=Math.sqrt(h));var p=n*n*(d*d)+r*r*(f*f),v=p?Math.sqrt((n*n*(r*r)-p)/p):1;a===o&&(v*=-1),isNaN(v)&&(v=0);var g=r?v*n*d/r:0,y=n?v*-r*f/n:0,m=(s+l)/2+Math.cos(i)*g-Math.sin(i)*y,b=(c+u)/2+Math.sin(i)*g+Math.cos(i)*y,x=[(f-g)/n,(d-y)/r],_=[(-1*f-g)/n,(-1*d-y)/r],O=sO([1,0],x),w=sO(x,_);return Vg(x,_)<=-1&&(w=Math.PI),Vg(x,_)>=1&&(w=0),o===0&&w>0&&(w=w-2*Math.PI),o===1&&w<0&&(w=w+2*Math.PI),{cx:m,cy:b,rx:Mh(t,[l,u])?0:n,ry:Mh(t,[l,u])?0:r,startAngle:O,endAngle:O+w,xRotation:i,arcFlag:a,sweepFlag:o}}function t9(t,e,n){var r=e.parsedStyle,i=r.defX,a=i===void 0?0:i,o=r.defY,s=o===void 0?0:o;return t.reduce(function(c,l){var u="";if(l[0]==="M"||l[0]==="L"){var f=Ge(l[1]-a,l[2]-s,0);n&&Sr(f,f,n),u="".concat(l[0]).concat(f[0],",").concat(f[1])}else if(l[0]==="Z")u=l[0];else if(l[0]==="C"){var d=Ge(l[1]-a,l[2]-s,0),h=Ge(l[3]-a,l[4]-s,0),p=Ge(l[5]-a,l[6]-s,0);n&&(Sr(d,d,n),Sr(h,h,n),Sr(p,p,n)),u="".concat(l[0]).concat(d[0],",").concat(d[1],",").concat(h[0],",").concat(h[1],",").concat(p[0],",").concat(p[1])}else if(l[0]==="A"){var v=Ge(l[6]-a,l[7]-s,0);n&&Sr(v,v,n),u="".concat(l[0]).concat(l[1],",").concat(l[2],",").concat(l[3],",").concat(l[4],",").concat(l[5],",").concat(v[0],",").concat(v[1])}else if(l[0]==="Q"){var d=Ge(l[1]-a,l[2]-s,0),h=Ge(l[3]-a,l[4]-s,0);n&&(Sr(d,d,n),Sr(h,h,n)),u="".concat(l[0]).concat(l[1],",").concat(l[2],",").concat(l[3],",").concat(l[4],"}")}return c+=u},"")}function e9(t,e,n,r){return[["M",t,e],["L",n,r]]}function cO(t,e,n,r){var i=(-1+Math.sqrt(2))/3*4,a=t*i,o=e*i,s=n-t,c=n+t,l=r-e,u=r+e;return[["M",s,r],["C",s,r-o,n-a,l,n,l],["C",n+a,l,c,r-o,c,r],["C",c,r+o,n+a,u,n,u],["C",n-a,u,s,r+o,s,r],["Z"]]}function n9(t,e){var n=t.map(function(r,i){return[i===0?"M":"L",r[0],r[1]]});return e&&n.push(["Z"]),n}function r9(t,e,n,r,i){if(i){var a=R(i,4),o=a[0],s=a[1],c=a[2],l=a[3],u=t>0?1:-1,f=e>0?1:-1,d=u+f!==0?1:0;return[["M",u*o+n,r],["L",t-u*s+n,r],s?["A",s,s,0,0,d,t+n,f*s+r]:null,["L",t+n,e-f*c+r],c?["A",c,c,0,0,d,t+n-u*c,e+r]:null,["L",n+u*l,e+r],l?["A",l,l,0,0,d,n,e+r-f*l]:null,["L",n,f*o+r],o?["A",o,o,0,0,d,u*o+n,r]:null,["Z"]].filter(function(h){return h})}return[["M",n,r],["L",n+t,r],["L",n+t,r+e],["L",n,r+e],["Z"]]}function Ug(t,e){e===void 0&&(e=t.getLocalTransform());var n=[];switch(t.nodeName){case ot.LINE:var r=t.parsedStyle,i=r.x1,a=i===void 0?0:i,o=r.y1,s=o===void 0?0:o,c=r.x2,l=c===void 0?0:c,u=r.y2,f=u===void 0?0:u;n=e9(a,s,l,f);break;case ot.CIRCLE:{var d=t.parsedStyle,h=d.r,p=h===void 0?0:h,v=d.cx,g=v===void 0?0:v,y=d.cy,m=y===void 0?0:y;n=cO(p,p,g,m);break}case ot.ELLIPSE:{var b=t.parsedStyle,x=b.rx,_=x===void 0?0:x,O=b.ry,w=O===void 0?0:O,S=b.cx,g=S===void 0?0:S,M=b.cy,m=M===void 0?0:M;n=cO(_,w,g,m);break}case ot.POLYLINE:case ot.POLYGON:var E=t.parsedStyle.points;n=n9(E.points,t.nodeName===ot.POLYGON);break;case ot.RECT:var P=t.parsedStyle,L=P.width,A=L===void 0?0:L,T=P.height,C=T===void 0?0:T,N=P.x,B=N===void 0?0:N,j=P.y,D=j===void 0?0:j,G=P.radius,Y=G&&G.some(function(V){return V!==0});n=r9(A,C,B,D,Y&&G.map(function(V){return Vn(V,0,Math.min(Math.abs(A)/2,Math.abs(C)/2))}));break;case ot.PATH:var U=t.parsedStyle.path.absolutePath;n=yt([],R(U),!1);break}if(n.length)return t9(n,t,e)}function Uvt(t,e,n,r,i,a,o){r===void 0&&(r=0),i===void 0&&(i=0),a===void 0&&(a=0),o===void 0&&(o=0);var s=t.map(function(c,l){var u=c[0],f=t[l+1],d=l===0&&(r!==0||i!==0),h=(l===t.length-1||f&&(f[0]==="M"||f[0]==="Z"))&&a!==0&&o!==0;switch(u){case"M":return d?"M ".concat(c[1]-e+r,",").concat(c[2]-n+i," L ").concat(c[1]-e,",").concat(c[2]-n):"M ".concat(c[1]-e,",").concat(c[2]-n);case"L":return"L ".concat(c[1]-e+(h?a:0),",").concat(c[2]-n+(h?o:0));case"Q":return"Q ".concat(c[1]-e," ").concat(c[2]-n,",").concat(c[3]-e," ").concat(c[4]-n)+(h?" L ".concat(c[3]-e+a,",").concat(c[4]-n+o):"");case"C":return"C ".concat(c[1]-e," ").concat(c[2]-n,",").concat(c[3]-e," ").concat(c[4]-n,",").concat(c[5]-e," ").concat(c[6]-n)+(h?" L ".concat(c[5]-e+a,",").concat(c[6]-n+o):"");case"A":return"A ".concat(c[1]," ").concat(c[2]," ").concat(c[3]," ").concat(c[4]," ").concat(c[5]," ").concat(c[6]-e," ").concat(c[7]-n)+(h?" L ".concat(c[6]-e+a,",").concat(c[7]-n+o):"");case"Z":return"Z"}}).join(" ");return~s.indexOf("NaN")?"":s}var lO=function(t){if(t===""||Array.isArray(t)&&t.length===0)return{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:{x:0,y:0,width:0,height:0}};var e;try{e=fh(t)}catch(d){e=fh(""),console.error("[g]: Invalid SVG Path definition: ".concat(t))}XB(e);var n=qB(e),r=ZB(e),i=r.polygons,a=r.polylines,o=QB(e),s=KB(o,0),c=s.x,l=s.y,u=s.width,f=s.height;return{absolutePath:e,hasArc:n,segments:o,polygons:i,polylines:a,totalLength:0,rect:{x:Number.isFinite(c)?c:0,y:Number.isFinite(l)?l:0,width:Number.isFinite(u)?u:0,height:Number.isFinite(f)?f:0}}},i9=zr(lO);function Xg(t){return Dn(t)?i9(t):lO(t)}function a9(t,e,n){var r=t.curve,i=e.curve;(!r||r.length===0)&&(r=Og(t.absolutePath,!1),t.curve=r),(!i||i.length===0)&&(i=Og(e.absolutePath,!1),e.curve=i);var a=[r,i];r.length!==i.length&&(a=u2(r,i));var o=f2(a[0])!==f2(a[1])?v8(a[0]):g8(a[0]);return[o,m8(a[1],o),function(s){return s}]}function uO(t,e){var n;Dn(t)?n=t.split(" ").map(function(u){var f=R(u.split(","),2),d=f[0],h=f[1];return[Number(d),Number(h)]}):n=t;var r=[],i=0,a,o,s=U8(n);n.forEach(function(u,f){n[f+1]&&(a=[0,0],a[0]=i/s,o=P2(u[0],u[1],n[f+1][0],n[f+1][1]),i+=o,a[1]=i/s,r.push(a))});var c=Math.min.apply(Math,yt([],R(n.map(function(u){return u[0]})),!1)),l=Math.min.apply(Math,yt([],R(n.map(function(u){return u[1]})),!1));return e&&(e.parsedStyle.defX=c,e.parsedStyle.defY=l),{points:n,totalLength:s,segments:r}}function o9(t,e){return[t.points,e.points,function(n){return n}]}var Un=null;function Oi(t){return function(e){var n=0;return t.map(function(r){return r===Un?e[n++]:r})}}function Xs(t){return t}var Ah={matrix:["NNNNNN",[Un,Un,0,0,Un,Un,0,0,0,0,1,0,Un,Un,0,1],Xs],matrix3d:["NNNNNNNNNNNNNNNN",Xs],rotate:["A"],rotatex:["A"],rotatey:["A"],rotatez:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",Oi([Un,Un,new pn(1)]),Xs],scalex:["N",Oi([Un,new pn(1),new pn(1)]),Oi([Un,new pn(1)])],scaley:["N",Oi([new pn(1),Un,new pn(1)]),Oi([new pn(1),Un])],scalez:["N",Oi([new pn(1),new pn(1),Un])],scale3d:["NNN",Xs],skew:["Aa",null,Xs],skewx:["A",null,Oi([Un,ba])],skewy:["A",null,Oi([ba,Un])],translate:["Tt",Oi([Un,Un,Mr]),Xs],translatex:["T",Oi([Un,Mr,Mr]),Oi([Un,Mr])],translatey:["T",Oi([Mr,Un,Mr]),Oi([Mr,Un])],translatez:["L",Oi([Mr,Mr,Un])],translate3d:["TTL",Xs]};function qg(t){if(t=(t||"none").toLowerCase().trim(),t==="none")return[];for(var e=/\s*(\w+)\(([^)]*)\)/g,n=[],r,i=0;r=e.exec(t);){if(r.index!==i)return[];i=r.index+r[0].length;var a=r[1],o=Ah[a];if(!o)return[];var s=r[2].split(","),c=o[0];if(c.length<s.length)return[];for(var l=[],u=0;u<c.length;u++){var f=s[u],d=c[u],h=void 0;if(f?h={A:function(p){return p.trim()==="0"?ba:Q2(p)},N:Us,T:dl,L:YB}[d.toUpperCase()](f):h={a:ba,n:l[0],t:Mr}[d],h===void 0)return[];l.push(h)}if(n.push({t:a,d:l}),e.lastIndex===t.length)return n}return[]}function fO(t){if(t=(t||"none").toLowerCase().trim(),t==="none")return[];for(var e=/\s*(\w+)\(([^)]*)\)/g,n=[],r,i=0;r=e.exec(t);){if(r.index!==i)return[];i=r.index+r[0].length;var a=r[1],o=Ah[a];if(!o)return[];var s=r[2].split(","),c=o[0];if(c.length<s.length)return[];for(var l=[],u=0;u<c.length;u++){var f=s[u],d=c[u],h=void 0;if(f?h={A:function(p){return p.trim()==="0"?ba:Gg(p)},N:hl,T:Zu,L:K2}[d.toUpperCase()](f):h={a:ba,n:l[0],t:Mr}[d],h===void 0)return[];l.push(h)}if(n.push({t:a,d:l}),e.lastIndex===t.length)return n}return[]}function s9(t){var e,n,r,i;switch(t.t){case"rotatex":return i=Gn(ji(t.d[0])),[1,0,0,0,0,Math.cos(i),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1];case"rotatey":return i=Gn(ji(t.d[0])),[Math.cos(i),0,-Math.sin(i),0,0,1,0,0,Math.sin(i),0,Math.cos(i),0,0,0,0,1];case"rotate":case"rotatez":return i=Gn(ji(t.d[0])),[Math.cos(i),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1,0,0,0,0,1];case"rotate3d":e=t.d[0].value,n=t.d[1].value,r=t.d[2].value,i=Gn(ji(t.d[3]));var a=e*e+n*n+r*r;if(a===0)e=1,n=0,r=0;else if(a!==1){var o=Math.sqrt(a);e/=o,n/=o,r/=o}var s=Math.sin(i/2),c=s*Math.cos(i/2),l=s*s;return[1-2*(n*n+r*r)*l,2*(e*n*l+r*c),2*(e*r*l-n*c),0,2*(e*n*l-r*c),1-2*(e*e+r*r)*l,2*(n*r*l+e*c),0,2*(e*r*l+n*c),2*(n*r*l-e*c),1-2*(e*e+n*n)*l,0,0,0,0,1];case"scale":return[t.d[0].value,0,0,0,0,t.d[1].value,0,0,0,0,1,0,0,0,0,1];case"scalex":return[t.d[0].value,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"scaley":return[1,0,0,0,0,t.d[0].value,0,0,0,0,1,0,0,0,0,1];case"scalez":return[1,0,0,0,0,1,0,0,0,0,t.d[0].value,0,0,0,0,1];case"scale3d":return[t.d[0].value,0,0,0,0,t.d[1].value,0,0,0,0,t.d[2].value,0,0,0,0,1];case"skew":var u=Gn(ji(t.d[0])),f=Gn(ji(t.d[1]));return[1,Math.tan(f),0,0,Math.tan(u),1,0,0,0,0,1,0,0,0,0,1];case"skewx":return i=Gn(ji(t.d[0])),[1,0,0,0,Math.tan(i),1,0,0,0,0,1,0,0,0,0,1];case"skewy":return i=Gn(ji(t.d[0])),[1,Math.tan(i),0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"translate":return e=Ri(t.d[0],0,null)||0,n=Ri(t.d[1],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,e,n,0,1];case"translatex":return e=Ri(t.d[0],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,e,0,0,1];case"translatey":return n=Ri(t.d[0],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,0,n,0,1];case"translatez":return r=Ri(t.d[0],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,0,0,r,1];case"translate3d":return e=Ri(t.d[0],0,null)||0,n=Ri(t.d[1],0,null)||0,r=Ri(t.d[2],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,e,n,r,1];case"perspective":var d=Ri(t.d[0],0,null)||0,h=d?-1/d:0;return[1,0,0,0,0,1,0,0,0,0,1,h,0,0,0,1];case"matrix":return[t.d[0].value,t.d[1].value,0,0,t.d[2].value,t.d[3].value,0,0,0,0,1,0,t.d[4].value,t.d[5].value,0,1];case"matrix3d":return t.d.map(function(p){return p.value})}}function c9(t,e){return[t[0]*e[0]+t[4]*e[1]+t[8]*e[2]+t[12]*e[3],t[1]*e[0]+t[5]*e[1]+t[9]*e[2]+t[13]*e[3],t[2]*e[0]+t[6]*e[1]+t[10]*e[2]+t[14]*e[3],t[3]*e[0]+t[7]*e[1]+t[11]*e[2]+t[15]*e[3],t[0]*e[4]+t[4]*e[5]+t[8]*e[6]+t[12]*e[7],t[1]*e[4]+t[5]*e[5]+t[9]*e[6]+t[13]*e[7],t[2]*e[4]+t[6]*e[5]+t[10]*e[6]+t[14]*e[7],t[3]*e[4]+t[7]*e[5]+t[11]*e[6]+t[15]*e[7],t[0]*e[8]+t[4]*e[9]+t[8]*e[10]+t[12]*e[11],t[1]*e[8]+t[5]*e[9]+t[9]*e[10]+t[13]*e[11],t[2]*e[8]+t[6]*e[9]+t[10]*e[10]+t[14]*e[11],t[3]*e[8]+t[7]*e[9]+t[11]*e[10]+t[15]*e[11],t[0]*e[12]+t[4]*e[13]+t[8]*e[14]+t[12]*e[15],t[1]*e[12]+t[5]*e[13]+t[9]*e[14]+t[13]*e[15],t[2]*e[12]+t[6]*e[13]+t[10]*e[14]+t[14]*e[15],t[3]*e[12]+t[7]*e[13]+t[11]*e[14]+t[15]*e[15]]}function l9(t){return t.length===0?[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]:t.map(s9).reduce(c9)}function dO(t){var e=[0,0,0],n=[1,1,1],r=[0,0,0],i=[0,0,0,1],a=[0,0,0,1];return cB(l9(t),e,n,r,i,a),[[e,n,r,a,i]]}var u9=function(){function t(r,i){for(var a=[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],o=0;o<4;o++)for(var s=0;s<4;s++)for(var c=0;c<4;c++)a[o][s]+=i[o][c]*r[c][s];return a}function e(r){return r[0][2]==0&&r[0][3]==0&&r[1][2]==0&&r[1][3]==0&&r[2][0]==0&&r[2][1]==0&&r[2][2]==1&&r[2][3]==0&&r[3][2]==0&&r[3][3]==1}function n(r,i,a,o,s){for(var c=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],l=0;l<4;l++)c[l][3]=s[l];for(var l=0;l<3;l++)for(var u=0;u<3;u++)c[3][l]+=r[u]*c[u][l];var f=o[0],d=o[1],h=o[2],p=o[3],v=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];v[0][0]=1-2*(d*d+h*h),v[0][1]=2*(f*d-h*p),v[0][2]=2*(f*h+d*p),v[1][0]=2*(f*d+h*p),v[1][1]=1-2*(f*f+h*h),v[1][2]=2*(d*h-f*p),v[2][0]=2*(f*h-d*p),v[2][1]=2*(d*h+f*p),v[2][2]=1-2*(f*f+d*d),c=t(c,v);var g=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];a[2]&&(g[2][1]=a[2],c=t(c,g)),a[1]&&(g[2][1]=0,g[2][0]=a[0],c=t(c,g)),a[0]&&(g[2][0]=0,g[1][0]=a[0],c=t(c,g));for(var l=0;l<3;l++)for(var u=0;u<3;u++)c[l][u]*=i[l];return e(c)?[c[0][0],c[0][1],c[1][0],c[1][1],c[3][0],c[3][1]]:c[0].concat(c[1],c[2],c[3])}return n}();function f9(t){return t.toFixed(6).replace(".000000","")}function Zg(t,e){var n,r;return t.decompositionPair!==e&&(t.decompositionPair=e,n=dO(t)),e.decompositionPair!==t&&(e.decompositionPair=t,r=dO(e)),n[0]===null||r[0]===null?[[!1],[!0],function(i){return i?e[0].d:t[0].d}]:(n[0].push(0),r[0].push(1),[n,r,function(i){var a=h9(n[0][3],r[0][3],i[5]),o=u9(i[0],i[1],i[2],a,i[4]),s=o.map(f9).join(",");return s}])}function d9(t,e){for(var n=0,r=0;r<t.length;r++)n+=t[r]*e[r];return n}function h9(t,e,n){var r=d9(t,e);r=Vn(r,-1,1);var i=[];if(r===1)i=t;else for(var a=Math.acos(r),o=Math.sin(n*a)*1/Math.sqrt(1-r*r),s=0;s<4;s++)i.push(t[s]*(Math.cos(n*a)-r*o)+e[s]*o);return i}function Kg(t){return t.replace(/[xy]/,"")}function Qg(t){return t.replace(/(x|y|z|3d)?$/,"3d")}var p9=function(t,e){return t==="perspective"&&e==="perspective"||(t==="matrix"||t==="matrix3d")&&(e==="matrix"||e==="matrix3d")};function v9(t,e,n){var r=!1;if(!t.length||!e.length){t.length||(r=!0,t=e,e=[]);for(var i=function(O){var w=t[O],S=w.t,M=w.d,E=S.substring(0,5)==="scale"?1:0;e.push({t:S,d:M.map(function(P){return typeof P=="number"?mn(E):mn(E,P.unit)})})},a=0;a<t.length;a++)i(a)}var o=[],s=[],c=[];if(t.length!==e.length){var l=Zg(t,e);o=[l[0]],s=[l[1]],c=[["matrix",[l[2]]]]}else for(var a=0;a<t.length;a++){var u=t[a].t,f=e[a].t,d=t[a].d,h=e[a].d,p=Ah[u],v=Ah[f],g=void 0;if(p9(u,f)){var l=Zg([t[a]],[e[a]]);o.push(l[0]),s.push(l[1]),c.push(["matrix",[l[2]]]);continue}else if(u===f)g=u;else if(p[2]&&v[2]&&Kg(u)===Kg(f))g=Kg(u),d=p[2](d),h=v[2](h);else if(p[1]&&v[1]&&Qg(u)===Qg(f))g=Qg(u),d=p[1](d),h=v[1](h);else{var l=Zg(t,e);o=[l[0]],s=[l[1]],c=[["matrix",[l[2]]]];break}for(var y=[],m=[],b=[],x=0;x<d.length;x++){var l=$B(d[x],h[x],n,!1,x);y[x]=l[0],m[x]=l[1],b.push(l[2])}o.push(y),s.push(m),c.push([g,b])}if(r){var _=o;o=s,s=_}return[o,s,function(O){return O.map(function(w,S){var M=w.map(function(E,P){return c[S][1][P](E)}).join(",");return c[S][0]==="matrix"&&M.split(",").length===16&&(c[S][0]="matrix3d"),c[S][0]==="matrix3d"&&M.split(",").length===6&&(c[S][0]="matrix"),c[S][0]+"("+M+")"}).join(" ")}]}var hO=zr(function(t){if(Dn(t)){if(t==="text-anchor")return[mn(0,"px"),mn(0,"px")];var e=t.split(" ");return e.length===1&&(e[0]==="top"||e[0]==="bottom"?(e[1]=e[0],e[0]="center"):e[1]="center"),e.length!==2?null:[dl(Th(e[0])),dl(Th(e[1]))]}else return[mn(t[0]||0,"px"),mn(t[1]||0,"px")]}),g9=function(t){if(Dn(t)){if(t==="text-anchor")return[mn(0,"px"),mn(0,"px")];var e=t.split(" ");return e.length===1&&(e[0]==="top"||e[0]==="bottom"?(e[1]=e[0],e[0]="center"):e[1]="center"),e.length!==2?null:[Zu(Th(e[0])),Zu(Th(e[1]))]}else return[mn(t[0]||0,"px"),mn(t[1]||0,"px")]};function Th(t){return t==="center"?"50%":t==="left"||t==="top"?"0":t==="right"||t==="bottom"?"100%":t}var Jg=[{n:"display",k:["none"]},{n:"opacity",int:!0,inh:!0,d:"1",syntax:kt.OPACITY_VALUE},{n:"fillOpacity",int:!0,inh:!0,d:"1",syntax:kt.OPACITY_VALUE},{n:"strokeOpacity",int:!0,inh:!0,d:"1",syntax:kt.OPACITY_VALUE},{n:"fill",int:!0,k:["none"],d:"none",syntax:kt.PAINT},{n:"fillRule",k:["nonzero","evenodd"],d:"nonzero"},{n:"stroke",int:!0,k:["none"],d:"none",syntax:kt.PAINT,l:!0},{n:"shadowType",k:["inner","outer","both"],d:"outer",l:!0},{n:"shadowColor",int:!0,syntax:kt.COLOR},{n:"shadowOffsetX",int:!0,l:!0,d:"0",syntax:kt.LENGTH_PERCENTAGE},{n:"shadowOffsetY",int:!0,l:!0,d:"0",syntax:kt.LENGTH_PERCENTAGE},{n:"shadowBlur",int:!0,l:!0,d:"0",syntax:kt.SHADOW_BLUR},{n:"lineWidth",int:!0,inh:!0,d:"1",l:!0,a:["strokeWidth"],syntax:kt.LENGTH_PERCENTAGE},{n:"increasedLineWidthForHitTesting",inh:!0,d:"0",l:!0,syntax:kt.LENGTH_PERCENTAGE},{n:"lineJoin",inh:!0,l:!0,a:["strokeLinejoin"],k:["miter","bevel","round"],d:"miter"},{n:"lineCap",inh:!0,l:!0,a:["strokeLinecap"],k:["butt","round","square"],d:"butt"},{n:"lineDash",int:!0,inh:!0,k:["none"],a:["strokeDasharray"],syntax:kt.LENGTH_PERCENTAGE_12},{n:"lineDashOffset",int:!0,inh:!0,d:"0",a:["strokeDashoffset"],syntax:kt.LENGTH_PERCENTAGE},{n:"offsetPath",syntax:kt.DEFINED_PATH},{n:"offsetDistance",int:!0,syntax:kt.OFFSET_DISTANCE},{n:"dx",int:!0,l:!0,d:"0",syntax:kt.LENGTH_PERCENTAGE},{n:"dy",int:!0,l:!0,d:"0",syntax:kt.LENGTH_PERCENTAGE},{n:"zIndex",ind:!0,int:!0,d:"0",k:["auto"],syntax:kt.Z_INDEX},{n:"visibility",k:["visible","hidden"],ind:!0,inh:!0,int:!0,d:"visible"},{n:"pointerEvents",inh:!0,k:["none","auto","stroke","fill","painted","visible","visiblestroke","visiblefill","visiblepainted","all"],d:"auto"},{n:"filter",ind:!0,l:!0,k:["none"],d:"none",syntax:kt.FILTER},{n:"clipPath",syntax:kt.DEFINED_PATH},{n:"textPath",syntax:kt.DEFINED_PATH},{n:"textPathSide",k:["left","right"],d:"left"},{n:"textPathStartOffset",l:!0,d:"0",syntax:kt.LENGTH_PERCENTAGE},{n:"transform",p:100,int:!0,k:["none"],d:"none",syntax:kt.TRANSFORM},{n:"transformOrigin",p:100,d:function(t){return t===ot.CIRCLE||t===ot.ELLIPSE?"center":t===ot.TEXT?"text-anchor":"left top"},l:!0,syntax:kt.TRANSFORM_ORIGIN},{n:"anchor",p:99,d:function(t){return t===ot.CIRCLE||t===ot.ELLIPSE?"0.5 0.5":"0 0"},l:!0,syntax:kt.LENGTH_PERCENTAGE_12},{n:"cx",int:!0,d:"0",syntax:kt.COORDINATE},{n:"cy",int:!0,d:"0",syntax:kt.COORDINATE},{n:"cz",int:!0,d:"0",syntax:kt.COORDINATE},{n:"r",int:!0,l:!0,d:"0",syntax:kt.LENGTH_PERCENTAGE},{n:"rx",int:!0,l:!0,d:"0",syntax:kt.LENGTH_PERCENTAGE},{n:"ry",int:!0,l:!0,d:"0",syntax:kt.LENGTH_PERCENTAGE},{n:"x",int:!0,d:"0",syntax:kt.COORDINATE},{n:"y",int:!0,d:"0",syntax:kt.COORDINATE},{n:"z",int:!0,d:"0",syntax:kt.COORDINATE},{n:"width",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:kt.LENGTH_PERCENTAGE},{n:"height",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:kt.LENGTH_PERCENTAGE},{n:"radius",int:!0,l:!0,d:"0",syntax:kt.LENGTH_PERCENTAGE_14},{n:"x1",int:!0,l:!0,syntax:kt.COORDINATE},{n:"y1",int:!0,l:!0,syntax:kt.COORDINATE},{n:"z1",int:!0,l:!0,syntax:kt.COORDINATE},{n:"x2",int:!0,l:!0,syntax:kt.COORDINATE},{n:"y2",int:!0,l:!0,syntax:kt.COORDINATE},{n:"z2",int:!0,l:!0,syntax:kt.COORDINATE},{n:"path",int:!0,l:!0,d:"",a:["d"],syntax:kt.PATH,p:50},{n:"points",int:!0,l:!0,syntax:kt.LIST_OF_POINTS,p:50},{n:"text",l:!0,d:"",syntax:kt.TEXT,p:50},{n:"textTransform",l:!0,inh:!0,k:["capitalize","uppercase","lowercase","none"],d:"none",syntax:kt.TEXT_TRANSFORM,p:51},{n:"font",l:!0},{n:"fontSize",int:!0,inh:!0,d:"16px",l:!0,syntax:kt.LENGTH_PERCENTAGE},{n:"fontFamily",l:!0,inh:!0,d:"sans-serif"},{n:"fontStyle",l:!0,inh:!0,k:["normal","italic","oblique"],d:"normal"},{n:"fontWeight",l:!0,inh:!0,k:["normal","bold","bolder","lighter"],d:"normal"},{n:"fontVariant",l:!0,inh:!0,k:["normal","small-caps"],d:"normal"},{n:"lineHeight",l:!0,syntax:kt.LENGTH,int:!0,d:"0"},{n:"letterSpacing",l:!0,syntax:kt.LENGTH,int:!0,d:"0"},{n:"miterLimit",l:!0,syntax:kt.NUMBER,d:function(t){return t===ot.PATH||t===ot.POLYGON||t===ot.POLYLINE?"4":"10"}},{n:"wordWrap",l:!0},{n:"wordWrapWidth",l:!0},{n:"maxLines",l:!0},{n:"textOverflow",l:!0,d:"clip"},{n:"leading",l:!0},{n:"textBaseline",l:!0,inh:!0,k:["top","hanging","middle","alphabetic","ideographic","bottom"],d:"alphabetic"},{n:"textAlign",l:!0,inh:!0,k:["start","center","middle","end","left","right"],d:"start"},{n:"markerStart",syntax:kt.MARKER},{n:"markerEnd",syntax:kt.MARKER},{n:"markerMid",syntax:kt.MARKER},{n:"markerStartOffset",syntax:kt.LENGTH,l:!0,int:!0,d:"0"},{n:"markerEndOffset",syntax:kt.LENGTH,l:!0,int:!0,d:"0"}],pO=Jg.filter(function(t){return!!t.l}).map(function(t){return t.n}),Ho={},pl=new WeakMap,y9=function(t,e){var n=pl.get(t);return!n||n.length===0?!0:n.includes(e)},m9=function(){function t(e){var n=this;this.runtime=e,Jg.forEach(function(r){n.registerMetadata(r)})}return t.prototype.registerMetadata=function(e){yt([e.n],R(e.a||[]),!1).forEach(function(n){Ho[n]=e})},t.prototype.unregisterMetadata=function(e){delete Ho[e]},t.prototype.getPropertySyntax=function(e){return this.runtime.CSSPropertySyntaxFactory[e]},t.prototype.processProperties=function(e,n,r){var i=this;if(r===void 0&&(r={skipUpdateAttribute:!1,skipParse:!1,forceUpdateGeometry:!1,usedAttributes:[],memoize:!0}),!this.runtime.enableCSSParsing){Object.assign(e.attributes,n);var a=Object.keys(n),o=e.parsedStyle.clipPath,s=e.parsedStyle.offsetPath;e.parsedStyle=Object.assign(e.parsedStyle,n);var c=!!r.forceUpdateGeometry;if(!c){for(var l=0;l<pO.length;l++)if(pO[l]in n){c=!0;break}}n.fill&&(e.parsedStyle.fill=co(n.fill)),n.stroke&&(e.parsedStyle.stroke=co(n.stroke)),n.shadowColor&&(e.parsedStyle.shadowColor=co(n.shadowColor)),n.filter&&(e.parsedStyle.filter=tO(n.filter)),Ft(n.radius)||(e.parsedStyle.radius=Wg(n.radius,4)),Ft(n.lineDash)||(e.parsedStyle.lineDash=Wg(n.lineDash,2)),n.points&&(e.parsedStyle.points=uO(n.points,e)),n.path===""&&(e.parsedStyle.path=nt({},q2)),n.path&&(e.parsedStyle.path=Xg(n.path),e.parsedStyle.defX=e.parsedStyle.path.rect.x,e.parsedStyle.defY=e.parsedStyle.path.rect.y),n.textTransform&&this.runtime.CSSPropertySyntaxFactory["<text-transform>"].calculator(null,null,{value:n.textTransform},e,null),n.clipPath&&this.runtime.CSSPropertySyntaxFactory["<defined-path>"].calculator("clipPath",o,n.clipPath,e,this.runtime),n.offsetPath&&this.runtime.CSSPropertySyntaxFactory["<defined-path>"].calculator("offsetPath",s,n.offsetPath,e,this.runtime),n.anchor&&(e.parsedStyle.anchor=Wg(n.anchor,2)),n.transform&&(e.parsedStyle.transform=qg(n.transform)),n.transformOrigin&&(e.parsedStyle.transformOrigin=hO(n.transformOrigin)),n.markerStart&&(e.parsedStyle.markerStart=this.runtime.CSSPropertySyntaxFactory["<marker>"].calculator(null,n.markerStart,n.markerStart,null,null)),n.markerEnd&&(e.parsedStyle.markerEnd=this.runtime.CSSPropertySyntaxFactory["<marker>"].calculator(null,n.markerEnd,n.markerEnd,null,null)),n.markerMid&&(e.parsedStyle.markerMid=this.runtime.CSSPropertySyntaxFactory["<marker>"].calculator("",n.markerMid,n.markerMid,null,null)),((e.nodeName===ot.CIRCLE||e.nodeName===ot.ELLIPSE)&&(!Ft(n.cx)||!Ft(n.cy))||(e.nodeName===ot.RECT||e.nodeName===ot.IMAGE||e.nodeName===ot.GROUP||e.nodeName===ot.HTML||e.nodeName===ot.TEXT||e.nodeName===ot.MESH)&&(!Ft(n.x)||!Ft(n.y)||!Ft(n.z))||e.nodeName===ot.LINE&&(!Ft(n.x1)||!Ft(n.y1)||!Ft(n.z1)||!Ft(n.x2)||!Ft(n.y2)||!Ft(n.z2)))&&this.runtime.CSSPropertySyntaxFactory["<coordinate>"].postProcessor(e,a),Ft(n.zIndex)||this.runtime.CSSPropertySyntaxFactory["<z-index>"].postProcessor(e,a),n.path&&this.runtime.CSSPropertySyntaxFactory["<path>"].postProcessor(e,a),n.points&&this.runtime.CSSPropertySyntaxFactory["<list-of-points>"].postProcessor(e,a),Ft(n.offsetDistance)||this.runtime.CSSPropertySyntaxFactory["<offset-distance>"].postProcessor(e,a),n.transform&&this.runtime.CSSPropertySyntaxFactory["<transform>"].postProcessor(e,a),c&&this.updateGeometry(e);return}var u=r.skipUpdateAttribute,f=r.skipParse,d=r.forceUpdateGeometry,h=r.usedAttributes,p=r.memoize,v=d,g=Object.keys(n);g.forEach(function(y){var m;u||(e.attributes[y]=n[y]),!v&&(!((m=Ho[y])===null||m===void 0)&&m.l)&&(v=!0)}),f||g.forEach(function(y){e.computedStyle[y]=i.parseProperty(y,e.attributes[y],e,p)}),h!=null&&h.length&&(g=Array.from(new Set(g.concat(h)))),g.forEach(function(y){y in e.computedStyle&&(e.parsedStyle[y]=i.computeProperty(y,e.computedStyle[y],e,p))}),v&&this.updateGeometry(e),g.forEach(function(y){y in e.parsedStyle&&i.postProcessProperty(y,e,g)}),this.runtime.enableCSSParsing&&e.children.length&&g.forEach(function(y){y in e.parsedStyle&&i.isPropertyInheritable(y)&&e.children.forEach(function(m){m.internalSetAttribute(y,null,{skipUpdateAttribute:!0,skipParse:!0})})})},t.prototype.parseProperty=function(e,n,r,i){var a=Ho[e],o=n;if((n===""||Ft(n))&&(n="unset"),n==="unset"||n==="initial"||n==="inherit")o=Bg(n);else if(a){var s=a.k,c=a.syntax,l=c&&this.getPropertySyntax(c);s&&s.indexOf(n)>-1?o=Bg(n):l&&(!i&&l.parserUnmemoize?o=l.parserUnmemoize(n,r):l.parser&&(o=l.parser(n,r)))}return o},t.prototype.computeProperty=function(e,n,r,i){var a=Ho[e],o=r.id==="g-root",s=n;if(a){var c=a.syntax,l=a.inh,u=a.d;if(n instanceof _i){var f=n.value;if(f==="unset"&&(l&&!o?f="inherit":f="initial"),f==="initial")Ft(u)||(n=this.parseProperty(e,ul(u)?u(r.nodeName):u,r,i));else if(f==="inherit"){var d=this.tryToResolveProperty(r,e,{inherited:!0});if(Ft(d)){this.addUnresolveProperty(r,e);return}else return d}}var h=c&&this.getPropertySyntax(c);if(h&&h.calculator){var p=r.parsedStyle[e];s=h.calculator(e,p,n,r,this.runtime)}else n instanceof _i?s=n.value:s=n}return s},t.prototype.postProcessProperty=function(e,n,r){var i=Ho[e];if(i&&i.syntax){var a=i.syntax&&this.getPropertySyntax(i.syntax),o=a;o&&o.postProcessor&&o.postProcessor(n,r)}},t.prototype.addUnresolveProperty=function(e,n){var r=pl.get(e);r||(pl.set(e,[]),r=pl.get(e)),r.indexOf(n)===-1&&r.push(n)},t.prototype.tryToResolveProperty=function(e,n,r){r===void 0&&(r={});var i=r.inherited;if(i&&e.parentElement&&y9(e.parentElement,n)){var a=e.parentElement.parsedStyle[n];return a==="unset"||a==="initial"||a==="inherit"?void 0:a}},t.prototype.recalc=function(e){var n=pl.get(e);if(n&&n.length){var r={};n.forEach(function(i){r[i]=e.attributes[i]}),this.processProperties(e,r),pl.delete(e)}},t.prototype.updateGeometry=function(e){var n=e.nodeName,r=this.runtime.geometryUpdaterFactory[n];if(r){var i=e.geometry;i.contentBounds||(i.contentBounds=new ur),i.renderBounds||(i.renderBounds=new ur);var a=e.parsedStyle,o=r.update(a,e),s=o.width,c=o.height,l=o.depth,u=l===void 0?0:l,f=o.offsetX,d=f===void 0?0:f,h=o.offsetY,p=h===void 0?0:h,v=o.offsetZ,g=v===void 0?0:v,y=[Math.abs(s)/2,Math.abs(c)/2,u/2],m=a,b=m.stroke,x=m.lineWidth,_=m.increasedLineWidthForHitTesting,O=m.shadowType,w=m.shadowColor,S=m.filter,M=S===void 0?[]:S,E=m.transformOrigin,P=a.anchor;n===ot.TEXT?delete a.anchor:n===ot.MESH&&(a.anchor[2]=.5);var L=[(1-(P&&P[0]||0)*2)*s/2+d,(1-(P&&P[1]||0)*2)*c/2+p,(1-(P&&P[2]||0)*2)*y[2]+g];i.contentBounds.update(L,y);var A=n===ot.POLYLINE||n===ot.POLYGON||n===ot.PATH?Math.SQRT2:.5,T=b&&!b.isNone;if(T){var C=((x||0)+(_||0))*A;y[0]+=C,y[1]+=C}if(i.renderBounds.update(L,y),w&&O&&O!=="inner"){var N=i.renderBounds,B=N.min,j=N.max,D=a,G=D.shadowBlur,Y=D.shadowOffsetX,U=D.shadowOffsetY,V=G||0,it=Y||0,pt=U||0,Ot=B[0]-V+it,ht=j[0]+V+it,ut=B[1]-V+pt,Lt=j[1]+V+pt;B[0]=Math.min(B[0],Ot),j[0]=Math.max(j[0],ht),B[1]=Math.min(B[1],ut),j[1]=Math.max(j[1],Lt),i.renderBounds.setMinMax(B,j)}M.forEach(function(ie){var ye=ie.name,We=ie.params;if(ye==="blur"){var de=We[0].value;i.renderBounds.update(i.renderBounds.center,xh(i.renderBounds.halfExtents,i.renderBounds.halfExtents,[de,de,0]))}else if(ye==="drop-shadow"){var we=We[0].value,En=We[1].value,ir=We[2].value,Ai=i.renderBounds,Pn=Ai.min,Qn=Ai.max,he=Pn[0]-ir+we,Me=Qn[0]+ir+we,Ee=Pn[1]-ir+En,pe=Qn[1]+ir+En;Pn[0]=Math.min(Pn[0],he),Qn[0]=Math.max(Qn[0],Me),Pn[1]=Math.min(Pn[1],Ee),Qn[1]=Math.max(Qn[1],pe),i.renderBounds.setMinMax(Pn,Qn)}}),P=a.anchor;var wt=s<0,Gt=c<0,Ut=(wt?-1:1)*(E?Ri(E[0],0,e):0),te=(Gt?-1:1)*(E?Ri(E[1],1,e):0);Ut=Ut-(wt?-1:1)*(P&&P[0]||0)*i.contentBounds.halfExtents[0]*2,te=te-(Gt?-1:1)*(P&&P[1]||0)*i.contentBounds.halfExtents[1]*2,e.setOrigin(Ut,te),this.runtime.sceneGraphService.dirtifyToRoot(e)}},t.prototype.updateSizeAttenuation=function(e,n){e.style.isSizeAttenuation?(e.style.rawLineWidth||(e.style.rawLineWidth=e.style.lineWidth),e.style.lineWidth=e.style.rawLineWidth/n,e.nodeName===ot.CIRCLE&&(e.style.rawR||(e.style.rawR=e.style.r),e.style.r=e.style.rawR/n)):(e.style.rawLineWidth&&(e.style.lineWidth=e.style.rawLineWidth,delete e.style.rawLineWidth),e.nodeName===ot.CIRCLE&&e.style.rawR&&(e.style.r=e.style.rawR,delete e.style.rawR))},t.prototype.isPropertyInheritable=function(e){var n=Ho[e];return n?n.inh:!1},t}(),b9=function(){function t(){this.parser=Q2,this.parserUnmemoize=Gg,this.parserWithCSSDisabled=null,this.mixer=Yg}return t.prototype.calculator=function(e,n,r,i){return ji(r)},t}(),x9=function(){function t(){}return t.prototype.calculator=function(e,n,r,i,a){return r instanceof _i&&(r=null),a.sceneGraphService.updateDisplayObjectDependency(e,n,r,i),e==="clipPath"&&i.forEach(function(o){o.childNodes.length===0&&a.sceneGraphService.dirtifyToRoot(o)}),r},t}(),_9=function(){function t(){this.parser=co,this.parserWithCSSDisabled=co,this.mixer=WB}return t.prototype.calculator=function(e,n,r,i){return r instanceof _i?r.value==="none"?Fg:X2:r},t}(),O9=function(){function t(){this.parser=tO}return t.prototype.calculator=function(e,n,r){return r instanceof _i?[]:r},t}();function vO(t){var e=t.parsedStyle.fontSize;return Ft(e)?null:e}var ty=function(){function t(){this.parser=dl,this.parserUnmemoize=Zu,this.parserWithCSSDisabled=null,this.mixer=Yg}return t.prototype.calculator=function(e,n,r,i,a){var o;if(er(r))return r;if(pn.isRelativeUnit(r.unit)){var s=a.styleValueRegistry;if(r.unit===Ct.kPercentage)return 0;if(r.unit===Ct.kEms){if(i.parentNode){var c=vO(i.parentNode);if(c)return c*=r.value,c;s.addUnresolveProperty(i,e)}else s.addUnresolveProperty(i,e);return 0}else if(r.unit===Ct.kRems){if(!((o=i==null?void 0:i.ownerDocument)===null||o===void 0)&&o.documentElement){var c=vO(i.ownerDocument.documentElement);if(c)return c*=r.value,c;s.addUnresolveProperty(i,e)}else s.addUnresolveProperty(i,e);return 0}}else return r.value},t}(),w9=function(){function t(){this.mixer=nO}return t.prototype.parser=function(e){var n=J2(er(e)?[e]:e),r;return n.length===1?r=[n[0],n[0]]:r=[n[0],n[1]],r},t.prototype.calculator=function(e,n,r){return r.map(function(i){return i.value})},t}(),S9=function(){function t(){this.mixer=nO}return t.prototype.parser=function(e){var n=J2(er(e)?[e]:e),r;return n.length===1?r=[n[0],n[0],n[0],n[0]]:n.length===2?r=[n[0],n[1],n[0],n[1]]:n.length===3?r=[n[0],n[1],n[2],n[1]]:r=[n[0],n[1],n[2],n[3]],r},t.prototype.calculator=function(e,n,r){return r.map(function(i){return i.value})},t}(),Ku=On();function ey(t,e){var n=e.parsedStyle.defX||0,r=e.parsedStyle.defY||0;return e.resetLocalTransform(),e.setLocalPosition(n,r),t.forEach(function(i){var a=i.t,o=i.d;if(a==="scale"){var s=(o==null?void 0:o.map(function(m){return m.value}))||[1,1];e.scaleLocal(s[0],s[1],1)}else if(a==="scalex"){var s=(o==null?void 0:o.map(function(b){return b.value}))||[1];e.scaleLocal(s[0],1,1)}else if(a==="scaley"){var s=(o==null?void 0:o.map(function(b){return b.value}))||[1];e.scaleLocal(1,s[0],1)}else if(a==="scalez"){var s=(o==null?void 0:o.map(function(b){return b.value}))||[1];e.scaleLocal(1,1,s[0])}else if(a==="scale3d"){var s=(o==null?void 0:o.map(function(b){return b.value}))||[1,1,1];e.scaleLocal(s[0],s[1],s[2])}else if(a==="translate"){var c=o||[Mr,Mr];e.translateLocal(c[0].value,c[1].value,0)}else if(a==="translatex"){var c=o||[Mr];e.translateLocal(c[0].value,0,0)}else if(a==="translatey"){var c=o||[Mr];e.translateLocal(0,c[0].value,0)}else if(a==="translatez"){var c=o||[Mr];e.translateLocal(0,0,c[0].value)}else if(a==="translate3d"){var c=o||[Mr,Mr,Mr];e.translateLocal(c[0].value,c[1].value,c[2].value)}else if(a==="rotate"){var l=o||[ba];e.rotateLocal(0,0,ji(l[0]))}else if(a==="rotatex"){var l=o||[ba];e.rotateLocal(ji(l[0]),0,0)}else if(a==="rotatey"){var l=o||[ba];e.rotateLocal(0,ji(l[0]),0)}else if(a==="rotatez"){var l=o||[ba];e.rotateLocal(0,0,ji(l[0]))}else if(a!=="rotate3d")if(a==="skew"){var u=(o==null?void 0:o.map(function(m){return m.value}))||[0,0];e.setLocalSkew(Gn(u[0]),Gn(u[1]))}else if(a==="skewx"){var u=(o==null?void 0:o.map(function(b){return b.value}))||[0];e.setLocalSkew(Gn(u[0]),e.getLocalSkew()[1])}else if(a==="skewy"){var u=(o==null?void 0:o.map(function(b){return b.value}))||[0];e.setLocalSkew(e.getLocalSkew()[0],Gn(u[0]))}else if(a==="matrix"){var f=R(o.map(function(m){return m.value}),6),d=f[0],h=f[1],p=f[2],v=f[3],g=f[4],y=f[5];e.setLocalTransform(vg(Ku,d,h,0,0,p,v,0,0,0,0,1,0,g+n,y+r,0,1))}else a==="matrix3d"&&(vg.apply(tt,yt([Ku],R(o.map(function(m){return m.value})),!1)),Ku[12]+=n,Ku[13]+=r,e.setLocalTransform(Ku))}),e.getLocalTransform()}var M9=function(t){Yt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.postProcessor=function(n,r){var i,a,o;switch(n.nodeName){case ot.CIRCLE:case ot.ELLIPSE:var s=n.parsedStyle,c=s.cx,l=s.cy,u=s.cz;Ft(c)||(i=c),Ft(l)||(a=l),Ft(u)||(o=u);break;case ot.LINE:var f=n.parsedStyle,d=f.x1,h=f.x2,p=f.y1,v=f.y2,g=Math.min(d,h),y=Math.min(p,v);i=g,a=y,o=0;break;case ot.RECT:case ot.IMAGE:case ot.GROUP:case ot.HTML:case ot.TEXT:case ot.MESH:Ft(n.parsedStyle.x)||(i=n.parsedStyle.x),Ft(n.parsedStyle.y)||(a=n.parsedStyle.y),Ft(n.parsedStyle.z)||(o=n.parsedStyle.z);break}n.nodeName!==ot.PATH&&n.nodeName!==ot.POLYLINE&&n.nodeName!==ot.POLYGON&&(n.parsedStyle.defX=i||0,n.parsedStyle.defY=a||0);var m=!Ft(i)||!Ft(a)||!Ft(o);if(m&&r.indexOf("transform")===-1){var b=n.parsedStyle.transform;if(b&&b.length)ey(b,n);else{var x=R(n.getLocalPosition(),3),_=x[0],O=x[1],w=x[2];n.setLocalPosition(Ft(i)?_:i,Ft(a)?O:a,Ft(o)?w:o)}}},e}(ty),E9=function(){function t(){}return t.prototype.calculator=function(e,n,r,i){r instanceof _i&&(r=null);var a=r==null?void 0:r.cloneNode(!0);return a&&(a.style.isMarker=!0),a},t}(),P9=function(){function t(){this.mixer=Yg,this.parser=Us,this.parserUnmemoize=hl,this.parserWithCSSDisabled=null}return t.prototype.calculator=function(e,n,r){return r.value},t}(),A9=function(){function t(){this.parser=Us,this.parserUnmemoize=hl,this.parserWithCSSDisabled=null,this.mixer=Hg(0,1)}return t.prototype.calculator=function(e,n,r){return r.value},t.prototype.postProcessor=function(e){var n=e.parsedStyle,r=n.offsetPath,i=n.offsetDistance;if(r){var a=r.nodeName;if(a===ot.LINE||a===ot.PATH||a===ot.POLYLINE){var o=r.getPoint(i);o&&(e.parsedStyle.defX=o.x,e.parsedStyle.defY=o.y,e.setLocalPosition(o.x,o.y))}}},t}(),T9=function(){function t(){this.parser=Us,this.parserUnmemoize=hl,this.parserWithCSSDisabled=null,this.mixer=Hg(0,1)}return t.prototype.calculator=function(e,n,r){return r.value},t}(),C9=function(){function t(){this.parser=Xg,this.parserWithCSSDisabled=Xg,this.mixer=a9}return t.prototype.calculator=function(e,n,r){return r instanceof _i&&r.value==="unset"?{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new Vs(0,0,0,0)}:r},t.prototype.postProcessor=function(e,n){if(e.parsedStyle.defX=e.parsedStyle.path.rect.x,e.parsedStyle.defY=e.parsedStyle.path.rect.y,e.nodeName===ot.PATH&&n.indexOf("transform")===-1){var r=e.parsedStyle,i=r.defX,a=i===void 0?0:i,o=r.defY,s=o===void 0?0:o;e.setLocalPosition(a,s)}},t}(),k9=function(){function t(){this.parser=uO,this.mixer=o9}return t.prototype.postProcessor=function(e,n){if((e.nodeName===ot.POLYGON||e.nodeName===ot.POLYLINE)&&n.indexOf("transform")===-1){var r=e.parsedStyle,i=r.defX,a=r.defY;e.setLocalPosition(i,a)}},t}(),L9=function(t){Yt(e,t);function e(){var n=t.apply(this,yt([],R(arguments),!1))||this;return n.mixer=Hg(0,1/0),n}return e}(ty),N9=function(){function t(){}return t.prototype.calculator=function(e,n,r,i){return r instanceof _i?r.value==="unset"?"":r.value:"".concat(r)},t.prototype.postProcessor=function(e){e.nodeValue="".concat(e.parsedStyle.text)||""},t}(),I9=function(){function t(){}return t.prototype.calculator=function(e,n,r,i){var a=i.getAttribute("text");if(a){var o=a;r.value==="capitalize"?o=a.charAt(0).toUpperCase()+a.slice(1):r.value==="lowercase"?o=a.toLowerCase():r.value==="uppercase"&&(o=a.toUpperCase()),i.parsedStyle.text=o}return r.value},t}(),ny={},j9=0;function R9(t,e){if(t){var n=typeof t=="string"?t:t.id||j9++;ny[n]&&ny[n].destroy(),ny[n]=e}}var Qu=typeof window!="undefined"&&typeof window.document!="undefined";function D9(t){return!!t.getAttribute}function B9(t,e){for(var n=0,r=t.length;n<r;){var i=n+r>>>1;gO(t[i],e)<0?n=i+1:r=i}return n}function gO(t,e){var n=Number(t.parsedStyle.zIndex),r=Number(e.parsedStyle.zIndex);if(n===r){var i=t.parentNode;if(i){var a=i.childNodes||[];return a.indexOf(t)-a.indexOf(e)}}return n-r}function yO(t){var e,n=t;do{var r=(e=n.parsedStyle)===null||e===void 0?void 0:e.clipPath;if(r)return n;n=n.parentElement}while(n!==null);return null}var mO="px";function F9(t,e,n){Qu&&t.style&&(t.style.width=e+mO,t.style.height=n+mO)}function bO(t,e){if(Qu)return document.defaultView.getComputedStyle(t,null).getPropertyValue(e)}function z9(t){var e=bO(t,"width");return e==="auto"?t.offsetWidth:parseFloat(e)}function G9(t){var e=bO(t,"height");return e==="auto"?t.offsetHeight:parseFloat(e)}var W9=1,Y9={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"},ry=typeof performance=="object"&&performance.now?performance:Date;function qs(t,e,n){var r=!1,i=!1,a=!!e&&!e.isNone,o=!!n&&!n.isNone;return t==="visiblepainted"||t==="painted"||t==="auto"?(r=a,i=o):t==="visiblefill"||t==="fill"?r=!0:t==="visiblestroke"||t==="stroke"?i=!0:(t==="visible"||t==="all")&&(r=!0,i=!0),[r,i]}var H9=1,$9=function(){return H9++},Ia=typeof self=="object"&&self.self==self?self:typeof J.g=="object"&&J.g.global==J.g?J.g:{},V9=Date.now(),U9=function(){return Ia.performance&&typeof Ia.performance.now=="function"?Ia.performance.now():Date.now()-V9},Ju={},xO=Date.now(),X9=function(t){if(typeof t!="function")throw new TypeError(t+" is not a function");var e=Date.now(),n=e-xO,r=n>16?0:16-n,i=$9();return Ju[i]=t,Object.keys(Ju).length>1||setTimeout(function(){xO=e;var a=Ju;Ju={},Object.keys(a).forEach(function(o){return a[o](U9())})},r),i},q9=function(t){delete Ju[t]},Z9=["","webkit","moz","ms","o"],_O=function(t){return typeof t!="string"?X9:t===""?Ia.requestAnimationFrame:Ia[t+"RequestAnimationFrame"]},K9=function(t){return typeof t!="string"?q9:t===""?Ia.cancelAnimationFrame:Ia[t+"CancelAnimationFrame"]||Ia[t+"CancelRequestAnimationFrame"]},Q9=function(t,e){for(var n=0;t[n]!==void 0;){if(e(t[n]))return t[n];n=n+1}},OO=Q9(Z9,function(t){return!!_O(t)}),wO=_O(OO),SO=K9(OO);Ia.requestAnimationFrame=wO,Ia.cancelAnimationFrame=SO;var J9=function(){function t(){this.callbacks=[]}return t.prototype.getCallbacksNum=function(){return this.callbacks.length},t.prototype.tapPromise=function(e,n){this.callbacks.push(n)},t.prototype.promise=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return Promise.all(this.callbacks.map(function(r){return r.apply(void 0,yt([],R(e),!1))}))},t}(),tF=function(){function t(){this.callbacks=[]}return t.prototype.tapPromise=function(e,n){this.callbacks.push(n)},t.prototype.promise=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return Fs(this,void 0,void 0,function(){var r,i,a,o;return zs(this,function(s){switch(s.label){case 0:return this.callbacks.length?[4,(o=this.callbacks)[0].apply(o,yt([],R(e),!1))]:[3,6];case 1:r=s.sent(),i=0,s.label=2;case 2:return i<this.callbacks.length-1?(a=this.callbacks[i],[4,a(r)]):[3,5];case 3:r=s.sent(),s.label=4;case 4:return i++,[3,2];case 5:return[2,r];case 6:return[2,null]}})})},t}(),ci=function(){function t(){this.callbacks=[]}return t.prototype.tap=function(e,n){this.callbacks.push(n)},t.prototype.call=function(){var e=arguments;this.callbacks.forEach(function(n){n.apply(void 0,e)})},t}(),iy=function(){function t(){this.callbacks=[]}return t.prototype.tap=function(e,n){this.callbacks.push(n)},t.prototype.call=function(){if(this.callbacks.length){for(var e=arguments,n=this.callbacks[0].apply(void 0,e),r=0;r<this.callbacks.length-1;r++){var i=this.callbacks[r];n=i(n)}return n}return null},t}(),eF=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],nF=/([\"\'])[^\'\"]+\1/;function rF(t){for(var e=t.fontSize,n=t.fontFamily,r=t.fontStyle,i=t.fontVariant,a=t.fontWeight,o=er(e)&&"".concat(e,"px")||"16px",s=n.split(","),c=s.length-1;c>=0;c--){var l=s[c].trim();!nF.test(l)&&eF.indexOf(l)<0&&(l='"'.concat(l,'"')),s[c]=l}return"".concat(r," ").concat(i," ").concat(a," ").concat(o," ").concat(s.join(","))}var iF=function(){function t(){this.parser=qg,this.parserUnmemoize=fO,this.parserWithCSSDisabled=fO,this.mixer=v9}return t.prototype.calculator=function(e,n,r,i){return r instanceof _i?[]:r},t.prototype.postProcessor=function(e){var n=e.parsedStyle.transform;ey(n,e)},t}(),aF=function(){function t(){this.parser=hO,this.parserUnmemoize=g9}return t}(),oF=function(){function t(){this.parser=Us,this.parserUnmemoize=hl}return t.prototype.calculator=function(e,n,r,i){return r.value},t.prototype.postProcessor=function(e){if(e.parentNode){var n=e.parentNode,r=n.renderable,i=n.sortable;r&&(r.dirty=!0),i&&(i.dirty=!0,i.dirtyReason=fl.Z_INDEX_CHANGED)}},t}(),sF=function(){function t(){}return t.prototype.update=function(e,n){var r=e.r,i=r*2,a=r*2;return{width:i,height:a}},t}(),cF=function(){function t(){}return t.prototype.update=function(e,n){var r=e.rx,i=e.ry,a=r*2,o=i*2;return{width:a,height:o}},t}(),lF=function(){function t(){}return t.prototype.update=function(e){var n=e.x1,r=e.y1,i=e.x2,a=e.y2,o=Math.min(n,i),s=Math.max(n,i),c=Math.min(r,a),l=Math.max(r,a),u=s-o,f=l-c;return{width:u,height:f}},t}(),uF=function(){function t(){}return t.prototype.update=function(e){var n=e.path,r=n.rect,i=r.width,a=r.height;return{width:i,height:a}},t}(),fF=function(){function t(){}return t.prototype.update=function(e){if(e.points&&mr(e.points.points)){var n=e.points.points,r=Math.min.apply(Math,yt([],R(n.map(function(l){return l[0]})),!1)),i=Math.max.apply(Math,yt([],R(n.map(function(l){return l[0]})),!1)),a=Math.min.apply(Math,yt([],R(n.map(function(l){return l[1]})),!1)),o=Math.max.apply(Math,yt([],R(n.map(function(l){return l[1]})),!1)),s=i-r,c=o-a;return{width:s,height:c}}return{width:0,height:0}},t}(),dF=function(){function t(){}return t.prototype.update=function(e,n){var r=e.img,i=e.width,a=i===void 0?0:i,o=e.height,s=o===void 0?0:o,c=a,l=s;return r&&!Dn(r)&&(c||(c=r.width,e.width=c),l||(l=r.height,e.height=l)),{width:c,height:l}},t}(),hF=function(){function t(e){this.globalRuntime=e}return t.prototype.isReadyToMeasure=function(e,n){var r=e.text,i=e.textAlign,a=e.textBaseline,o=e.fontSize,s=e.fontStyle,c=e.fontWeight,l=e.fontVariant,u=e.lineWidth;return r&&o&&s&&c&&l&&i&&a&&!Ft(u)},t.prototype.update=function(e,n){var r,i,a=e.text,o=e.textAlign,s=e.lineWidth,c=e.textBaseline,l=e.dx,u=e.dy;if(!this.isReadyToMeasure(e,n))return e.metrics={font:"",width:0,height:0,lines:[],lineWidths:[],lineHeight:0,maxLineWidth:0,fontProperties:{ascent:0,descent:0,fontSize:0},lineMetrics:[]},{width:0,height:0,x:0,y:0,offsetX:0,offsetY:0};var f=(((i=(r=n==null?void 0:n.ownerDocument)===null||r===void 0?void 0:r.defaultView)===null||i===void 0?void 0:i.getConfig())||{}).offscreenCanvas,d=this.globalRuntime.textService.measureText(a,e,f);e.metrics=d;var h=d.width,p=d.height,v=d.lineHeight,g=d.fontProperties,y=[h/2,p/2,0],m=[0,1],b=0;o==="center"||o==="middle"?(b=s/2,m=[.5,1]):(o==="right"||o==="end")&&(b=s,m=[1,1]);var x=0;return c==="middle"?x=y[1]:c==="top"||c==="hanging"?x=y[1]*2:c==="alphabetic"?x=this.globalRuntime.enableCSSParsing?v-g.ascent:0:(c==="bottom"||c==="ideographic")&&(x=0),l&&(b+=l),u&&(x+=u),e.anchor=[m[0],m[1],0],{width:y[0]*2,height:y[1]*2,offsetX:b,offsetY:x}},t}();function pF(t){return!!t.type}var Ch=function(){function t(e){this.eventPhase=t.prototype.NONE,this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.defaultPrevented=!1,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.layer=new kr,this.page=new kr,this.canvas=new kr,this.viewport=new kr,this.composed=!1,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=e}return Object.defineProperty(t.prototype,"name",{get:function(){return this.type},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"layerX",{get:function(){return this.layer.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"layerY",{get:function(){return this.layer.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pageX",{get:function(){return this.page.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pageY",{get:function(){return this.page.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"x",{get:function(){return this.canvas.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"y",{get:function(){return this.canvas.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"canvasX",{get:function(){return this.canvas.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"canvasY",{get:function(){return this.canvas.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"viewportX",{get:function(){return this.viewport.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"viewportY",{get:function(){return this.viewport.y},enumerable:!1,configurable:!0}),t.prototype.composedPath=function(){return this.manager&&(!this.path||this.path[0]!==this.target)&&(this.path=this.target?this.manager.propagationPath(this.target):[]),this.path},Object.defineProperty(t.prototype,"propagationPath",{get:function(){return this.composedPath()},enumerable:!1,configurable:!0}),t.prototype.preventDefault=function(){this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault(),this.defaultPrevented=!0},t.prototype.stopImmediatePropagation=function(){this.propagationImmediatelyStopped=!0},t.prototype.stopPropagation=function(){this.propagationStopped=!0},t.prototype.initEvent=function(){},t.prototype.initUIEvent=function(){},t.prototype.clone=function(){throw new Error(hn)},t}(),MO=function(t){Yt(e,t);function e(){var n=t.apply(this,yt([],R(arguments),!1))||this;return n.client=new kr,n.movement=new kr,n.offset=new kr,n.global=new kr,n.screen=new kr,n}return Object.defineProperty(e.prototype,"clientX",{get:function(){return this.client.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"clientY",{get:function(){return this.client.y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"movementX",{get:function(){return this.movement.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"movementY",{get:function(){return this.movement.y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"offsetX",{get:function(){return this.offset.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"offsetY",{get:function(){return this.offset.y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"globalX",{get:function(){return this.global.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"globalY",{get:function(){return this.global.y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"screenX",{get:function(){return this.screen.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"screenY",{get:function(){return this.screen.y},enumerable:!1,configurable:!0}),e.prototype.getModifierState=function(n){return"getModifierState"in this.nativeEvent&&this.nativeEvent.getModifierState(n)},e.prototype.initMouseEvent=function(){throw new Error(hn)},e}(Ch),ay=function(t){Yt(e,t);function e(){var n=t.apply(this,yt([],R(arguments),!1))||this;return n.width=0,n.height=0,n.isPrimary=!1,n}return e.prototype.getCoalescedEvents=function(){return this.type==="pointermove"||this.type==="mousemove"||this.type==="touchmove"?[this]:[]},e.prototype.getPredictedEvents=function(){throw new Error("getPredictedEvents is not supported!")},e.prototype.clone=function(){return this.manager.clonePointerEvent(this)},e}(MO),oy=function(t){Yt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.clone=function(){return this.manager.cloneWheelEvent(this)},e}(MO),vn=function(t){Yt(e,t);function e(n,r){var i=t.call(this,null)||this;return i.type=n,i.detail=r,Object.assign(i,r),i}return e}(Ch),EO=":",PO=function(){function t(){this.emitter=new dg}return t.prototype.on=function(e,n,r){return this.addEventListener(e,n,r),this},t.prototype.addEventListener=function(e,n,r){var i=d2(r)&&r||Ys(r)&&r.capture,a=Ys(r)&&r.once,o=ul(n)?void 0:n,s=!1,c="";if(e.indexOf(EO)>-1){var l=R(e.split(EO),2),u=l[0],f=l[1];e=f,c=u,s=!0}if(e=i?"".concat(e,"capture"):e,n=ul(n)?n:n.handleEvent,s){var d=n;n=function(){for(var h,p=[],v=0;v<arguments.length;v++)p[v]=arguments[v];((h=p[0].target)===null||h===void 0?void 0:h.name)===c&&d.apply(void 0,yt([],R(p),!1))}}return a?this.emitter.once(e,n,o):this.emitter.on(e,n,o),this},t.prototype.off=function(e,n,r){return e?this.removeEventListener(e,n,r):this.removeAllEventListeners(),this},t.prototype.removeAllEventListeners=function(){this.emitter.removeAllListeners()},t.prototype.removeEventListener=function(e,n,r){var i=d2(r)&&r||Ys(r)&&r.capture,a=ul(n)?void 0:n;return e=i?"".concat(e,"capture"):e,n=ul(n)?n:n==null?void 0:n.handleEvent,this.emitter.off(e,n,a),this},t.prototype.emit=function(e,n){this.dispatchEvent(new vn(e,n))},t.prototype.dispatchEvent=function(e,n){var r,i;if(n===void 0&&(n=!1),!pF(e))throw new Error("DisplayObject cannot propagate events outside of the Federated Events API");var a;if(this.document?a=this:this.defaultView?a=this.defaultView:a=(r=this.ownerDocument)===null||r===void 0?void 0:r.defaultView,a){if(e.manager=a.getEventService()||null,!e.manager)return!1;e.defaultPrevented=!1,e.path=[],n||(e.target=this),(i=e.manager)===null||i===void 0||i.dispatchEvent(e,e.type,n)}return!e.defaultPrevented},t}(),Lr=function(t){Yt(e,t);function e(){var n=t.apply(this,yt([],R(arguments),!1))||this;return n.shadow=!1,n.ownerDocument=null,n.isConnected=!1,n.baseURI="",n.childNodes=[],n.nodeType=0,n.nodeName="",n.nodeValue=null,n.parentNode=null,n}return e.isNode=function(n){return!!n.childNodes},Object.defineProperty(e.prototype,"textContent",{get:function(){var n,r,i="";this.nodeName===ot.TEXT&&(i+=this.style.text);try{for(var a=Vr(this.childNodes),o=a.next();!o.done;o=a.next()){var s=o.value;s.nodeName===ot.TEXT?i+=s.nodeValue:i+=s.textContent}}catch(c){n={error:c}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return i},set:function(n){var r=this;this.childNodes.slice().forEach(function(i){r.removeChild(i)}),this.nodeName===ot.TEXT&&(this.style.text="".concat(n))},enumerable:!1,configurable:!0}),e.prototype.getRootNode=function(n){return n===void 0&&(n={}),this.parentNode?this.parentNode.getRootNode(n):n.composed&&this.host?this.host.getRootNode(n):this},e.prototype.hasChildNodes=function(){return this.childNodes.length>0},e.prototype.isDefaultNamespace=function(n){throw new Error(hn)},e.prototype.lookupNamespaceURI=function(n){throw new Error(hn)},e.prototype.lookupPrefix=function(n){throw new Error(hn)},e.prototype.normalize=function(){throw new Error(hn)},e.prototype.isEqualNode=function(n){return this===n},e.prototype.isSameNode=function(n){return this.isEqualNode(n)},Object.defineProperty(e.prototype,"parent",{get:function(){return this.parentNode},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentElement",{get:function(){return null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){return null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){return null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"firstChild",{get:function(){return this.childNodes.length>0?this.childNodes[0]:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastChild",{get:function(){return this.childNodes.length>0?this.childNodes[this.childNodes.length-1]:null},enumerable:!1,configurable:!0}),e.prototype.compareDocumentPosition=function(n){var r;if(n===this)return 0;for(var i=n,a=this,o=[i],s=[a];(r=i.parentNode)!==null&&r!==void 0?r:a.parentNode;)i=i.parentNode?(o.push(i.parentNode),i.parentNode):i,a=a.parentNode?(s.push(a.parentNode),a.parentNode):a;if(i!==a)return e.DOCUMENT_POSITION_DISCONNECTED|e.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|e.DOCUMENT_POSITION_PRECEDING;var c=o.length>s.length?o:s,l=c===o?s:o;if(c[c.length-l.length]===l[0])return c===o?e.DOCUMENT_POSITION_CONTAINED_BY|e.DOCUMENT_POSITION_FOLLOWING:e.DOCUMENT_POSITION_CONTAINS|e.DOCUMENT_POSITION_PRECEDING;for(var u=c.length-l.length,f=l.length-1;f>=0;f--){var d=l[f],h=c[u+f];if(h!==d){var p=d.parentNode.childNodes;return p.indexOf(d)<p.indexOf(h)?l===o?e.DOCUMENT_POSITION_PRECEDING:e.DOCUMENT_POSITION_FOLLOWING:c===o?e.DOCUMENT_POSITION_PRECEDING:e.DOCUMENT_POSITION_FOLLOWING}}return e.DOCUMENT_POSITION_FOLLOWING},e.prototype.contain=function(n){return this.contains(n)},e.prototype.contains=function(n){for(var r=n;r&&this!==r;)r=r.parentNode;return!!r},e.prototype.getAncestor=function(n){for(var r=this;n>0&&r;)r=r.parentNode,n--;return r},e.prototype.forEach=function(n,r){r===void 0&&(r=!1),n(this)||(r?this.childNodes.slice():this.childNodes).forEach(function(i){i.forEach(n)})},e.DOCUMENT_POSITION_DISCONNECTED=1,e.DOCUMENT_POSITION_PRECEDING=2,e.DOCUMENT_POSITION_FOLLOWING=4,e.DOCUMENT_POSITION_CONTAINS=8,e.DOCUMENT_POSITION_CONTAINED_BY=16,e.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32,e}(PO),vF=2048,gF=function(){function t(e,n){var r=this;this.globalRuntime=e,this.context=n,this.emitter=new dg,this.nativeHTMLMap=new WeakMap,this.cursor="default",this.mappingTable={},this.mappingState={trackingData:{}},this.eventPool=new Map,this.tmpMatrix=On(),this.tmpVec3=Te(),this.onPointerDown=function(i){var a=r.createPointerEvent(i);if(r.dispatchEvent(a,"pointerdown"),a.pointerType==="touch")r.dispatchEvent(a,"touchstart");else if(a.pointerType==="mouse"||a.pointerType==="pen"){var o=a.button===2;r.dispatchEvent(a,o?"rightdown":"mousedown")}var s=r.trackingData(i.pointerId);s.pressTargetsByButton[i.button]=a.composedPath(),r.freeEvent(a)},this.onPointerUp=function(i){var a,o=ry.now(),s=r.createPointerEvent(i,void 0,void 0,r.context.config.alwaysTriggerPointerEventOnCanvas?r.rootTarget:void 0);if(r.dispatchEvent(s,"pointerup"),s.pointerType==="touch")r.dispatchEvent(s,"touchend");else if(s.pointerType==="mouse"||s.pointerType==="pen"){var c=s.button===2;r.dispatchEvent(s,c?"rightup":"mouseup")}var l=r.trackingData(i.pointerId),u=r.findMountedTarget(l.pressTargetsByButton[i.button]),f=u;if(u&&!s.composedPath().includes(u)){for(var d=u;d&&!s.composedPath().includes(d);){if(s.currentTarget=d,r.notifyTarget(s,"pointerupoutside"),s.pointerType==="touch")r.notifyTarget(s,"touchendoutside");else if(s.pointerType==="mouse"||s.pointerType==="pen"){var c=s.button===2;r.notifyTarget(s,c?"rightupoutside":"mouseupoutside")}Lr.isNode(d)&&(d=d.parentNode)}delete l.pressTargetsByButton[i.button],f=d}if(f){var h=r.clonePointerEvent(s,"click");h.target=f,h.path=[],l.clicksByButton[i.button]||(l.clicksByButton[i.button]={clickCount:0,target:h.target,timeStamp:o});var p=l.clicksByButton[i.button];p.target===h.target&&o-p.timeStamp<200?++p.clickCount:p.clickCount=1,p.target=h.target,p.timeStamp=o,h.detail=p.clickCount,!((a=s.detail)===null||a===void 0)&&a.preventClick||(!r.context.config.useNativeClickEvent&&(h.pointerType==="mouse"||h.pointerType==="touch")&&r.dispatchEvent(h,"click"),r.dispatchEvent(h,"pointertap")),r.freeEvent(h)}r.freeEvent(s)},this.onPointerMove=function(i){var a=r.createPointerEvent(i,void 0,void 0,r.context.config.alwaysTriggerPointerEventOnCanvas?r.rootTarget:void 0),o=a.pointerType==="mouse"||a.pointerType==="pen",s=r.trackingData(i.pointerId),c=r.findMountedTarget(s.overTargets);if(s.overTargets&&c!==a.target){var l=i.type==="mousemove"?"mouseout":"pointerout",u=r.createPointerEvent(i,l,c||void 0);if(r.dispatchEvent(u,"pointerout"),o&&r.dispatchEvent(u,"mouseout"),!a.composedPath().includes(c)){var f=r.createPointerEvent(i,"pointerleave",c||void 0);for(f.eventPhase=f.AT_TARGET;f.target&&!a.composedPath().includes(f.target);)f.currentTarget=f.target,r.notifyTarget(f),o&&r.notifyTarget(f,"mouseleave"),Lr.isNode(f.target)&&(f.target=f.target.parentNode);r.freeEvent(f)}r.freeEvent(u)}if(c!==a.target){var d=i.type==="mousemove"?"mouseover":"pointerover",h=r.clonePointerEvent(a,d);r.dispatchEvent(h,"pointerover"),o&&r.dispatchEvent(h,"mouseover");for(var p=c&&Lr.isNode(c)&&c.parentNode;p&&p!==(Lr.isNode(r.rootTarget)&&r.rootTarget.parentNode)&&p!==a.target;)p=p.parentNode;var v=!p||p===(Lr.isNode(r.rootTarget)&&r.rootTarget.parentNode);if(v){var g=r.clonePointerEvent(a,"pointerenter");for(g.eventPhase=g.AT_TARGET;g.target&&g.target!==c&&g.target!==(Lr.isNode(r.rootTarget)&&r.rootTarget.parentNode);)g.currentTarget=g.target,r.notifyTarget(g),o&&r.notifyTarget(g,"mouseenter"),Lr.isNode(g.target)&&(g.target=g.target.parentNode);r.freeEvent(g)}r.freeEvent(h)}r.dispatchEvent(a,"pointermove"),a.pointerType==="touch"&&r.dispatchEvent(a,"touchmove"),o&&(r.dispatchEvent(a,"mousemove"),r.cursor=r.getCursor(a.target)),s.overTargets=a.composedPath(),r.freeEvent(a)},this.onPointerOut=function(i){var a=r.trackingData(i.pointerId);if(a.overTargets){var o=i.pointerType==="mouse"||i.pointerType==="pen",s=r.findMountedTarget(a.overTargets),c=r.createPointerEvent(i,"pointerout",s||void 0);r.dispatchEvent(c),o&&r.dispatchEvent(c,"mouseout");var l=r.createPointerEvent(i,"pointerleave",s||void 0);for(l.eventPhase=l.AT_TARGET;l.target&&l.target!==(Lr.isNode(r.rootTarget)&&r.rootTarget.parentNode);)l.currentTarget=l.target,r.notifyTarget(l),o&&r.notifyTarget(l,"mouseleave"),Lr.isNode(l.target)&&(l.target=l.target.parentNode);a.overTargets=null,r.freeEvent(c),r.freeEvent(l)}r.cursor=null},this.onPointerOver=function(i){var a=r.trackingData(i.pointerId),o=r.createPointerEvent(i),s=o.pointerType==="mouse"||o.pointerType==="pen";r.dispatchEvent(o,"pointerover"),s&&r.dispatchEvent(o,"mouseover"),o.pointerType==="mouse"&&(r.cursor=r.getCursor(o.target));var c=r.clonePointerEvent(o,"pointerenter");for(c.eventPhase=c.AT_TARGET;c.target&&c.target!==(Lr.isNode(r.rootTarget)&&r.rootTarget.parentNode);)c.currentTarget=c.target,r.notifyTarget(c),s&&r.notifyTarget(c,"mouseenter"),Lr.isNode(c.target)&&(c.target=c.target.parentNode);a.overTargets=o.composedPath(),r.freeEvent(o),r.freeEvent(c)},this.onPointerUpOutside=function(i){var a=r.trackingData(i.pointerId),o=r.findMountedTarget(a.pressTargetsByButton[i.button]),s=r.createPointerEvent(i);if(o){for(var c=o;c;)s.currentTarget=c,r.notifyTarget(s,"pointerupoutside"),s.pointerType==="touch"||(s.pointerType==="mouse"||s.pointerType==="pen")&&r.notifyTarget(s,s.button===2?"rightupoutside":"mouseupoutside"),Lr.isNode(c)&&(c=c.parentNode);delete a.pressTargetsByButton[i.button]}r.freeEvent(s)},this.onWheel=function(i){var a=r.createWheelEvent(i);r.dispatchEvent(a),r.freeEvent(a)},this.onClick=function(i){if(r.context.config.useNativeClickEvent){var a=r.createPointerEvent(i);r.dispatchEvent(a),r.freeEvent(a)}},this.onPointerCancel=function(i){var a=r.createPointerEvent(i,void 0,void 0,r.context.config.alwaysTriggerPointerEventOnCanvas?r.rootTarget:void 0);r.dispatchEvent(a),r.freeEvent(a)}}return t.prototype.init=function(){this.rootTarget=this.context.renderingContext.root.parentNode,this.addEventMapping("pointerdown",this.onPointerDown),this.addEventMapping("pointerup",this.onPointerUp),this.addEventMapping("pointermove",this.onPointerMove),this.addEventMapping("pointerout",this.onPointerOut),this.addEventMapping("pointerleave",this.onPointerOut),this.addEventMapping("pointercancel",this.onPointerCancel),this.addEventMapping("pointerover",this.onPointerOver),this.addEventMapping("pointerupoutside",this.onPointerUpOutside),this.addEventMapping("wheel",this.onWheel),this.addEventMapping("click",this.onClick)},t.prototype.destroy=function(){this.emitter.removeAllListeners(),this.mappingTable={},this.mappingState={},this.eventPool.clear()},t.prototype.client2Viewport=function(e){var n=this.context.contextService.getBoundingClientRect();return new kr(e.x-((n==null?void 0:n.left)||0),e.y-((n==null?void 0:n.top)||0))},t.prototype.viewport2Client=function(e){var n=this.context.contextService.getBoundingClientRect();return new kr(e.x+((n==null?void 0:n.left)||0),e.y+((n==null?void 0:n.top)||0))},t.prototype.viewport2Canvas=function(e){var n=e.x,r=e.y,i=this.rootTarget.defaultView,a=i.getCamera(),o=this.context.config,s=o.width,c=o.height,l=a.getPerspectiveInverse(),u=a.getWorldTransform(),f=Ur(this.tmpMatrix,u,l),d=ga(this.tmpVec3,n/s*2-1,(1-r/c)*2-1,0);return Sr(d,d,f),new kr(d[0],d[1])},t.prototype.canvas2Viewport=function(e){var n=this.rootTarget.defaultView,r=n.getCamera(),i=r.getPerspective(),a=r.getViewTransform(),o=Ur(this.tmpMatrix,i,a),s=ga(this.tmpVec3,e.x,e.y,0);Sr(this.tmpVec3,this.tmpVec3,o);var c=this.context.config,l=c.width,u=c.height;return new kr((s[0]+1)/2*l,(1-(s[1]+1)/2)*u)},t.prototype.setPickHandler=function(e){this.pickHandler=e},t.prototype.addEventMapping=function(e,n){this.mappingTable[e]||(this.mappingTable[e]=[]),this.mappingTable[e].push({fn:n,priority:0}),this.mappingTable[e].sort(function(r,i){return r.priority-i.priority})},t.prototype.mapEvent=function(e){if(this.rootTarget){var n=this.mappingTable[e.type];if(n)for(var r=0,i=n.length;r<i;r++)n[r].fn(e);else console.warn("[EventService]: Event mapping not defined for ".concat(e.type))}},t.prototype.dispatchEvent=function(e,n,r){if(!r)e.propagationStopped=!1,e.propagationImmediatelyStopped=!1,this.propagate(e,n);else{e.eventPhase=e.AT_TARGET;var i=this.rootTarget.defaultView||null;e.currentTarget=i,this.notifyListeners(e,n)}this.emitter.emit(n||e.type,e)},t.prototype.propagate=function(e,n){if(e.target){var r=e.composedPath();e.eventPhase=e.CAPTURING_PHASE;for(var i=r.length-1;i>=1;i--)if(e.currentTarget=r[i],this.notifyTarget(e,n),e.propagationStopped||e.propagationImmediatelyStopped)return;if(e.eventPhase=e.AT_TARGET,e.currentTarget=e.target,this.notifyTarget(e,n),!(e.propagationStopped||e.propagationImmediatelyStopped)){var a=r.indexOf(e.currentTarget);e.eventPhase=e.BUBBLING_PHASE;for(var i=a+1;i<r.length;i++)if(e.currentTarget=r[i],this.notifyTarget(e,n),e.propagationStopped||e.propagationImmediatelyStopped)return}}},t.prototype.propagationPath=function(e){var n=[e],r=this.rootTarget.defaultView||null;if(r&&r===e)return n.unshift(r.document),n;for(var i=0;i<vF&&e!==this.rootTarget;i++)Lr.isNode(e)&&e.parentNode&&(n.push(e.parentNode),e=e.parentNode);return r&&n.push(r),n},t.prototype.hitTest=function(e){var n=e.viewportX,r=e.viewportY,i=this.context.config,a=i.width,o=i.height,s=i.disableHitTesting;return n<0||r<0||n>a||r>o?null:!s&&this.pickHandler(e)||this.rootTarget||null},t.prototype.isNativeEventFromCanvas=function(e,n){var r=n==null?void 0:n.target;if(r!=null&&r.shadowRoot&&(r=n.composedPath()[0]),r){if(r===e)return!0;if(e&&e.contains)return e.contains(r)}return n!=null&&n.composedPath?n.composedPath().indexOf(e)>-1:!1},t.prototype.getExistedHTML=function(e){var n,r;if(e.nativeEvent.composedPath)try{for(var i=Vr(e.nativeEvent.composedPath()),a=i.next();!a.done;a=i.next()){var o=a.value,s=this.nativeHTMLMap.get(o);if(s)return s}}catch(c){n={error:c}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return null},t.prototype.pickTarget=function(e){return this.hitTest({clientX:e.clientX,clientY:e.clientY,viewportX:e.viewportX,viewportY:e.viewportY,x:e.canvasX,y:e.canvasY})},t.prototype.createPointerEvent=function(e,n,r,i){var a=this.allocateEvent(ay);this.copyPointerData(e,a),this.copyMouseData(e,a),this.copyData(e,a),a.nativeEvent=e.nativeEvent,a.originalEvent=e;var o=this.getExistedHTML(a),s=this.context.contextService.getDomElement();return a.target=r!=null?r:o||this.isNativeEventFromCanvas(s,a.nativeEvent)&&this.pickTarget(a)||i,typeof n=="string"&&(a.type=n),a},t.prototype.createWheelEvent=function(e){var n=this.allocateEvent(oy);this.copyWheelData(e,n),this.copyMouseData(e,n),this.copyData(e,n),n.nativeEvent=e.nativeEvent,n.originalEvent=e;var r=this.getExistedHTML(n),i=this.context.contextService.getDomElement();return n.target=r||this.isNativeEventFromCanvas(i,n.nativeEvent)&&this.pickTarget(n),n},t.prototype.trackingData=function(e){return this.mappingState.trackingData[e]||(this.mappingState.trackingData[e]={pressTargetsByButton:{},clicksByButton:{},overTarget:null}),this.mappingState.trackingData[e]},t.prototype.cloneWheelEvent=function(e){var n=this.allocateEvent(oy);return n.nativeEvent=e.nativeEvent,n.originalEvent=e.originalEvent,this.copyWheelData(e,n),this.copyMouseData(e,n),this.copyData(e,n),n.target=e.target,n.path=e.composedPath().slice(),n.type=e.type,n},t.prototype.clonePointerEvent=function(e,n){var r=this.allocateEvent(ay);return r.nativeEvent=e.nativeEvent,r.originalEvent=e.originalEvent,this.copyPointerData(e,r),this.copyMouseData(e,r),this.copyData(e,r),r.target=e.target,r.path=e.composedPath().slice(),r.type=n!=null?n:r.type,r},t.prototype.copyPointerData=function(e,n){n.pointerId=e.pointerId,n.width=e.width,n.height=e.height,n.isPrimary=e.isPrimary,n.pointerType=e.pointerType,n.pressure=e.pressure,n.tangentialPressure=e.tangentialPressure,n.tiltX=e.tiltX,n.tiltY=e.tiltY,n.twist=e.twist},t.prototype.copyMouseData=function(e,n){n.altKey=e.altKey,n.button=e.button,n.buttons=e.buttons,n.ctrlKey=e.ctrlKey,n.metaKey=e.metaKey,n.shiftKey=e.shiftKey,n.client.copyFrom(e.client),n.movement.copyFrom(e.movement),n.canvas.copyFrom(e.canvas),n.screen.copyFrom(e.screen),n.global.copyFrom(e.global),n.offset.copyFrom(e.offset)},t.prototype.copyWheelData=function(e,n){n.deltaMode=e.deltaMode,n.deltaX=e.deltaX,n.deltaY=e.deltaY,n.deltaZ=e.deltaZ},t.prototype.copyData=function(e,n){n.isTrusted=e.isTrusted,n.timeStamp=ry.now(),n.type=e.type,n.detail=e.detail,n.view=e.view,n.page.copyFrom(e.page),n.viewport.copyFrom(e.viewport)},t.prototype.allocateEvent=function(e){this.eventPool.has(e)||this.eventPool.set(e,[]);var n=this.eventPool.get(e).pop()||new e(this);return n.eventPhase=n.NONE,n.currentTarget=null,n.path=[],n.target=null,n},t.prototype.freeEvent=function(e){if(e.manager!==this)throw new Error("It is illegal to free an event not managed by this EventBoundary!");var n=e.constructor;this.eventPool.has(n)||this.eventPool.set(n,[]),this.eventPool.get(n).push(e)},t.prototype.notifyTarget=function(e,n){n=n!=null?n:e.type;var r=e.eventPhase===e.CAPTURING_PHASE||e.eventPhase===e.AT_TARGET?"".concat(n,"capture"):n;this.notifyListeners(e,r),e.eventPhase===e.AT_TARGET&&this.notifyListeners(e,n)},t.prototype.notifyListeners=function(e,n){var r=e.currentTarget.emitter,i=r._events[n];if(i)if("fn"in i)i.once&&r.removeListener(n,i.fn,void 0,!0),i.fn.call(e.currentTarget||i.context,e);else for(var a=0;a<i.length&&!e.propagationImmediatelyStopped;a++)i[a].once&&r.removeListener(n,i[a].fn,void 0,!0),i[a].fn.call(e.currentTarget||i[a].context,e)},t.prototype.findMountedTarget=function(e){if(!e)return null;for(var n=e[e.length-1],r=e.length-2;r>=0;r--){var i=e[r];if(i===this.rootTarget||Lr.isNode(i)&&i.parentNode===n)n=e[r];else break}return n},t.prototype.getCursor=function(e){for(var n=e;n;){var r=D9(n)&&n.getAttribute("cursor");if(r)return r;n=Lr.isNode(n)&&n.parentNode}},t}(),yF=function(){function t(){}return t.prototype.getOrCreateCanvas=function(e,n){if(this.canvas)return this.canvas;if(e||ct.offscreenCanvas)this.canvas=e||ct.offscreenCanvas,this.context=this.canvas.getContext("2d",nt({willReadFrequently:!0},n));else try{this.canvas=new window.OffscreenCanvas(0,0),this.context=this.canvas.getContext("2d",nt({willReadFrequently:!0},n)),(!this.context||!this.context.measureText)&&(this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"))}catch(r){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d",nt({willReadFrequently:!0},n))}return this.canvas.width=10,this.canvas.height=10,this.canvas},t.prototype.getOrCreateContext=function(e,n){return this.context?this.context:(this.getOrCreateCanvas(e,n),this.context)},t}(),$o;(function(t){t[t.CAMERA_CHANGED=0]="CAMERA_CHANGED",t[t.DISPLAY_OBJECT_CHANGED=1]="DISPLAY_OBJECT_CHANGED",t[t.NONE=2]="NONE"})($o||($o={}));var mF=function(){function t(e,n){this.globalRuntime=e,this.context=n,this.inited=!1,this.stats={total:0,rendered:0},this.zIndexCounter=0,this.hooks={init:new ci,initAsync:new J9,dirtycheck:new iy,cull:new iy,beginFrame:new ci,beforeRender:new ci,render:new ci,afterRender:new ci,endFrame:new ci,destroy:new ci,pick:new tF,pickSync:new iy,pointerDown:new ci,pointerUp:new ci,pointerMove:new ci,pointerOut:new ci,pointerOver:new ci,pointerWheel:new ci,pointerCancel:new ci,click:new ci}}return t.prototype.init=function(e){var n=this,r=nt(nt({},this.globalRuntime),this.context);this.context.renderingPlugins.forEach(function(i){i.apply(r,n.globalRuntime)}),this.hooks.init.call(),this.hooks.initAsync.getCallbacksNum()===0?(this.inited=!0,e()):this.hooks.initAsync.promise().then(function(){n.inited=!0,e()})},t.prototype.getStats=function(){return this.stats},t.prototype.disableDirtyRectangleRendering=function(){var e=this.context.config.renderer,n=e.getConfig().enableDirtyRectangleRendering;return!n||this.context.renderingContext.renderReasons.has($o.CAMERA_CHANGED)},t.prototype.render=function(e,n){var r=this;this.stats.total=0,this.stats.rendered=0,this.zIndexCounter=0;var i=this.context.renderingContext;if(this.globalRuntime.sceneGraphService.syncHierarchy(i.root),this.globalRuntime.sceneGraphService.triggerPendingEvents(),i.renderReasons.size&&this.inited){i.dirtyRectangleRenderingDisabled=this.disableDirtyRectangleRendering();var a=i.renderReasons.size===1&&i.renderReasons.has($o.CAMERA_CHANGED),o=!e.disableRenderHooks||!(e.disableRenderHooks&&a);o&&this.renderDisplayObject(i.root,e,i),this.hooks.beginFrame.call(),o&&i.renderListCurrentFrame.forEach(function(s){r.hooks.beforeRender.call(s),r.hooks.render.call(s),r.hooks.afterRender.call(s)}),this.hooks.endFrame.call(),i.renderListCurrentFrame=[],i.renderReasons.clear(),n()}},t.prototype.renderDisplayObject=function(e,n,r){var i=this,a=n.renderer.getConfig(),o=a.enableDirtyCheck,s=a.enableCulling;this.globalRuntime.enableCSSParsing&&this.globalRuntime.styleValueRegistry.recalc(e);var c=e.renderable,l=o?c.dirty||r.dirtyRectangleRenderingDisabled?e:null:e;if(l){var u=s?this.hooks.cull.call(l,this.context.camera):l;u&&(this.stats.rendered++,r.renderListCurrentFrame.push(u))}e.renderable.dirty=!1,e.sortable.renderOrder=this.zIndexCounter++,this.stats.total++;var f=e.sortable;f.dirty&&(this.sort(e,f),f.dirty=!1,f.dirtyChildren=[],f.dirtyReason=void 0),(f.sorted||e.childNodes).forEach(function(d){i.renderDisplayObject(d,n,r)})},t.prototype.sort=function(e,n){n.sorted&&n.dirtyReason!==fl.Z_INDEX_CHANGED?n.dirtyChildren.forEach(function(r){var i=e.childNodes.indexOf(r);if(i===-1){var a=n.sorted.indexOf(r);a>=0&&n.sorted.splice(a,1)}else if(n.sorted.length===0)n.sorted.push(r);else{var o=B9(n.sorted,r);n.sorted.splice(o,0,r)}}):n.sorted=e.childNodes.slice().sort(gO)},t.prototype.destroy=function(){this.inited=!1,this.hooks.destroy.call(),this.globalRuntime.sceneGraphService.clearPendingEvents()},t.prototype.dirtify=function(){this.context.renderingContext.renderReasons.add($o.DISPLAY_OBJECT_CHANGED)},t}(),bF=/\[\s*(.*)=(.*)\s*\]/,xF=function(){function t(){}return t.prototype.selectOne=function(e,n){var r=this;if(e.startsWith("."))return n.find(function(s){return((s==null?void 0:s.classList)||[]).indexOf(r.getIdOrClassname(e))>-1});if(e.startsWith("#"))return n.find(function(s){return s.id===r.getIdOrClassname(e)});if(e.startsWith("[")){var i=this.getAttribute(e),a=i.name,o=i.value;return a?n.find(function(s){return n!==s&&(a==="name"?s.name===o:r.attributeToString(s,a)===o)}):null}else return n.find(function(s){return n!==s&&s.nodeName===e})},t.prototype.selectAll=function(e,n){var r=this;if(e.startsWith("."))return n.findAll(function(s){return n!==s&&((s==null?void 0:s.classList)||[]).indexOf(r.getIdOrClassname(e))>-1});if(e.startsWith("#"))return n.findAll(function(s){return n!==s&&s.id===r.getIdOrClassname(e)});if(e.startsWith("[")){var i=this.getAttribute(e),a=i.name,o=i.value;return a?n.findAll(function(s){return n!==s&&(a==="name"?s.name===o:r.attributeToString(s,a)===o)}):[]}else return n.findAll(function(s){return n!==s&&s.nodeName===e})},t.prototype.is=function(e,n){if(e.startsWith("."))return n.className===this.getIdOrClassname(e);if(e.startsWith("#"))return n.id===this.getIdOrClassname(e);if(e.startsWith("[")){var r=this.getAttribute(e),i=r.name,a=r.value;return i==="name"?n.name===a:this.attributeToString(n,i)===a}else return n.nodeName===e},t.prototype.getIdOrClassname=function(e){return e.substring(1)},t.prototype.getAttribute=function(e){var n=e.match(bF),r="",i="";return n&&n.length>2&&(r=n[1].replace(/"/g,""),i=n[2].replace(/"/g,"")),{name:r,value:i}},t.prototype.attributeToString=function(e,n){if(!e.getAttribute)return"";var r=e.getAttribute(n);return Ft(r)?"":r.toString?r.toString():""},t}(),Vo=function(t){Yt(e,t);function e(n,r,i,a,o,s,c,l){var u=t.call(this,null)||this;return u.relatedNode=r,u.prevValue=i,u.newValue=a,u.attrName=o,u.attrChange=s,u.prevParsedValue=c,u.newParsedValue=l,u.type=n,u}return e.ADDITION=2,e.MODIFICATION=1,e.REMOVAL=3,e}(Ch),oe;(function(t){t.REPARENT="reparent",t.DESTROY="destroy",t.ATTR_MODIFIED="DOMAttrModified",t.INSERTED="DOMNodeInserted",t.REMOVED="removed",t.MOUNTED="DOMNodeInsertedIntoDocument",t.UNMOUNTED="DOMNodeRemovedFromDocument",t.BOUNDS_CHANGED="bounds-changed",t.CULLED="culled"})(oe||(oe={}));function AO(t){var e=t.renderable;e&&(e.renderBoundsDirty=!0,e.boundsDirty=!0)}var _F=new Vo(oe.REPARENT,null,"","","",0,"",""),OF=function(){function t(e){var n=this;this.runtime=e,this.pendingEvents=[],this.boundsChangedEvent=new vn(oe.BOUNDS_CHANGED),this.rotate=function(){var r=lr();return function(i,a,o,s){o===void 0&&(o=0),s===void 0&&(s=0),typeof a=="number"&&(a=Ge(a,o,s));var c=i.transformable;if(i.parentNode===null||!i.parentNode.transformable)n.rotateLocal(i,a);else{var l=lr();sh(l,a[0],a[1],a[2]);var u=n.getRotation(i),f=n.getRotation(i.parentNode);ch(r,f),mg(r,r),Fo(l,r,l),Fo(c.localRotation,l,u),lh(c.localRotation,c.localRotation),n.dirtifyLocal(i,c)}}}(),this.rotateLocal=function(){var r=lr();return function(i,a,o,s){o===void 0&&(o=0),s===void 0&&(s=0),typeof a=="number"&&(a=Ge(a,o,s));var c=i.transformable;sh(r,a[0],a[1],a[2]),Q_(c.localRotation,c.localRotation,r),n.dirtifyLocal(i,c)}}(),this.setEulerAngles=function(){var r=lr();return function(i,a,o,s){o===void 0&&(o=0),s===void 0&&(s=0),typeof a=="number"&&(a=Ge(a,o,s));var c=i.transformable;if(i.parentNode===null||!i.parentNode.transformable)n.setLocalEulerAngles(i,a);else{sh(c.localRotation,a[0],a[1],a[2]);var l=n.getRotation(i.parentNode);ch(r,mg(lr(),l)),Q_(c.localRotation,c.localRotation,r),n.dirtifyLocal(i,c)}}}(),this.translateLocal=function(){return function(r,i,a,o){a===void 0&&(a=0),o===void 0&&(o=0),typeof i=="number"&&(i=Ge(i,a,o));var s=r.transformable;Ru(i,Te())||(GD(i,i,s.localRotation),Jc(s.localPosition,s.localPosition,i),n.dirtifyLocal(r,s))}}(),this.setPosition=function(){var r=On(),i=Te();return function(a,o){var s=a.transformable;if(i[0]=o[0],i[1]=o[1],i[2]=o[2]||0,!Ru(n.getPosition(a),i)){if(mi(s.position,i),a.parentNode===null||!a.parentNode.transformable)mi(s.localPosition,i);else{var c=a.parentNode.transformable;Ws(r,c.worldTransform),Aa(r,r),Sr(s.localPosition,i,r)}n.dirtifyLocal(a,s)}}}(),this.setLocalPosition=function(){var r=Te();return function(i,a){var o=i.transformable;r[0]=a[0],r[1]=a[1],r[2]=a[2]||0,!Ru(o.localPosition,r)&&(mi(o.localPosition,r),n.dirtifyLocal(i,o))}}(),this.translate=function(){var r=Te(),i=Te(),a=Te();return function(o,s,c,l){c===void 0&&(c=0),l===void 0&&(l=0),typeof s=="number"&&(s=ga(i,s,c,l)),!Ru(s,r)&&(Jc(a,n.getPosition(o),s),n.setPosition(o,a))}}(),this.setRotation=function(){var r=lr();return function(i,a,o,s,c){var l=i.transformable;if(typeof a=="number"&&(a=bg(a,o,s,c)),i.parentNode===null||!i.parentNode.transformable)n.setLocalRotation(i,a);else{var u=n.getRotation(i.parentNode);ch(r,u),mg(r,r),Fo(l.localRotation,r,a),lh(l.localRotation,l.localRotation),n.dirtifyLocal(i,l)}}},this.displayObjectDependencyMap=new WeakMap,this.calcLocalTransform=function(){var r=On(),i=Te(),a=bg(0,0,0,1);return function(o){var s=o.localSkew[0]!==0||o.localSkew[1]!==0;if(s){if(Bu(o.localTransform,o.localRotation,o.localPosition,Ge(1,1,1),o.origin),o.localSkew[0]!==0||o.localSkew[1]!==0){var c=Du(r);c[4]=Math.tan(o.localSkew[0]),c[1]=Math.tan(o.localSkew[1]),Ur(o.localTransform,o.localTransform,c)}var l=Bu(r,a,i,o.localScale,o.origin);Ur(o.localTransform,o.localTransform,l)}else Bu(o.localTransform,o.localRotation,o.localPosition,o.localScale,o.origin)}}()}return t.prototype.matches=function(e,n){return this.runtime.sceneGraphSelector.is(e,n)},t.prototype.querySelector=function(e,n){return this.runtime.sceneGraphSelector.selectOne(e,n)},t.prototype.querySelectorAll=function(e,n){return this.runtime.sceneGraphSelector.selectAll(e,n)},t.prototype.attach=function(e,n,r){var i,a,o=!1;e.parentNode&&(o=e.parentNode!==n,this.detach(e)),e.parentNode=n,Ft(r)?e.parentNode.childNodes.push(e):e.parentNode.childNodes.splice(r,0,e);var s=n.sortable;(!((i=s==null?void 0:s.sorted)===null||i===void 0)&&i.length||!((a=e.style)===null||a===void 0)&&a.zIndex)&&(s.dirtyChildren.indexOf(e)===-1&&s.dirtyChildren.push(e),s.dirty=!0,s.dirtyReason=fl.ADDED);var c=e.transformable;c&&this.dirtifyWorld(e,c),c.frozen&&this.unfreezeParentToRoot(e),o&&e.dispatchEvent(_F)},t.prototype.detach=function(e){var n,r;if(e.parentNode){var i=e.transformable,a=e.parentNode.sortable;(!((n=a==null?void 0:a.sorted)===null||n===void 0)&&n.length||!((r=e.style)===null||r===void 0)&&r.zIndex)&&(a.dirtyChildren.indexOf(e)===-1&&a.dirtyChildren.push(e),a.dirty=!0,a.dirtyReason=fl.REMOVED);var o=e.parentNode.childNodes.indexOf(e);o>-1&&e.parentNode.childNodes.splice(o,1),i&&this.dirtifyWorld(e,i),e.parentNode=null}},t.prototype.getOrigin=function(e){return e.transformable.origin},t.prototype.setOrigin=function(e,n,r,i){r===void 0&&(r=0),i===void 0&&(i=0),typeof n=="number"&&(n=[n,r,i]);var a=e.transformable;if(!(n[0]===a.origin[0]&&n[1]===a.origin[1]&&n[2]===a.origin[2])){var o=a.origin;o[0]=n[0],o[1]=n[1],o[2]=n[2]||0,this.dirtifyLocal(e,a)}},t.prototype.setLocalEulerAngles=function(e,n,r,i){r===void 0&&(r=0),i===void 0&&(i=0),typeof n=="number"&&(n=Ge(n,r,i));var a=e.transformable;sh(a.localRotation,n[0],n[1],n[2]),this.dirtifyLocal(e,a)},t.prototype.scaleLocal=function(e,n){var r=e.transformable;BD(r.localScale,r.localScale,Ge(n[0],n[1],n[2]||1)),this.dirtifyLocal(e,r)},t.prototype.setLocalScale=function(e,n){var r=e.transformable,i=Ge(n[0],n[1],n[2]||r.localScale[2]);Ru(i,r.localScale)||(mi(r.localScale,i),this.dirtifyLocal(e,r))},t.prototype.setLocalRotation=function(e,n,r,i,a){typeof n=="number"&&(n=bg(n,r,i,a));var o=e.transformable;ch(o.localRotation,n),this.dirtifyLocal(e,o)},t.prototype.setLocalSkew=function(e,n,r){typeof n=="number"&&(n=N6(n,r));var i=e.transformable;I6(i.localSkew,n),this.dirtifyLocal(e,i)},t.prototype.dirtifyLocal=function(e,n){n.localDirtyFlag||(n.localDirtyFlag=!0,n.dirtyFlag||this.dirtifyWorld(e,n))},t.prototype.dirtifyWorld=function(e,n){n.dirtyFlag||this.unfreezeParentToRoot(e),this.dirtifyWorldInternal(e,n),this.dirtifyToRoot(e,!0)},t.prototype.triggerPendingEvents=function(){var e=this,n=new Set,r=function(i,a){i.isConnected&&!n.has(i.entity)&&(e.boundsChangedEvent.detail=a,e.boundsChangedEvent.target=i,i.isMutationObserved?i.dispatchEvent(e.boundsChangedEvent):i.ownerDocument.defaultView.dispatchEvent(e.boundsChangedEvent,!0),n.add(i.entity))};this.pendingEvents.forEach(function(i){var a=R(i,2),o=a[0],s=a[1];s.affectChildren?o.forEach(function(c){r(c,s)}):r(o,s)}),this.clearPendingEvents(),n.clear()},t.prototype.clearPendingEvents=function(){this.pendingEvents=[]},t.prototype.dirtifyToRoot=function(e,n){n===void 0&&(n=!1);var r=e;for(r.renderable&&(r.renderable.dirty=!0);r;)AO(r),r=r.parentNode;n&&e.forEach(function(i){AO(i)}),this.informDependentDisplayObjects(e),this.pendingEvents.push([e,{affectChildren:n}])},t.prototype.updateDisplayObjectDependency=function(e,n,r,i){if(n&&n!==r){var a=this.displayObjectDependencyMap.get(n);if(a&&a[e]){var o=a[e].indexOf(i);a[e].splice(o,1)}}if(r){var s=this.displayObjectDependencyMap.get(r);s||(this.displayObjectDependencyMap.set(r,{}),s=this.displayObjectDependencyMap.get(r)),s[e]||(s[e]=[]),s[e].push(i)}},t.prototype.informDependentDisplayObjects=function(e){var n=this,r=this.displayObjectDependencyMap.get(e);r&&Object.keys(r).forEach(function(i){r[i].forEach(function(a){n.dirtifyToRoot(a,!0),a.dispatchEvent(new Vo(oe.ATTR_MODIFIED,a,n,n,i,Vo.MODIFICATION,n,n)),a.isCustomElement&&a.isConnected&&a.attributeChangedCallback&&a.attributeChangedCallback(i,n,n)})})},t.prototype.getPosition=function(e){var n=e.transformable;return ah(n.position,this.getWorldTransform(e,n))},t.prototype.getRotation=function(e){var n=e.transformable;return oh(n.rotation,this.getWorldTransform(e,n))},t.prototype.getScale=function(e){var n=e.transformable;return tl(n.scaling,this.getWorldTransform(e,n))},t.prototype.getWorldTransform=function(e,n){return n===void 0&&(n=e.transformable),!n.localDirtyFlag&&!n.dirtyFlag||(e.parentNode&&e.parentNode.transformable&&this.getWorldTransform(e.parentNode),this.sync(e,n)),n.worldTransform},t.prototype.getLocalPosition=function(e){return e.transformable.localPosition},t.prototype.getLocalRotation=function(e){return e.transformable.localRotation},t.prototype.getLocalScale=function(e){return e.transformable.localScale},t.prototype.getLocalSkew=function(e){return e.transformable.localSkew},t.prototype.getLocalTransform=function(e){var n=e.transformable;return n.localDirtyFlag&&(this.calcLocalTransform(n),n.localDirtyFlag=!1),n.localTransform},t.prototype.setLocalTransform=function(e,n){var r=ah(Te(),n),i=oh(lr(),n),a=tl(Te(),n);this.setLocalScale(e,a),this.setLocalPosition(e,r),this.setLocalRotation(e,i)},t.prototype.resetLocalTransform=function(e){this.setLocalScale(e,[1,1,1]),this.setLocalPosition(e,[0,0,0]),this.setLocalEulerAngles(e,[0,0,0]),this.setLocalSkew(e,[0,0])},t.prototype.getTransformedGeometryBounds=function(e,n,r){n===void 0&&(n=!1);var i=this.getGeometryBounds(e,n);if(ur.isEmpty(i))return null;var a=r||new ur;return a.setFromTransformedAABB(i,this.getWorldTransform(e)),a},t.prototype.getGeometryBounds=function(e,n){n===void 0&&(n=!1);var r=e.geometry,i=n?r.renderBounds:r.contentBounds||null;return i||new ur},t.prototype.getBounds=function(e,n){var r=this;n===void 0&&(n=!1);var i=e.renderable;if(!i.boundsDirty&&!n&&i.bounds)return i.bounds;if(!i.renderBoundsDirty&&n&&i.renderBounds)return i.renderBounds;var a=n?i.renderBounds:i.bounds,o=this.getTransformedGeometryBounds(e,n,a),s=e.childNodes;if(s.forEach(function(u){var f=r.getBounds(u,n);f&&(o?o.add(f):(o=a||new ur,o.update(f.center,f.halfExtents)))}),o||(o=new ur),n){var c=yO(e);if(c){var l=c.parsedStyle.clipPath.getBounds(n);o?l&&(o=l.intersection(o)):o.update(l.center,l.halfExtents)}}return n?(i.renderBounds=o,i.renderBoundsDirty=!1):(i.bounds=o,i.boundsDirty=!1),o},t.prototype.getLocalBounds=function(e){if(e.parentNode){var n=On();e.parentNode.transformable&&(n=Aa(On(),this.getWorldTransform(e.parentNode)));var r=this.getBounds(e);if(!ur.isEmpty(r)){var i=new ur;return i.setFromTransformedAABB(r,n),i}}return this.getBounds(e)},t.prototype.getBoundingClientRect=function(e){var n,r,i,a=this.getGeometryBounds(e);ur.isEmpty(a)||(i=new ur,i.setFromTransformedAABB(a,this.getWorldTransform(e)));var o=(r=(n=e.ownerDocument)===null||n===void 0?void 0:n.defaultView)===null||r===void 0?void 0:r.getContextService().getBoundingClientRect();if(i){var s=R(i.getMin(),2),c=s[0],l=s[1],u=R(i.getMax(),2),f=u[0],d=u[1];return new Vs(c+((o==null?void 0:o.left)||0),l+((o==null?void 0:o.top)||0),f-c,d-l)}return new Vs((o==null?void 0:o.left)||0,(o==null?void 0:o.top)||0,0,0)},t.prototype.dirtifyWorldInternal=function(e,n){var r=this;if(!n.dirtyFlag){n.dirtyFlag=!0,n.frozen=!1,e.childNodes.forEach(function(a){var o=a.transformable;o.dirtyFlag||r.dirtifyWorldInternal(a,o)});var i=e.renderable;i&&(i.renderBoundsDirty=!0,i.boundsDirty=!0,i.dirty=!0)}},t.prototype.syncHierarchy=function(e){var n=e.transformable;if(!n.frozen){n.frozen=!0,(n.localDirtyFlag||n.dirtyFlag)&&this.sync(e,n);for(var r=e.childNodes,i=0;i<r.length;i++)this.syncHierarchy(r[i])}},t.prototype.sync=function(e,n){if(n.localDirtyFlag&&(this.calcLocalTransform(n),n.localDirtyFlag=!1),n.dirtyFlag){var r=e.parentNode,i=r&&r.transformable;r===null||!i?Ws(n.worldTransform,n.localTransform):Ur(n.worldTransform,i.worldTransform,n.localTransform),n.dirtyFlag=!1}},t.prototype.unfreezeParentToRoot=function(e){for(var n=e.parentNode;n;){var r=n.transformable;r&&(r.frozen=!1),n=n.parentNode}},t}(),Zs={MetricsString:"|\xC9q\xC5",BaselineSymbol:"M",BaselineMultiplier:1.4,HeightMultiplier:2,Newlines:[10,13],BreakingSpaces:[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288]},TO=/[a-zA-Z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff!"#$%&'()*+,-./:;]/,wF=/[!%),.:;?\]}¢°·'""†‡›℃∶、。〃〆〕〗〞﹚﹜!"%'),.:;?!]}~]/,SF=/[$(£¥·'"〈《「『【〔〖〝﹙﹛$(.[{£¥]/,MF=/[!),.:;?\]}¢·–—'"•"、。〆〞〕〉》」︰︱︲︳﹐﹑﹒﹓﹔﹕﹖﹘﹚﹜!),.:;?︶︸︺︼︾﹀﹂﹗]|}、]/,EF=/[([{£¥'"‵〈《「『〔〝︴﹙﹛({︵︷︹︻︽︿﹁﹃﹏]/,PF=/[)\]}〕〉》」』】〙〗〟'"⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、:;,。.]/,AF=/[([{〔〈《「『【〘〖〝'"⦅«—...‥〳〴〵]/,TF=/[!%),.:;?\]}¢°'"†‡℃〆〈《「『〕!%),.:;?]}]/,CF=/[$([{£¥'"々〇〉》」〔$([{⦆¥₩#]/,kF=new RegExp("".concat(wF.source,"|").concat(MF.source,"|").concat(PF.source,"|").concat(TF.source)),LF=new RegExp("".concat(SF.source,"|").concat(EF.source,"|").concat(AF.source,"|").concat(CF.source)),NF=function(){function t(e){var n=this;this.runtime=e,this.fontMetricsCache={},this.shouldBreakByKinsokuShorui=function(r,i){return n.isBreakingSpace(i)?!1:!!(r&&(LF.exec(i)||kF.exec(r)))},this.trimByKinsokuShorui=function(r){var i=yt([],R(r),!1),a=i[i.length-2];if(!a)return r;var o=a[a.length-1];return i[i.length-2]=a.slice(0,-1),i[i.length-1]=o+i[i.length-1],i}}return t.prototype.measureFont=function(e,n){if(this.fontMetricsCache[e])return this.fontMetricsCache[e];var r={ascent:0,descent:0,fontSize:0},i=this.runtime.offscreenCanvasCreator.getOrCreateCanvas(n),a=this.runtime.offscreenCanvasCreator.getOrCreateContext(n,{willReadFrequently:!0});a.font=e;var o=Zs.MetricsString+Zs.BaselineSymbol,s=Math.ceil(a.measureText(o).width),c=Math.ceil(a.measureText(Zs.BaselineSymbol).width),l=Zs.HeightMultiplier*c;c=c*Zs.BaselineMultiplier|0,i.width=s,i.height=l,a.fillStyle="#f00",a.fillRect(0,0,s,l),a.font=e,a.textBaseline="alphabetic",a.fillStyle="#000",a.fillText(o,0,c);var u=a.getImageData(0,0,s||1,l||1).data,f=u.length,d=s*4,h=0,p=0,v=!1;for(h=0;h<c;++h){for(var g=0;g<d;g+=4)if(u[p+g]!==255){v=!0;break}if(!v)p+=d;else break}for(r.ascent=c-h,p=f-d,v=!1,h=l;h>c;--h){for(var g=0;g<d;g+=4)if(u[p+g]!==255){v=!0;break}if(!v)p-=d;else break}return r.descent=h-c,r.fontSize=r.ascent+r.descent,this.fontMetricsCache[e]=r,r},t.prototype.measureText=function(e,n,r){var i=n.fontSize,a=n.wordWrap,o=n.lineHeight,s=n.lineWidth,c=n.textBaseline,l=n.textAlign,u=n.letterSpacing,f=n.textPath;n.textPathSide,n.textPathStartOffset;var d=n.leading,h=d===void 0?0:d,p=rF(n),v=this.measureFont(p,r);v.fontSize===0&&(v.fontSize=i,v.ascent=i);var g=this.runtime.offscreenCanvasCreator.getOrCreateContext(r);g.font=p,n.isOverflowing=!1;var y=a?this.wordWrap(e,n,r):e,m=y.split(/(?:\r\n|\r|\n)/),b=new Array(m.length),x=0;if(f){f.getTotalLength();for(var _=0;_<m.length;_++)var O=g.measureText(m[_]).width+(m[_].length-1)*u}else{for(var _=0;_<m.length;_++){var w=g.measureText(m[_]).width+(m[_].length-1)*u;b[_]=w,x=Math.max(x,w)}var O=x+s,S=o||v.fontSize+s,M=Math.max(S,v.fontSize+s)+(m.length-1)*(S+h);S+=h;var E=0;return c==="middle"?E=-M/2:c==="bottom"||c==="alphabetic"||c==="ideographic"?E=-M:(c==="top"||c==="hanging")&&(E=0),{font:p,width:O,height:M,lines:m,lineWidths:b,lineHeight:S,maxLineWidth:x,fontProperties:v,lineMetrics:b.map(function(L,A){var T=0;return l==="center"||l==="middle"?T-=L/2:(l==="right"||l==="end")&&(T-=L),new Vs(T-s/2,E+A*S,L+s,S)})}}},t.prototype.setGraphemeOnPath=function(){},t.prototype.wordWrap=function(e,n,r){var i=this,a=n.wordWrapWidth,o=a===void 0?0:a,s=n.letterSpacing,c=n.maxLines,l=c===void 0?1/0:c,u=n.textOverflow,f=this.runtime.offscreenCanvasCreator.getOrCreateContext(r),d=o+s,h="";u==="ellipsis"?h="...":u&&u!=="clip"&&(h=u);for(var p=[],v=0,g=0,y={},m=function(C){return i.getFromCache(C,s,y,f)},b=Array.from(h).reduce(function(C,N){return C+m(N)},0),x=Array.from(e),_=0;_<x.length;_++){var O=x[_],w=e[_-1],S=e[_+1],M=m(O);if(this.isNewline(O)){if(v++,v>=l){n.isOverflowing=!0;break}g=0,p[v]="";continue}if(g>0&&g+M>d){if(v+1>=l){if(n.isOverflowing=!0,b>0&&b<=d){for(var E=p[v].length,P=0,L=E,A=0;A<E;A++){var T=m(p[v][A]);if(P+T+b>d){L=A;break}P+=T}p[v]=(p[v]||"").slice(0,L)+h}break}if(v++,g=0,p[v]="",this.isBreakingSpace(O))continue;this.canBreakInLastChar(O)||(p=this.trimToBreakable(p),g=this.sumTextWidthByCache(p[v]||"",y)),this.shouldBreakByKinsokuShorui(O,S)&&(p=this.trimByKinsokuShorui(p),g+=m(w||""))}g+=M,p[v]=(p[v]||"")+O}return p.join(`
`)},t.prototype.isBreakingSpace=function(e){return typeof e!="string"?!1:Zs.BreakingSpaces.indexOf(e.charCodeAt(0))>=0},t.prototype.isNewline=function(e){return typeof e!="string"?!1:Zs.Newlines.indexOf(e.charCodeAt(0))>=0},t.prototype.trimToBreakable=function(e){var n=yt([],R(e),!1),r=n[n.length-2],i=this.findBreakableIndex(r);if(i===-1||!r)return n;var a=r.slice(i,i+1),o=this.isBreakingSpace(a),s=i+1,c=i+(o?0:1);return n[n.length-1]+=r.slice(s,r.length),n[n.length-2]=r.slice(0,c),n},t.prototype.canBreakInLastChar=function(e){return!(e&&TO.test(e))},t.prototype.sumTextWidthByCache=function(e,n){return e.split("").reduce(function(r,i){if(!n[i])throw Error("cannot count the word without cache");return r+n[i]},0)},t.prototype.findBreakableIndex=function(e){for(var n=e.length-1;n>=0;n--)if(!TO.test(e[n]))return n;return-1},t.prototype.getFromCache=function(e,n,r,i){var a=r[e];if(typeof a!="number"){var o=e.length*n;a=i.measureText(e).width+o,r[e]=a}return a},t}(),ct={},IF=function(){var t,e=new dF,n=new fF;return t={},t[ot.CIRCLE]=new sF,t[ot.ELLIPSE]=new cF,t[ot.RECT]=e,t[ot.IMAGE]=e,t[ot.GROUP]=e,t[ot.LINE]=new lF,t[ot.TEXT]=new hF(ct),t[ot.POLYLINE]=n,t[ot.POLYGON]=n,t[ot.PATH]=new uF,t[ot.HTML]=null,t[ot.MESH]=null,t}(),jF=function(){var t,e=new _9,n=new ty;return t={},t[kt.PERCENTAGE]=null,t[kt.NUMBER]=new P9,t[kt.ANGLE]=new b9,t[kt.DEFINED_PATH]=new x9,t[kt.PAINT]=e,t[kt.COLOR]=e,t[kt.FILTER]=new O9,t[kt.LENGTH]=n,t[kt.LENGTH_PERCENTAGE]=n,t[kt.LENGTH_PERCENTAGE_12]=new w9,t[kt.LENGTH_PERCENTAGE_14]=new S9,t[kt.COORDINATE]=new M9,t[kt.OFFSET_DISTANCE]=new A9,t[kt.OPACITY_VALUE]=new T9,t[kt.PATH]=new C9,t[kt.LIST_OF_POINTS]=new k9,t[kt.SHADOW_BLUR]=new L9,t[kt.TEXT]=new N9,t[kt.TEXT_TRANSFORM]=new I9,t[kt.TRANSFORM]=new iF,t[kt.TRANSFORM_ORIGIN]=new aF,t[kt.Z_INDEX]=new oF,t[kt.MARKER]=new E9,t}(),RF=function(){return typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof J.g!="undefined"?J.g:{}};ct.CameraContribution=H2,ct.AnimationTimeline=null,ct.EasingFunction=null,ct.offscreenCanvasCreator=new yF,ct.sceneGraphSelector=new xF,ct.sceneGraphService=new OF(ct),ct.textService=new NF(ct),ct.geometryUpdaterFactory=IF,ct.CSSPropertySyntaxFactory=jF,ct.styleValueRegistry=new m9(ct),ct.layoutRegistry=null,ct.globalThis=RF(),ct.enableCSSParsing=!0,ct.enableDataset=!1,ct.enableStyleSyntax=!0,ct.enableSizeAttenuation=!1;var CO=0;function Xvt(){CO=0}var kO=new Vo(oe.INSERTED,null,"","","",0,"",""),LO=new Vo(oe.REMOVED,null,"","","",0,"",""),DF=new vn(oe.DESTROY),BF=function(t){Yt(e,t);function e(){var n=t.apply(this,yt([],R(arguments),!1))||this;return n.entity=CO++,n.renderable={bounds:void 0,boundsDirty:!0,renderBounds:void 0,renderBoundsDirty:!0,dirtyRenderBounds:void 0,dirty:!1},n.cullable={strategy:zg.Standard,visibilityPlaneMask:-1,visible:!0,enable:!0},n.transformable={dirtyFlag:!1,localDirtyFlag:!1,frozen:!1,localPosition:[0,0,0],localRotation:[0,0,0,1],localScale:[1,1,1],localTransform:[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],localSkew:[0,0],position:[0,0,0],rotation:[0,0,0,1],scaling:[1,1,1],worldTransform:[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],origin:[0,0,0]},n.sortable={dirty:!1,sorted:void 0,renderOrder:0,dirtyChildren:[],dirtyReason:void 0},n.geometry={contentBounds:void 0,renderBounds:void 0},n.rBushNode={aabb:void 0},n.namespaceURI="g",n.scrollLeft=0,n.scrollTop=0,n.clientTop=0,n.clientLeft=0,n.destroyed=!1,n.style={},n.computedStyle=ct.enableCSSParsing?{anchor:wn,opacity:wn,fillOpacity:wn,strokeOpacity:wn,fill:wn,stroke:wn,transform:wn,transformOrigin:wn,visibility:wn,pointerEvents:wn,lineWidth:wn,lineCap:wn,lineJoin:wn,increasedLineWidthForHitTesting:wn,fontSize:wn,fontFamily:wn,fontStyle:wn,fontWeight:wn,fontVariant:wn,textAlign:wn,textBaseline:wn,textTransform:wn,zIndex:wn,filter:wn,shadowType:wn}:null,n.parsedStyle={},n.attributes={},n}return Object.defineProperty(e.prototype,"className",{get:function(){return this.getAttribute("class")||""},set:function(n){this.setAttribute("class",n)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"classList",{get:function(){return this.className.split(" ").filter(function(n){return n!==""})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tagName",{get:function(){return this.nodeName},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"children",{get:function(){return this.childNodes},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"childElementCount",{get:function(){return this.childNodes.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"firstElementChild",{get:function(){return this.firstChild},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastElementChild",{get:function(){return this.lastChild},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentElement",{get:function(){return this.parentNode},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){if(this.parentNode){var n=this.parentNode.childNodes.indexOf(this);return this.parentNode.childNodes[n+1]||null}return null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){if(this.parentNode){var n=this.parentNode.childNodes.indexOf(this);return this.parentNode.childNodes[n-1]||null}return null},enumerable:!1,configurable:!0}),e.prototype.cloneNode=function(n){throw new Error(hn)},e.prototype.appendChild=function(n,r){var i;if(n.destroyed)throw new Error(hB);return ct.sceneGraphService.attach(n,this,r),!((i=this.ownerDocument)===null||i===void 0)&&i.defaultView&&this.ownerDocument.defaultView.mountChildren(n),kO.relatedNode=this,n.dispatchEvent(kO),n},e.prototype.insertBefore=function(n,r){if(!r)this.appendChild(n);else{n.parentElement&&n.parentElement.removeChild(n);var i=this.childNodes.indexOf(r);i===-1?this.appendChild(n):this.appendChild(n,i)}return n},e.prototype.replaceChild=function(n,r){var i=this.childNodes.indexOf(r);return this.removeChild(r),this.appendChild(n,i),r},e.prototype.removeChild=function(n){var r;return LO.relatedNode=this,n.dispatchEvent(LO),!((r=n.ownerDocument)===null||r===void 0)&&r.defaultView&&n.ownerDocument.defaultView.unmountChildren(n),ct.sceneGraphService.detach(n),n},e.prototype.removeChildren=function(){for(var n=this.childNodes.length-1;n>=0;n--){var r=this.childNodes[n];this.removeChild(r)}},e.prototype.destroyChildren=function(){for(var n=this.childNodes.length-1;n>=0;n--){var r=this.childNodes[n];r.childNodes.length&&r.destroyChildren(),r.destroy()}},e.prototype.matches=function(n){return ct.sceneGraphService.matches(n,this)},e.prototype.getElementById=function(n){return ct.sceneGraphService.querySelector("#".concat(n),this)},e.prototype.getElementsByName=function(n){return ct.sceneGraphService.querySelectorAll('[name="'.concat(n,'"]'),this)},e.prototype.getElementsByClassName=function(n){return ct.sceneGraphService.querySelectorAll(".".concat(n),this)},e.prototype.getElementsByTagName=function(n){return ct.sceneGraphService.querySelectorAll(n,this)},e.prototype.querySelector=function(n){return ct.sceneGraphService.querySelector(n,this)},e.prototype.querySelectorAll=function(n){return ct.sceneGraphService.querySelectorAll(n,this)},e.prototype.closest=function(n){var r=this;do{if(ct.sceneGraphService.matches(n,r))return r;r=r.parentElement}while(r!==null);return null},e.prototype.find=function(n){var r=this,i=null;return this.forEach(function(a){return a!==r&&n(a)?(i=a,!0):!1}),i},e.prototype.findAll=function(n){var r=this,i=[];return this.forEach(function(a){a!==r&&n(a)&&i.push(a)}),i},e.prototype.after=function(){for(var n=this,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];if(this.parentNode){var a=this.parentNode.childNodes.indexOf(this);r.forEach(function(o,s){var c;return(c=n.parentNode)===null||c===void 0?void 0:c.appendChild(o,a+s+1)})}},e.prototype.before=function(){for(var n,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];if(this.parentNode){var a=this.parentNode.childNodes.indexOf(this),o=R(r),s=o[0],c=o.slice(1);this.parentNode.appendChild(s,a),(n=s).after.apply(n,yt([],R(c),!1))}},e.prototype.replaceWith=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];this.after.apply(this,yt([],R(n),!1)),this.remove()},e.prototype.append=function(){for(var n=this,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];r.forEach(function(a){return n.appendChild(a)})},e.prototype.prepend=function(){for(var n=this,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];r.forEach(function(a,o){return n.appendChild(a,o)})},e.prototype.replaceChildren=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];for(;this.childNodes.length&&this.firstChild;)this.removeChild(this.firstChild);this.append.apply(this,yt([],R(n),!1))},e.prototype.remove=function(){return this.parentNode?this.parentNode.removeChild(this):this},e.prototype.destroy=function(){this.dispatchEvent(DF),this.remove(),this.emitter.removeAllListeners(),this.destroyed=!0},e.prototype.getGeometryBounds=function(){return ct.sceneGraphService.getGeometryBounds(this)},e.prototype.getRenderBounds=function(){return ct.sceneGraphService.getBounds(this,!0)},e.prototype.getBounds=function(){return ct.sceneGraphService.getBounds(this)},e.prototype.getLocalBounds=function(){return ct.sceneGraphService.getLocalBounds(this)},e.prototype.getBoundingClientRect=function(){return ct.sceneGraphService.getBoundingClientRect(this)},e.prototype.getClientRects=function(){return[this.getBoundingClientRect()]},e.prototype.computedStyleMap=function(){return new Map(Object.entries(this.computedStyle))},e.prototype.getAttributeNames=function(){return Object.keys(this.attributes)},e.prototype.getAttribute=function(n){if(OB(n))return ct.enableCSSParsing?null:void 0;var r=this.attributes[n];if(r===void 0){var i=Ig(n);return r=this.attributes[i],ct.enableCSSParsing&&Ft(r)?null:r}else return r},e.prototype.hasAttribute=function(n){return this.getAttributeNames().includes(n)},e.prototype.hasAttributes=function(){return!!this.getAttributeNames().length},e.prototype.removeAttribute=function(n){this.setAttribute(n,null),delete this.attributes[n]},e.prototype.setAttribute=function(n,r,i){this.attributes[n]=r},e.prototype.getAttributeNS=function(n,r){throw new Error(hn)},e.prototype.getAttributeNode=function(n){throw new Error(hn)},e.prototype.getAttributeNodeNS=function(n,r){throw new Error(hn)},e.prototype.hasAttributeNS=function(n,r){throw new Error(hn)},e.prototype.removeAttributeNS=function(n,r){throw new Error(hn)},e.prototype.removeAttributeNode=function(n){throw new Error(hn)},e.prototype.setAttributeNS=function(n,r,i){throw new Error(hn)},e.prototype.setAttributeNode=function(n){throw new Error(hn)},e.prototype.setAttributeNodeNS=function(n){throw new Error(hn)},e.prototype.toggleAttribute=function(n,r){throw new Error(hn)},e}(Lr);function $e(t){return!!(t!=null&&t.nodeName)}var lo=new Vo(oe.ATTR_MODIFIED,null,null,null,null,Vo.MODIFICATION,null,null),FF={anchor:"",opacity:"",fillOpacity:"",strokeOpacity:"",fill:"",stroke:"",transform:"",transformOrigin:"",visibility:"",pointerEvents:"",lineWidth:"",lineCap:"",lineJoin:"",increasedLineWidthForHitTesting:"",fontSize:"",fontFamily:"",fontStyle:"",fontWeight:"",fontVariant:"",textAlign:"",textBaseline:"",textTransform:"",zIndex:"",filter:"",shadowType:""},NO={anchor:[0,0],fill:Fg,stroke:Fg,transform:[],zIndex:0,filter:[],shadowType:"outer",miterLimit:10},zF=nt(nt({},NO),{opacity:1,fillOpacity:1,strokeOpacity:1,visibility:"visible",pointerEvents:"auto",lineWidth:1,lineCap:"butt",lineJoin:"miter",increasedLineWidthForHitTesting:0,fillRule:"nonzero"}),GF=["opacity","fillOpacity","strokeOpacity","transformOrigin","visibility","pointerEvents","lineWidth","lineCap","lineJoin","increasedLineWidthForHitTesting"],WF=yt(yt([],R(GF),!1),["fontSize","fontFamily","fontStyle","fontWeight","fontVariant","textAlign","textBaseline","textTransform"],!1),IO="data-",qr=function(t){Yt(e,t);function e(n){var r,i=t.call(this)||this;i.isCustomElement=!1,i.isMutationObserved=!1,i.activeAnimations=[],i.getClip=function(){return this.style.clipPath||null},i.config=n,i.config.interactive=(r=i.config.capture)!==null&&r!==void 0?r:i.config.interactive,i.id=i.config.id||"",i.name=i.config.name||"",(i.config.className||i.config.class)&&(i.className=i.config.className||i.config.class),i.nodeName=i.config.type||ot.GROUP,i.config.style=i.config.style||i.config.attrs||{},Object.assign(i.config.style,i.config.attrs),i.config.visible!=null&&(i.config.style.visibility=i.config.visible===!1?"hidden":"visible"),i.config.interactive!=null&&(i.config.style.pointerEvents=i.config.interactive===!1?"none":"auto"),Object.assign(i.parsedStyle,ct.enableCSSParsing?NO:zF,i.config.initialParsedStyle),ct.enableCSSParsing&&Object.assign(i.attributes,FF),i.initAttributes(i.config.style);var a=ct.globalThis.Proxy?ct.globalThis.Proxy:function(){};return ct.enableDataset&&(i.dataset=new a({},{get:function(o,s){var c="".concat(IO).concat(U2(s));return o[c]!==void 0?o[c]:i.getAttribute(c)},set:function(o,s,c){return i.setAttribute("".concat(IO).concat(U2(s)),c),!0}})),ct.enableStyleSyntax&&(i.style=new a({setProperty:function(o,s){i.setAttribute(o,s)},getPropertyValue:function(o){return i.getAttribute(o)},removeProperty:function(o){i.removeAttribute(o)},item:function(){return""}},{get:function(o,s){return o[s]!==void 0?o[s]:i.getAttribute(s)},set:function(o,s,c){return i.setAttribute(s,c),!0}})),i}return e.prototype.destroy=function(){t.prototype.destroy.call(this),this.getAnimations().forEach(function(n){n.cancel()})},e.prototype.cloneNode=function(n,r){var i=nt({},this.attributes);for(var a in i){var o=i[a];$e(o)&&a!=="clipPath"&&a!=="offsetPath"&&a!=="textPath"&&(i[a]=o.cloneNode(n)),r&&(i[a]=r(a,o))}var s=new this.constructor({id:this.id,name:this.name,className:this.name,interactive:this.interactive,style:i});return s.setLocalTransform(this.getLocalTransform()),n&&this.children.forEach(function(c){if(!c.style.isMarker){var l=c.cloneNode(n);s.appendChild(l)}}),s},e.prototype.initAttributes=function(n){n===void 0&&(n={});var r=this.renderable,i={forceUpdateGeometry:!0};ct.enableCSSParsing&&(i.usedAttributes=WF);var a={};for(var o in n){var s=Ig(o);a[s]=n[o]}ct.styleValueRegistry.processProperties(this,a,i),r.dirty=!0},e.prototype.setAttribute=function(n,r,i,a){i===void 0&&(i=!1),a===void 0&&(a=!0);var o=Ig(n);Cn(r)||(i||r!==this.attributes[o])&&(this.internalSetAttribute(o,r,{memoize:a}),t.prototype.setAttribute.call(this,o,r))},e.prototype.internalSetAttribute=function(n,r,i){var a;i===void 0&&(i={});var o=this.renderable,s=this.attributes[n],c=this.parsedStyle[n];ct.styleValueRegistry.processProperties(this,(a={},a[n]=r,a),i),o.dirty=!0;var l=this.parsedStyle[n];this.isConnected&&(lo.relatedNode=this,lo.prevValue=s,lo.newValue=r,lo.attrName=n,lo.prevParsedValue=c,lo.newParsedValue=l,this.isMutationObserved?this.dispatchEvent(lo):(lo.target=this,this.ownerDocument.defaultView.dispatchEvent(lo,!0))),(this.isCustomElement&&this.isConnected||!this.isCustomElement)&&this.attributeChangedCallback&&this.attributeChangedCallback(n,s,r,c,l)},e.prototype.getBBox=function(){var n=this.getBounds(),r=R(n.getMin(),2),i=r[0],a=r[1],o=R(n.getMax(),2),s=o[0],c=o[1];return new Vs(i,a,s-i,c-a)},e.prototype.setOrigin=function(n,r,i){return r===void 0&&(r=0),i===void 0&&(i=0),ct.sceneGraphService.setOrigin(this,si(n,r,i)),this},e.prototype.getOrigin=function(){return ct.sceneGraphService.getOrigin(this)},e.prototype.setPosition=function(n,r,i){return r===void 0&&(r=0),i===void 0&&(i=0),ct.sceneGraphService.setPosition(this,si(n,r,i)),this},e.prototype.setLocalPosition=function(n,r,i){return r===void 0&&(r=0),i===void 0&&(i=0),ct.sceneGraphService.setLocalPosition(this,si(n,r,i)),this},e.prototype.translate=function(n,r,i){return r===void 0&&(r=0),i===void 0&&(i=0),ct.sceneGraphService.translate(this,si(n,r,i)),this},e.prototype.translateLocal=function(n,r,i){return r===void 0&&(r=0),i===void 0&&(i=0),ct.sceneGraphService.translateLocal(this,si(n,r,i)),this},e.prototype.getPosition=function(){return ct.sceneGraphService.getPosition(this)},e.prototype.getLocalPosition=function(){return ct.sceneGraphService.getLocalPosition(this)},e.prototype.scale=function(n,r,i){return this.scaleLocal(n,r,i)},e.prototype.scaleLocal=function(n,r,i){return typeof n=="number"&&(r=r||n,i=i||n,n=si(n,r,i)),ct.sceneGraphService.scaleLocal(this,n),this},e.prototype.setLocalScale=function(n,r,i){return typeof n=="number"&&(r=r||n,i=i||n,n=si(n,r,i)),ct.sceneGraphService.setLocalScale(this,n),this},e.prototype.getLocalScale=function(){return ct.sceneGraphService.getLocalScale(this)},e.prototype.getScale=function(){return ct.sceneGraphService.getScale(this)},e.prototype.getEulerAngles=function(){var n=R(Tg(Te(),ct.sceneGraphService.getWorldTransform(this)),3),r=n[2];return Xi(r)},e.prototype.getLocalEulerAngles=function(){var n=R(Tg(Te(),ct.sceneGraphService.getLocalRotation(this)),3),r=n[2];return Xi(r)},e.prototype.setEulerAngles=function(n){return ct.sceneGraphService.setEulerAngles(this,0,0,n),this},e.prototype.setLocalEulerAngles=function(n){return ct.sceneGraphService.setLocalEulerAngles(this,0,0,n),this},e.prototype.rotateLocal=function(n,r,i){return Ft(r)&&Ft(i)?ct.sceneGraphService.rotateLocal(this,0,0,n):ct.sceneGraphService.rotateLocal(this,n,r,i),this},e.prototype.rotate=function(n,r,i){return Ft(r)&&Ft(i)?ct.sceneGraphService.rotate(this,0,0,n):ct.sceneGraphService.rotate(this,n,r,i),this},e.prototype.setRotation=function(n,r,i,a){return ct.sceneGraphService.setRotation(this,n,r,i,a),this},e.prototype.setLocalRotation=function(n,r,i,a){return ct.sceneGraphService.setLocalRotation(this,n,r,i,a),this},e.prototype.setLocalSkew=function(n,r){return ct.sceneGraphService.setLocalSkew(this,n,r),this},e.prototype.getRotation=function(){return ct.sceneGraphService.getRotation(this)},e.prototype.getLocalRotation=function(){return ct.sceneGraphService.getLocalRotation(this)},e.prototype.getLocalSkew=function(){return ct.sceneGraphService.getLocalSkew(this)},e.prototype.getLocalTransform=function(){return ct.sceneGraphService.getLocalTransform(this)},e.prototype.getWorldTransform=function(){return ct.sceneGraphService.getWorldTransform(this)},e.prototype.setLocalTransform=function(n){return ct.sceneGraphService.setLocalTransform(this,n),this},e.prototype.resetLocalTransform=function(){ct.sceneGraphService.resetLocalTransform(this)},e.prototype.getAnimations=function(){return this.activeAnimations},e.prototype.animate=function(n,r){var i,a=(i=this.ownerDocument)===null||i===void 0?void 0:i.timeline;return a?a.play(this,n,r):null},e.prototype.isVisible=function(){var n;return((n=this.parsedStyle)===null||n===void 0?void 0:n.visibility)==="visible"},Object.defineProperty(e.prototype,"interactive",{get:function(){return this.isInteractive()},set:function(n){this.style.pointerEvents=n?"auto":"none"},enumerable:!1,configurable:!0}),e.prototype.isInteractive=function(){var n;return((n=this.parsedStyle)===null||n===void 0?void 0:n.pointerEvents)!=="none"},e.prototype.isCulled=function(){return!!(this.cullable&&this.cullable.enable&&!this.cullable.visible)},e.prototype.toFront=function(){return this.parentNode&&(this.style.zIndex=Math.max.apply(Math,yt([],R(this.parentNode.children.map(function(n){return Number(n.style.zIndex)})),!1))+1),this},e.prototype.toBack=function(){return this.parentNode&&(this.style.zIndex=Math.min.apply(Math,yt([],R(this.parentNode.children.map(function(n){return Number(n.style.zIndex)})),!1))-1),this},e.prototype.getConfig=function(){return this.config},e.prototype.attr=function(){for(var n=this,r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var a=R(r,2),o=a[0],s=a[1];return o?Ys(o)?(Object.keys(o).forEach(function(c){n.setAttribute(c,o[c])}),this):r.length===2?(this.setAttribute(o,s),this):this.attributes[o]:this.attributes},e.prototype.getMatrix=function(n){var r=n||this.getWorldTransform(),i=R(ah(Te(),r),2),a=i[0],o=i[1],s=R(tl(Te(),r),2),c=s[0],l=s[1],u=oh(lr(),r),f=R(Tg(Te(),u),3),d=f[0],h=f[2];return oB(d||h,a,o,c,l)},e.prototype.getLocalMatrix=function(){return this.getMatrix(this.getLocalTransform())},e.prototype.setMatrix=function(n){var r=R(z2(n),5),i=r[0],a=r[1],o=r[2],s=r[3],c=r[4];this.setEulerAngles(c).setPosition(i,a).setLocalScale(o,s)},e.prototype.setLocalMatrix=function(n){var r=R(z2(n),5),i=r[0],a=r[1],o=r[2],s=r[3],c=r[4];this.setLocalEulerAngles(c).setLocalPosition(i,a).setLocalScale(o,s)},e.prototype.show=function(){ct.enableCSSParsing?this.style.visibility="visible":this.forEach(function(n){n.style.visibility="visible"})},e.prototype.hide=function(){ct.enableCSSParsing?this.style.visibility="hidden":this.forEach(function(n){n.style.visibility="hidden"})},e.prototype.getCount=function(){return this.childElementCount},e.prototype.getParent=function(){return this.parentElement},e.prototype.getChildren=function(){return this.children},e.prototype.getFirst=function(){return this.firstElementChild},e.prototype.getLast=function(){return this.lastElementChild},e.prototype.getChildByIndex=function(n){return this.children[n]||null},e.prototype.add=function(n,r){return this.appendChild(n,r)},e.prototype.setClip=function(n){this.style.clipPath=n},e.prototype.set=function(n,r){this.config[n]=r},e.prototype.get=function(n){return this.config[n]},e.prototype.moveTo=function(n,r,i){return r===void 0&&(r=0),i===void 0&&(i=0),this.setPosition(n,r,i),this},e.prototype.move=function(n,r,i){return r===void 0&&(r=0),i===void 0&&(i=0),this.setPosition(n,r,i),this},e.prototype.setZIndex=function(n){return this.style.zIndex=n,this},e}(BF),jO={number:function(t){return new pn(t)},percent:function(t){return new pn(t,"%")},px:function(t){return new pn(t,"px")},em:function(t){return new pn(t,"em")},rem:function(t){return new pn(t,"rem")},deg:function(t){return new pn(t,"deg")},grad:function(t){return new pn(t,"grad")},rad:function(t){return new pn(t,"rad")},turn:function(t){return new pn(t,"turn")},s:function(t){return new pn(t,"s")},ms:function(t){return new pn(t,"ms")},registerProperty:function(t){var e=t.name,n=t.inherits,r=t.interpolable,i=t.initialValue,a=t.syntax;ct.styleValueRegistry.registerMetadata({n:e,inh:n,int:r,d:i,syntax:a})},registerLayout:function(t,e){ct.layoutRegistry.registerLayout(t,e)}},Ks=function(t){Yt(e,t);function e(n){n===void 0&&(n={});var r=n.style,i=rn(n,["style"]);return t.call(this,nt({type:ot.CIRCLE,style:ct.enableCSSParsing?nt({cx:"",cy:"",r:""},r):nt({},r),initialParsedStyle:{anchor:[.5,.5],transformOrigin:ct.enableCSSParsing?null:[wh,wh]}},i))||this}return e}(qr),kh=function(t){Yt(e,t);function e(n){n===void 0&&(n={});var r=this,i=n.style,a=rn(n,["style"]);return r=t.call(this,nt({style:ct.enableCSSParsing?nt({x:"",y:""},i):nt({},i)},a))||this,r.isCustomElement=!0,r}return e}(qr),sy=function(t){Yt(e,t);function e(n){n===void 0&&(n={});var r=n.style,i=rn(n,["style"]);return t.call(this,nt({type:ot.ELLIPSE,style:ct.enableCSSParsing?nt({cx:"",cy:"",rx:"",ry:""},r):nt({},r),initialParsedStyle:{anchor:[.5,.5],transformOrigin:ct.enableCSSParsing?null:[wh,wh]}},i))||this}return e}(qr),Er=function(t){Yt(e,t);function e(n){n===void 0&&(n={});var r=n.style,i=rn(n,["style"]);return t.call(this,nt({type:ot.GROUP,style:ct.enableCSSParsing?nt({x:"",y:"",width:"",height:""},r):nt({},r)},i))||this}return e}(qr),Lh=function(t){Yt(e,t);function e(n){n===void 0&&(n={});var r=this,i=n.style,a=rn(n,["style"]);return r=t.call(this,nt({type:ot.HTML,style:ct.enableCSSParsing?nt({x:"",y:"",width:"auto",height:"auto",innerHTML:""},i):nt({},i)},a))||this,r.cullable.enable=!1,r}return e.prototype.getDomElement=function(){return this.parsedStyle.$el},e.prototype.getBoundingClientRect=function(){if(this.parsedStyle.$el)return this.parsedStyle.$el.getBoundingClientRect();var n=this.parsedStyle,r=n.x,i=n.y,a=n.width,o=n.height;return new Vs(r,i,a,o)},e.prototype.getClientRects=function(){return[this.getBoundingClientRect()]},e.prototype.getBounds=function(){var n,r,i=this.getBoundingClientRect(),a=(r=(n=this.ownerDocument)===null||n===void 0?void 0:n.defaultView)===null||r===void 0?void 0:r.getContextService().getBoundingClientRect(),o=new ur,s=i.left-((a==null?void 0:a.left)||0),c=i.top-((a==null?void 0:a.top)||0);return o.setMinMax([s,c,0],[s+i.width,c+i.height,0]),o},e.prototype.getLocalBounds=function(){if(this.parentNode){var n=Aa(On(),this.parentNode.getWorldTransform()),r=this.getBounds();if(!ur.isEmpty(r)){var i=new ur;return i.setFromTransformedAABB(r,n),i}}return this.getBounds()},e}(qr),cy=function(t){Yt(e,t);function e(n){n===void 0&&(n={});var r=n.style,i=rn(n,["style"]);return t.call(this,nt({type:ot.IMAGE,style:ct.enableCSSParsing?nt({x:"",y:"",img:"",width:"",height:""},r):nt({},r)},i))||this}return e}(qr),tf=function(t){Yt(e,t);function e(n){n===void 0&&(n={});var r=this,i=n.style,a=rn(n,["style"]);r=t.call(this,nt({type:ot.LINE,style:nt({x1:0,y1:0,x2:0,y2:0,z1:0,z2:0},i)},a))||this,r.markerStartAngle=0,r.markerEndAngle=0;var o=r.parsedStyle,s=o.markerStart,c=o.markerEnd;return s&&$e(s)&&(r.markerStartAngle=s.getLocalEulerAngles(),r.appendChild(s)),c&&$e(c)&&(r.markerEndAngle=c.getLocalEulerAngles(),r.appendChild(c)),r.transformMarker(!0),r.transformMarker(!1),r}return e.prototype.attributeChangedCallback=function(n,r,i,a,o){n==="x1"||n==="y1"||n==="x2"||n==="y2"||n==="markerStartOffset"||n==="markerEndOffset"?(this.transformMarker(!0),this.transformMarker(!1)):n==="markerStart"?(a&&$e(a)&&(this.markerStartAngle=0,a.remove()),o&&$e(o)&&(this.markerStartAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!0))):n==="markerEnd"&&(a&&$e(a)&&(this.markerEndAngle=0,a.remove()),o&&$e(o)&&(this.markerEndAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!1)))},e.prototype.transformMarker=function(n){var r=this.parsedStyle,i=r.markerStart,a=r.markerEnd,o=r.markerStartOffset,s=r.markerEndOffset,c=r.x1,l=r.x2,u=r.y1,f=r.y2,d=r.defX,h=r.defY,p=n?i:a;if(!(!p||!$e(p))){var v=0,g,y,m,b,x,_;n?(m=c-d,b=u-h,g=l-c,y=f-u,x=o||0,_=this.markerStartAngle):(m=l-d,b=f-h,g=c-l,y=u-f,x=s||0,_=this.markerEndAngle),v=Math.atan2(y,g),p.setLocalEulerAngles(v*180/Math.PI+_),p.setLocalPosition(m+Math.cos(v)*x,b+Math.sin(v)*x)}},e.prototype.getPoint=function(n,r){r===void 0&&(r=!1);var i=this.parsedStyle,a=i.x1,o=i.y1,s=i.x2,c=i.y2,l=i.defX,u=i.defY,f=ka(a,o,s,c,n),d=f.x,h=f.y,p=Sr(Te(),Ge(d-l,h-u,0),r?this.getWorldTransform():this.getLocalTransform());return new kr(p[0],p[1])},e.prototype.getPointAtLength=function(n,r){return r===void 0&&(r=!1),this.getPoint(n/this.getTotalLength(),r)},e.prototype.getTotalLength=function(){var n=this.parsedStyle,r=n.x1,i=n.y1,a=n.x2,o=n.y2;return P2(r,i,a,o)},e}(qr),Zr=function(t){Yt(e,t);function e(n){n===void 0&&(n={});var r=this,i=n.style,a=rn(n,["style"]);r=t.call(this,nt({type:ot.PATH,style:ct.enableCSSParsing?nt({path:"",miterLimit:""},i):nt({},i),initialParsedStyle:ct.enableCSSParsing?null:{miterLimit:4,path:nt({},q2)}},a))||this,r.markerStartAngle=0,r.markerEndAngle=0,r.markerMidList=[];var o=r.parsedStyle,s=o.markerStart,c=o.markerEnd,l=o.markerMid;return s&&$e(s)&&(r.markerStartAngle=s.getLocalEulerAngles(),r.appendChild(s)),l&&$e(l)&&r.placeMarkerMid(l),c&&$e(c)&&(r.markerEndAngle=c.getLocalEulerAngles(),r.appendChild(c)),r.transformMarker(!0),r.transformMarker(!1),r}return e.prototype.attributeChangedCallback=function(n,r,i,a,o){n==="path"?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):n==="markerStartOffset"||n==="markerEndOffset"?(this.transformMarker(!0),this.transformMarker(!1)):n==="markerStart"?(a&&$e(a)&&(this.markerStartAngle=0,a.remove()),o&&$e(o)&&(this.markerStartAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!0))):n==="markerEnd"?(a&&$e(a)&&(this.markerEndAngle=0,a.remove()),o&&$e(o)&&(this.markerEndAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!1))):n==="markerMid"&&this.placeMarkerMid(o)},e.prototype.transformMarker=function(n){var r=this.parsedStyle,i=r.markerStart,a=r.markerEnd,o=r.markerStartOffset,s=r.markerEndOffset,c=r.defX,l=r.defY,u=n?i:a;if(!(!u||!$e(u))){var f=0,d,h,p,v,g,y;if(n){var m=R(this.getStartTangent(),2),b=m[0],x=m[1];p=x[0]-c,v=x[1]-l,d=b[0]-x[0],h=b[1]-x[1],g=o||0,y=this.markerStartAngle}else{var _=R(this.getEndTangent(),2),b=_[0],x=_[1];p=x[0]-c,v=x[1]-l,d=b[0]-x[0],h=b[1]-x[1],g=s||0,y=this.markerEndAngle}f=Math.atan2(h,d),u.setLocalEulerAngles(f*180/Math.PI+y),u.setLocalPosition(p+Math.cos(f)*g,v+Math.sin(f)*g)}},e.prototype.placeMarkerMid=function(n){var r=this.parsedStyle,i=r.path.segments,a=r.defX,o=r.defY;if(this.markerMidList.forEach(function(d){d.remove()}),n&&$e(n))for(var s=1;s<i.length-1;s++){var c=R(i[s].currentPoint,2),l=c[0],u=c[1],f=s===1?n:n.cloneNode(!0);this.markerMidList.push(f),this.appendChild(f),f.setLocalPosition(l-a,u-o)}},e.prototype.getTotalLength=function(){return $g(this)},e.prototype.getPointAtLength=function(n,r){r===void 0&&(r=!1);var i=this.parsedStyle,a=i.defX,o=i.defY,s=i.path.absolutePath,c=_8(s,n),l=c.x,u=c.y,f=Sr(Te(),Ge(l-a,u-o,0),r?this.getWorldTransform():this.getLocalTransform());return new kr(f[0],f[1])},e.prototype.getPoint=function(n,r){return r===void 0&&(r=!1),this.getPointAtLength(n*$g(this),r)},e.prototype.getStartTangent=function(){var n=this.parsedStyle.path.segments,r=[];if(n.length>1){var i=n[0].currentPoint,a=n[1].currentPoint,o=n[1].startTangent;r=[],o?(r.push([i[0]-o[0],i[1]-o[1]]),r.push([i[0],i[1]])):(r.push([a[0],a[1]]),r.push([i[0],i[1]]))}return r},e.prototype.getEndTangent=function(){var n=this.parsedStyle.path.segments,r=n.length,i=[];if(r>1){var a=n[r-2].currentPoint,o=n[r-1].currentPoint,s=n[r-1].endTangent;i=[],s?(i.push([o[0]-s[0],o[1]-s[1]]),i.push([o[0],o[1]])):(i.push([a[0],a[1]]),i.push([o[0],o[1]]))}return i},e}(qr),ef=function(t){Yt(e,t);function e(n){n===void 0&&(n={});var r=this,i=n.style,a=rn(n,["style"]);r=t.call(this,nt({type:ot.POLYGON,style:ct.enableCSSParsing?nt({points:"",miterLimit:"",isClosed:!0},i):nt({},i),initialParsedStyle:ct.enableCSSParsing?null:{points:{points:[],totalLength:0,segments:[]},miterLimit:4,isClosed:!0}},a))||this,r.markerStartAngle=0,r.markerEndAngle=0,r.markerMidList=[];var o=r.parsedStyle,s=o.markerStart,c=o.markerEnd,l=o.markerMid;return s&&$e(s)&&(r.markerStartAngle=s.getLocalEulerAngles(),r.appendChild(s)),l&&$e(l)&&r.placeMarkerMid(l),c&&$e(c)&&(r.markerEndAngle=c.getLocalEulerAngles(),r.appendChild(c)),r.transformMarker(!0),r.transformMarker(!1),r}return e.prototype.attributeChangedCallback=function(n,r,i,a,o){n==="points"?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):n==="markerStartOffset"||n==="markerEndOffset"?(this.transformMarker(!0),this.transformMarker(!1)):n==="markerStart"?(a&&$e(a)&&(this.markerStartAngle=0,a.remove()),o&&$e(o)&&(this.markerStartAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!0))):n==="markerEnd"?(a&&$e(a)&&(this.markerEndAngle=0,a.remove()),o&&$e(o)&&(this.markerEndAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!1))):n==="markerMid"&&this.placeMarkerMid(o)},e.prototype.transformMarker=function(n){var r=this.parsedStyle,i=r.markerStart,a=r.markerEnd,o=r.markerStartOffset,s=r.markerEndOffset,c=r.points,l=r.defX,u=r.defY,f=(c||{}).points,d=n?i:a;if(!(!d||!$e(d)||!f)){var h=0,p,v,g,y,m,b;if(g=f[0][0]-l,y=f[0][1]-u,n)p=f[1][0]-f[0][0],v=f[1][1]-f[0][1],m=o||0,b=this.markerStartAngle;else{var x=f.length;this.parsedStyle.isClosed?(p=f[x-1][0]-f[0][0],v=f[x-1][1]-f[0][1]):(g=f[x-1][0]-l,y=f[x-1][1]-u,p=f[x-2][0]-f[x-1][0],v=f[x-2][1]-f[x-1][1]),m=s||0,b=this.markerEndAngle}h=Math.atan2(v,p),d.setLocalEulerAngles(h*180/Math.PI+b),d.setLocalPosition(g+Math.cos(h)*m,y+Math.sin(h)*m)}},e.prototype.placeMarkerMid=function(n){var r=this.parsedStyle,i=r.points,a=r.defX,o=r.defY,s=(i||{}).points;if(this.markerMidList.forEach(function(d){d.remove()}),this.markerMidList=[],n&&$e(n)&&s)for(var c=1;c<(this.parsedStyle.isClosed?s.length:s.length-1);c++){var l=s[c][0]-a,u=s[c][1]-o,f=c===1?n:n.cloneNode(!0);this.markerMidList.push(f),this.appendChild(f),f.setLocalPosition(l,u)}},e}(qr),ly=function(t){Yt(e,t);function e(n){n===void 0&&(n={});var r=n.style,i=rn(n,["style"]);return t.call(this,nt({type:ot.POLYLINE,style:ct.enableCSSParsing?nt({points:"",miterLimit:"",isClosed:!1},r):nt({},r),initialParsedStyle:ct.enableCSSParsing?null:{points:{points:[],totalLength:0,segments:[]},miterLimit:4,isClosed:!1}},i))||this}return e.prototype.getTotalLength=function(){return this.parsedStyle.points.totalLength},e.prototype.getPointAtLength=function(n,r){return r===void 0&&(r=!1),this.getPoint(n/this.getTotalLength(),r)},e.prototype.getPoint=function(n,r){r===void 0&&(r=!1);var i=this.parsedStyle,a=i.defX,o=i.defY,s=i.points,c=s.points,l=s.segments,u=0,f=0;l.forEach(function(g,y){n>=g[0]&&n<=g[1]&&(u=(n-g[0])/(g[1]-g[0]),f=y)});var d=ka(c[f][0],c[f][1],c[f+1][0],c[f+1][1],u),h=d.x,p=d.y,v=Sr(Te(),Ge(h-a,p-o,0),r?this.getWorldTransform():this.getLocalTransform());return new kr(v[0],v[1])},e.prototype.getStartTangent=function(){var n=this.parsedStyle.points.points,r=[];return r.push([n[1][0],n[1][1]]),r.push([n[0][0],n[0][1]]),r},e.prototype.getEndTangent=function(){var n=this.parsedStyle.points.points,r=n.length-1,i=[];return i.push([n[r-1][0],n[r-1][1]]),i.push([n[r][0],n[r][1]]),i},e}(ef),Qs=function(t){Yt(e,t);function e(n){n===void 0&&(n={});var r=n.style,i=rn(n,["style"]);return t.call(this,nt({type:ot.RECT,style:ct.enableCSSParsing?nt({x:"",y:"",width:"",height:"",radius:""},r):nt({},r)},i))||this}return e}(qr),Di=function(t){Yt(e,t);function e(n){n===void 0&&(n={});var r=n.style,i=rn(n,["style"]);return t.call(this,nt({type:ot.TEXT,style:ct.enableCSSParsing?nt({x:"",y:"",text:"",fontSize:"",fontFamily:"",fontStyle:"",fontWeight:"",fontVariant:"",textAlign:"",textBaseline:"",textTransform:"",fill:"black",letterSpacing:"",lineHeight:"",miterLimit:"",wordWrap:!1,wordWrapWidth:0,leading:0,dx:"",dy:""},r):nt({fill:"black"},r),initialParsedStyle:ct.enableCSSParsing?{}:{x:0,y:0,fontSize:16,fontFamily:"sans-serif",fontStyle:"normal",fontWeight:"normal",fontVariant:"normal",lineHeight:0,letterSpacing:0,textBaseline:"alphabetic",textAlign:"start",wordWrap:!1,wordWrapWidth:0,leading:0,dx:0,dy:0}},i))||this}return e.prototype.getComputedTextLength=function(){var n;return((n=this.parsedStyle.metrics)===null||n===void 0?void 0:n.maxLineWidth)||0},e.prototype.getLineBoundingRects=function(){var n;return((n=this.parsedStyle.metrics)===null||n===void 0?void 0:n.lineMetrics)||[]},e.prototype.isOverflowing=function(){return!!this.parsedStyle.isOverflowing},e}(qr),YF=function(){function t(){this.registry={},this.define(ot.CIRCLE,Ks),this.define(ot.ELLIPSE,sy),this.define(ot.RECT,Qs),this.define(ot.IMAGE,cy),this.define(ot.LINE,tf),this.define(ot.GROUP,Er),this.define(ot.PATH,Zr),this.define(ot.POLYGON,ef),this.define(ot.POLYLINE,ly),this.define(ot.TEXT,Di),this.define(ot.HTML,Lh)}return t.prototype.define=function(e,n){this.registry[e]=n},t.prototype.get=function(e){return this.registry[e]},t}(),HF=function(t){Yt(e,t);function e(){var n=t.call(this)||this;n.defaultView=null,n.ownerDocument=null,n.nodeName="document";try{n.timeline=new ct.AnimationTimeline(n)}catch(i){}var r={};return Jg.forEach(function(i){var a=i.n,o=i.inh,s=i.d;o&&s&&(r[a]=ul(s)?s(ot.GROUP):s)}),n.documentElement=new Er({id:"g-root",style:r}),n.documentElement.ownerDocument=n,n.documentElement.parentNode=n,n.childNodes=[n.documentElement],n}return Object.defineProperty(e.prototype,"children",{get:function(){return this.childNodes},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"childElementCount",{get:function(){return this.childNodes.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"firstElementChild",{get:function(){return this.firstChild},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastElementChild",{get:function(){return this.lastChild},enumerable:!1,configurable:!0}),e.prototype.createElement=function(n,r){if(n==="svg")return this.documentElement;var i=this.defaultView.customElements.get(n);i||(console.warn("Unsupported tagName: ",n),i=n==="tspan"?Di:Er);var a=new i(r);return a.ownerDocument=this,a},e.prototype.createElementNS=function(n,r,i){return this.createElement(r,i)},e.prototype.cloneNode=function(n){throw new Error(hn)},e.prototype.destroy=function(){try{this.documentElement.destroyChildren(),this.timeline.destroy()}catch(n){}},e.prototype.elementsFromBBox=function(n,r,i,a){var o=this.defaultView.context.rBushRoot,s=o.search({minX:n,minY:r,maxX:i,maxY:a}),c=[];return s.forEach(function(l){var u=l.displayObject,f=u.parsedStyle.pointerEvents,d=["auto","visiblepainted","visiblefill","visiblestroke","visible"].includes(f);(!d||d&&u.isVisible())&&!u.isCulled()&&u.isInteractive()&&c.push(u)}),c.sort(function(l,u){return u.sortable.renderOrder-l.sortable.renderOrder}),c},e.prototype.elementFromPointSync=function(n,r){var i=this.defaultView.canvas2Viewport({x:n,y:r}),a=i.x,o=i.y,s=this.defaultView.getConfig(),c=s.width,l=s.height;if(a<0||o<0||a>c||o>l)return null;var u=this.defaultView.viewport2Client({x:a,y:o}),f=u.x,d=u.y,h=this.defaultView.getRenderingService().hooks.pickSync.call({topmost:!0,position:{x:n,y:r,viewportX:a,viewportY:o,clientX:f,clientY:d},picked:[]}).picked;return h&&h[0]||this.documentElement},e.prototype.elementFromPoint=function(n,r){return Fs(this,void 0,void 0,function(){var i,a,o,s,c,l,u,f,d,h;return zs(this,function(p){switch(p.label){case 0:return i=this.defaultView.canvas2Viewport({x:n,y:r}),a=i.x,o=i.y,s=this.defaultView.getConfig(),c=s.width,l=s.height,a<0||o<0||a>c||o>l?[2,null]:(u=this.defaultView.viewport2Client({x:a,y:o}),f=u.x,d=u.y,[4,this.defaultView.getRenderingService().hooks.pick.promise({topmost:!0,position:{x:n,y:r,viewportX:a,viewportY:o,clientX:f,clientY:d},picked:[]})]);case 1:return h=p.sent().picked,[2,h&&h[0]||this.documentElement]}})})},e.prototype.elementsFromPointSync=function(n,r){var i=this.defaultView.canvas2Viewport({x:n,y:r}),a=i.x,o=i.y,s=this.defaultView.getConfig(),c=s.width,l=s.height;if(a<0||o<0||a>c||o>l)return[];var u=this.defaultView.viewport2Client({x:a,y:o}),f=u.x,d=u.y,h=this.defaultView.getRenderingService().hooks.pickSync.call({topmost:!1,position:{x:n,y:r,viewportX:a,viewportY:o,clientX:f,clientY:d},picked:[]}).picked;return h[h.length-1]!==this.documentElement&&h.push(this.documentElement),h},e.prototype.elementsFromPoint=function(n,r){return Fs(this,void 0,void 0,function(){var i,a,o,s,c,l,u,f,d,h;return zs(this,function(p){switch(p.label){case 0:return i=this.defaultView.canvas2Viewport({x:n,y:r}),a=i.x,o=i.y,s=this.defaultView.getConfig(),c=s.width,l=s.height,a<0||o<0||a>c||o>l?[2,[]]:(u=this.defaultView.viewport2Client({x:a,y:o}),f=u.x,d=u.y,[4,this.defaultView.getRenderingService().hooks.pick.promise({topmost:!1,position:{x:n,y:r,viewportX:a,viewportY:o,clientX:f,clientY:d},picked:[]})]);case 1:return h=p.sent().picked,h[h.length-1]!==this.documentElement&&h.push(this.documentElement),[2,h]}})})},e.prototype.appendChild=function(n,r){throw new Error(ll)},e.prototype.insertBefore=function(n,r){throw new Error(ll)},e.prototype.removeChild=function(n,r){throw new Error(ll)},e.prototype.replaceChild=function(n,r,i){throw new Error(ll)},e.prototype.append=function(){throw new Error(ll)},e.prototype.prepend=function(){throw new Error(ll)},e.prototype.getElementById=function(n){return this.documentElement.getElementById(n)},e.prototype.getElementsByName=function(n){return this.documentElement.getElementsByName(n)},e.prototype.getElementsByTagName=function(n){return this.documentElement.getElementsByTagName(n)},e.prototype.getElementsByClassName=function(n){return this.documentElement.getElementsByClassName(n)},e.prototype.querySelector=function(n){return this.documentElement.querySelector(n)},e.prototype.querySelectorAll=function(n){return this.documentElement.querySelectorAll(n)},e.prototype.find=function(n){return this.documentElement.find(n)},e.prototype.findAll=function(n){return this.documentElement.findAll(n)},e}(Lr),$F=function(){function t(e){this.strategies=e}return t.prototype.apply=function(e){var n=e.camera,r=e.renderingService,i=e.renderingContext,a=this.strategies;r.hooks.cull.tap(t.tag,function(o){if(o){var s=o.cullable;return a.length===0?s.visible=i.unculledEntities.indexOf(o.entity)>-1:s.visible=a.every(function(c){return c.isVisible(n,o)}),!o.isCulled()&&o.isVisible()?o:(o.dispatchEvent(new vn(oe.CULLED)),null)}return o}),r.hooks.afterRender.tap(t.tag,function(o){o.cullable.visibilityPlaneMask=-1})},t.tag="Culling",t}(),VF=function(){function t(){var e=this;this.autoPreventDefault=!1,this.rootPointerEvent=new ay(null),this.rootWheelEvent=new oy(null),this.onPointerMove=function(n){var r,i,a,o,s=(o=(a=e.context.renderingContext.root)===null||a===void 0?void 0:a.ownerDocument)===null||o===void 0?void 0:o.defaultView;if(!(s.supportsTouchEvents&&n.pointerType==="touch")){var c=e.normalizeToPointerEvent(n,s);try{for(var l=Vr(c),u=l.next();!u.done;u=l.next()){var f=u.value,d=e.bootstrapEvent(e.rootPointerEvent,f,s,n);e.context.eventService.mapEvent(d)}}catch(h){r={error:h}}finally{try{u&&!u.done&&(i=l.return)&&i.call(l)}finally{if(r)throw r.error}}e.setCursor(e.context.eventService.cursor)}},this.onClick=function(n){var r,i,a,o,s=(o=(a=e.context.renderingContext.root)===null||a===void 0?void 0:a.ownerDocument)===null||o===void 0?void 0:o.defaultView,c=e.normalizeToPointerEvent(n,s);try{for(var l=Vr(c),u=l.next();!u.done;u=l.next()){var f=u.value,d=e.bootstrapEvent(e.rootPointerEvent,f,s,n);e.context.eventService.mapEvent(d)}}catch(h){r={error:h}}finally{try{u&&!u.done&&(i=l.return)&&i.call(l)}finally{if(r)throw r.error}}e.setCursor(e.context.eventService.cursor)}}return t.prototype.apply=function(e){var n=this;this.context=e;var r=e.renderingService,i=this.context.renderingContext.root.ownerDocument.defaultView;this.context.eventService.setPickHandler(function(a){var o=n.context.renderingService.hooks.pickSync.call({position:a,picked:[],topmost:!0}).picked;return o[0]||null}),r.hooks.pointerWheel.tap(t.tag,function(a){var o=n.normalizeWheelEvent(a);n.context.eventService.mapEvent(o)}),r.hooks.pointerDown.tap(t.tag,function(a){var o,s;if(!(i.supportsTouchEvents&&a.pointerType==="touch")){var c=n.normalizeToPointerEvent(a,i);if(n.autoPreventDefault&&c[0].isNormalized){var l=a.cancelable||!("cancelable"in a);l&&a.preventDefault()}try{for(var u=Vr(c),f=u.next();!f.done;f=u.next()){var d=f.value,h=n.bootstrapEvent(n.rootPointerEvent,d,i,a);n.context.eventService.mapEvent(h)}}catch(p){o={error:p}}finally{try{f&&!f.done&&(s=u.return)&&s.call(u)}finally{if(o)throw o.error}}n.setCursor(n.context.eventService.cursor)}}),r.hooks.pointerUp.tap(t.tag,function(a){var o,s;if(!(i.supportsTouchEvents&&a.pointerType==="touch")){var c=n.context.contextService.getDomElement(),l=n.context.eventService.isNativeEventFromCanvas(c,a),u=l?"":"outside",f=n.normalizeToPointerEvent(a,i);try{for(var d=Vr(f),h=d.next();!h.done;h=d.next()){var p=h.value,v=n.bootstrapEvent(n.rootPointerEvent,p,i,a);v.type+=u,n.context.eventService.mapEvent(v)}}catch(g){o={error:g}}finally{try{h&&!h.done&&(s=d.return)&&s.call(d)}finally{if(o)throw o.error}}n.setCursor(n.context.eventService.cursor)}}),r.hooks.pointerMove.tap(t.tag,this.onPointerMove),r.hooks.pointerOver.tap(t.tag,this.onPointerMove),r.hooks.pointerOut.tap(t.tag,this.onPointerMove),r.hooks.click.tap(t.tag,this.onClick),r.hooks.pointerCancel.tap(t.tag,function(a){var o,s,c=n.normalizeToPointerEvent(a,i);try{for(var l=Vr(c),u=l.next();!u.done;u=l.next()){var f=u.value,d=n.bootstrapEvent(n.rootPointerEvent,f,i,a);n.context.eventService.mapEvent(d)}}catch(h){o={error:h}}finally{try{u&&!u.done&&(s=l.return)&&s.call(l)}finally{if(o)throw o.error}}n.setCursor(n.context.eventService.cursor)})},t.prototype.getViewportXY=function(e){var n,r,i=e.offsetX,a=e.offsetY,o=e.clientX,s=e.clientY;if(this.context.config.supportsCSSTransform&&!Ft(i)&&!Ft(a))n=i,r=a;else{var c=this.context.eventService.client2Viewport(new kr(o,s));n=c.x,r=c.y}return{x:n,y:r}},t.prototype.bootstrapEvent=function(e,n,r,i){e.view=r,e.originalEvent=null,e.nativeEvent=i,e.pointerId=n.pointerId,e.width=n.width,e.height=n.height,e.isPrimary=n.isPrimary,e.pointerType=n.pointerType,e.pressure=n.pressure,e.tangentialPressure=n.tangentialPressure,e.tiltX=n.tiltX,e.tiltY=n.tiltY,e.twist=n.twist,this.transferMouseData(e,n);var a=this.getViewportXY(n),o=a.x,s=a.y;e.viewport.x=o,e.viewport.y=s;var c=this.context.eventService.viewport2Canvas(e.viewport),l=c.x,u=c.y;return e.canvas.x=l,e.canvas.y=u,e.global.copyFrom(e.canvas),e.offset.copyFrom(e.canvas),e.isTrusted=i.isTrusted,e.type==="pointerleave"&&(e.type="pointerout"),e.type.startsWith("mouse")&&(e.type=e.type.replace("mouse","pointer")),e.type.startsWith("touch")&&(e.type=Y9[e.type]||e.type),e},t.prototype.normalizeWheelEvent=function(e){var n=this.rootWheelEvent;this.transferMouseData(n,e),n.deltaMode=e.deltaMode,n.deltaX=e.deltaX,n.deltaY=e.deltaY,n.deltaZ=e.deltaZ;var r=this.getViewportXY(e),i=r.x,a=r.y;n.viewport.x=i,n.viewport.y=a;var o=this.context.eventService.viewport2Canvas(n.viewport),s=o.x,c=o.y;return n.canvas.x=s,n.canvas.y=c,n.global.copyFrom(n.canvas),n.offset.copyFrom(n.canvas),n.nativeEvent=e,n.type=e.type,n},t.prototype.transferMouseData=function(e,n){e.isTrusted=n.isTrusted,e.srcElement=n.srcElement,e.timeStamp=ry.now(),e.type=n.type,e.altKey=n.altKey,e.metaKey=n.metaKey,e.shiftKey=n.shiftKey,e.ctrlKey=n.ctrlKey,e.button=n.button,e.buttons=n.buttons,e.client.x=n.clientX,e.client.y=n.clientY,e.movement.x=n.movementX,e.movement.y=n.movementY,e.page.x=n.pageX,e.page.y=n.pageY,e.screen.x=n.screenX,e.screen.y=n.screenY,e.relatedTarget=null},t.prototype.setCursor=function(e){this.context.contextService.applyCursorStyle(e||this.context.config.cursor||"default")},t.prototype.normalizeToPointerEvent=function(e,n){var r=[];if(n.isTouchEvent(e))for(var i=0;i<e.changedTouches.length;i++){var a=e.changedTouches[i];Cn(a.button)&&(a.button=0),Cn(a.buttons)&&(a.buttons=1),Cn(a.isPrimary)&&(a.isPrimary=e.touches.length===1&&e.type==="touchstart"),Cn(a.width)&&(a.width=a.radiusX||1),Cn(a.height)&&(a.height=a.radiusY||1),Cn(a.tiltX)&&(a.tiltX=0),Cn(a.tiltY)&&(a.tiltY=0),Cn(a.pointerType)&&(a.pointerType="touch"),Cn(a.pointerId)&&(a.pointerId=a.identifier||0),Cn(a.pressure)&&(a.pressure=a.force||.5),Cn(a.twist)&&(a.twist=0),Cn(a.tangentialPressure)&&(a.tangentialPressure=0),a.isNormalized=!0,a.type=e.type,r.push(a)}else if(n.isMouseEvent(e)){var o=e;Cn(o.isPrimary)&&(o.isPrimary=!0),Cn(o.width)&&(o.width=1),Cn(o.height)&&(o.height=1),Cn(o.tiltX)&&(o.tiltX=0),Cn(o.tiltY)&&(o.tiltY=0),Cn(o.pointerType)&&(o.pointerType="mouse"),Cn(o.pointerId)&&(o.pointerId=W9),Cn(o.pressure)&&(o.pressure=.5),Cn(o.twist)&&(o.twist=0),Cn(o.tangentialPressure)&&(o.tangentialPressure=0),o.isNormalized=!0,r.push(o)}else r.push(e);return r},t.tag="Event",t}(),UF=[ot.CIRCLE,ot.ELLIPSE,ot.IMAGE,ot.RECT,ot.LINE,ot.POLYLINE,ot.POLYGON,ot.TEXT,ot.PATH,ot.HTML],XF=function(){function t(){}return t.prototype.isVisible=function(e,n){var r,i,a=n.cullable;if(!a.enable)return!0;var o=n.getRenderBounds();if(ur.isEmpty(o))return!1;var s=e.getFrustum(),c=(i=(r=n.parentNode)===null||r===void 0?void 0:r.cullable)===null||i===void 0?void 0:i.visibilityPlaneMask;return a.visibilityPlaneMask=this.computeVisibilityWithPlaneMask(n,o,c||Wo.INDETERMINATE,s.planes),a.visible=a.visibilityPlaneMask!==Wo.OUTSIDE,a.visible},t.prototype.computeVisibilityWithPlaneMask=function(e,n,r,i){if(r===Wo.OUTSIDE||r===Wo.INSIDE)return r;for(var a=Wo.INSIDE,o=UF.indexOf(e.nodeName)>-1,s=0,c=i.length;s<c;++s){var l=1<<s;if(r&l&&!(o&&(s===4||s===5))){var u=i[s],f=u.normal,d=u.distance;if(ya(f,n.getPositiveFarPoint(i[s]))+d<0)return Wo.OUTSIDE;ya(f,n.getNegativeFarPoint(i[s]))+d<0&&(a|=l)}}return a},t}(),qF=function(){function t(){this.toSync=new Set}return t.prototype.apply=function(e){var n=this,r=e.renderingService,i=e.renderingContext,a=e.rBushRoot,o=i.root.ownerDocument.defaultView;this.rBush=a;var s=function(f){var d=f.target;d.renderable.dirty=!0,r.dirtify()},c=function(f){var d=f.detail.affectChildren,h=f.target;d&&h.forEach(function(v){n.toSync.add(v)});for(var p=h;p;)p.renderable&&n.toSync.add(p),p=p.parentElement;r.dirtify()},l=function(f){var d=f.target;ct.enableSizeAttenuation&&ct.styleValueRegistry.updateSizeAttenuation(d,o.getCamera().getZoom()),ct.enableCSSParsing&&ct.styleValueRegistry.recalc(d),ct.sceneGraphService.dirtifyToRoot(d),r.dirtify()},u=function(f){var d=f.target,h=d.rBushNode;h.aabb&&n.rBush.remove(h.aabb),n.toSync.delete(d),ct.sceneGraphService.dirtifyToRoot(d),r.dirtify()};r.hooks.init.tap(t.tag,function(){o.addEventListener(oe.MOUNTED,l),o.addEventListener(oe.UNMOUNTED,u),o.addEventListener(oe.ATTR_MODIFIED,s),o.addEventListener(oe.BOUNDS_CHANGED,c)}),r.hooks.destroy.tap(t.tag,function(){o.removeEventListener(oe.MOUNTED,l),o.removeEventListener(oe.UNMOUNTED,u),o.removeEventListener(oe.ATTR_MODIFIED,s),o.removeEventListener(oe.BOUNDS_CHANGED,c),n.toSync.clear()}),r.hooks.endFrame.tap(t.tag,function(){n.syncRTree()})},t.prototype.syncRTree=function(){var e=this,n=[];Array.from(this.toSync).filter(function(r){return r.isConnected}).forEach(function(r){var i=r.rBushNode;i&&i.aabb&&e.rBush.remove(i.aabb);var a=r.getRenderBounds();if(a){var o=R(a.getMin(),2),s=o[0],c=o[1],l=R(a.getMax(),2),u=l[0],f=l[1];i.aabb||(i.aabb={}),i.aabb.displayObject=r,i.aabb.minX=s,i.aabb.minY=c,i.aabb.maxX=u,i.aabb.maxY=f}i.aabb&&!isNaN(i.aabb.maxX)&&!isNaN(i.aabb.maxX)&&!isNaN(i.aabb.minX)&&!isNaN(i.aabb.minY)&&n.push(i.aabb)}),this.rBush.load(n),n.length=0,this.toSync.clear()},t.tag="Prepare",t}();function qvt(t){return!!t.document}var wi;(function(t){t.READY="ready",t.BEFORE_RENDER="beforerender",t.RERENDER="rerender",t.AFTER_RENDER="afterrender",t.BEFORE_DESTROY="beforedestroy",t.AFTER_DESTROY="afterdestroy",t.RESIZE="resize",t.DIRTY_RECTANGLE="dirtyrectangle",t.RENDERER_CHANGED="rendererchanged"})(wi||(wi={}));var RO=500,ZF=.1,KF=1e3,uy=new vn(oe.MOUNTED),fy=new vn(oe.UNMOUNTED),QF=new vn(wi.BEFORE_RENDER),JF=new vn(wi.RERENDER),t7=new vn(wi.AFTER_RENDER),DO=function(t){Yt(e,t);function e(n){var r=t.call(this)||this;r.Element=qr,r.inited=!1,r.context={},r.document=new HF,r.document.defaultView=r,r.customElements=new YF;var i=n.container,a=n.canvas,o=n.offscreenCanvas,s=n.width,c=n.height,l=n.devicePixelRatio,u=n.renderer,f=n.background,d=n.cursor,h=n.document,p=n.requestAnimationFrame,v=n.cancelAnimationFrame,g=n.createImage,y=n.supportsPointerEvents,m=n.supportsTouchEvents,b=n.supportsCSSTransform,x=n.supportsMutipleCanvasesInOneContainer,_=n.useNativeClickEvent,O=n.alwaysTriggerPointerEventOnCanvas,w=n.isTouchEvent,S=n.isMouseEvent;x||R9(i,r);var M=s,E=c,P=l;return a&&(P=l||Qu&&window.devicePixelRatio||1,P=P>=1?Math.ceil(P):1,M=s||z9(a)||a.width/P,E=c||G9(a)||a.height/P),o&&(ct.offscreenCanvas=o),r.devicePixelRatio=P,r.requestAnimationFrame=p!=null?p:wO.bind(ct.globalThis),r.cancelAnimationFrame=v!=null?v:SO.bind(ct.globalThis),r.supportsTouchEvents=m!=null?m:"ontouchstart"in ct.globalThis,r.supportsPointerEvents=y!=null?y:!!ct.globalThis.PointerEvent,r.isTouchEvent=w!=null?w:function(L){return r.supportsTouchEvents&&L instanceof ct.globalThis.TouchEvent},r.isMouseEvent=S!=null?S:function(L){return!ct.globalThis.MouseEvent||L instanceof ct.globalThis.MouseEvent&&(!r.supportsPointerEvents||!(L instanceof ct.globalThis.PointerEvent))},r.initRenderingContext({container:i,canvas:a,width:M,height:E,renderer:u,offscreenCanvas:o,devicePixelRatio:P,cursor:d||"default",background:f||"transparent",createImage:g,document:h,supportsCSSTransform:b,useNativeClickEvent:_,alwaysTriggerPointerEventOnCanvas:O}),r.initDefaultCamera(M,E,u.clipSpaceNearZ),r.initRenderer(u,!0),r}return e.prototype.initRenderingContext=function(n){this.context.config=n,this.context.renderingContext={root:this.document.documentElement,renderListCurrentFrame:[],unculledEntities:[],renderReasons:new Set,force:!1,dirty:!1}},e.prototype.initDefaultCamera=function(n,r,i){var a=this,o=new ct.CameraContribution;o.clipSpaceNearZ=i,o.setType(an.EXPLORING,Uu.DEFAULT).setPosition(n/2,r/2,RO).setFocalPoint(n/2,r/2,0).setOrthographic(n/-2,n/2,r/2,r/-2,ZF,KF),o.canvas=this,o.eventEmitter.on(W2.UPDATED,function(){a.context.renderingContext.renderReasons.add($o.CAMERA_CHANGED),ct.enableSizeAttenuation&&a.getConfig().renderer.getConfig().enableSizeAttenuation&&a.updateSizeAttenuation()}),this.context.camera=o},e.prototype.updateSizeAttenuation=function(){var n=this.getCamera().getZoom();this.document.documentElement.forEach(function(r){ct.styleValueRegistry.updateSizeAttenuation(r,n)})},e.prototype.getConfig=function(){return this.context.config},e.prototype.getRoot=function(){return this.document.documentElement},e.prototype.getCamera=function(){return this.context.camera},e.prototype.getContextService=function(){return this.context.contextService},e.prototype.getEventService=function(){return this.context.eventService},e.prototype.getRenderingService=function(){return this.context.renderingService},e.prototype.getRenderingContext=function(){return this.context.renderingContext},e.prototype.getStats=function(){return this.getRenderingService().getStats()},Object.defineProperty(e.prototype,"ready",{get:function(){var n=this;return this.readyPromise||(this.readyPromise=new Promise(function(r){n.resolveReadyPromise=function(){r(n)}}),this.inited&&this.resolveReadyPromise()),this.readyPromise},enumerable:!1,configurable:!0}),e.prototype.destroy=function(n,r){if(n===void 0&&(n=!0),r===void 0&&(r=!1),r||this.dispatchEvent(new vn(wi.BEFORE_DESTROY)),this.frameId){var i=this.getConfig().cancelAnimationFrame||cancelAnimationFrame;i(this.frameId)}var a=this.getRoot();this.unmountChildren(a),n&&(this.document.destroy(),this.getEventService().destroy()),this.getRenderingService().destroy(),this.getContextService().destroy(),n&&this.context.rBushRoot&&(this.context.rBushRoot.clear(),this.context.rBushRoot=null,this.context.renderingContext.root=null),r||this.dispatchEvent(new vn(wi.AFTER_DESTROY))},e.prototype.changeSize=function(n,r){this.resize(n,r)},e.prototype.resize=function(n,r){var i=this.context.config;i.width=n,i.height=r,this.getContextService().resize(n,r);var a=this.context.camera,o=a.getProjectionMode();a.setPosition(n/2,r/2,RO).setFocalPoint(n/2,r/2,0),o===xi.ORTHOGRAPHIC?a.setOrthographic(n/-2,n/2,r/2,r/-2,a.getNear(),a.getFar()):a.setAspect(n/r),this.dispatchEvent(new vn(wi.RESIZE,{width:n,height:r}))},e.prototype.appendChild=function(n,r){return this.document.documentElement.appendChild(n,r)},e.prototype.insertBefore=function(n,r){return this.document.documentElement.insertBefore(n,r)},e.prototype.removeChild=function(n){return this.document.documentElement.removeChild(n)},e.prototype.removeChildren=function(){this.document.documentElement.removeChildren()},e.prototype.destroyChildren=function(){this.document.documentElement.destroyChildren()},e.prototype.render=function(){var n=this;this.dispatchEvent(QF);var r=this.getRenderingService();r.render(this.getConfig(),function(){n.dispatchEvent(JF)}),this.dispatchEvent(t7)},e.prototype.run=function(){var n=this,r=function(){n.render(),n.frameId=n.requestAnimationFrame(r)};r()},e.prototype.initRenderer=function(n,r){var i=this;if(r===void 0&&(r=!1),!n)throw new Error("Renderer is required.");this.inited=!1,this.readyPromise=void 0,this.context.rBushRoot=new J8,this.context.renderingPlugins=[],this.context.renderingPlugins.push(new VF,new qF,new $F([new XF])),this.loadRendererContainerModule(n),this.context.contextService=new this.context.ContextService(nt(nt({},ct),this.context)),this.context.renderingService=new mF(ct,this.context),this.context.eventService=new gF(ct,this.context),this.context.eventService.init(),this.context.contextService.init?(this.context.contextService.init(),this.initRenderingService(n,r,!0)):this.context.contextService.initAsync().then(function(){i.initRenderingService(n,r)})},e.prototype.initRenderingService=function(n,r,i){var a=this;r===void 0&&(r=!1),i===void 0&&(i=!1),this.context.renderingService.init(function(){a.inited=!0,r?(i?a.requestAnimationFrame(function(){a.dispatchEvent(new vn(wi.READY))}):a.dispatchEvent(new vn(wi.READY)),a.readyPromise&&a.resolveReadyPromise()):a.dispatchEvent(new vn(wi.RENDERER_CHANGED)),r||a.getRoot().forEach(function(o){var s=o.renderable;s&&(s.renderBoundsDirty=!0,s.boundsDirty=!0,s.dirty=!0)}),a.mountChildren(a.getRoot()),n.getConfig().enableAutoRendering&&a.run()})},e.prototype.loadRendererContainerModule=function(n){var r=this,i=n.getPlugins();i.forEach(function(a){a.context=r.context,a.init(ct)})},e.prototype.setRenderer=function(n){var r=this.getConfig();if(r.renderer!==n){var i=r.renderer;r.renderer=n,this.destroy(!1,!0),yt([],R(i==null?void 0:i.getPlugins()),!1).reverse().forEach(function(a){a.destroy(ct)}),this.initRenderer(n)}},e.prototype.setCursor=function(n){var r=this.getConfig();r.cursor=n,this.getContextService().applyCursorStyle(n)},e.prototype.unmountChildren=function(n){var r=this;n.childNodes.forEach(function(i){r.unmountChildren(i)}),this.inited&&(n.isMutationObserved?n.dispatchEvent(fy):(fy.target=n,this.dispatchEvent(fy,!0)),n!==this.document.documentElement&&(n.ownerDocument=null),n.isConnected=!1),n.isCustomElement&&n.disconnectedCallback&&n.disconnectedCallback()},e.prototype.mountChildren=function(n){var r=this;this.inited?n.isConnected||(n.ownerDocument=this.document,n.isConnected=!0,n.isMutationObserved?n.dispatchEvent(uy):(uy.target=n,this.dispatchEvent(uy,!0))):console.warn("[g]: You are trying to call `canvas.appendChild` before canvas' initialization finished. You can either await `canvas.ready` or listen to `CanvasEvent.READY` manually.","appended child: ",n.nodeName),n.childNodes.forEach(function(i){r.mountChildren(i)}),n.isCustomElement&&n.connectedCallback&&n.connectedCallback()},e.prototype.client2Viewport=function(n){return this.getEventService().client2Viewport(n)},e.prototype.viewport2Client=function(n){return this.getEventService().viewport2Client(n)},e.prototype.viewport2Canvas=function(n){return this.getEventService().viewport2Canvas(n)},e.prototype.canvas2Viewport=function(n){return this.getEventService().canvas2Viewport(n)},e.prototype.getPointByClient=function(n,r){return this.client2Viewport({x:n,y:r})},e.prototype.getClientByPoint=function(n,r){return this.viewport2Client({x:n,y:r})},e}(PO),e7=function(t){Yt(e,t);function e(){var n=t.apply(this,yt([],R(arguments),!1))||this;return n.landmarks=[],n}return e.prototype.rotate=function(n,r,i){if(this.relElevation=cl(r),this.relAzimuth=cl(n),this.relRoll=cl(i),this.elevation+=this.relElevation,this.azimuth+=this.relAzimuth,this.roll+=this.relRoll,this.type===an.EXPLORING){var a=Bo(lr(),[1,0,0],Gn((this.rotateWorld?1:-1)*this.relElevation)),o=Bo(lr(),[0,1,0],Gn((this.rotateWorld?1:-1)*this.relAzimuth)),s=Bo(lr(),[0,0,1],Gn(this.relRoll)),c=Fo(lr(),o,a);c=Fo(lr(),c,s);var l=gg(On(),c);Do(this.matrix,this.matrix,[0,0,-this.distance]),Ur(this.matrix,this.matrix,l),Do(this.matrix,this.matrix,[0,0,this.distance])}else{if(Math.abs(this.elevation)>90)return this;this.computeMatrix()}return this._getAxes(),this.type===an.ORBITING||this.type===an.EXPLORING?this._getPosition():this.type===an.TRACKING&&this._getFocalPoint(),this._update(),this},e.prototype.pan=function(n,r){var i=si(n,r,0),a=oo(this.position);return Jc(a,a,hg(Te(),this.right,i[0])),Jc(a,a,hg(Te(),this.up,i[1])),this._setPosition(a),this.triggerUpdate(),this},e.prototype.dolly=function(n){var r=this.forward,i=oo(this.position),a=n*this.dollyingStep,o=this.distance+n*this.dollyingStep;return a=Math.max(Math.min(o,this.maxDistance),this.minDistance)-this.distance,i[0]+=a*r[0],i[1]+=a*r[1],i[2]+=a*r[2],this._setPosition(i),this.type===an.ORBITING||this.type===an.EXPLORING?this._getDistance():this.type===an.TRACKING&&Jc(this.focalPoint,i,this.distanceVector),this.triggerUpdate(),this},e.prototype.cancelLandmarkAnimation=function(){this.landmarkAnimationID!==void 0&&this.canvas.cancelAnimationFrame(this.landmarkAnimationID)},e.prototype.createLandmark=function(n,r){var i,a,o,s;r===void 0&&(r={});var c=r.position,l=c===void 0?this.position:c,u=r.focalPoint,f=u===void 0?this.focalPoint:u,d=r.roll,h=r.zoom,p=new ct.CameraContribution;p.setType(this.type,void 0),p.setPosition(l[0],(i=l[1])!==null&&i!==void 0?i:this.position[1],(a=l[2])!==null&&a!==void 0?a:this.position[2]),p.setFocalPoint(f[0],(o=f[1])!==null&&o!==void 0?o:this.focalPoint[1],(s=f[2])!==null&&s!==void 0?s:this.focalPoint[2]),p.setRoll(d!=null?d:this.roll),p.setZoom(h!=null?h:this.zoom);var v={name:n,matrix:D_(p.getWorldTransform()),right:oo(p.right),up:oo(p.up),forward:oo(p.forward),position:oo(p.getPosition()),focalPoint:oo(p.getFocalPoint()),distanceVector:oo(p.getDistanceVector()),distance:p.getDistance(),dollyingStep:p.getDollyingStep(),azimuth:p.getAzimuth(),elevation:p.getElevation(),roll:p.getRoll(),relAzimuth:p.relAzimuth,relElevation:p.relElevation,relRoll:p.relRoll,zoom:p.getZoom()};return this.landmarks.push(v),v},e.prototype.gotoLandmark=function(n,r){var i=this;r===void 0&&(r={});var a=Dn(n)?this.landmarks.find(function(E){return E.name===n}):n;if(a){var o=er(r)?{duration:r}:r,s=o.easing,c=s===void 0?"linear":s,l=o.duration,u=l===void 0?100:l,f=o.easingFunction,d=f===void 0?void 0:f,h=o.onfinish,p=h===void 0?void 0:h,v=o.onframe,g=v===void 0?void 0:v,y=.01;if(u===0){this.syncFromLandmark(a),p&&p();return}this.cancelLandmarkAnimation();var m=a.position,b=a.focalPoint,x=a.zoom,_=a.roll,O=d||ct.EasingFunction(c),w,S=function(){i.setFocalPoint(b),i.setPosition(m),i.setRoll(_),i.setZoom(x),i.computeMatrix(),i.triggerUpdate(),p&&p()},M=function(E){w===void 0&&(w=E);var P=E-w;if(P>u){S();return}var L=O(P/u),A=Te(),T=Te(),C=1,N=0;pg(A,i.focalPoint,b,L),pg(T,i.position,m,L),N=i.roll*(1-L)+_*L,C=i.zoom*(1-L)+x*L,i.setFocalPoint(A),i.setPosition(T),i.setRoll(N),i.setZoom(C);var B=j_(A,b)+j_(T,m);if(B<=y&&x==null&&_==null){S();return}i.computeMatrix(),i.triggerUpdate(),P<u&&(g&&g(L),i.landmarkAnimationID=i.canvas.requestAnimationFrame(M))};this.canvas.requestAnimationFrame(M)}},e.prototype.syncFromLandmark=function(n){this.matrix=Ws(this.matrix,n.matrix),this.right=mi(this.right,n.right),this.up=mi(this.up,n.up),this.forward=mi(this.forward,n.forward),this.position=mi(this.position,n.position),this.focalPoint=mi(this.focalPoint,n.focalPoint),this.distanceVector=mi(this.distanceVector,n.distanceVector),this.azimuth=n.azimuth,this.elevation=n.elevation,this.roll=n.roll,this.relAzimuth=n.relAzimuth,this.relElevation=n.relElevation,this.relRoll=n.relRoll,this.dollyingStep=n.dollyingStep,this.distance=n.distance,this.zoom=n.zoom},e}(H2);ct.CameraContribution=e7;var BO=function(){function t(e,n){this.type=e,this.target=n,this.addedNodes=[],this.attributeName=null,this.attributeNamespace=null,this.nextSibling=null,this.oldValue=null,this.previousSibling=null,this.removedNodes=[]}return t.copy=function(e){var n=new t(e.type,e.target);return n.addedNodes=e.addedNodes.slice(),n.removedNodes=e.removedNodes.slice(),n.previousSibling=e.previousSibling,n.nextSibling=e.nextSibling,n.attributeName=e.attributeName,n.attributeNamespace=e.attributeNamespace,n.oldValue=e.oldValue,n},t}(),n7=0,vl=new WeakMap,r7=function(){function t(e,n,r){this.observer=e,this.target=n,this.options=r,this.transientObservedNodes=[]}return t.prototype.enqueue=function(e){var n=this.observer.records,r=n.length;if(n.length>0){var i=n[r-1],a=s7(i,e);if(a){n[r-1]=a;return}}else l7(this.observer);n[r]=e},t.prototype.addListeners=function(){this.addListeners_(this.target)},t.prototype.addListeners_=function(e){var n=this.options;n.attributes&&e.addEventListener(oe.ATTR_MODIFIED,this,!0),n.childList&&e.addEventListener(oe.INSERTED,this,!0),(n.childList||n.subtree)&&e.addEventListener(oe.REMOVED,this,!0)},t.prototype.removeListeners=function(){this.removeListeners_(this.target)},t.prototype.removeListeners_=function(e){var n=this.options;n.attributes&&e.removeEventListener(oe.ATTR_MODIFIED,this,!0),n.childList&&e.removeEventListener(oe.INSERTED,this,!0),(n.childList||n.subtree)&&e.removeEventListener(oe.REMOVED,this,!0)},t.prototype.removeTransientObservers=function(){var e=this.transientObservedNodes;this.transientObservedNodes=[],e.forEach(function(n){this.removeListeners_(n);for(var r=vl.get(n),i=0;i<r.length;i++)if(r[i]===this){r.splice(i,1);break}},this)},t.prototype.handleEvent=function(e){e.stopImmediatePropagation();var n,r;switch(e.type){case oe.ATTR_MODIFIED:var i=e.attrName,a=e.relatedNode.namespaceURI;r=e.target,n=FO("attributes",r),n.attributeName=i,n.attributeNamespace=a;var o=e.attrChange===Vo.ADDITION?null:e.prevValue;zO(r,function(d){if(d.attributes&&!(d.attributeFilter&&d.attributeFilter.length&&d.attributeFilter.indexOf(i)===-1&&d.attributeFilter.indexOf(a)===-1))return d.attributeOldValue?i7(o):n});break;case oe.REMOVED:case oe.INSERTED:r=e.relatedNode;var s=e.target,c=void 0,l=void 0;e.type===oe.INSERTED?(c=[s],l=[]):(c=[],l=[s]);var u=s.previousSibling,f=s.nextSibling;n=FO("childList",r),n.addedNodes=c,n.removedNodes=l,n.previousSibling=u,n.nextSibling=f,zO(r,function(d){if(d.childList)return n})}a7()},t}(),Zvt=function(){function t(e){this.callback=e,this.nodes=[],this.records=[],this.uid=n7++}return t.prototype.observe=function(e,n){if(!n.childList&&!n.attributes&&!n.characterData||n.attributeOldValue&&!n.attributes||n.attributeFilter&&n.attributeFilter.length&&!n.attributes||n.characterDataOldValue&&!n.characterData)throw new SyntaxError;var r=vl.get(e);r||vl.set(e,r=[]);for(var i,a=0;a<r.length;a++)if(r[a].observer===this){i=r[a],i.removeListeners(),i.options=n;break}i||(i=new r7(this,e,n),r.push(i),this.nodes.push(e)),i.addListeners()},t.prototype.disconnect=function(){var e=this;this.nodes.forEach(function(n){for(var r=vl.get(n),i=0;i<r.length;i++){var a=r[i];if(a.observer===e){a.removeListeners(),r.splice(i,1);break}}},this),this.records=[]},t.prototype.takeRecords=function(){var e=this.records;return this.records=[],e},t}(),Nh,uo;function FO(t,e){return Nh=new BO(t,e)}function i7(t){return uo||(uo=BO.copy(Nh),uo.oldValue=t,uo)}function a7(){Nh=uo=void 0}function o7(t){return t===uo||t===Nh}function s7(t,e){return t===e?t:uo&&o7(t)?uo:null}function c7(t){t.nodes.forEach(function(e){var n=vl.get(e);n&&n.forEach(function(r){r.observer===t&&r.removeTransientObservers()})})}function zO(t,e){for(var n=t;n;n=n.parentNode){var r=vl.get(n);if(r)for(var i=0;i<r.length;i++){var a=r[i],o=a.options;if(!(n!==t&&!o.subtree)){var s=e(o);s&&a.enqueue(s)}}}}var dy=!1,hy=[];function l7(t){hy.push(t),dy||(dy=!0,typeof ct.globalThis!="undefined"?ct.globalThis.setTimeout(py):py())}function py(){dy=!1;var t=hy;hy=[],t.sort(function(n,r){return n.uid-r.uid});var e=!1;t.forEach(function(n){var r=n.takeRecords();c7(n),r.length&&(n.callback(r,n),e=!0)}),e&&py()}var vy=function(t){Yt(e,t);function e(n,r,i,a){var o=t.call(this,n)||this;return o.currentTime=i,o.timelineTime=a,o.target=r,o.type="finish",o.bubbles=!1,o.currentTarget=r,o.defaultPrevented=!1,o.eventPhase=o.AT_TARGET,o.timeStamp=Date.now(),o.currentTime=i,o.timelineTime=a,o}return e}(Ch),u7=0,f7=function(){function t(e,n){var r;this.currentTimePending=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this._currentTime=0,this._playbackRate=1,this._inTimeline=!0,this.effect=e,e.animation=this,this.timeline=n,this.id="".concat(u7++),this._inEffect=!!this.effect.update(0),this._totalDuration=Number((r=this.effect)===null||r===void 0?void 0:r.getComputedTiming().endTime),this._holdTime=0,this._paused=!1,this.oldPlayState="idle",this.updatePromises()}return Object.defineProperty(t.prototype,"pending",{get:function(){return this._startTime===null&&!this._paused&&this.playbackRate!==0||this.currentTimePending},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"playState",{get:function(){return this._idle?"idle":this._isFinished?"finished":this._paused?"paused":"running"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ready",{get:function(){var e=this;return this.readyPromise||(this.timeline.animationsWithPromises.indexOf(this)===-1&&this.timeline.animationsWithPromises.push(this),this.readyPromise=new Promise(function(n,r){e.resolveReadyPromise=function(){n(e)},e.rejectReadyPromise=function(){r(new Error)}}),this.pending||this.resolveReadyPromise()),this.readyPromise},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"finished",{get:function(){var e=this;return this.finishedPromise||(this.timeline.animationsWithPromises.indexOf(this)===-1&&this.timeline.animationsWithPromises.push(this),this.finishedPromise=new Promise(function(n,r){e.resolveFinishedPromise=function(){n(e)},e.rejectFinishedPromise=function(){r(new Error)}}),this.playState==="finished"&&this.resolveFinishedPromise()),this.finishedPromise},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentTime",{get:function(){return this.updatePromises(),this._idle||this.currentTimePending?null:this._currentTime},set:function(e){var n;e=Number(e),!isNaN(e)&&(this.timeline.restart(),!this._paused&&this._startTime!==null&&(this._startTime=Number((n=this.timeline)===null||n===void 0?void 0:n.currentTime)-e/this.playbackRate),this.currentTimePending=!1,this._currentTime!==e&&(this._idle&&(this._idle=!1,this._paused=!0),this.tickCurrentTime(e,!0),this.timeline.applyDirtiedAnimation(this)))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"startTime",{get:function(){return this._startTime},set:function(e){if(e!==null){if(this.updatePromises(),e=Number(e),isNaN(e)||this._paused||this._idle)return;this._startTime=e,this.tickCurrentTime((Number(this.timeline.currentTime)-this._startTime)*this.playbackRate),this.timeline.applyDirtiedAnimation(this),this.updatePromises()}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"playbackRate",{get:function(){return this._playbackRate},set:function(e){if(e!==this._playbackRate){this.updatePromises();var n=this.currentTime;this._playbackRate=e,this.startTime=null,this.playState!=="paused"&&this.playState!=="idle"&&(this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this)),n!==null&&(this.currentTime=n),this.updatePromises()}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_isFinished",{get:function(){return!this._idle&&(this._playbackRate>0&&Number(this._currentTime)>=this._totalDuration||this._playbackRate<0&&Number(this._currentTime)<=0)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"totalDuration",{get:function(){return this._totalDuration},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_needsTick",{get:function(){return this.pending||this.playState==="running"||!this._finishedFlag},enumerable:!1,configurable:!0}),t.prototype.updatePromises=function(){var e=this.oldPlayState,n=this.pending?"pending":this.playState;return this.readyPromise&&n!==e&&(n==="idle"?(this.rejectReadyPromise(),this.readyPromise=void 0):e==="pending"?this.resolveReadyPromise():n==="pending"&&(this.readyPromise=void 0)),this.finishedPromise&&n!==e&&(n==="idle"?(this.rejectFinishedPromise(),this.finishedPromise=void 0):n==="finished"?this.resolveFinishedPromise():e==="finished"&&(this.finishedPromise=void 0)),this.oldPlayState=n,this.readyPromise||this.finishedPromise},t.prototype.play=function(){this.updatePromises(),this._paused=!1,(this._isFinished||this._idle)&&(this.rewind(),this._startTime=null),this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this),this.timeline.animations.indexOf(this)===-1&&this.timeline.animations.push(this),this.updatePromises()},t.prototype.pause=function(){this.updatePromises(),this.currentTime&&(this._holdTime=this.currentTime),!this._isFinished&&!this._paused&&!this._idle?this.currentTimePending=!0:this._idle&&(this.rewind(),this._idle=!1),this._startTime=null,this._paused=!0,this.updatePromises()},t.prototype.finish=function(){this.updatePromises(),!this._idle&&(this.currentTime=this._playbackRate>0?this._totalDuration:0,this._startTime=this._totalDuration-this.currentTime,this.currentTimePending=!1,this.timeline.applyDirtiedAnimation(this),this.updatePromises())},t.prototype.cancel=function(){var e=this;if(this.updatePromises(),!!this._inEffect&&(this._inEffect=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this._currentTime=0,this._startTime=null,this.effect.update(null),this.timeline.applyDirtiedAnimation(this),this.updatePromises(),this.oncancel)){var n=new vy(null,this,this.currentTime,null);setTimeout(function(){e.oncancel(n)})}},t.prototype.reverse=function(){this.updatePromises();var e=this.currentTime;this.playbackRate*=-1,this.play(),e!==null&&(this.currentTime=e),this.updatePromises()},t.prototype.updatePlaybackRate=function(e){this.playbackRate=e},t.prototype.targetAnimations=function(){var e,n=(e=this.effect)===null||e===void 0?void 0:e.target;return n.getAnimations()},t.prototype.markTarget=function(){var e=this.targetAnimations();e.indexOf(this)===-1&&e.push(this)},t.prototype.unmarkTarget=function(){var e=this.targetAnimations(),n=e.indexOf(this);n!==-1&&e.splice(n,1)},t.prototype.tick=function(e,n){!this._idle&&!this._paused&&(this._startTime===null?n&&(this.startTime=e-this._currentTime/this.playbackRate):this._isFinished||this.tickCurrentTime((e-this._startTime)*this.playbackRate)),n&&(this.currentTimePending=!1,this.fireEvents(e))},t.prototype.rewind=function(){if(this.playbackRate>=0)this.currentTime=0;else if(this._totalDuration<1/0)this.currentTime=this._totalDuration;else throw new Error("Unable to rewind negative playback rate animation with infinite duration")},t.prototype.persist=function(){throw new Error(hn)},t.prototype.addEventListener=function(e,n,r){throw new Error(hn)},t.prototype.removeEventListener=function(e,n,r){throw new Error(hn)},t.prototype.dispatchEvent=function(e){throw new Error(hn)},t.prototype.commitStyles=function(){throw new Error(hn)},t.prototype.ensureAlive=function(){var e,n;this.playbackRate<0&&this.currentTime===0?this._inEffect=!!(!((e=this.effect)===null||e===void 0)&&e.update(-1)):this._inEffect=!!(!((n=this.effect)===null||n===void 0)&&n.update(this.currentTime)),!this._inTimeline&&(this._inEffect||!this._finishedFlag)&&(this._inTimeline=!0,this.timeline.animations.push(this))},t.prototype.tickCurrentTime=function(e,n){e!==this._currentTime&&(this._currentTime=e,this._isFinished&&!n&&(this._currentTime=this._playbackRate>0?this._totalDuration:0),this.ensureAlive())},t.prototype.fireEvents=function(e){var n=this;if(this._isFinished){if(!this._finishedFlag){if(this.onfinish){var r=new vy(null,this,this.currentTime,e);setTimeout(function(){n.onfinish&&n.onfinish(r)})}this._finishedFlag=!0}}else{if(this.onframe&&this.playState==="running"){var i=new vy(null,this,this.currentTime,e);this.onframe(i)}this._finishedFlag=!1}},t}(),d7=4,h7=.001,p7=1e-7,v7=10,nf=11,Ih=1/(nf-1),g7=typeof Float32Array=="function",GO=function(t,e){return 1-3*e+3*t},WO=function(t,e){return 3*e-6*t},YO=function(t){return 3*t},jh=function(t,e,n){return((GO(e,n)*t+WO(e,n))*t+YO(e))*t},HO=function(t,e,n){return 3*GO(e,n)*t*t+2*WO(e,n)*t+YO(e)},y7=function(t,e,n,r,i){var a,o,s=0;do o=e+(n-e)/2,a=jh(o,r,i)-t,a>0?n=o:e=o;while(Math.abs(a)>p7&&++s<v7);return o},m7=function(t,e,n,r){for(var i=0;i<d7;++i){var a=HO(e,n,r);if(a===0)return e;var o=jh(e,n,r)-t;e-=o/a}return e},gy=function(t,e,n,r){if(!(0<=t&&t<=1&&0<=n&&n<=1))throw new Error("bezier x values must be in [0, 1] range");if(t===e&&n===r)return function(s){return s};for(var i=g7?new Float32Array(nf):new Array(nf),a=0;a<nf;++a)i[a]=jh(a*Ih,t,n);var o=function(s){for(var c=0,l=1,u=nf-1;l!==u&&i[l]<=s;++l)c+=Ih;--l;var f=(s-i[l])/(i[l+1]-i[l]),d=c+f*Ih,h=HO(d,t,n);return h>=h7?m7(s,d,t,n):h===0?d:y7(s,c,c+Ih,t,n)};return function(s){return s===0||s===1?s:jh(o(s),e,r)}},b7=function(t){return t=t.replace(/([A-Z])/g,function(e){return"-".concat(e.toLowerCase())}),t.charAt(0)==="-"?t.substring(1):t},Rh=function(t){return Math.pow(t,2)},Dh=function(t){return Math.pow(t,3)},Bh=function(t){return Math.pow(t,4)},Fh=function(t){return Math.pow(t,5)},zh=function(t){return Math.pow(t,6)},Gh=function(t){return 1-Math.cos(t*Math.PI/2)},Wh=function(t){return 1-Math.sqrt(1-t*t)},Yh=function(t){return t*t*(3*t-2)},Hh=function(t){for(var e,n=4;t<((e=Math.pow(2,--n))-1)/11;);return 1/Math.pow(4,3-n)-7.5625*Math.pow((e*3-2)/22-t,2)},$h=function(t,e){e===void 0&&(e=[]);var n=R(e,2),r=n[0],i=r===void 0?1:r,a=n[1],o=a===void 0?.5:a,s=Vn(Number(i),1,10),c=Vn(Number(o),.1,2);return t===0||t===1?t:-s*Math.pow(2,10*(t-1))*Math.sin((t-1-c/(Math.PI*2)*Math.asin(1/s))*(Math.PI*2)/c)},rf=function(t,e,n){e===void 0&&(e=[]);var r=R(e,4),i=r[0],a=i===void 0?1:i,o=r[1],s=o===void 0?100:o,c=r[2],l=c===void 0?10:c,u=r[3],f=u===void 0?0:u;a=Vn(a,.1,1e3),s=Vn(s,.1,1e3),l=Vn(l,.1,1e3),f=Vn(f,.1,1e3);var d=Math.sqrt(s/a),h=l/(2*Math.sqrt(s*a)),p=h<1?d*Math.sqrt(1-h*h):0,v=1,g=h<1?(h*d+-f)/p:-f+d,y=n?n*t/1e3:t;return h<1?y=Math.exp(-y*h*d)*(v*Math.cos(p*y)+g*Math.sin(p*y)):y=(v+g*y)*Math.exp(-y*d),t===0||t===1?t:1-y},yy=function(t,e){e===void 0&&(e=[]);var n=R(e,2),r=n[0],i=r===void 0?10:r,a=n[1],o=a=="start"?Math.ceil:Math.floor;return o(Vn(t,0,1)*i)/i},$O=function(t,e){e===void 0&&(e=[]);var n=R(e,4),r=n[0],i=n[1],a=n[2],o=n[3];return gy(r,i,a,o)(t)},Vh=gy(.42,0,1,1),qi=function(t){return function(e,n,r){return n===void 0&&(n=[]),1-t(1-e,n,r)}},Zi=function(t){return function(e,n,r){return n===void 0&&(n=[]),e<.5?t(e*2,n,r)/2:1-t(e*-2+2,n,r)/2}},Ki=function(t){return function(e,n,r){return n===void 0&&(n=[]),e<.5?(1-t(1-e*2,n,r))/2:(t(e*2-1,n,r)+1)/2}},VO={steps:yy,"step-start":function(t){return yy(t,[1,"start"])},"step-end":function(t){return yy(t,[1,"end"])},linear:function(t){return t},"cubic-bezier":$O,ease:function(t){return $O(t,[.25,.1,.25,1])},in:Vh,out:qi(Vh),"in-out":Zi(Vh),"out-in":Ki(Vh),"in-quad":Rh,"out-quad":qi(Rh),"in-out-quad":Zi(Rh),"out-in-quad":Ki(Rh),"in-cubic":Dh,"out-cubic":qi(Dh),"in-out-cubic":Zi(Dh),"out-in-cubic":Ki(Dh),"in-quart":Bh,"out-quart":qi(Bh),"in-out-quart":Zi(Bh),"out-in-quart":Ki(Bh),"in-quint":Fh,"out-quint":qi(Fh),"in-out-quint":Zi(Fh),"out-in-quint":Ki(Fh),"in-expo":zh,"out-expo":qi(zh),"in-out-expo":Zi(zh),"out-in-expo":Ki(zh),"in-sine":Gh,"out-sine":qi(Gh),"in-out-sine":Zi(Gh),"out-in-sine":Ki(Gh),"in-circ":Wh,"out-circ":qi(Wh),"in-out-circ":Zi(Wh),"out-in-circ":Ki(Wh),"in-back":Yh,"out-back":qi(Yh),"in-out-back":Zi(Yh),"out-in-back":Ki(Yh),"in-bounce":Hh,"out-bounce":qi(Hh),"in-out-bounce":Zi(Hh),"out-in-bounce":Ki(Hh),"in-elastic":$h,"out-elastic":qi($h),"in-out-elastic":Zi($h),"out-in-elastic":Ki($h),spring:rf,"spring-in":rf,"spring-out":qi(rf),"spring-in-out":Zi(rf),"spring-out-in":Ki(rf)},x7=function(t){return b7(t).replace(/^ease-/,"").replace(/(\(|\s).+/,"").toLowerCase().trim()},_7=function(t){return VO[x7(t)]||VO.linear},O7=function(t){return t},w7=1,S7=.5,UO=0;function XO(t,e){return function(n){if(n>=1)return 1;var r=1/t;return n+=e*r,n-n%r}}var Uh="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",M7=new RegExp("cubic-bezier\\("+Uh+","+Uh+","+Uh+","+Uh+"\\)"),E7=/steps\(\s*(\d+)\s*\)/,P7=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/;function my(t){var e=M7.exec(t);if(e)return gy.apply(void 0,yt([],R(e.slice(1).map(Number)),!1));var n=E7.exec(t);if(n)return XO(Number(n[1]),UO);var r=P7.exec(t);return r?XO(Number(r[1]),{start:w7,middle:S7,end:UO}[r[2]]):_7(t)}function A7(t){return Math.abs(T7(t)/(t.playbackRate||1))}function T7(t){var e;return t.duration===0||t.iterations===0?0:(t.duration==="auto"?0:Number(t.duration))*((e=t.iterations)!==null&&e!==void 0?e:1)}var qO=0,by=1,Xh=2,ZO=3;function C7(t,e,n){if(e===null)return qO;var r=n.endTime;return e<Math.min(n.delay,r)?by:e>=Math.min(n.delay+t+n.endDelay,r)?Xh:ZO}function k7(t,e,n,r,i){switch(r){case by:return e==="backwards"||e==="both"?0:null;case ZO:return n-i;case Xh:return e==="forwards"||e==="both"?t:null;case qO:return null}}function L7(t,e,n,r,i){var a=i;return t===0?e!==by&&(a+=n):a+=r/t,a}function N7(t,e,n,r,i,a){var o=t===1/0?e%1:t%1;return o===0&&n===Xh&&r!==0&&(i!==0||a===0)&&(o=1),o}function I7(t,e,n,r){return t===Xh&&e===1/0?1/0:n===1?Math.floor(r)-1:Math.floor(r)}function j7(t,e,n){var r=t;if(t!=="normal"&&t!=="reverse"){var i=e;t==="alternate-reverse"&&(i+=1),r="normal",i!==1/0&&i%2!==0&&(r="reverse")}return r==="normal"?n:1-n}function R7(t,e,n){var r=C7(t,e,n),i=k7(t,n.fill,e,r,n.delay);if(i===null)return null;var a=n.duration==="auto"?0:n.duration,o=L7(a,r,n.iterations,i,n.iterationStart),s=N7(o,n.iterationStart,r,n.iterations,i,a),c=I7(r,n.iterations,s,o),l=j7(n.direction,c,s);return n.currentIteration=c,n.progress=l,n.easingFunction(l)}function D7(t,e,n){var r=B7(t,e),i=F7(r,n);return function(a,o){if(o!==null)i.filter(function(c){return o>=c.applyFrom&&o<c.applyTo}).forEach(function(c){var l=o-c.startOffset,u=c.endOffset-c.startOffset,f=u===0?0:c.easingFunction(l/u);a.setAttribute(c.property,c.interpolation(f),!1,!1)});else for(var s in r)KO(s)&&a.setAttribute(s,null)}}function KO(t){return t!=="offset"&&t!=="easing"&&t!=="composite"&&t!=="computedOffset"}function B7(t,e){for(var n={},r=0;r<t.length;r++)for(var i in t[r])if(KO(i)){var a={offset:t[r].offset,computedOffset:t[r].computedOffset,easing:t[r].easing,easingFunction:my(t[r].easing)||e.easingFunction,value:t[r][i]};n[i]=n[i]||[],n[i].push(a)}return n}function F7(t,e){var n=[];for(var r in t)for(var i=t[r],a=0;a<i.length-1;a++){var o=a,s=a+1,c=i[o].computedOffset,l=i[s].computedOffset,u=c,f=l;a===0&&(u=-1/0,l===0&&(s=o)),a===i.length-2&&(f=1/0,c===1&&(o=s)),n.push({applyFrom:u,applyTo:f,startOffset:i[o].computedOffset,endOffset:i[s].computedOffset,easingFunction:i[o].easingFunction,property:r,interpolation:z7(r,i[o].value,i[s].value,e)})}return n.sort(function(d,h){return d.startOffset-h.startOffset}),n}var QO=function(t,e,n){return function(r){var i=JO(t,e,r);return!ct.enableCSSParsing&&er(i)?i:n(i)}};function z7(t,e,n,r){var i=Ho[t];if(i&&i.syntax&&i.int){var a=ct.styleValueRegistry.getPropertySyntax(i.syntax);if(a){var o=void 0,s=void 0;if(ct.enableCSSParsing){var c=ct.styleValueRegistry.parseProperty(t,e,r,!1),l=ct.styleValueRegistry.parseProperty(t,n,r,!1);o=ct.styleValueRegistry.computeProperty(t,c,r,!1),s=ct.styleValueRegistry.computeProperty(t,l,r,!1)}else{var u=a.parserWithCSSDisabled;o=u?u(e,r):e,s=u?u(n,r):n}var f=a.mixer(o,s,r);if(f){var d=QO.apply(void 0,yt([],R(f),!1));return function(h){return h===0?e:h===1?n:d(h)}}}}return QO(!1,!0,function(h){return h?n:e})}function JO(t,e,n){if(typeof t=="number"&&typeof e=="number")return t*(1-n)+e*n;if(typeof t=="boolean"&&typeof e=="boolean"||typeof t=="string"&&typeof e=="string")return n<.5?t:e;if(Array.isArray(t)&&Array.isArray(e)){for(var r=t.length,i=e.length,a=Math.max(r,i),o=[],s=0;s<a;s++)o.push(JO(t[s<r?s:r-1],e[s<i?s:i-1],n));return o}throw new Error("Mismatched interpolation arguments "+t+":"+e)}var G7=function(){function t(){this.delay=0,this.direction="normal",this.duration="auto",this._easing="linear",this.easingFunction=O7,this.endDelay=0,this.fill="auto",this.iterationStart=0,this.iterations=1,this.currentIteration=null,this.progress=null}return Object.defineProperty(t.prototype,"easing",{get:function(){return this._easing},set:function(e){this.easingFunction=my(e),this._easing=e},enumerable:!1,configurable:!0}),t}();function W7(t){var e=[];for(var n in t)if(!(n in["easing","offset","composite"])){var r=t[n];Array.isArray(r)||(r=[r]);for(var i=r.length,a=0;a<i;a++){if(!e[a]){var o={};"offset"in t&&(o.offset=Number(t.offset)),"easing"in t&&(o.easing=t.easing),"composite"in t&&(o.composite=t.composite),e[a]=o}r[a]!==void 0&&r[a]!==null&&(e[a][n]=r[a])}}return e.sort(function(s,c){return(s.computedOffset||0)-(c.computedOffset||0)}),e}function tw(t,e){if(t===null)return[];Array.isArray(t)||(t=W7(t));for(var n=t.map(function(c){var l={};e!=null&&e.composite&&(l.composite="auto");for(var u in c){var f=c[u];if(u==="offset"){if(f!==null){if(f=Number(f),!isFinite(f))throw new Error("Keyframe offsets must be numbers.");if(f<0||f>1)throw new Error("Keyframe offsets must be between 0 and 1.");l.computedOffset=f}}else if(u==="composite"&&["replace","add","accumulate","auto"].indexOf(f)===-1)throw new Error("".concat(f," compositing is not supported"));l[u]=f}return l.offset===void 0&&(l.offset=null),l.easing===void 0&&(l.easing=(e==null?void 0:e.easing)||"linear"),l.composite===void 0&&(l.composite="auto"),l}),r=!0,i=-1/0,a=0;a<n.length;a++){var o=n[a].offset;if(Ft(o))r=!1;else{if(o<i)throw new TypeError("Keyframes are not loosely sorted by offset. Sort or specify offsets.");i=o}}n=n.filter(function(c){return Number(c.offset)>=0&&Number(c.offset)<=1});function s(){var c,l,u=n.length;n[u-1].computedOffset=Number((c=n[u-1].offset)!==null&&c!==void 0?c:1),u>1&&(n[0].computedOffset=Number((l=n[0].offset)!==null&&l!==void 0?l:0));for(var f=0,d=Number(n[0].computedOffset),h=1;h<u;h++){var p=n[h].computedOffset;if(!Ft(p)&&!Ft(d)){for(var v=1;v<h-f;v++)n[f+v].computedOffset=d+(Number(p)-d)*v/(h-f);f=h,d=Number(p)}}}return r||s(),n}var Y7="backwards|forwards|both|none".split("|"),H7="reverse|alternate|alternate-reverse".split("|");function $7(t,e){var n=new G7;return e&&(n.fill="both",n.duration="auto"),typeof t=="number"&&!isNaN(t)?n.duration=t:t!==void 0&&Object.keys(t).forEach(function(r){if(t[r]!==void 0&&t[r]!==null&&t[r]!=="auto"){if((typeof n[r]=="number"||r==="duration")&&(typeof t[r]!="number"||isNaN(t[r]))||r==="fill"&&Y7.indexOf(t[r])===-1||r==="direction"&&H7.indexOf(t[r])===-1)return;n[r]=t[r]}}),n}function V7(t,e){return t=U7(t!=null?t:{duration:"auto"}),$7(t,e)}function U7(t){return typeof t=="number"&&(isNaN(t)?t={duration:"auto"}:t={duration:t}),t}var X7=function(){function t(e,n,r){var i=this;this.composite="replace",this.iterationComposite="replace",this.target=e,this.timing=V7(r,!1),this.timing.effect=this,this.timing.activeDuration=A7(this.timing),this.timing.endTime=Math.max(0,this.timing.delay+this.timing.activeDuration+this.timing.endDelay),this.normalizedKeyframes=tw(n,this.timing),this.interpolations=D7(this.normalizedKeyframes,this.timing,this.target);var a=ct.globalThis.Proxy;this.computedTiming=a?new a(this.timing,{get:function(o,s){return s==="duration"?o.duration==="auto"?0:o.duration:s==="fill"?o.fill==="auto"?"none":o.fill:s==="localTime"?i.animation&&i.animation.currentTime||null:s==="currentIteration"?!i.animation||i.animation.playState!=="running"?null:o.currentIteration||0:s==="progress"?!i.animation||i.animation.playState!=="running"?null:o.progress||0:o[s]},set:function(){return!0}}):this.timing}return t.prototype.applyInterpolations=function(){this.interpolations(this.target,Number(this.timeFraction))},t.prototype.update=function(e){return e===null?!1:(this.timeFraction=R7(this.timing.activeDuration,e,this.timing),this.timeFraction!==null)},t.prototype.getKeyframes=function(){return this.normalizedKeyframes},t.prototype.setKeyframes=function(e){this.normalizedKeyframes=tw(e)},t.prototype.getComputedTiming=function(){return this.computedTiming},t.prototype.getTiming=function(){return this.timing},t.prototype.updateTiming=function(e){var n=this;Object.keys(e||{}).forEach(function(r){n.timing[r]=e[r]})},t}();function ew(t,e){return Number(t.id)-Number(e.id)}var q7=function(){function t(e){var n=this;this.document=e,this.animations=[],this.ticking=!1,this.timelineTicking=!1,this.hasRestartedThisFrame=!1,this.animationsWithPromises=[],this.inTick=!1,this.pendingEffects=[],this.currentTime=null,this.rafId=0,this.rafCallbacks=[],this.webAnimationsNextTick=function(r){n.currentTime=r,n.discardAnimations(),n.animations.length===0?n.timelineTicking=!1:n.requestAnimationFrame(n.webAnimationsNextTick)},this.processRafCallbacks=function(r){var i=n.rafCallbacks;n.rafCallbacks=[],r<Number(n.currentTime)&&(r=Number(n.currentTime)),n.animations.sort(ew),n.animations=n.tick(r,!0,n.animations)[0],i.forEach(function(a){a[1](r)}),n.applyPendingEffects()}}return t.prototype.getAnimations=function(){return this.discardAnimations(),this.animations.slice()},t.prototype.isTicking=function(){return this.inTick},t.prototype.play=function(e,n,r){var i=new X7(e,n,r),a=new f7(i,this);return this.animations.push(a),this.restartWebAnimationsNextTick(),a.updatePromises(),a.play(),a.updatePromises(),a},t.prototype.applyDirtiedAnimation=function(e){var n=this;if(!this.inTick){e.markTarget();var r=e.targetAnimations();r.sort(ew);var i=this.tick(Number(this.currentTime),!1,r.slice())[1];i.forEach(function(a){var o=n.animations.indexOf(a);o!==-1&&n.animations.splice(o,1)}),this.applyPendingEffects()}},t.prototype.restart=function(){return this.ticking||(this.ticking=!0,this.requestAnimationFrame(function(){}),this.hasRestartedThisFrame=!0),this.hasRestartedThisFrame},t.prototype.destroy=function(){this.document.defaultView.cancelAnimationFrame(this.frameId)},t.prototype.applyPendingEffects=function(){this.pendingEffects.forEach(function(e){e==null||e.applyInterpolations()}),this.pendingEffects=[]},t.prototype.updateAnimationsPromises=function(){this.animationsWithPromises=this.animationsWithPromises.filter(function(e){return e.updatePromises()})},t.prototype.discardAnimations=function(){this.updateAnimationsPromises(),this.animations=this.animations.filter(function(e){return e.playState!=="finished"&&e.playState!=="idle"})},t.prototype.restartWebAnimationsNextTick=function(){this.timelineTicking||(this.timelineTicking=!0,this.requestAnimationFrame(this.webAnimationsNextTick))},t.prototype.rAF=function(e){var n=this.rafId++;return this.rafCallbacks.length===0&&(this.frameId=this.document.defaultView.requestAnimationFrame(this.processRafCallbacks)),this.rafCallbacks.push([n,e]),n},t.prototype.requestAnimationFrame=function(e){var n=this;return this.rAF(function(r){n.updateAnimationsPromises(),e(r),n.updateAnimationsPromises()})},t.prototype.tick=function(e,n,r){var i,a,o=this;this.inTick=!0,this.hasRestartedThisFrame=!1,this.currentTime=e,this.ticking=!1;var s=[],c=[],l=[],u=[];return r.forEach(function(f){f.tick(e,n),f._inEffect?(c.push(f.effect),f.markTarget()):(s.push(f.effect),f.unmarkTarget()),f._needsTick&&(o.ticking=!0);var d=f._inEffect||f._needsTick;f._inTimeline=d,d?l.push(f):u.push(f)}),(i=this.pendingEffects).push.apply(i,yt([],R(s),!1)),(a=this.pendingEffects).push.apply(a,yt([],R(c),!1)),this.ticking&&this.requestAnimationFrame(function(){}),this.inTick=!1,[l,u]},t}();ct.EasingFunction=my,ct.AnimationTimeline=q7;const nw="main-layer",xy="label-layer",fo="element",_y="view",af="plot",rw="component",Oy="label",iw="area",Kvt="mask",aw={};function ow(t,e){Object.assign(aw,{[t]:e})}function Z7(t,e){var n=e.r;t.arc(n,n,n,0,Math.PI*2,!1)}function K7(t,e){var n=e.rx,r=e.ry,i=n,a=r;if(t.ellipse)t.ellipse(i,a,i,a,0,0,Math.PI*2,!1);else{var o=i>a?i:a,s=i>a?1:i/a,c=i>a?a/i:1;t.save(),t.scale(s,c),t.arc(o,o,o,0,Math.PI*2)}}function Q7(t,e){var n=e.x1,r=e.y1,i=e.x2,a=e.y2,o=e.defX,s=o===void 0?0:o,c=e.defY,l=c===void 0?0:c,u=e.markerStart,f=e.markerEnd,d=e.markerStartOffset,h=e.markerEndOffset,p=0,v=0,g=0,y=0,m=0,b,x;u&&$e(u)&&d&&(b=i-n,x=a-r,m=Math.atan2(x,b),p=Math.cos(m)*(d||0),v=Math.sin(m)*(d||0)),f&&$e(f)&&h&&(b=n-i,x=r-a,m=Math.atan2(x,b),g=Math.cos(m)*(h||0),y=Math.sin(m)*(h||0)),t.moveTo(n-s+p,r-l+v),t.lineTo(i-s+g,a-l+y)}function J7(t,e){var n=e.defX,r=n===void 0?0:n,i=e.defY,a=i===void 0?0:i,o=e.markerStart,s=e.markerEnd,c=e.markerStartOffset,l=e.markerEndOffset,u=e.path,f=u.absolutePath,d=u.segments,h=0,p=0,v=0,g=0,y=0,m,b;if(o&&$e(o)&&c){var x=R(o.parentNode.getStartTangent(),2),_=x[0],O=x[1];m=_[0]-O[0],b=_[1]-O[1],y=Math.atan2(b,m),h=Math.cos(y)*(c||0),p=Math.sin(y)*(c||0)}if(s&&$e(s)&&l){var w=R(s.parentNode.getEndTangent(),2),_=w[0],O=w[1];m=_[0]-O[0],b=_[1]-O[1],y=Math.atan2(b,m),v=Math.cos(y)*(l||0),g=Math.sin(y)*(l||0)}for(var S=0;S<f.length;S++){var M=f[S],E=M[0],P=f[S+1],L=S===0&&(h!==0||p!==0),A=(S===f.length-1||P&&(P[0]==="M"||P[0]==="Z"))&&v!==0&&g!==0;switch(E){case"M":L?(t.moveTo(M[1]-r+h,M[2]-a+p),t.lineTo(M[1]-r,M[2]-a)):t.moveTo(M[1]-r,M[2]-a);break;case"L":A?t.lineTo(M[1]-r+v,M[2]-a+g):t.lineTo(M[1]-r,M[2]-a);break;case"Q":t.quadraticCurveTo(M[1]-r,M[2]-a,M[3]-r,M[4]-a),A&&t.lineTo(M[3]-r+v,M[4]-a+g);break;case"C":t.bezierCurveTo(M[1]-r,M[2]-a,M[3]-r,M[4]-a,M[5]-r,M[6]-a),A&&t.lineTo(M[5]-r+v,M[6]-a+g);break;case"A":{var T=d[S].arcParams,C=T.cx,N=T.cy,B=T.rx,j=T.ry,D=T.startAngle,G=T.endAngle,Y=T.xRotation,U=T.sweepFlag;if(t.ellipse)t.ellipse(C-r,N-a,B,j,Y,D,G,!!(1-U));else{var V=B>j?B:j,it=B>j?1:B/j,pt=B>j?j/B:1;t.translate(C-r,N-a),t.rotate(Y),t.scale(it,pt),t.arc(0,0,V,D,G,!!(1-U)),t.scale(1/it,1/pt),t.rotate(-Y),t.translate(-(C-r),-(N-a))}A&&t.lineTo(M[6]-r+v,M[7]-a+g);break}case"Z":t.closePath();break}}}function tz(t,e){var n=e.defX,r=n===void 0?0:n,i=e.defY,a=i===void 0?0:i,o=e.markerStart,s=e.markerEnd,c=e.markerStartOffset,l=e.markerEndOffset,u=e.points.points,f=u.length,d=u[0][0]-r,h=u[0][1]-a,p=u[f-1][0]-r,v=u[f-1][1]-a,g=0,y=0,m=0,b=0,x=0,_,O;o&&$e(o)&&c&&(_=u[1][0]-u[0][0],O=u[1][1]-u[0][1],x=Math.atan2(O,_),g=Math.cos(x)*(c||0),y=Math.sin(x)*(c||0)),s&&$e(s)&&l&&(_=u[f-1][0]-u[0][0],O=u[f-1][1]-u[0][1],x=Math.atan2(O,_),m=Math.cos(x)*(l||0),b=Math.sin(x)*(l||0)),t.moveTo(d+(g||m),h+(y||b));for(var w=1;w<f-1;w++){var S=u[w];t.lineTo(S[0]-r,S[1]-a)}t.lineTo(p,v)}function ez(t,e){var n=e.defX,r=n===void 0?0:n,i=e.defY,a=i===void 0?0:i,o=e.markerStart,s=e.markerEnd,c=e.markerStartOffset,l=e.markerEndOffset,u=e.points.points,f=u.length,d=u[0][0]-r,h=u[0][1]-a,p=u[f-1][0]-r,v=u[f-1][1]-a,g=0,y=0,m=0,b=0,x=0,_,O;o&&$e(o)&&c&&(_=u[1][0]-u[0][0],O=u[1][1]-u[0][1],x=Math.atan2(O,_),g=Math.cos(x)*(c||0),y=Math.sin(x)*(c||0)),s&&$e(s)&&l&&(_=u[f-2][0]-u[f-1][0],O=u[f-2][1]-u[f-1][1],x=Math.atan2(O,_),m=Math.cos(x)*(l||0),b=Math.sin(x)*(l||0)),t.moveTo(d+g,h+y);for(var w=1;w<f-1;w++){var S=u[w];t.lineTo(S[0]-r,S[1]-a)}t.lineTo(p+m,v+b)}function nz(t,e){var n=e.radius,r=e.width,i=e.height,a=r,o=i,s=n&&n.some(function(g){return g!==0});if(!s)t.rect(0,0,a,o);else{var c=r>0?1:-1,l=i>0?1:-1,u=c+l===0,f=R(n.map(function(g){return Vn(g,0,Math.min(Math.abs(a)/2,Math.abs(o)/2))}),4),d=f[0],h=f[1],p=f[2],v=f[3];t.moveTo(c*d,0),t.lineTo(a-c*h,0),h!==0&&t.arc(a-c*h,l*h,h,-l*Math.PI/2,c>0?0:Math.PI,u),t.lineTo(a,o-l*p),p!==0&&t.arc(a-c*p,o-l*p,p,c>0?0:Math.PI,l>0?Math.PI/2:1.5*Math.PI,u),t.lineTo(c*v,o),v!==0&&t.arc(c*v,o-l*v,v,l>0?Math.PI/2:-Math.PI/2,c>0?Math.PI:0,u),t.lineTo(0,l*d),d!==0&&t.arc(c*d,l*d,d,c>0?Math.PI:0,l>0?Math.PI*1.5:Math.PI/2,u)}}var rz=function(t){Yt(e,t);function e(){var n=t.apply(this,yt([],R(arguments),!1))||this;return n.name="canvas-path-generator",n}return e.prototype.init=function(){var n,r=(n={},n[ot.CIRCLE]=Z7,n[ot.ELLIPSE]=K7,n[ot.RECT]=nz,n[ot.LINE]=Q7,n[ot.POLYLINE]=ez,n[ot.POLYGON]=tz,n[ot.PATH]=J7,n[ot.TEXT]=void 0,n[ot.GROUP]=void 0,n[ot.IMAGE]=void 0,n[ot.HTML]=void 0,n[ot.MESH]=void 0,n);this.context.pathGeneratorFactory=r},e.prototype.destroy=function(){delete this.context.pathGeneratorFactory},e}(Go),iz=Te(),az=Te(),oz=Te(),sz=On(),cz=function(){function t(){var e=this;this.isHit=function(n,r,i,a){var o=e.context.pointInPathPickerFactory[n.nodeName];if(o){var s=Aa(sz,i),c=Sr(az,ga(oz,r[0],r[1],0),s),l=n.getGeometryBounds().halfExtents,u=n.parsedStyle.anchor;if(c[0]+=(u&&u[0]||0)*l[0]*2,c[1]+=(u&&u[1]||0)*l[1]*2,o(n,new kr(c[0],c[1]),a,e.isPointInPath,e.context,e.runtime))return!0}return!1},this.isPointInPath=function(n,r){var i=e.runtime.offscreenCanvasCreator.getOrCreateContext(e.context.config.offscreenCanvas),a=e.context.pathGeneratorFactory[n.nodeName];return a&&(i.beginPath(),a(i,n.parsedStyle),i.closePath()),i.isPointInPath(r.x,r.y)}}return t.prototype.apply=function(e,n){var r=this,i,a=e.renderingService,o=e.renderingContext;this.context=e,this.runtime=n;var s=(i=o.root)===null||i===void 0?void 0:i.ownerDocument;a.hooks.pick.tapPromise(t.tag,function(c){return Fs(r,void 0,void 0,function(){return zs(this,function(l){return[2,this.pick(s,c)]})})}),a.hooks.pickSync.tap(t.tag,function(c){return r.pick(s,c)})},t.prototype.pick=function(e,n){var r,i,a=n.topmost,o=n.position,s=o.x,c=o.y,l=ga(iz,s,c,0),u=e.elementsFromBBox(l[0],l[1],l[0],l[1]),f=[];try{for(var d=Vr(u),h=d.next();!h.done;h=d.next()){var p=h.value,v=p.getWorldTransform(),g=this.isHit(p,l,v,!1);if(g){var y=yO(p);if(y){var m=y.parsedStyle.clipPath,b=this.isHit(m,l,m.getWorldTransform(),!0);if(b){if(a)return n.picked=[p],n;f.push(p)}}else{if(a)return n.picked=[p],n;f.push(p)}}}}catch(x){r={error:x}}finally{try{h&&!h.done&&(i=d.return)&&i.call(d)}finally{if(r)throw r.error}}return n.picked=f,n},t.tag="CanvasPicker",t}();function lz(t,e,n){var r=t.parsedStyle,i=r.r,a=r.fill,o=r.stroke,s=r.lineWidth,c=r.increasedLineWidthForHitTesting,l=r.pointerEvents,u=((s||0)+(c||0))/2,f=Xr(i,i,e.x,e.y),d=R(qs(l,a,o),2),h=d[0],p=d[1];return h&&p||n?f<=i+u:h?f<=i:p?f>=i-u&&f<=i+u:!1}function qh(t,e,n,r){return t/(n*n)+e/(r*r)}function uz(t,e,n){var r=t.parsedStyle,i=r.rx,a=r.ry,o=r.fill,s=r.stroke,c=r.lineWidth,l=r.increasedLineWidthForHitTesting,u=r.pointerEvents,f=e.x,d=e.y,h=R(qs(u,o,s),2),p=h[0],v=h[1],g=((c||0)+(l||0))/2,y=(f-i)*(f-i),m=(d-a)*(d-a);return p&&v||n?qh(y,m,i+g,a+g)<=1:p?qh(y,m,i,a)<=1:v?qh(y,m,i-g,a-g)>=1&&qh(y,m,i+g,a+g)<=1:!1}function Js(t,e,n,r,i,a){return i>=t&&i<=t+n&&a>=e&&a<=e+r}function fz(t,e,n,r,i,a,o){var s=i/2;return Js(t-s,e-s,n,i,a,o)||Js(t+n-s,e-s,i,r,a,o)||Js(t+s,e+r-s,n,i,a,o)||Js(t-s,e+s,i,r,a,o)}function Zh(t,e,n,r,i,a,o,s){var c=(Math.atan2(s-e,o-t)+Math.PI*2)%(Math.PI*2),l={x:t+n*Math.cos(c),y:e+n*Math.sin(c)};return Xr(l.x,l.y,o,s)<=a/2}function Uo(t,e,n,r,i,a,o){var s=Math.min(t,n),c=Math.max(t,n),l=Math.min(e,r),u=Math.max(e,r),f=i/2;return a>=s-f&&a<=c+f&&o>=l-f&&o<=u+f?A2(t,e,n,r,a,o)<=i/2:!1}function sw(t,e,n,r,i){var a=t.length;if(a<2)return!1;for(var o=0;o<a-1;o++){var s=t[o][0],c=t[o][1],l=t[o+1][0],u=t[o+1][1];if(Uo(s,c,l,u,e,n,r))return!0}if(i){var f=t[0],d=t[a-1];if(Uo(f[0],f[1],d[0],d[1],e,n,r))return!0}return!1}var dz=1e-6;function wy(t){return Math.abs(t)<dz?0:t<0?-1:1}function hz(t,e,n){return(n[0]-t[0])*(e[1]-t[1])===(e[0]-t[0])*(n[1]-t[1])&&Math.min(t[0],e[0])<=n[0]&&n[0]<=Math.max(t[0],e[0])&&Math.min(t[1],e[1])<=n[1]&&n[1]<=Math.max(t[1],e[1])}function cw(t,e,n){var r=!1,i=t.length;if(i<=2)return!1;for(var a=0;a<i;a++){var o=t[a],s=t[(a+1)%i];if(hz(o,s,[e,n]))return!0;wy(o[1]-n)>0!=wy(s[1]-n)>0&&wy(e-(n-o[1])*(o[0]-s[0])/(o[1]-s[1])-o[0])<0&&(r=!r)}return r}function lw(t,e,n){for(var r=!1,i=0;i<t.length;i++){var a=t[i];if(r=cw(a,e,n),r)break}return r}function pz(t,e,n){var r=t.parsedStyle,i=r.x1,a=r.y1,o=r.x2,s=r.y2,c=r.lineWidth,l=r.increasedLineWidthForHitTesting,u=r.defX,f=u===void 0?0:u,d=r.defY,h=d===void 0?0:d,p=r.pointerEvents,v=r.fill,g=r.stroke,y=R(qs(p,v,g),2),m=y[1];return!m&&!n||!c?!1:Uo(i,a,o,s,(c||0)+(l||0),e.x+f,e.y+h)}function vz(t,e,n,r,i){for(var a=!1,o=e/2,s=0;s<t.length;s++){var c=t[s],l=c.currentPoint,u=c.params,f=c.prePoint,d=c.box;if(!(d&&!Js(d.x-o,d.y-o,d.width+e,d.height+e,n,r)))switch(c.command){case"L":case"Z":if(a=Uo(f[0],f[1],l[0],l[1],e,n,r),a)return!0;break;case"Q":var h=K8(f[0],f[1],u[1],u[2],u[3],u[4],n,r);if(a=h<=e/2,a)return!0;break;case"C":var p=k2(f[0],f[1],u[1],u[2],u[3],u[4],u[5],u[6],n,r,i);if(a=p<=e/2,a)return!0;break;case"A":c.cubicParams||(c.cubicParams=_g(f[0],f[1],u[1],u[2],u[3],u[4],u[5],u[6],u[7],void 0));for(var v=c.cubicParams,g=f,y=0;y<v.length;y+=6){var m=k2(g[0],g[1],v[y],v[y+1],v[y+2],v[y+3],v[y+4],v[y+5],n,r,i);if(g=[v[y+4],v[y+5]],a=m<=e/2,a)return!0}break}}return a}function gz(t,e,n,r,i,a){var o=t.parsedStyle,s=o.lineWidth,c=o.increasedLineWidthForHitTesting,l=o.stroke,u=o.fill,f=o.defX,d=f===void 0?0:f,h=o.defY,p=h===void 0?0:h,v=o.path,g=o.pointerEvents,y=v.segments,m=v.hasArc,b=v.polylines,x=v.polygons,_=R(qs(g,(x==null?void 0:x.length)&&u,l),2),O=_[0],w=_[1],S=$g(t),M=!1;return O||n?(m?M=r(t,e):M=lw(x,e.x+d,e.y+p)||lw(b,e.x+d,e.y+p),M):((w||n)&&(M=vz(y,(s||0)+(c||0),e.x+d,e.y+p,S)),M)}function yz(t,e,n){var r=t.parsedStyle,i=r.stroke,a=r.fill,o=r.lineWidth,s=r.increasedLineWidthForHitTesting,c=r.points,l=r.defX,u=l===void 0?0:l,f=r.defY,d=f===void 0?0:f,h=r.pointerEvents,p=R(qs(h,a,i),2),v=p[0],g=p[1],y=!1;return(g||n)&&(y=sw(c.points,(o||0)+(s||0),e.x+u,e.y+d,!0)),!y&&(v||n)&&(y=cw(c.points,e.x+u,e.y+d)),y}function mz(t,e,n){var r=t.parsedStyle,i=r.lineWidth,a=r.increasedLineWidthForHitTesting,o=r.points,s=r.defX,c=s===void 0?0:s,l=r.defY,u=l===void 0?0:l,f=r.pointerEvents,d=r.fill,h=r.stroke,p=R(qs(f,d,h),2),v=p[1];return!v&&!n||!i?!1:sw(o.points,(i||0)+(a||0),e.x+c,e.y+u,!1)}function bz(t,e,n,r,i){var a=t.parsedStyle,o=a.radius,s=a.fill,c=a.stroke,l=a.lineWidth,u=a.increasedLineWidthForHitTesting,f=a.width,d=a.height,h=a.pointerEvents,p=R(qs(h,s,c),2),v=p[0],g=p[1],y=o&&o.some(function(_){return _!==0}),m=(l||0)+(u||0);if(y){var x=!1;return(g||n)&&(x=xz(0,0,f,d,o.map(function(_){return Vn(_,0,Math.min(Math.abs(f)/2,Math.abs(d)/2))}),m,e.x,e.y)),!x&&(v||n)&&(x=r(t,e)),x}else{var b=m/2;if(v&&g||n)return Js(0-b,0-b,f+b,d+b,e.x,e.y);if(v)return Js(0,0,f,d,e.x,e.y);if(g)return fz(0,0,f,d,m,e.x,e.y)}return!1}function xz(t,e,n,r,i,a,o,s){var c=R(i,4),l=c[0],u=c[1],f=c[2],d=c[3];return Uo(t+l,e,t+n-u,e,a,o,s)||Uo(t+n,e+u,t+n,e+r-f,a,o,s)||Uo(t+n-f,e+r,t+d,e+r,a,o,s)||Uo(t,e+r-d,t,e+l,a,o,s)||Zh(t+n-u,e+u,u,1.5*Math.PI,2*Math.PI,a,o,s)||Zh(t+n-f,e+r-f,f,0,.5*Math.PI,a,o,s)||Zh(t+d,e+r-d,d,.5*Math.PI,Math.PI,a,o,s)||Zh(t+l,e+l,l,Math.PI,1.5*Math.PI,a,o,s)}function _z(t,e,n,r,i,a){var o=t.parsedStyle,s=o.pointerEvents,c=o.width,l=o.height;if(s==="non-transparent-pixel"){var u=i.config.offscreenCanvas,f=a.offscreenCanvasCreator.getOrCreateCanvas(u),d=a.offscreenCanvasCreator.getOrCreateContext(u,{willReadFrequently:!0});f.width=c,f.height=l,i.defaultStyleRendererFactory[ot.IMAGE].render(d,t.parsedStyle,t,void 0,void 0,void 0);var h=d.getImageData(e.x,e.y,1,1).data;return h.every(function(p){return p!==0})}return!0}var Oz=function(t){Yt(e,t);function e(){var n=t.apply(this,yt([],R(arguments),!1))||this;return n.name="canvas-picker",n}return e.prototype.init=function(){var n,r=function(){return!0},i=(n={},n[ot.CIRCLE]=lz,n[ot.ELLIPSE]=uz,n[ot.RECT]=bz,n[ot.LINE]=pz,n[ot.POLYLINE]=mz,n[ot.POLYGON]=yz,n[ot.PATH]=gz,n[ot.TEXT]=r,n[ot.GROUP]=null,n[ot.IMAGE]=_z,n[ot.HTML]=null,n[ot.MESH]=null,n);this.context.pointInPathPickerFactory=i,this.addRenderingPlugin(new cz)},e.prototype.destroy=function(){delete this.context.pointInPathPickerFactory,this.removeAllRenderingPlugins()},e}(Go),wz=function(){function t(e){this.canvasRendererPluginOptions=e,this.removedRBushNodeAABBs=[],this.renderQueue=[],this.restoreStack=[],this.clearFullScreen=!1,this.vpMatrix=On(),this.dprMatrix=On(),this.tmpMat4=On(),this.vec3a=Te(),this.vec3b=Te(),this.vec3c=Te(),this.vec3d=Te()}return t.prototype.apply=function(e,n){var r=this;this.context=e;var i=e.config,a=e.camera,o=e.renderingService,s=e.renderingContext,c=e.rBushRoot,l=e.pathGeneratorFactory;this.rBush=c,this.pathGeneratorFactory=l;var u=e.contextService,f=s.root.ownerDocument.defaultView,d=function(v){var g=v.target,y=g.rBushNode;y.aabb&&r.removedRBushNodeAABBs.push(y.aabb)},h=function(v){var g=v.target,y=g.rBushNode;y.aabb&&r.removedRBushNodeAABBs.push(y.aabb)};o.hooks.init.tap(t.tag,function(){f.addEventListener(oe.UNMOUNTED,d),f.addEventListener(oe.CULLED,h);var v=u.getDPR(),g=i.width,y=i.height,m=u.getContext();r.clearRect(m,0,0,g*v,y*v,i.background)}),o.hooks.destroy.tap(t.tag,function(){f.removeEventListener(oe.UNMOUNTED,d),f.removeEventListener(oe.CULLED,h),r.renderQueue=[],r.removedRBushNodeAABBs=[],r.restoreStack=[]}),o.hooks.beginFrame.tap(t.tag,function(){var v=u.getContext(),g=u.getDPR(),y=i.width,m=i.height,b=r.canvasRendererPluginOptions,x=b.dirtyObjectNumThreshold,_=b.dirtyObjectRatioThreshold,O=o.getStats(),w=O.total,S=O.rendered,M=S/w;r.clearFullScreen=o.disableDirtyRectangleRendering()||S>x&&M>_,v&&(v.resetTransform?v.resetTransform():v.setTransform(1,0,0,1,0,0),r.clearFullScreen&&r.clearRect(v,0,0,y*g,m*g,i.background))});var p=function(v,g){v.isVisible()&&!v.isCulled()&&(r.renderDisplayObject(v,g,r.context,r.restoreStack,n),r.saveDirtyAABB(v));var y=v.sortable.sorted||v.childNodes;y.forEach(function(m){p(m,g)})};o.hooks.endFrame.tap(t.tag,function(){var v=u.getContext(),g=u.getDPR();if(Y_(r.dprMatrix,[g,g,1]),Ur(r.vpMatrix,r.dprMatrix,a.getOrthoMatrix()),r.clearFullScreen)p(s.root,v);else{var y=r.safeMergeAABB.apply(r,yt([r.mergeDirtyAABBs(r.renderQueue)],R(r.removedRBushNodeAABBs.map(function(Y){var U=Y.minX,V=Y.minY,it=Y.maxX,pt=Y.maxY,Ot=new ur;return Ot.setMinMax([U,V,0],[it,pt,0]),Ot})),!1));if(r.removedRBushNodeAABBs=[],ur.isEmpty(y)){r.renderQueue=[];return}var m=r.convertAABB2Rect(y),b=m.x,x=m.y,_=m.width,O=m.height,w=Sr(r.vec3a,[b,x,0],r.vpMatrix),S=Sr(r.vec3b,[b+_,x,0],r.vpMatrix),M=Sr(r.vec3c,[b,x+O,0],r.vpMatrix),E=Sr(r.vec3d,[b+_,x+O,0],r.vpMatrix),P=Math.min(w[0],S[0],E[0],M[0]),L=Math.min(w[1],S[1],E[1],M[1]),A=Math.max(w[0],S[0],E[0],M[0]),T=Math.max(w[1],S[1],E[1],M[1]),C=Math.floor(P),N=Math.floor(L),B=Math.ceil(A-P),j=Math.ceil(T-L);v.save(),r.clearRect(v,C,N,B,j,i.background),v.beginPath(),v.rect(C,N,B,j),v.clip(),v.setTransform(r.vpMatrix[0],r.vpMatrix[1],r.vpMatrix[4],r.vpMatrix[5],r.vpMatrix[12],r.vpMatrix[13]);var D=i.renderer.getConfig().enableDirtyRectangleRenderingDebug;D&&f.dispatchEvent(new vn(wi.DIRTY_RECTANGLE,{dirtyRect:{x:C,y:N,width:B,height:j}}));var G=r.searchDirtyObjects(y);G.sort(function(Y,U){return Y.sortable.renderOrder-U.sortable.renderOrder}).forEach(function(Y){Y&&Y.isVisible()&&!Y.isCulled()&&r.renderDisplayObject(Y,v,r.context,r.restoreStack,n)}),v.restore(),r.renderQueue.forEach(function(Y){r.saveDirtyAABB(Y)}),r.renderQueue=[]}r.restoreStack.forEach(function(){v.restore()}),r.restoreStack=[]}),o.hooks.render.tap(t.tag,function(v){r.clearFullScreen||r.renderQueue.push(v)})},t.prototype.clearRect=function(e,n,r,i,a,o){e.clearRect(n,r,i,a),o&&(e.fillStyle=o,e.fillRect(n,r,i,a))},t.prototype.renderDisplayObject=function(e,n,r,i,a){var o=e.nodeName,s=i[i.length-1];s&&!(e.compareDocumentPosition(s)&Lr.DOCUMENT_POSITION_CONTAINS)&&(n.restore(),i.pop());var c=this.context.styleRendererFactory[o],l=this.pathGeneratorFactory[o],u=e.parsedStyle.clipPath;if(u){this.applyWorldTransform(n,u);var f=this.pathGeneratorFactory[u.nodeName];f&&(n.save(),i.push(e),n.beginPath(),f(n,u.parsedStyle),n.closePath(),n.clip())}c&&(this.applyWorldTransform(n,e),n.save(),this.applyAttributesToContext(n,e)),l&&(n.beginPath(),l(n,e.parsedStyle),e.nodeName!==ot.LINE&&e.nodeName!==ot.PATH&&e.nodeName!==ot.POLYLINE&&n.closePath()),c&&(c.render(n,e.parsedStyle,e,r,this,a),n.restore()),e.renderable.dirty=!1},t.prototype.convertAABB2Rect=function(e){var n=e.getMin(),r=e.getMax(),i=Math.floor(n[0]),a=Math.floor(n[1]),o=Math.ceil(r[0]),s=Math.ceil(r[1]),c=o-i,l=s-a;return{x:i,y:a,width:c,height:l}},t.prototype.mergeDirtyAABBs=function(e){var n=new ur;return e.forEach(function(r){var i=r.getRenderBounds();n.add(i);var a=r.renderable.dirtyRenderBounds;a&&n.add(a)}),n},t.prototype.searchDirtyObjects=function(e){var n=R(e.getMin(),2),r=n[0],i=n[1],a=R(e.getMax(),2),o=a[0],s=a[1],c=this.rBush.search({minX:r,minY:i,maxX:o,maxY:s});return c.map(function(l){var u=l.displayObject;return u})},t.prototype.saveDirtyAABB=function(e){var n=e.renderable;n.dirtyRenderBounds||(n.dirtyRenderBounds=new ur);var r=e.getRenderBounds();r&&n.dirtyRenderBounds.update(r.center,r.halfExtents)},t.prototype.applyAttributesToContext=function(e,n){var r=n.parsedStyle,i=r.stroke,a=r.fill,o=r.opacity,s=r.lineDash,c=r.lineDashOffset;s&&e.setLineDash(s),Ft(c)||(e.lineDashOffset=c),Ft(o)||(e.globalAlpha*=o),!Ft(i)&&!Array.isArray(i)&&!i.isNone&&(e.strokeStyle=n.attributes.stroke),!Ft(a)&&!Array.isArray(a)&&!a.isNone&&(e.fillStyle=n.attributes.fill)},t.prototype.applyWorldTransform=function(e,n,r){var i=0,a=0,o=(n.parsedStyle||{}).anchor,s=o&&o[0]||0,c=o&&o[1]||0;if(s!==0||c!==0){var l=n.geometry.contentBounds,u=l&&l.halfExtents[0]*2||0,f=l&&l.halfExtents[1]*2||0;i=-(s*u),a=-(c*f)}r?(Ws(this.tmpMat4,n.getLocalTransform()),this.vec3a[0]=i,this.vec3a[1]=a,this.vec3a[2]=0,Do(this.tmpMat4,this.tmpMat4,this.vec3a),Ur(this.tmpMat4,r,this.tmpMat4),Ur(this.tmpMat4,this.vpMatrix,this.tmpMat4)):(Ws(this.tmpMat4,n.getWorldTransform()),this.vec3a[0]=i,this.vec3a[1]=a,this.vec3a[2]=0,Do(this.tmpMat4,this.tmpMat4,this.vec3a),Ur(this.tmpMat4,this.vpMatrix,this.tmpMat4)),e.setTransform(this.tmpMat4[0],this.tmpMat4[1],this.tmpMat4[4],this.tmpMat4[5],this.tmpMat4[12],this.tmpMat4[13])},t.prototype.safeMergeAABB=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=new ur;return e.forEach(function(i){r.add(i)}),r},t.tag="CanvasRenderer",t}(),Xo=function(){function t(e){this.imagePool=e}return t.prototype.render=function(e,n,r,i,a,o){var s=n.fill,c=n.fillRule,l=n.opacity,u=n.fillOpacity,f=n.stroke,d=n.strokeOpacity,h=n.lineWidth,p=n.lineCap,v=n.lineJoin,g=n.shadowType,y=n.shadowColor,m=n.shadowBlur,b=n.filter,x=n.miterLimit,_=!Ft(s)&&!s.isNone,O=!Ft(f)&&!f.isNone&&h>0,w=s.alpha===0,S=!!(b&&b.length),M=!Ft(y)&&m>0,E=r.nodeName,P=g==="inner",L=O&&M&&(E===ot.PATH||E===ot.LINE||E===ot.POLYLINE||w||P);_&&(e.globalAlpha=l*u,L||Kh(r,e,M),this.fill(e,r,s,c,i,a,o),L||this.clearShadowAndFilter(e,S,M)),O&&(e.globalAlpha=l*d,e.lineWidth=h,Ft(x)||(e.miterLimit=x),Ft(p)||(e.lineCap=p),Ft(v)||(e.lineJoin=v),L&&(P&&(e.globalCompositeOperation="source-atop"),Kh(r,e,!0),P&&(this.stroke(e,r,f,i,a,o),e.globalCompositeOperation="source-over",this.clearShadowAndFilter(e,S,!0))),this.stroke(e,r,f,i,a,o))},t.prototype.clearShadowAndFilter=function(e,n,r){if(r&&(e.shadowColor="transparent",e.shadowBlur=0),n){var i=e.filter;!Ft(i)&&i.indexOf("drop-shadow")>-1&&(e.filter=i.replace(/drop-shadow\([^)]*\)/,"").trim()||"none")}},t.prototype.fill=function(e,n,r,i,a,o,s){var c=this;Array.isArray(r)?r.forEach(function(l){e.fillStyle=c.getColor(l,n,e),i?e.fill(i):e.fill()}):(Xu(r)&&(e.fillStyle=this.getPattern(r,n,e,a,o,s)),i?e.fill(i):e.fill())},t.prototype.stroke=function(e,n,r,i,a,o){var s=this;Array.isArray(r)?r.forEach(function(c){e.strokeStyle=s.getColor(c,n,e),e.stroke()}):(Xu(r)&&(e.strokeStyle=this.getPattern(r,n,e,i,a,o)),e.stroke())},t.prototype.getPattern=function(e,n,r,i,a,o){var s,c;if(e.image.nodeName==="rect"){var l=e.image.parsedStyle,u=l.width,f=l.height;c=i.contextService.getDPR();var d=i.config.offscreenCanvas;s=o.offscreenCanvasCreator.getOrCreateCanvas(d),s.width=u*c,s.height=f*c;var h=o.offscreenCanvasCreator.getOrCreateContext(d),p=[];e.image.forEach(function(g){a.renderDisplayObject(g,h,i,p,o)}),p.forEach(function(){h.restore()})}var v=this.imagePool.getOrCreatePatternSync(e,r,s,c,function(){n.renderable.dirty=!0,i.renderingService.dirtify()});return v},t.prototype.getColor=function(e,n,r){var i;if(e.type===Na.LinearGradient||e.type===Na.RadialGradient){var a=n.getGeometryBounds(),o=a&&a.halfExtents[0]*2||1,s=a&&a.halfExtents[1]*2||1;i=this.imagePool.getOrCreateGradient(nt(nt({type:e.type},e.value),{width:o,height:s}),r)}return i},t}();function Kh(t,e,n){var r=t.parsedStyle,i=r.filter,a=r.shadowColor,o=r.shadowBlur,s=r.shadowOffsetX,c=r.shadowOffsetY;i&&i.length&&(e.filter=t.style.filter),n&&(e.shadowColor=a.toString(),e.shadowBlur=o||0,e.shadowOffsetX=s||0,e.shadowOffsetY=c||0)}var Sz=function(){function t(e){this.imagePool=e}return t.prototype.render=function(e,n,r){var i=n.width,a=n.height,o=n.img,s=n.shadowColor,c=n.shadowBlur,l,u=i,f=a;if(Dn(o)?l=this.imagePool.getImageSync(o):(u||(u=o.width),f||(f=o.height),l=o),l){var d=!Ft(s)&&c>0;Kh(r,e,d);try{e.drawImage(l,0,0,u,f)}catch(h){}}},t}(),Mz=function(){function t(){}return t.prototype.render=function(e,n,r,i,a,o){var s=n,c=s.lineWidth,l=s.textAlign,u=s.textBaseline,f=s.lineJoin,d=s.miterLimit,h=s.letterSpacing,p=s.stroke,v=s.fill,g=s.fillOpacity,y=s.strokeOpacity,m=s.opacity,b=s.metrics,x=s.dx,_=s.dy,O=s.shadowColor,w=s.shadowBlur,S=b.font,M=b.lines,E=b.height,P=b.lineHeight,L=b.lineMetrics;e.font=S,e.lineWidth=c,e.textAlign=l==="middle"?"center":l;var A=u;!o.enableCSSParsing&&A==="alphabetic"&&(A="bottom"),e.lineJoin=f,Ft(d)||(e.miterLimit=d);var T=0;u==="middle"?T=-E/2-P/2:u==="bottom"||u==="alphabetic"||u==="ideographic"?T=-E:(u==="top"||u==="hanging")&&(T=-P);var C=x||0;T+=_||0,M.length===1&&(A==="bottom"?(A="middle",T-=.5*E):A==="top"&&(A="middle",T+=.5*E)),e.textBaseline=A;var N=!Ft(O)&&w>0;Kh(r,e,N);for(var B=0;B<M.length;B++){var j=c/2+C;T+=P,!Ft(p)&&!p.isNone&&c&&this.drawLetterSpacing(e,M[B],L[B],l,j,T,h,g,y,m,!0),Ft(v)||this.drawLetterSpacing(e,M[B],L[B],l,j,T,h,g,y,m)}},t.prototype.drawLetterSpacing=function(e,n,r,i,a,o,s,c,l,u,f){if(f===void 0&&(f=!1),s===0){f?this.strokeText(e,n,a,o,l):this.fillText(e,n,a,o,c,u);return}var d=e.textAlign;e.textAlign="left";var h=a;i==="center"||i==="middle"?h=a-r.width/2:(i==="right"||i==="end")&&(h=a-r.width);for(var p=Array.from(n),v=e.measureText(n).width,g=0,y=0;y<p.length;++y){var m=p[y];f?this.strokeText(e,m,h,o,l):this.fillText(e,m,h,o,c,u),g=e.measureText(n.substring(y+1)).width,h+=v-g+s,v=g}e.textAlign=d},t.prototype.fillText=function(e,n,r,i,a,o){var s,c=!Ft(a)&&a!==1;c&&(s=e.globalAlpha,e.globalAlpha=a*o),e.fillText(n,r,i),c&&(e.globalAlpha=s)},t.prototype.strokeText=function(e,n,r,i,a){var o,s=!Ft(a)&&a!==1;s&&(o=e.globalAlpha,e.globalAlpha=a),e.strokeText(n,r,i),s&&(e.globalAlpha=o)},t}(),Qvt=function(t){Yt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(Xo),Jvt=function(t){Yt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(Xo),tgt=function(t){Yt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(Xo),egt=function(t){Yt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(Xo),ngt=function(t){Yt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(Xo),rgt=function(t){Yt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(Xo),igt=function(t){Yt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(Xo),Ez=function(t){Yt(e,t);function e(n){n===void 0&&(n={});var r=t.call(this)||this;return r.options=n,r.name="canvas-renderer",r}return e.prototype.init=function(){var n,r=nt({dirtyObjectNumThreshold:500,dirtyObjectRatioThreshold:.8},this.options),i=this.context.imagePool,a=new Xo(i),o=(n={},n[ot.CIRCLE]=a,n[ot.ELLIPSE]=a,n[ot.RECT]=a,n[ot.IMAGE]=new Sz(i),n[ot.TEXT]=new Mz,n[ot.LINE]=a,n[ot.POLYLINE]=a,n[ot.POLYGON]=a,n[ot.PATH]=a,n[ot.GROUP]=void 0,n[ot.HTML]=void 0,n[ot.MESH]=void 0,n);this.context.defaultStyleRendererFactory=o,this.context.styleRendererFactory=o,this.addRenderingPlugin(new wz(r))},e.prototype.destroy=function(){this.removeAllRenderingPlugins(),delete this.context.defaultStyleRendererFactory,delete this.context.styleRendererFactory},e}(Go),Pz=function(){function t(){}return t.prototype.apply=function(e,n){var r=this,i=e.renderingService,a=e.renderingContext,o=e.config;this.context=e;var s=a.root.ownerDocument.defaultView,c=function(O){i.hooks.pointerMove.call(O)},l=function(O){i.hooks.pointerUp.call(O)},u=function(O){i.hooks.pointerDown.call(O)},f=function(O){i.hooks.pointerOver.call(O)},d=function(O){i.hooks.pointerOut.call(O)},h=function(O){i.hooks.pointerCancel.call(O)},p=function(O){i.hooks.pointerWheel.call(O)},v=function(O){i.hooks.click.call(O)},g=function(O){n.globalThis.document.addEventListener("pointermove",c,!0),O.addEventListener("pointerdown",u,!0),O.addEventListener("pointerleave",d,!0),O.addEventListener("pointerover",f,!0),n.globalThis.addEventListener("pointerup",l,!0),n.globalThis.addEventListener("pointercancel",h,!0)},y=function(O){O.addEventListener("touchstart",u,!0),O.addEventListener("touchend",l,!0),O.addEventListener("touchmove",c,!0),O.addEventListener("touchcancel",h,!0)},m=function(O){n.globalThis.document.addEventListener("mousemove",c,!0),O.addEventListener("mousedown",u,!0),O.addEventListener("mouseout",d,!0),O.addEventListener("mouseover",f,!0),n.globalThis.addEventListener("mouseup",l,!0)},b=function(O){n.globalThis.document.removeEventListener("pointermove",c,!0),O.removeEventListener("pointerdown",u,!0),O.removeEventListener("pointerleave",d,!0),O.removeEventListener("pointerover",f,!0),n.globalThis.removeEventListener("pointerup",l,!0)},x=function(O){O.removeEventListener("touchstart",u,!0),O.removeEventListener("touchend",l,!0),O.removeEventListener("touchmove",c,!0),O.removeEventListener("touchcancel",h,!0)},_=function(O){n.globalThis.document.removeEventListener("mousemove",c,!0),O.removeEventListener("mousedown",u,!0),O.removeEventListener("mouseout",d,!0),O.removeEventListener("mouseover",f,!0),n.globalThis.removeEventListener("mouseup",l,!0)};i.hooks.init.tap(t.tag,function(){var O=r.context.contextService.getDomElement();n.globalThis.navigator.msPointerEnabled?(O.style.msContentZooming="none",O.style.msTouchAction="none"):s.supportsPointerEvents&&(O.style.touchAction="none"),s.supportsPointerEvents?g(O):m(O),s.supportsTouchEvents&&y(O),o.useNativeClickEvent&&O.addEventListener("click",v,!0),O.addEventListener("wheel",p,{passive:!0,capture:!0})}),i.hooks.destroy.tap(t.tag,function(){var O=r.context.contextService.getDomElement();n.globalThis.navigator.msPointerEnabled?(O.style.msContentZooming="",O.style.msTouchAction=""):s.supportsPointerEvents&&(O.style.touchAction=""),s.supportsPointerEvents?b(O):_(O),s.supportsTouchEvents&&x(O),o.useNativeClickEvent&&O.removeEventListener("click",v,!0),O.removeEventListener("wheel",p,!0)})},t.tag="DOMInteraction",t}(),Az=function(t){Yt(e,t);function e(){var n=t.apply(this,yt([],R(arguments),!1))||this;return n.name="dom-interaction",n}return e.prototype.init=function(){this.addRenderingPlugin(new Pz)},e.prototype.destroy=function(){this.removeAllRenderingPlugins()},e}(Go),Tz="g-canvas-camera",Cz=function(){function t(){this.displayObjectHTMLElementMap=new WeakMap}return t.prototype.joinTransformMatrix=function(e){return"matrix(".concat([e[0],e[1],e[4],e[5],e[12],e[13]].join(","),")")},t.prototype.apply=function(e,n){var r=this,i=e.camera,a=e.renderingContext,o=e.renderingService;this.context=e;var s=a.root.ownerDocument.defaultView,c=s.context.eventService.nativeHTMLMap,l=function(v,g){g.style.transform=r.joinTransformMatrix(v.getWorldTransform())},u=function(v){var g=v.target;if(g.nodeName===ot.HTML){r.$camera||(r.$camera=r.createCamera(i));var y=r.getOrCreateEl(g);if(r.$camera.appendChild(y),n.enableCSSParsing){var m=g.ownerDocument.documentElement.attributes;Object.keys(m).forEach(function(b){y.style[b]=m[b]})}Object.keys(g.attributes).forEach(function(b){r.updateAttribute(b,g)}),l(g,y),c.set(y,g)}},f=function(v){var g=v.target;if(g.nodeName===ot.HTML&&r.$camera){var y=r.getOrCreateEl(g);y&&(y.remove(),c.delete(y))}},d=function(v){var g=v.target;if(g.nodeName===ot.HTML){var y=v.attrName;r.updateAttribute(y,g)}},h=function(v){var g=v.target;if(g.nodeName===ot.HTML){var y=r.getOrCreateEl(g);l(g,y)}},p=function(){if(r.$camera){var v=r.context.config,g=v.width,y=v.height;r.$camera.style.width="".concat(g||0,"px"),r.$camera.style.height="".concat(y||0,"px")}};o.hooks.init.tap(t.tag,function(){s.addEventListener(wi.RESIZE,p),s.addEventListener(oe.MOUNTED,u),s.addEventListener(oe.UNMOUNTED,f),s.addEventListener(oe.ATTR_MODIFIED,d),s.addEventListener(oe.BOUNDS_CHANGED,h)}),o.hooks.endFrame.tap(t.tag,function(){r.$camera&&a.renderReasons.has($o.CAMERA_CHANGED)&&(r.$camera.style.transform=r.joinTransformMatrix(i.getOrthoMatrix()))}),o.hooks.destroy.tap(t.tag,function(){r.$camera&&r.$camera.remove(),s.removeEventListener(wi.RESIZE,p),s.removeEventListener(oe.MOUNTED,u),s.removeEventListener(oe.UNMOUNTED,f),s.removeEventListener(oe.ATTR_MODIFIED,d),s.removeEventListener(oe.BOUNDS_CHANGED,h)})},t.prototype.createCamera=function(e){var n=this.context.config,r=n.document,i=n.width,a=n.height,o=this.context.contextService.getDomElement(),s=o.parentNode;if(s){var c=Tz,l=s.querySelector("#"+c);if(!l){var u=(r||document).createElement("div");l=u,u.id=c,u.style.position="absolute",u.style.left="".concat(o.offsetLeft||0,"px"),u.style.top="".concat(o.offsetTop||0,"px"),u.style.transformOrigin="left top",u.style.transform=this.joinTransformMatrix(e.getOrthoMatrix()),u.style.overflow="hidden",u.style.pointerEvents="none",u.style.width="".concat(i||0,"px"),u.style.height="".concat(a||0,"px"),s.appendChild(u)}return l}return null},t.prototype.getOrCreateEl=function(e){var n=this.context.config.document,r=this.displayObjectHTMLElementMap.get(e);return r||(r=(n||document).createElement("div"),e.parsedStyle.$el=r,this.displayObjectHTMLElementMap.set(e,r),e.id&&(r.id=e.id),e.name&&r.setAttribute("name",e.name),e.className&&(r.className=e.className),r.style.position="absolute",r.style.left="0px",r.style.top="0px",r.style["will-change"]="transform",r.style.transform=this.joinTransformMatrix(e.getWorldTransform())),r},t.prototype.updateAttribute=function(e,n){var r=this.getOrCreateEl(n);switch(e){case"innerHTML":var i=n.parsedStyle.innerHTML;Dn(i)?r.innerHTML=i:(r.innerHTML="",r.appendChild(i));break;case"transformOrigin":var a=n.parsedStyle.transformOrigin;r.style["transform-origin"]="".concat(a[0].value," ").concat(a[1].value);break;case"width":if(this.context.enableCSSParsing){var o=n.computedStyleMap().get("width");r.style.width=o.toString()}else{var o=n.parsedStyle.width;r.style.width=er(o)?"".concat(o,"px"):o.toString()}break;case"height":if(this.context.enableCSSParsing){var s=n.computedStyleMap().get("height");r.style.height=s.toString()}else{var s=n.parsedStyle.height;r.style.height=er(s)?"".concat(s,"px"):s.toString()}break;case"zIndex":var c=n.parsedStyle.zIndex;r.style["z-index"]="".concat(c);break;case"visibility":var l=n.parsedStyle.visibility;r.style.visibility=l;break;case"pointerEvents":var u=n.parsedStyle.pointerEvents;r.style.pointerEvents=u;break;case"opacity":var f=n.parsedStyle.opacity;r.style.opacity="".concat(f);break;case"fill":var d=n.parsedStyle.fill,h="";Sh(d)?d.isNone?h="transparent":h=n.getAttribute("fill"):Array.isArray(d)?h=n.getAttribute("fill"):Xu(d),r.style.background=h;break;case"stroke":var p=n.parsedStyle.stroke,v="";Sh(p)?p.isNone?v="transparent":v=n.getAttribute("stroke"):Array.isArray(p)?v=n.getAttribute("stroke"):Xu(p),r.style["border-color"]=v,r.style["border-style"]="solid";break;case"lineWidth":var g=n.parsedStyle.lineWidth;r.style["border-width"]="".concat(g||0,"px");break;case"lineDash":r.style["border-style"]="dashed";break;case"filter":var y=n.style.filter;r.style.filter=y;break;default:e!=="x"&&e!=="y"&&!Ft(n.style[e])&&n.style[e]!==""&&(r.style[e]=n.style[e])}},t.tag="HTMLRendering",t}(),kz=function(t){Yt(e,t);function e(){var n=t.apply(this,yt([],R(arguments),!1))||this;return n.name="html-renderer",n}return e.prototype.init=function(){this.addRenderingPlugin(new Cz)},e.prototype.destroy=function(){this.removeAllRenderingPlugins()},e}(Go),Lz=function(){function t(e){this.canvasConfig=e,this.imageCache={},this.gradientCache={},this.patternCache={}}return t.prototype.getImageSync=function(e,n){return this.imageCache[e]?n&&n(this.imageCache[e]):this.getOrCreateImage(e).then(function(r){n&&n(r)}),this.imageCache[e]},t.prototype.getOrCreateImage=function(e){var n=this;if(this.imageCache[e])return Promise.resolve(this.imageCache[e]);var r=this.canvasConfig.createImage;return new Promise(function(i,a){var o;r?o=r(e):Qu&&(o=new window.Image),o&&(o.onload=function(){n.imageCache[e]=o,i(o)},o.onerror=function(s){a(s)},o.crossOrigin="Anonymous",o.src=e)})},t.prototype.getOrCreatePatternSync=function(e,n,r,i,a){var o=this.generatePatternKey(e);if(o&&this.patternCache[o])return this.patternCache[o];var s=e.image,c=e.repetition,l=e.transform,u,f=!1;Dn(s)?u=this.getImageSync(s,a):r?(u=r,f=!0):u=s;var d=u&&n.createPattern(u,c);if(d){var h=void 0;l?h=ey(qg(l),new qr({})):h=Du(On()),f&&ih(h,h,[1/i,1/i,1]),d.setTransform({a:h[0],b:h[1],c:h[4],d:h[5],e:h[12],f:h[13]})}return o&&d&&(this.patternCache[o]=d),d},t.prototype.getOrCreateGradient=function(e,n){var r=this.generateGradientKey(e),i=e.type,a=e.steps,o=e.width,s=e.height,c=e.angle,l=e.cx,u=e.cy,f=e.size;if(this.gradientCache[r])return this.gradientCache[r];var d=null;if(i===Na.LinearGradient){var h=CB(o,s,c),p=h.x1,v=h.y1,g=h.x2,y=h.y2;d=n.createLinearGradient(p,v,g,y)}else if(i===Na.RadialGradient){var m=kB(o,s,l,u,f),b=m.x,x=m.y,_=m.r;d=n.createRadialGradient(b,x,0,b,x,_)}return d&&(a.forEach(function(O){var w=O.offset,S=O.color;w.unit===Ct.kPercentage&&(d==null||d.addColorStop(w.value/100,S.toString()))}),this.gradientCache[r]=d),this.gradientCache[r]},t.prototype.generateGradientKey=function(e){var n=e.type,r=e.width,i=e.height,a=e.steps,o=e.angle,s=e.cx,c=e.cy,l=e.size;return"gradient-".concat(n,"-").concat((o==null?void 0:o.toString())||0,"-").concat((s==null?void 0:s.toString())||0,"-").concat((c==null?void 0:c.toString())||0,"-").concat((l==null?void 0:l.toString())||0,"-").concat(r,"-").concat(i,"-").concat(a.map(function(u){var f=u.offset,d=u.color;return"".concat(f).concat(d)}).join("-"))},t.prototype.generatePatternKey=function(e){var n=e.image,r=e.repetition;if(Dn(n))return"pattern-".concat(n,"-").concat(r);if(n.nodeName==="rect")return"pattern-".concat(n.entity,"-").concat(r)},t}(),Nz=function(){function t(){}return t.prototype.apply=function(e){var n=e.renderingService,r=e.renderingContext,i=e.imagePool,a=r.root.ownerDocument.defaultView,o=function(l,u,f){var d=l.parsedStyle,h=d.width,p=d.height;h&&!p?l.setAttribute("height",f/u*h):!h&&p&&l.setAttribute("width",u/f*p)},s=function(l){var u=l.target,f=u.nodeName,d=u.attributes;if(f===ot.IMAGE){var h=d.img,p=d.keepAspectRatio;Dn(h)&&i.getImageSync(h,function(v){var g=v.width,y=v.height;p&&o(u,g,y),u.renderable.dirty=!0,n.dirtify()})}},c=function(l){var u=l.target,f=l.attrName,d=l.newValue;u.nodeName===ot.IMAGE&&f==="img"&&Dn(d)&&i.getOrCreateImage(d).then(function(h){var p=h.width,v=h.height;u.attributes.keepAspectRatio&&o(u,p,v),u.renderable.dirty=!0,n.dirtify()})};n.hooks.init.tap(t.tag,function(){a.addEventListener(oe.MOUNTED,s),a.addEventListener(oe.ATTR_MODIFIED,c)}),n.hooks.destroy.tap(t.tag,function(){a.removeEventListener(oe.MOUNTED,s),a.removeEventListener(oe.ATTR_MODIFIED,c)})},t.tag="LoadImage",t}(),Iz=function(t){Yt(e,t);function e(){var n=t.apply(this,yt([],R(arguments),!1))||this;return n.name="image-loader",n}return e.prototype.init=function(){this.context.imagePool=new Lz(this.context.config),this.addRenderingPlugin(new Nz)},e.prototype.destroy=function(){this.removeAllRenderingPlugins()},e}(Go),jz=function(){function t(e){this.renderingContext=e.renderingContext,this.canvasConfig=e.config}return t.prototype.init=function(){var e=this.canvasConfig,n=e.container,r=e.canvas;if(r)this.$canvas=r,n&&r.parentElement!==n&&n.appendChild(r),this.$container=r.parentElement,this.canvasConfig.container=this.$container;else if(n&&(this.$container=Dn(n)?document.getElementById(n):n,this.$container)){var i=document.createElement("canvas");this.$container.appendChild(i),this.$container.style.position||(this.$container.style.position="relative"),this.$canvas=i}this.context=this.$canvas.getContext("2d"),this.resize(this.canvasConfig.width,this.canvasConfig.height)},t.prototype.getContext=function(){return this.context},t.prototype.getDomElement=function(){return this.$canvas},t.prototype.getDPR=function(){return this.dpr},t.prototype.getBoundingClientRect=function(){if(this.$canvas.getBoundingClientRect)return this.$canvas.getBoundingClientRect()},t.prototype.destroy=function(){this.$container&&this.$canvas&&this.$canvas.parentNode&&this.$container.removeChild(this.$canvas)},t.prototype.resize=function(e,n){var r=this.canvasConfig.devicePixelRatio,i=r||Qu&&window.devicePixelRatio||1;i=i>=1?Math.ceil(i):1,this.dpr=i,this.$canvas&&(this.$canvas.width=this.dpr*e,this.$canvas.height=this.dpr*n,F9(this.$canvas,e,n)),this.renderingContext.renderReasons.add($o.CAMERA_CHANGED)},t.prototype.applyCursorStyle=function(e){this.$container&&this.$container.style&&(this.$container.style.cursor=e)},t.prototype.toDataURL=function(e){return e===void 0&&(e={}),Fs(this,void 0,void 0,function(){var n,r;return zs(this,function(i){return n=e.type,r=e.encoderOptions,[2,this.context.canvas.toDataURL(n,r)]})})},t}(),Rz=function(t){Yt(e,t);function e(){var n=t.apply(this,yt([],R(arguments),!1))||this;return n.name="canvas-context-register",n}return e.prototype.init=function(){this.context.ContextService=jz},e.prototype.destroy=function(){delete this.context.ContextService},e}(Go),uw=function(t){Yt(e,t);function e(n){var r=t.call(this,n)||this;return r.registerPlugin(new Rz),r.registerPlugin(new Iz),r.registerPlugin(new rz),r.registerPlugin(new Ez),r.registerPlugin(new Az),r.registerPlugin(new Oz),r.registerPlugin(new kz),r}return e}(tB),Dz=function(){function t(e){this.dragndropPluginOptions=e}return t.prototype.apply=function(e){var n=this,r=e.renderingService,i=e.renderingContext,a=i.root.ownerDocument,o=a.defaultView,s=function(c){var l=c.target,u=l===a,f=u&&n.dragndropPluginOptions.isDocumentDraggable?a:l.closest&&l.closest("[draggable=true]");if(f){var d=!1,h=c.timeStamp,p=[c.clientX,c.clientY],v=null,g=[c.clientX,c.clientY],y=function(b){return Fs(n,void 0,void 0,function(){var x,_,O,w,S,M;return zs(this,function(E){switch(E.label){case 0:if(!d){if(x=b.timeStamp-h,_=bi([b.clientX,b.clientY],p),x<=this.dragndropPluginOptions.dragstartTimeThreshold||_<=this.dragndropPluginOptions.dragstartDistanceThreshold)return[2];b.type="dragstart",f.dispatchEvent(b),d=!0}return b.type="drag",b.dx=b.clientX-g[0],b.dy=b.clientY-g[1],f.dispatchEvent(b),g=[b.clientX,b.clientY],u?[3,2]:(O=this.dragndropPluginOptions.overlap==="pointer"?[b.canvasX,b.canvasY]:l.getBounds().center,[4,a.elementsFromPoint(O[0],O[1])]);case 1:w=E.sent(),S=w[w.indexOf(l)+1],M=(S==null?void 0:S.closest("[droppable=true]"))||(this.dragndropPluginOptions.isDocumentDroppable?a:null),v!==M&&(v&&(b.type="dragleave",b.target=v,v.dispatchEvent(b)),M&&(b.type="dragenter",b.target=M,M.dispatchEvent(b)),v=M,v&&(b.type="dragover",b.target=v,v.dispatchEvent(b))),E.label=2;case 2:return[2]}})})};o.addEventListener("pointermove",y);var m=function(b){if(d){b.detail={preventClick:!0};var x=b.clone();v&&(x.type="drop",x.target=v,v.dispatchEvent(x)),x.type="dragend",f.dispatchEvent(x),d=!1}o.removeEventListener("pointermove",y)};l.addEventListener("pointerup",m,{once:!0}),l.addEventListener("pointerupoutside",m,{once:!0})}};r.hooks.init.tap(t.tag,function(){o.addEventListener("pointerdown",s)}),r.hooks.destroy.tap(t.tag,function(){o.removeEventListener("pointerdown",s)})},t.tag="Dragndrop",t}(),fw=function(t){Yt(e,t);function e(n){n===void 0&&(n={});var r=t.call(this)||this;return r.options=n,r.name="dragndrop",r}return e.prototype.init=function(){this.addRenderingPlugin(new Dz(nt({overlap:"pointer",isDocumentDraggable:!1,isDocumentDroppable:!1,dragstartDistanceThreshold:0,dragstartTimeThreshold:0},this.options)))},e.prototype.destroy=function(){this.removeAllRenderingPlugins()},e.prototype.setOptions=function(n){Object.assign(this.plugins[0].dragndropPluginOptions,n)},e}(Go);function Bz(t,e,n){var r;return function(){var i=this,a=arguments,o=function(){r=null,n||t.apply(i,a)},s=n&&!r;clearTimeout(r),r=setTimeout(o,e),s&&t.apply(i,a)}}var dw=Bz,Fz=function(t){return typeof t=="object"&&t!==null},Sy=Fz,zz=function(t){if(!Sy(t)||!zu(t,"Object"))return!1;if(Object.getPrototypeOf(t)===null)return!0;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e},ho=zz,Gz=5;function Wz(t,e){if(Object.hasOwn)return Object.hasOwn(t,e);if(t==null)throw new TypeError("Cannot convert undefined or null to object");return Object.prototype.hasOwnProperty.call(Object(t),e)}function hw(t,e,n,r){n=n||0,r=r||Gz;for(var i in e)if(Wz(e,i)){var a=e[i];a!==null&&ho(a)?(ho(t[i])||(t[i]={}),n<r?hw(t[i],a,n+1,r):t[i]=e[i]):mr(a)?(t[i]=[],t[i]=t[i].concat(a)):a!==void 0&&(t[i]=a)}}var Yz=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)hw(t,e[r]);return t},dt=Yz;class Hz extends Map{constructor(e,n=gw){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(const[r,i]of e)this.set(r,i)}get(e){return super.get(My(this,e))}has(e){return super.has(My(this,e))}set(e,n){return super.set(pw(this,e),n)}delete(e){return super.delete(vw(this,e))}}class agt extends null{constructor(e,n=gw){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(const r of e)this.add(r)}has(e){return super.has(My(this,e))}add(e){return super.add(pw(this,e))}delete(e){return super.delete(vw(this,e))}}function My({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function pw({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function vw({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function gw(t){return t!==null&&typeof t=="object"?t.valueOf():t}function of(t){return t}function Bn(t,...e){return gl(t,of,of,e)}function Qh(t,...e){return gl(t,Array.from,of,e)}function yw(t,e){for(let n=1,r=e.length;n<r;++n)t=t.flatMap(i=>i.pop().map(([a,o])=>[...i,a,o]));return t}function ogt(t,...e){return yw(Qh(t,...e),e)}function sgt(t,e,...n){return yw(Py(t,e,...n),n)}function Ey(t,e,...n){return gl(t,of,e,n)}function Py(t,e,...n){return gl(t,Array.from,e,n)}function cgt(t,...e){return gl(t,identity,mw,e)}function lgt(t,...e){return gl(t,Array.from,mw,e)}function mw(t){if(t.length!==1)throw new Error("duplicate key");return t[0]}function gl(t,e,n,r){return function i(a,o){if(o>=r.length)return n(a);const s=new Hz,c=r[o++];let l=-1;for(const u of a){const f=c(u,++l,a),d=s.get(f);d?d.push(u):s.set(f,[u])}for(const[u,f]of s)s.set(u,i(f,o));return e(s)}(t,0)}var bw=function(t){return Ft(t)?"":t.toString()},$z=function(t){var e=bw(t);return e.charAt(0).toLowerCase()+e.substring(1)},xw=$z,Vz=function(t,e,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{l(r.next(u))}catch(f){o(f)}}function c(u){try{l(r.throw(u))}catch(f){o(f)}}function l(u){u.done?a(u.value):i(u.value).then(s,c)}l((r=r.apply(t,e||[])).next())})};function tc(t){return t}function Ay(t){return t.reduce((e,n)=>(r,...i)=>n(e(r,...i),...i),tc)}function Uz(t){return t.reduce((e,n)=>r=>Vz(this,void 0,void 0,function*(){const i=yield e(r);return n(i)}),tc)}function Ty(t){return t.replace(/( |^)[a-z]/g,e=>e.toUpperCase())}function yl(t=""){throw new Error(t)}function Cy(t,e){const{attributes:n}=e,r=new Set(["id","className"]);for(const[i,a]of Object.entries(n))r.has(i)||(i==="transform"&&t.attr(i,""),t.attr(i,a))}function bn(t){return t!=null&&!Number.isNaN(t)}function ugt(t,e){return t+(e-t)*Math.random()}function Xz(t){const e=new Map;return n=>{if(e.has(n))return e.get(n);const r=t(n);return e.set(n,r),r}}function qz(t,e){const{transform:n}=t.style,i=(a=>a==="none"||a===void 0)(n)?"":n;t.style.transform=`${i} ${e}`.trimStart()}function At(t,e){return _w(t,e)||{}}function _w(t,e){const n=Object.entries(t||{}).filter(([r])=>r.startsWith(e)).map(([r,i])=>[xw(r.replace(e,"").trim()),i]).filter(([r])=>!!r);return n.length===0?null:Object.fromEntries(n)}function fgt(t,e){return Object.fromEntries(Object.entries(t).map(([n,r])=>[`${e}${upperFirst(n)}`,r]))}function Zz(t,e){return Object.fromEntries(Object.entries(t).filter(([n])=>e.find(r=>n.startsWith(r))))}function ky(t,...e){return Object.fromEntries(Object.entries(t).filter(([n])=>e.every(r=>!n.startsWith(r))))}function Ow(t,e){if(t===void 0)return null;if(typeof t=="number")return t;const n=+t.replace("%","");return Number.isNaN(n)?null:n/100*e}function sf(t){return typeof t=="object"&&!(t instanceof Date)&&t!==null&&!Array.isArray(t)}function po(t){return t===null||t===!1}function ww(t,e,n=5,r=0){if(!(r>=n)){for(const i of Object.keys(e)){const a=e[i];!ho(a)||!ho(t[i])?t[i]=a:ww(t[i],a,n,r+1)}return t}}function se(t){return new fr([t],null,t,t.ownerDocument)}class fr{constructor(e=null,n=null,r=null,i=null,a=[null,null,null,null,null],o=[],s=[]){this._elements=Array.from(e),this._data=n,this._parent=r,this._document=i,this._enter=a[0],this._update=a[1],this._exit=a[2],this._merge=a[3],this._split=a[4],this._transitions=o,this._facetElements=s}selectAll(e){const n=typeof e=="string"?this._parent.querySelectorAll(e):e;return new fr(n,null,this._elements[0],this._document)}selectFacetAll(e){const n=typeof e=="string"?this._parent.querySelectorAll(e):e;return new fr(this._elements,null,this._parent,this._document,void 0,void 0,n)}select(e){const n=typeof e=="string"?this._parent.querySelectorAll(e)[0]||null:e;return new fr([n],null,n,this._document)}append(e){const n=typeof e=="function"?e:()=>this.createElement(e),r=[];if(this._data!==null){for(let i=0;i<this._data.length;i++){const a=this._data[i],[o,s]=Array.isArray(a)?a:[a,null],c=n(o,i);c.__data__=o,s!==null&&(c.__fromElements__=s),this._parent.appendChild(c),r.push(c)}return new fr(r,null,this._parent,this._document)}else{for(let i=0;i<this._elements.length;i++){const a=this._elements[i],o=a.__data__,s=n(o,i);a.appendChild(s),r.push(s)}return new fr(r,null,r[0],this._document)}}maybeAppend(e,n,r){const i=this._elements[0],a=i.getElementById(e);if(a)return new fr([a],null,this._parent,this._document);const o=typeof n=="string"?this.createElement(n):n();return o.id=e,r&&(o.className=r),i.appendChild(o),new fr([o],null,this._parent,this._document)}data(e,n=i=>i,r=()=>null){const i=[],a=[],o=new Set(this._elements),s=[],c=new Set,l=new Map(this._elements.map((h,p)=>[n(h.__data__,p),h])),u=new Map(this._facetElements.map((h,p)=>[n(h.__data__,p),h])),f=Bn(this._elements,h=>r(h.__data__));for(let h=0;h<e.length;h++){const p=e[h],v=n(p,h),g=r(p,h);if(l.has(v)){const y=l.get(v);y.__data__=p,y.__facet__=!1,a.push(y),o.delete(y),l.delete(v)}else if(u.has(v)){const y=u.get(v);y.__data__=p,y.__facet__=!0,a.push(y),u.delete(v)}else if(f.has(v)){const y=f.get(v);s.push([p,y]);for(const m of y)o.delete(m);f.delete(v)}else if(l.has(g)){const y=l.get(g);y.__toData__?y.__toData__.push(p):y.__toData__=[p],c.add(y),o.delete(y)}else i.push(p)}const d=[new fr([],i,this._parent,this._document),new fr(a,null,this._parent,this._document),new fr(o,null,this._parent,this._document),new fr([],s,this._parent,this._document),new fr(c,null,this._parent,this._document)];return new fr(this._elements,null,this._parent,this._document,d)}merge(e){const n=[...this._elements,...e._elements],r=[...this._transitions,...e._transitions];return new fr(n,null,this._parent,this._document,void 0,r)}createElement(e){if(this._document)return this._document.createElement(e,{});const n=fr.registry[e];return n?new n:yl(`Unknown node type: ${e}`)}join(e=o=>o,n=o=>o,r=o=>o.remove(),i=o=>o,a=o=>o.remove()){const o=e(this._enter),s=n(this._update),c=r(this._exit),l=i(this._merge),u=a(this._split);return s.merge(o).merge(c).merge(l).merge(u)}remove(){for(let e=0;e<this._elements.length;e++){const n=this._transitions[e];if(n){const r=Array.isArray(n)?n:[n];Promise.all(r.map(i=>i.finished)).then(()=>{this._elements[e].remove()})}else this._elements[e].remove()}return new fr([],null,this._parent,this._document,void 0,this._transitions)}each(e){for(let n=0;n<this._elements.length;n++){const r=this._elements[n],i=r.__data__;e(i,n,r)}return this}attr(e,n){const r=typeof n!="function"?()=>n:n;return this.each(function(i,a,o){n!==void 0&&(o[e]=r(i,a,o))})}style(e,n){const r=typeof n!="function"?()=>n:n;return this.each(function(i,a,o){n!==void 0&&(o.style[e]=r(i,a,o))})}transition(e){const n=typeof e!="function"?()=>e:e,{_transitions:r}=this;return this.each(function(i,a,o){r[a]=n(i,a,o)})}on(e,n){return this.each(function(r,i,a){a.addEventListener(e,n)}),this}call(e,...n){return e(this,...n),this}node(){return this._elements[0]}nodes(){return this._elements}transitions(){return this._transitions}parent(){return this._parent}}fr.registry={g:Er,rect:Qs,circle:Ks,path:Zr,text:Di,ellipse:sy,image:cy,line:tf,polygon:ef,polyline:ly,html:Lh};const on={BEFORE_RENDER:"beforerender",AFTER_RENDER:"afterrender",BEFORE_PAINT:"beforepaint",AFTER_PAINT:"afterpaint",BEFORE_CHANGE_DATA:"beforechangedata",AFTER_CHANGE_DATA:"afterchangedata",BEFORE_CLEAR:"beforeclear",AFTER_CLEAR:"afterclear",BEFORE_DESTROY:"beforedestroy",AFTER_DESTROY:"afterdestroy",BEFORE_CHANGE_SIZE:"beforechangesize",AFTER_CHANGE_SIZE:"afterchangesize",POINTER_TAP:"pointertap",POINTER_DOWN:"pointerdown",POINTER_UP:"pointerup",POINTER_OVER:"pointerover",POINTER_OUT:"pointerout",POINTER_MOVE:"pointermove",POINTER_ENTER:"pointerenter",POINTER_LEAVE:"pointerleave",POINTER_UPOUTSIDE:"pointerupoutside",DRAG_START:"dragstart",DRAG:"drag",DRAG_END:"dragend",DRAG_ENTER:"dragenter",DRAG_LEAVE:"dragleave",DRAG_OVER:"dragover",DROP:"DROP",CLICK:"click",DBLCLICK:"dblclick"};var Kz=function(t){var e=bw(t);return e.charAt(0).toUpperCase()+e.substring(1)},qo=Kz;function Qz(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function Jh(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function Jz(t){return t=Jh(Math.abs(t)),t?t[1]:NaN}function tG(t,e){return function(n,r){for(var i=n.length,a=[],o=0,s=t[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),a.push(n.substring(i-=s,i+s)),!((c+=s+1)>r));)s=t[o=(o+1)%t.length];return a.reverse().join(e)}}function eG(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var nG=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ly(t){if(!(e=nG.exec(t)))throw new Error("invalid format: "+t);var e;return new Ny({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}Ly.prototype=Ny.prototype;function Ny(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}Ny.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function rG(t){t:for(var e=t.length,n=1,r=-1,i;n<e;++n)switch(t[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+t[n])break t;r>0&&(r=0);break}return r>0?t.slice(0,r)+t.slice(i+1):t}var Sw;function iG(t,e){var n=Jh(t,e);if(!n)return t+"";var r=n[0],i=n[1],a=i-(Sw=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+Jh(t,Math.max(0,e+a-1))[0]}function Mw(t,e){var n=Jh(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}var Ew={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:Qz,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>Mw(t*100,e),r:Mw,s:iG,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Pw(t){return t}var Aw=Array.prototype.map,Tw=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function aG(t){var e=t.grouping===void 0||t.thousands===void 0?Pw:tG(Aw.call(t.grouping,Number),t.thousands+""),n=t.currency===void 0?"":t.currency[0]+"",r=t.currency===void 0?"":t.currency[1]+"",i=t.decimal===void 0?".":t.decimal+"",a=t.numerals===void 0?Pw:eG(Aw.call(t.numerals,String)),o=t.percent===void 0?"%":t.percent+"",s=t.minus===void 0?"\u2212":t.minus+"",c=t.nan===void 0?"NaN":t.nan+"";function l(f){f=Ly(f);var d=f.fill,h=f.align,p=f.sign,v=f.symbol,g=f.zero,y=f.width,m=f.comma,b=f.precision,x=f.trim,_=f.type;_==="n"?(m=!0,_="g"):Ew[_]||(b===void 0&&(b=12),x=!0,_="g"),(g||d==="0"&&h==="=")&&(g=!0,d="0",h="=");var O=v==="$"?n:v==="#"&&/[boxX]/.test(_)?"0"+_.toLowerCase():"",w=v==="$"?r:/[%p]/.test(_)?o:"",S=Ew[_],M=/[defgprs%]/.test(_);b=b===void 0?6:/[gprs]/.test(_)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b));function E(P){var L=O,A=w,T,C,N;if(_==="c")A=S(P)+A,P="";else{P=+P;var B=P<0||1/P<0;if(P=isNaN(P)?c:S(Math.abs(P),b),x&&(P=rG(P)),B&&+P==0&&p!=="+"&&(B=!1),L=(B?p==="("?p:s:p==="-"||p==="("?"":p)+L,A=(_==="s"?Tw[8+Sw/3]:"")+A+(B&&p==="("?")":""),M){for(T=-1,C=P.length;++T<C;)if(N=P.charCodeAt(T),48>N||N>57){A=(N===46?i+P.slice(T+1):P.slice(T))+A,P=P.slice(0,T);break}}}m&&!g&&(P=e(P,1/0));var j=L.length+P.length+A.length,D=j<y?new Array(y-j+1).join(d):"";switch(m&&g&&(P=e(D+P,D.length?y-A.length:1/0),D=""),h){case"<":P=L+P+A+D;break;case"=":P=L+D+P+A;break;case"^":P=D.slice(0,j=D.length>>1)+L+P+A+D.slice(j);break;default:P=D+L+P+A;break}return a(P)}return E.toString=function(){return f+""},E}function u(f,d){var h=l((f=Ly(f),f.type="f",f)),p=Math.max(-8,Math.min(8,Math.floor(Jz(d)/3)))*3,v=Math.pow(10,-p),g=Tw[8+p/3];return function(y){return h(v*y)+g}}return{format:l,formatPrefix:u}}var tp,Zo,oG;sG({thousands:",",grouping:[3],currency:["$",""]});function sG(t){return tp=aG(t),Zo=tp.format,oG=tp.formatPrefix,tp}function Ko(t,e){return Object.entries(t).reduce((n,[r,i])=>(n[r]=e(i,r,t),n),{})}function ec(t){return t.map((e,n)=>n)}function dgt(t){const e=t.length,n=t[0].length,r=new Array(n).fill(0).map(()=>new Array(e));for(let i=0;i<n;i++)for(let a=0;a<e;a++)r[i][a]=t[a][i];return r}function cG(t){return t[0]}function Cw(t){return t[t.length-1]}function hgt(t){return!t.some(Array.isArray)}function lG(t){return Array.from(new Set(t))}function kw(t,e){const n=[[],[]];return t.forEach(r=>{n[e(r)?0:1].push(r)}),n}function Lw(t,e=t.length){if(e===1)return t.map(r=>[r]);const n=[];for(let r=0;r<t.length;r++){const i=t.slice(r+1);Lw(i,e-1).forEach(o=>{n.push([t[r],...o])})}return n}function uG(t){if(t.length===1)return[t];const e=[];for(let n=1;n<=t.length;n++)e.push(...Lw(t,n));return e}var fG=function(t){return t!==null&&typeof t!="function"&&isFinite(t.length)},cf=fG,Iy=function(t,e){if(t===e)return!0;if(!t||!e||Dn(t)||Dn(e))return!1;if(cf(t)||cf(e)){if(t.length!==e.length)return!1;for(var n=!0,r=0;r<t.length&&(n=Iy(t[r],e[r]),!!n);r++);return n}if(Sy(t)||Sy(e)){var i=Object.keys(t),a=Object.keys(e);if(i.length!==a.length)return!1;for(var n=!0,r=0;r<i.length&&(n=Iy(t[i[r]],e[i[r]]),!!n);r++);return n}return!1},Nw=Iy;function Qi(t,e){let n=0;if(e===void 0)for(let r of t)(r=+r)&&(n+=r);else{let r=-1;for(let i of t)(i=+e(i,++r,t))&&(n+=i)}return n}function sn(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function pgt(t){return t*Math.PI/180}function vgt(t){return t*180/Math.PI}function dG(t,e){return t=t%(2*Math.PI),e=e%(2*Math.PI),t<0&&(t=2*Math.PI+t),e<0&&(e=2*Math.PI+e),t>=e&&(e=e+2*Math.PI),{startAngle:t,endAngle:e}}const Iw=(t={})=>{const e={startAngle:-Math.PI/2,endAngle:Math.PI*3/2,innerRadius:0,outerRadius:1},n=Object.assign(Object.assign({},e),t);return Object.assign(Object.assign({},n),dG(n.startAngle,n.endAngle))},lf=t=>{const{startAngle:e,endAngle:n,innerRadius:r,outerRadius:i}=Iw(t);return[["translate",0,.5],["reflect.y"],["translate",0,-.5],["polar",e,n,r,i]]};lf.props={};const jw=(t={})=>{const e={startAngle:-Math.PI/2,endAngle:Math.PI*3/2,innerRadius:0,outerRadius:1};return Object.assign(Object.assign({},e),t)},jy=t=>{const{startAngle:e,endAngle:n,innerRadius:r,outerRadius:i}=jw(t);return[["transpose"],["translate",.5,.5],["reflect"],["translate",-.5,-.5],...lf({startAngle:e,endAngle:n,innerRadius:r,outerRadius:i})]};jy.props={};function ep(t,e,n){return Math.max(e,Math.min(t,n))}function np(t,e=10){return typeof t!="number"||Math.abs(t)<1e-15?t:parseFloat(t.toFixed(e))}const hG=[["legendCategory",[[["color","discrete"],["opacity","discrete"],["shape","discrete"],["size","constant"]],[["color","discrete"],["opacity","constant"],["shape","discrete"],["size","constant"]],[["color","discrete"],["opacity","discrete"],["shape","constant"],["size","constant"]],[["color","discrete"],["opacity","constant"],["shape","constant"],["size","constant"]],[["color","constant"],["opacity","discrete"],["shape","discrete"],["size","constant"]],[["color","constant"],["opacity","constant"],["shape","discrete"],["size","constant"]],[["color","constant"],["opacity","discrete"],["shape","constant"],["size","constant"]],[["color","discrete"],["shape","discrete"],["size","constant"]],[["color","discrete"],["opacity","discrete"],["shape","discrete"]],[["color","discrete"],["opacity","discrete"],["size","constant"]],[["color","discrete"],["opacity","constant"],["shape","discrete"]],[["color","discrete"],["opacity","constant"],["size","constant"]],[["color","discrete"],["shape","constant"],["size","constant"]],[["color","discrete"],["opacity","discrete"],["shape","constant"]],[["color","discrete"],["opacity","constant"],["shape","constant"]],[["color","constant"],["shape","discrete"],["size","constant"]],[["color","constant"],["opacity","discrete"],["shape","discrete"]],[["color","constant"],["opacity","discrete"],["size","constant"]],[["color","constant"],["opacity","constant"],["shape","discrete"]],[["color","constant"],["opacity","discrete"],["shape","constant"]],[["color","discrete"],["shape","discrete"]],[["color","discrete"],["size","constant"]],[["color","discrete"],["opacity","discrete"]],[["color","discrete"],["opacity","constant"]],[["color","discrete"],["shape","constant"]],[["color","constant"],["shape","discrete"]],[["color","constant"],["size","constant"]],[["color","constant"],["opacity","discrete"]],[["color","discrete"]]]],["legendContinuousSize",[[["color","continuous"],["opacity","continuous"],["size","continuous"]],[["color","constant"],["opacity","continuous"],["size","continuous"]],[["color","continuous"],["size","continuous"]],[["color","constant"],["size","continuous"]],[["size","continuous"],["opacity","continuous"]],[["size","continuous"]]]],["legendContinuousBlockSize",[[["color","distribution"],["opacity","distribution"],["size","distribution"]],[["color","distribution"],["size","distribution"]]]],["legendContinuousBlock",[[["color","distribution"],["opacity","continuous"]],[["color","distribution"]]]],["legendContinuous",[[["color","continuous"],["opacity","continuous"]],[["color","continuous"]],[["opacity","continuous"]]]]];var Rw=J(17816);function kn(t){const{transformations:e}=t.getOptions();return e.map(([r])=>r).filter(r=>r==="transpose").length%2!==0}function xn(t){const{transformations:e}=t.getOptions();return e.some(([n])=>n==="polar")}function uf(t){const{transformations:e}=t.getOptions();return e.some(([n])=>n==="reflect")&&e.some(([n])=>n.startsWith("transpose"))}function Dw(t){const{transformations:e}=t.getOptions();return e.some(([n])=>n==="helix")}function ff(t){const{transformations:e}=t.getOptions();return e.some(([n])=>n==="parallel")}function Bw(t){const{transformations:e}=t.getOptions();return e.some(([n])=>n==="fisheye")}function pG(t){return ff(t)&&xn(t)}function ml(t){return Dw(t)||xn(t)}function Fw(t){return xn(t)&&kn(t)}function ggt(t){return xn(t)||ff(t)||uf(t)||Fw(t)}function vG(t){if(ml(t)){const[e,n]=t.getSize(),r=t.getOptions().transformations.find(i=>i[0]==="polar");if(r)return Math.max(e,n)/2*r[4]}return 0}function rp(t){const{transformations:e}=t.getOptions(),[,,,n,r]=e.find(i=>i[0]==="polar");return[+n,+r]}function Ry(t,e=!0){const{transformations:n}=t.getOptions(),[,r,i]=n.find(a=>a[0]==="polar");return e?[+r*180/Math.PI,+i*180/Math.PI]:[r,i]}function gG(t,e){const{transformations:n}=t.getOptions(),[,...r]=n.find(i=>i[0]===e);return r}function zw(t,e){e(t),t.children&&t.children.forEach(function(n){n&&zw(n,e)})}function df(t){ip(t,!0)}function Qo(t){ip(t,!1)}function ip(t,e){var n=e?"visible":"hidden";zw(t,function(r){r.attr("visibility",n)})}function yG(t){return typeof t=="boolean"?!1:"enter"in t&&"update"in t&&"exit"in t}function Gw(t){if(!t)return{enter:!1,update:!1,exit:!1};var e=["enter","update","exit"],n=Object.fromEntries(Object.entries(t).filter(function(r){var i=R(r,1),a=i[0];return!e.includes(a)}));return Object.fromEntries(e.map(function(r){return yG(t)?t[r]===!1?[r,!1]:[r,nt(nt({},t[r]),n)]:[r,n]}))}function bl(t,e){t?t.finished.then(e):e()}function mG(t,e){t.length===0?e():Promise.all(t.map(function(n){return n==null?void 0:n.finished})).then(e)}function Ww(t,e){"update"in t?t.update(e):t.attr(e)}function Yw(t,e,n){if(e.length===0)return null;if(!n){var r=e.slice(-1)[0];return Ww(t,{style:r}),null}return t.animate(e,n)}function bG(t,e){return!(t.nodeName!=="text"||e.nodeName!=="text"||t.attributes.text!==e.attributes.text)}function xG(t,e,n,r){if(r===void 0&&(r="destroy"),bG(t,e))return t.remove(),[null];var i=function(){r==="destroy"?t.destroy():r==="hide"&&Qo(t),e.isVisible()&&df(e)};if(!n)return i(),[null];var a=n.duration,o=a===void 0?0:a,s=n.delay,c=s===void 0?0:s,l=Math.ceil(+o/2),u=+o/4,f=function(P){if(P.nodeName==="circle"){var L=R(P.getLocalPosition(),2),A=L[0],T=L[1],C=P.attr("r");return[A-C,T-C]}return P.getLocalPosition()},d=R(f(t),2),h=d[0],p=d[1],v=R(f(e),2),g=v[0],y=v[1],m=R([(h+g)/2-h,(p+y)/2-p],2),b=m[0],x=m[1],_=t.style.opacity,O=_===void 0?1:_,w=e.style.opacity,S=w===void 0?1:w,M=t.animate([{opacity:O,transform:"translate(0, 0)"},{opacity:0,transform:"translate(".concat(b,", ").concat(x,")")}],nt(nt({fill:"both"},n),{duration:c+l+u})),E=e.animate([{opacity:0,transform:"translate(".concat(-b,", ").concat(-x,")"),offset:.01},{opacity:S,transform:"translate(0, 0)"}],nt(nt({fill:"both"},n),{duration:l+u,delay:c+l-u}));return bl(E,i),[M,E]}function xa(t,e,n){var r={},i={};return Object.entries(e).forEach(function(a){var o=R(a,2),s=o[0],c=o[1];if(!Ft(c)){var l=t.style[s]||t.parsedStyle[s]||0;l!==c&&(r[s]=l,i[s]=c)}}),n?Yw(t,[r,i],nt({fill:"both"},n)):(Ww(t,i),null)}var _G=5,Hw=function(t,e,n,r){n===void 0&&(n=0),r===void 0&&(r=_G),Object.entries(e).forEach(function(i){var a=R(i,2),o=a[0],s=a[1],c=t;Object.prototype.hasOwnProperty.call(e,o)&&(s?ho(s)?(ho(t[o])||(c[o]={}),n<r?Hw(t[o],s,n+1,r):c[o]=e[o]):mr(s)?(c[o]=[],c[o]=c[o].concat(s)):c[o]=s:c[o]=s)})},vo=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)Hw(t,e[r]);return t},OG=function(t){Yt(e,t);function e(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=t.apply(this,yt([],R(n),!1))||this;return i.addEventListener(oe.INSERTED,function(){Qo(i)}),i}return e}(Er);function $w(t){var e=t.appendChild(new OG({class:"offscreen"}));return Qo(e),e}function wG(t){for(var e=t;e;){if(e.className==="offscreen")return!0;e=e.parent}return!1}function SG(){ip(this,this.attributes.visibility!=="hidden")}var Nr=function(t){Yt(e,t);function e(n,r){r===void 0&&(r={});var i=t.call(this,vo({},{style:r},n))||this;return i.initialized=!1,i._defaultOptions=r,i}return Object.defineProperty(e.prototype,"offscreenGroup",{get:function(){return this._offscreen||(this._offscreen=$w(this)),this._offscreen},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"defaultOptions",{get:function(){return this._defaultOptions},enumerable:!1,configurable:!0}),e.prototype.connectedCallback=function(){this.render(this.attributes,this),this.bindEvents(this.attributes,this),this.initialized=!0},e.prototype.disconnectedCallback=function(){var n;(n=this._offscreen)===null||n===void 0||n.destroy()},e.prototype.attributeChangedCallback=function(n){n==="visibility"&&SG.call(this)},e.prototype.update=function(n,r){var i;return this.attr(vo({},this.attributes,n||{})),(i=this.render)===null||i===void 0?void 0:i.call(this,this.attributes,this,r)},e.prototype.clear=function(){this.removeChildren()},e.prototype.bindEvents=function(n,r){},e.prototype.getSubShapeStyle=function(n){var r=n.x,i=n.y,a=n.transform,o=n.transformOrigin,s=n.class,c=n.className,l=n.zIndex,u=rn(n,["x","y","transform","transformOrigin","class","className","zIndex"]);return u},e}(kh);function Si(t,e,n,r,i){return r===void 0&&(r=!0),i===void 0&&(i=function(a){a.node().removeChildren()}),t?n(e):(r&&i(e),null)}function MG(t,e){if(t.length<=e)return t;for(var n=Math.floor(t.length/e),r=[],i=0;i<t.length;i+=n)r.push(t[i]);return r}var Dy=function(t){Yt(e,t);function e(n){n===void 0&&(n={});var r=n.style,i=rn(n,["style"]);return t.call(this,nt({style:nt({text:"",fill:"black",fontFamily:"sans-serif",fontSize:16,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",lineWidth:1,textAlign:"start",textBaseline:"middle"},r)},i))||this}return Object.defineProperty(e.prototype,"offscreenGroup",{get:function(){return this._offscreen||(this._offscreen=$w(this)),this._offscreen},enumerable:!1,configurable:!0}),e.prototype.disconnectedCallback=function(){var n;(n=this._offscreen)===null||n===void 0||n.destroy()},e}(Di);function EG(t,e){var n=new Map;return t.forEach(function(r){var i=e(r);n.has(i)||n.set(i,[]),n.get(i).push(r)}),n}function PG(t){throw new Error(t)}var AG=function(){function t(i,a,o,s,c,l,u){i===void 0&&(i=null),a===void 0&&(a=null),o===void 0&&(o=null),s===void 0&&(s=null),c===void 0&&(c=[null,null,null,null,null]),l===void 0&&(l=[]),u===void 0&&(u=[]),e.add(this),this._elements=Array.from(i),this._data=a,this._parent=o,this._document=s,this._enter=c[0],this._update=c[1],this._exit=c[2],this._merge=c[3],this._split=c[4],this._transitions=l,this._facetElements=u}t.prototype.selectAll=function(i){var a=typeof i=="string"?this._parent.querySelectorAll(i):i;return new n(a,null,this._elements[0],this._document)},t.prototype.selectFacetAll=function(i){var a=typeof i=="string"?this._parent.querySelectorAll(i):i;return new n(this._elements,null,this._parent,this._document,void 0,void 0,a)},t.prototype.select=function(i){var a=typeof i=="string"?this._parent.querySelectorAll(i)[0]||null:i;return new n([a],null,a,this._document)},t.prototype.append=function(i){var a=this,o=typeof i=="function"?i:function(){return a.createElement(i)},s=[];if(this._data!==null){for(var c=0;c<this._data.length;c++){var l=this._data[c],u=R(Array.isArray(l)?l:[l,null],2),f=u[0],d=u[1],h=o(f,c);h.__data__=f,d!==null&&(h.__fromElements__=d),this._parent.appendChild(h),s.push(h)}return new n(s,null,this._parent,this._document)}for(var c=0;c<this._elements.length;c++){var p=this._elements[c],f=p.__data__,h=o(f,c);p.appendChild(h),s.push(h)}return new n(s,null,s[0],this._document)},t.prototype.maybeAppend=function(i,a){var o=nh(this,e,"m",r).call(this,i[0]==="#"?i:"#".concat(i),a);return o.attr("id",i),o},t.prototype.maybeAppendByClassName=function(i,a){var o=i.toString(),s=nh(this,e,"m",r).call(this,o[0]==="."?o:".".concat(o),a);return s.attr("className",o),s},t.prototype.maybeAppendByName=function(i,a){var o=nh(this,e,"m",r).call(this,'[name="'.concat(i,'"]'),a);return o.attr("name",i),o},t.prototype.data=function(i,a,o){var s,c;a===void 0&&(a=function(E){return E}),o===void 0&&(o=function(){return null});for(var l=[],u=[],f=new Set(this._elements),d=[],h=new Set,p=new Map(this._elements.map(function(E,P){return[a(E.__data__,P),E]})),v=new Map(this._facetElements.map(function(E,P){return[a(E.__data__,P),E]})),g=EG(this._elements,function(E){return o(E.__data__)}),y=0;y<i.length;y++){var m=i[y],b=a(m,y),x=o(m,y);if(p.has(b)){var _=p.get(b);_.__data__=m,_.__facet__=!1,u.push(_),f.delete(_),p.delete(b)}else if(v.has(b)){var _=v.get(b);_.__data__=m,_.__facet__=!0,u.push(_),v.delete(b)}else if(g.has(b)){var O=g.get(b);d.push([m,O]);try{for(var w=(s=void 0,Vr(O)),S=w.next();!S.done;S=w.next()){var _=S.value;f.delete(_)}}catch(E){s={error:E}}finally{try{S&&!S.done&&(c=w.return)&&c.call(w)}finally{if(s)throw s.error}}g.delete(b)}else if(p.has(x)){var _=p.get(x);_.__toData__?_.__toData__.push(m):_.__toData__=[m],h.add(_),f.delete(_)}else l.push(m)}var M=[new n([],l,this._parent,this._document),new n(u,null,this._parent,this._document),new n(f,null,this._parent,this._document),new n([],d,this._parent,this._document),new n(h,null,this._parent,this._document)];return new n(this._elements,null,this._parent,this._document,M)},t.prototype.merge=function(i){var a=yt(yt([],R(this._elements),!1),R(i._elements),!1),o=yt(yt([],R(this._transitions),!1),R(i._transitions),!1);return new n(a,null,this._parent,this._document,void 0,o)},t.prototype.createElement=function(i){if(this._document)return this._document.createElement(i,{});var a=n.registry[i];return a?new a:PG("Unknown node type: ".concat(i))},t.prototype.join=function(i,a,o,s,c){i===void 0&&(i=function(p){return p}),a===void 0&&(a=function(p){return p}),o===void 0&&(o=function(p){return p.remove()}),s===void 0&&(s=function(p){return p}),c===void 0&&(c=function(p){return p.remove()});var l=i(this._enter),u=a(this._update),f=o(this._exit),d=s(this._merge),h=c(this._split);return u.merge(l).merge(f).merge(d).merge(h)},t.prototype.remove=function(){for(var i=function(s){var c=a._elements[s],l=a._transitions[s];l?l.then(function(){return c.remove()}):c.remove()},a=this,o=0;o<this._elements.length;o++)i(o);return new n([],null,this._parent,this._document,void 0,this._transitions)},t.prototype.each=function(i){for(var a=0;a<this._elements.length;a++){var o=this._elements[a],s=o.__data__;i.call(o,s,a)}return this},t.prototype.attr=function(i,a){var o=typeof a!="function"?function(){return a}:a;return this.each(function(s,c){a!==void 0&&(this[i]=o.call(this,s,c))})},t.prototype.style=function(i,a,o){o===void 0&&(o=!0);var s=typeof a!="function"||!o?function(){return a}:a;return this.each(function(c,l){a!==void 0&&(this.style[i]=s.call(this,c,l))})},t.prototype.styles=function(i,a){return i===void 0&&(i={}),a===void 0&&(a=!0),this.each(function(o,s){var c=this;Object.entries(i).forEach(function(l){var u=R(l,2),f=u[0],d=u[1],h=typeof d!="function"||!a?function(){return d}:d;d!==void 0&&c.attr(f,h.call(c,o,s))})})},t.prototype.update=function(i,a){a===void 0&&(a=!0);var o=typeof i!="function"||!a?function(){return i}:i;return this.each(function(s,c){i&&this.update&&this.update(o.call(this,s,c))})},t.prototype.maybeUpdate=function(i,a){a===void 0&&(a=!0);var o=typeof i!="function"||!a?function(){return i}:i;return this.each(function(s,c){i&&this.update&&this.update(o.call(this,s,c))})},t.prototype.transition=function(i){var a=this._transitions;return this.each(function(o,s){a[s]=i.call(this,o,s)})},t.prototype.on=function(i,a){return this.each(function(){this.addEventListener(i,a)}),this},t.prototype.call=function(i){for(var a=[],o=1;o<arguments.length;o++)a[o-1]=arguments[o];return i.call.apply(i,yt([this._parent,this],R(a),!1)),this},t.prototype.node=function(){return this._elements[0]},t.prototype.nodes=function(){return this._elements},t.prototype.transitions=function(){return this._transitions.filter(function(i){return!!i})},t.prototype.parent=function(){return this._parent};var e,n,r;return n=t,e=new WeakSet,r=function(a,o){var s=this._elements[0],c=s.querySelector(a);if(c)return new n([c],null,this._parent,this._document);var l=typeof o=="string"?this.createElement(o):o();return s.appendChild(l),new n([l],null,this._parent,this._document)},t.registry={g:Er,rect:Qs,circle:Ks,path:Zr,text:Dy,ellipse:sy,image:cy,line:tf,polygon:ef,polyline:ly,html:Lh},t}();function ge(t){return new AG([t],null,t,t.ownerDocument)}function TG(t,e,n){return t.querySelector(e)?ge(t).select(e):ge(t).append(n)}var Ji=function(t,e){var n=function(i){return"".concat(e,"-").concat(i)},r=Object.fromEntries(Object.entries(t).map(function(i){var a=R(i,2),o=a[0],s=a[1],c=n(s);return[o,{name:c,class:".".concat(c),id:"#".concat(c),toString:function(){return c}}]}));return Object.assign(r,{prefix:n}),r},By={data:[],animate:{enter:!1,update:{duration:100,easing:"ease-in-out-sine",fill:"both"},exit:{duration:100,fill:"both"}},showArrow:!0,showGrid:!0,showLabel:!0,showLine:!0,showTick:!0,showTitle:!0,showTrunc:!1,dataThreshold:100,lineLineWidth:1,lineStroke:"black",crossPadding:10,titleFill:"black",titleFontSize:12,titlePosition:"lb",titleSpacing:0,titleTextAlign:"center",titleTextBaseline:"middle",lineArrow:function(){return new Zr({style:{path:[["M",10,10],["L",-10,0],["L",10,-10],["L",0,0],["L",10,10],["Z"]],anchor:"0.5 0.5",fill:"black",transformOrigin:"center"}})},labelAlign:"parallel",labelDirection:"positive",labelFontSize:12,labelSpacing:0,gridConnect:"line",gridControlAngles:[],gridDirection:"positive",gridLength:0,gridType:"segment",lineArrowOffset:15,lineArrowSize:10,tickDirection:"positive",tickLength:5,tickLineWidth:1,tickStroke:"black",labelOverlap:[]},ygt=dt({},By,{style:{type:"arc"}}),mgt=dt({},By,{style:{}}),un=Ji({mainGroup:"main-group",gridGroup:"grid-group",grid:"grid",lineGroup:"line-group",line:"line",tickGroup:"tick-group",tick:"tick",tickItem:"tick-item",labelGroup:"label-group",label:"label",labelItem:"label-item",titleGroup:"title-group",title:"title",lineFirst:"line-first",lineSecond:"line-second"},"axis"),li=function(t){return typeof t=="function"};function go(t,e){return[t[0]*e,t[1]*e]}function hf(t,e){return[t[0]+e[0],t[1]+e[1]]}function Fy(t,e){return[t[0]-e[0],t[1]-e[1]]}function nc(t,e){return[Math.min(t[0],e[0]),Math.min(t[1],e[1])]}function rc(t,e){return[Math.max(t[0],e[0]),Math.max(t[1],e[1])]}function pf(t,e){return Math.sqrt(Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2))}function Vw(t){if(t[0]===0&&t[1]===0)return[0,0];var e=Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2));return[t[0]/e,t[1]/e]}function bgt(t,e,n){var r=__read(t,2),i=r[0],a=r[1],o=__read(e,2),s=o[0],c=o[1],l=i-s,u=a-c,f=Math.sin(n),d=Math.cos(n);return[l*d-u*f+s,l*f+u*d+c]}function CG(t,e){return e?[t[1],-t[0]]:[-t[1],t[0]]}function xl(t){return t*Math.PI/180}function Uw(t){return Number((t*180/Math.PI).toPrecision(5))}function zy(t){return t.toString().charAt(0).toUpperCase()+t.toString().slice(1)}function kG(t){return t.toString().charAt(0).toLowerCase()+t.toString().slice(1)}function LG(t,e){return"".concat(e).concat(zy(t))}function Xw(t,e,n){var r;n===void 0&&(n=!0);var i=e||((r=t.match(/^([a-z][a-z0-9]+)/))===null||r===void 0?void 0:r[0])||"",a=t.replace(new RegExp("^(".concat(i,")")),"");return n?kG(a):a}function NG(t,e){Object.entries(e).forEach(function(n){var r=R(n,2),i=r[0],a=r[1];yt([t],R(t.querySelectorAll(i)),!1).filter(function(o){return o.matches(i)}).forEach(function(o){if(o){var s=o;s.style.cssText+=Object.entries(a).reduce(function(c,l){return"".concat(c).concat(l.join(":"),";")},"")}})})}var ap=function(t,e){if(!(t!=null&&t.startsWith(e)))return!1;var n=t[e.length];return n>="A"&&n<="Z"};function Pe(t,e,n){n===void 0&&(n=!1);var r={};return Object.entries(t).forEach(function(i){var a=R(i,2),o=a[0],s=a[1];if(!(o==="className"||o==="class")){if(ap(o,"show")&&ap(Xw(o,"show"),e)!==n)o===LG(e,"show")?r[o]=s:r[o.replace(new RegExp(zy(e)),"")]=s;else if(!ap(o,"show")&&ap(o,e)!==n){var c=Xw(o,e);c==="filter"&&typeof s=="function"||(r[c]=s)}}}),r}function ja(t,e){return Object.entries(t).reduce(function(n,r){var i=R(r,2),a=i[0],o=i[1];return a.startsWith("show")?n["show".concat(e).concat(a.slice(4))]=o:n["".concat(e).concat(zy(a))]=o,n},{})}function yo(t,e){e===void 0&&(e=["x","y","class","className"]);var n=["transform","transformOrigin","anchor","visibility","pointerEvents","zIndex","cursor","clipPath","clipPathTargets","offsetPath","offsetPathTargets","offsetDistance","draggable","droppable"],r={},i={};return Object.entries(t).forEach(function(a){var o=R(a,2),s=o[0],c=o[1];e.includes(s)||(n.indexOf(s)!==-1?i[s]=c:r[s]=c)}),[r,i]}function ta(t,e){return li(t)?t.apply(void 0,yt([],R(e),!1)):t}function op(t,e){return t.style.opacity||(t.style.opacity=1),xa(t,{opacity:0},e)}var IG=["$el","anchor","cx","cy","d","defX","defY","dx","dy","fill","fillOpacity","filter","fontFamily","fontSize","fontStyle","fontVariant","fontWeight","height","img","increasedLineWidthForHitTesting","innerHTML","isBillboard","billboardRotation","isSizeAttenuation","isClosed","isOverflowing","leading","letterSpacing","lineDash","lineHeight","lineWidth","markerEnd","markerEndOffset","markerMid","markerStart","markerStartOffset","maxLines","metrics","miterLimit","offsetX","offsetY","opacity","path","points","r","radius","rx","ry","shadowColor","src","stroke","strokeOpacity","text","textAlign","textBaseline","textDecorationColor","textDecorationLine","textDecorationStyle","textOverflow","textPath","textPathSide","textPathStartOffset","transform","transformOrigin","visibility","width","wordWrap","wordWrapWidth","x","x1","x2","y","y1","y2","z1","z2","zIndex"];function jG(t){return IG.includes(t)}function qw(t){var e={};for(var n in t)jG(n)&&(e[n]=t[n]);return e}var _l=Ji({lineGroup:"line-group",line:"line",regionGroup:"region-group",region:"region"},"grid");function Zw(t){return t.reduce(function(e,n,r){return e.push(yt([r===0?"M":"L"],R(n),!1)),e},[])}function RG(t,e,n){var r=e.connect,i=r===void 0?"line":r,a=e.center;if(i==="line")return Zw(t);if(!a)return[];var o=pf(t[0],a),s=n?0:1;return t.reduce(function(c,l,u){return u===0?c.push(yt(["M"],R(l),!1)):c.push(yt(["A",o,o,0,0,s],R(l),!1)),c},[])}function Gy(t,e,n){return e.type==="surround"?RG(t,e,n):Zw(t)}function DG(t,e,n){var r=n.type,i=n.connect,a=n.center,o=n.closed,s=o?[["Z"]]:[],c=R([Gy(t,n),Gy(e.slice().reverse(),n,!0)],2),l=c[0],u=c[1],f=R([t[0],e.slice(-1)[0]],2),d=f[0],h=f[1],p=function(m,b){return[l,m,u,b,s].flat()};if(i==="line"||r==="surround")return p([yt(["L"],R(h),!1)],[yt(["L"],R(d),!1)]);if(!a)throw new Error("Arc grid need to specified center");var v=R([pf(h,a),pf(d,a)],2),g=v[0],y=v[1];return p([yt(["A",g,g,0,0,1],R(h),!1),yt(["L"],R(h),!1)],[yt(["A",y,y,0,0,0],R(d),!1),yt(["L"],R(d),!1)])}function BG(t,e,n,r){var i=n.animate,a=n.isBillboard,o=e.map(function(s,c){return{id:s.id||"grid-line-".concat(c),path:Gy(s.points,n)}});return t.selectAll(_l.line.class).data(o,function(s){return s.id}).join(function(s){return s.append("path").each(function(c,l){var u=ta(qw(nt({path:c.path},r)),[c,l,o]);this.attr(nt({class:_l.line.name,stroke:"#D9D9D9",lineWidth:1,lineDash:[4,4],isBillboard:a},u))})},function(s){return s.transition(function(c,l){var u=ta(qw(nt({path:c.path},r)),[c,l,o]);return xa(this,u,i.update)})},function(s){return s.transition(function(){var c=this,l=op(this,i.exit);return bl(l,function(){return c.remove()}),l})}).transitions()}function FG(t,e,n){var r=n.animate,i=n.connect,a=n.areaFill;if(e.length<2||!a||!i)return[];for(var o=Array.isArray(a)?a:[a,"transparent"],s=function(p){return o[p%o.length]},c=[],l=0;l<e.length-1;l++){var u=R([e[l].points,e[l+1].points],2),f=u[0],d=u[1],h=DG(f,d,n);c.push({path:h,fill:s(l)})}return t.selectAll(_l.region.class).data(c,function(p,v){return v}).join(function(p){return p.append("path").each(function(v,g){var y=ta(v,[v,g,c]);this.attr(y)}).attr("className",_l.region.name)},function(p){return p.transition(function(v,g){var y=ta(v,[v,g,c]);return xa(this,y,r.update)})},function(p){return p.transition(function(){var v=this,g=op(this,r.exit);return bl(g,function(){return v.remove()}),g})}).transitions()}function zG(t){var e=t.data,n=e===void 0?[]:e,r=t.closed;return r?n.map(function(i){var a=i.points,o=R(a,1),s=o[0];return nt(nt({},i),{points:yt(yt([],R(a),!1),[s],!1)})}):n}var GG=function(t){Yt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.render=function(n,r){var i=n.type,a=n.center,o=n.areaFill,s=n.closed,c=rn(n,["type","center","areaFill","closed"]),l=zG(n),u=ge(r).maybeAppendByClassName(_l.lineGroup,"g"),f=ge(r).maybeAppendByClassName(_l.regionGroup,"g"),d=BG(u,l,n,c),h=FG(f,l,n);return yt(yt([],R(d),!1),R(h),!1)},e}(Nr),Ve=function(t,e,n){for(var r=0,i=Dn(e)?e.split("."):e;t&&r<i.length;)t=t[i[r++]];return t===void 0||r<i.length?n:t},WG=function(t,e){return function(n){return t*(1-n)+e*n}};function YG(t,e){var n=e?e.length:0,r=t?Math.min(n,t.length):0;return function(i){var a=new Array(r),o=new Array(n),s=0;for(s=0;s<r;++s)a[s]=Wy(t[s],e[s]);for(;s<n;++s)o[s]=e[s];for(s=0;s<r;++s)o[s]=a[s](i);return o}}function HG(t,e){t===void 0&&(t={}),e===void 0&&(e={});var n={},r={};return Object.entries(e).forEach(function(i){var a=R(i,2),o=a[0],s=a[1];o in t?n[o]=Wy(t[o],s):r[o]=s}),function(i){return Object.entries(n).forEach(function(a){var o=R(a,2),s=o[0],c=o[1];return r[s]=c(i)}),r}}function Wy(t,e){return typeof t=="number"&&typeof e=="number"?WG(t,e):Array.isArray(t)&&Array.isArray(e)?YG(t,e):typeof t=="object"&&typeof e=="object"?HG(t,e):function(n){return t}}function $G(t,e,n,r){if(!r)return t.attr("__keyframe_data__",n),null;var i=r.duration,a=i===void 0?0:i,o=Wy(e,n),s=Math.ceil(+a/16),c=new Array(s).fill(0).map(function(l,u,f){return{__keyframe_data__:o(u/(f.length-1))}});return t.animate(c,nt({fill:"both"},r))}function ic(t){return typeof t=="function"?t():Dn(t)||er(t)?new Dy({style:{text:String(t)}}):t}function Yy(t,e,n){n===void 0&&(n=!1);var r=t.getBBox(),i=r.width,a=r.height,o=e/Math.max(i,a);return n&&t.scale(o),o}function Kw(t,e){var n={},r=Array.isArray(e)?e:[e];for(var i in t)r.includes(i)||(n[i]=t[i]);return n}function Qw(t,e){return Object.fromEntries(Object.entries(t).map(function(n){var r=R(n,2),i=r[0],a=r[1];return[i,ta(a,e)]}))}function xgt(t){if(t.type==="linear"){var e=t.startPos,n=t.endPos;return __spreadArray(__spreadArray([],__read(e),!1),__read(n),!1)}var r=t.startAngle,i=t.endAngle,a=t.center,o=t.radius;return __spreadArray(__spreadArray([r,i],__read(a),!1),[o],!1)}function Hy(t,e){return e&&li(e)?t.filter(e):t}function Jw(t,e){var n=e.startAngle,r=e.endAngle;return(r-n)*t+n}function sp(t,e){if(e.type==="linear"){var n=R(e.startPos,2),r=n[0],i=n[1],a=R(e.endPos,2),o=a[0],s=a[1],c=R([o-r,s-i],2),l=c[0],u=c[1];return Vw([l,u])}var f=xl(Jw(t,e));return[-Math.sin(f),Math.cos(f)]}function $y(t,e,n){var r=sp(t,n);return CG(r,e!=="positive")}function vf(t,e){return $y(t,e.labelDirection,e)}function VG(t,e){var n=R(e.startPos,2),r=n[0],i=n[1],a=R(e.endPos,2),o=a[0],s=a[1],c=R([o-r,s-i],2),l=c[0],u=c[1];return[r+l*t,i+u*t]}function UG(t,e){var n=e.radius,r=R(e.center,2),i=r[0],a=r[1],o=xl(Jw(t,e));return[i+n*Math.cos(o),a+n*Math.sin(o)]}function cp(t,e){return e.type==="linear"?VG(t,e):UG(t,e)}function tS(t){return sp(0,t)[1]===0}function eS(t){return sp(0,t)[0]===0}function nS(t,e){return e-t===360}function rS(t,e,n,r,i){var a=e-t,o=R([i,i],2),s=o[0],c=o[1],l=R([xl(t),xl(e)],2),u=l[0],f=l[1],d=function(E){return[n+i*Math.cos(E),r+i*Math.sin(E)]},h=R(d(u),2),p=h[0],v=h[1],g=R(d(f),2),y=g[0],m=g[1];if(nS(t,e)){var b=(f+u)/2,x=R(d(b),2),_=x[0],O=x[1];return[["M",p,v],["A",s,c,0,1,0,_,O],["A",s,c,0,1,0,y,m]]}var w=a>180?1:0,S=t>e?0:1,M=!1;return M?"M".concat(n,",").concat(r,",L").concat(p,",").concat(v,",A").concat(s,",").concat(c,",0,").concat(w,",").concat(S,",").concat(y,",").concat(m,",L").concat(n,",").concat(r):"M".concat(p,",").concat(v,",A").concat(s,",").concat(c,",0,").concat(w,",").concat(S,",").concat(y,",").concat(m)}function XG(t){var e=t.attributes,n=e.startAngle,r=e.endAngle,i=e.center,a=e.radius;return yt(yt([n,r],R(i),!1),[a],!1)}function qG(t,e,n,r){var i=e.startAngle,a=e.endAngle,o=e.center,s=e.radius;return t.selectAll(un.line.class).data([{path:rS.apply(void 0,yt(yt([i,a],R(o),!1),[s],!1))}],function(c,l){return l}).join(function(c){return c.append("path").attr("className",un.line.name).styles(e).styles({path:function(l){return l.path}})},function(c){return c.transition(function(){var l=this,u=$G(this,XG(this),yt(yt([i,a],R(o),!1),[s],!1),r.update);if(u){var f=function(){var d=Ve(l.attributes,"__keyframe_data__");l.style.path=rS.apply(void 0,yt([],R(d),!1))};u.onframe=f,u.onfinish=f}return u}).styles(e)},function(c){return c.remove()}).styles(n).transitions()}function ZG(t,e){var n=e.truncRange,r=e.truncShape,i=e.lineExtension}function KG(t,e,n){n===void 0&&(n=[0,0]);var r=R([t,e,n],3),i=R(r[0],2),a=i[0],o=i[1],s=R(r[1],2),c=s[0],l=s[1],u=R(r[2],2),f=u[0],d=u[1],h=R([c-a,l-o],2),p=h[0],v=h[1],g=Math.sqrt(Math.pow(p,2)+Math.pow(v,2)),y=R([-f/g,d/g],2),m=y[0],b=y[1];return[m*p,m*v,b*p,b*v]}function iS(t){var e=R(t,2),n=R(e[0],2),r=n[0],i=n[1],a=R(e[1],2),o=a[0],s=a[1];return{x1:r,y1:i,x2:o,y2:s}}function QG(t,e,n,r){var i=e.showTrunc,a=e.startPos,o=e.endPos,s=e.truncRange,c=e.lineExtension,l=R([a,o],2),u=R(l[0],2),f=u[0],d=u[1],h=R(l[1],2),p=h[0],v=h[1],g=R(c?KG(a,o,c):new Array(4).fill(0),4),y=g[0],m=g[1],b=g[2],x=g[3],_=function(j){return t.selectAll(un.line.class).data(j,function(D,G){return G}).join(function(D){return D.append("line").attr("className",function(G){return"".concat(un.line.name," ").concat(G.className)}).styles(n).transition(function(G){return xa(this,iS(G.line),!1)})},function(D){return D.styles(n).transition(function(G){var Y=G.line;return xa(this,iS(Y),r.update)})},function(D){return D.remove()}).transitions()};if(!i||!s)return _([{line:[[f+y,d+m],[p+b,v+x]],className:un.line.name}]);var O=R(s,2),w=O[0],S=O[1],M=p-f,E=v-d,P=R([f+M*w,d+E*w],2),L=P[0],A=P[1],T=R([f+M*S,d+E*S],2),C=T[0],N=T[1],B=_([{line:[[f+y,d+m],[L,A]],className:un.lineFirst.name},{line:[[C,N],[p+b,v+x]],className:un.lineSecond.name}]);return ZG(t,e),B}function JG(t,e,n,r){var i=n.showArrow,a=n.showTrunc,o=n.lineArrow,s=n.lineArrowOffset,c=n.lineArrowSize,l;if(e==="arc"?l=t.select(un.line.class):a?l=t.select(un.lineSecond.class):l=t.select(un.line.class),!i||!o||n.type==="arc"&&nS(n.startAngle,n.endAngle)){var u=l.node();u&&(u.style.markerEnd=void 0);return}var f=ic(o);f.attr(r),Yy(f,c,!0),l.style("markerEnd",f).style("markerEndOffset",-s)}function tW(t,e,n){var r=e.type,i,a=Pe(e,"line");return r==="linear"?i=QG(t,e,Kw(a,"arrow"),n):i=qG(t,e,Kw(a,"arrow"),n),JG(t,r,e,a),i}function eW(t,e){return $y(t,e.gridDirection,e)}function aS(t){var e=t.type,n=t.gridCenter;return e==="linear"?n:n||t.center}function nW(t,e){var n=e.gridLength;return t.map(function(r,i){var a=r.value,o=R(cp(a,e),2),s=o[0],c=o[1],l=R(go(eW(a,e),n),2),u=l[0],f=l[1];return{id:i,points:[[s,c],[s+u,c+f]]}})}function rW(t,e){var n=e.gridControlAngles,r=aS(e);if(!r)throw new Error("grid center is not provide");if(t.length<2)throw new Error("Invalid grid data");if(!n||n.length===0)throw new Error("Invalid gridControlAngles");var i=R(r,2),a=i[0],o=i[1];return t.map(function(s,c){var l=s.value,u=R(cp(l,e),2),f=u[0],d=u[1],h=R([f-a,d-o],2),p=h[0],v=h[1],g=[];return n.forEach(function(y){var m=xl(y),b=R([Math.cos(m),Math.sin(m)],2),x=b[0],_=b[1],O=p*x-v*_+a,w=p*_+v*x+o;g.push([O,w])}),{points:g,id:c}})}function iW(t,e,n,r){var i=Pe(n,"grid"),a=i.type,o=i.areaFill,s=aS(n),c=Hy(e,n.gridFilter),l=a==="segment"?nW(c,n):rW(c,n),u=nt(nt({},i),{center:s,areaFill:li(o)?c.map(function(f,d){return ta(o,[f,d,c])}):o,animate:r,data:l});return t.selectAll(un.grid.class).data([1]).join(function(f){return f.append(function(){return new GG({style:u})}).attr("className",un.grid.name)},function(f){return f.transition(function(){return this.update(u)})},function(f){return f.remove()}).transitions()}function Gr(t,e,n,r,i){return r===void 0&&(r=!0),i===void 0&&(i=!1),r&&t===e||i&&t===n?!0:t>e&&t<n}function aW(t){var e,n,r,i=t||1;function a(s,c){++e>i&&(r=n,o(1),++e),n[s]=c}function o(s){e=0,n=Object.create(null),s||(r=Object.create(null))}return o(),{clear:o,has:function(s){return n[s]!==void 0||r[s]!==void 0},get:function(s){var c=n[s];if(c!==void 0)return c;if((c=r[s])!==void 0)return a(s,c),c},set:function(s,c){n[s]!==void 0?n[s]=c:a(s,c)}}}var oW=function(t,e,n){if(n===void 0&&(n=128),!li(t))throw new TypeError("Expected a function");var r=function(){for(var i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];var o=e?e.apply(this,i):i[0],s=r.cache;if(s.has(o))return s.get(o);var c=t.apply(this,i);return s.set(o,c),c};return r.cache=aW(n),r},lp,Vy;function _gt(t){Vy=t}var sW=oW(function(t,e){var n=e.fontSize,r=e.fontFamily,i=e.fontWeight,a=e.fontStyle,o=e.fontVariant;return Vy?Vy(t,n):(lp||(lp=ct.offscreenCanvasCreator.getOrCreateContext(void 0)),lp.font=[a,o,i,"".concat(n,"px"),r].join(" "),lp.measureText(t).width)},function(t,e){return[t,Object.values(e||oS(t)).join()].join("")},4096),oS=function(t){var e=t.style.fontFamily||"sans-serif",n=t.style.fontWeight||"normal",r=t.style.fontStyle||"normal",i=t.style.fontVariant,a=t.style.fontSize;return a=typeof a=="object"?a.value:a,{fontSize:a,fontFamily:e,fontWeight:n,fontStyle:r,fontVariant:i}};function sS(t){return t.nodeName==="text"?t:t.nodeName==="g"&&t.children.length===1&&t.children[0].nodeName==="text"?t.children[0]:null}function cS(t,e){var n=sS(t);n&&n.attr(e)}function Uy(t,e,n){n===void 0&&(n="..."),cS(t,{wordWrap:!0,wordWrapWidth:e,maxLines:1,textOverflow:n})}function cW(t,e,n,r){n===void 0&&(n=2),r===void 0&&(r="top"),cS(t,{wordWrap:!0,wordWrapWidth:e,maxLines:n,textBaseline:r})}function lW(t,e,n){var r=t.getBBox(),i=r.width,a=r.height,o=R([e,n].map(function(l,u){var f;return l.includes("%")?parseFloat(((f=l.match(/[+-]?([0-9]*[.])?[0-9]+/))===null||f===void 0?void 0:f[0])||"0")/100*(u===0?i:a):l}),2),s=o[0],c=o[1];return[s,c]}function up(t,e){if(e)try{var n=/translate\(([+-]*[\d]+[%]*),[ ]*([+-]*[\d]+[%]*)\)/g,r=e.replace(n,function(i,a,o){return"translate(".concat(lW(t,a,o),")")});t.attr("transform",r)}catch(i){}}var lS=function(t){return t!==void 0&&t!=null&&!Number.isNaN(t)};function Wr(t){if(er(t))return[t,t,t,t];if(mr(t)){var e=t.length;if(e===1)return[t[0],t[0],t[0],t[0]];if(e===2)return[t[0],t[1],t[0],t[1]];if(e===3)return[t[0],t[1],t[2],t[1]];if(e===4)return t}return[0,0,0,0]}var Xy=function(){function t(e,n,r,i){this.set(e,n,r,i)}return Object.defineProperty(t.prototype,"left",{get:function(){return this.x1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"top",{get:function(){return this.y1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"right",{get:function(){return this.x2},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"bottom",{get:function(){return this.y2},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this.defined("x2")&&this.defined("x1")?this.x2-this.x1:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.defined("y2")&&this.defined("y1")?this.y2-this.y1:void 0},enumerable:!1,configurable:!0}),t.prototype.rotatedPoints=function(e,n,r){var i=this,a=i.x1,o=i.y1,s=i.x2,c=i.y2,l=Math.cos(e),u=Math.sin(e),f=n-n*l+r*u,d=r-n*u-r*l,h=[[l*a-u*c+f,u*a+l*c+d],[l*s-u*c+f,u*s+l*c+d],[l*a-u*o+f,u*a+l*o+d],[l*s-u*o+f,u*s+l*o+d]];return h},t.prototype.set=function(e,n,r,i){return r<e?(this.x2=e,this.x1=r):(this.x1=e,this.x2=r),i<n?(this.y2=n,this.y1=i):(this.y1=n,this.y2=i),this},t.prototype.defined=function(e){return this[e]!==Number.MAX_VALUE&&this[e]!==-Number.MAX_VALUE},t}();function fp(t,e){var n=t.getEulerAngles()||0;t.setEulerAngles(0);var r=t.getLocalBounds(),i=R(r.min,2),a=i[0],o=i[1],s=R(r.max,2),c=s[0],l=s[1],u=qy(t),f=u.width,d=u.height,h=d,p=0,v=0,g=a,y=o,m=sS(t);if(m){h-=1.5;var b=m.style.textAlign,x=m.style.textBaseline;b==="center"?g=(a+c)/2:(b==="right"||b==="end")&&(g=c),x==="middle"?y=(o+l)/2:x==="bottom"&&(y=l)}var _=R(Wr(e),4),O=_[0],w=O===void 0?0:O,S=_[1],M=S===void 0?0:S,E=_[2],P=E===void 0?w:E,L=_[3],A=L===void 0?M:L,T=new Xy((p+=a)-A,(v+=o)-w,p+f+M,v+h+P);return t.setEulerAngles(n),T.rotatedPoints(xl(n),g,y)}function qy(t){return t.__bbox__?t.__bbox__:t.getBBox()}function gf(t,e){return e[0]<=Math.max(t[0][0],t[1][0])&&e[0]<=Math.min(t[0][0],t[1][0])&&e[1]<=Math.max(t[0][1],t[1][1])&&e[1]<=Math.min(t[0][1],t[1][1])}function yf(t,e,n){var r=(e[1]-t[1])*(n[0]-e[0])-(e[0]-t[0])*(n[1]-e[1]);return r===0?0:r<0?2:1}function uW(t,e){var n=yf(t[0],t[1],e[0]),r=yf(t[0],t[1],e[1]),i=yf(e[0],e[1],t[0]),a=yf(e[0],e[1],t[1]);return!!(n!==r&&i!==a||n===0&&gf(t,e[0])||r===0&&gf(t,e[1])||i===0&&gf(e,t[0])||a===0&&gf(e,t[1]))}function fW(t,e){var n=t.length;if(n<3)return!1;var r=[e,[9999,e[1]]],i=0,a=0;do{var o=[t[a],t[(a+1)%n]];if(uW(o,r)){if(yf(o[0],e,o[1])===0)return gf(o,e);i++}a=(a+1)%n}while(a!==0);return!!(i&1)}function dW(t,e){return e.every(function(n){return fW(t,n)})}function hW(t,e,n){var r=t.x1,i=t.x2,a=t.y1,o=t.y2,s=[[r,a],[i,a],[i,o],[r,o]],c=fp(e,n);return dW(s,c)}function uS(t,e){var n=R(t,4),r=n[0],i=n[1],a=n[2],o=n[3],s=R(e,4),c=s[0],l=s[1],u=s[2],f=s[3],d=a-r,h=o-i,p=u-c,v=f-l,g=d*v-p*h;if(g===0)return!1;var y=g>0,m=r-c,b=i-l,x=d*b-h*m;if(x<0===y)return!1;var _=p*b-v*m;return!(_<0===y||x>g===y||_>g===y)}function fS(t,e){var n=[[t[0],t[1],t[2],t[3]],[t[2],t[3],t[4],t[5]],[t[4],t[5],t[6],t[7]],[t[6],t[7],t[0],t[1]]];return n.some(function(r){return uS(e,r)})}var Ogt={lineToLine:uS,intersectBoxLine:fS,getBounds:fp};function pW(t,e,n){var r,i,a=fp(t,n).flat(1),o=fp(e,n).flat(1),s=[[a[0],a[1],a[2],a[3]],[a[0],a[1],a[4],a[5]],[a[4],a[5],a[6],a[7]],[a[2],a[3],a[6],a[7]]];try{for(var c=Vr(s),l=c.next();!l.done;l=c.next()){var u=l.value;if(fS(o,u))return!0}}catch(f){r={error:f}}finally{try{l&&!l.done&&(i=c.return)&&i.call(c)}finally{if(r)throw r.error}}return!1}function vW(t,e){var n=t.type,r=t.labelDirection,i=t.crossSize;if(!i)return!1;if(n==="arc"){var a=t.center,o=t.radius,s=R(a,2),c=s[0],l=s[1],u=r==="negative"?0:i,f=-o-u,d=o+u,h=R(Wr(e),4),p=h[0],v=h[1],g=h[2],y=h[3];return new Xy(c+f-y,l+f-p,c+d+v,l+d+g)}var m=R(t.startPos,2),b=m[0],x=m[1],_=R(t.endPos,2),O=_[0],w=_[1],S=R(eS(t)?[-e,0,e,0]:[0,e,0,-e],4),M=S[0],E=S[1],P=S[2],L=S[3],A=vf(0,t),T=go(A,i),C=new Xy(b,x,O,w);return C.x1+=L,C.y1+=M,C.x2+=E+T[0],C.y2+=P+T[1],C}function dp(t,e,n){var r,i,a=e.crossPadding,o=new Set,s=null,c=vW(e,a),l=function(p){return c?hW(c,p):!0},u=function(p,v){return p?!pW(p,v,Wr(n)):!0};try{for(var f=Vr(t),d=f.next();!d.done;d=f.next()){var h=d.value;l(h)?!s||u(s,h)?s=h:(o.add(s),o.add(h)):o.add(h)}}catch(p){r={error:p}}finally{try{d&&!d.done&&(i=f.return)&&i.call(f)}finally{if(r)throw r.error}}return Array.from(o)}function Zy(t,e){return e===void 0&&(e={}),Ft(t)?0:typeof t=="number"?t:Math.floor(sW(t,e))}function gW(t,e,n,r){if(!(t.length<=1)){var i=e.suffix,a=i===void 0?"...":i,o=e.minLength,s=e.maxLength,c=s===void 0?1/0:s,l=e.step,u=l===void 0?" ":l,f=e.margin,d=f===void 0?[0,0,0,0]:f,h=oS(r.getTextShape(t[0])),p=Zy(u,h),v=o?Zy(o,h):p,g=Zy(c,h);(Ft(g)||g===1/0)&&(g=Math.max.apply(null,t.map(function(T){return qy(T).width})));for(var y=t.slice(),m=R(d,4),b=m[0],x=b===void 0?0:b,_=m[1],O=_===void 0?0:_,w=m[2],S=w===void 0?x:w,M=m[3],E=M===void 0?O:M,P=function(T){if(y.forEach(function(C){r.ellipsis(r.getTextShape(C),T,a)}),y=dp(t,n,d),y.length<1)return{value:void 0}},L=g;L>v+p;L-=p){var A=P(L);if(typeof A=="object")return A.value}}}function wgt(t){var e=t&&t.getRenderBounds();if(!e)return{width:0,height:0};var n=e.getMax(),r=e.getMin();return{width:n[0]-r[0],height:n[1]-r[1]}}function dS(t){var e=t.getLocalBounds(),n=e.min,r=e.max,i=R([n,r],2),a=R(i[0],2),o=a[0],s=a[1],c=R(i[1],2),l=c[0],u=c[1];return{x:o,y:s,width:l-o,height:u-s,left:o,bottom:u,top:s,right:l}}function Sgt(t,e){var n=select(t).append("text").node();return n.attr(__assign(__assign({},e),{visibility:"hidden"})),n}function yW(t,e){var n=R(t,2),r=n[0],i=n[1],a=R(e,2),o=a[0],s=a[1];return r!==o&&i===s}function Mgt(t,e){var n=__read(t,2),r=n[0],i=n[1],a=__read(e,2),o=a[0],s=a[1];return r===o&&i!==s}function mW(t,e){var n,r,i=e.attributes;try{for(var a=Vr(Object.entries(i)),o=a.next();!o.done;o=a.next()){var s=R(o.value,2),c=s[0],l=s[1];c!=="id"&&c!=="className"&&t.attr(c,l)}}catch(u){n={error:u}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}}var bW={parity:function(t,e){var n=e.seq,r=n===void 0?2:n;return t.filter(function(i,a){return a%r?(Qo(i),!1):!0})}},xW=function(t){return t.filter(lS)};function _W(t,e,n,r){var i=t.length,a=e.keepHeader,o=e.keepTail;if(!(i<=1||i===2&&a&&o)){var s=bW.parity,c=function(b){return b.forEach(r.show),b},l=2,u=t.slice(),f=t.slice(),d=Math.min.apply(Math,yt([1],R(t.map(function(b){return qy(b).width})),!1));if(n.type==="linear"&&(tS(n)||eS(n))){var h=dS(t[0]).left,p=dS(t[i-1]).right,v=Math.abs(p-h)||1;l=Math.max(Math.floor(i*d/v),l)}var g,y;for(a&&(g=u.splice(0,1)[0]),o&&(y=u.splice(-1,1)[0],u.reverse()),c(u);l<t.length&&dp(xW(y?yt(yt([y],R(f),!1),[g],!1):yt([g],R(f),!1)),n,e==null?void 0:e.margin).length;){if(y&&!g&&l%2===0){var m=u.splice(0,1);m.forEach(r.hide)}else if(y&&g){var m=u.splice(0,1);m.forEach(r.hide)}f=s(c(u),{seq:l}),l++}}}function OW(t,e,n,r){var i,a,o=e.optionalAngles,s=o===void 0?[0,45,90]:o,c=e.margin,l=e.recoverWhenFailed,u=l===void 0?!0:l,f=t.map(function(y){return y.getLocalEulerAngles()}),d=function(){return dp(t,n,c).length<1},h=function(y){return t.forEach(function(m,b){var x=Array.isArray(y)?y[b]:y;r.rotate(m,+x)})};try{for(var p=Vr(s),v=p.next();!v.done;v=p.next()){var g=v.value;if(h(g),d())return}}catch(y){i={error:y}}finally{try{v&&!v.done&&(a=p.return)&&a.call(p)}finally{if(i)throw i.error}}u&&h(f)}function wW(t){var e=t.type,n=t.labelDirection;return e==="linear"&&tS(t)?n==="negative"?"bottom":"top":"middle"}function SW(t,e,n,r){var i=e.wordWrapWidth,a=i===void 0?50:i,o=e.maxLines,s=o===void 0?3:o,c=e.recoverWhenFailed,l=c===void 0?!0:c,u=e.margin,f=u===void 0?[0,0,0,0]:u,d=t.map(function(m){return m.attr("maxLines")||1}),h=Math.min.apply(Math,yt([],R(d),!1)),p=function(){return dp(t,n,f).length<1},v=wW(n),g=function(m){return t.forEach(function(b,x){var _=Array.isArray(m)?m[x]:m;r.wrap(b,a,_,v)})};if(!(h>s)){for(var y=h;y<=s;y++)if(g(y),p())return;l&&g(d)}}var MW=new Map([["hide",_W],["rotate",OW],["ellipsis",gW],["wrap",SW]]);function EW(t,e,n){return e.labelOverlap.length<1?!1:n==="hide"?!wG(t[0]):n==="rotate"?!t.some(function(r){var i;return!!(!((i=r.attr("transform"))===null||i===void 0)&&i.includes("rotate"))}):n==="ellipsis"||n==="wrap"?t.filter(function(r){return r.querySelector("text")}).length>1:!0}function PW(t,e,n){var r=e.labelOverlap,i=r===void 0?[]:r;i.length&&i.forEach(function(a){var o=a.type,s=MW.get(o);EW(t,e,o)&&(s==null||s(t,a,e,n))})}function AW(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=function(r){return r==="positive"?-1:1};return t.reduce(function(r,i){return r*n(i)},1)}function hS(t){for(var e=t;e<0;)e+=360;return Math.round(e%360)}function Ky(t,e){var n=R(t,2),r=n[0],i=n[1],a=R(e,2),o=a[0],s=a[1],c=R([r*o+i*s,r*s-i*o],2),l=c[0],u=c[1];return Math.atan2(u,l)}function TW(t){var e=(t+360)%180;return Gr(e,-90,90)||(e+=180),e}function CW(t,e,n){var r,i=n.labelAlign,a=(r=e.style.transform)===null||r===void 0?void 0:r.includes("rotate");if(a)return e.getLocalEulerAngles();var o=0,s=vf(t.value,n),c=sp(t.value,n);return i==="horizontal"?0:(i==="perpendicular"?o=Ky([1,0],s):o=Ky([c[0]<0?-1:1,0],c),TW(Uw(o)))}function pS(t,e,n){var r=n.type,i=n.labelAlign,a=vf(t,n),o=hS(e),s=hS(Uw(Ky([1,0],a))),c="center",l="middle";return r==="linear"?[90,270].includes(s)&&o===0?(c="center",l=a[1]===1?"top":"bottom"):!(s%180)&&[90,270].includes(o)?c="center":s===0?(Gr(o,0,90,!1,!0)||Gr(o,0,90)||Gr(o,270,360))&&(c="start"):s===90?Gr(o,0,90,!1,!0)?c="start":(Gr(o,90,180)||Gr(o,270,360))&&(c="end"):s===270?Gr(o,0,90,!1,!0)?c="end":(Gr(o,90,180)||Gr(o,270,360))&&(c="start"):s===180&&(o===90?c="start":(Gr(o,0,90)||Gr(o,270,360))&&(c="end")):i==="parallel"?Gr(s,0,180,!0)?l="top":l="bottom":i==="horizontal"?Gr(s,90,270,!1)?c="end":(Gr(s,270,360,!1)||Gr(s,0,90))&&(c="start"):i==="perpendicular"&&(Gr(s,90,270)?c="end":c="start"),{textAlign:c,textBaseline:l}}function kW(t,e,n){e.setLocalEulerAngles(t);var r=e.__data__.value,i=pS(r,t,n),a=e.querySelector(un.labelItem.class);a&&gS(a,i)}function vS(t,e,n){var r=n.showTick,i=n.tickLength,a=n.tickDirection,o=n.labelDirection,s=n.labelSpacing,c=e.indexOf(t),l=ta(s,[t,c,e]),u=R([vf(t.value,n),AW(o,a)],2),f=u[0],d=u[1],h=d===1?ta(r?i:0,[t,c,e]):0,p=R(hf(go(f,l+h),cp(t.value,n)),2),v=p[0],g=p[1];return{x:v,y:g}}function LW(t,e,n,r){var i=r.labelFormatter,a=li(i)?function(){return ic(ta(i,[t,e,n,vf(t.value,r)]))}:function(){return ic(t.label||"")};return a}function gS(t,e){t.nodeName==="text"&&t.attr(e)}function yS(t){PW(this.node().childNodes,t,{hide:Qo,show:df,rotate:function(e,n){kW(+n,e,t)},ellipsis:function(e,n,r){e&&Uy(e,n||1/0,r)},wrap:function(e,n,r){e&&cW(e,n,r)},getTextShape:function(e){return e.querySelector("text")}})}function mS(t,e,n,r,i){var a=n.indexOf(e),o=ge(t).append(LW(e,a,n,i)).attr("className",un.labelItem.name).node(),s=R(yo(Qw(r,[e,a,n])),2),c=s[0],l=s[1],u=l.transform,f=rn(l,["transform"]);up(t,u);var d=CW(e,t,i);return t.setLocalEulerAngles(+d),gS(o,nt(nt({},pS(e.value,d,i)),c)),up(t,u),t.attr(f),o}function NW(t,e,n,r){var i=Hy(e,n.labelFilter),a=Pe(n,"label");return t.selectAll(un.label.class).data(i,function(o,s){return s}).join(function(o){return o.append("g").attr("className",un.label.name).transition(function(s){return mS(this,s,e,a,n),this.attr(vS(s,e,n)),this.__bbox__=s.bbox,null}).call(function(){return yS.call(t,n)})},function(o){return o.transition(function(s){var c=this.querySelector(un.labelItem.class),l=mS(this,s,e,a,n),u=xG(c,l,r.update),f=xa(this,vS(s,e,n),r.update);return this.__bbox__=s.bbox,yt(yt([],R(u),!1),[f],!1)}).call(function(s){var c=Ve(s,"_transitions").flat().filter(lS);mG(c,function(){return yS.call(t,n)})})},function(o){return o.transition(function(){var s=this,c=op(this.childNodes[0],r.exit);return bl(c,function(){return ge(s).remove()}),c})}).transitions()}function bS(t,e){return $y(t,e.tickDirection,e)}function IW(t,e){var n=R(t,2),r=n[0],i=n[1];return[[0,0],[r*e,i*e]]}function jW(t,e,n,r,i){var a=i.tickLength,o=R(IW(r,ta(a,[t,e,n])),2),s=R(o[0],2),c=s[0],l=s[1],u=R(o[1],2),f=u[0],d=u[1];return{x1:c,x2:f,y1:l,y2:d}}function RW(t,e,n,r,i){var a=i.tickFormatter,o=bS(e.value,i),s="line";return li(a)&&(s=function(){return ta(a,[e,n,r,o])}),t.append(s).attr("className",un.tickItem.name)}function DW(t,e,n,r,i,a,o){var s=bS(t.value,a),c=jW(t,e,n,s,a),l=c.x1,u=c.x2,f=c.y1,d=c.y2,h=R(yo(Qw(o,[t,e,n,s])),2),p=h[0],v=h[1];r.node().nodeName==="line"&&r.styles(nt({x1:l,x2:u,y1:f,y2:d},p)),i.attr(v),r.styles(p)}function xS(t,e,n,r,i,a){var o=RW(ge(this),t,e,n,r);DW(t,e,n,o,this,r,i);var s=R(cp(t.value,r),2),c=s[0],l=s[1];return xa(this,{x:c,y:l},a)}function BW(t,e,n,r){var i=Hy(e,n.tickFilter),a=Pe(n,"tick");return t.selectAll(un.tick.class).data(i,function(o){return o.id||o.label}).join(function(o){return o.append("g").attr("className",un.tick.name).transition(function(s,c){return xS.call(this,s,c,i,n,a,!1)})},function(o){return o.transition(function(s,c){return this.removeChildren(),xS.call(this,s,c,i,n,a,r.update)})},function(o){return o.transition(function(){var s=this,c=op(this.childNodes[0],r.exit);return bl(c,function(){return s.remove()}),c})}).transitions()}var Ln=function(){function t(e,n,r,i){e===void 0&&(e=0),n===void 0&&(n=0),r===void 0&&(r=0),i===void 0&&(i=0),this.x=0,this.y=0,this.width=0,this.height=0,this.x=e,this.y=n,this.width=r,this.height=i}return Object.defineProperty(t.prototype,"bottom",{get:function(){return this.y+this.height},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"left",{get:function(){return this.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"right",{get:function(){return this.x+this.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"top",{get:function(){return this.y},enumerable:!1,configurable:!0}),t.fromRect=function(e){return new t(e.x,e.y,e.width,e.height)},t.prototype.toJSON=function(){return{x:this.x,y:this.y,width:this.width,height:this.height,top:this.top,right:this.right,bottom:this.bottom,left:this.left}},t.prototype.isPointIn=function(e,n){return e>=this.left&&e<=this.right&&n>=this.top&&n<=this.bottom},t}();function Egt(t){var e=t.getRenderBounds(),n=__read(e.min,2),r=n[0],i=n[1],a=__read(e.max,2),o=a[0],s=a[1],c=o-r,l=s-i;return new Ln(r,i,c,l)}var _S=Ji({text:"text"},"title");function hp(t){return/\S+-\S+/g.test(t)?t.split("-").map(function(e){return e[0]}):t.length>2?[t[0]]:t.split("")}function FW(t,e){var n=t.attributes,r=n.position,i=n.spacing,a=n.inset,o=n.text,s=t.getBBox(),c=e.getBBox(),l=hp(r),u=R(Wr(o?i:0),4),f=u[0],d=u[1],h=u[2],p=u[3],v=R(Wr(a),4),g=v[0],y=v[1],m=v[2],b=v[3],x=R([p+d,f+h],2),_=x[0],O=x[1],w=R([b+y,g+m],2),S=w[0],M=w[1];if(l[0]==="l")return new Ln(s.x,s.y,c.width+s.width+_+S,Math.max(c.height+M,s.height));if(l[0]==="t")return new Ln(s.x,s.y,Math.max(c.width+S,s.width),c.height+s.height+O+M);var E=R([e.attributes.width||c.width,e.attributes.height||c.height],2),P=E[0],L=E[1];return new Ln(c.x,c.y,P+s.width+_+S,L+s.height+O+M)}function zW(t,e){var n=Object.entries(e).reduce(function(r,i){var a=R(i,2),o=a[0],s=a[1],c=t.node().attr(o);return c||(r[o]=s),r},{});t.styles(n)}function GW(t){var e,n,r,i,a=t,o=a.width,s=a.height,c=a.position,l=R([+o/2,+s/2],2),u=l[0],f=l[1],d=R([+u,+f,"center","middle"],4),h=d[0],p=d[1],v=d[2],g=d[3],y=hp(c);return y.includes("l")&&(e=R([0,"start"],2),h=e[0],v=e[1]),y.includes("r")&&(n=R([+o,"end"],2),h=n[0],v=n[1]),y.includes("t")&&(r=R([0,"top"],2),p=r[0],g=r[1]),y.includes("b")&&(i=R([+s,"bottom"],2),p=i[0],g=i[1]),{x:h,y:p,textAlign:v,textBaseline:g}}var OS=function(t){Yt(e,t);function e(n){return t.call(this,n,{text:"",width:0,height:0,fill:"#4a505a",fontWeight:"bold",fontSize:12,fontFamily:"sans-serif",inset:0,spacing:0,position:"top-left"})||this}return e.prototype.getAvailableSpace=function(){var n=this,r=this.attributes,i=r.width,a=r.height,o=r.position,s=r.spacing,c=r.inset,l=n.querySelector(_S.text.class);if(!l)return new Ln(0,0,+i,+a);var u=l.getBBox(),f=u.width,d=u.height,h=R(Wr(s),4),p=h[0],v=h[1],g=h[2],y=h[3],m=R([0,0,+i,+a],4),b=m[0],x=m[1],_=m[2],O=m[3],w=hp(o);if(w.includes("i"))return new Ln(b,x,_,O);w.forEach(function(N,B){var j,D,G,Y;N==="t"&&(j=R(B===0?[d+g,+a-d-g]:[0,+a],2),x=j[0],O=j[1]),N==="r"&&(D=R([+i-f-y],1),_=D[0]),N==="b"&&(G=R([+a-d-p],1),O=G[0]),N==="l"&&(Y=R(B===0?[f+v,+i-f-v]:[0,+i],2),b=Y[0],_=Y[1])});var S=R(Wr(c),4),M=S[0],E=S[1],P=S[2],L=S[3],A=R([L+E,M+P],2),T=A[0],C=A[1];return new Ln(b+L,x+M,_-T,O-C)},e.prototype.getBBox=function(){return this.title?this.title.getBBox():new Ln(0,0,0,0)},e.prototype.render=function(n,r){var i=this,a=n.width,o=n.height,s=n.position,c=n.spacing,l=rn(n,["width","height","position","spacing"]),u=R(yo(l),1),f=u[0],d=GW(n),h=d.x,p=d.y,v=d.textAlign,g=d.textBaseline;Si(!!l.text,ge(r),function(y){i.title=y.maybeAppendByClassName(_S.text,"text").styles(f).call(zW,{x:h,y:p,textAlign:v,textBaseline:g}).node()})},e}(Nr);function WW(t,e,n){var r=n.titlePosition,i=r===void 0?"lb":r,a=n.titleSpacing,o=hp(i),s=t.node().getLocalBounds(),c=R(s.min,2),l=c[0],u=c[1],f=R(s.halfExtents,2),d=f[0],h=f[1],p=R(e.node().getLocalBounds().halfExtents,2),v=p[0],g=p[1],y=R([l+d,u+h],2),m=y[0],b=y[1],x=R(Wr(a),4),_=x[0],O=x[1],w=x[2],S=x[3];if(["start","end"].includes(i)&&n.type==="linear"){var M=n.startPos,E=n.endPos,P=R(i==="start"?[M,E]:[E,M],2),L=P[0],A=P[1],T=Vw([-A[0]+L[0],-A[1]+L[1]]),C=R(go(T,_),2),N=C[0],B=C[1];return{x:L[0]+N,y:L[1]+B}}return o.includes("t")&&(b-=h+g+_),o.includes("r")&&(m+=d+v+O),o.includes("l")&&(m-=d+v*2+S),o.includes("b")&&(b+=h+g*2+w),{x:m,y:b}}function YW(t,e,n){var r=t.cloneNode(!0);r.style.transform="scale(1, 1)",r.style.transform="none";var i=r.getBBox().height;if(e==="vertical"){if(n==="left")return"rotate(-90) translate(0, ".concat(i/2,")");if(n==="right")return"rotate(-90) translate(0, -".concat(i/2,")")}return""}function wS(t,e,n,r,i){var a=Pe(r,"title"),o=R(yo(a),2),s=o[0],c=o[1],l=c.transform,u=rn(c,["transform"]);t.styles(s),e.styles(u);var f=l||YW(t.node(),s.direction,s.position);up(t.node(),f);var d=WW(ge(n._offscreen||n.querySelector(un.mainGroup.class)),e,r),h=d.x,p=d.y,v=xa(e.node(),{x:h,y:p},i);return up(t.node(),f),v}function HW(t,e,n,r){var i=n.titleText;return t.selectAll(un.title.class).data([{title:i}].filter(function(a){return!!a.title}),function(a,o){return a.title}).join(function(a){return a.append(function(){return ic(i)}).attr("className",un.title.name).transition(function(){return wS(ge(this),t,e,n,r.enter)})},function(a){return a.transition(function(){return wS(ge(this),t,e,n,r.update)})},function(a){return a.remove()}).transitions()}function SS(t,e,n,r){var i=t.showLine,a=t.showTick,o=t.showLabel,s=e.maybeAppendByClassName(un.lineGroup,"g"),c=Si(i,s,function(h){return tW(h,t,r)})||[],l=e.maybeAppendByClassName(un.tickGroup,"g"),u=Si(a,l,function(h){return BW(h,n,t,r)})||[],f=e.maybeAppendByClassName(un.labelGroup,"g"),d=Si(o,f,function(h){return NW(h,n,t,r)})||[];return yt(yt(yt([],R(c),!1),R(u),!1),R(d),!1).filter(function(h){return!!h})}var Qy=function(t){Yt(e,t);function e(n){return t.call(this,n,By)||this}return e.prototype.render=function(n,r,i){var a=this,o=n.titleText,s=n.data,c=n.animate,l=n.showTitle,u=n.showGrid,f=n.dataThreshold,d=n.truncRange,h=MG(s,f).filter(function(_){var O=_.value;return!(d&&O>d[0]&&O<d[1])}),p=Gw(i===void 0?c:i),v=ge(r).maybeAppendByClassName(un.gridGroup,"g"),g=Si(u,v,function(_){return iW(_,h,n,p)})||[],y=ge(r).maybeAppendByClassName(un.mainGroup,"g");o&&(!this.initialized&&p.enter||this.initialized&&p.update)&&SS(n,ge(this.offscreenGroup),h,Gw(!1));var m=SS(n,ge(y.node()),h,p),b=ge(r).maybeAppendByClassName(un.titleGroup,"g"),x=Si(l,b,function(_){return HW(_,a,n,p)})||[];return yt(yt(yt([],R(g),!1),R(m),!1),R(x),!1).flat().filter(function(_){return!!_})},e}(Nr),$W={}.toString,VW=function(t,e){return $W.call(t)==="[object "+e+"]"},mf=VW,Jy=function(t){return mf(t,"Function")},MS=function(t){return Array.isArray?Array.isArray(t):mf(t,"Array")},UW=function(t){var e=typeof t;return t!==null&&e==="object"||e==="function"};function XW(t,e){if(t){var n;if(MS(t))for(var r=0,i=t.length;r<i&&(n=e(t[r],r),n!==!1);r++);else if(UW(t)){for(var a in t)if(t.hasOwnProperty(a)&&(n=e(t[a],a),n===!1))break}}}var ES=XW,Pgt=Object.keys?function(t){return Object.keys(t)}:function(t){var e=[];return ES(t,function(n,r){Jy(t)&&r==="prototype"||e.push(r)}),e},Agt=null;function Tgt(t,e){var n=keys(e),r=n.length;if(isNil(t))return!r;for(var i=0;i<r;i+=1){var a=n[i];if(e[a]!==t[a]||!(a in t))return!1}return!0}var Cgt=null,qW=function(t){return typeof t=="object"&&t!==null},ZW=qW,KW=function(t){if(!ZW(t)||!mf(t,"Object"))return!1;if(Object.getPrototypeOf(t)===null)return!0;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e},PS=KW;function kgt(t,e){if(!isArray(t))return null;var n;if(isFunction(e)&&(n=e),isPlainObject(e)&&(n=function(i){return isMatch(i,e)}),n){for(var r=0;r<t.length;r+=1)if(n(t[r]))return t[r]}return null}var Lgt=null,Ngt=function(t,e){for(var n=null,r=0;r<t.length;r++){var i=t[r],a=i[e];if(!isNil(a)){isArray(a)?n=a[0]:n=a;break}}return n},Igt=null,jgt=function(t){if(!isArray(t))return[];for(var e=[],n=0;n<t.length;n++)e=e.concat(t[n]);return e},Rgt=null,QW=function(t,e){if(e===void 0&&(e=[]),!isArray(t))e.push(t);else for(var n=0;n<t.length;n+=1)QW(t[n],e);return e},Dgt=null,Bgt=function(t){if(isArray(t))return t.reduce(function(e,n){return Math.max(e,n)},t[0])},Fgt=function(t){if(isArray(t))return t.reduce(function(e,n){return Math.min(e,n)},t[0])},zgt=function(t){var e=t.filter(function(o){return!isNaN(o)});if(!e.length)return{min:0,max:0};if(isArray(t[0])){for(var n=[],r=0;r<t.length;r++)n=n.concat(t[r]);e=n}var i=getMax(e),a=getMin(e);return{min:a,max:i}},Ggt=null,AS=Array.prototype,JW=AS.splice,tY=AS.indexOf,Wgt=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r++)for(var i=e[r],a=-1;(a=tY.call(t,i))>-1;)JW.call(t,a,1);return t},Ygt=null,eY=Array.prototype.splice,Hgt=function(e,n){if(!isArrayLike(e))return[];for(var r=e?n.length:0,i=r-1;r--;){var a=void 0,o=n[r];(r===i||o!==a)&&(a=o,eY.call(e,o,1))}return e},$gt=null,Vgt=function(t,e,n){if(!isArray(t)&&!isPlainObject(t))return t;var r=n;return each(t,function(i,a){r=e(r,i,a)}),r},Ugt=null,Xgt=function(t,e){var n=[];if(!isArrayLike(t))return n;for(var r=-1,i=[],a=t.length;++r<a;){var o=t[r];e(o,r,t)&&(n.push(o),i.push(r))}return pullAt(t,i),n},qgt=null,nY=function(t){return mf(t,"String")};function Zgt(t,e){var n;if(isFunction(e))n=function(i,a){return e(i)-e(a)};else{var r=[];isString(e)?r.push(e):isArray(e)&&(r=e),n=function(i,a){for(var o=0;o<r.length;o+=1){var s=r[o];if(i[s]>a[s])return 1;if(i[s]<a[s])return-1}return 0}}return t.sort(n),t}var Kgt=null,Qgt=function(t,e){for(var n=[],r={},i=0;i<t.length;i++){var a=t[i],o=a[e];if(!isNil(o)){isArray(o)||(o=[o]);for(var s=0;s<o.length;s++){var c=o[s];r[c]||(n.push(c),r[c]=!0)}}}return n};function Jgt(t,e){return isArray(t)||isString(t)?t[0]===e:!1}var tyt=null;function eyt(t,e){return isArray(t)||isString(t)?t[t.length-1]===e:!1}var nyt=null,rY=Object.prototype.hasOwnProperty;function ryt(t,e){if(!e||!isArray(t))return{};for(var n={},r=isFunction(e)?e:function(s){return s[e]},i,a=0;a<t.length;a++){var o=t[a];i=r(o),rY.call(n,i)?n[i].push(o):n[i]=[o]}return n}var iyt=null;function ayt(t,e){if(!e)return{0:t};if(!isFunction(e)){var n=isArray(e)?e:e.replace(/\s+/g,"").split("*");e=function(r){for(var i="_",a=0,o=n.length;a<o;a++)i+=r[n[a]]&&r[n[a]].toString();return i}}return groupBy(t,e)}var oyt=function(t,e){if(!e)return[t];var n=groupToMap(t,e),r=[];for(var i in n)r.push(n[i]);return r},TS={};function syt(t){var e=TS[t];if(!e){for(var n=t.toString(16),r=n.length;r<6;r++)n="0"+n;e="#"+n,TS[t]=e}return e}var cyt=null;function lyt(t){var e=0,n=0,r=0,i=0;return isArray(t)?t.length===1?e=n=r=i=t[0]:t.length===2?(e=r=t[0],n=i=t[1]):t.length===3?(e=t[0],n=i=t[1],r=t[2]):(e=t[0],n=t[1],r=t[2],i=t[3]):e=n=r=i=t,{r1:e,r2:n,r3:r,r4:i}}var uyt=null,iY=function(t){return mf(t,"Number")},Ol=iY,fyt=function(t){return isNumber(t)&&t%1!==0},dyt=null,hyt=function(t){return isNumber(t)&&t%2===0},pyt=null,vyt=Number.isInteger?Number.isInteger:function(t){return Ol(t)&&t%1===0},gyt=null,yyt=function(t){return isNumber(t)&&t<0},myt=null,byt=function(t){return isNumber(t)&&t%2!==0},xyt=null,_yt=function(t){return isNumber(t)&&t>0},Oyt=null,wyt=function(t,e){if(isArray(t)){for(var n,r=-1/0,i=0;i<t.length;i++){var a=t[i],o=isFunction(e)?e(a):a[e];o>r&&(n=a,r=o)}return n}},Syt=function(t,e){if(isArray(t)){for(var n,r=1/0,i=0;i<t.length;i++){var a=t[i],o=isFunction(e)?e(a):a[e];o<r&&(n=a,r=o)}return n}},aY=180/Math.PI,Myt=function(t){return aY*t},Eyt=null,oY=Math.PI/180,Pyt=function(t){return oY*t},Ayt=null,Tyt=null,sY=Object.values?function(t){return Object.values(t)}:function(t){var e=[];return ES(t,function(n,r){Jy(t)&&r==="prototype"||e.push(n)}),e},cY=sY,Cyt=function(t,e){return contains(values(t),e)},lY={}.toString,kyt=function(t){return lY.call(t).replace(/^\[object /,"").replace(/]$/,"")},Lyt=null,Nyt=function(t){return isType(t,"Arguments")},Iyt=null,jyt=function(t){return isType(t,"Boolean")},Ryt=null,Dyt=function(t){return isType(t,"Date")},Byt=null,Fyt=function(t){return isType(t,"Error")},zyt=null;function Gyt(t){return isNumber(t)&&isFinite(t)}var uY=function(t){return t===null},fY=uY,dY=Object.prototype,Wyt=function(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||dY;return t===n},Yyt=null,Hyt=function(t){return isType(t,"RegExp")},$yt=null,hY=function(t){return t===void 0},pY=hY,Vyt=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=t[0],r=1;r<t.length;r++){var i=t[r];isFunction(i)&&(i=i.prototype),mix(n.prototype,i)}},Uyt=null,CS=function(t){if(typeof t!="object"||t===null)return t;var e;if(isArray(t)){e=[];for(var n=0,r=t.length;n<r;n++)typeof t[n]=="object"&&t[n]!=null?e[n]=CS(t[n]):e[n]=t[n]}else{e={};for(var i in t)typeof t[i]=="object"&&t[i]!=null?e[i]=CS(t[i]):e[i]=t[i]}return e},Xyt=null,vY=function(t,e){if(!Jy(t))throw new TypeError("Expected a function");var n=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var a=e?e.apply(this,r):r[0],o=n.cache;if(o.has(a))return o.get(a);var s=t.apply(this,r);return o.set(a,s),s};return n.cache=new Map,n},gY=5;function kS(t,e,n,r){n=n||0,r=r||gY;for(var i in e)if(e.hasOwnProperty(i)){var a=e[i];a!==null&&PS(a)?(PS(t[i])||(t[i]={}),n<r?kS(t[i],a,n+1,r):t[i]=e[i]):MS(a)?(t[i]=[],t[i]=t[i].concat(a)):a!==void 0&&(t[i]=a)}}var yY=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)kS(t,e[r]);return t},LS=yY,qyt=function(t,e,n,r){isFunction(e)||(n=e,e=t,t=function(){});var i=Object.create?function(o,s){return Object.create(o,{constructor:{value:s}})}:function(o,s){function c(){}c.prototype=o;var l=new c;return l.constructor=s,l},a=i(e.prototype,t);return t.prototype=mix(a,t.prototype),t.superclass=i(e.prototype,e),mix(a,n),mix(t,r),t},Zyt=null,mY=function(t){return t!==null&&typeof t!="function"&&isFinite(t.length)},NS=mY,bY=function(t,e){if(!NS(t))return-1;var n=Array.prototype.indexOf;if(n)return n.call(t,e);for(var r=-1,i=0;i<t.length;i++)if(t[i]===e){r=i;break}return r},IS=bY,xY=Object.prototype.hasOwnProperty;function Kyt(t){if(isNil(t))return!0;if(isArrayLike(t))return!t.length;var e=getType(t);if(e==="Map"||e==="Set")return!t.size;if(isPrototype(t))return!Object.keys(t).length;for(var n in t)if(xY.call(t,n))return!1;return!0}var Qyt=null,jS=function(t,e){if(t===e)return!0;if(!t||!e||isString(t)||isString(e))return!1;if(isArrayLike(t)||isArrayLike(e)){if(t.length!==e.length)return!1;for(var n=!0,r=0;r<t.length&&(n=jS(t[r],e[r]),!!n);r++);return n}if(isObjectLike(t)||isObjectLike(e)){var i=Object.keys(t),a=Object.keys(e);if(i.length!==a.length)return!1;for(var n=!0,r=0;r<i.length&&(n=jS(t[i[r]],e[i[r]]),!!n);r++);return n}return!1},Jyt=null,tmt=function(t,e,n){return isFunction(n)?!!n(t,e):isEqual(t,e)},emt=function(t,e,n){for(var r=0,i=isString(e)?e.split("."):e;t&&r<i.length;)t=t[i[r++]];return t===void 0||r<i.length?n:t},nmt=function(t,e,n){var r=t,i=isString(e)?e.split("."):e;return i.forEach(function(a,o){o<i.length-1?(isObject(r[a])||(r[a]=isNumber(i[o+1])?[]:{}),r=r[a]):r[a]=n}),t},_Y=Object.prototype.hasOwnProperty,rmt=function(t,e){if(t===null||!isPlainObject(t))return{};var n={};return each(e,function(r){_Y.call(t,r)&&(n[r]=t[r])}),n},imt=function(t,e){return reduce(t,function(n,r,i){return e.includes(i)||(n[i]=r),n},{})},pp={},amt=function(t){return t=t||"g",pp[t]?pp[t]+=1:pp[t]=1,t+pp[t]},ac=function(t){return t},OY=function(t){return t==null},wY=OY;function RS(t){return wY(t)?0:NS(t)?t.length:Object.keys(t).length}var vp,omt=vY(function(t,e){e===void 0&&(e={});var n=e.fontSize,r=e.fontFamily,i=e.fontWeight,a=e.fontStyle,o=e.fontVariant;return vp||(vp=document.createElement("canvas").getContext("2d")),vp.font=[a,o,i,n+"px",r].join(" "),vp.measureText(nY(t)?t:"").width},function(t,e){return e===void 0&&(e={}),N_([t],cY(e)).join("")}),smt=function(t,e,n,r){r===void 0&&(r="...");var i=16,a=measureTextWidth(r,n),o=isString(t)?t:toString(t),s=e,c=[],l,u;if(measureTextWidth(t,n)<=e)return t;for(;l=o.substr(0,i),u=measureTextWidth(l,n),!(u+a>s&&u>s);)if(c.push(l),s-=u,o=o.substr(i),!o)return c.join("");for(;l=o.substr(0,1),u=measureTextWidth(l,n),!(u+a>s);)if(c.push(l),s-=u,o=o.substr(1),!o)return c.join("");return""+c.join("")+r},cmt=function(){function t(){this.map={}}return t.prototype.has=function(e){return this.map[e]!==void 0},t.prototype.get=function(e,n){var r=this.map[e];return r===void 0?n:r},t.prototype.set=function(e,n){this.map[e]=n},t.prototype.clear=function(){this.map={}},t.prototype.delete=function(e){delete this.map[e]},t.prototype.size=function(){return Object.keys(this.map).length},t}(),lmt=null;class bf{constructor(e){this.options=LS({},this.getDefaultOptions()),this.update(e)}getOptions(){return this.options}update(e={}){this.options=LS({},this.options,e),this.rescale(e)}rescale(e){}}function gp(t,e){return e-t?n=>(n-t)/(e-t):n=>.5}function wl(t,...e){return e.reduce((n,r)=>i=>n(r(i)),t)}function tm(t,e,n,r,i){let a=n||0,o=r||t.length;const s=i||(c=>c);for(;a<o;){const c=Math.floor((a+o)/2);s(t[c])>e?o=c:a=c+1}return a}var SY=J(19818),MY=J.n(SY);function em(t,e,n){let r=n;return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+(e-t)*6*r:r<1/2?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function EY(t){const e=t[0]/360,n=t[1]/100,r=t[2]/100,i=t[3];if(n===0)return[r*255,r*255,r*255,i];const a=r<.5?r*(1+n):r+n-r*n,o=2*r-a,s=em(o,a,e+1/3),c=em(o,a,e),l=em(o,a,e-1/3);return[s*255,c*255,l*255,i]}function DS(t){const e=MY().get(t);if(!e)return null;const{model:n,value:r}=e;return n==="rgb"?r:n==="hsl"?EY(r):null}const Sl=(t,e)=>n=>t*(1-n)+e*n,PY=(t,e)=>{const n=DS(t),r=DS(e);return n===null||r===null?n?()=>t:()=>e:i=>{const a=new Array(4);for(let u=0;u<4;u+=1){const f=n[u],d=r[u];a[u]=f*(1-i)+d*i}const[o,s,c,l]=a;return`rgba(${Math.round(o)}, ${Math.round(s)}, ${Math.round(c)}, ${l})`}},xf=(t,e)=>typeof t=="number"&&typeof e=="number"?Sl(t,e):typeof t=="string"&&typeof e=="string"?PY(t,e):()=>t,AY=(t,e)=>{const n=Sl(t,e);return r=>Math.round(n(r))};function yp(t){return!pY(t)&&!fY(t)&&!Number.isNaN(t)}const nm=Math.sqrt(50),rm=Math.sqrt(10),im=Math.sqrt(2);function mp(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),a=r/hr(10,i);return i>=0?(a>=nm?10:a>=rm?5:a>=im?2:1)*hr(10,i):-hr(10,-i)/(a>=nm?10:a>=rm?5:a>=im?2:1)}function BS(t,e,n){const r=Math.abs(e-t)/Math.max(0,n);let i=hr(10,Math.floor(Math.log(r)/Math.LN10));const a=r/i;return a>=nm?i*=10:a>=rm?i*=5:a>=im&&(i*=2),e<t?-i:i}const FS=(t,e,n=5)=>{const r=[t,e];let i=0,a=r.length-1,o=r[i],s=r[a],c;return s<o&&([o,s]=[s,o],[i,a]=[a,i]),c=mp(o,s,n),c>0?(o=Math.floor(o/c)*c,s=Math.ceil(s/c)*c,c=mp(o,s,n)):c<0&&(o=Math.ceil(o*c)/c,s=Math.floor(s*c)/c,c=mp(o,s,n)),c>0?(r[i]=Math.floor(o/c)*c,r[a]=Math.ceil(s/c)*c):c<0&&(r[i]=Math.ceil(o*c)/c,r[a]=Math.floor(s*c)/c),r};function TY(t,e){const n=e<t?e:t,r=t>e?t:e;return i=>Math.min(Math.max(n,i),r)}const CY=(t,e,n)=>{const[r,i]=t,[a,o]=e;let s,c;return r<i?(s=gp(r,i),c=n(a,o)):(s=gp(i,r),c=n(o,a)),wl(c,s)},kY=(t,e,n)=>{const r=Math.min(t.length,e.length)-1,i=new Array(r),a=new Array(r),o=t[0]>t[r],s=o?[...t].reverse():t,c=o?[...e].reverse():e;for(let l=0;l<r;l+=1)i[l]=gp(s[l],s[l+1]),a[l]=n(c[l],c[l+1]);return l=>{const u=tm(t,l,1,r)-1,f=i[u],d=a[u];return wl(d,f)(l)}},zS=(t,e,n,r)=>(Math.min(t.length,e.length)>2?kY:CY)(t,e,r?AY:n);class bp extends bf{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:Sl,tickCount:5}}map(e){return yp(e)?this.output(e):this.options.unknown}invert(e){return yp(e)?this.input(e):this.options.unknown}nice(){if(!this.options.nice)return;const[e,n,r,...i]=this.getTickMethodOptions();this.options.domain=this.chooseNice()(e,n,r,...i)}getTicks(){const{tickMethod:e}=this.options,[n,r,i,...a]=this.getTickMethodOptions();return e(n,r,i,...a)}getTickMethodOptions(){const{domain:e,tickCount:n}=this.options,r=e[0],i=e[e.length-1];return[r,i,n]}chooseNice(){return FS}rescale(){this.nice();const[e,n]=this.chooseTransforms();this.composeOutput(e,this.chooseClamp(e)),this.composeInput(e,n,this.chooseClamp(n))}chooseClamp(e){const{clamp:n,range:r}=this.options,i=this.options.domain.map(e),a=Math.min(i.length,r.length);return n?TY(i[0],i[a-1]):ac}composeOutput(e,n){const{domain:r,range:i,round:a,interpolate:o}=this.options,s=zS(r.map(e),i,o,a);this.output=wl(s,n,e)}composeInput(e,n,r){const{domain:i,range:a}=this.options,o=zS(a,i.map(e),Sl);this.input=wl(n,r,o)}}const oc=(t,e,n)=>{let r,i,a=t,o=e;if(a===o&&n>0)return[a];let s=mp(a,o,n);if(s===0||!Number.isFinite(s))return[];if(s>0){a=Math.ceil(a/s),o=Math.floor(o/s),i=new Array(r=Math.ceil(o-a+1));for(let c=0;c<r;c+=1)i[c]=(a+c)*s}else{s=-s,a=Math.ceil(a*s),o=Math.floor(o*s),i=new Array(r=Math.ceil(o-a+1));for(let c=0;c<r;c+=1)i[c]=(a+c)/s}return i};class Kr extends bp{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:xf,tickMethod:oc,tickCount:5}}chooseTransforms(){return[ac,ac]}clone(){return new Kr(this.options)}}function LY(t,e){if(t){var n;if(mr(t))for(var r=0,i=t.length;r<i&&(n=e(t[r],r),n!==!1);r++);else if(Ys(t)){for(var a in t)if(t.hasOwnProperty(a)&&(n=e(t[a],a),n===!1))break}}}var am=LY,NY=function(t,e,n){if(!mr(t)&&!ho(t))return t;var r=n;return am(t,function(i,a){r=e(r,i,a)}),r},GS=NY,om=function(t,e){return GS(t,function(n,r,i){return e.includes(i)||(n[i]=r),n},{})};function mo(t,e){let n,r;if(e===void 0)for(const i of t)i!=null&&(n===void 0?i>=i&&(n=r=i):(n>i&&(n=i),r<i&&(r=i)));else{let i=-1;for(let a of t)(a=e(a,++i,t))!=null&&(n===void 0?a>=a&&(n=r=a):(n>a&&(n=a),r<a&&(r=a)))}return[n,r]}function WS(t){for(var e=1/0,n=1/0,r=-1/0,i=-1/0,a=0;a<t.length;a++){var o=t[a],s=o.x,c=o.y,l=o.width,u=o.height,f=R([s+l,c+u],2),d=f[0],h=f[1];s<e&&(e=s),c<n&&(n=c),d>r&&(r=d),h>i&&(i=h)}return new Ln(e,n,r-e,i-n)}var IY=function(t,e,n){var r=t.width,i=t.height,a=n.flexDirection,o=a===void 0?"row":a,s=n.flexWrap,c=s===void 0?"nowrap":s,l=n.justifyContent,u=l===void 0?"flex-start":l,f=n.alignContent,d=f===void 0?"flex-start":f,h=n.alignItems,p=h===void 0?"flex-start":h,v=o==="row",g=o==="row"||o==="column",y=v?g?[1,0]:[-1,0]:g?[0,1]:[0,-1],m=R([0,0],2),b=m[0],x=m[1],_=e.map(function(A){var T,C=A.width,N=A.height,B=R([b,x],2),j=B[0],D=B[1];return T=R([b+C*y[0],x+N*y[1]],2),b=T[0],x=T[1],new Ln(j,D,C,N)}),O=WS(_),w={"flex-start":0,"flex-end":v?r-O.width:i-O.height,center:v?(r-O.width)/2:(i-O.height)/2},S=_.map(function(A){var T=A.x,C=A.y,N=Ln.fromRect(A);return N.x=v?T+w[u]:T,N.y=v?C:C+w[u],N}),M=WS(S),E=function(A){var T=R(v?["height",i]:["width",r],2),C=T[0],N=T[1];switch(p){case"flex-start":return 0;case"flex-end":return N-A[C];case"center":return N/2-A[C]/2;default:return 0}},P=S.map(function(A){var T=A.x,C=A.y,N=Ln.fromRect(A);return N.x=v?T:T+E(N),N.y=v?C+E(N):C,N}),L=P.map(function(A){var T,C,N=Ln.fromRect(A);return N.x+=(T=t.x)!==null&&T!==void 0?T:0,N.y+=(C=t.y)!==null&&C!==void 0?C:0,N});return L},jY=function(t,e,n){return[]},RY=function(t,e,n){if(e.length===0)return[];var r={flex:IY,grid:jY},i=n.display in r?r[n.display]:null;return(i==null?void 0:i.call(null,t,e,n))||[]},DY=function(t){Yt(e,t);function e(n){var r=t.call(this,n)||this;r.layoutEvents=[oe.BOUNDS_CHANGED,oe.INSERTED,oe.REMOVED],r.$margin=Wr(0),r.$padding=Wr(0);var i=n.style||{},a=i.margin,o=a===void 0?0:a,s=i.padding,c=s===void 0?0:s;return r.margin=o,r.padding=c,r.isMutationObserved=!0,r.bindEvents(),r}return Object.defineProperty(e.prototype,"margin",{get:function(){return this.$margin},set:function(n){this.$margin=Wr(n)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"padding",{get:function(){return this.$padding},set:function(n){this.$padding=Wr(n)},enumerable:!1,configurable:!0}),e.prototype.getBBox=function(){var n=this.attributes,r=n.x,i=r===void 0?0:r,a=n.y,o=a===void 0?0:a,s=n.width,c=n.height,l=R(this.$margin,4),u=l[0],f=l[1],d=l[2],h=l[3];return new Ln(i-h,o-u,s+h+f,c+u+d)},e.prototype.appendChild=function(n,r){return n.isMutationObserved=!0,t.prototype.appendChild.call(this,n,r),n},e.prototype.getAvailableSpace=function(){var n=this.attributes,r=n.width,i=n.height,a=R(this.$padding,4),o=a[0],s=a[1],c=a[2],l=a[3],u=R(this.$margin,4),f=u[0],d=u[3];return new Ln(l+d,o+f,r-l-s,i-o-c)},e.prototype.layout=function(){if(!(!this.attributes.display||!this.isConnected)&&!this.children.some(function(r){return!r.isConnected}))try{var n=RY(this.getAvailableSpace(),this.children.map(function(r){return r.getBBox()}),this.attributes);this.children.forEach(function(r,i){var a=n[i],o=a.x,s=a.y;r.attr({x:o,y:s})})}catch(r){}},e.prototype.bindEvents=function(){var n=this;this.layoutEvents.forEach(function(r){n.addEventListener(r,function(i){i.target.isMutationObserved=!0,n.layout()})})},e.prototype.attributeChangedCallback=function(n,r,i){n==="margin"?this.margin=i:n==="padding"&&(this.padding=i),this.layout()},e}(Er),BY=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function FY(t){return class extends kh{constructor(e){super(e),this.descriptor=t}connectedCallback(){var e,n;(n=(e=this.descriptor).render)===null||n===void 0||n.call(e,this.attributes,this)}update(e={}){var n,r;this.attr(dt({},this.attributes,e)),(r=(n=this.descriptor).render)===null||r===void 0||r.call(n,this.attributes,this)}}}function YS(t,e,n){return t.querySelector(e)?se(t).select(e):se(t).append(n)}function xp(t){return Array.isArray(t)?t.join(", "):`${t||""}`}function HS(t,e){const n={display:"flex",flexDirection:"row",justifyContent:"flex-start",alignItems:"center"};let{flexDirection:r,justifyContent:i,alignItems:a}=n;const o={top:["row","flex-start","center"],bottom:["row","flex-start","center"],left:["column","flex-start","center"],right:["column","flex-start","center"],center:["column","center","center"]};return t in o&&([r,i,a]=o[t]),Object.assign({display:"flex",flexDirection:r,justifyContent:i,alignItems:a},e)}class $S extends DY{get child(){var e;return(e=this.children)===null||e===void 0?void 0:e[0]}update(e){var n;this.attr(e);const{subOptions:r}=e;(n=this.child)===null||n===void 0||n.update(r)}}class zY extends $S{update(e){var n;const{subOptions:r}=e;this.attr(e),(n=this.child)===null||n===void 0||n.update(r)}}function Ra(t,e){var n;return(n=t.filter(r=>r.getOptions().name===e))===null||n===void 0?void 0:n[0]}function GY(t){return t==="horizontal"||t===0}function WY(t){return t==="vertical"||t===-Math.PI/2}function VS(t,e,n){const{bbox:r}=t,{position:i="top",size:a,length:o}=e,s=["top","bottom","center"].includes(i),[c,l]=s?[r.height,r.width]:[r.width,r.height],{defaultSize:u,defaultLength:f}=n.props,d=a||u||c,h=o||f||l,p=s?"horizontal":"vertical",[v,g]=s?[h,d]:[d,h];return{orientation:p,width:v,height:g,size:d,length:h}}function YY(t){return t.find(e=>e.getOptions().domain.length>0).getOptions().domain}function _p(t){const e=["arrow","crosshairs","grid","handle","handleLabel","indicator","label","line","tick","tip","title","trunc"],{style:n}=t,r=BY(t,["style"]),i={};return Object.entries(r).forEach(([a,o])=>{e.includes(a)?i[`show${qo(a)}`]=o:i[a]=o}),Object.assign(Object.assign({},i),n)}var US=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function XS(t,e){const{eulerAngles:n,origin:r}=e;r&&t.setOrigin(r),n&&t.rotate(n[0],n[1],n[2])}function qS(t){const{innerWidth:e,innerHeight:n,depth:r}=t.getOptions();return[e,n,r]}function HY(t,e){const{width:n,height:r}=e.getOptions();return i=>{if(!Bw(e))return i;const a=t==="bottom"?[i,1]:[0,i],o=e.map(a);if(t==="bottom"){const s=o[0];return new Kr({domain:[0,n],range:[0,1]}).map(s)}else if(t==="left"){const s=o[1];return new Kr({domain:[0,r],range:[0,1]}).map(s)}return i}}function $Y(t,e,n){if(t.getTicks)return t.getTicks();if(!n)return e;const[r,i]=mo(e,o=>+o),{tickCount:a}=t.getOptions();return n(r,i,a)}function VY(t,e){if(xn(e))return h=>h;const n=e.getOptions(),{innerWidth:r,innerHeight:i,insetTop:a,insetBottom:o,insetLeft:s,insetRight:c}=n,[l,u,f]=t==="left"||t==="right"?[a,o,i]:[s,c,r],d=new Kr({domain:[0,1],range:[l/f,1-u/f]});return h=>d.map(h)}function ZS(t,e,n,r,i,a,o,s){var c;(n!==void 0||a!==void 0)&&t.update(Object.assign(Object.assign({},n&&{tickCount:n}),a&&{tickMethod:a}));const l=$Y(t,e,a),u=i?l.filter(i):l,f=y=>y instanceof Date?String(y):typeof y=="object"&&y?y:String(y),d=r||((c=t.getFormatter)===null||c===void 0?void 0:c.call(t))||f,h=VY(o,s),p=HY(o,s),v=y=>["top","bottom","center","outer"].includes(y),g=y=>["left","right"].includes(y);return xn(s)||kn(s)?u.map((y,m,b)=>{var x,_;const O=((x=t.getBandWidth)===null||x===void 0?void 0:x.call(t,y))/2||0,w=h(t.map(y)+O);return{value:uf(s)&&o==="center"||kn(s)&&((_=t.getTicks)===null||_===void 0?void 0:_.call(t))&&v(o)||kn(s)&&g(o)?1-w:w,label:f(d(np(y),m,b)),id:String(m)}}):u.map((y,m,b)=>{var x;const _=((x=t.getBandWidth)===null||x===void 0?void 0:x.call(t,y))/2||0,O=p(h(t.map(y)+_));return{value:g(o)?1-O:O,label:f(d(np(y),m,b)),id:String(m)}})}function UY(t,e,n="xy"){const[r,i,a]=qS(e);return n==="xy"?t.includes("bottom")||t.includes("top")?i:r:n==="xz"?t.includes("bottom")||t.includes("top")?a:r:t.includes("bottom")||t.includes("top")?i:a}function XY(t=[],e){if(t.length>0)return t;const{labelAutoRotate:n,labelAutoHide:r,labelAutoEllipsis:i,labelAutoWrap:a}=e,o=[],s=(c,l)=>{l&&o.push(Object.assign(Object.assign({},c),l))};return s({type:"rotate",optionalAngles:[0,15,30,45,60,90]},n),s({type:"ellipsis",minLength:20},i),s({type:"hide"},r),s({type:"wrap",wordWrapWidth:100,maxLines:3,recoveryWhenFail:!0},a),o}function qY(t,e,n,r,i){const{x:a,y:o,width:s,height:c}=e,l=[a+s/2,o+c/2],u=Math.min(s,c)/2,[f,d]=Ry(i),[h,p]=qS(i),v=Math.min(h,p)/2,g={center:l,radius:u,startAngle:f,endAngle:d,gridLength:(r-n)*v};if(t==="inner"){const{insetLeft:y,insetTop:m}=i.getOptions();return Object.assign(Object.assign({},g),{center:[l[0]-y,l[1]-m],labelAlign:"perpendicular",labelDirection:"positive",tickDirection:"positive",gridDirection:"negative"})}return Object.assign(Object.assign({},g),{labelAlign:"parallel",labelDirection:"negative",tickDirection:"negative",gridDirection:"positive"})}function ZY(t,e,n){return Fw(e)||ff(e)?!1:t===void 0?!!n.getTicks:t}function KY(t){const{depth:e}=t.getOptions();return e?{tickIsBillboard:!0,lineIsBillboard:!0,labelIsBillboard:!0,titleIsBillboard:!0,gridIsBillboard:!0}:{}}function QY(t,e,n,r,i){const{x:a,y:o,width:s,height:c}=n;if(t==="bottom")return{startPos:[a,o],endPos:[a+s,o]};if(t==="left")return{startPos:[a+s,o+c],endPos:[a+s,o]};if(t==="right")return{startPos:[a,o+c],endPos:[a,o]};if(t==="top")return{startPos:[a,o+c],endPos:[a+s,o+c]};if(t==="center"){if(e==="vertical")return{startPos:[a,o],endPos:[a,o+c]};if(e==="horizontal")return{startPos:[a,o],endPos:[a+s,o]};if(typeof e=="number"){const[l,u]=r.getCenter(),[f,d]=rp(r),[h,p]=Ry(r),v=Math.min(s,c)/2,{insetLeft:g,insetTop:y}=r.getOptions(),m=f*v,b=d*v,[x,_]=[l+a-g,u+o-y],[O,w]=[Math.cos(e),Math.sin(e)],S=[x+b*O,_+b*w],M=[x+m*O,_+m*w],E=()=>{const{domain:L}=i.getOptions();return L.length},P=xn(r)&&i?E():3;return{startPos:S,endPos:M,gridClosed:Math.abs(p-h-360)<1e-6,gridCenter:[x,_],gridControlAngles:new Array(P).fill(0).map((L,A,T)=>(p-h)/P*A)}}}return{}}const JY=t=>{const{order:e,size:n,position:r,orientation:i,labelFormatter:a,tickFilter:o,tickCount:s,tickMethod:c,important:l={},style:u={},indexBBox:f,title:d,grid:h=!1}=t,p=US(t,["order","size","position","orientation","labelFormatter","tickFilter","tickCount","tickMethod","important","style","indexBBox","title","grid"]);return({scales:[v],value:g,coordinate:y,theme:m})=>{const{bbox:b}=g,{domain:x}=v.getOptions(),_=ZS(v,x,s,a,o,c,r,y),O=f?_.map((A,T)=>{const C=f.get(T);return!C||C[0]!==A.label?A:Object.assign(Object.assign({},A),{bbox:C[1]})}):_,[w,S]=rp(y),M=qY(r,b,w,S,y),{axis:E,axisArc:P={}}=m,L=_p(dt({},E,P,M,Object.assign(Object.assign({type:"arc",data:O,titleText:xp(d),grid:h},p),l)));return new Qy({style:om(L,["transform"])})}};function tH(t,e,n,r,i,a){const o=n.axis,s=["top","right","bottom","left"].includes(i)?n[`axis${Ty(i)}`]:n.axisLinear,c=t.getOptions().name,l=n[`axis${qo(c)}`]||{};return Object.assign({},o,s,l)}function eH(t,e,n,r,i,a){const o=tH(t,e,n,r,i,a);return i==="center"?Object.assign(Object.assign(Object.assign(Object.assign({},o),{labelDirection:r==="right"?"negative":"positive"}),r==="center"?{labelTransform:"translate(50%,0)"}:null),{tickDirection:r==="right"?"negative":"positive",labelSpacing:r==="center"?0:4,titleSpacing:WY(a)?10:0,tick:r==="center"?!1:void 0}):o}const nH=t=>{const{direction:e="left",important:n={},labelFormatter:r,order:i,orientation:a,actualPosition:o,position:s,size:c,style:l={},title:u,tickCount:f,tickFilter:d,tickMethod:h,transform:p,indexBBox:v}=t,g=US(t,["direction","important","labelFormatter","order","orientation","actualPosition","position","size","style","title","tickCount","tickFilter","tickMethod","transform","indexBBox"]);return({scales:y,value:m,coordinate:b,theme:x})=>{const{bbox:_}=m,[O]=y,{domain:w,xScale:S}=O.getOptions(),M=eH(O,b,x,e,s,a),E=Object.assign(Object.assign(Object.assign({},M),l),g),P=UY(o||s,b,t.plane),L=QY(s,a,_,b,S),A=KY(b),T=ZS(O,w,f,r,d,h,s,b),C=v?T.map((j,D)=>{const G=v.get(D);return!G||G[0]!==j.label?j:Object.assign(Object.assign({},j),{bbox:G[1]})}):T,N=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},E),{type:"linear",data:C,crossSize:c,titleText:xp(u),labelOverlap:XY(p,E),grid:ZY(E.grid,b,O),gridLength:P,line:!0,indexBBox:v}),E.line?null:{lineOpacity:0}),L),A),n);return N.labelOverlap.find(j=>j.type==="hide")&&(N.crossSize=!1),new Qy({className:"axis",style:_p(N)})}},KS=t=>e=>{const{labelFormatter:n,labelFilter:r=()=>!0}=e;return i=>{var a;const{scales:[o]}=i,s=((a=o.getTicks)===null||a===void 0?void 0:a.call(o))||o.getOptions().domain,c=typeof n=="string"?Zo(n):n,l=(f,d,h)=>r(s[d],d,s),u=Object.assign(Object.assign({},e),{labelFormatter:c,labelFilter:l,scale:o});return t(u)(i)}},Jo=KS(nH),QS=KS(JY);Jo.props={defaultPosition:"center",defaultSize:45,defaultOrder:0,defaultCrossPadding:[12,12],defaultPadding:[12,12]},QS.props={defaultPosition:"outer",defaultOrientation:"vertical",defaultSize:45,defaultOrder:0,defaultCrossPadding:[12,12],defaultPadding:[12,12]};var rH=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function iH(t){const e=t%(Math.PI*2);return e===Math.PI/2?{titleTransform:"translate(0, 50%)"}:e>-Math.PI/2&&e<Math.PI/2?{titleTransform:"translate(50%, 0)"}:e>Math.PI/2&&e<Math.PI*3/2?{titleTransform:"translate(-50%, 0)"}:{}}function aH(t,e,n,r){const{radar:i}=t,[a]=r,o=a.getOptions().name,[s,c]=Ry(n),{axisRadar:l={}}=e;return Object.assign(Object.assign({},l),{grid:o==="position",gridConnect:"line",gridControlAngles:new Array(i.count).fill(0).map((u,f)=>(c-s)/i.count*f)})}const JS=t=>{const{important:e={}}=t,n=rH(t,["important"]);return r=>{const{theme:i,coordinate:a,scales:o}=r;return Jo(Object.assign(Object.assign(Object.assign({},n),iH(t.orientation)),{important:Object.assign(Object.assign({},aH(t,i,a,o)),e)}))(r)}};JS.props=Object.assign(Object.assign({},Jo.props),{defaultPosition:"center"});function Op(t,e){return+t.toPrecision(e)}function umt(t){return t.toLocaleString()}function fmt(t){return t.toExponential()}function dmt(t,e){return e===void 0&&(e=0),Math.abs(t)<1e3?String(t):"".concat(Op(t/1e3,e).toLocaleString(),"K")}var hmt=function(t,e,n){return t<0&&Number.isFinite(t)?e:n},pmt=function(t,e,n){return t>0&&Number.isFinite(t)?e:n},vmt=function(t,e){return t*e},gmt=function(t,e){return t/2+(e||0)/2};function wp(t){var e=t.canvas,n=t.touches,r=t.offsetX,i=t.offsetY;if(e){var a=e.x,o=e.y;return[a,o]}if(n){var s=n[0],c=s.clientX,l=s.clientY;return[c,l]}return r&&i?[r,i]:[0,0]}var oH={backgroundFill:"#262626",backgroundLineCap:"round",backgroundLineWidth:1,backgroundStroke:"#333",backgroundZIndex:-1,formatter:function(t){return t.toString()},labelFill:"#fff",labelFontSize:12,labelTextBaseline:"middle",padding:[2,4],position:"right",radius:0,zIndex:999},sm=Ji({background:"background",labelGroup:"label-group",label:"label"},"indicator"),sH=function(t){Yt(e,t);function e(n){var r=t.call(this,n,oH)||this;return r.point=[0,0],r.group=r.appendChild(new Er({})),r.isMutationObserved=!0,r}return e.prototype.renderBackground=function(){if(this.label){var n=this.attributes,r=n.position,i=n.padding,a=R(Wr(i),4),o=a[0],s=a[1],c=a[2],l=a[3],u=this.label.node().getLocalBounds(),f=u.min,d=u.max,h=new Ln(f[0]-l,f[1]-o,d[0]+s-f[0]+l,d[1]+c-f[1]+o),p=this.getPath(r,h),v=Pe(this.attributes,"background");this.background=ge(this.group).maybeAppendByClassName(sm.background,"path").styles(nt(nt({},v),{path:p})),this.group.appendChild(this.label.node())}},e.prototype.renderLabel=function(){var n=this.attributes,r=n.formatter,i=n.labelText,a=Pe(this.attributes,"label"),o=R(yo(a),2),s=o[0],c=o[1],l=s.text,u=rn(s,["text"]);if(this.label=ge(this.group).maybeAppendByClassName(sm.labelGroup,"g").styles(c),!!i){var f=this.label.maybeAppendByClassName(sm.label,function(){return ic(r(i))}).style("text",r(i).toString());f.selectAll("text").styles(u)}},e.prototype.adjustLayout=function(){var n=R(this.point,2),r=n[0],i=n[1];this.group.attr("x",-r).attr("y",-i)},e.prototype.getPath=function(n,r){var i=this.attributes.radius,a=r.x,o=r.y,s=r.width,c=r.height,l=[["M",a+i,o],["L",a+s-i,o],["A",i,i,0,0,1,a+s,o+i],["L",a+s,o+c-i],["A",i,i,0,0,1,a+s-i,o+c],["L",a+i,o+c],["A",i,i,0,0,1,a,o+c-i],["L",a,o+i],["A",i,i,0,0,1,a+i,o],["Z"]],u={top:4,right:6,bottom:0,left:2},f=u[n],d=this.createCorner([l[f].slice(-2),l[f+1].slice(-2)]);return l.splice.apply(l,yt([f+1,1],R(d),!1)),l[0][0]="M",l},e.prototype.createCorner=function(n,r){r===void 0&&(r=10);var i=.8,a=yW.apply(void 0,yt([],R(n),!1)),o=R(n,2),s=R(o[0],2),c=s[0],l=s[1],u=R(o[1],2),f=u[0],d=u[1],h=R(a?[f-c,[c,f]]:[d-l,[l,d]],2),p=h[0],v=R(h[1],2),g=v[0],y=v[1],m=p/2,b=p/Math.abs(p),x=r*b,_=x/2,O=x*Math.sqrt(3)/2*i,w=R([g,g+m-_,g+m,g+m+_,y],5),S=w[0],M=w[1],E=w[2],P=w[3],L=w[4];return a?(this.point=[E,l-O],[["L",S,l],["L",M,l],["L",E,l-O],["L",P,l],["L",L,l]]):(this.point=[c+O,E],[["L",c,S],["L",c,M],["L",c+O,E],["L",c,P],["L",c,L]])},e.prototype.applyVisibility=function(){var n=this.attributes.visibility;n==="hidden"?Qo(this):df(this)},e.prototype.bindEvents=function(){this.label.on(oe.BOUNDS_CHANGED,this.renderBackground)},e.prototype.render=function(){this.renderLabel(),this.renderBackground(),this.adjustLayout(),this.applyVisibility()},e}(Nr),tM={fill:"#fff",lineWidth:1,radius:2,size:10,stroke:"#bfbfbf",strokeOpacity:1,zIndex:0},eM={fill:"#000",fillOpacity:.45,fontSize:12,textAlign:"center",textBaseline:"middle",zIndex:1},nM={orientation:"horizontal",showLabel:!0,type:"start"},Da=Ji({foreground:"foreground",handle:"handle",selection:"selection",sparkline:"sparkline",sparklineGroup:"sparkline-group",track:"track",brushArea:"brush-area"},"slider"),ts=Ji({labelGroup:"label-group",label:"label",iconGroup:"icon-group",icon:"icon",iconRect:"icon-rect",iconLine:"icon-line"},"handle"),cH=function(t){Yt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.render=function(n,r){var i=n.size,a=i===void 0?10:i,o=n.radius,s=o===void 0?a/4:o,c=n.orientation,l=rn(n,["size","radius","orientation"]),u=a,f=u*2.4,d=ge(r).maybeAppendByClassName(ts.iconRect,"rect").styles(nt(nt({},l),{width:u,height:f,radius:s,x:-u/2,y:-f/2})),h=1/3*u,p=2/3*u,v=1/4*f,g=3/4*f;d.maybeAppendByClassName("".concat(ts.iconLine,"-1"),"line").styles(nt({x1:h,x2:h,y1:v,y2:g},l)),d.maybeAppendByClassName("".concat(ts.iconLine,"-2"),"line").styles(nt({x1:p,x2:p,y1:v,y2:g},l)),d.node().setOrigin(u/2,f/2),c==="vertical"?r.setLocalEulerAngles(90):r.setLocalEulerAngles(0)},e}(Nr),rM=function(t){Yt(e,t);function e(n){return t.call(this,n,nM)||this}return e.prototype.renderLabel=function(n){var r=this,i=this.attributes.showLabel,a=Pe(this.attributes,"label"),o=a.transform,s=rn(a,["transform"]),c=R(yo(s,[]),2),l=c[0],u=c[1],f=ge(n).maybeAppendByClassName(ts.labelGroup,"g").styles(u),d=nt(nt({},eM),l),h=d.text,p=rn(d,["text"]);Si(!!i,f,function(v){r.label=v.maybeAppendByClassName(ts.label,"text").styles(nt(nt({},p),{transform:o,text:"".concat(h)})),r.label.on("mousedown",function(g){g.stopPropagation()}),r.label.on("touchstart",function(g){g.stopPropagation()})})},e.prototype.renderIcon=function(n){var r=this.attributes,i=r.orientation,a=r.type,o=nt(nt({orientation:i},tM),Pe(this.attributes,"icon")),s=this.attributes.iconShape,c=s===void 0?function(){return new cH({style:o})}:s,l=ge(n).maybeAppendByClassName(ts.iconGroup,"g");l.selectAll(ts.icon.class).data([c]).join(function(u){return u.append(typeof c=="string"?c:function(){return c(a)}).attr("className",ts.icon.name)},function(u){return u.update(o)},function(u){return u.remove()})},e.prototype.render=function(n,r){this.renderIcon(r),this.renderLabel(r)},e}(Nr),iM=function(t,e,n){return[["M",t-n,e],["A",n,n,0,1,0,t+n,e],["A",n,n,0,1,0,t-n,e],["Z"]]},lH=iM,uH=function(t,e,n){return[["M",t-n,e-n],["L",t+n,e-n],["L",t+n,e+n],["L",t-n,e+n],["Z"]]},fH=function(t,e,n){return[["M",t-n,e],["L",t,e-n],["L",t+n,e],["L",t,e+n],["Z"]]},dH=function(t,e,n){var r=n*Math.sin(.3333333333333333*Math.PI);return[["M",t-n,e+r],["L",t,e-r],["L",t+n,e+r],["Z"]]},hH=function(t,e,n){var r=n*Math.sin(.3333333333333333*Math.PI);return[["M",t-n,e-r],["L",t+n,e-r],["L",t,e+r],["Z"]]},pH=function(t,e,n){var r=n/2*Math.sqrt(3);return[["M",t,e-n],["L",t+r,e-n/2],["L",t+r,e+n/2],["L",t,e+n],["L",t-r,e+n/2],["L",t-r,e-n/2],["Z"]]},vH=function(t,e,n){var r=n-1.5;return[["M",t-n,e-r],["L",t+n,e+r],["L",t+n,e-r],["L",t-n,e+r],["Z"]]},aM=function(t,e,n){return[["M",t,e+n],["L",t,e-n]]},gH=function(t,e,n){return[["M",t-n,e-n],["L",t+n,e+n],["M",t+n,e-n],["L",t-n,e+n]]},yH=function(t,e,n){return[["M",t-n/2,e-n],["L",t+n/2,e-n],["M",t,e-n],["L",t,e+n],["M",t-n/2,e+n],["L",t+n/2,e+n]]},mH=function(t,e,n){return[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]]},bH=function(t,e,n){return[["M",t-n,e],["L",t+n,e]]},oM=function(t,e,n){return[["M",t-n,e],["L",t+n,e]]},xH=oM,_H=function(t,e,n){return[["M",t-n,e],["A",n/2,n/2,0,1,1,t,e],["A",n/2,n/2,0,1,0,t+n,e]]},OH=function(t,e,n){return[["M",t-n-1,e-2.5],["L",t,e-2.5],["L",t,e+2.5],["L",t+n+1,e+2.5]]},wH=function(t,e,n){return[["M",t-n-1,e+2.5],["L",t,e+2.5],["L",t,e-2.5],["L",t+n+1,e-2.5]]},SH=function(t,e,n){return[["M",t-(n+1),e+2.5],["L",t-n/2,e+2.5],["L",t-n/2,e-2.5],["L",t+n/2,e-2.5],["L",t+n/2,e+2.5],["L",t+n+1,e+2.5]]};function MH(t,e){return[["M",t-5,e+2.5],["L",t-5,e],["L",t,e],["L",t,e-3],["L",t,e+3],["L",t+6.5,e+3]]}var EH=function(t,e,n){return[["M",t-n,e-n],["L",t+n,e],["L",t-n,e+n],["Z"]]};function PH(t){var e="default";if(Ys(t)&&t instanceof Image)e="image";else if(li(t))e="symbol";else if(Dn(t)){var n=new RegExp("data:(image|text)");t.match(n)?e="base64":/^(https?:\/\/(([a-zA-Z0-9]+-?)+[a-zA-Z0-9]+\.)+[a-zA-Z]+)(:\d+)?(\/.*)?(\?.*)?(#.*)?$/.test(t)?e="url":e="symbol"}return e}function AH(t){var e=PH(t);return["base64","url","image"].includes(e)?"image":t&&e==="symbol"?"path":null}var Je=function(t){Yt(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.render=function(n,r){var i=this.getSubShapeStyle(n),a=i.symbol,o=i.size,s=o===void 0?16:o,c=rn(i,["symbol","size"]),l=AH(a);Si(!!l,ge(r),function(u){u.maybeAppendByClassName("marker",l).attr("className","marker ".concat(l,"-marker")).call(function(f){if(l==="image"){var d=s*2;f.styles({img:a,width:d,height:d,x:-s,y:-s})}else{var d=s/2,h=li(a)?a:e.getSymbol(a);f.styles(nt({path:h==null?void 0:h(0,0,d)},c))}})})},e.MARKER_SYMBOL_MAP=new Map,e.registerSymbol=function(n,r){e.MARKER_SYMBOL_MAP.set(n,r)},e.getSymbol=function(n){return e.MARKER_SYMBOL_MAP.get(n)},e.getSymbols=function(){return Array.from(e.MARKER_SYMBOL_MAP.keys())},e}(Nr);Je.registerSymbol("cross",gH),Je.registerSymbol("hyphen",bH),Je.registerSymbol("line",aM),Je.registerSymbol("plus",mH),Je.registerSymbol("tick",yH),Je.registerSymbol("circle",iM),Je.registerSymbol("point",lH),Je.registerSymbol("bowtie",vH),Je.registerSymbol("hexagon",pH),Je.registerSymbol("square",uH),Je.registerSymbol("diamond",fH),Je.registerSymbol("triangle",dH),Je.registerSymbol("triangle-down",hH),Je.registerSymbol("line",aM),Je.registerSymbol("dot",oM),Je.registerSymbol("dash",xH),Je.registerSymbol("smooth",_H),Je.registerSymbol("hv",OH),Je.registerSymbol("vh",wH),Je.registerSymbol("hvh",SH),Je.registerSymbol("vhv",MH);function TH(t,e,n){var r=Math.round((t-n)/e);return n+r*e}function CH(t,e,n){var r=1.4,i=r*n;return[["M",t-n,e-i],["L",t+n,e-i],["L",t+n,e+i],["L",t-n,e+i],["Z"]]}var sM=1.4,cM=.4;function kH(t,e,n){var r=n,i=r*sM,a=r/2,o=r/6,s=t+i*cM;return[["M",t,e],["L",s,e+a],["L",t+i,e+a],["L",t+i,e-a],["L",s,e-a],["Z"],["M",s,e+o],["L",t+i-2,e+o],["M",s,e-o],["L",t+i-2,e-o]]}function LH(t,e,n){var r=n,i=r*sM,a=r/2,o=r/6,s=e+i*cM;return[["M",t,e],["L",t-a,s],["L",t-a,e+i],["L",t+a,e+i],["L",t+a,s],["Z"],["M",t-o,s],["L",t-o,e+i-2],["M",t+o,s],["L",t+o,e+i-2]]}Je.registerSymbol("hiddenHandle",CH),Je.registerSymbol("verticalHandle",kH),Je.registerSymbol("horizontalHandle",LH);var ymt=function(t,e,n){return t===void 0&&(t="horizontal"),t==="horizontal"?e:n};function NH(t,e,n,r){var i;r===void 0&&(r=4);var a=R(t,2),o=a[0],s=a[1],c=R(e,2),l=c[0],u=c[1],f=R(n,2),d=f[0],h=f[1],p=R([l,u],2),v=p[0],g=p[1],y=g-v;return v>g&&(i=R([g,v],2),v=i[0],g=i[1]),y>s-o?[o,s]:v<o?d===o&&h===g?[o,g]:[o,y+o]:g>s?h===s&&d===v?[v,s]:[s-y,s]:[v,g]}function Ba(t,e,n){return t===void 0&&(t="horizontal"),t==="horizontal"?e:n}var _f=Ji({markerGroup:"marker-group",marker:"marker",labelGroup:"label-group",label:"label"},"handle"),lM={showLabel:!0,formatter:function(t){return t.toString()},markerSize:25,markerStroke:"#c5c5c5",markerFill:"#fff",markerLineWidth:1,labelFontSize:12,labelFill:"#c5c5c5",labelText:"",orientation:"vertical",spacing:0},IH=function(t){Yt(e,t);function e(n){return t.call(this,n,lM)||this}return e.prototype.render=function(n,r){var i=ge(r).maybeAppendByClassName(_f.markerGroup,"g");this.renderMarker(i);var a=ge(r).maybeAppendByClassName(_f.labelGroup,"g");this.renderLabel(a)},e.prototype.renderMarker=function(n){var r=this,i=this.attributes,a=i.orientation,o=i.markerSymbol,s=o===void 0?Ba(a,"horizontalHandle","verticalHandle"):o;Si(!!s,n,function(c){var l=Pe(r.attributes,"marker"),u=nt({symbol:s},l);r.marker=c.maybeAppendByClassName(_f.marker,function(){return new Je({style:u})}).update(u)})},e.prototype.renderLabel=function(n){var r=this,i=this.attributes,a=i.showLabel,o=i.orientation,s=i.spacing,c=s===void 0?0:s,l=i.formatter;Si(a,n,function(u){var f,d=Pe(r.attributes,"label"),h=d.text,p=rn(d,["text"]),v=((f=u.select(_f.marker.class))===null||f===void 0?void 0:f.node().getBBox())||{},g=v.width,y=g===void 0?0:g,m=v.height,b=m===void 0?0:m,x=R(Ba(o,[0,b+c,"center","top"],[y+c,0,"start","middle"]),4),_=x[0],O=x[1],w=x[2],S=x[3];u.maybeAppendByClassName(_f.label,"text").styles(nt(nt({},p),{x:_,y:O,text:l(h).toString(),textAlign:w,textBaseline:S}))})},e}(Nr),uM={showTitle:!0,padding:0,orientation:"horizontal",backgroundFill:"transparent",titleText:"",titleSpacing:4,titlePosition:"top-left",titleFill:"#2C3542",titleFontWeight:"bold",titleFontFamily:"sans-serif",titleFontSize:12},jH=vo({},uM,{}),RH=vo({},uM,ja(lM,"handle"),{color:["#d0e3fa","#acc7f6","#8daaf2","#6d8eea","#4d73cd","#325bb1","#5a3e75","#8c3c79","#e23455","#e7655b"],indicatorBackgroundFill:"#262626",indicatorLabelFill:"white",indicatorLabelFontSize:12,indicatorVisibility:"hidden",labelAlign:"value",labelDirection:"positive",labelSpacing:5,showHandle:!0,showIndicator:!0,showLabel:!0,slidable:!0,titleText:"",type:"continuous"}),DH=.01,mmt=.5,Ir=Ji({title:"title",titleGroup:"title-group",items:"items",itemsGroup:"items-group",contentGroup:"content-group",ribbonGroup:"ribbon-group",ribbon:"ribbon",handlesGroup:"handles-group",handle:"handle",startHandle:"start-handle",endHandle:"end-handle",labelGroup:"label-group",label:"label",indicator:"indicator"},"legend");function BH(t,e){for(var n=1;n<t.length;n+=1){var r=t[n-1],i=t[n];if(e>=r&&e<=i)return[r,i]}return[e,e]}function FH(t,e,n){var r=Array.from(e),i=t.length;return new Array(i).fill(0).reduce(function(a,o,s){var c=r[s%r.length];return a+=" ".concat(t[s],":").concat(c).concat(s<i-1?" ".concat(t[s+1],":").concat(c):"")},"l(".concat(n==="horizontal"?"0":"270",")"))}function fM(t,e){var n=R(BH(t,e),2),r=n[0],i=n[1];return{tick:e>(r+i)/2?i:r,range:[r,i]}}var Of=Ji({trackGroup:"background-group",track:"background",selectionGroup:"ribbon-group",selection:"ribbon",clipPath:"clip-path"},"ribbon");function dM(t){var e=t.orientation,n=t.size,r=t.length;return Ba(e,[r,n],[n,r])}function hM(t){var e=t.type,n=R(dM(t),2),r=n[0],i=n[1];return e==="size"?[["M",0,i],["L",0+r,0],["L",0+r,i],["Z"]]:[["M",0,i],["L",0,0],["L",0+r,0],["L",0+r,i],["Z"]]}function zH(t){return hM(t)}function GH(t){var e=t.orientation,n=t.color,r=t.block,i=t.partition,a;if(li(n)){var o=20;a=new Array(o).fill(0).map(function(l,u,f){return n(u/(f.length-1))})}else a=n;var s=a.length,c=a.map(function(l){return co(l).toString()});return s?s===1?c[0]:r?FH(i,c,e):c.reduce(function(l,u,f){return l+=" ".concat(f/(s-1),":").concat(u)},"l(".concat(Ba(e,"0","270"),")")):""}function WH(t){var e=t.orientation,n=t.range;if(!n)return[];var r=R(dM(t),2),i=r[0],a=r[1],o=R(n,2),s=o[0],c=o[1],l=Ba(e,s*i,0),u=Ba(e,0,s*a),f=Ba(e,c*i,i),d=Ba(e,a,c*a);return[["M",l,u],["L",l,d],["L",f,d],["L",f,u],["Z"]]}function YH(t,e){var n=Pe(e,"track");t.maybeAppendByClassName(Of.track,"path").styles(nt({path:hM(e)},n))}function HH(t,e){var n=Pe(e,"selection"),r=GH(e),i=t.maybeAppendByClassName(Of.selection,"path").styles(nt({path:zH(e),fill:r},n)),a=i.maybeAppendByClassName(Of.clipPath,"path").styles({path:WH(e)}).node();i.style("clip-path",a)}var $H=function(t){Yt(e,t);function e(n){return t.call(this,n,{type:"color",orientation:"horizontal",size:30,range:[0,1],length:200,block:!1,partition:[],color:["#fff","#000"],trackFill:"#e5e5e5"})||this}return e.prototype.render=function(n,r){var i=ge(r).maybeAppendByClassName(Of.trackGroup,"g");YH(i,n);var a=ge(r).maybeAppendByClassName(Of.selectionGroup,"g");HH(a,n)},e}(Nr);function VH(t){return{min:Math.min.apply(Math,yt([],R(t.map(function(e){return e.value})),!1)),max:Math.max.apply(Math,yt([],R(t.map(function(e){return e.value})),!1))}}var UH=function(t){Yt(e,t);function e(n){var r=t.call(this,n,RH)||this;return r.eventToOffsetScale=new Kr({}),r.innerRibbonScale=new Kr({}),r.cacheLabelBBox=null,r.cacheHandleBBox=null,r.onHovering=function(i){var a=r.attributes,o=a.data,s=a.block;i.stopPropagation();var c=r.getValueByCanvasPoint(i);if(s){var l=fM(o.map(function(f){var d=f.value;return d}),c).range;r.showIndicator((l[0]+l[1])/2,"".concat(l[0],"-").concat(l[1])),r.dispatchIndicated(c,l)}else{var u=r.getTickValue(c);r.showIndicator(u),r.dispatchIndicated(u)}},r.onDragStart=function(i){return function(a){a.stopPropagation(),r.attributes.slidable&&(r.target=i,r.prevValue=r.getTickValue(r.getValueByCanvasPoint(a)),document.addEventListener("mousemove",r.onDragging),document.addEventListener("touchmove",r.onDragging),document.addEventListener("mouseleave",r.onDragEnd),document.addEventListener("mouseup",r.onDragEnd),document.addEventListener("mouseup",r.onDragEnd),document.addEventListener("touchend",r.onDragEnd))}},r.onDragging=function(i){var a=r.target;r.updateMouse();var o=R(r.selection,2),s=o[0],c=o[1],l=r.getTickValue(r.getValueByCanvasPoint(i)),u=l-r.prevValue;a==="start"?s!==l&&r.updateSelection(l,c):a==="end"?c!==l&&r.updateSelection(s,l):a==="ribbon"&&u!==0&&(r.prevValue=l,r.updateSelection(u,u,!0))},r.onDragEnd=function(){r.style.cursor="pointer",document.removeEventListener("mousemove",r.onDragging),document.removeEventListener("touchmove",r.onDragging),document.removeEventListener("mouseup",r.onDragEnd),document.removeEventListener("touchend",r.onDragEnd)},r}return Object.defineProperty(e.prototype,"handleOffsetRatio",{get:function(){return this.ifHorizontal(.5,.5)},enumerable:!1,configurable:!0}),e.prototype.getBBox=function(){var n=this.attributes,r=n.width,i=n.height;return new Ln(0,0,r,i)},e.prototype.render=function(n,r){var i=this,a=n.showLabel;this.renderTitle(ge(r));var o=this.availableSpace,s=o.x,c=o.y,l=ge(r).maybeAppendByClassName(Ir.contentGroup,"g").styles({x:s,y:c}),u=l.maybeAppendByClassName(Ir.labelGroup,"g").styles({zIndex:1});Si(!!a,u,function(d){i.renderLabel(d)});var f=l.maybeAppendByClassName(Ir.ribbonGroup,"g").styles({zIndex:0});this.handlesGroup=l.maybeAppendByClassName(Ir.handlesGroup,"g").styles({zIndex:2}),this.renderHandles(),this.renderRibbon(f),this.renderIndicator(l),this.adjustLabel(),this.adjustHandles()},Object.defineProperty(e.prototype,"range",{get:function(){var n=this.attributes,r=n.data,i=n.domain;return i?{min:i[0],max:i[1]}:VH(r)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ribbonScale",{get:function(){var n=this.range,r=n.min,i=n.max;return this.innerRibbonScale.update({domain:[r,i],range:[0,1]}),this.innerRibbonScale},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ribbonRange",{get:function(){var n=R(this.selection,2),r=n[0],i=n[1],a=this.ribbonScale;return[a.map(r),a.map(i)]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"selection",{get:function(){var n=this.range,r=n.min,i=n.max,a=this.attributes.defaultValue,o=a===void 0?[r,i]:a,s=R(o,2),c=s[0],l=s[1];return[c,l]},enumerable:!1,configurable:!0}),e.prototype.ifHorizontal=function(n,r){return Ba(this.attributes.orientation,typeof n=="function"?n():n,typeof r=="function"?r():r)},e.prototype.renderTitle=function(n){var r=this.attributes,i=r.showTitle,a=r.titleText,o=r.width,s=r.height,c=Pe(this.attributes,"title"),l=nt(nt({},c),{width:o,height:s,text:a}),u=this;n.selectAll(Ir.title.class).data(i?[a]:[]).join(function(f){return f.append(function(){return new OS({style:l})}).attr("className",Ir.title.name).each(function(){u.title=this})},function(f){return f.update(l)},function(f){return f.each(function(){u.title=void 0}).remove()})},Object.defineProperty(e.prototype,"availableSpace",{get:function(){if(this.title)return this.title.getAvailableSpace();var n=this.attributes,r=n.width,i=n.height;return new Ln(0,0,r,i)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"labelFixedSpacing",{get:function(){var n=this.attributes.showTick;return n?5:0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"labelPosition",{get:function(){var n=this.attributes,r=n.orientation,i=n.labelDirection,a={vertical:{positive:"right",negative:"left"},horizontal:{positive:"bottom",negative:"top"}};return a[r][i]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"labelBBox",{get:function(){var n,r=this.attributes.showLabel;if(!r)return new Ln(0,0,0,0);if(this.cacheLabelBBox)return this.cacheLabelBBox;var i=((n=this.label.querySelector(un.labelGroup.class))===null||n===void 0?void 0:n.children.slice(-1)[0]).getBBox(),a=i.width,o=i.height;return this.cacheLabelBBox=new Ln(0,0,a,o),this.cacheLabelBBox},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"labelShape",{get:function(){var n=this.attributes,r=n.showLabel,i=n.labelSpacing,a=i===void 0?0:i;if(!r)return{width:0,height:0,size:0,length:0};var o=this.labelBBox,s=o.width,c=o.height,l=this.ifHorizontal(c,s)+a+this.labelFixedSpacing,u=this.ifHorizontal(s,c);return{width:s,height:c,size:l,length:u}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ribbonBBox",{get:function(){var n=this.attributes,r=n.showHandle,i=n.ribbonSize,a=this.availableSpace,o=a.width,s=a.height,c=this.labelShape,l=c.size,u=c.length,f=R(this.ifHorizontal([s,o],[o,s]),2),d=f[0],h=f[1],p=r?this.handleShape:{size:0,length:0},v=p.size,g=p.length,y=this.handleOffsetRatio,m=0,b=this.labelPosition;i?m=i:["bottom","right"].includes(b)?m=Math.min(d-l,(d-v)/y):d*(1-y)>v?m=Math.max(d-l,0):m=Math.max((d-l-v)/y,0);var x=Math.max(g,u),_=h-x,O=R(this.ifHorizontal([_,m],[m,_]),2),w=O[0],S=O[1],M=["top","left"].includes(b)?l:0,E=R(this.ifHorizontal([x/2,M],[M,x/2]),2),P=E[0],L=E[1];return new Ln(P,L,w,S)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ribbonShape",{get:function(){var n=this.ribbonBBox,r=n.width,i=n.height;return this.ifHorizontal({size:i,length:r},{size:r,length:i})},enumerable:!1,configurable:!0}),e.prototype.renderRibbon=function(n){var r=this.attributes,i=r.data,a=r.type,o=r.orientation,s=r.color,c=r.block,l=Pe(this.attributes,"ribbon"),u=this.range,f=u.min,d=u.max,h=this.ribbonBBox,p=h.x,v=h.y,g=this.ribbonShape,y=g.length,m=g.size,b=vo({x:p,y:v,length:y,size:m,type:a,orientation:o,color:s,block:c,partition:i.map(function(x){return(x.value-f)/(d-f)}),range:this.ribbonRange},l);this.ribbon=n.maybeAppendByClassName(Ir.ribbon,function(){return new $H({style:b})}).update(b)},e.prototype.getHandleClassName=function(n){return"".concat(Ir.prefix("".concat(n,"-handle")))},e.prototype.renderHandles=function(){var n=this.attributes,r=n.showHandle,i=n.orientation,a=Pe(this.attributes,"handle"),o=R(this.selection,2),s=o[0],c=o[1],l=nt(nt({},a),{orientation:i}),u=a.shape,f=u===void 0?"slider":u,d=f==="basic"?IH:rM,h=this;this.handlesGroup.selectAll(Ir.handle.class).data(r?[{value:s,type:"start"},{value:c,type:"end"}]:[],function(p){return p.type}).join(function(p){return p.append(function(){return new d({style:l})}).attr("className",function(v){var g=v.type;return"".concat(Ir.handle," ").concat(h.getHandleClassName(g))}).each(function(v){var g=v.type,y=v.value;this.update({labelText:y});var m="".concat(g,"Handle");h[m]=this,this.addEventListener("pointerdown",h.onDragStart(g))})},function(p){return p.update(l).each(function(v){var g=v.value;this.update({labelText:g})})},function(p){return p.each(function(v){var g=v.type,y="".concat(g,"Handle");h[y]=void 0}).remove()})},e.prototype.adjustHandles=function(){var n=R(this.selection,2),r=n[0],i=n[1];this.setHandlePosition("start",r),this.setHandlePosition("end",i)},e.prototype.adjustTitle=function(){var n=this.attributes,r=n.titlePosition,i=n.orientation,a=R(this.getElementsByClassName(Ir.title.name),1),o=a[0],s=this.handlesGroup.select(".".concat(this.getHandleClassName("start"))).node();if(!(!o||!s)&&!(r!=="top-left"||i!=="horizontal")){var c=R(s.getLocalBounds().min,1),l=c[0],u=R(o.getLocalBounds().min,1),f=u[0],d=l-f;o.style.x=+(this.style.x||0)+d}},Object.defineProperty(e.prototype,"handleBBox",{get:function(){if(this.cacheHandleBBox)return this.cacheHandleBBox;if(!this.attributes.showHandle)return new Ln(0,0,0,0);var n=this.startHandle.getBBox(),r=n.width,i=n.height,a=this.endHandle.getBBox(),o=a.width,s=a.height,c=R([Math.max(r,o),Math.max(i,s)],2),l=c[0],u=c[1];return this.cacheHandleBBox=new Ln(0,0,l,u),this.cacheHandleBBox},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"handleShape",{get:function(){var n=this.handleBBox,r=n.width,i=n.height,a=R(this.ifHorizontal([i,r],[r,i]),2),o=a[0],s=a[1];return{width:r,height:i,size:o,length:s}},enumerable:!1,configurable:!0}),e.prototype.setHandlePosition=function(n,r){var i=this.attributes.handleFormatter,a=this.ribbonBBox,o=a.x,s=a.y,c=this.ribbonShape.size,l=this.getOffset(r),u=R(this.ifHorizontal([o+l,s+c*this.handleOffsetRatio],[o+c*this.handleOffsetRatio,s+l]),2),f=u[0],d=u[1],h=this.handlesGroup.select(".".concat(this.getHandleClassName(n))).node();h==null||h.update({x:f,y:d,formatter:i})},e.prototype.renderIndicator=function(n){var r=Pe(this.attributes,"indicator");this.indicator=n.maybeAppendByClassName(Ir.indicator,function(){return new sH({})}).update(r)},Object.defineProperty(e.prototype,"labelData",{get:function(){var n=this,r=this.attributes.data;return r.reduce(function(i,a,o,s){var c,l,u=(c=a==null?void 0:a.id)!==null&&c!==void 0?c:o.toString();if(i.push(nt(nt({},a),{id:u,index:o,type:"value",label:(l=a==null?void 0:a.label)!==null&&l!==void 0?l:a.value.toString(),value:n.ribbonScale.map(a.value)})),o<s.length-1){var f=s[o+1],d=R([a.value,f.value],2),h=d[0],p=d[1],v=(h+p)/2;i.push(nt(nt({},a),{id:u,index:o,type:"range",range:[h,p],label:[h,p].join("~"),value:n.ribbonScale.map(v)}))}return i},[])},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"labelStyle",{get:function(){var n=R(["center","middle"],2),r=n[0],i=n[1],a=this.labelPosition;return a==="top"?i="bottom":a==="bottom"?i="top":a==="left"?r="end":a==="right"&&(r="start"),{labelTextAlign:r,labelTextBaseline:i}},enumerable:!1,configurable:!0}),e.prototype.renderLabel=function(n){var r=this.attributes,i=r.showTick,a=i===void 0?!1:i,o=r.labelFilter,s=r.labelFormatter,c=Pe(this.attributes,"tick"),l=Pe(this.attributes,"label"),u=l.align,f=vo(nt({showLine:!1,showGrid:!1,showTick:a,type:"linear",startPos:[0,0],endPos:[0,0],tickDirection:"negative",labelTransform:"rotate(0)"},this.labelStyle),ja(c,"tick"),ja(l,"label"),{data:this.labelData}),d={tickFilter:function(p,v,g){return(p==null?void 0:p.type)!=="value"?!1:o?o(p,p.index,g.filter(function(y){return y.type!=="value"})):!0},labelFilter:function(p,v,g){return(p==null?void 0:p.type)!==u?!1:o?o(p,p.index,g.filter(function(y){return y.type===u})):!0},labelFormatter:s},h=nt(nt(nt({},f),d),{labelOverlap:[{type:"hide"}]});this.label=n.maybeAppendByClassName(Ir.label,function(){return new Qy({style:h})}).node(),this.label.update(h,!1)},Object.defineProperty(e.prototype,"labelAxisStyle",{get:function(){var n=this.attributes,r=n.showTick,i=n.labelDirection,a=n.labelSpacing,o=n.tickLength,s=this.ribbonShape.size,c=this.labelPosition,l=this.labelFixedSpacing,u=R([0,0,0],3),f=u[0],d=u[1],h=u[2],p=o!=null?o:s;return r?(h=p,d=l,i==="positive"?c==="right"?(f=p,h=p):c==="bottom"&&(f=h):i==="negative"&&(c==="top"||c==="left")&&(f=s)):i==="positive"?c==="right"?d=p:c==="bottom"&&(f=s+l,d=a):i==="negative"&&(c==="left"||c==="top")&&(d=a),{offset:f,spacing:a,tickLength:h}},enumerable:!1,configurable:!0}),e.prototype.adjustLabel=function(){var n=this.attributes.showLabel;if(n){var r=this.ribbonBBox,i=r.x,a=r.y,o=r.width,s=r.height,c=this.labelAxisStyle,l=c.offset,u=c.spacing,f=c.tickLength,d=R(this.ifHorizontal([[i,a+l],[i+o,a+l]],[[i+l,a+s],[i+l,a]]),2),h=d[0],p=d[1];this.label.update({startPos:h,endPos:p,tickLength:f,labelSpacing:u},!1)}},e.prototype.bindEvents=function(){this.style.cursor="pointer",this.ribbon.on("pointerdown",this.onDragStart("ribbon")),this.ribbon.on("pointermove",this.onHovering),this.addEventListener("pointerout",this.hideIndicator)},e.prototype.showIndicator=function(n,r){r===void 0&&(r="".concat(n));var i=this.attributes.showIndicator;if(!i||typeof n!="number"){this.hideIndicator();return}var a=this.range,o=a.min,s=a.max,c=this.ribbonBBox,l=c.x,u=c.y,f=Vn(n,o,s),d=this.getOffset(f),h=this.ifHorizontal([d+l,u],[l,d+u]);this.indicator.update({x:h[0],y:h[1],position:this.ifHorizontal("top","left"),labelText:r}),df(this.indicator.node())},e.prototype.hideIndicator=function(){Qo(this.indicator.node())},e.prototype.updateMouse=function(){this.attributes.slidable&&(this.style.cursor="grabbing")},e.prototype.setSelection=function(n,r){this.updateSelection(n,r)},e.prototype.updateSelection=function(n,r,i){var a;i===void 0&&(i=!1);var o=R(this.selection,2),s=o[0],c=o[1],l=R([n,r],2),u=l[0],f=l[1];i&&(u+=s,f+=c);var d=this.range,h=d.min,p=d.max;a=R(NH([h,p],[u,f],this.selection),2),u=a[0],f=a[1],this.update({defaultValue:[u,f]}),this.dispatchSelection()},Object.defineProperty(e.prototype,"step",{get:function(){var n=this.attributes.step,r=n===void 0?1:n,i=this.range,a=i.min,o=i.max;return Cn(r)?Op((o-a)*DH,0):r},enumerable:!1,configurable:!0}),e.prototype.getTickValue=function(n){var r=this.attributes,i=r.data,a=r.block,o=this.range.min;return a?fM(i.map(function(s){var c=s.value;return c}),n).tick:TH(n,this.step,o)},e.prototype.getValueByCanvasPoint=function(n,r){r===void 0&&(r=!1);var i=this.range,a=i.min,o=i.max,s=R(this.ribbon.node().getPosition(),2),c=s[0],l=s[1],u=this.ifHorizontal(c,l),f=this.ifHorizontal.apply(this,yt([],R(wp(n)),!1)),d=f-u,h=Vn(this.getOffset(d,!0),a,o);return h},e.prototype.getOffset=function(n,r){r===void 0&&(r=!1);var i=this.range,a=i.min,o=i.max,s=this.ribbonShape.length,c=this.eventToOffsetScale;return c.update({domain:[a,o],range:[0,s]}),r?c.invert(n):c.map(n)},e.prototype.dispatchSelection=function(){var n=new vn("valuechange",{detail:{value:this.selection}});this.dispatchEvent(n)},e.prototype.dispatchIndicated=function(n,r){var i=new vn("indicate",{detail:{value:n,range:r}});this.dispatchEvent(i)},e}(Nr);class wf extends bf{getDefaultOptions(){return{range:[0],domain:[0,1],unknown:void 0,tickCount:5,tickMethod:oc}}map(e){const[n]=this.options.range;return n!==void 0?n:this.options.unknown}invert(e){const[n]=this.options.range;return e===n&&n!==void 0?this.options.domain:[]}getTicks(){const{tickMethod:e,domain:n,tickCount:r}=this.options,[i,a]=n;return!Ol(i)||!Ol(a)?[]:e(i,a,r)}clone(){return new wf(this.options)}}class Ml extends bf{getDefaultOptions(){return{domain:[.5],range:[0,1]}}constructor(e){super(e)}map(e){if(!yp(e))return this.options.unknown;const n=tm(this.thresholds,e,0,this.n);return this.options.range[n]}invert(e){const{range:n}=this.options,r=n.indexOf(e),i=this.thresholds;return[i[r-1],i[r]]}clone(){return new Ml(this.options)}rescale(){const{domain:e,range:n}=this.options;this.n=Math.min(e.length,n.length-1),this.thresholds=e}}function Sf(t){return Math.abs(t)<1e-14?t:parseFloat(t.toFixed(14))}const XH=[1,5,2,2.5,4,3],bmt=null,pM=Number.EPSILON*100;function qH(t,e){return(t%e+e)%e}function ZH(t){return Math.round(t*1e12)/1e12}function KH(t,e,n,r,i,a){const o=RS(e),s=IS(e,t);let c=0;const l=qH(r,a);return(l<pM||a-l<pM)&&r<=0&&i>=0&&(c=1),1-s/(o-1)-n+c}function QH(t,e,n){const r=RS(e),i=IS(e,t),a=1;return 1-i/(r-1)-n+a}function JH(t,e,n,r,i,a){const o=(t-1)/(a-i),s=(e-1)/(Math.max(a,r)-Math.min(n,i));return 2-Math.max(o/s,s/o)}function t$(t,e){return t>=e?2-(t-1)/(e-1):1}function e$(t,e,n,r){const i=e-t;return 1-.5*(hr(e-r,2)+hr(t-n,2))/hr(.1*i,2)}function n$(t,e,n){const r=e-t;if(n>r){const i=(n-r)/2;return 1-hr(i,2)/hr(.1*r,2)}return 1}function r$(){return 1}const cm=(t,e,n=5,r=!0,i=XH,a=[.25,.2,.5,.05])=>{const o=n<0?0:Math.round(n);if(Number.isNaN(t)||Number.isNaN(e)||typeof t!="number"||typeof e!="number"||!o)return[];if(e-t<1e-15||o===1)return[t];const s={score:-2,lmin:0,lmax:0,lstep:0};let c=1;for(;c<1/0;){for(let p=0;p<i.length;p+=1){const v=i[p],g=QH(v,i,c);if(a[0]*g+a[1]+a[2]+a[3]<s.score){c=1/0;break}let y=2;for(;y<1/0;){const m=t$(y,o);if(a[0]*g+a[1]+a[2]*m+a[3]<s.score)break;const b=(e-t)/(y+1)/c/v;let x=Math.ceil(Math.log10(b));for(;x<1/0;){const _=c*v*hr(10,x),O=n$(t,e,_*(y-1));if(a[0]*g+a[1]*O+a[2]*m+a[3]<s.score)break;const w=Math.floor(e/_)*c-(y-1)*c,S=Math.ceil(t/_)*c;if(w<=S){const M=S-w;for(let E=0;E<=M;E+=1){const L=(w+E)*(_/c),A=L+_*(y-1),T=_,C=KH(v,i,c,L,A,T),N=e$(t,e,L,A),B=JH(y,o,t,e,L,A),j=r$(),D=a[0]*C+a[1]*N+a[2]*B+a[3]*j;D>s.score&&(!r||L<=t&&A>=e)&&(s.lmin=L,s.lmax=A,s.lstep=T,s.score=D)}}x+=1}y+=1}}c+=1}const l=Sf(s.lmax),u=Sf(s.lmin),f=Sf(s.lstep),d=Math.floor(ZH((l-u)/f))+1,h=new Array(d);h[0]=Sf(u);for(let p=1;p<d;p+=1)h[p]=Sf(h[p-1]+f);return h};class Sp extends Ml{getDefaultOptions(){return{domain:[0,1],range:[.5],nice:!1,tickCount:5,tickMethod:cm}}constructor(e){super(e)}nice(){const{nice:e}=this.options;if(e){const[n,r,i]=this.getTickMethodOptions();this.options.domain=FS(n,r,i)}}getTicks(){const{tickMethod:e}=this.options,[n,r,i]=this.getTickMethodOptions();return e(n,r,i)}getTickMethodOptions(){const{domain:e,tickCount:n}=this.options,r=e[0],i=e[e.length-1];return[r,i,n]}rescale(){this.nice();const{range:e,domain:n}=this.options,[r,i]=n;this.n=e.length-1,this.thresholds=new Array(this.n);for(let a=0;a<this.n;a+=1)this.thresholds[a]=((a+1)*i-(a-this.n)*r)/(this.n+1)}invert(e){const[n,r]=super.invert(e),[i,a]=this.options.domain;return n===void 0&&r===void 0?[n,r]:[n||i,r||a]}getThresholds(){return this.thresholds}clone(){return new Sp(this.options)}}function i$(t,e){const n=t.length;if(!n)return;if(n<2)return t[n-1];const r=(n-1)*e,i=Math.floor(r),a=t[i],o=t[i+1];return a+(o-a)*(r-i)}function a$(t,e,n=!1){const r=t;n||r.sort((a,o)=>a-o);const i=[];for(let a=1;a<e;a+=1)i.push(i$(r,a/e));return i}class Mp extends Ml{getDefaultOptions(){return{domain:[],range:[],tickCount:5,unknown:void 0,tickMethod:cm}}constructor(e){super(e)}rescale(){const{domain:e,range:n}=this.options;this.n=n.length-1,this.thresholds=a$(e,this.n+1,!1)}invert(e){const[n,r]=super.invert(e),{domain:i}=this.options,a=i[0],o=i[i.length-1];return n===void 0&&r===void 0?[n,r]:[n||a,r||o]}getThresholds(){return this.thresholds}clone(){return new Mp(this.options)}getTicks(){const{tickCount:e,domain:n,tickMethod:r}=this.options,i=n.length-1,a=n[0],o=n[i];return r(a,o,e)}}var o$=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function s$(t,e,n){return t.size=e,GY(n)?t.height=e:t.width=e,t}function c$(t,e,n){const{size:r}=e,i=VS(t,e,n);return s$(i,r,i.orientation)}function l$(t){return e=>({value:e/t,label:String(e)})}function u$(t,e,n,r,i){const a=e.thresholds,o=l$(r);return Object.assign(Object.assign({},t),{color:i,data:[n,...a,r].map(o)})}function f$(t,e,n){const i=[-1/0,...e.thresholds,1/0].map((a,o)=>({value:o,label:a}));return Object.assign(Object.assign({},t),{data:i,color:n,labelFilter:(a,o)=>o>0&&o<i.length-1})}function lm(t){const{domain:e}=t.getOptions(),[n,r]=[e[0],Cw(e)];return[n,r]}function d$(t,e){const n=t.getOptions(),r=t.clone();return r.update(Object.assign(Object.assign({},n),{range:[co(e).toString()]})),r}function h$(t,e,n,r,i,a){const{length:o}=t,s=n||r,c=i.color?a.legendContinuous.ribbonFill||"black":a.color,l=e||d$(s,c),[u,f]=lm(l),[d,h]=lm([e,n,r].filter(p=>p!==void 0).find(p=>!(p instanceof wf)));return Object.assign(Object.assign({},t),{domain:[d,h],data:l.getTicks().map(p=>({value:p})),color:new Array(Math.floor(o)).fill(0).map((p,v)=>{const g=(f-u)/(o-1)*v+u,y=l.map(g)||c,m=r?r.map(g):1;return y.replace(/rgb[a]*\(([\d]{1,3}) *, *([\d]{1,3}) *, *([\d]{1,3})[\S\s]*\)/,(b,x,_,O)=>`rgba(${x}, ${_}, ${O}, ${m})`)})})}function p$(t,e,n,r,i,a){const o=Ra(t,"color"),s=c$(n,r,i);if(o instanceof Ml){const{range:u}=o.getOptions(),[f,d]=lm(o);return o instanceof Sp||o instanceof Mp?u$(s,o,f,d,u):f$(s,o,u)}const c=Ra(t,"size"),l=Ra(t,"opacity");return h$(s,o,c,l,e,a)}const es=t=>{const{labelFormatter:e,layout:n,order:r,orientation:i,position:a,size:o,title:s,style:c,crossPadding:l,padding:u}=t,f=o$(t,["labelFormatter","layout","order","orientation","position","size","title","style","crossPadding","padding"]);return({scales:d,value:h,theme:p,scale:v})=>{const{bbox:g}=h,{x:y,y:m,width:b,height:x}=g,_=HS(a,n),{legendContinuous:O={}}=p,w=_p(Object.assign({},O,Object.assign(Object.assign({titleText:xp(s),labelAlign:"value",labelFormatter:typeof e=="string"?M=>Zo(e)(M.label):e},p$(d,v,h,t,es,p)),c),f)),S=new $S({style:Object.assign(Object.assign({x:y,y:m,width:b,height:x},_),{subOptions:w})});return S.appendChild(new UH({className:"legend-continuous",style:w})),S}};es.props={defaultPosition:"top",defaultOrientation:"vertical",defaultOrder:1,defaultSize:60,defaultLength:200,defaultLegendSize:60,defaultPadding:[20,10],defaultCrossPadding:[12,12]};const vM=t=>(...e)=>es(Object.assign({},{block:!0},t))(...e);vM.props=Object.assign(Object.assign({},es.props),{defaultPosition:"top",defaultOrientation:"horizontal"});const um=t=>e=>{const{scales:n}=e,r=Ra(n,"size");return es(Object.assign({},{type:"size",data:r.getTicks().map((i,a)=>({value:i,label:String(i)}))},t))(e)};um.props=Object.assign(Object.assign({},es.props),{defaultPosition:"top",defaultOrientation:"horizontal"});const gM=t=>um(Object.assign({},{block:!0},t));gM.props=Object.assign(Object.assign({},es.props),{defaultPosition:"top",defaultOrientation:"horizontal"});var v$=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const yM=({static:t=!1}={})=>e=>{const{width:n,height:r,depth:i,paddingLeft:a,paddingRight:o,paddingTop:s,paddingBottom:c,padding:l,inset:u,insetLeft:f,insetTop:d,insetRight:h,insetBottom:p,margin:v,marginLeft:g,marginBottom:y,marginTop:m,marginRight:b,data:x,coordinate:_,theme:O,component:w,interaction:S,x:M,y:E,z:P,key:L,frame:A,labelTransform:T,parentKey:C,clip:N,viewStyle:B,title:j}=e,D=v$(e,["width","height","depth","paddingLeft","paddingRight","paddingTop","paddingBottom","padding","inset","insetLeft","insetTop","insetRight","insetBottom","margin","marginLeft","marginBottom","marginTop","marginRight","data","coordinate","theme","component","interaction","x","y","z","key","frame","labelTransform","parentKey","clip","viewStyle","title"]);return[Object.assign(Object.assign({type:"standardView",x:M,y:E,z:P,key:L,width:n,height:r,depth:i,padding:l,paddingLeft:a,paddingRight:o,paddingTop:s,inset:u,insetLeft:f,insetTop:d,insetRight:h,insetBottom:p,paddingBottom:c,theme:O,coordinate:_,component:w,interaction:S,frame:A,labelTransform:T,margin:v,marginLeft:g,marginBottom:y,marginTop:m,marginRight:b,parentKey:C,clip:N,style:B},!t&&{title:j}),{marks:[Object.assign(Object.assign(Object.assign({},D),{key:`${L}-0`,data:x}),t&&{title:j})]})]};yM.props={};var g$=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function El(t){return(e,...n)=>dt({},t(e,...n),e)}function Pl(t){return(e,...n)=>dt({},e,t(e,...n))}function fm(t,e){if(!t)return e;if(Array.isArray(t))return t;const{value:n=e}=t,r=g$(t,["value"]);return Object.assign(Object.assign({},r),{value:n})}var dm=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const mM=()=>t=>{const{children:e}=t,n=dm(t,["children"]);if(!Array.isArray(e))return[];const{data:r,scale:i={},axis:a={},legend:o={},encode:s={},transform:c=[]}=n,l=dm(n,["data","scale","axis","legend","encode","transform"]),u=e.map(f=>{var{data:d,scale:h={},axis:p={},legend:v={},encode:g={},transform:y=[]}=f,m=dm(f,["data","scale","axis","legend","encode","transform"]);return Object.assign({data:fm(d,r),scale:dt({},i,h),encode:dt({},s,g),transform:[...c,...y],axis:p&&a?dt({},a,p):!1,legend:v&&o?dt({},o,v):!1},m)});return[Object.assign(Object.assign({},l),{marks:u,type:"standardView"})]};mM.props={};function Xn([t,e],[n,r]){return[t-n,e-r]}function Ep([t,e],[n,r]){return[t+n,e+r]}function Fn([t,e],[n,r]){return Math.sqrt(Math.pow(t-n,2)+Math.pow(e-r,2))}function ea([t,e]){return Math.atan2(e,t)}function Al([t,e]){return ea([t,e])+Math.PI/2}function bM(t,e){const n=ea(t),r=ea(e);return n<r?r-n:Math.PI*2-(n-r)}function hm(t){let e=1/0,n=-1/0,r=1/0,i=-1/0;for(const[s,c]of t)e=Math.min(s,e),n=Math.max(s,n),r=Math.min(c,r),i=Math.max(c,i);const a=n-e,o=i-r;return[e,r,a,o]}function xM([t,e],[n,r]){return[(t+n)/2,(e+r)/2]}function Vt(t,e){for(const[n,r]of Object.entries(e))t.style(n,r)}function y$(t,e){return e.forEach((n,r)=>r===0?t.moveTo(n[0],n[1]):t.lineTo(n[0],n[1])),t.closePath(),t}function m$(t,e,n){const{arrowSize:r}=n,i=typeof r=="string"?+parseFloat(r)/100*Fn(t,e):r,a=Math.PI/6,o=Math.atan2(e[1]-t[1],e[0]-t[0]),s=Math.PI/2-o-a,c=[e[0]-i*Math.sin(s),e[1]-i*Math.cos(s)],l=o-a,u=[e[0]-i*Math.cos(l),e[1]-i*Math.sin(l)];return[c,u]}function Mf(t,e,n,r,i){const a=ea(Xn(r,e))+Math.PI,o=ea(Xn(r,n))+Math.PI;return t.arc(r[0],r[1],i,a,o,o-a<0),t}function _M(t,e,n,r="y",i="between",a=!1){const o=(g,y)=>g==="y"||g===!0?y?180:90:y?90:0,s=r==="y"||r===!0?n:e,c=o(r,a),l=ec(s),[u,f]=mo(l,g=>s[g]),d=new Kr({domain:[u,f],range:[0,100]}),h=g=>er(s[g])&&!Number.isNaN(s[g])?d.map(s[g]):0,p={between:g=>`${t[g]} ${h(g)}%`,start:g=>g===0?`${t[g]} ${h(g)}%`:`${t[g-1]} ${h(g)}%, ${t[g]} ${h(g)}%`,end:g=>g===t.length-1?`${t[g]} ${h(g)}%`:`${t[g]} ${h(g)}%, ${t[g+1]} ${h(g)}%`},v=l.sort((g,y)=>h(g)-h(y)).map(p[i]||p.between).join(",");return`linear-gradient(${c}deg, ${v})`}function Pp(t){const[e,n,r,i]=t;return[i,e,n,r]}function sc(t,e,n){const[r,i,,a]=kn(t)?Pp(e):e,[o,s]=n,c=t.getCenter(),l=Al(Xn(r,c)),u=Al(Xn(i,c)),f=u===l&&o!==s?u+Math.PI*2:u;return{startAngle:l,endAngle:f-l>=0?f:Math.PI*2+f,innerRadius:Fn(a,c),outerRadius:Fn(r,c)}}function xmt(t){const e="connect";return Object.fromEntries(Object.entries(t).filter(([n])=>n.startsWith(e)).map(([n,r])=>[lowerFirst(n.replace(e,"").trim()),r]).filter(([n])=>n!==void 0))}function OM(t){const{colorAttribute:e,opacityAttribute:n=e}=t;return`${n}Opacity`}function wM(t,e){if(!xn(t))return"";const n=t.getCenter(),{transform:r}=e;return`translate(${n[0]}, ${n[1]}) ${r||""}`}function SM(t){if(t.length===1)return t[0];const[[e,n,r=0],[i,a,o=0]]=t;return[(e+i)/2,(n+a)/2,(r+o)/2]}function MM(t){return t.replace(/-(\w)/g,function(e,n){return n.toUpperCase()})}function b$(t){return t.replace(/([A-Z])/g,"-$1").toLowerCase()}var _mt=Array.prototype.slice;function EM(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function Nn(t){return function(){return t}}function PM(t){this._context=t}PM.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e);break}}};function Ef(t){return new PM(t)}const pm=Math.PI,vm=2*pm,cc=1e-6,x$=vm-cc;function AM(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function _$(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return AM;const n=hr(10,e);return function(r){this._+=r[0];for(let i=1,a=r.length;i<a;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}class Ap{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?AM:_$(e)}moveTo(e,n){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,n){this._append`L${this._x1=+e},${this._y1=+n}`}quadraticCurveTo(e,n,r,i){this._append`Q${+e},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(e,n,r,i,a,o){this._append`C${+e},${+n},${+r},${+i},${this._x1=+a},${this._y1=+o}`}arcTo(e,n,r,i,a){if(e=+e,n=+n,r=+r,i=+i,a=+a,a<0)throw new Error(`negative radius: ${a}`);let o=this._x1,s=this._y1,c=r-e,l=i-n,u=o-e,f=s-n,d=u*u+f*f;if(this._x1===null)this._append`M${this._x1=e},${this._y1=n}`;else if(d>cc)if(!(Math.abs(f*c-l*u)>cc)||!a)this._append`L${this._x1=e},${this._y1=n}`;else{let h=r-o,p=i-s,v=c*c+l*l,g=h*h+p*p,y=Math.sqrt(v),m=Math.sqrt(d),b=a*Math.tan((pm-Math.acos((v+d-g)/(2*y*m)))/2),x=b/m,_=b/y;Math.abs(x-1)>cc&&this._append`L${e+x*u},${n+x*f}`,this._append`A${a},${a},0,0,${+(f*h>u*p)},${this._x1=e+_*c},${this._y1=n+_*l}`}}arc(e,n,r,i,a,o){if(e=+e,n=+n,r=+r,o=!!o,r<0)throw new Error(`negative radius: ${r}`);let s=r*Math.cos(i),c=r*Math.sin(i),l=e+s,u=n+c,f=1^o,d=o?i-a:a-i;this._x1===null?this._append`M${l},${u}`:(Math.abs(this._x1-l)>cc||Math.abs(this._y1-u)>cc)&&this._append`L${l},${u}`,r&&(d<0&&(d=d%vm+vm),d>x$?this._append`A${r},${r},0,1,${f},${e-s},${n-c}A${r},${r},0,1,${f},${this._x1=l},${this._y1=u}`:d>cc&&this._append`A${r},${r},0,${+(d>=pm)},${f},${this._x1=e+r*Math.cos(a)},${this._y1=n+r*Math.sin(a)}`)}rect(e,n,r,i){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function na(){return new Ap}na.prototype=Ap.prototype;function Omt(t=3){return new Ap(+t)}function gm(t){let e=3;return t.digits=function(n){if(!arguments.length)return e;if(n==null)e=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);e=r}return t},()=>new Ap(e)}function TM(t){return t[0]}function CM(t){return t[1]}function ns(t,e){var n=Nn(!0),r=null,i=Ef,a=null,o=gm(s);t=typeof t=="function"?t:t===void 0?TM:Nn(t),e=typeof e=="function"?e:e===void 0?CM:Nn(e);function s(c){var l,u=(c=EM(c)).length,f,d=!1,h;for(r==null&&(a=i(h=o())),l=0;l<=u;++l)!(l<u&&n(f=c[l],l,c))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+t(f,l,c),+e(f,l,c));if(h)return a=null,h+""||null}return s.x=function(c){return arguments.length?(t=typeof c=="function"?c:Nn(+c),s):t},s.y=function(c){return arguments.length?(e=typeof c=="function"?c:Nn(+c),s):e},s.defined=function(c){return arguments.length?(n=typeof c=="function"?c:Nn(!!c),s):n},s.curve=function(c){return arguments.length?(i=c,r!=null&&(a=i(r)),s):i},s.context=function(c){return arguments.length?(c==null?r=a=null:a=i(r=c),s):r},s}function Tl(t){const e=typeof t=="function"?t:t.render;return class extends kh{connectedCallback(){this.draw()}attributeChangedCallback(){this.draw()}draw(){e(this)}}}var ym=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function O$(t){const{min:[e,n],max:[r,i]}=t.getLocalBounds();let a=0,o=0;return e>0&&(a=e),r<0&&(a=r),n>0&&(o=n),i<0&&(o=i),[a,o]}function w$(t,e=[]){const[n=0,r=0,i=n,a=r]=e,o=t.parentNode,s=o.getEulerAngles();o.setEulerAngles(0);const{min:c,halfExtents:l}=t.getLocalBounds(),[u,f]=c,[d,h]=l;return o.setEulerAngles(s),{x:u-a,y:f-n,width:d*2+a+r,height:h*2+n+i}}const S$=(t,e,n)=>{const r=Fn(t,e),i=Fn(e,n),a=Fn(n,t);return(Math.pow(r,2)+Math.pow(i,2)-Math.pow(a,2))/(2*r*i)};function M$(t,e,n,r){const[[i,a],[o,s]]=e,[c,l]=O$(t);if(i===o&&a===s)return ns()([[0,0],[c,l]]);const u=[[i-o,a-s]].concat(n.length?n:[[0,0]]),f=[r[0]-o,r[1]-s],[d,h]=u;if(S$(f,d,h)>0){const p=(()=>{const{min:v,max:g}=t.getLocalBounds(),y=d[0]+(d[1]-f[1])*(d[1]-0)/(d[0]-f[0]);return g[0]<f[0]?Math.min(g[0],y):Math.max(v[0],y)})();u.splice(1,1,[p,0])}return ns()(u)}const kM=Tl(t=>{const e=t.attributes,{className:n,class:r,transform:i,rotate:a,labelTransform:o,labelTransformOrigin:s,x:c,y:l,x0:u=c,y0:f=l,text:d,background:h,connector:p,startMarker:v,endMarker:g,coordCenter:y,innerHTML:m}=e,b=ym(e,["className","class","transform","rotate","labelTransform","labelTransformOrigin","x","y","x0","y0","text","background","connector","startMarker","endMarker","coordCenter","innerHTML"]);if([c,l,u,f].some(N=>!er(N))){t.children.forEach(N=>N.remove());return}const x=At(b,"background"),{padding:_}=x,O=ym(x,["padding"]),w=At(b,"connector"),{points:S=[]}=w,M=ym(w,["points"]),E=[[+u,+f],[+c,+l]];let P;m?P=se(t).maybeAppend("html","html",n).style("zIndex",0).style("innerHTML",m).call(Vt,Object.assign({transform:o,transformOrigin:s},b)).node():P=se(t).maybeAppend("text","text").style("zIndex",0).style("text",d).call(Vt,Object.assign({textBaseline:"middle",transform:o,transformOrigin:s},b)).node();const L=se(t).maybeAppend("background","rect").style("zIndex",-1).call(Vt,w$(P,_)).call(Vt,h?O:{}).node(),A=M$(L,E,S,y),T=v&&new Je({id:"startMarker",style:Object.assign({x:0,y:0},At(b,"startMarker"))}),C=g&&new Je({id:"endMarker",style:Object.assign({x:0,y:0},At(b,"endMarker"))});se(t).maybeAppend("connector","path").style("zIndex",0).style("path",A).style("markerStart",T).style("markerEnd",C).call(Vt,p?M:{})});function Cl(t,e){let n,r=-1,i=-1;if(e===void 0)for(const a of t)++i,a!=null&&(n<a||n===void 0&&a>=a)&&(n=a,r=i);else for(let a of t)(a=e(a,++i,t))!=null&&(n<a||n===void 0&&a>=a)&&(n=a,r=i);return r}function E$(t,e,n,r){const i=e.length/2,a=e.slice(0,i),o=e.slice(i);let s=Cl(a,(h,p)=>Math.abs(h[1]-o[p][1]));s=Math.max(Math.min(s,i-2),1);const c=h=>[a[h][0],(a[h][1]+o[h][1])/2],l=c(s),u=c(s-1),f=c(s+1),d=ea(Xn(f,u))/Math.PI*180;return{x:l[0],y:l[1],transform:`rotate(${d})`,textAlign:"center",textBaseline:"middle"}}function LM(t,e,n,r){const{bounds:i}=n,[[a,o],[s,c]]=i,l=s-a,u=c-o,f=d=>{const{x:h,y:p}=d,v=Ow(n.x,l),g=Ow(n.y,u);return Object.assign(Object.assign({},d),{x:(v||h)+a,y:(g||p)+o})};return f(t==="left"?{x:0,y:u/2,textAnchor:"start",textBaseline:"middle"}:t==="right"?{x:l,y:u/2,textAnchor:"end",textBaseline:"middle"}:t==="top"?{x:l/2,y:0,textAnchor:"center",textBaseline:"top"}:t==="bottom"?{x:l/2,y:u,textAnchor:"center",textBaseline:"bottom"}:t==="top-left"?{x:0,y:0,textAnchor:"start",textBaseline:"top"}:t==="top-right"?{x:l,y:0,textAnchor:"end",textBaseline:"top"}:t==="bottom-left"?{x:0,y:u,textAnchor:"start",textBaseline:"bottom"}:t==="bottom-right"?{x:l,y:u,textAnchor:"end",textBaseline:"bottom"}:{x:l/2,y:u/2,textAnchor:"center",textBaseline:"middle"})}function NM(t,e,n,r){const{y:i,y1:a,autoRotate:o,rotateToAlignArc:s}=n,c=r.getCenter(),l=sc(r,e,[i,a]),{innerRadius:u,outerRadius:f,startAngle:d,endAngle:h}=l,p=t==="inside"?(d+h)/2:h,v=mm(p,o,s),g=(()=>{const[y,m]=e,b=u+(f-u)*.5,[x,_]=t==="inside"?Pf(c,p,b):xM(y,m);return{x,y:_}})();return Object.assign(Object.assign({},g),{textAlign:t==="inside"?"center":"start",textBaseline:"middle",rotate:v})}function Pf(t,e,n){return[t[0]+Math.sin(e)*n,t[1]-Math.cos(e)*n]}function mm(t,e,n){if(!e)return 0;const r=n?0:Math.sin(t)<0?90:-90;return t/Math.PI*180+r}function P$(t,e,n,r){const{y:i,y1:a,autoRotate:o,rotateToAlignArc:s,radius:c=.5,offset:l=0}=n,u=sc(r,e,[i,a]),{startAngle:f,endAngle:d}=u,h=r.getCenter(),p=(f+d)/2,g={textAlign:"center",textBaseline:"middle",rotate:mm(p,o,s)},{innerRadius:y,outerRadius:m}=u,x=y+(m-y)*c+l,[_,O]=Pf(h,p,x);return Object.assign({x:_,y:O},g)}function IM(t){return t===void 0?null:t}function jM(t,e,n,r){const{bounds:i}=n,[a]=i;return{x:IM(a[0]),y:IM(a[1])}}function bo(t,e,n,r){const{bounds:i}=n;return i.length===1?jM(t,e,n,r):(uf(r)?NM:ml(r)?P$:LM)(t,e,n,r)}function A$(t,e,n,r,i){const[a,o]=Pf(t,e,n),[s,c]=Pf(t,e,r),l=Math.sin(e)>0?1:-1;return[[a,o],[s,c],[s+l*i,c]]}function RM(t,e,n){const r=sc(n,t,[e.y,e.y1]),{innerRadius:i,outerRadius:a}=r;return i+(a-i)}function DM(t,e,n){const r=sc(n,t,[e.y,e.y1]),{startAngle:i,endAngle:a}=r;return(i+a)/2}function bm(t,e,n,r){const{autoRotate:i,rotateToAlignArc:a,offset:o=0,connector:s=!0,connectorLength:c=o,connectorLength2:l=0,connectorDistance:u=0}=n,f=r.getCenter(),d=DM(e,n,r),h=Math.sin(d)>0?1:-1,p=mm(d,i,a),v={textAlign:h>0||uf(r)?"start":"end",textBaseline:"middle",rotate:p},g=RM(e,n,r),y=g+(s?c:o),[[m,b],[x,_],[O,w]]=A$(f,d,g,y,s?l:0),S=s?+u*h:0,M=O+S,E=w,P={connector:s,connectorPoints:[[x-M,_-E],[O-M,w-E]]};return Object.assign(Object.assign({x0:m,y0:b,x:O+S,y:w},v),P)}function T$(t,e,n,r){const{bounds:i}=n;return i.length===1?jM(t,e,n,r):(uf(r)?NM:ml(r)?bm:LM)(t,e,n,r)}var C$=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function k$(t,e,n,r){if(!ml(r))return{};const{connectorLength:i,connectorLength2:a,connectorDistance:o}=n,s=C$(bm("outside",e,n,r),[]),c=r.getCenter(),l=RM(e,n,r),u=DM(e,n,r),f=l+i+a,d=Math.sin(u)>0?1:-1,h=c[0]+(f+ +o)*d,{x:p}=s,v=h-p;return s.x+=v,s.connectorPoints[0][0]-=v,s}var L$=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function N$(t,e,n,r){if(!ml(r))return{};const{connectorLength:i,connectorLength2:a,connectorDistance:o}=n,s=L$(bm("outside",e,n,r),[]),{x0:c,y0:l}=s,u=r.getCenter(),d=vG(r)+i,h=Al([c-u[0],l-u[1]]),p=Math.sin(h)>0?1:-1,[v,g]=Pf(u,h,d);return s.x=v+(a+o)*p,s.y=g,s}var BM=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function I$(t,e){return t!==void 0?t:ml(e)?"inside":kn(e)?"right":"top"}function j$(t,e,n,r,i){const{position:a}=e,{render:o}=i,s=I$(a,n),l=r[o?"htmlLabel":s==="inside"?"innerLabel":"label"],u=Object.assign({},l,e),f=at[MM(s)];if(!f)throw new Error(`Unknown position: ${s}`);return Object.assign(Object.assign({},l),f(s,t,u,n,i))}const FM=(t,e)=>{const{coordinate:n,theme:r}=e,{render:i}=t;return(a,o)=>{const{text:s,x:c,y:l,transform:u="",transformOrigin:f,className:d=""}=o,h=BM(o,["text","x","y","transform","transformOrigin","className"]),p=j$(a,o,n,r,t),{rotate:v=0,transform:g=""}=p,y=BM(p,["rotate","transform"]);return se(new kM).call(Vt,y).style("text",`${s}`).style("className",`${d} g2-label`).style("innerHTML",i?i(s,o.datum,o.index):void 0).style("labelTransform",`${g} rotate(${+v}) ${u}`.trim()).style("labelTransformOrigin",f).style("coordCenter",n.getCenter()).call(Vt,h).node()}};FM.props={defaultMarker:"point"};function qn(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function R$(t,e){return Array.from(e,n=>t[n])}function xo(t,...e){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");t=Array.from(t);let[n]=e;if(n&&n.length!==2||e.length>1){const r=Uint32Array.from(t,(i,a)=>a);return e.length>1?(e=e.map(i=>t.map(i)),r.sort((i,a)=>{for(const o of e){const s=Af(o[i],o[a]);if(s)return s}})):(n=t.map(n),r.sort((i,a)=>Af(n[i],n[a]))),R$(t,r)}return t.sort(zM(n))}function zM(t=qn){if(t===qn)return Af;if(typeof t!="function")throw new TypeError("compare is not a function");return(e,n)=>{const r=t(e,n);return r||r===0?r:(t(n,n)===0)-(t(e,e)===0)}}function Af(t,e){return(t==null||!(t>=t))-(e==null||!(e>=e))||(t<e?-1:t>e?1:0)}var D$=function(t,e){if(!cf(t))return t;for(var n=[],r=0;r<t.length;r++){var i=t[r];e(i,r)&&n.push(i)}return n},GM=D$;function B$(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function kl(t){let e,n,r;t.length!==2?(e=qn,n=(s,c)=>qn(t(s),c),r=(s,c)=>t(s)-c):(e=t===qn||t===B$?t:F$,n=t,r=t);function i(s,c,l=0,u=s.length){if(l<u){if(e(c,c)!==0)return u;do{const f=l+u>>>1;n(s[f],c)<0?l=f+1:u=f}while(l<u)}return l}function a(s,c,l=0,u=s.length){if(l<u){if(e(c,c)!==0)return u;do{const f=l+u>>>1;n(s[f],c)<=0?l=f+1:u=f}while(l<u)}return l}function o(s,c,l=0,u=s.length){const f=i(s,c,l,u-1);return f>l&&r(s[f-1],c)>-r(s[f],c)?f-1:f}return{left:i,center:o,right:a}}function F$(){return 0}function xm(t){return t===null?NaN:+t}function*z$(t,e){if(e===void 0)for(let n of t)n!=null&&(n=+n)>=n&&(yield n);else{let n=-1;for(let r of t)(r=e(r,++n,t))!=null&&(r=+r)>=r&&(yield r)}}const WM=kl(qn),G$=WM.right,W$=WM.left,Y$=kl(xm).center;var H$=G$;function $$(t,e,n){return Math.min(n,Math.max(e,t))}function Tf(t){return!!t.getBandWidth}function Ll(t,e,n){if(!Tf(t))return t.invert(e);const{adjustedRange:r}=t,{domain:i}=t.getOptions(),a=n?-1:0,o=t.getStep(),s=n?r:r.map(u=>u+o),c=W$(s,e),l=$$(c+a,0,i.length-1);return i[l]}function rs(t,e,n){if(!e)return t.getOptions().domain;if(!Tf(t)){const c=xo(e);if(!n)return c;const[l]=c,{range:u}=t.getOptions(),[f,d]=u,h=f>d?-1:1,p=t.invert(t.map(l)+h*n);return[l,p]}const{domain:r}=t.getOptions(),i=e[0],a=r.indexOf(i);if(n){const c=a+Math.round(r.length*n);return r.slice(a,c)}const o=e[e.length-1],s=r.indexOf(o);return r.slice(a,s+1)}function Tp(t,e,n,r,i,a){const{x:o,y:s}=i,c=(h,p)=>{const[v,g]=a.invert(h);return[Ll(o,v,p),Ll(s,g,p)]},l=c([t,e],!0),u=c([n,r],!1),f=rs(o,[l[0],u[0]]),d=rs(s,[l[1],u[1]]);return[f,d]}function Cp(t,e){const[n,r]=t,i=a=>a.getStep?a.getStep():0;return[e.map(n),e.map(r)+i(e)]}function V$(t,e,n){const{x:r,y:i}=e,[a,o]=t,s=Cp(a,r),c=Cp(o,i),l=[s[0],c[0]],u=[s[1],c[1]],[f,d]=n.map(l),[h,p]=n.map(u);return[f,d,h,p]}const YM=Math.abs,Qr=Math.atan2,lc=Math.cos,U$=Math.max,_m=Math.min,Fa=Math.sin,Nl=Math.sqrt,Jr=1e-12,Cf=Math.PI,kp=Cf/2,X$=2*Cf;function q$(t){return t>1?0:t<-1?Cf:Math.acos(t)}function HM(t){return t>=1?kp:t<=-1?-kp:Math.asin(t)}function Z$(t){return t.innerRadius}function K$(t){return t.outerRadius}function Q$(t){return t.startAngle}function J$(t){return t.endAngle}function tV(t){return t&&t.padAngle}function eV(t,e,n,r,i,a,o,s){var c=n-t,l=r-e,u=o-i,f=s-a,d=f*c-u*l;if(!(d*d<Jr))return d=(u*(e-a)-f*(t-i))/d,[t+d*c,e+d*l]}function Lp(t,e,n,r,i,a,o){var s=t-n,c=e-r,l=(o?a:-a)/Nl(s*s+c*c),u=l*c,f=-l*s,d=t+u,h=e+f,p=n+u,v=r+f,g=(d+p)/2,y=(h+v)/2,m=p-d,b=v-h,x=m*m+b*b,_=i-a,O=d*v-p*h,w=(b<0?-1:1)*Nl(U$(0,_*_*x-O*O)),S=(O*b-m*w)/x,M=(-O*m-b*w)/x,E=(O*b+m*w)/x,P=(-O*m+b*w)/x,L=S-g,A=M-y,T=E-g,C=P-y;return L*L+A*A>T*T+C*C&&(S=E,M=P),{cx:S,cy:M,x01:-u,y01:-f,x11:S*(i/_-1),y11:M*(i/_-1)}}function Np(){var t=Z$,e=K$,n=Nn(0),r=null,i=Q$,a=J$,o=tV,s=null,c=gm(l);function l(){var u,f,d=+t.apply(this,arguments),h=+e.apply(this,arguments),p=i.apply(this,arguments)-kp,v=a.apply(this,arguments)-kp,g=YM(v-p),y=v>p;if(s||(s=u=c()),h<d&&(f=h,h=d,d=f),!(h>Jr))s.moveTo(0,0);else if(g>X$-Jr)s.moveTo(h*lc(p),h*Fa(p)),s.arc(0,0,h,p,v,!y),d>Jr&&(s.moveTo(d*lc(v),d*Fa(v)),s.arc(0,0,d,v,p,y));else{var m=p,b=v,x=p,_=v,O=g,w=g,S=o.apply(this,arguments)/2,M=S>Jr&&(r?+r.apply(this,arguments):Nl(d*d+h*h)),E=_m(YM(h-d)/2,+n.apply(this,arguments)),P=E,L=E,A,T;if(M>Jr){var C=HM(M/d*Fa(S)),N=HM(M/h*Fa(S));(O-=C*2)>Jr?(C*=y?1:-1,x+=C,_-=C):(O=0,x=_=(p+v)/2),(w-=N*2)>Jr?(N*=y?1:-1,m+=N,b-=N):(w=0,m=b=(p+v)/2)}var B=h*lc(m),j=h*Fa(m),D=d*lc(_),G=d*Fa(_);if(E>Jr){var Y=h*lc(b),U=h*Fa(b),V=d*lc(x),it=d*Fa(x),pt;if(g<Cf)if(pt=eV(B,j,V,it,Y,U,D,G)){var Ot=B-pt[0],ht=j-pt[1],ut=Y-pt[0],Lt=U-pt[1],wt=1/Fa(q$((Ot*ut+ht*Lt)/(Nl(Ot*Ot+ht*ht)*Nl(ut*ut+Lt*Lt)))/2),Gt=Nl(pt[0]*pt[0]+pt[1]*pt[1]);P=_m(E,(d-Gt)/(wt-1)),L=_m(E,(h-Gt)/(wt+1))}else P=L=0}w>Jr?L>Jr?(A=Lp(V,it,B,j,h,L,y),T=Lp(Y,U,D,G,h,L,y),s.moveTo(A.cx+A.x01,A.cy+A.y01),L<E?s.arc(A.cx,A.cy,L,Qr(A.y01,A.x01),Qr(T.y01,T.x01),!y):(s.arc(A.cx,A.cy,L,Qr(A.y01,A.x01),Qr(A.y11,A.x11),!y),s.arc(0,0,h,Qr(A.cy+A.y11,A.cx+A.x11),Qr(T.cy+T.y11,T.cx+T.x11),!y),s.arc(T.cx,T.cy,L,Qr(T.y11,T.x11),Qr(T.y01,T.x01),!y))):(s.moveTo(B,j),s.arc(0,0,h,m,b,!y)):s.moveTo(B,j),!(d>Jr)||!(O>Jr)?s.lineTo(D,G):P>Jr?(A=Lp(D,G,Y,U,d,-P,y),T=Lp(B,j,V,it,d,-P,y),s.lineTo(A.cx+A.x01,A.cy+A.y01),P<E?s.arc(A.cx,A.cy,P,Qr(A.y01,A.x01),Qr(T.y01,T.x01),!y):(s.arc(A.cx,A.cy,P,Qr(A.y01,A.x01),Qr(A.y11,A.x11),!y),s.arc(0,0,d,Qr(A.cy+A.y11,A.cx+A.x11),Qr(T.cy+T.y11,T.cx+T.x11),y),s.arc(T.cx,T.cy,P,Qr(T.y11,T.x11),Qr(T.y01,T.x01),!y))):s.arc(0,0,d,_,x,y)}if(s.closePath(),u)return s=null,u+""||null}return l.centroid=function(){var u=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,f=(+i.apply(this,arguments)+ +a.apply(this,arguments))/2-Cf/2;return[lc(f)*u,Fa(f)*u]},l.innerRadius=function(u){return arguments.length?(t=typeof u=="function"?u:Nn(+u),l):t},l.outerRadius=function(u){return arguments.length?(e=typeof u=="function"?u:Nn(+u),l):e},l.cornerRadius=function(u){return arguments.length?(n=typeof u=="function"?u:Nn(+u),l):n},l.padRadius=function(u){return arguments.length?(r=u==null?null:typeof u=="function"?u:Nn(+u),l):r},l.startAngle=function(u){return arguments.length?(i=typeof u=="function"?u:Nn(+u),l):i},l.endAngle=function(u){return arguments.length?(a=typeof u=="function"?u:Nn(+u),l):a},l.padAngle=function(u){return arguments.length?(o=typeof u=="function"?u:Nn(+u),l):o},l.context=function(u){return arguments.length?(s=u==null?null:u,l):s},l}var Ip=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function $M(t,e,n,r,i={}){const{inset:a=0,radius:o=0,insetLeft:s=a,insetTop:c=a,insetRight:l=a,insetBottom:u=a,radiusBottomLeft:f=o,radiusBottomRight:d=o,radiusTopLeft:h=o,radiusTopRight:p=o,minWidth:v=-1/0,maxWidth:g=1/0,minHeight:y=-1/0}=i,m=Ip(i,["inset","radius","insetLeft","insetTop","insetRight","insetBottom","radiusBottomLeft","radiusBottomRight","radiusTopLeft","radiusTopRight","minWidth","maxWidth","minHeight"]);if(!xn(r)&&!Dw(r)){const S=!!kn(r),[M,,E]=S?Pp(e):e,[P,L]=M,[A,T]=Xn(E,M),C=A>0?P:P+A,N=T>0?L:L+T,B=Math.abs(A),j=Math.abs(T),D=C+s,G=N+c,Y=B-(s+l),U=j-(c+u),V=S?ep(Y,y,1/0):ep(Y,v,g),it=S?ep(U,v,g):ep(U,y,1/0),pt=S?D:D-(V-Y)/2,Ot=S?G-(it-U)/2:G-(it-U);return se(t.createElement("rect",{})).style("x",pt).style("y",Ot).style("width",V).style("height",it).style("radius",[h,p,d,f]).call(Vt,m).node()}const{y:b,y1:x}=n,_=r.getCenter(),O=sc(r,e,[b,x]),w=Np().cornerRadius(o).padAngle(a*Math.PI/180);return se(t.createElement("path",{})).style("path",w(O)).style("transform",`translate(${_[0]}, ${_[1]})`).style("radius",o).style("inset",a).call(Vt,m).node()}const kf=(t,e)=>{const{colorAttribute:n,opacityAttribute:r="fill",first:i=!0,last:a=!0}=t,o=Ip(t,["colorAttribute","opacityAttribute","first","last"]),{coordinate:s,document:c}=e;return(l,u,f)=>{const{color:d,radius:h=0}=f,p=Ip(f,["color","radius"]),v=p.lineWidth||1,{stroke:g,radius:y=h,radiusTopLeft:m=y,radiusTopRight:b=y,radiusBottomRight:x=y,radiusBottomLeft:_=y,innerRadius:O=0,innerRadiusTopLeft:w=O,innerRadiusTopRight:S=O,innerRadiusBottomRight:M=O,innerRadiusBottomLeft:E=O,lineWidth:P=n==="stroke"||g?v:0,inset:L=0,insetLeft:A=L,insetRight:T=L,insetBottom:C=L,insetTop:N=L,minWidth:B,maxWidth:j,minHeight:D}=o,G=Ip(o,["stroke","radius","radiusTopLeft","radiusTopRight","radiusBottomRight","radiusBottomLeft","innerRadius","innerRadiusTopLeft","innerRadiusTopRight","innerRadiusBottomRight","innerRadiusBottomLeft","lineWidth","inset","insetLeft","insetRight","insetBottom","insetTop","minWidth","maxWidth","minHeight"]),{color:Y=d,opacity:U}=u,V=[i?m:w,i?b:S,a?x:M,a?_:E],it=["radiusTopLeft","radiusTopRight","radiusBottomRight","radiusBottomLeft"];kn(s)&&it.push(it.shift());const pt=Object.assign(Object.assign({radius:y},Object.fromEntries(it.map((Ot,ht)=>[Ot,V[ht]]))),{inset:L,insetLeft:A,insetRight:T,insetBottom:C,insetTop:N,minWidth:B,maxWidth:j,minHeight:D});return se($M(c,l,u,s,pt)).call(Vt,p).style("fill","transparent").style(n,Y).style(OM(t),U).style("lineWidth",P).style("stroke",g===void 0?Y:g).call(Vt,G).node()}};kf.props={defaultEnterAnimation:"scaleInY",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const nV={visibility:"visible",opacity:1,fillOpacity:1,strokeOpacity:1};function rV(t,e){var n;return(n=t.style[e])!==null&&n!==void 0?n:nV[e]}function Om(t,e,n,r){t.style[e]=n,r&&t.children.forEach(i=>Om(i,e,n,r))}function wm(t){Om(t,"visibility","hidden",!0)}function Sm(t){Om(t,"visibility","visible",!0)}var Lf=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function is(t){return se(t).selectAll(`.${fo}`).nodes().filter(e=>!e.__removed__)}function VM(t,e){return Mm(t,e).flatMap(({container:n})=>is(n))}function Mm(t,e){return e.filter(n=>n!==t&&n.options.parentKey===t.options.key)}function za(t){return se(t).select(`.${af}`).node()}function UM(t){if(t.tagName==="g")return t.getRenderBounds();const e=t.getGeometryBounds(),n=new ur;return n.setFromTransformedAABB(e,t.getWorldTransform()),n}function Em(t,e){const{offsetX:n,offsetY:r}=e,i=UM(t),{min:[a,o],max:[s,c]}=i,l=n<a||n>s,u=r<o||r>c;return l||u?null:[n-a,r-o]}function Pm(t,e){const{offsetX:n,offsetY:r}=e,[i,a,o,s]=iV(t);return[Math.min(o,Math.max(i,n))-i,Math.min(s,Math.max(a,r))-a]}function iV(t){const e=t.getRenderBounds(),{min:[n,r],max:[i,a]}=e;return[n,r,i,a]}function XM(t){return e=>e.__data__.color}function Am(t){return e=>e.__data__.x}function uc(t){const e=Array.isArray(t)?t:[t],n=new Map(e.flatMap(r=>Array.from(r.markState.keys()).map(a=>[jp(r.key,a.key),a.data])));return r=>{const{index:i,markKey:a,viewKey:o}=r.__data__;return n.get(jp(o,a))[i]}}function _o(t,e=(r,i)=>r,n=(r,i,a)=>r.setAttribute(i,a)){const r="__states__",i="__ordinal__",a=u=>{const{[r]:f=[],[i]:d={}}=u,h=f.reduce((p,v)=>Object.assign(Object.assign({},p),t[v]),d);if(Object.keys(h).length!==0){for(const[p,v]of Object.entries(h)){const g=rV(u,p),y=e(v,u);n(u,p,y),p in d||(d[p]=g)}u[i]=d}},o=u=>{u[r]||(u[r]=[])};return{setState:(u,...f)=>{o(u),u[r]=[...f],a(u)},removeState:(u,...f)=>{o(u);for(const d of f){const h=u[r].indexOf(d);h!==-1&&u[r].splice(h,1)}a(u)},hasState:(u,f)=>(o(u),u[r].indexOf(f)!==-1)}}function aV(t){return t===void 0?!0:typeof t!="object"?!1:Object.keys(t).length===0}function jp(t,e){return`${t},${e}`}function Il(t,e){const r=(Array.isArray(t)?t:[t]).flatMap(a=>a.marks.map(o=>[jp(a.key,o.key),o.state])),i={};for(const a of e){const[o,s]=Array.isArray(a)?a:[a,{}];i[o]=r.reduce((c,l)=>{const[u,f={}]=l,d=aV(f[o])?s:f[o];for(const[h,p]of Object.entries(d)){const v=c[h],g=(y,m,b,x)=>{const _=jp(x.__data__.viewKey,x.__data__.markKey);return u!==_?v==null?void 0:v(y,m,b,x):typeof p!="function"?p:p(y,m,b,x)};c[h]=g}return c},{})}return i}function Nf(t,e){const n=new Map(t.map((i,a)=>[i,a])),r=e?t.map(e):t;return(i,a)=>{if(typeof i!="function")return i;const o=n.get(a),s=e?e(a):a;return i(s,o,r,a)}}function qM(t){var{link:e=!1,valueof:n=(u,f)=>u,coordinate:r}=t,i=Lf(t,["link","valueof","coordinate"]);const a="element-link";if(!e)return[()=>{},()=>{}];const o=u=>u.__data__.points,s=(u,f)=>{const[,d,h]=u,[p,,,v]=f;return[d,p,v,h]};return[u=>{var f;if(u.length<=1)return;const d=xo(u,(h,p)=>{const{x:v}=h.__data__,{x:g}=p.__data__;return v-g});for(let h=1;h<d.length;h++){const p=na(),v=d[h-1],g=d[h],[y,m,b,x]=s(o(v),o(g));p.moveTo(...y),p.lineTo(...m),p.lineTo(...b),p.lineTo(...x),p.closePath();const _=Ko(i,M=>n(M,v)),{fill:O=v.getAttribute("fill")}=_,w=Lf(_,["fill"]),S=new Zr({className:a,style:Object.assign({d:p.toString(),fill:O,zIndex:-2},w)});(f=v.link)===null||f===void 0||f.remove(),v.parentNode.appendChild(S),v.link=S}},u=>{var f;(f=u.link)===null||f===void 0||f.remove(),u.link=null}]}function ZM(t,e,n){const r=i=>{const{transform:a}=t.style;return a?`${a} ${i}`:i};if(xn(n)){const{points:i}=t.__data__,[a,o]=kn(n)?Pp(i):i,s=n.getCenter(),c=Xn(a,s),l=Xn(o,s),u=ea(c),f=bM(c,l),d=u+f/2,h=e*Math.cos(d),p=e*Math.sin(d);return r(`translate(${h}, ${p})`)}return kn(n)?r(`translate(${e}, 0)`):r(`translate(0, ${-e})`)}function KM(t){var{document:e,background:n,scale:r,coordinate:i,valueof:a}=t,o=Lf(t,["document","background","scale","coordinate","valueof"]);const s="element-background";if(!n)return[()=>{},()=>{}];const c=(y,m,b)=>{const x=y.invert(m),_=m+y.getBandWidth(x)/2,O=y.getStep(x)/2,w=O*b;return[_-O+w,_+O-w]},l=(y,m)=>{const{x:b}=r;if(!Tf(b))return[0,1];const{__data__:x}=y,{x:_}=x,[O,w]=c(b,_,m);return[O,w]},u=(y,m)=>{const{y:b}=r;if(!Tf(b))return[0,1];const{__data__:x}=y,{y:_}=x,[O,w]=c(b,_,m);return[O,w]},f=(y,m)=>{const{padding:b}=m,[x,_]=l(y,b),[O,w]=u(y,b),S=[[x,O],[_,O],[_,w],[x,w]].map(L=>i.map(L)),{__data__:M}=y,{y:E,y1:P}=M;return $M(e,S,{y:E,y1:P},i,m)},d=(y,m)=>{const{transform:b="scale(1.2, 1.2)",transformOrigin:x="center center",stroke:_=""}=m,O=Lf(m,["transform","transformOrigin","stroke"]),w=Object.assign({transform:b,transformOrigin:x,stroke:_},O),S=y.cloneNode(!0);for(const[M,E]of Object.entries(w))S.style[M]=E;return S},h=()=>{const{x:y,y:m}=r;return[y,m].some(Tf)};return[y=>{y.background&&y.background.remove();const m=Ko(o,L=>a(L,y)),{fill:b="#CCD6EC",fillOpacity:x=.3,zIndex:_=-2,padding:O=.001,strokeWidth:w=0}=m,S=Lf(m,["fill","fillOpacity","zIndex","padding","strokeWidth"]),M=Object.assign(Object.assign({},S),{fill:b,fillOpacity:x,zIndex:_,padding:O,strokeWidth:w}),P=(h()?f:d)(y,M);P.className=s,y.parentNode.parentNode.appendChild(P),y.background=P},y=>{var m;(m=y.background)===null||m===void 0||m.remove(),y.background=null},y=>y.className===s]}function as(t,e){const r=t.getRootNode().defaultView.getContextService().getDomElement();r!=null&&r.style&&(t.cursor=r.style.cursor,r.style.cursor=e)}function oV(t){as(t,t.cursor)}function Tm(t,e,n){return t.find(r=>Object.entries(e).every(([i,a])=>n(r)[i]===a))}function Rp(t,e){return Math.sqrt(Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2))}function If(t,e=!1){const n=GM(t,r=>!!r).map((r,i)=>[i===0?"M":"L",...r]);return e&&n.push(["Z"]),n}function QM(t){return t.querySelectorAll(".element")}function sV(t,e,n=0){const r=[["M",...e[1]]],i=Rp(t,e[1]),a=Rp(t,e[0]);return i===0?r.push(["L",...e[3]],["A",a,a,0,n,1,...e[0]],["Z"]):r.push(["A",i,i,0,n,0,...e[2]],["L",...e[3]],["A",a,a,0,n,1,...e[0]],["Z"]),r}function Dp(t,e){if(e(t))return t;let n=t.parent;for(;n&&!e(n);)n=n.parent;return n}function JM(t,e){const{__data__:n}=t,{markKey:r,index:i,seriesIndex:a}=n,{markState:o}=e,s=Array.from(o.keys()).find(c=>c.key===r);if(s)return a?a.map(c=>s.data[c]):s.data[i]}function cV(t){return Dp(t,e=>e.className==="component")}function lV(t){return Dp(t,e=>e.className==="element")}function uV(t){return Dp(t,e=>e.className==="label")}function jr(t,e,n,r=i=>!0){return i=>{if(!r(i))return;n.emit(`plot:${t}`,i);const{target:a}=i;if(!a)return;const{className:o}=a;if(o==="plot")return;const s=lV(a),c=cV(a),l=uV(a),u=s||c||l;if(!u)return;const{className:f,markType:d}=u,h=Object.assign(Object.assign({},i),{nativeEvent:!0});f==="element"?(h.data={data:JM(u,e)},n.emit(`element:${t}`,h),n.emit(`${d}:${t}`,h)):f==="label"?(h.data={data:u.attributes.datum},n.emit(`label:${t}`,h),n.emit(`${o}:${t}`,h)):(n.emit(`component:${t}`,h),n.emit(`${o}:${t}`,h))}}function tE(){return(t,e,n)=>{const{container:r,view:i}=t,a=jr(on.CLICK,i,n,w=>w.detail===1),o=jr(on.DBLCLICK,i,n,w=>w.detail===2),s=jr(on.POINTER_TAP,i,n),c=jr(on.POINTER_DOWN,i,n),l=jr(on.POINTER_UP,i,n),u=jr(on.POINTER_OVER,i,n),f=jr(on.POINTER_OUT,i,n),d=jr(on.POINTER_MOVE,i,n),h=jr(on.POINTER_ENTER,i,n),p=jr(on.POINTER_LEAVE,i,n),v=jr(on.POINTER_UPOUTSIDE,i,n),g=jr(on.DRAG_START,i,n),y=jr(on.DRAG,i,n),m=jr(on.DRAG_END,i,n),b=jr(on.DRAG_ENTER,i,n),x=jr(on.DRAG_LEAVE,i,n),_=jr(on.DRAG_OVER,i,n),O=jr(on.DROP,i,n);return r.addEventListener("click",a),r.addEventListener("click",o),r.addEventListener("pointertap",s),r.addEventListener("pointerdown",c),r.addEventListener("pointerup",l),r.addEventListener("pointerover",u),r.addEventListener("pointerout",f),r.addEventListener("pointermove",d),r.addEventListener("pointerenter",h),r.addEventListener("pointerleave",p),r.addEventListener("pointerupoutside",v),r.addEventListener("dragstart",g),r.addEventListener("drag",y),r.addEventListener("dragend",m),r.addEventListener("dragenter",b),r.addEventListener("dragleave",x),r.addEventListener("dragover",_),r.addEventListener("drop",O),()=>{r.removeEventListener("click",a),r.removeEventListener("click",o),r.removeEventListener("pointertap",s),r.removeEventListener("pointerdown",c),r.removeEventListener("pointerup",l),r.removeEventListener("pointerover",u),r.removeEventListener("pointerout",f),r.removeEventListener("pointermove",d),r.removeEventListener("pointerenter",h),r.removeEventListener("pointerleave",p),r.removeEventListener("pointerupoutside",v),r.removeEventListener("dragstart",g),r.removeEventListener("drag",y),r.removeEventListener("dragend",m),r.removeEventListener("dragenter",b),r.removeEventListener("dragleave",x),r.removeEventListener("dragover",_),r.removeEventListener("drop",O)}}}tE.props={reapplyWhenUpdate:!0};function fV(){return{"component.axisRadar":JS,"component.axisLinear":Jo,"component.axisArc":QS,"component.legendContinuousBlock":vM,"component.legendContinuousBlockSize":gM,"component.legendContinuousSize":um,"interaction.event":tE,"composition.mark":yM,"composition.view":mM,"shape.label.label":FM}}var dV=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function In(t,e){const n=Object.assign(Object.assign({},fV()),e),r=a=>{if(typeof a!="string")return a;const o=`${t}.${a}`;return n[o]||yl(`Unknown Component: ${o}`)};return[(a,o)=>{const{type:s}=a,c=dV(a,["type"]);s||yl("Plot type is required!");const l=r(s);return l==null?void 0:l(c,o)},r]}function eE(t){const{canvas:e,group:n}=t;return(e==null?void 0:e.document)||(n==null?void 0:n.ownerDocument)||yl("Cannot find library document")}var nE=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function hV(t,e,n){const[r]=In("coordinate",n),{innerHeight:i,innerWidth:a,insetLeft:o,insetTop:s,insetRight:c,insetBottom:l}=t,{coordinates:u=[]}=e,f=bV(u),d=f[0].type==="cartesian3D",h=Object.assign(Object.assign({},t),{x:o,y:s,width:a-o-c,height:i-l-s,transformations:f.flatMap(r)});return d?new Rw.Coordinate3D(h):new Rw.Coordinate(h)}function rE(t,e){const{coordinate:n={}}=t,r=nE(t,["coordinate"]),{type:i,transform:a=[]}=n,o=nE(n,["type","transform"]);if(!i)return Object.assign(Object.assign({},r),{coordinates:a});const[,s]=In("coordinate",e),{transform:c=!1}=s(i).props||{};if(c)throw new Error(`Unknown coordinate: ${i}.`);return Object.assign(Object.assign({},r),{coordinates:[Object.assign({type:i},o),...a]})}function _a(t,e){return t.filter(n=>n.type===e)}function fc(t){return _a(t,"polar").length>0}function pV(t){return _a(t,"helix").length>0}function jl(t){return _a(t,"transpose").length%2===1}function vV(t){return _a(t,"parallel").length>0}function iE(t){return _a(t,"theta").length>0}function gV(t){return _a(t,"reflect").length>0}function jf(t){return _a(t,"radial").length>0}function yV(t){return _a(t,"radar").length>0}function mV(t){return _a(t,"reflectY").length>0}function bV(t){return t.find(e=>e.type==="cartesian"||e.type==="cartesian3D")?t:[...t,{type:"cartesian"}]}function Se(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(r*6,++r*6);return n}var xV=Se("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),_V=Se("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),OV=Se("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),wV=Se("4269d0efb118ff725c6cc5b03ca951ff8ab7a463f297bbf59c6b4e9498a0"),SV=Se("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),MV=Se("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),EV=Se("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),PV=Se("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),AV=Se("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),TV=Se("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),CV=Se("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function aE(t,e,n,r,i){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*n+(1+3*t+3*a-3*o)*r+o*i)/6}function kV(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],a=t[r+1],o=r>0?t[r-1]:2*i-a,s=r<e-1?t[r+2]:2*a-i;return aE((n-r/e)*e,o,i,a,s)}}function LV(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),i=t[(r+e-1)%e],a=t[r%e],o=t[(r+1)%e],s=t[(r+2)%e];return aE((n-r/e)*e,i,a,o,s)}}var Cm=function(t){return function(){return t}};function oE(t,e){return function(n){return t+n*e}}function NV(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}function IV(t,e){var n=e-t;return n?oE(t,n>180||n<-180?n-360*Math.round(n/360):n):Cm(isNaN(t)?e:t)}function jV(t){return(t=+t)==1?Rl:function(e,n){return n-e?NV(e,n,t):Cm(isNaN(e)?n:e)}}function Rl(t,e){var n=e-t;return n?oE(t,n):Cm(isNaN(t)?e:t)}var wmt=function t(e){var n=jV(e);function r(i,a){var o=n((i=Hu(i)).r,(a=Hu(a)).r),s=n(i.g,a.g),c=n(i.b,a.b),l=Rl(i.opacity,a.opacity);return function(u){return i.r=o(u),i.g=s(u),i.b=c(u),i.opacity=l(u),i+""}}return r.gamma=t,r}(1);function sE(t){return function(e){var n=e.length,r=new Array(n),i=new Array(n),a=new Array(n),o,s;for(o=0;o<n;++o)s=Hu(e[o]),r[o]=s.r||0,i[o]=s.g||0,a[o]=s.b||0;return r=t(r),i=t(i),a=t(a),s.opacity=1,function(c){return s.r=r(c),s.g=i(c),s.b=a(c),s+""}}}var RV=sE(kV),Smt=sE(LV),Sn=t=>RV(t[t.length-1]),cE=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(Se),DV=Sn(cE),lE=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(Se),BV=Sn(lE),uE=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(Se),FV=Sn(uE),fE=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(Se),zV=Sn(fE),dE=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(Se),GV=Sn(dE),hE=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(Se),WV=Sn(hE),pE=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(Se),YV=Sn(pE),vE=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(Se),HV=Sn(vE),gE=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(Se),$V=Sn(gE),yE=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(Se),VV=Sn(yE),mE=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(Se),UV=Sn(mE),bE=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(Se),XV=Sn(bE),xE=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(Se),qV=Sn(xE),_E=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(Se),ZV=Sn(_E),OE=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(Se),KV=Sn(OE),wE=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(Se),QV=Sn(wE),SE=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(Se),JV=Sn(SE),ME=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(Se),tU=Sn(ME),EE=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(Se),eU=Sn(EE),PE=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(Se),nU=Sn(PE),AE=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(Se),rU=Sn(AE),TE=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(Se),iU=Sn(TE),CE=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(Se),aU=Sn(CE),kE=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(Se),oU=Sn(kE),LE=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(Se),sU=Sn(LE),NE=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(Se),cU=Sn(NE),IE=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(Se),lU=Sn(IE);function uU(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-t*(35.34-t*(2381.73-t*(6402.7-t*(7024.72-t*2710.57)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+t*(170.73+t*(52.82-t*(131.46-t*(176.58-t*67.37)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+t*(442.36-t*(2482.43-t*(6167.24-t*(6614.94-t*2475.67)))))))+")"}var fU=Math.PI/180,dU=180/Math.PI,jE=-.14861,km=1.78277,Lm=-.29227,Bp=-.90649,Rf=1.97294,RE=Rf*Bp,DE=Rf*km,BE=km*Lm-Bp*jE;function hU(t){if(t instanceof dc)return new dc(t.h,t.s,t.l,t.opacity);t instanceof oi||(t=y2(t));var e=t.r/255,n=t.g/255,r=t.b/255,i=(BE*r+RE*e-DE*n)/(BE+RE-DE),a=r-i,o=(Rf*(n-i)-Lm*a)/Bp,s=Math.sqrt(o*o+a*a)/(Rf*i*(1-i)),c=s?Math.atan2(o,a)*dU-120:NaN;return new dc(c<0?c+360:c,s,i,t.opacity)}function Ga(t,e,n,r){return arguments.length===1?hU(t):new dc(t,e,n,r==null?1:r)}function dc(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}vh(dc,Ga,wg(rl,{brighter:function(t){return t=t==null?il:Math.pow(il,t),new dc(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=t==null?Hs:Math.pow(Hs,t),new dc(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*fU,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),i=Math.sin(t);return new oi(255*(e+n*(jE*r+km*i)),255*(e+n*(Lm*r+Bp*i)),255*(e+n*(Rf*r)),this.opacity)}}));function FE(t){return function e(n){n=+n;function r(i,a){var o=t((i=Ga(i)).h,(a=Ga(a)).h),s=Rl(i.s,a.s),c=Rl(i.l,a.l),l=Rl(i.opacity,a.opacity);return function(u){return i.h=o(u),i.s=s(u),i.l=c(Math.pow(u,n)),i.opacity=l(u),i+""}}return r.gamma=e,r}(1)}var Mmt=FE(IV),Nm=FE(Rl),pU=Nm(Ga(300,.5,0),Ga(-240,.5,1)),vU=Nm(Ga(-100,.75,.35),Ga(80,1.5,.8)),gU=Nm(Ga(260,.75,.35),Ga(80,1.5,.8)),Fp=Ga();function yU(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return Fp.h=360*t-100,Fp.s=1.5-1.5*e,Fp.l=.8-.9*e,Fp+""}var zp=Hu(),mU=Math.PI/3,bU=Math.PI*2/3;function xU(t){var e;return t=(.5-t)*Math.PI,zp.r=255*(e=Math.sin(t))*e,zp.g=255*(e=Math.sin(t+mU))*e,zp.b=255*(e=Math.sin(t+bU))*e,zp+""}function _U(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+t*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-t*14825.05)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+t*707.56)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-t*6838.66)))))))+")"}function Gp(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}var OU=Gp(Se("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),wU=Gp(Se("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),SU=Gp(Se("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),MU=Gp(Se("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function EU(t,e,n,r,i,a){const{guide:o={}}=n,s=jU(t,e,n);if(typeof s!="string")return n;const c=RU(s,t,e,n),l=LU(s,c,n);return Object.assign(Object.assign(Object.assign({},n),BU(s,t,e,n,r)),{domain:l,range:DU(s,t,e,n,l,i,a),expectedDomain:c,guide:o,name:t,type:s})}function PU(t,e){const n={};for(const r of t){const{values:i,name:a}=r,o=e[a];for(const s of i){const{name:c,value:l}=s;n[c]=l.map(u=>o.map(u))}}return n}function AU(t,e){var n;const{components:r=[]}=e,i=["scale","encode","axis","legend","data","transform"],a=Array.from(new Set(t.flatMap(s=>s.channels.map(c=>c.scale)))),o=new Map(a.map(s=>[s.name,s]));for(const s of r){const c=kU(s);for(const l of c){const u=o.get(l),f=((n=s.scale)===null||n===void 0?void 0:n[l])||{},{independent:d=!1}=f;if(u&&!d){const{guide:h}=u,p=typeof h=="boolean"?{}:h;u.guide=dt({},p,s),Object.assign(u,f)}else{const h=Object.assign(Object.assign({},f),{expectedDomain:f.domain,name:l,guide:om(s,i)});a.push(h)}}}return a}function TU(t){if(!t||!Array.isArray(t))return[tc,tc];let e,n;return[a=>{var o;e=a.map.bind(a),n=(o=a.invert)===null||o===void 0?void 0:o.bind(a);const s=t.filter(([d])=>typeof d=="function"),c=t.filter(([d])=>typeof d!="function"),l=new Map(c);if(a.map=d=>{for(const[h,p]of s)if(h(d))return p;return l.has(d)?l.get(d):e(d)},!n)return a;const u=new Map(c.map(([d,h])=>[h,d])),f=new Map(s.map(([d,h])=>[h,d]));return a.invert=d=>f.has(d)?d:u.has(d)?u.get(d):n(d),a},a=>(e!==null&&(a.map=e),n!==null&&(a.invert=n),a)]}function zE(t,e){const n=Object.keys(t);for(const r of Object.values(e)){const{name:i}=r.getOptions();if(!(i in t))t[i]=r;else{const a=n.filter(c=>c.startsWith(i)).map(c=>+(c.replace(i,"")||0)),o=sn(a)+1,s=`${i}${o}`;t[s]=r,r.getOptions().key=s}}return t}function GE(t,e){const[n]=In("scale",e),{relations:r}=t,[i]=TU(r),a=n(t);return i(a)}function CU(t){const e=t.flatMap(n=>Array.from(n.values())).flatMap(n=>n.channels.map(r=>r.scale));WE(e,"x"),WE(e,"y")}function kU(t){const{channels:e=[],type:n,scale:r={}}=t,i=["shape","color","opacity","size"];return e.length!==0?e:n==="axisX"?["x"]:n==="axisY"?["y"]:n==="legends"?Object.keys(r).filter(a=>i.includes(a)):[]}function WE(t,e){const n=t.filter(({name:a,facet:o=!0})=>o&&a===e),r=n.flatMap(a=>a.domain),i=n.every(YE)?mo(r):n.every(HE)?Array.from(new Set(r)):null;if(i!==null)for(const a of n)a.domain=i}function LU(t,e,n){const{ratio:r}=n;return r==null?e:YE({type:t})?NU(e,r,t):HE({type:t})?IU(e,r):e}function NU(t,e,n){const r=t.map(Number),i=new Kr({domain:r,range:[r[0],r[0]+(r[r.length-1]-r[0])*e]});return n==="time"?t.map(a=>new Date(i.map(a))):t.map(a=>i.map(a))}function IU(t,e){const n=Math.round(t.length*e);return t.slice(0,n)}function YE(t){const{type:e}=t;return typeof e!="string"?!1:["linear","log","pow","time"].includes(e)}function HE(t){const{type:e}=t;return typeof e!="string"?!1:["band","point","ordinal"].includes(e)}function jU(t,e,n){const{type:r,domain:i,range:a,quantitative:o,ordinal:s}=n;return r!==void 0?r:ZU(e)?"identity":typeof a=="string"?"linear":(i||a||[]).length>2?Im(t,s):i!==void 0?XE([i])?Im(t,s):qE(e)?"time":VE(t,a,o):XE(e)?Im(t,s):qE(e)?"time":VE(t,a,o)}function RU(t,e,n,r){const{domain:i}=r;if(i!==void 0)return i;switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":case"quantize":case"threshold":return UE($U(n,r),r);case"band":case"ordinal":case"point":return VU(n);case"quantile":return UU(n);case"sequential":return UE(XU(n),r);default:return[]}}function DU(t,e,n,r,i,a,o){const{range:s}=r;if(typeof s=="string")return FU(s);if(s!==void 0)return s;const{rangeMin:c,rangeMax:l}=r;switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":{const u=$E(n,r,i,a,o),[f,d]=qU(e,u);return[c!=null?c:f,l!=null?l:d]}case"band":case"point":{const u=e==="size"?5:0,f=e==="size"?10:1;return[c!=null?c:u,l!=null?l:f]}case"ordinal":return $E(n,r,i,a,o);case"sequential":return;case"constant":return[n[0][0]];default:return[]}}function BU(t,e,n,r,i){switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":return WU(i,r);case"band":case"point":return YU(t,e,i,r);case"sequential":return GU(r);default:return r}}function $E(t,e,n,r,i){const[a]=In("palette",i),{category10:o,category20:s}=r,c=lG(t.flat()).length<=o.length?o:s,{palette:l=c,offset:u}=e;if(Array.isArray(l))return l;try{return a({type:l})}catch(f){const d=zU(l,n,u);if(d)return d;throw new Error(`Unknown Component: ${l} `)}}function FU(t){return t.split("-")}function zU(t,e,n=r=>r){if(!t)return null;const r=qo(t),i=Qt[`scheme${r}`],a=Qt[`interpolate${r}`];if(!i&&!a)return null;if(i){if(!i.some(Array.isArray))return i;const o=i[e.length];if(o)return o}return e.map((o,s)=>a(n(s/e.length)))}function GU(t){const{palette:e="ylGnBu",offset:n}=t,r=qo(e),i=Qt[`interpolate${r}`];if(!i)throw new Error(`Unknown palette: ${r}`);return{interpolator:n?a=>i(n(a)):i}}function WU(t,e){const{interpolate:n=xf,nice:r=!1,tickCount:i=5}=e;return Object.assign(Object.assign({},e),{interpolate:n,nice:r,tickCount:i})}function YU(t,e,n,r){if(r.padding!==void 0||r.paddingInner!==void 0||r.paddingOuter!==void 0)return Object.assign(Object.assign({},r),{unknown:NaN});const i=HU(t,e,n),{paddingInner:a=i,paddingOuter:o=i}=r;return Object.assign(Object.assign({},r),{paddingInner:a,paddingOuter:o,padding:i,unknown:NaN})}function HU(t,e,n){return e==="enterDelay"||e==="enterDuration"||e==="size"?0:t==="band"?iE(n)?0:.1:t==="point"?.5:0}function Im(t,e){return e||(KU(t)?"point":"ordinal")}function VE(t,e,n){return n||(t!=="color"||e?"linear":"sequential")}function UE(t,e){if(t.length===0)return t;const{domainMin:n,domainMax:r}=e,[i,a]=t;return[n!=null?n:i,r!=null?r:a]}function $U(t,e){const{zero:n=!1}=e;let r=1/0,i=-1/0;for(const a of t)for(const o of a)bn(o)&&(r=Math.min(r,+o),i=Math.max(i,+o));return r===1/0?[]:n?[Math.min(0,r),i]:[r,i]}function VU(t){return Array.from(new Set(t.flat()))}function UU(t){return t.flat().sort()}function XU(t){let e=1/0,n=-1/0;for(const r of t)for(const i of r)bn(i)&&(e=Math.min(e,+i),n=Math.max(n,+i));return e===1/0?[]:[e<0?-n:e,n]}function qU(t,e){return t==="enterDelay"?[0,1e3]:t=="enterDuration"?[300,1e3]:t.startsWith("y")||t.startsWith("position")?[1,0]:t==="color"?[cG(e),Cw(e)]:t==="opacity"?[0,1]:t==="size"?[1,10]:[0,1]}function XE(t){return jm(t,e=>{const n=typeof e;return n==="string"||n==="boolean"})}function qE(t){return jm(t,e=>e instanceof Date)}function ZU(t){return jm(t,sf)}function jm(t,e){for(const n of t)if(n.some(e))return!0;return!1}function KU(t){return t.startsWith("x")||t.startsWith("y")||t.startsWith("position")||t.startsWith("size")}function QU(t){return t.startsWith("x")||t.startsWith("y")||t.startsWith("position")||t==="enterDelay"||t==="enterDuration"||t==="updateDelay"||t==="updateDuration"||t==="exitDelay"||t==="exitDuration"}function JU(t){if(!t||!t.type)return!1;if(typeof t.type=="function")return!0;const{type:e,domain:n,range:r,interpolator:i}=t,a=n&&n.length>0,o=r&&r.length>0;return!!(["linear","sqrt","log","time","pow","threshold","quantize","quantile","ordinal","band","point"].includes(e)&&a&&o||["sequential"].includes(e)&&a&&(o||i)||["constant","identity"].includes(e)&&o)}const tX={linear:"linear",identity:"identity",log:"log",pow:"pow",sqrt:"sqrt",sequential:"sequential"},eX={threshold:"threshold",quantize:"quantize",quantile:"quantile"},nX={ordinal:"ordinal",band:"band",point:"point"},rX={constant:"constant"};var os=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function iX(t,e,n){const{coordinates:r=[],title:i}=e,[,a]=In("component",n),o=t.filter(({guide:u})=>u!==null),s=[],c=pX(e,t,n);if(s.push(...c),i){const{props:u}=a("title"),{defaultPosition:f,defaultOrientation:d,defaultOrder:h,defaultSize:p,defaultCrossPadding:v}=u,g=typeof i=="string"?{title:i}:i;s.push(Object.assign({type:"title",position:f,orientation:d,order:h,crossPadding:v[0],defaultSize:p},g))}return lX(o,r).forEach(([u,f])=>{const{props:d}=a(u),{defaultPosition:h,defaultPlane:p="xy",defaultOrientation:v,defaultSize:g,defaultOrder:y,defaultLength:m,defaultPadding:b=[0,0],defaultCrossPadding:x=[0,0]}=d,_=dt({},...f),{guide:O,field:w}=_,S=Array.isArray(O)?O:[O];for(const M of S){const[E,P]=dX(u,h,v,M,f,o,r);if(!E&&!P)continue;const L=E==="left"||E==="right",A=L?b[1]:b[0],T=L?x[1]:x[0],{size:C,order:N=y,length:B=m,padding:j=A,crossPadding:D=T}=M;s.push(Object.assign(Object.assign({title:w},M),{defaultSize:g,length:B,position:E,plane:p,orientation:P,padding:j,order:N,crossPadding:D,size:C,type:u,scales:f}))}}),s}function ZE(t,e,n,r,i){const[a]=In("component",r),{scaleInstances:o,scale:s,bbox:c}=t,l=os(t,["scaleInstances","scale","bbox"]),u={bbox:c,library:r};return a(l)({coordinate:e,library:r,markState:i,scales:o,theme:n,value:u,scale:s})}function aX(t){return t.map(e=>{const n=dt(e,e.style);return delete n.style,n})}function Emt(t){return t.flatMap(e=>e.type=="group"?e.children:e)}function KE(t,e){const n=["left","right","bottom","top"];return Qh(t,({type:a,position:o,group:s})=>n.includes(o)?s===void 0?a.startsWith("legend")?`legend-${o}`:Symbol("independent"):s==="independent"?Symbol("independent"):s:Symbol("independent")).flatMap(([,a])=>{if(a.length===1)return a[0];if(e!==void 0){const u=a.filter(v=>v.length!==void 0).map(v=>v.length),f=Qi(u);if(f>e)return a.forEach(v=>v.group=Symbol("independent")),a;const d=e-f,h=a.length-u.length,p=d/h;a.forEach(v=>{v.length===void 0&&(v.length=p)})}const o=sn(a,u=>u.size),s=sn(a,u=>u.order),c=sn(a,u=>u.crossPadding),l=a[0].position;return{type:"group",size:o,order:s,position:l,children:a,crossPadding:c}})}function oX(t,e){const n=["shape","size","color","opacity"],r=(d,h)=>d==="constant"&&h==="size",i=t.filter(({type:d,name:h})=>typeof d=="string"&&n.includes(h)&&!r(d,h)),a=i.filter(({type:d})=>d==="constant"),o=i.filter(({type:d})=>d!=="constant"),c=Qh(o,d=>d.field?d.field:Symbol("independent")).map(([d,h])=>[d,[...h,...a]]).filter(([,d])=>d.some(h=>h.type!=="constant")),l=new Map(c);if(l.size===0)return[];const u=d=>d.sort(([h],[p])=>h.localeCompare(p));return Array.from(l).map(([,d])=>{const p=uG(d).sort((v,g)=>g.length-v.length).map(v=>({combination:v,option:v.map(g=>[g.name,sX(g)])}));for(const{option:v,combination:g}of p)if(!v.every(y=>y[1]==="constant")&&v.every(y=>y[1]==="discrete"||y[1]==="constant"))return["legendCategory",g];for(const[v,g]of hG)for(const{option:y,combination:m}of p)if(g.some(b=>Nw(u(b),u(y))))return[v,m];return null}).filter(bn)}function sX(t){const{type:e}=t;return typeof e!="string"?null:e in tX?"continuous":e in nX?"discrete":e in eX?"distribution":e in rX?"constant":null}function cX(t,e){return t.map(n=>{const{name:r}=n;if(pV(e)||iE(e)||jl(e)&&(fc(e)||jf(e)))return null;if(r.startsWith("x"))return fc(e)?["axisArc",[n]]:jf(e)?["axisLinear",[n]]:[jl(e)?"axisY":"axisX",[n]];if(r.startsWith("y"))return fc(e)?["axisLinear",[n]]:jf(e)?["axisArc",[n]]:[jl(e)?"axisX":"axisY",[n]];if(r.startsWith("z"))return["axisZ",[n]];if(r.startsWith("position")){if(yV(e))return["axisRadar",[n]];if(!fc(e))return["axisY",[n]]}return null}).filter(bn)}function lX(t,e){const n=t.filter(r=>JU(r));return[...oX(n,e),...cX(n,e)]}function Rm(t){const e=_a(t,"polar");if(e.length){const r=e[e.length-1],{startAngle:i,endAngle:a}=Iw(r);return[i,a]}const n=_a(t,"radial");if(n.length){const r=n[n.length-1],{startAngle:i,endAngle:a}=jw(r);return[i,a]}return[-Math.PI/2,Math.PI/2*3]}function uX(t){const e=/position(\d*)/g.exec(t);return e?+e[1]:null}function fX(t,e,n,r,i){const{name:a}=n[0];if(t==="axisRadar"){const o=r.filter(f=>f.name.startsWith("position")),s=uX(a);if(a===o.slice(-1)[0].name||s===null)return[null,null];const[c,l]=Rm(i);return["center",(l-c)/(o.length-1)*s+c]}if(t==="axisY"&&vV(i))return jl(i)?["center","horizontal"]:["center","vertical"];if(t==="axisLinear"){const[o]=Rm(i);return["center",o]}return t==="axisArc"?e[0]==="inner"?["inner",null]:["outer",null]:fc(i)?["center",null]:jf(i)?["center",null]:t==="axisX"&&gV(i)||t==="axisX"&&mV(i)?["top",null]:e}function dX(t,e,n,r,i,a,o){const[s]=Rm(o),c=[r.position||e,s!=null?s:n];return typeof t=="string"&&t.startsWith("axis")?fX(t,c,i,a,o):typeof t=="string"&&t.startsWith("legend")&&fc(o)&&r.position==="center"?["center","vertical"]:c}function hX(t,e,n=[]){return t==="x"?jl(n)?`${e}Y`:`${e}X`:t==="y"?jl(n)?`${e}X`:`${e}Y`:null}function pX(t,e,n){const[,r]=In("component",n),{coordinates:i}=t;function a(o,s,c,l){const u=hX(s,o,i);if(!l||!u)return;const{props:f}=r(u),{defaultPosition:d,defaultSize:h,defaultOrder:p,defaultCrossPadding:[v]}=f;return Object.assign(Object.assign({position:d,defaultSize:h,order:p,type:u,crossPadding:v},l),{scales:[c]})}return e.filter(o=>o.slider||o.scrollbar).flatMap(o=>{const{slider:s,scrollbar:c,name:l}=o;return[a("slider",l,o,s),a("scrollbar",l,o,c)]}).filter(o=>!!o)}function QE(t,e,n,r,i,a){const{type:o}=t;if(!["left","right","bottom","top"].includes(r)||typeof o!="string")return;const c=o;return(()=>c.startsWith("axis")?bX:c.startsWith("group")?vX:c.startsWith("legendContinuous")?xX:c==="legendCategory"?_X:c.startsWith("slider")?mX:c==="title"?yX:c.startsWith("scrollbar")?gX:()=>{})()(t,e,n,r,i,a)}function vX(t,e,n,r,i,a){const{children:o}=t,s=sn(o,l=>l.crossPadding);o.forEach(l=>l.crossPadding=s),o.forEach(l=>QE(l,e,n,r,i,a));const c=sn(o,l=>l.size);t.size=c,o.forEach(l=>l.size=c)}function gX(t,e,n,r,i,a){const{trackSize:o=6}=dt({},i.scrollbar,t);t.size=o}function yX(t,e,n,r,i,a){const o=dt({},i.title,t),{title:s,subtitle:c,spacing:l=0}=o,u=os(o,["title","subtitle","spacing"]);if(s){const f=At(u,"title"),d=$p(s,f);t.size=d.height}if(c){const f=At(u,"subtitle"),d=$p(c,f);t.size+=l+d.height}}function mX(t,e,n,r,i,a){const o=()=>{const{slider:u}=i;return dt({},u,t)},{trackSize:s,handleIconSize:c}=o(),l=Math.max(s,c*2.4);t.size=l}function bX(t,e,n,r,i,a){t.transform=t.transform||[{type:"hide"}];const o=r==="left"||r==="right",s=JE(t,r,i),{tickLength:c=0,labelSpacing:l=0,titleSpacing:u=0,labelAutoRotate:f}=s,d=os(s,["tickLength","labelSpacing","titleSpacing","labelAutoRotate"]),h=Wp(t,a),p=Yp(d,h),v=c+l;if(p&&p.length){const y=sn(p,b=>b.width),m=sn(p,b=>b.height);if(o)t.size=y+v;else{const{tickFilter:b,labelTransform:x}=t;SX(h,p,e,n,b)&&!x&&f!==!1&&f!==null?(t.labelTransform="rotate(90)",t.size=y+v):t.size=m+v}}else t.size=c;const g=Hp(d);g&&(o?t.size+=u+g.width:t.size+=u+g.height)}function xX(t,e,n,r,i,a){const s=(()=>{const{legendContinuous:x}=i;return dt({},x,t)})(),{labelSpacing:c=0,titleSpacing:l=0}=s,u=os(s,["labelSpacing","titleSpacing"]),f=r==="left"||r==="right",d=At(u,"ribbon"),{size:h}=d,p=At(u,"handleIcon"),{size:v}=p,g=Math.max(h,v*2.4);t.size=g;const y=Wp(t,a),m=Yp(u,y);if(m){const x=f?"width":"height",_=sn(m,O=>O[x]);t.size+=_+c}const b=Hp(u);b&&(f?t.size=Math.max(t.size,b.width):t.size+=l+b.height)}function _X(t,e,n,r,i,a){const s=(()=>{const{legendCategory:T}=i,{title:C}=t,[N,B]=Array.isArray(C)?[C,void 0]:[void 0,C];return dt({title:N},T,Object.assign(Object.assign({},t),{title:B}))})(),{itemSpacing:c,itemMarkerSize:l,titleSpacing:u,rowPadding:f,colPadding:d,maxCols:h=1/0,maxRows:p=1/0}=s,v=os(s,["itemSpacing","itemMarkerSize","titleSpacing","rowPadding","colPadding","maxCols","maxRows"]),{cols:g,length:y}=t,m=T=>Math.min(T,p),b=T=>Math.min(T,h),x=r==="left"||r==="right",_=y===void 0?e+(x?0:n[0]+n[1]):y,O=Hp(v),w=Wp(t,a),S=Yp(v,w,"itemLabel"),M=Math.max(S[0].height,l)+f,E=(T,C=0)=>l+T+c[0]+C;x?(()=>{let T=-1/0,C=0,N=1,B=0,j=-1/0,D=-1/0;const G=O?O.height:0,Y=_-G;for(const{width:U}of S){const V=E(U,d);T=Math.max(T,V),C+M>Y?(N++,j=Math.max(j,B),D=Math.max(D,C),B=1,C=M):(C+=M,B++)}N<=1&&(j=B,D=C),t.size=T*b(N),t.length=D+G,dt(t,{cols:b(N),gridRow:j})})():typeof g=="number"?(()=>{const T=Math.ceil(S.length/g),C=sn(S,N=>E(N.width))*g;t.size=M*m(T)-f,t.length=Math.min(C,_)})():(()=>{let T=1,C=0,N=-1/0;for(const{width:B}of S){const j=E(B,d);C+j>_?(N=Math.max(N,C),C=j,T++):C+=j}T===1&&(N=C),t.size=M*m(T)-f,t.length=N})(),O&&(x?t.size=Math.max(t.size,O.width):t.size+=u+O.height)}function Wp(t,e){const[n]=In("scale",e),{scales:r,tickCount:i,tickMethod:a}=t,o=r.find(s=>s.type!=="constant"&&s.type!=="identity");return i!==void 0&&(o.tickCount=i),a!==void 0&&(o.tickMethod=a),n(o)}function Yp(t,e,n="label"){const{labelFormatter:r,tickFilter:i,label:a=!0}=t,o=os(t,["labelFormatter","tickFilter","label"]);if(!a)return null;const s=OX(e,r,i),c=At(o,n),l=s.map((d,h)=>Object.fromEntries(Object.entries(c).map(([p,v])=>[p,typeof v=="function"?v(d,h):v]))),u=s.map((d,h)=>{const p=l[h];return $p(d,p)});if(!l.some(d=>d.transform)){const d=s.map((h,p)=>p);t.indexBBox=new Map(d.map(h=>[h,[s[h],u[h]]]))}return u}function Hp(t){const e=l=>l===!1||l===null,{title:n}=t,r=os(t,["title"]);if(e(n)||n===void 0)return null;const i=At(r,"title"),{direction:a,transform:o}=i,s=Array.isArray(n)?n.join(","):n;return typeof s!="string"?null:$p(s,Object.assign(Object.assign({},i),{transform:o||(a==="vertical"?"rotate(-90)":"")}))}function JE(t,e,n){const{title:r}=t,[i,a]=Array.isArray(r)?[r,void 0]:[void 0,r],{axis:o,[`axis${Ty(e)}`]:s}=n;return dt({title:i},o,s,Object.assign(Object.assign({},t),{title:a}))}function tP(t,e){const n=t.getTicks?t.getTicks():t.getOptions().domain;return e?n.filter(e):n}function OX(t,e,n){const i=tP(t,n).map(o=>typeof o=="number"?np(o):o),a=e?typeof e=="string"?Zo(e):e:t.getFormatter?t.getFormatter():o=>`${o}`;return i.map(a)}function wX(t,e){return t.getBandWidth?t.getBandWidth(e)/2:0}function SX(t,e,n,r,i){if(Qi(e,h=>h.width)>n)return!0;const o=t.clone();o.update({range:[0,n]});const s=tP(t,i),c=s.map(h=>o.map(h)+wX(o,h)),l=s.map((h,p)=>p),u=-r[0],f=n+r[1],d=(h,p)=>{const{width:v}=p;return[h-v/2,h+v/2]};for(let h=0;h<l.length;h++){const p=c[h],[v,g]=d(p,e[h]);if(v<u||g>f)return!0;const y=c[h+1];if(y){const[m]=d(y,e[h+1]);if(g>m)return!0}}return!1}function $p(t,e){const n=MX(t),{filter:r}=e,i=os(e,["filter"]);return n.attr(Object.assign(Object.assign({},i),{visibility:"none"})),n.getBBox()}function MX(t){return t instanceof qr?t:new Di({style:{text:`${t}`}})}function Bi(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function EX(t){const e=t.find(({type:n})=>n==="axisZ");if(e){const n=t.find(({type:i})=>i==="axisX");n.plane="xy";const r=t.find(({type:i})=>i==="axisY");r.plane="xy",e.plane="yz",e.origin=[n.bbox.x,n.bbox.y,0],e.eulerAngles=[0,-90,0],e.bbox.x=n.bbox.x,e.bbox.y=n.bbox.y,t.push(Object.assign(Object.assign({},n),{plane:"xz",showLabel:!1,showTitle:!1,origin:[n.bbox.x,n.bbox.y,0],eulerAngles:[-90,0,0]})),t.push(Object.assign(Object.assign({},r),{plane:"yz",showLabel:!1,showTitle:!1,origin:[r.bbox.x+r.bbox.width,r.bbox.y,0],eulerAngles:[0,-90,0]})),t.push(Object.assign(Object.assign({},e),{plane:"xz",actualPosition:"left",showLabel:!1,showTitle:!1,eulerAngles:[90,-90,0]}))}}function PX(t,e,n,r){var i,a;const{width:o,height:s,depth:c,x:l=0,y:u=0,z:f=0,inset:d=(i=n.inset)!==null&&i!==void 0?i:0,insetLeft:h=d,insetTop:p=d,insetBottom:v=d,insetRight:g=d,margin:y=(a=n.margin)!==null&&a!==void 0?a:0,marginLeft:m=y,marginBottom:b=y,marginTop:x=y,marginRight:_=y,padding:O=n.padding,paddingBottom:w=O,paddingLeft:S=O,paddingRight:M=O,paddingTop:E=O}=TX(t,e,n,r),P=1/4,L=(wt,Gt,Ut,te,ie)=>{const{marks:ye}=e;if(ye.length===0)return[te,ie];if(wt-te-ie-wt*P>0)return[te,ie];const we=wt*(1-P);return[Gt==="auto"?we*te/(te+ie):te,Ut==="auto"?we*ie/(te+ie):ie]},A=wt=>wt==="auto"?20:wt!=null?wt:20,T=A(E),C=A(w),N=eP(t,s-T-C,[T+x,C+b],["left","right"],e,n,r),{paddingLeft:B,paddingRight:j}=N,D=o-m-_,[G,Y]=L(D,S,M,B,j),U=D-G-Y,V=eP(t,U,[G+m,Y+_],["bottom","top"],e,n,r),{paddingTop:it,paddingBottom:pt}=V,Ot=s-b-x,[ht,ut]=L(Ot,w,E,pt,it),Lt=Ot-ht-ut;return{width:o,height:s,depth:c,insetLeft:h,insetTop:p,insetBottom:v,insetRight:g,innerWidth:U,innerHeight:Lt,paddingLeft:G,paddingRight:Y,paddingTop:ut,paddingBottom:ht,marginLeft:m,marginBottom:b,marginTop:x,marginRight:_,x:l,y:u,z:f}}function AX(t){const{height:e,width:n,padding:r=0,paddingLeft:i=r,paddingRight:a=r,paddingTop:o=r,paddingBottom:s=r,margin:c=16,marginLeft:l=c,marginRight:u=c,marginTop:f=c,marginBottom:d=c,inset:h=0,insetLeft:p=h,insetRight:v=h,insetTop:g=h,insetBottom:y=h}=t,m=_=>_==="auto"?20:_,b=n-m(i)-m(a)-l-u-p-v,x=e-m(o)-m(s)-f-d-g-y;return{width:b,height:x}}function TX(t,e,n,r){const{coordinates:i}=e;if(!fc(i)&&!jf(i))return e;const a=t.filter(y=>typeof y.type=="string"&&y.type.startsWith("axis"));if(a.length===0)return e;const o=a.map(y=>{const m=y.type==="axisArc"?"arc":"linear";return JE(y,m,n)}),s=sn(o,y=>{var m;return(m=y.labelSpacing)!==null&&m!==void 0?m:0}),c=a.flatMap((y,m)=>{const b=o[m],x=Wp(y,r);return Yp(b,x)}).filter(bn),l=sn(c,y=>y.height)+s,u=a.flatMap((y,m)=>{const b=o[m];return Hp(b)}).filter(y=>y!==null),f=u.length===0?0:sn(u,y=>y.height),{inset:d=l,insetLeft:h=d,insetBottom:p=d,insetTop:v=d+f,insetRight:g=d}=e;return Object.assign(Object.assign({},e),{insetLeft:h,insetBottom:p,insetTop:v,insetRight:g})}function eP(t,e,n,r,i,a,o){const s=Bn(t,p=>p.position),{padding:c=a.padding,paddingLeft:l=c,paddingRight:u=c,paddingBottom:f=c,paddingTop:d=c}=i,h={paddingBottom:f,paddingLeft:l,paddingTop:d,paddingRight:u};for(const p of r){const v=`padding${Ty(MM(p))}`,g=s.get(p)||[],y=h[v],m=M=>{M.size===void 0&&(M.size=M.defaultSize)},b=M=>{M.type==="group"?(M.children.forEach(m),M.size=sn(M.children,E=>E.size)):M.size=M.defaultSize},x=M=>{M.size||(y!=="auto"?b(M):(QE(M,e,n,p,a,o),m(M)))},_=M=>{M.type.startsWith("axis")&&M.labelAutoHide===void 0&&(M.labelAutoHide=!0)},O=p==="bottom"||p==="top",w=Bi(g,M=>M.order),S=g.filter(M=>M.type.startsWith("axis")&&M.order==w);if(S.length&&(S[0].crossPadding=0),typeof y=="number")g.forEach(m),g.forEach(_);else if(g.length===0)h[v]=0;else{const M=O?e+n[0]+n[1]:e,E=KE(g,M);E.forEach(x);const P=E.reduce((L,{size:A,crossPadding:T=12})=>L+A+T,0);h[v]=P}}return h}function CX(t,e,n){const r=Bn(t,O=>`${O.plane||"xy"}-${O.position}`),{paddingLeft:i,paddingRight:a,paddingTop:o,paddingBottom:s,marginLeft:c,marginTop:l,marginBottom:u,marginRight:f,innerHeight:d,innerWidth:h,insetBottom:p,insetLeft:v,insetRight:g,insetTop:y,height:m,width:b,depth:x}=n,_={xy:Dm({width:b,height:m,paddingLeft:i,paddingRight:a,paddingTop:o,paddingBottom:s,marginLeft:c,marginTop:l,marginBottom:u,marginRight:f,innerHeight:d,innerWidth:h,insetBottom:p,insetLeft:v,insetRight:g,insetTop:y}),yz:Dm({width:x,height:m,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,marginLeft:0,marginTop:0,marginBottom:0,marginRight:0,innerWidth:x,innerHeight:m,insetBottom:0,insetLeft:0,insetRight:0,insetTop:0}),xz:Dm({width:b,height:x,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,marginLeft:0,marginTop:0,marginBottom:0,marginRight:0,innerWidth:b,innerHeight:x,insetBottom:0,insetLeft:0,insetRight:0,insetTop:0})};for(const[O,w]of r.entries()){const[S,M]=O.split("-"),E=_[S][M],[P,L]=kw(w,A=>typeof A.type!="string"?!1:!!(M==="center"||A.type.startsWith("axis")&&["inner","outer"].includes(M)));P.length&&kX(P,e,E,M),L.length&&zX(w,e,E)}}function Dm({width:t,height:e,paddingLeft:n,paddingRight:r,paddingTop:i,paddingBottom:a,marginLeft:o,marginTop:s,marginBottom:c,marginRight:l,innerHeight:u,innerWidth:f,insetBottom:d,insetLeft:h,insetRight:p,insetTop:v}){const g=n+o,y=i+s,m=r+l,b=a+c,x=t-o-l,_=[g+h,y+v,f-h-p,u-v-d,"center",null,null];return{top:[g,0,f,y,"vertical",!0,qn,o,x],right:[t-m,y,m,u,"horizontal",!1,qn],bottom:[g,e-b,f,b,"vertical",!1,qn,o,x],left:[0,y,g,u,"horizontal",!0,qn],"top-left":[g,0,f,y,"vertical",!0,qn],"top-right":[g,0,f,y,"vertical",!0,qn],"bottom-left":[g,e-b,f,b,"vertical",!1,qn],"bottom-right":[g,e-b,f,b,"vertical",!1,qn],center:_,inner:_,outer:_}}function kX(t,e,n,r){const[i,a]=kw(t,o=>!!(typeof o.type=="string"&&o.type.startsWith("axis")));LX(i,e,n,r),GX(a,e,n)}function LX(t,e,n,r){r==="center"?pG(e)?FX(t,e,n,r):xn(e)?jX(t,e,n):ff(e)&&RX(t,e,n,t[0].orientation):r==="inner"?NX(t,e,n):r==="outer"&&IX(t,e,n)}function NX(t,e,n){const[r,i,,a]=n,[o,s]=e.getCenter(),[c]=rp(e),l=a/2,u=c*l,f=o-u,d=s-u;for(let h=0;h<t.length;h++){const p=t[h];p.bbox={x:r+f,y:i+d,width:u*2,height:u*2}}}function IX(t,e,n){const[r,i,a,o]=n;for(const s of t)s.bbox={x:r,y:i,width:a,height:o}}function jX(t,e,n){const[r,i,a,o]=n;for(const s of t)s.bbox={x:r,y:i,width:a,height:o}}function RX(t,e,n,r){r==="horizontal"?BX(t,e,n):r==="vertical"&&DX(t,e,n)}function DX(t,e,n){const[r,i,,a]=n,o=new Array(t.length).fill(0),c=e.map(o).filter((l,u)=>u%2===0).map(l=>l+r);for(let l=0;l<t.length;l++){const u=t[l],f=c[l],d=c[l+1]-f;u.bbox={x:f,y:i,width:d,height:a}}}function BX(t,e,n){const[r,i,a]=n,o=new Array(t.length).fill(0),c=e.map(o).filter((l,u)=>u%2===1).map(l=>l+i);for(let l=0;l<t.length;l++){const u=t[l],f=c[l],d=c[l+1]-f;u.bbox={x:r,y:f,width:a,height:d}}}function FX(t,e,n,r){const[i,a,o,s]=n;for(const c of t)c.bbox={x:i,y:a,width:o,height:s},c.radar={index:t.indexOf(c),count:t.length}}function zX(t,e,n){const[r,i,a,o,s,c,l,u,f]=n,[d,h,p,v,g,y,m,b]=s==="vertical"?["y",i,"x",r,"height",o,"width",a]:["x",r,"y",i,"width",a,"height",o];t.sort((M,E)=>l==null?void 0:l(M.order,E.order));const x=M=>M==="title"||M==="group"||M.startsWith("legend"),_=(M,E,P)=>P===void 0?E:x(M)?P:E,O=(M,E,P)=>P===void 0?E:x(M)?P:E,w=c?h+y:h;for(let M=0,E=w;M<t.length;M++){const P=t[M],{crossPadding:L=0,type:A}=P,{size:T}=P;P.bbox={[d]:c?E-T-L:E+L,[p]:O(A,v,u),[g]:T,[m]:_(A,b,f)},E+=(T+L)*(c?-1:1)}const S=t.filter(M=>M.type==="group");for(const M of S){const{bbox:E,children:P}=M,L=E[m],A=L/P.length,T=P.reduce((D,G)=>{var Y;const U=(Y=G.layout)===null||Y===void 0?void 0:Y.justifyContent;return U||D},"flex-start"),C=P.map((D,G)=>{const{length:Y=A,padding:U=0}=D;return Y+(G===P.length-1?0:U)}),N=Qi(C),B=L-N,j=T==="flex-start"?0:T==="center"?B/2:B;for(let D=0,G=E[p]+j;D<P.length;D++){const Y=P[D],{padding:U=0}=Y,V=D===P.length-1?0:U;Y.bbox={[g]:E[g],[d]:E[d],[p]:G,[m]:C[D]-V},dt(Y,{layout:{justifyContent:T}}),G+=C[D]}}}function GX(t,e,n){if(t.length===0)return;const[r,i,a,o]=n,[s]=rp(e),c=o/2*s/Math.sqrt(2),l=r+a/2,u=i+o/2;for(let f=0;f<t.length;f++){const d=t[f];d.bbox={x:l-c,y:u-c,width:c*2,height:c*2}}}function Wa(t,e,n={},r=!1){if(po(t)||Array.isArray(t)&&r)return t;const i=At(t,e);return dt(n,i)}function Vp(t,e={}){return po(t)||Array.isArray(t)||!nP(t)?t:dt(e,t)}function nP(t){if(Object.keys(t).length===0)return!0;const{title:e,items:n}=t;return e!==void 0||n!==void 0}function Ya(t,e){return typeof t=="object"?At(t,e):t}var WX=function(t,e,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{l(r.next(u))}catch(f){o(f)}}function c(u){try{l(r.throw(u))}catch(f){o(f)}}function l(u){u.done?a(u.value):i(u.value).then(s,c)}l((r=r.apply(t,e||[])).next())})},Dl=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function YX(t,e,n){const{encode:r={},scale:i={},transform:a=[]}=e,o=Dl(e,["encode","scale","transform"]);return[t,Object.assign(Object.assign({},o),{encode:r,scale:i,transform:a})]}function rP(t,e,n){return WX(this,void 0,void 0,function*(){const{library:r}=n,{data:i}=e,[a]=In("data",r),o=nq(i),{transform:s=[]}=o,u=[Dl(o,["transform"]),...s].map(a),f=yield Uz(u)(i),d=i&&!Array.isArray(i)&&!Array.isArray(f)?{value:f}:f;return[Array.isArray(f)?ec(f):[],Object.assign(Object.assign({},e),{data:d})]})}function HX(t,e,n){const{encode:r}=e;if(!r)return[t,e];const i={};for(const[a,o]of Object.entries(r))if(Array.isArray(o))for(let s=0;s<o.length;s++){const c=`${a}${s===0?"":s}`;i[c]=o[s]}else i[a]=o;return[t,Object.assign(Object.assign({},e),{encode:i})]}function $X(t,e,n){const{encode:r,data:i}=e;if(!r)return[t,e];const a=Ko(r,o=>JX(o)?o:{type:tq(i,o),value:o});return[t,Object.assign(Object.assign({},e),{encode:a})]}function VX(t,e,n){const{encode:r}=e;if(!r)return[t,e];const i=Ko(r,(a,o)=>{const{type:s}=a;return s!=="constant"||QU(o)?a:Object.assign(Object.assign({},a),{constant:!0})});return[t,Object.assign(Object.assign({},e),{encode:i})]}function UX(t,e,n){const{encode:r,data:i}=e;if(!r)return[t,e];const{library:a}=n,o=aq(a),s=Ko(r,c=>o(i,c));return[t,Object.assign(Object.assign({},e),{encode:s})]}function XX(t,e,n){const{tooltip:r={}}=e;return po(r)?[t,e]:Array.isArray(r)?[t,Object.assign(Object.assign({},e),{tooltip:{items:r}})]:sf(r)&&nP(r)?[t,Object.assign(Object.assign({},e),{tooltip:r})]:[t,Object.assign(Object.assign({},e),{tooltip:{items:[r]}})]}function qX(t,e,n){const{data:r,encode:i,tooltip:a={}}=e;if(po(a))return[t,e];const o=f=>{if(!f)return f;if(typeof f=="string")return t.map(d=>({name:f,value:r[d][f]}));if(sf(f)){const{field:d,channel:h,color:p,name:v=d,valueFormatter:g=O=>O}=f,y=typeof g=="string"?Zo(g):g,m=h&&i[h],b=m&&i[h].field,x=v||b||h,_=[];for(const O of t){const w=d?r[O][d]:m?i[h].value[O]:null;_[O]={name:x,color:p,value:y(w)}}return _}if(typeof f=="function"){const d=[];for(const h of t){const p=f(r[h],h,r,i);sf(p)?d[h]=p:d[h]={value:p}}return d}return f},{title:s,items:c=[]}=a,l=Dl(a,["title","items"]),u=Object.assign({title:o(s),items:Array.isArray(c)?c.map(o):[]},l);return[t,Object.assign(Object.assign({},e),{tooltip:u})]}function ZX(t,e,n){const{encode:r}=e,i=Dl(e,["encode"]);if(!r)return[t,e];const a=Object.entries(r),o=a.filter(([,c])=>{const{value:l}=c;return Array.isArray(l[0])}).flatMap(([c,l])=>{const u=[[c,new Array(t.length).fill(void 0)]],{value:f}=l,d=Dl(l,["value"]);for(let h=0;h<f.length;h++){const p=f[h];if(Array.isArray(p))for(let v=0;v<p.length;v++){const g=u[v]||[`${c}${v}`,new Array(t).fill(void 0)];g[1][h]=p[v],u[v]=g}}return u.map(([h,p])=>[h,Object.assign({type:"column",value:p},d)])}),s=Object.fromEntries([...a,...o]);return[t,Object.assign(Object.assign({},i),{encode:s})]}function KX(t,e,n){const{axis:r={},legend:i={},slider:a={},scrollbar:o={}}=e,s=(l,u)=>{if(typeof l=="boolean")return l?{}:null;const f=l[u];return f===void 0||f?f:null},c=typeof r=="object"?Array.from(new Set(["x","y",...Object.keys(r)])):["x","y"];return dt(e,{scale:Object.assign(Object.assign({},Object.fromEntries(c.map(l=>{const u=s(o,l);return[l,Object.assign({guide:s(r,l),slider:s(a,l),scrollbar:u},u&&{ratio:u.ratio===void 0?.5:u.ratio})]}))),{color:{guide:s(i,"color")},size:{guide:s(i,"size")},shape:{guide:s(i,"shape")},opacity:{guide:s(i,"opacity")}})}),[t,e]}function QX(t,e,n){const{animate:r}=e;return r||r===void 0?[t,e]:(dt(e,{animate:{enter:{type:null},exit:{type:null},update:{type:null}}}),[t,e])}function JX(t){if(typeof t!="object"||t instanceof Date||t===null)return!1;const{type:e}=t;return bn(e)}function tq(t,e){return typeof e=="function"?"transform":typeof e=="string"&&eq(t,e)?"field":"constant"}function eq(t,e){return Array.isArray(t)?t.some(n=>n[e]!==void 0):!1}function nq(t){if(er(t))return{type:"inline",value:t};if(!t)return{type:"inline",value:null};if(Array.isArray(t))return{type:"inline",value:t};const{type:e="inline"}=t,n=Dl(t,["type"]);return Object.assign(Object.assign({},n),{type:e})}var iP=function(t,e,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{l(r.next(u))}catch(f){o(f)}}function c(u){try{l(r.throw(u))}catch(f){o(f)}}function l(u){u.done?a(u.value):i(u.value).then(s,c)}l((r=r.apply(t,e||[])).next())})},rq=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function iq(t,e,n){return iP(this,void 0,void 0,function*(){const r={library:n},[i,a]=yield oq(t,e,r),{encode:o,scale:s,data:c,tooltip:l}=a;if(Array.isArray(c)===!1)return null;const{channels:u}=e,f=Py(Object.entries(o).filter(([,h])=>bn(h)),h=>h.map(([p,v])=>Object.assign({name:p},v)),([h])=>{var p;const v=(p=/([^\d]+)\d*$/.exec(h))===null||p===void 0?void 0:p[1],g=u.find(y=>y.name===v);return g!=null&&g.independent?h:v}),d=u.filter(h=>{const{name:p,required:v}=h;if(f.find(([g])=>g===p))return!0;if(v)throw new Error(`Missing encoding for channel: ${p}.`);return!1}).flatMap(h=>{const{name:p,scale:v,scaleKey:g,range:y,quantitative:m,ordinal:b}=h;return f.filter(([_])=>_.startsWith(p)).map(([_,O],w)=>{const S=O.some(B=>B.visual),M=O.some(B=>B.constant),E=s[_]||{},{independent:P=!1,key:L=g||_,type:A=M?"constant":S?"identity":v}=E,T=rq(E,["independent","key","type"]),C=A==="constant",N=C?void 0:y;return{name:_,values:O,scaleKey:P||C?Symbol("independent"):L,scale:Object.assign(Object.assign({type:A,range:N},T),{quantitative:m,ordinal:b})}})});return[a,Object.assign(Object.assign({},e),{index:i,channels:d,tooltip:l})]})}function aq(t){const[e]=In("encode",t);return(n,r)=>r===void 0||n===void 0?null:Object.assign(Object.assign({},r),{type:"column",value:e(r)(n),field:sq(r)})}function oq(t,e,n){return iP(this,void 0,void 0,function*(){const{library:r}=n,[i]=In("transform",r),{preInference:a=[],postInference:o=[]}=e,{transform:s=[]}=t,c=[YX,rP,HX,$X,VX,UX,ZX,QX,KX,XX,...a.map(i),...s.map(i),...o.map(i),qX];let l=[],u=t;for(const f of c)[l,u]=yield f(l,u,n);return[l,u]})}function sq(t){const{type:e,value:n}=t;return e==="field"&&typeof n=="string"?n:null}var Oo=function(t,e,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{l(r.next(u))}catch(f){o(f)}}function c(u){try{l(r.throw(u))}catch(f){o(f)}}function l(u){u.done?a(u.value):i(u.value).then(s,c)}l((r=r.apply(t,e||[])).next())})},ss=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function Bm(t,e,n,r){var i;return Oo(this,void 0,void 0,function*(){const[a]=In("composition",n),[o]=In("interaction",n),s=new Set(Object.keys(n).map(A=>{var T;return(T=/mark\.(.*)/.exec(A))===null||T===void 0?void 0:T[1]}).filter(bn)),c=new Set(Object.keys(n).map(A=>{var T;return(T=/component\.(.*)/.exec(A))===null||T===void 0?void 0:T[1]}).filter(bn)),l=A=>{const{type:T}=A;if(typeof T=="function"){const{props:C={}}=T,{composite:N=!0}=C;if(N)return"mark"}return typeof T!="string"?T:s.has(T)||c.has(T)?"mark":T},u=A=>l(A)==="mark",f=A=>l(A)==="standardView",d=A=>{const{type:T}=A;return typeof T!="string"?!1:!!c.has(T)},h=A=>{if(f(A))return[A];const T=l(A);return a({type:T,static:d(A)})(A)},p=[],v=new Map,g=new Map,y=[t],m=[];for(;y.length;){const A=y.shift();if(f(A)){const T=g.get(A),[C,N]=T?cP(T,A,n):yield oP(A,n);v.set(C,A),p.push(C);const B=N.flatMap(h).map(j=>rE(j,n));if(y.push(...B),B.every(f)){const j=yield Promise.all(B.map(D=>sP(D,n)));CU(j);for(let D=0;D<B.length;D++){const G=B[D],Y=j[D];g.set(G,Y)}}}else{const T=u(A)?A:yield dP(A,n),C=h(T);Array.isArray(C)?y.push(...C):typeof C=="function"&&m.push(C())}}r.emitter.emit(on.BEFORE_PAINT);const b=new Map,x=new Map,_=[];e.selectAll(Ha(_y)).data(p,A=>A.key).join(A=>A.append("g").attr("className",_y).attr("id",T=>T.key).call(aP).each(function(T,C,N){zm(T,se(N),_,n,r),b.set(T,N)}),A=>A.call(aP).each(function(T,C,N){zm(T,se(N),_,n,r),x.set(T,N)}),A=>A.each(function(T,C,N){const B=N.nameInteraction.values();for(const j of B)j.destroy()}).remove());const O=(A,T,C)=>Array.from(A.entries()).map(([N,B])=>{const j=C||new Map,D=(U,V=it=>it)=>j.set(U,V),G=v.get(N),Y=lq(se(B),G,n,r);return{view:N,container:B,options:G,setState:D,update:(U,V)=>Oo(this,void 0,void 0,function*(){const pt=Ay(Array.from(j.values()))(G);return yield Y(pt,U,()=>{mr(V)&&T(A,V,j)})})}}),w=(A=x,T,C)=>{var N;const B=O(A,w,C);for(const j of B){const{options:D,container:G}=j,Y=G.nameInteraction;let U=Up(D);T&&(U=U.filter(V=>T.includes(V[0])));for(const V of U){const[it,pt]=V,Ot=Y.get(it);if(Ot&&((N=Ot.destroy)===null||N===void 0||N.call(Ot)),pt){const ut=Fm(j.view,it,pt,o)(j,B,r.emitter);Y.set(it,{destroy:ut})}}}},S=O(b,w);for(const A of S){const{options:T}=A,C=new Map;A.container.nameInteraction=C;for(const N of Up(T)){const[B,j]=N;if(j){const G=Fm(A.view,B,j,o)(A,S,r.emitter);C.set(B,{destroy:G})}}}w();const{width:M,height:E}=t,P=[];for(const A of m){const T=new Promise(C=>Oo(this,void 0,void 0,function*(){for(const N of A){const B=Object.assign({width:M,height:E},N);yield Bm(B,e,n,r)}C()}));P.push(T)}r.views=p,(i=r.animations)===null||i===void 0||i.forEach(A=>A==null?void 0:A.cancel()),r.animations=_,r.emitter.emit(on.AFTER_PAINT);const L=_.filter(bn).map(Sq).map(A=>A.finished);return Promise.all([...L,...P])})}function aP(t){t.style("transform",e=>`translate(${e.layout.x}, ${e.layout.y})`)}function cq(t){const[,e]=In("interaction",t);return n=>{const[r,i]=n;try{return[r,e(r)]}catch(a){return[r,i.type]}}}function lq(t,e,n,r){const i=cq(n),a=c=>c[1]&&c[1].props&&c[1].props.reapplyWhenUpdate,s=Up(e).map(i).filter(a).map(c=>c[0]);return(c,l,u)=>Oo(this,void 0,void 0,function*(){const f=[],[d,h]=yield oP(c,n);zm(d,t,f,n,r);for(const p of s.filter(v=>v!==l))uq(p,t,c,d,n,r);for(const p of h)Bm(p,t,n,r);return u(),{options:c,view:d}})}function uq(t,e,n,r,i,a){var o;const[s]=In("interaction",i),l=e.node().nameInteraction,u=Up(n).find(([v])=>v===t),f=l.get(t);if(!f||((o=f.destroy)===null||o===void 0||o.call(f),!u[1]))return;const d=Fm(r,t,u[1],s),h={options:n,view:r,container:e.node(),update:v=>Promise.resolve(v)},p=d(h,[],a.emitter);l.set(t,{destroy:p})}function oP(t,e){return Oo(this,void 0,void 0,function*(){const n=yield dq(t,e),r=fq(n);t.interaction=r.interaction,t.coordinate=r.coordinate,t.marks=[...r.marks,...r.components];const i=rE(r,e),a=yield sP(i,e);return cP(a,i,e)})}function fq(t){const{coordinate:e={},interaction:n={},style:r={},marks:i}=t,a=ss(t,["coordinate","interaction","style","marks"]),o=i.map(d=>d.coordinate||{}),s=i.map(d=>d.interaction||{}),c=i.map(d=>d.viewStyle||{}),l=[...o,e].reduceRight((d,h)=>dt(d,h),{}),u=[n,...s].reduce((d,h)=>dt(d,h),{}),f=[...c,r].reduce((d,h)=>dt(d,h),{});return Object.assign(Object.assign({},a),{marks:i,coordinate:l,interaction:u,style:f})}function dq(t,e){return Oo(this,void 0,void 0,function*(){const[n,r]=In("mark",e),i=new Set(Object.keys(e).map(d=>{var h;return(h=/component\.(.*)/.exec(d))===null||h===void 0?void 0:h[1]}).filter(bn)),{marks:a}=t,o=[],s=[],c=[...a],{width:l,height:u}=AX(t),f={options:t,width:l,height:u};for(;c.length;){const[d]=c.splice(0,1),h=yield dP(d,e),{type:p=yl("G2Mark type is required."),key:v}=h;if(i.has(p))s.push(h);else{const{props:g={}}=r(p),{composite:y=!0}=g;if(!y)o.push(h);else{const{data:m}=h,b=Object.assign(Object.assign({},h),{data:m&&(Array.isArray(m)?m:m.value)}),x=yield n(b,f),_=Array.isArray(x)?x:[x];c.unshift(..._.map((O,w)=>Object.assign(Object.assign({},O),{key:`${v}-${w}`})))}}}return Object.assign(Object.assign({},t),{marks:o,components:s})})}function sP(t,e){return Oo(this,void 0,void 0,function*(){const[n]=In("theme",e),[,r]=In("mark",e),{theme:i,marks:a,coordinates:o=[]}=t,s=n(fP(i)),c=new Map;for(const u of a){const{type:f}=u,{props:d={}}=r(f),h=yield iq(u,d,e);if(h){const[p,v]=h;c.set(p,v)}}const l=Bn(Array.from(c.values()).flatMap(u=>u.channels),({scaleKey:u})=>u);for(const u of l.values()){const f=u.reduce((b,{scale:x})=>dt(b,x),{}),{scaleKey:d}=u[0],{values:h}=u[0],p=Array.from(new Set(h.map(b=>b.field).filter(bn))),v=dt({guide:{title:p.length===0?void 0:p},field:p[0]},f),{name:g}=u[0],y=u.flatMap(({values:b})=>b.map(x=>x.value)),m=Object.assign(Object.assign({},EU(g,y,v,o,s,e)),{key:d});u.forEach(b=>b.scale=m)}return c})}function Fm(t,e,n,r){const i=t.theme,a=typeof e=="string"?i[e]||{}:{};return r(dt(a,Object.assign({type:e},n)))}function cP(t,e,n){const[r]=In("mark",n),[i]=In("theme",n),[a]=In("labelTransform",n),{key:o,frame:s=!1,theme:c,clip:l,style:u={},labelTransform:f=[]}=e,d=i(fP(c)),h=Array.from(t.values()),p=AU(h,e),v=aX(iX(Aq(Array.from(p),h,t),e,n)),g=PX(v,e,d,n),y=hV(g,e,n),m=s?dt({mainLineWidth:1,mainStroke:"#000"},u):u;CX(KE(v),y,g),EX(v);const b={};for(const O of v){const{scales:w=[]}=O,S=[];for(const M of w){const{name:E}=M,P=GE(M,n);S.push(P),E==="y"&&P.update(Object.assign(Object.assign({},P.getOptions()),{xScale:b.x})),zE(b,{[E]:P})}O.scaleInstances=S}const x=[];for(const[O,w]of t.entries()){const{children:S,dataDomain:M,modifier:E,key:P}=O,{index:L,channels:A,tooltip:T}=w,C=Object.fromEntries(A.map(({name:ut,scale:Lt})=>[ut,Lt])),N=Ko(C,ut=>GE(ut,n));zE(b,N);const B=PU(A,N),j=r(O),[D,G,Y]=vq(j(L,N,B,y)),U=M||D.length,V=E?E(G,U,g):[],it=ut=>{var Lt,wt;return(wt=(Lt=T.title)===null||Lt===void 0?void 0:Lt[ut])===null||wt===void 0?void 0:wt.value},pt=ut=>T.items.map(Lt=>Lt[ut]),Ot=D.map((ut,Lt)=>{const wt=Object.assign({points:G[Lt],transform:V[Lt],index:ut,markKey:P,viewKey:o},T&&{title:it(ut),items:pt(ut)});for(const[Gt,Ut]of Object.entries(B))wt[Gt]=Ut[ut],Y&&(wt[`series${qo(Gt)}`]=Y[Lt].map(te=>Ut[te]));return Y&&(wt.seriesIndex=Y[Lt]),Y&&T&&(wt.seriesItems=Y[Lt].map(Gt=>pt(Gt)),wt.seriesTitle=Y[Lt].map(Gt=>it(Gt))),wt});w.data=Ot,w.index=D;const ht=S==null?void 0:S(Ot,N,g);x.push(...ht||[])}return[{layout:g,theme:d,coordinate:y,markState:t,key:o,clip:l,scale:b,style:m,components:v,labelTransform:Ay(f.map(a))},x]}function zm(t,e,n,r,i){return Oo(this,void 0,void 0,function*(){const{components:a,theme:o,layout:s,markState:c,coordinate:l,key:u,style:f,clip:d,scale:h}=t,{x:p,y:v,width:g,height:y}=s,m=ss(s,["x","y","width","height"]),b=["view","plot","main","content"],x=b.map((j,D)=>D),_=["a","margin","padding","inset"],O=b.map(j=>_w(Object.assign({},o.view,f),j)),w=_.map(j=>At(m,j)),S=j=>j.style("x",D=>A[D].x).style("y",D=>A[D].y).style("width",D=>A[D].width).style("height",D=>A[D].height).each(function(D,G,Y){Tq(se(Y),O[D])});let M=0,E=0,P=g,L=y;const A=x.map(j=>{const D=w[j],{left:G=0,top:Y=0,bottom:U=0,right:V=0}=D;return M+=G,E+=Y,P-=G+V,L-=Y+U,{x:M,y:E,width:P,height:L}});e.selectAll(Ha(iw)).data(x.filter(j=>bn(O[j])),j=>b[j]).join(j=>j.append("rect").attr("className",iw).style("zIndex",-2).call(S),j=>j.call(S),j=>j.remove());const T=bq(c),C=T?{duration:T[1]}:!1;for(const[,j]of Qh(a,D=>`${D.type}-${D.position}`))j.forEach((D,G)=>D.index=G);const N=e.selectAll(Ha(rw)).data(a,j=>`${j.type}-${j.position}-${j.index}`).join(j=>j.append("g").style("zIndex",({zIndex:D})=>D||-1).attr("className",rw).append(D=>ZE(dt({animate:C,scale:h},D),l,o,r,c)),j=>j.transition(function(D,G,Y){const{preserve:U=!1}=D;if(U)return;const V=ZE(dt({animate:C,scale:h},D),l,o,r,c),{attributes:it}=V,[pt]=Y.childNodes;return pt.update(it,!1)})).transitions();n.push(...N.flat().filter(bn));const B=e.selectAll(Ha(af)).data([s],()=>u).join(j=>j.append("rect").style("zIndex",0).style("fill","transparent").attr("className",af).call(hP).call(vP,Array.from(c.keys())).call(gP,d),j=>j.call(vP,Array.from(c.keys())).call(D=>T?Pq(D,T):hP(D)).call(gP,d)).transitions();n.push(...B.flat());for(const[j,D]of c.entries()){const{data:G}=D,{key:Y,class:U,type:V}=j,it=e.select(`#${Y}`),pt=Oq(j,D,t,r,i),Ot=wq(j,D,t,r),ht=Mq(j,D,t,r),ut=Eq(j,D,t,r),Lt=xq(e,it,U,"element"),wt=it.selectAll(Ha(fo)).selectFacetAll(Lt).data(G,Gt=>Gt.key,Gt=>Gt.groupKey).join(Gt=>Gt.append(pt).attr("className",fo).attr("markType",V).transition(function(Ut,te,ie){return Ot(Ut,[ie])}),Gt=>Gt.call(Ut=>{const te=Ut.parent(),ie=Xz(ye=>{const[We,de]=ye.getBounds().min;return[We,de]});Ut.transition(function(ye,We,de){_q(de,te,ie);const we=pt(ye,We),En=ht(ye,[de],[we]);return En!==null||(de.nodeName===we.nodeName&&we.nodeName!=="g"?Cy(de,we):(de.parentNode.replaceChild(we,de),we.className=fo,we.markType=V,we.__data__=de.__data__)),En}).attr("markType",V).attr("className",fo)}),Gt=>Gt.each(function(Ut,te,ie){ie.__removed__=!0}).transition(function(Ut,te,ie){return ut(Ut,[ie])}).remove(),Gt=>Gt.append(pt).attr("className",fo).attr("markType",V).transition(function(Ut,te,ie){const{__fromElements__:ye}=ie,We=ht(Ut,ye,[ie]);return new fr(ye,null,ie.parentNode).transition(We).remove(),We}),Gt=>Gt.transition(function(Ut,te,ie){const We=new fr([],ie.__toData__,ie.parentNode).append(pt).attr("className",fo).attr("markType",V).nodes();return ht(Ut,[ie],We)}).remove()).transitions();n.push(...wt.flat())}hq(t,e,n,r,i)})}function hq(t,e,n,r,i){const[a]=In("labelTransform",r),{markState:o,labelTransform:s}=t,c=e.select(Ha(xy)).node(),l=new Map,u=new Map,f=Array.from(o.entries()).flatMap(([v,g])=>{const{labels:y=[],key:m}=v,b=mq(v,g,t,r,i),x=e.select(`#${m}`).selectAll(Ha(fo)).nodes().filter(_=>!_.__removed__);return y.flatMap((_,O)=>{const{transform:w=[]}=_,S=ss(_,["transform"]);return x.flatMap(M=>{const E=pq(S,O,M);return E.forEach(P=>{l.set(P,b),u.set(P,_)}),E})})}),d=se(c).selectAll(Ha(Oy)).data(f,v=>v.key).join(v=>v.append(g=>l.get(g)(g)).attr("className",Oy),v=>v.each(function(g,y,m){const x=l.get(g)(g);Cy(m,x)}),v=>v.remove()).nodes(),h=Bn(d,v=>u.get(v.__data__)),{coordinate:p}=t;for(const[v,g]of h){const{transform:y=[]}=v;Ay(y.map(a))(g,p)}s&&s(d,p)}function pq(t,e,n){const{seriesIndex:r,seriesKey:i,points:a,key:o,index:s}=n.__data__,c=yq(n);if(!r)return[Object.assign(Object.assign({},t),{key:`${o}-${e}`,bounds:c,index:s,points:a,dependentElement:n})];const l=gq(t),u=r.map((f,d)=>Object.assign(Object.assign({},t),{key:`${i[d]}-${e}`,bounds:[a[d]],index:f,points:a,dependentElement:n}));return l?l(u):u}function vq([t,e,n]){if(n)return[t,e,n];const r=[],i=[];for(let a=0;a<t.length;a++){const o=t[a],s=e[a];s.every(([c,l])=>bn(c)&&bn(l))&&(r.push(o),i.push(s))}return[r,i]}function gq(t){const{selector:e}=t;if(!e)return null;if(typeof e=="function")return e;if(e==="first")return n=>[n[0]];if(e==="last")return n=>[n[n.length-1]];throw new Error(`Unknown selector: ${e}`)}function yq(t){const e=t.cloneNode(),n=t.getAnimations();e.style.visibility="hidden",n.forEach(o=>{const s=o.effect.getKeyframes();e.attr(s[s.length-1])}),t.parentNode.appendChild(e);const r=e.getLocalBounds();e.destroy();const{min:i,max:a}=r;return[i,a]}function mq(t,e,n,r,i){const[a]=In("shape",r),{data:o}=t,{data:s,defaultLabelShape:c}=e,l=s.map(h=>h.points),{theme:u,coordinate:f}=n,d=Object.assign(Object.assign({},i),{document:eE(i),theme:u,coordinate:f});return h=>{const{index:p,points:v}=h,g=o[p],{formatter:y=C=>`${C}`,transform:m,style:b,render:x}=h,_=ss(h,["formatter","transform","style","render"]),O=Ko(Object.assign(Object.assign({},_),b),C=>lP(C,g,p,o)),{shape:w=c,text:S}=O,M=ss(O,["shape","text"]),E=typeof y=="string"?Zo(y):y,P=Object.assign(Object.assign({},M),{text:E(S,g,p,o),datum:g}),L=Object.assign({type:`label.${w}`,render:x},M),A=a(L,d),T=uP(u,"label",w,"label");return A(v,P,T,l)}}function lP(t,e,n,r){return typeof t=="function"?t(e,n,r):typeof t!="string"?t:e[t]!==void 0?e[t]:t}function bq(t){let e=-1/0,n=1/0;for(const[r,i]of t){const{animate:a={}}=r,{data:o}=i,{enter:s={},update:c={},exit:l={}}=a,{type:u,duration:f=300,delay:d=0}=c,{type:h,duration:p=300,delay:v=0}=s,{type:g,duration:y=300,delay:m=0}=l;for(const b of o){const{updateType:x=u,updateDuration:_=f,updateDelay:O=d,enterType:w=h,enterDuration:S=p,enterDelay:M=v,exitDuration:E=y,exitDelay:P=m,exitType:L=g}=b;(x===void 0||x)&&(e=Math.max(e,_+O),n=Math.min(n,O)),(L===void 0||L)&&(e=Math.max(e,E+P),n=Math.min(n,P)),(w===void 0||w)&&(e=Math.max(e,S+M),n=Math.min(n,M))}}return e===-1/0?null:[n,e-n]}function xq(t,e,n,r){return t.node().parentElement.findAll(a=>a.style.facet!==void 0&&a.style.facet===n&&a!==e.node()).flatMap(a=>a.getElementsByClassName(r))}function _q(t,e,n){if(!t.__facet__)return;const r=t.parentNode.parentNode,i=e.parentNode,[a,o]=n(r),[s,c]=n(i),l=`translate(${a-s}, ${o-c})`;qz(t,l),e.append(t)}function Oq(t,e,n,r,i){const[a]=In("shape",r),{data:o}=t,{defaultShape:s,data:c,shape:l}=e,u=c.map(g=>g.points),{theme:f,coordinate:d}=n,{type:h,style:p={}}=t,v=Object.assign(Object.assign({},i),{document:eE(i),coordinate:d,theme:f});return g=>{const{shape:y=s}=p,{shape:m=y,points:b,seriesIndex:x,index:_}=g,O=ss(g,["shape","points","seriesIndex","index"]),w=Object.assign(Object.assign({},O),{index:_}),S=x?x.map(A=>o[A]):o[_],M=x||_,E=Ko(p,A=>lP(A,S,M,o)),P=l[m]?l[m](E,v):a(Object.assign(Object.assign({},E),{type:pP(t,m)}),v),L=uP(f,h,m,s);return P(b,w,L,u)}}function uP(t,e,n,r){if(typeof e!="string")return;const{color:i}=t,a=t[e]||{},o=a[n]||a[r];return Object.assign({color:i},o)}function Gm(t,e,n,r,i){var a,o;const[,s]=In("shape",i),[c]=In("animation",i),{defaultShape:l,shape:u}=n,{theme:f,coordinate:d}=r,p=`default${qo(t)}Animation`,{[p]:v}=((a=u[l])===null||a===void 0?void 0:a.props)||s(pP(e,l)).props,{[t]:g={}}=f,y=((o=e.animate)===null||o===void 0?void 0:o[t])||{},m={coordinate:d};return(b,x,_)=>{const{[`${t}Type`]:O,[`${t}Delay`]:w,[`${t}Duration`]:S,[`${t}Easing`]:M}=b,E=Object.assign({type:O||v},y);if(!E.type)return null;const A=c(E,m)(x,_,dt(g,{delay:w,duration:S,easing:M}));return Array.isArray(A)?A:[A]}}function wq(t,e,n,r){return Gm("enter",t,e,n,r)}function Sq(t){return t.finished.then(()=>{t.cancel()}),t}function Mq(t,e,n,r){return Gm("update",t,e,n,r)}function Eq(t,e,n,r){return Gm("exit",t,e,n,r)}function fP(t={}){if(typeof t=="string")return{type:t};const{type:e="light"}=t,n=ss(t,["type"]);return Object.assign(Object.assign({},n),{type:e})}function Up(t){const e={event:!0,tooltip:!0,sliderFilter:!0,legendFilter:!0,scrollbarFilter:!0},{interaction:n={}}=t;return Object.entries(dt(e,n)).reverse()}function dP(t,e){return Oo(this,void 0,void 0,function*(){const n={library:e},{data:r}=t,i=ss(t,["data"]);if(r==null)return t;const[,{data:a}]=yield rP([],{data:r},n);return Object.assign({data:a},i)})}function hP(t){t.style("x",e=>e.paddingLeft+e.marginLeft).style("y",e=>e.paddingTop+e.marginTop).style("width",e=>e.innerWidth).style("height",e=>e.innerHeight)}function Pq(t,e){const[n,r]=e;t.transition(function(i,a,o){const{x:s,y:c,width:l,height:u}=o.style,{paddingLeft:f,paddingTop:d,innerWidth:h,innerHeight:p,marginLeft:v,marginTop:g}=i,y=[{x:s,y:c,width:l,height:u},{x:f+v,y:d+g,width:h,height:p}];return o.animate(y,{delay:n,duration:r,fill:"both"})})}function pP(t,e){const{type:n}=t;return typeof e=="string"?`${n}.${e}`:e}function vP(t,e){const n=a=>a.class!==void 0?`${a.class}`:"";t.nodes().length===0||(t.selectAll(Ha(nw)).data(e,a=>a.key).join(a=>a.append("g").attr("className",nw).attr("id",o=>o.key).style("facet",n).style("fill","transparent").style("zIndex",o=>{var s;return(s=o.zIndex)!==null&&s!==void 0?s:0}),a=>a.style("facet",n).style("fill","transparent").style("zIndex",o=>{var s;return(s=o.zIndex)!==null&&s!==void 0?s:0}),a=>a.remove()),t.select(Ha(xy)).node())||t.append("g").attr("className",xy).style("zIndex",0)}function Ha(...t){return t.map(e=>`.${e}`).join("")}function gP(t,e){t.node()&&t.style("clipPath",n=>{if(!e)return null;const{paddingTop:r,paddingLeft:i,marginLeft:a,marginTop:o,innerWidth:s,innerHeight:c}=n;return new Qs({style:{x:i+a,y:r+o,width:s,height:c}})})}function Aq(t,e,n){var r;for(const[l]of n.entries())if(l.type==="cell")return t.filter(u=>u.name!=="shape");if(e.length!==1||t.some(l=>l.name==="shape"))return t;const{defaultShape:i}=e[0];if(!["point","line","rect","hollow"].includes(i))return t;const o={point:"point",line:"hyphen",rect:"square",hollow:"hollow"},c={field:((r=t.find(l=>l.name==="color"))===null||r===void 0?void 0:r.field)||null,name:"shape",type:"constant",domain:[],range:[o[i]]};return[...t,c]}function Tq(t,e){for(const[n,r]of Object.entries(e))t.style(n,r)}function yP(t){const e=dt({},t),n=new Map([[e,null]]),r=new Map([[null,-1]]),i=[e];for(;i.length;){const a=i.shift();if(a.key===void 0){const s=n.get(a),c=r.get(a),l=s===null?"0":`${s.key}-${c}`;a.key=l}const{children:o=[]}=a;if(Array.isArray(o))for(let s=0;s<o.length;s++){const c=dt({},o[s]);o[s]=c,n.set(c,a),r.set(c,s),i.push(c)}}return e}function Cq(t,e){const n=new uw;return n.registerPlugin(new fw),new DO({width:t,height:e,container:document.createElement("div"),renderer:n})}function kq(t,e={},n=()=>{},r=i=>{throw i}){const{width:i=640,height:a=480,depth:o=0}=t,s=yP(t),{canvas:c=Cq(i,a),emitter:l=new lg,library:u}=e;e.canvas=c,e.emitter=l;const{width:f,height:d}=c.getConfig();(f!==i||d!==a)&&c.resize(i,a),l.emit(on.BEFORE_RENDER);const h=se(c.document.documentElement);return c.ready.then(()=>Bm(Object.assign(Object.assign({},s),{width:i,height:a,depth:o}),h,u,e)).then(()=>{if(o){const[p,v]=c.document.documentElement.getPosition();c.document.documentElement.setPosition(p,v,-o/2)}c.requestAnimationFrame(()=>{l.emit(on.AFTER_RENDER),n==null||n()})}).catch(p=>{r==null||r(p)}),Nq(c.getConfig().container)}function Pmt(t,e={},n=()=>{},r=i=>{throw i}){var i;const{width:a=640,height:o=480}=t,s=yP(t),{group:c=new Group,emitter:l=new EventEmitter,library:u}=e;c!=null&&c.parentElement||error("renderToMountedElement can't render chart to unmounted group.");const f=select(c);return e.group=c,e.emitter=l,e.canvas=e.canvas||((i=c==null?void 0:c.ownerDocument)===null||i===void 0?void 0:i.defaultView),l.emit(ChartEvent.BEFORE_RENDER),plot(Object.assign(Object.assign({},s),{width:a,height:o}),f,u,e).then(()=>{var d;(d=e.canvas)===null||d===void 0||d.requestAnimationFrame(()=>{l.emit(ChartEvent.AFTER_RENDER),n==null||n()})}).catch(d=>{r==null||r(d)}),c}function mP(t,e={},n=!1){const{canvas:r,emitter:i}=e;r&&(Lq(r),n?r.destroy():r.destroyChildren()),i.off()}function Lq(t){const e=t.getRoot().querySelectorAll(`.${_y}`);e==null||e.forEach(n=>{const{nameInteraction:r=new Map}=n;(r==null?void 0:r.size)>0&&Array.from(r==null?void 0:r.values()).forEach(i=>{i==null||i.destroy()})})}function Nq(t){return typeof t=="string"?document.getElementById(t):t}const Bl=t=>t?parseInt(t):0;function Iq(t){const e=getComputedStyle(t),n=t.clientWidth||Bl(e.width),r=t.clientHeight||Bl(e.height),i=Bl(e.paddingLeft)+Bl(e.paddingRight),a=Bl(e.paddingTop)+Bl(e.paddingBottom);return{width:n-i,height:r-a}}function Amt(t){const{height:e,width:n,padding:r=0,paddingLeft:i=r,paddingRight:a=r,paddingTop:o=r,paddingBottom:s=r,margin:c=0,marginLeft:l=c,marginRight:u=c,marginTop:f=c,marginBottom:d=c,inset:h=0,insetLeft:p=h,insetRight:v=h,insetTop:g=h,insetBottom:y=h}=t,m=_=>_==="auto"?20:_,b=n-m(i)-m(a)-l-u-p-v,x=e-m(o)-m(s)-f-d-g-y;return{width:b,height:x}}function Wm(t,e){const n=[t];for(;n.length;){const r=n.shift();e&&e(r);const i=r.children||[];for(const a of i)n.push(a)}}class Ym{constructor(e={},n){this.parentNode=null,this.children=[],this.index=0,this.type=n,this.value=e}map(e=n=>n){const n=e(this.value);return this.value=n,this}attr(e,n){return arguments.length===1?this.value[e]:this.map(r=>(r[e]=n,r))}append(e){const n=new e({});return n.children=[],this.push(n),n}push(e){return e.parentNode=this,e.index=this.children.length,this.children.push(e),this}remove(){const e=this.parentNode;if(e){const{children:n}=e,r=n.findIndex(i=>i===this);n.splice(r,1)}return this}getNodeByKey(e){let n=null;return Wm(this,i=>{e===i.attr("key")&&(n=i)}),n}getNodesByType(e){const n=[];return Wm(this,i=>{e===i.type&&n.push(i)}),n}getNodeByType(e){let n=null;return Wm(this,r=>{n||e===r.type&&(n=r)}),n}call(e,...n){return e(this.map(),...n),this}getRoot(){let e=this;for(;e&&e.parentNode;)e=e.parentNode;return e}}var bP=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const Hm=["width","height","depth","padding","paddingLeft","paddingRight","paddingBottom","paddingTop","inset","insetLeft","insetRight","insetTop","insetBottom","margin","marginLeft","marginRight","marginTop","marginBottom","autoFit","theme","title"],xP="__remove__",_P="__callback__",OP=1,wP=1;function jq(t){if(t===void 0){const e=document.createElement("div");return e[xP]=!0,e}return typeof t=="string"?document.getElementById(t):t}function Rq(t){const e=t.parentNode;e&&e.removeChild(t)}function Dq(t){if(t.type!==null)return t;const e=t.children[t.children.length-1];for(const n of Hm)e.attr(n,t.attr(n));return e}function SP(t){return Object.assign(Object.assign({},t.value),{type:t.type})}function $m(t,e){const{width:n,height:r,autoFit:i,depth:a=0}=t;let o=640,s=480;if(i){const{width:c,height:l}=Iq(e);o=c||o,s=l||s}return o=n||o,s=r||s,{width:Math.max(er(o)?o:OP,OP),height:Math.max(er(s)?s:wP,wP),depth:a}}function Bq(t){const e=Dq(t),n=[e],r=new Map;for(r.set(e,SP(e));n.length;){const i=n.pop(),a=r.get(i),{children:o=[]}=i;for(const s of o)if(s.type===_P)a.children=s.value;else{const c=SP(s),{children:l=[]}=a;l.push(c),n.push(s),r.set(s,c),a.children=l}}return r.get(e)}function Fq(t,e){return typeof t=="function"?!0:new Set(Object.keys(e)).has(t)}function zq(t,e){return typeof t!="function"&&new Set(Object.keys(e)).has(t)}function Gq(t,e,n,r,i){const{type:a}=t,{type:o=n||a}=e;if(zq(o,i)){for(const s of Hm)t.attr(s)!==void 0&&e[s]===void 0&&(e[s]=t.attr(s));return e}if(Fq(o,r)){const s={type:"view"},c=Object.assign({},e);for(const l of Hm)c[l]!==void 0&&(s[l]=c[l],delete c[l]);return Object.assign(Object.assign({},s),{children:[c]})}return e}function Wq(t,e,n){if(typeof t=="function")return e.mark;const i=Object.assign(Object.assign({},e),n)[t];if(!i)throw new Error(`Unknown mark: ${t}.`);return i}function Yq(t,e,n){if(typeof t=="function"){const c=new Ym;return c.value=t,c.type=_P,c}const{type:r,children:i}=t,a=bP(t,["type","children"]),o=Wq(r,e,n),s=new o;return s.value=a,s.type=r,s}function Hq(t,e){const{type:n,children:r}=e,i=bP(e,["type","children"]);t.type===n||n===void 0?ww(t.value,i):typeof n=="string"&&(t.type=n,t.value=i)}function $q(t,e,n,r){if(!t)return;const i=[[t,e]];for(;i.length;){const[a,o]=i.shift(),s=Yq(o,n,r);Array.isArray(a.children)&&a.push(s);const{children:c}=o;if(Array.isArray(c))for(const l of c)i.push([s,l]);else typeof c=="function"&&i.push([s,c])}}function Vq(t,e,n,r,i){const a=Gq(t,e,n,r,i),o=[[null,t,a]];for(;o.length;){const[s,c,l]=o.shift();if(!c)$q(s,l,r,i);else if(!l)c.remove();else{Hq(c,l);const{children:u}=l,{children:f}=c;if(Array.isArray(u)&&Array.isArray(f)){const d=Math.max(u.length,f.length);for(let h=0;h<d;h++){const p=u[h],v=f[h];o.push([c,v,p])}}else typeof u=="function"&&o.push([c,null,u])}}}function Uq(){let t,e;return[new Promise((r,i)=>{e=r,t=i}),e,t]}function Xq(t,e,{key:n=e}){t.prototype[e]=function(r){return arguments.length===0?this.attr(n):this.attr(n,r)}}function qq(t,e,{key:n=e}){t.prototype[e]=function(r){if(arguments.length===0)return this.attr(n);if(Array.isArray(r))return this.attr(n,r);const i=[...this.attr(n)||[],r];return this.attr(n,i)}}function Zq(t,e,{key:n=e}){t.prototype[e]=function(r,i){if(arguments.length===0)return this.attr(n);if(arguments.length===1&&typeof r!="string")return this.attr(n,r);const a=this.attr(n)||{};return a[r]=arguments.length===1?!0:i,this.attr(n,a)}}function Kq(t,e,n){t.prototype[e]=function(r){if(arguments.length===0)return this.attr(e);if(Array.isArray(r))return this.attr(e,{items:r});if(sf(r)&&(r.title!==void 0||r.items!==void 0))return this.attr(e,r);if(r===null||r===!1)return this.attr(e,r);const i=this.attr(e)||{},{items:a=[]}=i;return a.push(r),i.items=a,this.attr(e,i)}}function Qq(t,e,{ctor:n}){t.prototype[e]=function(r){const i=this.append(n);return e==="mark"&&(i.type=r),i}}function Jq(t,e,{ctor:n}){t.prototype[e]=function(){return this.type=null,this.append(n)}}function Xp(t){return e=>{for(const[n,r]of Object.entries(t)){const{type:i}=r;i==="value"?Xq(e,n,r):i==="array"?qq(e,n,r):i==="object"?Zq(e,n,r):i==="node"?Qq(e,n,r):i==="container"?Jq(e,n,r):i==="mix"&&Kq(e,n,r)}return e}}function MP(t){return Object.fromEntries(Object.entries(t).map(([e,n])=>[e,{type:"node",ctor:n}]))}const EP={encode:{type:"object"},scale:{type:"object"},data:{type:"value"},transform:{type:"array"},style:{type:"object"},animate:{type:"object"},coordinate:{type:"object"},interaction:{type:"object"},label:{type:"array",key:"labels"},axis:{type:"object"},legend:{type:"object"},slider:{type:"object"},scrollbar:{type:"object"},state:{type:"object"},layout:{type:"object"},theme:{type:"object"},title:{type:"value"}},tZ=Object.assign(Object.assign({},EP),{tooltip:{type:"mix"},viewStyle:{type:"object"}}),eZ=Object.assign(Object.assign({},EP),{labelTransform:{type:"array"}});var nZ=function(t,e,n,r){var i=arguments.length,a=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,n,a):o(e,n))||a);return i>3&&a&&Object.defineProperty(e,n,a),a};let qp=class extends Ym{changeData(e){var n;const r=this.getRoot();if(r)return this.attr("data",e),!((n=this.children)===null||n===void 0)&&n.length&&this.children.forEach(i=>{i.attr("data",e)}),r==null?void 0:r.render()}getView(){const e=this.getRoot(),{views:n}=e.getContext();if(n!=null&&n.length)return n.find(r=>r.key===this._key)}getScale(){var e;return(e=this.getView())===null||e===void 0?void 0:e.scale}getScaleByChannel(e){const n=this.getScale();if(n)return n[e]}getCoordinate(){var e;return(e=this.getView())===null||e===void 0?void 0:e.coordinate}getTheme(){var e;return(e=this.getView())===null||e===void 0?void 0:e.theme}getGroup(){const e=this._key;return e?this.getRoot().getContext().canvas.getRoot().getElementById(e):void 0}show(){const e=this.getGroup();e&&!e.isVisible()&&Sm(e)}hide(){const e=this.getGroup();e&&e.isVisible()&&wm(e)}};qp=nZ([Xp(eZ)],qp);var rZ=function(t,e,n,r){var i=arguments.length,a=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,n,a):o(e,n))||a);return i>3&&a&&Object.defineProperty(e,n,a),a};let Vm=class extends Ym{changeData(e){const n=this.getRoot();if(n)return this.attr("data",e),n==null?void 0:n.render()}getMark(){var e;const n=(e=this.getRoot())===null||e===void 0?void 0:e.getView();if(!n)return;const{markState:r}=n,i=Array.from(r.keys()).find(a=>a.key===this.attr("key"));return r.get(i)}getScale(){var e;const n=(e=this.getRoot())===null||e===void 0?void 0:e.getView();if(n)return n==null?void 0:n.scale}getScaleByChannel(e){var n,r;const i=(n=this.getRoot())===null||n===void 0?void 0:n.getView();if(i)return(r=i==null?void 0:i.scale)===null||r===void 0?void 0:r[e]}getGroup(){const e=this.attr("key");return e?this.getRoot().getContext().canvas.getRoot().getElementById(e):void 0}};Vm=rZ([Xp(tZ)],Vm);var iZ=function(t,e,n,r){var i=arguments.length,a=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,n,a):o(e,n))||a);return i>3&&a&&Object.defineProperty(e,n,a),a},aZ=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const oZ="G2_CHART_KEY";class sZ extends qp{constructor(e){const{container:n,canvas:r,renderer:i,plugins:a,lib:o}=e,s=aZ(e,["container","canvas","renderer","plugins","lib"]);super(s,"view"),this._hasBindAutoFit=!1,this._rendering=!1,this._trailing=!1,this._trailingResolve=null,this._trailingReject=null,this._previousDefinedType=null,this._onResize=dw(()=>{this.forceFit()},300),this._renderer=i||new uw,this._plugins=a||[],this._container=jq(n),this._emitter=new lg,this._context={library:Object.assign(Object.assign({},o),aw),emitter:this._emitter,canvas:r},this._create()}render(){if(this._rendering)return this._addToTrailing();this._context.canvas||this._createCanvas(),this._context.canvas.getConfig().supportsCSSTransform=!0,this._bindAutoFit(),this._rendering=!0;const e=new Promise((a,o)=>kq(this._computedOptions(),this._context,this._createResolve(a),this._createReject(o))),[n,r,i]=Uq();return e.then(r).catch(i).then(()=>this._renderTrailing()),n}options(e){if(arguments.length===0)return Bq(this);const{type:n}=e;return n&&(this._previousDefinedType=n),Vq(this,e,this._previousDefinedType,this._marks,this._compositions),this}getContainer(){return this._container}getContext(){return this._context}on(e,n,r){return this._emitter.on(e,n,r),this}once(e,n){return this._emitter.once(e,n),this}emit(e,...n){return this._emitter.emit(e,...n),this}off(e,n){return this._emitter.off(e,n),this}clear(){const e=this.options();this.emit(on.BEFORE_CLEAR),this._reset(),mP(e,this._context,!1),this.emit(on.AFTER_CLEAR)}destroy(){const e=this.options();this.emit(on.BEFORE_DESTROY),this._unbindAutoFit(),this._reset(),mP(e,this._context,!0),this._container[xP]&&Rq(this._container),this.emit(on.AFTER_DESTROY)}forceFit(){this.options.autoFit=!0;const{width:e,height:n}=$m(this.options(),this._container);if(e===this._width&&n===this._height)return Promise.resolve(this);this.emit(on.BEFORE_CHANGE_SIZE);const r=this.render();return r.then(()=>{this.emit(on.AFTER_CHANGE_SIZE)}),r}changeSize(e,n){if(e===this._width&&n===this._height)return Promise.resolve(this);this.emit(on.BEFORE_CHANGE_SIZE),this.attr("width",e),this.attr("height",n);const r=this.render();return r.then(()=>{this.emit(on.AFTER_CHANGE_SIZE)}),r}_create(){const{library:e}=this._context,n=a=>a.startsWith("mark.")||a==="component.axisX"||a==="component.axisY"||a==="component.legends",r=["mark.mark",...Object.keys(e).filter(n)];this._marks={};for(const a of r){const o=a.split(".").pop();class s extends Vm{constructor(){super({},o)}}this._marks[o]=s,this[o]=function(c){const l=this.append(s);return o==="mark"&&(l.type=c),l}}const i=["composition.view",...Object.keys(e).filter(a=>a.startsWith("composition.")&&a!=="composition.mark")];this._compositions=Object.fromEntries(i.map(a=>{const o=a.split(".").pop();let s=class extends qp{constructor(){super({},o)}};return s=iZ([Xp(MP(this._marks))],s),[o,s]}));for(const a of Object.values(this._compositions))Xp(MP(this._compositions))(a);for(const a of i){const o=a.split(".").pop();this[o]=function(){const s=this._compositions[o];return this.type=null,this.append(s)}}}_reset(){const e=["theme","type","width","height","autoFit"];this.type="view",this.value=Object.fromEntries(Object.entries(this.value).filter(([n])=>n.startsWith("margin")||n.startsWith("padding")||n.startsWith("inset")||e.includes(n))),this.children=[]}_renderTrailing(){this._trailing&&(this._trailing=!1,this.render().then(()=>{const e=this._trailingResolve.bind(this);this._trailingResolve=null,e(this)}).catch(e=>{const n=this._trailingReject.bind(this);this._trailingReject=null,n(e)}))}_createResolve(e){return()=>{this._rendering=!1,e(this)}}_createReject(e){return n=>{this._rendering=!1,e(n)}}_computedOptions(){const e=this.options(),{key:n=oZ}=e,{width:r,height:i,depth:a}=$m(e,this._container);return this._width=r,this._height=i,this._key=n,Object.assign(Object.assign({key:this._key},e),{width:r,height:i,depth:a})}_createCanvas(){const{width:e,height:n}=$m(this.options(),this._container);this._plugins.push(new fw),this._plugins.forEach(r=>this._renderer.registerPlugin(r)),this._context.canvas=new DO({container:this._container,width:e,height:n,renderer:this._renderer})}_addToTrailing(){var e;return(e=this._trailingResolve)===null||e===void 0||e.call(this,this),this._trailing=!0,new Promise((r,i)=>{this._trailingResolve=r,this._trailingReject=i})}_bindAutoFit(){const e=this.options(),{autoFit:n}=e;if(this._hasBindAutoFit){n||this._unbindAutoFit();return}n&&(this._hasBindAutoFit=!0,window.addEventListener("resize",this._onResize))}_unbindAutoFit(){this._hasBindAutoFit&&(this._hasBindAutoFit=!1,window.removeEventListener("resize",this._onResize))}}function cZ(t,e){class n extends t{constructor(i){super(Object.assign(Object.assign({},i),{lib:e}))}}return n}ct.enableCSSParsing=!1;var lZ=Object.prototype.hasOwnProperty,Um=function(t,e){if(t===null||!ho(t))return{};var n={};return am(e,function(r){lZ.call(t,r)&&(n[r]=t[r])}),n};function PP(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function Df(t,e,n,r,i){for(var a=t.children,o,s=-1,c=a.length,l=t.value&&(r-e)/t.value;++s<c;)o=a[s],o.y0=n,o.y1=i,o.x0=e,o.x1=e+=o.value*l}function uZ(){var t=1,e=1,n=0,r=!1;function i(o){var s=o.height+1;return o.x0=o.y0=n,o.x1=t,o.y1=e/s,o.eachBefore(a(e,s)),r&&o.eachBefore(PP),o}function a(o,s){return function(c){c.children&&Df(c,c.x0,o*(c.depth+1)/s,c.x1,o*(c.depth+2)/s);var l=c.x0,u=c.y0,f=c.x1-n,d=c.y1-n;f<l&&(l=f=(l+f)/2),d<u&&(u=d=(u+d)/2),c.x0=l,c.y0=u,c.x1=f,c.y1=d}}return i.round=function(o){return arguments.length?(r=!!o,i):r},i.size=function(o){return arguments.length?(t=+o[0],e=+o[1],i):[t,e]},i.padding=function(o){return arguments.length?(n=+o,i):n},i}var fZ=J(9783);function dZ(t){var e=0,n=t.children,r=n&&n.length;if(!r)e=1;else for(;--r>=0;)e+=n[r].value;t.value=e}function hZ(){return this.eachAfter(dZ)}var Xm=J(64599);function pZ(t,e){var n=-1,r=Xm(this),i;try{for(r.s();!(i=r.n()).done;){var a=i.value;t.call(e,a,++n,this)}}catch(o){r.e(o)}finally{r.f()}return this}function vZ(t,e){for(var n=this,r=[n],i,a,o=-1;n=r.pop();)if(t.call(e,n,++o,this),i=n.children)for(a=i.length-1;a>=0;--a)r.push(i[a]);return this}function gZ(t,e){for(var n=this,r=[n],i=[],a,o,s,c=-1;n=r.pop();)if(i.push(n),a=n.children)for(o=0,s=a.length;o<s;++o)r.push(a[o]);for(;n=i.pop();)t.call(e,n,++c,this);return this}function yZ(t,e){var n=-1,r=Xm(this),i;try{for(r.s();!(i=r.n()).done;){var a=i.value;if(t.call(e,a,++n,this))return a}}catch(o){r.e(o)}finally{r.f()}}function mZ(t){return this.eachAfter(function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n})}function bZ(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})}function xZ(t){for(var e=this,n=_Z(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r}function _Z(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;for(t=n.pop(),e=r.pop();t===e;)i=t,t=n.pop(),e=r.pop();return i}function OZ(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e}function wZ(){return Array.from(this)}function SZ(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t}function MZ(){var t=this,e=[];return t.each(function(n){n!==t&&e.push({source:n.parent,target:n})}),e}var AP=J(15009),EZ=AP().mark(TP);function TP(){var t,e,n,r,i,a;return AP().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:t=this,n=[t];case 1:e=n.reverse(),n=[];case 2:if(!(t=e.pop())){s.next=8;break}return s.next=5,t;case 5:if(r=t.children)for(i=0,a=r.length;i<a;++i)n.push(r[i]);s.next=2;break;case 8:if(n.length){s.next=1;break}case 9:case"end":return s.stop()}},EZ,this)}function Fl(t,e){t instanceof Map?(t=[void 0,t],e===void 0&&(e=TZ)):e===void 0&&(e=AZ);for(var n=new zl(t),r,i=[n],a,o,s,c;r=i.pop();)if((o=e(r.data))&&(c=(o=Array.from(o)).length))for(r.children=o,s=c-1;s>=0;--s)i.push(a=o[s]=new zl(o[s])),a.parent=r,a.depth=r.depth+1;return n.eachBefore(CP)}function PZ(){return Fl(this).eachBefore(CZ)}function AZ(t){return t.children}function TZ(t){return Array.isArray(t)?t[1]:null}function CZ(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function CP(t){var e=0;do t.height=e;while((t=t.parent)&&t.height<++e)}function zl(t){this.data=t,this.depth=this.height=0,this.parent=null}zl.prototype=Fl.prototype=fZ({constructor:zl,count:hZ,each:pZ,eachAfter:gZ,eachBefore:vZ,find:yZ,sum:mZ,sort:bZ,path:xZ,ancestors:OZ,descendants:wZ,leaves:SZ,links:MZ,copy:PZ},Symbol.iterator,TP);function qm(t,e){for(var n in e)e.hasOwnProperty(n)&&n!=="constructor"&&e[n]!==void 0&&(t[n]=e[n])}function kZ(t,e,n,r){return e&&qm(t,e),n&&qm(t,n),r&&qm(t,r),t}function Zm(t){return Ft(t)?0:cf(t)?t.length:Object.keys(t).length}const LZ={field:"value",size:[1,1],round:!1,padding:0,sort:(t,e)=>e.value-t.value,as:["x","y"],ignoreParentValue:!0},NZ="nodeIndex",Bf="childNodeCount",IZ="nodeAncestor",Km="Invalid field: it must be a string!";function jZ(t,e){const{field:n,fields:r}=t;if(Dn(n))return n;if(mr(n))return console.warn(Km),n[0];if(console.warn(`${Km} will try to get fields instead.`),Dn(r))return r;if(mr(r)&&r.length)return r[0];if(e)return e;throw new TypeError(Km)}function RZ(t){const e=[];if(t&&t.each){let n,r;t.each(i=>{var a,o;i.parent!==n?(n=i.parent,r=0):r+=1;const s=GM((((a=i.ancestors)===null||a===void 0?void 0:a.call(i))||[]).map(c=>e.find(l=>l.name===c.name)||c),({depth:c})=>c>0&&c<i.depth);i[IZ]=s,i[Bf]=((o=i.children)===null||o===void 0?void 0:o.length)||0,i[NZ]=r,e.push(i)})}else t&&t.eachNode&&t.eachNode(n=>{e.push(n)});return e}function DZ(t,e){e=kZ({},LZ,e);const n=e.as;if(!mr(n)||n.length!==2)throw new TypeError('Invalid as: it must be an array with 2 strings (e.g. [ "x", "y" ])!');let r;try{r=jZ(e)}catch(c){console.warn(c)}const a=(c=>uZ().size(e.size).round(e.round).padding(e.padding)(Fl(c).sum(l=>Zm(l.children)?e.ignoreParentValue?0:l[r]-GS(l.children,(u,f)=>u+f[r],0):l[r]).sort(e.sort)))(t),o=n[0],s=n[1];return a.each(c=>{var l,u;c[o]=[c.x0,c.x1,c.x1,c.x0],c[s]=[c.y1,c.y1,c.y0,c.y0],c.name=c.name||((l=c.data)===null||l===void 0?void 0:l.name)||((u=c.data)===null||u===void 0?void 0:u.label),c.data.name=c.name,["x0","x1","y0","y1"].forEach(f=>{n.indexOf(f)===-1&&delete c[f]})}),RZ(a)}var BZ=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const Gl="sunburst",Qm="markType",Tmt="value",kP="path",Zp="ancestor-node";function FZ(t){const{data:e,encode:n}=t,{color:r,value:i}=n,o=DZ(e,{field:i,type:"hierarchy.partition",as:["x","y"]}),s=[];return o.forEach(c=>{var l,u,f,d;if(c.depth===0)return null;let h=c.data.name;const p=[h];let v=Object.assign({},c);for(;v.depth>1;)h=`${(l=v.parent.data)===null||l===void 0?void 0:l.name} / ${h}`,p.unshift((u=v.parent.data)===null||u===void 0?void 0:u.name),v=v.parent;const g=Object.assign(Object.assign(Object.assign({},Um(c.data,[i])),{[kP]:h,[Zp]:v.data.name}),c);r&&r!==Zp&&(g[r]=c.data[r]||((d=(f=c.parent)===null||f===void 0?void 0:f.data)===null||d===void 0?void 0:d[r])),s.push(g)}),s.map(c=>Object.assign(Object.assign({},c),{x:c.x.slice(0,2),y:[c.y[2],c.y[0]],fillOpacity:Math.pow(.85,c.depth)}))}const LP={id:Gl,encode:{x:"x",y:"y",key:kP,color:Zp,value:"value"},axis:{x:!1,y:!1},style:{[Qm]:Gl,stroke:"#fff",lineWidth:.5,fillOpacity:"fillOpacity",[Bf]:Bf,depth:"depth"},state:{active:{zIndex:2,stroke:"#000"},inactive:{zIndex:1,stroke:"#fff"}},legend:!1,interaction:{drillDown:!0},coordinate:{type:"polar",innerRadius:.2}},NP=t=>{const{encode:e,data:n=[],legend:r}=t,i=BZ(t,["encode","data","legend"]),a=Object.assign(Object.assign({},i.coordinate),{innerRadius:Math.max(Ve(i,["coordinate","innerRadius"],.2),1e-5)}),o=Object.assign(Object.assign({},LP.encode),e),{value:s}=o,c=FZ({encode:o,data:n});return[dt({},LP,Object.assign(Object.assign({type:"rect",data:c,encode:o,tooltip:{title:"path",items:[l=>({name:s,value:l[s]})]}},i),{coordinate:a}))]};NP.props={};var zZ=Object.keys?function(t){return Object.keys(t)}:function(t){var e=[];return am(t,function(n,r){li(t)&&r==="prototype"||e.push(r)}),e},Jm=zZ,GZ=function(t,e,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{l(r.next(u))}catch(f){o(f)}}function c(u){try{l(r.throw(u))}catch(f){o(f)}}function l(u){u.done?a(u.value):i(u.value).then(s,c)}l((r=r.apply(t,e||[])).next())})};const WZ=t=>t.querySelectorAll(".element").filter(e=>Ve(e,["style",Qm])===Gl);function YZ(t){return se(t).select(`.${af}`).node()}const HZ={rootText:"root",style:{fill:"rgba(0, 0, 0, 0.85)",fontSize:12,y:1},active:{fill:"rgba(0, 0, 0, 0.5)"}};function $Z(t={}){const{breadCrumb:e={},fixedColor:n=!0}=t,r=dt({},HZ,e);return i=>{const{update:a,setState:o,container:s,view:c,options:l}=i,u=YZ(s),f=l.marks.find(({id:m})=>m===Gl),{state:d}=f,h=new Er;u.appendChild(h);const p=(m,b)=>GZ(this,void 0,void 0,function*(){if(h.removeChildren(),m){const x=new Di({style:Object.assign({x:0,text:r.rootText,depth:0},r.style)});h.appendChild(x);let _="";const O=m==null?void 0:m.split(" / ");let w=r.style.y,S=h.getBBox().width;const M=u.getBBox().width,E=O.map((P,L)=>{const A=new Di({style:Object.assign(Object.assign({x:S,text:" / "},r.style),{y:w})});h.appendChild(A),S+=A.getBBox().width,_=`${_}${P} / `;const T=new Di({name:_.replace(/\s\/\s$/,""),style:Object.assign(Object.assign({text:P,x:S,depth:L+1},r.style),{y:w})});return h.appendChild(T),S+=T.getBBox().width,S>M&&(w=h.getBBox().height,S=0,A.attr({x:S,y:w}),S+=A.getBBox().width,T.attr({x:S,y:w}),S+=T.getBBox().width),T});[x,...E].forEach((P,L)=>{if(L===E.length)return;const A=Object.assign({},P.attributes);P.attr("cursor","pointer"),P.addEventListener("mouseenter",()=>{P.attr(r.active)}),P.addEventListener("mouseleave",()=>{P.attr(A)}),P.addEventListener("click",()=>{p(P.name,Ve(P,["style","depth"]))})})}o("drillDown",x=>{const{marks:_}=x,O=_.map(w=>{if(w.id!==Gl&&w.type!=="rect")return w;const{data:S}=w,M=Object.fromEntries(["color"].map(P=>[P,{domain:c.scale[P].getOptions().domain}])),E=S.filter(P=>{const L=P.path;return n&&(P[Zp]=L.split(" / ")[b]),m?new RegExp(`^${m}.+`).test(L):!0});return dt({},w,n?{data:E}:{data:E,scale:M})});return Object.assign(Object.assign({},x),{marks:O})}),yield a()}),v=m=>{const b=m.target;if(Ve(b,["style",Qm])!==Gl||Ve(b,["markType"])!=="rect"||!Ve(b,["style",Bf]))return;const x=Ve(b,["__data__","key"]),_=Ve(b,["style","depth"]);b.style.cursor="pointer",p(x,_)};u.addEventListener("click",v);const g=Jm(Object.assign(Object.assign({},d.active),d.inactive)),y=()=>{WZ(u).forEach(b=>{const x=Ve(b,["style",Bf]);if(Ve(b,["style","cursor"])!=="pointer"&&x){b.style.cursor="pointer";const O=Um(b.attributes,g);b.addEventListener("mouseenter",()=>{b.attr(d.active)}),b.addEventListener("mouseleave",()=>{b.attr(dt(O,d.inactive))})}})};return u.addEventListener("mousemove",y),()=>{h.remove(),u.removeEventListener("click",v),u.removeEventListener("mousemove",y)}}}ct.enableCSSParsing=!1;function VZ(){return{"interaction.drillDown":$Z,"mark.sunburst":NP}}const IP=()=>[["cartesian"]];IP.props={};const t1=()=>[["transpose"],["translate",.5,.5],["reflect.x"],["translate",-.5,-.5]];t1.props={transform:!0};const UZ=(t={})=>{const e={startAngle:-Math.PI/2,endAngle:Math.PI*3/2,innerRadius:0,outerRadius:1};return Object.assign(Object.assign({},e),t)},jP=t=>{const{startAngle:e,endAngle:n,innerRadius:r,outerRadius:i}=UZ(t);return[...t1(),...lf({startAngle:e,endAngle:n,innerRadius:r,outerRadius:i})]};jP.props={};const e1=()=>[["parallel",0,1,0,1]];e1.props={};const RP=({focusX:t=0,focusY:e=0,distortionX:n=2,distortionY:r=2,visual:i=!1})=>[["fisheye",t,e,n,r,i]];RP.props={transform:!0};const DP=t=>{const{startAngle:e=-Math.PI/2,endAngle:n=Math.PI*3/2,innerRadius:r=0,outerRadius:i=1}=t;return[...e1(),...lf({startAngle:e,endAngle:n,innerRadius:r,outerRadius:i})]};DP.props={};const BP=({value:t})=>e=>e.map(()=>t);BP.props={};const FP=({value:t})=>e=>e.map(n=>n[t]);FP.props={};const zP=({value:t})=>e=>e.map(t);zP.props={};const GP=({value:t})=>()=>t;GP.props={};function Mn(t,e){if(t!==null)return{type:"column",value:t,field:e}}function Kp(t,e){const n=Mn(t,e);return Object.assign(Object.assign({},n),{inferred:!0})}function Qp(t,e){if(t!==null)return{type:"column",value:t,field:e,visual:!0}}function XZ(t,e){const n=Mn(t,e);return Object.assign(Object.assign({},n),{constant:!1})}function cs(t,e){const n=[];for(const r of t)n[r]=e;return n}function De(t,e){const n=t[e];if(!n)return[null,null];const{value:r,field:i=null}=n;return[r,i]}function Ff(t,...e){for(const n of e)if(typeof n=="string"){const[r,i]=De(t,n);if(r!==null)return[r,i]}else return[n,null];return[null,null]}function zf(t){return t instanceof Date?!1:typeof t=="object"}const Gf=()=>(t,e)=>{const{encode:n}=e,{y1:r}=n;return r!==void 0?[t,e]:[t,dt({},e,{encode:{y1:Kp(cs(t,0))}})]};Gf.props={};const hc=()=>(t,e)=>{const{encode:n}=e,{x:r}=n;return r!==void 0?[t,e]:[t,dt({},e,{encode:{x:Kp(cs(t,0))},scale:{x:{guide:null}}})]};hc.props={};const pc=(t,e)=>kf(Object.assign({colorAttribute:"fill"},t),e);pc.props=Object.assign(Object.assign({},kf.props),{defaultMarker:"square"});const Jp=(t,e)=>kf(Object.assign({colorAttribute:"stroke"},t),e);Jp.props=Object.assign(Object.assign({},kf.props),{defaultMarker:"hollowSquare"});function Wl(){}function WP(t){this._context=t}WP.prototype={areaStart:Wl,areaEnd:Wl,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};function n1(t){return new WP(t)}var YP=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function qZ(t,e,n){const[r,i,a,o]=t;if(kn(n)){const l=[e?e[0][0]:i[0],i[1]],u=[e?e[3][0]:a[0],a[1]];return[r,l,u,o]}const s=[i[0],e?e[0][1]:i[1]],c=[a[0],e?e[3][1]:a[1]];return[r,s,c,o]}const r1=(t,e)=>{const{adjustPoints:n=qZ}=t,r=YP(t,["adjustPoints"]),{coordinate:i,document:a}=e;return(o,s,c,l)=>{const{index:u}=s,{color:f}=c,d=YP(c,["color"]),h=l[u+1],p=n(o,h,i),v=!!kn(i),[g,y,m,b]=v?Pp(p):p,{color:x=f,opacity:_}=s,O=ns().curve(n1)([g,y,m,b]);return se(a.createElement("path",{})).call(Vt,d).style("path",O).style("fill",x).style("fillOpacity",_).call(Vt,r).node()}};r1.props={defaultMarker:"square"};function ZZ(t,e,n){const[r,i,a,o]=t;if(kn(n)){const l=[e?e[0][0]:(i[0]+a[0])/2,i[1]],u=[e?e[3][0]:(i[0]+a[0])/2,a[1]];return[r,l,u,o]}const s=[i[0],e?e[0][1]:(i[1]+a[1])/2],c=[a[0],e?e[3][1]:(i[1]+a[1])/2];return[r,s,c,o]}const HP=(t,e)=>r1(Object.assign({adjustPoints:ZZ},t),e);HP.props={defaultMarker:"square"};function Wf(t){return Math.abs(t)>10?String(t):t.toString().padStart(2,"0")}function KZ(t){const e=t.getFullYear(),n=Wf(t.getMonth()+1),r=Wf(t.getDate()),i=`${e}-${n}-${r}`,a=t.getHours(),o=t.getMinutes(),s=t.getSeconds();return a||o||s?`${i} ${Wf(a)}:${Wf(o)}:${Wf(s)}`:i}const t0=(t={})=>{const{channel:e="x"}=t;return(n,r)=>{const{encode:i}=r,{tooltip:a}=r;if(po(a))return[n,r];const{title:o}=a;if(o!==void 0)return[n,r];const s=Object.keys(i).filter(l=>l.startsWith(e)).filter(l=>!i[l].inferred).map(l=>De(i,l)).filter(([l])=>l).map(l=>l[0]);if(s.length===0)return[n,r];const c=[];for(const l of n)c[l]={value:s.map(u=>u[l]instanceof Date?KZ(u[l]):u[l]).join(", ")};return[n,dt({},r,{tooltip:{title:c}})]}};t0.props={};const e0=t=>{const{channel:e}=t;return(n,r)=>{const{encode:i,tooltip:a}=r;if(po(a))return[n,r];const{items:o=[]}=a;if(!o||o.length>0)return[n,r];const c=(Array.isArray(e)?e:[e]).flatMap(l=>Object.keys(i).filter(u=>u.startsWith(l)).map(u=>{const{field:f,value:d,inferred:h=!1,aggregate:p}=i[u];return h?null:p&&d?{channel:u}:f?{field:f}:d?{channel:u}:null}).filter(u=>u!==null));return[n,dt({},r,{tooltip:{items:c}})]}};e0.props={};var QZ=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const $P=()=>(t,e)=>{const{encode:n}=e,{key:r}=n,i=QZ(n,["key"]);if(r!==void 0)return[t,e];const a=Object.values(i).map(({value:s})=>s),o=t.map(s=>a.filter(Array.isArray).map(c=>c[s]).join("-"));return[t,dt({},e,{encode:{key:Mn(o)}})]};$P.props={};function VP(t={}){const{shapes:e}=t;return[{name:"color"},{name:"opacity"},{name:"shape",range:e},{name:"enterType"},{name:"enterDelay",scaleKey:"enter"},{name:"enterDuration",scaleKey:"enter"},{name:"enterEasing"},{name:"key",scale:"identity"},{name:"groupKey",scale:"identity"},{name:"label",scale:"identity"}]}function ui(t={}){return[...VP(t),{name:"title",scale:"identity"}]}function Cmt(){return[{type:MaybeTitle,channel:"color"},{type:MaybeTooltip,channel:["x","y","z"]}]}function ls(){return[{type:t0,channel:"color"},{type:e0,channel:["x","y"]}]}function Yl(){return[{type:t0,channel:"x"},{type:e0,channel:["y"]}]}function JZ(){return[{type:t0,channel:"color"},{type:e0,channel:["position"]}]}function Hl(t={}){return VP(t)}function nr(){return[{type:$P}]}function dr(){return[]}function i1(t,e){return t.getBandWidth(t.invert(e))}function vc(t,e,n={}){const{x:r,y:i,series:a}=e,{x:o,y:s,series:c}=t,{style:{bandOffset:l=c?0:.5,bandOffsetX:u=l,bandOffsetY:f=l}={}}=n,d=!!(o!=null&&o.getBandWidth),h=!!(s!=null&&s.getBandWidth),p=!!(c!=null&&c.getBandWidth);return!d&&!h?v=>v:(v,g)=>{const y=d?i1(o,r[g]):0,m=h?i1(s,i[g]):0,x=p&&a?(()=>(i1(c,a[g])/2+ +a[g])*y)():0,[_,O]=v;return[_+u*y+x,O+f*m]}}function n0(t){return parseFloat(t)/100}function a1(t,e,n,r){const{x:i,y:a}=n,{innerWidth:o,innerHeight:s}=r.getOptions(),c=Array.from(t,l=>{const u=i[l],f=a[l],d=typeof u=="string"?n0(u)*o:+u,h=typeof f=="string"?n0(f)*s:+f;return[[d,h]]});return[t,c]}function $a(t){return typeof t=="function"?t:e=>e[t]}function o1(t,e){return Array.from(t,$a(e))}function s1(t,e){const{source:n=u=>u.source,target:r=u=>u.target,value:i=u=>u.value}=e,{links:a,nodes:o}=t,s=o1(a,n),c=o1(a,r),l=o1(a,i);return{links:a.map((u,f)=>({target:c[f],source:s[f],value:l[f]})),nodes:o||Array.from(new Set([...s,...c]),u=>({key:u}))}}function UP(t,e){return t.getBandWidth(t.invert(e))}const XP={rect:pc,hollow:Jp,funnel:r1,pyramid:HP},qP=()=>(t,e,n,r)=>{const{x:i,y:a,y1:o,series:s,size:c}=n,l=e.x,u=e.series,[f]=r.getSize(),d=c?c.map(v=>+v/f):null,h=c?(v,g,y)=>{const m=v+g/2,b=d[y];return[m-b/2,m+b/2]}:(v,g,y)=>[v,v+g],p=Array.from(t,v=>{const g=UP(l,i[v]),y=u?UP(u,s==null?void 0:s[v]):1,m=g*y,b=(+(s==null?void 0:s[v])||0)*g,x=+i[v]+b,[_,O]=h(x,m,v),w=+a[v],S=+o[v];return[[_,w],[O,w],[O,S],[_,S]].map(A=>r.map(A))});return[t,p]};qP.props={defaultShape:"rect",defaultLabelShape:"label",composite:!1,shape:XP,channels:[...ui({shapes:Object.keys(XP)}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"},{name:"size"}],preInference:[...nr(),{type:Gf},{type:hc}],postInference:[...dr(),...Yl()],interaction:{shareTooltip:!0}};const ZP={rect:pc,hollow:Jp},KP=()=>(t,e,n,r)=>{const{x:i,x1:a,y:o,y1:s}=n,c=Array.from(t,l=>{const u=[+i[l],+o[l]],f=[+a[l],+o[l]],d=[+a[l],+s[l]],h=[+i[l],+s[l]];return[u,f,d,h].map(p=>r.map(p))});return[t,c]};KP.props={defaultShape:"rect",defaultLabelShape:"label",composite:!1,shape:ZP,channels:[...ui({shapes:Object.keys(ZP)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...nr(),{type:Gf}],postInference:[...dr(),...Yl()],interaction:{shareTooltip:!0}};var QP=c1(Ef);function JP(t){this._curve=t}JP.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}};function c1(t){function e(n){return new JP(t(n))}return e._curve=t,e}function Yf(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(n){return arguments.length?e(c1(n)):e()._curve},t}function tK(){return Yf(ns().curve(QP))}var tA=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const eK=Tl(t=>{const{d1:e,d2:n,style1:r,style2:i}=t.attributes,a=t.ownerDocument;se(t).maybeAppend("line",()=>a.createElement("path",{})).style("d",e).call(Vt,r),se(t).maybeAppend("line1",()=>a.createElement("path",{})).style("d",n).call(Vt,i)});function nK(t,e){const n=[],r=[];let i=!1,a=null;for(const o of t)!e(o[0])||!e(o[1])?i=!0:(n.push(o),i&&(i=!1,r.push([a,o])),a=o);return[n,r]}const ra=(t,e)=>{const{curve:n,gradient:r=!1,gradientColor:i="between",defined:a=u=>!Number.isNaN(u)&&u!==void 0&&u!==null,connect:o=!1}=t,s=tA(t,["curve","gradient","gradientColor","defined","connect"]),{coordinate:c,document:l}=e;return(u,f,d)=>{const{color:h,lineWidth:p}=d,v=tA(d,["color","lineWidth"]),{color:g=h,size:y=p,seriesColor:m,seriesX:b,seriesY:x}=f,_=wM(c,f),O=kn(c),w=r&&m?_M(m,b,x,r,i,O):g,S=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},v),w&&{stroke:w}),y&&{lineWidth:y}),_&&{transform:_}),s);let M;if(xn(c)){const C=c.getCenter();M=N=>tK().angle((B,j)=>Al(Xn(N[j],C))).radius((B,j)=>Fn(N[j],C)).defined(([B,j])=>a(B)&&a(j)).curve(n)(N)}else M=ns().x(C=>C[0]).y(C=>C[1]).defined(([C,N])=>a(C)&&a(N)).curve(n);const[E,P]=nK(u,a),L=At(S,"connect"),A=!!P.length;if(!A||o&&!Object.keys(L).length)return se(l.createElement("path",{})).style("d",M(E)||[]).call(Vt,S).node();if(A&&!o)return se(l.createElement("path",{})).style("d",M(u)).call(Vt,S).node();const T=C=>C.map(M).join(",");return se(new eK).style("style1",Object.assign(Object.assign({},S),L)).style("style2",S).style("d1",T(P)).style("d2",M(u)).node()}};ra.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const eA=(t,e)=>{const{coordinate:n}=e;return(...r)=>{const i=xn(n)?n1:Ef;return ra(Object.assign({curve:i},t),e)(...r)}};eA.props=Object.assign(Object.assign({},ra.props),{defaultMarker:"line"});function l1(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function u1(t,e){this._context=t,this._k=(1-e)/6}u1.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:l1(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:l1(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var kmt=function t(e){function n(r){return new u1(r,e)}return n.tension=function(r){return t(+r)},n}(0);function f1(t,e){this._context=t,this._k=(1-e)/6}f1.prototype={areaStart:Wl,areaEnd:Wl,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:l1(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Lmt=function t(e){function n(r){return new f1(r,e)}return n.tension=function(r){return t(+r)},n}(0);function nA(t,e,n){var r=t._x1,i=t._y1,a=t._x2,o=t._y2;if(t._l01_a>Jr){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,i=(i*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>Jr){var l=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,u=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*l+t._x1*t._l23_2a-e*t._l12_2a)/u,o=(o*l+t._y1*t._l23_2a-n*t._l12_2a)/u}t._context.bezierCurveTo(r,i,a,o,t._x2,t._y2)}function rA(t,e){this._context=t,this._alpha=e}rA.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:nA(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Nmt=function t(e){function n(r){return e?new rA(r,e):new u1(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function iA(t,e){this._context=t,this._alpha=e}iA.prototype={areaStart:Wl,areaEnd:Wl,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:nA(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var aA=function t(e){function n(r){return e?new iA(r,e):new f1(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function oA(t){return t<0?-1:1}function sA(t,e,n){var r=t._x1-t._x0,i=e-t._x1,a=(t._y1-t._y0)/(r||i<0&&-0),o=(n-t._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(oA(a)+oA(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function cA(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function d1(t,e,n){var r=t._x0,i=t._y0,a=t._x1,o=t._y1,s=(a-r)/3;t._context.bezierCurveTo(r+s,i+s*e,a-s,o-s*n,a,o)}function r0(t){this._context=t}r0.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:d1(this,this._t0,cA(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(t=+t,e=+e,!(t===this._x1&&e===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,d1(this,cA(this,n=sA(this,t,e)),n);break;default:d1(this,this._t0,n=sA(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}};function lA(t){this._context=new uA(t)}(lA.prototype=Object.create(r0.prototype)).point=function(t,e){r0.prototype.point.call(this,e,t)};function uA(t){this._context=t}uA.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,r,i,a){this._context.bezierCurveTo(e,t,r,n,a,i)}};function fA(t){return new r0(t)}function dA(t){return new lA(t)}var rK=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const hA=(t,e)=>{const n=rK(t,[]),{coordinate:r}=e;return(...i)=>{const a=xn(r)?aA:kn(r)?dA:fA;return ra(Object.assign({curve:a},n),e)(...i)}};hA.props=Object.assign(Object.assign({},ra.props),{defaultMarker:"smooth"});function i0(t,e){this._context=t,this._t=e}i0.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}break}}this._x=t,this._y=e}};function pA(t){return new i0(t,.5)}function vA(t){return new i0(t,0)}function gA(t){return new i0(t,1)}const yA=(t,e)=>ra(Object.assign({curve:gA},t),e);yA.props=Object.assign(Object.assign({},ra.props),{defaultMarker:"hv"});const mA=(t,e)=>ra(Object.assign({curve:vA},t),e);mA.props=Object.assign(Object.assign({},ra.props),{defaultMarker:"vh"});const bA=(t,e)=>ra(Object.assign({curve:pA},t),e);bA.props=Object.assign(Object.assign({},ra.props),{defaultMarker:"hvh"});var iK=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function aK(t,e,n,r,i){const a=Xn(n,e),o=ea(a),s=o+Math.PI/2,c=[r/2*Math.cos(s),r/2*Math.sin(s)],l=[i/2*Math.cos(s),i/2*Math.sin(s)],u=[i/2*Math.cos(o),i/2*Math.sin(o)],f=[r/2*Math.cos(o),r/2*Math.sin(o)],d=Ep(e,c),h=Ep(n,l),p=Ep(h,u),v=Ep(n,u),g=Xn(v,l),y=Xn(n,l),m=Xn(e,c),b=Xn(m,f),x=Xn(e,f),_=Xn(d,f);t.moveTo(...d),t.lineTo(...h),t.arcTo(...p,...v,i/2),t.arcTo(...g,...y,i/2),t.lineTo(...m),t.arcTo(...b,...x,r/2),t.arcTo(..._,...d,r/2),t.closePath()}const xA=(t,e)=>{const{document:n}=e;return(r,i,a)=>{const{seriesSize:o,color:s}=i,{color:c}=a,l=iK(a,["color"]),u=na();for(let f=0;f<r.length-1;f++){const d=r[f],h=r[f+1],p=o[f],v=o[f+1];[...d,...h].every(bn)&&aK(u,d,h,p,v)}return se(n.createElement("path",{})).call(Vt,l).style("fill",s||c).style("d",u.toString()).call(Vt,t).node()}};xA.props=Object.assign(Object.assign({},ra.props),{defaultMarker:"line"});const _A=()=>(t,e)=>{const{style:n={},encode:r}=e,{series:i}=r,{gradient:a}=n;return!a||i?[t,e]:[t,dt({},e,{encode:{series:Qp(cs(t,void 0))}})]};_A.props={};const h1=()=>(t,e)=>{const{encode:n}=e,{series:r,color:i}=n;if(r!==void 0||i===void 0)return[t,e];const[a,o]=De(n,"color");return[t,dt({},e,{encode:{series:Mn(a,o)}})]};h1.props={};const OA={line:eA,smooth:hA,hv:yA,vh:mA,hvh:bA,trail:xA},oK=(t,e,n,r)=>{var i,a;const{series:o,x:s,y:c}=n,{x:l,y:u}=e;if(s===void 0||c===void 0)throw new Error("Missing encode for x or y channel.");const f=o?Array.from(Bn(t,g=>o[g]).values()):[t],d=f.map(g=>g[0]).filter(g=>g!==void 0),h=(((i=l==null?void 0:l.getBandWidth)===null||i===void 0?void 0:i.call(l))||0)/2,p=(((a=u==null?void 0:u.getBandWidth)===null||a===void 0?void 0:a.call(u))||0)/2,v=Array.from(f,g=>g.map(y=>r.map([+s[y]+h,+c[y]+p])));return[d,v,f]},sK=(t,e,n,r)=>{const i=Object.entries(n).filter(([o])=>o.startsWith("position")).map(([,o])=>o);if(i.length===0)throw new Error("Missing encode for position channel.");const a=Array.from(t,o=>{const s=i.map(u=>+u[o]),c=r.map(s),l=[];for(let u=0;u<c.length;u+=2)l.push([c[u],c[u+1]]);return l});return[t,a]},wA=()=>(t,e,n,r)=>(ff(r)?sK:oK)(t,e,n,r);wA.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,shape:OA,channels:[...ui({shapes:Object.keys(OA)}),{name:"x"},{name:"y"},{name:"position",independent:!0},{name:"size"},{name:"series",scale:"band"}],preInference:[...nr(),{type:_A},{type:h1}],postInference:[...dr(),...Yl(),...JZ()],interaction:{shareTooltip:!0,seriesTooltip:!0,crosshairs:!0}};var cK=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const p1=(t,e,n)=>[["M",t-n,e],["A",n,n,0,1,0,t+n,e],["A",n,n,0,1,0,t-n,e],["Z"]];p1.style=["fill"];const SA=p1.bind(void 0);SA.style=["stroke","lineWidth"];const a0=(t,e,n)=>[["M",t-n,e-n],["L",t+n,e-n],["L",t+n,e+n],["L",t-n,e+n],["Z"]];a0.style=["fill"];const MA=a0.bind(void 0);MA.style=["fill"];const EA=a0.bind(void 0);EA.style=["stroke","lineWidth"];const v1=(t,e,n)=>{const r=n*.618;return[["M",t-r,e],["L",t,e-n],["L",t+r,e],["L",t,e+n],["Z"]]};v1.style=["fill"];const PA=v1.bind(void 0);PA.style=["stroke","lineWidth"];const g1=(t,e,n)=>{const r=n*Math.sin(.3333333333333333*Math.PI);return[["M",t-n,e+r],["L",t,e-r],["L",t+n,e+r],["Z"]]};g1.style=["fill"];const AA=g1.bind(void 0);AA.style=["stroke","lineWidth"];const y1=(t,e,n)=>{const r=n*Math.sin(.3333333333333333*Math.PI);return[["M",t-n,e-r],["L",t+n,e-r],["L",t,e+r],["Z"]]};y1.style=["fill"];const TA=y1.bind(void 0);TA.style=["stroke","lineWidth"];const m1=(t,e,n)=>{const r=n/2*Math.sqrt(3);return[["M",t,e-n],["L",t+r,e-n/2],["L",t+r,e+n/2],["L",t,e+n],["L",t-r,e+n/2],["L",t-r,e-n/2],["Z"]]};m1.style=["fill"];const CA=m1.bind(void 0);CA.style=["stroke","lineWidth"];const b1=(t,e,n)=>{const r=n-1.5;return[["M",t-n,e-r],["L",t+n,e+r],["L",t+n,e-r],["L",t-n,e+r],["Z"]]};b1.style=["fill"];const kA=b1.bind(void 0);kA.style=["stroke","lineWidth"];const LA=(t,e,n)=>[["M",t,e+n],["L",t,e-n]];LA.style=["stroke","lineWidth"];const NA=(t,e,n)=>[["M",t-n,e-n],["L",t+n,e+n],["M",t+n,e-n],["L",t-n,e+n]];NA.style=["stroke","lineWidth"];const IA=(t,e,n)=>[["M",t-n/2,e-n],["L",t+n/2,e-n],["M",t,e-n],["L",t,e+n],["M",t-n/2,e+n],["L",t+n/2,e+n]];IA.style=["stroke","lineWidth"];const jA=(t,e,n)=>[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]];jA.style=["stroke","lineWidth"];const RA=(t,e,n)=>[["M",t-n,e],["L",t+n,e]];RA.style=["stroke","lineWidth"];const x1=(t,e,n)=>[["M",t-n,e],["L",t+n,e]];x1.style=["stroke","lineWidth"];const DA=x1.bind(void 0);DA.style=["stroke","lineWidth"];const BA=(t,e,n)=>[["M",t-n,e],["A",n/2,n/2,0,1,1,t,e],["A",n/2,n/2,0,1,0,t+n,e]];BA.style=["stroke","lineWidth"];const FA=(t,e,n)=>[["M",t-n-1,e-2.5],["L",t,e-2.5],["L",t,e+2.5],["L",t+n+1,e+2.5]];FA.style=["stroke","lineWidth"];const zA=(t,e,n)=>[["M",t-n-1,e+2.5],["L",t,e+2.5],["L",t,e-2.5],["L",t+n+1,e-2.5]];zA.style=["stroke","lineWidth"];const GA=(t,e,n)=>[["M",t-(n+1),e+2.5],["L",t-n/2,e+2.5],["L",t-n/2,e-2.5],["L",t+n/2,e-2.5],["L",t+n/2,e+2.5],["L",t+n+1,e+2.5]];GA.style=["stroke","lineWidth"];const WA=(t,e,n)=>[["M",t-5,e+2.5],["L",t-5,e],["L",t,e],["L",t,e-3],["L",t,e+3],["L",t+6.5,e+3]];WA.style=["stroke","lineWidth"];const $l=new Map([["bowtie",b1],["cross",NA],["dash",DA],["diamond",v1],["dot",x1],["hexagon",m1],["hollowBowtie",kA],["hollowDiamond",PA],["hollowHexagon",CA],["hollowPoint",SA],["hollowSquare",EA],["hollowTriangle",AA],["hollowTriangleDown",TA],["hv",FA],["hvh",GA],["hyphen",RA],["line",LA],["plus",jA],["point",p1],["rect",MA],["smooth",BA],["square",a0],["tick",IA],["triangleDown",y1],["triangle",g1],["vh",zA],["vhv",WA]]);function lK(t,e){var{d:n,fill:r,strokeWidth:i,path:a,stroke:o,lineWidth:s,color:c}=e,l=cK(e,["d","fill","strokeWidth","path","stroke","lineWidth","color"]);const u=$l.get(t)||$l.get("point");return(...f)=>new Zr({style:Object.assign(Object.assign({},l),{path:u(...f),stroke:u.style.includes("stroke")?c||o:"",fill:u.style.includes("fill")?c||r:"",lineWidth:u.style.includes("lineWidth")?s||s||2:0})})}function Imt(t,e){$l.set(t,e)}function jmt(t){$l.delete(t)}var uK=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function fK(t,e,n,r){if(e.length===1)return;const{size:i}=n;if(t==="fixed")return i;if(t==="normal"||Bw(r)){const[[a,o],[s,c]]=e,l=Math.abs((s-a)/2),u=Math.abs((c-o)/2);return Math.max(0,(l+u)/2)}return i}const ke=(t,e)=>{const{colorAttribute:n,symbol:r,mode:i="auto"}=t,a=uK(t,["colorAttribute","symbol","mode"]),o=$l.get(r)||$l.get("point"),{coordinate:s,document:c}=e;return(l,u,f)=>{const{lineWidth:d,color:h}=f,p=a.stroke?d||1:d,{color:v=h,transform:g,opacity:y}=u,[m,b]=SM(l),_=fK(i,l,u,s)||a.r||f.r;return se(c.createElement("path",{})).call(Vt,f).style("fill","transparent").style("d",o(m,b,_)).style("lineWidth",p).style("transform",g).style("stroke",v).style(OM(t),y).style(n,v).call(Vt,a).node()}};ke.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const YA=(t,e)=>ke(Object.assign({colorAttribute:"stroke",symbol:"point"},t),e);YA.props=Object.assign({defaultMarker:"hollowPoint"},ke.props);const HA=(t,e)=>ke(Object.assign({colorAttribute:"stroke",symbol:"diamond"},t),e);HA.props=Object.assign({defaultMarker:"hollowDiamond"},ke.props);const $A=(t,e)=>ke(Object.assign({colorAttribute:"stroke",symbol:"hexagon"},t),e);$A.props=Object.assign({defaultMarker:"hollowHexagon"},ke.props);const VA=(t,e)=>ke(Object.assign({colorAttribute:"stroke",symbol:"square"},t),e);VA.props=Object.assign({defaultMarker:"hollowSquare"},ke.props);const UA=(t,e)=>ke(Object.assign({colorAttribute:"stroke",symbol:"triangle-down"},t),e);UA.props=Object.assign({defaultMarker:"hollowTriangleDown"},ke.props);const XA=(t,e)=>ke(Object.assign({colorAttribute:"stroke",symbol:"triangle"},t),e);XA.props=Object.assign({defaultMarker:"hollowTriangle"},ke.props);const qA=(t,e)=>ke(Object.assign({colorAttribute:"stroke",symbol:"bowtie"},t),e);qA.props=Object.assign({defaultMarker:"hollowBowtie"},ke.props);const ZA=(t,e)=>ke(Object.assign({colorAttribute:"fill",symbol:"point"},t),e);ZA.props=Object.assign({defaultMarker:"point"},ke.props);const KA=(t,e)=>ke(Object.assign({colorAttribute:"stroke",symbol:"plus"},t),e);KA.props=Object.assign({defaultMarker:"plus"},ke.props);const QA=(t,e)=>ke(Object.assign({colorAttribute:"fill",symbol:"diamond"},t),e);QA.props=Object.assign({defaultMarker:"diamond"},ke.props);const JA=(t,e)=>ke(Object.assign({colorAttribute:"fill",symbol:"square"},t),e);JA.props=Object.assign({defaultMarker:"square"},ke.props);const tT=(t,e)=>ke(Object.assign({colorAttribute:"fill",symbol:"triangle"},t),e);tT.props=Object.assign({defaultMarker:"triangle"},ke.props);const eT=(t,e)=>ke(Object.assign({colorAttribute:"fill",symbol:"hexagon"},t),e);eT.props=Object.assign({defaultMarker:"hexagon"},ke.props);const nT=(t,e)=>ke(Object.assign({colorAttribute:"stroke",symbol:"cross"},t),e);nT.props=Object.assign({defaultMarker:"cross"},ke.props);const rT=(t,e)=>ke(Object.assign({colorAttribute:"fill",symbol:"bowtie"},t),e);rT.props=Object.assign({defaultMarker:"bowtie"},ke.props);const iT=(t,e)=>ke(Object.assign({colorAttribute:"stroke",symbol:"hyphen"},t),e);iT.props=Object.assign({defaultMarker:"hyphen"},ke.props);const aT=(t,e)=>ke(Object.assign({colorAttribute:"stroke",symbol:"line"},t),e);aT.props=Object.assign({defaultMarker:"line"},ke.props);const oT=(t,e)=>ke(Object.assign({colorAttribute:"stroke",symbol:"tick"},t),e);oT.props=Object.assign({defaultMarker:"tick"},ke.props);const sT=(t,e)=>ke(Object.assign({colorAttribute:"fill",symbol:"triangle-down"},t),e);sT.props=Object.assign({defaultMarker:"triangleDown"},ke.props);const o0=()=>(t,e)=>{const{encode:n}=e,{y:r}=n;return r!==void 0?[t,e]:[t,dt({},e,{encode:{y:Kp(cs(t,0))},scale:{y:{guide:null}}})]};o0.props={};const cT=()=>(t,e)=>{const{encode:n}=e,{size:r}=n;return r!==void 0?[t,e]:[t,dt({},e,{encode:{size:Qp(cs(t,3))}})]};cT.props={};const lT={hollow:YA,hollowDiamond:HA,hollowHexagon:$A,hollowSquare:VA,hollowTriangleDown:UA,hollowTriangle:XA,hollowBowtie:qA,point:ZA,plus:KA,diamond:QA,square:JA,triangle:tT,hexagon:eT,cross:nT,bowtie:rT,hyphen:iT,line:aT,tick:oT,triangleDown:sT},uT=t=>(e,n,r,i)=>{const{x:a,y:o,x1:s,y1:c,size:l,dx:u,dy:f}=r,[d,h]=i.getSize(),p=vc(n,r,t),v=y=>{const m=+((u==null?void 0:u[y])||0),b=+((f==null?void 0:f[y])||0),x=s?(+a[y]+ +s[y])/2:+a[y],_=c?(+o[y]+ +c[y])/2:+o[y],O=x+m,w=_+b;return[O,w]},g=l?Array.from(e,y=>{const[m,b]=v(y),x=+l[y],_=x/d,O=x/h,w=[m-_,b-O],S=[m+_,b+O];return[i.map(p(w,y)),i.map(p(S,y))]}):Array.from(e,y=>[i.map(p(v(y),y))]);return[e,g]};uT.props={defaultShape:"hollow",defaultLabelShape:"label",composite:!1,shape:lT,channels:[...ui({shapes:Object.keys(lT)}),{name:"x",required:!0},{name:"y",required:!0},{name:"series",scale:"band"},{name:"size",quantitative:"sqrt"},{name:"dx",scale:"identity"},{name:"dy",scale:"identity"}],preInference:[...nr(),{type:hc},{type:o0}],postInference:[...dr(),{type:cT},...ls()]};const fT=(t,e)=>{const{coordinate:n}=e;return(r,i,a)=>{const{color:o,text:s="",fontSize:c,rotate:l=0,transform:u=""}=i,f={text:String(s),stroke:o,fill:o,fontSize:c},[[d,h]]=r;return se(new kM).style("x",d).style("y",h).call(Vt,a).style("transform",`${u}rotate(${+l})`).style("coordCenter",n.getCenter()).call(Vt,f).call(Vt,t).node()}};fT.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var _1=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function dK(t){const e=t/Math.sqrt(2),n=t*Math.sqrt(2),[r,i]=[-e,e-n],[a,o]=[0,0],[s,c]=[e,e-n];return[["M",r,i],["A",t,t,0,1,1,s,c],["L",a,o],["Z"]]}function hK(t){const{min:e,max:n}=t.getLocalBounds();return[(e[0]+n[0])*.5,(e[1]+n[1])*.5]}const pK=Tl(t=>{const e=t.attributes,{class:n,x:r,y:i}=e,a=_1(e,["class","x","y"]),o=At(a,"marker"),{size:s=24}=o,c=()=>dK(s/2),l=se(t).maybeAppend("marker",()=>new Je({})).call(d=>d.node().update(Object.assign({symbol:c},o))).node(),[u,f]=hK(l);se(t).maybeAppend("text","text").style("x",u).style("y",f).call(Vt,a)}),dT=(t,e)=>{const n=_1(t,[]);return(r,i,a)=>{const{color:o}=a,s=_1(a,["color"]),{color:c=o,text:l=""}=i,u={text:String(l),stroke:c,fill:c},[[f,d]]=r;return se(new pK).call(Vt,s).style("x",f).style("y",d).call(Vt,u).call(Vt,n).node()}};dT.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const s0=()=>(t,e)=>{const{data:n}=e;if(!Array.isArray(n)||n.some(zf))return[t,e];const r=Array.isArray(n[0])?n:[n],i=r.map(o=>o[0]),a=r.map(o=>o[1]);return[t,dt({},e,{encode:{x:Mn(i),y:Mn(a)}})]};s0.props={};var hT=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const c0=()=>(t,e)=>{const{data:n,style:r={}}=e,i=hT(e,["data","style"]),{x:a,y:o}=r,s=hT(r,["x","y"]);if(a==null||o==null)return[t,e];const c=a||0,l=o||0;return[[0],dt({},i,{data:[0],cartesian:!0,encode:{x:Mn([c]),y:Mn([l])},scale:{x:{type:"identity",independent:!0,guide:null},y:{type:"identity",independent:!0,guide:null}},style:s})]};c0.props={};const pT={text:fT,badge:dT},vT=t=>{const{cartesian:e=!1}=t;return e?a1:(n,r,i,a)=>{const{x:o,y:s}=i,c=vc(r,i,t),l=Array.from(n,u=>{const f=[+o[u],+s[u]];return[a.map(c(f,u))]});return[n,l]}};vT.props={defaultShape:"text",defaultLabelShape:"label",composite:!1,shape:pT,channels:[...ui({shapes:Object.keys(pT)}),{name:"x",required:!0},{name:"y",required:!0},{name:"text",scale:"identity"},{name:"fontSize"},{name:"rotate"}],preInference:[...nr(),{type:s0},{type:c0}],postInference:[...dr(),...ls()]};const O1=()=>(t,e)=>[t,dt({scale:{x:{padding:0},y:{padding:0}}},e)];O1.props={};const gT={cell:pc,hollow:Jp},yT=()=>(t,e,n,r)=>{const{x:i,y:a}=n,o=e.x,s=e.y,c=Array.from(t,l=>{const u=o.getBandWidth(o.invert(+i[l])),f=s.getBandWidth(s.invert(+a[l])),d=+i[l],h=+a[l],p=[d,h],v=[d+u,h],g=[d+u,h+f],y=[d,h+f];return[p,v,g,y].map(m=>r.map(m))});return[t,c]};yT.props={defaultShape:"cell",defaultLabelShape:"label",shape:gT,composite:!1,channels:[...ui({shapes:Object.keys(gT)}),{name:"x",required:!0,scale:"band"},{name:"y",required:!0,scale:"band"}],preInference:[...nr(),{type:hc},{type:o0},{type:O1}],postInference:[...dr(),...ls()]};function w1(t,e,n){var r=null,i=Nn(!0),a=null,o=Ef,s=null,c=gm(l);t=typeof t=="function"?t:t===void 0?TM:Nn(+t),e=typeof e=="function"?e:Nn(e===void 0?0:+e),n=typeof n=="function"?n:n===void 0?CM:Nn(+n);function l(f){var d,h,p,v=(f=EM(f)).length,g,y=!1,m,b=new Array(v),x=new Array(v);for(a==null&&(s=o(m=c())),d=0;d<=v;++d){if(!(d<v&&i(g=f[d],d,f))===y)if(y=!y)h=d,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),p=d-1;p>=h;--p)s.point(b[p],x[p]);s.lineEnd(),s.areaEnd()}y&&(b[d]=+t(g,d,f),x[d]=+e(g,d,f),s.point(r?+r(g,d,f):b[d],n?+n(g,d,f):x[d]))}if(m)return s=null,m+""||null}function u(){return ns().defined(i).curve(o).context(a)}return l.x=function(f){return arguments.length?(t=typeof f=="function"?f:Nn(+f),r=null,l):t},l.x0=function(f){return arguments.length?(t=typeof f=="function"?f:Nn(+f),l):t},l.x1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:Nn(+f),l):r},l.y=function(f){return arguments.length?(e=typeof f=="function"?f:Nn(+f),n=null,l):e},l.y0=function(f){return arguments.length?(e=typeof f=="function"?f:Nn(+f),l):e},l.y1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:Nn(+f),l):n},l.lineX0=l.lineY0=function(){return u().x(t).y(e)},l.lineY1=function(){return u().x(t).y(n)},l.lineX1=function(){return u().x(r).y(e)},l.defined=function(f){return arguments.length?(i=typeof f=="function"?f:Nn(!!f),l):i},l.curve=function(f){return arguments.length?(o=f,a!=null&&(s=o(a)),l):o},l.context=function(f){return arguments.length?(f==null?a=s=null:s=o(a=f),l):a},l}function vK(){var t=w1().curve(QP),e=t.curve,n=t.lineX0,r=t.lineX1,i=t.lineY0,a=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return Yf(n())},delete t.lineX0,t.lineEndAngle=function(){return Yf(r())},delete t.lineX1,t.lineInnerRadius=function(){return Yf(i())},delete t.lineY0,t.lineOuterRadius=function(){return Yf(a())},delete t.lineY1,t.curve=function(o){return arguments.length?e(c1(o)):e()._curve},t}var gK=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function yK(t,e){const n=[],r=[],i=[];let a=!1,o=null;const s=t.length/2;for(let c=0;c<s;c++){const l=t[c],u=t[c+s];if([...l,...u].some(f=>!e(f)))a=!0;else{if(n.push(l),r.push(u),a&&o){a=!1;const[f,d]=o;i.push([f,l,d,u])}o=[l,u]}}return[n.concat(r),i]}const mT=Tl(t=>{const{areaPath:e,connectPath:n,areaStyle:r,connectStyle:i}=t.attributes,a=t.ownerDocument;se(t).maybeAppend("connect-path",()=>a.createElement("path",{})).style("d",n).call(Vt,i),se(t).maybeAppend("area-path",()=>a.createElement("path",{})).style("d",e).call(Vt,r)}),Oa=(t,e)=>{const{curve:n,gradient:r=!1,defined:i=l=>!Number.isNaN(l)&&l!==void 0&&l!==null,connect:a=!1}=t,o=gK(t,["curve","gradient","defined","connect"]),{coordinate:s,document:c}=e;return(l,u,f)=>{const{color:d}=f,{color:h=d,seriesColor:p,seriesX:v,seriesY:g}=u,y=kn(s),m=wM(s,u),b=r&&p?_M(p,v,g,r,void 0,y):h,x=Object.assign(Object.assign(Object.assign(Object.assign({},f),{stroke:b,fill:b}),m&&{transform:m}),o),[_,O]=yK(l,i),w=At(x,"connect"),S=!!O.length,M=E=>se(c.createElement("path",{})).style("d",E||"").call(Vt,x).node();if(xn(s)){const E=P=>{const L=s.getCenter(),A=P.slice(0,P.length/2),T=P.slice(P.length/2);return vK().angle((C,N)=>Al(Xn(A[N],L))).outerRadius((C,N)=>Fn(A[N],L)).innerRadius((C,N)=>Fn(T[N],L)).defined((C,N)=>[...A[N],...T[N]].every(i)).curve(n)(T)};return!S||a&&!Object.keys(w).length?M(E(_)):S&&!a?M(E(l)):se(new mT).style("areaStyle",x).style("connectStyle",Object.assign(Object.assign({},w),o)).style("areaPath",E(l)).style("connectPath",O.map(E).join("")).node()}else{const E=P=>{const L=P.slice(0,P.length/2),A=P.slice(P.length/2);return y?w1().y((T,C)=>L[C][1]).x1((T,C)=>L[C][0]).x0((T,C)=>A[C][0]).defined((T,C)=>[...L[C],...A[C]].every(i)).curve(n)(L):w1().x((T,C)=>L[C][0]).y1((T,C)=>L[C][1]).y0((T,C)=>A[C][1]).defined((T,C)=>[...L[C],...A[C]].every(i)).curve(n)(L)};return!S||a&&!Object.keys(w).length?M(E(_)):S&&!a?M(E(l)):se(new mT).style("areaStyle",x).style("connectStyle",Object.assign(Object.assign({},w),o)).style("areaPath",E(l)).style("connectPath",O.map(E).join("")).node()}}};Oa.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const bT=(t,e)=>{const{coordinate:n}=e;return(...r)=>{const i=xn(n)?n1:Ef;return Oa(Object.assign({curve:i},t),e)(...r)}};bT.props=Object.assign(Object.assign({},Oa.props),{defaultMarker:"square"});var mK=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const xT=(t,e)=>{const n=mK(t,[]),{coordinate:r}=e;return(...i)=>{const a=xn(r)?aA:kn(r)?dA:fA;return Oa(Object.assign({curve:a},n),e)(...i)}};xT.props=Object.assign(Object.assign({},Oa.props),{defaultMarker:"smooth"});const _T=(t,e)=>(...n)=>Oa(Object.assign({curve:pA},t),e)(...n);_T.props=Object.assign(Object.assign({},Oa.props),{defaultMarker:"hvh"});const OT=(t,e)=>(...n)=>Oa(Object.assign({curve:vA},t),e)(...n);OT.props=Object.assign(Object.assign({},Oa.props),{defaultMarker:"vh"});const wT=(t,e)=>(...n)=>Oa(Object.assign({curve:gA},t),e)(...n);wT.props=Object.assign(Object.assign({},Oa.props),{defaultMarker:"hv"});const ST={area:bT,smooth:xT,hvh:_T,vh:OT,hv:wT},MT=()=>(t,e,n,r)=>{var i,a;const{x:o,y:s,y1:c,series:l}=n,{x:u,y:f}=e,d=l?Array.from(Bn(t,y=>l[y]).values()):[t],h=d.map(y=>y[0]).filter(y=>y!==void 0),p=(((i=u==null?void 0:u.getBandWidth)===null||i===void 0?void 0:i.call(u))||0)/2,v=(((a=f==null?void 0:f.getBandWidth)===null||a===void 0?void 0:a.call(f))||0)/2,g=Array.from(d,y=>{const m=y.length,b=new Array(m*2);for(let x=0;x<y.length;x++){const _=y[x];b[x]=r.map([+o[_]+p,+s[_]+v]),b[m+x]=r.map([+o[_]+p,+c[_]+v])}return b});return[h,g,d]};MT.props={defaultShape:"area",defaultLabelShape:"label",composite:!1,shape:ST,channels:[...ui({shapes:Object.keys(ST)}),{name:"x",required:!0},{name:"y",required:!0},{name:"size"},{name:"series",scale:"band"}],preInference:[...nr(),{type:h1},{type:Gf},{type:O1}],postInference:[...dr(),...Yl()],interaction:{shareTooltip:!0,seriesTooltip:!0,crosshairs:!0}};const ET=()=>(t,e)=>{const{encode:n}=e,{y1:r}=n;if(r)return[t,e];const[i]=De(n,"y");return[t,dt({},e,{encode:{y1:Mn([...i])}})]};ET.props={};const PT=()=>(t,e)=>{const{encode:n}=e,{x1:r}=n;if(r)return[t,e];const[i]=De(n,"x");return[t,dt({},e,{encode:{x1:Mn([...i])}})]};PT.props={};var AT=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const S1=(t,e)=>{const{arrow:n=!0,arrowSize:r="40%"}=t,i=AT(t,["arrow","arrowSize"]),{document:a}=e;return(o,s,c)=>{const{defaultColor:l}=c,u=AT(c,["defaultColor"]),{color:f=l,transform:d}=s,[h,p]=o,v=na();if(v.moveTo(...h),v.lineTo(...p),n){const[g,y]=m$(h,p,{arrowSize:r});v.moveTo(...p),v.lineTo(...g),v.moveTo(...p),v.lineTo(...y)}return se(a.createElement("path",{})).call(Vt,u).style("d",v.toString()).style("stroke",f).style("transform",d).call(Vt,i).node()}};S1.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const TT=(t,e)=>{const{arrow:n=!1}=t;return(...r)=>S1(Object.assign(Object.assign({},t),{arrow:n}),e)(...r)};TT.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var CT=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const kT=(t,e)=>{const n=CT(t,[]),{coordinate:r,document:i}=e;return(a,o,s)=>{const{color:c}=s,l=CT(s,["color"]),{color:u=c,transform:f}=o,[d,h]=a,p=na();if(p.moveTo(d[0],d[1]),xn(r)){const v=r.getCenter();p.quadraticCurveTo(v[0],v[1],h[0],h[1])}else{const v=xM(d,h),g=Fn(d,h)/2;Mf(p,d,h,v,g)}return se(i.createElement("path",{})).call(Vt,l).style("d",p.toString()).style("stroke",u).style("transform",f).call(Vt,n).node()}};kT.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var LT=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const NT=(t,e)=>{const n=LT(t,[]),{document:r}=e;return(i,a,o)=>{const{color:s}=o,c=LT(o,["color"]),{color:l=s,transform:u}=a,[f,d]=i,h=na();return h.moveTo(f[0],f[1]),h.bezierCurveTo(f[0]/2+d[0]/2,f[1],f[0]/2+d[0]/2,d[1],d[0],d[1]),se(r.createElement("path",{})).call(Vt,c).style("d",h.toString()).style("stroke",l).style("transform",u).call(Vt,n).node()}};NT.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var IT=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function bK(t,e,n,r){const i=na();if(xn(n)){const a=n.getCenter(),o=Fn(t,a),c=(Fn(e,a)-o)*r+o;return i.moveTo(t[0],t[1]),Mf(i,t,e,a,c),i.lineTo(e[0],e[1]),i}return kn(n)?(i.moveTo(t[0],t[1]),i.lineTo(t[0]+(e[0]-t[0])*r,t[1]),i.lineTo(t[0]+(e[0]-t[0])*r,e[1]),i.lineTo(e[0],e[1]),i):(i.moveTo(t[0],t[1]),i.lineTo(t[0],t[1]+(e[1]-t[1])*r),i.lineTo(e[0],t[1]+(e[1]-t[1])*r),i.lineTo(e[0],e[1]),i)}const jT=(t,e)=>{const{cornerRatio:n=1/3}=t,r=IT(t,["cornerRatio"]),{coordinate:i,document:a}=e;return(o,s,c)=>{const{defaultColor:l}=c,u=IT(c,["defaultColor"]),{color:f=l,transform:d}=s,[h,p]=o,v=bK(h,p,i,n);return se(a.createElement("path",{})).call(Vt,u).style("d",v.toString()).style("stroke",f).style("transform",d).call(Vt,r).node()}};jT.props={defaultMarker:"vhv",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const RT={link:TT,arc:kT,smooth:NT,vhv:jT},M1=t=>(e,n,r,i)=>{const{x:a,y:o,x1:s=a,y1:c=o}=r,l=vc(n,r,t),u=e.map(f=>[i.map(l([+a[f],+o[f]],f)),i.map(l([+s[f],+c[f]],f))]);return[e,u]};M1.props={defaultShape:"link",defaultLabelShape:"label",composite:!1,shape:RT,channels:[...ui({shapes:Object.keys(RT)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...nr(),{type:ET},{type:PT}],postInference:[...dr(),...ls()]};var xK=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const DT=(t,e)=>{const{coordinate:n,document:r}=e;return(i,a,o)=>{const{color:s}=o,c=xK(o,["color"]),{color:l=s,src:u="",size:f=32,transform:d=""}=a;let{width:h=f,height:p=f}=t;const[[v,g]]=i,[y,m]=n.getSize();h=typeof h=="string"?n0(h)*y:h,p=typeof p=="string"?n0(p)*m:p;const b=v-Number(h)/2,x=g-Number(p)/2;return se(r.createElement("image",{})).call(Vt,c).style("x",b).style("y",x).style("img",u).style("stroke",l).style("transform",d).call(Vt,t).style("width",h).style("height",p).node()}};DT.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const BT={image:DT},FT=t=>{const{cartesian:e}=t;return e?a1:(n,r,i,a)=>{const{x:o,y:s}=i,c=vc(r,i,t),l=Array.from(n,u=>{const f=[+o[u],+s[u]];return[a.map(c(f,u))]});return[n,l]}};FT.props={defaultShape:"image",defaultLabelShape:"label",composite:!1,shape:BT,channels:[...ui({shapes:Object.keys(BT)}),{name:"x",required:!0},{name:"y",required:!0},{name:"src",scale:"identity"},{name:"size"}],preInference:[...nr(),{type:s0},{type:c0}],postInference:[...dr(),...ls()]};var _K=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function OK(t,e){const n=na();if(xn(e)){const r=e.getCenter(),i=[...t,t[0]],a=i.map(o=>Fn(o,r));return i.forEach((o,s)=>{if(s===0){n.moveTo(o[0],o[1]);return}const c=a[s],l=t[s-1],u=a[s-1];u!==void 0&&Math.abs(c-u)<1e-10?Mf(n,l,o,r,c):n.lineTo(o[0],o[1])}),n.closePath(),n}return y$(n,t)}const zT=(t,e)=>{const{coordinate:n,document:r}=e;return(i,a,o)=>{const{color:s}=o,c=_K(o,["color"]),{color:l=s,transform:u}=a,f=OK(i,n);return se(r.createElement("path",{})).call(Vt,c).style("d",f.toString()).style("stroke",l).style("fill",l).style("transform",u).call(Vt,t).node()}};zT.props={defaultMarker:"square",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var GT=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function wK(t,e){const[n,r,i,a]=t,o=na();if(xn(e)){const s=e.getCenter(),c=Fn(s,n);return o.moveTo(n[0],n[1]),o.quadraticCurveTo(s[0],s[1],i[0],i[1]),Mf(o,i,a,s,c),o.quadraticCurveTo(s[0],s[1],r[0],r[1]),Mf(o,r,n,s,c),o.closePath(),o}return o.moveTo(n[0],n[1]),o.bezierCurveTo(n[0]/2+i[0]/2,n[1],n[0]/2+i[0]/2,i[1],i[0],i[1]),o.lineTo(a[0],a[1]),o.bezierCurveTo(a[0]/2+r[0]/2,a[1],a[0]/2+r[0]/2,r[1],r[0],r[1]),o.lineTo(n[0],n[1]),o.closePath(),o}const WT=(t,e)=>{const n=GT(t,[]),{coordinate:r,document:i}=e;return(a,o,s)=>{const{color:c}=s,l=GT(s,["color"]),{color:u=c,transform:f}=o,d=wK(a,r);return se(i.createElement("path",{})).call(Vt,l).style("d",d.toString()).style("fill",u||c).style("stroke",u||c).style("transform",f).call(Vt,n).node()}};WT.props={defaultMarker:"square",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const YT={polygon:zT,ribbon:WT},HT=()=>(t,e,n,r)=>{const i=Object.entries(n).filter(([s])=>s.startsWith("x")).map(([,s])=>s),a=Object.entries(n).filter(([s])=>s.startsWith("y")).map(([,s])=>s),o=t.map(s=>{const c=[];for(let l=0;l<i.length;l++){const u=i[l][s];if(u===void 0)break;const f=a[l][s];c.push(r.map([+u,+f]))}return c});return[t,o]};HT.props={defaultShape:"polygon",defaultLabelShape:"label",composite:!1,shape:YT,channels:[...ui({shapes:Object.keys(YT)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...nr()],postInference:[...dr(),...ls()]};var SK=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function MK(t,e){const n=na();if(!xn(e))n.moveTo(...t[0]),n.lineTo(...t[1]),n.moveTo(...t[2]),n.lineTo(...t[3]),n.moveTo(...t[4]),n.lineTo(...t[5]),n.lineTo(...t[6]),n.lineTo(...t[7]),n.closePath(),n.moveTo(...t[8]),n.lineTo(...t[9]),n.moveTo(...t[10]),n.lineTo(...t[11]),n.moveTo(...t[12]),n.lineTo(...t[13]);else{const r=e.getCenter(),[i,a]=r,o=ea(Xn(t[0],r)),s=ea(Xn(t[1],r)),c=Fn(r,t[2]),l=Fn(r,t[3]),u=Fn(r,t[8]),f=Fn(r,t[10]),d=Fn(r,t[11]);n.moveTo(...t[0]),n.arc(i,a,c,o,s),n.arc(i,a,c,s,o,!0),n.moveTo(...t[2]),n.lineTo(...t[3]),n.moveTo(...t[4]),n.arc(i,a,l,o,s),n.lineTo(...t[6]),n.arc(i,a,f,s,o,!0),n.closePath(),n.moveTo(...t[8]),n.arc(i,a,u,o,s),n.arc(i,a,u,s,o,!0),n.moveTo(...t[10]),n.lineTo(...t[11]),n.moveTo(...t[12]),n.arc(i,a,d,o,s),n.arc(i,a,d,s,o,!0)}return n}const $T=(t,e)=>{const{coordinate:n,document:r}=e;return(i,a,o)=>{const{color:s,transform:c}=a,{color:l,fill:u=l,stroke:f=l}=o,d=SK(o,["color","fill","stroke"]),h=MK(i,n);return se(r.createElement("path",{})).call(Vt,d).style("d",h.toString()).style("stroke",f).style("fill",s||u).style("transform",c).call(Vt,t).node()}};$T.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var EK=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function PK(t,e,n=4){const r=na();if(!xn(e))return r.moveTo(...t[2]),r.lineTo(...t[3]),r.lineTo(t[3][0]-n,t[3][1]),r.lineTo(t[10][0]-n,t[10][1]),r.lineTo(t[10][0]+n,t[10][1]),r.lineTo(t[3][0]+n,t[3][1]),r.lineTo(...t[3]),r.closePath(),r.moveTo(...t[10]),r.lineTo(...t[11]),r.moveTo(t[3][0]+n/2,t[8][1]),r.arc(t[3][0],t[8][1],n/2,0,Math.PI*2),r.closePath(),r;const i=e.getCenter(),[a,o]=i,s=Fn(i,t[3]),c=Fn(i,t[8]),l=Fn(i,t[10]),u=ea(Xn(t[2],i)),f=Math.asin(n/c),d=u-f,h=u+f;r.moveTo(...t[2]),r.lineTo(...t[3]),r.moveTo(Math.cos(d)*s+a,Math.sin(d)*s+o),r.arc(a,o,s,d,h),r.lineTo(Math.cos(h)*l+a,Math.sin(h)*l+o),r.arc(a,o,l,h,d,!0),r.lineTo(Math.cos(d)*s+a,Math.sin(d)*s+o),r.closePath(),r.moveTo(...t[10]),r.lineTo(...t[11]);const p=(d+h)/2;return r.moveTo(Math.cos(p)*(c+n/2)+a,Math.sin(p)*(c+n/2)+o),r.arc(Math.cos(p)*c+a,Math.sin(p)*c+o,n/2,p,Math.PI*2+p),r.closePath(),r}const VT=(t,e)=>{const{coordinate:n,document:r}=e;return(i,a,o)=>{const{color:s,transform:c}=a,l=4,{color:u,fill:f=u,stroke:d=u}=o,h=EK(o,["color","fill","stroke"]),p=PK(i,n,l);return se(r.createElement("path",{})).call(Vt,h).style("d",p.toString()).style("stroke",d).style("fill",s||f).style("transform",c).call(Vt,t).node()}};VT.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const UT={box:$T,violin:VT},XT=()=>(t,e,n,r)=>{const{x:i,y:a,y1:o,y2:s,y3:c,y4:l,series:u}=n,f=e.x,d=e.series,h=Array.from(t,p=>{const v=f.getBandWidth(f.invert(+i[p])),g=d?d.getBandWidth(d.invert(+(u==null?void 0:u[p]))):1,y=v*g,m=(+(u==null?void 0:u[p])||0)*v,b=+i[p]+m+y/2,[x,_,O,w,S]=[+a[p],+o[p],+s[p],+c[p],+l[p]];return[[b-y/2,S],[b+y/2,S],[b,S],[b,w],[b-y/2,w],[b+y/2,w],[b+y/2,_],[b-y/2,_],[b-y/2,O],[b+y/2,O],[b,_],[b,x],[b-y/2,x],[b+y/2,x]].map(E=>r.map(E))});return[t,h]};XT.props={defaultShape:"box",defaultLabelShape:"label",composite:!1,shape:UT,channels:[...ui({shapes:Object.keys(UT)}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"}],preInference:[...nr(),{type:hc}],postInference:[...dr(),...Yl()],interaction:{shareTooltip:!0}};const qT={vector:S1},ZT=()=>(t,e,n,r)=>{const{x:i,y:a,size:o,rotate:s}=n,[c,l]=r.getSize(),u=t.map(f=>{const d=+s[f]/180*Math.PI,h=+o[f],p=h/c,v=h/l,g=p*Math.cos(d),y=-v*Math.sin(d);return[r.map([+i[f]-g/2,+a[f]-y/2]),r.map([+i[f]+g/2,+a[f]+y/2])]});return[t,u]};ZT.props={defaultShape:"vector",defaultLabelShape:"label",composite:!1,shape:qT,channels:[...ui({shapes:Object.keys(qT)}),{name:"x",required:!0},{name:"y",required:!0},{name:"rotate",required:!0,scale:"identity"},{name:"size",required:!0}],preInference:[...nr()],postInference:[...dr(),...ls()]};var KT=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function AK(t,e,n){return t.createElement("path",{style:Object.assign({path:`M ${e},${e} L -${e},0 L ${e},-${e} L 0,0 Z`,anchor:"0.5 0.5",transformOrigin:"center"},n)})}function TK(t,e){if(!xn(e))return ns().x(r=>r[0]).y(r=>r[1])(t);const n=e.getCenter();return Np()({startAngle:0,endAngle:Math.PI*2,outerRadius:Fn(t[0],n),innerRadius:Fn(t[1],n)})}function CK(t,e){if(!xn(t))return e;const[n,r]=t.getCenter();return`translate(${n}, ${r}) ${e||""}`}const E1=(t,e)=>{const{arrow:n,arrowSize:r=4}=t,i=KT(t,["arrow","arrowSize"]),{coordinate:a,document:o}=e;return(s,c,l)=>{const{color:u,lineWidth:f}=l,d=KT(l,["color","lineWidth"]),{color:h=u,size:p=f}=c,v=n?AK(o,r,Object.assign({fill:i.stroke||h,stroke:i.stroke||h},At(i,"arrow"))):null,g=TK(s,a),y=CK(a,c.transform);return se(o.createElement("path",{})).call(Vt,d).style("d",g).style("stroke",h).style("lineWidth",p).style("transform",y).style("markerEnd",v).call(Vt,i).node()}};E1.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const QT=()=>(t,e)=>{const{data:n}=e;return!Array.isArray(n)||n.some(zf)?[t,e]:[t,dt({},e,{encode:{x:Mn(n)}})]};QT.props={};const JT={line:E1},tC=t=>(e,n,r,i)=>{const{x:a}=r,o=vc(n,r,dt({style:{bandOffset:0}},t)),s=Array.from(e,c=>{const l=[a[c],1],u=[a[c],0];return[l,u].map(f=>i.map(o(f,c)))});return[e,s]};tC.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,shape:JT,channels:[...Hl({shapes:Object.keys(JT)}),{name:"x",required:!0}],preInference:[...nr(),{type:QT}],postInference:[...dr()]};const eC=()=>(t,e)=>{const{data:n}=e;return!Array.isArray(n)||n.some(zf)?[t,e]:[t,dt({},e,{encode:{y:Mn(n)}})]};eC.props={};const nC={line:E1},rC=t=>(e,n,r,i)=>{const{y:a}=r,o=vc(n,r,dt({style:{bandOffset:0}},t)),s=Array.from(e,c=>{const l=[0,a[c]],u=[1,a[c]];return[l,u].map(f=>i.map(o(f,c)))});return[e,s]};rC.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,shape:nC,channels:[...Hl({shapes:Object.keys(nC)}),{name:"y",required:!0}],preInference:[...nr(),{type:eC}],postInference:[...dr()]};var iC=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function kK(t,e,n){return[["M",t,e],["L",t+2*n,e-n],["L",t+2*n,e+n],["Z"]]}function LK(t){return ns().x(e=>e[0]).y(e=>e[1])(t)}function NK(t,e,n,r,i=0){const[[a,o],[s,c]]=e;if(kn(t)){const d=a+n,h=s+r,p=d+i;return[[d,o],[p,o],[p,c],[h,c]]}const l=o-n,u=c-r,f=l-i;return[[a,l],[a,f],[s,f],[s,u]]}const aC=(t,e)=>{const{offset:n=0,offset1:r=n,offset2:i=n,connectLength1:a,endMarker:o=!0}=t,s=iC(t,["offset","offset1","offset2","connectLength1","endMarker"]),{coordinate:c}=e;return(l,u,f)=>{const{color:d,connectLength1:h}=f,p=iC(f,["color","connectLength1"]),{color:v,transform:g}=u,y=NK(c,l,r,i,a!=null?a:h),m=At(Object.assign(Object.assign({},s),f),"endMarker");return se(new Zr).call(Vt,p).style("path",LK(y)).style("stroke",v||d).style("transform",g).style("markerEnd",o?new Je({className:"marker",style:Object.assign(Object.assign({},m),{symbol:kK})}):null).call(Vt,s).node()}};aC.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const oC={connector:aC},sC=(...t)=>M1(...t);sC.props={defaultShape:"connector",defaultLabelShape:"label",composite:!1,shape:oC,channels:[...Hl({shapes:Object.keys(oC)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...nr()],postInference:[...dr()]};function cC(t,e,n,r){if(e)return()=>[0,1];const{[t]:i,[`${t}1`]:a}=n;return o=>{var s;const c=((s=r.getBandWidth)===null||s===void 0?void 0:s.call(r,r.invert(+a[o])))||0;return[i[o],a[o]+c]}}function P1(t={}){const{extendX:e=!1,extendY:n=!1}=t;return(r,i,a,o)=>{const s=cC("x",e,a,i.x),c=cC("y",n,a,i.y),l=Array.from(r,u=>{const[f,d]=s(u),[h,p]=c(u);return[[f,h],[d,h],[d,p],[f,p]].map(b=>o.map(b))});return[r,l]}}const lC={range:pc},uC=()=>P1();uC.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,shape:lC,channels:[...Hl({shapes:Object.keys(lC)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...nr()],postInference:[...dr()]};const fC=()=>(t,e)=>{const{data:n}=e;if(Array.isArray(n)&&(n.every(Array.isArray)||!n.some(zf))){const r=(i,a)=>Array.isArray(i[0])?i.map(o=>o[a]):[i[a]];return[t,dt({},e,{encode:{x:Mn(r(n,0)),x1:Mn(r(n,1))}})]}return[t,e]};fC.props={};const dC={range:pc},hC=()=>P1({extendY:!0});hC.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,shape:dC,channels:[...Hl({shapes:Object.keys(dC)}),{name:"x",required:!0}],preInference:[...nr(),{type:fC}],postInference:[...dr()]};const pC=()=>(t,e)=>{const{data:n}=e;if(Array.isArray(n)&&(n.every(Array.isArray)||!n.some(zf))){const r=(i,a)=>Array.isArray(i[0])?i.map(o=>o[a]):[i[a]];return[t,dt({},e,{encode:{y:Mn(r(n,0)),y1:Mn(r(n,1))}})]}return[t,e]};pC.props={};const vC={range:pc},gC=()=>P1({extendX:!0});gC.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,shape:vC,channels:[...Hl({shapes:Object.keys(vC)}),{name:"y",required:!0}],preInference:[...nr(),{type:pC}],postInference:[...dr()]};var yC=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const A1=(t,e)=>{const{arrow:n,colorAttribute:r}=t,i=yC(t,["arrow","colorAttribute"]),{coordinate:a,document:o}=e;return(s,c,l)=>{const{color:u,stroke:f}=l,d=yC(l,["color","stroke"]),{d:h,color:p=u}=c,[v,g]=a.getSize();return se(o.createElement("path",{})).call(Vt,d).style("d",typeof h=="function"?h({width:v,height:g}):h).style(r,p).call(Vt,i).node()}};A1.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const mC=(t,e)=>A1(Object.assign({colorAttribute:"fill"},t),e);mC.props={defaultMarker:"hvh",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const bC=(t,e)=>A1(Object.assign({fill:"none",colorAttribute:"stroke"},t),e);bC.props={defaultMarker:"hvh",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const xC={path:mC,hollow:bC},_C=t=>(e,n,r,i)=>[e,e.map(()=>[[0,0]])];_C.props={defaultShape:"path",defaultLabelShape:"label",shape:xC,composite:!1,channels:[...ui({shapes:Object.keys(xC)}),{name:"d",scale:"identity"}],preInference:[...nr()],postInference:[...dr()]};var IK=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const OC=(t,e)=>{const{render:n}=t,r=IK(t,["render"]);return i=>{const[[a,o]]=i;return n(Object.assign(Object.assign({},r),{x:a,y:o}),e)}};OC.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const wC=()=>(t,e)=>{const{style:n={}}=e;return[t,dt({},e,{style:Object.assign(Object.assign({},n),Object.fromEntries(Object.entries(n).filter(([,r])=>typeof r=="function").map(([r,i])=>[r,()=>i])))})]};wC.props={};const jK={shape:OC},SC=t=>{const{cartesian:e}=t;return e?a1:(n,r,i,a)=>{const{x:o,y:s}=i,c=vc(r,i,t),l=Array.from(n,u=>{const f=[+o[u],+s[u]];return[a.map(c(f,u))]});return[n,l]}};SC.props={defaultShape:"shape",defaultLabelShape:"label",composite:!1,shape:jK,channels:[{name:"x",required:!0},{name:"y",required:!0}],preInference:[...nr(),{type:s0},{type:c0},{type:wC}]};var RK=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const MC=(t,e)=>{const{document:n}=e;return(r,i,a)=>{const{transform:o}=i,{color:s}=a,c=RK(a,["color"]),{color:l=s}=i,[u,...f]=r,d=na();return d.moveTo(...u),f.forEach(([h,p])=>{d.lineTo(h,p)}),d.closePath(),se(n.createElement("path",{})).call(Vt,c).style("d",d.toString()).style("stroke",l||s).style("fill",l||s).style("fillOpacity",.4).style("transform",o).call(Vt,t).node()}};MC.props={defaultMarker:"square",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const EC={density:MC},PC=()=>(t,e,n,r)=>{const{x:i,series:a}=n,o=Object.entries(n).filter(([f])=>f.startsWith("y")).map(([,f])=>f),s=Object.entries(n).filter(([f])=>f.startsWith("size")).map(([,f])=>f);if(i===void 0||o===void 0||s===void 0)throw new Error("Missing encode for x or y or size channel.");const c=e.x,l=e.series,u=Array.from(t,f=>{const d=c.getBandWidth(c.invert(+i[f])),h=l?l.getBandWidth(l.invert(+(a==null?void 0:a[f]))):1,p=d*h,v=(+(a==null?void 0:a[f])||0)*d,g=+i[f]+v+p/2;return[...o.map((m,b)=>[g+ +s[b][f]/t.length,+o[b][f]]),...o.map((m,b)=>[g-+s[b][f]/t.length,+o[b][f]]).reverse()].map(m=>r.map(m))});return[t,u]};PC.props={defaultShape:"density",defaultLabelShape:"label",composite:!1,shape:EC,channels:[...ui({shapes:Object.keys(EC)}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"size",required:!0},{name:"series",scale:"band"},{name:"size",required:!0,scale:"identity"}],preInference:[...nr(),{type:Gf},{type:hc}],postInference:[...dr(),...Yl()],interaction:{shareTooltip:!0}};function AC(t){var e,n,r,i=t||1;function a(s,c){++e>i&&(r=n,o(1),++e),n[s]=c}function o(s){e=0,n=Object.create(null),s||(r=Object.create(null))}return o(),{clear:o,has:function(s){return n[s]!==void 0||r[s]!==void 0},get:function(s){var c=n[s];if(c!==void 0)return c;if((c=r[s])!==void 0)return a(s,c),c},set:function(s,c){n[s]!==void 0?n[s]=c:a(s,c)}}}const Rmt=AC(3);function DK(t,e=(...r)=>`${r[0]}`,n=16){const r=AC(n);return(...i)=>{const a=e(...i);let o=r.get(a);return r.has(a)?r.get(a):(o=t(...i),r.set(a,o),o)}}function BK(t){return typeof t=="string"?t.split(" ").map(e=>{const[n,r]=e.split(":");return[+n,r]}):t}function l0(t,e,n){const r=t?t():document.createElement("canvas");return r.width=e,r.height=n,r}const FK=DK((t,e,n)=>{const r=l0(n,t*2,t*2),i=r.getContext("2d"),a=t,o=t;if(e===1)i.beginPath(),i.arc(a,o,t,0,2*Math.PI,!1),i.fillStyle="rgba(0,0,0,1)",i.fill();else{const s=i.createRadialGradient(a,o,t*e,a,o,t);s.addColorStop(0,"rgba(0,0,0,1)"),s.addColorStop(1,"rgba(0,0,0,0)"),i.fillStyle=s,i.fillRect(0,0,2*t,2*t)}return r},t=>`${t}`);function zK(t,e){const r=l0(e,256,1).getContext("2d"),i=r.createLinearGradient(0,0,256,1);return BK(t).forEach(([a,o])=>{i.addColorStop(a,o)}),r.fillStyle=i,r.fillRect(0,0,256,1),r.getImageData(0,0,256,1).data}function GK(t,e,n,r,i,a){const{blur:o}=i;let s=r.length;for(;s--;){const{x:c,y:l,value:u,radius:f}=r[s],d=Math.min(u,n),h=c-f,p=l-f,v=FK(f,1-o,a),g=(d-e)/(n-e);t.globalAlpha=Math.max(g,.001),t.drawImage(v,h,p)}return t}function WK(t,e,n,r,i){const{minOpacity:a,opacity:o,maxOpacity:s,useGradientOpacity:c}=i,l=0,u=0,f=e,d=n,h=t.getImageData(l,u,f,d),p=h.data,v=p.length;for(let g=3;g<v;g+=4){const y=p[g],m=y*4;if(!m)continue;const b=o||Math.max(0,Math.min(s,Math.max(a,y)));p[g-3]=r[m],p[g-2]=r[m+1],p[g-1]=r[m+2],p[g]=c?r[m+3]:b}return h}function YK(t,e,n,r,i,a,o){const s=Object.assign({blur:.85,minOpacity:0,opacity:.6,maxOpacity:1,gradient:[[.25,"rgb(0,0,255)"],[.55,"rgb(0,255,0)"],[.85,"yellow"],[1,"rgb(255,0,0)"]]},a);s.minOpacity*=255,s.opacity*=255,s.maxOpacity*=255;const l=l0(o,t,e).getContext("2d"),u=zK(s.gradient,o);l.clearRect(0,0,t,e),GK(l,n,r,i,s,o);const f=WK(l,t,e,u,s),h=l0(o,t,e).getContext("2d");return h.putImageData(f,0,0),h}var HK=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function $K(t,e){return Object.keys(t).reduce((n,r)=>{const i=t[r];return e(i,r)||(n[r]=i),n},{})}const TC=(t,e)=>{const{gradient:n,opacity:r,maxOpacity:i,minOpacity:a,blur:o,useGradientOpacity:s}=t,c=HK(t,["gradient","opacity","maxOpacity","minOpacity","blur","useGradientOpacity"]),{coordinate:l,createCanvas:u,document:f}=e;return(d,h,p)=>{const{transform:v}=h,[g,y]=l.getSize(),m=d.map(w=>({x:w[0],y:w[1],value:w[2],radius:w[3]})),b=Bi(d,w=>w[2]),x=sn(d,w=>w[2]),O=g&&y?YK(g,y,b,x,m,$K({gradient:n,opacity:r,minOpacity:a,maxOpacity:i,blur:o,useGradientOpacity:s},w=>w===void 0),u):{canvas:null};return se(f.createElement("image",{})).call(Vt,p).style("x",0).style("y",0).style("width",g).style("height",y).style("src",O.canvas).style("transform",v).call(Vt,c).node()}};TC.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const CC={heatmap:TC},kC=t=>(e,n,r,i)=>{const{x:a,y:o,size:s,color:c}=r,l=Array.from(e,u=>{const f=s?+s[u]:40;return[...i.map([+a[u],+o[u]]),c[u],f]});return[[0],[l]]};kC.props={defaultShape:"heatmap",defaultLabelShape:"label",composite:!1,shape:CC,channels:[...ui({shapes:Object.keys(CC)}),{name:"x",required:!0},{name:"y",required:!0},{name:"color",scale:"identity",required:!0},{name:"size"}],preInference:[...nr(),{type:hc},{type:o0}],postInference:[...dr(),...ls()]};const LC=()=>["#5B8FF9","#5AD8A6","#5D7092","#F6BD16","#6F5EF9","#6DC8EC","#945FB9","#FF9845","#1E9493","#FF99C3"];LC.props={};const NC=()=>["#5B8FF9","#CDDDFD","#5AD8A6","#CDF3E4","#5D7092","#CED4DE","#F6BD16","#FCEBB9","#6F5EF9","#D3CEFD","#6DC8EC","#D3EEF9","#945FB9","#DECFEA","#FF9845","#FFE0C7","#1E9493","#BBDEDE","#FF99C3","#FFE0ED"];NC.props={};const IC=t=>new Kr(t);IC.props={};const u0=Symbol("defaultUnknown");function jC(t,e,n){for(let r=0;r<e.length;r+=1)t.has(e[r])||t.set(n(e[r]),r)}function RC(t){const{value:e,from:n,to:r,mapper:i,notFoundReturn:a}=t;let o=i.get(e);if(o===void 0){if(a!==u0)return a;o=n.push(e)-1,i.set(e,o)}return r[o%r.length]}function DC(t){return t instanceof Date?e=>`${e}`:typeof t=="object"?e=>JSON.stringify(e):e=>e}class f0 extends bf{getDefaultOptions(){return{domain:[],range:[],unknown:u0}}constructor(e){super(e)}map(e){return this.domainIndexMap.size===0&&jC(this.domainIndexMap,this.getDomain(),this.domainKey),RC({value:this.domainKey(e),mapper:this.domainIndexMap,from:this.getDomain(),to:this.getRange(),notFoundReturn:this.options.unknown})}invert(e){return this.rangeIndexMap.size===0&&jC(this.rangeIndexMap,this.getRange(),this.rangeKey),RC({value:this.rangeKey(e),mapper:this.rangeIndexMap,from:this.getRange(),to:this.getDomain(),notFoundReturn:this.options.unknown})}rescale(e){const[n]=this.options.domain,[r]=this.options.range;if(this.domainKey=DC(n),this.rangeKey=DC(r),!this.rangeIndexMap){this.rangeIndexMap=new Map,this.domainIndexMap=new Map;return}(!e||e.range)&&this.rangeIndexMap.clear(),(!e||e.domain||e.compare)&&(this.domainIndexMap.clear(),this.sortedDomain=void 0)}clone(){return new f0(this.options)}getRange(){return this.options.range}getDomain(){if(this.sortedDomain)return this.sortedDomain;const{domain:e,compare:n}=this.options;return this.sortedDomain=n?[...e].sort(n):e,this.sortedDomain}}const BC=t=>new f0(t);BC.props={};function FC({map:t,initKey:e},n){const r=e(n);return t.has(r)?t.get(r):n}function VK({map:t,initKey:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function UK({map:t,initKey:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function XK(t){return typeof t=="object"?t.valueOf():t}class zC extends Map{constructor(e){if(super(),this.map=new Map,this.initKey=XK,e!==null)for(const[n,r]of e)this.set(n,r)}get(e){return super.get(FC({map:this.map,initKey:this.initKey},e))}has(e){return super.has(FC({map:this.map,initKey:this.initKey},e))}set(e,n){return super.set(VK({map:this.map,initKey:this.initKey},e),n)}delete(e){return super.delete(UK({map:this.map,initKey:this.initKey},e))}}function qK(t){const e=Math.min(...t);return t.map(n=>n/e)}function ZK(t,e){const n=t.length,r=e-n;return r>0?[...t,...new Array(r).fill(1)]:r<0?t.slice(0,e):t}function KK(t){return Math.round(t*1e12)/1e12}function QK(t){const{domain:e,range:n,paddingOuter:r,paddingInner:i,flex:a,round:o,align:s}=t,c=e.length,l=ZK(a,c),[u,f]=n,d=f-u,h=2/c*r+1-1/c*i,p=d/h,v=p*i/c,g=p-c*v,y=qK(l),m=y.reduce((L,A)=>L+A),b=g/m,x=new zC(e.map((L,A)=>{const T=y[A]*b;return[L,o?Math.floor(T):T]})),_=new zC(e.map((L,A)=>{const C=y[A]*b+v;return[L,o?Math.floor(C):C]})),O=Array.from(_.values()).reduce((L,A)=>L+A),S=(d-(O-O/c*i))*s,M=u+S;let E=o?Math.round(M):M;const P=new Array(c);for(let L=0;L<c;L+=1){P[L]=KK(E);const A=e[L];E+=_.get(A)}return{valueBandWidth:x,valueStep:_,adjustedRange:P}}function JK(t){var e;const{domain:n}=t,r=n.length;if(r===0)return{valueBandWidth:void 0,valueStep:void 0,adjustedRange:[]};if(!!(!((e=t.flex)===null||e===void 0)&&e.length))return QK(t);const{range:a,paddingOuter:o,paddingInner:s,round:c,align:l}=t;let u,f,d=a[0];const p=a[1]-d,v=o*2,g=r-s;u=p/Math.max(1,v+g),c&&(u=Math.floor(u)),d+=(p-u*(r-s))*l,f=u*(1-s),c&&(d=Math.round(d),f=Math.round(f));const y=new Array(r).fill(0).map((m,b)=>d+b*u);return{valueStep:u,valueBandWidth:f,adjustedRange:y}}class us extends f0{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,paddingInner:0,paddingOuter:0,padding:0,unknown:u0,flex:[]}}constructor(e){super(e)}clone(){return new us(this.options)}getStep(e){return this.valueStep===void 0?1:typeof this.valueStep=="number"?this.valueStep:e===void 0?Array.from(this.valueStep.values())[0]:this.valueStep.get(e)}getBandWidth(e){return this.valueBandWidth===void 0?1:typeof this.valueBandWidth=="number"?this.valueBandWidth:e===void 0?Array.from(this.valueBandWidth.values())[0]:this.valueBandWidth.get(e)}getRange(){return this.adjustedRange}getPaddingInner(){const{padding:e,paddingInner:n}=this.options;return e>0?e:n}getPaddingOuter(){const{padding:e,paddingOuter:n}=this.options;return e>0?e:n}rescale(){super.rescale();const{align:e,domain:n,range:r,round:i,flex:a}=this.options,{adjustedRange:o,valueBandWidth:s,valueStep:c}=JK({align:e,range:r,round:i,flex:a,paddingInner:this.getPaddingInner(),paddingOuter:this.getPaddingOuter(),domain:n});this.valueStep=c,this.valueBandWidth=s,this.adjustedRange=o}}const GC=t=>new us(t);GC.props={};class d0 extends bf{getDefaultOptions(){return{domain:[0,1],range:[0,1],tickCount:5,unknown:void 0,tickMethod:cm}}map(e){return yp(e)?e:this.options.unknown}invert(e){return this.map(e)}clone(){return new d0(this.options)}getTicks(){const{domain:e,tickCount:n,tickMethod:r}=this.options,[i,a]=e;return!Ol(i)||!Ol(a)?[]:r(i,a,n)}}const WC=t=>new d0(t);WC.props={};class T1 extends us{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,padding:0,unknown:u0,paddingInner:1,paddingOuter:0}}constructor(e){super(e)}getPaddingInner(){return 1}clone(){return new T1(this.options)}update(e){super.update(e)}getPaddingOuter(){return this.options.padding}}const YC=t=>new T1(t);YC.props={};var HC=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,fs="\\d\\d?",ds="\\d\\d",tQ="\\d{3}",eQ="\\d{4}",Hf="[^\\s]+",$C=/\[([^]*?)\]/gm;function VC(t,e){for(var n=[],r=0,i=t.length;r<i;r++)n.push(t[r].substr(0,e));return n}var UC=function(t){return function(e,n){var r=n[t].map(function(a){return a.toLowerCase()}),i=r.indexOf(e.toLowerCase());return i>-1?i:null}};function gc(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0,i=e;r<i.length;r++){var a=i[r];for(var o in a)t[o]=a[o]}return t}var XC=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],qC=["January","February","March","April","May","June","July","August","September","October","November","December"],nQ=VC(qC,3),rQ=VC(XC,3),ZC={dayNamesShort:rQ,dayNames:XC,monthNamesShort:nQ,monthNames:qC,amPm:["am","pm"],DoFn:function(t){return t+["th","st","nd","rd"][t%10>3?0:(t-t%10!==10?1:0)*t%10]}},h0=gc({},ZC),iQ=function(t){return h0=gc(h0,t)},KC=function(t){return t.replace(/[|\\{()[^$+*?.-]/g,"\\$&")},Mi=function(t,e){for(e===void 0&&(e=2),t=String(t);t.length<e;)t="0"+t;return t},aQ={D:function(t){return String(t.getDate())},DD:function(t){return Mi(t.getDate())},Do:function(t,e){return e.DoFn(t.getDate())},d:function(t){return String(t.getDay())},dd:function(t){return Mi(t.getDay())},ddd:function(t,e){return e.dayNamesShort[t.getDay()]},dddd:function(t,e){return e.dayNames[t.getDay()]},M:function(t){return String(t.getMonth()+1)},MM:function(t){return Mi(t.getMonth()+1)},MMM:function(t,e){return e.monthNamesShort[t.getMonth()]},MMMM:function(t,e){return e.monthNames[t.getMonth()]},YY:function(t){return Mi(String(t.getFullYear()),4).substr(2)},YYYY:function(t){return Mi(t.getFullYear(),4)},h:function(t){return String(t.getHours()%12||12)},hh:function(t){return Mi(t.getHours()%12||12)},H:function(t){return String(t.getHours())},HH:function(t){return Mi(t.getHours())},m:function(t){return String(t.getMinutes())},mm:function(t){return Mi(t.getMinutes())},s:function(t){return String(t.getSeconds())},ss:function(t){return Mi(t.getSeconds())},S:function(t){return String(Math.round(t.getMilliseconds()/100))},SS:function(t){return Mi(Math.round(t.getMilliseconds()/10),2)},SSS:function(t){return Mi(t.getMilliseconds(),3)},a:function(t,e){return t.getHours()<12?e.amPm[0]:e.amPm[1]},A:function(t,e){return t.getHours()<12?e.amPm[0].toUpperCase():e.amPm[1].toUpperCase()},ZZ:function(t){var e=t.getTimezoneOffset();return(e>0?"-":"+")+Mi(Math.floor(Math.abs(e)/60)*100+Math.abs(e)%60,4)},Z:function(t){var e=t.getTimezoneOffset();return(e>0?"-":"+")+Mi(Math.floor(Math.abs(e)/60),2)+":"+Mi(Math.abs(e)%60,2)}},QC=function(t){return+t-1},JC=[null,fs],tk=[null,Hf],ek=["isPm",Hf,function(t,e){var n=t.toLowerCase();return n===e.amPm[0]?0:n===e.amPm[1]?1:null}],nk=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(t){var e=(t+"").match(/([+-]|\d\d)/gi);if(e){var n=+e[1]*60+parseInt(e[2],10);return e[0]==="+"?n:-n}return 0}],oQ={D:["day",fs],DD:["day",ds],Do:["day",fs+Hf,function(t){return parseInt(t,10)}],M:["month",fs,QC],MM:["month",ds,QC],YY:["year",ds,function(t){var e=new Date,n=+(""+e.getFullYear()).substr(0,2);return+(""+(+t>68?n-1:n)+t)}],h:["hour",fs,void 0,"isPm"],hh:["hour",ds,void 0,"isPm"],H:["hour",fs],HH:["hour",ds],m:["minute",fs],mm:["minute",ds],s:["second",fs],ss:["second",ds],YYYY:["year",eQ],S:["millisecond","\\d",function(t){return+t*100}],SS:["millisecond",ds,function(t){return+t*10}],SSS:["millisecond",tQ],d:JC,dd:JC,ddd:tk,dddd:tk,MMM:["month",Hf,UC("monthNamesShort")],MMMM:["month",Hf,UC("monthNames")],a:ek,A:ek,ZZ:nk,Z:nk},p0={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},sQ=function(t){return gc(p0,t)},rk=function(t,e,n){if(e===void 0&&(e=p0.default),n===void 0&&(n={}),typeof t=="number"&&(t=new Date(t)),Object.prototype.toString.call(t)!=="[object Date]"||isNaN(t.getTime()))throw new Error("Invalid Date pass to format");e=p0[e]||e;var r=[];e=e.replace($C,function(a,o){return r.push(o),"@@@"});var i=gc(gc({},h0),n);return e=e.replace(HC,function(a){return aQ[a](t,i)}),e.replace(/@@@/g,function(){return r.shift()})};function cQ(t,e,n){if(n===void 0&&(n={}),typeof e!="string")throw new Error("Invalid format in fecha parse");if(e=p0[e]||e,t.length>1e3)return null;var r=new Date,i={year:r.getFullYear(),month:0,day:1,hour:0,minute:0,second:0,millisecond:0,isPm:null,timezoneOffset:null},a=[],o=[],s=e.replace($C,function(x,_){return o.push(KC(_)),"@@@"}),c={},l={};s=KC(s).replace(HC,function(x){var _=oQ[x],O=_[0],w=_[1],S=_[3];if(c[O])throw new Error("Invalid format. "+O+" specified twice in format");return c[O]=!0,S&&(l[S]=!0),a.push(_),"("+w+")"}),Object.keys(l).forEach(function(x){if(!c[x])throw new Error("Invalid format. "+x+" is required in specified format")}),s=s.replace(/@@@/g,function(){return o.shift()});var u=t.match(new RegExp(s,"i"));if(!u)return null;for(var f=gc(gc({},h0),n),d=1;d<u.length;d++){var h=a[d-1],p=h[0],v=h[2],g=v?v(u[d],f):+u[d];if(g==null)return null;i[p]=g}i.isPm===1&&i.hour!=null&&+i.hour!=12?i.hour=+i.hour+12:i.isPm===0&&+i.hour==12&&(i.hour=0);var y;if(i.timezoneOffset==null){y=new Date(i.year,i.month,i.day,i.hour,i.minute,i.second,i.millisecond);for(var m=[["month","getMonth"],["day","getDate"],["hour","getHours"],["minute","getMinutes"],["second","getSeconds"]],d=0,b=m.length;d<b;d++)if(c[m[d][0]]&&i[m[d][0]]!==y[m[d][1]]())return null}else if(y=new Date(Date.UTC(i.year,i.month,i.day,i.hour,i.minute-i.timezoneOffset,i.second,i.millisecond)),i.month>11||i.month<0||i.day>31||i.day<1||i.hour>23||i.hour<0||i.minute>59||i.minute<0||i.second>59||i.second<0)return null;return y}var Dmt={format:rk,parse:cQ,defaultI18n:ZC,setGlobalDateI18n:iQ,setGlobalDateMasks:sQ},Bmt=null;const $f=1e3,Vf=$f*60,Uf=Vf*60,yc=Uf*24,Xf=yc*7,ik=yc*30,ak=yc*365;function ti(t,e,n,r){const i=(l,u)=>{const f=h=>r(h)%u===0;let d=u;for(;d&&!f(l);)n(l,-1),d-=1;return l},a=(l,u)=>{u&&i(l,u),e(l)},o=(l,u)=>{const f=new Date(+l);return a(f,u),f},s=(l,u)=>{const f=new Date(+l-1);return a(f,u),n(f,u),a(f),f};return{ceil:s,floor:o,range:(l,u,f,d)=>{const h=[],p=Math.floor(f),v=d?s(l,f):s(l);for(let g=v;g<u;n(g,p),a(g))h.push(new Date(+g));return h},duration:t}}const lQ=ti(1,t=>t,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),uQ=ti($f,t=>{t.setMilliseconds(0)},(t,e=1)=>{t.setTime(+t+$f*e)},t=>t.getSeconds()),fQ=ti(Vf,t=>{t.setSeconds(0,0)},(t,e=1)=>{t.setTime(+t+Vf*e)},t=>t.getMinutes()),dQ=ti(Uf,t=>{t.setMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+Uf*e)},t=>t.getHours()),hQ=ti(yc,t=>{t.setHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+yc*e)},t=>t.getDate()-1),ok=ti(ik,t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e=1)=>{const n=t.getMonth();t.setMonth(n+e)},t=>t.getMonth()),pQ=ti(Xf,t=>{t.setDate(t.getDate()-t.getDay()%7),t.setHours(0,0,0,0)},(t,e=1)=>{t.setDate(t.getDate()+7*e)},t=>{const e=ok.floor(t),n=new Date(+t);return Math.floor((+n-+e)/Xf)}),vQ=ti(ak,t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e=1)=>{const n=t.getFullYear();t.setFullYear(n+e)},t=>t.getFullYear()),sk={millisecond:lQ,second:uQ,minute:fQ,hour:dQ,day:hQ,week:pQ,month:ok,year:vQ},gQ=ti(1,t=>t,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),yQ=ti($f,t=>{t.setUTCMilliseconds(0)},(t,e=1)=>{t.setTime(+t+$f*e)},t=>t.getUTCSeconds()),mQ=ti(Vf,t=>{t.setUTCSeconds(0,0)},(t,e=1)=>{t.setTime(+t+Vf*e)},t=>t.getUTCMinutes()),bQ=ti(Uf,t=>{t.setUTCMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+Uf*e)},t=>t.getUTCHours()),xQ=ti(yc,t=>{t.setUTCHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+yc*e)},t=>t.getUTCDate()-1),ck=ti(ik,t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e=1)=>{const n=t.getUTCMonth();t.setUTCMonth(n+e)},t=>t.getUTCMonth()),_Q=ti(Xf,t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7)%7),t.setUTCHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+Xf*e)},t=>{const e=ck.floor(t),n=new Date(+t);return Math.floor((+n-+e)/Xf)}),OQ=ti(ak,t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e=1)=>{const n=t.getUTCFullYear();t.setUTCFullYear(n+e)},t=>t.getUTCFullYear()),lk={millisecond:gQ,second:yQ,minute:mQ,hour:bQ,day:xQ,week:_Q,month:ck,year:OQ};function wQ(t){const e=t?lk:sk,{year:n,month:r,week:i,day:a,hour:o,minute:s,second:c,millisecond:l}=e;return{tickIntervals:[[c,1],[c,5],[c,15],[c,30],[s,1],[s,5],[s,15],[s,30],[o,1],[o,3],[o,6],[o,12],[a,1],[a,2],[i,1],[r,1],[r,3],[n,1]],year:n,millisecond:l}}function uk(t,e,n,r,i){const a=+t,o=+e,{tickIntervals:s,year:c,millisecond:l}=wQ(i),u=([g,y])=>g.duration*y,f=r?(o-a)/r:n||5,d=r||(o-a)/f,h=s.length,p=tm(s,d,0,h,u);let v;if(p===h){const g=BS(a/c.duration,o/c.duration,f);v=[c,g]}else if(p){const g=d/u(s[p-1])<u(s[p])/d,[y,m]=g?s[p-1]:s[p],b=r?Math.ceil(r/y.duration):m;v=[y,b]}else{const g=Math.max(BS(a,o,f),1);v=[l,g]}return v}const SQ=(t,e,n,r,i)=>{const a=t>e,o=a?e:t,s=a?t:e,[c,l]=uk(o,s,n,r,i),u=c.range(o,new Date(+s+1),l,!0);return a?u.reverse():u},MQ=(t,e,n,r,i)=>{const a=t>e,o=a?e:t,s=a?t:e,[c,l]=uk(o,s,n,r,i),u=[c.floor(o,l),c.ceil(s,l)];return a?u.reverse():u};function EQ(t,e){const{second:n,minute:r,hour:i,day:a,week:o,month:s,year:c}=e;return n.floor(t)<t?".SSS":r.floor(t)<t?":ss":i.floor(t)<t?"hh:mm":a.floor(t)<t?"hh A":s.floor(t)<t?o.floor(t)<t?"MMM DD":"ddd DD":c.floor(t)<t?"MMMM":"YYYY"}function PQ(t){const e=t.getTimezoneOffset(),n=new Date(t);return n.setMinutes(n.getMinutes()+e,n.getSeconds(),n.getMilliseconds()),n}class C1 extends bp{getDefaultOptions(){return{domain:[new Date(2e3,0,1),new Date(2e3,0,2)],range:[0,1],nice:!1,tickCount:5,tickInterval:void 0,unknown:void 0,clamp:!1,tickMethod:SQ,interpolate:Sl,mask:void 0,utc:!1}}chooseTransforms(){return[r=>+r,r=>new Date(r)]}chooseNice(){return MQ}getTickMethodOptions(){const{domain:e,tickCount:n,tickInterval:r,utc:i}=this.options,a=e[0],o=e[e.length-1];return[a,o,n,r,i]}getFormatter(){const{mask:e,utc:n}=this.options,r=n?lk:sk,i=n?PQ:ac;return a=>rk(i(a),e||EQ(a,r))}clone(){return new C1(this.options)}}const fk=t=>new C1(t);fk.props={};const dk=t=>e=>-t(-e),k1=(t,e)=>{const n=Math.log(t),r=t===Math.E?Math.log:t===10?Math.log10:t===2?Math.log2:i=>Math.log(i)/n;return e?dk(r):r},L1=(t,e)=>{const n=t===Math.E?Math.exp:r=>hr(t,r);return e?dk(n):n},AQ=(t,e,n,r=10)=>{const i=t<0,a=L1(r,i),o=k1(r,i),s=e<t,c=s?e:t,l=s?t:e;let u=o(c),f=o(l),d=[];if(!(r%1)&&f-u<n){if(u=Math.floor(u),f=Math.ceil(f),i)for(;u<=f;u+=1){const h=a(u);for(let p=r-1;p>=1;p-=1){const v=h*p;if(v>l)break;v>=c&&d.push(v)}}else for(;u<=f;u+=1){const h=a(u);for(let p=1;p<r;p+=1){const v=h*p;if(v>l)break;v>=c&&d.push(v)}}d.length*2<n&&(d=oc(c,l,n))}else{const h=n===-1?f-u:Math.min(f-u,n);d=oc(u,f,h).map(a)}return s?d.reverse():d},TQ=(t,e,n,r)=>{const i=t<0,a=k1(r,i),o=L1(r,i),s=t>e,c=s?e:t,l=s?t:e,u=[o(Math.floor(a(c))),o(Math.ceil(a(l)))];return s?u.reverse():u};class N1 extends bp{getDefaultOptions(){return{domain:[1,10],range:[0,1],base:10,interpolate:xf,tickMethod:AQ,tickCount:5}}chooseNice(){return TQ}getTickMethodOptions(){const{domain:e,tickCount:n,base:r}=this.options,i=e[0],a=e[e.length-1];return[i,a,n,r]}chooseTransforms(){const{base:e,domain:n}=this.options,r=n[0]<0;return[k1(e,r),L1(e,r)]}clone(){return new N1(this.options)}}const hk=t=>new N1(t);hk.props={};const CQ=t=>e=>e<0?-hr(-e,t):hr(e,t),kQ=t=>e=>e<0?-hr(-e,1/t):hr(e,1/t),LQ=t=>t<0?-Math.sqrt(-t):Math.sqrt(t);class v0 extends bp{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,exponent:2,interpolate:xf,tickMethod:oc,tickCount:5}}constructor(e){super(e)}chooseTransforms(){const{exponent:e}=this.options;if(e===1)return[ac,ac];const n=e===.5?LQ:CQ(e),r=kQ(e);return[n,r]}clone(){return new v0(this.options)}}const pk=t=>new v0(t);pk.props={};class I1 extends v0{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:xf,tickMethod:oc,tickCount:5,exponent:.5}}constructor(e){super(e)}update(e){super.update(e)}clone(){return new I1(this.options)}}const vk=t=>new I1(t);vk.props={};const gk=t=>new Ml(t);gk.props={};const yk=t=>new Mp(t);yk.props={};const mk=t=>new Sp(t);mk.props={};const NQ=t=>e=>{const n=t(e);return Ol(n)?Math.round(n):n};function IQ(t,e){return n=>{n.prototype.rescale=function(){this.initRange(),this.nice();const[r]=this.chooseTransforms();this.composeOutput(r,this.chooseClamp(r))},n.prototype.initRange=function(){const{interpolator:r}=this.options;this.options.range=t(r)},n.prototype.composeOutput=function(r,i){const{domain:a,interpolator:o,round:s}=this.getOptions(),c=e(a.map(r)),l=s?NQ(o):o;this.output=wl(l,c,i,r)},n.prototype.invert=void 0}}var jQ=function(t,e,n,r){var i=arguments.length,a=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,n,a):o(e,n))||a);return i>3&&a&&Object.defineProperty(e,n,a),a},j1;function RQ(t){return[t(0),t(1)]}const DQ=t=>{const[e,n]=t;return wl(Sl(0,1),gp(e,n))};let R1=j1=class extends Kr{getDefaultOptions(){return{domain:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:ac,tickMethod:oc,tickCount:5}}constructor(e){super(e)}clone(){return new j1(this.options)}};R1=j1=jQ([IQ(RQ,DQ)],R1);const bk=t=>new R1(t);bk.props={};const xk=t=>new wf(t);xk.props={};function D1({colorDefault:t,colorBlack:e,colorWhite:n,colorStroke:r,colorBackground:i,padding1:a,padding2:o,padding3:s,alpha90:c,alpha65:l,alpha45:u,alpha25:f,alpha10:d,category10:h,category20:p,sizeDefault:v=1,padding:g="auto",margin:y=16}){return{padding:g,margin:y,size:v,color:t,category10:h,category20:p,enter:{duration:300,fill:"both",delay:0},update:{duration:300,fill:"both",delay:0},exit:{duration:300,fill:"both",delay:0},view:{viewFill:i,plotFill:"transparent",mainFill:"transparent",contentFill:"transparent"},line:{line:{fill:"",strokeOpacity:1,lineWidth:1,lineCap:"round"}},point:{point:{r:3,fillOpacity:.95,lineWidth:0},hollow:{r:3,strokeOpacity:.95,lineWidth:1},plus:{r:3,strokeOpacity:.95,lineWidth:3},diamond:{r:3,strokeOpacity:.95,lineWidth:1}},interval:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},area:{area:{fillOpacity:.85,lineWidth:0}},polygon:{polygon:{fillOpacity:.95}},cell:{cell:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},rect:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},link:{link:{fill:"",strokeOpacity:1}},vector:{vector:{fillOpacity:1}},box:{box:{fillOpacity:.95,stroke:e,lineWidth:1}},text:{text:{fill:"#1D2129",fontSize:12,strokeWidth:0,connectorStroke:r,connectorStrokeOpacity:.45,connectorLineWidth:1,backgroundFill:r,backgroundFillOpacity:.15,backgroundPadding:[2,4],startMarkerSymbol:"circle",startMarkerSize:4,endMarkerSymbol:"circle",endMarkerSize:4},badge:{fill:"#1D2129",fillOpacity:.65,strokeWidth:0,fontSize:10,textAlign:"center",textBaseline:"middle",markerFill:r,markerFillOpacity:.25,markerStrokeOpacity:0}},lineX:{line:{stroke:r,strokeOpacity:.45,lineWidth:1}},lineY:{line:{stroke:r,strokeOpacity:.45,lineWidth:1}},rangeX:{range:{fill:r,fillOpacity:.15,lineWidth:0}},rangeY:{range:{fill:r,fillOpacity:.15,lineWidth:0}},connector:{connector:{stroke:r,strokeOpacity:.45,lineWidth:1,connectLength1:12,endMarker:!0,endMarkerSize:6,endMarkerFill:r,endMarkerFillOpacity:.95}},axis:{arrow:!1,gridLineDash:[3,4],gridLineWidth:.5,gridStroke:e,gridStrokeOpacity:d,labelAlign:"horizontal",labelFill:e,labelOpacity:u,labelFontSize:12,labelFontWeight:"normal",labelSpacing:a,line:!1,lineLineWidth:.5,lineStroke:e,lineStrokeOpacity:u,tickLength:4,tickLineWidth:1,tickStroke:e,tickOpacity:u,titleFill:e,titleOpacity:c,titleFontSize:12,titleFontWeight:"normal",titleSpacing:12,titleTransformOrigin:"center",lineArrowOffset:6,lineArrowSize:6},axisTop:{gridDirection:"positive",labelDirection:"negative",tickDirection:"negative",titlePosition:"top",titleSpacing:12,labelSpacing:4,titleTextBaseline:"middle"},axisBottom:{gridDirection:"negative",labelDirection:"positive",tickDirection:"positive",titlePosition:"bottom",titleSpacing:12,labelSpacing:4,titleTextBaseline:"bottom"},axisLeft:{gridDirection:"positive",labelDirection:"negative",labelSpacing:4,tickDirection:"negative",titlePosition:"left",titleSpacing:12,titleTextBaseline:"middle",titleDirection:"vertical",titleTransformOrigin:"center"},axisRight:{gridDirection:"negative",labelDirection:"positive",labelSpacing:4,tickDirection:"positive",titlePosition:"right",titleSpacing:12,titleTextBaseline:"top",titleDirection:"vertical",titleTransformOrigin:"center"},axisLinear:{girdClosed:!0,gridConnect:"arc",gridDirection:"negative",gridType:"surround",titlePosition:"top",titleSpacing:0},axisArc:{title:!1,titlePosition:"inner",line:!1,tick:!0,labelSpacing:4},axisRadar:{girdClosed:!0,gridStrokeOpacity:.3,gridType:"surround",label:!1,tick:!1,titlePosition:"start"},legendCategory:{backgroundFill:"transparent",itemBackgroundFill:"transparent",itemLabelFill:e,itemLabelFillOpacity:c,itemLabelFontSize:12,itemLabelFontWeight:"normal",itemMarkerFillOpacity:1,itemMarkerSize:8,itemSpacing:[a,a],itemValueFill:e,itemValueFillOpacity:.65,itemValueFontSize:12,itemValueFontWeight:"normal",navButtonFill:e,navButtonFillOpacity:.65,navPageNumFill:e,navPageNumFillOpacity:.45,navPageNumFontSize:12,padding:8,title:!1,titleFill:e,titleFillOpacity:.65,titleFontSize:12,titleFontWeight:"normal",titleSpacing:4,tickStroke:e,tickStrokeOpacity:.25,rowPadding:a,colPadding:o,maxRows:3,maxCols:3},legendContinuous:{handleHeight:12,handleLabelFill:e,handleLabelFillOpacity:u,handleLabelFontSize:12,handleLabelFontWeight:"normal",handleMarkerFill:e,handleMarkerFillOpacity:.6,handleMarkerLineWidth:1,handleMarkerStroke:e,handleMarkerStrokeOpacity:.25,handleWidth:10,labelFill:e,labelFillOpacity:u,labelFontSize:12,labelFontWeight:"normal",labelSpacing:3,tick:!0,tickLength:12,ribbonSize:12,ribbonFill:"#aaa",handle:!0,handleLabel:!1,handleShape:"slider",handleIconSize:12/1.8,indicator:!1,titleFontSize:12,titleSpacing:4,titleFontWeight:"normal",titleFillOpacity:c,tickStroke:e,tickStrokeOpacity:u},label:{fill:e,fillOpacity:.65,fontSize:12,fontWeight:"normal",stroke:void 0,offset:12,connectorStroke:e,connectorStrokeOpacity:.45,connectorLineWidth:1,connectorLength:12,connectorLength2:8,connectorDistance:4},innerLabel:{fill:n,fontSize:12,fillOpacity:.85,fontWeight:"normal",stroke:void 0,offset:0},htmlLabel:{fontSize:12,opacity:.65,color:e,fontWeight:"normal"},slider:{trackSize:16,trackFill:r,trackFillOpacity:1,selectionFill:t,selectionFillOpacity:.15,handleIconSize:10,handleIconFill:"#f7f7f7",handleIconFillOpacity:1,handleIconStroke:e,handleIconStrokeOpacity:.25,handleIconLineWidth:1,handleIconRadius:2,handleLabelFill:e,handleLabelFillOpacity:.45,handleLabelFontSize:12,handleLabelFontWeight:"normal"},scrollbar:{padding:[0,0,0,0],trackSize:6,isRound:!0,slidable:!0,scrollable:!0,trackFill:"#e5e5e5",trackFillOpacity:0,thumbFill:"#000",thumbFillOpacity:.15,thumbHighlightedFillOpacity:.2},title:{spacing:8,titleFill:e,titleFillOpacity:c,titleFontSize:16,titleFontWeight:"bold",titleTextBaseline:"top",subtitleFill:e,subtitleFillOpacity:l,subtitleFontSize:12,subtitleFontWeight:"normal",subtitleTextBaseline:"top"}}}const BQ=D1({colorBlack:"#1D2129",colorWhite:"#ffffff",colorStroke:"#416180",colorDefault:"#1783FF",colorBackground:"transparent",category10:["#1783FF","#00C9C9","#F0884D","#D580FF","#7863FF","#60C42D","#BD8F24","#FF80CA","#2491B3","#17C76F"],category20:["#1783FF","#00C9C9","#F0884D","#D580FF","#7863FF","#60C42D","#BD8F24","#FF80CA","#2491B3","#17C76F","#AABA01","#BC7CFC","#237CBC","#2DE379","#CE8032","#FF7AF4","#545FD3","#AFE410","#D8C608","#FFA1E0"],padding1:8,padding2:12,padding3:20,alpha90:.9,alpha65:.65,alpha45:.45,alpha25:.25,alpha10:.1}),B1=t=>dt({},BQ,t);B1.props={};const _k=t=>dt({},B1(),{category10:"category10",category20:"category20"},t);_k.props={};const FQ=D1({colorBlack:"#fff",colorWhite:"#000",colorStroke:"#416180",colorDefault:"#1783FF",colorBackground:"#141414",category10:["#1783FF","#00C9C9","#F0884D","#D580FF","#7863FF","#60C42D","#BD8F24","#FF80CA","#2491B3","#17C76F"],category20:["#1783FF","#00C9C9","#F0884D","#D580FF","#7863FF","#60C42D","#BD8F24","#FF80CA","#2491B3","#17C76F","#AABA01","#BC7CFC","#237CBC","#2DE379","#CE8032","#FF7AF4","#545FD3","#AFE410","#D8C608","#FFA1E0"],padding1:8,padding2:12,padding3:20,alpha90:.9,alpha65:.65,alpha45:.45,alpha25:.25,alpha10:.25}),Ok=t=>dt({},FQ,{tooltip:{crosshairsStroke:"#fff",crosshairsLineWidth:1,crosshairsStrokeOpacity:.25,css:{".g2-tooltip":{background:"#1f1f1f",opacity:.95},".g2-tooltip-title":{color:"#A6A6A6"},".g2-tooltip-list-item-name-label":{color:"#A6A6A6"},".g2-tooltip-list-item-value":{color:"#A6A6A6"}}}},t),wk=t=>Object.assign({},Ok(),{category10:"category10",category20:"category20"},t);wk.props={};const zQ=D1({colorBlack:"#000",colorWhite:"#fff",colorStroke:"#888",colorDefault:"#4e79a7",colorBackground:"transparent",category10:["#4e79a7","#f28e2c","#e15759","#76b7b2","#59a14f","#edc949","#af7aa1","#ff9da7","#9c755f","#bab0ab"],category20:["#4e79a7","#f28e2c","#e15759","#76b7b2","#59a14f","#edc949","#af7aa1","#ff9da7","#9c755f","#bab0ab"],padding1:8,padding2:12,padding3:20,alpha90:.9,alpha65:.65,alpha45:.45,alpha25:.25,alpha10:.1}),Sk=t=>dt({},zQ,{text:{text:{fontSize:10}},axis:{gridLineDash:[0,0],gridLineWidth:1,gridStroke:"#ddd",gridStrokeOpacity:1,labelOpacity:1,labelStrokeOpacity:1,labelFontSize:10,line:!0,lineLineWidth:1,lineStroke:"#888",lineStrokeOpacity:1,tickLength:5,tickStrokeOpacity:1,titleOpacity:1,titleStrokeOpacity:1,titleFillOpacity:1,titleFontSize:11,titleFontWeight:"bold"},axisLeft:{gridFilter:(e,n)=>n!==0},axisRight:{gridFilter:(e,n)=>n!==0},legendCategory:{itemLabelFillOpacity:1,itemLabelFontSize:10,itemValueFillOpacity:1,itemValueFontSize:10,titleFillOpacity:1,titleFontSize:11,titleFontWeight:"bold"},legendContinuous:{handleLabelFontSize:10,labelFillOpacity:.45,labelFontSize:10},label:{fontSize:10},innerLabel:{fontSize:10},htmlLabel:{fontSize:10},slider:{handleLabelFontSize:10,trackFillOpacity:.05}},t);Sk.props={};const Mk=t=>(...e)=>{const n=Jo(Object.assign({},{crossPadding:50},t))(...e);return XS(n,t),n};Mk.props=Object.assign(Object.assign({},Jo.props),{defaultPosition:"bottom"});function Wmt(){}const Ek=t=>(...e)=>{const n=Jo(Object.assign({},{crossPadding:10},t))(...e);return XS(n,t),n};Ek.props=Object.assign(Object.assign({},Jo.props),{defaultPosition:"left"});var F1=function(){},GQ=function(t,e,n){var r=t,i=Dn(e)?e.split("."):e;return i.forEach(function(a,o){o<i.length-1?(Ys(r[a])||(r[a]=er(i[o+1])?[]:{}),r=r[a]):r[a]=n}),t};function WQ(t,e){return t.reduce(function(n,r){return(n[r[e]]=n[r[e]]||[]).push(r),n},{})}function YQ(t){var e;return((e=t[0])===null||e===void 0?void 0:e.map(function(n,r){return t.map(function(i){return i[r]})}))||[]}var ia=Ji({prevBtnGroup:"prev-btn-group",prevBtn:"prev-btn",nextBtnGroup:"next-btn-group",nextBtn:"next-btn",pageInfoGroup:"page-info-group",pageInfo:"page-info",playWindow:"play-window",contentGroup:"content-group",controller:"controller",clipPath:"clip-path"},"navigator"),HQ=function(t){Yt(e,t);function e(n){var r=t.call(this,n,{animate:{easing:"linear",duration:200,fill:"both"},buttonCursor:"pointer",buttonFill:"black",buttonPath:EH(0,0,6),buttonSize:12,controllerPadding:5,controllerSpacing:5,formatter:function(i,a){return"".concat(i,"/").concat(a)},defaultPage:0,loop:!1,orientation:"horizontal",pageNumFill:"black",pageNumFontSize:12,pageNumTextAlign:"start",pageNumTextBaseline:"middle"})||this;return r.playState="idle",r.contentGroup=r.appendChild(new Er({class:ia.contentGroup.name})),r.playWindow=r.contentGroup.appendChild(new Er({class:ia.playWindow.name})),r.innerCurrPage=r.defaultPage,r}return Object.defineProperty(e.prototype,"defaultPage",{get:function(){var n=this.attributes.defaultPage;return Vn(n,0,Math.max(this.pageViews.length-1,0))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pageViews",{get:function(){return this.playWindow.children},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"controllerShape",{get:function(){return this.totalPages>1?{width:55,height:0}:{width:0,height:0}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pageShape",{get:function(){var n=this.pageViews,r=R(YQ(n.map(function(f){var d=f.getBBox(),h=d.width,p=d.height;return[h,p]})).map(function(f){return Math.max.apply(Math,yt([],R(f),!1))}),2),i=r[0],a=r[1],o=this.attributes,s=o.pageWidth,c=s===void 0?i:s,l=o.pageHeight,u=l===void 0?a:l;return{pageWidth:c,pageHeight:u}},enumerable:!1,configurable:!0}),e.prototype.getContainer=function(){return this.playWindow},Object.defineProperty(e.prototype,"totalPages",{get:function(){return this.pageViews.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currPage",{get:function(){return this.innerCurrPage},enumerable:!1,configurable:!0}),e.prototype.getBBox=function(){var n=t.prototype.getBBox.call(this),r=n.x,i=n.y,a=this.controllerShape,o=this.pageShape,s=o.pageWidth,c=o.pageHeight;return new Ln(r,i,s+a.width,c)},e.prototype.goTo=function(n){var r=this,i=this.attributes.animate,a=this,o=a.currPage,s=a.playState,c=a.playWindow,l=a.pageViews;if(s!=="idle"||n<0||l.length<=0||n>=l.length)return null;l[o].setLocalPosition(0,0),this.prepareFollowingPage(n);var u=R(this.getFollowingPageDiff(n),2),f=u[0],d=u[1];this.playState="running";var h=Yw(c,[{transform:"translate(0, 0)"},{transform:"translate(".concat(-f,", ").concat(-d,")")}],i);return bl(h,function(){r.innerCurrPage=n,r.playState="idle",r.setVisiblePages([n]),r.updatePageInfo()}),h},e.prototype.prev=function(){var n=this.attributes.loop,r=this.pageViews.length,i=this.currPage;if(!n&&i<=0)return null;var a=n?(i-1+r)%r:Vn(i-1,0,r);return this.goTo(a)},e.prototype.next=function(){var n=this.attributes.loop,r=this.pageViews.length,i=this.currPage;if(!n&&i>=r-1)return null;var a=n?(i+1)%r:Vn(i+1,0,r);return this.goTo(a)},e.prototype.renderClipPath=function(n){var r=this.pageShape,i=r.pageWidth,a=r.pageHeight;if(!i||!a){this.contentGroup.style.clipPath=void 0;return}this.clipPath=n.maybeAppendByClassName(ia.clipPath,"rect").styles({width:i,height:a}),this.contentGroup.attr("clipPath",this.clipPath.node())},e.prototype.setVisiblePages=function(n){this.playWindow.children.forEach(function(r,i){n.includes(i)?df(r):Qo(r)})},e.prototype.adjustControllerLayout=function(){var n=this,r=n.prevBtnGroup,i=n.nextBtnGroup,a=n.pageInfoGroup,o=this.attributes,s=o.orientation,c=o.controllerPadding,l=a.getBBox(),u=l.width,f=l.height,d=R(s==="horizontal"?[-180,0]:[-90,90],2),h=d[0],p=d[1];r.setLocalEulerAngles(h),i.setLocalEulerAngles(p);var v=r.getBBox(),g=v.width,y=v.height,m=i.getBBox(),b=m.width,x=m.height,_=Math.max(g,u,b),O=s==="horizontal"?{offset:[[0,0],[g/2+c,0],[g+u+c*2,0]],textAlign:"start"}:{offset:[[_/2,-y-c],[_/2,0],[_/2,x+c]],textAlign:"center"},w=R(O.offset,3),S=R(w[0],2),M=S[0],E=S[1],P=R(w[1],2),L=P[0],A=P[1],T=R(w[2],2),C=T[0],N=T[1],B=O.textAlign,j=a.querySelector("text");j&&(j.style.textAlign=B),r.setLocalPosition(M,E),a.setLocalPosition(L,A),i.setLocalPosition(C,N)},e.prototype.updatePageInfo=function(){var n,r=this,i=r.currPage,a=r.pageViews,o=r.attributes.formatter;a.length<2||((n=this.pageInfoGroup.querySelector(ia.pageInfo.class))===null||n===void 0||n.attr("text",o(i+1,a.length)),this.adjustControllerLayout())},e.prototype.getFollowingPageDiff=function(n){var r=this.currPage;if(r===n)return[0,0];var i=this.attributes.orientation,a=this.pageShape,o=a.pageWidth,s=a.pageHeight,c=n<r?-1:1;return i==="horizontal"?[c*o,0]:[0,c*s]},e.prototype.prepareFollowingPage=function(n){var r=this,i=r.currPage,a=r.pageViews;if(this.setVisiblePages([n,i]),n!==i){var o=R(this.getFollowingPageDiff(n),2),s=o[0],c=o[1];a[n].setLocalPosition(s,c)}},e.prototype.renderController=function(n){var r=this,i=this.attributes.controllerSpacing,a=this.pageShape,o=a.pageWidth,s=a.pageHeight,c=this.pageViews.length>=2,l=n.maybeAppendByClassName(ia.controller,"g");if(ip(l.node(),c),!!c){var u=Pe(this.attributes,"button"),f=Pe(this.attributes,"pageNum"),d=R(yo(u),2),h=d[0],p=d[1],v=h.size,g=rn(h,["size"]),y=!l.select(ia.prevBtnGroup.class).node(),m=l.maybeAppendByClassName(ia.prevBtnGroup,"g").styles(p);this.prevBtnGroup=m.node();var b=m.maybeAppendByClassName(ia.prevBtn,"path"),x=l.maybeAppendByClassName(ia.nextBtnGroup,"g").styles(p);this.nextBtnGroup=x.node();var _=x.maybeAppendByClassName(ia.nextBtn,"path");[b,_].forEach(function(w){w.styles(nt(nt({},g),{transformOrigin:"center"})),Yy(w.node(),v,!0)});var O=l.maybeAppendByClassName(ia.pageInfoGroup,"g");this.pageInfoGroup=O.node(),O.maybeAppendByClassName(ia.pageInfo,"text").styles(f),this.updatePageInfo(),l.node().setLocalPosition(o+i,s/2),y&&(this.prevBtnGroup.addEventListener("click",function(){r.prev()}),this.nextBtnGroup.addEventListener("click",function(){r.next()}))}},e.prototype.render=function(n,r){var i=ge(r);this.renderClipPath(i),this.renderController(i),this.setVisiblePages([this.defaultPage]),this.goTo(this.defaultPage)},e.prototype.bindEvents=function(){var n=this,r=dw(function(){return n.render(n.attributes,n)},50);this.playWindow.addEventListener(oe.INSERTED,r),this.playWindow.addEventListener(oe.REMOVED,r)},e}(Nr),Fi=Ji({layout:"flex",markerGroup:"marker-group",marker:"marker",labelGroup:"label-group",label:"label",valueGroup:"value-group",value:"value",backgroundGroup:"background-group",background:"background"},"legend-category-item");function $Q(t){var e=t.querySelector(Fi.marker.class);return e?e.style:{}}var VQ=function(t){Yt(e,t);function e(n){return t.call(this,n,{span:[1,1],marker:function(){return new Ks({style:{r:6}})},markerSize:10,labelFill:"#646464",valueFill:"#646464",labelFontSize:12,valueFontSize:12,labelTextBaseline:"middle",valueTextBaseline:"middle"})||this}return Object.defineProperty(e.prototype,"showValue",{get:function(){var n=this.attributes.valueText;return n?typeof n=="string"||typeof n=="number"?n!=="":typeof n=="function"?!0:n.attr("text")!=="":!1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"actualSpace",{get:function(){var n=this.labelGroup,r=this.valueGroup,i=this.attributes.markerSize,a=n.node().getBBox(),o=a.width,s=a.height,c=r.node().getBBox(),l=c.width,u=c.height;return{markerWidth:i,labelWidth:o,valueWidth:l,height:Math.max(i,s,u)}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"span",{get:function(){var n=this.attributes.span;if(!n)return[1,1];var r=R(Wr(n),2),i=r[0],a=r[1],o=this.showValue?a:0,s=i+o;return[i/s,o/s]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shape",{get:function(){var n,r=this.attributes,i=r.markerSize,a=r.width,o=this.actualSpace,s=o.markerWidth,c=o.height,l=this.actualSpace,u=l.labelWidth,f=l.valueWidth,d=R(this.spacing,2),h=d[0],p=d[1];if(a){var v=a-i-h-p,g=R(this.span,2),y=g[0],m=g[1];n=R([y*v,m*v],2),u=n[0],f=n[1]}var b=s+u+f+h+p;return{width:b,height:c,markerWidth:s,labelWidth:u,valueWidth:f}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"spacing",{get:function(){var n=this.attributes.spacing;if(!n)return[0,0];var r=R(Wr(n),2),i=r[0],a=r[1];return this.showValue?[i,a]:[i,0]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"layout",{get:function(){var n=this.shape,r=n.markerWidth,i=n.labelWidth,a=n.valueWidth,o=n.width,s=n.height,c=R(this.spacing,2),l=c[0],u=c[1];return{height:s,width:o,markerWidth:r,labelWidth:i,valueWidth:a,position:[r/2,r+l,r+i+l+u]}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scaleSize",{get:function(){var n=$Q(this.markerGroup.node()),r=this.attributes,i=r.markerSize,a=r.markerStrokeWidth,o=a===void 0?n.strokeWidth:a,s=r.markerLineWidth,c=s===void 0?n.lineWidth:s,l=r.markerStroke,u=l===void 0?n.stroke:l,f=+(o||c||(u?1:0))*Math.sqrt(2),d=this.markerGroup.node().getBBox(),h=d.width,p=d.height;return(1-f/Math.max(h,p))*i},enumerable:!1,configurable:!0}),e.prototype.renderMarker=function(n){var r=this,i=this.attributes.marker,a=Pe(this.attributes,"marker");this.markerGroup=n.maybeAppendByClassName(Fi.markerGroup,"g").style("zIndex",0),Si(!!i,this.markerGroup,function(){var o,s=r.markerGroup.node(),c=(o=s.childNodes)===null||o===void 0?void 0:o[0],l=typeof i=="string"?new Je({style:{symbol:i},className:Fi.marker.name}):i();c?l.nodeName===c.nodeName?c instanceof Je?c.update(nt(nt({},a),{symbol:i})):(mW(c,l),ge(c).styles(a)):(c.remove(),ge(l).attr("className",Fi.marker.name).styles(a),s.appendChild(l)):(l instanceof Je||ge(l).attr("className",Fi.marker.name).styles(a),s.appendChild(l)),r.markerGroup.node().scale(1/r.markerGroup.node().getScale()[0]),Yy(r.markerGroup.node(),r.scaleSize,!0)})},e.prototype.renderLabel=function(n){var r=Pe(this.attributes,"label"),i=r.text,a=rn(r,["text"]);this.labelGroup=n.maybeAppendByClassName(Fi.labelGroup,"g").style("zIndex",0),this.labelGroup.maybeAppendByClassName(Fi.label,function(){return ic(i)}).styles(a)},e.prototype.renderValue=function(n){var r=this,i=Pe(this.attributes,"value"),a=i.text,o=rn(i,["text"]);this.valueGroup=n.maybeAppendByClassName(Fi.valueGroup,"g").style("zIndex",0),Si(this.showValue,this.valueGroup,function(){r.valueGroup.maybeAppendByClassName(Fi.value,function(){return ic(a)}).styles(o)})},e.prototype.renderBackground=function(n){var r=this.shape,i=r.width,a=r.height,o=Pe(this.attributes,"background");this.background=n.maybeAppendByClassName(Fi.backgroundGroup,"g").style("zIndex",-1),this.background.maybeAppendByClassName(Fi.background,"rect").styles(nt({width:i,height:a},o))},e.prototype.adjustLayout=function(){var n=this.layout,r=n.labelWidth,i=n.valueWidth,a=n.height,o=R(n.position,3),s=o[0],c=o[1],l=o[2],u=a/2;this.markerGroup.styles({x:s,y:u}),this.labelGroup.styles({x:c,y:u}),Uy(this.labelGroup.select(Fi.label.class).node(),Math.ceil(r)),this.showValue&&(this.valueGroup.styles({x:l,y:u}),Uy(this.valueGroup.select(Fi.value.class).node(),Math.ceil(i)))},e.prototype.render=function(n,r){var i=ge(r);this.renderMarker(i),this.renderLabel(i),this.renderValue(i),this.renderBackground(i),this.adjustLayout()},e}(Nr),mc=Ji({page:"item-page",navigator:"navigator",item:"item"},"items"),Pk=function(t,e,n){return n===void 0&&(n=!0),t?e(t):n},UQ=function(t){Yt(e,t);function e(n){var r=t.call(this,n,{data:[],gridRow:1/0,gridCol:void 0,padding:0,width:1e3,height:100,rowPadding:0,colPadding:0,layout:"flex",orientation:"horizontal",click:F1,mouseenter:F1,mouseleave:F1})||this;return r.navigatorShape=[0,0],r}return Object.defineProperty(e.prototype,"pageViews",{get:function(){return this.navigator.getContainer()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"grid",{get:function(){var n=this.attributes,r=n.gridRow,i=n.gridCol,a=n.data;if(!r&&!i)throw new Error("gridRow and gridCol can not be set null at the same time");return r&&i?[r,i]:r?[r,a.length]:[a.length,i]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"renderData",{get:function(){var n=this.attributes,r=n.data,i=n.layout,a=Pe(this.attributes,"item"),o=r.map(function(s,c){var l=s.id,u=l===void 0?c:l,f=s.label,d=s.value;return{id:"".concat(u),index:c,style:nt({layout:i,labelText:f,valueText:d},Object.fromEntries(Object.entries(a).map(function(h){var p=R(h,2),v=p[0],g=p[1];return[v,ta(g,[s,c,r])]})))}});return o},enumerable:!1,configurable:!0}),e.prototype.getGridLayout=function(){var n=this,r=this.attributes,i=r.orientation,a=r.width,o=r.rowPadding,s=r.colPadding,c=R(this.navigatorShape,1),l=c[0],u=R(this.grid,2),f=u[0],d=u[1],h=d*f,p=0;return this.pageViews.children.map(function(v,g){var y,m,b=Math.floor(g/h),x=g%h,_=n.ifHorizontal(d,f),O=[Math.floor(x/_),x%_];i==="vertical"&&O.reverse();var w=R(O,2),S=w[0],M=w[1],E=(a-l-(d-1)*s)/d,P=v.getBBox().height,L=R([0,0],2),A=L[0],T=L[1];return i==="horizontal"?(y=R([p,S*(P+o)],2),A=y[0],T=y[1],p=M===d-1?0:p+E+s):(m=R([M*(E+s),p],2),A=m[0],T=m[1],p=S===f-1?0:p+P+o),{page:b,index:g,row:S,col:M,pageIndex:x,width:E,height:P,x:A,y:T}})},e.prototype.getFlexLayout=function(){var n=this.attributes,r=n.width,i=n.height,a=n.rowPadding,o=n.colPadding,s=R(this.navigatorShape,1),c=s[0],l=R(this.grid,2),u=l[0],f=l[1],d=R([r-c,i],2),h=d[0],p=d[1],v=R([0,0,0,0,0,0,0,0],8),g=v[0],y=v[1],m=v[2],b=v[3],x=v[4],_=v[5],O=v[6],w=v[7];return this.pageViews.children.map(function(S,M){var E,P,L,A,T=S.getBBox(),C=T.width,N=T.height,B=O===0?0:o,j=O+B+C;if(j<=h&&Pk(x,function(G){return G<f}))return E=R([O+B,w,j],3),g=E[0],y=E[1],O=E[2],{width:C,height:N,x:g,y,page:m,index:M,pageIndex:b++,row:_,col:x++};P=R([_+1,0,0,w+N+a],4),_=P[0],x=P[1],O=P[2],w=P[3];var D=w+N;return D<=p&&Pk(_,function(G){return G<u})?(L=R([O,w,C],3),g=L[0],y=L[1],O=L[2],{width:C,height:N,x:g,y,page:m,index:M,pageIndex:b++,row:_,col:x++}):(A=R([0,0,C,0,m+1,0,0,0],8),g=A[0],y=A[1],O=A[2],w=A[3],m=A[4],b=A[5],_=A[6],x=A[7],{width:C,height:N,x:g,y,page:m,index:M,pageIndex:b++,row:_,col:x++})})},Object.defineProperty(e.prototype,"itemsLayout",{get:function(){this.navigatorShape=[0,0];var n=this.attributes.layout==="grid"?this.getGridLayout:this.getFlexLayout,r=n.call(this);return r.slice(-1)[0].page>0?(this.navigatorShape=[55,0],n.call(this)):r},enumerable:!1,configurable:!0}),e.prototype.ifHorizontal=function(n,r){var i=this.attributes.orientation;return Ba(i,n,r)},e.prototype.flattenPage=function(n){n.querySelectorAll(mc.item.class).forEach(function(r){n.appendChild(r)}),n.querySelectorAll(mc.page.class).forEach(function(r){var i=n.removeChild(r);i.destroy()})},e.prototype.renderItems=function(n){var r=this.attributes,i=r.click,a=r.mouseenter,o=r.mouseleave;this.flattenPage(n);var s=this.dispatchCustomEvent.bind(this);ge(n).selectAll(mc.item.class).data(this.renderData,function(c){return c.id}).join(function(c){return c.append(function(l){var u=l.style;return new VQ({style:u})}).attr("className",mc.item.name).on("click",function(){i==null||i(this),s("itemClick",{item:this})}).on("pointerenter",function(){a==null||a(this),s("itemMouseenter",{item:this})}).on("pointerleave",function(){o==null||o(this),s("itemMouseleave",{item:this})})},function(c){return c.each(function(l){var u=l.style;this.update(u)})},function(c){return c.remove()})},e.prototype.relayoutNavigator=function(){var n,r=this.attributes,i=r.layout,a=r.width,o=((n=this.pageViews.children[0])===null||n===void 0?void 0:n.getBBox().height)||0,s=R(this.navigatorShape,2),c=s[0],l=s[1];this.navigator.update(i==="grid"?{pageWidth:a-c,pageHeight:o-l}:{})},e.prototype.adjustLayout=function(){var n=this,r=Object.entries(WQ(this.itemsLayout,"page")).map(function(a){var o=R(a,2),s=o[0],c=o[1];return{page:s,layouts:c}}),i=yt([],R(this.navigator.getContainer().children),!1);r.forEach(function(a){var o=a.layouts,s=n.pageViews.appendChild(new Er({className:mc.page.name}));o.forEach(function(c){var l=c.x,u=c.y,f=c.index,d=c.width,h=c.height,p=i[f];s.appendChild(p),GQ(p,"__layout__",c),p.update({x:l,y:u,width:d,height:h})})}),this.relayoutNavigator()},e.prototype.renderNavigator=function(n){var r=this.attributes.orientation,i=Pe(this.attributes,"nav"),a=vo({orientation:r},i),o=this;return n.selectAll(mc.navigator.class).data(["nav"]).join(function(s){return s.append(function(){return new HQ({style:a})}).attr("className",mc.navigator.name).each(function(){o.navigator=this})},function(s){return s.each(function(){this.update(a)})},function(s){return s.remove()}),this.navigator},e.prototype.getBBox=function(){return this.navigator.getBBox()},e.prototype.render=function(n,r){var i=this.attributes.data;if(!(!i||i.length===0)){var a=this.renderNavigator(ge(r));this.renderItems(a.getContainer()),this.adjustLayout()}},e.prototype.dispatchCustomEvent=function(n,r){var i=new vn(n,{detail:r});this.dispatchEvent(i)},e}(Nr),XQ=function(t){Yt(e,t);function e(n){return t.call(this,n,jH)||this}return e.prototype.renderTitle=function(n,r,i){var a=this.attributes,o=a.showTitle,s=a.titleText,c=Pe(this.attributes,"title"),l=R(yo(c),2),u=l[0],f=l[1];this.titleGroup=n.maybeAppendByClassName(Ir.titleGroup,"g").styles(f);var d=nt(nt({width:r,height:i},u),{text:o?s:""});this.title=this.titleGroup.maybeAppendByClassName(Ir.title,function(){return new OS({style:d})}).update(d)},e.prototype.renderItems=function(n,r){var i=r.x,a=r.y,o=r.width,s=r.height,c=Pe(this.attributes,"title",!0),l=R(yo(c),2),u=l[0],f=l[1],d=nt(nt({},u),{width:o,height:s,x:0,y:0});this.itemsGroup=n.maybeAppendByClassName(Ir.itemsGroup,"g").styles(nt({x:i,y:a},f));var h=this;this.itemsGroup.selectAll(Ir.items.class).data(["items"]).join(function(p){return p.append(function(){return new UQ({style:d})}).attr("className",Ir.items.name).each(function(){h.items=ge(this)})},function(p){return p.update(d)},function(p){return p.remove()})},e.prototype.adjustLayout=function(){var n=this.attributes.showTitle;if(n){var r=this.title.node().getAvailableSpace(),i=r.x,a=r.y;this.itemsGroup.node().setLocalPosition(i,a)}},Object.defineProperty(e.prototype,"availableSpace",{get:function(){var n=this.attributes,r=n.showTitle,i=n.width,a=n.height;return r?this.title.node().getAvailableSpace():new Ln(0,0,i,a)},enumerable:!1,configurable:!0}),e.prototype.getBBox=function(){var n,r,i=(n=this.title)===null||n===void 0?void 0:n.node(),a=(r=this.items)===null||r===void 0?void 0:r.node();return!i||!a?t.prototype.getBBox.call(this):FW(i,a)},e.prototype.render=function(n,r){var i=n.width,a=n.height,o=ge(r);this.renderTitle(o,i,a),this.renderItems(o,this.availableSpace),this.adjustLayout()},e}(Nr);function qf(t){if(cf(t)){var e=t;return e[e.length-1]}}var qQ=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function ZQ(t,e){const n=Ra(t,"shape"),r=Ra(t,"color"),i=n?n.clone():null,a=[];for(const[s,c]of e){const l=s.type,f=((r==null?void 0:r.getOptions().domain.length)>0?r==null?void 0:r.getOptions().domain:c.data).map((d,h)=>{var p;return i?i.map(d||"point"):((p=s==null?void 0:s.style)===null||p===void 0?void 0:p.shape)||c.defaultShape||"point"});typeof l=="string"&&a.push([l,f])}if(a.length===0)return["point",["point"]];if(a.length===1||!n)return a[0];const{range:o}=n.getOptions();return a.map(([s,c])=>{let l=0;for(let u=0;u<a.length;u++){const f=o[u%o.length];c[u]===f&&l++}return[l/c.length,[s,c]]}).sort((s,c)=>c[0]-s[0])[0][1]}function KQ(t,e){const{scales:n,library:r,markState:i}=e,[a,o]=ZQ(n,i),{itemMarker:s,itemMarkerSize:c}=t,l=(d,h)=>{var p,v,g;const y=((g=(v=(p=r[`mark.${a}`])===null||p===void 0?void 0:p.props)===null||v===void 0?void 0:v.shape[d])===null||g===void 0?void 0:g.props.defaultMarker)||qf(d.split(".")),m=typeof c=="function"?c(h):c;return()=>lK(y,{color:h.color})(0,0,m)},u=d=>`${o[d]}`;return Ra(n,"shape")&&!s?(d,h)=>l(u(h),d):typeof s=="function"?(d,h)=>{const p=s(d.id,h);return typeof p=="string"?l(p,d):p}:(d,h)=>l(s||u(h),d)}function QQ(t){const e=Ra(t,"opacity");if(e){const{range:n}=e.getOptions();return(r,i)=>n[i]}}function JQ(t,e){const n=Ra(t,"size");return n instanceof d0?n.map(NaN)*2:e}function tJ(t,e){const{labelFormatter:n=d=>`${d}`}=t,{scales:r,theme:i}=e,a=i.legendCategory.itemMarkerSize,o=JQ(r,a),s={itemMarker:KQ(Object.assign(Object.assign({},t),{itemMarkerSize:o}),e),itemMarkerSize:o,itemMarkerOpacity:QQ(r)},c=typeof n=="string"?Zo(n):n,l=Ra(r,"color"),u=YY(r),f=l?d=>l.map(d):()=>e.theme.color;return Object.assign(Object.assign({},s),{data:u.map(d=>({id:d,label:c(d),color:f(d)}))})}function eJ(t,e,n){const{position:r}=e;if(r==="center"){const{bbox:o}=t,{width:s,height:c}=o;return{width:s,height:c}}const{width:i,height:a}=VS(t,e,n);return{width:i,height:a}}const z1=t=>{const{labelFormatter:e,layout:n,order:r,orientation:i,position:a,size:o,title:s,cols:c,itemMarker:l}=t,u=qQ(t,["labelFormatter","layout","order","orientation","position","size","title","cols","itemMarker"]),{gridRow:f}=u;return d=>{const{value:h,theme:p}=d,{bbox:v}=h,{width:g,height:y}=eJ(h,t,z1),m=HS(a,n),b=Object.assign(Object.assign(Object.assign(Object.assign({orientation:["right","left","center"].includes(a)?"vertical":"horizontal",width:g,height:y,layout:c!==void 0?"grid":"flex"},c!==void 0&&{gridCol:c}),f!==void 0&&{gridRow:f}),{titleText:xp(s)}),tJ(t,d)),{legendCategory:x={}}=p,_=_p(Object.assign({},x,b,u)),O=new zY({style:Object.assign(Object.assign({x:v.x,y:v.y,width:v.width,height:v.height},m),{subOptions:_})});return O.appendChild(new XQ({className:"legend-category",style:_})),O}};z1.props={defaultPosition:"top",defaultOrder:1,defaultSize:40,defaultCrossPadding:[12,12],defaultPadding:[12,12]};const Ak=t=>()=>new Er;Ak.props={};var nJ=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function Tk(t,e,n,r){switch(r){case"center":return{x:t+n/2,y:e,textAlign:"middle"};case"right":return{x:t+n,y:e,textAlign:"right"};default:return{x:t,y:e,textAlign:"left"}}}const rJ=FY({render(t,e){const{width:n,title:r,subtitle:i,spacing:a=2,align:o="left"}=t,s=nJ(t,["width","title","subtitle","spacing","align"]),c=At(s,"title"),l=At(s,"subtitle"),f=YS(e,".title","text").attr("className","title").call(Vt,Object.assign(Object.assign(Object.assign({},Tk(0,0,n,o)),{fontSize:14,textBaseline:"top",text:r}),c)).node().getLocalBounds();YS(e,".sub-title","text").attr("className","sub-title").call(d=>{if(!i)return d.node().remove();d.node().attr(Object.assign(Object.assign(Object.assign({},Tk(0,f.max[1]+a,n,o)),{fontSize:12,textBaseline:"top",text:i}),l))})}}),Ck=t=>({value:e,theme:n})=>{const{x:r,y:i,width:a,height:o}=e.bbox;return new rJ({style:dt({},n.title,Object.assign({x:r,y:i,width:a,height:o},t))})};Ck.props={defaultPosition:"top",defaultOrder:2,defaultSize:36,defaultCrossPadding:[20,20],defaultPadding:[12,12]};var G1=function(t){if(typeof t!="object"||t===null)return t;var e;if(mr(t)){e=[];for(var n=0,r=t.length;n<r;n++)typeof t[n]=="object"&&t[n]!=null?e[n]=G1(t[n]):e[n]=t[n]}else{e={};for(var i in t)typeof t[i]=="object"&&t[i]!=null?e[i]=G1(t[i]):e[i]=t[i]}return e},W1=G1,iJ=function(t){Yt(e,t);function e(n){var r=this,i=n.style,a=rn(n,["style"]);return r=t.call(this,dt({},{type:"column"},nt({style:i},a)))||this,r.columnsGroup=new Er({name:"columns"}),r.appendChild(r.columnsGroup),r.render(),r}return e.prototype.render=function(){var n=this.attributes.columns;ge(this.columnsGroup).selectAll(".column").data(n.flat()).join(function(r){return r.append("rect").attr("className","column").each(function(i){this.attr(i)})},function(r){return r.each(function(i){this.attr(i)})},function(r){return r.remove()})},e.prototype.update=function(n){this.attr(vo({},this.attributes,n)),this.render()},e.prototype.clear=function(){this.removeChildren()},e}(qr),aJ=function(t){Yt(e,t);function e(n){var r=this,i=n.style,a=rn(n,["style"]);return r=t.call(this,dt({},{type:"lines"},nt({style:i},a)))||this,r.linesGroup=r.appendChild(new Er),r.areasGroup=r.appendChild(new Er),r.render(),r}return e.prototype.render=function(){var n=this.attributes,r=n.lines,i=n.areas;r&&this.renderLines(r),i&&this.renderAreas(i)},e.prototype.clear=function(){this.linesGroup.removeChildren(),this.areasGroup.removeChildren()},e.prototype.update=function(n){this.attr(vo({},this.attributes,n)),this.render()},e.prototype.renderLines=function(n){ge(this.linesGroup).selectAll(".line").data(n).join(function(r){return r.append("path").attr("className","line").each(function(i){this.attr(i)})},function(r){return r.each(function(i){this.attr(i)})},function(r){return r.remove()})},e.prototype.renderAreas=function(n){ge(this.linesGroup).selectAll(".area").data(n).join(function(r){return r.append("path").attr("className","area").each(function(i){this.attr(i)})},function(r){return r.each(function(i){this.style(i)})},function(r){return r.remove()})},e}(qr);function oJ(t,e,n,r){var i,a=[],o=!!r,s,c,l=[1/0,1/0],u=[-1/0,-1/0],f,d,h;if(o){i=R(r,2),l=i[0],u=i[1];for(var p=0,v=t.length;p<v;p+=1){var g=t[p];l=nc(l,g),u=rc(u,g)}}for(var p=0,y=t.length;p<y;p+=1){var g=t[p];if(p===0&&!n)h=g;else if(p===y-1&&!n)d=g,a.push(h),a.push(d);else{var m=[p?p-1:y-1,p-1][n?0:1];s=t[m],c=t[n?(p+1)%y:p+1];var b=[0,0];b=Fy(c,s),b=go(b,e);var x=pf(g,s),_=pf(g,c),O=x+_;O!==0&&(x/=O,_/=O);var w=go(b,-x),S=go(b,_);d=hf(g,w),f=hf(g,S),f=nc(f,rc(c,g)),f=rc(f,nc(c,g)),w=Fy(f,g),w=go(w,-x/_),d=hf(g,w),d=nc(d,rc(s,g)),d=rc(d,nc(s,g)),S=Fy(g,d),S=go(S,_/x),f=hf(g,S),o&&(d=rc(d,l),d=nc(d,u),f=rc(f,l),f=nc(f,u)),a.push(h),a.push(d),h=f}}return n&&a.push(a.shift()),a}function sJ(t,e,n){var r;e===void 0&&(e=!1),n===void 0&&(n=[[0,0],[1,1]]);for(var i=!!e,a=[],o=0,s=t.length;o<s;o+=2)a.push([t[o],t[o+1]]);for(var c=oJ(a,.4,i,n),l=a.length,u=[],f,d,h,o=0;o<l-1;o+=1)f=c[o*2],d=c[o*2+1],h=a[o+1],u.push(["C",f[0],f[1],d[0],d[1],h[0],h[1]]);return i&&(f=c[l],d=c[l+1],r=R(a,1),h=r[0],u.push(["C",f[0],f[1],d[0],d[1],h[0],h[1]])),u}function cJ(t,e){var n,r=e.x,i=e.y,a=R(i.getOptions().range||[0,0],2),o=a[0],s=a[1];return s>o&&(n=R([o,s],2),s=n[0],o=n[1]),t.map(function(c){var l=c.map(function(u,f){return[r.map(f),Vn(i.map(u),s,o)]});return l})}function Zf(t,e){e===void 0&&(e=!1);var n=e?t.length-1:0,r=t.map(function(i,a){return yt([a===n?"M":"L"],R(i),!1)});return e?r.reverse():r}function g0(t,e){if(e===void 0&&(e=!1),t.length<=2)return Zf(t);for(var n=[],r=t.length,i=0;i<r;i+=1){var a=e?t[r-i-1]:t[i];Nw(a,n.slice(-2))||n.push.apply(n,yt([],R(a),!1))}var o=sJ(n,!1);return e?o.unshift(yt(["M"],R(t[r-1]),!1)):o.unshift(yt(["M"],R(t[0]),!1)),o}function Y1(t,e,n){var r=W1(t);return r.push(["L",e,n],["L",0,n],["Z"]),r}function lJ(t,e,n,r){return t.map(function(i){return Y1(e?g0(i):Zf(i),n,r)})}function uJ(t,e,n){for(var r=[],i=t.length-1;i>=0;i-=1){var a=t[i],o=Zf(a),s=void 0;if(i===0)s=Y1(o,e,n);else{var c=t[i-1],l=Zf(c,!0);l[0][0]="L",s=yt(yt(yt([],R(o),!1),R(l),!1),[["Z"]],!1)}r.push(s)}return r}function fJ(t,e,n){for(var r=[],i=t.length-1;i>=0;i-=1){var a=t[i],o=g0(a),s=void 0;if(i===0)s=Y1(o,e,n);else{var c=t[i-1],l=g0(c,!0),u=a[0];l[0][0]="L",s=yt(yt(yt([],R(o),!1),R(l),!1),[yt(["M"],R(u),!1),["Z"]],!1)}r.push(s)}return r}var dJ=function(t,e){if(mr(t)){for(var n,r=1/0,i=0;i<t.length;i++){var a=t[i],o=li(e)?e(a):a[e];o<r&&(n=a,r=o)}return n}},hJ=function(t,e){if(mr(t)){for(var n,r=-1/0,i=0;i<t.length;i++){var a=t[i],o=li(e)?e(a):a[e];o>r&&(n=a,r=o)}return n}};function kk(t){return t.length===0?[0,0]:[dh(dJ(t,function(e){return dh(e)||0})),hh(hJ(t,function(e){return hh(e)||0}))]}function Lk(t){for(var e=W1(t),n=e[0].length,r=R([Array(n).fill(0),Array(n).fill(0)],2),i=r[0],a=r[1],o=0;o<e.length;o+=1)for(var s=e[o],c=0;c<n;c+=1)s[c]>=0?(s[c]+=i[c],i[c]=s[c]):(s[c]+=a[c],a[c]=s[c]);return e}var pJ=function(t){Yt(e,t);function e(n){return t.call(this,n,{type:"line",width:200,height:20,isStack:!1,color:["#83daad","#edbf45","#d2cef9","#e290b3","#6f63f4"],smooth:!0,lineLineWidth:1,areaOpacity:0,isGroup:!1,columnLineWidth:1,columnStroke:"#fff",scale:1,spacing:0})||this}return Object.defineProperty(e.prototype,"rawData",{get:function(){var n=this.attributes.data;if(!n||(n==null?void 0:n.length)===0)return[[]];var r=W1(n);return er(r[0])?[r]:r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"data",{get:function(){return this.attributes.isStack?Lk(this.rawData):this.rawData},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scales",{get:function(){return this.createScales(this.data)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"baseline",{get:function(){var n=this.scales.y,r=R(n.getOptions().domain||[0,0],2),i=r[0],a=r[1];return a<0?n.map(a):n.map(i<0?0:i)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"containerShape",{get:function(){var n=this.attributes,r=n.width,i=n.height;return{width:r,height:i}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"linesStyle",{get:function(){var n=this,r=this.attributes,i=r.type,a=r.isStack,o=r.smooth;if(i!=="line")throw new Error("linesStyle can only be used in line type");var s=Pe(this.attributes,"area"),c=Pe(this.attributes,"line"),l=this.containerShape.width,u=this.data;if(u[0].length===0)return{lines:[],areas:[]};var f=this.scales,d=f.x,h=f.y,p=cJ(u,{type:"line",x:d,y:h}),v=[];if(s){var g=this.baseline;a?v=o?fJ(p,l,g):uJ(p,l,g):v=lJ(p,o,l,g)}return{lines:p.map(function(y,m){return nt({stroke:n.getColor(m),path:o?g0(y):Zf(y)},c)}),areas:v.map(function(y,m){return nt({path:y,fill:n.getColor(m)},s)})}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"columnsStyle",{get:function(){var n=this,r=Pe(this.attributes,"column"),i=this.attributes,a=i.isStack,o=i.type,s=i.scale;if(o!=="column")throw new Error("columnsStyle can only be used in column type");var c=this.containerShape.height,l=this.rawData;if(!l)return{columns:[]};a&&(l=Lk(l));var u=this.createScales(l),f=u.x,d=u.y,h=R(kk(l),2),p=h[0],v=h[1],g=new Kr({domain:[0,v-(p>0?0:p)],range:[0,c*s]}),y=f.getBandWidth(),m=this.rawData;return{columns:l.map(function(b,x){return b.map(function(_,O){var w=y/l.length,S=function(){return{x:f.map(O)+w*x,y:_>=0?d.map(_):d.map(0),width:w,height:g.map(Math.abs(_))}},M=function(){return{x:f.map(O),y:d.map(_),width:y,height:g.map(m[x][O])}};return nt(nt({fill:n.getColor(x)},r),a?M():S())})})}},enumerable:!1,configurable:!0}),e.prototype.render=function(n,r){TG(r,".container","rect").attr("className","container").node();var i=n.type,a="spark".concat(i),o=i==="line"?this.linesStyle:this.columnsStyle;ge(r).selectAll(".spark").data([i]).join(function(s){return s.append(function(c){return c==="line"?new aJ({className:a,style:o}):new iJ({className:a,style:o})}).attr("className","spark ".concat(a))},function(s){return s.update(o)},function(s){return s.remove()})},e.prototype.getColor=function(n){var r=this.attributes.color;return mr(r)?r[n%r.length]:li(r)?r.call(null,n):r},e.prototype.createScales=function(n){var r,i,a=this.attributes,o=a.type,s=a.scale,c=a.range,l=c===void 0?[]:c,u=a.spacing,f=this.containerShape,d=f.width,h=f.height,p=R(kk(n),2),v=p[0],g=p[1],y=new Kr({domain:[(r=l[0])!==null&&r!==void 0?r:v,(i=l[1])!==null&&i!==void 0?i:g],range:[h,h*(1-s)]});return o==="line"?{type:o,x:new Kr({domain:[0,n[0].length-1],range:[0,d]}),y}:{type:o,x:new us({domain:n[0].map(function(m,b){return b}),range:[0,d],paddingInner:u,paddingOuter:u/2,align:.5}),y}},e.tag="sparkline",e}(Nr),Nk=function(t){Yt(e,t);function e(n){var r=t.call(this,n,nt(nt(nt({animate:{duration:100,fill:"both"},brushable:!0,formatter:function(i){return i.toString()},handleSpacing:2,orientation:"horizontal",padding:0,autoFitLabel:!0,scrollable:!0,selectionFill:"#5B8FF9",selectionFillOpacity:.45,selectionZIndex:2,showHandle:!0,showLabel:!0,slidable:!0,trackFill:"#416180",trackLength:200,trackOpacity:.05,trackSize:20,trackZIndex:-1,values:[0,1],type:"range",selectionType:"select",handleIconOffset:0},ja(nM,"handle")),ja(tM,"handleIcon")),ja(eM,"handleLabel")))||this;return r.range=[0,1],r.onDragStart=function(i){return function(a){a.stopPropagation(),r.target=i,r.prevPos=r.getOrientVal(wp(a));var o=r.availableSpace,s=o.x,c=o.y,l=r.getBBox(),u=l.x,f=l.y;r.selectionStartPos=r.getRatio(r.prevPos-r.getOrientVal([s,c])-r.getOrientVal([+u,+f])),r.selectionWidth=0,document.addEventListener("pointermove",r.onDragging),document.addEventListener("pointerup",r.onDragEnd)}},r.onDragging=function(i){var a=r.attributes,o=a.slidable,s=a.brushable,c=a.type;i.stopPropagation();var l=r.getOrientVal(wp(i)),u=l-r.prevPos;if(u){var f=r.getRatio(u);switch(r.target){case"start":o&&r.setValuesOffset(f);break;case"end":o&&r.setValuesOffset(0,f);break;case"selection":o&&r.setValuesOffset(f,f);break;case"track":if(!s)return;r.selectionWidth+=f,c==="range"?r.innerSetValues([r.selectionStartPos,r.selectionStartPos+r.selectionWidth].sort(),!0):r.innerSetValues([0,r.selectionStartPos+r.selectionWidth],!0);break;default:break}r.prevPos=l}},r.onDragEnd=function(){document.removeEventListener("pointermove",r.onDragging),document.removeEventListener("pointermove",r.onDragging),document.removeEventListener("pointerup",r.onDragEnd),r.target="",r.updateHandlesPosition(!1)},r.onValueChange=function(i){var a=r.attributes,o=a.onChange,s=a.type,c=s==="range"?i:i[1],l=s==="range"?r.getValues():r.getValues()[1],u=new vn("valuechange",{detail:{oldValue:c,value:l}});r.dispatchEvent(u),o==null||o(l)},r.selectionStartPos=0,r.selectionWidth=0,r.prevPos=0,r.target="",r}return Object.defineProperty(e.prototype,"values",{get:function(){return this.attributes.values},set:function(n){this.attributes.values=this.clampValues(n)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sparklineStyle",{get:function(){var n=this.attributes.orientation;if(n!=="horizontal")return null;var r=Pe(this.attributes,"sparkline");return nt(nt({zIndex:0},this.availableSpace),r)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shape",{get:function(){var n=this.attributes,r=n.trackLength,i=n.trackSize,a=R(this.getOrientVal([[r,i],[i,r]]),2),o=a[0],s=a[1];return{width:o,height:s}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"availableSpace",{get:function(){var n=this.attributes.padding,r=R(Wr(n),4),i=r[0],a=r[1],o=r[2],s=r[3],c=this.shape,l=c.width,u=c.height;return{x:s,y:i,width:l-(s+a),height:u-(i+o)}},enumerable:!1,configurable:!0}),e.prototype.getValues=function(){return this.values},e.prototype.setValues=function(n,r){n===void 0&&(n=[0,0]),r===void 0&&(r=!1),this.attributes.values=n;var i=r===!1?!1:this.attributes.animate;this.updateSelectionArea(i),this.updateHandlesPosition(i)},e.prototype.updateSelectionArea=function(n){var r=this.calcSelectionArea();this.foregroundGroup.selectAll(Da.selection.class).each(function(i,a){xa(this,r[a],n)})},e.prototype.updateHandlesPosition=function(n){this.attributes.showHandle&&(this.startHandle&&xa(this.startHandle,this.getHandleStyle("start"),n),this.endHandle&&xa(this.endHandle,this.getHandleStyle("end"),n))},e.prototype.innerSetValues=function(n,r){n===void 0&&(n=[0,0]),r===void 0&&(r=!1);var i=this.values,a=this.clampValues(n);this.attributes.values=a,this.setValues(a),r&&this.onValueChange(i)},e.prototype.renderTrack=function(n){var r=Pe(this.attributes,"track");this.trackShape=ge(n).maybeAppendByClassName(Da.track,"rect").styles(nt(nt({},this.shape),r))},e.prototype.renderBrushArea=function(n){var r=this.attributes.brushable;this.brushArea=ge(n).maybeAppendByClassName(Da.brushArea,"rect").styles(nt({fill:"transparent",cursor:r?"crosshair":"default"},this.shape))},e.prototype.renderSparkline=function(n){var r=this,i=this.attributes.orientation,a=ge(n).maybeAppendByClassName(Da.sparklineGroup,"g");Si(i==="horizontal",a,function(o){var s=r.sparklineStyle;o.maybeAppendByClassName(Da.sparkline,function(){return new pJ({style:s})}).update(s)})},e.prototype.renderHandles=function(){var n=this,r,i=this.attributes,a=i.showHandle,o=i.type,s=o==="range"?["start","end"]:["end"],c=a?s:[],l=this;(r=this.foregroundGroup)===null||r===void 0||r.selectAll(Da.handle.class).data(c.map(function(u){return{type:u}}),function(u){return u.type}).join(function(u){return u.append(function(f){var d=f.type;return new rM({style:n.getHandleStyle(d)})}).each(function(f){var d=f.type;this.attr("class","".concat(Da.handle.name," ").concat(d,"-handle"));var h="".concat(d,"Handle");l[h]=this,this.addEventListener("pointerdown",l.onDragStart(d))})},function(u){return u.each(function(f){var d=f.type;this.update(l.getHandleStyle(d))})},function(u){return u.each(function(f){var d=f.type,h="".concat(d,"Handle");l[h]=void 0}).remove()})},e.prototype.renderSelection=function(n){var r=this.attributes,i=r.type,a=r.selectionType;this.foregroundGroup=ge(n).maybeAppendByClassName(Da.foreground,"g");var o=Pe(this.attributes,"selection"),s=function(l){return l.style("visibility",function(u){return u.show?"visible":"hidden"}).style("cursor",function(u){return a==="select"?"grab":a==="invert"?"crosshair":"default"}).styles(o)},c=this;this.foregroundGroup.selectAll(Da.selection.class).data(i==="value"?[]:this.calcSelectionArea().map(function(l,u){return{style:nt({},l),index:u,show:a==="select"?u===1:u!==1}}),function(l){return l.index}).join(function(l){return l.append("rect").attr("className",Da.selection.name).call(s).each(function(u,f){var d=this;f===1?(c.selectionShape=ge(this),this.on("pointerdown",function(h){d.attr("cursor","grabbing"),c.onDragStart("selection")(h)}),c.dispatchCustomEvent(this,"pointerenter","selectionMouseenter"),c.dispatchCustomEvent(this,"pointerleave","selectionMouseleave"),c.dispatchCustomEvent(this,"click","selectionClick"),this.addEventListener("pointerdown",function(){d.attr("cursor","grabbing")}),this.addEventListener("pointerup",function(){d.attr("cursor","pointer")}),this.addEventListener("pointerover",function(){d.attr("cursor","pointer")})):this.on("pointerdown",c.onDragStart("track"))})},function(l){return l.call(s)},function(l){return l.remove()}),this.updateSelectionArea(!1),this.renderHandles()},e.prototype.render=function(n,r){this.renderTrack(r),this.renderSparkline(r),this.renderBrushArea(r),this.renderSelection(r)},e.prototype.clampValues=function(n,r){var i;r===void 0&&(r=4);var a=R(this.range,2),o=a[0],s=a[1],c=R(this.getValues().map(function(g){return Op(g,r)}),2),l=c[0],u=c[1],f=Array.isArray(n)?n:[l,n!=null?n:u],d=R((f||[l,u]).map(function(g){return Op(g,r)}),2),h=d[0],p=d[1];if(this.attributes.type==="value")return[0,Vn(p,o,s)];h>p&&(i=R([p,h],2),h=i[0],p=i[1]);var v=p-h;return v>s-o?[o,s]:h<o?l===o&&u===p?[o,p]:[o,v+o]:p>s?u===s&&l===h?[h,s]:[s-v,s]:[h,p]},e.prototype.calcSelectionArea=function(n){var r=R(this.clampValues(n),2),i=r[0],a=r[1],o=this.availableSpace,s=o.x,c=o.y,l=o.width,u=o.height;return this.getOrientVal([[{y:c,height:u,x:s,width:i*l},{y:c,height:u,x:i*l+s,width:(a-i)*l},{y:c,height:u,x:a*l,width:(1-a)*l}],[{x:s,width:l,y:c,height:i*u},{x:s,width:l,y:i*u+c,height:(a-i)*u},{x:s,width:l,y:a*u,height:(1-a)*u}]])},e.prototype.calcHandlePosition=function(n){var r=this.attributes.handleIconOffset,i=this.availableSpace,a=i.x,o=i.y,s=i.width,c=i.height,l=R(this.clampValues(),2),u=l[0],f=l[1],d=n==="start"?-r:r,h=(n==="start"?u:f)*this.getOrientVal([s,c])+d;return{x:a+this.getOrientVal([h,s/2]),y:o+this.getOrientVal([c/2,h])}},e.prototype.inferTextStyle=function(n){var r=this.attributes.orientation;return r==="horizontal"?{}:n==="start"?{transform:"rotate(90)",textAlign:"start"}:n==="end"?{transform:"rotate(90)",textAlign:"end"}:{}},e.prototype.calcHandleText=function(n){var r,i=this.attributes,a=i.type,o=i.orientation,s=i.formatter,c=i.autoFitLabel,l=Pe(this.attributes,"handle"),u=Pe(l,"label"),f=l.spacing,d=this.getHandleSize(),h=this.clampValues(),p=n==="start"?h[0]:h[1],v=s(p),g=new Dy({style:nt(nt(nt({},u),this.inferTextStyle(n)),{text:v})}),y=g.getBBox(),m=y.width,b=y.height;if(g.destroy(),!c){if(a==="value")return{text:v,x:0,y:-b-f};var x=f+d+(o==="horizontal"?m/2:0);return r={text:v},r[o==="horizontal"?"x":"y"]=n==="start"?-x:x,r}var _=0,O=0,w=this.availableSpace,S=w.width,M=w.height,E=this.calcSelectionArea()[1],P=E.x,L=E.y,A=E.width,T=E.height,C=f+d;if(o==="horizontal"){var N=C+m/2;if(n==="start"){var B=P-C-m;_=B>0?-N:N}else{var j=S-P-A-C>m;_=j?N:-N}}else{var D=C,G=b+C;n==="start"?O=L-d>b?-G:D:O=M-(L+T)-d>b?G:-D}return{x:_,y:O,text:v}},e.prototype.getHandleLabelStyle=function(n){var r=Pe(this.attributes,"handleLabel");return nt(nt(nt({},r),this.calcHandleText(n)),this.inferTextStyle(n))},e.prototype.getHandleIconStyle=function(){var n=this.attributes.handleIconShape,r=Pe(this.attributes,"handleIcon"),i=this.getOrientVal(["ew-resize","ns-resize"]),a=this.getHandleSize();return nt({cursor:i,shape:n,size:a},r)},e.prototype.getHandleStyle=function(n){var r=this.attributes,i=r.showLabel,a=r.showLabelOnInteraction,o=r.orientation,s=this.calcHandlePosition(n),c=this.calcHandleText(n),l=i;return!i&&a&&(this.target?l=!0:l=!1),nt(nt(nt(nt({},ja(this.getHandleIconStyle(),"icon")),ja(nt(nt({},this.getHandleLabelStyle(n)),c),"label")),s),{orientation:o,showLabel:l,type:n,zIndex:3})},e.prototype.getHandleSize=function(){var n=this.attributes,r=n.handleIconSize,i=n.width,a=n.height;return r||Math.floor((this.getOrientVal([+a,+i])+4)/2.4)},e.prototype.getOrientVal=function(n){var r=R(n,2),i=r[0],a=r[1],o=this.attributes.orientation;return o==="horizontal"?i:a},e.prototype.setValuesOffset=function(n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1);var a=this.attributes.type,o=R(this.getValues(),2),s=o[0],c=o[1],l=a==="range"?n:0,u=[s+l,c+r].sort();i?this.setValues(u):this.innerSetValues(u,!0)},e.prototype.getRatio=function(n){var r=this.availableSpace,i=r.width,a=r.height;return n/this.getOrientVal([i,a])},e.prototype.dispatchCustomEvent=function(n,r,i){var a=this;n.on(r,function(o){o.stopPropagation(),a.dispatchEvent(new vn(i,{detail:o}))})},e.prototype.bindEvents=function(){this.addEventListener("wheel",this.onScroll);var n=this.brushArea;this.dispatchCustomEvent(n,"click","trackClick"),this.dispatchCustomEvent(n,"pointerenter","trackMouseenter"),this.dispatchCustomEvent(n,"pointerleave","trackMouseleave"),n.on("pointerdown",this.onDragStart("track"))},e.prototype.onScroll=function(n){var r=this.attributes.scrollable;if(r){var i=n.deltaX,a=n.deltaY,o=a||i,s=this.getRatio(o);this.setValuesOffset(s,s,!0)}},e.tag="slider",e}(Nr),vJ=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function gJ(t,e,n){const{x:r,y:i,width:a,height:o}=t;if(e==="left")return[r+a-n,i];if(e==="right")return[r,i];if(e==="bottom")return[r,i];if(e==="top")return[r,i+o-n]}const Kf=t=>{const{orientation:e,labelFormatter:n,size:r,style:i={},position:a}=t,o=vJ(t,["orientation","labelFormatter","size","style","position"]);return s=>{var c;const{scales:[l],value:u,theme:f,coordinate:d}=s,{bbox:h}=u,{width:p,height:v}=h,{slider:g={}}=f,y=((c=l.getFormatter)===null||c===void 0?void 0:c.call(l))||(S=>S+""),m=typeof n=="string"?Zo(n):n,b=e==="horizontal",x=kn(d)&&b,{trackSize:_=g.trackSize}=i,[O,w]=gJ(h,a,_);return new Nk({className:"slider",style:Object.assign({},g,Object.assign(Object.assign({x:O,y:w,trackLength:b?p:v,orientation:e,formatter:S=>{const M=m||y,E=x?1-S:S,P=Ll(l,E,!0);return M(P)},sparklineData:mJ(t,s)},i),o))})}};function yJ(t,e){const[n]=Array.from(t.entries()).filter(([i])=>i.type==="line"||i.type==="area").map(([i])=>{const{encode:a,slider:o}=i;if(o!=null&&o.x&&Object.keys(o.x).length===0){const s=c=>{const l=a[c];return[c,l?l.value:void 0]};return Object.fromEntries(e.map(s))}});if(!(n!=null&&n.series))return n==null?void 0:n.y;const r=n.series.reduce((i,a,o)=>(i[a]=i[a]||[],i[a].push(n.y[o]),i),{});return Object.values(r)}function mJ(t,e){const{markState:n}=e;return mr(t.sparklineData)?t.sparklineData:yJ(n,["y","series"])}Kf.props={defaultPosition:"bottom",defaultSize:24,defaultOrder:1,defaultCrossPadding:[12,12],defaultPadding:[12,12]};const Ik=t=>Kf(Object.assign(Object.assign({},t),{orientation:"horizontal"}));Ik.props=Object.assign(Object.assign({},Kf.props),{defaultPosition:"bottom"});const jk=t=>Kf(Object.assign(Object.assign({},t),{orientation:"vertical"}));jk.props=Object.assign(Object.assign({},Kf.props),{defaultPosition:"left"});var bJ=function(t){Yt(e,t);function e(n){var r=t.call(this,n,{isRound:!0,orientation:"vertical",padding:[2,2,2,2],scrollable:!0,slidable:!0,thumbCursor:"default",trackSize:10,value:0})||this;return r.range=[0,1],r.onValueChange=function(i){var a=r.attributes.value;if(i!==a){var o={detail:{oldValue:i,value:a}};r.dispatchEvent(new vn("scroll",o)),r.dispatchEvent(new vn("valuechange",o))}},r.onTrackClick=function(i){var a=r.attributes.slidable;if(a){var o=R(r.getLocalPosition(),2),s=o[0],c=o[1],l=R(r.padding,4),u=l[0],f=l[3],d=r.getOrientVal([s+f,c+u]),h=r.getOrientVal(wp(i)),p=(h-d)/r.trackLength;r.setValue(p,!0)}},r.onThumbMouseenter=function(i){r.dispatchEvent(new vn("thumbMouseenter",{detail:i.detail}))},r.onTrackMouseenter=function(i){r.dispatchEvent(new vn("trackMouseenter",{detail:i.detail}))},r.onThumbMouseleave=function(i){r.dispatchEvent(new vn("thumbMouseleave",{detail:i.detail}))},r.onTrackMouseleave=function(i){r.dispatchEvent(new vn("trackMouseleave",{detail:i.detail}))},r}return Object.defineProperty(e.prototype,"padding",{get:function(){var n=this.attributes.padding;return Wr(n)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){var n=this.attributes.value,r=R(this.range,2),i=r[0],a=r[1];return Vn(n,i,a)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"trackLength",{get:function(){var n=this.attributes,r=n.viewportLength,i=n.trackLength,a=i===void 0?r:i;return a},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"availableSpace",{get:function(){var n=this.attributes.trackSize,r=this.trackLength,i=R(this.padding,4),a=i[0],o=i[1],s=i[2],c=i[3],l=R(this.getOrientVal([[r,n],[n,r]]),2),u=l[0],f=l[1];return{x:c,y:a,width:+u-(c+o),height:+f-(a+s)}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"trackRadius",{get:function(){var n=this.attributes,r=n.isRound,i=n.trackSize;return r?i/2:0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"thumbRadius",{get:function(){var n=this.attributes,r=n.isRound,i=n.thumbRadius;if(!r)return 0;var a=this.availableSpace,o=a.width,s=a.height;return i||this.getOrientVal([s,o])/2},enumerable:!1,configurable:!0}),e.prototype.getValues=function(n){n===void 0&&(n=this.value);var r=this.attributes,i=r.viewportLength,a=r.contentLength,o=i/a,s=R(this.range,2),c=s[0],l=s[1],u=n*(l-c-o);return[u,u+o]},e.prototype.getValue=function(){return this.value},e.prototype.renderSlider=function(n){var r=this.attributes,i=r.orientation,a=r.trackSize,o=r.padding,s=r.slidable,c=Pe(this.attributes,"track"),l=Pe(this.attributes,"thumb"),u=nt(nt({brushable:!1,orientation:i,padding:o,selectionRadius:this.thumbRadius,showHandle:!1,slidable:s,trackLength:this.trackLength,trackRadius:this.trackRadius,trackSize:a,values:this.getValues()},ja(c,"track")),ja(l,"selection"));this.slider=ge(n).maybeAppendByClassName("scrollbar",function(){return new Nk({style:u})}).update(u).node()},e.prototype.render=function(n,r){this.renderSlider(r)},e.prototype.setValue=function(n,r){r===void 0&&(r=!1);var i=this.attributes.value,a=R(this.range,2),o=a[0],s=a[1];this.slider.setValues(this.getValues(Vn(n,o,s)),r),this.onValueChange(i)},e.prototype.bindEvents=function(){var n=this;this.slider.addEventListener("trackClick",function(r){r.stopPropagation(),n.onTrackClick(r.detail)}),this.onHover()},e.prototype.getOrientVal=function(n){var r=this.attributes.orientation;return r==="horizontal"?n[0]:n[1]},e.prototype.onHover=function(){this.slider.addEventListener("selectionMouseenter",this.onThumbMouseenter),this.slider.addEventListener("trackMouseenter",this.onTrackMouseenter),this.slider.addEventListener("selectionMouseleave",this.onThumbMouseleave),this.slider.addEventListener("trackMouseleave",this.onTrackMouseleave)},e.tag="scrollbar",e}(Nr),xJ=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const Qf=t=>{const{orientation:e,labelFormatter:n,style:r}=t,i=xJ(t,["orientation","labelFormatter","style"]);return({scales:[a],value:o,theme:s})=>{const{bbox:c}=o,{x:l,y:u,width:f,height:d}=c,{scrollbar:h={}}=s,{ratio:p,range:v}=a.getOptions(),g=e==="horizontal"?f:d,y=g/p,[m,b]=v,x=b>m?0:1;return new bJ({className:"g2-scrollbar",style:Object.assign({},h,Object.assign(Object.assign(Object.assign(Object.assign({},r),{x:l,y:u,trackLength:g,value:x}),i),{orientation:e,contentLength:y,viewportLength:g}))})}};Qf.props={defaultPosition:"bottom",defaultSize:24,defaultOrder:1,defaultCrossPadding:[12,12],defaultPadding:[12,12]};const Rk=t=>Qf(Object.assign(Object.assign({},t),{orientation:"horizontal"}));Rk.props=Object.assign(Object.assign({},Qf.props),{defaultPosition:"bottom"});const Dk=t=>Qf(Object.assign(Object.assign({},t),{orientation:"vertical"}));Dk.props=Object.assign(Object.assign({},Qf.props),{defaultPosition:"left"});const H1=(t,e)=>{const{coordinate:r}=e;return(i,a,o)=>{const[s]=i,{transform:c="",fillOpacity:l=1,strokeOpacity:u=1,opacity:f=1}=s.style,[d,h]=kn(r)?["left bottom",`scale(1, ${1e-4})`]:["left top",`scale(${1e-4}, 1)`],p=[{transform:`${c} ${h}`.trimStart(),transformOrigin:d,fillOpacity:0,strokeOpacity:0,opacity:0},{transform:`${c} ${h}`.trimStart(),transformOrigin:d,fillOpacity:l,strokeOpacity:u,opacity:f,offset:.01},{transform:`${c} scale(1, 1)`.trimStart(),transformOrigin:d,fillOpacity:l,strokeOpacity:u,opacity:f}];return s.animate(p,Object.assign(Object.assign({},o),t))}},_J=(t,e)=>{const{coordinate:r}=e;return(i,a,o)=>{const[s]=i,{transform:c="",fillOpacity:l=1,strokeOpacity:u=1,opacity:f=1}=s.style,[d,h]=kn(r)?["left bottom",`scale(1, ${1e-4})`]:["left top",`scale(${1e-4}, 1)`],p=[{transform:`${c} scale(1, 1)`.trimStart(),transformOrigin:d},{transform:`${c} ${h}`.trimStart(),transformOrigin:d,fillOpacity:l,strokeOpacity:u,opacity:f,offset:.99},{transform:`${c} ${h}`.trimStart(),transformOrigin:d,fillOpacity:0,strokeOpacity:0,opacity:0}];return s.animate(p,Object.assign(Object.assign({},o),t))}},Bk=(t,e)=>{const{coordinate:r}=e;return jO.registerProperty({name:"scaleInYRadius",inherits:!1,initialValue:"",interpolable:!0,syntax:kt.NUMBER}),(i,a,o)=>{const[s]=i,c=u=>{const{__data__:f,style:d}=u,{radius:h=0,inset:p=0,fillOpacity:v=1,strokeOpacity:g=1,opacity:y=1}=d,{points:m,y:b,y1:x}=f,_=sc(r,m,[b,x]),{innerRadius:O,outerRadius:w}=_,S=Np().cornerRadius(h).padAngle(p*Math.PI/180),M=new Zr({}),E=r.getCenter(),P=T=>{M.attr({d:S(T),transform:`translate(${E[0]}, ${E[1]})`});const C=Ug(M);return M.style.transform="",C},L=[{scaleInYRadius:O+1e-4,fillOpacity:0,strokeOpacity:0,opacity:0},{scaleInYRadius:O+1e-4,fillOpacity:v,strokeOpacity:g,opacity:y,offset:.01},{scaleInYRadius:w,fillOpacity:v,strokeOpacity:g,opacity:y}],A=u.animate(L,Object.assign(Object.assign({},o),t));return A.onframe=function(){u.style.path=P(Object.assign(Object.assign({},_),{outerRadius:Number(u.style.scaleInYRadius)}))},A.onfinish=function(){u.style.path=P(Object.assign(Object.assign({},_),{outerRadius:w}))},A},l=u=>{const{style:f}=u,{transform:d="",fillOpacity:h=1,strokeOpacity:p=1,opacity:v=1}=f,[g,y]=kn(r)?["left top",`scale(${1e-4}, 1)`]:["left bottom",`scale(1, ${1e-4})`],m=[{transform:`${d} ${y}`.trimStart(),transformOrigin:g,fillOpacity:0,strokeOpacity:0,opacity:0},{transform:`${d} ${y}`.trimStart(),transformOrigin:g,fillOpacity:h,strokeOpacity:p,opacity:v,offset:.01},{transform:`${d} scale(1, 1)`.trimStart(),transformOrigin:g,fillOpacity:h,strokeOpacity:p,opacity:v}];return u.animate(m,Object.assign(Object.assign({},o),t))};return xn(r)?c(s):l(s)}},OJ=(t,e)=>{const{coordinate:r}=e;return(i,a,o)=>{const[s]=i,{transform:c="",fillOpacity:l=1,strokeOpacity:u=1,opacity:f=1}=s.style,[d,h]=kn(r)?["left top",`scale(${1e-4}, 1)`]:["left bottom",`scale(1, ${1e-4})`],p=[{transform:`${c} scale(1, 1)`.trimStart(),transformOrigin:d},{transform:`${c} ${h}`.trimStart(),transformOrigin:d,fillOpacity:l,strokeOpacity:u,opacity:f,offset:.99},{transform:`${c} ${h}`.trimStart(),transformOrigin:d,fillOpacity:0,strokeOpacity:0,opacity:0}];return s.animate(p,Object.assign(Object.assign({},o),t))}},Fk=(t,e)=>{jO.registerProperty({name:"waveInArcAngle",inherits:!1,initialValue:"",interpolable:!0,syntax:kt.NUMBER});const{coordinate:r}=e;return(i,a,o)=>{const[s]=i;if(!xn(r))return H1(t,e)(i,a,o);const c=r.getCenter(),{__data__:l,style:u}=s,{radius:f=0,inset:d=0,fillOpacity:h=1,strokeOpacity:p=1,opacity:v=1}=u,{points:g,y,y1:m}=l,b=Np().cornerRadius(f).padAngle(d*Math.PI/180),x=sc(r,g,[y,m]),{startAngle:_,endAngle:O}=x,w=new Zr({}),S=P=>{w.attr({d:b(P),transform:`translate(${c[0]}, ${c[1]})`});const L=Ug(w);return w.style.transform="",L},M=[{waveInArcAngle:_+1e-4,fillOpacity:0,strokeOpacity:0,opacity:0},{waveInArcAngle:_+1e-4,fillOpacity:h,strokeOpacity:p,opacity:v,offset:.01},{waveInArcAngle:O,fillOpacity:h,strokeOpacity:p,opacity:v}],E=s.animate(M,Object.assign(Object.assign({},o),t));return E.onframe=function(){s.style.path=S(Object.assign(Object.assign({},x),{endAngle:Number(s.style.waveInArcAngle)}))},E.onfinish=function(){s.style.path=S(Object.assign(Object.assign({},x),{endAngle:O}))},E}};Fk.props={};const zk=t=>(e,n,r)=>{const[i]=e,{fillOpacity:a=1,strokeOpacity:o=1,opacity:s=1}=i.style,c=[{fillOpacity:0,strokeOpacity:0,opacity:0},{fillOpacity:a,strokeOpacity:o,opacity:s}];return i.animate(c,Object.assign(Object.assign({},r),t))};zk.props={};const Gk=t=>(e,n,r)=>{const[i]=e,{fillOpacity:a=1,strokeOpacity:o=1,opacity:s=1}=i.style,c=[{fillOpacity:a,strokeOpacity:o,opacity:s},{fillOpacity:0,strokeOpacity:0,opacity:0}];return i.animate(c,Object.assign(Object.assign({},r),t))};Gk.props={};const wJ=t=>(n,r,i)=>{const[a]=n,{transform:o="",fillOpacity:s=1,strokeOpacity:c=1,opacity:l=1}=a.style,u="center center",f=[{transform:`${o} scale(${1e-4})`.trimStart(),transformOrigin:u,fillOpacity:0,strokeOpacity:0,opacity:0},{transform:`${o} scale(${1e-4})`.trimStart(),transformOrigin:u,fillOpacity:s,strokeOpacity:c,opacity:l,offset:.01},{transform:`${o} scale(1)`.trimStart(),transformOrigin:u,fillOpacity:s,strokeOpacity:c,opacity:l}];return a.animate(f,Object.assign(Object.assign({},i),t))},SJ=t=>(n,r,i)=>{const[a]=n,{transform:o="",fillOpacity:s=1,strokeOpacity:c=1,opacity:l=1}=a.style,u="center center",f=[{transform:`${o} scale(1)`.trimStart(),transformOrigin:u},{transform:`${o} scale(${1e-4})`.trimStart(),transformOrigin:u,fillOpacity:s,strokeOpacity:c,opacity:l,offset:.99},{transform:`${o} scale(${1e-4})`.trimStart(),transformOrigin:u,fillOpacity:0,strokeOpacity:0,opacity:0}];return a.animate(f,Object.assign(Object.assign({},i),t))},Wk=t=>(e,n,r)=>{var i,a;const[o]=e,s=((a=(i=o).getTotalLength)===null||a===void 0?void 0:a.call(i))||0,c=[{lineDash:[0,s]},{lineDash:[s,0]}];return o.animate(c,Object.assign(Object.assign({},r),t))};Wk.props={};function Vl(t,e){const n={};for(const r of e){const i=t.style[r];i&&(n[r]=i)}return n}const Ul=["fill","stroke","fillOpacity","strokeOpacity","opacity","lineWidth"];function $1(t){const{min:e,max:n}=t.getLocalBounds(),[r,i]=e,[a,o]=n,s=o-i,c=a-r;return[r,i,c,s]}function MJ(t){const[e,n,r,i]=t;return`
M ${e} ${n}
L ${e+r} ${n}
L ${e+r} ${n+i}
L ${e} ${n+i}
Z
`}function EJ(t,e){const[n,r,i,a]=$1(t),o=a/i,s=Math.ceil(Math.sqrt(e/o)),c=Math.ceil(e/s),l=[],u=a/c;let f=0,d=e;for(;d>0;){const h=Math.min(d,s),p=i/h;for(let v=0;v<h;v++){const g=n+v*p,y=r+f*u;l.push(MJ([g,y,p,u]))}d-=h,f+=1}return l}function PJ(t="pack"){return typeof t=="function"?t:EJ}function AJ(t,e,n){const[r,i,a,o]=$1(t),{transform:s}=t.style,{transform:c}=e.style;Yk(e,t);const[l,u,f,d]=$1(e),h=r-l,p=i-u,v=a/f,g=o/d,y=[Object.assign({transform:`${s?s+" ":""}translate(${h}, ${p}) scale(${v}, ${g})`},Vl(t,Ul)),Object.assign({transform:`${c?c+" ":""}translate(0, 0) scale(1, 1)`},Vl(e,Ul))];return e.animate(y,n)}function Yk(t,e){t.__data__=e.__data__,t.className=e.className,t.markType=e.markType,e.parentNode.replaceChild(t,e)}function TJ(t,e){const{nodeName:n}=t;if(n==="path")return t;const r=new Zr({style:Object.assign(Object.assign({},Vl(t,Ul)),{d:e})});return Yk(r,t),r}function Hk(t,e){const n=t.indexOf(e),r=t.lastIndexOf(e);return n===r}function CJ(t){return!Hk(t,"m")||!Hk(t,"M")}function $k(t){const e=Ug(t);if(e&&!CJ(e))return e}function V1(t,e,n,r){const{nodeName:i}=e,{nodeName:a}=n,o=$k(e),s=$k(n);if(i===a&&i!=="path"||(o===void 0||s===void 0))return AJ(e,n,r);const u=TJ(t,o),f=[Object.assign({path:o},Vl(e,Ul)),Object.assign({path:s},Vl(n,Ul))],d=u.animate(f,r);return d.onfinish=()=>{u.style.transform="none",Cy(u,n)},u.style.transform="none",d}function kJ(t,e,n,r){t.style.visibility="hidden";const i=r(t,e.length);return e.map((a,o)=>{const s=new Zr({style:Object.assign({path:i[o]},Vl(t,Ul))});return V1(a,s,a,n)})}function LJ(t,e,n,r){const i=r(e,t.length),{fillOpacity:a=1,strokeOpacity:o=1,opacity:s=1}=e.style,c=[{fillOpacity:0,strokeOpacity:0,opacity:0},{fillOpacity:0,strokeOpacity:0,opacity:0,offset:.99},{fillOpacity:a,strokeOpacity:o,opacity:s}],l=e.animate(c,n);return[...t.map((f,d)=>{const h=new Zr({style:{path:i[d],fill:e.style.fill}});return V1(f,f,h,n)}),l]}const Vk=t=>(e,n,r)=>{const i=PJ(t.split),a=Object.assign(Object.assign({},r),t),{length:o}=e,{length:s}=n;if(o===1&&s===1||o>1&&s>1){const[c]=e,[l]=n;return V1(c,c,l,a)}if(o===1&&s>1){const[c]=e;return kJ(c,n,a,i)}if(o>1&&s===1){const[c]=n;return LJ(e,c,a,i)}return null};Vk.props={};const Uk=(t,e)=>(n,r,i)=>{const[a]=n,{height:o,width:s}=a.getBoundingClientRect(),c=new Zr({style:{path:`M0,0L${s},0L${s},${o}L0,${o}Z`}});return a.appendChild(c),a.style.clipPath=c,H1(t,e)([c],r,i)};Uk.props={};const Xk=(t,e)=>(n,r,i)=>{const[a]=n,{height:o,width:s}=a.getBoundingClientRect(),c=new Zr({style:{path:`M0,0L${s},0L${s},${o}L0,${o}Z`}});return a.appendChild(c),a.style.clipPath=c,Bk(t,e)([c],r,i)};Xk.props={};var NJ=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function IJ(t,{elements:e,datum:n,groupKey:r=f=>f,link:i=!1,background:a=!1,delay:o=60,scale:s,coordinate:c,emitter:l,state:u={}}){var f;const d=e(t),h=new Set(d),p=Bn(d,r),v=Nf(d,n),[g,y]=qM(Object.assign({elements:d,valueof:v,link:i,coordinate:c},At(u.active,"link"))),[m,b,x]=KM(Object.assign({document:t.ownerDocument,scale:s,coordinate:c,background:a,valueof:v},At(u.active,"background"))),_=dt(u,{active:Object.assign({},((f=u.active)===null||f===void 0?void 0:f.offset)&&{transform:(...B)=>{const j=u.active.offset(...B),[,D]=B;return ZM(d[D],j,c)}})}),{setState:O,removeState:w,hasState:S}=_o(_,v);let M;const E=B=>{const{target:j,nativeEvent:D=!0}=B;if(!h.has(j))return;M&&clearTimeout(M);const G=r(j),Y=p.get(G),U=new Set(Y);for(const V of d)U.has(V)?S(V,"active")||O(V,"active"):(O(V,"inactive"),y(V)),V!==j&&b(V);m(j),g(Y),D&&l.emit("element:highlight",{nativeEvent:D,data:{data:n(j),group:Y.map(n)}})},P=()=>{M&&clearTimeout(M),M=setTimeout(()=>{L(),M=null},o)},L=(B=!0)=>{for(const j of d)w(j,"active","inactive"),b(j),y(j);B&&l.emit("element:unhighlight",{nativeEvent:B})},A=B=>{const{target:j}=B;a&&!x(j)||!a&&!h.has(j)||(o>0?P():L())},T=()=>{L()};t.addEventListener("pointerover",E),t.addEventListener("pointerout",A),t.addEventListener("pointerleave",T);const C=B=>{const{nativeEvent:j}=B;j||L(!1)},N=B=>{const{nativeEvent:j}=B;if(j)return;const{data:D}=B.data,G=Tm(d,D,n);G&&E({target:G,nativeEvent:!1})};return l.on("element:highlight",N),l.on("element:unhighlight",C),()=>{t.removeEventListener("pointerover",E),t.removeEventListener("pointerout",A),t.removeEventListener("pointerleave",T),l.off("element:highlight",N),l.off("element:unhighlight",C);for(const B of d)b(B),y(B)}}function y0(t){var{delay:e,createGroup:n,background:r=!1,link:i=!1}=t,a=NJ(t,["delay","createGroup","background","link"]);return(o,s,c)=>{const{container:l,view:u,options:f}=o,{scale:d,coordinate:h}=u,p=za(l);return IJ(p,Object.assign({elements:is,datum:uc(u),groupKey:n?n(u):void 0,coordinate:h,scale:d,state:Il(f,[["active",r?{}:{lineWidth:"1",stroke:"#000"}],"inactive"]),background:r,link:i,delay:e,emitter:c},a))}}y0.props={reapplyWhenUpdate:!0};function qk(t){return y0(Object.assign(Object.assign({},t),{createGroup:Am}))}qk.props={reapplyWhenUpdate:!0};function Zk(t){return y0(Object.assign(Object.assign({},t),{createGroup:XM}))}Zk.props={reapplyWhenUpdate:!0};var jJ=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function RJ(t,{elements:e,datum:n,groupKey:r=f=>f,link:i=!1,single:a=!1,coordinate:o,background:s=!1,scale:c,emitter:l,state:u={}}){var f;const d=e(t),h=new Set(d),p=Bn(d,r),v=Nf(d,n),[g,y]=qM(Object.assign({link:i,elements:d,valueof:v,coordinate:o},At(u.selected,"link"))),[m,b]=KM(Object.assign({document:t.ownerDocument,background:s,coordinate:o,scale:c,valueof:v},At(u.selected,"background"))),x=dt(u,{selected:Object.assign({},((f=u.selected)===null||f===void 0?void 0:f.offset)&&{transform:(...T)=>{const C=u.selected.offset(...T),[,N]=T;return ZM(d[N],C,o)}})}),{setState:_,removeState:O,hasState:w}=_o(x,v),S=(T=!0)=>{for(const C of d)O(C,"selected","unselected"),y(C),b(C);T&&l.emit("element:unselect",{nativeEvent:!0})},M=(T,C,N=!0)=>{if(w(C,"selected"))S();else{const B=r(C),j=p.get(B),D=new Set(j);for(const G of d)D.has(G)?_(G,"selected"):(_(G,"unselected"),y(G)),G!==C&&b(G);if(g(j),m(C),!N)return;l.emit("element:select",Object.assign(Object.assign({},T),{nativeEvent:N,data:{data:[n(C),...j.map(n)]}}))}},E=(T,C,N=!0)=>{const B=r(C),j=p.get(B),D=new Set(j);if(w(C,"selected")){if(!d.some(Y=>!D.has(Y)&&w(Y,"selected")))return S();for(const Y of j)_(Y,"unselected"),y(Y),b(Y)}else{const G=j.some(Y=>w(Y,"selected"));for(const Y of d)D.has(Y)?_(Y,"selected"):w(Y,"selected")||_(Y,"unselected");!G&&i&&g(j),m(C)}N&&l.emit("element:select",Object.assign(Object.assign({},T),{nativeEvent:N,data:{data:d.filter(G=>w(G,"selected")).map(n)}}))},P=T=>{const{target:C,nativeEvent:N=!0}=T;return h.has(C)?a?M(T,C,N):E(T,C,N):S()};t.addEventListener("click",P);const L=T=>{const{nativeEvent:C,data:N}=T;if(C)return;const B=a?N.data.slice(0,1):N.data;for(const j of B){const D=Tm(d,j,n);P({target:D,nativeEvent:!1})}},A=()=>{S(!1)};return l.on("element:select",L),l.on("element:unselect",A),()=>{for(const T of d)y(T);t.removeEventListener("click",P),l.off("element:select",L),l.off("element:unselect",A)}}function m0(t){var{createGroup:e,background:n=!1,link:r=!1}=t,i=jJ(t,["createGroup","background","link"]);return(a,o,s)=>{const{container:c,view:l,options:u}=a,{coordinate:f,scale:d}=l,h=za(c);return RJ(h,Object.assign({elements:is,datum:uc(l),groupKey:e?e(l):void 0,coordinate:f,scale:d,state:Il(u,[["selected",n?{}:{lineWidth:"1",stroke:"#000"}],"unselected"]),background:n,link:r,emitter:s},i))}}m0.props={reapplyWhenUpdate:!0};function Kk(t){return m0(Object.assign(Object.assign({},t),{createGroup:Am}))}Kk.props={reapplyWhenUpdate:!0};function Qk(t){return m0(Object.assign(Object.assign({},t),{createGroup:XM}))}Qk.props={reapplyWhenUpdate:!0};var bc=function(t,e,n){var r,i,a,o,s=0;n||(n={});var c=function(){s=n.leading===!1?0:Date.now(),r=null,o=t.apply(i,a),r||(i=a=null)},l=function(){var u=Date.now();!s&&n.leading===!1&&(s=u);var f=e-(u-s);return i=this,a=arguments,f<=0||f>e?(r&&(clearTimeout(r),r=null),s=u,o=t.apply(i,a),r||(i=a=null)):!r&&n.trailing!==!1&&(r=setTimeout(c,f)),o};return l.cancel=function(){clearTimeout(r),s=0,r=i=a=null},l};function DJ(t){const{coordinate:e={}}=t,{transform:n=[]}=e,r=n.find(a=>a.type==="fisheye");if(r)return r;const i={type:"fisheye"};return n.push(i),e.transform=n,t.coordinate=e,i}function BJ({wait:t=30,leading:e,trailing:n=!1}){return r=>{const{options:i,update:a,setState:o,container:s}=r,c=za(s),l=bc(u=>{const f=Em(c,u);if(!f){o("fisheye"),a();return}o("fisheye",d=>{const h=dt({},d,{interaction:{tooltip:{preserve:!0}}});for(const y of h.marks)y.animate=!1;const[p,v]=f,g=DJ(h);return g.focusX=p,g.focusY=v,g.visual=!0,h}),a()},t,{leading:e,trailing:n});return c.addEventListener("pointerenter",l),c.addEventListener("pointermove",l),c.addEventListener("pointerleave",l),()=>{c.removeEventListener("pointerenter",l),c.removeEventListener("pointermove",l),c.removeEventListener("pointerleave",l)}}}var FJ=function(t,e,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{l(r.next(u))}catch(f){o(f)}}function c(u){try{l(r.throw(u))}catch(f){o(f)}}function l(u){u.done?a(u.value):i(u.value).then(s,c)}l((r=r.apply(t,e||[])).next())})},zJ=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function GJ(t){const{transform:e=[]}=t,n=e.find(i=>i.type==="normalizeY");if(n)return n;const r={type:"normalizeY"};return e.push(r),t.transform=e,r}function WJ(t,e,n){const[r]=Array.from(t.entries()).filter(([i])=>i.type===e).map(([i])=>{const{encode:a}=i,o=s=>{const c=a[s];return[s,c?c.value:void 0]};return Object.fromEntries(n.map(o))});return r}function Jk(t){var{wait:e=20,leading:n,trailing:r=!1,labelFormatter:i=o=>`${o}`}=t,a=zJ(t,["wait","leading","trailing","labelFormatter"]);return o=>{const{view:s,container:c,update:l,setState:u}=o,{markState:f,scale:d,coordinate:h}=s,p=WJ(f,"line",["x","y","series"]);if(!p)return;const{y:v,x:g,series:y=[]}=p,m=v.map((B,j)=>j),b=xo(m.map(B=>g[B])),x=za(c),_=c.getElementsByClassName(fo),O=c.getElementsByClassName(Oy),S=Bn(O,B=>B.__data__.key.split("-")[0]),M=new tf({style:Object.assign({x1:0,y1:0,x2:0,y2:x.getAttribute("height"),stroke:"black",lineWidth:1},At(a,"rule"))}),E=new Di({style:Object.assign({x:0,y:x.getAttribute("height"),text:"",fontSize:10},At(a,"label"))});M.append(E),x.appendChild(M);const P=(B,j,D)=>{const[G]=B.invert(D),Y=j.invert(G);return b[Y$(b,Y)]},L=(B,j)=>{M.setAttribute("x1",B[0]),M.setAttribute("x2",B[0]),E.setAttribute("text",i(j))};let A;const T=B=>FJ(this,void 0,void 0,function*(){const{x:j}=d,D=P(h,j,B);L(B,D),u("chartIndex",Y=>{const U=dt({},Y),V=U.marks.find(ut=>ut.type==="line"),pt=sn(Ey(m,ut=>sn(ut,Lt=>+v[Lt])/Bi(ut,Lt=>+v[Lt]),ut=>y[ut]).values()),Ot=[1/pt,pt];dt(V,{scale:{y:{domain:Ot}}});const ht=GJ(V);ht.groupBy="color",ht.basis=(ut,Lt)=>{const wt=ut[kl(Gt=>g[+Gt]).center(ut,D)];return Lt[wt]};for(const ut of U.marks)ut.animate=!1;return U}),A=(yield l("chartIndex")).view}),C=B=>{const{scale:j,coordinate:D}=A,{x:G,y:Y}=j,U=P(D,G,B);L(B,U);for(const V of _){const{seriesIndex:it,key:pt}=V.__data__,Ot=it[kl(te=>g[+te]).center(it,U)],ht=[0,Y.map(1)],ut=[0,Y.map(v[Ot]/v[it[0]])],[,Lt]=D.map(ht),[,wt]=D.map(ut),Gt=Lt-wt;V.setAttribute("transform",`translate(0, ${Gt})`);const Ut=S.get(pt)||[];for(const te of Ut)te.setAttribute("dy",Gt)}},N=bc(B=>{const j=Em(x,B);j&&C(j)},e,{leading:n,trailing:r});return T([0,0]),x.addEventListener("pointerenter",N),x.addEventListener("pointermove",N),x.addEventListener("pointerleave",N),()=>{M.remove(),x.removeEventListener("pointerenter",N),x.removeEventListener("pointermove",N),x.removeEventListener("pointerleave",N)}}}Jk.props={reapplyWhenUpdate:!0};function Jf(t,e){let n=0,r=0;if(e===void 0)for(let i of t)i!=null&&(i=+i)>=i&&(++n,r+=i);else{let i=-1;for(let a of t)(a=e(a,++i,t))!=null&&(a=+a)>=a&&(++n,r+=a)}if(n)return r/n}function b0(t,e){let n,r=-1,i=-1;if(e===void 0)for(const a of t)++i,a!=null&&(n>a||n===void 0&&a>=a)&&(n=a,r=i);else for(let a of t)(a=e(a,++i,t))!=null&&(n>a||n===void 0&&a>=a)&&(n=a,r=i);return r}function t3(t){var e=document.createElement("div");e.innerHTML=t;var n=e.childNodes[0];return n&&e.contains(n)&&e.removeChild(n),n}function YJ(t,e){return!t||!e?t:t.replace(/\\?\{([^{}]+)\}/g,function(n,r){return n.charAt(0)==="\\"?n.slice(1):e[r]===void 0?"":e[r]})}var HJ=YJ;function U1(t){return t===void 0&&(t=""),{CONTAINER:"".concat(t,"tooltip"),TITLE:"".concat(t,"tooltip-title"),LIST:"".concat(t,"tooltip-list"),LIST_ITEM:"".concat(t,"tooltip-list-item"),NAME:"".concat(t,"tooltip-list-item-name"),MARKER:"".concat(t,"tooltip-list-item-marker"),NAME_LABEL:"".concat(t,"tooltip-list-item-name-label"),VALUE:"".concat(t,"tooltip-list-item-value"),CROSSHAIR_X:"".concat(t,"tooltip-crosshair-x"),CROSSHAIR_Y:"".concat(t,"tooltip-crosshair-y")}}var e3={overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"};function $J(t){var e;t===void 0&&(t="");var n=U1(t);return e={},e[".".concat(n.CONTAINER)]={position:"absolute",visibility:"visible","z-index":8,transition:"visibility 0.2s cubic-bezier(0.23, 1, 0.32, 1), left 0.4s cubic-bezier(0.23, 1, 0.32, 1), top 0.4s cubic-bezier(0.23, 1, 0.32, 1)","background-color":"rgba(255, 255, 255, 0.96)","box-shadow":"0 6px 12px 0 rgba(0, 0, 0, 0.12)","border-radius":"4px",color:"rgba(0, 0, 0, 0.65)","font-size":"12px","line-height":"20px",padding:"12px","min-width":"120px","max-width":"360px","font-family":"Roboto-Regular"},e[".".concat(n.TITLE)]={color:"rgba(0, 0, 0, 0.45)"},e[".".concat(n.LIST)]={margin:"0px","list-style-type":"none",padding:"0px"},e[".".concat(n.LIST_ITEM)]={"list-style-type":"none",display:"flex","line-height":"2em","align-items":"center","justify-content":"space-between","white-space":"nowrap"},e[".".concat(n.MARKER)]={width:"8px",height:"8px","border-radius":"50%",display:"inline-block","margin-right":"4px"},e[".".concat(n.NAME)]={display:"flex","align-items":"center","max-width":"216px"},e[".".concat(n.NAME_LABEL)]=nt({flex:1},e3),e[".".concat(n.VALUE)]=nt({display:"inline-block",float:"right",flex:1,"text-align":"right","min-width":"28px","margin-left":"30px",color:"rgba(0, 0, 0, 0.85)"},e3),e[".".concat(n.CROSSHAIR_X)]={position:"absolute",width:"1px","background-color":"rgba(0, 0, 0, 0.25)"},e[".".concat(n.CROSSHAIR_Y)]={position:"absolute",height:"1px","background-color":"rgba(0, 0, 0, 0.25)"},e}var VJ=function(t){Yt(e,t);function e(n){var r=this,i,a,o=(a=(i=n.style)===null||i===void 0?void 0:i.template)===null||a===void 0?void 0:a.prefixCls,s=U1(o);return r=t.call(this,n,{data:[],x:0,y:0,visibility:"visible",title:"",position:"bottom-right",offset:[5,5],enterable:!1,container:{x:0,y:0},bounding:null,template:{prefixCls:"",container:'<div class="'.concat(s.CONTAINER,'"></div>'),title:'<div class="'.concat(s.TITLE,'"></div>'),item:'<li class="'.concat(s.LIST_ITEM,`" data-index={index}>
<span class="`).concat(s.NAME,`">
<span class="`).concat(s.MARKER,`" style="background:{color}"></span>
<span class="`).concat(s.NAME_LABEL,`" title="{name}">{name}</span>
</span>
<span class="`).concat(s.VALUE,`" title="{value}">{value}</span>
</li>`)},style:$J(o)})||this,r.timestamp=-1,r.prevCustomContentKey=r.attributes.contentKey,r.initShape(),r.render(r.attributes,r),r}return Object.defineProperty(e.prototype,"HTMLTooltipElement",{get:function(){return this.element},enumerable:!1,configurable:!0}),e.prototype.getContainer=function(){return this.element},Object.defineProperty(e.prototype,"elementSize",{get:function(){var n=this.element.offsetWidth,r=this.element.offsetHeight;return{width:n,height:r}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"HTMLTooltipItemsElements",{get:function(){var n=this.attributes,r=n.data,i=n.template;return r.map(function(a,o){var s=a.name,c=s===void 0?"":s,l=a.color,u=l===void 0?"black":l,f=a.index,d=rn(a,["name","color","index"]),h=nt({name:c,color:u,index:f!=null?f:o},d);return t3(HJ(i.item,h))})},enumerable:!1,configurable:!0}),e.prototype.render=function(n,r){this.renderHTMLTooltipElement(),this.updatePosition()},e.prototype.destroy=function(){var n;(n=this.element)===null||n===void 0||n.remove(),t.prototype.destroy.call(this)},e.prototype.show=function(n,r){var i=this;if(n!==void 0&&r!==void 0){var a=this.element.style.visibility==="hidden",o=function(){i.attributes.x=n!=null?n:i.attributes.x,i.attributes.y=r!=null?r:i.attributes.y,i.updatePosition()};a?this.closeTransition(o):o()}this.element.style.visibility="visible"},e.prototype.hide=function(n,r){n===void 0&&(n=0),r===void 0&&(r=0);var i=this.attributes.enterable;i&&this.isCursorEntered(n,r)||(this.element.style.visibility="hidden")},e.prototype.initShape=function(){var n=this.attributes.template;this.element=t3(n.container),this.id&&this.element.setAttribute("id",this.id)},e.prototype.renderCustomContent=function(){if(!(this.prevCustomContentKey!==void 0&&this.prevCustomContentKey===this.attributes.contentKey)){this.prevCustomContentKey=this.attributes.contentKey;var n=this.attributes.content;n&&(typeof n=="string"?this.element.innerHTML=n:this.element.replaceChildren(n))}},e.prototype.renderHTMLTooltipElement=function(){var n,r,i=this.attributes,a=i.template,o=i.title,s=i.enterable,c=i.style,l=i.content,u=U1(a.prefixCls),f=this.element;if(this.element.style.pointerEvents=s?"auto":"none",l)this.renderCustomContent();else{o?(f.innerHTML=a.title,f.getElementsByClassName(u.TITLE)[0].innerHTML=o):(r=(n=f.getElementsByClassName(u.TITLE))===null||n===void 0?void 0:n[0])===null||r===void 0||r.remove();var d=this.HTMLTooltipItemsElements,h=document.createElement("ul");h.className=u.LIST,h.replaceChildren.apply(h,yt([],R(d),!1));var p=this.element.querySelector(".".concat(u.LIST));p?p.replaceWith(h):f.appendChild(h)}NG(f,c)},e.prototype.getRelativeOffsetFromCursor=function(n){var r=this.attributes,i=r.position,a=r.offset,o=n||i,s=o.split("-"),c={left:[-1,0],right:[1,0],top:[0,-1],bottom:[0,1]},l=this.elementSize,u=l.width,f=l.height,d=[-u/2,-f/2];return s.forEach(function(h){var p=R(d,2),v=p[0],g=p[1],y=R(c[h],2),m=y[0],b=y[1];d=[v+(u/2+a[0])*m,g+(f/2+a[1])*b]}),d},e.prototype.setOffsetPosition=function(n){var r=R(n,2),i=r[0],a=r[1],o=this.attributes,s=o.x,c=s===void 0?0:s,l=o.y,u=l===void 0?0:l,f=o.container,d=f.x,h=f.y;this.element.style.left="".concat(+c+d+i,"px"),this.element.style.top="".concat(+u+h+a,"px")},e.prototype.updatePosition=function(){var n=this.attributes.showDelay,r=n===void 0?60:n,i=Date.now();this.timestamp>0&&i-this.timestamp<r||(this.timestamp=i,this.setOffsetPosition(this.autoPosition(this.getRelativeOffsetFromCursor())))},e.prototype.autoPosition=function(n){var r=R(n,2),i=r[0],a=r[1],o=this.attributes,s=o.x,c=o.y,l=o.bounding,u=o.position;if(!l)return[i,a];var f=this.element,d=f.offsetWidth,h=f.offsetHeight,p=R([+s+i,+c+a],2),v=p[0],g=p[1],y={left:"right",right:"left",top:"bottom",bottom:"top"},m=l.x,b=l.y,x=l.width,_=l.height,O={left:v<m,right:v+d>m+x,top:g<b,bottom:g+h>b+_},w=[];u.split("-").forEach(function(M){O[M]?w.push(y[M]):w.push(M)});var S=w.join("-");return this.getRelativeOffsetFromCursor(S)},e.prototype.isCursorEntered=function(n,r){if(this.element){var i=this.element.getBoundingClientRect(),a=i.x,o=i.y,s=i.width,c=i.height;return new Ln(a,o,s,c).isPointIn(n,r)}return!1},e.prototype.closeTransition=function(n){var r=this,i=this.element.style.transition;this.element.style.transition="none",n(),setTimeout(function(){r.element.style.transition=i},10)},e.tag="tooltip",e}(Nr),td=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function x0(t,e){return e?typeof e=="string"?document.querySelector(e):e:t.ownerDocument.defaultView.getContextService().getDomElement().parentElement}function UJ(t){const e=t.getRenderBounds(),{min:[n,r],max:[i,a]}=e;return{x:n,y:r,width:i-n,height:a-r}}function XJ(t,e){const n=t.getBoundingClientRect(),r=e.getBoundingClientRect();return{x:n.x-r.x,y:n.y-r.y}}function qJ(t,e,n,r,i,a,o,s={}){const c={".g2-tooltip":{},".g2-tooltip-title":{overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"}},l=new VJ({className:"tooltip",style:{x:e,y:n,container:o,data:[],bounding:a,position:r,enterable:i,title:"",offset:[10,10],template:{prefixCls:"g2-"},style:dt(c,s)}});return t.appendChild(l.HTMLTooltipElement),l}function n3({root:t,data:e,x:n,y:r,render:i,event:a,single:o,position:s="right-bottom",enterable:c=!1,css:l,mount:u,bounding:f}){const d=x0(t,u),h=x0(t),p=o?h:t,v=f||UJ(t),g=XJ(h,d),{tooltipElement:y=qJ(d,n,r,s,c,v,g,l)}=p,{items:m,title:b=""}=e;y.update(Object.assign({x:n,y:r,data:m,title:b,position:s,enterable:c},i!==void 0&&{content:i(a,{items:m,title:b})})),p.tooltipElement=y}function hs({root:t,single:e,emitter:n,nativeEvent:r=!0,event:i=null}){r&&n.emit("tooltip:hide",{nativeEvent:r});const a=x0(t),o=e?a:t,{tooltipElement:s}=o;s&&s.hide(i==null?void 0:i.clientX,i==null?void 0:i.clientY)}function X1({root:t,single:e}){const n=x0(t),r=e?n:t;if(!r)return;const{tooltipElement:i}=r;i&&(i.destroy(),r.tooltipElement=void 0)}function r3(t){const{value:e}=t;return Object.assign(Object.assign({},t),{value:e===void 0?"undefined":e})}function ZJ(t){const{__data__:e}=t,{title:n,items:r=[]}=e,i=r.filter(bn).map(a=>{var{color:o=i3(t)}=a,s=td(a,["color"]);return Object.assign(Object.assign({},s),{color:o})}).map(r3);return Object.assign(Object.assign({},n&&{title:n}),{items:i})}function KJ(t,e){const{color:n,series:r,facet:i=!1}=t,{color:a,series:o}=e,s=c=>c&&c.invert&&!(c instanceof us)&&!(c instanceof wf);if(s(r))return r.clone().invert(o);if(o&&r instanceof us&&r.invert(o)!==a&&!i)return r.invert(o);if(s(n)){const c=n.invert(a);return Array.isArray(c)?null:c}return null}function i3(t){const e=t.getAttribute("fill"),n=t.getAttribute("stroke"),{__data__:r}=t,{color:i=e&&e!=="transparent"?e:n}=r;return i}function a3(t,e=n=>n){const n=new Map(t.map(r=>[e(r),r]));return Array.from(n.values())}function o3(t,e,n,r=t.map(a=>a.__data__),i={}){const a=c=>c instanceof Date?+c:c,o=a3(r.map(c=>c.title),a).filter(bn),s=r.flatMap((c,l)=>{const u=t[l],{items:f=[],title:d}=c,h=f.filter(bn),p=n!==void 0?n:f.length<=1;return h.map(v=>{var{color:g=i3(u)||i.color,name:y}=v,m=td(v,["color","name"]);const b=KJ(e,c),x=p?b||y:y||b;return Object.assign(Object.assign({},m),{color:g,name:x||d})})}).map(r3);return Object.assign(Object.assign({},o.length>0&&{title:o.join(",")}),{items:a3(s,c=>`(${a(c.name)}, ${a(c.value)}, ${a(c.color)})`)})}function QJ(t,e,n){var{plotWidth:r,plotHeight:i,mainWidth:a,mainHeight:o,startX:s,startY:c,transposed:l,polar:u,insetLeft:f,insetTop:d}=n,h=td(n,["plotWidth","plotHeight","mainWidth","mainHeight","startX","startY","transposed","polar","insetLeft","insetTop"]);const p=Object.assign({lineWidth:1,stroke:"#1b1e23",strokeOpacity:.5},h),v=e.map(M=>M[1]),g=e.map(M=>M[0]),y=Jf(v),m=Jf(g),b=()=>{if(u){const M=Math.min(a,o)/2,E=s+f+a/2,P=c+d+o/2,L=ea(Xn([m,y],[E,P])),A=E+M*Math.cos(L),T=P+M*Math.sin(L);return[E,A,P,T]}return l?[s,s+r,y+c,y+c]:[m+s,m+s,c,c+i]},[x,_,O,w]=b(),S=()=>{const M=new tf({style:Object.assign({x1:x,x2:_,y1:O,y2:w},p)});return t.appendChild(M),M};if(g.length>0){const M=t.ruleY||S();M.style.x1=x,M.style.x2=_,M.style.y1=O,M.style.y2=w,t.ruleY=M}}function s3(t){t.ruleY&&(t.ruleY.remove(),t.ruleY=void 0)}function JJ(t,{data:e,style:n,theme:r}){t.markers&&t.markers.forEach(a=>a.remove());const i=e.filter(a=>{const[{x:o,y:s}]=a;return bn(o)&&bn(s)}).map(a=>{const[{color:o,element:s},c]=a,l=o||s.style.fill||s.style.stroke||r.color;return new Ks({style:Object.assign({cx:c[0],cy:c[1],fill:l,r:4,stroke:"#fff",strokeWidth:2},n)})});for(const a of i)t.appendChild(a);t.markers=i}function c3(t){t.markers&&(t.markers.forEach(e=>e.remove()),t.markers=[])}function l3(t,e){return Array.from(t.values()).some(n=>{var r;return(r=n.interaction)===null||r===void 0?void 0:r[e]})}function q1(t,e){return t===void 0?e:t}function u3(t){const{title:e,items:n}=t;return n.length===0&&e===void 0}function ttt(t){return Array.from(t.values()).some(e=>{var n;return((n=e.interaction)===null||n===void 0?void 0:n.seriesTooltip)&&e.tooltip})}function ett(t){return Dp(t,e=>e.classList?e.classList.includes("element"):!1)}function f3(t,e){var{elements:n,sort:r,filter:i,scale:a,coordinate:o,crosshairs:s,render:c,groupName:l,emitter:u,wait:f=50,leading:d=!0,trailing:h=!1,startX:p=0,startY:v=0,body:g=!0,single:y=!0,position:m,enterable:b,mount:x,bounding:_,theme:O,disableNative:w=!1,marker:S=!0,preserve:M=!1,style:E={},css:P={}}=e,L=td(e,["elements","sort","filter","scale","coordinate","crosshairs","render","groupName","emitter","wait","leading","trailing","startX","startY","body","single","position","enterable","mount","bounding","theme","disableNative","marker","preserve","style","css"]);const A=n(t),T=kn(o),C=xn(o),N=dt(E,L),{innerWidth:B,innerHeight:j,width:D,height:G,insetLeft:Y,insetTop:U}=o.getOptions(),V=[],it=[];for(const he of A){const{__data__:Me}=he,{seriesX:Ee,title:pe,items:Ze}=Me;Ee?V.push(he):(pe||Ze)&&it.push(he)}const Ot=!!(T?a.y:a.x).getBandWidth&&it.length>0;V.sort((he,Me)=>{const Ee=T?0:1,pe=Ze=>Ze.getBounds().min[Ee];return T?pe(Me)-pe(he):pe(he)-pe(Me)});const ht=he=>{const Me=T?1:0,{min:Ee,max:pe}=he.getLocalBounds();return xo([Ee[Me],pe[Me]])};it.sort((he,Me)=>{const[Ee,pe]=ht(he),[Ze,Ye]=ht(Me),Be=(Ee+pe)/2,jn=(Ze+Ye)/2;return T?jn-Be:Be-jn});const ut=new Map(V.map(he=>{const{__data__:Me}=he,{seriesX:Ee}=Me,pe=Ee.map((Ye,Be)=>Be),Ze=xo(pe,Ye=>Ee[+Ye]);return[he,[Ze,Ee]]})),{x:Lt}=a,wt=Lt!=null&&Lt.getBandWidth?Lt.getBandWidth()/2:0,Gt=he=>{const[Me]=o.invert(he);return Me-wt},Ut=(he,Me,Ee)=>{const pe=Gt(he),Ze=Ee.filter(bn),[Ye,Be]=xo([Ze[0],Ze[Ze.length-1]]),jn=Ye===Be;if(!Ot&&(pe<Ye||pe>Be)&&!jn)return null;const zn=kl(Ao=>Ee[+Ao]).center,ni=zn(Me,pe);return Me[ni]},te=(he,Me)=>{const pe=he[T?1:0],Ze=Me.filter(jn=>{const[zn,ni]=ht(jn);return pe>=zn&&pe<=ni});if(!Ot||Ze.length>0)return Ze;const Ye=kl(jn=>{const[zn,ni]=ht(jn);return(zn+ni)/2}).center,Be=Ye(Me,pe);return[Me[Be]].filter(bn)},ie=(he,Me)=>{const{__data__:Ee}=he;return Object.fromEntries(Object.entries(Ee).filter(([pe])=>pe.startsWith("series")&&pe!=="series").map(([pe,Ze])=>{const Ye=Ze[Me];return[xw(pe.replace("series","")),Ye]}))},ye=bc(he=>{const Me=Em(t,he);if(!Me)return;const Ee=UM(t),pe=Ee.min[0],Ze=Ee.min[1],Ye=[Me[0]-p,Me[1]-v];if(!Ye)return;const Be=te(Ye,it),jn=[],zn=[];for(const br of V){const[Id,qx]=ut.get(br),Y4=Ut(Ye,Id,qx);if(Y4!==null){jn.push(br);const H4=ie(br,Y4),{x:Lht,y:Nht}=H4,Iht=o.map([(Lht||0)+wt,Nht||0]);zn.push([Object.assign(Object.assign({},H4),{element:br}),Iht])}}const ni=Array.from(new Set(zn.map(br=>br[0].x))),Ao=ni[b0(ni,br=>Math.abs(br-Gt(Ye)))],Ec=zn.filter(br=>br[0].x===Ao),Ov=[...Ec.map(br=>br[0]),...Be.map(br=>br.__data__)],wv=[...jn,...Be],Pc=o3(wv,a,l,Ov,O);if(r&&Pc.items.sort((br,Id)=>r(br)-r(Id)),i&&(Pc.items=Pc.items.filter(i)),wv.length===0||u3(Pc)){We(he);return}if(g&&n3({root:t,data:Pc,x:Me[0]+pe,y:Me[1]+Ze,render:c,event:he,single:y,position:m,enterable:b,mount:x,bounding:_,css:P}),s){const br=Ec.map(qx=>qx[1]),Id=At(N,"crosshairs");QJ(t,br,Object.assign(Object.assign({},Id),{plotWidth:B,plotHeight:j,mainWidth:D,mainHeight:G,insetLeft:Y,insetTop:U,startX:p,startY:v,transposed:T,polar:C}))}if(S){const br=At(N,"marker");JJ(t,{data:Ec,style:br,theme:O})}u.emit("tooltip:show",Object.assign(Object.assign({},he),{nativeEvent:!0,data:{data:{x:Ll(a.x,Gt(Ye),!0)}}}))},f,{leading:d,trailing:h}),We=he=>{hs({root:t,single:y,emitter:u,event:he}),s&&s3(t),S&&c3(t)},de=()=>{X1({root:t,single:y}),s&&s3(t),S&&c3(t)},we=({nativeEvent:he,data:Me})=>{if(he)return;const{x:Ee}=Me.data,{x:pe}=a,Ze=pe.map(Ee),[Ye,Be]=o.map([Ze,.5]),{min:[jn,zn]}=t.getRenderBounds();ye({offsetX:Ye+jn,offsetY:Be+zn})},En=()=>{hs({root:t,single:y,emitter:u,nativeEvent:!1})},ir=()=>{Qn(),de()},Ai=()=>{Pn()},Pn=()=>{w||(t.addEventListener("pointerenter",ye),t.addEventListener("pointermove",ye),t.addEventListener("pointerleave",We))},Qn=()=>{w||(t.removeEventListener("pointerenter",ye),t.removeEventListener("pointermove",ye),t.removeEventListener("pointerleave",We))};return Pn(),u.on("tooltip:show",we),u.on("tooltip:hide",En),u.on("tooltip:disable",ir),u.on("tooltip:enable",Ai),()=>{Qn(),u.off("tooltip:show",we),u.off("tooltip:hide",En),u.off("tooltip:disable",ir),u.off("tooltip:enable",Ai),M?hs({root:t,single:y,emitter:u,nativeEvent:!1}):de()}}function ntt(t,{elements:e,scale:n,render:r,groupName:i,sort:a,filter:o,emitter:s,wait:c=50,leading:l=!0,trailing:u=!1,groupKey:f=M=>M,single:d=!0,position:h,enterable:p,datum:v,view:g,mount:y,bounding:m,theme:b,shared:x=!1,body:_=!0,disableNative:O=!1,preserve:w=!1,css:S={}}){const M=e(t),E=Bn(M,f),P=bc(D=>{const{target:G}=D,Y=ett(G);if(!Y){hs({root:t,single:d,emitter:s,event:D});return}const U=f(Y),V=E.get(U),it=V.length===1&&!x?ZJ(V[0]):o3(V,n,i,void 0,b);if(a&&it.items.sort((ht,ut)=>a(ht)-a(ut)),o&&(it.items=it.items.filter(o)),u3(it)){hs({root:t,single:d,emitter:s,event:D});return}const{offsetX:pt,offsetY:Ot}=D;_&&n3({root:t,data:it,x:pt,y:Ot,render:r,event:D,single:d,position:h,enterable:p,mount:y,bounding:m,css:S}),s.emit("tooltip:show",Object.assign(Object.assign({},D),{nativeEvent:!0,data:{data:JM(Y,g)}}))},c,{leading:l,trailing:u}),L=D=>{hs({root:t,single:d,emitter:s,event:D})},A=()=>{O||(t.addEventListener("pointermove",P),t.addEventListener("pointerleave",L))},T=()=>{O||(t.removeEventListener("pointermove",P),t.removeEventListener("pointerleave",L))},C=({nativeEvent:D,data:G})=>{if(D)return;const Y=Tm(M,G.data,v);if(!Y)return;const U=Y.getBBox(),{x:V,y:it,width:pt,height:Ot}=U;P({target:Y,offsetX:V+pt/2,offsetY:it+Ot/2})},N=({nativeEvent:D}={})=>{D||hs({root:t,single:d,emitter:s,nativeEvent:!1})},B=()=>{T(),X1({root:t,single:d})},j=()=>{A()};return s.on("tooltip:show",C),s.on("tooltip:hide",N),s.on("tooltip:enable",j),s.on("tooltip:disable",B),A(),()=>{T(),s.off("tooltip:show",C),s.off("tooltip:hide",N),w?hs({root:t,single:d,emitter:s,nativeEvent:!1}):X1({root:t,single:d})}}function d3(t){const{shared:e,crosshairs:n,series:r,name:i,item:a=()=>({}),facet:o=!1}=t,s=td(t,["shared","crosshairs","series","name","item","facet"]);return(c,l,u)=>{const{container:f,view:d}=c,{scale:h,markState:p,coordinate:v,theme:g}=d,y=l3(p,"seriesTooltip"),m=l3(p,"crosshairs"),b=za(f),x=q1(r,y);if(x&&ttt(p)&&!o)return f3(b,Object.assign(Object.assign({},s),{theme:g,elements:is,scale:h,coordinate:v,crosshairs:q1(n,m),item:a,emitter:u}));if(x&&o){const _=l.filter(P=>P!==c&&P.options.parentKey===c.options.key),O=VM(c,l),w=_[0].view.scale,S=b.getBounds(),M=S.min[0],E=S.min[1];return Object.assign(w,{facet:!0}),f3(b.parentNode.parentNode,Object.assign(Object.assign({},s),{theme:g,elements:()=>O,scale:w,coordinate:v,crosshairs:q1(n,m),item:a,startX:M,startY:E,emitter:u}))}return ntt(b,Object.assign(Object.assign({},s),{datum:uc(d),elements:is,scale:h,coordinate:v,groupKey:e?Am(d):void 0,item:a,emitter:u,view:d,theme:g,shared:e}))}}d3.props={reapplyWhenUpdate:!0};var _0=function(t,e,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{l(r.next(u))}catch(f){o(f)}}function c(u){try{l(r.throw(u))}catch(f){o(f)}}function l(u){u.done?a(u.value):i(u.value).then(s,c)}l((r=r.apply(t,e||[])).next())})};const h3="legend-category",rtt="legend-continuous",itt="items-item",att="legend-category-item-marker",ott="legend-category-item-label";function p3(t){return t.getElementsByClassName(att)[0]}function v3(t){return t.getElementsByClassName(ott)[0]}function g3(t){return t.getElementsByClassName(itt)}function Z1(t){return t.getElementsByClassName(h3)}function y3(t){return t.getElementsByClassName(rtt)}function stt(t,e){[...Z1(t),...y3(t)].forEach(r=>{e(r,i=>i)})}function K1(t){let e=t.parentNode;for(;e&&!e.__data__;)e=e.parentNode;return e.__data__}function Ymt(t){let e=t;for(;e&&!e.attr("class").startsWith("legend");)e=e.children[0];return e.attributes}function ctt(t,{legends:e,marker:n,label:r,datum:i,filter:a,emitter:o,channel:s,state:c={}}){const l=new Map,u=new Map,f=new Map,{unselected:d={markerStroke:"#aaa",markerFill:"#aaa",labelFill:"#aaa"}}=c,h={unselected:At(d,"marker")},p={unselected:At(d,"label")},{setState:v,removeState:g}=_o(h,void 0),{setState:y,removeState:m}=_o(p,void 0),b=Array.from(e(t));let x=b.map(i);const _=()=>{for(const S of b){const M=i(S),E=n(S),P=r(S);x.includes(M)?(g(E,"unselected"),m(P,"unselected")):(v(E,"unselected"),y(P,"unselected"))}};for(const S of b){const M=()=>{as(t,"pointer")},E=()=>{oV(t)},P=L=>_0(this,void 0,void 0,function*(){const A=i(S),T=x.indexOf(A);T===-1?x.push(A):x.splice(T,1),x.length===0&&x.push(...b.map(i)),yield a(x),_();const{nativeEvent:C=!0}=L;C&&(x.length===b.length?o.emit("legend:reset",{nativeEvent:C}):o.emit("legend:filter",Object.assign(Object.assign({},L),{nativeEvent:C,data:{channel:s,values:x}})))});S.addEventListener("click",P),S.addEventListener("pointerenter",M),S.addEventListener("pointerout",E),l.set(S,P),u.set(S,M),f.set(S,E)}const O=S=>_0(this,void 0,void 0,function*(){const{nativeEvent:M}=S;if(M)return;const{data:E}=S,{channel:P,values:L}=E;P===s&&(x=L,yield a(x),_())}),w=S=>_0(this,void 0,void 0,function*(){const{nativeEvent:M}=S;M||(x=b.map(i),yield a(x),_())});return o.on("legend:filter",O),o.on("legend:reset",w),()=>{for(const S of b)S.removeEventListener("click",l.get(S)),S.removeEventListener("pointerenter",u.get(S)),S.removeEventListener("pointerout",f.get(S)),o.off("legend:filter",O),o.off("legend:reset",w)}}function ltt(t,{legend:e,filter:n,emitter:r,channel:i}){const a=({detail:{value:o}})=>{n(o),r.emit({nativeEvent:!0,data:{channel:i,values:o}})};return e.addEventListener("valuechange",a),()=>{e.removeEventListener("valuechange",a)}}function m3(t,{legend:e,channel:n,value:r,ordinal:i,channels:a,allChannels:o,facet:s=!1}){return _0(this,void 0,void 0,function*(){const{view:c,update:l,setState:u}=t;u(e,f=>{const{marks:d}=f,h=d.map(p=>{if(p.type==="legends")return p;const{transform:v=[]}=p,g=v.findIndex(({type:b})=>b.startsWith("group")||b.startsWith("bin")),y=[...v];y.splice(g+1,0,{type:"filter",[n]:{value:r,ordinal:i}});const m=Object.fromEntries(a.map(b=>[b,{domain:c.scale[b].getOptions().domain}]));return dt({},p,Object.assign(Object.assign({transform:y,scale:m},!i&&{animate:!1}),{legend:s?!1:Object.fromEntries(o.map(b=>[b,{preserve:!0}]))}))});return Object.assign(Object.assign({},f),{marks:h})}),yield l()})}function utt(t,e){for(const n of t)m3(n,Object.assign(Object.assign({},e),{facet:!0}))}function ftt(){return(t,e,n)=>{const{container:r}=t,i=e.filter(f=>f!==t),a=i.length>0,o=f=>K1(f).scales.map(d=>d.name),s=[...Z1(r),...y3(r)],c=s.flatMap(o),l=a?bc(utt,50,{trailing:!0}):bc(m3,50,{trailing:!0}),u=s.map(f=>{const{name:d,domain:h}=K1(f).scales[0],p=o(f),v={legend:f,channel:d,channels:p,allChannels:c};return f.className===h3?ctt(r,{legends:g3,marker:p3,label:v3,datum:g=>{const{__data__:y}=g,{index:m}=y;return h[m]},filter:g=>{const y=Object.assign(Object.assign({},v),{value:g,ordinal:!0});l(a?i:t,y)},state:f.attributes.state,channel:d,emitter:n}):ltt(r,{legend:f,filter:g=>{const y=Object.assign(Object.assign({},v),{value:g,ordinal:!1});l(a?i:t,y)},emitter:n,channel:d})});return()=>{u.forEach(f=>f())}}}function dtt(){return(t,e,n)=>{const{container:r,view:i,options:a}=t,o=Z1(r),s=is(r),c=h=>K1(h).scales[0].name,l=h=>{const{scale:{[h]:p}}=i;return p},u=Il(a,["active","inactive"]),f=Nf(s,uc(i)),d=[];for(const h of o){const p=G=>{const{data:Y}=h.attributes,{__data__:U}=G,{index:V}=U;return Y[V].label},v=c(h),g=g3(h),y=l(v),m=Bn(s,G=>y.invert(G.__data__[v])),{state:b={}}=h.attributes,{inactive:x={}}=b,{setState:_,removeState:O}=_o(u,f),w={inactive:At(x,"marker")},S={inactive:At(x,"label")},{setState:M,removeState:E}=_o(w),{setState:P,removeState:L}=_o(S),A=G=>{for(const Y of g){const U=p3(Y),V=v3(Y);Y===G||G===null?(E(U,"inactive"),L(V,"inactive")):(M(U,"inactive"),P(V,"inactive"))}},T=(G,Y)=>{const U=p(Y),V=new Set(m.get(U));for(const pt of s)V.has(pt)?_(pt,"active"):_(pt,"inactive");A(Y);const{nativeEvent:it=!0}=G;it&&n.emit("legend:highlight",Object.assign(Object.assign({},G),{nativeEvent:it,data:{channel:v,value:U}}))},C=new Map;for(const G of g){const Y=U=>{T(U,G)};G.addEventListener("pointerover",Y),C.set(G,Y)}const N=G=>{for(const U of s)O(U,"inactive","active");A(null);const{nativeEvent:Y=!0}=G;Y&&n.emit("legend:unhighlight",{nativeEvent:Y})},B=G=>{const{nativeEvent:Y,data:U}=G;if(Y)return;const{channel:V,value:it}=U;if(V!==v)return;const pt=g.find(Ot=>p(Ot)===it);pt&&T({nativeEvent:!1},pt)},j=G=>{const{nativeEvent:Y}=G;Y||N({nativeEvent:!1})};h.addEventListener("pointerleave",N),n.on("legend:highlight",B),n.on("legend:unhighlight",j);const D=()=>{h.removeEventListener(N),n.off("legend:highlight",B),n.off("legend:unhighlight",j);for(const[G,Y]of C)G.removeEventListener(Y)};d.push(D)}return()=>d.forEach(h=>h())}}var zi=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function htt(t,e){const[n,r,i,a]=t,[o,s,c,l]=e;return!(o>i||c<n||s>a||l<r)}function ptt(t,e,n,r,i){const[a,o,s,c]=i;return[Math.max(a,Math.min(t,n)),Math.max(o,Math.min(e,r)),Math.min(s,Math.max(t,n)),Math.min(c,Math.max(e,r))]}function vtt(t){const{width:e,height:n}=t.getBBox();return[0,0,e,n]}function wo(t,e){for(const[n,r]of Object.entries(e))t.style(n,r)}const b3=Tl(t=>{const e=t.attributes,{x:n,y:r,width:i,height:a,class:o,renders:s={},handleSize:c=10,document:l}=e,u=zi(e,["x","y","width","height","class","renders","handleSize","document"]);if(!l||i===void 0||a===void 0||n===void 0||r===void 0)return;const f=c/2,d=(it,pt,Ot)=>{it.handle||(it.handle=Ot.createElement("rect"),it.append(it.handle));const{handle:ht}=it;return ht.attr(pt),ht},h=At(ky(u,"handleNW","handleNE"),"handleN"),{render:p=d}=h,v=zi(h,["render"]),g=At(u,"handleE"),{render:y=d}=g,m=zi(g,["render"]),b=At(ky(u,"handleSE","handleSW"),"handleS"),{render:x=d}=b,_=zi(b,["render"]),O=At(u,"handleW"),{render:w=d}=O,S=zi(O,["render"]),M=At(u,"handleNW"),{render:E=d}=M,P=zi(M,["render"]),L=At(u,"handleNE"),{render:A=d}=L,T=zi(L,["render"]),C=At(u,"handleSE"),{render:N=d}=C,B=zi(C,["render"]),j=At(u,"handleSW"),{render:D=d}=j,G=zi(j,["render"]),Y=(it,pt)=>{const{id:Ot}=it,ht=it.attributes,{x:ut,y:Lt}=ht,wt=zi(ht,["x","y"]),Gt=pt(it,Object.assign({x:0,y:0},wt),l);Gt.id=Ot,Gt.style.draggable=!0},U=it=>()=>{const pt=Tl(Ot=>Y(Ot,it));return new pt({})},V=se(t).attr("className",o).style("x",n).style("y",r).style("draggable",!0);V.maybeAppend("selection","rect").style("draggable",!0).style("fill","transparent").call(wo,Object.assign({width:i,height:a},ky(u,"handle"))),V.maybeAppend("handle-n",U(p)).style("x",f).style("y",-f).style("width",i-c).style("height",c).style("fill","transparent").call(wo,v),V.maybeAppend("handle-e",U(y)).style("x",i-f).style("y",f).style("width",c).style("height",a-c).style("fill","transparent").call(wo,m),V.maybeAppend("handle-s",U(x)).style("x",f).style("y",a-f).style("width",i-c).style("height",c).style("fill","transparent").call(wo,_),V.maybeAppend("handle-w",U(w)).style("x",-f).style("y",f).style("width",c).style("height",a-c).style("fill","transparent").call(wo,S),V.maybeAppend("handle-nw",U(E)).style("x",-f).style("y",-f).style("width",c).style("height",c).style("fill","transparent").call(wo,P),V.maybeAppend("handle-ne",U(A)).style("x",i-f).style("y",-f).style("width",c).style("height",c).style("fill","transparent").call(wo,T),V.maybeAppend("handle-se",U(N)).style("x",i-f).style("y",a-f).style("width",c).style("height",c).style("fill","transparent").call(wo,B),V.maybeAppend("handle-sw",U(D)).style("x",-f).style("y",a-f).style("width",c).style("height",c).style("fill","transparent").call(wo,G)});function Q1(t,e){var{brushed:n=()=>{},brushended:r=()=>{},brushcreated:i=()=>{},brushstarted:a=()=>{},brushupdated:o=()=>{},extent:s=vtt(t),brushRegion:c=(ht,ut,Lt,wt,Gt)=>[ht,ut,Lt,wt],reverse:l=!1,fill:u="#777",fillOpacity:f="0.3",stroke:d="#fff",selectedHandles:h=["handle-n","handle-e","handle-s","handle-w","handle-nw","handle-ne","handle-se","handle-sw"]}=e,p=zi(e,["brushed","brushended","brushcreated","brushstarted","brushupdated","extent","brushRegion","reverse","fill","fillOpacity","stroke","selectedHandles"]);let v=null,g=null,y=null,m=null,b=null,x=!1;const[_,O,w,S]=s;as(t,"crosshair"),t.style.draggable=!0;const M=(ht,ut,Lt)=>{if(a(Lt),m&&m.remove(),b&&b.remove(),v=[ht,ut],l)return E();P()},E=()=>{b=new Zr({style:Object.assign(Object.assign({},p),{fill:u,fillOpacity:f,stroke:d,pointerEvents:"none"})}),m=new b3({style:{x:0,y:0,width:0,height:0,draggable:!0,document:t.ownerDocument},className:"mask"}),t.appendChild(b),t.appendChild(m)},P=()=>{m=new b3({style:Object.assign(Object.assign({document:t.ownerDocument,x:0,y:0},p),{fill:u,fillOpacity:f,stroke:d,draggable:!0}),className:"mask"}),t.appendChild(m)},L=(ht=!0)=>{m&&m.remove(),b&&b.remove(),v=null,g=null,y=null,x=!1,m=null,b=null,r(ht)},A=(ht,ut,Lt=!0)=>{const[wt,Gt,Ut,te]=ptt(ht[0],ht[1],ut[0],ut[1],s),[ie,ye,We,de]=c(wt,Gt,Ut,te,s);return l?C(ie,ye,We,de):T(ie,ye,We,de),n(ie,ye,We,de,Lt),[ie,ye,We,de]},T=(ht,ut,Lt,wt)=>{m.style.x=ht,m.style.y=ut,m.style.width=Lt-ht,m.style.height=wt-ut},C=(ht,ut,Lt,wt)=>{b.style.d=`
M${_},${O}L${w},${O}L${w},${S}L${_},${S}Z
M${ht},${ut}L${ht},${wt}L${Lt},${wt}L${Lt},${ut}Z
`,m.style.x=ht,m.style.y=ut,m.style.width=Lt-ht,m.style.height=wt-ut},N=ht=>{const ut=(ye,We,de,we,En)=>ye+We<we?we-We:ye+de>En?En-de:ye,Lt=ht[0]-y[0],wt=ht[1]-y[1],Gt=ut(Lt,v[0],g[0],_,w),Ut=ut(wt,v[1],g[1],O,S),te=[v[0]+Gt,v[1]+Ut],ie=[g[0]+Gt,g[1]+Ut];A(te,ie)},B={"handle-n":{vector:[0,1,0,0],cursor:"ns-resize"},"handle-e":{vector:[0,0,1,0],cursor:"ew-resize"},"handle-s":{vector:[0,0,0,1],cursor:"ns-resize"},"handle-w":{vector:[1,0,0,0],cursor:"ew-resize"},"handle-nw":{vector:[1,1,0,0],cursor:"nwse-resize"},"handle-ne":{vector:[0,1,1,0],cursor:"nesw-resize"},"handle-se":{vector:[0,0,1,1],cursor:"nwse-resize"},"handle-sw":{vector:[1,0,0,1],cursor:"nesw-resize"}},j=ht=>G(ht)||D(ht),D=ht=>{const{id:ut}=ht;return h.indexOf(ut)===-1?!1:new Set(Object.keys(B)).has(ut)},G=ht=>ht===m.getElementById("selection"),Y=ht=>{const{target:ut}=ht,[Lt,wt]=Pm(t,ht);if(!m||!j(ut)){M(Lt,wt,ht),x=!0;return}j(ut)&&(y=[Lt,wt])},U=ht=>{const{target:ut}=ht,Lt=Pm(t,ht);if(!v)return;if(!y)return A(v,Lt);if(G(ut))return N(Lt);const[wt,Gt]=[Lt[0]-y[0],Lt[1]-y[1]],{id:Ut}=ut;if(B[Ut]){const[te,ie,ye,We]=B[Ut].vector;return A([v[0]+wt*te,v[1]+Gt*ie],[g[0]+wt*ye,g[1]+Gt*We])}},V=ht=>{if(y){y=null;const{x:Ut,y:te,width:ie,height:ye}=m.style;v=[Ut,te],g=[Ut+ie,te+ye],o(Ut,te,Ut+ie,te+ye,ht);return}g=Pm(t,ht);const[ut,Lt,wt,Gt]=A(v,g);x=!1,i(ut,Lt,wt,Gt,ht)},it=ht=>{const{target:ut}=ht;m&&!j(ut)&&L()},pt=ht=>{const{target:ut}=ht;!m||!j(ut)||x?as(t,"crosshair"):G(ut)?as(t,"move"):D(ut)&&as(t,B[ut.id].cursor)},Ot=()=>{as(t,"default")};return t.addEventListener("dragstart",Y),t.addEventListener("drag",U),t.addEventListener("dragend",V),t.addEventListener("click",it),t.addEventListener("pointermove",pt),t.addEventListener("pointerleave",Ot),{mask:m,move(ht,ut,Lt,wt,Gt=!0){m||M(ht,ut,{}),v=[ht,ut],g=[Lt,wt],A([ht,ut],[Lt,wt],Gt)},remove(ht=!0){m&&L(ht)},destroy(){m&&L(!1),as(t,"default"),t.removeEventListener("dragstart",Y),t.removeEventListener("drag",U),t.removeEventListener("dragend",V),t.removeEventListener("click",it),t.removeEventListener("pointermove",pt),t.removeEventListener("pointerleave",Ot)}}}function J1(t,e,n){return e.filter(r=>{if(r===t)return!1;const{interaction:i={}}=r.options;return Object.values(i).find(a=>a.brushKey===n)})}function gtt(t,e,n){return J1(t,e,n).map(r=>za(r.container))}function ytt(t,e,n){return J1(t,e,n).map(r=>r.options)}function x3(t,e){var{elements:n,selectedHandles:r,siblings:i=U=>[],datum:a,brushRegion:o,extent:s,reverse:c,scale:l,coordinate:u,series:f=!1,key:d=U=>U,bboxOf:h=U=>{const{x:V,y:it,width:pt,height:Ot}=U.style;return{x:V,y:it,width:pt,height:Ot}},state:p={},emitter:v}=e,g=zi(e,["elements","selectedHandles","siblings","datum","brushRegion","extent","reverse","scale","coordinate","series","key","bboxOf","state","emitter"]);const y=n(t),m=i(t),b=m.flatMap(n),x=Nf(y,a),_=At(g,"mask"),{setState:O,removeState:w}=_o(p,x),S=new Map,{width:M,height:E,x:P=0,y:L=0}=h(t),A=s||[0,0,M,E],T=()=>{for(const U of[...y,...b])w(U,"active","inactive")},C=(U,V,it,pt)=>{var Ot;for(const ut of m)(Ot=ut.brush)===null||Ot===void 0||Ot.remove();const ht=new Set;for(const ut of y){const{min:Lt,max:wt}=ut.getLocalBounds(),[Gt,Ut]=Lt,[te,ie]=wt;htt([Gt,Ut,te,ie],[U,V,it,pt])?(O(ut,"active"),ht.add(d(ut))):O(ut,"inactive")}for(const ut of b)ht.has(d(ut))?O(ut,"active"):O(ut,"inactive")},N=()=>{for(const U of y)w(U,"inactive");for(const U of S.values())U.remove();S.clear()},B=(U,V,it,pt)=>{const Ot=ht=>{const ut=ht.cloneNode();return ut.__data__=ht.__data__,ht.parentNode.appendChild(ut),S.set(ht,ut),ut};for(const ht of y){const ut=S.get(ht)||Ot(ht);ut.style.clipPath=new Qs({style:{x:U+P,y:V+L,width:it-U,height:pt-V}}),O(ht,"inactive"),O(ut,"active")}},j=Q1(t,Object.assign(Object.assign({},_),{extent:A,brushRegion:o,reverse:c,selectedHandles:r,brushended:U=>{const V=f?N:T;U&&v.emit("brush:remove",{nativeEvent:!0}),V()},brushed:(U,V,it,pt,Ot)=>{const ht=Tp(U,V,it,pt,l,u);Ot&&v.emit("brush:highlight",{nativeEvent:!0,data:{selection:ht}}),(f?B:C)(U,V,it,pt)},brushcreated:(U,V,it,pt,Ot)=>{const ht=Tp(U,V,it,pt,l,u);v.emit("brush:end",Object.assign(Object.assign({},Ot),{nativeEvent:!0,data:{selection:ht}}))},brushupdated:(U,V,it,pt,Ot)=>{const ht=Tp(U,V,it,pt,l,u);v.emit("brush:end",Object.assign(Object.assign({},Ot),{nativeEvent:!0,data:{selection:ht}}))},brushstarted:U=>{v.emit("brush:start",U)}})),D=({nativeEvent:U,data:V})=>{if(U)return;const{selection:it}=V,[pt,Ot,ht,ut]=V$(it,l,u);j.move(pt,Ot,ht,ut,!1)};v.on("brush:highlight",D);const G=({nativeEvent:U}={})=>{U||j.remove(!1)};v.on("brush:remove",G);const Y=j.destroy.bind(j);return j.destroy=()=>{v.off("brush:highlight",D),v.off("brush:remove",G),Y()},j}function tb(t){var{facet:e,brushKey:n}=t,r=zi(t,["facet","brushKey"]);return(i,a,o)=>{const{container:s,view:c,options:l}=i,u=za(s),f={maskFill:"#777",maskFillOpacity:"0.3",maskStroke:"#fff",reverse:!1},d=["active",["inactive",{opacity:.5}]],{scale:h,coordinate:p}=c;if(e){const g=u.getBounds(),y=g.min[0],m=g.min[1],b=g.max[0],x=g.max[1];return x3(u.parentNode.parentNode,Object.assign(Object.assign({elements:()=>VM(i,a),datum:uc(Mm(i,a).map(_=>_.view)),brushRegion:(_,O,w,S)=>[_,O,w,S],extent:[y,m,b,x],state:Il(Mm(i,a).map(_=>_.options),d),emitter:o,scale:h,coordinate:p,selectedHandles:void 0},f),r))}const v=x3(u,Object.assign(Object.assign({elements:is,key:g=>g.__data__.key,siblings:()=>gtt(i,a,n),datum:uc([c,...J1(i,a,n).map(g=>g.view)]),brushRegion:(g,y,m,b)=>[g,y,m,b],extent:void 0,state:Il([l,...ytt(i,a,n)],d),emitter:o,scale:h,coordinate:p,selectedHandles:void 0},f),r));return u.brush=v,()=>v.destroy()}}function eb(t,e,n,r,i){const[,a,,o]=i;return[t,a,n,o]}function mtt(t){return tb(Object.assign(Object.assign({},t),{brushRegion:eb,selectedHandles:["handle-e","handle-w"]}))}function nb(t,e,n,r,i){const[a,,o]=i;return[a,e,o,r]}function btt(t){return tb(Object.assign(Object.assign({},t),{brushRegion:nb,selectedHandles:["handle-n","handle-s"]}))}var rb=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const xtt="axis",_tt="axis-line",Ott="axis-main-group",_3="axis-hot-area";function wtt(t){return t.getElementsByClassName(xtt)}function O3(t){return t.getElementsByClassName(_tt)[0]}function Stt(t){return t.getElementsByClassName(Ott)[0]}function w3(t){return Stt(t).getLocalBounds()}function Mtt(t,e){var{cross:n,offsetX:r,offsetY:i}=e,a=rb(e,["cross","offsetX","offsetY"]);const o=w3(t),s=O3(t),[c]=s.getLocalBounds().min,[l,u]=o.min,[f,d]=o.max,h=(f-l)*2;return{brushRegion:nb,hotZone:new Qs({className:_3,style:Object.assign({x:n?l:c-h/2,width:n?h/2:h,y:u,height:d-u},a)}),extent:n?(p,v,g,y)=>[-1/0,v,1/0,y]:(p,v,g,y)=>[Math.floor(l-r),v,Math.ceil(f-r),y]}}function Ett(t,e){var{offsetY:n,offsetX:r,cross:i=!1}=e,a=rb(e,["offsetY","offsetX","cross"]);const o=w3(t),s=O3(t),[,c]=s.getLocalBounds().min,[l,u]=o.min,[f,d]=o.max,h=d-u;return{brushRegion:eb,hotZone:new Qs({className:_3,style:Object.assign({x:l,width:f-l,y:i?u:c-h,height:i?h:h*2},a)}),extent:i?(p,v,g,y)=>[p,-1/0,g,1/0]:(p,v,g,y)=>[p,Math.floor(u-n),g,Math.ceil(d-n)]}}function Ptt(t,e){var{axes:n,elements:r,points:i,horizontal:a,datum:o,offsetY:s,offsetX:c,reverse:l=!1,state:u={},emitter:f,coordinate:d}=e,h=rb(e,["axes","elements","points","horizontal","datum","offsetY","offsetX","reverse","state","emitter","coordinate"]);const p=r(t),v=n(t),g=Nf(p,o),{setState:y,removeState:m}=_o(u,g),b=new Map,x=At(h,"mask"),_=D=>Array.from(b.values()).every(([G,Y,U,V])=>D.some(([it,pt])=>it>=G&&it<=U&&pt>=Y&&pt<=V)),O=v.map(D=>D.attributes.scale),w=D=>D.length>2?[D[0],D[D.length-1]]:D,S=new Map,M=()=>{S.clear();for(let D=0;D<v.length;D++){const G=O[D],{domain:Y}=G.getOptions();S.set(D,w(Y))}};M();const E=(D,G)=>{const Y=[];for(const V of p){const it=i(V);_(it)?(y(V,"active"),Y.push(V)):y(V,"inactive")}if(S.set(D,L(Y,D)),!G)return;const U=()=>{if(!A)return Array.from(S.values());const V=[];for(const[it,pt]of S){const Ot=O[it],{name:ht}=Ot.getOptions();ht==="x"?V[0]=pt:V[1]=pt}return V};f.emit("brushAxis:highlight",{nativeEvent:!0,data:{selection:U()}})},P=D=>{for(const G of p)m(G,"active","inactive");M(),D&&f.emit("brushAxis:remove",{nativeEvent:!0})},L=(D,G)=>{const Y=O[G],{name:U}=Y.getOptions(),V=D.map(it=>{const pt=it.__data__;return Y.invert(pt[U])});return w(rs(Y,V))},A=v.some(a)&&v.some(D=>!a(D)),T=[];for(let D=0;D<v.length;D++){const G=v[D],Y=a(G)?Ett:Mtt,{hotZone:U,brushRegion:V,extent:it}=Y(G,{offsetY:s,offsetX:c,cross:A,zIndex:999,fill:"transparent"});G.parentNode.appendChild(U);const pt=Q1(U,Object.assign(Object.assign({},x),{reverse:l,brushRegion:V,brushended(Ot){b.delete(G),Array.from(b.entries()).length===0?P(Ot):E(D,Ot)},brushed(Ot,ht,ut,Lt,wt){b.set(G,it(Ot,ht,ut,Lt)),E(D,wt)}}));T.push(pt)}const C=(D={})=>{const{nativeEvent:G}=D;G||T.forEach(Y=>Y.remove(!1))},N=(D,G,Y)=>{const[U,V]=D,it=ht=>ht.getStep?ht.getStep():0,pt=B(U,G,Y),Ot=B(V,G,Y)+it(G);return a(Y)?[pt,-1/0,Ot,1/0]:[-1/0,pt,1/0,Ot]},B=(D,G,Y)=>{const{height:U,width:V}=d.getOptions(),it=G.clone();return a(Y)?it.update({range:[0,V]}):it.update({range:[U,0]}),it.map(D)},j=D=>{const{nativeEvent:G}=D;if(G)return;const{selection:Y}=D.data;for(let U=0;U<T.length;U++){const V=Y[U],it=T[U],pt=v[U];if(V){const Ot=O[U];it.move(...N(V,Ot,pt),!1)}else it.remove(!1)}};return f.on("brushAxis:remove",C),f.on("brushAxis:highlight",j),()=>{T.forEach(D=>D.destroy()),f.off("brushAxis:remove",C),f.off("brushAxis:highlight",j)}}function Att(t){return(e,n,r)=>{const{container:i,view:a,options:o}=e,s=za(i),{x:c,y:l}=s.getBBox(),{coordinate:u}=a;return Ptt(i,Object.assign({elements:is,axes:wtt,offsetY:l,offsetX:c,points:f=>f.__data__.points,horizontal:f=>{const{startPos:[d,h],endPos:[p,v]}=f.attributes;return d!==p&&h===v},datum:uc(a),state:Il(o,["active",["inactive",{opacity:.5}]]),coordinate:u,emitter:r},t))}}var Ttt=function(t,e,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{l(r.next(u))}catch(f){o(f)}}function c(u){try{l(r.throw(u))}catch(f){o(f)}}function l(u){u.done?a(u.value):i(u.value).then(s,c)}l((r=r.apply(t,e||[])).next())})},S3=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function Ctt(t=300){let e=null;return n=>{const{timeStamp:r}=n;return e!==null&&r-e<t?(e=r,!0):(e=r,!1)}}function ktt(t,e){var{filter:n,reset:r,brushRegion:i,extent:a,reverse:o,emitter:s,scale:c,coordinate:l,selection:u,series:f=!1}=e,d=S3(e,["filter","reset","brushRegion","extent","reverse","emitter","scale","coordinate","selection","series"]);const h=At(d,"mask"),{width:p,height:v}=t.getBBox(),g=a||[0,0,p,v],y=Ctt(),m=Q1(t,Object.assign(Object.assign({},h),{extent:g,brushRegion:i,reverse:o,brushcreated:b}));t.addEventListener("click",x);function b(O,w,S,M,E){E.nativeEvent=!0,n(u(O,w,S,M),E),m.remove()}function x(O){y(O)&&(O.nativeEvent=!0,r(O))}const _=({nativeEvent:O,data:w})=>{if(O)return;const{selection:S}=w;n(S,{nativeEvent:!1})};return s.on("brush:filter",_),()=>{m.destroy(),s.off("brush:filter",_),t.removeEventListener("click",x)}}function ib(t){var{hideX:e=!0,hideY:n=!0}=t,r=S3(t,["hideX","hideY"]);return(i,a,o)=>{const{container:s,view:c,options:l,update:u,setState:f}=i,d=za(s),h={maskFill:"#777",maskFillOpacity:"0.3",maskStroke:"#fff",unhighlightedOpacity:.5,reverse:!1};let p=!1,v=!1,g=c;const{scale:y,coordinate:m}=c;return ktt(d,Object.assign(Object.assign({brushRegion:(b,x,_,O)=>[b,x,_,O],selection:(b,x,_,O)=>{const{scale:w,coordinate:S}=g;return Tp(b,x,_,O,w,S)},filter:(b,x)=>Ttt(this,void 0,void 0,function*(){if(v)return;v=!0;const[_,O]=b;f("brushFilter",S=>{const{marks:M}=S,E=M.map(P=>dt({axis:Object.assign(Object.assign({},e&&{x:{transform:[{type:"hide"}]}}),n&&{y:{transform:[{type:"hide"}]}})},P,{scale:{x:{domain:_,nice:!1},y:{domain:O,nice:!1}}}));return Object.assign(Object.assign({},l),{marks:E,clip:!0})}),o.emit("brush:filter",Object.assign(Object.assign({},x),{data:{selection:[_,O]}})),g=(yield u()).view,v=!1,p=!0}),reset:b=>{if(v||!p)return;const{scale:x}=c,{x:_,y:O}=x,w=_.getOptions().domain,S=O.getOptions().domain;o.emit("brush:filter",Object.assign(Object.assign({},b),{data:{selection:[w,S]}})),p=!1,g=c,f("brushFilter"),u()},extent:void 0,emitter:o,scale:y,coordinate:m},h),r))}}function Ltt(t){return ib(Object.assign(Object.assign({hideX:!0},t),{brushRegion:eb}))}function Ntt(t){return ib(Object.assign(Object.assign({hideY:!0},t),{brushRegion:nb}))}var Itt=function(t,e,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{l(r.next(u))}catch(f){o(f)}}function c(u){try{l(r.throw(u))}catch(f){o(f)}}function l(u){u.done?a(u.value):i(u.value).then(s,c)}l((r=r.apply(t,e||[])).next())})};const jtt="slider";function Rtt(t,e,n,r=!1,i="x",a="y"){const{marks:o}=t,s=o.map(c=>{var l,u;return dt({axis:{x:{transform:[{type:"hide"}]},y:{transform:[{type:"hide"}]}}},c,{scale:e,[n]:Object.assign(Object.assign({},((l=c[n])===null||l===void 0?void 0:l[i])&&{[i]:Object.assign({preserve:!0},r&&{ratio:null})}),((u=c[n])===null||u===void 0?void 0:u[a])&&{[a]:{preserve:!0}}),animate:!1})});return Object.assign(Object.assign({},t),{marks:s,clip:!0,animate:!1})}function Dtt(t,e,n){const[r,i]=t,a=n?c=>1-c:c=>c,o=Ll(e,a(r),!0),s=Ll(e,a(i),!1);return rs(e,[o,s])}function O0(t){return[t[0],t[t.length-1]]}function M3({initDomain:t={},className:e=jtt,prefix:n="slider",setValue:r=(l,u)=>l.setValues(u),hasState:i=!1,wait:a=50,leading:o=!0,trailing:s=!1,getInitValues:c=l=>{var u;const f=(u=l==null?void 0:l.attributes)===null||u===void 0?void 0:u.values;if(f[0]!==0||f[1]!==1)return f}}){return(l,u,f)=>{const{container:d,view:h,update:p,setState:v}=l,g=d.getElementsByClassName(e);if(!g.length)return()=>{};let y=!1;const{scale:m,coordinate:b,layout:x}=h,{paddingLeft:_,paddingTop:O,paddingBottom:w,paddingRight:S}=x,{x:M,y:E}=m,P=kn(b),L=N=>{const B=N==="vertical"?"y":"x",j=N==="vertical"?"x":"y";return P?[j,B]:[B,j]},A=new Map,T=new Set,C={x:t.x||M.getOptions().domain,y:t.y||E.getOptions().domain};for(const N of g){const{orientation:B}=N.attributes,[j,D]=L(B),G=`${n}${qo(j)}:filter`,Y=j==="x",{ratio:U}=M.getOptions(),{ratio:V}=E.getOptions(),it=ut=>{if(ut.data){const{selection:te}=ut.data,[ie=O0(C.x),ye=O0(C.y)]=te;return Y?[rs(M,ie,U),rs(E,ye,V)]:[rs(E,ye,V),rs(M,ie,U)]}const{value:Lt}=ut.detail,wt=m[j],Gt=Dtt(Lt,wt,P&&B==="horizontal"),Ut=C[D];return[Gt,Ut]},pt=bc(ut=>Itt(this,void 0,void 0,function*(){const{initValue:Lt=!1}=ut;if(y&&!Lt)return;y=!0;const{nativeEvent:wt=!0}=ut,[Gt,Ut]=it(ut);if(C[j]=Gt,C[D]=Ut,wt){const te=Y?Gt:Ut,ie=Y?Ut:Gt;f.emit(G,Object.assign(Object.assign({},ut),{nativeEvent:wt,data:{selection:[O0(te),O0(ie)]}}))}v(N,te=>Object.assign(Object.assign({},Rtt(te,{[j]:{domain:Gt,nice:!1}},n,i,j,D)),{paddingLeft:_,paddingTop:O,paddingBottom:w,paddingRight:S})),yield p(),y=!1}),a,{leading:o,trailing:s}),Ot=ut=>{const{nativeEvent:Lt}=ut;if(Lt)return;const{data:wt}=ut,{selection:Gt}=wt,[Ut,te]=Gt;N.dispatchEvent(new vn("valuechange",{data:wt,nativeEvent:!1}));const ie=Y?Cp(Ut,M):Cp(te,E);r(N,ie)};f.on(G,Ot),N.addEventListener("valuechange",pt),A.set(N,pt),T.add([G,Ot]);const ht=c(N);ht&&N.dispatchEvent(new vn("valuechange",{detail:{value:ht},nativeEvent:!1,initValue:!0}))}return p(),()=>{for(const[N,B]of A)N.removeEventListener("valuechange",B);for(const[N,B]of T)f.off(N,B)}}}const E3="g2-scrollbar";function Btt(t={}){return(e,n,r)=>{const{view:i,container:a}=e;if(!a.getElementsByClassName(E3).length)return()=>{};const{scale:s}=i,{x:c,y:l}=s,u={x:[...c.getOptions().domain],y:[...l.getOptions().domain]};return c.update({domain:c.getOptions().expectedDomain}),l.update({domain:l.getOptions().expectedDomain}),M3(Object.assign(Object.assign({},t),{initDomain:u,className:E3,prefix:"scrollbar",hasState:!0,setValue:(d,h)=>d.setValue(h[0]),getInitValues:d=>{const h=d.slider.attributes.values;if(h[0]!==0)return h}}))(e,n,r)}}var Ftt=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function ztt(t,e,n){return`<${t} style="${Object.entries(n).map(([r,i])=>`${b$(r)}:${i}`).join(";")}">${e}</${t}>`}const Gtt={backgroundColor:"rgba(0,0,0,0.75)",color:"#fff",width:"max-content",padding:"1px 4px",fontSize:"12px",borderRadius:"2.5px",boxShadow:"0 3px 6px -4px rgba(0,0,0,0.12), 0 6px 16px 0 rgba(0,0,0,0.08), 0 9px 28px 8px rgba(0,0,0,0.05)"};function P3(t){return t.nodeName!=="text"?!1:!!t.isOverflowing()}function A3(t){var{offsetX:e=8,offsetY:n=8}=t,r=Ftt(t,["offsetX","offsetY"]);return i=>{const{container:a}=i,[o,s]=a.getBounds().min,c=At(r,"tip"),l=new Set,u=d=>{const{target:h}=d;if(!P3(h)){d.stopPropagation();return}const{offsetX:p,offsetY:v}=d,g=p+e-o,y=v+n-s;if(h.tip){h.tip.style.x=g,h.tip.style.y=y;return}const{text:m}=h.style,b=new Lh({className:"poptip",style:{innerHTML:ztt("div",m,Object.assign(Object.assign({},Gtt),c)),x:g,y}});a.appendChild(b),h.tip=b,l.add(b)},f=d=>{const{target:h}=d;if(!P3(h)){d.stopPropagation();return}h.tip&&(h.tip.remove(),h.tip=null,l.delete(h.tip))};return a.addEventListener("pointerover",u),a.addEventListener("pointerout",f),()=>{a.removeEventListener("pointerover",u),a.removeEventListener("pointerout",f),l.forEach(d=>d.remove())}}}A3.props={reapplyWhenUpdate:!0};function Wtt(t,e){var n=Jm(e),r=n.length;if(Ft(t))return!r;for(var i=0;i<r;i+=1){var a=n[i];if(e[a]!==t[a]||!(a in t))return!1}return!0}var Ytt=Wtt;function Htt(t,e){if(!mr(t))return null;var n;if(li(e)&&(n=e),ho(e)&&(n=function(i){return Ytt(i,e)}),n){for(var r=0;r<t.length;r+=1)if(n(t[r]))return t[r]}return null}var Xl=Htt;function w0(t){return t==null?null:T3(t)}function T3(t){if(typeof t!="function")throw new Error;return t}var $tt={depth:-1},C3={},ab={};function Vtt(t){return t.id}function Utt(t){return t.parentId}function ob(){var t=Vtt,e=Utt,n;function r(i){var a=Array.from(i),o=t,s=e,c,l,u,f,d,h,p,v,g=new Map;if(n!=null){var y=a.map(function(S,M){return Xtt(n(S,M,i))}),m=y.map(k3),b=new Set(y).add(""),x=Xm(m),_;try{for(x.s();!(_=x.n()).done;){var O=_.value;b.has(O)||(b.add(O),y.push(O),m.push(k3(O)),a.push(ab))}}catch(S){x.e(S)}finally{x.f()}o=function(M,E){return y[E]},s=function(M,E){return m[E]}}for(u=0,c=a.length;u<c;++u)l=a[u],h=a[u]=new zl(l),(p=o(l,u,i))!=null&&(p+="")&&(v=h.id=p,g.set(v,g.has(v)?C3:h)),(p=s(l,u,i))!=null&&(p+="")&&(h.parent=p);for(u=0;u<c;++u)if(h=a[u],p=h.parent){if(d=g.get(p),!d)throw new Error("missing: "+p);if(d===C3)throw new Error("ambiguous: "+p);d.children?d.children.push(h):d.children=[h],h.parent=d}else{if(f)throw new Error("multiple roots");f=h}if(!f)throw new Error("no root");if(n!=null){for(;f.data===ab&&f.children.length===1;)f=f.children[0],--c;for(var w=a.length-1;w>=0&&(h=a[w],h.data===ab);--w)h.data=null}if(f.parent=$tt,f.eachBefore(function(S){S.depth=S.parent.depth+1,--c}).eachBefore(CP),f.parent=null,c>0)throw new Error("cycle");return f}return r.id=function(i){return arguments.length?(t=w0(i),r):t},r.parentId=function(i){return arguments.length?(e=w0(i),r):e},r.path=function(i){return arguments.length?(n=w0(i),r):n},r}function Xtt(t){t="".concat(t);var e=t.length;return sb(t,e-1)&&!sb(t,e-2)&&(t=t.slice(0,-1)),t[0]==="/"?t:"/".concat(t)}function k3(t){var e=t.length;if(e<2)return"";for(;--e>1&&!sb(t,e););return t.slice(0,e)}function sb(t,e){if(t[e]==="/"){for(var n=0;e>0&&t[--e]==="\\";)++n;if(!(n&1))return!0}return!1}function qtt(t,e,n,r,i){var a=t.children,o,s=a.length,c,l=new Array(s+1);for(l[0]=c=o=0;o<s;++o)l[o+1]=c+=a[o].value;u(0,s,t.value,e,n,r,i);function u(f,d,h,p,v,g,y){if(f>=d-1){var m=a[f];m.x0=p,m.y0=v,m.x1=g,m.y1=y;return}for(var b=l[f],x=h/2+b,_=f+1,O=d-1;_<O;){var w=_+O>>>1;l[w]<x?_=w+1:O=w}x-l[_-1]<l[_]-x&&f+1<_&&--_;var S=l[_]-b,M=h-S;if(g-p>y-v){var E=h?(p*M+g*S)/h:g;u(f,_,S,p,v,E,y),u(_,d,M,E,v,g,y)}else{var P=h?(v*M+y*S)/h:y;u(f,_,S,p,v,g,P),u(_,d,M,p,P,g,y)}}}function S0(t,e,n,r,i){for(var a=t.children,o,s=-1,c=a.length,l=t.value&&(i-n)/t.value;++s<c;)o=a[s],o.x0=e,o.x1=r,o.y0=n,o.y1=n+=o.value*l}function Ztt(t,e,n,r,i){(t.depth&1?S0:Df)(t,e,n,r,i)}var L3=(1+Math.sqrt(5))/2;function N3(t,e,n,r,i,a){for(var o=[],s=e.children,c,l,u=0,f=0,d=s.length,h,p,v=e.value,g,y,m,b,x,_,O;u<d;){h=i-n,p=a-r;do g=s[f++].value;while(!g&&f<d);for(y=m=g,_=Math.max(p/h,h/p)/(v*t),O=g*g*_,x=Math.max(m/O,O/y);f<d;++f){if(g+=l=s[f].value,l<y&&(y=l),l>m&&(m=l),O=g*g*_,b=Math.max(m/O,O/y),b>x){g-=l;break}x=b}o.push(c={value:g,dice:h<p,children:s.slice(u,f)}),c.dice?Df(c,n,r,i,v?r+=p*g/v:a):S0(c,n,r,v?n+=h*g/v:i,a),v-=g,u=f}return o}var I3=function t(e){function n(r,i,a,o,s){N3(e,r,i,a,o,s)}return n.ratio=function(r){return t((r=+r)>1?r:1)},n}(L3),Ktt=function t(e){function n(r,i,a,o,s){if((c=r._squarify)&&c.ratio===e)for(var c,l,u,f,d=-1,h,p=c.length,v=r.value;++d<p;){for(l=c[d],u=l.children,f=l.value=0,h=u.length;f<h;++f)l.value+=u[f].value;l.dice?Df(l,i,a,o,v?a+=(s-a)*l.value/v:s):S0(l,i,a,v?i+=(o-i)*l.value/v:o,s),v-=l.value}else r._squarify=c=N3(e,r,i,a,o,s),c.ratio=e}return n.ratio=function(r){return t((r=+r)>1?r:1)},n}(L3);function xc(){return 0}function ql(t){return function(){return t}}function Qtt(){var t=I3,e=!1,n=1,r=1,i=[0],a=xc,o=xc,s=xc,c=xc,l=xc;function u(d){return d.x0=d.y0=0,d.x1=n,d.y1=r,d.eachBefore(f),i=[0],e&&d.eachBefore(PP),d}function f(d){var h=i[d.depth],p=d.x0+h,v=d.y0+h,g=d.x1-h,y=d.y1-h;g<p&&(p=g=(p+g)/2),y<v&&(v=y=(v+y)/2),d.x0=p,d.y0=v,d.x1=g,d.y1=y,d.children&&(h=i[d.depth+1]=a(d)/2,p+=l(d)-h,v+=o(d)-h,g-=s(d)-h,y-=c(d)-h,g<p&&(p=g=(p+g)/2),y<v&&(v=y=(v+y)/2),t(d,p,v,g,y))}return u.round=function(d){return arguments.length?(e=!!d,u):e},u.size=function(d){return arguments.length?(n=+d[0],r=+d[1],u):[n,r]},u.tile=function(d){return arguments.length?(t=T3(d),u):t},u.padding=function(d){return arguments.length?u.paddingInner(d).paddingOuter(d):u.paddingInner()},u.paddingInner=function(d){return arguments.length?(a=typeof d=="function"?d:ql(+d),u):a},u.paddingOuter=function(d){return arguments.length?u.paddingTop(d).paddingRight(d).paddingBottom(d).paddingLeft(d):u.paddingTop()},u.paddingTop=function(d){return arguments.length?(o=typeof d=="function"?d:ql(+d),u):o},u.paddingRight=function(d){return arguments.length?(s=typeof d=="function"?d:ql(+d),u):s},u.paddingBottom=function(d){return arguments.length?(c=typeof d=="function"?d:ql(+d),u):c},u.paddingLeft=function(d){return arguments.length?(l=typeof d=="function"?d:ql(+d),u):l},u}function Jtt(t,e){return Array.isArray(t)?typeof e=="function"?ob().path(e)(t):ob()(t):Fl(t)}function j3(t,e=[t.data.name]){t.id=t.id||t.data.name,t.path=e,t.children&&t.children.forEach(n=>{n.id=`${t.id}/${n.data.name}`,n.path=[...e,n.data.name],j3(n,n.path)})}function R3(t){const e=Ve(t,["data","name"]);e.replaceAll&&(t.path=e.replaceAll(".","/").split("/")),t.children&&t.children.forEach(n=>{R3(n)})}function tet(t,e){const n={treemapBinary:qtt,treemapDice:Df,treemapSlice:S0,treemapSliceDice:Ztt,treemapSquarify:I3,treemapResquarify:Ktt},r=t==="treemapSquarify"?n[t].ratio(e):n[t];if(!r)throw new TypeError("Invalid tile method!");return r}function D3(t,e,n){const{value:r}=n,i=tet(e.tile,e.ratio),a=Jtt(t,e.path);mr(t)?R3(a):j3(a),r?a.sum(c=>e.ignoreParentValue&&c.children?0:$a(r)(c)).sort(e.sort):a.count(),Qtt().tile(i).size(e.size).round(e.round).paddingInner(e.paddingInner).paddingOuter(e.paddingOuter).paddingTop(e.paddingTop).paddingRight(e.paddingRight).paddingBottom(e.paddingBottom).paddingLeft(e.paddingLeft)(a);const o=a.descendants().map(c=>Object.assign(c,{id:c.id.replace(/^\//,""),x:[c.x0,c.x1],y:[c.y0,c.y1]}));return[o.filter(typeof e.layer=="function"?e.layer:c=>c.height===e.layer),o]}var eet=function(t,e,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{l(r.next(u))}catch(f){o(f)}}function c(u){try{l(r.throw(u))}catch(f){o(f)}}function l(u){u.done?a(u.value):i(u.value).then(s,c)}l((r=r.apply(t,e||[])).next())})},net=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function ret(t){return se(t).select(`.${af}`).node()}const iet={breadCrumbFill:"rgba(0, 0, 0, 0.85)",breadCrumbFontSize:12,breadCrumbY:12,activeFill:"rgba(0, 0, 0, 0.5)"};function aet(t={}){const{originData:e=[],layout:n}=t,r=net(t,["originData","layout"]),i=dt({},iet,r),a=At(i,"breadCrumb"),o=At(i,"active");return s=>{const{update:c,setState:l,container:u,options:f}=s,d=ret(u),h=f.marks[0],{state:p}=h,v=new Er;d.appendChild(v);const g=(x,_)=>eet(this,void 0,void 0,function*(){if(v.removeChildren(),_){let O="",w=a.y,S=0;const M=[],E=d.getBBox().width,P=x.map((L,A)=>{O=`${O}${L}/`,M.push(L);const T=new Di({name:O.replace(/\/$/,""),style:Object.assign(Object.assign({text:L,x:S,path:[...M],depth:A},a),{y:w})});v.appendChild(T),S+=T.getBBox().width;const C=new Di({style:Object.assign(Object.assign({x:S,text:" / "},a),{y:w})});return v.appendChild(C),S+=C.getBBox().width,S>E&&(w=v.getBBox().height+a.y,S=0,T.attr({x:S,y:w}),S+=T.getBBox().width,C.attr({x:S,y:w}),S+=C.getBBox().width),A===Zm(x)-1&&C.remove(),T});P.forEach((L,A)=>{if(A===Zm(P)-1)return;const T=Object.assign({},L.attributes);L.attr("cursor","pointer"),L.addEventListener("mouseenter",()=>{L.attr(o)}),L.addEventListener("mouseleave",()=>{L.attr(T)}),L.addEventListener("click",()=>{g(Ve(L,["style","path"]),Ve(L,["style","depth"]))})})}stt(u,l),l("treemapDrillDown",O=>{const{marks:w}=O,S=x.join("/"),M=w.map(E=>{if(E.type!=="rect")return E;let P=e;if(_){const A=e.filter(j=>{const D=Ve(j,["id"]);return D&&(D.match(`${S}/`)||S.match(D))}).map(j=>({value:j.height===0?Ve(j,["value"]):void 0,name:Ve(j,["id"])})),{paddingLeft:T,paddingBottom:C,paddingRight:N}=n,B=Object.assign(Object.assign({},n),{paddingTop:(n.paddingTop||v.getBBox().height+10)/(_+1),paddingLeft:T/(_+1),paddingBottom:C/(_+1),paddingRight:N/(_+1),path:j=>j.name,layer:j=>j.depth===_+1});P=D3(A,B,{value:"value"})[0]}else P=e.filter(A=>A.depth===1);const L=[];return P.forEach(({path:A})=>{L.push(qf(A))}),dt({},E,{data:P,scale:{color:{domain:L}}})});return Object.assign(Object.assign({},O),{marks:M})}),yield c(void 0,["legendFilter"])}),y=x=>{const _=x.target;if(Ve(_,["markType"])!=="rect")return;const O=Ve(_,["__data__","key"]),w=Xl(e,S=>S.id===O);Ve(w,"height")&&g(Ve(w,"path"),Ve(w,"depth"))};d.addEventListener("click",y);const m=Jm(Object.assign(Object.assign({},p.active),p.inactive)),b=()=>{QM(d).forEach(_=>{const O=Ve(_,["style","cursor"]),w=Xl(e,S=>S.id===Ve(_,["__data__","key"]));if(O!=="pointer"&&(w!=null&&w.height)){_.style.cursor="pointer";const S=Um(_.attributes,m);_.addEventListener("mouseenter",()=>{_.attr(p.active)}),_.addEventListener("mouseleave",()=>{_.attr(dt(S,p.inactive))})}})};return b(),d.addEventListener("mousemove",b),()=>{v.remove(),d.removeEventListener("click",y),d.removeEventListener("mousemove",b)}}}var cb=function(t,e,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{l(r.next(u))}catch(f){o(f)}}function c(u){try{l(r.throw(u))}catch(f){o(f)}}function l(u){u.done?a(u.value):i(u.value).then(s,c)}l((r=r.apply(t,e||[])).next())})},oet=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const set={pointR:6,pointStrokeWidth:1,pointStroke:"#888",pointActiveStroke:"#f5f5f5",pathStroke:"#888",pathLineDash:[3,4],labelFontSize:12,labelFill:"#888",labelStroke:"#fff",labelLineWidth:1,labelY:-6,labelX:2},lb="movePoint",B3=t=>{const e=t.target,{markType:n}=e;n==="line"&&(e.attr("_lineWidth",e.attr("lineWidth")||1),e.attr("lineWidth",e.attr("_lineWidth")+3)),n==="interval"&&(e.attr("_opacity",e.attr("opacity")||1),e.attr("opacity",.7*e.attr("_opacity")))},F3=t=>{const e=t.target,{markType:n}=e;n==="line"&&e.attr("lineWidth",e.attr("_lineWidth")),n==="interval"&&e.attr("opacity",e.attr("_opacity"))},cet=(t,e,n)=>e.map(r=>["x","color"].reduce((a,o)=>{const s=n[o];return s&&r[s]!==t[s]?!1:a},!0)?Object.assign(Object.assign({},r),t):r),uet=t=>{const e=Ve(t,["__data__","y"]),r=Ve(t,["__data__","y1"])-e,{__data__:{data:i,encode:a,transform:o},childNodes:s}=t.parentNode,c=Xl(o,({type:f})=>f==="normalizeY"),l=Ve(a,["y","field"]),u=i[s.indexOf(t)][l];return(f,d=!1)=>c||d?f/(1-f)/(r/(1-r))*u:f},fet=(t,e)=>{const n=Ve(t,["__data__","seriesItems",e,"0","value"]),r=Ve(t,["__data__","seriesIndex",e]),{__data__:{data:i,encode:a,transform:o}}=t.parentNode,s=Xl(o,({type:u})=>u==="normalizeY"),c=Ve(a,["y","field"]),l=i[r][c];return u=>s?n===1?u:u/(1-u)/(n/(1-n))*l:u},z3=(t,e,n)=>{t.forEach((r,i)=>{r.attr("stroke",e[1]===i?n.activeStroke:n.stroke)})},G3=(t,e,n,r)=>{const i=new Zr({style:n}),a=new Di({style:r});return e.appendChild(a),t.appendChild(i),[i,a]},W3=(t,e)=>{if(!Ve(t,["options","range","indexOf"]))return;const r=t.options.range.indexOf(e);return t.sortedDomain[r]},ub=(t,e,n)=>{const r=Rp(t,e),a=Rp(t,n)/r,o=t[0]+(e[0]-t[0])*a,s=t[1]+(e[1]-t[1])*a;return[o,s]};function det(t={}){const{selection:e=[],precision:n=2}=t,r=oet(t,["selection","precision"]),i=Object.assign(Object.assign({},set),r||{}),a=At(i,"path"),o=At(i,"label"),s=At(i,"point");return(c,l,u)=>{const{update:f,setState:d,container:h,view:p,options:{marks:v,coordinate:g}}=c,y=za(h);let m=QM(y),b,x=e;const{transform:_=[],type:O}=g,w=!!Xl(_,({type:j})=>j==="transpose"),S=O==="polar",M=O==="theta",E=!!Xl(m,({markType:j})=>j==="area");E&&(m=m.filter(({markType:j})=>j==="area"));const P=new Er({style:{zIndex:2}});y.appendChild(P);const L=()=>{u.emit("element-point:select",{nativeEvent:!0,data:{selection:x}})},A=(j,D)=>{u.emit("element-point:moved",{nativeEvent:!0,data:{changeData:j,data:D}})},T=j=>{const D=j.target;x=[D.parentNode.childNodes.indexOf(D)],L(),N(D)},C=j=>{const{data:{selection:D},nativeEvent:G}=j;if(G)return;x=D;const Y=Ve(m,[x==null?void 0:x[0]]);Y&&N(Y)},N=j=>{const{attributes:D,markType:G,__data__:Y}=j,{stroke:U}=D,{points:V,seriesTitle:it,color:pt,title:Ot,seriesX:ht,y1:ut}=Y;if(w&&G!=="interval")return;const{scale:Lt,coordinate:wt}=(b==null?void 0:b.view)||p,{color:Gt,y:Ut,x:te}=Lt,ie=wt.getCenter();P.removeChildren();let ye;const We=(de,we,En,ir)=>cb(this,void 0,void 0,function*(){return d("elementPointMove",Ai=>{var Pn;const Qn=(((Pn=b==null?void 0:b.options)===null||Pn===void 0?void 0:Pn.marks)||v).map(he=>{if(!ir.includes(he.type))return he;const{data:Me,encode:Ee}=he,Ze=Object.keys(Ee).reduce((Be,jn)=>{const zn=Ee[jn];return jn==="x"&&(Be[zn]=de),jn==="y"&&(Be[zn]=we),jn==="color"&&(Be[zn]=En),Be},{}),Ye=cet(Ze,Me,Ee);return A(Ze,Ye),dt({},he,{data:Ye,animate:!1})});return Object.assign(Object.assign({},Ai),{marks:Qn})}),yield f("elementPointMove")});if(["line","area"].includes(G))V.forEach((de,we)=>{const En=te.invert(ht[we]);if(!En)return;const ir=new Ks({name:lb,style:Object.assign({cx:de[0],cy:de[1],fill:U},s)}),Ai=fet(j,we);ir.addEventListener("mousedown",Pn=>{const Qn=wt.output([ht[we],0]),he=it==null?void 0:it.length;h.attr("cursor","move"),x[1]!==we&&(x[1]=we,L()),z3(P.childNodes,x,s);const[Me,Ee]=G3(P,ir,a,o),pe=Ye=>{const Be=de[1]+Ye.clientY-ye[1];if(E)if(S){const jn=de[0]+Ye.clientX-ye[0],[zn,ni]=ub(ie,Qn,[jn,Be]),[,Ao]=wt.output([1,Ut.output(0)]),[,Ec]=wt.invert([zn,Ao-(V[we+he][1]-ni)]),Ov=(we+1)%he,wv=(we-1+he)%he,Pc=If([V[wv],[zn,ni],it[Ov]&&V[Ov]]);Ee.attr("text",Ai(Ut.invert(Ec)).toFixed(n)),Me.attr("path",Pc),ir.attr("cx",zn),ir.attr("cy",ni)}else{const[,jn]=wt.output([1,Ut.output(0)]),[,zn]=wt.invert([de[0],jn-(V[we+he][1]-Be)]),ni=If([V[we-1],[de[0],Be],it[we+1]&&V[we+1]]);Ee.attr("text",Ai(Ut.invert(zn)).toFixed(n)),Me.attr("path",ni),ir.attr("cy",Be)}else{const[,jn]=wt.invert([de[0],Be]),zn=If([V[we-1],[de[0],Be],V[we+1]]);Ee.attr("text",Ut.invert(jn).toFixed(n)),Me.attr("path",zn),ir.attr("cy",Be)}};ye=[Pn.clientX,Pn.clientY],window.addEventListener("mousemove",pe);const Ze=()=>cb(this,void 0,void 0,function*(){if(h.attr("cursor","default"),window.removeEventListener("mousemove",pe),h.removeEventListener("mouseup",Ze),Cn(Ee.attr("text")))return;const Ye=Number(Ee.attr("text")),Be=W3(Gt,pt);b=yield We(En,Ye,Be,["line","area"]),Ee.remove(),Me.remove(),N(j)});h.addEventListener("mouseup",Ze)}),P.appendChild(ir)}),z3(P.childNodes,x,s);else if(G==="interval"){let de=[(V[0][0]+V[1][0])/2,V[0][1]];w?de=[V[0][0],(V[0][1]+V[1][1])/2]:M&&(de=V[0]);const we=uet(j),En=new Ks({name:lb,style:Object.assign(Object.assign({cx:de[0],cy:de[1],fill:U},s),{stroke:s.activeStroke})});En.addEventListener("mousedown",ir=>{h.attr("cursor","move");const Ai=W3(Gt,pt),[Pn,Qn]=G3(P,En,a,o),he=Ee=>{if(w){const pe=de[0]+Ee.clientX-ye[0],[Ze]=wt.output([Ut.output(0),Ut.output(0)]),[,Ye]=wt.invert([Ze+(pe-V[2][0]),de[1]]),Be=If([[pe,V[0][1]],[pe,V[1][1]],V[2],V[3]],!0);Qn.attr("text",we(Ut.invert(Ye)).toFixed(n)),Pn.attr("path",Be),En.attr("cx",pe)}else if(M){const pe=de[1]+Ee.clientY-ye[1],Ze=de[0]+Ee.clientX-ye[0],[Ye,Be]=ub(ie,[Ze,pe],de),[jn,zn]=ub(ie,[Ze,pe],V[1]),ni=wt.invert([Ye,Be])[1],Ao=ut-ni;if(Ao<0)return;const Ec=sV(ie,[[Ye,Be],[jn,zn],V[2],V[3]],Ao>.5?1:0);Qn.attr("text",we(Ao,!0).toFixed(n)),Pn.attr("path",Ec),En.attr("cx",Ye),En.attr("cy",Be)}else{const pe=de[1]+Ee.clientY-ye[1],[,Ze]=wt.output([1,Ut.output(0)]),[,Ye]=wt.invert([de[0],Ze-(V[2][1]-pe)]),Be=If([[V[0][0],pe],[V[1][0],pe],V[2],V[3]],!0);Qn.attr("text",we(Ut.invert(Ye)).toFixed(n)),Pn.attr("path",Be),En.attr("cy",pe)}};ye=[ir.clientX,ir.clientY],window.addEventListener("mousemove",he);const Me=()=>cb(this,void 0,void 0,function*(){if(h.attr("cursor","default"),h.removeEventListener("mouseup",Me),window.removeEventListener("mousemove",he),Cn(Qn.attr("text")))return;const Ee=Number(Qn.attr("text"));b=yield We(Ot,Ee,Ai,[G]),Qn.remove(),Pn.remove(),N(j)});h.addEventListener("mouseup",Me)}),P.appendChild(En)}};m.forEach((j,D)=>{x[0]===D&&N(j),j.addEventListener("click",T),j.addEventListener("mouseenter",B3),j.addEventListener("mouseleave",F3)});const B=j=>{const D=j==null?void 0:j.target;(!D||D.name!==lb&&!m.includes(D))&&(x=[],L(),P.removeChildren())};return u.on("element-point:select",C),u.on("element-point:unselect",B),h.addEventListener("mousedown",B),()=>{P.remove(),u.off("element-point:select",C),u.off("element-point:unselect",B),h.removeEventListener("mousedown",B),m.forEach(j=>{j.removeEventListener("click",T),j.removeEventListener("mouseenter",B3),j.removeEventListener("mouseleave",F3)})}}}var het=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const Y3=()=>t=>{const{children:e}=t;if(!Array.isArray(e))return[];const{x:n=0,y:r=0,width:i,height:a,data:o}=t;return e.map(s=>{var{data:c,x:l,y:u,width:f,height:d}=s,h=het(s,["data","x","y","width","height"]);return Object.assign(Object.assign({},h),{data:fm(c,o),x:l!=null?l:n,y:u!=null?u:r,width:f!=null?f:i,height:d!=null?d:a})})};Y3.props={};var pet=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const H3=()=>t=>{const{children:e}=t;if(!Array.isArray(e))return[];const{direction:n="row",ratio:r=e.map(()=>1),padding:i=0,data:a}=t,[o,s,c,l]=n==="col"?["y","height","width","x"]:["x","width","height","y"],u=r.reduce((v,g)=>v+g),f=t[s]-i*(e.length-1),d=r.map(v=>f*(v/u)),h=[];let p=t[o]||0;for(let v=0;v<d.length;v+=1){const g=e[v],{data:y}=g,m=pet(g,["data"]),b=fm(y,a);h.push(Object.assign({[o]:p,[s]:d[v],[l]:t[l]||0,[c]:t[c],data:b},m)),p+=d[v]+i}return h};H3.props={};class ed{constructor(e){this.$value=e}static of(e){return new ed(e)}call(e,...n){return this.$value=e(this.$value,...n),this}value(){return this.$value}}var vet=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const get=El(t=>{const{encode:e,data:n,scale:r,shareSize:i=!1}=t,{x:a,y:o}=e,s=(c,l)=>{var u;if(c===void 0||!i)return{};const f=Bn(n,p=>p[c]),d=((u=r==null?void 0:r[l])===null||u===void 0?void 0:u.domain)||Array.from(f.keys()),h=d.map(p=>f.has(p)?f.get(p).length:1);return{domain:d,flex:h}};return{scale:{x:Object.assign(Object.assign({paddingOuter:0,paddingInner:.1,guide:a===void 0?null:{position:"top"}},a===void 0&&{paddingInner:0}),s(a,"x")),y:Object.assign(Object.assign({range:[0,1],paddingOuter:0,paddingInner:.1,guide:o===void 0?null:{position:"right"}},o===void 0&&{paddingInner:0}),s(o,"y"))}}}),fb=El(t=>{const{data:e,scale:n}=t,r=[t];let i,a,o;for(;r.length;){const f=r.shift(),{children:d,encode:h={},scale:p={},legend:v={}}=f,{color:g}=h,{color:y}=p,{color:m}=v;g!==void 0&&(i=g),y!==void 0&&(a=y),m!==void 0&&(o=m),Array.isArray(d)&&r.push(...d)}const s=()=>{var f;const d=(f=n==null?void 0:n.color)===null||f===void 0?void 0:f.domain;if(d!==void 0)return[d];if(i===void 0)return[void 0];const h=typeof i=="function"?i:v=>v[i],p=e.map(h);return p.some(v=>typeof v=="number")?[mo(p)]:[Array.from(new Set(p)),"ordinal"]},c=typeof i=="string"?i:"",[l,u]=s();return{encode:{color:i},scale:{color:dt({},a,{domain:l,type:u})},legend:{color:dt({title:c},o)}}}),db=El(()=>({animate:{enterType:"fadeIn"}})),hb=Pl(()=>({frame:!1,encode:{shape:"hollow"},style:{lineWidth:0}})),pb=Pl(()=>({type:"cell"})),$3=Pl(t=>{const{data:e}=t;return{data:{type:"inline",value:e,transform:[{type:"custom",callback:()=>{const{data:r,encode:i}=t,{x:a,y:o}=i,s=a?Array.from(new Set(r.map(u=>u[a]))):[],c=o?Array.from(new Set(r.map(u=>u[o]))):[];return(()=>{if(s.length&&c.length){const u=[];for(const f of s)for(const d of c)u.push({[a]:f,[o]:d});return u}if(s.length)return s.map(u=>({[a]:u}));if(c.length)return c.map(u=>({[o]:u}))})()}}]}}}),V3=Pl((t,e=yet,n=met,r=bet,i={})=>{const{data:a,encode:o,children:s,scale:c,x:l=0,y:u=0,shareData:f=!1,key:d}=t,{value:h}=a,{x:p,y:v}=o,{color:g}=c,{domain:y}=g;return{children:(b,x,_)=>{const{x:O,y:w}=x,{paddingLeft:S,paddingTop:M,marginLeft:E,marginTop:P}=_,{domain:L}=O.getOptions(),{domain:A}=w.getOptions(),T=ec(b),C=b.map(e),N=b.map(({x:U,y:V})=>[O.invert(U),w.invert(V)]),j=N.map(([U,V])=>it=>{const{[p]:pt,[v]:Ot}=it;return(p!==void 0?pt===U:!0)&&(v!==void 0?Ot===V:!0)}).map(U=>h.filter(U)),D=f?sn(j,U=>U.length):void 0,G=N.map(([U,V])=>({columnField:p,columnIndex:L.indexOf(U),columnValue:U,columnValuesLength:L.length,rowField:v,rowIndex:A.indexOf(V),rowValue:V,rowValuesLength:A.length})),Y=G.map(U=>Array.isArray(s)?s:[s(U)].flat(1));return T.flatMap(U=>{const[V,it,pt,Ot]=C[U],ht=G[U],ut=j[U];return Y[U].map(wt=>{var Gt,Ut,{scale:te,key:ie,facet:ye=!0,axis:We={},legend:de={}}=wt,we=vet(wt,["scale","key","facet","axis","legend"]);const En=((Gt=te==null?void 0:te.y)===null||Gt===void 0?void 0:Gt.guide)||We.y,ir=((Ut=te==null?void 0:te.x)===null||Ut===void 0?void 0:Ut.guide)||We.x,Ai={x:{tickCount:p?5:void 0},y:{tickCount:v?5:void 0}},Pn=ye?ut:ut.length===0?[]:h,Qn={color:{domain:y}},he={x:U3(ir,n)(ht,Pn),y:U3(En,r)(ht,Pn)};return Object.assign(Object.assign({key:`${ie}-${U}`,data:Pn,margin:0,x:V+S+l+E,y:it+M+u+P,parentKey:d,width:pt,height:Ot,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,frame:!!Pn.length,dataDomain:D,scale:dt(Ai,te,Qn),axis:dt({},We,he),legend:!1},we),i)})})}}});function yet(t){const{points:e}=t;return hm(e)}function M0(t,e){return e.length?dt({title:!1,tick:null,label:null},t):dt({title:!1,tick:null,label:null,grid:null},t)}function met(t){return(e,n)=>{const{rowIndex:r,rowValuesLength:i,columnIndex:a,columnValuesLength:o}=e;if(r!==i-1)return M0(t,n);const s=a!==o-1?!1:void 0,c=n.length?void 0:null;return dt({title:s,grid:c},t)}}function bet(t){return(e,n)=>{const{rowIndex:r,columnIndex:i}=e;if(i!==0)return M0(t,n);const a=r!==0?!1:void 0,o=n.length?void 0:null;return dt({title:a,grid:o},t)}}function U3(t,e){return typeof t=="function"?t:t===null||t===!1?()=>null:e(t)}const X3=()=>t=>[ed.of(t).call(pb).call(fb).call(db).call(get).call(hb).call($3).call(V3).value()];X3.props={};var vb=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const xet=El(t=>({scale:{x:{guide:null,paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}})),_et=Pl(t=>{const{data:e,children:n,x:r=0,y:i=0,key:a}=t;return{children:(s,c,l)=>{const{x:u,y:f}=c,{paddingLeft:d,paddingTop:h,marginLeft:p,marginTop:v}=l,{domain:g}=u.getOptions(),{domain:y}=f.getOptions(),m=ec(s),b=s.map(({points:w})=>hm(w)),x=s.map(({x:w,y:S})=>[u.invert(w),f.invert(S)]),_=x.map(([w,S])=>({columnField:w,columnIndex:g.indexOf(w),columnValue:w,columnValuesLength:g.length,rowField:S,rowIndex:y.indexOf(S),rowValue:S,rowValuesLength:y.length})),O=_.map(w=>Array.isArray(n)?n:[n(w)].flat(1));return m.flatMap(w=>{const[S,M,E,P]=b[w],[L,A]=x[w],T=_[w];return O[w].map(N=>{var B,j;const{scale:D,key:G,encode:Y,axis:U,interaction:V}=N,it=vb(N,["scale","key","encode","axis","interaction"]),pt=(B=D==null?void 0:D.y)===null||B===void 0?void 0:B.guide,Ot=(j=D==null?void 0:D.x)===null||j===void 0?void 0:j.guide,ht={x:{facet:!1},y:{facet:!1}},ut={x:wet(Ot)(T,e),y:Met(pt)(T,e)},Lt={x:{tickCount:5},y:{tickCount:5}};return Object.assign({data:e,parentKey:a,key:`${G}-${w}`,x:S+d+r+p,y:M+h+i+v,width:E,height:P,margin:0,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,frame:!0,scale:dt(ht,D),axis:dt(Lt,U,ut),legend:!1,encode:dt({},Y,{x:L,y:A}),interaction:dt({},V,{legendFilter:!1})},it)})})}}}),Oet=Pl(t=>{const{encode:e}=t,n=vb(t,["encode"]),{position:r=[],x:i=r,y:a=[...r].reverse()}=e,o=vb(e,["position","x","y"]),s=[];for(const c of[i].flat(1))for(const l of[a].flat(1))s.push({$x:c,$y:l});return Object.assign(Object.assign({},n),{data:s,encode:Object.assign(Object.assign({},o),{x:"$x",y:"$y"}),scale:Object.assign(Object.assign({},[i].flat(1).length===1&&{x:{paddingInner:0}}),[a].flat(1).length===1&&{y:{paddingInner:0}})})});function wet(t){return typeof t=="function"?t:t===null?()=>null:(e,n)=>{const{rowIndex:r,rowValuesLength:i}=e;if(r!==i-1)return M0(t,n)}}function Met(t){return typeof t=="function"?t:t===null?()=>null:(e,n)=>{const{columnIndex:r}=e;if(r!==0)return M0(t,n)}}const Eet=()=>t=>[ed.of(t).call(pb).call(fb).call(_et).call(Oet).call(db).call(hb).call(xet).value()];var Pet=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const Aet=El(t=>({scale:{x:{guide:{type:"axisArc"},paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}})),Tet=El(t=>({coordinate:{type:"polar"}})),Cet=t=>{const{encode:e}=t,n=Pet(t,["encode"]),{position:r}=e;return Object.assign(Object.assign({},n),{encode:{x:r}})};function q3(t){return e=>null}function ket(t){const{points:e}=t,[n,r,i,a]=e,o=Fn(n,a),s=Xn(n,a),c=Xn(r,i),l=bM(s,c),u=1/Math.sin(l/2),f=o/(1+u),d=f*Math.sqrt(2),[h,p]=i,g=Al(s)+l/2,y=f*u,m=h+y*Math.sin(g),b=p-y*Math.cos(g);return[m-d/2,b-d/2,d,d]}const Let=()=>t=>[ed.of(t).call(pb).call(Cet).call(fb).call(Tet).call($3).call(V3,ket,q3,q3,{frame:!1}).call(db).call(hb).call(Aet).value()];function Net(t,e,n){const i=n,a=[0,i],o=[-i+1,-0+1];if(t==="normal")return a;if(t==="reverse")return o;if(t==="alternate")return e%2===0?a:o;if(t==="reverse-alternate")return e%2===0?o:a}function Iet(t,e,n){const r=[t];for(;r.length;){const i=r.pop();i.animate=dt({enter:{duration:e},update:{duration:e,easing:n,type:"morphing",fill:"both"},exit:{type:"fadeOut",duration:e}},i.animate||{});const{children:a}=i;Array.isArray(a)&&r.push(...a)}return t}const Z3=()=>t=>{const{children:e=[],duration:n=1e3,iterationCount:r=1,direction:i="normal",easing:a="ease-in-out-sine"}=t,o=e.length;if(!Array.isArray(e)||o===0)return[];const{key:s}=e[0],c=e.map(l=>Object.assign(Object.assign({},l),{key:s})).map(l=>Iet(l,n,a));return function*(){let l=0,u;for(;r==="infinite"||l<r;){const[f,d]=Net(i,l,o);for(let h=f;h<d;h+=1){const p=Math.abs(h);u!==p&&(yield c[p]),u=p}l++}}};Z3.props={};function ps(t,e,n){const{encode:r}=n;if(t===null)return[e];const i=jet(t).map(o=>{var s;return[o,(s=De(r,o))===null||s===void 0?void 0:s[0]]}).filter(([,o])=>bn(o)),a=o=>i.map(([,s])=>s[o]).join("-");return Array.from(Bn(e,a).values())}function K3(t){return Array.isArray(t)?Bet(t):typeof t=="function"?Det(t):t==="series"?Ret:t==="value"?Fet:t==="sum"?zet:t==="maxIndex"?Get:()=>null}function Q3(t,e){for(const n of t)n.sort(e)}function J3(t,e){return(e==null?void 0:e.domain)||Array.from(new Set(t))}function jet(t){return Array.isArray(t)?t:[t]}function Ret(t,e,n){return nd(r=>n[r])}function Det(t){return(e,n,r)=>nd(i=>t(e[i]))}function Bet(t){return(e,n,r)=>(i,a)=>t.reduce((o,s)=>o!==0?o:qn(e[i][s],e[a][s]),0)}function Fet(t,e,n){return nd(r=>e[r])}function zet(t,e,n){const r=ec(t),i=Array.from(Bn(r,o=>n[+o]).entries()),a=new Map(i.map(([o,s])=>[o,s.reduce((c,l)=>c+ +e[l])]));return nd(o=>a.get(n[o]))}function Get(t,e,n){const r=ec(t),i=Array.from(Bn(r,o=>n[+o]).entries()),a=new Map(i.map(([o,s])=>[o,Cl(s,c=>e[c])]));return nd(o=>a.get(n[o]))}function nd(t){return(e,n)=>qn(t(e),t(n))}const t5=(t={})=>{const{groupBy:e="x",orderBy:n=null,reverse:r=!1,y:i="y",y1:a="y1",series:o=!0}=t;return(s,c)=>{const{data:l,encode:u,style:f={}}=c,[d,h]=De(u,"y"),[p,v]=De(u,"y1"),[g]=o?Ff(u,"series","color"):De(u,"color"),y=ps(e,s,c),b=K3(n)(l,d,g);b&&Q3(y,b);const x=new Array(s.length),_=new Array(s.length),O=new Array(s.length),w=[],S=[];for(const A of y){r&&A.reverse();const T=p?+p[A[0]]:0,C=[],N=[];for(const V of A){const it=O[V]=+d[V]-T;it<0?N.push(V):it>=0&&C.push(V)}const B=C.length>0?C:N,j=N.length>0?N:C;let D=C.length-1,G=0;for(;D>0&&d[B[D]]===0;)D--;for(;G<j.length-1&&d[j[G]]===0;)G++;w.push(B[D]),S.push(j[G]);let Y=T;for(const V of N.reverse()){const it=O[V];Y=x[V]=(_[V]=Y)+it}let U=T;for(const V of C){const it=O[V];it>0?U=x[V]=(_[V]=U)+it:x[V]=_[V]=U}}const M=new Set(w),E=new Set(S),P=i==="y"?x:_,L=a==="y"?x:_;return[s,dt({},c,{encode:{y0:Kp(d,h),y:Mn(P,h),y1:Mn(L,v)},style:Object.assign({first:(A,T)=>M.has(T),last:(A,T)=>E.has(T)},f)})]}};t5.props={};function e5(t,e){let n=0;if(e===void 0)for(let r of t)r!=null&&(r=+r)>=r&&++n;else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(i=+i)>=i&&++n}return n}function Wet(t,e){let n=0,r,i=0,a=0;if(e===void 0)for(let o of t)o!=null&&(o=+o)>=o&&(r=o-i,i+=r/++n,a+=r*(o-i));else{let o=-1;for(let s of t)(s=e(s,++o,t))!=null&&(s=+s)>=s&&(r=s-i,i+=r/++n,a+=r*(s-i))}if(n>1)return a/(n-1)}function n5(t,e){const n=Wet(t,e);return n&&Math.sqrt(n)}function Yet(t,e,n){const r=e5(t),i=n5(t);return r&&i?Math.ceil((n-e)*Math.cbrt(r)/(3.49*i)):1}var r5=Array.prototype,Het=r5.slice,Hmt=r5.map;function gb(t){return()=>t}const $et=Math.sqrt(50),Vet=Math.sqrt(10),Uet=Math.sqrt(2);function E0(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/Math.pow(10,i),o=a>=$et?10:a>=Vet?5:a>=Uet?2:1;let s,c,l;return i<0?(l=Math.pow(10,-i)/o,s=Math.round(t*l),c=Math.round(e*l),s/l<t&&++s,c/l>e&&--c,l=-l):(l=Math.pow(10,i)*o,s=Math.round(t/l),c=Math.round(e/l),s*l<t&&++s,c*l>e&&--c),c<s&&.5<=n&&n<2?E0(t,e,n*2):[s,c,l]}function Xet(t,e,n){if(e=+e,t=+t,n=+n,!(n>0))return[];if(t===e)return[t];const r=e<t,[i,a,o]=r?E0(e,t,n):E0(t,e,n);if(!(a>=i))return[];const s=a-i+1,c=new Array(s);if(r)if(o<0)for(let l=0;l<s;++l)c[l]=(a-l)/-o;else for(let l=0;l<s;++l)c[l]=(a-l)*o;else if(o<0)for(let l=0;l<s;++l)c[l]=(i+l)/-o;else for(let l=0;l<s;++l)c[l]=(i+l)*o;return c}function rd(t,e,n){return e=+e,t=+t,n=+n,E0(t,e,n)[2]}function $mt(t,e,n){e=+e,t=+t,n=+n;const r=e<t,i=r?rd(e,t,n):rd(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}function qet(t,e,n){let r;for(;;){const i=rd(t,e,n);if(i===r||i===0||!isFinite(i))return[t,e];i>0?(t=Math.floor(t/i)*i,e=Math.ceil(e/i)*i):i<0&&(t=Math.ceil(t*i)/i,e=Math.floor(e*i)/i),r=i}}function Zet(t){return Math.max(1,Math.ceil(Math.log(e5(t))/Math.LN2)+1)}function Ket(){var t=of,e=mo,n=Zet;function r(i){Array.isArray(i)||(i=Array.from(i));var a,o=i.length,s,c,l=new Array(o);for(a=0;a<o;++a)l[a]=t(i[a],a,i);var u=e(l),f=u[0],d=u[1],h=n(l,f,d);if(!Array.isArray(h)){const b=d,x=+h;if(e===mo&&([f,d]=qet(f,d,x)),h=Xet(f,d,x),h[0]<=f&&(c=rd(f,d,x)),h[h.length-1]>=d)if(b>=d&&e===mo){const _=rd(f,d,x);isFinite(_)&&(_>0?d=(Math.floor(d/_)+1)*_:_<0&&(d=(Math.ceil(d*-_)+1)/-_))}else h.pop()}for(var p=h.length,v=0,g=p;h[v]<=f;)++v;for(;h[g-1]>d;)--g;(v||g<p)&&(h=h.slice(v,g),p=g-v);var y=new Array(p+1),m;for(a=0;a<=p;++a)m=y[a]=[],m.x0=a>0?h[a-1]:f,m.x1=a<p?h[a]:d;if(isFinite(c)){if(c>0)for(a=0;a<o;++a)(s=l[a])!=null&&f<=s&&s<=d&&y[Math.min(p,Math.floor((s-f)/c))].push(i[a]);else if(c<0){for(a=0;a<o;++a)if((s=l[a])!=null&&f<=s&&s<=d){const b=Math.floor((f-s)*c);y[Math.min(p,b+(h[b]<=s))].push(i[a])}}}else for(a=0;a<o;++a)(s=l[a])!=null&&f<=s&&s<=d&&y[H$(h,s,0,p)].push(i[a]);return y}return r.value=function(i){return arguments.length?(t=typeof i=="function"?i:gb(i),r):t},r.domain=function(i){return arguments.length?(e=typeof i=="function"?i:gb([i[0],i[1]]),r):e},r.thresholds=function(i){return arguments.length?(n=typeof i=="function"?i:gb(Array.isArray(i)?Het.call(i):i),r):n},r}function yb(t,e,n=0,r=1/0,i){if(e=Math.floor(e),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(t.length-1,r)),!(n<=e&&e<=r))return t;for(i=i===void 0?Af:zM(i);r>n;){if(r-n>600){const c=r-n+1,l=e-n+1,u=Math.log(c),f=.5*Math.exp(2*u/3),d=.5*Math.sqrt(u*f*(c-f)/c)*(l-c/2<0?-1:1),h=Math.max(n,Math.floor(e-l*f/c+d)),p=Math.min(r,Math.floor(e+(c-l)*f/c+d));yb(t,e,h,p,i)}const a=t[e];let o=n,s=r;for(id(t,n,e),i(t[r],a)>0&&id(t,n,r);o<s;){for(id(t,o,s),++o,--s;i(t[o],a)<0;)++o;for(;i(t[s],a)>0;)--s}i(t[n],a)===0?id(t,n,s):(++s,id(t,s,r)),s<=e&&(n=s+1),e<=s&&(r=s-1)}return t}function id(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function Qet(t,e=qn){let n,r=!1;if(e.length===1){let i;for(const a of t){const o=e(a);(r?qn(o,i)>0:qn(o,o)===0)&&(n=a,i=o,r=!0)}}else for(const i of t)(r?e(i,n)>0:e(i,i)===0)&&(n=i,r=!0);return n}function P0(t,e,n){if(t=Float64Array.from(z$(t,n)),!(!(r=t.length)||isNaN(e=+e))){if(e<=0||r<2)return Bi(t);if(e>=1)return sn(t);var r,i=(r-1)*e,a=Math.floor(i),o=sn(yb(t,a).subarray(0,a+1)),s=Bi(t.subarray(a+1));return o+(s-o)*(i-a)}}function Vmt(t,e,n=number){if(!(!(r=t.length)||isNaN(e=+e))){if(e<=0||r<2)return+n(t[0],0,t);if(e>=1)return+n(t[r-1],r-1,t);var r,i=(r-1)*e,a=Math.floor(i),o=+n(t[a],a,t),s=+n(t[a+1],a+1,t);return o+(s-o)*(i-a)}}function Jet(t,e,n=xm){if(!isNaN(e=+e)){if(r=Float64Array.from(t,(s,c)=>xm(n(t[c],c,t))),e<=0)return b0(r);if(e>=1)return Cl(r);var r,i=Uint32Array.from(t,(s,c)=>c),a=r.length-1,o=Math.floor(a*e);return yb(i,o,0,a,(s,c)=>Af(r[s],r[c])),o=Qet(i.subarray(0,o+1),s=>r[s]),o>=0?o:-1}}function mb(t,e){return P0(t,.5,e)}function tnt(t,e){return Jet(t,.5,e)}var ent=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function vs(t){return e=>e===null?t:`${t} of ${e}`}function nnt(t){if(typeof t=="function")return[t,null];const n={mean:rnt,max:ant,count:snt,first:lnt,last:unt,sum:cnt,min:ont,median:int}[t];if(!n)throw new Error(`Unknown reducer: ${t}.`);return n()}function rnt(){const t=(n,r)=>Jf(n,i=>+r[i]),e=vs("mean");return[t,e]}function int(){const t=(n,r)=>mb(n,i=>+r[i]),e=vs("median");return[t,e]}function ant(){const t=(n,r)=>sn(n,i=>+r[i]),e=vs("max");return[t,e]}function ont(){const t=(n,r)=>Bi(n,i=>+r[i]),e=vs("min");return[t,e]}function snt(){const t=(n,r)=>n.length,e=vs("count");return[t,e]}function cnt(){const t=(n,r)=>Qi(n,i=>+r[i]),e=vs("sum");return[t,e]}function lnt(){const t=(n,r)=>r[n[0]],e=vs("first");return[t,e]}function unt(){const t=(n,r)=>r[n[n.length-1]],e=vs("last");return[t,e]}const bb=(t={})=>{const{groupBy:e}=t,n=ent(t,["groupBy"]);return(r,i)=>{const{data:a,encode:o}=i,s=e(r,i);if(!s)return[r,i];const c=(h,p)=>{if(h)return h;const{from:v}=p;if(!v)return h;const[,g]=De(o,v);return g},l=Object.entries(n).map(([h,p])=>{const[v,g]=nnt(p),[y,m]=De(o,h),b=c(m,p),x=s.map(_=>v(_,y!=null?y:a));return[h,Object.assign(Object.assign({},XZ(x,(g==null?void 0:g(b))||b)),{aggregate:!0})]}),u=Object.keys(o).map(h=>{const[p,v]=De(o,h),g=s.map(y=>p[y[0]]);return[h,Mn(g,v)]}),f=s.map(h=>a[h[0]]);return[ec(s),dt({},i,{data:f,encode:Object.fromEntries([...u,...l])})]}};bb.props={};var fnt=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const i5="thresholds";function dnt(t){const[e,n]=mo(t);return Math.min(200,Yet(t,e,n))}const xb=(t={})=>{const{groupChannels:e=["color"],binChannels:n=["x","y"]}=t,r=fnt(t,["groupChannels","binChannels"]),i={},a=(o,s)=>{const{encode:c}=s,l=n.map(p=>{const[v]=De(c,p);return v}),u=At(r,i5),f=o.filter(p=>l.every(v=>bn(v[p]))),d=[...e.map(p=>{const[v]=De(c,p);return v}).filter(bn).map(p=>v=>p[v]),...n.map((p,v)=>{const g=l[v],y=u[p]||dnt(g),m=Ket().thresholds(y).value(x=>+g[x])(f),b=new Map(m.flatMap(x=>{const{x0:_,x1:O}=x,w=`${_},${O}`;return x.map(S=>[S,w])}));return i[p]=b,x=>b.get(x)})],h=p=>d.map(v=>v(p)).join("-");return Array.from(Bn(f,h).values())};return bb(Object.assign(Object.assign(Object.assign({},Object.fromEntries(Object.entries(r).filter(([o])=>!o.startsWith(i5)))),Object.fromEntries(n.flatMap(o=>{const s=([l])=>+i[o].get(l).split(",")[0],c=([l])=>+i[o].get(l).split(",")[1];return c.from=o,[[o,s],[`${o}1`,c]]}))),{groupBy:a}))};xb.props={};const a5=(t={})=>{const{thresholds:e}=t;return xb(Object.assign(Object.assign({},t),{thresholdsX:e,groupChannels:["color"],binChannels:["x"]}))};a5.props={};var hnt=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const o5=(t={})=>{const{groupBy:e="x",reverse:n=!1,orderBy:r,padding:i}=t,a=hnt(t,["groupBy","reverse","orderBy","padding"]);return(o,s)=>{const{data:c,encode:l,scale:u}=s,{series:f}=u,[d]=De(l,"y"),[h]=Ff(l,"series","color"),p=J3(h,f),v=ps(e,o,s),y=K3(r)(c,d,h);y&&Q3(v,y);const m=new Array(o.length);for(const b of v){n&&b.reverse();for(let x=0;x<b.length;x++)m[b[x]]=p[x]}return[o,dt({},s,{scale:{series:{domain:p,paddingInner:i}},encode:{series:Mn(m)}})]}};o5.props={};function A0(t,e,n){if(t===null)return[-.5,.5];const r=J3(t,e),a=new us({domain:r,range:[0,1],padding:n}).getBandWidth();return[-a/2,a/2]}function T0(t,e,n){return e*(1-t)+n*t}const s5=(t={})=>{const{padding:e=0,paddingX:n=e,paddingY:r=e,random:i=Math.random}=t;return(a,o)=>{const{encode:s,scale:c}=o,{x:l,y:u}=c,[f]=De(s,"x"),[d]=De(s,"y"),h=A0(f,l,n),p=A0(d,u,r),v=a.map(()=>T0(i(),...p)),g=a.map(()=>T0(i(),...h));return[a,dt({scale:{x:{padding:.5},y:{padding:.5}}},o,{encode:{dy:Mn(v),dx:Mn(g)}})]}};s5.props={};const c5=(t={})=>{const{padding:e=0,random:n=Math.random}=t;return(r,i)=>{const{encode:a,scale:o}=i,{x:s}=o,[c]=De(a,"x"),l=A0(c,s,e),u=r.map(()=>T0(n(),...l));return[r,dt({scale:{x:{padding:.5}}},i,{encode:{dx:Mn(u)}})]}};c5.props={};const l5=(t={})=>{const{padding:e=0,random:n=Math.random}=t;return(r,i)=>{const{encode:a,scale:o}=i,{y:s}=o,[c]=De(a,"y"),l=A0(c,s,e),u=r.map(()=>T0(n(),...l));return[r,dt({scale:{y:{padding:.5}}},i,{encode:{dy:Mn(u)}})]}};l5.props={};var pnt=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const u5=(t={})=>{const{groupBy:e="x"}=t;return(n,r)=>{const{encode:i}=r,{x:a}=i,o=pnt(i,["x"]),s=Object.entries(o).filter(([d])=>d.startsWith("y")).map(([d])=>[d,De(i,d)[0]]),c=s.map(([d])=>[d,new Array(n.length)]),l=ps(e,n,r),u=new Array(l.length);for(let d=0;d<l.length;d++){const p=l[d].flatMap(y=>s.map(([,m])=>+m[y])),[v,g]=mo(p);u[d]=(v+g)/2}const f=Math.max(...u);for(let d=0;d<l.length;d++){const h=f-u[d],p=l[d];for(const v of p)for(let g=0;g<s.length;g++){const[,y]=s[g],[,m]=c[g];m[v]=+y[v]+h}}return[n,dt({},r,{encode:Object.fromEntries(c.map(([d,h])=>[d,Mn(h,De(i,d)[1])]))})]}};u5.props={};const f5=(t={})=>{const{groupBy:e="x",series:n=!0}=t;return(r,i)=>{const{encode:a}=i,[o]=De(a,"y"),[s,c]=De(a,"y1"),[l]=n?Ff(a,"series","color"):De(a,"color"),u=ps(e,r,i),f=new Array(r.length);for(const d of u){const h=d.map(p=>+o[p]);for(let p=0;p<d.length;p++){const v=d[p],g=Math.max(...h.filter((y,m)=>m!==p));f[v]=o[v]>g?g:o[v]}}return[r,dt({},i,{encode:{y1:Mn(f,c)}})]}};f5.props={};const d5=t=>{const{groupBy:e=["x"],reducer:n=(o,s)=>s[o[0]],orderBy:r=null,reverse:i=!1,duration:a}=t;return(o,s)=>{const{encode:c}=s,u=(Array.isArray(e)?e:[e]).map(g=>[g,De(c,g)[0]]);if(u.length===0)return[o,s];let f=[o];for(const[,g]of u){const y=[];for(const m of f){const b=Array.from(Bn(m,x=>g[x]).values());y.push(...b)}f=y}if(r){const[g]=De(c,r);g&&f.sort((y,m)=>n(y,g)-n(m,g)),i&&f.reverse()}const d=(a||3e3)/f.length,[h]=a?[cs(o,d)]:Ff(c,"enterDuration",cs(o,d)),[p]=Ff(c,"enterDelay",cs(o,0)),v=new Array(o.length);for(let g=0,y=0;g<f.length;g++){const m=f[g],b=sn(m,x=>+h[x]);for(const x of m)v[x]=+p[x]+y;y+=b}return[o,dt({},s,{encode:{enterDuration:Qp(h),enterDelay:Qp(v)}})]}};d5.props={};var vnt=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function gnt(t){return typeof t=="function"?t:{min:(n,r)=>Bi(n,i=>r[+i]),max:(n,r)=>sn(n,i=>r[+i]),first:(n,r)=>r[n[0]],last:(n,r)=>r[n[n.length-1]],mean:(n,r)=>Jf(n,i=>r[+i]),median:(n,r)=>mb(n,i=>r[+i]),sum:(n,r)=>Qi(n,i=>r[+i]),deviation:(n,r)=>n5(n,i=>r[+i])}[t]||sn}const h5=(t={})=>{const{groupBy:e="x",basis:n="max"}=t;return(r,i)=>{const{encode:a,tooltip:o}=i,{x:s}=a,c=vnt(a,["x"]),l=Object.entries(c).filter(([v])=>v.startsWith("y")).map(([v])=>[v,De(a,v)[0]]),[,u]=l.find(([v])=>v==="y"),f=l.map(([v])=>[v,new Array(r.length)]),d=ps(e,r,i),h=gnt(n);for(const v of d){const g=h(v,u);for(const y of v)for(let m=0;m<l.length;m++){const[,b]=l[m],[,x]=f[m];x[y]=+b[y]/g}}const p=po(o)||(o==null?void 0:o.items)&&(o==null?void 0:o.items.length)!==0;return[r,dt({},i,Object.assign({encode:Object.fromEntries(f.map(([v,g])=>[v,Mn(g,De(a,v)[1])]))},!p&&a.y0&&{tooltip:{items:[{channel:"y0"}]}}))]}};h5.props={};function p5(t,e){return[t[0]]}function ynt(t,e){const n=t.length-1;return[t[n]]}function mnt(t,e){const n=Cl(t,r=>e[r]);return[t[n]]}function bnt(t,e){const n=b0(t,r=>e[r]);return[t[n]]}function xnt(t){return typeof t=="function"?t:{first:p5,last:ynt,max:mnt,min:bnt}[t]||p5}const C0=(t={})=>{const{groupBy:e="series",channel:n,selector:r}=t;return(i,a)=>{const{encode:o}=a,s=ps(e,i,a),[c]=De(o,n),l=xnt(r);return[s.flatMap(u=>l(u,c)),a]}};C0.props={};var _nt=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const v5=(t={})=>{const{selector:e}=t,n=_nt(t,["selector"]);return C0(Object.assign({channel:"x",selector:e},n))};v5.props={};var Ont=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const g5=(t={})=>{const{selector:e}=t,n=Ont(t,["selector"]);return C0(Object.assign({channel:"y",selector:e},n))};g5.props={};var wnt=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const ad=(t={})=>{const{channels:e=["x","y"]}=t,n=wnt(t,["channels"]),r=(i,a)=>ps(e,i,a);return bb(Object.assign(Object.assign({},n),{groupBy:r}))};ad.props={};const y5=(t={})=>ad(Object.assign(Object.assign({},t),{channels:["x","color","series"]}));y5.props={};const m5=(t={})=>ad(Object.assign(Object.assign({},t),{channels:["y","color","series"]}));m5.props={};const b5=(t={})=>ad(Object.assign(Object.assign({},t),{channels:["color"]}));b5.props={};function Snt(t,e,n){return(e.length!==2?xo(Ey(t,e,n),([r,i],[a,o])=>qn(i,o)||qn(r,a)):xo(Bn(t,n),([r,i],[a,o])=>e(i,o)||qn(r,a))).map(([r])=>r)}var x5=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function Mnt(t,e,n){const{by:r=t,reducer:i="max"}=e,[a]=De(n,r);if(typeof i=="function")return o=>i(o,a);if(i==="max")return o=>sn(o,s=>+a[s]);if(i==="min")return o=>Bi(o,s=>+a[s]);if(i==="sum")return o=>Qi(o,s=>+a[s]);if(i==="median")return o=>mb(o,s=>+a[s]);if(i==="mean")return o=>Jf(o,s=>+a[s]);if(i==="first")return o=>a[o[0]];if(i==="last")return o=>a[o[o.length-1]];throw new Error(`Unknown reducer: ${i}`)}function Ent(t,e,n){const{reverse:r,channel:i}=n,{encode:a}=e,[o]=De(a,i),s=xo(t,c=>o[c]);return r&&s.reverse(),[s,e]}function Pnt(t,e,n){if(!Array.isArray(n))return t;const r=new Set(n);return t.filter(i=>r.has(e[i]))}function Ant(t,e,n){var r;const{reverse:i,slice:a,channel:o}=n,s=x5(n,["reverse","slice","channel"]),{encode:c,scale:l={}}=e,u=(r=l[o])===null||r===void 0?void 0:r.domain,[f]=De(c,o),d=Mnt(o,s,c),h=Pnt(t,f,u),p=Snt(h,d,y=>f[y]);i&&p.reverse();const v=typeof a=="number"?[0,a]:a,g=a?p.slice(...v):p;return[t,dt(e,{scale:{[o]:{domain:g}}})]}const k0=(t={})=>{const{reverse:e=!1,slice:n,channel:r,ordinal:i=!0}=t,a=x5(t,["reverse","slice","channel","ordinal"]);return(o,s)=>i?Ant(o,s,Object.assign({reverse:e,slice:n,channel:r},a)):Ent(o,s,Object.assign({reverse:e,slice:n,channel:r},a))};k0.props={};const _5=(t={})=>k0(Object.assign(Object.assign({},t),{channel:"x"}));_5.props={};const O5=(t={})=>k0(Object.assign(Object.assign({},t),{channel:"y"}));O5.props={};const w5=(t={})=>k0(Object.assign(Object.assign({},t),{channel:"color"}));w5.props={};function Tnt(t,e){return typeof e=="string"?t.map(n=>n[e]):t.map(e)}function Cnt(t,e){if(typeof t=="function")return n=>t(n,e);if(t==="sum")return n=>Qi(n,r=>+e[r]);throw new Error(`Unknown reducer: ${t}`)}const S5=(t={})=>{const{field:e,channel:n="y",reducer:r="sum"}=t;return(i,a)=>{const{data:o,encode:s}=a,[c]=De(s,"x"),l=e?Tnt(o,e):De(s,n)[0],u=Cnt(r,l),f=Py(i,u,d=>c[d]).map(d=>d[1]);return[i,dt({},a,{scale:{x:{flex:f}}})]}};S5.props={};function knt(t){const{padding:e=0,direction:n="col"}=t;return(r,i,a)=>{const o=r.length;if(o===0)return[];const{innerWidth:s,innerHeight:c}=a,l=c/s;let u=Math.ceil(Math.sqrt(i/l)),f=s/u,d=Math.ceil(i/u),h=d*f;for(;h>c;)u=u+1,f=s/u,d=Math.ceil(i/u),h=d*f;const p=c-d*f,v=d<=1?0:p/(d-1),[g,y]=d<=1?[(s-o*f)/(o-1),(c-f)/2]:[0,0];return r.map((m,b)=>{const[x,_,O,w]=hm(m),S=n==="col"?b%u:Math.floor(b/d),M=n==="col"?Math.floor(b/u):b%d,E=S*f,P=(d-M-1)*f+p,L=(f-e)/O,A=(f-e)/w,T=E-x+g*S+1/2*e,C=P-_-v*M-y+1/2*e;return`translate(${T}, ${C}) scale(${L}, ${A})`})}}const M5=t=>(e,n)=>[e,dt({},n,{modifier:knt(t),axis:!1})];M5.props={};function Lnt(t,e,n,r){const i=t.length;if(r>=i||r===0)return t;const a=h=>e[t[h]]*1,o=h=>n[t[h]]*1,s=[],c=(i-2)/(r-2);let l=0,u,f,d;s.push(l);for(let h=0;h<r-2;h++){let p=0,v=0,g=Math.floor((h+1)*c)+1,y=Math.floor((h+2)*c)+1;y=Math.min(y,i);const m=y-g;for(;g<y;g++)p+=a(g),v+=o(g);p/=m,v/=m;let b=Math.floor((h+0)*c)+1;const x=Math.floor((h+1)*c)+1,_=[a(l),o(l)];for(u=f=-1;b<x;b++)f=Math.abs((_[0]-p)*(a(b)-_[1])-(_[0]-o(b))*(v-_[0]))*.5,f>u&&(u=f,d=b);s.push(d),l=d}return s.push(i-1),s.map(h=>t[h])}function Nnt(t){if(typeof t=="function")return t;if(t==="lttb")return Lnt;const e={first:r=>[r[0]],last:r=>[r[r.length-1]],min:(r,i,a)=>[r[b0(r,o=>a[o])]],max:(r,i,a)=>[r[Cl(r,o=>a[o])]],median:(r,i,a)=>[r[tnt(r,o=>a[o])]]},n=e[t]||e.median;return(r,i,a,o)=>{const s=Math.max(1,Math.floor(r.length/o));return Int(r,s).flatMap(l=>n(l,i,a))}}function Int(t,e){const n=t.length,r=[];let i=0;for(;i<n;)r.push(t.slice(i,i+=e));return r}const E5=(t={})=>{const{strategy:e="median",thresholds:n=2e3,groupBy:r=["series","color"]}=t,i=Nnt(e);return(a,o)=>{const{encode:s}=o,c=ps(r,a,o),[l]=De(s,"x"),[u]=De(s,"y");return[c.flatMap(f=>i(f,l,u,n)),o]}};E5.props={};function jnt(t){return typeof t=="object"?[t.value,t.ordinal]:[t,!0]}const P5=(t={})=>(e,n)=>{const{encode:r,data:i}=n,a=Object.entries(t).map(([u,f])=>{const[d]=De(r,u);if(!d)return null;const[h,p=!0]=jnt(f);if(typeof h=="function")return v=>h(d[v]);if(p){const v=Array.isArray(h)?h:[h];return v.length===0?null:g=>v.includes(d[g])}else{const[v,g]=h;return y=>d[y]>=v&&d[y]<=g}}).filter(bn);if(a.length===0)return[e,n];const o=u=>a.every(f=>f(u)),s=e.filter(o),c=s.map((u,f)=>f),l=Object.entries(r).map(([u,f])=>[u,Object.assign(Object.assign({},f),{value:c.map(d=>f.value[s[d]]).filter(d=>d!==void 0)})]);return[c,dt({},n,{encode:Object.fromEntries(l),data:s.map(u=>i[u])})]};P5.props={};var A5={},_b={},Ob=34,od=10,wb=13;function T5(t){return new Function("d","return {"+t.map(function(e,n){return JSON.stringify(e)+": d["+n+'] || ""'}).join(",")+"}")}function Rnt(t,e){var n=T5(t);return function(r,i){return e(n(r),i,t)}}function C5(t){var e=Object.create(null),n=[];return t.forEach(function(r){for(var i in r)i in e||n.push(e[i]=i)}),n}function Ei(t,e){var n=t+"",r=n.length;return r<e?new Array(e-r+1).join(0)+n:n}function Dnt(t){return t<0?"-"+Ei(-t,6):t>9999?"+"+Ei(t,6):Ei(t,4)}function Bnt(t){var e=t.getUTCHours(),n=t.getUTCMinutes(),r=t.getUTCSeconds(),i=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":Dnt(t.getUTCFullYear(),4)+"-"+Ei(t.getUTCMonth()+1,2)+"-"+Ei(t.getUTCDate(),2)+(i?"T"+Ei(e,2)+":"+Ei(n,2)+":"+Ei(r,2)+"."+Ei(i,3)+"Z":r?"T"+Ei(e,2)+":"+Ei(n,2)+":"+Ei(r,2)+"Z":n||e?"T"+Ei(e,2)+":"+Ei(n,2)+"Z":"")}function Fnt(t){var e=new RegExp('["'+t+`
\r]`),n=t.charCodeAt(0);function r(f,d){var h,p,v=i(f,function(g,y){if(h)return h(g,y-1);p=g,h=d?Rnt(g,d):T5(g)});return v.columns=p||[],v}function i(f,d){var h=[],p=f.length,v=0,g=0,y,m=p<=0,b=!1;f.charCodeAt(p-1)===od&&--p,f.charCodeAt(p-1)===wb&&--p;function x(){if(m)return _b;if(b)return b=!1,A5;var O,w=v,S;if(f.charCodeAt(w)===Ob){for(;v++<p&&f.charCodeAt(v)!==Ob||f.charCodeAt(++v)===Ob;);return(O=v)>=p?m=!0:(S=f.charCodeAt(v++))===od?b=!0:S===wb&&(b=!0,f.charCodeAt(v)===od&&++v),f.slice(w+1,O-1).replace(/""/g,'"')}for(;v<p;){if((S=f.charCodeAt(O=v++))===od)b=!0;else if(S===wb)b=!0,f.charCodeAt(v)===od&&++v;else if(S!==n)continue;return f.slice(w,O)}return m=!0,f.slice(w,p)}for(;(y=x())!==_b;){for(var _=[];y!==A5&&y!==_b;)_.push(y),y=x();d&&(_=d(_,g++))==null||h.push(_)}return h}function a(f,d){return f.map(function(h){return d.map(function(p){return u(h[p])}).join(t)})}function o(f,d){return d==null&&(d=C5(f)),[d.map(u).join(t)].concat(a(f,d)).join(`
`)}function s(f,d){return d==null&&(d=C5(f)),a(f,d).join(`
`)}function c(f){return f.map(l).join(`
`)}function l(f){return f.map(u).join(t)}function u(f){return f==null?"":f instanceof Date?Bnt(f):e.test(f+="")?'"'+f.replace(/"/g,'""')+'"':f}return{parse:r,parseRows:i,format:o,formatBody:s,formatRows:c,formatRow:l,formatValue:u}}function znt(t){for(var e in t){var n=t[e].trim(),r,i;if(!n)n=null;else if(n==="true")n=!0;else if(n==="false")n=!1;else if(n==="NaN")n=NaN;else if(!isNaN(r=+n))n=r;else if(i=n.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/))Gnt&&i[4]&&!i[7]&&(n=n.replace(/-/g,"/").replace(/T/," ")),n=new Date(n);else continue;t[e]=n}return t}const Gnt=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours();var Wnt=function(t,e,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{l(r.next(u))}catch(f){o(f)}}function c(u){try{l(r.throw(u))}catch(f){o(f)}}function l(u){u.done?a(u.value):i(u.value).then(s,c)}l((r=r.apply(t,e||[])).next())})};const k5=t=>{const{value:e,format:n=e.split(".").pop(),delimiter:r=",",autoType:i=!0}=t;return()=>Wnt(void 0,void 0,void 0,function*(){const a=yield fetch(e);if(n==="csv"){const o=yield a.text();return Fnt(r).parse(o,i?znt:tc)}else if(n==="json")return yield a.json();throw new Error(`Unknown format: ${n}.`)})};k5.props={};const L5=t=>{const{value:e}=t;return()=>e};L5.props={};function Ynt(t,e){return t.map(n=>{if(Array.isArray(n)){const[r,i=e]=n;return[r,i]}return[n,e]})}const N5=t=>{const{fields:e=[]}=t,n=Ynt(e,!0);return r=>{const i=(a,o)=>n.reduce((s,[c,l=!0])=>s!==0?s:l?a[c]<o[c]?-1:+(a[c]!==o[c]):a[c]>o[c]?-1:+(a[c]!==o[c]),0);return[...r].sort(i)}};N5.props={};function Umt(t){return t!=null&&!Number.isNaN(t)}const I5=t=>{const{callback:e}=t;return n=>Array.isArray(n)?[...n].sort(e):n};I5.props={};function Hnt(t){return t!=null&&!Number.isNaN(t)}const j5=t=>{const{callback:e=Hnt}=t;return n=>n.filter(e)};j5.props={};function $nt(t,e=[]){return e.reduce((n,r)=>(r in t&&(n[r]=t[r]),n),{})}const R5=t=>{const{fields:e}=t;return n=>n.map(r=>$nt(r,e))};R5.props={};function Vnt(t){return Object.keys(t).length===0}const D5=t=>e=>{if(!t||Vnt(t))return e;const n=r=>Object.entries(r).reduce((i,[a,o])=>(i[t[a]||a]=o,i),{});return e.map(n)};D5.props={};function Unt(t){return!t||Object.keys(t).length===0}const B5=t=>{const{fields:e,key:n="key",value:r="value"}=t;return i=>Unt(e)?i:i.flatMap(a=>e.map(o=>Object.assign(Object.assign({},a),{[n]:o,[r]:a[o]})))};B5.props={};const F5=t=>{const{start:e,end:n}=t;return r=>r.slice(e,n)};F5.props={};const z5=t=>{const{callback:e=tc}=t;return n=>e(n)};z5.props={};const G5=t=>{const{callback:e=tc}=t;return n=>Array.isArray(n)?n.map(e):n};G5.props={};function W5(t){return typeof t=="string"?e=>e[t]:t}const Y5=t=>{const{join:e,on:n,select:r=[],as:i=r,unknown:a=NaN}=t,[o,s]=n,c=W5(s),l=W5(o),u=Ey(e,([f])=>f,f=>c(f));return f=>f.map(d=>{const h=u.get(l(d));return Object.assign(Object.assign({},d),r.reduce((p,v,g)=>(p[i[g]]=h?h[v]:a,p),{}))})};Y5.props={};var Xnt=J(53843),qnt=J.n(Xnt);function Xmt(t){return t!=null&&!Number.isNaN(t)}const H5=t=>{const{field:e,groupBy:n,as:r=["y","size"],min:i,max:a,size:o=10,width:s}=t,[c,l]=r;return u=>Array.from(Bn(u,d=>n.map(h=>d[h]).join("-")).values()).map(d=>{const h=qnt().create(d.map(g=>g[e]),{min:i,max:a,size:o,width:s}),p=h.map(g=>g.x),v=h.map(g=>g.y);return Object.assign(Object.assign({},d[0]),{[c]:p,[l]:v})})};H5.props={};const $5=()=>t=>(console.log("G2 data section:",t),t);$5.props={};function Sb(t){const{min:e,max:n}=t;return[[e[0],e[1]],[n[0],n[1]]]}function V5(t,e){const[n,r]=t,[i,a]=e;return n>=i[0]&&n<=a[0]&&r>=i[1]&&r<=a[1]}function Znt(t,e){const[n,r]=t;return!(V5(n,e)&&V5(r,e))}function Knt(t,e){const[n,r]=t,[i,a]=e;return n[0]<a[0]&&r[0]>i[0]&&n[1]<a[1]&&r[1]>i[1]}const Qnt=t=>{const{priority:e}=t;return n=>{const r=[];return e&&n.sort(e),n.forEach(i=>{Sm(i);const a=i.getLocalBounds();r.some(s=>Knt(Sb(a),Sb(s.getLocalBounds())))?wm(i):r.push(i)}),n}};function Jnt([t,e],[n,r]){return r>t&&e>n}function L0(){const t=new Map;return[r=>t.get(r),(r,i)=>t.set(r,i)]}function trt(t){const e=t.cloneNode(!0),n=e.getElementById("connector");n&&e.removeChild(n);const{min:r,max:i}=e.getRenderBounds();return e.destroy(),{min:r,max:i}}const ert=t=>{const{maxIterations:e=10,maxError:n=.1,padding:r=1}=t;return i=>{const a=i.length;if(a<=1)return i;const[o,s]=L0(),[c,l]=L0(),[u,f]=L0(),[d,h]=L0();for(const p of i){const{min:v,max:g}=trt(p),[y,m]=v,[b,x]=g;s(p,m),l(p,m),f(p,x-m),h(p,[y,b])}for(let p=0;p<e;p++){i.sort((g,y)=>qn(c(g),c(y)));let v=0;for(let g=0;g<a-1;g++){const y=i[g];let m=g+1,b;for(;(b=i[m])&&!Jnt(d(y),d(b));)m+=1;if(b){const x=c(y),_=u(y),O=c(b),w=O-(x+_);if(w<r){const S=(r-w)/2;v=Math.max(v,S),l(y,x-S),l(b,O+S)}}}if(v<n)break}for(const p of i)p.style.y+=c(p)-o(p);return i}},nrt=()=>t=>(t.forEach(e=>{Sm(e);const n=e.attr("bounds"),r=e.getLocalBounds();Znt(Sb(r),n)&&wm(e)}),t);function rrt(t){return typeof t=="object"?t:co(t)}function Mb(t){let e=t/255;return e=e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4),e}function U5(t,e,n){return .2126*Mb(t)+.7152*Mb(e)+.0722*Mb(n)}function X5(t,e){const{r:n,g:r,b:i}=t,{r:a,g:o,b:s}=e,c=U5(n,r,i),l=U5(a,o,s);return(Math.max(c,l)+.05)/(Math.min(c,l)+.05)}function irt(t,e){const n=Cl(e,r=>X5(t,rrt(r)));return e[n]}const art=t=>{const{threshold:e=4.5,palette:n=["#000","#fff"]}=t;return r=>(r.forEach(i=>{const a=i.attr("dependentElement").parsedStyle.fill,o=i.parsedStyle.fill;X5(o,a)<e&&i.attr("fill",irt(a,n))}),r)};function ort(){return{"data.fetch":k5,"data.inline":L5,"data.sortBy":N5,"data.sort":I5,"data.filter":j5,"data.pick":R5,"data.rename":D5,"data.fold":B5,"data.slice":F5,"data.custom":z5,"data.map":G5,"data.join":Y5,"data.kde":H5,"data.log":$5,"transform.stackY":t5,"transform.binX":a5,"transform.bin":xb,"transform.dodgeX":o5,"transform.jitter":s5,"transform.jitterX":c5,"transform.jitterY":l5,"transform.symmetryY":u5,"transform.diffY":f5,"transform.stackEnter":d5,"transform.normalizeY":h5,"transform.select":C0,"transform.selectX":v5,"transform.selectY":g5,"transform.groupX":y5,"transform.groupY":m5,"transform.groupColor":b5,"transform.group":ad,"transform.sortX":_5,"transform.sortY":O5,"transform.sortColor":w5,"transform.flexX":S5,"transform.pack":M5,"transform.sample":E5,"transform.filter":P5,"coordinate.cartesian":IP,"coordinate.polar":lf,"coordinate.transpose":t1,"coordinate.theta":jP,"coordinate.parallel":e1,"coordinate.fisheye":RP,"coordinate.radial":jy,"coordinate.radar":DP,"encode.constant":BP,"encode.field":FP,"encode.transform":zP,"encode.column":GP,"mark.interval":qP,"mark.rect":KP,"mark.line":wA,"mark.point":uT,"mark.text":vT,"mark.cell":yT,"mark.area":MT,"mark.link":M1,"mark.image":FT,"mark.polygon":HT,"mark.box":XT,"mark.vector":ZT,"mark.lineX":tC,"mark.lineY":rC,"mark.connector":sC,"mark.range":uC,"mark.rangeX":hC,"mark.rangeY":gC,"mark.path":_C,"mark.shape":SC,"mark.density":PC,"mark.heatmap":kC,"palette.category10":LC,"palette.category20":NC,"scale.linear":IC,"scale.ordinal":BC,"scale.band":GC,"scale.identity":WC,"scale.point":YC,"scale.time":fk,"scale.log":hk,"scale.pow":pk,"scale.sqrt":vk,"scale.threshold":gk,"scale.quantile":yk,"scale.quantize":mk,"scale.sequential":bk,"scale.constant":xk,"theme.classic":_k,"theme.classicDark":wk,"theme.academy":Sk,"theme.light":B1,"theme.dark":Ok,"component.axisX":Mk,"component.axisY":Ek,"component.legendCategory":z1,"component.legendContinuous":es,"component.legends":Ak,"component.title":Ck,"component.sliderX":Ik,"component.sliderY":jk,"component.scrollbarX":Rk,"component.scrollbarY":Dk,"animation.scaleInX":H1,"animation.scaleOutX":_J,"animation.scaleInY":Bk,"animation.scaleOutY":OJ,"animation.waveIn":Fk,"animation.fadeIn":zk,"animation.fadeOut":Gk,"animation.zoomIn":wJ,"animation.zoomOut":SJ,"animation.pathIn":Wk,"animation.morphing":Vk,"animation.growInX":Uk,"animation.growInY":Xk,"interaction.elementHighlight":y0,"interaction.elementHighlightByX":qk,"interaction.elementHighlightByColor":Zk,"interaction.elementSelect":m0,"interaction.elementSelectByX":Kk,"interaction.elementSelectByColor":Qk,"interaction.fisheye":BJ,"interaction.chartIndex":Jk,"interaction.tooltip":d3,"interaction.legendFilter":ftt,"interaction.legendHighlight":dtt,"interaction.brushHighlight":tb,"interaction.brushXHighlight":mtt,"interaction.brushYHighlight":btt,"interaction.brushAxisHighlight":Att,"interaction.brushFilter":ib,"interaction.brushXFilter":Ltt,"interaction.brushYFilter":Ntt,"interaction.sliderFilter":M3,"interaction.scrollbarFilter":Btt,"interaction.poptip":A3,"interaction.treemapDrillDown":aet,"interaction.elementPointMove":det,"composition.spaceLayer":Y3,"composition.spaceFlex":H3,"composition.facetRect":X3,"composition.repeatMatrix":Eet,"composition.facetCircle":Let,"composition.timingKeyframe":Z3,"labelTransform.overlapHide":Qnt,"labelTransform.overlapDodgeY":ert,"labelTransform.overflowHide":nrt,"labelTransform.contrastReverse":art}}var sd=t=>t;function N0(t,e){t&&Z5.hasOwnProperty(t.type)&&Z5[t.type](t,e)}var q5={Feature:function(t,e){N0(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)N0(n[r].geometry,e)}},Z5={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){Eb(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)Eb(n[r],e,0)},Polygon:function(t,e){K5(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)K5(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)N0(n[r],e)}};function Eb(t,e,n){var r=-1,i=t.length-n,a;for(e.lineStart();++r<i;)a=t[r],e.point(a[0],a[1],a[2]);e.lineEnd()}function K5(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)Eb(t[n],e,1);e.polygonEnd()}function Zl(t,e){t&&q5.hasOwnProperty(t.type)?q5[t.type](t,e):N0(t,e)}class So{constructor(){this._partials=new Float64Array(32),this._n=0}add(e){const n=this._partials;let r=0;for(let i=0;i<this._n&&i<32;i++){const a=n[i],o=e+a,s=Math.abs(e)<Math.abs(a)?e-(o-a):a-(o-e);s&&(n[r++]=s),e=o}return n[r]=e,this._n=r+1,this}valueOf(){const e=this._partials;let n=this._n,r,i,a,o=0;if(n>0){for(o=e[--n];n>0&&(r=o,i=e[--n],o=r+i,a=i-(o-r),!a););n>0&&(a<0&&e[n-1]<0||a>0&&e[n-1]>0)&&(i=a*2,r=o+i,i==r-o&&(o=r))}return o}}function qmt(t,e){const n=new So;if(e===void 0)for(let r of t)(r=+r)&&n.add(r);else{let r=-1;for(let i of t)(i=+e(i,++r,t))&&n.add(i)}return+n}function Zmt(t,e){const n=new So;let r=-1;return Float64Array.from(t,e===void 0?i=>n.add(+i||0):i=>n.add(+e(i,++r,t)||0))}var ue=1e-6,Q5=1e-12,Ie=Math.PI,rr=Ie/2,J5=Ie/4,Gi=Ie*2,ei=180/Ie,Zn=Ie/180,tn=Math.abs,Kl=Math.atan,Mo=Math.atan2,Ce=Math.cos,I0=Math.ceil,tL=Math.exp,Kmt=Math.floor,Qmt=Math.hypot,j0=Math.log,Pb=Math.pow,be=Math.sin,aa=Math.sign||function(t){return t>0?1:t<0?-1:0},Pi=Math.sqrt,Ab=Math.tan;function eL(t){return t>1?0:t<-1?Ie:Math.acos(t)}function oa(t){return t>1?rr:t<-1?-rr:Math.asin(t)}function Jmt(t){return(t=be(t/2))*t}function sa(){}var Tb=new So,Cb=new So,nL,rL,kb,Lb,gs={point:sa,lineStart:sa,lineEnd:sa,polygonStart:function(){gs.lineStart=srt,gs.lineEnd=lrt},polygonEnd:function(){gs.lineStart=gs.lineEnd=gs.point=sa,Tb.add(tn(Cb)),Cb=new So},result:function(){var t=Tb/2;return Tb=new So,t}};function srt(){gs.point=crt}function crt(t,e){gs.point=iL,nL=kb=t,rL=Lb=e}function iL(t,e){Cb.add(Lb*t-kb*e),kb=t,Lb=e}function lrt(){iL(nL,rL)}var aL=gs,Ql=1/0,R0=Ql,cd=-Ql,D0=cd,urt={point:frt,lineStart:sa,lineEnd:sa,polygonStart:sa,polygonEnd:sa,result:function(){var t=[[Ql,R0],[cd,D0]];return cd=D0=-(R0=Ql=1/0),t}};function frt(t,e){t<Ql&&(Ql=t),t>cd&&(cd=t),e<R0&&(R0=e),e>D0&&(D0=e)}var B0=urt,Nb=0,Ib=0,ld=0,F0=0,z0=0,Jl=0,jb=0,Rb=0,ud=0,oL,sL,Va,Ua,wa={point:_c,lineStart:cL,lineEnd:lL,polygonStart:function(){wa.lineStart=prt,wa.lineEnd=vrt},polygonEnd:function(){wa.point=_c,wa.lineStart=cL,wa.lineEnd=lL},result:function(){var t=ud?[jb/ud,Rb/ud]:Jl?[F0/Jl,z0/Jl]:ld?[Nb/ld,Ib/ld]:[NaN,NaN];return Nb=Ib=ld=F0=z0=Jl=jb=Rb=ud=0,t}};function _c(t,e){Nb+=t,Ib+=e,++ld}function cL(){wa.point=drt}function drt(t,e){wa.point=hrt,_c(Va=t,Ua=e)}function hrt(t,e){var n=t-Va,r=e-Ua,i=Pi(n*n+r*r);F0+=i*(Va+t)/2,z0+=i*(Ua+e)/2,Jl+=i,_c(Va=t,Ua=e)}function lL(){wa.point=_c}function prt(){wa.point=grt}function vrt(){uL(oL,sL)}function grt(t,e){wa.point=uL,_c(oL=Va=t,sL=Ua=e)}function uL(t,e){var n=t-Va,r=e-Ua,i=Pi(n*n+r*r);F0+=i*(Va+t)/2,z0+=i*(Ua+e)/2,Jl+=i,i=Ua*t-Va*e,jb+=i*(Va+t),Rb+=i*(Ua+e),ud+=i*3,_c(Va=t,Ua=e)}var fL=wa;function dL(t){this._context=t}dL.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:{this._context.moveTo(t,e),this._point=1;break}case 1:{this._context.lineTo(t,e);break}default:{this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,Gi);break}}},result:sa};var Db=new So,Bb,hL,pL,fd,dd,G0={point:sa,lineStart:function(){G0.point=yrt},lineEnd:function(){Bb&&vL(hL,pL),G0.point=sa},polygonStart:function(){Bb=!0},polygonEnd:function(){Bb=null},result:function(){var t=+Db;return Db=new So,t}};function yrt(t,e){G0.point=vL,hL=fd=t,pL=dd=e}function vL(t,e){fd-=t,dd-=e,Db.add(Pi(fd*fd+dd*dd)),fd=t,dd=e}var gL=G0;let yL,W0,mL,bL;class xL{constructor(e){this._append=e==null?_L:mrt(e),this._radius=4.5,this._=""}pointRadius(e){return this._radius=+e,this}polygonStart(){this._line=0}polygonEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){this._line===0&&(this._+="Z"),this._point=NaN}point(e,n){switch(this._point){case 0:{this._append`M${e},${n}`,this._point=1;break}case 1:{this._append`L${e},${n}`;break}default:{if(this._append`M${e},${n}`,this._radius!==mL||this._append!==W0){const r=this._radius,i=this._;this._="",this._append`m0,${r}a${r},${r} 0 1,1 0,${-2*r}a${r},${r} 0 1,1 0,${2*r}z`,mL=r,W0=this._append,bL=this._,this._=i}this._+=bL;break}}}result(){const e=this._;return this._="",e.length?e:null}}function _L(t){let e=1;this._+=t[0];for(const n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function mrt(t){const e=Math.floor(t);if(!(e>=0))throw new RangeError(`invalid digits: ${t}`);if(e>15)return _L;if(e!==yL){const n=hr(10,e);yL=e,W0=function(i){let a=1;this._+=i[0];for(const o=i.length;a<o;++a)this._+=Math.round(arguments[a]*n)/n+i[a]}}return W0}function OL(t,e){let n=3,r=4.5,i,a;function o(s){return s&&(typeof r=="function"&&a.pointRadius(+r.apply(this,arguments)),Zl(s,i(a))),a.result()}return o.area=function(s){return Zl(s,i(aL)),aL.result()},o.measure=function(s){return Zl(s,i(gL)),gL.result()},o.bounds=function(s){return Zl(s,i(B0)),B0.result()},o.centroid=function(s){return Zl(s,i(fL)),fL.result()},o.projection=function(s){return arguments.length?(i=s==null?(t=null,sd):(t=s).stream,o):t},o.context=function(s){return arguments.length?(a=s==null?(e=null,new xL(n)):new dL(e=s),typeof r!="function"&&a.pointRadius(r),o):e},o.pointRadius=function(s){return arguments.length?(r=typeof s=="function"?s:(a.pointRadius(+s),+s),o):r},o.digits=function(s){if(!arguments.length)return n;if(s==null)n=null;else{const c=Math.floor(s);if(!(c>=0))throw new RangeError(`invalid digits: ${s}`);n=c}return e===null&&(a=new xL(n)),o},o.projection(t).digits(n).context(e)}function tu(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((e-t)/n))|0,a=new Array(i);++r<i;)a[r]=t+r*n;return a}function wL(t,e,n){var r=tu(t,e-ue,n).concat(e);return function(i){return r.map(function(a){return[i,a]})}}function SL(t,e,n){var r=tu(t,e-ue,n).concat(e);return function(i){return r.map(function(a){return[a,i]})}}function brt(){var t,e,n,r,i,a,o,s,c=10,l=c,u=90,f=360,d,h,p,v,g=2.5;function y(){return{type:"MultiLineString",coordinates:m()}}function m(){return tu(I0(r/u)*u,n,u).map(p).concat(tu(I0(s/f)*f,o,f).map(v)).concat(tu(I0(e/c)*c,t,c).filter(function(b){return tn(b%u)>ue}).map(d)).concat(tu(I0(a/l)*l,i,l).filter(function(b){return tn(b%f)>ue}).map(h))}return y.lines=function(){return m().map(function(b){return{type:"LineString",coordinates:b}})},y.outline=function(){return{type:"Polygon",coordinates:[p(r).concat(v(o).slice(1),p(n).reverse().slice(1),v(s).reverse().slice(1))]}},y.extent=function(b){return arguments.length?y.extentMajor(b).extentMinor(b):y.extentMinor()},y.extentMajor=function(b){return arguments.length?(r=+b[0][0],n=+b[1][0],s=+b[0][1],o=+b[1][1],r>n&&(b=r,r=n,n=b),s>o&&(b=s,s=o,o=b),y.precision(g)):[[r,s],[n,o]]},y.extentMinor=function(b){return arguments.length?(e=+b[0][0],t=+b[1][0],a=+b[0][1],i=+b[1][1],e>t&&(b=e,e=t,t=b),a>i&&(b=a,a=i,i=b),y.precision(g)):[[e,a],[t,i]]},y.step=function(b){return arguments.length?y.stepMajor(b).stepMinor(b):y.stepMinor()},y.stepMajor=function(b){return arguments.length?(u=+b[0],f=+b[1],y):[u,f]},y.stepMinor=function(b){return arguments.length?(c=+b[0],l=+b[1],y):[c,l]},y.precision=function(b){return arguments.length?(g=+b,d=wL(a,i,90),h=SL(e,t,g),p=wL(s,o,90),v=SL(r,n,g),y):g},y.extentMajor([[-180,-90+ue],[180,90-ue]]).extentMinor([[-180,-80-ue],[180,80+ue]])}function xrt(){return brt()()}function ML(){var t=[],e;return{point:function(n,r,i){e.push([n,r,i])},lineStart:function(){t.push(e=[])},lineEnd:sa,rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))},result:function(){var n=t;return t=[],e=null,n}}}function Y0(t,e){return tn(t[0]-e[0])<ue&&tn(t[1]-e[1])<ue}function H0(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function EL(t,e,n,r,i){var a=[],o=[],s,c;if(t.forEach(function(p){if(!((v=p.length-1)<=0)){var v,g=p[0],y=p[v],m;if(Y0(g,y)){if(!g[2]&&!y[2]){for(i.lineStart(),s=0;s<v;++s)i.point((g=p[s])[0],g[1]);i.lineEnd();return}y[0]+=2*ue}a.push(m=new H0(g,p,null,!0)),o.push(m.o=new H0(g,null,m,!1)),a.push(m=new H0(y,p,null,!1)),o.push(m.o=new H0(y,null,m,!0))}}),!!a.length){for(o.sort(e),PL(a),PL(o),s=0,c=o.length;s<c;++s)o[s].e=n=!n;for(var l=a[0],u,f;;){for(var d=l,h=!0;d.v;)if((d=d.n)===l)return;u=d.z,i.lineStart();do{if(d.v=d.o.v=!0,d.e){if(h)for(s=0,c=u.length;s<c;++s)i.point((f=u[s])[0],f[1]);else r(d.x,d.n.x,1,i);d=d.n}else{if(h)for(u=d.p.z,s=u.length-1;s>=0;--s)i.point((f=u[s])[0],f[1]);else r(d.x,d.p.x,-1,i);d=d.p}d=d.o,u=d.z,h=!h}while(!d.v);i.lineEnd()}}}function PL(t){if(e=t.length){for(var e,n=0,r=t[0],i;++n<e;)r.n=i=t[n],i.p=r,r=i;r.n=i=t[0],i.p=r}}function Fb(t){return[Mo(t[1],t[0]),oa(t[2])]}function eu(t){var e=t[0],n=t[1],r=Ce(n);return[r*Ce(e),r*be(e),be(n)]}function $0(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function V0(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function zb(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function U0(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function Gb(t){var e=Pi(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function Wb(t){return tn(t[0])<=Ie?t[0]:aa(t[0])*((tn(t[0])+Ie)%Gi-Ie)}function _rt(t,e){var n=Wb(e),r=e[1],i=be(r),a=[be(n),-Ce(n),0],o=0,s=0,c=new So;i===1?r=rr+ue:i===-1&&(r=-rr-ue);for(var l=0,u=t.length;l<u;++l)if(d=(f=t[l]).length)for(var f,d,h=f[d-1],p=Wb(h),v=h[1]/2+J5,g=be(v),y=Ce(v),m=0;m<d;++m,p=x,g=O,y=w,h=b){var b=f[m],x=Wb(b),_=b[1]/2+J5,O=be(_),w=Ce(_),S=x-p,M=S>=0?1:-1,E=M*S,P=E>Ie,L=g*O;if(c.add(Mo(L*M*be(E),y*w+L*Ce(E))),o+=P?S+M*Gi:S,P^p>=n^x>=n){var A=V0(eu(h),eu(b));Gb(A);var T=V0(a,A);Gb(T);var C=(P^S>=0?-1:1)*oa(T[2]);(r>C||r===C&&(A[0]||A[1]))&&(s+=P^S>=0?1:-1)}}return(o<-ue||o<ue&&c<-Q5)^s&1}function*Ort(t){for(const e of t)yield*e}function AL(t){return Array.from(Ort(t))}function TL(t,e,n,r){return function(i){var a=e(i),o=ML(),s=e(o),c=!1,l,u,f,d={point:h,lineStart:v,lineEnd:g,polygonStart:function(){d.point=y,d.lineStart=m,d.lineEnd=b,u=[],l=[]},polygonEnd:function(){d.point=h,d.lineStart=v,d.lineEnd=g,u=AL(u);var x=_rt(l,r);u.length?(c||(i.polygonStart(),c=!0),EL(u,Srt,x,n,i)):x&&(c||(i.polygonStart(),c=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),c&&(i.polygonEnd(),c=!1),u=l=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function h(x,_){t(x,_)&&i.point(x,_)}function p(x,_){a.point(x,_)}function v(){d.point=p,a.lineStart()}function g(){d.point=h,a.lineEnd()}function y(x,_){f.push([x,_]),s.point(x,_)}function m(){s.lineStart(),f=[]}function b(){y(f[0][0],f[0][1]),s.lineEnd();var x=s.clean(),_=o.result(),O,w=_.length,S,M,E;if(f.pop(),l.push(f),f=null,!!w){if(x&1){if(M=_[0],(S=M.length-1)>0){for(c||(i.polygonStart(),c=!0),i.lineStart(),O=0;O<S;++O)i.point((E=M[O])[0],E[1]);i.lineEnd()}return}w>1&&x&2&&_.push(_.pop().concat(_.shift())),u.push(_.filter(wrt))}}return d}}function wrt(t){return t.length>1}function Srt(t,e){return((t=t.x)[0]<0?t[1]-rr-ue:rr-t[1])-((e=e.x)[0]<0?e[1]-rr-ue:rr-e[1])}var CL=TL(function(){return!0},Mrt,Prt,[-Ie,-rr]);function Mrt(t){var e=NaN,n=NaN,r=NaN,i;return{lineStart:function(){t.lineStart(),i=1},point:function(a,o){var s=a>0?Ie:-Ie,c=tn(a-e);tn(c-Ie)<ue?(t.point(e,n=(n+o)/2>0?rr:-rr),t.point(r,n),t.lineEnd(),t.lineStart(),t.point(s,n),t.point(a,n),i=0):r!==s&&c>=Ie&&(tn(e-r)<ue&&(e-=r*ue),tn(a-s)<ue&&(a-=s*ue),n=Ert(e,n,a,o),t.point(r,n),t.lineEnd(),t.lineStart(),t.point(s,n),i=0),t.point(e=a,n=o),r=s},lineEnd:function(){t.lineEnd(),e=n=NaN},clean:function(){return 2-i}}}function Ert(t,e,n,r){var i,a,o=be(t-n);return tn(o)>ue?Kl((be(e)*(a=Ce(r))*be(n)-be(r)*(i=Ce(e))*be(t))/(i*a*o)):(e+r)/2}function Prt(t,e,n,r){var i;if(t==null)i=n*rr,r.point(-Ie,i),r.point(0,i),r.point(Ie,i),r.point(Ie,0),r.point(Ie,-i),r.point(0,-i),r.point(-Ie,-i),r.point(-Ie,0),r.point(-Ie,i);else if(tn(t[0]-e[0])>ue){var a=t[0]<e[0]?Ie:-Ie;i=n*a/2,r.point(-a,i),r.point(0,i),r.point(a,i)}else r.point(e[0],e[1])}function kL(t,e,n,r,i,a){if(n){var o=Ce(e),s=be(e),c=r*n;i==null?(i=e+r*Gi,a=e-c/2):(i=LL(o,i),a=LL(o,a),(r>0?i<a:i>a)&&(i+=r*Gi));for(var l,u=i;r>0?u>a:u<a;u-=c)l=Fb([o,-s*Ce(u),-s*be(u)]),t.point(l[0],l[1])}}function LL(t,e){e=eu(e),e[0]-=t,Gb(e);var n=eL(-e[1]);return((-e[2]<0?-n:n)+Gi-ue)%Gi}function t1t(){var t=constant([0,0]),e=constant(90),n=constant(2),r,i,a={point:o};function o(c,l){r.push(c=i(c,l)),c[0]*=degrees,c[1]*=degrees}function s(){var c=t.apply(this,arguments),l=e.apply(this,arguments)*radians,u=n.apply(this,arguments)*radians;return r=[],i=rotateRadians(-c[0]*radians,-c[1]*radians,0).invert,kL(a,l,u,1),c={type:"Polygon",coordinates:[r]},r=i=null,c}return s.center=function(c){return arguments.length?(t=typeof c=="function"?c:constant([+c[0],+c[1]]),s):t},s.radius=function(c){return arguments.length?(e=typeof c=="function"?c:constant(+c),s):e},s.precision=function(c){return arguments.length?(n=typeof c=="function"?c:constant(+c),s):n},s}function Art(t){var e=Ce(t),n=2*Zn,r=e>0,i=tn(e)>ue;function a(u,f,d,h){kL(h,t,n,d,u,f)}function o(u,f){return Ce(u)*Ce(f)>e}function s(u){var f,d,h,p,v;return{lineStart:function(){p=h=!1,v=1},point:function(g,y){var m=[g,y],b,x=o(g,y),_=r?x?0:l(g,y):x?l(g+(g<0?Ie:-Ie),y):0;if(!f&&(p=h=x)&&u.lineStart(),x!==h&&(b=c(f,m),(!b||Y0(f,b)||Y0(m,b))&&(m[2]=1)),x!==h)v=0,x?(u.lineStart(),b=c(m,f),u.point(b[0],b[1])):(b=c(f,m),u.point(b[0],b[1],2),u.lineEnd()),f=b;else if(i&&f&&r^x){var O;!(_&d)&&(O=c(m,f,!0))&&(v=0,r?(u.lineStart(),u.point(O[0][0],O[0][1]),u.point(O[1][0],O[1][1]),u.lineEnd()):(u.point(O[1][0],O[1][1]),u.lineEnd(),u.lineStart(),u.point(O[0][0],O[0][1],3)))}x&&(!f||!Y0(f,m))&&u.point(m[0],m[1]),f=m,h=x,d=_},lineEnd:function(){h&&u.lineEnd(),f=null},clean:function(){return v|(p&&h)<<1}}}function c(u,f,d){var h=eu(u),p=eu(f),v=[1,0,0],g=V0(h,p),y=$0(g,g),m=g[0],b=y-m*m;if(!b)return!d&&u;var x=e*y/b,_=-e*m/b,O=V0(v,g),w=U0(v,x),S=U0(g,_);zb(w,S);var M=O,E=$0(w,M),P=$0(M,M),L=E*E-P*($0(w,w)-1);if(!(L<0)){var A=Pi(L),T=U0(M,(-E-A)/P);if(zb(T,w),T=Fb(T),!d)return T;var C=u[0],N=f[0],B=u[1],j=f[1],D;N<C&&(D=C,C=N,N=D);var G=N-C,Y=tn(G-Ie)<ue,U=Y||G<ue;if(!Y&&j<B&&(D=B,B=j,j=D),U?Y?B+j>0^T[1]<(tn(T[0]-C)<ue?B:j):B<=T[1]&&T[1]<=j:G>Ie^(C<=T[0]&&T[0]<=N)){var V=U0(M,(-E+A)/P);return zb(V,w),[T,Fb(V)]}}}function l(u,f){var d=r?t:Ie-t,h=0;return u<-d?h|=1:u>d&&(h|=2),f<-d?h|=4:f>d&&(h|=8),h}return TL(o,s,a,r?[0,-t]:[-Ie,t-Ie])}function Trt(t,e,n,r,i,a){var o=t[0],s=t[1],c=e[0],l=e[1],u=0,f=1,d=c-o,h=l-s,p;if(p=n-o,!(!d&&p>0)){if(p/=d,d<0){if(p<u)return;p<f&&(f=p)}else if(d>0){if(p>f)return;p>u&&(u=p)}if(p=i-o,!(!d&&p<0)){if(p/=d,d<0){if(p>f)return;p>u&&(u=p)}else if(d>0){if(p<u)return;p<f&&(f=p)}if(p=r-s,!(!h&&p>0)){if(p/=h,h<0){if(p<u)return;p<f&&(f=p)}else if(h>0){if(p>f)return;p>u&&(u=p)}if(p=a-s,!(!h&&p<0)){if(p/=h,h<0){if(p>f)return;p>u&&(u=p)}else if(h>0){if(p<u)return;p<f&&(f=p)}return u>0&&(t[0]=o+u*d,t[1]=s+u*h),f<1&&(e[0]=o+f*d,e[1]=s+f*h),!0}}}}}var hd=1e9,X0=-hd;function NL(t,e,n,r){function i(l,u){return t<=l&&l<=n&&e<=u&&u<=r}function a(l,u,f,d){var h=0,p=0;if(l==null||(h=o(l,f))!==(p=o(u,f))||c(l,u)<0^f>0)do d.point(h===0||h===3?t:n,h>1?r:e);while((h=(h+f+4)%4)!==p);else d.point(u[0],u[1])}function o(l,u){return tn(l[0]-t)<ue?u>0?0:3:tn(l[0]-n)<ue?u>0?2:1:tn(l[1]-e)<ue?u>0?1:0:u>0?3:2}function s(l,u){return c(l.x,u.x)}function c(l,u){var f=o(l,1),d=o(u,1);return f!==d?f-d:f===0?u[1]-l[1]:f===1?l[0]-u[0]:f===2?l[1]-u[1]:u[0]-l[0]}return function(l){var u=l,f=ML(),d,h,p,v,g,y,m,b,x,_,O,w={point:S,lineStart:L,lineEnd:A,polygonStart:E,polygonEnd:P};function S(C,N){i(C,N)&&u.point(C,N)}function M(){for(var C=0,N=0,B=h.length;N<B;++N)for(var j=h[N],D=1,G=j.length,Y=j[0],U,V,it=Y[0],pt=Y[1];D<G;++D)U=it,V=pt,Y=j[D],it=Y[0],pt=Y[1],V<=r?pt>r&&(it-U)*(r-V)>(pt-V)*(t-U)&&++C:pt<=r&&(it-U)*(r-V)<(pt-V)*(t-U)&&--C;return C}function E(){u=f,d=[],h=[],O=!0}function P(){var C=M(),N=O&&C,B=(d=AL(d)).length;(N||B)&&(l.polygonStart(),N&&(l.lineStart(),a(null,null,1,l),l.lineEnd()),B&&EL(d,s,C,a,l),l.polygonEnd()),u=l,d=h=p=null}function L(){w.point=T,h&&h.push(p=[]),_=!0,x=!1,m=b=NaN}function A(){d&&(T(v,g),y&&x&&f.rejoin(),d.push(f.result())),w.point=S,x&&u.lineEnd()}function T(C,N){var B=i(C,N);if(h&&p.push([C,N]),_)v=C,g=N,y=B,_=!1,B&&(u.lineStart(),u.point(C,N));else if(B&&x)u.point(C,N);else{var j=[m=Math.max(X0,Math.min(hd,m)),b=Math.max(X0,Math.min(hd,b))],D=[C=Math.max(X0,Math.min(hd,C)),N=Math.max(X0,Math.min(hd,N))];Trt(j,D,t,e,n,r)?(x||(u.lineStart(),u.point(j[0],j[1])),u.point(D[0],D[1]),B||u.lineEnd(),O=!1):B&&(u.lineStart(),u.point(C,N),O=!1)}m=C,b=N,x=B}return w}}function Yb(t,e){function n(r,i){return r=t(r,i),e(r[0],r[1])}return t.invert&&e.invert&&(n.invert=function(r,i){return r=e.invert(r,i),r&&t.invert(r[0],r[1])}),n}function Hb(t,e){return tn(t)>Ie&&(t-=Math.round(t/Gi)*Gi),[t,e]}Hb.invert=Hb;function IL(t,e,n){return(t%=Gi)?e||n?Yb(RL(t),DL(e,n)):RL(t):e||n?DL(e,n):Hb}function jL(t){return function(e,n){return e+=t,tn(e)>Ie&&(e-=Math.round(e/Gi)*Gi),[e,n]}}function RL(t){var e=jL(t);return e.invert=jL(-t),e}function DL(t,e){var n=Ce(t),r=be(t),i=Ce(e),a=be(e);function o(s,c){var l=Ce(c),u=Ce(s)*l,f=be(s)*l,d=be(c),h=d*n+u*r;return[Mo(f*i-h*a,u*n-d*r),oa(h*i+f*a)]}return o.invert=function(s,c){var l=Ce(c),u=Ce(s)*l,f=be(s)*l,d=be(c),h=d*i-f*a;return[Mo(f*i+d*a,u*n+h*r),oa(h*n-u*r)]},o}function Crt(t){t=IL(t[0]*Zn,t[1]*Zn,t.length>2?t[2]*Zn:0);function e(n){return n=t(n[0]*Zn,n[1]*Zn),n[0]*=ei,n[1]*=ei,n}return e.invert=function(n){return n=t.invert(n[0]*Zn,n[1]*Zn),n[0]*=ei,n[1]*=ei,n},e}function e1t(t){return{stream:pd(t)}}function pd(t){return function(e){var n=new $b;for(var r in t)n[r]=t[r];return n.stream=e,n}}function $b(){}$b.prototype={constructor:$b,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function Vb(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),r!=null&&t.clipExtent(null),Zl(n,t.stream(B0)),e(B0.result()),r!=null&&t.clipExtent(r),t}function q0(t,e,n){return Vb(t,function(r){var i=e[1][0]-e[0][0],a=e[1][1]-e[0][1],o=Math.min(i/(r[1][0]-r[0][0]),a/(r[1][1]-r[0][1])),s=+e[0][0]+(i-o*(r[1][0]+r[0][0]))/2,c=+e[0][1]+(a-o*(r[1][1]+r[0][1]))/2;t.scale(150*o).translate([s,c])},n)}function Ub(t,e,n){return q0(t,[[0,0],e],n)}function Xb(t,e,n){return Vb(t,function(r){var i=+e,a=i/(r[1][0]-r[0][0]),o=(i-a*(r[1][0]+r[0][0]))/2,s=-a*r[0][1];t.scale(150*a).translate([o,s])},n)}function qb(t,e,n){return Vb(t,function(r){var i=+e,a=i/(r[1][1]-r[0][1]),o=-a*r[0][0],s=(i-a*(r[1][1]+r[0][1]))/2;t.scale(150*a).translate([o,s])},n)}var BL=16,krt=Ce(30*Zn);function FL(t,e){return+e?Nrt(t,e):Lrt(t)}function Lrt(t){return pd({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}function Nrt(t,e){function n(r,i,a,o,s,c,l,u,f,d,h,p,v,g){var y=l-r,m=u-i,b=y*y+m*m;if(b>4*e&&v--){var x=o+d,_=s+h,O=c+p,w=Pi(x*x+_*_+O*O),S=oa(O/=w),M=tn(tn(O)-1)<ue||tn(a-f)<ue?(a+f)/2:Mo(_,x),E=t(M,S),P=E[0],L=E[1],A=P-r,T=L-i,C=m*A-y*T;(C*C/b>e||tn((y*A+m*T)/b-.5)>.3||o*d+s*h+c*p<krt)&&(n(r,i,a,o,s,c,P,L,M,x/=w,_/=w,O,v,g),g.point(P,L),n(P,L,M,x,_,O,l,u,f,d,h,p,v,g))}}return function(r){var i,a,o,s,c,l,u,f,d,h,p,v,g={point:y,lineStart:m,lineEnd:x,polygonStart:function(){r.polygonStart(),g.lineStart=_},polygonEnd:function(){r.polygonEnd(),g.lineStart=m}};function y(S,M){S=t(S,M),r.point(S[0],S[1])}function m(){f=NaN,g.point=b,r.lineStart()}function b(S,M){var E=eu([S,M]),P=t(S,M);n(f,d,u,h,p,v,f=P[0],d=P[1],u=S,h=E[0],p=E[1],v=E[2],BL,r),r.point(f,d)}function x(){g.point=y,r.lineEnd()}function _(){m(),g.point=O,g.lineEnd=w}function O(S,M){b(i=S,M),a=f,o=d,s=h,c=p,l=v,g.point=b}function w(){n(f,d,u,h,p,v,a,o,i,s,c,l,BL,r),g.lineEnd=x,x()}return g}}var Irt=pd({point:function(t,e){this.stream.point(t*Zn,e*Zn)}});function jrt(t){return pd({point:function(e,n){var r=t(e,n);return this.stream.point(r[0],r[1])}})}function Rrt(t,e,n,r,i){function a(o,s){return o*=r,s*=i,[e+t*o,n-t*s]}return a.invert=function(o,s){return[(o-e)/t*r,(n-s)/t*i]},a}function zL(t,e,n,r,i,a){if(!a)return Rrt(t,e,n,r,i);var o=Ce(a),s=be(a),c=o*t,l=s*t,u=o/t,f=s/t,d=(s*n-o*e)/t,h=(s*e+o*n)/t;function p(v,g){return v*=r,g*=i,[c*v-l*g+e,n-l*v-c*g]}return p.invert=function(v,g){return[r*(u*v-f*g+d),i*(h-f*v-u*g)]},p}function Xa(t){return Zb(function(){return t})()}function Zb(t){var e,n=150,r=480,i=250,a=0,o=0,s=0,c=0,l=0,u,f=0,d=1,h=1,p=null,v=CL,g=null,y,m,b,x=sd,_=.5,O,w,S,M,E;function P(C){return S(C[0]*Zn,C[1]*Zn)}function L(C){return C=S.invert(C[0],C[1]),C&&[C[0]*ei,C[1]*ei]}P.stream=function(C){return M&&E===C?M:M=Irt(jrt(u)(v(O(x(E=C)))))},P.preclip=function(C){return arguments.length?(v=C,p=void 0,T()):v},P.postclip=function(C){return arguments.length?(x=C,g=y=m=b=null,T()):x},P.clipAngle=function(C){return arguments.length?(v=+C?Art(p=C*Zn):(p=null,CL),T()):p*ei},P.clipExtent=function(C){return arguments.length?(x=C==null?(g=y=m=b=null,sd):NL(g=+C[0][0],y=+C[0][1],m=+C[1][0],b=+C[1][1]),T()):g==null?null:[[g,y],[m,b]]},P.scale=function(C){return arguments.length?(n=+C,A()):n},P.translate=function(C){return arguments.length?(r=+C[0],i=+C[1],A()):[r,i]},P.center=function(C){return arguments.length?(a=C[0]%360*Zn,o=C[1]%360*Zn,A()):[a*ei,o*ei]},P.rotate=function(C){return arguments.length?(s=C[0]%360*Zn,c=C[1]%360*Zn,l=C.length>2?C[2]%360*Zn:0,A()):[s*ei,c*ei,l*ei]},P.angle=function(C){return arguments.length?(f=C%360*Zn,A()):f*ei},P.reflectX=function(C){return arguments.length?(d=C?-1:1,A()):d<0},P.reflectY=function(C){return arguments.length?(h=C?-1:1,A()):h<0},P.precision=function(C){return arguments.length?(O=FL(w,_=C*C),T()):Pi(_)},P.fitExtent=function(C,N){return q0(P,C,N)},P.fitSize=function(C,N){return Ub(P,C,N)},P.fitWidth=function(C,N){return Xb(P,C,N)},P.fitHeight=function(C,N){return qb(P,C,N)};function A(){var C=zL(n,0,0,d,h,f).apply(null,e(a,o)),N=zL(n,r-C[0],i-C[1],d,h,f);return u=IL(s,c,l),w=Yb(e,N),S=Yb(u,w),O=FL(w,_),T()}function T(){return M=E=null,P}return function(){return e=t.apply(this,arguments),P.invert=e.invert&&L,A()}}function Kb(t){var e=0,n=Ie/3,r=Zb(t),i=r(e,n);return i.parallels=function(a){return arguments.length?r(e=a[0]*Zn,n=a[1]*Zn):[e*ei,n*ei]},i}function Drt(t){var e=Ce(t);function n(r,i){return[r*e,be(i)/e]}return n.invert=function(r,i){return[r/e,oa(i*e)]},n}function GL(t,e){var n=be(t),r=(n+be(e))/2;if(tn(r)<ue)return Drt(t);var i=1+n*(2*r-n),a=Pi(i)/r;function o(s,c){var l=Pi(i-2*r*be(c))/r;return[l*be(s*=r),a-l*Ce(s)]}return o.invert=function(s,c){var l=a-c,u=Mo(s,tn(l))*aa(l);return l*r<0&&(u-=Ie*aa(s)*aa(l)),[u/r,oa((i-(s*s+l*l)*r*r)/(2*r))]},o}function Z0(){return Kb(GL).scale(155.424).center([0,33.6442])}function WL(){return Z0().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function Brt(t){var e=t.length;return{point:function(n,r){for(var i=-1;++i<e;)t[i].point(n,r)},sphere:function(){for(var n=-1;++n<e;)t[n].sphere()},lineStart:function(){for(var n=-1;++n<e;)t[n].lineStart()},lineEnd:function(){for(var n=-1;++n<e;)t[n].lineEnd()},polygonStart:function(){for(var n=-1;++n<e;)t[n].polygonStart()},polygonEnd:function(){for(var n=-1;++n<e;)t[n].polygonEnd()}}}function Frt(){var t,e,n=WL(),r,i=Z0().rotate([154,0]).center([-2,58.5]).parallels([55,65]),a,o=Z0().rotate([157,0]).center([-3,19.9]).parallels([8,18]),s,c,l={point:function(d,h){c=[d,h]}};function u(d){var h=d[0],p=d[1];return c=null,r.point(h,p),c||(a.point(h,p),c)||(s.point(h,p),c)}u.invert=function(d){var h=n.scale(),p=n.translate(),v=(d[0]-p[0])/h,g=(d[1]-p[1])/h;return(g>=.12&&g<.234&&v>=-.425&&v<-.214?i:g>=.166&&g<.234&&v>=-.214&&v<-.115?o:n).invert(d)},u.stream=function(d){return t&&e===d?t:t=Brt([n.stream(e=d),i.stream(d),o.stream(d)])},u.precision=function(d){return arguments.length?(n.precision(d),i.precision(d),o.precision(d),f()):n.precision()},u.scale=function(d){return arguments.length?(n.scale(d),i.scale(d*.35),o.scale(d),u.translate(n.translate())):n.scale()},u.translate=function(d){if(!arguments.length)return n.translate();var h=n.scale(),p=+d[0],v=+d[1];return r=n.translate(d).clipExtent([[p-.455*h,v-.238*h],[p+.455*h,v+.238*h]]).stream(l),a=i.translate([p-.307*h,v+.201*h]).clipExtent([[p-.425*h+ue,v+.12*h+ue],[p-.214*h-ue,v+.234*h-ue]]).stream(l),s=o.translate([p-.205*h,v+.212*h]).clipExtent([[p-.214*h+ue,v+.166*h+ue],[p-.115*h-ue,v+.234*h-ue]]).stream(l),f()},u.fitExtent=function(d,h){return q0(u,d,h)},u.fitSize=function(d,h){return Ub(u,d,h)},u.fitWidth=function(d,h){return Xb(u,d,h)},u.fitHeight=function(d,h){return qb(u,d,h)};function f(){return t=e=null,u}return u.scale(1070)}function YL(t){return function(e,n){var r=Ce(e),i=Ce(n),a=t(r*i);return a===1/0?[2,0]:[a*i*be(e),a*be(n)]}}function vd(t){return function(e,n){var r=Pi(e*e+n*n),i=t(r),a=be(i),o=Ce(i);return[Mo(e*a,r*o),oa(r&&n*a/r)]}}var Qb=YL(function(t){return Pi(2/(1+t))});Qb.invert=vd(function(t){return 2*oa(t/2)});function zrt(){return Xa(Qb).scale(124.75).clipAngle(180-.001)}var Jb=YL(function(t){return(t=eL(t))&&t/be(t)});Jb.invert=vd(function(t){return t});function Grt(){return Xa(Jb).scale(79.4188).clipAngle(180-.001)}function gd(t,e){return[t,j0(Ab((rr+e)/2))]}gd.invert=function(t,e){return[t,2*Kl(tL(e))-rr]};function Wrt(){return HL(gd).scale(961/Gi)}function HL(t){var e=Xa(t),n=e.center,r=e.scale,i=e.translate,a=e.clipExtent,o=null,s,c,l;e.scale=function(f){return arguments.length?(r(f),u()):r()},e.translate=function(f){return arguments.length?(i(f),u()):i()},e.center=function(f){return arguments.length?(n(f),u()):n()},e.clipExtent=function(f){return arguments.length?(f==null?o=s=c=l=null:(o=+f[0][0],s=+f[0][1],c=+f[1][0],l=+f[1][1]),u()):o==null?null:[[o,s],[c,l]]};function u(){var f=Ie*r(),d=e(Crt(e.rotate()).invert([0,0]));return a(o==null?[[d[0]-f,d[1]-f],[d[0]+f,d[1]+f]]:t===gd?[[Math.max(d[0]-f,o),s],[Math.min(d[0]+f,c),l]]:[[o,Math.max(d[1]-f,s)],[c,Math.min(d[1]+f,l)]])}return u()}function K0(t){return Ab((rr+t)/2)}function $L(t,e){var n=Ce(t),r=t===e?be(t):j0(n/Ce(e))/j0(K0(e)/K0(t)),i=n*Pb(K0(t),r)/r;if(!r)return gd;function a(o,s){i>0?s<-rr+ue&&(s=-rr+ue):s>rr-ue&&(s=rr-ue);var c=i/Pb(K0(s),r);return[c*be(r*o),i-c*Ce(r*o)]}return a.invert=function(o,s){var c=i-s,l=aa(r)*Pi(o*o+c*c),u=Mo(o,tn(c))*aa(c);return c*r<0&&(u-=Ie*aa(o)*aa(c)),[u/r,2*Kl(Pb(i/l,1/r))-rr]},a}function Yrt(){return Kb($L).scale(109.5).parallels([30,30])}function yd(t,e){return[t,e]}yd.invert=yd;function Hrt(){return Xa(yd).scale(152.63)}function VL(t,e){var n=Ce(t),r=t===e?be(t):(n-Ce(e))/(e-t),i=n/r+t;if(tn(r)<ue)return yd;function a(o,s){var c=i-s,l=r*o;return[c*be(l),i-c*Ce(l)]}return a.invert=function(o,s){var c=i-s,l=Mo(o,tn(c))*aa(c);return c*r<0&&(l-=Ie*aa(o)*aa(c)),[l/r,i-aa(r)*Pi(o*o+c*c)]},a}function $rt(){return Kb(VL).scale(131.154).center([0,13.9389])}var md=1.340264,bd=-.081106,xd=893e-6,_d=.003796,Q0=Pi(3)/2,Vrt=12;function tx(t,e){var n=oa(Q0*be(e)),r=n*n,i=r*r*r;return[t*Ce(n)/(Q0*(md+3*bd*r+i*(7*xd+9*_d*r))),n*(md+bd*r+i*(xd+_d*r))]}tx.invert=function(t,e){for(var n=e,r=n*n,i=r*r*r,a=0,o,s,c;a<Vrt&&(s=n*(md+bd*r+i*(xd+_d*r))-e,c=md+3*bd*r+i*(7*xd+9*_d*r),n-=o=s/c,r=n*n,i=r*r*r,!(tn(o)<Q5));++a);return[Q0*t*(md+3*bd*r+i*(7*xd+9*_d*r))/Ce(n),oa(be(n)/Q0)]};function Urt(){return Xa(tx).scale(177.158)}function ex(t,e){var n=Ce(e),r=Ce(t)*n;return[n*be(t)/r,be(e)/r]}ex.invert=vd(Kl);function Xrt(){return Xa(ex).scale(144.049).clipAngle(60)}function qrt(){var t=1,e=0,n=0,r=1,i=1,a=0,o,s,c=null,l,u,f,d=1,h=1,p=pd({point:function(x,_){var O=b([x,_]);this.stream.point(O[0],O[1])}}),v=sd,g,y;function m(){return d=t*r,h=t*i,g=y=null,b}function b(x){var _=x[0]*d,O=x[1]*h;if(a){var w=O*o-_*s;_=_*o+O*s,O=w}return[_+e,O+n]}return b.invert=function(x){var _=x[0]-e,O=x[1]-n;if(a){var w=O*o+_*s;_=_*o-O*s,O=w}return[_/d,O/h]},b.stream=function(x){return g&&y===x?g:g=p(v(y=x))},b.postclip=function(x){return arguments.length?(v=x,c=l=u=f=null,m()):v},b.clipExtent=function(x){return arguments.length?(v=x==null?(c=l=u=f=null,sd):NL(c=+x[0][0],l=+x[0][1],u=+x[1][0],f=+x[1][1]),m()):c==null?null:[[c,l],[u,f]]},b.scale=function(x){return arguments.length?(t=+x,m()):t},b.translate=function(x){return arguments.length?(e=+x[0],n=+x[1],m()):[e,n]},b.angle=function(x){return arguments.length?(a=x%360*Zn,s=be(a),o=Ce(a),m()):a*ei},b.reflectX=function(x){return arguments.length?(r=x?-1:1,m()):r<0},b.reflectY=function(x){return arguments.length?(i=x?-1:1,m()):i<0},b.fitExtent=function(x,_){return q0(b,x,_)},b.fitSize=function(x,_){return Ub(b,x,_)},b.fitWidth=function(x,_){return Xb(b,x,_)},b.fitHeight=function(x,_){return qb(b,x,_)},b}function nx(t,e){var n=e*e,r=n*n;return[t*(.8707-.131979*n+r*(-.013791+r*(.003971*n-.001529*r))),e*(1.007226+n*(.015085+r*(-.044475+.028874*n-.005916*r)))]}nx.invert=function(t,e){var n=e,r=25,i;do{var a=n*n,o=a*a;n-=i=(n*(1.007226+a*(.015085+o*(-.044475+.028874*a-.005916*o)))-e)/(1.007226+a*(.015085*3+o*(-.044475*7+.028874*9*a-.005916*11*o)))}while(tn(i)>ue&&--r>0);return[t/(.8707+(a=n*n)*(-.131979+a*(-.013791+a*a*a*(.003971-.001529*a)))),n]};function Zrt(){return Xa(nx).scale(175.295)}function rx(t,e){return[Ce(e)*be(t),be(e)]}rx.invert=vd(oa);function Krt(){return Xa(rx).scale(249.5).clipAngle(90+ue)}function ix(t,e){var n=Ce(e),r=1+Ce(t)*n;return[n*be(t)/r,be(e)/r]}ix.invert=vd(function(t){return 2*Kl(t)});function Qrt(){return Xa(ix).scale(250).clipAngle(142)}function ax(t,e){return[j0(Ab((rr+e)/2)),-t]}ax.invert=function(t,e){return[-e,2*Kl(tL(t))-rr]};function Jrt(){var t=HL(ax),e=t.center,n=t.rotate;return t.center=function(r){return arguments.length?e([-r[1],r[0]]):(r=e(),[r[1],-r[0]])},t.rotate=function(r){return arguments.length?n([r[0],r[1],r.length>2?r[2]+90:90]):(r=n(),[r[0],r[1],r[2]-90])},n([0,0,90]).scale(159.155)}var tit=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function eit(t){if(typeof t=="function")return t;const e=`geo${qo(t)}`,n=xe[e];if(!n)throw new Error(`Unknown coordinate: ${t}`);return n}function nit(t){return{type:"FeatureCollection",features:t.flatMap(e=>rit(e).features)}}function rit(t){const e={Point:"geometry",MultiPoint:"geometry",LineString:"geometry",MultiLineString:"geometry",Polygon:"geometry",MultiPolygon:"geometry",GeometryCollection:"geometry",Feature:"feature",FeatureCollection:"featureCollection"};if(!t||!t.type)return null;const n=e[t.type];if(!n)return null;if(n==="geometry")return{type:"FeatureCollection",features:[{type:"Feature",properties:{},geometry:t}]};if(n==="feature")return{type:"FeatureCollection",features:[t]};if(n==="featureCollection")return t}function iit(t,e){var n;for(const[r,i]of Object.entries(e))(n=t[r])===null||n===void 0||n.call(t,i)}function ait(t,e,n,r){const i=()=>{const s=e.filter(UL);return s.find(l=>l.sphere)?{type:"Sphere"}:nit(s.filter(l=>!l.sphere).flatMap(l=>l.data.value))},{outline:a=i()}=r,{size:o="fitExtent"}=r;if(o==="fitExtent")return oit(t,a,n);if(o==="fitWidth")return sit(t,a,n)}function oit(t,e,n){const{x:r,y:i,width:a,height:o}=n;t.fitExtent([[r,i],[a,o]],e)}function sit(t,e,n){const{width:r,height:i}=n,[[a,o],[s,c]]=OL(t.fitWidth(r,e)).bounds(e),l=Math.ceil(c-o),u=Math.min(Math.ceil(s-a),l),f=t.scale()*(u-1)/u,[d,h]=t.translate(),p=h+(i-l)/2;t.scale(f).translate([d,p]).precision(.2)}function cit(t){const{data:e}=t;if(Array.isArray(e))return Object.assign(Object.assign({},t),{data:{value:e}});const{type:n}=e;return n==="graticule10"?Object.assign(Object.assign({},t),{data:{value:[xrt()]}}):n==="sphere"?Object.assign(Object.assign({},t),{sphere:!0,data:{value:[{type:"Sphere"}]}}):t}function UL(t){return t.type==="geoPath"}const XL=()=>t=>{const{children:e,coordinate:n={}}=t;if(!Array.isArray(e))return[];const{type:r="equalEarth"}=n,i=tit(n,["type"]),a=eit(r),o=e.map(cit);let s;function c(){return[["custom",(f,d,h,p)=>{const v=a();ait(v,o,{x:f,y:d,width:h,height:p},i),iit(v,i),s=OL(v);const y=new Kr({domain:[f,f+h]}),m=new Kr({domain:[d,d+p]}),b=_=>{const O=v(_);if(!O)return[null,null];const[w,S]=O;return[y.map(w),m.map(S)]},x=_=>{if(!_)return null;const[O,w]=_,S=[y.invert(O),m.invert(w)];return v.invert(S)};return{transform:_=>b(_),untransform:_=>x(_)}}]]}function l(f){const{style:d,tooltip:h={}}=f;return Object.assign(Object.assign({},f),{type:"path",tooltip:Vp(h,{title:"id",items:[{channel:"color"}]}),style:Object.assign(Object.assign({},d),{d:p=>s(p)||[]})})}const u=f=>UL(f)?l(f):f;return[Object.assign(Object.assign({},t),{type:"view",scale:{x:{type:"identity"},y:{type:"identity"}},axis:!1,coordinate:{type:c},children:o.flatMap(u)})]};XL.props={};var lit=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const qL=()=>t=>{const{type:e,data:n,scale:r,encode:i,style:a,animate:o,key:s,state:c}=t,l=lit(t,["type","data","scale","encode","style","animate","key","state"]);return[Object.assign(Object.assign({type:"geoView"},l),{children:[{type:"geoPath",key:`${s}-0`,data:{value:n},scale:r,encode:i,style:a,animate:o,state:c}]})]};qL.props={};function uit(){return{"composition.geoView":XL,"composition.geoPath":qL}}function fit(t){const e=+this._x.call(null,t),n=+this._y.call(null,t);return ZL(this.cover(e,n),e,n,t)}function ZL(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var i,a=t._root,o={data:r},s=t._x0,c=t._y0,l=t._x1,u=t._y1,f,d,h,p,v,g,y,m;if(!a)return t._root=o,t;for(;a.length;)if((v=e>=(f=(s+l)/2))?s=f:l=f,(g=n>=(d=(c+u)/2))?c=d:u=d,i=a,!(a=a[y=g<<1|v]))return i[y]=o,t;if(h=+t._x.call(null,a.data),p=+t._y.call(null,a.data),e===h&&n===p)return o.next=a,i?i[y]=o:t._root=o,t;do i=i?i[y]=new Array(4):t._root=new Array(4),(v=e>=(f=(s+l)/2))?s=f:l=f,(g=n>=(d=(c+u)/2))?c=d:u=d;while((y=g<<1|v)===(m=(p>=d)<<1|h>=f));return i[m]=a,i[y]=o,t}function dit(t){var e,n,r=t.length,i,a,o=new Array(r),s=new Array(r),c=1/0,l=1/0,u=-1/0,f=-1/0;for(n=0;n<r;++n)isNaN(i=+this._x.call(null,e=t[n]))||isNaN(a=+this._y.call(null,e))||(o[n]=i,s[n]=a,i<c&&(c=i),i>u&&(u=i),a<l&&(l=a),a>f&&(f=a));if(c>u||l>f)return this;for(this.cover(c,l).cover(u,f),n=0;n<r;++n)ZL(this,o[n],s[n],t[n]);return this}function hit(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,r=this._y0,i=this._x1,a=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,a=(r=Math.floor(e))+1;else{for(var o=i-n||1,s=this._root,c,l;n>t||t>=i||r>e||e>=a;)switch(l=(e<r)<<1|t<n,c=new Array(4),c[l]=s,s=c,o*=2,l){case 0:i=n+o,a=r+o;break;case 1:n=i-o,a=r+o;break;case 2:i=n+o,r=a-o;break;case 3:n=i-o,r=a-o;break}this._root&&this._root.length&&(this._root=s)}return this._x0=n,this._y0=r,this._x1=i,this._y1=a,this}function pit(){var t=[];return this.visit(function(e){if(!e.length)do t.push(e.data);while(e=e.next)}),t}function vit(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function fi(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function git(t,e,n){var r,i=this._x0,a=this._y0,o,s,c,l,u=this._x1,f=this._y1,d=[],h=this._root,p,v;for(h&&d.push(new fi(h,i,a,u,f)),n==null?n=1/0:(i=t-n,a=e-n,u=t+n,f=e+n,n*=n);p=d.pop();)if(!(!(h=p.node)||(o=p.x0)>u||(s=p.y0)>f||(c=p.x1)<i||(l=p.y1)<a))if(h.length){var g=(o+c)/2,y=(s+l)/2;d.push(new fi(h[3],g,y,c,l),new fi(h[2],o,y,g,l),new fi(h[1],g,s,c,y),new fi(h[0],o,s,g,y)),(v=(e>=y)<<1|t>=g)&&(p=d[d.length-1],d[d.length-1]=d[d.length-1-v],d[d.length-1-v]=p)}else{var m=t-+this._x.call(null,h.data),b=e-+this._y.call(null,h.data),x=m*m+b*b;if(x<n){var _=Math.sqrt(n=x);i=t-_,a=e-_,u=t+_,f=e+_,r=h.data}}return r}function yit(t){if(isNaN(u=+this._x.call(null,t))||isNaN(f=+this._y.call(null,t)))return this;var e,n=this._root,r,i,a,o=this._x0,s=this._y0,c=this._x1,l=this._y1,u,f,d,h,p,v,g,y;if(!n)return this;if(n.length)for(;;){if((p=u>=(d=(o+c)/2))?o=d:c=d,(v=f>=(h=(s+l)/2))?s=h:l=h,e=n,!(n=n[g=v<<1|p]))return this;if(!n.length)break;(e[g+1&3]||e[g+2&3]||e[g+3&3])&&(r=e,y=g)}for(;n.data!==t;)if(i=n,!(n=n.next))return this;return(a=n.next)&&delete n.next,i?(a?i.next=a:delete i.next,this):e?(a?e[g]=a:delete e[g],(n=e[0]||e[1]||e[2]||e[3])&&n===(e[3]||e[2]||e[1]||e[0])&&!n.length&&(r?r[y]=n:this._root=n),this):(this._root=a,this)}function mit(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this}function bit(){return this._root}function xit(){var t=0;return this.visit(function(e){if(!e.length)do++t;while(e=e.next)}),t}function _it(t){var e=[],n,r=this._root,i,a,o,s,c;for(r&&e.push(new fi(r,this._x0,this._y0,this._x1,this._y1));n=e.pop();)if(!t(r=n.node,a=n.x0,o=n.y0,s=n.x1,c=n.y1)&&r.length){var l=(a+s)/2,u=(o+c)/2;(i=r[3])&&e.push(new fi(i,l,u,s,c)),(i=r[2])&&e.push(new fi(i,a,u,l,c)),(i=r[1])&&e.push(new fi(i,l,o,s,u)),(i=r[0])&&e.push(new fi(i,a,o,l,u))}return this}function Oit(t){var e=[],n=[],r;for(this._root&&e.push(new fi(this._root,this._x0,this._y0,this._x1,this._y1));r=e.pop();){var i=r.node;if(i.length){var a,o=r.x0,s=r.y0,c=r.x1,l=r.y1,u=(o+c)/2,f=(s+l)/2;(a=i[0])&&e.push(new fi(a,o,s,u,f)),(a=i[1])&&e.push(new fi(a,u,s,c,f)),(a=i[2])&&e.push(new fi(a,o,f,u,l)),(a=i[3])&&e.push(new fi(a,u,f,c,l))}n.push(r)}for(;r=n.pop();)t(r.node,r.x0,r.y0,r.x1,r.y1);return this}function wit(t){return t[0]}function Sit(t){return arguments.length?(this._x=t,this):this._x}function Mit(t){return t[1]}function Eit(t){return arguments.length?(this._y=t,this):this._y}function KL(t,e,n){var r=new ox(e==null?wit:e,n==null?Mit:n,NaN,NaN,NaN,NaN);return t==null?r:r.addAll(t)}function ox(t,e,n,r,i,a){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=a,this._root=void 0}function QL(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var di=KL.prototype=ox.prototype;di.copy=function(){var t=new ox(this._x,this._y,this._x0,this._y0,this._x1,this._y1),e=this._root,n,r;if(!e)return t;if(!e.length)return t._root=QL(e),t;for(n=[{source:e,target:t._root=new Array(4)}];e=n.pop();)for(var i=0;i<4;++i)(r=e.source[i])&&(r.length?n.push({source:r,target:e.target[i]=new Array(4)}):e.target[i]=QL(r));return t},di.add=fit,di.addAll=dit,di.cover=hit,di.data=pit,di.extent=vit,di.find=git,di.remove=yit,di.removeAll=mit,di.root=bit,di.size=xit,di.visit=_it,di.visitAfter=Oit,di.x=Sit,di.y=Eit;function Wi(t){return function(){return t}}function nu(t){return(t()-.5)*1e-6}var Pit={value:function(){}};function JL(){for(var t=0,e=arguments.length,n={},r;t<e;++t){if(!(r=arguments[t]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new J0(n)}function J0(t){this._=t}function Ait(t,e){return t.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}J0.prototype=JL.prototype={constructor:J0,on:function(e,n){var r=this._,i=Ait(e+"",r),a,o=-1,s=i.length;if(arguments.length<2){for(;++o<s;)if((a=(e=i[o]).type)&&(a=Tit(r[a],e.name)))return a;return}if(n!=null&&typeof n!="function")throw new Error("invalid callback: "+n);for(;++o<s;)if(a=(e=i[o]).type)r[a]=tN(r[a],e.name,n);else if(n==null)for(a in r)r[a]=tN(r[a],e.name,null);return this},copy:function(){var e={},n=this._;for(var r in n)e[r]=n[r].slice();return new J0(e)},call:function(e,n){if((a=arguments.length-2)>0)for(var r=new Array(a),i=0,a,o;i<a;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=this._[e],i=0,a=o.length;i<a;++i)o[i].value.apply(n,r)},apply:function(e,n,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],a=0,o=i.length;a<o;++a)i[a].value.apply(n,r)}};function Tit(t,e){for(var n=0,r=t.length,i;n<r;++n)if((i=t[n]).name===e)return i.value}function tN(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=Pit,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var Cit=JL,ru=0,Od=0,wd=0,eN=1e3,tv,Sd,ev=0,Oc=0,nv=0,Md=typeof performance=="object"&&performance.now?performance:Date,nN=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function rN(){return Oc||(nN(kit),Oc=Md.now()+nv)}function kit(){Oc=0}function sx(){this._call=this._time=this._next=null}sx.prototype=iN.prototype={constructor:sx,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?rN():+n)+(e==null?0:+e),!this._next&&Sd!==this&&(Sd?Sd._next=this:tv=this,Sd=this),this._call=t,this._time=n,cx()},stop:function(){this._call&&(this._call=null,this._time=1/0,cx())}};function iN(t,e,n){var r=new sx;return r.restart(t,e,n),r}function Lit(){rN(),++ru;for(var t=tv,e;t;)(e=Oc-t._time)>=0&&t._call.call(void 0,e),t=t._next;--ru}function aN(){Oc=(ev=Md.now())+nv,ru=Od=0;try{Lit()}finally{ru=0,Iit(),Oc=0}}function Nit(){var t=Md.now(),e=t-ev;e>eN&&(nv-=e,ev=t)}function Iit(){for(var t,e=tv,n,r=1/0;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:tv=n);Sd=t,cx(r)}function cx(t){if(!ru){Od&&(Od=clearTimeout(Od));var e=t-Oc;e>24?(t<1/0&&(Od=setTimeout(aN,t-Md.now()-nv)),wd&&(wd=clearInterval(wd))):(wd||(ev=Md.now(),wd=setInterval(Nit,eN)),ru=1,nN(aN))}}const jit=1664525,Rit=1013904223,oN=4294967296;function Dit(){let t=1;return()=>(t=(jit*t+Rit)%oN)/oN}function Bit(t){return t.x}function Fit(t){return t.y}var zit=10,Git=Math.PI*(3-Math.sqrt(5));function Wit(t){var e,n=1,r=.001,i=1-Math.pow(r,1/300),a=0,o=.6,s=new Map,c=iN(f),l=Cit("tick","end"),u=Dit();t==null&&(t=[]);function f(){d(),l.call("tick",e),n<r&&(c.stop(),l.call("end",e))}function d(v){var g,y=t.length,m;v===void 0&&(v=1);for(var b=0;b<v;++b)for(n+=(a-n)*i,s.forEach(function(x){x(n)}),g=0;g<y;++g)m=t[g],m.fx==null?m.x+=m.vx*=o:(m.x=m.fx,m.vx=0),m.fy==null?m.y+=m.vy*=o:(m.y=m.fy,m.vy=0);return e}function h(){for(var v=0,g=t.length,y;v<g;++v){if(y=t[v],y.index=v,y.fx!=null&&(y.x=y.fx),y.fy!=null&&(y.y=y.fy),isNaN(y.x)||isNaN(y.y)){var m=zit*Math.sqrt(.5+v),b=v*Git;y.x=m*Math.cos(b),y.y=m*Math.sin(b)}(isNaN(y.vx)||isNaN(y.vy))&&(y.vx=y.vy=0)}}function p(v){return v.initialize&&v.initialize(t,u),v}return h(),e={tick:d,restart:function(){return c.restart(f),e},stop:function(){return c.stop(),e},nodes:function(v){return arguments.length?(t=v,h(),s.forEach(p),e):t},alpha:function(v){return arguments.length?(n=+v,e):n},alphaMin:function(v){return arguments.length?(r=+v,e):r},alphaDecay:function(v){return arguments.length?(i=+v,e):+i},alphaTarget:function(v){return arguments.length?(a=+v,e):a},velocityDecay:function(v){return arguments.length?(o=1-v,e):1-o},randomSource:function(v){return arguments.length?(u=v,s.forEach(p),e):u},force:function(v,g){return arguments.length>1?(g==null?s.delete(v):s.set(v,p(g)),e):s.get(v)},find:function(v,g,y){var m=0,b=t.length,x,_,O,w,S;for(y==null?y=1/0:y*=y,m=0;m<b;++m)w=t[m],x=v-w.x,_=g-w.y,O=x*x+_*_,O<y&&(S=w,y=O);return S},on:function(v,g){return arguments.length>1?(l.on(v,g),e):l.on(v)}}}function Yit(){var t,e,n,r,i=Wi(-30),a,o=1,s=1/0,c=.81;function l(h){var p,v=t.length,g=KL(t,Bit,Fit).visitAfter(f);for(r=h,p=0;p<v;++p)e=t[p],g.visit(d)}function u(){if(t){var h,p=t.length,v;for(a=new Array(p),h=0;h<p;++h)v=t[h],a[v.index]=+i(v,h,t)}}function f(h){var p=0,v,g,y=0,m,b,x;if(h.length){for(m=b=x=0;x<4;++x)(v=h[x])&&(g=Math.abs(v.value))&&(p+=v.value,y+=g,m+=g*v.x,b+=g*v.y);h.x=m/y,h.y=b/y}else{v=h,v.x=v.data.x,v.y=v.data.y;do p+=a[v.data.index];while(v=v.next)}h.value=p}function d(h,p,v,g){if(!h.value)return!0;var y=h.x-e.x,m=h.y-e.y,b=g-p,x=y*y+m*m;if(b*b/c<x)return x<s&&(y===0&&(y=nu(n),x+=y*y),m===0&&(m=nu(n),x+=m*m),x<o&&(x=Math.sqrt(o*x)),e.vx+=y*h.value*r/x,e.vy+=m*h.value*r/x),!0;if(h.length||x>=s)return;(h.data!==e||h.next)&&(y===0&&(y=nu(n),x+=y*y),m===0&&(m=nu(n),x+=m*m),x<o&&(x=Math.sqrt(o*x)));do h.data!==e&&(b=a[h.data.index]*r/x,e.vx+=y*b,e.vy+=m*b);while(h=h.next)}return l.initialize=function(h,p){t=h,n=p,u()},l.strength=function(h){return arguments.length?(i=typeof h=="function"?h:Wi(+h),u(),l):i},l.distanceMin=function(h){return arguments.length?(o=h*h,l):Math.sqrt(o)},l.distanceMax=function(h){return arguments.length?(s=h*h,l):Math.sqrt(s)},l.theta=function(h){return arguments.length?(c=h*h,l):Math.sqrt(c)},l}function Hit(t){return t.index}function sN(t,e){var n=t.get(e);if(!n)throw new Error("node not found: "+e);return n}function $it(t){var e=Hit,n=f,r,i=Wi(30),a,o,s,c,l,u=1;t==null&&(t=[]);function f(g){return 1/Math.min(s[g.source.index],s[g.target.index])}function d(g){for(var y=0,m=t.length;y<u;++y)for(var b=0,x,_,O,w,S,M,E;b<m;++b)x=t[b],_=x.source,O=x.target,w=O.x+O.vx-_.x-_.vx||nu(l),S=O.y+O.vy-_.y-_.vy||nu(l),M=Math.sqrt(w*w+S*S),M=(M-a[b])/M*g*r[b],w*=M,S*=M,O.vx-=w*(E=c[b]),O.vy-=S*E,_.vx+=w*(E=1-E),_.vy+=S*E}function h(){if(o){var g,y=o.length,m=t.length,b=new Map(o.map((_,O)=>[e(_,O,o),_])),x;for(g=0,s=new Array(y);g<m;++g)x=t[g],x.index=g,typeof x.source!="object"&&(x.source=sN(b,x.source)),typeof x.target!="object"&&(x.target=sN(b,x.target)),s[x.source.index]=(s[x.source.index]||0)+1,s[x.target.index]=(s[x.target.index]||0)+1;for(g=0,c=new Array(m);g<m;++g)x=t[g],c[g]=s[x.source.index]/(s[x.source.index]+s[x.target.index]);r=new Array(m),p(),a=new Array(m),v()}}function p(){if(o)for(var g=0,y=t.length;g<y;++g)r[g]=+n(t[g],g,t)}function v(){if(o)for(var g=0,y=t.length;g<y;++g)a[g]=+i(t[g],g,t)}return d.initialize=function(g,y){o=g,l=y,h()},d.links=function(g){return arguments.length?(t=g,h(),d):t},d.id=function(g){return arguments.length?(e=g,d):e},d.iterations=function(g){return arguments.length?(u=+g,d):u},d.strength=function(g){return arguments.length?(n=typeof g=="function"?g:Wi(+g),p(),d):n},d.distance=function(g){return arguments.length?(i=typeof g=="function"?g:Wi(+g),v(),d):i},d}function Vit(t,e){var n,r=1;t==null&&(t=0),e==null&&(e=0);function i(){var a,o=n.length,s,c=0,l=0;for(a=0;a<o;++a)s=n[a],c+=s.x,l+=s.y;for(c=(c/o-t)*r,l=(l/o-e)*r,a=0;a<o;++a)s=n[a],s.x-=c,s.y-=l}return i.initialize=function(a){n=a},i.x=function(a){return arguments.length?(t=+a,i):t},i.y=function(a){return arguments.length?(e=+a,i):e},i.strength=function(a){return arguments.length?(r=+a,i):r},i}function Uit(t){var e=Wi(.1),n,r,i;typeof t!="function"&&(t=Wi(t==null?0:+t));function a(s){for(var c=0,l=n.length,u;c<l;++c)u=n[c],u.vx+=(i[c]-u.x)*r[c]*s}function o(){if(n){var s,c=n.length;for(r=new Array(c),i=new Array(c),s=0;s<c;++s)r[s]=isNaN(i[s]=+t(n[s],s,n))?0:+e(n[s],s,n)}}return a.initialize=function(s){n=s,o()},a.strength=function(s){return arguments.length?(e=typeof s=="function"?s:Wi(+s),o(),a):e},a.x=function(s){return arguments.length?(t=typeof s=="function"?s:Wi(+s),o(),a):t},a}function Xit(t){var e=Wi(.1),n,r,i;typeof t!="function"&&(t=Wi(t==null?0:+t));function a(s){for(var c=0,l=n.length,u;c<l;++c)u=n[c],u.vy+=(i[c]-u.y)*r[c]*s}function o(){if(n){var s,c=n.length;for(r=new Array(c),i=new Array(c),s=0;s<c;++s)r[s]=isNaN(i[s]=+t(n[s],s,n))?0:+e(n[s],s,n)}}return a.initialize=function(s){n=s,o()},a.strength=function(s){return arguments.length?(e=typeof s=="function"?s:Wi(+s),o(),a):e},a.y=function(s){return arguments.length?(t=typeof s=="function"?s:Wi(+s),o(),a):t},a}var qit=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const Zit={joint:!0},Kit={type:"link",axis:!1,legend:!1,encode:{x:[t=>t.source.x,t=>t.target.x],y:[t=>t.source.y,t=>t.target.y]},style:{stroke:"#999",strokeOpacity:.6}},Qit={type:"point",axis:!1,legend:!1,encode:{x:"x",y:"y",size:5,color:"group",shape:"point"},style:{stroke:"#fff"}},Jit={text:""};function tat(t,e,n){const{nodes:r,links:i}=t,{joint:a,nodeStrength:o,linkStrength:s}=e,{nodeKey:c=p=>p.id,linkKey:l=p=>p.id}=n,u=Yit(),f=$it(i).id($a(l));typeof o=="function"&&u.strength(o),typeof s=="function"&&f.strength(s);const d=Wit(r).force("link",f).force("charge",u);a?d.force("center",Vit()):d.force("x",Uit()).force("y",Xit()),d.stop();const h=Math.ceil(Math.log(d.alphaMin())/Math.log(1-d.alphaDecay()));for(let p=0;p<h;p++)d.tick();return{nodesData:r,linksData:i}}const cN=t=>{const{data:e,encode:n={},scale:r,style:i={},layout:a={},nodeLabels:o=[],linkLabels:s=[],animate:c={},tooltip:l={}}=t,{nodeKey:u=O=>O.id,linkKey:f=O=>O.id}=n,d=qit(n,["nodeKey","linkKey"]),h=Object.assign({nodeKey:u,linkKey:f},d),p=At(h,"node"),v=At(h,"link"),{links:g,nodes:y}=s1(e,h),{nodesData:m,linksData:b}=tat({links:g,nodes:y},dt({},Zit,a),h),x=Wa(l,"link",{items:[O=>({name:"source",value:$a(f)(O.source)}),O=>({name:"target",value:$a(f)(O.target)})]}),_=Wa(l,"node",{items:[O=>({name:"key",value:$a(u)(O)})]},!0);return[dt({},Kit,{data:b,encode:v,labels:s,style:At(i,"link"),tooltip:x,animate:Ya(c,"link")}),dt({},Qit,{data:m,encode:Object.assign({},p),scale:r,style:At(i,"node"),tooltip:_,labels:[Object.assign(Object.assign({},Jit),At(i,"label")),...o],animate:Ya(c,"link")})]};cN.props={};function eat(t,e){return t.parent===e.parent?1:2}function lx(t){var e=t.children;return e?e[0]:t.t}function ux(t){var e=t.children;return e?e[e.length-1]:t.t}function nat(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}function rat(t){for(var e=0,n=0,r=t.children,i=r.length,a;--i>=0;)a=r[i],a.z+=e,a.m+=e,e+=a.s+(n+=a.c)}function iat(t,e,n){return t.a.parent===e.parent?t.a:n}function rv(t,e){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}rv.prototype=Object.create(zl.prototype);function aat(t){for(var e=new rv(t,0),n,r=[e],i,a,o,s;n=r.pop();)if(a=n._.children)for(n.children=new Array(s=a.length),o=s-1;o>=0;--o)r.push(i=n.children[o]=new rv(a[o],o)),i.parent=n;return(e.parent=new rv(null,0)).children=[e],e}function oat(){var t=eat,e=1,n=1,r=null;function i(l){var u=aat(l);if(u.eachAfter(a),u.parent.m=-u.z,u.eachBefore(o),r)l.eachBefore(c);else{var f=l,d=l,h=l;l.eachBefore(function(m){m.x<f.x&&(f=m),m.x>d.x&&(d=m),m.depth>h.depth&&(h=m)});var p=f===d?1:t(f,d)/2,v=p-f.x,g=e/(d.x+p+v),y=n/(h.depth||1);l.eachBefore(function(m){m.x=(m.x+v)*g,m.y=m.depth*y})}return l}function a(l){var u=l.children,f=l.parent.children,d=l.i?f[l.i-1]:null;if(u){rat(l);var h=(u[0].z+u[u.length-1].z)/2;d?(l.z=d.z+t(l._,d._),l.m=l.z-h):l.z=h}else d&&(l.z=d.z+t(l._,d._));l.parent.A=s(l,d,l.parent.A||f[0])}function o(l){l._.x=l.z+l.parent.m,l.m+=l.parent.m}function s(l,u,f){if(u){for(var d=l,h=l,p=u,v=d.parent.children[0],g=d.m,y=h.m,m=p.m,b=v.m,x;p=ux(p),d=lx(d),p&&d;)v=lx(v),h=ux(h),h.a=l,x=p.z+m-d.z-g+t(p._,d._),x>0&&(nat(iat(p,l,f),l,x),g+=x,y+=x),m+=p.m,g+=d.m,b+=v.m,y+=h.m;p&&!ux(h)&&(h.t=p,h.m+=m-y),d&&!lx(v)&&(v.t=d,v.m+=g-b,f=l)}return f}function c(l){l.x*=e,l.y=l.depth*n}return i.separation=function(l){return arguments.length?(t=l,i):t},i.size=function(l){return arguments.length?(r=!1,e=+l[0],n=+l[1],i):r?null:[e,n]},i.nodeSize=function(l){return arguments.length?(r=!0,e=+l[0],n=+l[1],i):r?[e,n]:null},i}function sat(t,e){return t.parent===e.parent?1:2}function cat(t){return t.reduce(lat,0)/t.length}function lat(t,e){return t+e.x}function uat(t){return 1+t.reduce(fat,0)}function fat(t,e){return Math.max(t,e.y)}function dat(t){for(var e;e=t.children;)t=e[0];return t}function hat(t){for(var e;e=t.children;)t=e[e.length-1];return t}function pat(){var t=sat,e=1,n=1,r=!1;function i(a){var o,s=0;a.eachAfter(function(d){var h=d.children;h?(d.x=cat(h),d.y=uat(h)):(d.x=o?s+=t(d,o):0,d.y=0,o=d)});var c=dat(a),l=hat(a),u=c.x-t(c,l)/2,f=l.x+t(l,c)/2;return a.eachAfter(r?function(d){d.x=(d.x-a.x)*e,d.y=(a.y-d.y)*n}:function(d){d.x=(d.x-u)/(f-u)*e,d.y=(1-(a.y?d.y/a.y:1))*n})}return i.separation=function(a){return arguments.length?(t=a,i):t},i.size=function(a){return arguments.length?(r=!1,e=+a[0],n=+a[1],i):r?null:[e,n]},i.nodeSize=function(a){return arguments.length?(r=!0,e=+a[0],n=+a[1],i):r?[e,n]:null},i}const lN=t=>e=>n=>{const{field:r="value",nodeSize:i,separation:a,sortBy:o,as:s=["x","y"]}=e,[c,l]=s,u=Fl(n,p=>p.children).sum(p=>p[r]).sort(o),f=t();f.size([1,1]),i&&f.nodeSize(i),a&&f.separation(a),f(u);const d=[];u.each(p=>{p[c]=p.x,p[l]=p.y,p.name=p.data.name,d.push(p)});const h=u.links();return h.forEach(p=>{p[c]=[p.source[c],p.target[c]],p[l]=[p.source[l],p.target[l]]}),{nodes:d,edges:h}},uN=t=>lN(pat)(t);uN.props={};const fN=t=>lN(oat)(t);fN.props={};const vat={sortBy:(t,e)=>e.value-t.value},gat={axis:!1,legend:!1,type:"point",encode:{x:"x",y:"y",size:2,shape:"point"}},yat={type:"link",encode:{x:"x",y:"y",shape:"smooth"}},mat={text:"",fontSize:10},dN=t=>{const{data:e,encode:n={},scale:r={},style:i={},layout:a={},nodeLabels:o=[],linkLabels:s=[],animate:c={},tooltip:l={}}=t,u=n==null?void 0:n.value,{nodes:f,edges:d}=fN(Object.assign(Object.assign(Object.assign({},vat),a),{field:u}))(e),h=Wa(l,"node",{title:"name",items:["value"]},!0),p=Wa(l,"link",{title:"",items:[v=>({name:"source",value:v.source.name}),v=>({name:"target",value:v.target.name})]});return[dt({},yat,{data:d,encode:At(n,"link"),scale:At(r,"link"),labels:s,style:Object.assign({stroke:"#999"},At(i,"link")),tooltip:p,animate:Ya(c,"link")}),dt({},gat,{data:f,scale:At(r,"node"),encode:At(n,"node"),labels:[Object.assign(Object.assign({},mat),At(i,"label")),...o],style:Object.assign({},At(i,"node")),tooltip:h,animate:Ya(c,"node")})]};dN.props={};var bat=1664525,xat=1013904223,hN=4294967296;function _at(){var t=1;return function(){return(t=(bat*t+xat)%hN)/hN}}var Oat=J(52677);function wat(t){return Oat(t)==="object"&&"length"in t?t:Array.from(t)}function Sat(t,e){for(var n=t.length,r,i;n;)i=e()*n--|0,r=t[n],t[n]=t[i],t[i]=r;return t}function n1t(t){return pN(t,lcg())}function pN(t,e){for(var n=0,r=(t=Sat(Array.from(t),e)).length,i=[],a,o;n<r;)a=t[n],o&&vN(o,a)?++n:(o=Eat(i=Mat(i,a)),n=0);return o}function Mat(t,e){var n,r;if(fx(e,t))return[e];for(n=0;n<t.length;++n)if(iv(e,t[n])&&fx(Ed(t[n],e),t))return[t[n],e];for(n=0;n<t.length-1;++n)for(r=n+1;r<t.length;++r)if(iv(Ed(t[n],t[r]),e)&&iv(Ed(t[n],e),t[r])&&iv(Ed(t[r],e),t[n])&&fx(gN(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}function iv(t,e){var n=t.r-e.r,r=e.x-t.x,i=e.y-t.y;return n<0||n*n<r*r+i*i}function vN(t,e){var n=t.r-e.r+Math.max(t.r,e.r,1)*1e-9,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function fx(t,e){for(var n=0;n<e.length;++n)if(!vN(t,e[n]))return!1;return!0}function Eat(t){switch(t.length){case 1:return Pat(t[0]);case 2:return Ed(t[0],t[1]);case 3:return gN(t[0],t[1],t[2])}}function Pat(t){return{x:t.x,y:t.y,r:t.r}}function Ed(t,e){var n=t.x,r=t.y,i=t.r,a=e.x,o=e.y,s=e.r,c=a-n,l=o-r,u=s-i,f=Math.sqrt(c*c+l*l);return{x:(n+a+c/f*u)/2,y:(r+o+l/f*u)/2,r:(f+i+s)/2}}function gN(t,e,n){var r=t.x,i=t.y,a=t.r,o=e.x,s=e.y,c=e.r,l=n.x,u=n.y,f=n.r,d=r-o,h=r-l,p=i-s,v=i-u,g=c-a,y=f-a,m=r*r+i*i-a*a,b=m-o*o-s*s+c*c,x=m-l*l-u*u+f*f,_=h*p-d*v,O=(p*x-v*b)/(_*2)-r,w=(v*g-p*y)/_,S=(h*b-d*x)/(_*2)-i,M=(d*y-h*g)/_,E=w*w+M*M-1,P=2*(a+O*w+S*M),L=O*O+S*S-a*a,A=-(Math.abs(E)>1e-6?(P+Math.sqrt(P*P-4*E*L))/(2*E):L/P);return{x:r+O+w*A,y:i+S+M*A,r:A}}function yN(t,e,n){var r=t.x-e.x,i,a,o=t.y-e.y,s,c,l=r*r+o*o;l?(a=e.r+n.r,a*=a,c=t.r+n.r,c*=c,a>c?(i=(l+c-a)/(2*l),s=Math.sqrt(Math.max(0,c/l-i*i)),n.x=t.x-i*r-s*o,n.y=t.y-i*o+s*r):(i=(l+a-c)/(2*l),s=Math.sqrt(Math.max(0,a/l-i*i)),n.x=e.x+i*r-s*o,n.y=e.y+i*o+s*r)):(n.x=e.x+n.r,n.y=e.y)}function mN(t,e){var n=t.r+e.r-1e-6,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function bN(t){var e=t._,n=t.next._,r=e.r+n.r,i=(e.x*n.r+n.x*e.r)/r,a=(e.y*n.r+n.y*e.r)/r;return i*i+a*a}function av(t){this._=t,this.next=null,this.previous=null}function xN(t,e){if(!(a=(t=wat(t)).length))return 0;var n,r,i,a,o,s,c,l,u,f,d;if(n=t[0],n.x=0,n.y=0,!(a>1))return n.r;if(r=t[1],n.x=-r.r,r.x=n.r,r.y=0,!(a>2))return n.r+r.r;yN(r,n,i=t[2]),n=new av(n),r=new av(r),i=new av(i),n.next=i.previous=r,r.next=n.previous=i,i.next=r.previous=n;t:for(c=3;c<a;++c){yN(n._,r._,i=t[c]),i=new av(i),l=r.next,u=n.previous,f=r._.r,d=n._.r;do if(f<=d){if(mN(l._,i._)){r=l,n.next=r,r.previous=n,--c;continue t}f+=l._.r,l=l.next}else{if(mN(u._,i._)){n=u,n.next=r,r.previous=n,--c;continue t}d+=u._.r,u=u.previous}while(l!==u.next);for(i.previous=n,i.next=r,n.next=r.previous=r=i,o=bN(n);(i=i.next)!==r;)(s=bN(i))<o&&(n=i,o=s);r=n.next}for(n=[r._],i=r;(i=i.next)!==r;)n.push(i._);for(i=pN(n,e),c=0;c<a;++c)n=t[c],n.x-=i.x,n.y-=i.y;return i.r}function r1t(t){return xN(t,lcg()),t}function Aat(t){return Math.sqrt(t.value)}function Tat(){var t=null,e=1,n=1,r=xc;function i(a){var o=_at();return a.x=e/2,a.y=n/2,t?a.eachBefore(_N(t)).eachAfter(dx(r,.5,o)).eachBefore(ON(1)):a.eachBefore(_N(Aat)).eachAfter(dx(xc,1,o)).eachAfter(dx(r,a.r/Math.min(e,n),o)).eachBefore(ON(Math.min(e,n)/(2*a.r))),a}return i.radius=function(a){return arguments.length?(t=w0(a),i):t},i.size=function(a){return arguments.length?(e=+a[0],n=+a[1],i):[e,n]},i.padding=function(a){return arguments.length?(r=typeof a=="function"?a:ql(+a),i):r},i}function _N(t){return function(e){e.children||(e.r=Math.max(0,+t(e)||0))}}function dx(t,e,n){return function(r){if(i=r.children){var i,a,o=i.length,s=t(r)*e||0,c;if(s)for(a=0;a<o;++a)i[a].r+=s;if(c=xN(i,n),s)for(a=0;a<o;++a)i[a].r-=s;r.r=c+s}}}function ON(t){return function(e){var n=e.parent;e.r*=t,n&&(e.x=n.x+t*e.x,e.y=n.y+t*e.y)}}var Cat=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const kat=(t,e)=>({size:[t,e],padding:0,sort:(n,r)=>r.value-n.value}),Lat=(t,e,n)=>({type:"point",axis:!1,legend:!1,scale:{x:{domain:[0,t]},y:{domain:[0,e]},size:{type:"identity"}},encode:{x:"x",y:"y",size:"r",shape:"point"},style:{fill:n.color?void 0:r=>r.height===0?"#ddd":"#fff",stroke:n.color?void 0:r=>r.height===0?"":"#000"}}),Nat={text:"",position:"inside",textOverflow:"clip",wordWrap:!0,maxLines:1,wordWrapWidth:t=>t.r*2},Iat={title:t=>t.data.name,items:[{field:"value"}]},jat=(t,e,n)=>{const{value:r}=n,i=mr(t)?ob().path(e.path)(t):Fl(t);return r?i.sum(a=>$a(r)(a)).sort(e.sort):i.count(),Tat().size(e.size).padding(e.padding)(i),i.descendants()},wN=(t,e)=>{const{width:n,height:r}=e,{data:i,encode:a={},scale:o={},style:s={},layout:c={},labels:l=[],tooltip:u={}}=t,f=Cat(t,["data","encode","scale","style","layout","labels","tooltip"]),d=Lat(n,r,a),h=jat(i,dt({},kat(n,r),c),dt({},d.encode,a)),p=At(s,"label");return dt({},d,Object.assign(Object.assign({data:h,encode:a,scale:o,style:s,labels:[Object.assign(Object.assign({},Nat),p),...l]},f),{tooltip:Vp(u,Iat),axis:!1}))};wN.props={};function Rat(t){return t.target.depth}function Dat(t){return t.depth}function Bat(t,e){return e-1-t.height}function ov(t,e){return t.sourceLinks.length?t.depth:e-1}function Fat(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?Bi(t.sourceLinks,Rat)-1:0}function sv(t){return function(){return t}}function SN(t,e){return cv(t.source,e.source)||t.index-e.index}function MN(t,e){return cv(t.target,e.target)||t.index-e.index}function cv(t,e){return t.y0-e.y0}function hx(t){return t.value}function zat(t){return t.index}function Gat(t){return t.nodes}function Wat(t){return t.links}function EN(t,e){const n=t.get(e);if(!n)throw new Error("missing: "+e);return n}function PN({nodes:t}){for(const e of t){let n=e.y0,r=n;for(const i of e.sourceLinks)i.y0=n+i.width/2,n+=i.width;for(const i of e.targetLinks)i.y1=r+i.width/2,r+=i.width}}function Yat(){let t=0,e=0,n=1,r=1,i=24,a=8,o,s=zat,c=ov,l,u,f,d=Gat,h=Wat,p=6;function v(N){const B={nodes:d(N),links:h(N)};return g(B),y(B),m(B),b(B),O(B),PN(B),B}v.update=function(N){return PN(N),N},v.nodeId=function(N){return arguments.length?(s=typeof N=="function"?N:sv(N),v):s},v.nodeAlign=function(N){return arguments.length?(c=typeof N=="function"?N:sv(N),v):c},v.nodeDepth=function(N){return arguments.length?(l=N,v):l},v.nodeSort=function(N){return arguments.length?(u=N,v):u},v.nodeWidth=function(N){return arguments.length?(i=+N,v):i},v.nodePadding=function(N){return arguments.length?(a=o=+N,v):a},v.nodes=function(N){return arguments.length?(d=typeof N=="function"?N:sv(N),v):d},v.links=function(N){return arguments.length?(h=typeof N=="function"?N:sv(N),v):h},v.linkSort=function(N){return arguments.length?(f=N,v):f},v.size=function(N){return arguments.length?(t=e=0,n=+N[0],r=+N[1],v):[n-t,r-e]},v.extent=function(N){return arguments.length?(t=+N[0][0],n=+N[1][0],e=+N[0][1],r=+N[1][1],v):[[t,e],[n,r]]},v.iterations=function(N){return arguments.length?(p=+N,v):p};function g({nodes:N,links:B}){N.forEach((D,G)=>{D.index=G,D.sourceLinks=[],D.targetLinks=[]});const j=new Map(N.map(D=>[s(D),D]));if(B.forEach((D,G)=>{D.index=G;let{source:Y,target:U}=D;typeof Y!="object"&&(Y=D.source=EN(j,Y)),typeof U!="object"&&(U=D.target=EN(j,U)),Y.sourceLinks.push(D),U.targetLinks.push(D)}),f!=null)for(const{sourceLinks:D,targetLinks:G}of N)D.sort(f),G.sort(f)}function y({nodes:N}){for(const B of N)B.value=B.fixedValue===void 0?Math.max(Qi(B.sourceLinks,hx),Qi(B.targetLinks,hx)):B.fixedValue}function m({nodes:N}){const B=N.length;let j=new Set(N),D=new Set,G=0;for(;j.size;){if(j.forEach(Y=>{Y.depth=G;for(const{target:U}of Y.sourceLinks)D.add(U)}),++G>B)throw new Error("circular link");j=D,D=new Set}if(l){const Y=Math.max(sn(N,V=>V.depth)+1,0);let U;for(let V=0;V<N.length;V++)U=N[V],U.depth=l.call(null,U,Y)}}function b({nodes:N}){const B=N.length;let j=new Set(N),D=new Set,G=0;for(;j.size;){if(j.forEach(Y=>{Y.height=G;for(const{source:U}of Y.targetLinks)D.add(U)}),++G>B)throw new Error("circular link");j=D,D=new Set}}function x({nodes:N}){const B=Math.max(sn(N,G=>G.depth)+1,0),j=(n-t-i)/(B-1),D=new Array(B).fill(0).map(()=>[]);for(const G of N){const Y=Math.max(0,Math.min(B-1,Math.floor(c.call(null,G,B))));G.layer=Y,G.x0=t+Y*j,G.x1=G.x0+i,D[Y]?D[Y].push(G):D[Y]=[G]}if(u)for(const G of D)G.sort(u);return D}function _(N){const B=Bi(N,j=>(r-e-(j.length-1)*o)/Qi(j,hx));for(const j of N){let D=e;for(const G of j){G.y0=D,G.y1=D+G.value*B,D=G.y1+o;for(const Y of G.sourceLinks)Y.width=Y.value*B}D=(r-D+o)/(j.length+1);for(let G=0;G<j.length;++G){const Y=j[G];Y.y0+=D*(G+1),Y.y1+=D*(G+1)}A(j)}}function O(N){const B=x(N);o=Math.min(a,(r-e)/(sn(B,j=>j.length)-1)),_(B);for(let j=0;j<p;++j){const D=Math.pow(.99,j),G=Math.max(1-D,(j+1)/p);S(B,D,G),w(B,D,G)}}function w(N,B,j){for(let D=1,G=N.length;D<G;++D){const Y=N[D];for(const U of Y){let V=0,it=0;for(const{source:Ot,value:ht}of U.targetLinks){const ut=ht*(U.layer-Ot.layer);V+=T(Ot,U)*ut,it+=ut}if(!(it>0))continue;const pt=(V/it-U.y0)*B;U.y0+=pt,U.y1+=pt,L(U)}u===void 0&&Y.sort(cv),Y.length&&M(Y,j)}}function S(N,B,j){for(let D=N.length,G=D-2;G>=0;--G){const Y=N[G];for(const U of Y){let V=0,it=0;for(const{target:Ot,value:ht}of U.sourceLinks){const ut=ht*(Ot.layer-U.layer);V+=C(U,Ot)*ut,it+=ut}if(!(it>0))continue;const pt=(V/it-U.y0)*B;U.y0+=pt,U.y1+=pt,L(U)}u===void 0&&Y.sort(cv),Y.length&&M(Y,j)}}function M(N,B){const j=N.length>>1,D=N[j];P(N,D.y0-o,j-1,B),E(N,D.y1+o,j+1,B),P(N,r,N.length-1,B),E(N,e,0,B)}function E(N,B,j,D){for(;j<N.length;++j){const G=N[j],Y=(B-G.y0)*D;Y>1e-6&&(G.y0+=Y,G.y1+=Y),B=G.y1+o}}function P(N,B,j,D){for(;j>=0;--j){const G=N[j],Y=(G.y1-B)*D;Y>1e-6&&(G.y0-=Y,G.y1-=Y),B=G.y0-o}}function L({sourceLinks:N,targetLinks:B}){if(f===void 0){for(const{source:{sourceLinks:j}}of B)j.sort(MN);for(const{target:{targetLinks:j}}of N)j.sort(SN)}}function A(N){if(f===void 0)for(const{sourceLinks:B,targetLinks:j}of N)B.sort(MN),j.sort(SN)}function T(N,B){let j=N.y0-(N.sourceLinks.length-1)*o/2;for(const{target:D,width:G}of N.sourceLinks){if(D===B)break;j+=G+o}for(const{source:D,width:G}of B.targetLinks){if(D===N)break;j-=G}return j}function C(N,B){let j=B.y0-(B.targetLinks.length-1)*o/2;for(const{source:D,width:G}of B.targetLinks){if(D===N)break;j+=G+o}for(const{target:D,width:G}of N.sourceLinks){if(D===B)break;j-=G}return j}return v}const Hat={nodeAlign:"justify",nodeWidth:.008,nodePadding:.03,nodes:t=>t.nodes,links:t=>t.links,nodeSort:void 0,linkSort:void 0,iterations:6},$at={left:Dat,right:Bat,center:Fat,justify:ov};function Vat(t){const e=typeof t;return e==="string"?$at[t]||ov:e==="function"?t:ov}const AN=t=>e=>{const{nodeId:n,nodeSort:r,nodeAlign:i,nodeWidth:a,nodePadding:o,nodeDepth:s,nodes:c,links:l,linkSort:u,iterations:f}=Object.assign({},Hat,t),d=Yat().nodeSort(r).linkSort(u).links(l).nodes(c).nodeWidth(a).nodePadding(o).nodeDepth(s).nodeAlign(Vat(i)).iterations(f).extent([[0,0],[1,1]]);typeof n=="function"&&d.nodeId(n);const h=d(e),{nodes:p,links:v}=h,g=p.map(m=>{const{x0:b,x1:x,y0:_,y1:O}=m;return Object.assign(Object.assign({},m),{x:[b,x,x,b],y:[_,_,O,O]})}),y=v.map(m=>{const{source:b,target:x}=m,_=b.x1,O=x.x0,w=m.width/2;return Object.assign(Object.assign({},m),{x:[_,_,O,O],y:[m.y0+w,m.y0-w,m.y1+w,m.y1-w]})});return{nodes:g,links:y}};AN.props={};var Uat=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const Xat={nodeId:t=>t.key,nodeWidth:.02,nodePadding:.02},qat={type:"polygon",axis:!1,legend:!1,encode:{shape:"polygon",x:"x",y:"y"},scale:{x:{type:"identity"},y:{type:"identity"}},style:{stroke:"#000"}},Zat={type:"polygon",axis:!1,legend:!1,encode:{shape:"ribbon",x:"x",y:"y"},style:{fillOpacity:.5,stroke:void 0}},Kat={textAlign:t=>t.x[0]<.5?"start":"end",position:t=>t.x[0]<.5?"right":"left",fontSize:10},TN=t=>{const{data:e,encode:n={},scale:r,style:i={},layout:a={},nodeLabels:o=[],linkLabels:s=[],animate:c={},tooltip:l={}}=t,{links:u,nodes:f}=s1(e,n),d=At(n,"node"),h=At(n,"link"),{key:p=M=>M.key,color:v=p}=d,{links:g,nodes:y}=AN(Object.assign(Object.assign(Object.assign({},Xat),{nodeId:$a(p)}),a))({links:u,nodes:f}),m=At(i,"label"),{text:b=p,spacing:x=5}=m,_=Uat(m,["text","spacing"]),O=$a(p),w=Wa(l,"node",{title:O,items:[{field:"value"}]},!0),S=Wa(l,"link",{title:"",items:[M=>({name:"source",value:O(M.source)}),M=>({name:"target",value:O(M.target)})]});return[dt({},qat,{data:y,encode:Object.assign(Object.assign({},d),{color:v}),scale:r,style:At(i,"node"),labels:[Object.assign(Object.assign(Object.assign({},Kat),{text:b,dx:M=>M.x[0]<.5?x:-x}),_),...o],tooltip:w,animate:Ya(c,"node"),axis:!1}),dt({},Zat,{data:g,encode:h,labels:s,style:Object.assign({fill:h.color?void 0:"#aaa",strokeWidth:0},At(i,"link")),tooltip:S,animate:Ya(c,"link")})]};TN.props={};function Qat(t,e){return e.value-t.value}function Jat(t,e){return e.frequency-t.frequency}function tot(t,e){return`${t.id}`.localeCompare(`${e.id}`)}function eot(t,e){return`${t.name}`.localeCompare(`${e.name}`)}const not={y:0,thickness:.05,weight:!1,marginRatio:.1,id:t=>t.id,source:t=>t.source,target:t=>t.target,sourceWeight:t=>t.value||1,targetWeight:t=>t.value||1,sortBy:null};function rot(t){const{y:e,thickness:n,weight:r,marginRatio:i,id:a,source:o,target:s,sourceWeight:c,targetWeight:l,sortBy:u}=Object.assign(Object.assign({},not),t);function f(g){const y=g.nodes.map(b=>Object.assign({},b)),m=g.edges.map(b=>Object.assign({},b));return d(y,m),h(y,m),p(y,m),v(y,m),{nodes:y,edges:m}}function d(g,y){y.forEach(x=>{x.source=o(x),x.target=s(x),x.sourceWeight=c(x),x.targetWeight=l(x)});const m=Bn(y,x=>x.source),b=Bn(y,x=>x.target);return g.forEach(x=>{x.id=a(x);const _=m.has(x.id)?m.get(x.id):[],O=b.has(x.id)?b.get(x.id):[];x.frequency=_.length+O.length,x.value=Qi(_,w=>w.sourceWeight)+Qi(O,w=>w.targetWeight)}),{nodes:g,edges:y}}function h(g,y){const m=typeof u=="function"?u:$t[u];m&&g.sort(m)}function p(g,y){const m=g.length;if(!m)throw yl("Invalid nodes: it's empty!");if(!r){const _=1/m;return g.forEach((O,w)=>{O.x=(w+.5)*_,O.y=e}),{nodes:g,edges:y}}const b=i/(2*m),x=g.reduce((_,O)=>_+=O.value,0);return g.reduce((_,O)=>{O.weight=O.value/x,O.width=O.weight*(1-i),O.height=n;const w=b+_,S=w+O.width,M=e-n/2,E=M+n;return O.x=[w,S,S,w],O.y=[M,M,E,E],_+O.width+2*b},0),{nodes:g,edges:y}}function v(g,y){const m=new Map(g.map(_=>[_.id,_]));if(!r)return y.forEach(_=>{const O=o(_),w=s(_),S=m.get(O),M=m.get(w);S&&M&&(_.x=[S.x,M.x],_.y=[S.y,M.y])}),{nodes:g,edges:y};y.forEach(_=>{_.x=[0,0,0,0],_.y=[e,e,e,e]});const b=Bn(y,_=>_.source),x=Bn(y,_=>_.target);g.forEach(_=>{const{edges:O,width:w,x:S,y:M,value:E,id:P}=_,L=b.get(P)||[],A=x.get(P)||[];let T=0;L.map(C=>{const N=C.sourceWeight/E*w;C.x[0]=S[0]+T,C.x[1]=S[0]+T+N,T+=N}),A.forEach(C=>{const N=C.targetWeight/E*w;C.x[3]=S[0]+T,C.x[2]=S[0]+T+N,T+=N})})}return f}const px=t=>e=>rot(t)(e);px.props={};var CN=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const vx={y:0,thickness:.05,marginRatio:.1,id:t=>t.key,source:t=>t.source,target:t=>t.target,sourceWeight:t=>t.value||1,targetWeight:t=>t.value||1,sortBy:null},iot={type:"polygon",axis:!1,legend:!1,encode:{shape:"polygon",x:"x",y:"y"},scale:{x:{type:"identity"},y:{type:"identity"}},style:{opacity:1,fillOpacity:1,lineWidth:1}},aot={type:"polygon",axis:!1,legend:!1,encode:{shape:"ribbon",x:"x",y:"y"},style:{opacity:.5,lineWidth:1,strokeWidth:1}},oot={position:"outside",fontSize:10},kN=(t,e)=>{const{data:n,encode:r={},scale:i,style:a={},layout:o={},nodeLabels:s=[],linkLabels:c=[],animate:l={},tooltip:u={}}=t,{nodes:f,links:d}=s1(n,r),h=At(r,"node"),p=At(r,"link"),{key:v=C=>C.key,color:g=v}=h,{linkEncodeColor:y=C=>C.source}=p,{nodeWidthRatio:m=vx.thickness,nodePaddingRatio:b=vx.marginRatio}=o,x=CN(o,["nodeWidthRatio","nodePaddingRatio"]),{nodes:_,edges:O}=px(Object.assign(Object.assign(Object.assign(Object.assign({},vx),{id:$a(v),thickness:m,marginRatio:b}),x),{weight:!0}))({nodes:f,edges:d}),w=At(a,"label"),{text:S=v}=w,M=CN(w,["text"]),E=Wa(u,"node",{title:"",items:[C=>({name:C.key,value:C.value})]},!0),P=Wa(u,"link",{title:"",items:[C=>({name:`${C.source} -> ${C.target}`,value:C.value})]}),{height:L,width:A}=e,T=Math.min(L,A);return[dt({},aot,{data:O,encode:Object.assign(Object.assign({},p),{color:y}),labels:c,style:Object.assign({fill:y?void 0:"#aaa"},At(a,"link")),tooltip:P,animate:Ya(l,"link")}),dt({},iot,{data:_,encode:Object.assign(Object.assign({},h),{color:g}),scale:i,style:At(a,"node"),coordinate:{type:"polar",outerRadius:(T-20)/T,startAngle:-Math.PI*2,endAngle:0},labels:[Object.assign(Object.assign(Object.assign({},oot),{text:S}),M),...s],tooltip:E,animate:Ya(l,"node"),axis:!1})]};kN.props={};var sot=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const cot=(t,e)=>({tile:"treemapSquarify",ratio:.5*(1+Math.sqrt(5)),size:[t,e],round:!1,ignoreParentValue:!0,padding:0,paddingInner:0,paddingOuter:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,sort:(n,r)=>r.value-n.value,layer:0}),lot=(t,e)=>({type:"rect",axis:!1,encode:{x:"x",y:"y",key:"id",color:n=>n.path[1]},scale:{x:{domain:[0,t],range:[0,1]},y:{domain:[0,e],range:[0,1]}},style:{stroke:"#fff"},state:{active:{opacity:.6},inactive:{opacity:1}}}),uot={fontSize:10,text:t=>qf(t.path),position:"inside",fill:"#000",textOverflow:"clip",wordWrap:!0,maxLines:1,wordWrapWidth:t=>t.x1-t.x0},fot={title:t=>{var e,n;return(n=(e=t.path)===null||e===void 0?void 0:e.join)===null||n===void 0?void 0:n.call(e,".")},items:[{field:"value"}]},dot={title:t=>qf(t.path),items:[{field:"value"}]},LN=(t,e)=>{const{width:n,height:r,options:i}=e,{data:a,encode:o={},scale:s,style:c={},layout:l={},labels:u=[],tooltip:f={}}=t,d=sot(t,["data","encode","scale","style","layout","labels","tooltip"]),h=Ve(i,["interaction","treemapDrillDown"]),p=dt({},cot(n,r),l,{layer:h?m=>m.depth===1:l.layer}),[v,g]=D3(a,p,o),y=At(c,"label");return dt({},lot(n,r),Object.assign(Object.assign({data:v,scale:s,style:c,labels:[Object.assign(Object.assign({},uot),y),...u]},d),{encode:o,tooltip:Vp(f,fot),axis:!1}),h?{interaction:Object.assign(Object.assign({},d.interaction),{treemapDrillDown:h?Object.assign(Object.assign({},h),{originData:g,layout:p}):void 0}),encode:Object.assign({color:m=>qf(m.path)},o),tooltip:Vp(f,dot)}:{})};LN.props={};function hot(){return{"data.arc":px,"data.cluster":uN,"mark.forceGraph":cN,"mark.tree":dN,"mark.pack":wN,"mark.sankey":TN,"mark.chord":kN,"mark.treemap":LN}}var NN=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function pot(t,e){return Bi(t,n=>e[n])}function vot(t,e){return sn(t,n=>e[n])}function IN(t,e){const n=gx(t,e)*2.5-yx(t,e)*1.5;return Bi(t,r=>e[r]>=n?e[r]:NaN)}function gx(t,e){return P0(t,.25,n=>e[n])}function got(t,e){return P0(t,.5,n=>e[n])}function yx(t,e){return P0(t,.75,n=>e[n])}function jN(t,e){const n=yx(t,e)*2.5-gx(t,e)*1.5;return sn(t,r=>e[r]<=n?e[r]:NaN)}function yot(){return(t,e)=>{const{encode:n}=e,{y:r,x:i}=n,{value:a}=r,{value:o}=i;return[Array.from(Bn(t,l=>o[+l]).values()).flatMap(l=>{const u=IN(l,a),f=jN(l,a);return l.filter(d=>a[d]<u||a[d]>f)}),e]}}const RN=t=>{const{data:e,encode:n,style:r={},tooltip:i={},transform:a,animate:o}=t,s=NN(t,["data","encode","style","tooltip","transform","animate"]),{point:c=!0}=r,l=NN(r,["point"]),{y:u}=n,f={y:u,y1:u,y2:u,y3:u,y4:u},d={y1:gx,y2:got,y3:yx},h=Wa(i,"box",{items:[{channel:"y",name:"min"},{channel:"y1",name:"q1"},{channel:"y2",name:"q2"},{channel:"y3",name:"q3"},{channel:"y4",name:"max"}]},!0),p=Wa(i,"point",{title:{channel:"x"},items:[{name:"outlier",channel:"y"}]});if(!c)return Object.assign({type:"box",data:e,transform:[Object.assign(Object.assign({type:"groupX",y:pot},d),{y4:vot})],encode:Object.assign(Object.assign({},n),f),style:l,tooltip:h},s);const v=At(l,"box"),g=At(l,"point");return[Object.assign({type:"box",data:e,transform:[Object.assign(Object.assign({type:"groupX",y:IN},d),{y4:jN})],encode:Object.assign(Object.assign({},n),f),style:v,tooltip:h,animate:Ya(o,"box")},s),{type:"point",data:e,transform:[{type:yot}],encode:n,style:Object.assign({},g),tooltip:p,animate:Ya(o,"point")}]};RN.props={};const DN=(t,e)=>Math.sqrt(Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2))/2,mot=(t,e)=>{if(!e)return;const{coordinate:n}=e;if(!(n!=null&&n.getCenter))return;const r=n.getCenter();return(i,a,o)=>{const{document:s}=e.canvas,{color:c,index:l}=a,u=s.createElement("g",{}),f=DN(i[0],i[1]),d=DN(i[0],r)*2,h=s.createElement("path",{style:Object.assign(Object.assign(Object.assign({path:[["M",...i[0]],["A",f,f,0,1,0,...i[1]],["A",d+f*2,d+f*2,0,0,0,...i[2]],["A",f,f,0,1,l===0?0:1,...i[3]],["A",d,d,0,0,1,...i[0]],["Z"]]},o),om(t,["shape","last","first"])),{fill:c||o.color})});return u.appendChild(h),u}};var lv=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const bot=(t,e)=>{const{shape:n,radius:r}=t,i=lv(t,["shape","radius"]),a=At(i,"pointer"),o=At(i,"pin"),{shape:s}=a,c=lv(a,["shape"]),{shape:l}=o,u=lv(o,["shape"]),{coordinate:f,theme:d}=e;return(h,p)=>{const v=h.map(T=>f.invert(T)),[g,y,m]=gG(f,"polar"),b=f.clone(),{color:x}=p,_=jy({startAngle:g,endAngle:y,innerRadius:m,outerRadius:r});_.push(["cartesian"]),b.update({transformations:_});const O=v.map(T=>b.map(T)),[w,S]=SM(O),[M,E]=f.getCenter(),P=Object.assign(Object.assign({x1:w,y1:S,x2:M,y2:E,stroke:x},c),i),L=Object.assign(Object.assign({cx:M,cy:E,stroke:x},u),i),A=se(new Er);return po(s)||(typeof s=="function"?A.append(()=>s(O,p,b,d)):A.append("line").call(Vt,P).node()),po(l)||(typeof l=="function"?A.append(()=>l(O,p,b,d)):A.append("circle").call(Vt,L).node()),A.node()}},BN={coordinate:{type:"radial",innerRadius:.9,outerRadius:1,startAngle:-11/10*Math.PI,endAngle:1/10*Math.PI},axis:{x:!1},legend:!1,tooltip:!1,encode:{x:"x",y:"y",color:"color"},scale:{color:{range:["#30BF78","#D0D0D0"]}}},xot={style:{shape:bot,lineWidth:4,pointerLineCap:"round",pinR:10,pinFill:"#fff",radius:.6}},_ot={type:"text",style:{x:"50%",y:"60%",textAlign:"center",textBaseline:"middle",fontSize:20,fontWeight:800,fill:"#888"}};function Oot(t){if(er(t)){const e=Math.max(0,Math.min(t,1));return{percent:e,target:e,total:1}}return t}function wot(t,e){const{name:n="score",target:r,total:i,percent:a,thresholds:o=[]}=Oot(t),s=a||r,c=a?1:i,l=Object.assign({y:{domain:[0,c]}},e);return o.length?{targetData:[{x:n,y:s,color:"target"}],totalData:o.map((u,f)=>({x:n,y:f>=1?u-o[f-1]:u,color:f})),target:s,total:c,scale:l}:{targetData:[{x:n,y:s,color:"target"}],totalData:[{x:n,y:s,color:"target"},{x:n,y:c-s,color:"total"}],target:s,total:c,scale:l}}function Sot(t,{target:e,total:n}){const{content:r}=t;return r?r(e,n):e.toString()}const FN=t=>{const{data:e={},scale:n={},style:r={},animate:i={},transform:a=[]}=t,o=lv(t,["data","scale","style","animate","transform"]),{targetData:s,totalData:c,target:l,total:u,scale:f}=wot(e,n),d=At(r,"text"),h=Zz(r,["pointer","pin"]),p=At(r,"arc"),v=p.shape;return[dt({},BN,Object.assign({type:"interval",transform:[{type:"stackY"}],data:c,scale:f,style:v==="round"?Object.assign(Object.assign({},p),{shape:mot}):p,animate:typeof i=="object"?At(i,"arc"):i},o)),dt({},BN,xot,Object.assign({type:"point",data:s,scale:f,style:h,animate:typeof i=="object"?At(i,"indicator"):i},o)),dt({},_ot,{style:Object.assign({text:Sot(d,{target:l,total:u})},d),animate:typeof i=="object"?At(i,"text"):i})]};FN.props={};const mx=Math.PI/180,Pd=64,uv=2048;function Mot(t){return t.text}function Eot(){return"serif"}function zN(){return"normal"}function Pot(t){return t.value}function Aot(){return~~(Math.random()*2)*90}function Tot(){return 1}function Cot(){}function kot(t,e,n,r){if(e.sprite)return;const i=t.context,a=t.ratio;i.clearRect(0,0,(Pd<<5)/a,uv/a);let o=0,s=0,c=0;const l=n.length;for(--r;++r<l;){e=n[r],i.save(),i.font=e.style+" "+e.weight+" "+~~((e.size+1)/a)+"px "+e.font;let d=i.measureText(e.text+"m").width*a,h=e.size<<1;if(e.rotate){const p=Math.sin(e.rotate*mx),v=Math.cos(e.rotate*mx),g=d*v,y=d*p,m=h*v,b=h*p;d=Math.max(Math.abs(g+b),Math.abs(g-b))+31>>5<<5,h=~~Math.max(Math.abs(y+m),Math.abs(y-m))}else d=d+31>>5<<5;if(h>c&&(c=h),o+d>=Pd<<5&&(o=0,s+=c,c=0),s+h>=uv)break;i.translate((o+(d>>1))/a,(s+(h>>1))/a),e.rotate&&i.rotate(e.rotate*mx),i.fillText(e.text,0,0),e.padding&&(i.lineWidth=2*e.padding,i.strokeText(e.text,0,0)),i.restore(),e.width=d,e.height=h,e.xoff=o,e.yoff=s,e.x1=d>>1,e.y1=h>>1,e.x0=-e.x1,e.y0=-e.y1,e.hasText=!0,o+=d}const u=i.getImageData(0,0,(Pd<<5)/a,uv/a).data,f=[];for(;--r>=0;){if(e=n[r],!e.hasText)continue;const d=e.width,h=d>>5;let p=e.y1-e.y0;for(let y=0;y<p*h;y++)f[y]=0;if(o=e.xoff,o==null)return;s=e.yoff;let v=0,g=-1;for(let y=0;y<p;y++){for(let m=0;m<d;m++){const b=h*y+(m>>5),x=u[(s+y)*(Pd<<5)+(o+m)<<2]?1<<31-m%32:0;f[b]|=x,v|=x}v?g=y:(e.y0++,p--,y--,s++)}e.y1=e.y0+g,e.sprite=f.slice(0,(e.y1-e.y0)*h)}}function Lot(t,e,n){n>>=5;const r=t.sprite,i=t.width>>5,a=t.x-(i<<4),o=a&127,s=32-o,c=t.y1-t.y0;let l=(t.y+t.y0)*n+(a>>5),u;for(let f=0;f<c;f++){u=0;for(let d=0;d<=i;d++)if((u<<s|(d<i?(u=r[f*i+d])>>>o:0))&e[l+d])return!0;l+=n}return!1}function Not(t,e){const n=t[0],r=t[1];e.x+e.x0<n.x&&(n.x=e.x+e.x0),e.y+e.y0<n.y&&(n.y=e.y+e.y0),e.x+e.x1>r.x&&(r.x=e.x+e.x1),e.y+e.y1>r.y&&(r.y=e.y+e.y1)}function Iot(t,e){return t.x+t.x1>e[0].x&&t.x+t.x0<e[1].x&&t.y+t.y1>e[0].y&&t.y+t.y0<e[1].y}function GN(t){const e=t[0]/t[1];return function(n){return[e*(n*=.1)*Math.cos(n),n*Math.sin(n)]}}function jot(t){const n=4*t[0]/t[1];let r=0,i=0;return function(a){const o=a<0?-1:1;switch(Math.sqrt(1+4*o*a)-o&3){case 0:r+=n;break;case 1:i+=4;break;case 2:r-=n;break;default:i-=4;break}return[r,i]}}function WN(t){const e=[];let n=-1;for(;++n<t;)e[n]=0;return e}function Rot(){return document.createElement("canvas")}function ys(t){return typeof t=="function"?t:function(){return t}}const Dot={archimedean:GN,rectangular:jot};function Bot(){let t=[256,256],e=Mot,n=Eot,r=Pot,i=zN,a=Aot,o=Tot,s=GN,c=Math.random,l=Cot,u=[],f=null,d=1/0;const h=zN,p=Rot,v={};v.start=function(){const[m,b]=t,x=g(p()),_=v.board?v.board:WN((t[0]>>5)*t[1]),O=u.length,w=[],S=u.map(function(L,A,T){return L.text=e.call(this,L,A,T),L.font=n.call(this,L,A,T),L.style=h.call(this,L,A,T),L.weight=i.call(this,L,A,T),L.rotate=a.call(this,L,A,T),L.size=~~r.call(this,L,A,T),L.padding=o.call(this,L,A,T),L}).sort(function(L,A){return A.size-L.size});let M=-1,E=v.board?[{x:0,y:0},{x:m,y:b}]:void 0;f&&clearInterval(f),f=setInterval(P,0),P();function P(){const L=Date.now();for(;Date.now()-L<d&&++M<O;){const A=S[M];A.x=m*(c()+.5)>>1,A.y=b*(c()+.5)>>1,kot(x,A,S,M),A.hasText&&y(_,A,E)&&(l.call(null,"word",{cloud:v,word:A}),w.push(A),E?v.hasImage||Not(E,A):E=[{x:A.x+A.x0,y:A.y+A.y0},{x:A.x+A.x1,y:A.y+A.y1}],A.x-=t[0]>>1,A.y-=t[1]>>1)}v._tags=w,v._bounds=E,M>=O&&(v.stop(),l.call(null,"end",{cloud:v,words:w,bounds:E}))}return v},v.stop=function(){return f&&(clearInterval(f),f=null),v};function g(m){m.width=m.height=1;const b=Math.sqrt(m.getContext("2d").getImageData(0,0,1,1).data.length>>2);m.width=(Pd<<5)/b,m.height=uv/b;const x=m.getContext("2d");return x.fillStyle=x.strokeStyle="red",x.textAlign="center",{context:x,ratio:b}}function y(m,b,x){const _=b.x,O=b.y,w=Math.sqrt(t[0]*t[0]+t[1]*t[1]),S=s(t),M=c()<.5?1:-1;let E,P=-M,L,A;for(;(E=S(P+=M))&&(L=~~E[0],A=~~E[1],!(Math.min(Math.abs(L),Math.abs(A))>=w));)if(b.x=_+L,b.y=O+A,!(b.x+b.x0<0||b.y+b.y0<0||b.x+b.x1>t[0]||b.y+b.y1>t[1])&&(!x||!Lot(b,m,t[0]))&&(!x||Iot(b,x))){const T=b.sprite,C=b.width>>5,N=t[0]>>5,B=b.x-(C<<4),j=B&127,D=32-j,G=b.y1-b.y0;let Y,U=(b.y+b.y0)*N+(B>>5);for(let V=0;V<G;V++){Y=0;for(let it=0;it<=C;it++)m[U+it]|=Y<<D|(it<C?(Y=T[V*C+it])>>>j:0);U+=N}return delete b.sprite,!0}return!1}return v.createMask=m=>{const b=document.createElement("canvas"),[x,_]=t;if(!x||!_)return;const O=x>>5,w=WN((x>>5)*_);b.width=x,b.height=_;const S=b.getContext("2d");S.drawImage(m,0,0,m.width,m.height,0,0,x,_);const M=S.getImageData(0,0,x,_).data;for(let E=0;E<_;E++)for(let P=0;P<x;P++){const L=O*E+(P>>5),A=E*x+P<<2,C=M[A]>=250&&M[A+1]>=250&&M[A+2]>=250?1<<31-P%32:0;w[L]|=C}v.board=w,v.hasImage=!0},v.timeInterval=function(m){d=m==null?1/0:m},v.words=function(m){u=m},v.size=function(m=[]){t=[+m[0],+m[1]]},v.text=function(m){e=ys(m)},v.font=function(m){n=ys(m)},v.fontWeight=function(m){i=ys(m)},v.rotate=function(m){a=ys(m)},v.spiral=function(m){s=Dot[m]||m},v.fontSize=function(m){r=ys(m)},v.padding=function(m){o=ys(m)},v.random=function(m){c=ys(m)},v.on=function(m){l=ys(m)},v}var Fot=function(t,e,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{l(r.next(u))}catch(f){o(f)}}function c(u){try{l(r.throw(u))}catch(f){o(f)}}function l(u){u.done?a(u.value):i(u.value).then(s,c)}l((r=r.apply(t,e||[])).next())})};function zot(t,e){return{set(n,r,i){if(e[n]===void 0)return this;const a=r?r.call(null,e[n]):e[n];return i?i.call(null,a):typeof t[n]=="function"?t[n](a):t[n]=a,this},setAsync(n,r,i){return Fot(this,void 0,void 0,function*(){if(e[n]===void 0)return this;const a=r?yield r.call(null,e[n]):e[n];return i?i.call(null,a):typeof t[n]=="function"?t[n](a):t[n]=a,this})}}}var Got=function(t,e,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{l(r.next(u))}catch(f){o(f)}}function c(u){try{l(r.throw(u))}catch(f){o(f)}}function l(u){u.done?a(u.value):i(u.value).then(s,c)}l((r=r.apply(t,e||[])).next())})},Wot=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const Yot={size:[500,500],fontSize:[14,28]};function Hot(t){return new Promise((e,n)=>{if(t instanceof HTMLImageElement){e(t);return}if(typeof t=="string"){const r=new Image;r.crossOrigin="anonymous",r.src=t,r.onload=()=>e(r),r.onerror=()=>{console.error(`'image ${t} load failed !!!'`),n()};return}n()})}function $ot(t,e){if(typeof t=="function")return t;if(Array.isArray(t)){const[n,r]=t;if(!e)return()=>(r+n)/2;const[i,a]=e;return a===i?()=>(r+n)/2:({value:o})=>(r-n)/(a-i)*(o-i)+n}return()=>t}const YN=t=>e=>Got(void 0,void 0,void 0,function*(){const n=Object.assign({},Yot,t),r=Bot();yield zot(r,n).set("fontSize",y=>{const m=e.map(b=>b.value);return $ot(y,[Bi(m),sn(m)])}).set("font").set("fontStyle").set("fontWeight").set("padding").set("rotate").set("size").set("spiral").set("timeInterval").set("random").set("text").set("on").setAsync("imageMask",Hot,r.createMask),r.words([...e]);const i=r.start(),[a,o]=n.size,s=[{x:0,y:0},{x:a,y:o}],{_bounds:c=s,_tags:l,hasImage:u}=i,f=l.map(y=>{var{x:m,y:b}=y,x=Wot(y,["x","y"]);return Object.assign(Object.assign({},x),{x:m+a/2,y:b+o/2})}),[{x:d,y:h},{x:p,y:v}]=c,g={text:"",value:0,opacity:0,fontSize:0};return f.push(Object.assign(Object.assign({},g),{x:u?0:d,y:u?0:h}),Object.assign(Object.assign({},g),{x:u?a:p,y:u?o:v})),f});YN.props={};var Vot=function(t,e,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{l(r.next(u))}catch(f){o(f)}}function c(u){try{l(r.throw(u))}catch(f){o(f)}}function l(u){u.done?a(u.value):i(u.value).then(s,c)}l((r=r.apply(t,e||[])).next())})},Uot=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function Xot(t,e){const{text:n="text",value:r="value"}=e;return t.map(i=>Object.assign(Object.assign({},i),{text:i[n],value:i[r]}))}const qot=(t,e)=>({size:[t,e]}),Zot=(t,e)=>({axis:!1,type:"text",encode:{x:"x",y:"y",text:"text",rotate:"rotate",fontSize:"size"},scale:{x:{domain:[0,t],range:[0,1]},y:{domain:[0,e],range:[0,1]},fontSize:{type:"identity"},rotate:{type:"identity"}},style:{textAlign:"center"}}),HN=(t,e)=>Vot(void 0,void 0,void 0,function*(){const{width:n,height:r}=e,{data:i,encode:a={},scale:o,style:s={},layout:c={}}=t,l=Uot(t,["data","encode","scale","style","layout"]),u=Xot(i,a),f=yield YN(Object.assign(Object.assign({},qot(n,r)),c))(u);return dt({},Zot(n,r),Object.assign(Object.assign({data:f,encode:a,scale:o,style:s},l),{axis:!1}))});HN.props={};const $N=5e3;function VN(t,e,n){return t+(e-t)*n}function Kot(t,e,n,r){return e===0?[[t+1/2*n/Math.PI/2,r/2],[t+1/2*n/Math.PI,r],[t+n/4,r]]:e===1?[[t+1/2*n/Math.PI/2*(Math.PI-2),r],[t+1/2*n/Math.PI/2*(Math.PI-1),r/2],[t+n/4,0]]:e===2?[[t+1/2*n/Math.PI/2,-r/2],[t+1/2*n/Math.PI,-r],[t+n/4,-r]]:[[t+1/2*n/Math.PI/2*(Math.PI-2),-r],[t+1/2*n/Math.PI/2*(Math.PI-1),-r/2],[t+n/4,0]]}function Qot(t,e,n,r,i,a,o){const s=Math.ceil(2*t/n*4)*4,c=[];let l=r;for(;l<-Math.PI*2;)l+=Math.PI*2;for(;l>0;)l-=Math.PI*2;l=l/Math.PI/2*n;const u=a-t+l-t*2;c.push(["M",u,e]);let f=0;for(let d=0;d<s;++d){const h=d%4,p=Kot(d*n/4,h,n,i);c.push(["C",p[0][0]+u,-p[0][1]+e,p[1][0]+u,-p[1][1]+e,p[2][0]+u,-p[2][1]+e]),d===s-1&&(f=p[2][0])}return c.push(["L",f+u,o+t]),c.push(["L",u,o+t]),c.push(["Z"]),c}function Jot(t,e,n,r,i,a,o,s,c,l,u){const{fill:f,fillOpacity:d,opacity:h}=i;for(let p=0;p<r;p++){const v=r<=1?1:p/(r-1),g=Qot(s,o+s*n,c,0,s/40,t,e),y=u.createElement("path",{style:{path:g,fill:f,opacity:VN(.2,.9,v)*Number(h||d)}});a.appendChild(y);try{if(l===!1)return;const m=[{transform:"translate(0, 0)"},{transform:`translate(${c*2}px, 0)`}];y.animate(m,{duration:VN(.5*$N,$N,v)*2,iterations:1/0})}catch(m){console.warn("off-screen group animate error!")}}}function tst(t,e,n){return`
M ${t} ${e-n}
a ${n} ${n} 0 1 0 0 ${n*2}
a ${n} ${n} 0 1 0 0 ${-n*2}
Z
`}function est(t,e,n){const i=n*.618;return`
M ${t-i} ${e-n}
L ${t+i} ${e-n}
L ${t+i} ${e+n}
L ${t-i} ${e+n}
Z
`}function nst(t,e,n){return`
M ${t} ${e-n}
L ${t+n} ${e}
L ${t} ${e+n}
L ${t-n} ${e}
Z
`}function rst(t,e,n){return`
M ${t} ${e-n}
L ${t+n} ${e+n}
L ${t-n} ${e+n}
Z
`}function ist(t,e,n){const r=n*4/3,i=Math.max(r,n*2),a=r/2,o=t,s=a+e-i/2,c=Math.asin(a/((i-a)*.85)),l=Math.sin(c)*a,u=Math.cos(c)*a,f=o-u,d=s+l,h=t,p=s+a/Math.sin(c);return`
M ${f} ${d}
A ${a} ${a} 0 1 1 ${f+u*2} ${d}
Q ${h} ${p} ${t} ${e+i/2}
Q ${h} ${p} ${f} ${d}
Z
`}const UN={pin:ist,rect:est,circle:tst,diamond:nst,triangle:rst};var XN=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const ast=(t="circle")=>UN[t]||UN.circle,qN=(t,e)=>{if(!e)return;const{coordinate:n}=e,{liquidOptions:r,styleOptions:i}=t,{liquidShape:a,percent:o}=r,{background:s,outline:c={},wave:l={}}=i,u=XN(i,["background","outline","wave"]),{border:f=2,distance:d=0}=c,h=XN(c,["border","distance"]),{length:p=192,count:v=3}=l;return(g,y,m)=>{const{document:b}=e.canvas,{color:x,fillOpacity:_}=m,O=Object.assign(Object.assign({fill:x},m),u),w=b.createElement("g",{}),[S,M]=n.getCenter(),E=n.getSize(),P=Math.min(...E)/2,A=(li(a)?a:ast(a))(S,M,P,...E);if(Object.keys(s).length){const N=b.createElement("path",{style:Object.assign({path:A,fill:"#fff"},s)});w.appendChild(N)}if(o>0){const N=b.createElement("path",{style:{path:A}});w.appendChild(N),w.style.clipPath=N,Jot(S,M,1-o,v,O,w,N.getBBox().y,P*2,p,!0,b)}const T=b.createElement("path",{style:{path:A,fill:"transparent",lineWidth:f+2*d,stroke:"#fff"}}),C=b.createElement("path",{style:Object.assign(Object.assign(Object.assign({path:A,stroke:x,strokeOpacity:_,lineWidth:f},O),h),{fill:"transparent"})});return w.appendChild(T),w.appendChild(C),w}};qN.props={};var ost=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const sst={axis:{x:!1,y:!1},legend:!1,tooltip:!1,encode:{x:"type",y:"percent"},scale:{y:{domain:[0,1]}},style:{shape:qN},animate:{enter:{type:"fadeIn"}}},cst={type:"text",style:{x:"50%",y:"50%",textAlign:"center",textBaseline:"middle",fontSize:20,fontWeight:800,fill:"#888"},animate:{enter:{type:"fadeIn"}}},ZN=t=>{const{data:e={},style:n={},animate:r}=t,i=ost(t,["data","style","animate"]),a=Math.max(0,er(e)?e:e==null?void 0:e.percent),o=[{percent:a,type:"liquid"}],s=Object.assign(Object.assign({},At(n,"text")),At(n,"content")),c=At(n,"outline"),l=At(n,"wave"),u=At(n,"background");return[dt({},sst,Object.assign({type:"interval",data:o,style:{liquidOptions:{percent:a,liquidShape:n==null?void 0:n.shape},styleOptions:Object.assign(Object.assign({},n),{outline:c,wave:l,background:u})},animate:r},i)),dt({},cst,{style:Object.assign({text:`${np(a*100)} %`},s),animate:r})]};ZN.props={};var Eo=J(69916);const KN=1e-10;function QN(t,e){const n=ust(t),r=n.filter(function(c){return lst(c,t)});let i=0,a=0,o;const s=[];if(r.length>1){const c=fst(r);for(o=0;o<r.length;++o){const u=r[o];u.angle=Math.atan2(u.x-c.x,u.y-c.y)}r.sort(function(u,f){return f.angle-u.angle});let l=r[r.length-1];for(o=0;o<r.length;++o){const u=r[o];a+=(l.x+u.x)*(u.y-l.y);const f={x:(u.x+l.x)/2,y:(u.y+l.y)/2};let d=null;for(let h=0;h<u.parentIndex.length;++h)if(l.parentIndex.indexOf(u.parentIndex[h])>-1){const p=t[u.parentIndex[h]],v=Math.atan2(u.x-p.x,u.y-p.y),g=Math.atan2(l.x-p.x,l.y-p.y);let y=g-v;y<0&&(y+=2*Math.PI);const m=g-y/2;let b=Ad(f,{x:p.x+p.radius*Math.sin(m),y:p.y+p.radius*Math.cos(m)});b>p.radius*2&&(b=p.radius*2),(d===null||d.width>b)&&(d={circle:p,width:b,p1:u,p2:l})}d!==null&&(s.push(d),i+=bx(d.circle.radius,d.width),l=u)}}else{let c=t[0];for(o=1;o<t.length;++o)t[o].radius<c.radius&&(c=t[o]);let l=!1;for(o=0;o<t.length;++o)if(Ad(t[o],c)>Math.abs(c.radius-t[o].radius)){l=!0;break}l?i=a=0:(i=c.radius*c.radius*Math.PI,s.push({circle:c,p1:{x:c.x,y:c.y+c.radius},p2:{x:c.x-KN,y:c.y+c.radius},width:c.radius*2}))}return a/=2,e&&(e.area=i+a,e.arcArea=i,e.polygonArea=a,e.arcs=s,e.innerPoints=r,e.intersectionPoints=n),i+a}function lst(t,e){for(let n=0;n<e.length;++n)if(Ad(t,e[n])>e[n].radius+KN)return!1;return!0}function ust(t){const e=[];for(let n=0;n<t.length;++n)for(let r=n+1;r<t.length;++r){const i=t4(t[n],t[r]);for(let a=0;a<i.length;++a){const o=i[a];o.parentIndex=[n,r],e.push(o)}}return e}function bx(t,e){return t*t*Math.acos(1-e/t)-(t-e)*Math.sqrt(e*(2*t-e))}function Ad(t,e){return Math.sqrt((t.x-e.x)*(t.x-e.x)+(t.y-e.y)*(t.y-e.y))}function JN(t,e,n){if(n>=t+e)return 0;if(n<=Math.abs(t-e))return Math.PI*Math.min(t,e)*Math.min(t,e);const r=t-(n*n-e*e+t*t)/(2*n),i=e-(n*n-t*t+e*e)/(2*n);return bx(t,r)+bx(e,i)}function t4(t,e){const n=Ad(t,e),r=t.radius,i=e.radius;if(n>=r+i||n<=Math.abs(r-i))return[];const a=(r*r-i*i+n*n)/(2*n),o=Math.sqrt(r*r-a*a),s=t.x+a*(e.x-t.x)/n,c=t.y+a*(e.y-t.y)/n,l=-(e.y-t.y)*(o/n),u=-(e.x-t.x)*(o/n);return[{x:s+l,y:c-u},{x:s-l,y:c+u}]}function fst(t){const e={x:0,y:0};for(let n=0;n<t.length;++n)e.x+=t[n].x,e.y+=t[n].y;return e.x/=t.length,e.y/=t.length,e}function dst(t,e){e=e||{},e.maxIterations=e.maxIterations||500;const n=e.initialLayout||gst,r=e.lossFunction||_x;t=hst(t);const i=n(t,e),a=[],o=[];let s;for(s in i)i.hasOwnProperty(s)&&(a.push(i[s].x),a.push(i[s].y),o.push(s));const l=(0,Eo.nelderMead)(function(u){const f={};for(let d=0;d<o.length;++d){const h=o[d];f[h]={x:u[2*d],y:u[2*d+1],radius:i[h].radius}}return r(f,t)},a,e).x;for(let u=0;u<o.length;++u)s=o[u],i[s].x=l[2*u],i[s].y=l[2*u+1];return i}const e4=1e-10;function xx(t,e,n){return Math.min(t,e)*Math.min(t,e)*Math.PI<=n+e4?Math.abs(t-e):(0,Eo.bisect)(function(r){return JN(t,e,r)-n},0,t+e)}function hst(t){t=t.slice();const e=[],n={};let r,i,a,o;for(r=0;r<t.length;++r){const s=t[r];s.sets.length==1?e.push(s.sets[0]):s.sets.length==2&&(a=s.sets[0],o=s.sets[1],n[[a,o]]=!0,n[[o,a]]=!0)}for(e.sort((s,c)=>s>c?1:-1),r=0;r<e.length;++r)for(a=e[r],i=r+1;i<e.length;++i)o=e[i],[a,o]in n||t.push({sets:[a,o],size:0});return t}function pst(t,e,n){const r=(0,Eo.zerosM)(e.length,e.length),i=(0,Eo.zerosM)(e.length,e.length);return t.filter(function(a){return a.sets.length==2}).map(function(a){const o=n[a.sets[0]],s=n[a.sets[1]],c=Math.sqrt(e[o].size/Math.PI),l=Math.sqrt(e[s].size/Math.PI),u=xx(c,l,a.size);r[o][s]=r[s][o]=u;let f=0;a.size+1e-10>=Math.min(e[o].size,e[s].size)?f=1:a.size<=1e-10&&(f=-1),i[o][s]=i[s][o]=f}),{distances:r,constraints:i}}function vst(t,e,n,r){let i=0,a;for(a=0;a<e.length;++a)e[a]=0;for(a=0;a<n.length;++a){const o=t[2*a],s=t[2*a+1];for(let c=a+1;c<n.length;++c){const l=t[2*c],u=t[2*c+1],f=n[a][c],d=r[a][c],h=(l-o)*(l-o)+(u-s)*(u-s),p=Math.sqrt(h),v=h-f*f;d>0&&p<=f||d<0&&p>=f||(i+=2*v*v,e[2*a]+=4*v*(o-l),e[2*a+1]+=4*v*(s-u),e[2*c]+=4*v*(l-o),e[2*c+1]+=4*v*(u-s))}}return i}function gst(t,e){let n=mst(t,e);const r=e.lossFunction||_x;if(t.length>=8){const i=yst(t,e),a=r(i,t),o=r(n,t);a+1e-8<o&&(n=i)}return n}function yst(t,e){e=e||{};const n=e.restarts||10,r=[],i={};let a;for(a=0;a<t.length;++a){const v=t[a];v.sets.length==1&&(i[v.sets[0]]=r.length,r.push(v))}const o=pst(t,r,i);let s=o.distances;const c=o.constraints,l=(0,Eo.norm2)(s.map(Eo.norm2))/s.length;s=s.map(function(v){return v.map(function(g){return g/l})});const u=function(v,g){return vst(v,g,s,c)};let f,d;for(a=0;a<n;++a){const v=(0,Eo.zeros)(s.length*2).map(Math.random);d=(0,Eo.conjugateGradient)(u,v,e),(!f||d.fx<f.fx)&&(f=d)}const h=f.x,p={};for(a=0;a<r.length;++a){const v=r[a];p[v.sets[0]]={x:h[2*a]*l,y:h[2*a+1]*l,radius:Math.sqrt(v.size/Math.PI)}}if(e.history)for(a=0;a<e.history.length;++a)(0,Eo.scale)(e.history[a].x,l);return p}function mst(t,e){const n=e&&e.lossFunction?e.lossFunction:_x,r={},i={};let a;for(let f=0;f<t.length;++f){const d=t[f];d.sets.length==1&&(a=d.sets[0],r[a]={x:1e10,y:1e10,rowid:Object.keys(r).length,size:d.size,radius:Math.sqrt(d.size/Math.PI)},i[a]=[])}t=t.filter(function(f){return f.sets.length==2});for(let f=0;f<t.length;++f){const d=t[f];let h=d.hasOwnProperty("weight")?d.weight:1;const p=d.sets[0],v=d.sets[1];d.size+e4>=Math.min(r[p].size,r[v].size)&&(h=0),i[p].push({set:v,size:d.size,weight:h}),i[v].push({set:p,size:d.size,weight:h})}const o=[];for(a in i)if(i.hasOwnProperty(a)){let f=0;for(let d=0;d<i[a].length;++d)f+=i[a][d].size*i[a][d].weight;o.push({set:a,size:f})}function s(f,d){return d.size-f.size}o.sort(s);const c={};function l(f){return f.set in c}function u(f,d){r[d].x=f.x,r[d].y=f.y,c[d]=!0}u({x:0,y:0},o[0].set);for(let f=1;f<o.length;++f){const d=o[f].set,h=i[d].filter(l);if(a=r[d],h.sort(s),h.length===0)throw"ERROR: missing pairwise overlap information";const p=[];for(let y=0;y<h.length;++y){const m=r[h[y].set],b=xx(a.radius,m.radius,h[y].size);p.push({x:m.x+b,y:m.y}),p.push({x:m.x-b,y:m.y}),p.push({y:m.y+b,x:m.x}),p.push({y:m.y-b,x:m.x});for(let x=y+1;x<h.length;++x){const _=r[h[x].set],O=xx(a.radius,_.radius,h[x].size),w=t4({x:m.x,y:m.y,radius:b},{x:_.x,y:_.y,radius:O});for(let S=0;S<w.length;++S)p.push(w[S])}}let v=1e50,g=p[0];for(let y=0;y<p.length;++y){r[d].x=p[y].x,r[d].y=p[y].y;const m=n(r,t);m<v&&(v=m,g=p[y])}u(g,d)}return r}function _x(t,e){let n=0;function r(i){return i.map(function(a){return t[a]})}for(let i=0;i<e.length;++i){const a=e[i];let o;if(a.sets.length==1)continue;if(a.sets.length==2){const c=t[a.sets[0]],l=t[a.sets[1]];o=JN(c.radius,l.radius,Ad(c,l))}else o=QN(r(a.sets));const s=a.hasOwnProperty("weight")?a.weight:1;n+=s*(o-a.size)*(o-a.size)}return n}function bst(t,e,n){n===null?t.sort(function(i,a){return a.radius-i.radius}):t.sort(n);let r;if(t.length>0){const i=t[0].x,a=t[0].y;for(r=0;r<t.length;++r)t[r].x-=i,t[r].y-=a}if(t.length==2&&distance(t[0],t[1])<Math.abs(t[1].radius-t[0].radius)&&(t[1].x=t[0].x+t[0].radius-t[1].radius-1e-10,t[1].y=t[0].y),t.length>1){const i=Math.atan2(t[1].x,t[1].y)-e;let a,o;const s=Math.cos(i),c=Math.sin(i);for(r=0;r<t.length;++r)a=t[r].x,o=t[r].y,t[r].x=s*a-c*o,t[r].y=c*a+s*o}if(t.length>2){let i=Math.atan2(t[2].x,t[2].y)-e;for(;i<0;)i+=2*Math.PI;for(;i>2*Math.PI;)i-=2*Math.PI;if(i>Math.PI){const a=t[1].y/(1e-10+t[1].x);for(r=0;r<t.length;++r){const o=(t[r].x+a*t[r].y)/(1+a*a);t[r].x=2*o-t[r].x,t[r].y=2*o*a-t[r].y}}}}function xst(t){t.map(function(o){o.parent=o});function e(o){return o.parent!==o&&(o.parent=e(o.parent)),o.parent}function n(o,s){const c=e(o),l=e(s);c.parent=l}for(let o=0;o<t.length;++o)for(let s=o+1;s<t.length;++s){const c=t[o].radius+t[s].radius;distance(t[o],t[s])+1e-10<c&&n(t[s],t[o])}const r={};let i;for(let o=0;o<t.length;++o)i=e(t[o]).parent.setid,i in r||(r[i]=[]),r[i].push(t[o]);t.map(function(o){delete o.parent});const a=[];for(i in r)r.hasOwnProperty(i)&&a.push(r[i]);return a}function Ox(t){const e=function(n){const r=Math.max.apply(null,t.map(function(a){return a[n]+a.radius})),i=Math.min.apply(null,t.map(function(a){return a[n]-a.radius}));return{max:r,min:i}};return{xRange:e("x"),yRange:e("y")}}function i1t(t,e,n){e===null&&(e=Math.PI/2);let r=[],i,a;for(a in t)if(t.hasOwnProperty(a)){const d=t[a];r.push({x:d.x,y:d.y,radius:d.radius,setid:a})}const o=xst(r);for(i=0;i<o.length;++i){bst(o[i],e,n);const d=Ox(o[i]);o[i].size=(d.xRange.max-d.xRange.min)*(d.yRange.max-d.yRange.min),o[i].bounds=d}o.sort(function(d,h){return h.size-d.size}),r=o[0];let s=r.bounds;const c=(s.xRange.max-s.xRange.min)/50;function l(d,h,p){if(!d)return;const v=d.bounds;let g,y,m;h?g=s.xRange.max-v.xRange.min+c:(g=s.xRange.max-v.xRange.max,m=(v.xRange.max-v.xRange.min)/2-(s.xRange.max-s.xRange.min)/2,m<0&&(g+=m)),p?y=s.yRange.max-v.yRange.min+c:(y=s.yRange.max-v.yRange.max,m=(v.yRange.max-v.yRange.min)/2-(s.yRange.max-s.yRange.min)/2,m<0&&(y+=m));for(let b=0;b<d.length;++b)d[b].x+=g,d[b].y+=y,r.push(d[b])}let u=1;for(;u<o.length;)l(o[u],!0,!1),l(o[u+1],!1,!0),l(o[u+2],!0,!0),u+=3,s=Ox(r);const f={};for(i=0;i<r.length;++i)f[r[i].setid]=r[i];return f}function _st(t,e,n,r){const i=[],a=[];for(const v in t)t.hasOwnProperty(v)&&(a.push(v),i.push(t[v]));e-=2*r,n-=2*r;const o=Ox(i),s=o.xRange,c=o.yRange;if(s.max==s.min||c.max==c.min)return console.log("not scaling solution: zero size detected"),t;const l=e/(s.max-s.min),u=n/(c.max-c.min),f=Math.min(u,l),d=(e-(s.max-s.min)*f)/2,h=(n-(c.max-c.min)*f)/2,p={};for(let v=0;v<i.length;++v){const g=i[v];p[a[v]]={radius:f*g.radius,x:r+d+(g.x-s.min)*f,y:r+h+(g.y-c.min)*f}}return p}function Ost(t,e,n){const r=[],i=t-n,a=e;return r.push("M",i,a),r.push("A",n,n,0,1,0,i+2*n,a),r.push("A",n,n,0,1,0,i,a),r.join(" ")}function wst(t){const e={};QN(t,e);const n=e.arcs;if(n.length===0)return"M 0 0";if(n.length==1){const r=n[0].circle;return Ost(r.x,r.y,r.radius)}else{const r=[`
M`,n[0].p2.x,n[0].p2.y];for(let i=0;i<n.length;++i){const a=n[i],o=a.circle.radius,s=a.width>o;r.push(`
A`,o,o,0,s?1:0,1,a.p1.x,a.p1.y)}return r.join(" ")}}const n4=t=>{const{sets:e="sets",size:n="size",as:r=["key","path"],padding:i=0}=t,[a,o]=r;return s=>{const c=s.map(f=>Object.assign(Object.assign({},f),{sets:f[e],size:f[n],[a]:f.sets.join("&")}));c.sort((f,d)=>f.sets.length-d.sets.length);const l=dst(c);let u;return c.map(f=>{const d=f[e],h=({width:p,height:v})=>{u=u||_st(l,p,v,i);const g=d.map(m=>u[m]);let y=wst(g);return/[zZ]$/.test(y)||(y+=" Z"),y};return Object.assign(Object.assign({},f),{[o]:h})})}};n4.props={};function Sst(){return{"data.venn":n4,"mark.boxplot":RN,"mark.gauge":FN,"mark.wordCloud":HN,"mark.liquid":ZN}}function Mst(){return Object.assign(Object.assign(Object.assign(Object.assign({},uit()),hot()),Sst()),ort())}var fv=function(){return fv=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},fv.apply(this,arguments)},Est=cZ(sZ,fv(fv({},Mst()),VZ())),Pst="[object Boolean]";function Ast(t){return t===!0||t===!1||wr(t)&&xr(t)==Pst}var wx=Ast,Td=function(){return Td=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Td.apply(this,arguments)},Tst=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n},Cst=["renderer"],r4=["width","height","autoFit","theme","inset","insetLeft","insetRight","insetTop","insetBottom","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","margin","marginTop","marginRight","marginBottom","marginLeft","depth","title","clip","children","type","data","direction"],Sx="__transform__",kst="__skipDelCustomKeys__",wc=function(t,e){return wx(e)?{type:t,available:e}:Td({type:t},e)},Mx={xField:"encode.x",yField:"encode.y",colorField:"encode.color",angleField:"encode.y",keyField:"encode.key",sizeField:"encode.size",shapeField:"encode.shape",seriesField:"encode.series",positionField:"encode.position",textField:"encode.text",valueField:"encode.value",binField:"encode.x",srcField:"encode.src",linkColorField:"encode.linkColor",fontSizeField:"encode.fontSize",radius:"coordinate.outerRadius",innerRadius:"coordinate.innerRadius",startAngle:"coordinate.startAngle",endAngle:"coordinate.endAngle",focusX:"coordinate.focusX",focusY:"coordinate.focusY",distortionX:"coordinate.distortionX",distortionY:"coordinate.distortionY",visual:"coordinate.visual",stack:{target:"transform",value:function(t){return wc("stackY",t)}},normalize:{target:"transform",value:function(t){return wc("normalizeY",t)}},percent:{target:"transform",value:function(t){return wc("normalizeY",t)}},group:{target:"transform",value:function(t){return wc("dodgeX",t)}},sort:{target:"transform",value:function(t){return wc("sortX",t)}},symmetry:{target:"transform",value:function(t){return wc("symmetryY",t)}},diff:{target:"transform",value:function(t){return wc("diffY",t)}},meta:{target:"scale",value:function(t){return t}},label:{target:"labels",value:function(t){return t}},shape:"style.shape",connectNulls:{target:"style",value:function(t){return wx(t)?{connect:t}:t}}},Ex=["xField","yField","seriesField","colorField","keyField","positionField","meta","tooltip","animate","stack","normalize","percent","group","sort","symmetry","diff"],dv=[{key:"annotations",extend_keys:[]},{key:"line",type:"line",extend_keys:Ex},{key:"point",type:"point",extend_keys:Ex},{key:"area",type:"area",extend_keys:Ex}],Lst=[{key:"transform",callback:function(t,e,n){var r;t[e]=t[e]||[];var i=n.available,a=i===void 0?!0:i,o=Tst(n,["available"]);if(a)t[e].push(Td((r={},r[Sx]=!0,r),o));else{var s=t[e].indexOf(function(c){return c.type===n.type});s!==-1&&t[e].splice(s,1)}}},{key:"labels",callback:function(t,e,n){var r;if(!n||Re(n)){t[e]=n||[];return}n.text||(n.text=t.yField),t[e]=t[e]||[],t[e].push(Td((r={},r[Sx]=!0,r),n))}}],Px=[{key:"conversionTag",shape:"ConversionTag"},{key:"axisText",shape:"BidirectionalBarAxisText"}],Nst=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),hv=function(){return hv=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},hv.apply(this,arguments)},Ist=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n},jst=function(t){Nst(e,t);function e(n){n===void 0&&(n={});var r=n.style,i=Ist(n,["style"]);return t.call(this,hv({style:hv({fill:"#eee"},r)},i))||this}return e}(ef),Rst=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),pv=function(){return pv=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},pv.apply(this,arguments)},Dst=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n},i4=function(t){Rst(e,t);function e(n){n===void 0&&(n={});var r=n.style,i=Dst(n,["style"]);return t.call(this,pv({style:pv({text:"",fontSize:12,textBaseline:"middle",textAlign:"center",fill:"#000",fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",lineWidth:1},r)},i))||this}return e}(Di);function Bst(t,e,n){(n!==void 0&&!hi(t[e],n)||n===void 0&&!(e in t))&&Kd(t,e,n)}var Ax=Bst;function Fst(t){return function(e,n,r){for(var i=-1,a=Object(e),o=r(e),s=o.length;s--;){var c=o[t?s:++i];if(n(a[c],c,a)===!1)break}return e}}var zst=Fst,Gst=zst(),a4=Gst;function Wst(t){return wr(t)&&Ro(t)}var Yst=Wst,Hst="[object Object]",$st=Function.prototype,Vst=Object.prototype,o4=$st.toString,Ust=Vst.hasOwnProperty,Xst=o4.call(Object);function qst(t){if(!wr(t)||xr(t)!=Hst)return!1;var e=eg(t);if(e===null)return!0;var n=Ust.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&o4.call(n)==Xst}var Tx=qst;function Zst(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}var Cx=Zst;function Kst(t){return Bs(t,Nu(t))}var Qst=Kst;function Jst(t,e,n,r,i,a,o){var s=Cx(t,n),c=Cx(e,n),l=o.get(c);if(l){Ax(t,n,l);return}var u=a?a(s,c,n+"",t,e,o):void 0,f=u===void 0;if(f){var d=Re(c),h=!d&&Ns(c),p=!d&&!h&&qv(c);u=c,d||h||p?Re(s)?u=s:Yst(s)?u=tg(s):h?(f=!1,u=p_(c,!0)):p?(f=!1,u=b_(c,!0)):u=[]:Tx(c)||yi(c)?(u=s,yi(s)?u=Qst(s):(!or(s)||Ma(s))&&(u=__(c))):f=!1}f&&(o.set(c,u),i(u,c,r,a,o),o.delete(c)),Ax(t,n,u)}var tct=Jst;function s4(t,e,n,r,i){t!==e&&a4(e,function(a,o){if(i||(i=new Io),or(a))tct(t,e,o,n,s4,r,i);else{var s=r?r(Cx(t,o),a,o+"",t,e,i):void 0;s===void 0&&(s=a),Ax(t,o,s)}},Nu)}var ect=s4;function nct(t){return t}var kx=nct;function rct(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}var ict=rct,c4=Math.max;function act(t,e,n){return e=c4(e===void 0?t.length-1:e,0),function(){for(var r=arguments,i=-1,a=c4(r.length-e,0),o=Array(a);++i<a;)o[i]=r[e+i];i=-1;for(var s=Array(e+1);++i<e;)s[i]=r[i];return s[e]=n(o),ict(t,this,s)}}var l4=act;function oct(t){return function(){return t}}var sct=oct,cct=Zd?function(t,e){return Zd(t,"toString",{configurable:!0,enumerable:!1,value:sct(e),writable:!0})}:kx,lct=cct,uct=800,fct=16,dct=Date.now;function hct(t){var e=0,n=0;return function(){var r=dct(),i=fct-(r-n);if(n=r,i>0){if(++e>=uct)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var pct=hct,vct=pct(lct),u4=vct;function gct(t,e){return u4(l4(t,e,kx),t+"")}var yct=gct;function mct(t,e,n){if(!or(n))return!1;var r=typeof e;return(r=="number"?Ro(n)&&yr(e,n.length):r=="string"&&e in n)?hi(n[e],t):!1}var bct=mct;function xct(t){return yct(function(e,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(a=t.length>3&&typeof a=="function"?(i--,a):void 0,o&&bct(n[0],n[1],o)&&(a=i<3?void 0:a,i=1),e=Object(e);++r<i;){var s=n[r];s&&t(e,s,r,a)}return e})}var f4=xct,_ct=f4(function(t,e,n,r){ect(t,e,n,r)}),Oct=_ct,d4=function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,a;r<i;r++)(a||!(r in e))&&(a||(a=Array.prototype.slice.call(e,0,r)),a[r]=e[r]);return t.concat(a||Array.prototype.slice.call(e))},wct=function(t,e){if(Re(e))return e},ms=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Oct.apply(void 0,d4(d4([],t,!1),[wct],!1))},Sct=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),h4=function(t){Sct(e,t);function e(n,r,i){var a=t.call(this,{style:ms(i,r)})||this;return a.chart=n,a}return e.prototype.connectedCallback=function(){this.render(this.attributes,this),this.bindEvents(this.attributes,this)},e.prototype.disconnectedCallback=function(){},e.prototype.attributeChangedCallback=function(n){},e.prototype.update=function(n,r){var i;return this.attr(ms({},this.attributes,n||{})),(i=this.render)===null||i===void 0?void 0:i.call(this,this.attributes,this,r)},e.prototype.clear=function(){this.removeChildren()},e.prototype.getElementsLayout=function(){var n=this.chart.getContext().canvas,r=n.document.getElementsByClassName("element"),i=[];return r.forEach(function(a){var o=a.getBBox(),s=o.x,c=o.y,l=o.width,u=o.height,f=a.__data__;i.push({bbox:o,x:s,y:c,width:l,height:u,key:f.key,data:f})}),i},e.prototype.bindEvents=function(n,r){},e}(kh),Mct=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),vv=function(){return vv=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},vv.apply(this,arguments)},Ect=function(t){Mct(e,t);function e(n,r){return t.call(this,n,r,{type:e.tag})||this}return e.prototype.getConversionTagLayout=function(){var n=this.direction==="vertical",r=this.getElementsLayout(),i=r[0],a=i.x,o=i.y,s=i.height,c=i.width,l=i.data,u=["items",0,"value"],f=_n(l,u),d=n?r[1].y-o-s:r[1].x-a-c,h=[],p=this.attributes,v=p.size,g=v===void 0?40:v,y=p.arrowSize,m=y===void 0?20:y,b=p.spacing,x=b===void 0?4:b;return r.forEach(function(_,O){if(O>0){var w=_.x,S=_.y,M=_.height,E=_.width,P=_.data,L=_.key,A=_n(P,u),T=g/2;if(n){var C=w+E/2,N=S;h.push({points:[[C+T,N-d+x],[C+T,N-m-x],[C,N-x],[C-T,N-m-x],[C-T,N-d+x]],center:[C,N-d/2-x],width:d,value:[f,A],key:L})}else{var C=w,N=S+M/2;h.push({points:[[w-d+x,N-T],[w-m-x,N-T],[C-x,N],[w-m-x,N+T],[w-d+x,N+T]],center:[C-d/2-x,N],width:d,value:[f,A],key:L})}f=A}}),h},e.prototype.render=function(){this.setDirection(),this.drawConversionTag()},e.prototype.setDirection=function(){var n=this.chart.getCoordinate(),r=_n(n,"options.transformations"),i="horizontal";r.forEach(function(a){a.includes("transpose")&&(i="vertical")}),this.direction=i},e.prototype.drawConversionTag=function(){var n=this,r=this.getConversionTagLayout(),i=this.attributes,a=i.style,o=i.text,s=o.style,c=o.formatter;r.forEach(function(l){var u=l.points,f=l.center,d=l.value,h=l.key,p=d[0],v=d[1],g=f[0],y=f[1],m=new jst({style:vv({points:u,fill:"#eee"},a),id:"polygon-".concat(h)}),b=new i4({style:vv({x:g,y,text:Ma(c)?c(p,v):(v/p*100).toFixed(2)+"%"},s),id:"text-".concat(h)});n.appendChild(m),n.appendChild(b)})},e.prototype.update=function(){var n=this,r=this.getConversionTagLayout();r.forEach(function(i){var a=i.points,o=i.center,s=i.key,c=o[0],l=o[1],u=n.getElementById("polygon-".concat(s)),f=n.getElementById("text-".concat(s));u.setAttribute("points",a),f.setAttribute("x",c),f.setAttribute("y",l)})},e.tag="ConversionTag",e}(h4),Pct=1,Act=2;function Tct(t,e,n,r){var i=n.length,a=i,o=!r;if(t==null)return!a;for(t=Object(t);i--;){var s=n[i];if(o&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++i<a;){s=n[i];var c=s[0],l=t[c],u=s[1];if(o&&s[2]){if(l===void 0&&!(c in t))return!1}else{var f=new Io;if(r)var d=r(l,u,c,t,e,f);if(!(d===void 0?Jv(u,l,Pct|Act,r,f):d))return!1}}return!0}var Cct=Tct;function kct(t){return t===t&&!or(t)}var p4=kct;function Lct(t){for(var e=Rs(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,p4(i)]}return e}var Nct=Lct;function Ict(t,e){return function(n){return n==null?!1:n[t]===e&&(e!==void 0||t in Object(n))}}var v4=Ict;function jct(t){var e=Nct(t);return e.length==1&&e[0][2]?v4(e[0][0],e[0][1]):function(n){return n===t||Cct(n,t,e)}}var Rct=jct;function Dct(t,e){return t!=null&&e in Object(t)}var Bct=Dct;function Fct(t,e,n){e=Kc(e,t);for(var r=-1,i=e.length,a=!1;++r<i;){var o=Qc(e[r]);if(!(a=t!=null&&n(t,o)))break;t=t[o]}return a||++r!=i?a:(i=t==null?0:t.length,!!i&&pa(i)&&yr(o,i)&&(Re(t)||yi(t)))}var zct=Fct;function Gct(t,e){return t!=null&&zct(t,e,Bct)}var g4=Gct,Wct=1,Yct=2;function Hct(t,e){return ig(t)&&p4(e)?v4(Qc(t),e):function(n){var r=_n(n,t);return r===void 0&&r===e?g4(n,t):Jv(e,r,Wct|Yct)}}var $ct=Hct;function Vct(t){return function(e){return e==null?void 0:e[t]}}var Uct=Vct;function Xct(t){return function(e){return eh(e,t)}}var qct=Xct;function Zct(t){return ig(t)?Uct(Qc(t)):qct(t)}var Kct=Zct;function Qct(t){return typeof t=="function"?t:t==null?kx:typeof t=="object"?Re(t)?$ct(t[0],t[1]):Rct(t):Kct(t)}var Lx=Qct;function Jct(t,e,n,r){for(var i=t.length,a=n+(r?1:-1);r?a--:++a<i;)if(e(t[a],a,t))return a;return-1}var tlt=Jct;function elt(t){return t!==t}var nlt=elt;function rlt(t,e,n){for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}var ilt=rlt;function alt(t,e,n){return e===e?ilt(t,e,n):tlt(t,nlt,n)}var y4=alt;function olt(t,e){var n=t==null?0:t.length;return!!n&&y4(t,e,0)>-1}var slt=olt;function clt(t,e,n){for(var r=-1,i=t==null?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}var llt=clt;function ult(){}var m4=ult,flt=1/0,dlt=Zc&&1/yn(new Zc([,-0]))[1]==flt?function(t){return new Zc(t)}:m4,hlt=dlt,plt=200;function vlt(t,e,n){var r=-1,i=slt,a=t.length,o=!0,s=[],c=s;if(n)o=!1,i=llt;else if(a>=plt){var l=e?null:hlt(t);if(l)return yn(l);o=!1,i=ae,c=new st}else c=e?[]:s;t:for(;++r<a;){var u=t[r],f=e?e(u):u;if(u=n||u!==0?u:0,o&&f===f){for(var d=c.length;d--;)if(c[d]===f)continue t;e&&c.push(f),s.push(u)}else i(c,f,n)||(c!==s&&c.push(f),s.push(u))}return s}var glt=vlt;function ylt(t,e){return t&&t.length?glt(t,Lx(e,2)):[]}var Nx=ylt;function mlt(t,e,n,r){for(var i=-1,a=t==null?0:t.length;++i<a;){var o=t[i];e(r,o,n(o),t)}return r}var blt=mlt;function xlt(t,e){return t&&a4(t,e,Rs)}var _lt=xlt;function Olt(t,e){return function(n,r){if(n==null)return n;if(!Ro(n))return t(n,r);for(var i=n.length,a=e?i:-1,o=Object(n);(e?a--:++a<i)&&r(o[a],a,o)!==!1;);return n}}var wlt=Olt,Slt=wlt(_lt),b4=Slt;function Mlt(t,e,n,r){return b4(t,function(i,a,o){e(r,i,n(i),o)}),r}var Elt=Mlt;function Plt(t,e){return function(n,r){var i=Re(n)?blt:Elt,a=e?e():{};return i(n,t,Lx(r,2),a)}}var Alt=Plt,Tlt=Object.prototype,Clt=Tlt.hasOwnProperty,klt=Alt(function(t,e,n){Clt.call(t,n)?t[n].push(e):Kd(t,n,[e])}),x4=klt,Ix=32,_4=16,O4=48,Llt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Cd=function(){return Cd=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Cd.apply(this,arguments)},Nlt=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n},Ilt=function(t){Llt(e,t);function e(n,r){return t.call(this,n,r,{type:e.tag})||this}return e.prototype.render=function(){this.drawText()},e.prototype.getBidirectionalBarAxisTextLayout=function(){var n=this.attributes.layout,r=n==="vertical",i=this.getElementsLayout(),a=r?Nx(i,"x"):Nx(i,"y"),o=["title"],s=[],c=this.chart.getContext().views,l=_n(c,[0,"layout"]),u=l.width,f=l.height;return a.forEach(function(d){var h=d.x,p=d.y,v=d.height,g=d.width,y=d.data,m=d.key,b=_n(y,o);r?s.push({x:h+g/2,y:f,text:b,key:m}):s.push({x:u,y:p+v/2,text:b,key:m})}),Nx(s,"text").length!==s.length&&(s=Object.values(x4(s,"text")).map(function(d){var h,p=d.reduce(function(v,g){return v+(r?g.x:g.y)},0);return Cd(Cd({},d[0]),(h={},h[r?"x":"y"]=p/d.length,h))})),s},e.prototype.transformLabelStyle=function(n){var r={},i=/^label[A-Z]/;return Object.keys(n).forEach(function(a){i.test(a)&&(r[a.replace("label","").replace(/^[A-Z]/,function(o){return o.toLowerCase()})]=n[a])}),r},e.prototype.drawText=function(){var n=this,r=this.getBidirectionalBarAxisTextLayout(),i=this.attributes,a=i.layout,o=i.labelFormatter,s=Nlt(i,["layout","labelFormatter"]);r.forEach(function(c){var l=c.x,u=c.y,f=c.text,d=c.key,h=new i4({style:Cd({x:l,y:u,text:Ma(o)?o(f):f,wordWrap:!0,wordWrapWidth:a==="horizontal"?Ix*2:120,maxLines:2,textOverflow:"ellipsis"},n.transformLabelStyle(s)),id:"text-".concat(d)});n.appendChild(h)})},e.prototype.update=function(){var n=this,r=this.getBidirectionalBarAxisTextLayout();r.forEach(function(i){var a=i.x,o=i.y,s=i.key,c=n.getElementById("text-".concat(s));c.setAttribute("x",a),c.setAttribute("y",o)})},e.tag="BidirectionalBarAxisText",e}(h4),jlt={ConversionTag:Ect,BidirectionalBarAxisText:Ilt},Rlt=function(){function t(e,n){this.container=new Map,this.chart=e,this.config=n,this.init()}return t.prototype.init=function(){var e=this;Px.forEach(function(n){var r,i=n.key,a=n.shape,o=e.config[i];if(o){var s=new jlt[a](e.chart,o),c=e.chart.getContext().canvas;c.appendChild(s),e.container.set(i,s)}else(r=e.container.get(i))===null||r===void 0||r.clear()})},t.prototype.update=function(){var e=this;this.container.size&&Px.forEach(function(n){var r=n.key,i=e.container.get(r);i==null||i.update()})},t}();function Dlt(t,e,n,r){if(!or(t))return t;e=Kc(e,t);for(var i=-1,a=e.length,o=a-1,s=t;s!=null&&++i<a;){var c=Qc(e[i]),l=n;if(c==="__proto__"||c==="constructor"||c==="prototype")return t;if(i!=o){var u=s[c];l=r?r(u,c,s):void 0,l===void 0&&(l=or(u)?u:yr(e[i+1])?[]:{})}Qd(s,c,l),s=s[c]}return t}var w4=Dlt;function Blt(t,e,n){for(var r=-1,i=e.length,a={};++r<i;){var o=e[r],s=eh(t,o);n(s,o)&&w4(a,Kc(o,t),s)}return a}var Flt=Blt;function zlt(t,e){return Flt(t,e,function(n,r){return g4(t,r)})}var Glt=zlt,S4=ar?ar.isConcatSpreadable:void 0;function Wlt(t){return Re(t)||yi(t)||!!(S4&&t&&t[S4])}var Ylt=Wlt;function M4(t,e,n,r,i){var a=-1,o=t.length;for(n||(n=Ylt),i||(i=[]);++a<o;){var s=t[a];e>0&&n(s)?e>1?M4(s,e-1,n,r,i):zc(i,s):r||(i[i.length]=s)}return i}var Hlt=M4;function $lt(t){var e=t==null?0:t.length;return e?Hlt(t,1):[]}var Vlt=$lt;function Ult(t){return u4(l4(t,void 0,Vlt),t+"")}var jx=Ult,Xlt=jx(function(t,e){return t==null?{}:Glt(t,e)}),E4=Xlt,qlt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),iu=function(){return iu=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},iu.apply(this,arguments)},P4="data-chart-source-type",qe=function(t){qlt(e,t);function e(n,r){var i=t.call(this)||this;return i.container=typeof n=="string"?document.getElementById(n):n,i.options=i.mergeOption(r),i.createG2(),i.bindEvents(),i}return e.prototype.getChartOptions=function(){return iu(iu({},E4(this.options,Cst)),{container:this.container})},e.prototype.getSpecOptions=function(){return this.type==="base"||this[kst]?iu(iu({},this.options),this.getChartOptions()):this.options},e.prototype.createG2=function(){if(!this.container)throw Error("The container is not initialized!");this.chart=new Est(this.getChartOptions()),this.container.setAttribute(P4,"Ant Design Charts")},e.prototype.bindEvents=function(){var n=this;this.chart&&this.chart.on("*",function(r){r!=null&&r.type&&n.emit(r.type,r)})},e.prototype.getBaseOptions=function(){return{type:"view",autoFit:!0}},e.prototype.getDefaultOptions=function(){},e.prototype.render=function(){var n=this;this.type!=="base"&&this.execAdaptor(),this.chart.options(this.getSpecOptions()),this.chart.render().then(function(){n.annotation=new Rlt(n.chart,n.options)}),this.bindSizeSensor()},e.prototype.update=function(n){this.options=this.mergeOption(n)},e.prototype.mergeOption=function(n){return ms({},this.getBaseOptions(),this.getDefaultOptions(),n)},e.prototype.changeData=function(n){this.chart.changeData(n)},e.prototype.changeSize=function(n,r){this.chart.changeSize(n,r)},e.prototype.destroy=function(){this.chart.destroy(),this.off(),this.container.removeAttribute(P4)},e.prototype.execAdaptor=function(){var n=this.getSchemaAdaptor();n({chart:this.chart,options:this.options})},e.prototype.triggerResize=function(){this.chart.forceFit()},e.prototype.bindSizeSensor=function(){var n=this,r=this.options.autoFit,i=r===void 0?!0:r;i&&this.chart.on(on.AFTER_CHANGE_SIZE,function(){n.annotation.update()})},e}(lg),Zlt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Klt=function(t){Zlt(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type="base",n}return e.getDefaultOptions=function(){return{type:"view",children:[{type:"line"}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return function(n){return n}},e}(qe);function Qlt(){}var Rx=Qlt;function gv(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=void 0}gv.prototype=rg(Rx.prototype),gv.prototype.constructor=gv;var kd=gv,Jlt=ku&&new ku,A4=Jlt,tut=A4?function(t){return A4.get(t)}:m4,T4=tut,eut={},C4=eut,nut=Object.prototype,rut=nut.hasOwnProperty;function iut(t){for(var e=t.name+"",n=C4[e],r=rut.call(C4,e)?n.length:0;r--;){var i=n[r],a=i.func;if(a==null||a==t)return i.name}return e}var yv=iut,aut=4294967295;function mv(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=aut,this.__views__=[]}mv.prototype=rg(Rx.prototype),mv.prototype.constructor=mv;var Dx=mv;function out(t){if(t instanceof Dx)return t.clone();var e=new kd(t.__wrapped__,t.__chain__);return e.__actions__=tg(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var sut=out,cut=Object.prototype,lut=cut.hasOwnProperty;function bv(t){if(wr(t)&&!Re(t)&&!(t instanceof Dx)){if(t instanceof kd)return t;if(lut.call(t,"__wrapped__"))return sut(t)}return new kd(t)}bv.prototype=Rx.prototype,bv.prototype.constructor=bv;var uut=bv;function fut(t){var e=yv(t),n=uut[e];if(typeof n!="function"||!(e in Dx.prototype))return!1;if(t===n)return!0;var r=T4(n);return!!r&&t===r[0]}var k4=fut,dut="Expected a function",hut=8,put=32,vut=128,gut=256;function yut(t){return jx(function(e){var n=e.length,r=n,i=kd.prototype.thru;for(t&&e.reverse();r--;){var a=e[r];if(typeof a!="function")throw new TypeError(dut);if(i&&!o&&yv(a)=="wrapper")var o=new kd([],!0)}for(r=o?r:n;++r<n;){a=e[r];var s=yv(a),c=s=="wrapper"?T4(a):void 0;c&&k4(c[0])&&c[1]==(vut|hut|put|gut)&&!c[4].length&&c[9]==1?o=o[yv(c[0])].apply(o,c[3]):o=a.length==1&&k4(a)?o[s]():o.thru(a)}return function(){var l=arguments,u=l[0];if(o&&l.length==1&&Re(u))return o.plant(u).value();for(var f=0,d=n?e[f].apply(this,l):u;++f<n;)d=e[f].call(this,d);return d}})}var mut=yut,but=mut(),en=but,xut=function(t){var e=t.options,n=e.children,r=n===void 0?[]:n;return r.forEach(function(i){Object.keys(i).forEach(function(a){Re(i[a])&&a!=="data"&&(i[a]=i[a].filter(function(o){return!o[Sx]}))})}),e};function _ut(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}var Out=_ut;function wut(t,e,n){var r=-1,i=t.length;e<0&&(e=-e>i?0:i+e),n=n>i?i:n,n<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var a=Array(i);++r<i;)a[r]=t[r+e];return a}var Sut=wut;function Mut(t,e){return e.length<2?t:eh(t,Sut(e,0,-1))}var Eut=Mut;function Put(t,e){return e=Kc(e,t),t=Eut(t,e),t==null||delete t[Qc(Out(e))]}var Aut=Put;function Tut(t){return Tx(t)?void 0:t}var Cut=Tut,kut=1,Lut=2,Nut=4,Iut=jx(function(t,e){var n={};if(t==null)return n;var r=!1;e=th(e,function(a){return a=Kc(a,t),r||(r=a.length>1),a}),Bs(t,g_(t),n),r&&(n=P_(n,kut|Lut|Nut,Cut));for(var i=e.length;i--;)Aut(n,e[i]);return n}),Bx=Iut;function jut(t){return t===void 0}var Rut=jut;function Dut(t,e,n){return t==null?t:w4(t,e,n)}var re=Dut,L4=function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,a;r<i;r++)(a||!(r in e))&&(a||(a=Array.prototype.slice.call(e,0,r)),a[r]=e[r]);return t.concat(a||Array.prototype.slice.call(e))},But=function(t){var e=t.children,n=e===void 0?[]:e,r=Object.keys(Mx).concat(dv.map(function(i){return i.key}));return r.forEach(function(i){delete t[i]}),n.forEach(function(i){Object.keys(i).forEach(function(a){r.includes(a)&&delete i[a]})}),Object.keys(t).forEach(function(i){L4(L4([],r4,!0),Px.map(function(a){return a.key}),!0).includes(i)||delete t[i]}),t},cn=function(t){var e=xut(t),n=e.children,r=n===void 0?[]:n,i=Bx(e,[].concat(r4,dv.map(function(l){return l.key}))),a=function(l){var u;return(u=Lst.find(function(f){return f.key===l}))===null||u===void 0?void 0:u.callback},o=function(l,u,f){var d=a(u);d?d(l,u,f):l[u]=ms({},l[u],f)},s=function(l){Object.keys(l).forEach(function(u){if(l[u]){var f=dv.find(function(p){return p.key===u});if(f){var d=f.type,h=f.extend_keys;d?r.push(c(ms({},E4(l,h),{type:d},l[u]))):Re(l[u])&&l[u].forEach(function(p){r.push(c(p))})}}})},c=function(l){return s(l),Object.keys(Mx).forEach(function(u){var f=Mx[u];if(!Rut(l[u]))if(or(f)){var d=f.value,h=f.target,p=d(l[u]);o(l,h,p)}else re(l,f,l[u])}),l};return r.forEach(function(l){var u=ms({},i,l);c(ms(l,u))}),s(e),But(e),t},Fx=function(){return Fx=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Fx.apply(this,arguments)};function Fut(t){var e=t.options,n=e.stack,r=e.tooltip,i=e.xField;if(!n)return t;var a=dv.map(function(s){return s.type}).filter(function(s){return!!s}),o=!1;return a.forEach(function(s){e[s]&&(o=!0,re(e,[s,"stack"],Fx({y1:"y"},typeof n=="object"?n:{})))}),o&&!wx(r)&&!r&&re(e,"tooltip",{title:i,items:[{channel:"y"}]}),t}function Kn(t){return en(Fut)(t)}function zut(t){return en(Kn,cn)(t)}var Gut=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Wut=function(t){Gut(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type="area",n}return e.getDefaultOptions=function(){return{type:"view",children:[{type:"area"}],scale:{y:{nice:!0}},axis:{y:{title:!1},x:{title:!1}},interaction:{tooltip:{shared:!0}}}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return zut},e}(qe),au=function(){return au=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},au.apply(this,arguments)};function N4(t){var e=function(n){var r=n.options;_n(r,"children.length")>1&&re(r,"children",[{type:"interval"}]);var i=r.scale,a=r.markBackground,o=r.data,s=r.children,c=r.yField,l=_n(i,"y.domain",[]);if(a&&l.length&&Re(o)){var u="domainMax",f=o.map(function(d){var h;return au(au({originData:au({},d)},Bx(d,c)),(h={},h[u]=l[l.length-1],h))});s.unshift(au({type:"interval",data:f,yField:u,tooltip:!1,style:{fill:"#eee"},label:!1},a))}return n};return en(e,Kn,cn)(t)}var Yut=function(){var t=function(e,n){return function(r){var i=e.fill,a=i===void 0?"#2888FF":i,o=e.stroke,s=e.fillOpacity,c=s===void 0?1:s,l=e.strokeOpacity,u=l===void 0?.2:l,f=e.pitch,d=f===void 0?8:f,h=r[0],p=r[1],v=r[2],g=r[3],y=(p[1]-h[1])/2,m=n.document,b=m.createElement("g",{}),x=m.createElement("polygon",{style:{points:[h,[h[0]-d,h[1]+y],[v[0]-d,h[1]+y],g],fill:a,fillOpacity:c,stroke:o,strokeOpacity:u,inset:30}}),_=m.createElement("polygon",{style:{points:[[h[0]-d,h[1]+y],p,v,[v[0]-d,h[1]+y]],fill:a,fillOpacity:c,stroke:o,strokeOpacity:u}}),O=m.createElement("polygon",{style:{points:[h,[h[0]-d,h[1]+y],p,[h[0]+d,h[1]+y]],fill:a,fillOpacity:c-.2}});return b.appendChild(x),b.appendChild(_),b.appendChild(O),b}};ow("shape.interval.bar25D",t)},Hut=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();Yut();var $ut=function(t){Hut(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type="Bar",n}return e.getDefaultOptions=function(){return{type:"view",coordinate:{transform:[{type:"transpose"}]},children:[{type:"interval"}],scale:{y:{nice:!0}},axis:{y:{title:!1},x:{title:!1}},interaction:{tooltip:{shared:!0},elementHighlightByColor:{background:!0}}}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return N4},e}(qe),Vut=function(){var t=function(e,n){return function(r){var i=e.fill,a=i===void 0?"#2888FF":i,o=e.stroke,s=e.fillOpacity,c=s===void 0?1:s,l=e.strokeOpacity,u=l===void 0?.2:l,f=e.pitch,d=f===void 0?8:f,h=r[1][0]-r[0][0],p=h/2+r[0][0],v=n.document,g=v.createElement("g",{}),y=v.createElement("polygon",{style:{points:[[r[0][0],r[0][1]],[p,r[1][1]+d],[p,r[3][1]+d],[r[3][0],r[3][1]]],fill:a,fillOpacity:c,stroke:o,strokeOpacity:u,inset:30}}),m=v.createElement("polygon",{style:{points:[[p,r[1][1]+d],[r[1][0],r[1][1]],[r[2][0],r[2][1]],[p,r[2][1]+d]],fill:a,fillOpacity:c,stroke:o,strokeOpacity:u}}),b=v.createElement("polygon",{style:{points:[[r[0][0],r[0][1]],[p,r[1][1]-d],[r[1][0],r[1][1]],[p,r[1][1]+d]],fill:a,fillOpacity:c-.2}});return g.appendChild(m),g.appendChild(y),g.appendChild(b),g}};ow("shape.interval.column25D",t)},Uut=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();Vut();var Xut=function(t){Uut(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type="column",n}return e.getDefaultOptions=function(){return{type:"view",scale:{y:{nice:!0}},interaction:{tooltip:{shared:!0},elementHighlightByColor:{background:!0}},axis:{y:{title:!1},x:{title:!1}},children:[{type:"interval"}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return N4},e}(qe);function qut(t){var e=function(r){var i=r.options,a=i.children,o=a===void 0?[]:a,s=i.legend;return s&&o.forEach(function(c){if(!_n(c,"colorField")){var l=_n(c,"yField");re(c,"colorField",function(){return l})}}),r},n=function(r){var i=r.options,a=i.annotations,o=a===void 0?[]:a,s=i.children,c=s===void 0?[]:s,l=i.scale,u=!1;return _n(l,"y.key")||c.forEach(function(f,d){if(!_n(f,"scale.y.key")){var h="child".concat(d,"Scale");re(f,"scale.y.key",h);var p=f.annotations,v=p===void 0?[]:p;v.length>0&&(re(f,"scale.y.independent",!1),v.forEach(function(g){re(g,"scale.y.key",h)})),!u&&o.length>0&&_n(f,"scale.y.independent")===void 0&&(u=!0,re(f,"scale.y.independent",!1),o.forEach(function(g){re(g,"scale.y.key",h)}))}}),r};return en(e,n,Kn,cn)(t)}var Zut=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),I4=function(t){Zut(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type="DualAxes",n}return e.getDefaultOptions=function(){return{type:"view",axis:{y:{title:!1,tick:!1},x:{title:!1}},scale:{y:{independent:!0,nice:!0}}}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return qut},e}(qe);function Kut(t){var e=function(a){var o=a.options,s=o.xField,c=o.colorField;return c||re(o,"colorField",s),a},n=function(a){var o=a.options,s=o.compareField,c=o.transform,l=o.isTransposed,u=l===void 0?!0:l,f=o.coordinate;return c||(s?re(o,"transform",[]):re(o,"transform",[{type:"symmetryY"}])),!f&&u&&re(o,"coordinate",{transform:[{type:"transpose"}]}),a},r=function(a){var o=a.options,s=o.compareField,c=o.seriesField,l=o.data,u=o.children,f=o.yField,d=o.isTransposed,h=d===void 0?!0:d;if(s||c){var p=Object.values(x4(l,function(v){return v[s||c]}));u[0].data=p[0],u.push({type:"interval",data:p[1],yField:function(v){return-v[f]}}),delete o.compareField,delete o.data}return c&&(re(o,"type","spaceFlex"),re(o,"ratio",[1,1]),re(o,"direction",h?"row":"col"),delete o.seriesField),a},i=function(a){var o=a.options,s=o.tooltip,c=o.xField,l=o.yField;return s||re(o,"tooltip",{title:!1,items:[function(u){return{name:u[c],value:u[l]}}]}),a};return en(e,n,r,i,Kn,cn)(t)}var Qut=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Jut=function(t){Qut(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type="column",n}return e.getDefaultOptions=function(){return{type:"view",scale:{x:{padding:0}},animate:{enter:{type:"fadeIn"}},axis:!1,shapeField:"funnel",label:{position:"inside",transform:[{type:"contrastReverse"}]},children:[{type:"interval"}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return Kut},e}(qe);function tft(t){return en(Kn,cn)(t)}var eft=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),nft=function(t){eft(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type="line",n}return e.getDefaultOptions=function(){return{type:"view",scale:{y:{nice:!0}},interaction:{tooltip:{shared:!0}},axis:{y:{title:!1},x:{title:!1}},children:[{type:"line"}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return tft},e}(qe);function Ld(t){switch(typeof t){case"function":return t;case"string":return function(e){return _n(e,[t])};default:return function(){return t}}}var bs=function(){return bs=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},bs.apply(this,arguments)};function rft(t){var e=function(n){var r=n.options,i=r.angleField,a=r.data,o=r.label,s=r.tooltip,c=r.colorField,l=Ld(c);if(Re(a)){var u=a.reduce(function(d,h){return d+h[i]},0);if(u===0){var f=a.map(function(d){var h;return bs(bs({},d),(h={},h[i]=1,h))});re(r,"data",f),o&&re(r,"label",bs(bs({},o),{formatter:function(){return 0}})),s!==!1&&re(r,"tooltip",bs(bs({},s),{items:[function(d,h,p){return{name:l(d,h,p),value:0}}]}))}}return n};return en(e,cn)(t)}var ift=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),aft=function(t){ift(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type="pie",n}return e.getDefaultOptions=function(){return{type:"view",children:[{type:"interval"}],coordinate:{type:"theta"},transform:[{type:"stackY",reverse:!0}],animate:{enter:{type:"waveIn"}}}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return rft},e}(qe);function oft(t){return en(Kn,cn)(t)}var sft=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),cft=function(t){sft(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type="scatter",n}return e.getDefaultOptions=function(){return{axis:{y:{title:!1},x:{title:!1}},legend:{size:!1},children:[{type:"point"}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return oft},e}(qe);function lft(t){var e=function(n){return re(n,"options.coordinate",{type:_n(n,"options.coordinateType","polar")}),n};return en(e,cn)(t)}var uft=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),fft=function(t){uft(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type="radar",n}return e.getDefaultOptions=function(){return{axis:{x:{grid:!0,line:!0},y:{zIndex:1,title:!1,line:!0,nice:!0}},meta:{x:{padding:.5,align:0}},interaction:{tooltip:{style:{crosshairsLineDash:[4,4]}}},children:[{type:"line"}],coordinateType:"polar"}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return lft},e}(qe);function dft(t,e){var n=-1,r=Ro(t)?Array(t.length):[];return b4(t,function(i,a,o){r[++n]=e(i,a,o)}),r}var hft=dft;function pft(t,e){var n=Re(t)?th:hft;return n(t,Lx(e,3))}var ou=pft,Po=function(){return Po=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Po.apply(this,arguments)},vft="__stock-range__",gft="trend",yft="up",mft="down";function bft(t){var e=function(r){var i=r.options,a=i.data,o=i.yField;return r.options.data=ou(a,function(s){var c=s&&Po({},s);if(Array.isArray(o)&&c){var l=o[0],u=o[1],f=o[2],d=o[3];c[gft]=c[l]<=c[u]?yft:mft,c[vft]=[c[l],c[u],c[f],c[d]]}return c}),r},n=function(r){var i=r.options,a=i.xField,o=i.yField,s=i.fallingFill,c=i.risingFill,l=o[0],u=o[1],f=o[2],d=o[3],h=Ld(a);return r.options.children=ou(r.options.children,function(p,v){var g=v===0;return Po(Po({},p),{tooltip:{title:function(y,m,b){var x=h(y,m,b);return x instanceof Date?x.toLocaleString():x},items:[{field:f},{field:d},{field:l},{field:u}]},encode:Po(Po({},p.encode||{}),{y:g?[f,d]:[l,u],color:function(y){return Math.sign(y[u]-y[l])}}),style:Po(Po({},p.style||{}),{lineWidth:g?1:10})})}),delete i.yField,r.options.legend={color:!1},s&&re(r,"options.scale.color.range[0]",s),c&&re(r,"options.scale.color.range[2]",c),r};return en(e,n,cn)(t)}var xft=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),_ft=["#26a69a","#999999","#ef5350"],Oft=function(t){xft(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type="stock",n}return e.getDefaultOptions=function(){return{type:"view",scale:{color:{domain:[-1,0,1],range:_ft},y:{nice:!0}},children:[{type:"link"},{type:"link"}],axis:{x:{title:!1,grid:!1},y:{title:!1,grid:!0,gridLineDash:null}},animate:{enter:{type:"scaleInY"}},interaction:{tooltip:{shared:!0,marker:!1,groupName:!1,crosshairs:!0}}}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return bft},e}(qe);function wft(t){return en(Kn,cn)(t)}var Sft=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Mft=function(t){Sft(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type="TinyLine",n}return e.getDefaultOptions=function(){return{type:"view",children:[{type:"line",axis:!1}],autoFit:!1,animate:{enter:{type:"growInX",duration:500}},padding:0,margin:0,tooltip:!1}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return wft},e}(qe);function Eft(t){return en(Kn,cn)(t)}var Pft=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Aft=function(t){Pft(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type="TinyArea",n}return e.getDefaultOptions=function(){return{type:"view",animate:{enter:{type:"growInX",duration:500}},children:[{type:"area",axis:!1}],autoFit:!1,padding:0,margin:0,tooltip:!1}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return Eft},e}(qe);function Tft(t){return en(Kn,cn)(t)}var Cft=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),kft=function(t){Cft(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type="TinyColumn",n}return e.getDefaultOptions=function(){return{type:"view",children:[{type:"interval",axis:!1}],autoFit:!1,padding:0,margin:0,tooltip:!1}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return Tft},e}(qe),zx=function(){return zx=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},zx.apply(this,arguments)};function Lft(t){var e=function(n){var r=n.options,i=r.percent,a=r.color,o=a===void 0?[]:a;if(!i)return n;var s={scale:{color:{range:o.length?o:[]}},data:[1,i]};return Object.assign(r,zx({},s)),n};return en(e,Kn,cn)(t)}var Nft=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ift=function(t){Nft(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type="TinyProgress",n}return e.getDefaultOptions=function(){return{type:"view",data:[],autoFit:!1,margin:0,padding:0,tooltip:!1,children:[{interaction:{tooltip:!1},coordinate:{transform:[{type:"transpose"}]},type:"interval",axis:!1,legend:!1,encode:{y:function(n){return n},color:function(n,r){return r}}}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return Lft},e}(qe),Gx=function(){return Gx=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Gx.apply(this,arguments)};function jft(t){var e=function(r){var i=r.options,a=i.radius,o=a===void 0?.8:a;return re(r,"options.coordinate.innerRadius",o),r},n=function(r){var i=r.options,a=i.percent,o=i.color,s=o===void 0?[]:o;if(!a)return r;var c={scale:{color:{range:s.length?s:[]}},data:[1,a]};return Object.assign(i,Gx({},c)),r};return en(e,n,Kn,cn)(t)}var Rft=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Dft=function(t){Rft(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type="TinyRing",n}return e.getDefaultOptions=function(){return{type:"view",data:[],autoFit:!1,margin:0,padding:0,coordinate:{type:"theta"},animate:{enter:{type:"waveIn"}},interaction:{tooltip:!1},tooltip:!1,children:[{type:"interval",axis:!1,legend:!1,encode:{y:function(n){return n},color:function(n,r){return r}}}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return jft},e}(qe);function Bft(t){return en(cn)(t)}var Fft=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),zft=function(t){Fft(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type="rose",n}return e.getDefaultOptions=function(){return{type:"view",children:[{type:"interval"}],coordinate:{type:"polar"},animate:{enter:{type:"waveIn"}}}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return Bft},e}(qe),Wx="__start__",su="__end__",Yx="__waterfall_value__",Hx=function(){return Hx=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Hx.apply(this,arguments)},Gft=function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,a;r<i;r++)(a||!(r in e))&&(a||(a=Array.prototype.slice.call(e,0,r)),a[r]=e[r]);return t.concat(a||Array.prototype.slice.call(e))};function Wft(t){var e=function(r){var i=r.options,a=i.data,o=a===void 0?[]:a,s=i.yField;return o.length&&(o.reduce(function(c,l,u){var f,d=Ld(s),h=d(l,u,o);if(u===0||l.isTotal)l[Wx]=0,l[su]=h,l[Yx]=h;else{var p=(f=c[su])!==null&&f!==void 0?f:d(c,u,o);l[Wx]=p,l[su]=p+h,l[Yx]=c[su]}return l},[]),Object.assign(i,{yField:[Wx,su]})),r},n=function(r){var i=r.options,a=i.data,o=a===void 0?[]:a,s=i.xField,c=i.children,l=i.linkStyle,u=Gft([],o,!0);return u.reduce(function(f,d,h){return h>0&&(d.x1=f[s],d.x2=d[s],d.y1=f[su]),d},[]),u.shift(),c.push({type:"link",xField:["x1","x2"],yField:"y1",zIndex:-1,data:u,style:Hx({stroke:"#697474"},l),label:!1,tooltip:!1}),r};return en(e,n,Kn,cn)(t)}var Yft=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Hft=function(t){Yft(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type="waterfall",n}return e.getDefaultOptions=function(){return{type:"view",legend:null,tooltip:{field:Yx,valueFormatter:"~s",name:"value"},axis:{y:{title:null,labelFormatter:"~s"},x:{title:null}},children:[{type:"interval",interaction:{elementHighlightByColor:{background:!0}}}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return Wft},e}(qe),$ft="[object Number]";function Vft(t){return typeof t=="number"||wr(t)&&xr(t)==$ft}var cu=Vft,Uft=Object.prototype,Xft=Uft.hasOwnProperty,qft=f4(function(t,e){if(Xd(e)||Ro(e)){Bs(e,Rs(e),t);return}for(var n in e)Xft.call(e,n)&&Qd(t,n,e[n])}),j4=qft,Zft=/\s/;function Kft(t){for(var e=t.length;e--&&Zft.test(t.charAt(e)););return e}var Qft=Kft,Jft=/^\s+/;function tdt(t){return t&&t.slice(0,Qft(t)+1).replace(Jft,"")}var edt=tdt,R4=0/0,ndt=/^[-+]0x[0-9a-f]+$/i,rdt=/^0b[01]+$/i,idt=/^0o[0-7]+$/i,adt=parseInt;function odt(t){if(typeof t=="number")return t;if(Iu(t))return R4;if(or(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=or(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=edt(t);var n=rdt.test(t);return n||idt.test(t)?adt(t.slice(2),n?2:8):ndt.test(t)?R4:+t}var D4=odt,B4=1/0,sdt=17976931348623157e292;function cdt(t){if(!t)return t===0?t:0;if(t=D4(t),t===B4||t===-B4){var e=t<0?-1:1;return e*sdt}return t===t?t:0}var ldt=cdt;function udt(t){var e=ldt(t),n=e%1;return e===e?n?e-n:e:0}var F4=udt,fdt=Jn.isFinite,ddt=Math.min;function hdt(t){var e=Math[t];return function(n,r){if(n=D4(n),r=r==null?0:ddt(F4(r),292),r&&fdt(n)){var i=(sg(n)+"e").split("e"),a=e(i[0]+"e"+(+i[1]+r));return i=(sg(a)+"e").split("e"),+(i[0]+"e"+(+i[1]-r))}return e(n)}}var pdt=hdt,vdt=pdt("ceil"),gdt=vdt,ydt=0/0;function mdt(t){return typeof t=="number"?t:Iu(t)?ydt:+t}var z4=mdt;function bdt(t,e){return function(n,r){var i;if(n===void 0&&r===void 0)return e;if(n!==void 0&&(i=n),r!==void 0){if(i===void 0)return r;typeof n=="string"||typeof r=="string"?(n=og(n),r=og(r)):(n=z4(n),r=z4(r)),i=t(n,r)}return i}}var xdt=bdt,_dt=xdt(function(t,e){return t/e},1),Odt=_dt;function wdt(t){var e=function(n){var r=n.options,i=r.data,a=r.binNumber,o=r.binWidth,s=r.children,c=r.channel,l=c===void 0?"count":c,u=_n(s,"[0].transform[0]",{});return cu(o)?(j4(u,{thresholds:gdt(Odt(i.length,o)),y:l}),n):(cu(a)&&j4(u,{thresholds:a,y:l}),n)};return en(e,Kn,cn)(t)}var Sdt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Mdt=function(t){Sdt(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type="Histogram",n}return e.getDefaultOptions=function(){return{type:"view",autoFit:!0,axis:{y:{title:!1},x:{title:!1}},children:[{type:"rect",transform:[{type:"binX",y:"count"}],interaction:{elementHighlightByColor:{background:!0}}}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return wdt},e}(qe);function Edt(t){var e=function(r){var i=r.options,a=i.tooltip,o=a===void 0?{}:a,s=i.colorField,c=i.sizeField;return o&&!o.field&&(o.field=s||c),r},n=function(r){var i=r.options,a=i.mark,o=i.children;return a&&(o[0].type=a),r};return en(e,n,Kn,cn)(t)}var Pdt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Adt=function(t){Pdt(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type="heatmap",n}return e.getDefaultOptions=function(){return{type:"view",legend:null,tooltip:{valueFormatter:"~s"},axis:{y:{title:null,grid:!0},x:{title:null,grid:!0}},children:[{type:"point",interaction:{elementHighlightByColor:{background:!0}}}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return Edt},e}(qe);function Tdt(t){var e=function(n){var r=n.options.boxType,i=r===void 0?"box":r;return n.options.children[0].type=i,n};return en(e,Kn,cn)(t)}var Cdt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),kdt=function(t){Cdt(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type="box",n}return e.getDefaultOptions=function(){return{type:"view",children:[{type:"box"}],axis:{y:{title:!1},x:{title:!1}},tooltip:{items:[{name:"min",channel:"y"},{name:"q1",channel:"y1"},{name:"q2",channel:"y2"},{name:"q3",channel:"y3"},{name:"max",channel:"y4"}]}}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return Tdt},e}(qe);function Ldt(t){var e=function(n){var r=n.options,i=r.data,a=[{type:"custom",callback:function(s){return{links:s}}}];if(Re(i))i.length>0?re(r,"data",{value:i,transform:a}):delete r.children;else if(_n(i,"type")==="fetch"&&_n(i,"value")){var o=_n(i,"transform");Re(o)?re(i,"transform",o.concat(a)):re(i,"transform",a)}return n};return en(e,Kn,cn)(t)}var Ndt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Idt=function(t){Ndt(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type="sankey",n}return e.getDefaultOptions=function(){return{type:"view",children:[{type:"sankey"}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return Ldt},e}(qe);function jdt(t){var e=t.options.layout,n=e===void 0?"horizontal":e;return t.options.coordinate.transform=n!=="horizontal"?void 0:[{type:"transpose"}],t}function Rdt(t){jdt(t);var e=t.options.layout,n=e===void 0?"horizontal":e;return t.options.children.forEach(function(r){var i;!((i=r==null?void 0:r.coordinate)===null||i===void 0)&&i.transform&&(r.coordinate.transform=n!=="horizontal"?void 0:[{type:"transpose"}])}),t}function Ddt(t){return t==null}var Bdt=Ddt,Fdt="[object String]";function zdt(t){return typeof t=="string"||!Re(t)&&wr(t)&&xr(t)==Fdt}var G4=zdt;function Gdt(t,e){return th(e,function(n){return t[n]})}var Wdt=Gdt;function Ydt(t){return t==null?[]:Wdt(t,Rs(t))}var Hdt=Ydt,$dt=Math.max;function Vdt(t,e,n,r){t=Ro(t)?t:Hdt(t),n=n&&!r?F4(n):0;var i=t.length;return n<0&&(n=$dt(i+n,0)),G4(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&y4(t,e,n)>-1}var Udt=Vdt,Sa=function(){return Sa=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Sa.apply(this,arguments)},xv=["#f0efff","#5B8FF9","#3D76DD"];function $x(t,e,n,r){r===void 0&&(r=!0);var i=0,a=!1,o=ou(t,function(s){var c,l,u=_n(s,[e]);if(Bdt(u))return[];if(G4(u)){var f=Number(u);return isNaN(f)?[]:(c={},c[n]=s[n],c[e]=f,c)}return Re(u)?(a=!0,i=Math.max(i,u.length),ou(r?u.sort(function(d,h){return h-d}):u,function(d,h){var p;return p={},p[n]=s[n],p[e]=d,p.index=h,p})):(i=Math.max(1,i),l={},l[n]=s[n],l[e]=u,l)}).flat();return a?[o.map(function(s){return Sa({index:0},s)}),i]:[o,i]}function Vx(t,e){return new Array(t).fill("").map(function(n,r){return Re(e)?e[r%e.length]:e})}function Xdt(t){var e=function(i){var a=i.options,o=a.color,s=a.rangeField,c=s===void 0?"ranges":s,l=a.measureField,u=l===void 0?"measures":l,f=a.targetField,d=f===void 0?"targets":f,h=a.xField,p=h===void 0?"title":h,v=a.mapField,g=a.data,y=$x(g,c,p),m=y[0],b=y[1],x=$x(g,u,p,!1),_=x[0],O=x[1],w=$x(g,d,p,!1),S=w[0],M=w[1],E=_n(o,[c],xv[0]),P=_n(o,[u],xv[1]),L=_n(o,[d],xv[2]),A=[Vx(b,E),Vx(O,P),Vx(M,L)].flat();return i.options.children=ou(i.options.children,function(T,C){var N=[m,_,S][C],B=[c,u,d][C];return Sa(Sa({},T),{data:N,encode:Sa(Sa({},T.encode||{}),{x:p,y:B,color:function(j){var D=j.index,G=cu(D)?"".concat(B,"_").concat(D):B;return v?_n(v,[B,D],G):G}}),style:Sa(Sa({},T.style||{}),{zIndex:function(j){return-j[B]}}),labels:C!==0?ou(T.labels,function(j){return Sa(Sa({},j),{text:B})}):void 0})}),i.options.scale.color.range=A,i.options.legend.color.itemMarker=function(T){return v&&Udt(v==null?void 0:v[d],T)||(T==null?void 0:T.replace(/\_\d$/,""))===d?"line":"square"},i},n=function(i){var a=i.options.layout,o=a===void 0?"horizontal":a;return o!=="horizontal"&&re(i,"options.children[2].shapeField","hyphen"),i},r=function(i){var a=i.options,o=a.range,s=o===void 0?{}:o,c=a.measure,l=c===void 0?{}:c,u=a.target,f=u===void 0?{}:u,d=a.children;return i.options.children=[s,l,f].map(function(h,p){return ms(d[p],h)}),i};return en(e,n,r,Rdt,cn)(t)}var qdt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Zdt=function(t){qdt(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type="bullet",n}return e.getDefaultOptions=function(){return{type:"view",scale:{color:{range:xv}},legend:{color:{itemMarker:function(n){return n==="target"?"line":"square"}}},axis:{y:{title:!1},x:{title:!1}},children:[{type:"interval",style:{maxWidth:30},axis:{y:{grid:!0,gridLineWidth:2}}},{type:"interval",style:{maxWidth:20},transform:[{type:"stackY"}]},{type:"point",encode:{size:8,shape:"line"}}],interaction:{tooltip:{shared:!0}},coordinate:{transform:[{type:"transpose"}]}}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return Xdt},e}(qe);function Kdt(t){var e=function(n){var r=n.options.data;return n.options.data={value:r},n};return en(e,Kn,cn)(t)}var Qdt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Jdt=function(t){Qdt(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type="Gauge",n}return e.getDefaultOptions=function(){return{type:"view",legend:!1,children:[{type:"gauge"}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return Kdt},e}(qe);function tht(t){var e=function(n){var r=n.options.percent;return cu(r)&&re(n,"options.data",r),n};return en(e,Kn,cn)(t)}var eht=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),nht=function(t){eht(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type="Liquid",n}return e.getDefaultOptions=function(){return{type:"view",children:[{type:"liquid"}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return tht},e}(qe);function rht(t){return en(Kn,cn)(t)}var iht=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),aht=function(t){iht(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type="WordCloud",n}return e.getDefaultOptions=function(){return{type:"view",legend:!1,children:[{type:"wordCloud"}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return rht},e}(qe);function oht(t){var e=function(n){var r=n.options,i=r.data;return i&&re(r,"data",{value:i}),n};return en(e,Kn,cn)(t)}var sht=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),cht=function(t){sht(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type="treemap",n}return e.getDefaultOptions=function(){return{type:"view",children:[{type:"treemap"}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return oht},e}(qe),Sc=function(){return Sc=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Sc.apply(this,arguments)};function lht(t){var e=function(i){var a=i.options,o=a.startAngle,s=a.maxAngle,c=a.coordinate,l=cu(o)?o/(2*Math.PI)*360:-90,u=cu(s)?(Number(s)+l)/180*Math.PI:Math.PI;return re(i,["options","coordinate"],Sc(Sc({},c),{endAngle:u,startAngle:o!=null?o:-Math.PI/2})),i},n=function(i){var a=i.options,o=a.tooltip,s=a.xField,c=a.yField,l=Ld(s),u=Ld(c);return o||re(a,"tooltip",{title:!1,items:[function(f,d,h){return{name:l(f,d,h),value:u(f,d,h)}}]}),i},r=function(i){var a=i.options,o=a.markBackground,s=a.children,c=a.scale,l=a.coordinate,u=a.xField,f=_n(c,"y.domain",[]);return o&&s.unshift(Sc({type:"interval",xField:u,yField:f[f.length-1],colorField:o.color,scale:{color:{type:"identity"}},style:{fillOpacity:o.opacity,fill:o.color?void 0:"#e0e4ee"},coordinate:Sc(Sc({},l),{startAngle:-Math.PI/2,endAngle:1.5*Math.PI}),animate:!1},o)),i};return en(e,n,r,Kn,cn)(t)}var uht=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),fht=function(t){uht(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type="radial",n}return e.getDefaultOptions=function(){return{type:"view",children:[{type:"interval"}],coordinate:{type:"radial",innerRadius:.1,outerRadius:1,endAngle:Math.PI},animate:{enter:{type:"waveIn",duration:800}},axis:{y:{nice:!0,labelAutoHide:!0,labelAutoRotate:!1},x:{title:!1,nice:!0,labelAutoRotate:!1,labelAutoHide:{type:"equidistance",cfg:{minGap:6}}}}}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return lht},e}(qe);function dht(t){return en(cn)(t)}var hht=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),pht=function(t){hht(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type="CirclePacking",n}return e.getDefaultOptions=function(){return{legend:!1,type:"view",children:[{type:"pack"}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return dht},e}(qe),_v=function(){return _v=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},_v.apply(this,arguments)};function vht(t){var e=function(n){var r=n.options,i=r.xField,a=r.yField,o=r.seriesField,s=r.children,c=s==null?void 0:s.map(function(l){return _v(_v({},l),{xField:i,yField:a,seriesField:o,colorField:o,data:l.type==="density"?{transform:[{type:"kde",field:a,groupBy:[i,o]}]}:l.data})}).filter(function(l){return r.violinType!=="density"||l.type==="density"});return re(r,"children",c),r.violinType==="polar"&&re(r,"coordinate",{type:"polar"}),re(r,"violinType",void 0),n};return en(e,Kn,cn)(t)}var ght=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),yht=function(t){ght(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type="violin",n}return e.getDefaultOptions=function(){return{type:"view",children:[{type:"density",sizeField:"size",tooltip:!1},{type:"boxplot",shapeField:"violin",style:{opacity:.5,point:!1}}],animate:{enter:{type:"fadeIn"}}}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return vht},e}(qe),Nd=function(){return Nd=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Nd.apply(this,arguments)},mht=function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,a;r<i;r++)(a||!(r in e))&&(a||(a=Array.prototype.slice.call(e,0,r)),a[r]=e[r]);return t.concat(a||Array.prototype.slice.call(e))};function bht(t){var e=function(a){var o=a.options,s=o.yField,c=o.children;return c.forEach(function(l,u){re(l,"yField",s[u])}),a},n=function(a){var o=a.options,s=o.yField,c=o.children,l=o.data;if(Tx(l))return a;var u=Re(_n(l,[0]))?l:[l,l];return c.forEach(function(f,d){re(f,"data",mht([],u[d].map(function(h){return Nd({groupKey:s[d]},h)}),!0))}),a},r=function(a){var o=a.options,s=o.yField,c=s[0],l=s[1],u=o.tooltip;return u||re(o,"tooltip",{items:[{field:c,value:c},{field:l,value:l}]}),a},i=function(a){var o=a.options,s=o.children,c=o.layout,l=o.coordinate.transform,u=o.paddingBottom,f=u===void 0?O4:u,d=o.paddingLeft,h=d===void 0?O4:d,p=o.axis;re(o,"axisText",Nd(Nd({},(p==null?void 0:p.x)||{}),{layout:c}));var v=s[0],g=s[1];if(c==="vertical")re(o,"direction","col"),re(o,"paddingLeft",h),re(o,"coordinate.transform",l.filter(function(_){return _.type!=="transpose"})),re(v,"paddingBottom",_4),re(g,"paddingTop",_4),re(g,"axis",{x:{position:"top"}}),re(g,"scale",{y:{range:[0,1]}});else{re(o,"paddingBottom",f),re(v,"scale",{y:{range:[0,1]}});var y=v.paddingRight,m=y===void 0?Ix:y,b=g.paddingLeft,x=b===void 0?Ix:b;re(v,"paddingRight",m),re(v,"axis",{x:{position:"right"}}),re(g,"paddingLeft",x)}return a};return en(e,n,r,i,Kn,cn)(t)}var xht=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),_ht=function(t){xht(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type="BidirectionalBar",n}return e.getDefaultOptions=function(){return{type:"spaceFlex",coordinate:{transform:[{type:"transpose"}]},scale:{y:{nice:!0}},direction:"row",layout:"horizontal",legend:!1,axis:{y:{title:!1},x:{title:!1,label:!1}},children:[{type:"interval"},{type:"interval"}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return bht},e}(qe),Mc;(function(t){t.color="key",t.d="path"})(Mc||(Mc={}));function Oht(t){var e=function(n){var r=n.options,i=r.data,a=r.setsField,o=r.sizeField;return Re(i)&&(re(r,"data",{type:"inline",value:i,transform:[{type:"venn",sets:a,size:o,as:[Mc.color,Mc.d]}]}),re(r,"colorField",a),re(r,["children","0","encode","d"],Mc.d)),re(n,"options",Bx(r,["sizeField","setsField"])),n};return en(e,cn)(t)}var wht=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Sht=function(t){wht(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type="venn",n}return e.getDefaultOptions=function(){return{type:"view",children:[{type:"path"}],legend:{color:{itemMarker:"circle"}},encode:{color:Mc.color,d:Mc.d}}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return Oht},e}(qe);function Mht(t){var e=function(n){return n};return en(e,cn)(t)}var Eht=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Pht=function(t){Eht(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type="Sunburst",n}return e.getDefaultOptions=function(){return{type:"view",children:[{type:"sunburst"}]}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return Mht},e}(qe),Aht={Base:Klt,Line:nft,Column:Xut,Pie:aft,Area:Wut,Bar:$ut,DualAxes:I4,Funnel:Jut,Scatter:cft,Radar:fft,Rose:zft,Stock:Oft,TinyLine:Mft,TinyArea:Aft,TinyColumn:kft,TinyProgress:Ift,TinyRing:Dft,Waterfall:Hft,Histogram:Mdt,Heatmap:Adt,Box:kdt,Sankey:Idt,Bullet:Zdt,Gauge:Jdt,Liquid:nht,WordCloud:aht,Treemap:cht,RadialBar:fht,CirclePacking:pht,Violin:yht,BidirectionalBar:_ht,Venn:Sht,Mix:I4,Sunburst:Pht},Ux=function(){return Ux=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Ux.apply(this,arguments)},W4=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n},Tht=(0,bt.forwardRef)(function(t,e){var n=t.chartType,r=n===void 0?"Base":n,i=W4(t,["chartType"]),a=i.containerStyle,o=a===void 0?{height:"inherit"}:a,s=i.containerAttributes,c=s===void 0?{}:s,l=i.className,u=i.loading,f=i.loadingTemplate,d=i.errorTemplate,h=W4(i,["containerStyle","containerAttributes","className","loading","loadingTemplate","errorTemplate"]),p=gD(Aht[r],h),v=p.chart,g=p.container;return(0,bt.useImperativeHandle)(e,function(){return v.current}),bt.createElement(pr,{errorTemplate:d},u&&bt.createElement(Pr,{loadingTemplate:f}),bt.createElement("div",Ux({className:l,style:o,ref:g},c)))}),Xx=function(){return Xx=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Xx.apply(this,arguments)},Cht=function(t){return bt.createElement(Tht,Xx({},t,{chartType:"Column"}))},kht=Cht},31847:function(Fe,Wn,J){"use strict";J.d(Wn,{Z:function(){return Iv}});var tt=J(4942),at=J(1413),Qt=J(91),xe=J(28459),$t=J(93967),bt=J.n($t),gt=J(67294),Pt=J(71002),et=J(97685),zt=J(87462),Et=J(50756),Nt=J(86500),Tt=J(1350),vt=2,ft=.16,lt=.05,mt=.05,qt=.15,le=5,Ue=4,je=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function ze(X){var F=X.r,rt=X.g,st=X.b,jt=(0,Nt.py)(F,rt,st);return{h:jt.h*360,s:jt.s,v:jt.v}}function He(X){var F=X.r,rt=X.g,st=X.b;return"#".concat((0,Nt.vq)(F,rt,st,!1))}function Ae(X,F,rt){var st=rt/100,jt={r:(F.r-X.r)*st+X.r,g:(F.g-X.g)*st+X.g,b:(F.b-X.b)*st+X.b};return jt}function nn(X,F,rt){var st;return Math.round(X.h)>=60&&Math.round(X.h)<=240?st=rt?Math.round(X.h)-vt*F:Math.round(X.h)+vt*F:st=rt?Math.round(X.h)+vt*F:Math.round(X.h)-vt*F,st<0?st+=360:st>=360&&(st-=360),st}function Ke(X,F,rt){if(X.h===0&&X.s===0)return X.s;var st;return rt?st=X.s-ft*F:F===Ue?st=X.s+ft:st=X.s+lt*F,st>1&&(st=1),rt&&F===le&&st>.1&&(st=.1),st<.06&&(st=.06),Number(st.toFixed(2))}function ee(X,F,rt){var st;return rt?st=X.v+mt*F:st=X.v-qt*F,st>1&&(st=1),Number(st.toFixed(2))}function Jt(X){for(var F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},rt=[],st=(0,Tt.uA)(X),jt=le;jt>0;jt-=1){var ne=ze(st),ve=He((0,Tt.uA)({h:nn(ne,jt,!0),s:Ke(ne,jt,!0),v:ee(ne,jt,!0)}));rt.push(ve)}rt.push(He(st));for(var ae=1;ae<=Ue;ae+=1){var me=ze(st),Le=He((0,Tt.uA)({h:nn(me,ae),s:Ke(me,ae),v:ee(me,ae)}));rt.push(Le)}return F.theme==="dark"?je.map(function(Ne){var ce=Ne.index,Oe=Ne.opacity,dn=He(Ae((0,Tt.uA)(F.backgroundColor||"#141414"),(0,Tt.uA)(rt[ce]),Oe*100));return dn}):rt}var Yn={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1677FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},Xe={},Pr={};Object.keys(Yn).forEach(function(X){Xe[X]=Jt(Yn[X]),Xe[X].primary=Xe[X][5],Pr[X]=Jt(Yn[X],{theme:"dark",backgroundColor:"#141414"}),Pr[X].primary=Pr[X][5]});var Rr=Xe.red,pr=Xe.volcano,Dr=Xe.gold,Ti=Xe.orange,Yi=Xe.yellow,ca=Xe.lime,Jn=Xe.green,ri=Xe.cyan,ar=Xe.blue,Ar=Xe.geekblue,fn=Xe.purple,la=Xe.magenta,ua=Xe.grey,jd=Xe.grey,xs=(0,gt.createContext)({}),_s=xs,fa=J(44958),lu=J(27571),Ac=J(80334);function Tc(X){return X.replace(/-(.)/g,function(F,rt){return rt.toUpperCase()})}function uu(X,F){(0,Ac.ZP)(X,"[@ant-design/icons] ".concat(F))}function To(X){return(0,Pt.Z)(X)==="object"&&typeof X.name=="string"&&typeof X.theme=="string"&&((0,Pt.Z)(X.icon)==="object"||typeof X.icon=="function")}function Os(){var X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Object.keys(X).reduce(function(F,rt){var st=X[rt];switch(rt){case"class":F.className=st,delete F.class;break;default:delete F[rt],F[Tc(rt)]=st}return F},{})}function xr(X,F,rt){return rt?gt.createElement(X.tag,(0,at.Z)((0,at.Z)({key:F},Os(X.attrs)),rt),(X.children||[]).map(function(st,jt){return xr(st,"".concat(F,"-").concat(X.tag,"-").concat(jt))})):gt.createElement(X.tag,(0,at.Z)({key:F},Os(X.attrs)),(X.children||[]).map(function(st,jt){return xr(st,"".concat(F,"-").concat(X.tag,"-").concat(jt))}))}function ws(X){return Jt(X)[0]}function or(X){return X?Array.isArray(X)?X:[X]:[]}var fu={width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",focusable:"false"},Ss=`
.anticon {
display: inline-flex;
alignItems: center;
color: inherit;
font-style: normal;
line-height: 0;
text-align: center;
text-transform: none;
vertical-align: -0.125em;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.anticon > * {
line-height: 1;
}
.anticon svg {
display: inline-block;
}
.anticon::before {
display: none;
}
.anticon .anticon-icon {
display: block;
}
.anticon[tabindex] {
cursor: pointer;
}
.anticon-spin::before,
.anticon-spin {
display: inline-block;
-webkit-animation: loadingCircle 1s infinite linear;
animation: loadingCircle 1s infinite linear;
}
@-webkit-keyframes loadingCircle {
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
@keyframes loadingCircle {
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
`,du=function(F){var rt=(0,gt.useContext)(_s),st=rt.csp,jt=rt.prefixCls,ne=Ss;jt&&(ne=ne.replace(/anticon/g,jt)),(0,gt.useEffect)(function(){var ve=F.current,ae=(0,lu.A)(ve);(0,fa.hq)(ne,"@ant-design-icons",{prepend:!0,csp:st,attachTo:ae})},[])},Ms=["icon","className","onClick","style","primaryColor","secondaryColor"],da={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function Ma(X){var F=X.primaryColor,rt=X.secondaryColor;da.primaryColor=F,da.secondaryColor=rt||ws(F),da.calculated=!!rt}function hu(){return(0,at.Z)({},da)}var qa=function(F){var rt=F.icon,st=F.className,jt=F.onClick,ne=F.style,ve=F.primaryColor,ae=F.secondaryColor,me=(0,Qt.Z)(F,Ms),Le=gt.useRef(),Ne=da;if(ve&&(Ne={primaryColor:ve,secondaryColor:ae||ws(ve)}),du(Le),uu(To(rt),"icon should be icon definiton, but got ".concat(rt)),!To(rt))return null;var ce=rt;return ce&&typeof ce.icon=="function"&&(ce=(0,at.Z)((0,at.Z)({},ce),{},{icon:ce.icon(Ne.primaryColor,Ne.secondaryColor)})),xr(ce.icon,"svg-".concat(ce.name),(0,at.Z)((0,at.Z)({className:st,onClick:jt,style:ne,"data-icon":ce.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},me),{},{ref:Le}))};qa.displayName="IconReact",qa.getTwoToneColors=hu,qa.setTwoToneColors=Ma;var Re=qa;function tr(X){var F=or(X),rt=(0,et.Z)(F,2),st=rt[0],jt=rt[1];return Re.setTwoToneColors({primaryColor:st,secondaryColor:jt})}function Es(){var X=Re.getTwoToneColors();return X.calculated?[X.primaryColor,X.secondaryColor]:X.primaryColor}var Cc=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];tr(ar.primary);var hi=gt.forwardRef(function(X,F){var rt=X.className,st=X.icon,jt=X.spin,ne=X.rotate,ve=X.tabIndex,ae=X.onClick,me=X.twoToneColor,Le=(0,Qt.Z)(X,Cc),Ne=gt.useContext(_s),ce=Ne.prefixCls,Oe=ce===void 0?"anticon":ce,dn=Ne.rootClassName,Or=bt()(dn,Oe,(0,tt.Z)((0,tt.Z)({},"".concat(Oe,"-").concat(st.name),!!st.name),"".concat(Oe,"-spin"),!!jt||st.name==="loading"),rt),ai=ve;ai===void 0&&ae&&(ai=-1);var Li=ne?{msTransform:"rotate(".concat(ne,"deg)"),transform:"rotate(".concat(ne,"deg)")}:void 0,yn=or(me),Hr=(0,et.Z)(yn,2),Ui=Hr[0],gr=Hr[1];return gt.createElement("span",(0,zt.Z)({role:"img","aria-label":st.name},Le,{ref:F,tabIndex:ai,onClick:ae,className:Or}),gt.createElement(Re,{icon:st,primaryColor:Ui,secondaryColor:gr,style:Li}))});hi.displayName="AntdIcon",hi.getTwoToneColor=Es,hi.setTwoToneColor=tr;var Hi=hi,sr=function(F,rt){return gt.createElement(Hi,(0,zt.Z)({},F,{ref:rt,icon:Et.Z}))},Ps=gt.forwardRef(sr),As=Ps,kc=J(48874),Lc=J(13169),pu=J(25378),vu=J(97435),gu=J(21770),pi=J(98082),yu=function(F){var rt=F.componentCls,st=F.antCls;return(0,tt.Z)({},"".concat(rt,"-actions"),(0,tt.Z)((0,tt.Z)({marginBlock:0,marginInline:0,paddingBlock:0,paddingInline:0,listStyle:"none",display:"flex",gap:F.marginXS,background:F.colorBgContainer,borderBlockStart:"".concat(F.lineWidth,"px ").concat(F.lineType," ").concat(F.colorSplit),minHeight:42},"& > *",{alignItems:"center",justifyContent:"center",flex:1,display:"flex",cursor:"pointer",color:F.colorTextSecondary,transition:"color 0.3s","&:hover":{color:F.colorPrimaryHover}}),"& > li > div",{flex:1,width:"100%",marginBlock:F.marginSM,marginInline:0,color:F.colorTextSecondary,textAlign:"center",a:{color:F.colorTextSecondary,transition:"color 0.3s","&:hover":{color:F.colorPrimaryHover}},div:(0,tt.Z)((0,tt.Z)({position:"relative",display:"block",minWidth:32,fontSize:F.fontSize,lineHeight:F.lineHeight,cursor:"pointer","&:hover":{color:F.colorPrimaryHover,transition:"color 0.3s"}},"a:not(".concat(st,`-btn),
> .anticon`),{display:"inline-block",width:"100%",color:F.colorTextSecondary,lineHeight:"22px",transition:"color 0.3s","&:hover":{color:F.colorPrimaryHover}}),".anticon",{fontSize:F.cardActionIconSize,lineHeight:"22px"}),"&:not(:last-child)":{borderInlineEnd:"".concat(F.lineWidth,"px ").concat(F.lineType," ").concat(F.colorSplit)}}))};function mu(X){return(0,pi.Xj)("ProCardActions",function(F){var rt=(0,at.Z)((0,at.Z)({},F),{},{componentCls:".".concat(X),cardActionIconSize:16});return[yu(rt)]})}var Bt=J(85893),Co=function(F){var rt=F.actions,st=F.prefixCls,jt=mu(st),ne=jt.wrapSSR,ve=jt.hashId;return Array.isArray(rt)&&rt!==null&&rt!==void 0&&rt.length?ne((0,Bt.jsx)("ul",{className:bt()("".concat(st,"-actions"),ve),children:rt.map(function(ae,me){return(0,Bt.jsx)("li",{style:{width:"".concat(100/rt.length,"%"),padding:0,margin:0},className:bt()("".concat(st,"-actions-item"),ve),children:ae},"action-".concat(me))})})):ne((0,Bt.jsx)("ul",{className:bt()("".concat(st,"-actions"),ve),children:rt}))},bu=Co,Za=J(71230),vi=J(15746),ko=J(54548),Nc=new ko.E4("card-loading",{"0%":{backgroundPosition:"0 50%"},"50%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),xu=function(F){return(0,tt.Z)({},F.componentCls,(0,tt.Z)((0,tt.Z)({"&-loading":{overflow:"hidden"},"&-loading &-body":{userSelect:"none"}},"".concat(F.componentCls,"-loading-content"),{width:"100%",p:{marginBlock:0,marginInline:0}}),"".concat(F.componentCls,"-loading-block"),{height:"14px",marginBlock:"4px",background:"linear-gradient(90deg, rgba(54, 61, 64, 0.2), rgba(54, 61, 64, 0.4), rgba(54, 61, 64, 0.2))",backgroundSize:"600% 600%",borderRadius:F.borderRadius,animationName:Nc,animationDuration:"1.4s",animationTimingFunction:"ease",animationIterationCount:"infinite"}))};function _u(X){return(0,pi.Xj)("ProCardLoading",function(F){var rt=(0,at.Z)((0,at.Z)({},F),{},{componentCls:".".concat(X)});return[xu(rt)]})}var Ka=function(F){var rt=F.style,st=F.prefix,jt=_u(st||"ant-pro-card"),ne=jt.wrapSSR;return ne((0,Bt.jsxs)("div",{className:"".concat(st,"-loading-content"),style:rt,children:[(0,Bt.jsx)(Za.Z,{gutter:8,children:(0,Bt.jsx)(vi.Z,{span:22,children:(0,Bt.jsx)("div",{className:"".concat(st,"-loading-block")})})}),(0,Bt.jsxs)(Za.Z,{gutter:8,children:[(0,Bt.jsx)(vi.Z,{span:8,children:(0,Bt.jsx)("div",{className:"".concat(st,"-loading-block")})}),(0,Bt.jsx)(vi.Z,{span:15,children:(0,Bt.jsx)("div",{className:"".concat(st,"-loading-block")})})]}),(0,Bt.jsxs)(Za.Z,{gutter:8,children:[(0,Bt.jsx)(vi.Z,{span:6,children:(0,Bt.jsx)("div",{className:"".concat(st,"-loading-block")})}),(0,Bt.jsx)(vi.Z,{span:18,children:(0,Bt.jsx)("div",{className:"".concat(st,"-loading-block")})})]}),(0,Bt.jsxs)(Za.Z,{gutter:8,children:[(0,Bt.jsx)(vi.Z,{span:13,children:(0,Bt.jsx)("div",{className:"".concat(st,"-loading-block")})}),(0,Bt.jsx)(vi.Z,{span:9,children:(0,Bt.jsx)("div",{className:"".concat(st,"-loading-block")})})]}),(0,Bt.jsxs)(Za.Z,{gutter:8,children:[(0,Bt.jsx)(vi.Z,{span:4,children:(0,Bt.jsx)("div",{className:"".concat(st,"-loading-block")})}),(0,Bt.jsx)(vi.Z,{span:3,children:(0,Bt.jsx)("div",{className:"".concat(st,"-loading-block")})}),(0,Bt.jsx)(vi.Z,{span:16,children:(0,Bt.jsx)("div",{className:"".concat(st,"-loading-block")})})]})]}))},Qa=Ka,Ea=J(50344),Ic=J(34155),Ou=["tab","children"],wu=null;function Su(X){return X.filter(function(F){return F})}function Mu(X,F,rt){if(X)return X.map(function(jt){return(0,at.Z)((0,at.Z)({},jt),{},{children:(0,Bt.jsx)(Z,(0,at.Z)((0,at.Z)({},rt==null?void 0:rt.cardProps),{},{children:jt.children}))})});(0,Ac.ET)(!rt,"Tabs.TabPane is deprecated. Please use `items` directly.");var st=(0,Ea.Z)(F).map(function(jt){if(gt.isValidElement(jt)){var ne=jt.key,ve=jt.props,ae=ve||{},me=ae.tab,Le=ae.children,Ne=(0,Qt.Z)(ae,Ou),ce=(0,at.Z)((0,at.Z)({key:String(ne)},Ne),{},{children:(0,Bt.jsx)(Z,(0,at.Z)((0,at.Z)({},rt==null?void 0:rt.cardProps),{},{children:Le})),label:me});return ce}return null});return Su(st)}var Rd=function(F){var rt=useContext(ConfigProvider.ConfigContext),st=rt.getPrefixCls;if(version.startsWith("5"))return _jsx(_Fragment,{});var jt=F.key,ne=F.tab,ve=F.tabKey,ae=F.disabled,me=F.destroyInactiveTabPane,Le=F.children,Ne=F.className,ce=F.style,Oe=F.cardProps,dn=_objectWithoutProperties(F,wu),Or=st("pro-card-tabpane"),ai=classNames(Or,Ne);return _jsx(Tabs.TabPane,_objectSpread(_objectSpread({tabKey:ve,tab:ne,className:ai,style:ce,disabled:ae,destroyInactiveTabPane:me},dn),{},{children:_jsx(Card,_objectSpread(_objectSpread({},Oe),{},{children:Le}))}),jt)},Pa=null,jc=function(F){return{backgroundColor:F.controlItemBgActive,borderColor:F.controlOutline}},Tr=function(F){var rt=F.componentCls;return(0,tt.Z)((0,tt.Z)((0,tt.Z)({},rt,(0,at.Z)((0,at.Z)({position:"relative",display:"flex",flexDirection:"column",boxSizing:"border-box",width:"100%",marginBlock:0,marginInline:0,paddingBlock:0,paddingInline:0,backgroundColor:F.colorBgContainer,borderRadius:F.borderRadius},pi.Wf===null||pi.Wf===void 0?void 0:(0,pi.Wf)(F)),{},(0,tt.Z)((0,tt.Z)((0,tt.Z)((0,tt.Z)((0,tt.Z)((0,tt.Z)((0,tt.Z)((0,tt.Z)((0,tt.Z)((0,tt.Z)({"&-box-shadow":{boxShadow:"0 1px 2px -2px #00000029, 0 3px 6px #0000001f, 0 5px 12px 4px #00000017",borderColor:"transparent"},"&-col":{width:"100%"},"&-border":{border:"".concat(F.lineWidth,"px ").concat(F.lineType," ").concat(F.colorSplit)},"&-hoverable":(0,tt.Z)({cursor:"pointer",transition:"box-shadow 0.3s, border-color 0.3s","&:hover":{borderColor:"transparent",boxShadow:"0 1px 2px -2px #00000029, 0 3px 6px #0000001f, 0 5px 12px 4px #00000017"}},"&".concat(rt,"-checked:hover"),{borderColor:F.controlOutline}),"&-checked":(0,at.Z)((0,at.Z)({},jc(F)),{},{"&::after":{position:"absolute",insetBlockStart:2,insetInlineEnd:2,width:0,height:0,border:"6px solid ".concat(F.colorPrimary),borderBlockEnd:"6px solid transparent",borderInlineStart:"6px solid transparent",borderStartEndRadius:2,content:'""'}}),"&:focus":(0,at.Z)({},jc(F)),"&&-ghost":(0,tt.Z)({backgroundColor:"transparent"},"> ".concat(rt),{"&-header":{paddingInlineEnd:0,paddingBlockEnd:F.padding,paddingInlineStart:0},"&-body":{paddingBlock:0,paddingInline:0,backgroundColor:"transparent"}}),"&&-split > &-body":{paddingBlock:0,paddingInline:0},"&&-contain-card > &-body":{display:"flex"}},"".concat(rt,"-body-direction-column"),{flexDirection:"column"}),"".concat(rt,"-body-wrap"),{flexWrap:"wrap"}),"&&-collapse",(0,tt.Z)({},"> ".concat(rt),{"&-header":{paddingBlockEnd:F.padding,borderBlockEnd:0},"&-body":{display:"none"}})),"".concat(rt,"-header"),{display:"flex",alignItems:"center",justifyContent:"space-between",paddingInline:F.paddingLG,paddingBlock:F.padding,paddingBlockEnd:0,"&-border":{"&":{paddingBlockEnd:F.padding},borderBlockEnd:"".concat(F.lineWidth,"px ").concat(F.lineType," ").concat(F.colorSplit)},"&-collapsible":{cursor:"pointer"}}),"".concat(rt,"-title"),{color:F.colorText,fontWeight:500,fontSize:F.fontSizeLG,lineHeight:F.lineHeight}),"".concat(rt,"-extra"),{color:F.colorText}),"".concat(rt,"-type-inner"),(0,tt.Z)({},"".concat(rt,"-header"),{backgroundColor:F.colorFillAlter})),"".concat(rt,"-collapsible-icon"),{marginInlineEnd:F.marginXS,color:F.colorIconHover,":hover":{color:F.colorPrimaryHover},"& svg":{transition:"transform ".concat(F.motionDurationMid)}}),"".concat(rt,"-body"),{display:"block",boxSizing:"border-box",height:"100%",paddingInline:F.paddingLG,paddingBlock:F.padding,"&-center":{display:"flex",alignItems:"center",justifyContent:"center"}}),"&&-size-small",(0,tt.Z)((0,tt.Z)({},rt,{"&-header":{paddingInline:F.paddingSM,paddingBlock:F.paddingXS,paddingBlockEnd:0,"&-border":{paddingBlockEnd:F.paddingXS}},"&-title":{fontSize:F.fontSize},"&-body":{paddingInline:F.paddingSM,paddingBlock:F.paddingSM}}),"".concat(rt,"-header").concat(rt,"-header-collapsible"),{paddingBlock:F.paddingXS})))),"".concat(rt,"-col"),(0,tt.Z)((0,tt.Z)({},"&".concat(rt,"-split-vertical"),{borderInlineEnd:"".concat(F.lineWidth,"px ").concat(F.lineType," ").concat(F.colorSplit)}),"&".concat(rt,"-split-horizontal"),{borderBlockEnd:"".concat(F.lineWidth,"px ").concat(F.lineType," ").concat(F.colorSplit)})),"".concat(rt,"-tabs"),(0,tt.Z)((0,tt.Z)((0,tt.Z)((0,tt.Z)((0,tt.Z)((0,tt.Z)({},"".concat(F.antCls,"-tabs-top > ").concat(F.antCls,"-tabs-nav"),(0,tt.Z)({marginBlockEnd:0},"".concat(F.antCls,"-tabs-nav-list"),{marginBlockStart:F.marginXS,paddingInlineStart:F.padding})),"".concat(F.antCls,"-tabs-bottom > ").concat(F.antCls,"-tabs-nav"),(0,tt.Z)({marginBlockEnd:0},"".concat(F.antCls,"-tabs-nav-list"),{paddingInlineStart:F.padding})),"".concat(F.antCls,"-tabs-left"),(0,tt.Z)({},"".concat(F.antCls,"-tabs-content-holder"),(0,tt.Z)({},"".concat(F.antCls,"-tabs-content"),(0,tt.Z)({},"".concat(F.antCls,"-tabs-tabpane"),{paddingInlineStart:0})))),"".concat(F.antCls,"-tabs-left > ").concat(F.antCls,"-tabs-nav"),(0,tt.Z)({marginInlineEnd:0},"".concat(F.antCls,"-tabs-nav-list"),{paddingBlockStart:F.padding})),"".concat(F.antCls,"-tabs-right"),(0,tt.Z)({},"".concat(F.antCls,"-tabs-content-holder"),(0,tt.Z)({},"".concat(F.antCls,"-tabs-content"),(0,tt.Z)({},"".concat(F.antCls,"-tabs-tabpane"),{paddingInlineStart:0})))),"".concat(F.antCls,"-tabs-right > ").concat(F.antCls,"-tabs-nav"),(0,tt.Z)({},"".concat(F.antCls,"-tabs-nav-list"),{paddingBlockStart:F.padding})))},_r=24,k=function(F,rt){var st=rt.componentCls;return F===0?(0,tt.Z)({},"".concat(st,"-col-0"),{display:"none"}):(0,tt.Z)({},"".concat(st,"-col-").concat(F),{flexShrink:0,width:"".concat(F/_r*100,"%")})},I=function(F){return Array(_r+1).fill(1).map(function(rt,st){return k(st,F)})};function z(X){return(0,pi.Xj)("ProCard",function(F){var rt=(0,at.Z)((0,at.Z)({},F),{},{componentCls:".".concat(X)});return[Tr(rt),I(rt)]})}var W=["className","style","bodyStyle","headStyle","title","subTitle","extra","wrap","layout","loading","gutter","tooltip","split","headerBordered","bordered","boxShadow","children","size","actions","ghost","hoverable","direction","collapsed","collapsible","collapsibleIconRender","defaultCollapsed","onCollapse","checked","onChecked","tabs","type"],q=gt.forwardRef(function(X,F){var rt,st=X.className,jt=X.style,ne=X.bodyStyle,ve=X.headStyle,ae=X.title,me=X.subTitle,Le=X.extra,Ne=X.wrap,ce=Ne===void 0?!1:Ne,Oe=X.layout,dn=X.loading,Or=X.gutter,ai=Or===void 0?0:Or,Li=X.tooltip,yn=X.split,Hr=X.headerBordered,Ui=Hr===void 0?!1:Hr,gr=X.bordered,gi=gr===void 0?!1:gr,$r=X.boxShadow,Ts=$r===void 0?!1:$r,no=X.children,jo=X.size,ro=X.actions,io=X.ghost,Cs=io===void 0?!1:io,ks=X.hoverable,Eu=ks===void 0?!1:ks,Bc=X.direction,Fc=X.collapsed,Bd=X.collapsible,jv=Bd===void 0?!1:Bd,Fd=X.collapsibleIconRender,zc=X.defaultCollapsed,Rv=zc===void 0?!1:zc,zd=X.onCollapse,Dv=X.checked,Pu=X.onChecked,ao=X.tabs,Gc=X.type,Ls=(0,Qt.Z)(X,W),Bv=(0,gt.useContext)(xe.ZP.ConfigContext),Gd=Bv.getPrefixCls,Wc=(0,pu.Z)()||{lg:!0,md:!0,sm:!0,xl:!1,xs:!1,xxl:!1},Au=(0,gu.Z)(Rv,{value:Fc,onChange:zd}),Wd=(0,et.Z)(Au,2),Yc=Wd[0],Fv=Wd[1],wr=["xxl","xl","lg","md","sm","xs"],zv=Mu(ao==null?void 0:ao.items,no,ao),Gv=function(Hn){var cr=[0,0],pa=Array.isArray(Hn)?Hn:[Hn,0];return pa.forEach(function(Ni,va){if((0,Pt.Z)(Ni)==="object")for(var Is=0;Is<wr.length;Is+=1){var js=wr[Is];if(Wc[js]&&Ni[js]!==void 0){cr[va]=Ni[js];break}}else cr[va]=Ni||0}),cr},Hc=function(Hn,cr){return Hn?cr:{}},Yd=function(Hn){var cr=Hn;if((0,Pt.Z)(Hn)==="object")for(var pa=0;pa<wr.length;pa+=1){var Ni=wr[pa];if(Wc!=null&&Wc[Ni]&&(Hn==null?void 0:Hn[Ni])!==void 0){cr=Hn[Ni];break}}var va=Hc(typeof cr=="string"&&/\d%|\dpx/i.test(cr),{width:cr,flexShrink:0});return{span:cr,colSpanStyle:va}},Qe=Gd("pro-card"),Hd=z(Qe),$d=Hd.wrapSSR,yi=Hd.hashId,Wv=Gv(ai),Vd=(0,et.Z)(Wv,2),$c=Vd[0],Vc=Vd[1],Tu=!1,Uc=gt.Children.toArray(no),Yv=Uc.map(function(yr,Hn){var cr;if(yr!=null&&(cr=yr.type)!==null&&cr!==void 0&&cr.isProCard){Tu=!0;var pa=yr.props.colSpan,Ni=Yd(pa),va=Ni.span,Is=Ni.colSpanStyle,js=bt()(["".concat(Qe,"-col")],yi,(0,tt.Z)((0,tt.Z)((0,tt.Z)({},"".concat(Qe,"-split-vertical"),yn==="vertical"&&Hn!==Uc.length-1),"".concat(Qe,"-split-horizontal"),yn==="horizontal"&&Hn!==Uc.length-1),"".concat(Qe,"-col-").concat(va),typeof va=="number"&&va>=0&&va<=24)),Vv=$d((0,Bt.jsx)("div",{style:(0,at.Z)((0,at.Z)((0,at.Z)({},Is),Hc($c>0,{paddingInlineEnd:$c/2,paddingInlineStart:$c/2})),Hc(Vc>0,{paddingBlockStart:Vc/2,paddingBlockEnd:Vc/2})),className:js,children:gt.cloneElement(yr)}));return gt.cloneElement(Vv,{key:"pro-card-col-".concat((yr==null?void 0:yr.key)||Hn)})}return yr}),Hv=bt()("".concat(Qe),st,yi,(rt={},(0,tt.Z)((0,tt.Z)((0,tt.Z)((0,tt.Z)((0,tt.Z)((0,tt.Z)((0,tt.Z)((0,tt.Z)((0,tt.Z)((0,tt.Z)(rt,"".concat(Qe,"-border"),gi),"".concat(Qe,"-box-shadow"),Ts),"".concat(Qe,"-contain-card"),Tu),"".concat(Qe,"-loading"),dn),"".concat(Qe,"-split"),yn==="vertical"||yn==="horizontal"),"".concat(Qe,"-ghost"),Cs),"".concat(Qe,"-hoverable"),Eu),"".concat(Qe,"-size-").concat(jo),jo),"".concat(Qe,"-type-").concat(Gc),Gc),"".concat(Qe,"-collapse"),Yc),(0,tt.Z)(rt,"".concat(Qe,"-checked"),Dv))),Ns=bt()("".concat(Qe,"-body"),yi,(0,tt.Z)((0,tt.Z)((0,tt.Z)({},"".concat(Qe,"-body-center"),Oe==="center"),"".concat(Qe,"-body-direction-column"),yn==="horizontal"||Bc==="column"),"".concat(Qe,"-body-wrap"),ce&&Tu)),$v=ne,Ud=gt.isValidElement(dn)?dn:(0,Bt.jsx)(Qa,{prefix:Qe,style:(ne==null?void 0:ne.padding)===0||(ne==null?void 0:ne.padding)==="0px"?{padding:24}:void 0}),Xc=jv&&Fc===void 0&&(Fd?Fd({collapsed:Yc}):(0,Bt.jsx)(As,{rotate:Yc?void 0:90,className:"".concat(Qe,"-collapsible-icon ").concat(yi).trim()}));return $d((0,Bt.jsxs)("div",(0,at.Z)((0,at.Z)({className:Hv,style:jt,ref:F,onClick:function(Hn){var cr;Pu==null||Pu(Hn),Ls==null||(cr=Ls.onClick)===null||cr===void 0||cr.call(Ls,Hn)}},(0,vu.Z)(Ls,["prefixCls","colSpan"])),{},{children:[(ae||Le||Xc)&&(0,Bt.jsxs)("div",{className:bt()("".concat(Qe,"-header"),yi,(0,tt.Z)((0,tt.Z)({},"".concat(Qe,"-header-border"),Ui||Gc==="inner"),"".concat(Qe,"-header-collapsible"),Xc)),style:ve,onClick:function(){Xc&&Fv(!Yc)},children:[(0,Bt.jsxs)("div",{className:"".concat(Qe,"-title ").concat(yi).trim(),children:[Xc,(0,Bt.jsx)(kc.G,{label:ae,tooltip:Li,subTitle:me})]}),Le&&(0,Bt.jsx)("div",{className:"".concat(Qe,"-extra ").concat(yi).trim(),onClick:function(Hn){return Hn.stopPropagation()},children:Le})]}),ao?(0,Bt.jsx)("div",{className:"".concat(Qe,"-tabs ").concat(yi).trim(),children:(0,Bt.jsx)(Lc.Z,(0,at.Z)((0,at.Z)({onChange:ao.onChange},ao),{},{items:zv,children:dn?Ud:no}))}):(0,Bt.jsx)("div",{className:Ns,style:$v,children:dn?Ud:Yv}),ro?(0,Bt.jsx)(bu,{actions:ro,prefixCls:Qe}):null]})))}),Z=q,H=function(F){var rt=F.componentCls;return(0,tt.Z)({},rt,{"&-divider":{flex:"none",width:F.lineWidth,marginInline:F.marginXS,marginBlock:F.marginLG,backgroundColor:F.colorSplit,"&-horizontal":{width:"initial",height:F.lineWidth,marginInline:F.marginLG,marginBlock:F.marginXS}},"&&-size-small &-divider":{marginBlock:F.marginLG,marginInline:F.marginXS,"&-horizontal":{marginBlock:F.marginXS,marginInline:F.marginLG}}})};function $(X){return(0,pi.Xj)("ProCardDivider",function(F){var rt=(0,at.Z)((0,at.Z)({},F),{},{componentCls:".".concat(X)});return[H(rt)]})}var K=function(F){var rt=(0,gt.useContext)(xe.ZP.ConfigContext),st=rt.getPrefixCls,jt=st("pro-card"),ne="".concat(jt,"-divider"),ve=$(jt),ae=ve.wrapSSR,me=ve.hashId,Le=F.className,Ne=F.style,ce=Ne===void 0?{}:Ne,Oe=F.type,dn=bt()(ne,Le,me,(0,tt.Z)({},"".concat(ne,"-").concat(Oe),Oe));return ae((0,Bt.jsx)("div",{className:dn,style:ce}))},Q=K,St=function(F){return(0,tt.Z)({},F.componentCls,{display:"flex",flexDirection:"column",justifyContent:"flex-end",marginBlock:F.marginLG,marginInline:0,color:F.colorText,fontWeight:"500",fontSize:"20px",lineHeight:"38px"})};function Mt(X){return(0,pi.Xj)("ProCardOperation",function(F){var rt=(0,at.Z)((0,at.Z)({},F),{},{componentCls:".".concat(X)});return[St(rt)]})}var Ht=function(F){var rt=F.className,st=F.style,jt=st===void 0?{}:st,ne=F.children,ve=(0,gt.useContext)(xe.ZP.ConfigContext),ae=ve.getPrefixCls,me=ae("pro-card-operation"),Le=Mt(me),Ne=Le.wrapSSR,ce=Le.hashId,Oe=bt()(me,rt,ce);return Ne((0,Bt.jsx)("div",{className:Oe,style:jt,children:ne}))},_t=Ht,Dt=J(36688),It=function(F,rt){return gt.createElement(Hi,(0,zt.Z)({},F,{ref:rt,icon:Dt.Z}))},xt=gt.forwardRef(It),Zt=xt,Wt=J(83062),Kt=J(40411),Rt=J(57838),Xt=J(96159),_e=J(64217),Br=J(53124),Yr=J(99559),Fr=X=>{const{value:F,formatter:rt,precision:st,decimalSeparator:jt,groupSeparator:ne="",prefixCls:ve}=X;let ae;if(typeof rt=="function")ae=rt(F);else{const me=String(F),Le=me.match(/^(-?)(\d*)(\.(\d+))?$/);if(!Le||me==="-")ae=me;else{const Ne=Le[1];let ce=Le[2]||"0",Oe=Le[4]||"";ce=ce.replace(/\B(?=(\d{3})+(?!\d))/g,ne),typeof st=="number"&&(Oe=Oe.padEnd(st,"0").slice(0,st>0?st:0)),Oe&&(Oe=`${jt}${Oe}`),ae=[gt.createElement("span",{key:"int",className:`${ve}-content-value-int`},Ne,ce),Oe&&gt.createElement("span",{key:"decimal",className:`${ve}-content-value-decimal`},Oe)]}}return gt.createElement("span",{className:`${ve}-content-value`},ae)},ii=J(14747),An=J(91945),gn=J(45503);const Ci=X=>{const{componentCls:F,marginXXS:rt,padding:st,colorTextDescription:jt,titleFontSize:ne,colorTextHeading:ve,contentFontSize:ae,fontFamily:me}=X;return{[`${F}`]:Object.assign(Object.assign({},(0,ii.Wf)(X)),{[`${F}-title`]:{marginBottom:rt,color:jt,fontSize:ne},[`${F}-skeleton`]:{paddingTop:st},[`${F}-content`]:{color:ve,fontSize:ae,fontFamily:me,[`${F}-content-value`]:{display:"inline-block",direction:"ltr"},[`${F}-content-prefix, ${F}-content-suffix`]:{display:"inline-block"},[`${F}-content-prefix`]:{marginInlineEnd:rt},[`${F}-content-suffix`]:{marginInlineStart:rt}}})}},Rc=X=>{const{fontSizeHeading3:F,fontSize:rt}=X;return{titleFontSize:rt,contentFontSize:F}};var Ja=(0,An.I$)("Statistic",X=>{const F=(0,gn.TS)(X,{});return[Ci(F)]},Rc),ki=function(X,F){var rt={};for(var st in X)Object.prototype.hasOwnProperty.call(X,st)&&F.indexOf(st)<0&&(rt[st]=X[st]);if(X!=null&&typeof Object.getOwnPropertySymbols=="function")for(var jt=0,st=Object.getOwnPropertySymbols(X);jt<st.length;jt++)F.indexOf(st[jt])<0&&Object.prototype.propertyIsEnumerable.call(X,st[jt])&&(rt[st[jt]]=X[st[jt]]);return rt},ha=X=>{const{prefixCls:F,className:rt,rootClassName:st,style:jt,valueStyle:ne,value:ve=0,title:ae,valueRender:me,prefix:Le,suffix:Ne,loading:ce=!1,formatter:Oe,precision:dn,decimalSeparator:Or=".",groupSeparator:ai=",",onMouseEnter:Li,onMouseLeave:yn}=X,Hr=ki(X,["prefixCls","className","rootClassName","style","valueStyle","value","title","valueRender","prefix","suffix","loading","formatter","precision","decimalSeparator","groupSeparator","onMouseEnter","onMouseLeave"]),{getPrefixCls:Ui,direction:gr,statistic:gi}=gt.useContext(Br.E_),$r=Ui("statistic",F),[Ts,no,jo]=Ja($r),ro=gt.createElement(Fr,{decimalSeparator:Or,groupSeparator:ai,prefixCls:$r,formatter:Oe,precision:dn,value:ve}),io=bt()($r,{[`${$r}-rtl`]:gr==="rtl"},gi==null?void 0:gi.className,rt,st,no,jo),Cs=(0,_e.Z)(Hr,{aria:!0,data:!0});return Ts(gt.createElement("div",Object.assign({},Cs,{className:io,style:Object.assign(Object.assign({},gi==null?void 0:gi.style),jt),onMouseEnter:Li,onMouseLeave:yn}),ae&&gt.createElement("div",{className:`${$r}-title`},ae),gt.createElement(Yr.Z,{paragraph:!1,loading:ce,className:`${$r}-skeleton`},gt.createElement("div",{style:ne,className:`${$r}-content`},Le&&gt.createElement("span",{className:`${$r}-content-prefix`},Le),me?me(ro):ro,Ne&&gt.createElement("span",{className:`${$r}-content-suffix`},Ne)))))};const to=[["Y",1e3*60*60*24*365],["M",1e3*60*60*24*30],["D",1e3*60*60*24],["H",1e3*60*60],["m",1e3*60],["s",1e3],["S",1]];function $i(X,F){let rt=X;const st=/\[[^\]]*]/g,jt=(F.match(st)||[]).map(me=>me.slice(1,-1)),ne=F.replace(st,"[]"),ve=to.reduce((me,Le)=>{let[Ne,ce]=Le;if(me.includes(Ne)){const Oe=Math.floor(rt/ce);return rt-=Oe*ce,me.replace(new RegExp(`${Ne}+`,"g"),dn=>{const Or=dn.length;return Oe.toString().padStart(Or,"0")})}return me},ne);let ae=0;return ve.replace(st,()=>{const me=jt[ae];return ae+=1,me})}function Vi(X,F){const{format:rt=""}=F,st=new Date(X).getTime(),jt=Date.now(),ne=Math.max(st-jt,0);return $i(ne,rt)}var Sv=function(X,F){var rt={};for(var st in X)Object.prototype.hasOwnProperty.call(X,st)&&F.indexOf(st)<0&&(rt[st]=X[st]);if(X!=null&&typeof Object.getOwnPropertySymbols=="function")for(var jt=0,st=Object.getOwnPropertySymbols(X);jt<st.length;jt++)F.indexOf(st[jt])<0&&Object.prototype.propertyIsEnumerable.call(X,st[jt])&&(rt[st[jt]]=X[st[jt]]);return rt};const Mv=1e3/30;function Ev(X){return new Date(X).getTime()}const Pv=X=>{const{value:F,format:rt="HH:mm:ss",onChange:st,onFinish:jt}=X,ne=Sv(X,["value","format","onChange","onFinish"]),ve=(0,Rt.Z)(),ae=gt.useRef(null),me=()=>{jt==null||jt(),ae.current&&(clearInterval(ae.current),ae.current=null)},Le=()=>{const Oe=Ev(F);Oe>=Date.now()&&(ae.current=setInterval(()=>{ve(),st==null||st(Oe-Date.now()),Oe<Date.now()&&me()},Mv))};gt.useEffect(()=>(Le(),()=>{ae.current&&(clearInterval(ae.current),ae.current=null)}),[F]);const Ne=(Oe,dn)=>Vi(Oe,Object.assign(Object.assign({},dn),{format:rt})),ce=Oe=>(0,Xt.Tm)(Oe,{title:void 0});return gt.createElement(ha,Object.assign({},ne,{value:F,valueRender:ce,formatter:Ne}))};var Av=gt.memo(Pv);ha.Countdown=Av;var Tv=ha,Cv=function(F){return(0,tt.Z)({},F.componentCls,(0,tt.Z)((0,tt.Z)((0,tt.Z)((0,tt.Z)((0,tt.Z)({display:"flex",fontSize:F.fontSize,"& + &":{marginBlockStart:4},"&-tip":{marginInlineStart:4},"&-wrapper":(0,tt.Z)({display:"flex",width:"100%"},"".concat(F.componentCls,"-status"),{width:"14px"}),"&-icon":{marginInlineEnd:16},"&-trend-icon":{width:0,height:0,borderInlineEnd:"3.5px solid transparent",borderBlockEnd:"9px solid #000",borderInlineStart:"3.5px solid transparent","&-up":{transform:"rotate(0deg)"},"&-down":{transform:"rotate(180deg)"}},"&-content":(0,tt.Z)({width:"100%"},"".concat(F.antCls,"-statistic-content"),{"&-value-int":{fontSize:F.fontSizeHeading3}}),"&-description":{width:"100%"}},"".concat(F.antCls,"-statistic-title"),{color:F.colorText}),"&-trend-up",(0,tt.Z)({},"".concat(F.antCls,"-statistic-content"),(0,tt.Z)({color:"#f5222d"},"".concat(F.componentCls,"-trend-icon"),{borderBlockEndColor:"#f5222d"}))),"&-trend-down",(0,tt.Z)({},"".concat(F.antCls,"-statistic-content"),(0,tt.Z)({color:"#389e0d"},"".concat(F.componentCls,"-trend-icon"),{borderBlockEndColor:"#52c41a"}))),"& &-layout-horizontal",(0,tt.Z)((0,tt.Z)((0,tt.Z)({display:"flex",justifyContent:"space-between"},"".concat(F.antCls,"-statistic-title"),{marginBlockEnd:0}),"".concat(F.antCls,"-statistic-content-value"),{fontWeight:500}),"".concat(F.antCls,"-statistic-title,").concat(F.antCls,"-statistic-content,").concat(F.antCls,"-statistic-content-suffix,").concat(F.antCls,"-statistic-content-prefix,").concat(F.antCls,"-statistic-content-value-decimal"),{fontSize:F.fontSize})),"& &-layout-inline",(0,tt.Z)((0,tt.Z)((0,tt.Z)({display:"inline-flex",color:F.colorTextSecondary},"".concat(F.antCls,"-statistic-title"),{marginInlineEnd:"6px",marginBlockEnd:0}),"".concat(F.antCls,"-statistic-content"),{color:F.colorTextSecondary}),"".concat(F.antCls,"-statistic-title,").concat(F.antCls,"-statistic-content,").concat(F.antCls,"-statistic-content-suffix,").concat(F.antCls,"-statistic-content-prefix,").concat(F.antCls,"-statistic-content-value-decimal"),{fontSize:F.fontSizeSM})))};function Lo(X){return(0,pi.Xj)("Statistic",function(F){var rt=(0,at.Z)((0,at.Z)({},F),{},{componentCls:".".concat(X)});return[Cv(rt)]})}var Dc=["className","layout","style","description","children","title","tip","status","trend","prefix","icon"],kv=function(F){var rt=F.className,st=F.layout,jt=st===void 0?"inline":st,ne=F.style,ve=F.description,ae=F.children,me=F.title,Le=F.tip,Ne=F.status,ce=F.trend,Oe=F.prefix,dn=F.icon,Or=(0,Qt.Z)(F,Dc),ai=(0,gt.useContext)(xe.ZP.ConfigContext),Li=ai.getPrefixCls,yn=Li("pro-card-statistic"),Hr=Lo(yn),Ui=Hr.wrapSSR,gr=Hr.hashId,gi=bt()(yn,rt,gr),$r=bt()("".concat(yn,"-status"),gr),Ts=bt()("".concat(yn,"-icon"),gr),no=bt()("".concat(yn,"-wrapper"),gr),jo=bt()("".concat(yn,"-content"),gr),ro=bt()(gr,(0,tt.Z)((0,tt.Z)({},"".concat(yn,"-layout-").concat(jt),jt),"".concat(yn,"-trend-").concat(ce),ce)),io=Le&&(0,Bt.jsx)(Wt.Z,{title:Le,children:(0,Bt.jsx)(Zt,{className:"".concat(yn,"-tip ").concat(gr).trim()})}),Cs=bt()("".concat(yn,"-trend-icon"),gr,(0,tt.Z)({},"".concat(yn,"-trend-icon-").concat(ce),ce)),ks=ce&&(0,Bt.jsx)("div",{className:Cs}),Eu=Ne&&(0,Bt.jsx)("div",{className:$r,children:(0,Bt.jsx)(Kt.Z,{status:Ne,text:null})}),Bc=dn&&(0,Bt.jsx)("div",{className:Ts,children:dn});return Ui((0,Bt.jsxs)("div",{className:gi,style:ne,children:[Bc,(0,Bt.jsxs)("div",{className:no,children:[Eu,(0,Bt.jsxs)("div",{className:jo,children:[(0,Bt.jsx)(Tv,(0,at.Z)({title:(me||io)&&(0,Bt.jsxs)(Bt.Fragment,{children:[me,io]}),prefix:(ks||Oe)&&(0,Bt.jsxs)(Bt.Fragment,{children:[ks,Oe]}),className:ro},Or)),ve&&(0,Bt.jsx)("div",{className:"".concat(yn,"-description ").concat(gr).trim(),children:ve})]})]})]}))},Dd=kv,Lv=function(F){return(0,tt.Z)({},F.componentCls,{"&-chart":{display:"flex",flexDirection:"column",marginBlockStart:8,marginBlockEnd:8,"&-left":{marginBlockStart:0,marginInlineEnd:"16px"},"&-right":{marginBlockStart:0,marginInlineStart:"16px"}},"&-content":{display:"flex",flexDirection:"column","&-horizontal":(0,tt.Z)({flexDirection:"row"},"".concat(F.componentCls,"-chart"),{alignItems:"center",alignSelf:"flex-start"})},"&-footer":{marginBlockStart:8,paddingBlockStart:"16px",borderBlockStart:"rgba(0, 0, 0, 0.08) solid ".concat(F.colorBorder)}})};function No(X){return(0,pi.Xj)("StatisticCard",function(F){var rt=(0,at.Z)((0,at.Z)({},F),{},{componentCls:".".concat(X)});return[Lv(rt)]})}var Io=["children","statistic","className","chart","chartPlacement","footer"],eo=function(F){var rt=F.children,st=F.statistic,jt=F.className,ne=F.chart,ve=F.chartPlacement,ae=F.footer,me=(0,Qt.Z)(F,Io),Le=(0,gt.useContext)(xe.ZP.ConfigContext),Ne=Le.getPrefixCls,ce=Ne("pro-statistic-card"),Oe=No(ce),dn=Oe.wrapSSR,Or=Oe.hashId,ai=bt()(ce,jt,Or),Li=st&&(0,Bt.jsx)(Dd,(0,at.Z)({layout:"vertical"},st)),yn=bt()("".concat(ce,"-chart"),Or,(0,tt.Z)((0,tt.Z)({},"".concat(ce,"-chart-left"),ve==="left"&&ne&&st),"".concat(ce,"-chart-right"),ve==="right"&&ne&&st)),Hr=ne&&(0,Bt.jsx)("div",{className:yn,children:ne}),Ui=bt()("".concat(ce,"-content "),Or,(0,tt.Z)({},"".concat(ce,"-content-horizontal"),ve==="left"||ve==="right")),gr=(Hr||Li)&&(ve==="left"?(0,Bt.jsxs)("div",{className:Ui,children:[Hr,Li]}):(0,Bt.jsxs)("div",{className:Ui,children:[Li,Hr]})),gi=ae&&(0,Bt.jsx)("div",{className:"".concat(ce,"-footer ").concat(Or).trim(),children:ae});return dn((0,Bt.jsxs)(Z,(0,at.Z)((0,at.Z)({className:ai},me),{},{children:[gr,rt,gi]})))},Nv=function(F){return(0,Bt.jsx)(eo,(0,at.Z)({bodyStyle:{padding:0}},F))};eo.Statistic=Dd,eo.Divider=Q,eo.Operation=_t,eo.isProCard=!0,eo.Group=Nv;var Iv=eo},34540:function(Fe,Wn,J){"use strict";var tt=J(1413),at=J(91),Qt=J(86190),xe=J(67294),$t=J(66758),bt=J(26440),gt=J(85893),Pt=["fieldProps","proFieldProps"],et="dateRange",zt=xe.forwardRef(function(Et,Nt){var Tt=Et.fieldProps,vt=Et.proFieldProps,ft=(0,at.Z)(Et,Pt),lt=(0,xe.useContext)($t.Z);return(0,gt.jsx)(bt.Z,(0,tt.Z)({ref:Nt,fieldProps:(0,tt.Z)({getPopupContainer:lt.getPopupContainer},Tt),valueType:et,proFieldProps:vt,filedConfig:{valueType:et,customLightMode:!0,lightFilterLabelFormatter:function(qt){return(0,Qt.c)(qt,(Tt==null?void 0:Tt.format)||"YYYY-MM-DD")}}},ft))});Wn.Z=zt},64317:function(Fe,Wn,J){"use strict";var tt=J(1413),at=J(91),Qt=J(22270),xe=J(67294),$t=J(66758),bt=J(26440),gt=J(85893),Pt=["fieldProps","children","params","proFieldProps","mode","valueEnum","request","showSearch","options"],et=["fieldProps","children","params","proFieldProps","mode","valueEnum","request","options"],zt=function(lt,mt){var qt=lt.fieldProps,le=lt.children,Ue=lt.params,je=lt.proFieldProps,ze=lt.mode,He=lt.valueEnum,Ae=lt.request,nn=lt.showSearch,Ke=lt.options,ee=(0,at.Z)(lt,Pt),Jt=(0,xe.useContext)($t.Z);return(0,gt.jsx)(bt.Z,(0,tt.Z)((0,tt.Z)({valueEnum:(0,Qt.h)(He),request:Ae,params:Ue,valueType:"select",filedConfig:{customLightMode:!0},fieldProps:(0,tt.Z)({options:Ke,mode:ze,showSearch:nn,getPopupContainer:Jt.getPopupContainer},qt),ref:mt,proFieldProps:je},ee),{},{children:le}))},Et=xe.forwardRef(function(ft,lt){var mt=ft.fieldProps,qt=ft.children,le=ft.params,Ue=ft.proFieldProps,je=ft.mode,ze=ft.valueEnum,He=ft.request,Ae=ft.options,nn=(0,at.Z)(ft,et),Ke=(0,tt.Z)({options:Ae,mode:je||"multiple",labelInValue:!0,showSearch:!0,suffixIcon:null,autoClearSearchValue:!0,optionLabelProp:"label"},mt),ee=(0,xe.useContext)($t.Z);return(0,gt.jsx)(bt.Z,(0,tt.Z)((0,tt.Z)({valueEnum:(0,Qt.h)(ze),request:He,params:le,valueType:"select",filedConfig:{customLightMode:!0},fieldProps:(0,tt.Z)({getPopupContainer:ee.getPopupContainer},Ke),ref:lt,proFieldProps:Ue},nn),{},{children:qt}))}),Nt=xe.forwardRef(zt),Tt=Et,vt=Nt;vt.SearchSelect=Tt,vt.displayName="ProFormComponent",Wn.Z=vt},17816:function(Fe,Wn){(function(J,tt){tt(Wn)})(this,function(J){"use strict";function tt(k){var I=typeof Symbol=="function"&&Symbol.iterator,z=I&&k[I],W=0;if(z)return z.call(k);if(k&&typeof k.length=="number")return{next:function(){return{value:(k=k&&W>=k.length?void 0:k)&&k[W++],done:!k}}};throw new TypeError(I?"Object is not iterable.":"Symbol.iterator is not defined.")}function at(k,I){var z=typeof Symbol=="function"&&k[Symbol.iterator];if(!z)return k;var W,q,Z=z.call(k),H=[];try{for(;(I===void 0||0<I--)&&!(W=Z.next()).done;)H.push(W.value)}catch($){q={error:$}}finally{try{W&&!W.done&&(z=Z.return)&&z.call(Z)}finally{if(q)throw q.error}}return H}function Qt(k,I,z){if(z||arguments.length===2)for(var W,q=0,Z=I.length;q<Z;q++)!W&&q in I||((W=W||Array.prototype.slice.call(I,0,q))[q]=I[q]);return k.concat(W||Array.prototype.slice.call(I))}function xe(k){return bt(k,"Function")}var $t={}.toString,bt=function(k,I){return $t.call(k)==="[object "+I+"]"},gt=function(k){return Array.isArray?Array.isArray(k):bt(k,"Array")},Pt=function(k){if(typeof(I=k)!="object"||I===null||!bt(k,"Object"))return!1;var I;if(Object.getPrototypeOf(k)===null)return!0;for(var z=k;Object.getPrototypeOf(z)!==null;)z=Object.getPrototypeOf(z);return Object.getPrototypeOf(k)===z},et=function(k){return bt(k,"Number")},zt=Object.values?function(k){return Object.values(k)}:function(k){var I,z=[],W=k,q=function(K,Q){xe(k)&&Q==="prototype"||z.push(K)};if(W){if(gt(W))for(var Z=0,H=W.length;Z<H&&q(W[Z],Z)!==!1;Z++);else if(I=typeof W,W!==null&&I=="object"||I=="function"){for(var $ in W)if(W.hasOwnProperty($)&&q(W[$],$)===!1)break}}return z},Et=5;function Nt(k){for(var I=[],z=1;z<arguments.length;z++)I[z-1]=arguments[z];for(var W=0;W<I.length;W+=1)(function q(Z,H,$,K){for(var Q in $=$||0,K=K||Et,H){var St;H.hasOwnProperty(Q)&&((St=H[Q])!==null&&Pt(St)?(Pt(Z[Q])||(Z[Q]={}),$<K?q(Z[Q],St,$+1,K):Z[Q]=H[Q]):gt(St)?(Z[Q]=[],Z[Q]=Z[Q].concat(St)):St!==void 0&&(Z[Q]=St))}})(k,I[W]);return k}function Tt(k){return k}(function(k,I){var z;if(xe(k))return(z=function(){for(var W=[],q=0;q<arguments.length;q++)W[q]=arguments[q];var Z,H=I?I.apply(this,W):W[0],$=z.cache;return $.has(H)?$.get(H):(Z=k.apply(this,W),$.set(H,Z),Z)}).cache=new Map;throw new TypeError("Expected a function")})(function(k,H){var z=(H=H===void 0?{}:H).fontSize,W=H.fontFamily,q=H.fontWeight,Z=H.fontStyle,H=H.fontVariant;return(vt=vt||document.createElement("canvas").getContext("2d")).font=[Z,H,q,z+"px",W].join(" "),vt.measureText(bt(k,"String")?k:"").width},function(k,I){return function(){for(var z=0,W=0,q=arguments.length;W<q;W++)z+=arguments[W].length;for(var Z=Array(z),H=0,W=0;W<q;W++)for(var $=arguments[W],K=0,Q=$.length;K<Q;K++,H++)Z[H]=$[K];return Z}([k],zt(I=I===void 0?{}:I)).join("")});var vt,ft=typeof Float32Array!="undefined"?Float32Array:Array;function lt(){var k=new ft(9);return ft!=Float32Array&&(k[1]=0,k[2]=0,k[3]=0,k[5]=0,k[6]=0,k[7]=0),k[0]=1,k[4]=1,k[8]=1,k}Math.hypot||(Math.hypot=function(){for(var k=0,I=arguments.length;I--;)k+=arguments[I]*arguments[I];return Math.sqrt(k)});var mt=function(k,Mt,Rt){var W=Mt[0],q=Mt[1],Z=Mt[2],H=Mt[3],$=Mt[4],K=Mt[5],Q=Mt[6],St=Mt[7],Mt=Mt[8],Ht=Rt[0],_t=Rt[1],Dt=Rt[2],It=Rt[3],xt=Rt[4],Zt=Rt[5],Wt=Rt[6],Kt=Rt[7],Rt=Rt[8];return k[0]=Ht*W+_t*H+Dt*Q,k[1]=Ht*q+_t*$+Dt*St,k[2]=Ht*Z+_t*K+Dt*Mt,k[3]=It*W+xt*H+Zt*Q,k[4]=It*q+xt*$+Zt*St,k[5]=It*Z+xt*K+Zt*Mt,k[6]=Wt*W+Kt*H+Rt*Q,k[7]=Wt*q+Kt*$+Rt*St,k[8]=Wt*Z+Kt*K+Rt*Mt,k};function qt(){var k=new ft(16);return ft!=Float32Array&&(k[1]=0,k[2]=0,k[3]=0,k[4]=0,k[6]=0,k[7]=0,k[8]=0,k[9]=0,k[11]=0,k[12]=0,k[13]=0,k[14]=0),k[0]=1,k[5]=1,k[10]=1,k[15]=1,k}var le=function(k,Wt,z){var W=Wt[0],q=Wt[1],Z=Wt[2],H=Wt[3],$=Wt[4],K=Wt[5],Q=Wt[6],St=Wt[7],Mt=Wt[8],Ht=Wt[9],_t=Wt[10],Dt=Wt[11],It=Wt[12],xt=Wt[13],Zt=Wt[14],Wt=Wt[15],Kt=z[0],Rt=z[1],Xt=z[2],_e=z[3];return k[0]=Kt*W+Rt*$+Xt*Mt+_e*It,k[1]=Kt*q+Rt*K+Xt*Ht+_e*xt,k[2]=Kt*Z+Rt*Q+Xt*_t+_e*Zt,k[3]=Kt*H+Rt*St+Xt*Dt+_e*Wt,Kt=z[4],Rt=z[5],Xt=z[6],_e=z[7],k[4]=Kt*W+Rt*$+Xt*Mt+_e*It,k[5]=Kt*q+Rt*K+Xt*Ht+_e*xt,k[6]=Kt*Z+Rt*Q+Xt*_t+_e*Zt,k[7]=Kt*H+Rt*St+Xt*Dt+_e*Wt,Kt=z[8],Rt=z[9],Xt=z[10],_e=z[11],k[8]=Kt*W+Rt*$+Xt*Mt+_e*It,k[9]=Kt*q+Rt*K+Xt*Ht+_e*xt,k[10]=Kt*Z+Rt*Q+Xt*_t+_e*Zt,k[11]=Kt*H+Rt*St+Xt*Dt+_e*Wt,Kt=z[12],Rt=z[13],Xt=z[14],_e=z[15],k[12]=Kt*W+Rt*$+Xt*Mt+_e*It,k[13]=Kt*q+Rt*K+Xt*Ht+_e*xt,k[14]=Kt*Z+Rt*Q+Xt*_t+_e*Zt,k[15]=Kt*H+Rt*St+Xt*Dt+_e*Wt,k};function Ue(k){for(var I=[],z=1;z<arguments.length;z++)I[z-1]=arguments[z];return k?I.reduce(function(W,q){return function(Z){return q(W(Z))}},k):Tt}function je(k){return k instanceof Float32Array||k instanceof Array}function ze(k,I,z){for(;k<I;)k+=2*Math.PI;for(;z<k;)k-=2*Math.PI;return k}sr=new ft(3),ft!=Float32Array&&(sr[0]=0,sr[1]=0,sr[2]=0),sr=new ft(4),ft!=Float32Array&&(sr[0]=0,sr[1]=0,sr[2]=0,sr[3]=0);function He(H,I,z,W,q){var Z=(H=at(H,2))[0],H=H[1],$=lt();return Z=[Z,H],(H=$)[0]=1,H[1]=0,H[2]=0,H[3]=0,H[4]=1,H[5]=0,H[6]=Z[0],H[7]=Z[1],H[8]=1,H}function Ae(k,...I){return I.reduce((z,W)=>q=>z(W(q)),k)}function nn(k,I){return I-k?z=>(z-k)/(I-k):z=>.5}const Ke=Math.sqrt(50),ee=Math.sqrt(10),Jt=Math.sqrt(2);function Yn(k,I,z){return I=(I-k)/Math.max(0,z),k=Math.floor(Math.log(I)/Math.LN10),z=I/hr(10,k),0<=k?(z>=Ke?10:z>=ee?5:z>=Jt?2:1)*hr(10,k):-hr(10,-k)/(z>=Ke?10:z>=ee?5:z>=Jt?2:1)}const Xe=(k,I,z=5)=>{k=[k,I];let W=0,q=k.length-1,Z=k[W],H=k[q],$;return H<Z&&([Z,H]=[H,Z],[W,q]=[q,W]),0<($=Yn(Z,H,z))?(Z=Math.floor(Z/$)*$,H=Math.ceil(H/$)*$,$=Yn(Z,H,z)):$<0&&(Z=Math.ceil(Z*$)/$,H=Math.floor(H*$)/$,$=Yn(Z,H,z)),0<$?(k[W]=Math.floor(Z/$)*$,k[q]=Math.ceil(H/$)*$):$<0&&(k[W]=Math.ceil(Z*$)/$,k[q]=Math.floor(H*$)/$),k};function Pr(k){return k!=null&&!Number.isNaN(k)}function Rr(k,I){return z=>{z.prototype.rescale=function(){this.initRange(),this.nice();var[W]=this.chooseTransforms();this.composeOutput(W,this.chooseClamp(W))},z.prototype.initRange=function(){var W=this.options.interpolator;this.options.range=k(W)},z.prototype.composeOutput=function(W,q){var Z,{domain:$,interpolator:H,round:K}=this.getOptions(),$=I($.map(W)),K=K?(Z=H,Q=>(Q=Z(Q),et(Q)?Math.round(Q):Q)):H;this.output=Ae(K,$,q,W)},z.prototype.invert=void 0}}var pr,sr={exports:{}},Hi={exports:{}},Dr=function(k){return!(!k||typeof k=="string")&&(k instanceof Array||Array.isArray(k)||0<=k.length&&(k.splice instanceof Function||Object.getOwnPropertyDescriptor(k,k.length-1)&&k.constructor.name!=="String"))},Ti=Array.prototype.concat,Yi=Array.prototype.slice,ca=Hi.exports=function(k){for(var I=[],z=0,W=k.length;z<W;z++){var q=k[z];Dr(q)?I=Ti.call(I,Yi.call(q)):I.push(q)}return I},Jn=(ca.wrap=function(k){return function(){return k(ca(arguments))}},{aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}),ri=Hi.exports,ar=Object.hasOwnProperty,Ar=Object.create(null);for(pr in Jn)ar.call(Jn,pr)&&(Ar[Jn[pr]]=pr);var fn=sr.exports={to:{},get:{}};function la(k,I,z){return Math.min(Math.max(I,k),z)}function ua(k){return k=Math.round(k).toString(16).toUpperCase(),k.length<2?"0"+k:k}fn.get=function(k){var I,z;switch(k.substring(0,3).toLowerCase()){case"hsl":I=fn.get.hsl(k),z="hsl";break;case"hwb":I=fn.get.hwb(k),z="hwb";break;default:I=fn.get.rgb(k),z="rgb"}return I?{model:z,value:I}:null},fn.get.rgb=function(k){if(!k)return null;var I,z,W,q=[0,0,0,1];if(I=k.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(W=I[2],I=I[1],z=0;z<3;z++){var Z=2*z;q[z]=parseInt(I.slice(Z,2+Z),16)}W&&(q[3]=parseInt(W,16)/255)}else if(I=k.match(/^#([a-f0-9]{3,4})$/i)){for(W=(I=I[1])[3],z=0;z<3;z++)q[z]=parseInt(I[z]+I[z],16);W&&(q[3]=parseInt(W+W,16)/255)}else{if(I=k.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/))for(z=0;z<3;z++)q[z]=parseInt(I[z+1],0);else{if(!(I=k.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)))return(I=k.match(/^(\w+)$/))?I[1]==="transparent"?[0,0,0,0]:ar.call(Jn,I[1])?((q=Jn[I[1]])[3]=1,q):null:null;for(z=0;z<3;z++)q[z]=Math.round(2.55*parseFloat(I[z+1]))}I[4]&&(I[5]?q[3]=.01*parseFloat(I[4]):q[3]=parseFloat(I[4]))}for(z=0;z<3;z++)q[z]=la(q[z],0,255);return q[3]=la(q[3],0,1),q},fn.get.hsl=function(k){var I;return(k=k&&k.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/))?(I=parseFloat(k[4]),[(parseFloat(k[1])%360+360)%360,la(parseFloat(k[2]),0,100),la(parseFloat(k[3]),0,100),la(isNaN(I)?1:I,0,1)]):null},fn.get.hwb=function(k){var I;return(k=k&&k.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/))?(I=parseFloat(k[4]),[(parseFloat(k[1])%360+360)%360,la(parseFloat(k[2]),0,100),la(parseFloat(k[3]),0,100),la(isNaN(I)?1:I,0,1)]):null},fn.to.hex=function(){var k=ri(arguments);return"#"+ua(k[0])+ua(k[1])+ua(k[2])+(k[3]<1?ua(Math.round(255*k[3])):"")},fn.to.rgb=function(){var k=ri(arguments);return k.length<4||k[3]===1?"rgb("+Math.round(k[0])+", "+Math.round(k[1])+", "+Math.round(k[2])+")":"rgba("+Math.round(k[0])+", "+Math.round(k[1])+", "+Math.round(k[2])+", "+k[3]+")"},fn.to.rgb.percent=function(){var k=ri(arguments),I=Math.round(k[0]/255*100),z=Math.round(k[1]/255*100),W=Math.round(k[2]/255*100);return k.length<4||k[3]===1?"rgb("+I+"%, "+z+"%, "+W+"%)":"rgba("+I+"%, "+z+"%, "+W+"%, "+k[3]+")"},fn.to.hsl=function(){var k=ri(arguments);return k.length<4||k[3]===1?"hsl("+k[0]+", "+k[1]+"%, "+k[2]+"%)":"hsla("+k[0]+", "+k[1]+"%, "+k[2]+"%, "+k[3]+")"},fn.to.hwb=function(){var k=ri(arguments),I="";return 4<=k.length&&k[3]!==1&&(I=", "+k[3]),"hwb("+k[0]+", "+k[1]+"%, "+k[2]+"%"+I+")"},fn.to.keyword=function(k){return Ar[k.slice(0,3)]};var jd=sr.exports;function xs(k,I,z){let W=z;return W<0&&(W+=1),1<W&&--W,W<1/6?k+6*(I-k)*W:W<.5?I:W<2/3?k+(I-k)*(2/3-W)*6:k}function _s(q){var I,z,W,q=jd.get(q);return q?({model:q,value:I}=q,q==="rgb"?I:q==="hsl"?(I=(q=I)[0]/360,z=q[1]/100,W=q[2]/100,q=q[3],z==0?[255*W,255*W,255*W,q]:[255*xs(z=2*W-(W=W<.5?W*(1+z):W+z-W*z),W,I+1/3),255*xs(z,W,I),255*xs(z,W,I-1/3),q]):null):null}const fa=(k,I)=>z=>k*(1-z)+I*z,lu=(k,I)=>{if(typeof k=="number"&&typeof I=="number")return fa(k,I);if(typeof k!="string"||typeof I!="string")return()=>k;{var z=k,W=I;const q=_s(z),Z=_s(W);return q===null||Z===null?q?()=>z:()=>W:H=>{var $=new Array(4);for(let Dt=0;Dt<4;Dt+=1){var K=q[Dt],Q=Z[Dt];$[Dt]=K*(1-H)+Q*H}var[St,Mt,Ht,_t]=$;return`rgba(${Math.round(St)}, ${Math.round(Mt)}, ${Math.round(Ht)}, ${_t})`}}},Ac=(k,I)=>{const z=fa(k,I);return W=>Math.round(z(W))};function Tc({map:k,initKey:I},z){return I=I(z),k.has(I)?k.get(I):z}function uu(k){return typeof k=="object"?k.valueOf():k}class To extends Map{constructor(I){if(super(),this.map=new Map,this.initKey=uu,I!==null)for(var[z,W]of I)this.set(z,W)}get(I){return super.get(Tc({map:this.map,initKey:this.initKey},I))}has(I){return super.has(Tc({map:this.map,initKey:this.initKey},I))}set(I,z){return super.set(([{map:I,initKey:W},q]=[{map:this.map,initKey:this.initKey},I],W=W(q),I.has(W)?I.get(W):(I.set(W,q),q)),z);var W,q}delete(I){return super.delete(([{map:I,initKey:z},W]=[{map:this.map,initKey:this.initKey},I],z=z(W),I.has(z)&&(W=I.get(z),I.delete(z)),W));var z,W}}class Os{constructor(I){this.options=Nt({},this.getDefaultOptions()),this.update(I)}getOptions(){return this.options}update(I={}){this.options=Nt({},this.options,I),this.rescale(I)}rescale(I){}}const xr=Symbol("defaultUnknown");function ws(k,I,z){for(let W=0;W<I.length;W+=1)k.has(I[W])||k.set(z(I[W]),W)}function or(I){var{value:I,from:z,to:W,mapper:q,notFoundReturn:Z}=I;let H=q.get(I);if(H===void 0){if(Z!==xr)return Z;H=z.push(I)-1,q.set(I,H)}return W[H%W.length]}function fu(k){return k instanceof Date?I=>""+I:typeof k=="object"?I=>JSON.stringify(I):I=>I}class Ss extends Os{getDefaultOptions(){return{domain:[],range:[],unknown:xr}}constructor(I){super(I)}map(I){return this.domainIndexMap.size===0&&ws(this.domainIndexMap,this.getDomain(),this.domainKey),or({value:this.domainKey(I),mapper:this.domainIndexMap,from:this.getDomain(),to:this.getRange(),notFoundReturn:this.options.unknown})}invert(I){return this.rangeIndexMap.size===0&&ws(this.rangeIndexMap,this.getRange(),this.rangeKey),or({value:this.rangeKey(I),mapper:this.rangeIndexMap,from:this.getRange(),to:this.getDomain(),notFoundReturn:this.options.unknown})}rescale(I){var[z]=this.options.domain,[W]=this.options.range;this.domainKey=fu(z),this.rangeKey=fu(W),this.rangeIndexMap?(I&&!I.range||this.rangeIndexMap.clear(),I&&!I.domain&&!I.compare||(this.domainIndexMap.clear(),this.sortedDomain=void 0)):(this.rangeIndexMap=new Map,this.domainIndexMap=new Map)}clone(){return new Ss(this.options)}getRange(){return this.options.range}getDomain(){var I,z;return this.sortedDomain||({domain:I,compare:z}=this.options,this.sortedDomain=z?[...I].sort(z):I),this.sortedDomain}}function du(xt){const{domain:I,range:z,paddingOuter:W,paddingInner:q,flex:Z,round:H,align:$}=xt;var K=I.length,_t=0<(_t=(xt=K)-(Q=Z).length)?[...Q,...new Array(_t).fill(1)]:_t<0?Q.slice(0,xt):Q,[xt,Q]=z,Q=Q-xt,It=Q/(2/K*W+1-1/K*q);const St=It*q/K;It-=K*St;const Mt=function(Rt){const Xt=Math.min(...Rt);return Rt.map(_e=>_e/Xt)}(_t),Ht=It/Mt.reduce((Rt,Xt)=>Rt+Xt);var _t=new To(I.map((Rt,Xt)=>(Xt=Mt[Xt]*Ht,[Rt,H?Math.floor(Xt):Xt]))),Dt=new To(I.map((Rt,Xt)=>(Xt=Mt[Xt]*Ht+St,[Rt,H?Math.floor(Xt):Xt]))),It=Array.from(Dt.values()).reduce((Rt,Xt)=>Rt+Xt),xt=xt+(Q-(It-It/K*q))*$;let Zt=H?Math.round(xt):xt;var Wt=new Array(K);for(let Rt=0;Rt<K;Rt+=1){Wt[Rt]=(Kt=Zt,Math.round(1e12*Kt)/1e12);var Kt=I[Rt];Zt+=Dt.get(Kt)}return{valueBandWidth:_t,valueStep:Dt,adjustedRange:Wt}}class Ms extends Ss{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,paddingInner:0,paddingOuter:0,padding:0,unknown:xr,flex:[]}}constructor(I){super(I)}clone(){return new Ms(this.options)}getStep(I){return this.valueStep===void 0?1:typeof this.valueStep=="number"?this.valueStep:I===void 0?Array.from(this.valueStep.values())[0]:this.valueStep.get(I)}getBandWidth(I){return this.valueBandWidth===void 0?1:typeof this.valueBandWidth=="number"?this.valueBandWidth:I===void 0?Array.from(this.valueBandWidth.values())[0]:this.valueBandWidth.get(I)}getRange(){return this.adjustedRange}getPaddingInner(){var{padding:I,paddingInner:z}=this.options;return 0<I?I:z}getPaddingOuter(){var{padding:I,paddingOuter:z}=this.options;return 0<I?I:z}rescale(){super.rescale();var{align:W,domain:I,range:q,round:Z,flex:z}=this.options,{adjustedRange:W,valueBandWidth:q,valueStep:Z}=function(Q){var $=Q.domain;if(($=$.length)===0)return{valueBandWidth:void 0,valueStep:void 0,adjustedRange:[]};if(!((K=Q.flex)==null||!K.length))return du(Q);var{range:K,paddingOuter:Q,paddingInner:St,round:Mt,align:Ht}=Q;let _t,Dt,It=K[0];return K=K[1]-It,_t=K/Math.max(1,2*Q+($-St)),Mt&&(_t=Math.floor(_t)),It+=(K-_t*($-St))*Ht,Dt=_t*(1-St),Mt&&(It=Math.round(It),Dt=Math.round(Dt)),Q=new Array($).fill(0).map((xt,Zt)=>It+Zt*_t),{valueStep:_t,valueBandWidth:Dt,adjustedRange:Q}}({align:W,range:q,round:Z,flex:z,paddingInner:this.getPaddingInner(),paddingOuter:this.getPaddingOuter(),domain:I});this.valueStep=Z,this.valueBandWidth=q,this.adjustedRange=W}}const da=(k,I,z)=>{let W,q,Z=k,H=I;if(Z===H&&0<z)return[Z];let $=Yn(Z,H,z);if($===0||!Number.isFinite($))return[];if(0<$){Z=Math.ceil(Z/$),H=Math.floor(H/$),q=new Array(W=Math.ceil(H-Z+1));for(let K=0;K<W;K+=1)q[K]=(Z+K)*$}else{$=-$,Z=Math.ceil(Z*$),H=Math.floor(H*$),q=new Array(W=Math.ceil(H-Z+1));for(let K=0;K<W;K+=1)q[K]=(Z+K)/$}return q},Ma=(W,Z,z)=>{var[W,q]=W,[Z,H]=Z;let $,K;return Ae(K=W<q?($=nn(W,q),z(Z,H)):($=nn(q,W),z(H,Z)),$)},hu=(k,I,z)=>{const W=Math.min(k.length,I.length)-1,q=new Array(W),Z=new Array(W);var H=k[0]>k[W],$=H?[...k].reverse():k,K=H?[...I].reverse():I;for(let Q=0;Q<W;Q+=1)q[Q]=nn($[Q],$[Q+1]),Z[Q]=z(K[Q],K[Q+1]);return Q=>{var St=function(Ht,_t,Dt,It,xt){let Zt=Dt||0,Wt=It||Ht.length;for(var Kt=xt||(Xt=>Xt);Zt<Wt;){var Rt=Math.floor((Zt+Wt)/2);Kt(Ht[Rt])>_t?Wt=Rt:Zt=Rt+1}return Zt}(k,Q,1,W)-1,Mt=q[St];return Ae(Z[St],Mt)(Q)}},qa=(k,I,z,W)=>(2<Math.min(k.length,I.length)?hu:Ma)(k,I,W?Ac:z);class Re extends Os{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:fa,tickCount:5}}map(I){return Pr(I)?this.output(I):this.options.unknown}invert(I){return Pr(I)?this.input(I):this.options.unknown}nice(){var I,z,W,q;this.options.nice&&([I,z,W,...q]=this.getTickMethodOptions(),this.options.domain=this.chooseNice()(I,z,W,...q))}getTicks(){var I=this.options.tickMethod,[z,W,q,...Z]=this.getTickMethodOptions();return I(z,W,q,...Z)}getTickMethodOptions(){var{domain:I,tickCount:z}=this.options;return[I[0],I[I.length-1],z]}chooseNice(){return Xe}rescale(){this.nice();var[I,z]=this.chooseTransforms();this.composeOutput(I,this.chooseClamp(I)),this.composeInput(I,z,this.chooseClamp(z))}chooseClamp(W){var{clamp:z,range:q}=this.options,W=this.options.domain.map(W),q=Math.min(W.length,q.length);if(z){z=W[0],W=W[q-1];const Z=W<z?W:z,H=W<z?z:W;return $=>Math.min(Math.max(Z,$),H)}return Tt}composeOutput(I,z){var{domain:H,range:W,round:q,interpolate:Z}=this.options,H=qa(H.map(I),W,Z,q);this.output=Ae(H,z,I)}composeInput(I,z,W){var{domain:q,range:Z}=this.options,Z=qa(Z,q.map(I),fa);this.input=Ae(z,W,Z)}}class tr extends Re{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:lu,tickMethod:da,tickCount:5}}chooseTransforms(){return[Tt,Tt]}clone(){return new tr(this.options)}}class Es extends Ms{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,padding:0,unknown:xr,paddingInner:1,paddingOuter:0}}constructor(I){super(I)}getPaddingInner(){return 1}clone(){return new Es(this.options)}update(I){super.update(I)}getPaddingOuter(){return this.options.padding}}function Cc(k,I){for(var z=[],W=0,q=k.length;W<q;W++)z.push(k[W].substr(0,I));return z}var hi,Hi=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],sr=["January","February","March","April","May","June","July","August","September","October","November","December"],Ps=Cc(sr,3);(function(k){for(var I=[],z=1;z<arguments.length;z++)I[z-1]=arguments[z];for(var W=0,q=I;W<q.length;W++){var Z,H=q[W];for(Z in H)k[Z]=H[Z]}})({},{dayNamesShort:Cc(Hi,3),dayNames:Hi,monthNamesShort:Ps,monthNames:sr,amPm:["am","pm"],DoFn:function(k){return k+["th","st","nd","rd"][3<k%10?0:(k-k%10!=10?1:0)*k%10]}});var As;let kc=hi=class extends tr{getDefaultOptions(){return{domain:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:Tt,tickMethod:da,tickCount:5}}constructor(k){super(k)}clone(){return new hi(this.options)}};kc=hi=function(k,I,z,W){var q,Z=arguments.length,H=Z<3?I:W===null?W=Object.getOwnPropertyDescriptor(I,z):W;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")H=Reflect.decorate(k,I,z,W);else for(var $=k.length-1;0<=$;$--)(q=k[$])&&(H=(Z<3?q(H):3<Z?q(I,z,H):q(I,z))||H);return 3<Z&&H&&Object.defineProperty(I,z,H),H}([Rr(function(k){return[k(0),k(1)]},I=>{var[I,z]=I;return Ae(fa(0,1),nn(I,z))})],kc);let Lc=As=class extends tr{getDefaultOptions(){return{domain:[0,.5,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:Tt,tickMethod:da,tickCount:5}}constructor(k){super(k)}clone(){return new As(this.options)}};Lc=As=function(k,I,z,W){var q,Z=arguments.length,H=Z<3?I:W===null?W=Object.getOwnPropertyDescriptor(I,z):W;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")H=Reflect.decorate(k,I,z,W);else for(var $=k.length-1;0<=$;$--)(q=k[$])&&(H=(Z<3?q(H):3<Z?q(I,z,H):q(I,z))||H);return 3<Z&&H&&Object.defineProperty(I,z,H),H}([Rr(function(k){return[k(0),k(.5),k(1)]},k=>{const[I,z,W]=k,q=Ae(fa(0,.5),nn(I,z)),Z=Ae(fa(.5,1),nn(z,W));return H=>(I>W?H<z?Z:q:H<z?q:Z)(H)})],Lc);function pu(k,I,z,W,q){var Z=new tr({range:[I,I+W]}),H=new tr({range:[z,z+q]});return{transform:function(Q){var Q=at(Q,2),K=Q[0],Q=Q[1];return[Z.map(K),H.map(Q)]},untransform:function(Q){var Q=at(Q,2),K=Q[0],Q=Q[1];return[Z.invert(K),H.invert(Q)]}}}function vu(k,I,z,W,q){return(0,at(k,1)[0])(I,z,W,q)}function gu(k,I,z,W,q){return at(k,1)[0]}function pi(K,I,z,W,q){var Z=(K=at(K,4))[0],H=K[1],$=K[2],K=K[3],Q=new tr({range:[$,K]}),St=new tr({range:[Z,H]}),Mt=1<($=q/W)?1:$,Ht=1<$?1/$:1;return{transform:function(It){var It=at(It,2),Dt=It[0],It=It[1],Dt=St.map(Dt),It=Q.map(It);return[.5*(It*Math.cos(Dt)*Mt)+.5,.5*(It*Math.sin(Dt)*Ht)+.5]},untransform:function(xt){var xt=at(xt,2),Dt=xt[0],xt=xt[1],Dt=2*(Dt-.5)/Mt,xt=2*(xt-.5)/Ht,It=Math.sqrt(Math.pow(Dt,2)+Math.pow(xt,2)),xt=ze(Math.atan2(xt,Dt),Z,H);return[St.invert(xt),Q.invert(It)]}}}function yu(k,I,z,W,q){return{transform:function(H){var H=at(H,2),$=H[0];return[H[1],$]},untransform:function(H){var H=at(H,2),$=H[0];return[H[1],$]}}}function mu(k){for(var I=[],z=1;z<arguments.length;z++)I[z-1]=arguments[z];return ko.apply(void 0,Qt([[-1,-1]],at(I),!1))}function Bt(k){for(var I=[],z=1;z<arguments.length;z++)I[z-1]=arguments[z];return ko.apply(void 0,Qt([[-1,1]],at(I),!1))}function Co(k){for(var I=[],z=1;z<arguments.length;z++)I[z-1]=arguments[z];return ko.apply(void 0,Qt([[1,-1]],at(I),!1))}function bu(H,I,z,W,q){var Z,H=at(H,1)[0],$=lt();return $=$,H=H,Z=Math.sin(H),H=Math.cos(H),$[0]=H,$[1]=Z,$[2]=0,$[3]=-Z,$[4]=H,$[5]=0,$[6]=0,$[7]=0,$[8]=1,$}function Za(k,I,z,W,q){var Z=(k=at(k,4))[0],H=k[1],$=k[2],K=(k[3]-$)/(+H/(2*Math.PI)+1),Q=K/(2*Math.PI),St=new tr({range:[$,$+.99*K]}),Mt=new tr({range:[Z,H]}),Ht=1<(k=q/W)?1:k,_t=1<k?1/k:1;return{transform:function(xt){var xt=at(xt,2),It=xt[0],xt=xt[1],It=Mt.map(It),xt=St.map(xt);return[.5*(Math.cos(It)*(Q*It+xt)*Ht)+.5,.5*(Math.sin(It)*(Q*It+xt)*_t)+.5]},untransform:function(xt){var xt=at(xt,2),Zt=xt[0],xt=xt[1],Zt=2*(Zt-.5)/Ht,xt=2*(xt-.5)/_t,It=Math.sqrt(Math.pow(Zt,2)+Math.pow(xt,2)),xt=ze(Math.atan2(xt,Zt)+Math.floor(It/K)*Math.PI*2,Z,H),Zt=It-Q*xt;return[Mt.invert(xt),St.invert(Zt)]}}}function vi(K,I,z,W,q){var Z=(K=at(K,4))[0],H=K[1],$=K[2],K=K[3],Q=new tr({range:[$,K]});return{transform:function(St){for(var Mt=[],Ht=St.length,_t=new Es({domain:new Array(Ht).fill(0).map(function(Zt,Wt){return Wt}),range:[Z,H]}),Dt=0;Dt<Ht;Dt++){var xt=St[Dt],It=_t.map(Dt),xt=Q.map(xt);Mt.push(It,xt)}return Mt},untransform:function(St){for(var Mt=[],Ht=0;Ht<St.length;Ht+=2){var _t=St[Ht+1];Mt.push(Q.invert(_t))}return Mt}}}var ko=function(H,I,z,W,q){var H=at(H,2),Z=H[0],H=H[1],$=lt();return Z=[Z,H],(H=$)[0]=Z[0],H[1]=0,H[2]=0,H[3]=0,H[4]=Z[1],H[5]=0,H[6]=0,H[7]=0,H[8]=1,H};function Nc(k){return 1/Math.tan(k)}function xu(k,I,z,W,q){var Z=Nc(at(k,1)[0]);return{transform:function(K){var K=at(K,2),$=K[0],K=K[1];return[$+K*Z,K]},untransform:function(K){var K=at(K,2),$=K[0],K=K[1];return[$-K*Z,K]}}}function _u(k,I,z,W,q){var Z=Nc(at(k,1)[0]);return{transform:function($){var $=at($,2),K=$[0];return[K,$[1]+K*Z]},untransform:function($){var $=at($,2),K=$[0];return[K,$[1]-K*Z]}}}function Ka(k,I,z,$,H){var Z=k<I,H=(Z?I-$:H-I)||H-$,$=Z?-1:1;return $*H*(z+1)/(z+H/((k-I)*$))+I}function Qa(k,I,z,W,H){var Z=k<I,H=(Z?I-W:H-I)||H-W;return H/(H*(z+1)/(k-I)-z*(Z?-1:1))+I}function Ea(k,I,z){return z?new tr({range:[0,1],domain:[0,I]}).map(k):k}function Ic($,I,z,W,q){var Z=($=at($,3))[0],H=$[1],$=$[2],K=Ea(Z,W,$!==void 0&&$);return{transform:function(Mt){var Mt=at(Mt,2),St=Mt[0],Mt=Mt[1];return[Ka(St,K,H,0,1),Mt]},untransform:function(Mt){var Mt=at(Mt,2),St=Mt[0],Mt=Mt[1];return[Qa(St,K,H,0,1),Mt]}}}function Ou($,I,z,W,q){var Z=($=at($,3))[0],H=$[1],$=$[2],K=Ea(Z,q,$!==void 0&&$);return{transform:function(Q){return Q=at(Q,2),[Q[0],Ka(Q[1],K,H,0,1)]},untransform:function(Q){return Q=at(Q,2),[Q[0],Qa(Q[1],K,H,0,1)]}}}function wu(Q,I,z,W,q){var Z=(Q=at(Q,5))[0],H=Q[1],$=Q[2],K=Q[3],Q=Q[4],St=Ea(Z,W,Q=Q!==void 0&&Q),Mt=Ea(H,q,Q);return{transform:function(Dt){var Dt=at(Dt,2),_t=Dt[0],Dt=Dt[1];return[Ka(_t,St,$,0,1),Ka(Dt,Mt,K,0,1)]},untransform:function(Dt){var Dt=at(Dt,2),_t=Dt[0],Dt=Dt[1];return[Qa(_t,St,$,0,1),Qa(Dt,Mt,K,0,1)]}}}function Su(Q,I,z,W,q){var Z=(Q=at(Q,5))[0],H=Q[1],$=Q[2],K=Q[3],Q=(Q=Q[4])!==void 0&&Q,St=new tr({range:[0,W]}),Mt=new tr({range:[0,q]}),Ht=Q?Z:St.map(Z),_t=Q?H:Mt.map(H);return{transform:function(xt){var xt=at(xt,2),It=xt[0],xt=xt[1],Zt=St.map(It)-Ht,Wt=Mt.map(xt)-_t,Kt=Math.sqrt(Zt*Zt+Wt*Wt);return $<Kt?[It,xt]:(It=Ka(Kt,0,K,0,$),xt=Math.atan2(Wt,Zt),Kt=Ht+It*Math.cos(xt),Wt=_t+It*Math.sin(xt),[St.invert(Kt),Mt.invert(Wt)])},untransform:function(xt){var xt=at(xt,2),It=xt[0],xt=xt[1],Zt=St.map(It)-Ht,Wt=Mt.map(xt)-_t,Kt=Math.sqrt(Zt*Zt+Wt*Wt);return $<Kt?[It,xt]:(It=Qa(Kt,0,K,0,$),xt=Math.atan2(Wt,Zt),Kt=Ht+It*Math.cos(xt),Wt=_t+It*Math.sin(xt),[St.invert(Kt),Mt.invert(Wt)])}}}function Mu(k,I,z,W,q,Z,H){var $=new tr({range:[I,I+q]}),K=new tr({range:[z,z+Z]}),Q=new tr({range:[W,W+H]});return{transform:function(_t){var _t=at(_t,3),Mt=_t[0],Ht=_t[1],_t=_t[2];return[$.map(Mt),K.map(Ht),Q.map(_t)]},untransform:function(_t){var _t=at(_t,3),Mt=_t[0],Ht=_t[1],_t=_t[2];return[$.invert(Mt),K.invert(Ht),Q.invert(_t)]}}}function Rd(St,I,z,W,q,Z,H){var $,K=(St=at(St,3))[0],Q=St[1],St=St[2];return $=qt(),K=[K,Q,St],$[0]=1,$[1]=0,$[2]=0,$[3]=0,$[4]=0,$[5]=1,$[6]=0,$[7]=0,$[8]=0,$[9]=0,$[10]=1,$[11]=0,$[12]=K[0],$[13]=K[1],$[14]=K[2],$[15]=1,$}function Pa(k,I,z,W,q,Z,H){return{transform:function(K){var K=at(K,3),Q=K[0];return[K[1],Q,K[2]]},untransform:function(K){var K=at(K,3),Q=K[0];return[K[1],Q,K[2]]}}}function jc(St,I,z,W,q,Z,H){var $,K=(St=at(St,3))[0],Q=St[1],St=St[2];return $=qt(),K=[K,Q,St],$[0]=K[0],$[1]=0,$[2]=0,$[3]=0,$[4]=0,$[5]=K[1],$[6]=0,$[7]=0,$[8]=0,$[9]=0,$[10]=K[2],$[11]=0,$[12]=0,$[13]=0,$[14]=0,$[15]=1,$}Tr.prototype.update=function(k){this.options=Nt({},this.options,k),this.recoordinate()},Tr.prototype.clone=function(){return new Tr(this.options)},Tr.prototype.getOptions=function(){return this.options},Tr.prototype.clear=function(){this.update({transformations:[]})},Tr.prototype.getSize=function(){var k=this.options;return[k.width,k.height]},Tr.prototype.getCenter=function(){var k=this.options,I=k.x,z=k.y;return[(2*I+k.width)/2,(2*z+k.height)/2]},Tr.prototype.transform=function(){for(var k=[],I=0;I<arguments.length;I++)k[I]=arguments[I];var z=this.options.transformations;return this.update({transformations:Qt(Qt([],at(z),!1),[Qt([],at(k),!1)],!1)}),this},Tr.prototype.map=function(k){return this.output(k)},Tr.prototype.invert=function(k){return this.input(k)},Tr.prototype.recoordinate=function(){this.output=this.compose(),this.input=this.compose(!0)},Tr.prototype.compose=function(k){function I(Rt,Xt){var _e;$.push((Xt=Xt===void 0?!0:Xt)?(_e=Rt,function(Br){for(var Yr=[],Cr=0;Cr<Br.length-1;Cr+=2){var Fr=[Br[Cr],Br[Cr+1]],Fr=_e(Fr);Yr.push.apply(Yr,Qt([],at(Fr),!1))}return Yr}):Rt)}var z,W,q=(k=k===void 0?!1:k)?Qt([],at(this.options.transformations),!1).reverse():this.options.transformations,Z=k?function(Rt){return Rt.untransform}:function(Rt){return Rt.transform},H=[],$=[];try{for(var K=tt(q),Q=K.next();!Q.done;Q=K.next()){var St,Mt,Ht,_t,Dt,It,xt=at(Q.value),Zt=xt[0],Wt=xt.slice(1),Kt=this.transformers[Zt];Kt&&(Mt=(St=this.options).x,Ht=St.y,_t=St.width,Dt=St.height,je(It=Kt(Qt([],at(Wt),!1),Mt,Ht,_t,Dt))?H.push(It):(H.length&&(I(this.createMatrixTransform(H,k)),H.splice(0,H.length)),I(Z(It)||Tt,Zt!=="parallel")))}}catch(Rt){z={error:Rt}}finally{try{Q&&!Q.done&&(W=K.return)&&W.call(K)}finally{if(z)throw z.error}}return H.length&&I(this.createMatrixTransform(H,k)),Ue.apply(void 0,Qt([],at($),!1))},Tr.prototype.createMatrixTransform=function(k,I){var z,W,q,Z,H,$,K,Q,St,Mt,Ht,_t,Dt=lt();return I&&k.reverse(),k.forEach(function(It){return mt(Dt,Dt,It)}),I&&(I=k=Dt,(_t=new ft(9))[0]=I[0],_t[1]=I[1],_t[2]=I[2],_t[3]=I[3],_t[4]=I[4],_t[5]=I[5],_t[6]=I[6],_t[7]=I[7],_t[8]=I[8],_t=(I=_t)[0],z=I[1],W=I[2],q=I[3],Z=I[4],H=I[5],$=I[6],K=I[7],Q=(I=I[8])*Z-H*K,Ht=_t*Q+z*(St=-I*q+H*$)+W*(Mt=K*q-Z*$))&&(k[0]=Q*(Ht=1/Ht),k[1]=(-I*z+W*K)*Ht,k[2]=(H*z-W*Z)*Ht,k[3]=St*Ht,k[4]=(I*_t-W*$)*Ht,k[5]=(-H*_t+W*q)*Ht,k[6]=Mt*Ht,k[7]=(-K*_t+z*$)*Ht,k[8]=(Z*_t-z*q)*Ht),function(Xt){var xt,Zt,Wt,Kt,Rt,Xt=[Xt[0],Xt[1],1];return Wt=Dt,Kt=(Zt=xt=Xt)[0],Rt=Zt[1],Zt=Zt[2],xt[0]=Kt*Wt[0]+Rt*Wt[3]+Zt*Wt[6],xt[1]=Kt*Wt[1]+Rt*Wt[4]+Zt*Wt[7],xt[2]=Kt*Wt[2]+Rt*Wt[5]+Zt*Wt[8],[Xt[0],Xt[1]]}},Hi=Tr;function Tr(k){this.options={x:0,y:0,width:300,height:150,transformations:[]},this.transformers={cartesian:pu,translate:He,custom:vu,matrix:gu,polar:pi,transpose:yu,scale:ko,"shear.x":xu,"shear.y":_u,reflect:mu,"reflect.x":Bt,"reflect.y":Co,rotate:bu,helix:Za,parallel:vi,fisheye:wu,"fisheye.x":Ic,"fisheye.y":Ou,"fisheye.circular":Su},this.update(k)}_r.prototype.update=function(k){this.options=Nt({},this.options,k),this.recoordinate()},_r.prototype.clone=function(){return new _r(this.options)},_r.prototype.getOptions=function(){return this.options},_r.prototype.clear=function(){this.update({transformations:[]})},_r.prototype.getSize=function(){var k=this.options;return[k.width,k.height,k.depth]},_r.prototype.getCenter=function(){var k=this.options,I=k.x,z=k.y,W=k.z;return[(2*I+k.width)/2,(2*z+k.height)/2,(2*W+k.depth)/2]},_r.prototype.transform=function(){for(var k=[],I=0;I<arguments.length;I++)k[I]=arguments[I];var z=this.options.transformations;return this.update({transformations:Qt(Qt([],at(z),!1),[Qt([],at(k),!1)],!1)}),this},_r.prototype.map=function(k){return this.output(k)},_r.prototype.invert=function(k){return this.input(k)},_r.prototype.recoordinate=function(){this.output=this.compose(),this.input=this.compose(!0)},_r.prototype.compose=function(k){function I(_e,Br){var Yr;$.push((Br=Br===void 0?!0:Br)?(Yr=_e,function(Cr){for(var Fr=[],ii=0;ii<Cr.length-1;ii+=3){var An=[Cr[ii],Cr[ii+1],Cr[ii+2]],An=Yr(An);Fr.push.apply(Fr,Qt([],at(An),!1))}return Fr}):_e)}var z,W,q=(k=k===void 0?!1:k)?Qt([],at(this.options.transformations),!1).reverse():this.options.transformations,Z=k?function(_e){return _e.untransform}:function(_e){return _e.transform},H=[],$=[];try{for(var K=tt(q),Q=K.next();!Q.done;Q=K.next()){var St,Mt,Ht,_t,Dt,It,xt,Zt,Wt=at(Q.value),Kt=Wt[0],Rt=Wt.slice(1),Xt=this.transformers[Kt];Xt&&(Mt=(St=this.options).x,Ht=St.y,_t=St.z,Dt=St.width,It=St.height,xt=St.depth,je(Zt=Xt(Qt([],at(Rt),!1),Mt,Ht,_t,Dt,It,xt))?H.push(Zt):(H.length&&(I(this.createMatrixTransform(H,k)),H.splice(0,H.length)),I(Z(Zt)||Tt,!0)))}}catch(_e){z={error:_e}}finally{try{Q&&!Q.done&&(W=K.return)&&W.call(K)}finally{if(z)throw z.error}}return H.length&&I(this.createMatrixTransform(H,k)),Ue.apply(void 0,Qt([],at($),!1))},_r.prototype.createMatrixTransform=function(k,I){var z,W,q,Z,H,$,K,Q,St,Mt,Ht,_t,Dt,It,xt,Zt,Wt,Kt,Rt,Xt,_e,Br,Yr,Cr,Fr,ii,An,gn,Ci=qt();return I&&k.reverse(),k.forEach(function(Rc){return le(Ci,Ci,Rc)}),I&&(I=k=Ci,(gn=new ft(16))[0]=I[0],gn[1]=I[1],gn[2]=I[2],gn[3]=I[3],gn[4]=I[4],gn[5]=I[5],gn[6]=I[6],gn[7]=I[7],gn[8]=I[8],gn[9]=I[9],gn[10]=I[10],gn[11]=I[11],gn[12]=I[12],gn[13]=I[13],gn[14]=I[14],gn[15]=I[15],gn=(I=gn)[0],z=I[1],W=I[2],q=I[3],Z=I[4],H=I[5],$=I[6],K=I[7],Q=I[8],St=I[9],Mt=I[10],Ht=I[11],_t=I[12],Dt=I[13],It=I[14],I=I[15],An=(xt=gn*H-z*Z)*(ii=Mt*I-Ht*It)-(Zt=gn*$-W*Z)*(Fr=St*I-Ht*Dt)+(Wt=gn*K-q*Z)*(Cr=St*It-Mt*Dt)+(Kt=z*$-W*H)*(Yr=Q*I-Ht*_t)-(Rt=z*K-q*H)*(Br=Q*It-Mt*_t)+(Xt=W*K-q*$)*(_e=Q*Dt-St*_t))&&(k[0]=(H*ii-$*Fr+K*Cr)*(An=1/An),k[1]=(W*Fr-z*ii-q*Cr)*An,k[2]=(Dt*Xt-It*Rt+I*Kt)*An,k[3]=(Mt*Rt-St*Xt-Ht*Kt)*An,k[4]=($*Yr-Z*ii-K*Br)*An,k[5]=(gn*ii-W*Yr+q*Br)*An,k[6]=(It*Wt-_t*Xt-I*Zt)*An,k[7]=(Q*Xt-Mt*Wt+Ht*Zt)*An,k[8]=(Z*Fr-H*Yr+K*_e)*An,k[9]=(z*Yr-gn*Fr-q*_e)*An,k[10]=(_t*Rt-Dt*Wt+I*xt)*An,k[11]=(St*Wt-Q*Rt-Ht*xt)*An,k[12]=(H*Br-Z*Cr-$*_e)*An,k[13]=(gn*Cr-z*Br+W*_e)*An,k[14]=(Dt*Zt-_t*Kt-It*xt)*An,k[15]=(Q*Kt-St*Zt+Mt*xt)*An),function(Vi){var Ja,ki,vr,ha,to,$i,Vi=[Vi[0],Vi[1],Vi[2],1];return vr=Ci,ha=(ki=Ja=Vi)[0],to=ki[1],$i=ki[2],ki=ki[3],Ja[0]=vr[0]*ha+vr[4]*to+vr[8]*$i+vr[12]*ki,Ja[1]=vr[1]*ha+vr[5]*to+vr[9]*$i+vr[13]*ki,Ja[2]=vr[2]*ha+vr[6]*to+vr[10]*$i+vr[14]*ki,Ja[3]=vr[3]*ha+vr[7]*to+vr[11]*$i+vr[15]*ki,[Vi[0],Vi[1],Vi[2]]}},Ps=_r;function _r(k){this.options={x:0,y:0,z:0,width:300,height:150,depth:150,transformations:[]},this.transformers={cartesian3D:Mu,translate3D:Rd,scale3D:jc,transpose3D:Pa},this.update(k)}J.Coordinate=Hi,J.Coordinate3D=Ps,Object.defineProperty(J,"__esModule",{value:!0})})},38554:function(Fe){"use strict";var Wn=Object.prototype.hasOwnProperty,J="~";function tt(){}Object.create&&(tt.prototype=Object.create(null),new tt().__proto__||(J=!1));function at(bt,gt,Pt){this.fn=bt,this.context=gt,this.once=Pt||!1}function Qt(bt,gt,Pt,et,zt){if(typeof Pt!="function")throw new TypeError("The listener must be a function");var Et=new at(Pt,et||bt,zt),Nt=J?J+gt:gt;return bt._events[Nt]?bt._events[Nt].fn?bt._events[Nt]=[bt._events[Nt],Et]:bt._events[Nt].push(Et):(bt._events[Nt]=Et,bt._eventsCount++),bt}function xe(bt,gt){--bt._eventsCount===0?bt._events=new tt:delete bt._events[gt]}function $t(){this._events=new tt,this._eventsCount=0}$t.prototype.eventNames=function(){var gt=[],Pt,et;if(this._eventsCount===0)return gt;for(et in Pt=this._events)Wn.call(Pt,et)&&gt.push(J?et.slice(1):et);return Object.getOwnPropertySymbols?gt.concat(Object.getOwnPropertySymbols(Pt)):gt},$t.prototype.listeners=function(gt){var Pt=J?J+gt:gt,et=this._events[Pt];if(!et)return[];if(et.fn)return[et.fn];for(var zt=0,Et=et.length,Nt=new Array(Et);zt<Et;zt++)Nt[zt]=et[zt].fn;return Nt},$t.prototype.listenerCount=function(gt){var Pt=J?J+gt:gt,et=this._events[Pt];return et?et.fn?1:et.length:0},$t.prototype.emit=function(gt,Pt,et,zt,Et,Nt){var Tt=J?J+gt:gt;if(!this._events[Tt])return!1;var vt=this._events[Tt],ft=arguments.length,lt,mt;if(vt.fn){switch(vt.once&&this.removeListener(gt,vt.fn,void 0,!0),ft){case 1:return vt.fn.call(vt.context),!0;case 2:return vt.fn.call(vt.context,Pt),!0;case 3:return vt.fn.call(vt.context,Pt,et),!0;case 4:return vt.fn.call(vt.context,Pt,et,zt),!0;case 5:return vt.fn.call(vt.context,Pt,et,zt,Et),!0;case 6:return vt.fn.call(vt.context,Pt,et,zt,Et,Nt),!0}for(mt=1,lt=new Array(ft-1);mt<ft;mt++)lt[mt-1]=arguments[mt];vt.fn.apply(vt.context,lt)}else{var qt=vt.length,le;for(mt=0;mt<qt;mt++)switch(vt[mt].once&&this.removeListener(gt,vt[mt].fn,void 0,!0),ft){case 1:vt[mt].fn.call(vt[mt].context);break;case 2:vt[mt].fn.call(vt[mt].context,Pt);break;case 3:vt[mt].fn.call(vt[mt].context,Pt,et);break;case 4:vt[mt].fn.call(vt[mt].context,Pt,et,zt);break;default:if(!lt)for(le=1,lt=new Array(ft-1);le<ft;le++)lt[le-1]=arguments[le];vt[mt].fn.apply(vt[mt].context,lt)}}return!0},$t.prototype.on=function(gt,Pt,et){return Qt(this,gt,Pt,et,!1)},$t.prototype.once=function(gt,Pt,et){return Qt(this,gt,Pt,et,!0)},$t.prototype.removeListener=function(gt,Pt,et,zt){var Et=J?J+gt:gt;if(!this._events[Et])return this;if(!Pt)return xe(this,Et),this;var Nt=this._events[Et];if(Nt.fn)Nt.fn===Pt&&(!zt||Nt.once)&&(!et||Nt.context===et)&&xe(this,Et);else{for(var Tt=0,vt=[],ft=Nt.length;Tt<ft;Tt++)(Nt[Tt].fn!==Pt||zt&&!Nt[Tt].once||et&&Nt[Tt].context!==et)&&vt.push(Nt[Tt]);vt.length?this._events[Et]=vt.length===1?vt[0]:vt:xe(this,Et)}return this},$t.prototype.removeAllListeners=function(gt){var Pt;return gt?(Pt=J?J+gt:gt,this._events[Pt]&&xe(this,Pt)):(this._events=new tt,this._eventsCount=0),this},$t.prototype.off=$t.prototype.removeListener,$t.prototype.addListener=$t.prototype.on,$t.prefixed=J,$t.EventEmitter=$t,Fe.exports=$t},8874:function(Fe){"use strict";Fe.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},19818:function(Fe,Wn,J){var tt=J(8874),at=J(86851),Qt=Object.hasOwnProperty,xe=Object.create(null);for(var $t in tt)Qt.call(tt,$t)&&(xe[tt[$t]]=$t);var bt=Fe.exports={to:{},get:{}};bt.get=function(et){var zt=et.substring(0,3).toLowerCase(),Et,Nt;switch(zt){case"hsl":Et=bt.get.hsl(et),Nt="hsl";break;case"hwb":Et=bt.get.hwb(et),Nt="hwb";break;default:Et=bt.get.rgb(et),Nt="rgb";break}return Et?{model:Nt,value:Et}:null},bt.get.rgb=function(et){if(!et)return null;var zt=/^#([a-f0-9]{3,4})$/i,Et=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,Nt=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,Tt=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,vt=/^(\w+)$/,ft=[0,0,0,1],lt,mt,qt;if(lt=et.match(Et)){for(qt=lt[2],lt=lt[1],mt=0;mt<3;mt++){var le=mt*2;ft[mt]=parseInt(lt.slice(le,le+2),16)}qt&&(ft[3]=parseInt(qt,16)/255)}else if(lt=et.match(zt)){for(lt=lt[1],qt=lt[3],mt=0;mt<3;mt++)ft[mt]=parseInt(lt[mt]+lt[mt],16);qt&&(ft[3]=parseInt(qt+qt,16)/255)}else if(lt=et.match(Nt)){for(mt=0;mt<3;mt++)ft[mt]=parseInt(lt[mt+1],0);lt[4]&&(lt[5]?ft[3]=parseFloat(lt[4])*.01:ft[3]=parseFloat(lt[4]))}else if(lt=et.match(Tt)){for(mt=0;mt<3;mt++)ft[mt]=Math.round(parseFloat(lt[mt+1])*2.55);lt[4]&&(lt[5]?ft[3]=parseFloat(lt[4])*.01:ft[3]=parseFloat(lt[4]))}else return(lt=et.match(vt))?lt[1]==="transparent"?[0,0,0,0]:Qt.call(tt,lt[1])?(ft=tt[lt[1]],ft[3]=1,ft):null:null;for(mt=0;mt<3;mt++)ft[mt]=gt(ft[mt],0,255);return ft[3]=gt(ft[3],0,1),ft},bt.get.hsl=function(et){if(!et)return null;var zt=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,Et=et.match(zt);if(Et){var Nt=parseFloat(Et[4]),Tt=(parseFloat(Et[1])%360+360)%360,vt=gt(parseFloat(Et[2]),0,100),ft=gt(parseFloat(Et[3]),0,100),lt=gt(isNaN(Nt)?1:Nt,0,1);return[Tt,vt,ft,lt]}return null},bt.get.hwb=function(et){if(!et)return null;var zt=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,Et=et.match(zt);if(Et){var Nt=parseFloat(Et[4]),Tt=(parseFloat(Et[1])%360+360)%360,vt=gt(parseFloat(Et[2]),0,100),ft=gt(parseFloat(Et[3]),0,100),lt=gt(isNaN(Nt)?1:Nt,0,1);return[Tt,vt,ft,lt]}return null},bt.to.hex=function(){var et=at(arguments);return"#"+Pt(et[0])+Pt(et[1])+Pt(et[2])+(et[3]<1?Pt(Math.round(et[3]*255)):"")},bt.to.rgb=function(){var et=at(arguments);return et.length<4||et[3]===1?"rgb("+Math.round(et[0])+", "+Math.round(et[1])+", "+Math.round(et[2])+")":"rgba("+Math.round(et[0])+", "+Math.round(et[1])+", "+Math.round(et[2])+", "+et[3]+")"},bt.to.rgb.percent=function(){var et=at(arguments),zt=Math.round(et[0]/255*100),Et=Math.round(et[1]/255*100),Nt=Math.round(et[2]/255*100);return et.length<4||et[3]===1?"rgb("+zt+"%, "+Et+"%, "+Nt+"%)":"rgba("+zt+"%, "+Et+"%, "+Nt+"%, "+et[3]+")"},bt.to.hsl=function(){var et=at(arguments);return et.length<4||et[3]===1?"hsl("+et[0]+", "+et[1]+"%, "+et[2]+"%)":"hsla("+et[0]+", "+et[1]+"%, "+et[2]+"%, "+et[3]+")"},bt.to.hwb=function(){var et=at(arguments),zt="";return et.length>=4&&et[3]!==1&&(zt=", "+et[3]),"hwb("+et[0]+", "+et[1]+"%, "+et[2]+"%"+zt+")"},bt.to.keyword=function(et){return xe[et.slice(0,3)]};function gt(et,zt,Et){return Math.min(Math.max(zt,et),Et)}function Pt(et){var zt=Math.round(et).toString(16).toUpperCase();return zt.length<2?"0"+zt:zt}},69916:function(Fe,Wn){(function(J,tt){tt(Wn)})(this,function(J){"use strict";function tt(Tt,vt,ft,lt){lt=lt||{};var mt=lt.maxIterations||100,qt=lt.tolerance||1e-10,le=Tt(vt),Ue=Tt(ft),je=ft-vt;if(le*Ue>0)throw"Initial bisect points must have opposite signs";if(le===0)return vt;if(Ue===0)return ft;for(var ze=0;ze<mt;++ze){je/=2;var He=vt+je,Ae=Tt(He);if(Ae*le>=0&&(vt=He),Math.abs(je)<qt||Ae===0)return He}return vt+je}function at(Tt){for(var vt=new Array(Tt),ft=0;ft<Tt;++ft)vt[ft]=0;return vt}function Qt(Tt,vt){return at(Tt).map(function(){return at(vt)})}function xe(Tt,vt){for(var ft=0,lt=0;lt<Tt.length;++lt)ft+=Tt[lt]*vt[lt];return ft}function $t(Tt){return Math.sqrt(xe(Tt,Tt))}function bt(Tt,vt,ft){for(var lt=0;lt<vt.length;++lt)Tt[lt]=vt[lt]*ft}function gt(Tt,vt,ft,lt,mt){for(var qt=0;qt<Tt.length;++qt)Tt[qt]=vt*ft[qt]+lt*mt[qt]}function Pt(Tt,vt,ft){ft=ft||{};var lt=ft.maxIterations||vt.length*200,mt=ft.nonZeroDelta||1.05,qt=ft.zeroDelta||.001,le=ft.minErrorDelta||1e-6,Ue=ft.minErrorDelta||1e-5,je=ft.rho!==void 0?ft.rho:1,ze=ft.chi!==void 0?ft.chi:2,He=ft.psi!==void 0?ft.psi:-.5,Ae=ft.sigma!==void 0?ft.sigma:.5,nn,Ke=vt.length,ee=new Array(Ke+1);ee[0]=vt,ee[0].fx=Tt(vt),ee[0].id=0;for(var Jt=0;Jt<Ke;++Jt){var Yn=vt.slice();Yn[Jt]=Yn[Jt]?Yn[Jt]*mt:qt,ee[Jt+1]=Yn,ee[Jt+1].fx=Tt(Yn),ee[Jt+1].id=Jt+1}function Xe(Ar){for(var fn=0;fn<Ar.length;fn++)ee[Ke][fn]=Ar[fn];ee[Ke].fx=Ar.fx}for(var Pr=function(Ar,fn){return Ar.fx-fn.fx},Rr=vt.slice(),pr=vt.slice(),Dr=vt.slice(),Ti=vt.slice(),Yi=0;Yi<lt;++Yi){if(ee.sort(Pr),ft.history){var ca=ee.map(function(Ar){var fn=Ar.slice();return fn.fx=Ar.fx,fn.id=Ar.id,fn});ca.sort(function(Ar,fn){return Ar.id-fn.id}),ft.history.push({x:ee[0].slice(),fx:ee[0].fx,simplex:ca})}for(nn=0,Jt=0;Jt<Ke;++Jt)nn=Math.max(nn,Math.abs(ee[0][Jt]-ee[1][Jt]));if(Math.abs(ee[0].fx-ee[Ke].fx)<le&&nn<Ue)break;for(Jt=0;Jt<Ke;++Jt){Rr[Jt]=0;for(var Jn=0;Jn<Ke;++Jn)Rr[Jt]+=ee[Jn][Jt];Rr[Jt]/=Ke}var ri=ee[Ke];if(gt(pr,1+je,Rr,-je,ri),pr.fx=Tt(pr),pr.fx<ee[0].fx)gt(Ti,1+ze,Rr,-ze,ri),Ti.fx=Tt(Ti),Ti.fx<pr.fx?Xe(Ti):Xe(pr);else if(pr.fx>=ee[Ke-1].fx){var ar=!1;if(pr.fx>ri.fx?(gt(Dr,1+He,Rr,-He,ri),Dr.fx=Tt(Dr),Dr.fx<ri.fx?Xe(Dr):ar=!0):(gt(Dr,1-He*je,Rr,He*je,ri),Dr.fx=Tt(Dr),Dr.fx<pr.fx?Xe(Dr):ar=!0),ar){if(Ae>=1)break;for(Jt=1;Jt<ee.length;++Jt)gt(ee[Jt],1-Ae,ee[0],Ae,ee[Jt]),ee[Jt].fx=Tt(ee[Jt])}}else Xe(pr)}return ee.sort(Pr),{fx:ee[0].fx,x:ee[0]}}function et(Tt,vt,ft,lt,mt,qt,le){var Ue=ft.fx,je=xe(ft.fxprime,vt),ze=Ue,He=Ue,Ae=je,nn=0;mt=mt||1,qt=qt||1e-6,le=le||.1;function Ke(Jt,Yn,Xe){for(var Pr=0;Pr<16;++Pr)if(mt=(Jt+Yn)/2,gt(lt.x,1,ft.x,mt,vt),ze=lt.fx=Tt(lt.x,lt.fxprime),Ae=xe(lt.fxprime,vt),ze>Ue+qt*mt*je||ze>=Xe)Yn=mt;else{if(Math.abs(Ae)<=-le*je)return mt;Ae*(Yn-Jt)>=0&&(Yn=Jt),Jt=mt,Xe=ze}return 0}for(var ee=0;ee<10;++ee){if(gt(lt.x,1,ft.x,mt,vt),ze=lt.fx=Tt(lt.x,lt.fxprime),Ae=xe(lt.fxprime,vt),ze>Ue+qt*mt*je||ee&&ze>=He)return Ke(nn,mt,He);if(Math.abs(Ae)<=-le*je)return mt;if(Ae>=0)return Ke(mt,nn,ze);He=ze,nn=mt,mt*=2}return mt}function zt(Tt,vt,ft){var lt={x:vt.slice(),fx:0,fxprime:vt.slice()},mt={x:vt.slice(),fx:0,fxprime:vt.slice()},qt=vt.slice(),le,Ue,je=1,ze;ft=ft||{},ze=ft.maxIterations||vt.length*20,lt.fx=Tt(lt.x,lt.fxprime),le=lt.fxprime.slice(),bt(le,lt.fxprime,-1);for(var He=0;He<ze;++He){if(je=et(Tt,le,lt,mt,je),ft.history&&ft.history.push({x:lt.x.slice(),fx:lt.fx,fxprime:lt.fxprime.slice(),alpha:je}),!je)bt(le,lt.fxprime,-1);else{gt(qt,1,mt.fxprime,-1,lt.fxprime);var Ae=xe(lt.fxprime,lt.fxprime),nn=Math.max(0,xe(qt,mt.fxprime)/Ae);gt(le,nn,le,-1,mt.fxprime),Ue=lt,lt=mt,mt=Ue}if($t(lt.fxprime)<=1e-5)break}return ft.history&&ft.history.push({x:lt.x.slice(),fx:lt.fx,fxprime:lt.fxprime.slice(),alpha:je}),lt}function Et(Tt,vt,ft){ft=ft||{};for(var lt=ft.maxIterations||vt.length*100,mt=ft.learnRate||.001,qt={x:vt.slice(),fx:0,fxprime:vt.slice()},le=0;le<lt&&(qt.fx=Tt(qt.x,qt.fxprime),ft.history&&ft.history.push({x:qt.x.slice(),fx:qt.fx,fxprime:qt.fxprime.slice()}),gt(qt.x,1,qt.x,-mt,qt.fxprime),!($t(qt.fxprime)<=1e-5));++le);return qt}function Nt(Tt,vt,ft){ft=ft||{};var lt={x:vt.slice(),fx:0,fxprime:vt.slice()},mt={x:vt.slice(),fx:0,fxprime:vt.slice()},qt=ft.maxIterations||vt.length*100,le=ft.learnRate||1,Ue=vt.slice(),je=ft.c1||.001,ze=ft.c2||.1,He,Ae=[];if(ft.history){var nn=Tt;Tt=function(ee,Jt){return Ae.push(ee.slice()),nn(ee,Jt)}}lt.fx=Tt(lt.x,lt.fxprime);for(var Ke=0;Ke<qt&&(bt(Ue,lt.fxprime,-1),le=et(Tt,Ue,lt,mt,le,je,ze),ft.history&&(ft.history.push({x:lt.x.slice(),fx:lt.fx,fxprime:lt.fxprime.slice(),functionCalls:Ae,learnRate:le,alpha:le}),Ae=[]),He=lt,lt=mt,mt=He,!(le===0||$t(lt.fxprime)<1e-5));++Ke);return lt}J.bisect=tt,J.nelderMead=Pt,J.conjugateGradient=zt,J.gradientDescent=Et,J.gradientDescentLineSearch=Nt,J.zeros=at,J.zerosM=Qt,J.norm2=$t,J.weightedSum=gt,J.scale=bt})},73807:function(Fe){"use strict";var Wn=Fe.exports;Fe.exports.isNumber=function(J){return typeof J=="number"},Fe.exports.findMin=function(J){if(J.length===0)return 1/0;for(var tt=J[0],at=1;at<J.length;at++)tt=Math.min(tt,J[at]);return tt},Fe.exports.findMax=function(J){if(J.length===0)return-1/0;for(var tt=J[0],at=1;at<J.length;at++)tt=Math.max(tt,J[at]);return tt},Fe.exports.findMinMulti=function(J){for(var tt=Wn.findMin(J[0]),at=1;at<J.length;at++)tt=Math.min(tt,Wn.findMin(J[at]));return tt},Fe.exports.findMaxMulti=function(J){for(var tt=Wn.findMax(J[0]),at=1;at<J.length;at++)tt=Math.max(tt,Wn.findMax(J[at]));return tt},Fe.exports.inside=function(J,tt,at){return J<=at&&at<=tt}},53843:function(Fe,Wn,J){"use strict";var tt=50,at=2,Qt=Math.log(2),xe=Fe.exports,$t=J(73807);function bt(Pt){return 1-Math.abs(Pt)}Fe.exports.getUnifiedMinMax=function(Pt,et){return xe.getUnifiedMinMaxMulti([Pt],et)},Fe.exports.getUnifiedMinMaxMulti=function(Pt,et){et=et||{};var zt=!1,Et=!1,Nt=$t.isNumber(et.width)?et.width:at,Tt=$t.isNumber(et.size)?et.size:tt,vt=$t.isNumber(et.min)?et.min:(zt=!0,$t.findMinMulti(Pt)),ft=$t.isNumber(et.max)?et.max:(Et=!0,$t.findMaxMulti(Pt)),lt=ft-vt,mt=lt/(Tt-1);return zt&&(vt=vt-2*Nt*mt),Et&&(ft=ft+2*Nt*mt),{min:vt,max:ft}},Fe.exports.create=function(Pt,et){if(et=et||{},!Pt||Pt.length===0)return[];var zt=$t.isNumber(et.size)?et.size:tt,Et=$t.isNumber(et.width)?et.width:at,Nt=xe.getUnifiedMinMax(Pt,{size:zt,width:Et,min:et.min,max:et.max}),Tt=Nt.min,vt=Nt.max,ft=vt-Tt,lt=ft/(zt-1);if(ft===0)return[{x:Tt,y:1}];for(var mt=[],qt=0;qt<zt;qt++)mt.push({x:Tt+qt*lt,y:0});var le=function(ee){return Math.floor((ee-Tt)/lt)},Ue=gt(bt,Et),je=Ue[Et],ze=Ue[Et-1]-Ue[Et-2],He=0;Pt.forEach(function(ee){var Jt=le(ee);if(!(Jt+Et<0||Jt-Et>=mt.length)){var Yn=Math.max(Jt-Et,0),Xe=Jt,Pr=Math.min(Jt+Et,mt.length-1),Rr=Yn-(Jt-Et),pr=Jt+Et-Pr,Dr=Ue[-Et-1+Rr]||0,Ti=Ue[-Et-1+pr]||0,Yi=je/(je-Dr-Ti);Rr>0&&(He+=Yi*(Rr-1)*ze);var ca=Math.max(0,Jt-Et+1);$t.inside(0,mt.length-1,ca)&&(mt[ca].y+=Yi*1*ze),$t.inside(0,mt.length-1,Xe+1)&&(mt[Xe+1].y-=Yi*2*ze),$t.inside(0,mt.length-1,Pr+1)&&(mt[Pr+1].y+=Yi*1*ze)}});var Ae=He,nn=0,Ke=0;return mt.forEach(function(ee){nn+=ee.y,Ae+=nn,ee.y=Ae,Ke+=Ae}),Ke>0&&mt.forEach(function(ee){ee.y/=Ke}),mt};function gt(Pt,et){for(var zt={},Et=0,Nt=-et;Nt<=et;Nt++)Et+=Pt(Nt/et),zt[Nt]=Et;return zt}Fe.exports.getExpectedValueFromPdf=function(Pt){if(!(!Pt||Pt.length===0)){var et=0;return Pt.forEach(function(zt){et+=zt.x*zt.y}),et}},Fe.exports.getXWithLeftTailArea=function(Pt,et){if(!(!Pt||Pt.length===0)){for(var zt=0,Et=0,Nt=0;Nt<Pt.length&&(Et=Nt,zt+=Pt[Nt].y,!(zt>=et));Nt++);return Pt[Et].x}},Fe.exports.getPerplexity=function(Pt){if(!(!Pt||Pt.length===0)){var et=0;return Pt.forEach(function(zt){var Et=Math.log(zt.y);isFinite(Et)&&(et+=zt.y*Et)}),et=-et/Qt,Math.pow(2,et)}}},86851:function(Fe,Wn,J){"use strict";var tt=J(89594),at=Array.prototype.concat,Qt=Array.prototype.slice,xe=Fe.exports=function(bt){for(var gt=[],Pt=0,et=bt.length;Pt<et;Pt++){var zt=bt[Pt];tt(zt)?gt=at.call(gt,Qt.call(zt)):gt.push(zt)}return gt};xe.wrap=function($t){return function(){return $t(xe(arguments))}}},89594:function(Fe){Fe.exports=function(J){return!J||typeof J=="string"?!1:J instanceof Array||Array.isArray(J)||J.length>=0&&(J.splice instanceof Function||Object.getOwnPropertyDescriptor(J,J.length-1)&&J.constructor.name!=="String")}},64599:function(Fe,Wn,J){var tt=J(96263);function at(Qt,xe){var $t=typeof Symbol!="undefined"&&Qt[Symbol.iterator]||Qt["@@iterator"];if(!$t){if(Array.isArray(Qt)||($t=tt(Qt))||xe&&Qt&&typeof Qt.length=="number"){$t&&(Qt=$t);var bt=0,gt=function(){};return{s:gt,n:function(){return bt>=Qt.length?{done:!0}:{done:!1,value:Qt[bt++]}},e:function(Nt){throw Nt},f:gt}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Pt=!0,et=!1,zt;return{s:function(){$t=$t.call(Qt)},n:function(){var Nt=$t.next();return Pt=Nt.done,Nt},e:function(Nt){et=!0,zt=Nt},f:function(){try{!Pt&&$t.return!=null&&$t.return()}finally{if(et)throw zt}}}}Fe.exports=at,Fe.exports.__esModule=!0,Fe.exports.default=Fe.exports}}]);
}());