👨🏻‍💻👩🏻‍💻 Use Ant Design like a Pro!
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.
 
 

117 lines
1.1 MiB

!(function(){var wr=Math.pow;(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[7937],{38551:function(Ve,Ge,gt){"use strict";gt.d(Ge,{P:function(){return qlt}});var _t={};gt.r(_t),gt.d(_t,{area:function(){return yW},bottom:function(){return ja},bottomLeft:function(){return ja},bottomRight:function(){return ja},inside:function(){return ja},left:function(){return ja},outside:function(){return xW},right:function(){return ja},spider:function(){return OW},surround:function(){return SW},top:function(){return ja},topLeft:function(){return ja},topRight:function(){return ja}});var Nt={};gt.r(Nt),gt.d(Nt,{interpolateBlues:function(){return RH},interpolateBrBG:function(){return fH},interpolateBuGn:function(){return xH},interpolateBuPu:function(){return _H},interpolateCividis:function(){return BH},interpolateCool:function(){return YH},interpolateCubehelixDefault:function(){return WH},interpolateGnBu:function(){return OH},interpolateGreens:function(){return LH},interpolateGreys:function(){return NH},interpolateInferno:function(){return QH},interpolateMagma:function(){return KH},interpolateOrRd:function(){return wH},interpolateOranges:function(){return DH},interpolatePRGn:function(){return dH},interpolatePiYG:function(){return hH},interpolatePlasma:function(){return JH},interpolatePuBu:function(){return MH},interpolatePuBuGn:function(){return SH},interpolatePuOr:function(){return pH},interpolatePuRd:function(){return EH},interpolatePurples:function(){return IH},interpolateRainbow:function(){return $H},interpolateRdBu:function(){return vH},interpolateRdGy:function(){return gH},interpolateRdPu:function(){return AH},interpolateRdYlBu:function(){return yH},interpolateRdYlGn:function(){return mH},interpolateReds:function(){return jH},interpolateSinebow:function(){return UH},interpolateSpectral:function(){return bH},interpolateTurbo:function(){return qH},interpolateViridis:function(){return ZH},interpolateWarm:function(){return HH},interpolateYlGn:function(){return PH},interpolateYlGnBu:function(){return TH},interpolateYlOrBr:function(){return CH},interpolateYlOrRd:function(){return kH},schemeAccent:function(){return FW},schemeBlues:function(){return Tw},schemeBrBG:function(){return sw},schemeBuGn:function(){return gw},schemeBuPu:function(){return yw},schemeCategory10:function(){return BW},schemeDark2:function(){return zW},schemeGnBu:function(){return mw},schemeGreens:function(){return Pw},schemeGreys:function(){return Cw},schemeOrRd:function(){return bw},schemeOranges:function(){return Lw},schemePRGn:function(){return cw},schemePaired:function(){return GW},schemePastel1:function(){return WW},schemePastel2:function(){return HW},schemePiYG:function(){return lw},schemePuBu:function(){return _w},schemePuBuGn:function(){return xw},schemePuOr:function(){return uw},schemePuRd:function(){return Ow},schemePurples:function(){return kw},schemeRdBu:function(){return fw},schemeRdGy:function(){return dw},schemeRdPu:function(){return ww},schemeRdYlBu:function(){return hw},schemeRdYlGn:function(){return pw},schemeReds:function(){return Rw},schemeSet1:function(){return YW},schemeSet2:function(){return $W},schemeSet3:function(){return VW},schemeSpectral:function(){return vw},schemeTableau10:function(){return XW},schemeYlGn:function(){return Mw},schemeYlGnBu:function(){return Sw},schemeYlOrBr:function(){return Ew},schemeYlOrRd:function(){return Aw}});var ye={};gt.r(ye),gt.d(ye,{geoAlbers:function(){return W5},geoAlbersUsa:function(){return btt},geoAzimuthalEqualArea:function(){return xtt},geoAzimuthalEqualAreaRaw:function(){return bm},geoAzimuthalEquidistant:function(){return _tt},geoAzimuthalEquidistantRaw:function(){return xm},geoConicConformal:function(){return wtt},geoConicConformalRaw:function(){return $5},geoConicEqualArea:function(){return Fh},geoConicEqualAreaRaw:function(){return G5},geoConicEquidistant:function(){return Mtt},geoConicEquidistantRaw:function(){return V5},geoEqualEarth:function(){return Att},geoEqualEarthRaw:function(){return _m},geoEquirectangular:function(){return Stt},geoEquirectangularRaw:function(){return gu},geoGnomonic:function(){return Ttt},geoGnomonicRaw:function(){return Om},geoIdentity:function(){return Ptt},geoMercator:function(){return Ott},geoMercatorRaw:function(){return vu},geoNaturalEarth1:function(){return Ctt},geoNaturalEarth1Raw:function(){return wm},geoOrthographic:function(){return ktt},geoOrthographicRaw:function(){return Sm},geoProjection:function(){return Oa},geoProjectionMutator:function(){return ym},geoStereographic:function(){return Rtt},geoStereographicRaw:function(){return Mm},geoTransverseMercator:function(){return Ltt},geoTransverseMercatorRaw:function(){return Em}});var Be={};gt.r(Be),gt.d(Be,{frequency:function(){return Int},id:function(){return jnt},name:function(){return Dnt},weight:function(){return Nnt}});var Jt=gt(50959),he=gt(10422),ie=gt.t(he,2),Ht=function(){return Ht=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},Ht.apply(this,arguments)},yt=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())})},pe=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}}},Zt=Ht({},ie),$t=Zt.version,te=Zt.render,Bt=Zt.unmountComponentAtNode,It;try{var kt=Number(($t||"").split(".")[0]);kt>=18&&(It=Zt.createRoot)}catch(t){}function Ft(t){var e=Zt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;e&&typeof e=="object"&&(e.usingClientEntryPoint=t)}var Se="__rc_react_root__";function Re(t,e){Ft(!0);var n=e[Se]||It(e);Ft(!1),n.render(t),e[Se]=n}function Ke(t,e){te(t,e)}function We(t,e){}function Ze(t,e){if(It){Re(t,e);return}Ke(t,e)}function cn(t){return yt(this,void 0,void 0,function(){return pe(this,function(e){return[2,Promise.resolve().then(function(){var n;(n=t[Se])===null||n===void 0||n.unmount(),delete t[Se]})]})})}function He(t){Bt(t)}function De(t){}function an(t){return yt(this,void 0,void 0,function(){return pe(this,function(e){return It!==void 0?[2,cn(t)]:(He(t),[2])})})}var _e=new Map;_e.set("tooltip",document.createElement("div"));var Me=function(t,e){e===void 0&&(e=!1);var n=document.createElement("div");return e?n=_e.get("tooltip"):t!=null&&t.key&&(_e.get(t.key)||_e.set(t.key,n),n=_e.get(t.key)),Ze(t,n),n},pn=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)},Ln=function(t){var e=t.loadingTemplate,n=t.theme,r=n===void 0?"light":n,i=Jt.useRef(null);Jt.useEffect(function(){!e&&i.current&&pn(i.current)},[]);var a=function(){return e||Jt.createElement("div",{ref:i})};return Jt.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())},qn=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)}}(),ln=function(t){qn(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||Jt.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):Jt.createElement(Jt.Fragment,null,this.props.children)},e}(Jt.Component),fn=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))},mt=function(t){return Array.isArray(t)},U=function(t){return t!==null&&typeof t=="object"&&!mt(t)},X=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(!e.length)return t;var r=e.shift();for(var i in r)Object.hasOwnProperty.call(r,i)&&(U(r[i])?((!t[i]||typeof t[i]!="object")&&(t[i]={}),X(t[i],r[i])):t[i]=r[i]);return X.apply(void 0,fn([t],e,!1))},Z=typeof global=="object"&&global&&global.Object===Object&&global,it=Z,ct=typeof self=="object"&&self&&self.Object===Object&&self,zt=it||ct||Function("return this")(),Ct=zt,ee=Ct.Symbol,$=ee,ut=Object.prototype,vt=ut.hasOwnProperty,Ut=ut.toString,et=$?$.toStringTag:void 0;function ft(t){var e=vt.call(t,et),n=t[et];try{t[et]=void 0;var r=!0}catch(a){}var i=Ut.call(t);return r&&(e?t[et]=n:delete t[et]),i}var wt=ft,H=Object.prototype,tt=H.toString;function ht(t){return tt.call(t)}var x=ht,T="[object Null]",W="[object Undefined]",K=$?$.toStringTag:void 0;function nt(t){return t==null?t===void 0?W:T:K&&K in Object(t)?wt(t):x(t)}var ot=nt;function xt(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Ot=xt,Et="[object AsyncFunction]",Tt="[object Function]",Gt="[object GeneratorFunction]",jt="[object Proxy]";function Vt(t){if(!Ot(t))return!1;var e=ot(t);return e==Tt||e==Gt||e==Et||e==jt}var Wt=Vt,Qt=function(t){var e=/react|\.jsx|children:\[\(/i;return e.test(t)},se=Array.isArray,Mt=se;function Oe(){this.__data__=[],this.size=0}var Xe=Oe;function Ee(t,e){return t===e||t!==t&&e!==e}var Pe=Ee;function Ne(t,e){for(var n=t.length;n--;)if(Pe(t[n][0],e))return n;return-1}var Le=Ne,jn=Array.prototype,Dn=jn.splice;function Bn(t){var e=this.__data__,n=Le(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():Dn.call(e,n,1),--this.size,!0}var Fn=Bn;function On(t){var e=this.__data__,n=Le(e,t);return n<0?void 0:e[n][1]}var gn=On;function or(t){return Le(this.__data__,t)>-1}var dn=or;function Qr(t,e){var n=this.__data__,r=Le(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}var wa=Qr;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=Xe,ci.prototype.delete=Fn,ci.prototype.get=gn,ci.prototype.has=dn,ci.prototype.set=wa;var Sa=ci;function Ma(){this.__data__=new Sa,this.size=0}var Du=Ma;function fp(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}var dp=fp;function ko(t){return this.__data__.get(t)}var Ro=ko;function Ss(t){return this.__data__.has(t)}var hp=Ss,pp=Ct["__core-js_shared__"],Fc=pp,Bu=function(){var t=/[^.]+$/.exec(Fc&&Fc.keys&&Fc.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function vp(t){return!!Bu&&Bu in t}var gp=vp,yp=Function.prototype,mp=yp.toString;function Gr(t){if(t!=null){try{return mp.call(t)}catch(e){}try{return t+""}catch(e){}}return""}var vr=Gr,L=/[\\^$.*+?()[\]{}|]/g,I=/^\[object .+?Constructor\]$/,G=Function.prototype,V=Object.prototype,at=G.toString,lt=V.hasOwnProperty,Q=RegExp("^"+at.call(lt).replace(L,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function J(t){if(!Ot(t)||gp(t))return!1;var e=Wt(t)?Q:I;return e.test(vr(t))}var pt=J;function bt(t,e){return t==null?void 0:t[e]}var ne=bt;function ae(t,e){var n=ne(t,e);return pt(n)?n:void 0}var be=ae,re=be(Ct,"Map"),de=re,ve=be(Object,"create"),Xt=ve;function Ce(){this.__data__=Xt?Xt(null):{},this.size=0}var xe=Ce;function ke(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var ge=ke,Te="__lodash_hash_undefined__",tn=Object.prototype,Jr=tn.hasOwnProperty;function li(t){var e=this.__data__;if(Xt){var n=e[t];return n===Te?void 0:n}return Jr.call(e,t)?e[t]:void 0}var jr=li,ti=Object.prototype,_i=ti.hasOwnProperty;function tr(t){var e=this.__data__;return Xt?e[t]!==void 0:_i.call(e,t)}var Hn=tr,Ms="__lodash_hash_undefined__";function bp(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Xt&&e===void 0?Ms:e,this}var Lo=bp;function Wr(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])}}Wr.prototype.clear=xe,Wr.prototype.delete=ge,Wr.prototype.get=jr,Wr.prototype.has=Hn,Wr.prototype.set=Lo;var Sr=Wr;function No(){this.size=0,this.__data__={hash:new Sr,map:new(de||Sa),string:new Sr}}var Io=No;function jo(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var ia=jo;function H3(t,e){var n=t.__data__;return ia(e)?n[typeof e=="string"?"string":"hash"]:n.map}var Fu=H3;function Y3(t){var e=Fu(this,t).delete(t);return this.size-=e?1:0,e}var $3=Y3;function V3(t){return Fu(this,t).get(t)}var X3=V3;function U3(t){return Fu(this,t).has(t)}var q3=U3;function Z3(t,e){var n=Fu(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}var K3=Z3;function Es(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])}}Es.prototype.clear=Io,Es.prototype.delete=$3,Es.prototype.get=X3,Es.prototype.has=q3,Es.prototype.set=K3;var zu=Es,Q3=200;function J3(t,e){var n=this.__data__;if(n instanceof Sa){var r=n.__data__;if(!de||r.length<Q3-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new zu(r)}return n.set(t,e),this.size=n.size,this}var tR=J3;function As(t){var e=this.__data__=new Sa(t);this.size=e.size}As.prototype.clear=Du,As.prototype.delete=dp,As.prototype.get=Ro,As.prototype.has=hp,As.prototype.set=tR;var zc=As,eR="__lodash_hash_undefined__";function nR(t){return this.__data__.set(t,eR),this}var rR=nR;function iR(t){return this.__data__.has(t)}var aR=iR;function Gu(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new zu;++e<n;)this.add(t[e])}Gu.prototype.add=Gu.prototype.push=rR,Gu.prototype.has=aR;var v1=Gu;function oR(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 sR=oR;function cR(t,e){return t.has(e)}var g1=cR,lR=1,uR=2;function fR(t,e,n,r,i,a){var o=n&lR,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&uR?new v1: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(!sR(e,function(y,m){if(!g1(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 y1=fR,dR=Ct.Uint8Array,Wu=dR;function hR(t){var e=-1,n=Array(t.size);return t.forEach(function(r,i){n[++e]=[i,r]}),n}var pR=hR;function vR(t){var e=-1,n=Array(t.size);return t.forEach(function(r){n[++e]=r}),n}var xp=vR,gR=1,yR=2,mR="[object Boolean]",bR="[object Date]",xR="[object Error]",_R="[object Map]",OR="[object Number]",wR="[object RegExp]",SR="[object Set]",MR="[object String]",ER="[object Symbol]",AR="[object ArrayBuffer]",TR="[object DataView]",m1=$?$.prototype:void 0,_p=m1?m1.valueOf:void 0;function PR(t,e,n,r,i,a,o){switch(n){case TR:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case AR:return!(t.byteLength!=e.byteLength||!a(new Wu(t),new Wu(e)));case mR:case bR:case OR:return Pe(+t,+e);case xR:return t.name==e.name&&t.message==e.message;case wR:case MR:return t==e+"";case _R:var s=pR;case SR:var c=r&gR;if(s||(s=xp),t.size!=e.size&&!c)return!1;var l=o.get(t);if(l)return l==e;r|=yR,o.set(t,e);var u=y1(s(t),s(e),r,i,a,o);return o.delete(t),u;case ER:if(_p)return _p.call(t)==_p.call(e)}return!1}var CR=PR;function kR(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}var Op=kR;function RR(t,e,n){var r=e(t);return Mt(t)?r:Op(r,n(t))}var b1=RR;function LR(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 NR=LR;function IR(){return[]}var x1=IR,jR=Object.prototype,DR=jR.propertyIsEnumerable,_1=Object.getOwnPropertySymbols,BR=_1?function(t){return t==null?[]:(t=Object(t),NR(_1(t),function(e){return DR.call(t,e)}))}:x1,wp=BR;function FR(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}var zR=FR;function GR(t){return t!=null&&typeof t=="object"}var Oi=GR,WR="[object Arguments]";function HR(t){return Oi(t)&&ot(t)==WR}var O1=HR,w1=Object.prototype,YR=w1.hasOwnProperty,$R=w1.propertyIsEnumerable,VR=O1(function(){return arguments}())?O1:function(t){return Oi(t)&&YR.call(t,"callee")&&!$R.call(t,"callee")},Sp=VR;function XR(){return!1}var UR=XR,S1=typeof exports=="object"&&exports&&!exports.nodeType&&exports,M1=S1&&typeof module=="object"&&module&&!module.nodeType&&module,qR=M1&&M1.exports===S1,E1=qR?Ct.Buffer:void 0,ZR=E1?E1.isBuffer:void 0,KR=ZR||UR,Hu=KR,QR=9007199254740991,JR=/^(?:0|[1-9]\d*)$/;function tL(t,e){var n=typeof t;return e=e==null?QR:e,!!e&&(n=="number"||n!="symbol"&&JR.test(t))&&t>-1&&t%1==0&&t<e}var Yu=tL,eL=9007199254740991;function nL(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=eL}var Mp=nL,rL="[object Arguments]",iL="[object Array]",aL="[object Boolean]",oL="[object Date]",sL="[object Error]",cL="[object Function]",lL="[object Map]",uL="[object Number]",fL="[object Object]",dL="[object RegExp]",hL="[object Set]",pL="[object String]",vL="[object WeakMap]",gL="[object ArrayBuffer]",yL="[object DataView]",mL="[object Float32Array]",bL="[object Float64Array]",xL="[object Int8Array]",_L="[object Int16Array]",OL="[object Int32Array]",wL="[object Uint8Array]",SL="[object Uint8ClampedArray]",ML="[object Uint16Array]",EL="[object Uint32Array]",Zn={};Zn[mL]=Zn[bL]=Zn[xL]=Zn[_L]=Zn[OL]=Zn[wL]=Zn[SL]=Zn[ML]=Zn[EL]=!0,Zn[rL]=Zn[iL]=Zn[gL]=Zn[aL]=Zn[yL]=Zn[oL]=Zn[sL]=Zn[cL]=Zn[lL]=Zn[uL]=Zn[fL]=Zn[dL]=Zn[hL]=Zn[pL]=Zn[vL]=!1;function AL(t){return Oi(t)&&Mp(t.length)&&!!Zn[ot(t)]}var TL=AL;function PL(t){return function(e){return t(e)}}var Ep=PL,A1=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Gc=A1&&typeof module=="object"&&module&&!module.nodeType&&module,CL=Gc&&Gc.exports===A1,Ap=CL&&it.process,kL=function(){try{var t=Gc&&Gc.require&&Gc.require("util").types;return t||Ap&&Ap.binding&&Ap.binding("util")}catch(e){}}(),Ts=kL,T1=Ts&&Ts.isTypedArray,RL=T1?Ep(T1):TL,P1=RL,LL=Object.prototype,NL=LL.hasOwnProperty;function IL(t,e){var n=Mt(t),r=!n&&Sp(t),i=!n&&!r&&Hu(t),a=!n&&!r&&!i&&P1(t),o=n||r||i||a,s=o?zR(t.length,String):[],c=s.length;for(var l in t)(e||NL.call(t,l))&&!(o&&(l=="length"||i&&(l=="offset"||l=="parent")||a&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||Yu(l,c)))&&s.push(l);return s}var C1=IL,jL=Object.prototype;function DL(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||jL;return t===n}var $u=DL;function BL(t,e){return function(n){return t(e(n))}}var k1=BL,FL=k1(Object.keys,Object),zL=FL,GL=Object.prototype,WL=GL.hasOwnProperty;function HL(t){if(!$u(t))return zL(t);var e=[];for(var n in Object(t))WL.call(t,n)&&n!="constructor"&&e.push(n);return e}var YL=HL;function $L(t){return t!=null&&Mp(t.length)&&!Wt(t)}var Do=$L;function VL(t){return Do(t)?C1(t):YL(t)}var Bo=VL;function XL(t){return b1(t,Bo,wp)}var Tp=XL,UL=1,qL=Object.prototype,ZL=qL.hasOwnProperty;function KL(t,e,n,r,i,a){var o=n&UL,s=Tp(t),c=s.length,l=Tp(e),u=l.length;if(c!=u&&!o)return!1;for(var f=c;f--;){var d=s[f];if(!(o?d in e:ZL.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 _=t.constructor,O=e.constructor;_!=O&&"constructor"in t&&"constructor"in e&&!(typeof _=="function"&&_ instanceof _&&typeof O=="function"&&O instanceof O)&&(v=!1)}return a.delete(t),a.delete(e),v}var QL=KL,JL=be(Ct,"DataView"),Pp=JL,tN=be(Ct,"Promise"),Cp=tN,eN=be(Ct,"Set"),Ps=eN,nN=be(Ct,"WeakMap"),Wc=nN,R1="[object Map]",rN="[object Object]",L1="[object Promise]",N1="[object Set]",I1="[object WeakMap]",j1="[object DataView]",iN=vr(Pp),aN=vr(de),oN=vr(Cp),sN=vr(Ps),cN=vr(Wc),Fo=ot;(Pp&&Fo(new Pp(new ArrayBuffer(1)))!=j1||de&&Fo(new de)!=R1||Cp&&Fo(Cp.resolve())!=L1||Ps&&Fo(new Ps)!=N1||Wc&&Fo(new Wc)!=I1)&&(Fo=function(t){var e=ot(t),n=e==rN?t.constructor:void 0,r=n?vr(n):"";if(r)switch(r){case iN:return j1;case aN:return R1;case oN:return L1;case sN:return N1;case cN:return I1}return e});var Hc=Fo,lN=1,D1="[object Arguments]",B1="[object Array]",Vu="[object Object]",uN=Object.prototype,F1=uN.hasOwnProperty;function fN(t,e,n,r,i,a){var o=Mt(t),s=Mt(e),c=o?B1:Hc(t),l=s?B1:Hc(e);c=c==D1?Vu:c,l=l==D1?Vu:l;var u=c==Vu,f=l==Vu,d=c==l;if(d&&Hu(t)){if(!Hu(e))return!1;o=!0,u=!1}if(d&&!u)return a||(a=new zc),o||P1(t)?y1(t,e,n,r,i,a):CR(t,e,c,n,r,i,a);if(!(n&lN)){var h=u&&F1.call(t,"__wrapped__"),p=f&&F1.call(e,"__wrapped__");if(h||p){var v=h?t.value():t,g=p?e.value():e;return a||(a=new zc),i(v,g,n,r,a)}}return d?(a||(a=new zc),QL(t,e,n,r,i,a)):!1}var dN=fN;function z1(t,e,n,r,i){return t===e?!0:t==null||e==null||!Oi(t)&&!Oi(e)?t!==t&&e!==e:dN(t,e,n,r,z1,i)}var kp=z1;function hN(t,e){return kp(t,e)}var G1=hN;function pN(t,e){for(var n=-1,r=t==null?0:t.length;++n<r&&e(t[n],n,t)!==!1;);return t}var vN=pN,gN=function(){try{var t=be(Object,"defineProperty");return t({},"",{}),t}catch(e){}}(),Xu=gN;function yN(t,e,n){e=="__proto__"&&Xu?Xu(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}var Rp=yN,mN=Object.prototype,bN=mN.hasOwnProperty;function xN(t,e,n){var r=t[e];(!(bN.call(t,e)&&Pe(r,n))||n===void 0&&!(e in t))&&Rp(t,e,n)}var Uu=xN;function _N(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?Rp(n,s,c):Uu(n,s,c)}return n}var Cs=_N;function ON(t,e){return t&&Cs(e,Bo(e),t)}var wN=ON;function SN(t){var e=[];if(t!=null)for(var n in Object(t))e.push(n);return e}var MN=SN,EN=Object.prototype,AN=EN.hasOwnProperty;function TN(t){if(!Ot(t))return MN(t);var e=$u(t),n=[];for(var r in t)r=="constructor"&&(e||!AN.call(t,r))||n.push(r);return n}var PN=TN;function CN(t){return Do(t)?C1(t,!0):PN(t)}var Lp=CN;function kN(t,e){return t&&Cs(e,Lp(e),t)}var RN=kN,W1=typeof exports=="object"&&exports&&!exports.nodeType&&exports,H1=W1&&typeof module=="object"&&module&&!module.nodeType&&module,LN=H1&&H1.exports===W1,Y1=LN?Ct.Buffer:void 0,$1=Y1?Y1.allocUnsafe:void 0;function NN(t,e){if(e)return t.slice();var n=t.length,r=$1?$1(n):new t.constructor(n);return t.copy(r),r}var IN=NN;function jN(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}var V1=jN;function DN(t,e){return Cs(t,wp(t),e)}var BN=DN,FN=k1(Object.getPrototypeOf,Object),Np=FN,zN=Object.getOwnPropertySymbols,GN=zN?function(t){for(var e=[];t;)Op(e,wp(t)),t=Np(t);return e}:x1,X1=GN;function WN(t,e){return Cs(t,X1(t),e)}var HN=WN;function YN(t){return b1(t,Lp,X1)}var U1=YN,$N=Object.prototype,VN=$N.hasOwnProperty;function XN(t){var e=t.length,n=new t.constructor(e);return e&&typeof t[0]=="string"&&VN.call(t,"index")&&(n.index=t.index,n.input=t.input),n}var UN=XN;function qN(t){var e=new t.constructor(t.byteLength);return new Wu(e).set(new Wu(t)),e}var Ip=qN;function ZN(t,e){var n=e?Ip(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}var KN=ZN,QN=/\w*$/;function JN(t){var e=new t.constructor(t.source,QN.exec(t));return e.lastIndex=t.lastIndex,e}var t4=JN,q1=$?$.prototype:void 0,Z1=q1?q1.valueOf:void 0;function e4(t){return Z1?Object(Z1.call(t)):{}}var n4=e4;function r4(t,e){var n=e?Ip(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}var i4=r4,a4="[object Boolean]",o4="[object Date]",s4="[object Map]",c4="[object Number]",l4="[object RegExp]",u4="[object Set]",f4="[object String]",d4="[object Symbol]",h4="[object ArrayBuffer]",p4="[object DataView]",v4="[object Float32Array]",g4="[object Float64Array]",y4="[object Int8Array]",m4="[object Int16Array]",b4="[object Int32Array]",x4="[object Uint8Array]",_4="[object Uint8ClampedArray]",O4="[object Uint16Array]",w4="[object Uint32Array]";function S4(t,e,n){var r=t.constructor;switch(e){case h4:return Ip(t);case a4:case o4:return new r(+t);case p4:return KN(t,n);case v4:case g4:case y4:case m4:case b4:case x4:case _4:case O4:case w4:return i4(t,n);case s4:return new r;case c4:case f4:return new r(t);case l4:return t4(t);case u4:return new r;case d4:return n4(t)}}var M4=S4,K1=Object.create,E4=function(){function t(){}return function(e){if(!Ot(e))return{};if(K1)return K1(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}(),jp=E4;function A4(t){return typeof t.constructor=="function"&&!$u(t)?jp(Np(t)):{}}var T4=A4,P4="[object Map]";function C4(t){return Oi(t)&&Hc(t)==P4}var k4=C4,Q1=Ts&&Ts.isMap,R4=Q1?Ep(Q1):k4,L4=R4,N4="[object Set]";function I4(t){return Oi(t)&&Hc(t)==N4}var j4=I4,J1=Ts&&Ts.isSet,D4=J1?Ep(J1):j4,B4=D4,F4=1,z4=2,G4=4,tb="[object Arguments]",W4="[object Array]",H4="[object Boolean]",Y4="[object Date]",$4="[object Error]",eb="[object Function]",V4="[object GeneratorFunction]",X4="[object Map]",U4="[object Number]",nb="[object Object]",q4="[object RegExp]",Z4="[object Set]",K4="[object String]",Q4="[object Symbol]",J4="[object WeakMap]",tI="[object ArrayBuffer]",eI="[object DataView]",nI="[object Float32Array]",rI="[object Float64Array]",iI="[object Int8Array]",aI="[object Int16Array]",oI="[object Int32Array]",sI="[object Uint8Array]",cI="[object Uint8ClampedArray]",lI="[object Uint16Array]",uI="[object Uint32Array]",Yn={};Yn[tb]=Yn[W4]=Yn[tI]=Yn[eI]=Yn[H4]=Yn[Y4]=Yn[nI]=Yn[rI]=Yn[iI]=Yn[aI]=Yn[oI]=Yn[X4]=Yn[U4]=Yn[nb]=Yn[q4]=Yn[Z4]=Yn[K4]=Yn[Q4]=Yn[sI]=Yn[cI]=Yn[lI]=Yn[uI]=!0,Yn[$4]=Yn[eb]=Yn[J4]=!1;function qu(t,e,n,r,i,a){var o,s=e&F4,c=e&z4,l=e&G4;if(n&&(o=i?n(t,r,i,a):n(t)),o!==void 0)return o;if(!Ot(t))return t;var u=Mt(t);if(u){if(o=UN(t),!s)return V1(t,o)}else{var f=Hc(t),d=f==eb||f==V4;if(Hu(t))return IN(t,s);if(f==nb||f==tb||d&&!i){if(o=c||d?{}:T4(t),!s)return c?HN(t,RN(o,t)):BN(t,wN(o,t))}else{if(!Yn[f])return i?t:{};o=M4(t,f,s)}}a||(a=new zc);var h=a.get(t);if(h)return h;a.set(t,o),B4(t)?t.forEach(function(g){o.add(qu(g,e,n,g,t,a))}):L4(t)&&t.forEach(function(g,y){o.set(y,qu(g,e,n,y,t,a))});var p=l?c?U1:Tp:c?Lp:Bo,v=u?void 0:p(t);return vN(v||t,function(g,y){v&&(y=g,g=t[y]),Uu(o,y,qu(g,e,n,y,t,a))}),o}var rb=qu,fI=1,dI=4;function hI(t){return rb(t,fI|dI)}var ib=hI,pI="[object Symbol]";function vI(t){return typeof t=="symbol"||Oi(t)&&ot(t)==pI}var Yc=vI,gI=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,yI=/^\w*$/;function mI(t,e){if(Mt(t))return!1;var n=typeof t;return n=="number"||n=="symbol"||n=="boolean"||t==null||Yc(t)?!0:yI.test(t)||!gI.test(t)||e!=null&&t in Object(e)}var Dp=mI,bI="Expected a function";function Bp(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(bI);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(Bp.Cache||zu),n}Bp.Cache=zu;var xI=Bp,_I=500;function OI(t){var e=xI(t,function(r){return n.size===_I&&n.clear(),r}),n=e.cache;return e}var wI=OI,SI=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,MI=/\\(\\)?/g,EI=wI(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(SI,function(n,r,i,a){e.push(i?a.replace(MI,"$1"):r||n)}),e}),AI=EI;function TI(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 Zu=TI,PI=1/0,ab=$?$.prototype:void 0,ob=ab?ab.toString:void 0;function sb(t){if(typeof t=="string")return t;if(Mt(t))return Zu(t,sb)+"";if(Yc(t))return ob?ob.call(t):"";var e=t+"";return e=="0"&&1/t==-PI?"-0":e}var Fp=sb;function CI(t){return t==null?"":Fp(t)}var zp=CI;function kI(t,e){return Mt(t)?t:Dp(t,e)?[t]:AI(zp(t))}var ks=kI,RI=1/0;function LI(t){if(typeof t=="string"||Yc(t))return t;var e=t+"";return e=="0"&&1/t==-RI?"-0":e}var Rs=LI;function NI(t,e){e=ks(e,t);for(var n=0,r=e.length;t!=null&&n<r;)t=t[Rs(e[n++])];return n&&n==r?t:void 0}var Ku=NI;function II(t,e,n){var r=t==null?void 0:Ku(t,e);return r===void 0?n:r}var Mr=II,Gp=function(){return Gp=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},Gp.apply(this,arguments)},cb=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 jI(t,e){var n=(0,Jt.useRef)(),r=(0,Jt.useRef)(),i=(0,Jt.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),Wt(v)&&Qt("".concat(v))?u[p]=function(){for(var g=[],y=0;y<arguments.length;y++)g[y]=arguments[y];return Me(v.apply(void 0,g),h)}:Mt(v)?v.forEach(function(g){l(g,h)}):Ot(v)&&l(v,h)})};return(0,Jt.useEffect)(function(){if(n.current&&!G1(r.current,e)){var u=!1;if(r.current){var f=r.current,d=f.data,h=cb(f,["data"]),p=e.data,v=cb(e,["data"]);u=G1(h,v)}r.current=ib(e),u?n.current.changeData(Mr(e,"data")):(l(e),n.current.update(e),n.current.render())}},[e]),(0,Jt.useEffect)(function(){if(!i.current)return function(){return null};r.current||(r.current=ib(e)),l(e);var u=new t(i.current,Gp({},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 DI="*",BI=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[DI]||[],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}(),Wp=BI,S=gt(99938),Hp=gt(73983),dt=gt(54442),Kt=gt(39536),Ls=gt(31767);function lb(){var t=new Ls.WT(9);return Ls.WT!=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 FI(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 eut(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 nut(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 zI(t,e,n,r,i,a,o,s,c){var l=new Ls.WT(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 rut(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 iut(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 aut(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 out(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 sut(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 cut(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 lut(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],_=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+_*l,t[7]=m*i+b*s+_*u,t[8]=m*a+b*c+_*f,t}function uut(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 fut(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 dut(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 hut(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 put(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 vut(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 gut(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 yut(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 mut(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,_=n*l-a*o,O=r*c-i*s,w=r*l-a*s,M=i*l-a*c,E=u*v-f*p,A=u*g-d*p,P=u*y-h*p,C=f*g-d*v,j=f*y-h*v,N=d*y-h*g,k=m*N-b*j+_*C+O*P-w*A+M*E;return k?(k=1/k,t[0]=(s*N-c*j+l*C)*k,t[1]=(c*P-o*N-l*A)*k,t[2]=(o*j-s*P+l*E)*k,t[3]=(i*j-r*N-a*C)*k,t[4]=(n*N-i*P+a*A)*k,t[5]=(r*P-n*j-a*E)*k,t[6]=(v*M-g*w+y*O)*k,t[7]=(g*_-p*M-y*b)*k,t[8]=(p*w-v*_+y*m)*k,t):null}function but(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 xut(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"}function _ut(t){return Math.hypot(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8])}function Out(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 wut(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 Sut(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 Mut(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 Eut(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 Aut(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 Tut=null,Put=null,sr=gt(49953);function br(){var t=new Ls.WT(4);return Ls.WT!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function Cut(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t}function Xa(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 kut(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 Rut(t,e){var n=$I(t,e);return Math.acos(2*n*n-1)}function Ua(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 Lut(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 Nut(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 Iut(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 jut(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 GI(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 WI(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 Dut(t,e,n){return WI(t,e),YI(t,t,n),GI(t,t),t}function Yp(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>Ls.Ib?(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 But(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 $p(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 Fut(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t}function HI(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 Qu(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 zut(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"}var Gut=sr.d9,Vp=sr.al,Ju=sr.JG,Wut=sr.t8,Hut=sr.IH,ub=Ua,YI=sr.bA,$I=sr.AK,Yut=sr.t7,$ut=sr.kE,Vut=null,Xut=sr.we,Uut=null,tf=sr.Fv,qut=sr.I6,Zut=sr.fS,Kut=function(){var t=dt.create(),e=dt.fromValues(1,0,0),n=dt.fromValues(0,1,0);return function(r,i,a){var o=dt.dot(i,a);return o<-.999999?(dt.cross(t,e,i),dt.len(t)<1e-6&&dt.cross(t,n,i),dt.normalize(t,t),Xa(r,t,Math.PI),r):o>.999999?(r[0]=0,r[1]=0,r[2]=0,r[3]=1,r):(dt.cross(t,i,a),r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=1+o,tf(r,r))}}(),Qut=function(){var t=br(),e=br();return function(n,r,i,a,o,s){return Yp(t,r,o,s),Yp(e,i,a,s),Yp(n,t,e,2*s*(1-s)),n}}(),Jut=function(){var t=lb();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],tf(e,HI(e,t))}}(),$c=gt(38015),xr=gt(39696);function ui(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}var me=gt(58622),ef=gt(98104),er=function(t){return(0,ef.Z)(t,"String")},cr=gt(39083),Vc={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0};function fb(t){return Array.isArray(t)&&t.every(function(e){var n=e[0].toLowerCase();return Vc[n]===e.length-1&&"achlmqstvz".includes(n)})}function db(t){return fb(t)&&t.every(function(e){var n=e[0];return n===n.toUpperCase()})}function hb(t){return db(t)&&t.every(function(e){var n=e[0];return"ACLMQZ".includes(n)})}var pb={x1:0,y1:0,x2:0,y2:0,x:0,y:0,qx:null,qy:null};function vb(t){for(var e=t.pathValue[t.segmentStart],n=e.toLowerCase(),r=t.data;r.length>=Vc[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,Vc[n]))),!!Vc[n]););}function VI(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 XI(t){return t>=48&&t<=57||t===43||t===45||t===46}function Ns(t){return t>=48&&t<=57}function UI(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)),!Ns(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&&Ns(l)){t.err="[path-util]: Invalid path value at index "+r+', "'+n[r]+'" illegal number';return}for(;i<e&&Ns(n.charCodeAt(i));)i+=1,o=!0;l=n.charCodeAt(i)}if(l===46){for(c=!0,i+=1;Ns(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&&Ns(n.charCodeAt(i)))for(;i<e&&Ns(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 qI(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 nf(t){for(var e=t.pathValue,n=t.max;t.index<n&&qI(e.charCodeAt(t.index));)t.index+=1}function ZI(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 KI(t){return(t|32)===97}function QI(t){var e=t.max,n=t.pathValue,r=t.index,i=n.charCodeAt(r),a=Vc[n[r].toLowerCase()];if(t.segmentStart=r,!ZI(i)){t.err='[path-util]: Invalid path value "'+n[r]+'" is not a path command';return}if(t.index+=1,nf(t),t.data=[],!a){vb(t);return}for(;;){for(var o=a;o>0;o-=1){if(KI(i)&&(o===3||o===4)?VI(t):UI(t),t.err.length)return;t.data.push(t.param),nf(t),t.index<e&&n.charCodeAt(t.index)===44&&(t.index+=1,nf(t))}if(t.index>=t.max||!XI(n.charCodeAt(t.index)))break}vb(t)}var JI=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 tj(t){if(fb(t))return[].concat(t);var e=new JI(t);for(nf(e);e.index<e.max&&!e.err.length;)QI(e);return e.err?e.err:e.segments}function ej(t){if(db(t))return[].concat(t);var e=tj(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 nj(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 rf(t){if(hb(t))return[].concat(t);for(var e=ej(t),n=(0,S.pi)({},pb),r=0;r<e.length;r+=1){e[r]=nj(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 qa(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 Xp(t,e,n,r,i){var a=ui([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=qa([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 gb(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 rj(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 Xp(t,e,s,c,l).point;var b=(t-s)/2,_=(e-c)/2,O={x:d(m)*b+f(m)*_,y:-f(m)*b+d(m)*_},w=Math.pow(O.x,2)/Math.pow(v,2)+Math.pow(O.y,2)/Math.pow(g,2);w>1&&(v*=h(w),g*=h(w));var M=Math.pow(v,2)*Math.pow(g,2)-Math.pow(v,2)*Math.pow(O.y,2)-Math.pow(g,2)*Math.pow(O.x,2),E=Math.pow(v,2)*Math.pow(O.y,2)+Math.pow(g,2)*Math.pow(O.x,2),A=M/E;A=A<0?0:A;var P=(a!==o?1:-1)*h(A),C={x:P*(v*O.y/g),y:P*(-(g*O.x)/v)},j={x:d(m)*C.x-f(m)*C.y+(t+s)/2,y:f(m)*C.x+d(m)*C.y+(e+c)/2},N={x:(O.x-C.x)/v,y:(O.y-C.y)/g},k=gb({x:1,y:0},N),R={x:(-O.x-C.x)/v,y:(-O.y-C.y)/g},D=gb(N,R);!o&&D>0?D-=2*p:o&&D<0&&(D+=2*p),D%=2*p;var B=k+D*l,F=v*d(B),z=g*f(B),Y={x:d(m)*F-f(m)*z+j.x,y:f(m)*F+d(m)*z+j.y};return Y}function ij(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,_=e,O=0,w=[b,_,O],M=[b,_],E=0,A={x:0,y:0},P=[{x:b,y:_}];m&&l<=0&&(A={x:b,y:_});for(var C=0;C<=y;C+=1){if(E=C/y,f=rj(t,e,n,r,i,a,o,s,c,E),b=f.x,_=f.y,h&&P.push({x:b,y:_}),v&&(O+=ui(M,[b,_])),M=[b,_],m&&O>=l&&l>w[2]){var j=(O-l)/(O-w[2]);A={x:M[0]*(1-j)+w[0]*j,y:M[1]*(1-j)+w[1]*j}}w=[b,_,O]}return m&&l>=O&&(A={x:s,y:c}),{length:O,point:A,min:{x:Math.min.apply(null,P.map(function(N){return N.x})),y:Math.min.apply(null,P.map(function(N){return N.y}))},max:{x:Math.max.apply(null,P.map(function(N){return N.x})),y:Math.max.apply(null,P.map(function(N){return N.y}))}}}function aj(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 yb(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,_=0,O=[m,b,_],w=[m,b],M=0,E={x:0,y:0},A=[{x:m,y:b}];y&&c<=0&&(E={x:m,y:b});for(var P=0;P<=g;P+=1){if(M=P/g,u=aj(t,e,n,r,i,a,o,s,M),m=u.x,b=u.y,d&&A.push({x:m,y:b}),p&&(_+=ui(w,[m,b])),w=[m,b],y&&_>=c&&c>O[2]){var C=(_-c)/(_-O[2]);E={x:w[0]*(1-C)+O[0]*C,y:w[1]*(1-C)+O[1]*C}}O=[m,b,_]}return y&&c>=_&&(E={x:o,y:s}),{length:_,point:E,min:{x:Math.min.apply(null,A.map(function(j){return j.x})),y:Math.min.apply(null,A.map(function(j){return j.y}))},max:{x:Math.max.apply(null,A.map(function(j){return j.x})),y:Math.max.apply(null,A.map(function(j){return j.y}))}}}function oj(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 sj(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],_=[g,y],O=0,w={x:0,y:0},M=[{x:g,y}];v&&o<=0&&(w={x:g,y});for(var E=0;E<=p;E+=1){if(O=E/p,c=oj(t,e,n,r,i,a,O),g=c.x,y=c.y,u&&M.push({x:g,y}),d&&(m+=ui(_,[g,y])),_=[g,y],v&&m>=o&&o>b[2]){var A=(m-o)/(m-b[2]);w={x:_[0]*(1-A)+b[0]*A,y:_[1]*(1-A)+b[1]*A}}b=[g,y,m]}return v&&o>=m&&(w={x:i,y:a}),{length:m,point:w,min:{x:Math.min.apply(null,M.map(function(P){return P.x})),y:Math.min.apply(null,M.map(function(P){return P.y}))},max:{x:Math.max.apply(null,M.map(function(P){return P.x})),y:Math.max.apply(null,M.map(function(P){return P.y}))}}}function mb(t,e,n){for(var r,i,a,o,s,c,l=rf(t),u=typeof e=="number",f,d=[],h,p=0,v=0,g=0,y=0,m,b=[],_=[],O=0,w={x:0,y:0},M=w,E=w,A=w,P=0,C=0,j=l.length;C<j;C+=1)m=l[C],h=m[0],f=h==="M",d=f?d:[p,v].concat(m.slice(1)),f?(g=m[1],y=m[2],w={x:g,y},M=w,O=0,u&&e<.001&&(A=w)):h==="L"?(r=Xp(d[0],d[1],d[2],d[3],(e||0)-P),O=r.length,w=r.min,M=r.max,E=r.point):h==="A"?(i=ij(d[0],d[1],d[2],d[3],d[4],d[5],d[6],d[7],d[8],(e||0)-P,n||{}),O=i.length,w=i.min,M=i.max,E=i.point):h==="C"?(a=yb(d[0],d[1],d[2],d[3],d[4],d[5],d[6],d[7],(e||0)-P,n||{}),O=a.length,w=a.min,M=a.max,E=a.point):h==="Q"?(o=sj(d[0],d[1],d[2],d[3],d[4],d[5],(e||0)-P,n||{}),O=o.length,w=o.min,M=o.max,E=o.point):h==="Z"&&(d=[p,v,g,y],s=Xp(d[0],d[1],d[2],d[3],(e||0)-P),O=s.length,w=s.min,M=s.max,E=s.point),u&&P<e&&P+O>=e&&(A=E),_.push(M),b.push(w),P+=O,c=h!=="Z"?m.slice(-2):[g,y],p=c[0],v=c[1];return u&&e>=P&&(A={x:p,y:v}),{length:P,point:A,min:{x:Math.min.apply(null,b.map(function(N){return N.x})),y:Math.min.apply(null,b.map(function(N){return N.y}))},max:{x:Math.max.apply(null,_.map(function(N){return N.x})),y:Math.max.apply(null,_.map(function(N){return N.y}))}}}function cj(t,e){return mb(t,void 0,(0,S.pi)((0,S.pi)({},e),{bbox:!1,length:!0})).length}var Dr=function(t){return Array.isArray?Array.isArray(t):(0,ef.Z)(t,"Array")},af=function(t){if(Dr(t))return t.reduce(function(e,n){return Math.min(e,n)},t[0])},of=function(t){if(Dr(t))return t.reduce(function(e,n){return Math.max(e,n)},t[0])},lj=1e-5;function Xc(t,e,n){return n===void 0&&(n=lj),Math.abs(t-e)<n}var uj=function(t,e){return(t%e+e)%e},bb=uj;function fj(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 dj(t){return hb(t)&&t.every(function(e){var n=e[0];return"MC".includes(n)})}function sf(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 Up(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,_,O,w,M;if(l)_=l[0],O=l[1],w=l[2],M=l[3];else{b=sf(u,f,-y),u=b.x,f=b.y,b=sf(p,v,-y),p=b.x,v=b.y;var E=(u-p)/2,A=(f-v)/2,P=E*E/(d*d)+A*A/(h*h);P>1&&(P=Math.sqrt(P),d*=P,h*=P);var C=d*d,j=h*h,N=(a===o?-1:1)*Math.sqrt(Math.abs((C*j-C*A*A-j*E*E)/(C*A*A+j*E*E)));w=N*d*A/h+(u+p)/2,M=N*-h*E/d+(f+v)/2,_=Math.asin(((f-M)/h*Math.pow(10,9)>>0)/Math.pow(10,9)),O=Math.asin(((v-M)/h*Math.pow(10,9)>>0)/Math.pow(10,9)),_=u<w?Math.PI-_:_,O=p<w?Math.PI-O:O,_<0&&(_=Math.PI*2+_),O<0&&(O=Math.PI*2+O),o&&_>O&&(_-=Math.PI*2),!o&&O>_&&(O-=Math.PI*2)}var k=O-_;if(Math.abs(k)>g){var R=O,D=p,B=v;O=_+g*(o&&O>_?1:-1),p=w+d*Math.cos(O),v=M+h*Math.sin(O),m=Up(p,v,d,h,i,0,o,D,B,[O,R,w,M])}k=O-_;var F=Math.cos(_),z=Math.sin(_),Y=Math.cos(O),q=Math.sin(O),rt=Math.tan(k/4),st=4/3*d*rt,At=4/3*h*rt,Yt=[u,f],qt=[u+st*z,f-At*F],Rt=[p+st*q,v-At*Y],Lt=[p,v];if(qt[0]=2*Yt[0]-qt[0],qt[1]=2*Yt[1]-qt[1],l)return qt.concat(Rt,Lt,m);m=qt.concat(Rt,Lt,m);for(var le=[],ue=0,we=m.length;ue<we;ue+=1)le[ue]=ue%2?sf(m[ue-1],m[ue],y).y:sf(m[ue],m[ue+1],y).x;return le}function hj(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 xb=function(t,e,n,r){var i=.5,a=qa([t,e],[n,r],i);return(0,S.ev)((0,S.ev)([],a,!0),[n,r,n,r],!1)};function pj(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(Up(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(hj(o[0],o[1],o[2],o[3],o[4],o[5]));case"L":return["C"].concat(xb(s,c,i,a));case"Z":return s===l&&c===u?["C",s,c,l,u,l,u]:["C"].concat(xb(s,c,l,u));default:}return t}function qp(t,e){if(e===void 0&&(e=!1),dj(t)){var n=[].concat(t);return e?[n,[]]:n}for(var r=rf(t),i=(0,S.pi)({},pb),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=pj(r[f],i);r[f]=d,fj(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 vj(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=qa(n,r,e),s=qa(r,i,e),c=qa(i,a,e),l=qa(o,s,e),u=qa(s,c,e),f=qa(l,u,e);return[["C"].concat(o,l,f),["C"].concat(u,c,a)]}function _b(t){return t.map(function(e,n,r){var i=n&&r[n-1].slice(-2).concat(e.slice(1)),a=n?yb(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?vj(i):[e,e]:o=[e],{s:e,ss:o,l:a}})}function Ob(t,e,n){var r=_b(t),i=_b(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:Ob(v[0],v[1],f)}function gj(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 yj(t){var e=0,n=0,r=0;return qp(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=gj(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 wb(t){return yj(t)>=0}function mj(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 bj(t){return t.map(function(e){return Array.isArray(e)?[].concat(e):e})}function xj(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 _j(t,e){var n=t.length-1,r=[],i=0,a=0,o=xj(t);return o.forEach(function(s,c){t.slice(1).forEach(function(l,u){a+=ui(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 Oj=function(t){return(0,ef.Z)(t,"Boolean")},Sb=Oj,zo=function(t){var e=typeof t;return t!==null&&e==="object"||e==="function"},wj=function(t){return t===void 0},nr=wj;function Sj(t,e,n){return mb(t,e,(0,S.pi)((0,S.pi)({},n),{bbox:!1,length:!0})).point}var Mj=gt(52617);function Hr(t,e,n,r){var i=t-n,a=e-r;return Math.sqrt(i*i+a*a)}function cf(t,e){var n=Math.min.apply(Math,(0,S.ev)([],(0,S.CR)(t),!1)),r=Math.min.apply(Math,(0,S.ev)([],(0,S.CR)(e),!1)),i=Math.max.apply(Math,(0,S.ev)([],(0,S.CR)(t),!1)),a=Math.max.apply(Math,(0,S.ev)([],(0,S.CR)(e),!1));return{x:n,y:r,width:i-n,height:a-r}}function Mb(t){return(t+Math.PI*2)%(Math.PI*2)}function Eb(t,e){var n=Math.abs(t);return e>0?n:n*-1}function Ej(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,_=v-m,O=g-b,w=u-m,M=f-b,E=Math.hypot(O,_),A=Math.hypot(M,w),P=E*Math.asin((_*M-O*w)/(E*A)),C=P/Math.sqrt(d+h-v*v-g*g);p+=C,p=Math.min(Math.PI/2,Math.max(0,p))}return{x:t+Eb(v,c),y:e+Eb(g,l)}}function Aj(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 Tj(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 Pj(t,e,n){return Math.atan(-e/t*Math.tan(n))}function Cj(t,e,n){return Math.atan(e/(t*Math.tan(n)))}function kj(t,e,n,r,i,a){return n*Math.cos(i)*Math.cos(a)-r*Math.sin(i)*Math.sin(a)+t}function Rj(t,e,n,r,i,a){return n*Math.sin(i)*Math.cos(a)+r*Math.cos(i)*Math.sin(a)+e}function Lj(t,e,n,r){var i=Math.atan2(r*t,n*e);return(i+Math.PI*2)%(Math.PI*2)}function Ab(t,e,n){return{x:t*Math.cos(n),y:e*Math.sin(n)}}function Tb(t,e,n){var r=Math.cos(n),i=Math.sin(n);return[t*r-e*i,t*i+e*r]}function Nj(t,e,n,r,i,a,o){for(var s=Pj(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=kj(t,e,n,r,i,u[f]);h<c&&(c=h),h>l&&(l=h)}for(var p=Cj(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=Rj(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 tft(t,e,n,r,i,a,o,s,c){var l=Tb(s-t,c-e,-i),u=__read(l,2),f=u[0],d=u[1],h=Ej(0,0,n,r,f,d),p=Lj(n,r,h.x,h.y);p<a?h=Ab(n,r,a):p>o&&(h=Ab(n,r,o));var v=Tb(h.x,h.y,i);return{x:v[0]+t,y:v[1]+e}}function eft(t,e,n,r,i,a,o,s){var c=(o-a)*s+a,l=Aj(t,e,n,r,i,a,o,c),u=Tj(t,e,n,r,i,a,o,c);return Mb(Math.atan2(u,l))}var Ij=1e-4;function Pb(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,(0,S.ev)([],(0,S.CR)(t.concat([h])),!1)),i.apply(void 0,(0,S.ev)([],(0,S.CR)(e.concat([h])),!1))],v=Hr(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<Ij);d++){var y=o-f,m=o+f,p=[i.apply(void 0,(0,S.ev)([],(0,S.CR)(t.concat([y])),!1)),i.apply(void 0,(0,S.ev)([],(0,S.CR)(e.concat([y])),!1))],v=Hr(c[0],c[1],p[0],p[1]);if(y>=0&&v<s)o=y,s=v;else{var b=[i.apply(void 0,(0,S.ev)([],(0,S.CR)(t.concat([m])),!1)),i.apply(void 0,(0,S.ev)([],(0,S.CR)(e.concat([m])),!1))],_=Hr(c[0],c[1],b[0],b[1]);m<=1&&_<s?(o=m,s=_):f*=.5}}return{x:i.apply(void 0,(0,S.ev)([],(0,S.CR)(t.concat([o])),!1)),y:i.apply(void 0,(0,S.ev)([],(0,S.CR)(e.concat([o])),!1))}}function jj(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+=Hr(a,o,s,c)}return n/2}function nft(t,e,n,r){return cf([t,n],[e,r])}function Cb(t,e,n,r){return Hr(t,e,n,r)}function aa(t,e,n,r,i){return{x:(1-i)*t+i*n,y:(1-i)*e+i*r}}function Dj(t,e,n,r,i,a){var o=(n-t)*(i-t)+(r-e)*(a-e);if(o<0)return Hr(t,e,i,a);var s=(n-t)*(n-t)+(r-e)*(r-e);return o>s?Hr(n,r,i,a):kb(t,e,n,r,i,a)}function kb(t,e,n,r,i,a){var o=[n-t,r-e];if($c.I6(o,[0,0]))return Math.sqrt((i-t)*(i-t)+(a-e)*(a-e));var s=[-o[1],o[0]];$c.Fv(s,s);var c=[i-t,a-e];return Math.abs($c.AK(c,s))}function rft(t,e,n,r){return Math.atan2(r-e,n-t)}function Go(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 Rb(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 Lb(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(Xc(i,0))Xc(a,0)||(c=-o/a,c>=0&&c<=1&&s.push(c));else{var f=a*a-4*i*o;Xc(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 Bj(t,e,n,r,i,a,o,s,c){var l=Go(t,n,i,o,c),u=Go(e,r,a,s,c),f=aa(t,e,n,r,c),d=aa(n,r,i,a,c),h=aa(i,a,o,s,c),p=aa(f.x,f.y,d.x,d.y,c),v=aa(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 Zp(t,e,n,r,i,a,o,s,c){if(c===0)return jj([t,n,i,o],[e,r,a,s]);var l=Bj(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 Zp.apply(void 0,__spreadArray([],__read(u),!1))+Zp.apply(void 0,__spreadArray([],__read(f),!1))}function Fj(t,e,n,r,i,a,o,s){for(var c=[t,o],l=[e,s],u=Lb(t,n,i,o),f=Lb(e,r,a,s),d=0;d<u.length;d++)c.push(Go(t,n,i,o,u[d]));for(var d=0;d<f.length;d++)l.push(Go(e,r,a,s,f[d]));return cf(c,l)}function ift(t,e,n,r,i,a,o,s){return Zp(t,e,n,r,i,a,o,s,3)}function zj(t,e,n,r,i,a,o,s,c,l,u){return Pb([t,n,i,o],[e,r,a,s],c,l,Go,u)}function Nb(t,e,n,r,i,a,o,s,c,l,u){var f=zj(t,e,n,r,i,a,o,s,c,l,u);return Hr(f.x,f.y,c,l)}function aft(t,e,n,r,i,a,o,s,c){return{x:Go(t,n,i,o,c),y:Go(e,r,a,s,c)}}function oft(t,e,n,r,i,a,o,s,c){var l=Rb(t,n,i,o,c),u=Rb(e,r,a,s,c);return Mb(Math.atan2(u,l))}function Ib(t){for(var e=0,n=[],r=0;r<t.length-1;r++){var i=t[r],a=t[r+1],o=Hr(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 jb(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+=Hr(r[0],r[1],i[0],i[1])}return e}function Db(t,e){if(e>1||e<0||t.length<2)return null;var n=Ib(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=aa(l[0],l[1],u[0],u[1],d);break}a+=f}return o}function Bb(t,e){if(e>1||e<0||t.length<2)return 0;for(var n=Ib(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 Fb(t,e,n){for(var r=1/0,i=0;i<t.length-1;i++){var a=t[i],o=t[i+1],s=Dj(a[0],a[1],o[0],o[1],e,n);s<r&&(r=s)}return r}function Gj(t){for(var e=[],n=[],r=0;r<t.length;r++){var i=t[r];e.push(i[0]),n.push(i[1])}return cf(e,n)}function Wj(t){return jb(t)}function sft(t,e){return Db(t,e)}function cft(t,e,n){return Fb(t,e,n)}function lft(t,e){return Bb(t,e)}function lf(t){var e=t.slice(0);return t.length&&e.push(t[0]),e}function uft(t){return Gj(t)}function fft(t){return jb(lf(t))}function dft(t,e){return Db(lf(t),e)}function hft(t,e,n){return Fb(lf(t),e,n)}function pft(t,e){return Bb(lf(t),e)}function Uc(t,e,n,r){var i=1-r;return i*i*t+2*r*i*e+r*r*n}function zb(t,e,n){var r=t+n-2*e;if(Xc(r,0))return[.5];var i=(t-e)/r;return i<=1&&i>=0?[i]:[]}function Hj(t,e,n,r,i,a,o){var s=Uc(t,n,i,o),c=Uc(e,r,a,o),l=aa(t,e,n,r,o),u=aa(n,r,i,a,o);return[[t,e,l.x,l.y,s,c],[s,c,u.x,u.y,i,a]]}function Kp(t,e,n,r,i,a,o){if(o===0)return(Hr(t,e,n,r)+Hr(n,r,i,a)+Hr(t,e,i,a))/2;var s=Hj(t,e,n,r,i,a,.5),c=s[0],l=s[1];return c.push(o-1),l.push(o-1),Kp.apply(void 0,__spreadArray([],__read(c),!1))+Kp.apply(void 0,__spreadArray([],__read(l),!1))}function Yj(t,e,n,r,i,a){var o=zb(t,n,i)[0],s=zb(e,r,a)[0],c=[t,i],l=[e,a];return o!==void 0&&c.push(Uc(t,n,i,o)),s!==void 0&&l.push(Uc(e,r,a,s)),cf(c,l)}function vft(t,e,n,r,i,a){return Kp(t,e,n,r,i,a,3)}function $j(t,e,n,r,i,a,o,s){return Pb([t,n,i],[e,r,a],o,s,Uc)}function Vj(t,e,n,r,i,a,o,s){var c=$j(t,e,n,r,i,a,o,s);return Hr(c.x,c.y,o,s)}var Xj=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof gt.g!="undefined"?gt.g:typeof self!="undefined"?self:{},Gb={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(Xj,function(){function n(O,w,M,E,A){r(O,w,M||0,E||O.length-1,A||a)}function r(O,w,M,E,A){for(;E>M;){if(E-M>600){var P=E-M+1,C=w-M+1,j=Math.log(P),N=.5*Math.exp(2*j/3),k=.5*Math.sqrt(j*N*(P-N)/P)*(C-P/2<0?-1:1),R=Math.max(M,Math.floor(w-C*N/P+k)),D=Math.min(E,Math.floor(w+(P-C)*N/P+k));r(O,w,R,D,A)}var B=O[w],F=M,z=E;for(i(O,M,w),A(O[E],B)>0&&i(O,M,E);F<z;){for(i(O,F,z),F++,z--;A(O[F],B)<0;)F++;for(;A(O[z],B)>0;)z--}A(O[M],B)===0?i(O,M,z):(z++,i(O,z,E)),z<=w&&(M=z+1),w<=z&&(E=z-1)}}function i(O,w,M){var E=O[w];O[w]=O[M],O[M]=E}function a(O,w){return O<w?-1:O>w?1:0}var o=function(w){w===void 0&&(w=9),this._maxEntries=Math.max(4,w),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(w){var M=this.data,E=[];if(!m(w,M))return E;for(var A=this.toBBox,P=[];M;){for(var C=0;C<M.children.length;C++){var j=M.children[C],N=M.leaf?A(j):j;m(w,N)&&(M.leaf?E.push(j):y(w,N)?this._all(j,E):P.push(j))}M=P.pop()}return E},o.prototype.collides=function(w){var M=this.data;if(!m(w,M))return!1;for(var E=[];M;){for(var A=0;A<M.children.length;A++){var P=M.children[A],C=M.leaf?this.toBBox(P):P;if(m(w,C)){if(M.leaf||y(w,C))return!0;E.push(P)}}M=E.pop()}return!1},o.prototype.load=function(w){if(!(w&&w.length))return this;if(w.length<this._minEntries){for(var M=0;M<w.length;M++)this.insert(w[M]);return this}var E=this._build(w.slice(),0,w.length-1,0);if(!this.data.children.length)this.data=E;else if(this.data.height===E.height)this._splitRoot(this.data,E);else{if(this.data.height<E.height){var A=this.data;this.data=E,E=A}this._insert(E,this.data.height-E.height-1,!0)}return this},o.prototype.insert=function(w){return w&&this._insert(w,this.data.height-1),this},o.prototype.clear=function(){return this.data=b([]),this},o.prototype.remove=function(w,M){if(!w)return this;for(var E=this.data,A=this.toBBox(w),P=[],C=[],j,N,k;E||P.length;){if(E||(E=P.pop(),N=P[P.length-1],j=C.pop(),k=!0),E.leaf){var R=s(w,E.children,M);if(R!==-1)return E.children.splice(R,1),P.push(E),this._condense(P),this}!k&&!E.leaf&&y(E,A)?(P.push(E),C.push(j),j=0,N=E,E=E.children[0]):N?(j++,E=N.children[j],k=!1):E=null}return this},o.prototype.toBBox=function(w){return w},o.prototype.compareMinX=function(w,M){return w.minX-M.minX},o.prototype.compareMinY=function(w,M){return w.minY-M.minY},o.prototype.toJSON=function(){return this.data},o.prototype.fromJSON=function(w){return this.data=w,this},o.prototype._all=function(w,M){for(var E=[];w;)w.leaf?M.push.apply(M,w.children):E.push.apply(E,w.children),w=E.pop();return M},o.prototype._build=function(w,M,E,A){var P=E-M+1,C=this._maxEntries,j;if(P<=C)return j=b(w.slice(M,E+1)),c(j,this.toBBox),j;A||(A=Math.ceil(Math.log(P)/Math.log(C)),C=Math.ceil(P/Math.pow(C,A-1))),j=b([]),j.leaf=!1,j.height=A;var N=Math.ceil(P/C),k=N*Math.ceil(Math.sqrt(C));_(w,M,E,k,this.compareMinX);for(var R=M;R<=E;R+=k){var D=Math.min(R+k-1,E);_(w,R,D,N,this.compareMinY);for(var B=R;B<=D;B+=N){var F=Math.min(B+N-1,D);j.children.push(this._build(w,B,F,A-1))}}return c(j,this.toBBox),j},o.prototype._chooseSubtree=function(w,M,E,A){for(;A.push(M),!(M.leaf||A.length-1===E);){for(var P=1/0,C=1/0,j=void 0,N=0;N<M.children.length;N++){var k=M.children[N],R=h(k),D=v(w,k)-R;D<C?(C=D,P=R<P?R:P,j=k):D===C&&R<P&&(P=R,j=k)}M=j||M.children[0]}return M},o.prototype._insert=function(w,M,E){var A=E?w:this.toBBox(w),P=[],C=this._chooseSubtree(A,this.data,M,P);for(C.children.push(w),u(C,A);M>=0&&P[M].children.length>this._maxEntries;)this._split(P,M),M--;this._adjustParentBBoxes(A,P,M)},o.prototype._split=function(w,M){var E=w[M],A=E.children.length,P=this._minEntries;this._chooseSplitAxis(E,P,A);var C=this._chooseSplitIndex(E,P,A),j=b(E.children.splice(C,E.children.length-C));j.height=E.height,j.leaf=E.leaf,c(E,this.toBBox),c(j,this.toBBox),M?w[M-1].children.push(j):this._splitRoot(E,j)},o.prototype._splitRoot=function(w,M){this.data=b([w,M]),this.data.height=w.height+1,this.data.leaf=!1,c(this.data,this.toBBox)},o.prototype._chooseSplitIndex=function(w,M,E){for(var A,P=1/0,C=1/0,j=M;j<=E-M;j++){var N=l(w,0,j,this.toBBox),k=l(w,j,E,this.toBBox),R=g(N,k),D=h(N)+h(k);R<P?(P=R,A=j,C=D<C?D:C):R===P&&D<C&&(C=D,A=j)}return A||E-M},o.prototype._chooseSplitAxis=function(w,M,E){var A=w.leaf?this.compareMinX:f,P=w.leaf?this.compareMinY:d,C=this._allDistMargin(w,M,E,A),j=this._allDistMargin(w,M,E,P);C<j&&w.children.sort(A)},o.prototype._allDistMargin=function(w,M,E,A){w.children.sort(A);for(var P=this.toBBox,C=l(w,0,M,P),j=l(w,E-M,E,P),N=p(C)+p(j),k=M;k<E-M;k++){var R=w.children[k];u(C,w.leaf?P(R):R),N+=p(C)}for(var D=E-M-1;D>=M;D--){var B=w.children[D];u(j,w.leaf?P(B):B),N+=p(j)}return N},o.prototype._adjustParentBBoxes=function(w,M,E){for(var A=E;A>=0;A--)u(M[A],w)},o.prototype._condense=function(w){for(var M=w.length-1,E=void 0;M>=0;M--)w[M].children.length===0?M>0?(E=w[M-1].children,E.splice(E.indexOf(w[M]),1)):this.clear():c(w[M],this.toBBox)};function s(O,w,M){if(!M)return w.indexOf(O);for(var E=0;E<w.length;E++)if(M(O,w[E]))return E;return-1}function c(O,w){l(O,0,O.children.length,w,O)}function l(O,w,M,E,A){A||(A=b(null)),A.minX=1/0,A.minY=1/0,A.maxX=-1/0,A.maxY=-1/0;for(var P=w;P<M;P++){var C=O.children[P];u(A,O.leaf?E(C):C)}return A}function u(O,w){return O.minX=Math.min(O.minX,w.minX),O.minY=Math.min(O.minY,w.minY),O.maxX=Math.max(O.maxX,w.maxX),O.maxY=Math.max(O.maxY,w.maxY),O}function f(O,w){return O.minX-w.minX}function d(O,w){return O.minY-w.minY}function h(O){return(O.maxX-O.minX)*(O.maxY-O.minY)}function p(O){return O.maxX-O.minX+(O.maxY-O.minY)}function v(O,w){return(Math.max(w.maxX,O.maxX)-Math.min(w.minX,O.minX))*(Math.max(w.maxY,O.maxY)-Math.min(w.minY,O.minY))}function g(O,w){var M=Math.max(O.minX,w.minX),E=Math.max(O.minY,w.minY),A=Math.min(O.maxX,w.maxX),P=Math.min(O.maxY,w.maxY);return Math.max(0,A-M)*Math.max(0,P-E)}function y(O,w){return O.minX<=w.minX&&O.minY<=w.minY&&w.maxX<=O.maxX&&w.maxY<=O.maxY}function m(O,w){return w.minX<=O.maxX&&w.minY<=O.maxY&&w.maxX>=O.minX&&w.maxY>=O.minY}function b(O){return{children:O,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function _(O,w,M,E,A){for(var P=[w,M];P.length;)if(M=P.pop(),w=P.pop(),!(M-w<=E)){var C=w+Math.ceil((M-w)/E/2)*E;n(O,C,w,M,A),P.push(w,C,C,M)}}return o})})(Gb);var Uj=Gb.exports,St;(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"})(St||(St={}));var Is;(function(t){t[t.ZERO=0]="ZERO",t[t.NEGATIVE_ONE=1]="NEGATIVE_ONE"})(Is||(Is={}));var Za=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}(),qj=function(){function t(e){this.clipSpaceNearZ=Is.NEGATIVE_ONE,this.plugins=[],this.config=(0,S.pi)({enableDirtyCheck:!0,enableCulling:!1,enableAutoRendering:!0,enableDirtyRectangleRendering:!0,enableDirtyRectangleRenderingDebug:!1},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 js(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function Qp(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function uf(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function Wb(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function Zj(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 Kj(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 Ds(t){return t===void 0?0:t>360||t<-360?t%360:t}function ei(t,e,n){return e===void 0&&(e=0),n===void 0&&(n=0),Array.isArray(t)&&t.length===3?dt.clone(t):(0,xr.Z)(t)?dt.fromValues(t,e,n):dt.fromValues(t[0],t[1]||e,t[2]||n)}function rr(t){return t*(Math.PI/180)}function Li(t){return t*(180/Math.PI)}function gft(t){return t=t%400,t<0&&(t+=400),t/400*360}function yft(t){return t/360}function Qj(t){return 360*t}function Jj(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 t6(t,e){var n,r,i=Math.PI*.5,a=(0,S.CR)(Kt.getScaling(dt.create(),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 Jp(t,e){return e.length===16?t6(t,e):Jj(t,e)}function e6(t,e,n,r,i){var a=Math.cos(t),o=Math.sin(t);return zI(r*a,i*o,0,-r*o,i*a,0,e,n,1)}function n6(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 Hb(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=Li(c);return[t[6],t[7],a,o,l]}var oa=Kt.create(),qi=Kt.create(),qc=sr.Ue(),Ye=[dt.create(),dt.create(),dt.create()],Yb=dt.create();function r6(t,e,n,r,i,a){if(!i6(oa,t)||(Kt.copy(qi,oa),qi[3]=0,qi[7]=0,qi[11]=0,qi[15]=1,Math.abs(Kt.determinant(qi))<1e-8))return!1;var o=oa[3],s=oa[7],c=oa[11],l=oa[12],u=oa[13],f=oa[14],d=oa[15];if(o!==0||s!==0||c!==0){qc[0]=o,qc[1]=s,qc[2]=c,qc[3]=d;var h=Kt.invert(qi,qi);if(!h)return!1;Kt.transpose(qi,qi),sr.fF(i,qc,qi)}else i[0]=i[1]=i[2]=0,i[3]=1;if(e[0]=l,e[1]=u,e[2]=f,a6(Ye,oa),n[0]=dt.length(Ye[0]),dt.normalize(Ye[0],Ye[0]),r[0]=dt.dot(Ye[0],Ye[1]),t0(Ye[1],Ye[1],Ye[0],1,-r[0]),n[1]=dt.length(Ye[1]),dt.normalize(Ye[1],Ye[1]),r[0]/=n[1],r[1]=dt.dot(Ye[0],Ye[2]),t0(Ye[2],Ye[2],Ye[0],1,-r[1]),r[2]=dt.dot(Ye[1],Ye[2]),t0(Ye[2],Ye[2],Ye[1],1,-r[2]),n[2]=dt.length(Ye[2]),dt.normalize(Ye[2],Ye[2]),r[1]/=n[2],r[2]/=n[2],dt.cross(Yb,Ye[1],Ye[2]),dt.dot(Ye[0],Yb)<0)for(var p=0;p<3;p++)n[p]*=-1,Ye[p][0]*=-1,Ye[p][1]*=-1,Ye[p][2]*=-1;return a[0]=.5*Math.sqrt(Math.max(1+Ye[0][0]-Ye[1][1]-Ye[2][2],0)),a[1]=.5*Math.sqrt(Math.max(1-Ye[0][0]+Ye[1][1]-Ye[2][2],0)),a[2]=.5*Math.sqrt(Math.max(1-Ye[0][0]-Ye[1][1]+Ye[2][2],0)),a[3]=.5*Math.sqrt(Math.max(1+Ye[0][0]+Ye[1][1]+Ye[2][2],0)),Ye[2][1]>Ye[1][2]&&(a[0]=-a[0]),Ye[0][2]>Ye[2][0]&&(a[1]=-a[1]),Ye[1][0]>Ye[0][1]&&(a[2]=-a[2]),!0}function i6(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 a6(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 t0(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 Er=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){js(this.center,e),js(this.halfExtents,n),Qp(this.min,this.center,this.halfExtents),uf(this.max,this.center,this.halfExtents)},t.prototype.setMinMax=function(e,n){uf(this.center,n,e),Wb(this.center,this.center,.5),Qp(this.halfExtents,n,e),Wb(this.halfExtents,this.halfExtents,.5),js(this.min,e),js(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],_=e.halfExtents,O=_[0],w=_[1],M=_[2],E=y-O,A=y+O,P=m-w,C=m+w,j=b-M,N=b+M;E<u&&(u=E),A>f&&(f=A),P<d&&(d=P),C>h&&(h=C),j<p&&(p=j),N>v&&(v=N),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),_=Math.abs(f),O=Math.abs(d),w=Math.abs(h),M=Math.abs(p),E=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]+_*o[1]+O*o[2],i[2]=w*o[0]+M*o[1]+E*o[2],Qp(this.min,r,i),uf(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=Zj([0,0,0],this.getMin(),e.getMin()),i=Kj([0,0,0],this.getMax(),e.getMax());return n.setMinMax(r,i),n},t.prototype.getNegativeFarPoint=function(e){return e.pnVertexFlag===273?js([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?js([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}(),o6=function(){function t(e,n){this.distance=e||0,this.normal=n||dt.fromValues(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 dt.dot(e,this.normal)-this.distance},t.prototype.normalize=function(){var e=1/dt.len(this.normal);dt.scale(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&&dt.lerp(r,e,n,o),s},t}(),Ka;(function(t){t[t.OUTSIDE=4294967295]="OUTSIDE",t[t.INSIDE=0]="INSIDE",t[t.INDETERMINATE=2147483647]="INDETERMINATE"})(Ka||(Ka={}));var s6=function(){function t(e){if(this.planes=[],e)this.planes=e;else for(var n=0;n<6;n++)this.planes.push(new o6)}return t.prototype.extractFromVPMatrix=function(e){var n=(0,S.CR)(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];dt.set(this.planes[0].normal,o-r,u-s,p-f),this.planes[0].distance=m-v,dt.set(this.planes[1].normal,o+r,u+s,p+f),this.planes[1].distance=m+v,dt.set(this.planes[2].normal,o+i,u+c,p+d),this.planes[2].distance=m+g,dt.set(this.planes[3].normal,o-i,u-c,p-d),this.planes[3].distance=m-g,dt.set(this.planes[4].normal,o-a,u-l,p-h),this.planes[4].distance=m-y,dt.set(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}(),Pr=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}(),Wo=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}(),Cn="Method not implemented.",Bs="Use document.documentElement instead.",c6="Cannot append a destroyed element.",wn;(function(t){t[t.ORBITING=0]="ORBITING",t[t.EXPLORING=1]="EXPLORING",t[t.TRACKING=2]="TRACKING"})(wn||(wn={}));var Zc;(function(t){t[t.DEFAULT=0]="DEFAULT",t[t.ROTATIONAL=1]="ROTATIONAL",t[t.TRANSLATIONAL=2]="TRANSLATIONAL",t[t.CINEMATIC=3]="CINEMATIC"})(Zc||(Zc={}));var fi;(function(t){t[t.ORTHOGRAPHIC=0]="ORTHOGRAPHIC",t[t.PERSPECTIVE=1]="PERSPECTIVE"})(fi||(fi={}));var $b={UPDATED:"updated"},Vb=2e-4,Xb=function(){function t(){this.clipSpaceNearZ=Is.NEGATIVE_ONE,this.eventEmitter=new Hp.Z,this.matrix=Kt.create(),this.right=dt.fromValues(1,0,0),this.up=dt.fromValues(0,1,0),this.forward=dt.fromValues(0,0,1),this.position=dt.fromValues(0,0,1),this.focalPoint=dt.fromValues(0,0,0),this.distanceVector=dt.fromValues(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=Kt.create(),this.projectionMatrixInverse=Kt.create(),this.jitteredProjectionMatrix=void 0,this.enableUpdate=!0,this.type=wn.EXPLORING,this.trackingMode=Zc.DEFAULT,this.projectionMode=fi.PERSPECTIVE,this.frustum=new s6,this.orthoMatrix=Kt.create()}return t.prototype.isOrtho=function(){return this.projectionMode===fi.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===wn.EXPLORING?this.setWorldRotation(!0):this.setWorldRotation(!1),this._getAngles(),this.type===wn.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!==wn.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 Kt.invert(Kt.create(),this.matrix)},t.prototype.getWorldTransform=function(){return this.matrix},t.prototype.jitterProjectionMatrix=function(e,n){var r=Kt.fromTranslation(Kt.create(),[e,n,0]);this.jitteredProjectionMatrix=Kt.multiply(Kt.create(),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===fi.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===fi.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===fi.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===fi.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===fi.ORTHOGRAPHIC?this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far):this.projectionMode===fi.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=dt.fromValues(c-i,l-a,0),f=dt.dot(u,this.right)/dt.length(this.right),d=dt.dot(u,this.up)/dt.length(this.up);return this.pan(-f,-d),this},t.prototype.setPerspective=function(e,n,r,i){var a;this.projectionMode=fi.PERSPECTIVE,this.fov=r,this.near=e,this.far=n,this.aspect=i;var o=this.near*Math.tan(rr(.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 n6(this.projectionMatrix,l,l+c,o,o-s,e,this.far,this.clipSpaceNearZ===Is.ZERO),Kt.scale(this.projectionMatrix,this.projectionMatrix,dt.fromValues(1,-1,1)),Kt.invert(this.projectionMatrixInverse,this.projectionMatrix),this.triggerUpdate(),this},t.prototype.setOrthographic=function(e,n,r,i,a,o){var s;this.projectionMode=fi.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===Is.NEGATIVE_ONE?Kt.ortho(this.projectionMatrix,d,h,v,p,a,o):Kt.orthoZO(this.projectionMatrix,d,h,v,p,a,o),Kt.scale(this.projectionMatrix,this.projectionMatrix,dt.fromValues(1,-1,1)),Kt.invert(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=ei(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=dt.fromValues(0,1,0);if(this.focalPoint=ei(e,n,r),this.trackingMode===Zc.CINEMATIC){var a=dt.subtract(dt.create(),this.focalPoint,this.position);e=a[0],n=a[1],r=a[2];var o=dt.length(a),s=Li(Math.asin(n/o)),c=90+Li(Math.atan2(r,e)),l=Kt.create();Kt.rotateY(l,l,rr(c)),Kt.rotateX(l,l,rr(s)),i=dt.transformMat4(dt.create(),[0,1,0],l)}return Kt.invert(this.matrix,Kt.lookAt(Kt.create(),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<Vb&&(this.distance=Vb),this.dollyingStep=this.distance/100;var n=dt.create();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=Ds(e),this.computeMatrix(),this._getAxes(),this.type===wn.ORBITING||this.type===wn.EXPLORING?this._getPosition():this.type===wn.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},t.prototype.getAzimuth=function(){return this.azimuth},t.prototype.setElevation=function(e){return this.elevation=Ds(e),this.computeMatrix(),this._getAxes(),this.type===wn.ORBITING||this.type===wn.EXPLORING?this._getPosition():this.type===wn.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},t.prototype.getElevation=function(){return this.elevation},t.prototype.setRoll=function(e){return this.roll=Ds(e),this.computeMatrix(),this._getAxes(),this.type===wn.ORBITING||this.type===wn.EXPLORING?this._getPosition():this.type===wn.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=Xa(br(),[0,0,1],rr(this.roll));Kt.identity(this.matrix);var n=Xa(br(),[1,0,0],rr((this.rotateWorld&&this.type!==wn.TRACKING||this.type===wn.TRACKING?1:-1)*this.elevation)),r=Xa(br(),[0,1,0],rr((this.rotateWorld&&this.type!==wn.TRACKING||this.type===wn.TRACKING?1:-1)*this.azimuth)),i=Ua(br(),r,n);i=Ua(br(),i,e);var a=Kt.fromQuat(Kt.create(),i);this.type===wn.ORBITING||this.type===wn.EXPLORING?(Kt.translate(this.matrix,this.matrix,this.focalPoint),Kt.multiply(this.matrix,this.matrix,a),Kt.translate(this.matrix,this.matrix,[0,0,this.distance])):this.type===wn.TRACKING&&(Kt.translate(this.matrix,this.matrix,this.position),Kt.multiply(this.matrix,this.matrix,a))},t.prototype._setPosition=function(e,n,r){this.position=ei(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(){dt.copy(this.right,ei(sr.fF(sr.Ue(),[1,0,0,0],this.matrix))),dt.copy(this.up,ei(sr.fF(sr.Ue(),[0,1,0,0],this.matrix))),dt.copy(this.forward,ei(sr.fF(sr.Ue(),[0,0,1,0],this.matrix))),dt.normalize(this.right,this.right),dt.normalize(this.up,this.up),dt.normalize(this.forward,this.forward)},t.prototype._getAngles=function(){var e=this.distanceVector[0],n=this.distanceVector[1],r=this.distanceVector[2],i=dt.length(this.distanceVector);if(i===0){this.elevation=0,this.azimuth=0;return}this.type===wn.TRACKING?(this.elevation=Li(Math.asin(n/i)),this.azimuth=Li(Math.atan2(-e,-r))):this.rotateWorld?(this.elevation=Li(Math.asin(n/i)),this.azimuth=Li(Math.atan2(-e,-r))):(this.elevation=-Li(Math.asin(n/i)),this.azimuth=-Li(Math.atan2(-e,-r)))},t.prototype._getPosition=function(){dt.copy(this.position,ei(sr.fF(sr.Ue(),[0,0,0,1],this.matrix))),this._getDistance()},t.prototype._getFocalPoint=function(){dt.transformMat3(this.distanceVector,[0,0,-this.distance],FI(lb(),this.matrix)),dt.add(this.focalPoint,this.position,this.distanceVector),this._getDistance()},t.prototype._getDistance=function(){this.distanceVector=dt.subtract(dt.create(),this.focalPoint,this.position),this.distance=dt.length(this.distanceVector),this.dollyingStep=this.distance/100},t.prototype._getOrthoMatrix=function(){if(this.projectionMode===fi.ORTHOGRAPHIC){var e=this.position,n=Xa(br(),[0,0,1],-this.roll*Math.PI/180);Kt.fromRotationTranslationScaleOrigin(this.orthoMatrix,n,dt.fromValues((this.rright-this.left)/2-e[0],(this.top-this.bottom)/2-e[1],0),dt.fromValues(this.zoom,this.zoom,1),e)}},t.prototype.triggerUpdate=function(){if(this.enableUpdate){var e=this.getViewTransform(),n=Kt.multiply(Kt.create(),this.getPerspective(),e);this.getFrustum().extractFromVPMatrix(n),this.eventEmitter.emit($b.UPDATED)}},t.prototype.rotate=function(e,n,r){throw new Error(Cn)},t.prototype.pan=function(e,n){throw new Error(Cn)},t.prototype.dolly=function(e){throw new Error(Cn)},t.prototype.createLandmark=function(e,n){throw new Error(Cn)},t.prototype.gotoLandmark=function(e,n){throw new Error(Cn)},t.prototype.cancelLandmarkAnimation=function(){throw new Error(Cn)},t}();function Yr(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(Yr.Cache||Map),n}Yr.Cache=Map;var oe;(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"})(oe||(oe={}));var wi;(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"})(wi||(wi={}));var Ub;(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"})(Ub||(Ub={}));var e0;(function(t){t[t.kYes=0]="kYes",t[t.kNo=1]="kNo"})(e0||(e0={}));var n0;(function(t){t[t.kYes=0]="kYes",t[t.kNo=1]="kNo"})(n0||(n0={}));var l6=[{name:"em",unit_type:oe.kEms},{name:"px",unit_type:oe.kPixels},{name:"deg",unit_type:oe.kDegrees},{name:"rad",unit_type:oe.kRadians},{name:"grad",unit_type:oe.kGradians},{name:"ms",unit_type:oe.kMilliseconds},{name:"s",unit_type:oe.kSeconds},{name:"rem",unit_type:oe.kRems},{name:"turn",unit_type:oe.kTurns}],Qa;(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"})(Qa||(Qa={}));var u6=function(t){return l6.find(function(e){return e.name===t}).unit_type},f6=function(t){return t?t==="number"?oe.kNumber:t==="percent"||t==="%"?oe.kPercentage:u6(t):oe.kUnknown},d6=function(t){switch(t){case oe.kNumber:case oe.kInteger:return wi.kUNumber;case oe.kPercentage:return wi.kUPercent;case oe.kPixels:return wi.kULength;case oe.kMilliseconds:case oe.kSeconds:return wi.kUTime;case oe.kDegrees:case oe.kRadians:case oe.kGradians:case oe.kTurns:return wi.kUAngle;default:return wi.kUOther}},h6=function(t){switch(t){case wi.kUNumber:return oe.kNumber;case wi.kULength:return oe.kPixels;case wi.kUPercent:return oe.kPercentage;case wi.kUTime:return oe.kSeconds;case wi.kUAngle:return oe.kDegrees;default:return oe.kUnknown}},qb=function(t){var e=1;switch(t){case oe.kPixels:case oe.kDegrees:case oe.kSeconds:break;case oe.kMilliseconds:e=.001;break;case oe.kRadians:e=180/Math.PI;break;case oe.kGradians:e=.9;break;case oe.kTurns:e=360;break}return e},r0=function(t){switch(t){case oe.kNumber:case oe.kInteger:return"";case oe.kPercentage:return"%";case oe.kEms:return"em";case oe.kRems:return"rem";case oe.kPixels:return"px";case oe.kDegrees:return"deg";case oe.kRadians:return"rad";case oe.kGradians:return"grad";case oe.kMilliseconds:return"ms";case oe.kSeconds:return"s";case oe.kTurns:return"turn"}return""},ff=function(){function t(){}return t.isAngle=function(e){return e===oe.kDegrees||e===oe.kRadians||e===oe.kGradians||e===oe.kTurns},t.isLength=function(e){return e>=oe.kEms&&e<oe.kDegrees},t.isRelativeUnit=function(e){return e===oe.kPercentage||e===oe.kEms||e===oe.kRems},t.isTime=function(e){return e===oe.kSeconds||e===oe.kMilliseconds},t.prototype.toString=function(){return this.buildCSSText(e0.kNo,n0.kNo,"")},t.prototype.isNumericValue=function(){return this.getType()>=Qa.kUnitType&&this.getType()<=Qa.kClampType},t}(),p6=function(t){(0,S.ZT)(e,t);function e(n){var r=t.call(this)||this;return r.colorSpace=n,r}return e.prototype.getType=function(){return Qa.kColorType},e.prototype.to=function(n){return this},e}(ff),sa;(function(t){t[t.Constant=0]="Constant",t[t.LinearGradient=1]="LinearGradient",t[t.RadialGradient=2]="RadialGradient"})(sa||(sa={}));var df=function(t){(0,S.ZT)(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 Qa.kColorType},e}(ff),di=function(t){(0,S.ZT)(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 Qa.kKeywordType},e.prototype.buildCSSText=function(n,r,i){return i+this.value},e}(ff),v6=Yr(function(t){return t===void 0&&(t=""),t.replace(/-([a-z])/g,function(e){return e[1].toUpperCase()})}),Zb=function(t){return t.split("").map(function(e,n){return e.toUpperCase()===e?"".concat(n!==0?"-":"").concat(e.toLowerCase()):e}).join("")};function g6(t){if(!t)throw new Error}function Fs(t){return typeof t=="function"}function y6(t){return typeof t=="symbol"}var mft=function(t){return Object.fromEntries(Object.entries(t).filter(function(e){var n=__read(e,2),r=n[1];return r!==void 0}))},m6={d:{alias:"path"},strokeDasharray:{alias:"lineDash"},strokeWidth:{alias:"lineWidth"},textAnchor:{alias:"textAlign"},src:{alias:"img"}},i0=Yr(function(t){var e=v6(t),n=m6[e];return e=(n==null?void 0:n.alias)||e,e}),b6=function(t,e){e===void 0&&(e="");var n="";return Number.isFinite(t)?(g6(Number.isNaN(t)),n="NaN"):t>0?n="infinity":n="-infinity",n+=e},a0=function(t){return h6(d6(t))},kn=function(t){(0,S.ZT)(e,t);function e(n,r){r===void 0&&(r=oe.kNumber);var i=t.call(this)||this,a;return typeof r=="string"?a=f6(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 Qa.kUnitType},e.prototype.convertTo=function(n){if(this.unit===n)return new e(this.value,this.unit);var r=a0(this.unit);if(r!==a0(n)||r===oe.kUnknown)return null;var i=qb(this.unit)/qb(n);return new e(this.value*i,n)},e.prototype.buildCSSText=function(n,r,i){var a;switch(this.unit){case oe.kUnknown:break;case oe.kInteger:a=Number(this.value).toFixed(0);break;case oe.kNumber:case oe.kPercentage:case oe.kEms:case oe.kRems:case oe.kPixels:case oe.kDegrees:case oe.kRadians:case oe.kGradians:case oe.kMilliseconds:case oe.kSeconds:case oe.kTurns:{var o=-999999,s=999999,c=this.value,l=r0(this.unit);if(c<o||c>s){var u=r0(this.unit);!Number.isFinite(c)||Number.isNaN(c)?a=b6(c,u):a=c+(u||"")}else a="".concat(c).concat(l)}}return i+=a,i},e}(ff),Cr=new kn(0,"px");new kn(1,"px");var Ea=new kn(0,"deg"),o0=function(t){(0,S.ZT)(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}(p6),zn=new di("unset"),x6=new di("initial"),_6=new di("inherit"),s0={"":zn,unset:zn,initial:x6,inherit:_6},c0=function(t){return s0[t]||(s0[t]=new di(t)),s0[t]},l0=new o0(0,0,0,0,!0),Kb=new o0(0,0,0,0),O6=Yr(function(t,e,n,r){return new o0(t,e,n,r)},function(t,e,n,r){return"rgba(".concat(t,",").concat(e,",").concat(n,",").concat(r,")")}),ir=function(t,e){return e===void 0&&(e=oe.kNumber),new kn(t,e)},hf=new kn(50,"%"),u0;(function(t){t[t.Standard=0]="Standard"})(u0||(u0={}));var zs;(function(t){t[t.ADDED=0]="ADDED",t[t.REMOVED=1]="REMOVED",t[t.Z_INDEX_CHANGED=2]="Z_INDEX_CHANGED"})(zs||(zs={}));var Qb={absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new Wo(0,0,0,0)},ce;(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>"})(ce||(ce={}));function w6(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 S6=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,F,z){return s(F,function(Y){var q=z();return q&&(R(t.comma)||n("Missing comma before color stops")),{type:B,orientation:q,colorStops:b(_)}})}function s(B,F){var z=R(B);if(z){R(t.startCall)||n("Missing (");var Y=F(z);return R(t.endCall)||n("Missing )"),Y}}function c(){return l()||u()}function l(){return k("directional",t.sideOrCorner,1)}function u(){return k("angular",t.angleValue,1)}function f(){var B,F=d(),z;return F&&(B=[],B.push(F),z=e,R(t.comma)&&(F=d(),F?B.push(F):e=z)),B}function d(){var B=h()||p();if(B)B.at=g();else{var F=v();if(F){B=F;var z=g();z&&(B.at=z)}else{var Y=y();Y&&(B={type:"default-radial",at:Y})}}return B}function h(){var B=k("shape",/^(circle)/i,0);return B&&(B.style=N()||v()),B}function p(){var B=k("shape",/^(ellipse)/i,0);return B&&(B.style=C()||v()),B}function v(){return k("extent-keyword",t.extentKeywords,1)}function g(){if(k("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:C(),y:C()}}function b(B){var F=B(),z=[];if(F)for(z.push(F);R(t.comma);)F=B(),F?z.push(F):n("One extra comma");return z}function _(){var B=O();return B||n("Expected color definition"),B.length=C(),B}function O(){return M()||A()||E()||w()}function w(){return k("literal",t.literalColor,0)}function M(){return k("hex",t.hexColor,1)}function E(){return s(t.rgbColor,function(){return{type:"rgb",value:b(P)}})}function A(){return s(t.rgbaColor,function(){return{type:"rgba",value:b(P)}})}function P(){return R(t.number)[1]}function C(){return k("%",t.percentageValue,1)||j()||N()}function j(){return k("position-keyword",t.positionKeywords,1)}function N(){return k("px",t.pixelValue,1)||k("em",t.emValue,1)}function k(B,F,z){var Y=R(F);if(Y)return{type:B,value:Y[z]}}function R(B){var F=/^[\n\r\t\s]+/.exec(e);F&&D(F[0].length);var z=B.exec(e);return z&&D(z[0].length),z}function D(B){e=e.substring(B)}return function(B){return e=B,r()}}();function M6(t,e,n){var r=rr(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 E6(t,e,n,r,i){var a=n.value,o=r.value;n.unit===oe.kPercentage&&(a=n.value/100*t),r.unit===oe.kPercentage&&(o=r.value/100*e);var s=Math.max(ui([0,0],[a,o]),ui([0,e],[a,o]),ui([t,e],[a,o]),ui([t,0],[a,o]));return i&&(i instanceof kn?s=i.value:i instanceof di&&(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(ui([0,0],[a,o]),ui([0,e],[a,o]),ui([t,e],[a,o]),ui([t,0],[a,o]))))),{x:a,y:o,r:s}}var A6=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,T6=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,P6=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,Jb=/[\d.]+:(#[^\s]+|[^\)]+\))/gi;function C6(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(!(0,me.Z)(c)&&!(0,me.Z)(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 k6={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},R6=Yr(function(t){var e;return t.type==="angular"?e=Number(t.value):e=k6[t.value]||0,ir(e,"deg")}),L6=Yr(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:ir(e,r),cy:ir(n,i)}}),N6=Yr(function(t){var e;if(t.indexOf("linear")>-1||t.indexOf("radial")>-1){var n=S6(t);return n.map(function(s){var c=s.type,l=s.orientation,u=s.colorStops;C6(u);var f=u.map(function(b){return{offset:ir(Number(b.length.value),"%"),color:w6(b)}});if(c==="linear-gradient")return new df(sa.LinearGradient,{angle:l?R6(l):Ea,steps:f});if(c==="radial-gradient"&&(l||(l=[{type:"shape",value:"circle"}]),l[0].type==="shape"&&l[0].value==="circle")){var d=L6(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=c0(m):v=ir(m,y)}return new df(sa.RadialGradient,{cx:h,cy:p,size:v,steps:f})}})}var r=t[0];if(t[1]==="("||t[2]==="("){if(r==="l"){var i=A6.exec(t);if(i){var a=((e=i[2].match(Jb))===null||e===void 0?void 0:e.map(function(s){return s.split(":")}))||[];return[new df(sa.LinearGradient,{angle:ir(parseFloat(i[1]),"deg"),steps:a.map(function(s){var c=(0,S.CR)(s,2),l=c[0],u=c[1];return{offset:ir(Number(l)*100,"%"),color:u}})})]}}else if(r==="r"){var o=I6(t);if(o)if(er(o))t=o;else return[new df(sa.RadialGradient,o)]}else if(r==="p")return j6(t)}});function I6(t){var e,n=T6.exec(t);if(n){var r=((e=n[4].match(Jb))===null||e===void 0?void 0:e.map(function(i){return i.split(":")}))||[];return{cx:ir(50,"%"),cy:ir(50,"%"),steps:r.map(function(i){var a=(0,S.CR)(i,2),o=a[0],s=a[1];return{offset:ir(Number(o)*100,"%"),color:s}})}}return null}function j6(t){var e=P6.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 bft(t){return!!t.type&&!!t.value}function Kc(t){return t&&!!t.image}function pf(t){return t&&!(0,me.Z)(t.r)&&!(0,me.Z)(t.g)&&!(0,me.Z)(t.b)}var Aa=Yr(function(t){if(Kc(t))return(0,S.pi)({repetition:"repeat"},t);if((0,me.Z)(t)&&(t=""),t==="transparent")return Kb;t==="currentColor"&&(t="black");var e=N6(t);if(e)return e;var n=Mj.ZP(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),O6.apply(void 0,(0,S.ev)([],(0,S.CR)(r),!1))});function D6(t,e){if(!(!pf(t)||!pf(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((0,cr.Z)(r[i],0,255));return r[3]=(0,cr.Z)(r[3],0,1),"rgba(".concat(r.join(","),")")}]}function Qc(t,e){if((0,me.Z)(e))return ir(0,"px");if(e="".concat(e).trim().toLowerCase(),isFinite(Number(e))){if("px".search(t)>=0)return ir(Number(e),"px");if("deg".search(t)>=0)return ir(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 ir(Number(e.replace(new RegExp("U"+i,"g"),"").replace(new RegExp(r,"g"),"*0")),i)})[0]}var B6=Yr(function(t){return Qc(new RegExp("px","g"),t)});Yr(function(t){return Qc(new RegExp("%","g"),t)});var Gs=function(t){return(0,xr.Z)(t)||isFinite(Number(t))?ir(Number(t)||0,"px"):Qc(new RegExp("px|%|em|rem","g"),t)},tx=Yr(function(t){return Qc(new RegExp("deg|rad|grad|turn","g"),t)});function F6(t,e,n,r,i){i===void 0&&(i=0);var a="",o=t.value||0,s=e.value||0,c=a0(t.unit),l=t.convertTo(c),u=e.convertTo(c);return l&&u?(o=l.value,s=u.value,a=r0(t.unit)):(kn.isLength(t.unit)||kn.isLength(e.unit))&&(o=Mi(t,i,n),s=Mi(e,i,n),a="px"),[o,s,function(f){return r&&(f=Math.max(f,0)),f+a}]}function Si(t){var e=0;return t.unit===oe.kDegrees?e=t.value:t.unit===oe.kRadians?e=Li(Number(t.value)):t.unit===oe.kTurns&&(e=Qj(Number(t.value))),e}function f0(t,e){var n;return Array.isArray(t)?n=t.map(function(r){return Number(r)}):er(t)?n=t.split(" ").map(function(r){return Number(r)}):(0,xr.Z)(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 ex(t){return er(t)?t.split(" ").map(function(e){return Gs(e)}):t.map(function(e){return Gs(e.toString())})}function Mi(t,e,n){if(t.value===0)return 0;if(t.unit===oe.kPixels)return Number(t.value);if(t.unit===oe.kPercentage&&n){var r=n.nodeName===St.GROUP?n.getLocalBounds():n.geometry.contentBounds;return t.value/100*r.halfExtents[e]*2}return 0}var z6=function(t){return Qc(/deg|rad|grad|turn|px|%/g,t)},G6=["blur","brightness","drop-shadow","contrast","grayscale","sepia","saturate","hue-rotate","invert"];function nx(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,G6.indexOf(r[1])>-1&&n.push({name:r[1],params:r[2].split(" ").map(function(a){return z6(a)||Aa(a)})}),e.lastIndex===t.length)return n}return[]}function rx(t){return t.toString()}var Ho=Yr(function(t){return typeof t=="number"?ir(t):/^\s*[-+]?(\d*\.)?\d+\s*$/.test(t)?ir(Number(t)):ir(0)});Yr(function(t){return er(t)?t.split(" ").map(Ho):t.map(Ho)});function d0(t,e){return[t,e,rx]}function h0(t,e){return function(n,r){return[n,r,function(i){return rx((0,cr.Z)(i,t,e))}]}}function ix(t,e){if(t.length===e.length)return[t,e,function(n){return n}]}function p0(t){return t.parsedStyle.path.totalLength===0&&(t.parsedStyle.path.totalLength=cj(t.parsedStyle.path.absolutePath)),t.parsedStyle.path.totalLength}function W6(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&&vf(o,s)&&(t.splice(e,1),e--)}}}function H6(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 Y6(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 vf(t,e){return t[0]===e[0]&&t[1]===e[1]}function $6(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=Yj(l[0],l[1],c[1],c[2],c[3],c[4]);break;case"C":u=Fj(l[0],l[1],c[1],c[2],c[3],c[4],c[5],c[6]);break;case"A":var f=o.arcParams;u=Nj(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=af(n),h=af(r),p=of(n),v=of(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=gf(o,e),d=d-g.xExtra):s[0]===p&&(g=gf(o,e),p=p+g.xExtra),s[1]===h?(g=gf(o,e),h=h-g.yExtra):s[1]===v&&(g=gf(o,e),v=v+g.yExtra)}return{x:d,y:h,width:p-d,height:v-h}}function gf(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||Xc(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 ax(t,e){return[e[0]+(e[0]-t[0]),e[1]+(e[1]-t[1])]}var ox=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},sx=function(t,e,n,r,i,a,o,s){e=Math.abs(e),n=Math.abs(n),r=bb(r,360);var c=rr(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},_=ox({x:1,y:0},b),O={x:(-f.x-y.x)/e,y:(-f.y-y.y)/n},w=ox(b,O);!a&&w>0?w-=2*Math.PI:a&&w<0&&(w+=2*Math.PI),w%=2*Math.PI;var M=_+w*s,E=e*Math.cos(M),A=n*Math.sin(M),P={x:Math.cos(c)*E-Math.sin(c)*A+m.x,y:Math.sin(c)*E+Math.cos(c)*A+m.y,ellipticalArcStartAngle:_,ellipticalArcEndAngle:_+w,ellipticalArcAngle:M,ellipticalArcCenter:m,resultantRx:e,resultantRy:n};return P};function V6(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=X6(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]&&vf(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=ax(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=ax(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=cx(u,0),_=b.x,O=b.y,w=cx(u,1,!1),M=w.x,E=w.y;u.startTangent=[_,O],u.endTangent=[M,E]}e.push(u)}return e}function cx(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=sx({x:t.prePoint[0],y:t.prePoint[1]},a,s,c,!!l,!!u,{x:t.currentPoint[0],y:t.currentPoint[1]},e),d=sx({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 yf(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function v0(t,e){return yf(t)*yf(e)?(t[0]*e[0]+t[1]*e[1])/(yf(t)*yf(e)):1}function lx(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(v0(t,e))}function X6(t,e){var n=e[1],r=e[2],i=bb(rr(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,_=[(f-g)/n,(d-y)/r],O=[(-1*f-g)/n,(-1*d-y)/r],w=lx([1,0],_),M=lx(_,O);return v0(_,O)<=-1&&(M=Math.PI),v0(_,O)>=1&&(M=0),o===0&&M>0&&(M=M-2*Math.PI),o===1&&M<0&&(M=M+2*Math.PI),{cx:m,cy:b,rx:vf(t,[l,u])?0:n,ry:vf(t,[l,u])?0:r,startAngle:w,endAngle:w+M,xRotation:i,arcFlag:a,sweepFlag:o}}function U6(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=dt.fromValues(l[1]-a,l[2]-s,0);n&&dt.transformMat4(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=dt.fromValues(l[1]-a,l[2]-s,0),h=dt.fromValues(l[3]-a,l[4]-s,0),p=dt.fromValues(l[5]-a,l[6]-s,0);n&&(dt.transformMat4(d,d,n),dt.transformMat4(h,h,n),dt.transformMat4(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=dt.fromValues(l[6]-a,l[7]-s,0);n&&dt.transformMat4(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=dt.fromValues(l[1]-a,l[2]-s,0),h=dt.fromValues(l[3]-a,l[4]-s,0);n&&(dt.transformMat4(d,d,n),dt.transformMat4(h,h,n)),u="".concat(l[0]).concat(l[1],",").concat(l[2],",").concat(l[3],",").concat(l[4],"}")}return c+=u},"")}function q6(t,e,n,r){return[["M",t,e],["L",n,r]]}function ux(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 Z6(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 K6(t,e,n,r,i){if(i){var a=(0,S.CR)(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 g0(t,e){e===void 0&&(e=t.getLocalTransform());var n=[];switch(t.nodeName){case St.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=q6(a,s,l,f);break;case St.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=ux(p,p,g,m);break}case St.ELLIPSE:{var b=t.parsedStyle,_=b.rx,O=_===void 0?0:_,w=b.ry,M=w===void 0?0:w,E=b.cx,g=E===void 0?0:E,A=b.cy,m=A===void 0?0:A;n=ux(O,M,g,m);break}case St.POLYLINE:case St.POLYGON:var P=t.parsedStyle.points;n=Z6(P.points,t.nodeName===St.POLYGON);break;case St.RECT:var C=t.parsedStyle,j=C.width,N=j===void 0?0:j,k=C.height,R=k===void 0?0:k,D=C.x,B=D===void 0?0:D,F=C.y,z=F===void 0?0:F,Y=C.radius,q=Y&&Y.some(function(st){return st!==0});n=K6(N,R,B,z,q&&Y.map(function(st){return(0,cr.Z)(st,0,Math.min(Math.abs(N)/2,Math.abs(R)/2))}));break;case St.PATH:var rt=t.parsedStyle.path.absolutePath;n=(0,S.ev)([],(0,S.CR)(rt),!1);break}if(n.length)return U6(n,t,e)}function xft(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 fx=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=rf(t)}catch(d){e=rf(""),console.error("[g]: Invalid SVG Path definition: ".concat(t))}W6(e);var n=H6(e),r=Y6(e),i=r.polygons,a=r.polylines,o=V6(e),s=$6(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}}},Q6=Yr(fx);function y0(t){return er(t)?Q6(t):fx(t)}function J6(t,e,n){var r=t.curve,i=e.curve;(!r||r.length===0)&&(r=qp(t.absolutePath,!1),t.curve=r),(!i||i.length===0)&&(i=qp(e.absolutePath,!1),e.curve=i);var a=[r,i];r.length!==i.length&&(a=Ob(r,i));var o=wb(a[0])!==wb(a[1])?mj(a[0]):bj(a[0]);return[o,_j(a[1],o),function(s){return s}]}function dx(t,e){var n;er(t)?n=t.split(" ").map(function(u){var f=(0,S.CR)(u.split(","),2),d=f[0],h=f[1];return[Number(d),Number(h)]}):n=t;var r=[],i=0,a,o,s=Wj(n);n.forEach(function(u,f){n[f+1]&&(a=[0,0],a[0]=i/s,o=Cb(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,(0,S.ev)([],(0,S.CR)(n.map(function(u){return u[0]})),!1)),l=Math.min.apply(Math,(0,S.ev)([],(0,S.CR)(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 t8(t,e){return[t.points,e.points,function(n){return n}]}var lr=null;function hi(t){return function(e){var n=0;return t.map(function(r){return r===lr?e[n++]:r})}}function Yo(t){return t}var m0={matrix:["NNNNNN",[lr,lr,0,0,lr,lr,0,0,0,0,1,0,lr,lr,0,1],Yo],matrix3d:["NNNNNNNNNNNNNNNN",Yo],rotate:["A"],rotatex:["A"],rotatey:["A"],rotatez:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",hi([lr,lr,new kn(1)]),Yo],scalex:["N",hi([lr,new kn(1),new kn(1)]),hi([lr,new kn(1)])],scaley:["N",hi([new kn(1),lr,new kn(1)]),hi([new kn(1),lr])],scalez:["N",hi([new kn(1),new kn(1),lr])],scale3d:["NNN",Yo],skew:["Aa",null,Yo],skewx:["A",null,hi([lr,Ea])],skewy:["A",null,hi([Ea,lr])],translate:["Tt",hi([lr,lr,Cr]),Yo],translatex:["T",hi([lr,Cr,Cr]),hi([lr,Cr])],translatey:["T",hi([Cr,lr,Cr]),hi([Cr,lr])],translatez:["L",hi([Cr,Cr,lr])],translate3d:["TTL",Yo]};function mf(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=m0[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"?Ea:tx(p)},N:Ho,T:Gs,L:B6}[d.toUpperCase()](f):h={a:Ea,n:l[0],t:Cr}[d],h===void 0)return[];l.push(h)}if(n.push({t:a,d:l}),e.lastIndex===t.length)return n}return[]}function e8(t){var e,n,r,i;switch(t.t){case"rotatex":return i=rr(Si(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=rr(Si(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=rr(Si(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=rr(Si(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=rr(Si(t.d[0])),f=rr(Si(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=rr(Si(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=rr(Si(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=Mi(t.d[0],0,null)||0,n=Mi(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=Mi(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=Mi(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=Mi(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=Mi(t.d[0],0,null)||0,n=Mi(t.d[1],0,null)||0,r=Mi(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=Mi(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 n8(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 r8(t){return t.length===0?[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]:t.map(e8).reduce(n8)}function hx(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 r6(r8(t),e,n,r,i,a),[[e,n,r,a,i]]}var i8=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 a8(t){return t.toFixed(6).replace(".000000","")}function b0(t,e){var n,r;return t.decompositionPair!==e&&(t.decompositionPair=e,n=hx(t)),e.decompositionPair!==t&&(e.decompositionPair=t,r=hx(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=s8(n[0][3],r[0][3],i[5]),o=i8(i[0],i[1],i[2],a,i[4]),s=o.map(a8).join(",");return s}])}function o8(t,e){for(var n=0,r=0;r<t.length;r++)n+=t[r]*e[r];return n}function s8(t,e,n){var r=o8(t,e);r=(0,cr.Z)(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 x0(t){return t.replace(/[xy]/,"")}function _0(t){return t.replace(/(x|y|z|3d)?$/,"3d")}var c8=function(t,e){return t==="perspective"&&e==="perspective"||(t==="matrix"||t==="matrix3d")&&(e==="matrix"||e==="matrix3d")};function l8(t,e,n){var r=!1;if(!t.length||!e.length){t.length||(r=!0,t=e,e=[]);for(var i=function(w){var M=t[w],E=M.t,A=M.d,P=E.substring(0,5)==="scale"?1:0;e.push({t:E,d:A.map(function(C){return typeof C=="number"?ir(P):ir(P,C.unit)})})},a=0;a<t.length;a++)i(a)}var o=[],s=[],c=[];if(t.length!==e.length){var l=b0(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=m0[u],v=m0[f],g=void 0;if(c8(u,f)){var l=b0([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]&&x0(u)===x0(f))g=x0(u),d=p[2](d),h=v[2](h);else if(p[1]&&v[1]&&_0(u)===_0(f))g=_0(u),d=p[1](d),h=v[1](h);else{var l=b0(t,e);o=[l[0]],s=[l[1]],c=[["matrix",[l[2]]]];break}for(var y=[],m=[],b=[],_=0;_<d.length;_++){var l=F6(d[_],h[_],n,!1,_);y[_]=l[0],m[_]=l[1],b.push(l[2])}o.push(y),s.push(m),c.push([g,b])}if(r){var O=o;o=s,s=O}return[o,s,function(w){return w.map(function(M,E){var A=M.map(function(P,C){return c[E][1][C](P)}).join(",");return c[E][0]==="matrix"&&A.split(",").length===16&&(c[E][0]="matrix3d"),c[E][0]==="matrix3d"&&A.split(",").length===6&&(c[E][0]="matrix"),c[E][0]+"("+A+")"}).join(" ")}]}var px=Yr(function(t){if(er(t)){if(t==="text-anchor")return[ir(0,"px"),ir(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:[Gs(vx(e[0])),Gs(vx(e[1]))]}else return[ir(t[0]||0,"px"),ir(t[1]||0,"px")]});function vx(t){return t==="center"?"50%":t==="left"||t==="top"?"0":t==="right"||t==="bottom"?"100%":t}var O0=[{n:"display",k:["none"]},{n:"opacity",int:!0,inh:!0,d:"1",syntax:ce.OPACITY_VALUE},{n:"fillOpacity",int:!0,inh:!0,d:"1",syntax:ce.OPACITY_VALUE},{n:"strokeOpacity",int:!0,inh:!0,d:"1",syntax:ce.OPACITY_VALUE},{n:"fill",int:!0,k:["none"],d:"none",syntax:ce.PAINT},{n:"fillRule",k:["nonzero","evenodd"],d:"nonzero"},{n:"stroke",int:!0,k:["none"],d:"none",syntax:ce.PAINT,l:!0},{n:"shadowType",k:["inner","outer","both"],d:"outer",l:!0},{n:"shadowColor",int:!0,syntax:ce.COLOR},{n:"shadowOffsetX",int:!0,l:!0,d:"0",syntax:ce.LENGTH_PERCENTAGE},{n:"shadowOffsetY",int:!0,l:!0,d:"0",syntax:ce.LENGTH_PERCENTAGE},{n:"shadowBlur",int:!0,l:!0,d:"0",syntax:ce.SHADOW_BLUR},{n:"lineWidth",int:!0,inh:!0,d:"1",l:!0,a:["strokeWidth"],syntax:ce.LENGTH_PERCENTAGE},{n:"increasedLineWidthForHitTesting",inh:!0,d:"0",l:!0,syntax:ce.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:ce.LENGTH_PERCENTAGE_12},{n:"lineDashOffset",int:!0,inh:!0,d:"0",a:["strokeDashoffset"],syntax:ce.LENGTH_PERCENTAGE},{n:"offsetPath",syntax:ce.DEFINED_PATH},{n:"offsetDistance",int:!0,syntax:ce.OFFSET_DISTANCE},{n:"dx",int:!0,l:!0,d:"0",syntax:ce.LENGTH_PERCENTAGE},{n:"dy",int:!0,l:!0,d:"0",syntax:ce.LENGTH_PERCENTAGE},{n:"zIndex",ind:!0,int:!0,d:"0",k:["auto"],syntax:ce.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:ce.FILTER},{n:"clipPath",syntax:ce.DEFINED_PATH},{n:"textPath",syntax:ce.DEFINED_PATH},{n:"textPathSide",k:["left","right"],d:"left"},{n:"textPathStartOffset",l:!0,d:"0",syntax:ce.LENGTH_PERCENTAGE},{n:"transform",p:100,int:!0,k:["none"],d:"none",syntax:ce.TRANSFORM},{n:"transformOrigin",p:100,d:function(t){return t===St.CIRCLE||t===St.ELLIPSE?"center":t===St.TEXT?"text-anchor":"left top"},l:!0,syntax:ce.TRANSFORM_ORIGIN},{n:"anchor",p:99,d:function(t){return t===St.CIRCLE||t===St.ELLIPSE?"0.5 0.5":"0 0"},l:!0,syntax:ce.LENGTH_PERCENTAGE_12},{n:"cx",int:!0,d:"0",syntax:ce.COORDINATE},{n:"cy",int:!0,d:"0",syntax:ce.COORDINATE},{n:"cz",int:!0,d:"0",syntax:ce.COORDINATE},{n:"r",int:!0,l:!0,d:"0",syntax:ce.LENGTH_PERCENTAGE},{n:"rx",int:!0,l:!0,d:"0",syntax:ce.LENGTH_PERCENTAGE},{n:"ry",int:!0,l:!0,d:"0",syntax:ce.LENGTH_PERCENTAGE},{n:"x",int:!0,d:"0",syntax:ce.COORDINATE},{n:"y",int:!0,d:"0",syntax:ce.COORDINATE},{n:"z",int:!0,d:"0",syntax:ce.COORDINATE},{n:"width",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:ce.LENGTH_PERCENTAGE},{n:"height",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:ce.LENGTH_PERCENTAGE},{n:"radius",int:!0,l:!0,d:"0",syntax:ce.LENGTH_PERCENTAGE_14},{n:"x1",int:!0,l:!0,syntax:ce.COORDINATE},{n:"y1",int:!0,l:!0,syntax:ce.COORDINATE},{n:"z1",int:!0,l:!0,syntax:ce.COORDINATE},{n:"x2",int:!0,l:!0,syntax:ce.COORDINATE},{n:"y2",int:!0,l:!0,syntax:ce.COORDINATE},{n:"z2",int:!0,l:!0,syntax:ce.COORDINATE},{n:"path",int:!0,l:!0,d:"",a:["d"],syntax:ce.PATH,p:50},{n:"points",int:!0,l:!0,syntax:ce.LIST_OF_POINTS,p:50},{n:"text",l:!0,d:"",syntax:ce.TEXT,p:50},{n:"textTransform",l:!0,inh:!0,k:["capitalize","uppercase","lowercase","none"],d:"none",syntax:ce.TEXT_TRANSFORM,p:51},{n:"font",l:!0},{n:"fontSize",int:!0,inh:!0,d:"16px",l:!0,syntax:ce.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:ce.LENGTH,int:!0,d:"0"},{n:"letterSpacing",l:!0,syntax:ce.LENGTH,int:!0,d:"0"},{n:"miterLimit",l:!0,syntax:ce.NUMBER,d:function(t){return t===St.PATH||t===St.POLYGON||t===St.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:ce.MARKER},{n:"markerEnd",syntax:ce.MARKER},{n:"markerMid",syntax:ce.MARKER},{n:"markerStartOffset",syntax:ce.LENGTH,l:!0,int:!0,d:"0"},{n:"markerEndOffset",syntax:ce.LENGTH,l:!0,int:!0,d:"0"}],gx=O0.filter(function(t){return!!t.l}).map(function(t){return t.n}),Ja={},Ws=new WeakMap,u8=function(t,e){var n=Ws.get(t);return!n||n.length===0?!0:n.includes(e)},f8=function(){function t(e){var n=this;this.runtime=e,O0.forEach(function(r){n.registerMetadata(r)})}return t.prototype.registerMetadata=function(e){(0,S.ev)([e.n],(0,S.CR)(e.a||[]),!1).forEach(function(n){Ja[n]=e})},t.prototype.unregisterMetadata=function(e){delete Ja[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:[]}),!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<gx.length;l++)if(gx[l]in n){c=!0;break}}n.fill&&(e.parsedStyle.fill=Aa(n.fill)),n.stroke&&(e.parsedStyle.stroke=Aa(n.stroke)),n.shadowColor&&(e.parsedStyle.shadowColor=Aa(n.shadowColor)),n.filter&&(e.parsedStyle.filter=nx(n.filter)),(0,me.Z)(n.radius)||(e.parsedStyle.radius=f0(n.radius,4)),(0,me.Z)(n.lineDash)||(e.parsedStyle.lineDash=f0(n.lineDash,2)),n.points&&(e.parsedStyle.points=dx(n.points,e)),n.path===""&&(e.parsedStyle.path=(0,S.pi)({},Qb)),n.path&&(e.parsedStyle.path=y0(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=f0(n.anchor,2)),n.transform&&(e.parsedStyle.transform=mf(n.transform)),n.transformOrigin&&(e.parsedStyle.transformOrigin=px(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===St.CIRCLE||e.nodeName===St.ELLIPSE)&&(!(0,me.Z)(n.cx)||!(0,me.Z)(n.cy))||(e.nodeName===St.RECT||e.nodeName===St.IMAGE||e.nodeName===St.GROUP||e.nodeName===St.HTML||e.nodeName===St.TEXT||e.nodeName===St.MESH)&&(!(0,me.Z)(n.x)||!(0,me.Z)(n.y)||!(0,me.Z)(n.z))||e.nodeName===St.LINE&&(!(0,me.Z)(n.x1)||!(0,me.Z)(n.y1)||!(0,me.Z)(n.z1)||!(0,me.Z)(n.x2)||!(0,me.Z)(n.y2)||!(0,me.Z)(n.z2)))&&this.runtime.CSSPropertySyntaxFactory["<coordinate>"].postProcessor(e,a),(0,me.Z)(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),(0,me.Z)(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=d,v=Object.keys(n);v.forEach(function(g){var y;u||(e.attributes[g]=n[g]),!p&&(!((y=Ja[g])===null||y===void 0)&&y.l)&&(p=!0)}),f||v.forEach(function(g){e.computedStyle[g]=i.parseProperty(g,e.attributes[g],e)}),h!=null&&h.length&&(v=Array.from(new Set(v.concat(h)))),v.forEach(function(g){g in e.computedStyle&&(e.parsedStyle[g]=i.computeProperty(g,e.computedStyle[g],e))}),p&&this.updateGeometry(e),v.forEach(function(g){g in e.parsedStyle&&i.postProcessProperty(g,e,v)}),this.runtime.enableCSSParsing&&e.children.length&&v.forEach(function(g){g in e.parsedStyle&&i.isPropertyInheritable(g)&&e.children.forEach(function(y){y.internalSetAttribute(g,null,{skipUpdateAttribute:!0,skipParse:!0})})})},t.prototype.parseProperty=function(e,n,r){var i=Ja[e],a=n;if((n===""||(0,me.Z)(n))&&(n="unset"),n==="unset"||n==="initial"||n==="inherit")a=c0(n);else if(i){var o=i.k,s=i.syntax,c=s&&this.getPropertySyntax(s);o&&o.indexOf(n)>-1?a=c0(n):c&&c.parser&&(a=c.parser(n,r))}return a},t.prototype.computeProperty=function(e,n,r){var i=Ja[e],a=r.id==="g-root",o=n;if(i){var s=i.syntax,c=i.inh,l=i.d;if(n instanceof di){var u=n.value;if(u==="unset"&&(c&&!a?u="inherit":u="initial"),u==="initial")(0,me.Z)(l)||(n=this.parseProperty(e,Fs(l)?l(r.nodeName):l,r));else if(u==="inherit"){var f=this.tryToResolveProperty(r,e,{inherited:!0});if((0,me.Z)(f)){this.addUnresolveProperty(r,e);return}else return f}}var d=s&&this.getPropertySyntax(s);if(d&&d.calculator){var h=r.parsedStyle[e];o=d.calculator(e,h,n,r,this.runtime)}else n instanceof di?o=n.value:o=n}return o},t.prototype.postProcessProperty=function(e,n,r){var i=Ja[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=Ws.get(e);r||(Ws.set(e,[]),r=Ws.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&&u8(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=Ws.get(e);if(n&&n.length){var r={};n.forEach(function(i){r[i]=e.attributes[i]}),this.processProperties(e,r),Ws.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 Er),i.renderBounds||(i.renderBounds=new Er);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,_=m.lineWidth,O=m.increasedLineWidthForHitTesting,w=m.shadowType,M=m.shadowColor,E=m.filter,A=E===void 0?[]:E,P=m.transformOrigin,C=a.anchor;n===St.TEXT?delete a.anchor:n===St.MESH&&(a.anchor[2]=.5);var j=[(1-(C&&C[0]||0)*2)*s/2+d,(1-(C&&C[1]||0)*2)*c/2+p,(1-(C&&C[2]||0)*2)*y[2]+g];i.contentBounds.update(j,y);var N=n===St.POLYLINE||n===St.POLYGON||n===St.PATH?Math.SQRT2:.5,k=b&&!b.isNone;if(k){var R=((_||0)+(O||0))*N;y[0]+=R,y[1]+=R}if(i.renderBounds.update(j,y),M&&w&&w!=="inner"){var D=i.renderBounds,B=D.min,F=D.max,z=a,Y=z.shadowBlur,q=z.shadowOffsetX,rt=z.shadowOffsetY,st=Y||0,At=q||0,Yt=rt||0,qt=B[0]-st+At,Rt=F[0]+st+At,Lt=B[1]-st+Yt,le=F[1]+st+Yt;B[0]=Math.min(B[0],qt),F[0]=Math.max(F[0],Rt),B[1]=Math.min(B[1],Lt),F[1]=Math.max(F[1],le),i.renderBounds.setMinMax(B,F)}A.forEach(function(Je){var hn=Je.name,xn=Je.params;if(hn==="blur"){var Un=xn[0].value;i.renderBounds.update(i.renderBounds.center,uf(i.renderBounds.halfExtents,i.renderBounds.halfExtents,[Un,Un,0]))}else if(hn==="drop-shadow"){var mr=xn[0].value,xi=xn[1].value,Va=xn[2].value,ws=i.renderBounds,si=ws.min,Ui=ws.max,An=si[0]-Va+mr,_n=Ui[0]+Va+mr,ar=si[1]-Va+xi,Tn=Ui[1]+Va+xi;si[0]=Math.min(si[0],An),Ui[0]=Math.max(Ui[0],_n),si[1]=Math.min(si[1],ar),Ui[1]=Math.max(Ui[1],Tn),i.renderBounds.setMinMax(si,Ui)}}),C=a.anchor;var ue=s<0,we=c<0,Ue=(ue?-1:1)*(P?Mi(P[0],0,e):0),ze=(we?-1:1)*(P?Mi(P[1],1,e):0);Ue=Ue-(ue?-1:1)*(C&&C[0]||0)*i.contentBounds.halfExtents[0]*2,ze=ze-(we?-1:1)*(C&&C[1]||0)*i.contentBounds.halfExtents[1]*2,e.setOrigin(Ue,ze),this.runtime.sceneGraphService.dirtifyToRoot(e)}},t.prototype.isPropertyInheritable=function(e){var n=Ja[e];return n?n.inh:!1},t}(),d8=function(){function t(){this.parser=tx,this.parserWithCSSDisabled=null,this.mixer=d0}return t.prototype.calculator=function(e,n,r,i){return Si(r)},t}(),h8=function(){function t(){}return t.prototype.calculator=function(e,n,r,i,a){return r instanceof di&&(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}(),p8=function(){function t(){this.parser=Aa,this.parserWithCSSDisabled=Aa,this.mixer=D6}return t.prototype.calculator=function(e,n,r,i){return r instanceof di?r.value==="none"?l0:Kb:r},t}(),v8=function(){function t(){this.parser=nx}return t.prototype.calculator=function(e,n,r){return r instanceof di?[]:r},t}();function yx(t){var e=t.parsedStyle.fontSize;return(0,me.Z)(e)?null:e}var w0=function(){function t(){this.parser=Gs,this.parserWithCSSDisabled=null,this.mixer=d0}return t.prototype.calculator=function(e,n,r,i,a){var o;if((0,xr.Z)(r))return r;if(kn.isRelativeUnit(r.unit)){var s=a.styleValueRegistry;if(r.unit===oe.kPercentage)return 0;if(r.unit===oe.kEms){if(i.parentNode){var c=yx(i.parentNode);if(c)return c*=r.value,c;s.addUnresolveProperty(i,e)}else s.addUnresolveProperty(i,e);return 0}else if(r.unit===oe.kRems){if(!((o=i==null?void 0:i.ownerDocument)===null||o===void 0)&&o.documentElement){var c=yx(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}(),g8=function(){function t(){this.mixer=ix}return t.prototype.parser=function(e){var n=ex((0,xr.Z)(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}(),y8=function(){function t(){this.mixer=ix}return t.prototype.parser=function(e){var n=ex((0,xr.Z)(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}(),Jc=Kt.create();function S0(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||[Cr,Cr];e.translateLocal(c[0].value,c[1].value,0)}else if(a==="translatex"){var c=o||[Cr];e.translateLocal(c[0].value,0,0)}else if(a==="translatey"){var c=o||[Cr];e.translateLocal(0,c[0].value,0)}else if(a==="translatez"){var c=o||[Cr];e.translateLocal(0,0,c[0].value)}else if(a==="translate3d"){var c=o||[Cr,Cr,Cr];e.translateLocal(c[0].value,c[1].value,c[2].value)}else if(a==="rotate"){var l=o||[Ea];e.rotateLocal(0,0,Si(l[0]))}else if(a==="rotatex"){var l=o||[Ea];e.rotateLocal(Si(l[0]),0,0)}else if(a==="rotatey"){var l=o||[Ea];e.rotateLocal(0,Si(l[0]),0)}else if(a==="rotatez"){var l=o||[Ea];e.rotateLocal(0,0,Si(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(rr(u[0]),rr(u[1]))}else if(a==="skewx"){var u=(o==null?void 0:o.map(function(b){return b.value}))||[0];e.setLocalSkew(rr(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],rr(u[0]))}else if(a==="matrix"){var f=(0,S.CR)(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(Kt.set(Jc,d,h,0,0,p,v,0,0,0,0,1,0,g+n,y+r,0,1))}else a==="matrix3d"&&(Kt.set.apply(Kt,(0,S.ev)([Jc],(0,S.CR)(o.map(function(m){return m.value})),!1)),Jc[12]+=n,Jc[13]+=r,e.setLocalTransform(Jc))}),e.getLocalTransform()}var m8=function(t){(0,S.ZT)(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 St.CIRCLE:case St.ELLIPSE:var s=n.parsedStyle,c=s.cx,l=s.cy,u=s.cz;(0,me.Z)(c)||(i=c),(0,me.Z)(l)||(a=l),(0,me.Z)(u)||(o=u);break;case St.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 St.RECT:case St.IMAGE:case St.GROUP:case St.HTML:case St.TEXT:case St.MESH:(0,me.Z)(n.parsedStyle.x)||(i=n.parsedStyle.x),(0,me.Z)(n.parsedStyle.y)||(a=n.parsedStyle.y),(0,me.Z)(n.parsedStyle.z)||(o=n.parsedStyle.z);break}n.nodeName!==St.PATH&&n.nodeName!==St.POLYLINE&&n.nodeName!==St.POLYGON&&(n.parsedStyle.defX=i||0,n.parsedStyle.defY=a||0);var m=!(0,me.Z)(i)||!(0,me.Z)(a)||!(0,me.Z)(o);if(m&&r.indexOf("transform")===-1){var b=n.parsedStyle.transform;if(b&&b.length)S0(b,n);else{var _=(0,S.CR)(n.getLocalPosition(),3),O=_[0],w=_[1],M=_[2];n.setLocalPosition((0,me.Z)(i)?O:i,(0,me.Z)(a)?w:a,(0,me.Z)(o)?M:o)}}},e}(w0),b8=function(){function t(){}return t.prototype.calculator=function(e,n,r,i){r instanceof di&&(r=null);var a=r==null?void 0:r.cloneNode(!0);return a&&(a.style.isMarker=!0),a},t}(),x8=function(){function t(){this.mixer=d0,this.parser=Ho,this.parserWithCSSDisabled=null}return t.prototype.calculator=function(e,n,r){return r.value},t}(),_8=function(){function t(){this.parser=Ho,this.parserWithCSSDisabled=null,this.mixer=h0(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===St.LINE||a===St.PATH||a===St.POLYLINE){var o=r.getPoint(i);o&&(e.parsedStyle.defX=o.x,e.parsedStyle.defY=o.y,e.setLocalPosition(o.x,o.y))}}},t}(),O8=function(){function t(){this.parser=Ho,this.parserWithCSSDisabled=null,this.mixer=h0(0,1)}return t.prototype.calculator=function(e,n,r){return r.value},t}(),w8=function(){function t(){this.parser=y0,this.parserWithCSSDisabled=y0,this.mixer=J6}return t.prototype.calculator=function(e,n,r){return r instanceof di&&r.value==="unset"?{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new Wo(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===St.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}(),S8=function(){function t(){this.parser=dx,this.mixer=t8}return t.prototype.postProcessor=function(e,n){if((e.nodeName===St.POLYGON||e.nodeName===St.POLYLINE)&&n.indexOf("transform")===-1){var r=e.parsedStyle,i=r.defX,a=r.defY;e.setLocalPosition(i,a)}},t}(),M8=function(t){(0,S.ZT)(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.mixer=h0(0,1/0),n}return e}(w0),E8=function(){function t(){}return t.prototype.calculator=function(e,n,r,i){return r instanceof di?r.value==="unset"?"":r.value:"".concat(r)},t.prototype.postProcessor=function(e){e.nodeValue="".concat(e.parsedStyle.text)||""},t}(),A8=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}(),M0={},T8=0;function P8(t,e){if(t){var n=typeof t=="string"?t:t.id||T8++;M0[n]&&M0[n].destroy(),M0[n]=e}}var tl=typeof window!="undefined"&&typeof window.document!="undefined";function C8(t){return!!t.getAttribute}function k8(t,e){for(var n=0,r=t.length;n<r;){var i=n+r>>>1;mx(t[i],e)<0?n=i+1:r=i}return n}function mx(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 bx(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 xx="px";function R8(t,e,n){tl&&t.style&&(t.style.width=e+xx,t.style.height=n+xx)}function _x(t,e){if(tl)return document.defaultView.getComputedStyle(t,null).getPropertyValue(e)}function L8(t){var e=_x(t,"width");return e==="auto"?t.offsetWidth:parseFloat(e)}function N8(t){var e=_x(t,"height");return e==="auto"?t.offsetHeight:parseFloat(e)}var I8=1,j8={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"},E0=typeof performance=="object"&&performance.now?performance:Date;function $o(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 D8=1,B8=function(){return D8++},ca=typeof self=="object"&&self.self==self?self:typeof gt.g=="object"&&gt.g.global==gt.g?gt.g:{},F8=Date.now(),z8=function(){return ca.performance&&typeof ca.performance.now=="function"?ca.performance.now():Date.now()-F8},el={},Ox=Date.now(),G8=function(t){if(typeof t!="function")throw new TypeError(t+" is not a function");var e=Date.now(),n=e-Ox,r=n>16?0:16-n,i=B8();return el[i]=t,Object.keys(el).length>1||setTimeout(function(){Ox=e;var a=el;el={},Object.keys(a).forEach(function(o){return a[o](z8())})},r),i},W8=function(t){delete el[t]},H8=["","webkit","moz","ms","o"],wx=function(t){return typeof t!="string"?G8:t===""?ca.requestAnimationFrame:ca[t+"RequestAnimationFrame"]},Y8=function(t){return typeof t!="string"?W8:t===""?ca.cancelAnimationFrame:ca[t+"CancelAnimationFrame"]||ca[t+"CancelRequestAnimationFrame"]},$8=function(t,e){for(var n=0;t[n]!==void 0;){if(e(t[n]))return t[n];n=n+1}},Sx=$8(H8,function(t){return!!wx(t)}),Mx=wx(Sx),Ex=Y8(Sx);ca.requestAnimationFrame=Mx,ca.cancelAnimationFrame=Ex;var V8=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,(0,S.ev)([],(0,S.CR)(e),!1))}))},t}(),X8=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(0,S.mG)(this,void 0,void 0,function(){var r,i,a,o;return(0,S.Jh)(this,function(s){switch(s.label){case 0:return this.callbacks.length?[4,(o=this.callbacks)[0].apply(o,(0,S.ev)([],(0,S.CR)(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}(),ni=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}(),A0=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}(),U8=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],q8=/([\"\'])[^\'\"]+\1/;function Z8(t){for(var e=t.fontSize,n=t.fontFamily,r=t.fontStyle,i=t.fontVariant,a=t.fontWeight,o=(0,xr.Z)(e)&&"".concat(e,"px")||"16px",s=n.split(","),c=s.length-1;c>=0;c--){var l=s[c].trim();!q8.test(l)&&U8.indexOf(l)<0&&(l='"'.concat(l,'"')),s[c]=l}return"".concat(r," ").concat(i," ").concat(a," ").concat(o," ").concat(s.join(","))}var K8=function(){function t(){this.parser=mf,this.parserWithCSSDisabled=mf,this.mixer=l8}return t.prototype.calculator=function(e,n,r,i){return r instanceof di?[]:r},t.prototype.postProcessor=function(e){var n=e.parsedStyle.transform;S0(n,e)},t}(),Q8=function(){function t(){this.parser=px}return t}(),J8=function(){function t(){this.parser=Ho}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=zs.Z_INDEX_CHANGED)}},t}(),tD=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}(),eD=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}(),nD=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}(),rD=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}(),iD=function(){function t(){}return t.prototype.update=function(e){if(e.points&&Dr(e.points.points)){var n=e.points.points,r=Math.min.apply(Math,(0,S.ev)([],(0,S.CR)(n.map(function(l){return l[0]})),!1)),i=Math.max.apply(Math,(0,S.ev)([],(0,S.CR)(n.map(function(l){return l[0]})),!1)),a=Math.min.apply(Math,(0,S.ev)([],(0,S.CR)(n.map(function(l){return l[1]})),!1)),o=Math.max.apply(Math,(0,S.ev)([],(0,S.CR)(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}(),aD=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&&!er(r)&&(c||(c=r.width,e.width=c),l||(l=r.height,e.height=l)),{width:c,height:l}},t}(),oD=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&&!(0,me.Z)(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 _=0;return c==="middle"?_=y[1]:c==="top"||c==="hanging"?_=y[1]*2:c==="alphabetic"?_=this.globalRuntime.enableCSSParsing?v-g.ascent:0:(c==="bottom"||c==="ideographic")&&(_=0),l&&(b+=l),u&&(_+=u),e.anchor=[m[0],m[1],0],{width:y[0]*2,height:y[1]*2,offsetX:b,offsetY:_}},t}();function sD(t){return!!t.type}var bf=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 Pr,this.page=new Pr,this.canvas=new Pr,this.viewport=new Pr,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(Cn)},t}(),Ax=function(t){(0,S.ZT)(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.client=new Pr,n.movement=new Pr,n.offset=new Pr,n.global=new Pr,n.screen=new Pr,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(Cn)},e}(bf),T0=function(t){(0,S.ZT)(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||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}(Ax),P0=function(t){(0,S.ZT)(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.clone=function(){return this.manager.cloneWheelEvent(this)},e}(Ax),Nn=function(t){(0,S.ZT)(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}(bf),Tx=":",Px=function(){function t(){this.emitter=new Hp.Z}return t.prototype.on=function(e,n,r){return this.addEventListener(e,n,r),this},t.prototype.addEventListener=function(e,n,r){var i=Sb(r)&&r||zo(r)&&r.capture,a=zo(r)&&r.once,o=Fs(n)?void 0:n,s=!1,c="";if(e.indexOf(Tx)>-1){var l=(0,S.CR)(e.split(Tx),2),u=l[0],f=l[1];e=f,c=u,s=!0}if(e=i?"".concat(e,"capture"):e,n=Fs(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,(0,S.ev)([],(0,S.CR)(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=Sb(r)&&r||zo(r)&&r.capture,a=Fs(n)?void 0:n;return e=i?"".concat(e,"capture"):e,n=Fs(n)?n:n==null?void 0:n.handleEvent,this.emitter.off(e,n,a),this},t.prototype.emit=function(e,n){this.dispatchEvent(new Nn(e,n))},t.prototype.dispatchEvent=function(e,n){var r,i;if(n===void 0&&(n=!1),!sD(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}(),kr=function(t){(0,S.ZT)(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||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===St.TEXT&&(i+=this.style.text);try{for(var a=(0,S.XA)(this.childNodes),o=a.next();!o.done;o=a.next()){var s=o.value;s.nodeName===St.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===St.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(Cn)},e.prototype.lookupNamespaceURI=function(n){throw new Error(Cn)},e.prototype.lookupPrefix=function(n){throw new Error(Cn)},e.prototype.normalize=function(){throw new Error(Cn)},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}(Px),cD=2048,lD=function(){function t(e,n){var r=this;this.globalRuntime=e,this.context=n,this.emitter=new Hp.Z,this.cursor="default",this.mappingTable={},this.mappingState={trackingData:{}},this.eventPool=new Map,this.tmpMatrix=Kt.create(),this.tmpVec3=dt.create(),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=E0.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")}kr.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"),kr.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&&kr.isNode(c)&&c.parentNode;p&&p!==(kr.isNode(r.rootTarget)&&r.rootTarget.parentNode)&&p!==a.target;)p=p.parentNode;var v=!p||p===(kr.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!==(kr.isNode(r.rootTarget)&&r.rootTarget.parentNode);)g.currentTarget=g.target,r.notifyTarget(g),o&&r.notifyTarget(g,"mouseenter"),kr.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!==(kr.isNode(r.rootTarget)&&r.rootTarget.parentNode);)l.currentTarget=l.target,r.notifyTarget(l),o&&r.notifyTarget(l,"mouseleave"),kr.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!==(kr.isNode(r.rootTarget)&&r.rootTarget.parentNode);)c.currentTarget=c.target,r.notifyTarget(c),s&&r.notifyTarget(c,"mouseenter"),kr.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"),kr.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 Pr(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 Pr(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=Kt.multiply(this.tmpMatrix,u,l),d=dt.set(this.tmpVec3,n/s*2-1,(1-r/c)*2-1,0);return dt.transformMat4(d,d,f),new Pr(d[0],d[1])},t.prototype.canvas2Viewport=function(e){var n=this.rootTarget.defaultView,r=n.getCamera(),i=r.getPerspective(),a=r.getViewTransform(),o=Kt.multiply(this.tmpMatrix,i,a),s=dt.set(this.tmpVec3,e.x,e.y,0);dt.transformMat4(this.tmpVec3,this.tmpVec3,o);var c=this.context.config,l=c.width,u=c.height;return new Pr((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<cD&&e!==this.rootTarget;i++)kr.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){var n,r=this.context.contextService.getDomElement(),i=(n=e.nativeEvent)===null||n===void 0?void 0:n.target;if(i){if(i===r)return!0;if(r&&r.contains)return r.contains(i)}return e.nativeEvent.composedPath?e.nativeEvent.composedPath().indexOf(r)>-1:!1},t.prototype.getExistedHTML=function(e){var n,r;if(e.nativeEvent.composedPath)try{for(var i=(0,S.XA)(e.nativeEvent.composedPath()),a=i.next();!a.done;a=i.next()){var o=a.value,s=this.globalRuntime.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(T0);this.copyPointerData(e,a),this.copyMouseData(e,a),this.copyData(e,a),a.nativeEvent=e.nativeEvent,a.originalEvent=e;var o=this.getExistedHTML(a);return a.target=r!=null?r:o||this.isNativeEventFromCanvas(a)&&this.pickTarget(a)||i,typeof n=="string"&&(a.type=n),a},t.prototype.createWheelEvent=function(e){var n=this.allocateEvent(P0);this.copyWheelData(e,n),this.copyMouseData(e,n),this.copyData(e,n),n.nativeEvent=e.nativeEvent,n.originalEvent=e;var r=this.getExistedHTML(n);return n.target=r||this.isNativeEventFromCanvas(n)&&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(P0);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(T0);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=E0.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||kr.isNode(i)&&i.parentNode===n)n=e[r];else break}return n},t.prototype.getCursor=function(e){for(var n=e;n;){var r=C8(n)&&n.getAttribute("cursor");if(r)return r;n=kr.isNode(n)&&n.parentNode}},t}(),uD=function(){function t(){}return t.prototype.getOrCreateCanvas=function(e,n){if(this.canvas)return this.canvas;if(e||Pt.offscreenCanvas)this.canvas=e||Pt.offscreenCanvas,this.context=this.canvas.getContext("2d",(0,S.pi)({willReadFrequently:!0},n));else try{this.canvas=new window.OffscreenCanvas(0,0),this.context=this.canvas.getContext("2d",(0,S.pi)({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",(0,S.pi)({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}(),to;(function(t){t[t.CAMERA_CHANGED=0]="CAMERA_CHANGED",t[t.DISPLAY_OBJECT_CHANGED=1]="DISPLAY_OBJECT_CHANGED",t[t.NONE=2]="NONE"})(to||(to={}));var fD=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 ni,initAsync:new V8,dirtycheck:new A0,cull:new A0,beginFrame:new ni,beforeRender:new ni,render:new ni,afterRender:new ni,endFrame:new ni,destroy:new ni,pick:new X8,pickSync:new A0,pointerDown:new ni,pointerUp:new ni,pointerMove:new ni,pointerOut:new ni,pointerOver:new ni,pointerWheel:new ni,pointerCancel:new ni,click:new ni}}return t.prototype.init=function(e){var n=this,r=(0,S.pi)((0,S.pi)({},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(to.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(to.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!==zs.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=k8(n.sorted,r);n.sorted.splice(o,0,r)}}):n.sorted=e.childNodes.slice().sort(mx)},t.prototype.destroy=function(){this.inited=!1,this.hooks.destroy.call(),this.globalRuntime.sceneGraphService.clearPendingEvents()},t.prototype.dirtify=function(){this.context.renderingContext.renderReasons.add(to.DISPLAY_OBJECT_CHANGED)},t}(),dD=/\[\s*(.*)=(.*)\s*\]/,hD=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(dD),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(0,me.Z)(r)?"":r.toString?r.toString():""},t}(),eo=function(t){(0,S.ZT)(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}(bf),Ie;(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"})(Ie||(Ie={}));function Cx(t){var e=t.renderable;e&&(e.renderBoundsDirty=!0,e.boundsDirty=!0)}var pD=new eo(Ie.REPARENT,null,"","","",0,"",""),vD=function(){function t(e){var n=this;this.runtime=e,this.pendingEvents=[],this.boundsChangedEvent=new Nn(Ie.BOUNDS_CHANGED),this.rotate=function(){var r=br();return function(i,a,o,s){o===void 0&&(o=0),s===void 0&&(s=0),typeof a=="number"&&(a=dt.fromValues(a,o,s));var c=i.transformable;if(i.parentNode===null||!i.parentNode.transformable)n.rotateLocal(i,a);else{var l=br();Qu(l,a[0],a[1],a[2]);var u=n.getRotation(i),f=n.getRotation(i.parentNode);Ju(r,f),$p(r,r),Ua(l,r,l),Ua(c.localRotation,l,u),tf(c.localRotation,c.localRotation),n.dirtifyLocal(i,c)}}}(),this.rotateLocal=function(){var r=br();return function(i,a,o,s){o===void 0&&(o=0),s===void 0&&(s=0),typeof a=="number"&&(a=dt.fromValues(a,o,s));var c=i.transformable;Qu(r,a[0],a[1],a[2]),ub(c.localRotation,c.localRotation,r),n.dirtifyLocal(i,c)}}(),this.setEulerAngles=function(){var r=br();return function(i,a,o,s){o===void 0&&(o=0),s===void 0&&(s=0),typeof a=="number"&&(a=dt.fromValues(a,o,s));var c=i.transformable;if(i.parentNode===null||!i.parentNode.transformable)n.setLocalEulerAngles(i,a);else{Qu(c.localRotation,a[0],a[1],a[2]);var l=n.getRotation(i.parentNode);Ju(r,$p(br(),l)),ub(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=dt.fromValues(i,a,o));var s=r.transformable;dt.equals(i,dt.create())||(dt.transformQuat(i,i,s.localRotation),dt.add(s.localPosition,s.localPosition,i),n.dirtifyLocal(r,s))}}(),this.setPosition=function(){var r=Kt.create(),i=dt.create();return function(a,o){var s=a.transformable;if(i[0]=o[0],i[1]=o[1],i[2]=o[2]||0,!dt.equals(n.getPosition(a),i)){if(dt.copy(s.position,i),a.parentNode===null||!a.parentNode.transformable)dt.copy(s.localPosition,i);else{var c=a.parentNode.transformable;Kt.copy(r,c.worldTransform),Kt.invert(r,r),dt.transformMat4(s.localPosition,i,r)}n.dirtifyLocal(a,s)}}}(),this.setLocalPosition=function(){var r=dt.create();return function(i,a){var o=i.transformable;r[0]=a[0],r[1]=a[1],r[2]=a[2]||0,!dt.equals(o.localPosition,r)&&(dt.copy(o.localPosition,r),n.dirtifyLocal(i,o))}}(),this.translate=function(){var r=dt.create(),i=dt.create(),a=dt.create();return function(o,s,c,l){c===void 0&&(c=0),l===void 0&&(l=0),typeof s=="number"&&(s=dt.set(i,s,c,l)),!dt.equals(s,r)&&(dt.add(a,n.getPosition(o),s),n.setPosition(o,a))}}(),this.setRotation=function(){var r=br();return function(i,a,o,s,c){var l=i.transformable;if(typeof a=="number"&&(a=Vp(a,o,s,c)),i.parentNode===null||!i.parentNode.transformable)n.setLocalRotation(i,a);else{var u=n.getRotation(i.parentNode);Ju(r,u),$p(r,r),Ua(l.localRotation,r,a),tf(l.localRotation,l.localRotation),n.dirtifyLocal(i,l)}}},this.displayObjectDependencyMap=new WeakMap,this.calcLocalTransform=function(){var r=Kt.create(),i=dt.create(),a=Vp(0,0,0,1);return function(o){var s=o.localSkew[0]!==0||o.localSkew[1]!==0;if(s){if(Kt.fromRotationTranslationScaleOrigin(o.localTransform,o.localRotation,o.localPosition,dt.fromValues(1,1,1),o.origin),o.localSkew[0]!==0||o.localSkew[1]!==0){var c=Kt.identity(r);c[4]=Math.tan(o.localSkew[0]),c[1]=Math.tan(o.localSkew[1]),Kt.multiply(o.localTransform,o.localTransform,c)}var l=Kt.fromRotationTranslationScaleOrigin(r,a,i,o.localScale,o.origin);Kt.multiply(o.localTransform,o.localTransform,l)}else Kt.fromRotationTranslationScaleOrigin(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,(0,me.Z)(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=zs.ADDED);var c=e.transformable;c&&this.dirtifyWorld(e,c),c.frozen&&this.unfreezeParentToRoot(e),o&&e.dispatchEvent(pD)},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=zs.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=dt.fromValues(n,r,i));var a=e.transformable;Qu(a.localRotation,n[0],n[1],n[2]),this.dirtifyLocal(e,a)},t.prototype.scaleLocal=function(e,n){var r=e.transformable;dt.multiply(r.localScale,r.localScale,dt.fromValues(n[0],n[1],n[2]||1)),this.dirtifyLocal(e,r)},t.prototype.setLocalScale=function(e,n){var r=e.transformable,i=dt.fromValues(n[0],n[1],n[2]||r.localScale[2]);dt.equals(i,r.localScale)||(dt.copy(r.localScale,i),this.dirtifyLocal(e,r))},t.prototype.setLocalRotation=function(e,n,r,i,a){typeof n=="number"&&(n=Vp(n,r,i,a));var o=e.transformable;Ju(o.localRotation,n),this.dirtifyLocal(e,o)},t.prototype.setLocalSkew=function(e,n,r){typeof n=="number"&&(n=$c.al(n,r));var i=e.transformable;$c.JG(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=(0,S.CR)(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;)Cx(r),r=r.parentNode;n&&e.forEach(function(i){Cx(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 eo(Ie.ATTR_MODIFIED,a,n,n,i,eo.MODIFICATION,n,n)),a.isCustomElement&&a.isConnected&&a.attributeChangedCallback&&a.attributeChangedCallback(i,n,n)})})},t.prototype.getPosition=function(e){var n=e.transformable;return Kt.getTranslation(n.position,this.getWorldTransform(e,n))},t.prototype.getRotation=function(e){var n=e.transformable;return Kt.getRotation(n.rotation,this.getWorldTransform(e,n))},t.prototype.getScale=function(e){var n=e.transformable;return Kt.getScaling(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=Kt.getTranslation(dt.create(),n),i=Kt.getRotation(br(),n),a=Kt.getScaling(dt.create(),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(Er.isEmpty(i))return null;var a=r||new Er;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 Er},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 Er,o.update(f.center,f.halfExtents)))}),n){var c=bx(e);if(c){var l=c.parsedStyle.clipPath.getBounds(n);o?l&&(o=l.intersection(o)):o=l}}return o||(o=new Er),o&&(n?i.renderBounds=o:i.bounds=o),n?i.renderBoundsDirty=!1:i.boundsDirty=!1,o},t.prototype.getLocalBounds=function(e){if(e.parentNode){var n=Kt.create();e.parentNode.transformable&&(n=Kt.invert(Kt.create(),this.getWorldTransform(e.parentNode)));var r=this.getBounds(e);if(!Er.isEmpty(r)){var i=new Er;return i.setFromTransformedAABB(r,n),i}}return this.getBounds(e)},t.prototype.getBoundingClientRect=function(e){var n,r,i,a=this.getGeometryBounds(e);Er.isEmpty(a)||(i=new Er,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=(0,S.CR)(i.getMin(),2),c=s[0],l=s[1],u=(0,S.CR)(i.getMax(),2),f=u[0],d=u[1];return new Wo(c+((o==null?void 0:o.left)||0),l+((o==null?void 0:o.top)||0),f-c,d-l)}return new Wo((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?Kt.copy(n.worldTransform,n.localTransform):Kt.multiply(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}(),Vo={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]},kx=/[a-zA-Z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff!"#$%&'()*+,-./:;]/,gD=/[!%),.:;?\]}¢°·'""†‡›℃∶、。〃〆〕〗〞﹚﹜!"%'),.:;?!]}~]/,yD=/[$(£¥·'"〈《「『【〔〖〝﹙﹛$(.[{£¥]/,mD=/[!),.:;?\]}¢·–—'"•"、。〆〞〕〉》」︰︱︲︳﹐﹑﹒﹓﹔﹕﹖﹘﹚﹜!),.:;?︶︸︺︼︾﹀﹂﹗]|}、]/,bD=/[([{£¥'"‵〈《「『〔〝︴﹙﹛({︵︷︹︻︽︿﹁﹃﹏]/,xD=/[)\]}〕〉》」』】〙〗〟'"⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、:;,。.]/,_D=/[([{〔〈《「『【〘〖〝'"⦅«—...‥〳〴〵]/,OD=/[!%),.:;?\]}¢°'"†‡℃〆〈《「『〕!%),.:;?]}]/,wD=/[$([{£¥'"々〇〉》」〔$([{⦆¥₩#]/,SD=new RegExp("".concat(gD.source,"|").concat(mD.source,"|").concat(xD.source,"|").concat(OD.source)),MD=new RegExp("".concat(yD.source,"|").concat(bD.source,"|").concat(_D.source,"|").concat(wD.source)),ED=function(){function t(e){var n=this;this.runtime=e,this.fontMetricsCache={},this.shouldBreakByKinsokuShorui=function(r,i){return n.isBreakingSpace(i)?!1:!!(r&&(MD.exec(i)||SD.exec(r)))},this.trimByKinsokuShorui=function(r){var i=(0,S.ev)([],(0,S.CR)(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=Vo.MetricsString+Vo.BaselineSymbol,s=Math.ceil(a.measureText(o).width),c=Math.ceil(a.measureText(Vo.BaselineSymbol).width),l=Vo.HeightMultiplier*c;c=c*Vo.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=Z8(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),_=0;if(f){f.getTotalLength();for(var O=0;O<m.length;O++)var w=g.measureText(m[O]).width+(m[O].length-1)*u}else{for(var O=0;O<m.length;O++){var M=g.measureText(m[O]).width+(m[O].length-1)*u;b[O]=M,_=Math.max(_,M)}var w=_+s,E=o||v.fontSize+s,A=Math.max(E,v.fontSize+s)+(m.length-1)*(E+h);E+=h;var P=0;return c==="middle"?P=-A/2:c==="bottom"||c==="alphabetic"||c==="ideographic"?P=-A:(c==="top"||c==="hanging")&&(P=0),{font:p,width:w,height:A,lines:m,lineWidths:b,lineHeight:E,maxLineWidth:_,fontProperties:v,lineMetrics:b.map(function(j,N){var k=0;return l==="center"||l==="middle"?k-=j/2:(l==="right"||l==="end")&&(k-=j),new Wo(k-s/2,P+N*E,j+s,E)})}}},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(R){return i.getFromCache(R,s,y,f)},b=Array.from(h).reduce(function(R,D){return R+m(D)},0),_=Array.from(e),O=0;O<_.length;O++){var w=_[O],M=e[O-1],E=e[O+1],A=m(w);if(this.isNewline(w)){if(v++,v>=l){n.isOverflowing=!0;break}g=0,p[v]="";continue}if(g>0&&g+A>d){if(v+1>=l){if(n.isOverflowing=!0,b>0&&b<=d){for(var P=p[v].length,C=0,j=P,N=0;N<P;N++){var k=m(p[v][N]);if(C+k+b>d){j=N;break}C+=k}p[v]=(p[v]||"").slice(0,j)+h}break}if(v++,g=0,p[v]="",this.isBreakingSpace(w))continue;this.canBreakInLastChar(w)||(p=this.trimToBreakable(p),g=this.sumTextWidthByCache(p[v]||"",y)),this.shouldBreakByKinsokuShorui(w,E)&&(p=this.trimByKinsokuShorui(p),g+=m(M||""))}g+=A,p[v]=(p[v]||"")+w}return p.join(`
`)},t.prototype.isBreakingSpace=function(e){return typeof e!="string"?!1:Vo.BreakingSpaces.indexOf(e.charCodeAt(0))>=0},t.prototype.isNewline=function(e){return typeof e!="string"?!1:Vo.Newlines.indexOf(e.charCodeAt(0))>=0},t.prototype.trimToBreakable=function(e){var n=(0,S.ev)([],(0,S.CR)(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&&kx.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(!kx.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}(),Pt={},AD=function(){var t,e=new aD,n=new iD;return t={},t[St.CIRCLE]=new tD,t[St.ELLIPSE]=new eD,t[St.RECT]=e,t[St.IMAGE]=e,t[St.GROUP]=e,t[St.LINE]=new nD,t[St.TEXT]=new oD(Pt),t[St.POLYLINE]=n,t[St.POLYGON]=n,t[St.PATH]=new rD,t[St.HTML]=null,t[St.MESH]=null,t}(),TD=function(){var t,e=new p8,n=new w0;return t={},t[ce.PERCENTAGE]=null,t[ce.NUMBER]=new x8,t[ce.ANGLE]=new d8,t[ce.DEFINED_PATH]=new h8,t[ce.PAINT]=e,t[ce.COLOR]=e,t[ce.FILTER]=new v8,t[ce.LENGTH]=n,t[ce.LENGTH_PERCENTAGE]=n,t[ce.LENGTH_PERCENTAGE_12]=new g8,t[ce.LENGTH_PERCENTAGE_14]=new y8,t[ce.COORDINATE]=new m8,t[ce.OFFSET_DISTANCE]=new _8,t[ce.OPACITY_VALUE]=new O8,t[ce.PATH]=new w8,t[ce.LIST_OF_POINTS]=new S8,t[ce.SHADOW_BLUR]=new M8,t[ce.TEXT]=new E8,t[ce.TEXT_TRANSFORM]=new A8,t[ce.TRANSFORM]=new K8,t[ce.TRANSFORM_ORIGIN]=new Q8,t[ce.Z_INDEX]=new J8,t[ce.MARKER]=new b8,t}(),PD=function(){return typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof gt.g!="undefined"?gt.g:{}};Pt.CameraContribution=Xb,Pt.AnimationTimeline=null,Pt.EasingFunction=null,Pt.offscreenCanvasCreator=new uD,Pt.nativeHTMLMap=new WeakMap,Pt.sceneGraphSelector=new hD,Pt.sceneGraphService=new vD(Pt),Pt.textService=new ED(Pt),Pt.geometryUpdaterFactory=AD,Pt.CSSPropertySyntaxFactory=TD,Pt.styleValueRegistry=new f8(Pt),Pt.layoutRegistry=null,Pt.globalThis=PD(),Pt.enableCSSParsing=!0,Pt.enableDataset=!1,Pt.enableStyleSyntax=!0;var Rx=0;function _ft(){Rx=0}var Lx=new eo(Ie.INSERTED,null,"","","",0,"",""),Nx=new eo(Ie.REMOVED,null,"","","",0,"",""),CD=new Nn(Ie.DESTROY),kD=function(t){(0,S.ZT)(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.entity=Rx++,n.renderable={bounds:void 0,boundsDirty:!0,renderBounds:void 0,renderBoundsDirty:!0,dirtyRenderBounds:void 0,dirty:!1},n.cullable={strategy:u0.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=Pt.enableCSSParsing?{anchor:zn,opacity:zn,fillOpacity:zn,strokeOpacity:zn,fill:zn,stroke:zn,transform:zn,transformOrigin:zn,visibility:zn,pointerEvents:zn,lineWidth:zn,lineCap:zn,lineJoin:zn,increasedLineWidthForHitTesting:zn,fontSize:zn,fontFamily:zn,fontStyle:zn,fontWeight:zn,fontVariant:zn,textAlign:zn,textBaseline:zn,textTransform:zn,zIndex:zn,filter:zn,shadowType:zn}: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(Cn)},e.prototype.appendChild=function(n,r){var i;if(n.destroyed)throw new Error(c6);return Pt.sceneGraphService.attach(n,this,r),!((i=this.ownerDocument)===null||i===void 0)&&i.defaultView&&this.ownerDocument.defaultView.mountChildren(n),Lx.relatedNode=this,n.dispatchEvent(Lx),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 Nx.relatedNode=this,n.dispatchEvent(Nx),!((r=n.ownerDocument)===null||r===void 0)&&r.defaultView&&n.ownerDocument.defaultView.unmountChildren(n),Pt.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 Pt.sceneGraphService.matches(n,this)},e.prototype.getElementById=function(n){return Pt.sceneGraphService.querySelector("#".concat(n),this)},e.prototype.getElementsByName=function(n){return Pt.sceneGraphService.querySelectorAll('[name="'.concat(n,'"]'),this)},e.prototype.getElementsByClassName=function(n){return Pt.sceneGraphService.querySelectorAll(".".concat(n),this)},e.prototype.getElementsByTagName=function(n){return Pt.sceneGraphService.querySelectorAll(n,this)},e.prototype.querySelector=function(n){return Pt.sceneGraphService.querySelector(n,this)},e.prototype.querySelectorAll=function(n){return Pt.sceneGraphService.querySelectorAll(n,this)},e.prototype.closest=function(n){var r=this;do{if(Pt.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=(0,S.CR)(r),s=o[0],c=o.slice(1);this.parentNode.appendChild(s,a),(n=s).after.apply(n,(0,S.ev)([],(0,S.CR)(c),!1))}},e.prototype.replaceWith=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];this.after.apply(this,(0,S.ev)([],(0,S.CR)(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,(0,S.ev)([],(0,S.CR)(n),!1))},e.prototype.remove=function(){return this.parentNode?this.parentNode.removeChild(this):this},e.prototype.destroy=function(){this.dispatchEvent(CD),this.remove(),this.emitter.removeAllListeners(),this.destroyed=!0},e.prototype.getGeometryBounds=function(){return Pt.sceneGraphService.getGeometryBounds(this)},e.prototype.getRenderBounds=function(){return Pt.sceneGraphService.getBounds(this,!0)},e.prototype.getBounds=function(){return Pt.sceneGraphService.getBounds(this)},e.prototype.getLocalBounds=function(){return Pt.sceneGraphService.getLocalBounds(this)},e.prototype.getBoundingClientRect=function(){return Pt.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(y6(n))return Pt.enableCSSParsing?null:void 0;var r=this.attributes[n];if(r===void 0){var i=i0(n);return r=this.attributes[i],Pt.enableCSSParsing&&(0,me.Z)(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(Cn)},e.prototype.getAttributeNode=function(n){throw new Error(Cn)},e.prototype.getAttributeNodeNS=function(n,r){throw new Error(Cn)},e.prototype.hasAttributeNS=function(n,r){throw new Error(Cn)},e.prototype.removeAttributeNS=function(n,r){throw new Error(Cn)},e.prototype.removeAttributeNode=function(n){throw new Error(Cn)},e.prototype.setAttributeNS=function(n,r,i){throw new Error(Cn)},e.prototype.setAttributeNode=function(n){throw new Error(Cn)},e.prototype.setAttributeNodeNS=function(n){throw new Error(Cn)},e.prototype.toggleAttribute=function(n,r){throw new Error(Cn)},e}(kr);function vn(t){return!!(t!=null&&t.nodeName)}var Ta=new eo(Ie.ATTR_MODIFIED,null,null,null,null,eo.MODIFICATION,null,null),RD={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:""},Ix={anchor:[0,0],fill:l0,stroke:l0,transform:[],zIndex:0,filter:[],shadowType:"outer",miterLimit:10},LD=(0,S.pi)((0,S.pi)({},Ix),{opacity:1,fillOpacity:1,strokeOpacity:1,visibility:"visible",pointerEvents:"auto",lineWidth:1,lineCap:"butt",lineJoin:"miter",increasedLineWidthForHitTesting:0,fillRule:"nonzero"}),ND=["opacity","fillOpacity","strokeOpacity","transformOrigin","visibility","pointerEvents","lineWidth","lineCap","lineJoin","increasedLineWidthForHitTesting"],ID=(0,S.ev)((0,S.ev)([],(0,S.CR)(ND),!1),["fontSize","fontFamily","fontStyle","fontWeight","fontVariant","textAlign","textBaseline","textTransform"],!1),jx="data-",$r=function(t){(0,S.ZT)(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||St.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,Pt.enableCSSParsing?Ix:LD,i.config.initialParsedStyle),Pt.enableCSSParsing&&Object.assign(i.attributes,RD),i.initAttributes(i.config.style);var a=Pt.globalThis.Proxy?Pt.globalThis.Proxy:function(){};return Pt.enableDataset&&(i.dataset=new a({},{get:function(o,s){var c="".concat(jx).concat(Zb(s));return o[c]!==void 0?o[c]:i.getAttribute(c)},set:function(o,s,c){return i.setAttribute("".concat(jx).concat(Zb(s)),c),!0}})),Pt.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=(0,S.pi)({},this.attributes);for(var a in i){var o=i[a];vn(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};Pt.enableCSSParsing&&(i.usedAttributes=ID);var a={};for(var o in n){var s=i0(o);a[s]=n[o]}Pt.styleValueRegistry.processProperties(this,a,i),r.dirty=!0},e.prototype.setAttribute=function(n,r,i){i===void 0&&(i=!1);var a=i0(n);nr(r)||(i||r!==this.attributes[a])&&(this.internalSetAttribute(a,r),t.prototype.setAttribute.call(this,a,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];Pt.styleValueRegistry.processProperties(this,(a={},a[n]=r,a),i),o.dirty=!0;var l=this.parsedStyle[n];this.isConnected&&(Ta.relatedNode=this,Ta.prevValue=s,Ta.newValue=r,Ta.attrName=n,Ta.prevParsedValue=c,Ta.newParsedValue=l,this.isMutationObserved?this.dispatchEvent(Ta):(Ta.target=this,this.ownerDocument.defaultView.dispatchEvent(Ta,!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=(0,S.CR)(n.getMin(),2),i=r[0],a=r[1],o=(0,S.CR)(n.getMax(),2),s=o[0],c=o[1];return new Wo(i,a,s-i,c-a)},e.prototype.setOrigin=function(n,r,i){return r===void 0&&(r=0),i===void 0&&(i=0),Pt.sceneGraphService.setOrigin(this,ei(n,r,i)),this},e.prototype.getOrigin=function(){return Pt.sceneGraphService.getOrigin(this)},e.prototype.setPosition=function(n,r,i){return r===void 0&&(r=0),i===void 0&&(i=0),Pt.sceneGraphService.setPosition(this,ei(n,r,i)),this},e.prototype.setLocalPosition=function(n,r,i){return r===void 0&&(r=0),i===void 0&&(i=0),Pt.sceneGraphService.setLocalPosition(this,ei(n,r,i)),this},e.prototype.translate=function(n,r,i){return r===void 0&&(r=0),i===void 0&&(i=0),Pt.sceneGraphService.translate(this,ei(n,r,i)),this},e.prototype.translateLocal=function(n,r,i){return r===void 0&&(r=0),i===void 0&&(i=0),Pt.sceneGraphService.translateLocal(this,ei(n,r,i)),this},e.prototype.getPosition=function(){return Pt.sceneGraphService.getPosition(this)},e.prototype.getLocalPosition=function(){return Pt.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=ei(n,r,i)),Pt.sceneGraphService.scaleLocal(this,n),this},e.prototype.setLocalScale=function(n,r,i){return typeof n=="number"&&(r=r||n,i=i||n,n=ei(n,r,i)),Pt.sceneGraphService.setLocalScale(this,n),this},e.prototype.getLocalScale=function(){return Pt.sceneGraphService.getLocalScale(this)},e.prototype.getScale=function(){return Pt.sceneGraphService.getScale(this)},e.prototype.getEulerAngles=function(){var n=(0,S.CR)(Jp(dt.create(),Pt.sceneGraphService.getWorldTransform(this)),3),r=n[2];return Li(r)},e.prototype.getLocalEulerAngles=function(){var n=(0,S.CR)(Jp(dt.create(),Pt.sceneGraphService.getLocalRotation(this)),3),r=n[2];return Li(r)},e.prototype.setEulerAngles=function(n){return Pt.sceneGraphService.setEulerAngles(this,0,0,n),this},e.prototype.setLocalEulerAngles=function(n){return Pt.sceneGraphService.setLocalEulerAngles(this,0,0,n),this},e.prototype.rotateLocal=function(n,r,i){return(0,me.Z)(r)&&(0,me.Z)(i)?Pt.sceneGraphService.rotateLocal(this,0,0,n):Pt.sceneGraphService.rotateLocal(this,n,r,i),this},e.prototype.rotate=function(n,r,i){return(0,me.Z)(r)&&(0,me.Z)(i)?Pt.sceneGraphService.rotate(this,0,0,n):Pt.sceneGraphService.rotate(this,n,r,i),this},e.prototype.setRotation=function(n,r,i,a){return Pt.sceneGraphService.setRotation(this,n,r,i,a),this},e.prototype.setLocalRotation=function(n,r,i,a){return Pt.sceneGraphService.setLocalRotation(this,n,r,i,a),this},e.prototype.setLocalSkew=function(n,r){return Pt.sceneGraphService.setLocalSkew(this,n,r),this},e.prototype.getRotation=function(){return Pt.sceneGraphService.getRotation(this)},e.prototype.getLocalRotation=function(){return Pt.sceneGraphService.getLocalRotation(this)},e.prototype.getLocalSkew=function(){return Pt.sceneGraphService.getLocalSkew(this)},e.prototype.getLocalTransform=function(){return Pt.sceneGraphService.getLocalTransform(this)},e.prototype.getWorldTransform=function(){return Pt.sceneGraphService.getWorldTransform(this)},e.prototype.setLocalTransform=function(n){return Pt.sceneGraphService.setLocalTransform(this,n),this},e.prototype.resetLocalTransform=function(){Pt.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,(0,S.ev)([],(0,S.CR)(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,(0,S.ev)([],(0,S.CR)(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=(0,S.CR)(r,2),o=a[0],s=a[1];return o?zo(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=(0,S.CR)(Kt.getTranslation(dt.create(),r),2),a=i[0],o=i[1],s=(0,S.CR)(Kt.getScaling(dt.create(),r),2),c=s[0],l=s[1],u=Kt.getRotation(br(),r),f=(0,S.CR)(Jp(dt.create(),u),3),d=f[0],h=f[2];return e6(d||h,a,o,c,l)},e.prototype.getLocalMatrix=function(){return this.getMatrix(this.getLocalTransform())},e.prototype.setMatrix=function(n){var r=(0,S.CR)(Hb(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=(0,S.CR)(Hb(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(){Pt.enableCSSParsing?this.style.visibility="visible":this.forEach(function(n){n.style.visibility="visible"})},e.prototype.hide=function(){Pt.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}(kD),Dx={number:function(t){return new kn(t)},percent:function(t){return new kn(t,"%")},px:function(t){return new kn(t,"px")},em:function(t){return new kn(t,"em")},rem:function(t){return new kn(t,"rem")},deg:function(t){return new kn(t,"deg")},grad:function(t){return new kn(t,"grad")},rad:function(t){return new kn(t,"rad")},turn:function(t){return new kn(t,"turn")},s:function(t){return new kn(t,"s")},ms:function(t){return new kn(t,"ms")},registerProperty:function(t){var e=t.name,n=t.inherits,r=t.interpolable,i=t.initialValue,a=t.syntax;Pt.styleValueRegistry.registerMetadata({n:e,inh:n,int:r,d:i,syntax:a})},registerLayout:function(t,e){Pt.layoutRegistry.registerLayout(t,e)}},nl=function(t){(0,S.ZT)(e,t);function e(n){n===void 0&&(n={});var r=n.style,i=(0,S._T)(n,["style"]);return t.call(this,(0,S.pi)({type:St.CIRCLE,style:Pt.enableCSSParsing?(0,S.pi)({cx:"",cy:"",r:""},r):(0,S.pi)({},r),initialParsedStyle:{anchor:[.5,.5],transformOrigin:Pt.enableCSSParsing?null:[hf,hf]}},i))||this}return e}($r),C0=function(t){(0,S.ZT)(e,t);function e(n){var r=this;n===void 0&&(n={});var i=n.style,a=(0,S._T)(n,["style"]);return r=t.call(this,(0,S.pi)({style:Pt.enableCSSParsing?(0,S.pi)({x:"",y:""},i):(0,S.pi)({},i)},a))||this,r.isCustomElement=!0,r}return e}($r),k0=function(t){(0,S.ZT)(e,t);function e(n){n===void 0&&(n={});var r=n.style,i=(0,S._T)(n,["style"]);return t.call(this,(0,S.pi)({type:St.ELLIPSE,style:Pt.enableCSSParsing?(0,S.pi)({cx:"",cy:"",rx:"",ry:""},r):(0,S.pi)({},r),initialParsedStyle:{anchor:[.5,.5],transformOrigin:Pt.enableCSSParsing?null:[hf,hf]}},i))||this}return e}($r),Br=function(t){(0,S.ZT)(e,t);function e(n){n===void 0&&(n={});var r=n.style,i=(0,S._T)(n,["style"]);return t.call(this,(0,S.pi)({type:St.GROUP,style:Pt.enableCSSParsing?(0,S.pi)({x:"",y:"",width:"",height:""},r):(0,S.pi)({},r)},i))||this}return e}($r),xf=function(t){(0,S.ZT)(e,t);function e(n){var r=this;n===void 0&&(n={});var i=n.style,a=(0,S._T)(n,["style"]);return r=t.call(this,(0,S.pi)({type:St.HTML,style:Pt.enableCSSParsing?(0,S.pi)({x:"",y:"",width:"auto",height:"auto",innerHTML:""},i):(0,S.pi)({},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 Wo(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 Er,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=Kt.invert(Kt.create(),this.parentNode.getWorldTransform()),r=this.getBounds();if(!Er.isEmpty(r)){var i=new Er;return i.setFromTransformedAABB(r,n),i}}return this.getBounds()},e}($r),R0=function(t){(0,S.ZT)(e,t);function e(n){n===void 0&&(n={});var r=n.style,i=(0,S._T)(n,["style"]);return t.call(this,(0,S.pi)({type:St.IMAGE,style:Pt.enableCSSParsing?(0,S.pi)({x:"",y:"",img:"",width:"",height:""},r):(0,S.pi)({},r)},i))||this}return e}($r),rl=function(t){(0,S.ZT)(e,t);function e(n){var r=this;n===void 0&&(n={});var i=n.style,a=(0,S._T)(n,["style"]);r=t.call(this,(0,S.pi)({type:St.LINE,style:(0,S.pi)({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&&vn(s)&&(r.markerStartAngle=s.getLocalEulerAngles(),r.appendChild(s)),c&&vn(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&&vn(a)&&(this.markerStartAngle=0,a.remove()),o&&vn(o)&&(this.markerStartAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!0))):n==="markerEnd"&&(a&&vn(a)&&(this.markerEndAngle=0,a.remove()),o&&vn(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||!vn(p))){var v=0,g,y,m,b,_,O;n?(m=c-d,b=u-h,g=l-c,y=f-u,_=o||0,O=this.markerStartAngle):(m=l-d,b=f-h,g=c-l,y=u-f,_=s||0,O=this.markerEndAngle),v=Math.atan2(y,g),p.setLocalEulerAngles(v*180/Math.PI+O),p.setLocalPosition(m+Math.cos(v)*_,b+Math.sin(v)*_)}},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=aa(a,o,s,c,n),d=f.x,h=f.y,p=dt.transformMat4(dt.create(),dt.fromValues(d-l,h-u,0),r?this.getWorldTransform():this.getLocalTransform());return new Pr(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 Cb(r,i,a,o)},e}($r),ri=function(t){(0,S.ZT)(e,t);function e(n){var r=this;n===void 0&&(n={});var i=n.style,a=(0,S._T)(n,["style"]);r=t.call(this,(0,S.pi)({type:St.PATH,style:Pt.enableCSSParsing?(0,S.pi)({path:"",miterLimit:""},i):(0,S.pi)({},i),initialParsedStyle:Pt.enableCSSParsing?null:{miterLimit:4,path:(0,S.pi)({},Qb)}},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&&vn(s)&&(r.markerStartAngle=s.getLocalEulerAngles(),r.appendChild(s)),l&&vn(l)&&r.placeMarkerMid(l),c&&vn(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&&vn(a)&&(this.markerStartAngle=0,a.remove()),o&&vn(o)&&(this.markerStartAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!0))):n==="markerEnd"?(a&&vn(a)&&(this.markerEndAngle=0,a.remove()),o&&vn(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||!vn(u))){var f=0,d,h,p,v,g,y;if(n){var m=(0,S.CR)(this.getStartTangent(),2),b=m[0],_=m[1];p=_[0]-c,v=_[1]-l,d=b[0]-_[0],h=b[1]-_[1],g=o||0,y=this.markerStartAngle}else{var O=(0,S.CR)(this.getEndTangent(),2),b=O[0],_=O[1];p=_[0]-c,v=_[1]-l,d=b[0]-_[0],h=b[1]-_[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&&vn(n))for(var s=1;s<i.length-1;s++){var c=(0,S.CR)(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 p0(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=Sj(s,n),l=c.x,u=c.y,f=dt.transformMat4(dt.create(),dt.fromValues(l-a,u-o,0),r?this.getWorldTransform():this.getLocalTransform());return new Pr(f[0],f[1])},e.prototype.getPoint=function(n,r){return r===void 0&&(r=!1),this.getPointAtLength(n*p0(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}($r),il=function(t){(0,S.ZT)(e,t);function e(n){var r=this;n===void 0&&(n={});var i=n.style,a=(0,S._T)(n,["style"]);r=t.call(this,(0,S.pi)({type:St.POLYGON,style:Pt.enableCSSParsing?(0,S.pi)({points:"",miterLimit:"",isClosed:!0},i):(0,S.pi)({},i),initialParsedStyle:Pt.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&&vn(s)&&(r.markerStartAngle=s.getLocalEulerAngles(),r.appendChild(s)),l&&vn(l)&&r.placeMarkerMid(l),c&&vn(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&&vn(a)&&(this.markerStartAngle=0,a.remove()),o&&vn(o)&&(this.markerStartAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!0))):n==="markerEnd"?(a&&vn(a)&&(this.markerEndAngle=0,a.remove()),o&&vn(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||!vn(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 _=f.length;this.parsedStyle.isClosed?(p=f[_-1][0]-f[0][0],v=f[_-1][1]-f[0][1]):(g=f[_-1][0]-l,y=f[_-1][1]-u,p=f[_-2][0]-f[_-1][0],v=f[_-2][1]-f[_-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&&vn(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}($r),L0=function(t){(0,S.ZT)(e,t);function e(n){n===void 0&&(n={});var r=n.style,i=(0,S._T)(n,["style"]);return t.call(this,(0,S.pi)({type:St.POLYLINE,style:Pt.enableCSSParsing?(0,S.pi)({points:"",miterLimit:"",isClosed:!1},r):(0,S.pi)({},r),initialParsedStyle:Pt.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=aa(c[f][0],c[f][1],c[f+1][0],c[f+1][1],u),h=d.x,p=d.y,v=dt.transformMat4(dt.create(),dt.fromValues(h-a,p-o,0),r?this.getWorldTransform():this.getLocalTransform());return new Pr(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}(il),Xo=function(t){(0,S.ZT)(e,t);function e(n){n===void 0&&(n={});var r=n.style,i=(0,S._T)(n,["style"]);return t.call(this,(0,S.pi)({type:St.RECT,style:Pt.enableCSSParsing?(0,S.pi)({x:"",y:"",width:"",height:"",radius:""},r):(0,S.pi)({},r)},i))||this}return e}($r),Zi=function(t){(0,S.ZT)(e,t);function e(n){n===void 0&&(n={});var r=n.style,i=(0,S._T)(n,["style"]);return t.call(this,(0,S.pi)({type:St.TEXT,style:Pt.enableCSSParsing?(0,S.pi)({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):(0,S.pi)({fill:"black"},r),initialParsedStyle:Pt.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}($r),jD=function(){function t(){this.registry={},this.define(St.CIRCLE,nl),this.define(St.ELLIPSE,k0),this.define(St.RECT,Xo),this.define(St.IMAGE,R0),this.define(St.LINE,rl),this.define(St.GROUP,Br),this.define(St.PATH,ri),this.define(St.POLYGON,il),this.define(St.POLYLINE,L0),this.define(St.TEXT,Zi),this.define(St.HTML,xf)}return t.prototype.define=function(e,n){this.registry[e]=n},t.prototype.get=function(e){return this.registry[e]},t}(),DD=function(t){(0,S.ZT)(e,t);function e(){var n=t.call(this)||this;n.defaultView=null,n.ownerDocument=null,n.nodeName="document";try{n.timeline=new Pt.AnimationTimeline(n)}catch(i){}var r={};return O0.forEach(function(i){var a=i.n,o=i.inh,s=i.d;o&&s&&(r[a]=Fs(s)?s(St.GROUP):s)}),n.documentElement=new Br({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"?Zi:Br);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(Cn)},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(0,S.mG)(this,void 0,void 0,function(){var i,a,o,s,c,l,u,f,d,h;return(0,S.Jh)(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(0,S.mG)(this,void 0,void 0,function(){var i,a,o,s,c,l,u,f,d,h;return(0,S.Jh)(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(Bs)},e.prototype.insertBefore=function(n,r){throw new Error(Bs)},e.prototype.removeChild=function(n,r){throw new Error(Bs)},e.prototype.replaceChild=function(n,r,i){throw new Error(Bs)},e.prototype.append=function(){throw new Error(Bs)},e.prototype.prepend=function(){throw new Error(Bs)},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}(kr),BD=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 Nn(Ie.CULLED)),null)}return o}),r.hooks.afterRender.tap(t.tag,function(o){o.cullable.visibilityPlaneMask=-1})},t.tag="Culling",t}(),FD=function(){function t(){var e=this;this.autoPreventDefault=!1,this.rootPointerEvent=new T0(null),this.rootWheelEvent=new P0(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=(0,S.XA)(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=(0,S.XA)(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=(0,S.XA)(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="outside";try{l=c&&a.target&&a.target!==c&&c.contains&&!c.contains(a.target)?"outside":""}catch(v){}var u=n.normalizeToPointerEvent(a,i);try{for(var f=(0,S.XA)(u),d=f.next();!d.done;d=f.next()){var h=d.value,p=n.bootstrapEvent(n.rootPointerEvent,h,i,a);p.type+=l,n.context.eventService.mapEvent(p)}}catch(v){o={error:v}}finally{try{d&&!d.done&&(s=f.return)&&s.call(f)}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=(0,S.XA)(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&&!(0,me.Z)(i)&&!(0,me.Z)(a))n=i,r=a;else{var c=this.context.eventService.client2Viewport(new Pr(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=j8[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=E0.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];nr(a.button)&&(a.button=0),nr(a.buttons)&&(a.buttons=1),nr(a.isPrimary)&&(a.isPrimary=e.touches.length===1&&e.type==="touchstart"),nr(a.width)&&(a.width=a.radiusX||1),nr(a.height)&&(a.height=a.radiusY||1),nr(a.tiltX)&&(a.tiltX=0),nr(a.tiltY)&&(a.tiltY=0),nr(a.pointerType)&&(a.pointerType="touch"),nr(a.pointerId)&&(a.pointerId=a.identifier||0),nr(a.pressure)&&(a.pressure=a.force||.5),nr(a.twist)&&(a.twist=0),nr(a.tangentialPressure)&&(a.tangentialPressure=0),a.isNormalized=!0,a.type=e.type,r.push(a)}else if(n.isMouseEvent(e)){var o=e;nr(o.isPrimary)&&(o.isPrimary=!0),nr(o.width)&&(o.width=1),nr(o.height)&&(o.height=1),nr(o.tiltX)&&(o.tiltX=0),nr(o.tiltY)&&(o.tiltY=0),nr(o.pointerType)&&(o.pointerType="mouse"),nr(o.pointerId)&&(o.pointerId=I8),nr(o.pressure)&&(o.pressure=.5),nr(o.twist)&&(o.twist=0),nr(o.tangentialPressure)&&(o.tangentialPressure=0),o.isNormalized=!0,r.push(o)}else r.push(e);return r},t.tag="Event",t}(),zD=[St.CIRCLE,St.ELLIPSE,St.IMAGE,St.RECT,St.LINE,St.POLYLINE,St.POLYGON,St.TEXT,St.PATH,St.HTML],GD=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(Er.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||Ka.INDETERMINATE,s.planes),a.visible=a.visibilityPlaneMask!==Ka.OUTSIDE,a.visible},t.prototype.computeVisibilityWithPlaneMask=function(e,n,r,i){if(r===Ka.OUTSIDE||r===Ka.INSIDE)return r;for(var a=Ka.INSIDE,o=zD.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(dt.dot(f,n.getPositiveFarPoint(i[s]))+d<0)return Ka.OUTSIDE;dt.dot(f,n.getNegativeFarPoint(i[s]))+d<0&&(a|=l)}}return a},t}(),WD=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;Pt.enableCSSParsing&&Pt.styleValueRegistry.recalc(d),Pt.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),Pt.sceneGraphService.dirtifyToRoot(d),r.dirtify()};r.hooks.init.tap(t.tag,function(){o.addEventListener(Ie.MOUNTED,l),o.addEventListener(Ie.UNMOUNTED,u),o.addEventListener(Ie.ATTR_MODIFIED,s),o.addEventListener(Ie.BOUNDS_CHANGED,c)}),r.hooks.destroy.tap(t.tag,function(){o.removeEventListener(Ie.MOUNTED,l),o.removeEventListener(Ie.UNMOUNTED,u),o.removeEventListener(Ie.ATTR_MODIFIED,s),o.removeEventListener(Ie.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=(0,S.CR)(a.getMin(),2),s=o[0],c=o[1],l=(0,S.CR)(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 Oft(t){return!!t.document}var pi;(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"})(pi||(pi={}));var Bx=500,HD=.1,YD=1e3,N0=new Nn(Ie.MOUNTED),I0=new Nn(Ie.UNMOUNTED),$D=new Nn(pi.BEFORE_RENDER),VD=new Nn(pi.RERENDER),XD=new Nn(pi.AFTER_RENDER),Fx=function(t){(0,S.ZT)(e,t);function e(n){var r=t.call(this)||this;r.Element=$r,r.inited=!1,r.context={},r.document=new DD,r.document.defaultView=r,r.customElements=new jD;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,_=n.supportsMutipleCanvasesInOneContainer,O=n.useNativeClickEvent,w=n.alwaysTriggerPointerEventOnCanvas,M=n.isTouchEvent,E=n.isMouseEvent;_||P8(i,r);var A=s,P=c,C=l;return a&&(C=l||tl&&window.devicePixelRatio||1,C=C>=1?Math.ceil(C):1,A=s||L8(a)||a.width/C,P=c||N8(a)||a.height/C),o&&(Pt.offscreenCanvas=o),r.devicePixelRatio=C,r.requestAnimationFrame=p!=null?p:Mx.bind(Pt.globalThis),r.cancelAnimationFrame=v!=null?v:Ex.bind(Pt.globalThis),r.supportsTouchEvents=m!=null?m:"ontouchstart"in Pt.globalThis,r.supportsPointerEvents=y!=null?y:!!Pt.globalThis.PointerEvent,r.isTouchEvent=M!=null?M:function(j){return r.supportsTouchEvents&&j instanceof Pt.globalThis.TouchEvent},r.isMouseEvent=E!=null?E:function(j){return!Pt.globalThis.MouseEvent||j instanceof Pt.globalThis.MouseEvent&&(!r.supportsPointerEvents||!(j instanceof Pt.globalThis.PointerEvent))},r.initRenderingContext({container:i,canvas:a,width:A,height:P,renderer:u,offscreenCanvas:o,devicePixelRatio:C,cursor:d||"default",background:f||"transparent",createImage:g,document:h,supportsCSSTransform:b,useNativeClickEvent:O,alwaysTriggerPointerEventOnCanvas:w}),r.initDefaultCamera(A,P,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 Pt.CameraContribution;o.clipSpaceNearZ=i,o.setType(wn.EXPLORING,Zc.DEFAULT).setPosition(n/2,r/2,Bx).setFocalPoint(n/2,r/2,0).setOrthographic(n/-2,n/2,r/2,r/-2,HD,YD),o.canvas=this,o.eventEmitter.on($b.UPDATED,function(){a.context.renderingContext.renderReasons.add(to.CAMERA_CHANGED)}),this.context.camera=o},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 Nn(pi.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 Nn(pi.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,Bx).setFocalPoint(n/2,r/2,0),o===fi.ORTHOGRAPHIC?a.setOrthographic(n/-2,n/2,r/2,r/-2,a.getNear(),a.getFar()):a.setAspect(n/r),this.dispatchEvent(new Nn(pi.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($D);var r=this.getRenderingService();r.render(this.getConfig(),function(){n.dispatchEvent(VD)}),this.dispatchEvent(XD)},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 Uj,this.context.renderingPlugins=[],this.context.renderingPlugins.push(new FD,new WD,new BD([new GD])),this.loadRendererContainerModule(n),this.context.contextService=new this.context.ContextService((0,S.pi)((0,S.pi)({},Pt),this.context)),this.context.renderingService=new fD(Pt,this.context),this.context.eventService=new lD(Pt,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 Nn(pi.READY))}):a.dispatchEvent(new Nn(pi.READY)),a.readyPromise&&a.resolveReadyPromise()):a.dispatchEvent(new Nn(pi.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(Pt)})},e.prototype.setRenderer=function(n){var r=this.getConfig();if(r.renderer!==n){var i=r.renderer;r.renderer=n,this.destroy(!1,!0),(0,S.ev)([],(0,S.CR)(i==null?void 0:i.getPlugins()),!1).reverse().forEach(function(a){a.destroy(Pt)}),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(I0):(I0.target=n,this.dispatchEvent(I0,!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(N0):(N0.target=n,this.dispatchEvent(N0,!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}(Px),UD=function(t){(0,S.ZT)(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.landmarks=[],n}return e.prototype.rotate=function(n,r,i){if(this.relElevation=Ds(r),this.relAzimuth=Ds(n),this.relRoll=Ds(i),this.elevation+=this.relElevation,this.azimuth+=this.relAzimuth,this.roll+=this.relRoll,this.type===wn.EXPLORING){var a=Xa(br(),[1,0,0],rr((this.rotateWorld?1:-1)*this.relElevation)),o=Xa(br(),[0,1,0],rr((this.rotateWorld?1:-1)*this.relAzimuth)),s=Xa(br(),[0,0,1],rr(this.relRoll)),c=Ua(br(),o,a);c=Ua(br(),c,s);var l=Kt.fromQuat(Kt.create(),c);Kt.translate(this.matrix,this.matrix,[0,0,-this.distance]),Kt.multiply(this.matrix,this.matrix,l),Kt.translate(this.matrix,this.matrix,[0,0,this.distance])}else{if(Math.abs(this.elevation)>90)return this;this.computeMatrix()}return this._getAxes(),this.type===wn.ORBITING||this.type===wn.EXPLORING?this._getPosition():this.type===wn.TRACKING&&this._getFocalPoint(),this._update(),this},e.prototype.pan=function(n,r){var i=ei(n,r,0),a=dt.clone(this.position);return dt.add(a,a,dt.scale(dt.create(),this.right,i[0])),dt.add(a,a,dt.scale(dt.create(),this.up,i[1])),this._setPosition(a),this.triggerUpdate(),this},e.prototype.dolly=function(n){var r=this.forward,i=dt.clone(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===wn.ORBITING||this.type===wn.EXPLORING?this._getDistance():this.type===wn.TRACKING&&dt.add(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 Pt.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:Kt.clone(p.getWorldTransform()),right:dt.clone(p.right),up:dt.clone(p.up),forward:dt.clone(p.forward),position:dt.clone(p.getPosition()),focalPoint:dt.clone(p.getFocalPoint()),distanceVector:dt.clone(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=er(n)?this.landmarks.find(function(P){return P.name===n}):n;if(a){var o=(0,xr.Z)(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,_=a.zoom,O=a.roll,w=d||Pt.EasingFunction(c),M,E=function(){i.setFocalPoint(b),i.setPosition(m),i.setRoll(O),i.setZoom(_),i.computeMatrix(),i.triggerUpdate(),p&&p()},A=function(P){M===void 0&&(M=P);var C=P-M;if(C>u){E();return}var j=w(C/u),N=dt.create(),k=dt.create(),R=1,D=0;dt.lerp(N,i.focalPoint,b,j),dt.lerp(k,i.position,m,j),D=i.roll*(1-j)+O*j,R=i.zoom*(1-j)+_*j,i.setFocalPoint(N),i.setPosition(k),i.setRoll(D),i.setZoom(R);var B=dt.dist(N,b)+dt.dist(k,m);if(B<=y&&_==null&&O==null){E();return}i.computeMatrix(),i.triggerUpdate(),C<u&&(g&&g(j),i.landmarkAnimationID=i.canvas.requestAnimationFrame(A))};this.canvas.requestAnimationFrame(A)}},e.prototype.syncFromLandmark=function(n){this.matrix=Kt.copy(this.matrix,n.matrix),this.right=dt.copy(this.right,n.right),this.up=dt.copy(this.up,n.up),this.forward=dt.copy(this.forward,n.forward),this.position=dt.copy(this.position,n.position),this.focalPoint=dt.copy(this.focalPoint,n.focalPoint),this.distanceVector=dt.copy(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}(Xb);Pt.CameraContribution=UD;var zx=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}(),qD=0,Hs=new WeakMap,ZD=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=t9(i,e);if(a){n[r-1]=a;return}}else n9(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(Ie.ATTR_MODIFIED,this,!0),n.childList&&e.addEventListener(Ie.INSERTED,this,!0),(n.childList||n.subtree)&&e.addEventListener(Ie.REMOVED,this,!0)},t.prototype.removeListeners=function(){this.removeListeners_(this.target)},t.prototype.removeListeners_=function(e){var n=this.options;n.attributes&&e.removeEventListener(Ie.ATTR_MODIFIED,this,!0),n.childList&&e.removeEventListener(Ie.INSERTED,this,!0),(n.childList||n.subtree)&&e.removeEventListener(Ie.REMOVED,this,!0)},t.prototype.removeTransientObservers=function(){var e=this.transientObservedNodes;this.transientObservedNodes=[],e.forEach(function(n){this.removeListeners_(n);for(var r=Hs.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 Ie.ATTR_MODIFIED:var i=e.attrName,a=e.relatedNode.namespaceURI;r=e.target,n=Gx("attributes",r),n.attributeName=i,n.attributeNamespace=a;var o=e.attrChange===eo.ADDITION?null:e.prevValue;Wx(r,function(d){if(d.attributes&&!(d.attributeFilter&&d.attributeFilter.length&&d.attributeFilter.indexOf(i)===-1&&d.attributeFilter.indexOf(a)===-1))return d.attributeOldValue?KD(o):n});break;case Ie.REMOVED:case Ie.INSERTED:r=e.relatedNode;var s=e.target,c=void 0,l=void 0;e.type===Ie.INSERTED?(c=[s],l=[]):(c=[],l=[s]);var u=s.previousSibling,f=s.nextSibling;n=Gx("childList",r),n.addedNodes=c,n.removedNodes=l,n.previousSibling=u,n.nextSibling=f,Wx(r,function(d){if(d.childList)return n})}QD()},t}(),wft=function(){function t(e){this.callback=e,this.nodes=[],this.records=[],this.uid=qD++}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=Hs.get(e);r||Hs.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 ZD(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=Hs.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}(),_f,Pa;function Gx(t,e){return _f=new zx(t,e)}function KD(t){return Pa||(Pa=zx.copy(_f),Pa.oldValue=t,Pa)}function QD(){_f=Pa=void 0}function JD(t){return t===Pa||t===_f}function t9(t,e){return t===e?t:Pa&&JD(t)?Pa:null}function e9(t){t.nodes.forEach(function(e){var n=Hs.get(e);n&&n.forEach(function(r){r.observer===t&&r.removeTransientObservers()})})}function Wx(t,e){for(var n=t;n;n=n.parentNode){var r=Hs.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 j0=!1,D0=[];function n9(t){D0.push(t),j0||(j0=!0,typeof Pt.globalThis!="undefined"?Pt.globalThis.setTimeout(B0):B0())}function B0(){j0=!1;var t=D0;D0=[],t.sort(function(n,r){return n.uid-r.uid});var e=!1;t.forEach(function(n){var r=n.takeRecords();e9(n),r.length&&(n.callback(r,n),e=!0)}),e&&B0()}var F0=function(t){(0,S.ZT)(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}(bf),r9=0,i9=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(r9++),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 F0(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(Cn)},t.prototype.addEventListener=function(e,n,r){throw new Error(Cn)},t.prototype.removeEventListener=function(e,n,r){throw new Error(Cn)},t.prototype.dispatchEvent=function(e){throw new Error(Cn)},t.prototype.commitStyles=function(){throw new Error(Cn)},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 F0(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 F0(null,this,this.currentTime,e);this.onframe(i)}this._finishedFlag=!1}},t}(),a9=4,o9=.001,s9=1e-7,c9=10,al=11,Of=1/(al-1),l9=typeof Float32Array=="function",Hx=function(t,e){return 1-3*e+3*t},Yx=function(t,e){return 3*e-6*t},$x=function(t){return 3*t},wf=function(t,e,n){return((Hx(e,n)*t+Yx(e,n))*t+$x(e))*t},Vx=function(t,e,n){return 3*Hx(e,n)*t*t+2*Yx(e,n)*t+$x(e)},u9=function(t,e,n,r,i){var a,o,s=0;do o=e+(n-e)/2,a=wf(o,r,i)-t,a>0?n=o:e=o;while(Math.abs(a)>s9&&++s<c9);return o},f9=function(t,e,n,r){for(var i=0;i<a9;++i){var a=Vx(e,n,r);if(a===0)return e;var o=wf(e,n,r)-t;e-=o/a}return e},z0=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=l9?new Float32Array(al):new Array(al),a=0;a<al;++a)i[a]=wf(a*Of,t,n);var o=function(s){for(var c=0,l=1,u=al-1;l!==u&&i[l]<=s;++l)c+=Of;--l;var f=(s-i[l])/(i[l+1]-i[l]),d=c+f*Of,h=Vx(d,t,n);return h>=o9?f9(s,d,t,n):h===0?d:u9(s,c,c+Of,t,n)};return function(s){return s===0||s===1?s:wf(o(s),e,r)}},d9=function(t){return t=t.replace(/([A-Z])/g,function(e){return"-".concat(e.toLowerCase())}),t.charAt(0)==="-"?t.substring(1):t},Sf=function(t){return Math.pow(t,2)},Mf=function(t){return Math.pow(t,3)},Ef=function(t){return Math.pow(t,4)},Af=function(t){return Math.pow(t,5)},Tf=function(t){return Math.pow(t,6)},Pf=function(t){return 1-Math.cos(t*Math.PI/2)},Cf=function(t){return 1-Math.sqrt(1-t*t)},kf=function(t){return t*t*(3*t-2)},Rf=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)},Lf=function(t,e){e===void 0&&(e=[]);var n=(0,S.CR)(e,2),r=n[0],i=r===void 0?1:r,a=n[1],o=a===void 0?.5:a,s=(0,cr.Z)(Number(i),1,10),c=(0,cr.Z)(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)},ol=function(t,e,n){e===void 0&&(e=[]);var r=(0,S.CR)(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=(0,cr.Z)(a,.1,1e3),s=(0,cr.Z)(s,.1,1e3),l=(0,cr.Z)(l,.1,1e3),f=(0,cr.Z)(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},G0=function(t,e){e===void 0&&(e=[]);var n=(0,S.CR)(e,2),r=n[0],i=r===void 0?10:r,a=n[1],o=a=="start"?Math.ceil:Math.floor;return o((0,cr.Z)(t,0,1)*i)/i},Xx=function(t,e){e===void 0&&(e=[]);var n=(0,S.CR)(e,4),r=n[0],i=n[1],a=n[2],o=n[3];return z0(r,i,a,o)(t)},Nf=z0(.42,0,1,1),Ni=function(t){return function(e,n,r){return n===void 0&&(n=[]),1-t(1-e,n,r)}},Ii=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}},ji=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}},Ux={steps:G0,"step-start":function(t){return G0(t,[1,"start"])},"step-end":function(t){return G0(t,[1,"end"])},linear:function(t){return t},"cubic-bezier":Xx,ease:function(t){return Xx(t,[.25,.1,.25,1])},in:Nf,out:Ni(Nf),"in-out":Ii(Nf),"out-in":ji(Nf),"in-quad":Sf,"out-quad":Ni(Sf),"in-out-quad":Ii(Sf),"out-in-quad":ji(Sf),"in-cubic":Mf,"out-cubic":Ni(Mf),"in-out-cubic":Ii(Mf),"out-in-cubic":ji(Mf),"in-quart":Ef,"out-quart":Ni(Ef),"in-out-quart":Ii(Ef),"out-in-quart":ji(Ef),"in-quint":Af,"out-quint":Ni(Af),"in-out-quint":Ii(Af),"out-in-quint":ji(Af),"in-expo":Tf,"out-expo":Ni(Tf),"in-out-expo":Ii(Tf),"out-in-expo":ji(Tf),"in-sine":Pf,"out-sine":Ni(Pf),"in-out-sine":Ii(Pf),"out-in-sine":ji(Pf),"in-circ":Cf,"out-circ":Ni(Cf),"in-out-circ":Ii(Cf),"out-in-circ":ji(Cf),"in-back":kf,"out-back":Ni(kf),"in-out-back":Ii(kf),"out-in-back":ji(kf),"in-bounce":Rf,"out-bounce":Ni(Rf),"in-out-bounce":Ii(Rf),"out-in-bounce":ji(Rf),"in-elastic":Lf,"out-elastic":Ni(Lf),"in-out-elastic":Ii(Lf),"out-in-elastic":ji(Lf),spring:ol,"spring-in":ol,"spring-out":Ni(ol),"spring-in-out":Ii(ol),"spring-out-in":ji(ol)},h9=function(t){return d9(t).replace(/^ease-/,"").replace(/(\(|\s).+/,"").toLowerCase().trim()},p9=function(t){return Ux[h9(t)]||Ux.linear},v9=function(t){return t},g9=1,y9=.5,qx=0;function Zx(t,e){return function(n){if(n>=1)return 1;var r=1/t;return n+=e*r,n-n%r}}var If="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",m9=new RegExp("cubic-bezier\\("+If+","+If+","+If+","+If+"\\)"),b9=/steps\(\s*(\d+)\s*\)/,x9=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/;function W0(t){var e=m9.exec(t);if(e)return z0.apply(void 0,(0,S.ev)([],(0,S.CR)(e.slice(1).map(Number)),!1));var n=b9.exec(t);if(n)return Zx(Number(n[1]),qx);var r=x9.exec(t);return r?Zx(Number(r[1]),{start:g9,middle:y9,end:qx}[r[2]]):p9(t)}function _9(t){return Math.abs(O9(t)/(t.playbackRate||1))}function O9(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 Kx=0,H0=1,jf=2,Qx=3;function w9(t,e,n){if(e===null)return Kx;var r=n.endTime;return e<Math.min(n.delay,r)?H0:e>=Math.min(n.delay+t+n.endDelay,r)?jf:Qx}function S9(t,e,n,r,i){switch(r){case H0:return e==="backwards"||e==="both"?0:null;case Qx:return n-i;case jf:return e==="forwards"||e==="both"?t:null;case Kx:return null}}function M9(t,e,n,r,i){var a=i;return t===0?e!==H0&&(a+=n):a+=r/t,a}function E9(t,e,n,r,i,a){var o=t===1/0?e%1:t%1;return o===0&&n===jf&&r!==0&&(i!==0||a===0)&&(o=1),o}function A9(t,e,n,r){return t===jf&&e===1/0?1/0:n===1?Math.floor(r)-1:Math.floor(r)}function T9(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 P9(t,e,n){var r=w9(t,e,n),i=S9(t,n.fill,e,r,n.delay);if(i===null)return null;var a=n.duration==="auto"?0:n.duration,o=M9(a,r,n.iterations,i,n.iterationStart),s=E9(o,n.iterationStart,r,n.iterations,i,a),c=A9(r,n.iterations,s,o),l=T9(n.direction,c,s);return n.currentIteration=c,n.progress=l,n.easingFunction(l)}function C9(t,e,n){var r=k9(t,e),i=R9(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))});else for(var s in r)Jx(s)&&a.setAttribute(s,null)}}function Jx(t){return t!=="offset"&&t!=="easing"&&t!=="composite"&&t!=="computedOffset"}function k9(t,e){for(var n={},r=0;r<t.length;r++)for(var i in t[r])if(Jx(i)){var a={offset:t[r].offset,computedOffset:t[r].computedOffset,easing:t[r].easing,easingFunction:W0(t[r].easing)||e.easingFunction,value:t[r][i]};n[i]=n[i]||[],n[i].push(a)}return n}function R9(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:L9(r,i[o].value,i[s].value,e)})}return n.sort(function(d,h){return d.startOffset-h.startOffset}),n}var t_=function(t,e,n){return function(r){var i=e_(t,e,r);return!Pt.enableCSSParsing&&(0,xr.Z)(i)?i:n(i)}};function L9(t,e,n,r){var i=Ja[t];if(i&&i.syntax&&i.int){var a=Pt.styleValueRegistry.getPropertySyntax(i.syntax);if(a){var o=void 0,s=void 0;if(Pt.enableCSSParsing){var c=Pt.styleValueRegistry.parseProperty(t,e,r),l=Pt.styleValueRegistry.parseProperty(t,n,r);o=Pt.styleValueRegistry.computeProperty(t,c,r),s=Pt.styleValueRegistry.computeProperty(t,l,r)}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=t_.apply(void 0,(0,S.ev)([],(0,S.CR)(f),!1));return function(h){return h===0?e:h===1?n:d(h)}}}}return t_(!1,!0,function(h){return h?n:e})}function e_(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(e_(t[s<r?s:r-1],e[s<i?s:i-1],n));return o}throw new Error("Mismatched interpolation arguments "+t+":"+e)}var N9=function(){function t(){this.delay=0,this.direction="normal",this.duration="auto",this._easing="linear",this.easingFunction=v9,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=W0(e),this._easing=e},enumerable:!1,configurable:!0}),t}();function I9(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 n_(t,e){if(t===null)return[];Array.isArray(t)||(t=I9(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((0,me.Z)(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(!(0,me.Z)(p)&&!(0,me.Z)(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 j9="backwards|forwards|both|none".split("|"),D9="reverse|alternate|alternate-reverse".split("|");function B9(t,e){var n=new N9;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"&&j9.indexOf(t[r])===-1||r==="direction"&&D9.indexOf(t[r])===-1)return;n[r]=t[r]}}),n}function F9(t,e){return t=z9(t!=null?t:{duration:"auto"}),B9(t,e)}function z9(t){return typeof t=="number"&&(isNaN(t)?t={duration:"auto"}:t={duration:t}),t}var G9=function(){function t(e,n,r){var i=this;this.composite="replace",this.iterationComposite="replace",this.target=e,this.timing=F9(r,!1),this.timing.effect=this,this.timing.activeDuration=_9(this.timing),this.timing.endTime=Math.max(0,this.timing.delay+this.timing.activeDuration+this.timing.endDelay),this.normalizedKeyframes=n_(n,this.timing),this.interpolations=C9(this.normalizedKeyframes,this.timing,this.target);var a=Pt.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=P9(this.timing.activeDuration,e,this.timing),this.timeFraction!==null)},t.prototype.getKeyframes=function(){return this.normalizedKeyframes},t.prototype.setKeyframes=function(e){this.normalizedKeyframes=n_(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 r_(t,e){return Number(t.id)-Number(e.id)}var W9=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(r_),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 G9(e,n,r),a=new i9(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(r_);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,(0,S.ev)([],(0,S.CR)(s),!1)),(a=this.pendingEffects).push.apply(a,(0,S.ev)([],(0,S.CR)(c),!1)),this.ticking&&this.requestAnimationFrame(function(){}),this.inTick=!1,[l,u]},t}();Pt.EasingFunction=W0,Pt.AnimationTimeline=W9;const i_="main-layer",Y0="label-layer",Ca="element",$0="view",Df="plot",a_="component",V0="label",o_="area",Sft="mask";function H9(t,e){var n=e.r;t.arc(n,n,n,0,Math.PI*2,!1)}function Y9(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 $9(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,_;u&&vn(u)&&d&&(b=i-n,_=a-r,m=Math.atan2(_,b),p=Math.cos(m)*(d||0),v=Math.sin(m)*(d||0)),f&&vn(f)&&h&&(b=n-i,_=r-a,m=Math.atan2(_,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 V9(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&&vn(o)&&c){var _=(0,S.CR)(o.parentNode.getStartTangent(),2),O=_[0],w=_[1];m=O[0]-w[0],b=O[1]-w[1],y=Math.atan2(b,m),h=Math.cos(y)*(c||0),p=Math.sin(y)*(c||0)}if(s&&vn(s)&&l){var M=(0,S.CR)(s.parentNode.getEndTangent(),2),O=M[0],w=M[1];m=O[0]-w[0],b=O[1]-w[1],y=Math.atan2(b,m),v=Math.cos(y)*(l||0),g=Math.sin(y)*(l||0)}for(var E=0;E<f.length;E++){var A=f[E],P=A[0],C=f[E+1],j=E===0&&(h!==0||p!==0),N=(E===f.length-1||C&&(C[0]==="M"||C[0]==="Z"))&&v!==0&&g!==0;switch(P){case"M":j?(t.moveTo(A[1]-r+h,A[2]-a+p),t.lineTo(A[1]-r,A[2]-a)):t.moveTo(A[1]-r,A[2]-a);break;case"L":N?t.lineTo(A[1]-r+v,A[2]-a+g):t.lineTo(A[1]-r,A[2]-a);break;case"Q":t.quadraticCurveTo(A[1]-r,A[2]-a,A[3]-r,A[4]-a),N&&t.lineTo(A[3]-r+v,A[4]-a+g);break;case"C":t.bezierCurveTo(A[1]-r,A[2]-a,A[3]-r,A[4]-a,A[5]-r,A[6]-a),N&&t.lineTo(A[5]-r+v,A[6]-a+g);break;case"A":{var k=d[E].arcParams,R=k.cx,D=k.cy,B=k.rx,F=k.ry,z=k.startAngle,Y=k.endAngle,q=k.xRotation,rt=k.sweepFlag;if(t.ellipse)t.ellipse(R-r,D-a,B,F,q,z,Y,!!(1-rt));else{var st=B>F?B:F,At=B>F?1:B/F,Yt=B>F?F/B:1;t.translate(R-r,D-a),t.rotate(q),t.scale(At,Yt),t.arc(0,0,st,z,Y,!!(1-rt)),t.scale(1/At,1/Yt),t.rotate(-q),t.translate(-(R-r),-(D-a))}N&&t.lineTo(A[6]-r+v,A[7]-a+g);break}case"Z":t.closePath();break}}}function X9(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,_=0,O,w;o&&vn(o)&&c&&(O=u[1][0]-u[0][0],w=u[1][1]-u[0][1],_=Math.atan2(w,O),g=Math.cos(_)*(c||0),y=Math.sin(_)*(c||0)),s&&vn(s)&&l&&(O=u[f-1][0]-u[0][0],w=u[f-1][1]-u[0][1],_=Math.atan2(w,O),m=Math.cos(_)*(l||0),b=Math.sin(_)*(l||0)),t.moveTo(d+(g||m),h+(y||b));for(var M=1;M<f-1;M++){var E=u[M];t.lineTo(E[0]-r,E[1]-a)}t.lineTo(p,v)}function U9(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,_=0,O,w;o&&vn(o)&&c&&(O=u[1][0]-u[0][0],w=u[1][1]-u[0][1],_=Math.atan2(w,O),g=Math.cos(_)*(c||0),y=Math.sin(_)*(c||0)),s&&vn(s)&&l&&(O=u[f-2][0]-u[f-1][0],w=u[f-2][1]-u[f-1][1],_=Math.atan2(w,O),m=Math.cos(_)*(l||0),b=Math.sin(_)*(l||0)),t.moveTo(d+g,h+y);for(var M=1;M<f-1;M++){var E=u[M];t.lineTo(E[0]-r,E[1]-a)}t.lineTo(p+m,v+b)}function q9(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=(0,S.CR)(n.map(function(g){return(0,cr.Z)(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 Z9=function(t){(0,S.ZT)(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.name="canvas-path-generator",n}return e.prototype.init=function(){var n,r=(n={},n[St.CIRCLE]=H9,n[St.ELLIPSE]=Y9,n[St.RECT]=q9,n[St.LINE]=$9,n[St.POLYLINE]=U9,n[St.POLYGON]=X9,n[St.PATH]=V9,n[St.TEXT]=void 0,n[St.GROUP]=void 0,n[St.IMAGE]=void 0,n[St.HTML]=void 0,n[St.MESH]=void 0,n);this.context.pathGeneratorFactory=r},e.prototype.destroy=function(){delete this.context.pathGeneratorFactory},e}(Za),K9=dt.create(),Q9=dt.create(),J9=dt.create(),t7=Kt.create(),e7=function(){function t(){var e=this;this.isHit=function(n,r,i,a){var o=e.context.pointInPathPickerFactory[n.nodeName];if(o){var s=Kt.invert(t7,i),c=dt.transformMat4(Q9,dt.set(J9,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 Pr(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(0,S.mG)(r,void 0,void 0,function(){return(0,S.Jh)(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=dt.set(K9,s,c,0),u=e.elementsFromBBox(l[0],l[1],l[0],l[1]),f=[];try{for(var d=(0,S.XA)(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=bx(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(_){r={error:_}}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 n7(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=Hr(i,i,e.x,e.y),d=(0,S.CR)($o(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 Bf(t,e,n,r){return t/(n*n)+e/(r*r)}function r7(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=(0,S.CR)($o(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?Bf(y,m,i+g,a+g)<=1:p?Bf(y,m,i,a)<=1:v?Bf(y,m,i-g,a-g)>=1&&Bf(y,m,i+g,a+g)<=1:!1}function Uo(t,e,n,r,i,a){return i>=t&&i<=t+n&&a>=e&&a<=e+r}function i7(t,e,n,r,i,a,o){var s=i/2;return Uo(t-s,e-s,n,i,a,o)||Uo(t+n-s,e-s,i,r,a,o)||Uo(t+s,e+r-s,n,i,a,o)||Uo(t-s,e+s,i,r,a,o)}function Ff(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 Hr(l.x,l.y,o,s)<=a/2}function no(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?kb(t,e,n,r,a,o)<=i/2:!1}function s_(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(no(s,c,l,u,e,n,r))return!0}if(i){var f=t[0],d=t[a-1];if(no(f[0],f[1],d[0],d[1],e,n,r))return!0}return!1}var a7=1e-6;function X0(t){return Math.abs(t)<a7?0:t<0?-1:1}function o7(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 c_(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(o7(o,s,[e,n]))return!0;X0(o[1]-n)>0!=X0(s[1]-n)>0&&X0(e-(n-o[1])*(o[0]-s[0])/(o[1]-s[1])-o[0])<0&&(r=!r)}return r}function l_(t,e,n){for(var r=!1,i=0;i<t.length;i++){var a=t[i];if(r=c_(a,e,n),r)break}return r}function s7(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=(0,S.CR)($o(p,v,g),2),m=y[1];return!m&&!n||!c?!1:no(i,a,o,s,(c||0)+(l||0),e.x+f,e.y+h)}function c7(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&&!Uo(d.x-o,d.y-o,d.width+e,d.height+e,n,r)))switch(c.command){case"L":case"Z":if(a=no(f[0],f[1],l[0],l[1],e,n,r),a)return!0;break;case"Q":var h=Vj(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=Nb(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=Up(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=Nb(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 l7(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,_=v.polygons,O=(0,S.CR)($o(g,(_==null?void 0:_.length)&&u,l),2),w=O[0],M=O[1],E=p0(t),A=!1;return w||n?(m?A=r(t,e):A=l_(_,e.x+d,e.y+p)||l_(b,e.x+d,e.y+p),A):((M||n)&&(A=c7(y,(s||0)+(c||0),e.x+d,e.y+p,E)),A)}function u7(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=(0,S.CR)($o(h,a,i),2),v=p[0],g=p[1],y=!1;return(g||n)&&(y=s_(c.points,(o||0)+(s||0),e.x+u,e.y+d,!0)),!y&&(v||n)&&(y=c_(c.points,e.x+u,e.y+d)),y}function f7(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=(0,S.CR)($o(f,d,h),2),v=p[1];return!v&&!n||!i?!1:s_(o.points,(i||0)+(a||0),e.x+c,e.y+u,!1)}function d7(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=(0,S.CR)($o(h,s,c),2),v=p[0],g=p[1],y=o&&o.some(function(O){return O!==0}),m=(l||0)+(u||0);if(y){var _=!1;return(g||n)&&(_=h7(0,0,f,d,o.map(function(O){return(0,cr.Z)(O,0,Math.min(Math.abs(f)/2,Math.abs(d)/2))}),m,e.x,e.y)),!_&&(v||n)&&(_=r(t,e)),_}else{var b=m/2;if(v&&g||n)return Uo(0-b,0-b,f+b,d+b,e.x,e.y);if(v)return Uo(0,0,f,d,e.x,e.y);if(g)return i7(0,0,f,d,m,e.x,e.y)}return!1}function h7(t,e,n,r,i,a,o,s){var c=(0,S.CR)(i,4),l=c[0],u=c[1],f=c[2],d=c[3];return no(t+l,e,t+n-u,e,a,o,s)||no(t+n,e+u,t+n,e+r-f,a,o,s)||no(t+n-f,e+r,t+d,e+r,a,o,s)||no(t,e+r-d,t,e+l,a,o,s)||Ff(t+n-u,e+u,u,1.5*Math.PI,2*Math.PI,a,o,s)||Ff(t+n-f,e+r-f,f,0,.5*Math.PI,a,o,s)||Ff(t+d,e+r-d,d,.5*Math.PI,Math.PI,a,o,s)||Ff(t+l,e+l,l,Math.PI,1.5*Math.PI,a,o,s)}function p7(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[St.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 v7=function(t){(0,S.ZT)(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.name="canvas-picker",n}return e.prototype.init=function(){var n,r=function(){return!0},i=(n={},n[St.CIRCLE]=n7,n[St.ELLIPSE]=r7,n[St.RECT]=d7,n[St.LINE]=s7,n[St.POLYLINE]=f7,n[St.POLYGON]=u7,n[St.PATH]=l7,n[St.TEXT]=r,n[St.GROUP]=null,n[St.IMAGE]=p7,n[St.HTML]=null,n[St.MESH]=null,n);this.context.pointInPathPickerFactory=i,this.addRenderingPlugin(new e7)},e.prototype.destroy=function(){delete this.context.pointInPathPickerFactory,this.removeAllRenderingPlugins()},e}(Za),g7=function(){function t(e){this.canvasRendererPluginOptions=e,this.removedRBushNodeAABBs=[],this.renderQueue=[],this.restoreStack=[],this.clearFullScreen=!1,this.vpMatrix=Kt.create(),this.dprMatrix=Kt.create(),this.tmpMat4=Kt.create(),this.vec3a=dt.create(),this.vec3b=dt.create(),this.vec3c=dt.create(),this.vec3d=dt.create()}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(Ie.UNMOUNTED,d),f.addEventListener(Ie.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(Ie.UNMOUNTED,d),f.removeEventListener(Ie.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,_=b.dirtyObjectNumThreshold,O=b.dirtyObjectRatioThreshold,w=o.getStats(),M=w.total,E=w.rendered,A=E/M;r.clearFullScreen=o.disableDirtyRectangleRendering()||E>_&&A>O,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(Kt.fromScaling(r.dprMatrix,[g,g,1]),Kt.multiply(r.vpMatrix,r.dprMatrix,a.getOrthoMatrix()),r.clearFullScreen)p(s.root,v);else{var y=r.safeMergeAABB.apply(r,(0,S.ev)([r.mergeDirtyAABBs(r.renderQueue)],(0,S.CR)(r.removedRBushNodeAABBs.map(function(q){var rt=q.minX,st=q.minY,At=q.maxX,Yt=q.maxY,qt=new Er;return qt.setMinMax([rt,st,0],[At,Yt,0]),qt})),!1));if(r.removedRBushNodeAABBs=[],Er.isEmpty(y)){r.renderQueue=[];return}var m=r.convertAABB2Rect(y),b=m.x,_=m.y,O=m.width,w=m.height,M=dt.transformMat4(r.vec3a,[b,_,0],r.vpMatrix),E=dt.transformMat4(r.vec3b,[b+O,_,0],r.vpMatrix),A=dt.transformMat4(r.vec3c,[b,_+w,0],r.vpMatrix),P=dt.transformMat4(r.vec3d,[b+O,_+w,0],r.vpMatrix),C=Math.min(M[0],E[0],P[0],A[0]),j=Math.min(M[1],E[1],P[1],A[1]),N=Math.max(M[0],E[0],P[0],A[0]),k=Math.max(M[1],E[1],P[1],A[1]),R=Math.floor(C),D=Math.floor(j),B=Math.ceil(N-C),F=Math.ceil(k-j);v.save(),r.clearRect(v,R,D,B,F,i.background),v.beginPath(),v.rect(R,D,B,F),v.clip(),v.setTransform(r.vpMatrix[0],r.vpMatrix[1],r.vpMatrix[4],r.vpMatrix[5],r.vpMatrix[12],r.vpMatrix[13]);var z=i.renderer.getConfig().enableDirtyRectangleRenderingDebug;z&&f.dispatchEvent(new Nn(pi.DIRTY_RECTANGLE,{dirtyRect:{x:R,y:D,width:B,height:F}}));var Y=r.searchDirtyObjects(y);Y.sort(function(q,rt){return q.sortable.renderOrder-rt.sortable.renderOrder}).forEach(function(q){q&&q.isVisible()&&!q.isCulled()&&r.renderDisplayObject(q,v,r.context,r.restoreStack,n)}),v.restore(),r.renderQueue.forEach(function(q){r.saveDirtyAABB(q)}),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)&kr.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!==St.LINE&&e.nodeName!==St.PATH&&e.nodeName!==St.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 Er;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=(0,S.CR)(e.getMin(),2),r=n[0],i=n[1],a=(0,S.CR)(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 Er);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),(0,me.Z)(c)||(e.lineDashOffset=c),(0,me.Z)(o)||(e.globalAlpha*=o),!(0,me.Z)(i)&&!Array.isArray(i)&&!i.isNone&&(e.strokeStyle=n.attributes.stroke),!(0,me.Z)(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?(Kt.copy(this.tmpMat4,n.getLocalTransform()),this.vec3a[0]=i,this.vec3a[1]=a,this.vec3a[2]=0,Kt.translate(this.tmpMat4,this.tmpMat4,this.vec3a),Kt.multiply(this.tmpMat4,r,this.tmpMat4),Kt.multiply(this.tmpMat4,this.vpMatrix,this.tmpMat4)):(Kt.copy(this.tmpMat4,n.getWorldTransform()),this.vec3a[0]=i,this.vec3a[1]=a,this.vec3a[2]=0,Kt.translate(this.tmpMat4,this.tmpMat4,this.vec3a),Kt.multiply(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 Er;return e.forEach(function(i){r.add(i)}),r},t.tag="CanvasRenderer",t}(),ro=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,_=n.miterLimit,O=!(0,me.Z)(s)&&!s.isNone,w=!(0,me.Z)(f)&&!f.isNone&&h>0,M=s.alpha===0,E=!!(b&&b.length),A=!(0,me.Z)(y)&&m>0,P=r.nodeName,C=g==="inner",j=w&&A&&(P===St.PATH||P===St.LINE||P===St.POLYLINE||M||C);O&&(e.globalAlpha=l*u,j||zf(r,e,A),this.fill(e,r,s,c,i,a,o),j||this.clearShadowAndFilter(e,E,A)),w&&(e.globalAlpha=l*d,e.lineWidth=h,(0,me.Z)(_)||(e.miterLimit=_),(0,me.Z)(p)||(e.lineCap=p),(0,me.Z)(v)||(e.lineJoin=v),j&&(C&&(e.globalCompositeOperation="source-atop"),zf(r,e,!0),C&&(this.stroke(e,r,f,i,a,o),e.globalCompositeOperation="source-over",this.clearShadowAndFilter(e,E,!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;!(0,me.Z)(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()}):(Kc(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()}):(Kc(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===sa.LinearGradient||e.type===sa.RadialGradient){var a=n.getGeometryBounds(),o=a&&a.halfExtents[0]*2||1,s=a&&a.halfExtents[1]*2||1;i=this.imagePool.getOrCreateGradient((0,S.pi)((0,S.pi)({type:e.type},e.value),{width:o,height:s}),r)}return i},t}();function zf(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 y7=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(er(o)?l=this.imagePool.getImageSync(o):(u||(u=o.width),f||(f=o.height),l=o),l){var d=!(0,me.Z)(s)&&c>0;zf(r,e,d);try{e.drawImage(l,0,0,u,f)}catch(h){}}},t}(),m7=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,_=s.dx,O=s.dy,w=s.shadowColor,M=s.shadowBlur,E=b.font,A=b.lines,P=b.height,C=b.lineHeight,j=b.lineMetrics;e.font=E,e.lineWidth=c,e.textAlign=l==="middle"?"center":l;var N=u;!o.enableCSSParsing&&N==="alphabetic"&&(N="bottom"),e.lineJoin=f,(0,me.Z)(d)||(e.miterLimit=d);var k=0;u==="middle"?k=-P/2-C/2:u==="bottom"||u==="alphabetic"||u==="ideographic"?k=-P:(u==="top"||u==="hanging")&&(k=-C);var R=_||0;k+=O||0,A.length===1&&(N==="bottom"?(N="middle",k-=.5*P):N==="top"&&(N="middle",k+=.5*P)),e.textBaseline=N;var D=!(0,me.Z)(w)&&M>0;zf(r,e,D);for(var B=0;B<A.length;B++){var F=c/2+R;k+=C,!(0,me.Z)(p)&&!p.isNone&&c&&this.drawLetterSpacing(e,A[B],j[B],l,F,k,h,g,y,m,!0),(0,me.Z)(v)||this.drawLetterSpacing(e,A[B],j[B],l,F,k,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=!(0,me.Z)(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=!(0,me.Z)(a)&&a!==1;s&&(o=e.globalAlpha,e.globalAlpha=a),e.strokeText(n,r,i),s&&(e.globalAlpha=o)},t}(),Mft=function(t){(0,S.ZT)(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(ro),Eft=function(t){(0,S.ZT)(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(ro),Aft=function(t){(0,S.ZT)(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(ro),Tft=function(t){(0,S.ZT)(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(ro),Pft=function(t){(0,S.ZT)(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(ro),Cft=function(t){(0,S.ZT)(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(ro),kft=function(t){(0,S.ZT)(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(ro),b7=function(t){(0,S.ZT)(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=(0,S.pi)({dirtyObjectNumThreshold:500,dirtyObjectRatioThreshold:.8},this.options),i=this.context.imagePool,a=new ro(i),o=(n={},n[St.CIRCLE]=a,n[St.ELLIPSE]=a,n[St.RECT]=a,n[St.IMAGE]=new y7(i),n[St.TEXT]=new m7,n[St.LINE]=a,n[St.POLYLINE]=a,n[St.POLYGON]=a,n[St.PATH]=a,n[St.GROUP]=void 0,n[St.HTML]=void 0,n[St.MESH]=void 0,n);this.context.defaultStyleRendererFactory=o,this.context.styleRendererFactory=o,this.addRenderingPlugin(new g7(r))},e.prototype.destroy=function(){this.removeAllRenderingPlugins(),delete this.context.defaultStyleRendererFactory,delete this.context.styleRendererFactory},e}(Za),x7=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(w){i.hooks.pointerMove.call(w)},l=function(w){i.hooks.pointerUp.call(w)},u=function(w){i.hooks.pointerDown.call(w)},f=function(w){i.hooks.pointerOver.call(w)},d=function(w){i.hooks.pointerOut.call(w)},h=function(w){i.hooks.pointerCancel.call(w)},p=function(w){i.hooks.pointerWheel.call(w)},v=function(w){i.hooks.click.call(w)},g=function(w){n.globalThis.document.addEventListener("pointermove",c,!0),w.addEventListener("pointerdown",u,!0),w.addEventListener("pointerleave",d,!0),w.addEventListener("pointerover",f,!0),n.globalThis.addEventListener("pointerup",l,!0),n.globalThis.addEventListener("pointercancel",h,!0)},y=function(w){w.addEventListener("touchstart",u,!0),w.addEventListener("touchend",l,!0),w.addEventListener("touchmove",c,!0),w.addEventListener("touchcancel",h,!0)},m=function(w){n.globalThis.document.addEventListener("mousemove",c,!0),w.addEventListener("mousedown",u,!0),w.addEventListener("mouseout",d,!0),w.addEventListener("mouseover",f,!0),n.globalThis.addEventListener("mouseup",l,!0)},b=function(w){n.globalThis.document.removeEventListener("pointermove",c,!0),w.removeEventListener("pointerdown",u,!0),w.removeEventListener("pointerleave",d,!0),w.removeEventListener("pointerover",f,!0),n.globalThis.removeEventListener("pointerup",l,!0)},_=function(w){w.removeEventListener("touchstart",u,!0),w.removeEventListener("touchend",l,!0),w.removeEventListener("touchmove",c,!0),w.removeEventListener("touchcancel",h,!0)},O=function(w){n.globalThis.document.removeEventListener("mousemove",c,!0),w.removeEventListener("mousedown",u,!0),w.removeEventListener("mouseout",d,!0),w.removeEventListener("mouseover",f,!0),n.globalThis.removeEventListener("mouseup",l,!0)};i.hooks.init.tap(t.tag,function(){var w=r.context.contextService.getDomElement();n.globalThis.navigator.msPointerEnabled?(w.style.msContentZooming="none",w.style.msTouchAction="none"):s.supportsPointerEvents&&(w.style.touchAction="none"),s.supportsPointerEvents?g(w):m(w),s.supportsTouchEvents&&y(w),o.useNativeClickEvent&&w.addEventListener("click",v,!0),w.addEventListener("wheel",p,{passive:!0,capture:!0})}),i.hooks.destroy.tap(t.tag,function(){var w=r.context.contextService.getDomElement();n.globalThis.navigator.msPointerEnabled?(w.style.msContentZooming="",w.style.msTouchAction=""):s.supportsPointerEvents&&(w.style.touchAction=""),s.supportsPointerEvents?b(w):O(w),s.supportsTouchEvents&&_(w),o.useNativeClickEvent&&w.removeEventListener("click",v,!0),w.removeEventListener("wheel",p,!0)})},t.tag="DOMInteraction",t}(),_7=function(t){(0,S.ZT)(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.name="dom-interaction",n}return e.prototype.init=function(){this.addRenderingPlugin(new x7)},e.prototype.destroy=function(){this.removeAllRenderingPlugins()},e}(Za),O7="g-canvas-camera",w7=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=function(p,v){v.style.transform=r.joinTransformMatrix(p.getWorldTransform())},l=function(p){var v=p.target;if(v.nodeName===St.HTML){r.$camera||(r.$camera=r.createCamera(i));var g=r.getOrCreateEl(v);if(r.$camera.appendChild(g),n.enableCSSParsing){var y=v.ownerDocument.documentElement.attributes;Object.keys(y).forEach(function(m){g.style[m]=y[m]})}Object.keys(v.attributes).forEach(function(m){r.updateAttribute(m,v)}),c(v,g),r.context.nativeHTMLMap.set(g,v)}},u=function(p){var v=p.target;if(v.nodeName===St.HTML&&r.$camera){var g=r.getOrCreateEl(v);g&&(g.remove(),r.context.nativeHTMLMap.delete(g))}},f=function(p){var v=p.target;if(v.nodeName===St.HTML){var g=p.attrName;r.updateAttribute(g,v)}},d=function(p){var v=p.target;if(v.nodeName===St.HTML){var g=r.getOrCreateEl(v);c(v,g)}},h=function(){if(r.$camera){var p=r.context.config,v=p.width,g=p.height;r.$camera.style.width="".concat(v||0,"px"),r.$camera.style.height="".concat(g||0,"px")}};o.hooks.init.tap(t.tag,function(){s.addEventListener(pi.RESIZE,h),s.addEventListener(Ie.MOUNTED,l),s.addEventListener(Ie.UNMOUNTED,u),s.addEventListener(Ie.ATTR_MODIFIED,f),s.addEventListener(Ie.BOUNDS_CHANGED,d)}),o.hooks.endFrame.tap(t.tag,function(){r.$camera&&a.renderReasons.has(to.CAMERA_CHANGED)&&(r.$camera.style.transform=r.joinTransformMatrix(i.getOrthoMatrix()))}),o.hooks.destroy.tap(t.tag,function(){r.$camera&&r.$camera.remove(),s.removeEventListener(pi.RESIZE,h),s.removeEventListener(Ie.MOUNTED,l),s.removeEventListener(Ie.UNMOUNTED,u),s.removeEventListener(Ie.ATTR_MODIFIED,f),s.removeEventListener(Ie.BOUNDS_CHANGED,d)})},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=O7,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;er(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=(0,xr.Z)(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=(0,xr.Z)(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="";pf(d)?d.isNone?h="transparent":h=n.getAttribute("fill"):Array.isArray(d)?h=n.getAttribute("fill"):Kc(d),r.style.background=h;break;case"stroke":var p=n.parsedStyle.stroke,v="";pf(p)?p.isNone?v="transparent":v=n.getAttribute("stroke"):Array.isArray(p)?v=n.getAttribute("stroke"):Kc(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"&&!(0,me.Z)(n.style[e])&&n.style[e]!==""&&(r.style[e]=n.style[e])}},t.tag="HTMLRendering",t}(),S7=function(t){(0,S.ZT)(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.name="html-renderer",n}return e.prototype.init=function(){this.addRenderingPlugin(new w7)},e.prototype.destroy=function(){this.removeAllRenderingPlugins()},e}(Za),M7=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):tl&&(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;er(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=S0(mf(l),new $r({})):h=Kt.identity(Kt.create()),f&&Kt.scale(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===sa.LinearGradient){var h=M6(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===sa.RadialGradient){var m=E6(o,s,l,u,f),b=m.x,_=m.y,O=m.r;d=n.createRadialGradient(b,_,0,b,_,O)}return d&&(a.forEach(function(w){var M=w.offset,E=w.color;M.unit===oe.kPercentage&&(d==null||d.addColorStop(M.value/100,E.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(er(n))return"pattern-".concat(n,"-").concat(r);if(n.nodeName==="rect")return"pattern-".concat(n.entity,"-").concat(r)},t}(),E7=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===St.IMAGE){var h=d.img,p=d.keepAspectRatio;er(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===St.IMAGE&&f==="img"&&er(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(Ie.MOUNTED,s),a.addEventListener(Ie.ATTR_MODIFIED,c)}),n.hooks.destroy.tap(t.tag,function(){a.removeEventListener(Ie.MOUNTED,s),a.removeEventListener(Ie.ATTR_MODIFIED,c)})},t.tag="LoadImage",t}(),A7=function(t){(0,S.ZT)(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.name="image-loader",n}return e.prototype.init=function(){this.context.imagePool=new M7(this.context.config),this.addRenderingPlugin(new E7)},e.prototype.destroy=function(){this.removeAllRenderingPlugins()},e}(Za),T7=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=er(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||tl&&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,R8(this.$canvas,e,n)),this.renderingContext.renderReasons.add(to.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={}),(0,S.mG)(this,void 0,void 0,function(){var n,r;return(0,S.Jh)(this,function(i){return n=e.type,r=e.encoderOptions,[2,this.context.canvas.toDataURL(n,r)]})})},t}(),P7=function(t){(0,S.ZT)(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.name="canvas-context-register",n}return e.prototype.init=function(){this.context.ContextService=T7},e.prototype.destroy=function(){delete this.context.ContextService},e}(Za),u_=function(t){(0,S.ZT)(e,t);function e(n){var r=t.call(this,n)||this;return r.registerPlugin(new P7),r.registerPlugin(new A7),r.registerPlugin(new Z9),r.registerPlugin(new b7),r.registerPlugin(new _7),r.registerPlugin(new v7),r.registerPlugin(new S7),r}return e}(qj),C7=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(0,S.mG)(n,void 0,void 0,function(){var _,O,w,M,E,A;return(0,S.Jh)(this,function(P){switch(P.label){case 0:if(!d){if(_=b.timeStamp-h,O=ui([b.clientX,b.clientY],p),_<=this.dragndropPluginOptions.dragstartTimeThreshold||O<=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]:(w=this.dragndropPluginOptions.overlap==="pointer"?[b.canvasX,b.canvasY]:l.getBounds().center,[4,a.elementsFromPoint(w[0],w[1])]);case 1:M=P.sent(),E=M[M.indexOf(l)+1],A=(E==null?void 0:E.closest("[droppable=true]"))||(this.dragndropPluginOptions.isDocumentDroppable?a:null),v!==A&&(v&&(b.type="dragleave",b.target=v,v.dispatchEvent(b)),A&&(b.type="dragenter",b.target=A,A.dispatchEvent(b)),v=A,v&&(b.type="dragover",b.target=v,v.dispatchEvent(b))),P.label=2;case 2:return[2]}})})};o.addEventListener("pointermove",y);var m=function(b){if(d){b.detail={preventClick:!0};var _=b.clone();v&&(_.type="drop",_.target=v,v.dispatchEvent(_)),_.type="dragend",f.dispatchEvent(_),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}(),f_=function(t){(0,S.ZT)(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 C7((0,S.pi)({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}(Za);function k7(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 d_=k7,R7=function(t){return typeof t=="object"&&t!==null},U0=R7,L7=function(t){if(!U0(t)||!(0,ef.Z)(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},io=L7,N7=5;function I7(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 h_(t,e,n,r){n=n||0,r=r||N7;for(var i in e)if(I7(e,i)){var a=e[i];a!==null&&io(a)?(io(t[i])||(t[i]={}),n<r?h_(t[i],a,n+1,r):t[i]=e[i]):Dr(a)?(t[i]=[],t[i]=t[i].concat(a)):a!==void 0&&(t[i]=a)}}var j7=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)h_(t,e[r]);return t},Dt=j7;class D7 extends Map{constructor(e,n=g_){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(q0(this,e))}has(e){return super.has(q0(this,e))}set(e,n){return super.set(p_(this,e),n)}delete(e){return super.delete(v_(this,e))}}class Rft extends null{constructor(e,n=g_){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(q0(this,e))}add(e){return super.add(p_(this,e))}delete(e){return super.delete(v_(this,e))}}function q0({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function p_({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function v_({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function g_(t){return t!==null&&typeof t=="object"?t.valueOf():t}function sl(t){return t}function Kn(t,...e){return Ys(t,sl,sl,e)}function Gf(t,...e){return Ys(t,Array.from,sl,e)}function y_(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 Lft(t,...e){return y_(Gf(t,...e),e)}function Nft(t,e,...n){return y_(K0(t,e,...n),n)}function Z0(t,e,...n){return Ys(t,sl,e,n)}function K0(t,e,...n){return Ys(t,Array.from,e,n)}function Ift(t,...e){return Ys(t,identity,m_,e)}function jft(t,...e){return Ys(t,Array.from,m_,e)}function m_(t){if(t.length!==1)throw new Error("duplicate key");return t[0]}function Ys(t,e,n,r){return function i(a,o){if(o>=r.length)return n(a);const s=new D7,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 b_=function(t){return(0,me.Z)(t)?"":t.toString()},B7=function(t){var e=b_(t);return e.charAt(0).toLowerCase()+e.substring(1)},x_=B7,F7=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 qo(t){return t}function Q0(t){return t.reduce((e,n)=>(r,...i)=>n(e(r,...i),...i),qo)}function z7(t){return t.reduce((e,n)=>r=>F7(this,void 0,void 0,function*(){const i=yield e(r);return n(i)}),qo)}function J0(t){return t.replace(/( |^)[a-z]/g,e=>e.toUpperCase())}function $s(t=""){throw new Error(t)}function tv(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 In(t){return t!=null&&!Number.isNaN(t)}function Dft(t,e){return t+(e-t)*Math.random()}function G7(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 W7(t,e){const{transform:n}=t.style,i=(a=>a==="none"||a===void 0)(n)?"":n;t.style.transform=`${i} ${e}`.trimStart()}function fe(t,e){return __(t,e)||{}}function __(t,e){const n=Object.entries(t||{}).filter(([r])=>r.startsWith(e)).map(([r,i])=>[x_(r.replace(e,"").trim()),i]).filter(([r])=>!!r);return n.length===0?null:Object.fromEntries(n)}function Bft(t,e){return Object.fromEntries(Object.entries(t).map(([n,r])=>[`${e}${upperFirst(n)}`,r]))}function H7(t,e){return Object.fromEntries(Object.entries(t).filter(([n])=>e.find(r=>n.startsWith(r))))}function ev(t,...e){return Object.fromEntries(Object.entries(t).filter(([n])=>e.every(r=>!n.startsWith(r))))}function O_(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 cl(t){return typeof t=="object"&&!(t instanceof Date)&&t!==null&&!Array.isArray(t)}function ka(t){return t===null||t===!1}function w_(t,e,n=5,r=0){if(!(r>=n)){for(const i of Object.keys(e)){const a=e[i];!io(a)||!io(t[i])?t[i]=a:w_(t[i],a,n,r+1)}return t}}function je(t){return new _r([t],null,t,t.ownerDocument)}class _r{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 _r(n,null,this._elements[0],this._document)}selectFacetAll(e){const n=typeof e=="string"?this._parent.querySelectorAll(e):e;return new _r(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 _r([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 _r(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 _r(r,null,r[0],this._document)}}maybeAppend(e,n,r){const i=this._elements[0],a=i.getElementById(e);if(a)return new _r([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 _r([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=Kn(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 _r([],i,this._parent,this._document),new _r(a,null,this._parent,this._document),new _r(o,null,this._parent,this._document),new _r([],s,this._parent,this._document),new _r(c,null,this._parent,this._document)];return new _r(this._elements,null,this._parent,this._document,d)}merge(e){const n=[...this._elements,...e._elements],r=[...this._transitions,...e._transitions];return new _r(n,null,this._parent,this._document,void 0,r)}createElement(e){if(this._document)return this._document.createElement(e,{});const n=_r.registry[e];return n?new n:$s(`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 _r([],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}}_r.registry={g:Br,rect:Xo,circle:nl,path:ri,text:Zi,ellipse:k0,image:R0,line:rl,polygon:il,polyline:L0,html:xf};const Sn={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 Y7=function(t){var e=b_(t);return e.charAt(0).toUpperCase()+e.substring(1)},ao=Y7;function $7(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function Wf(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 V7(t){return t=Wf(Math.abs(t)),t?t[1]:NaN}function X7(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 U7(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var q7=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function nv(t){if(!(e=q7.exec(t)))throw new Error("invalid format: "+t);var e;return new rv({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]})}nv.prototype=rv.prototype;function rv(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+""}rv.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 Z7(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 S_;function K7(t,e){var n=Wf(t,e);if(!n)return t+"";var r=n[0],i=n[1],a=i-(S_=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")+Wf(t,Math.max(0,e+a-1))[0]}function M_(t,e){var n=Wf(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 E_={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:$7,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)=>M_(t*100,e),r:M_,s:K7,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function A_(t){return t}var T_=Array.prototype.map,P_=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function Q7(t){var e=t.grouping===void 0||t.thousands===void 0?A_:X7(T_.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?A_:U7(T_.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=nv(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,_=f.trim,O=f.type;O==="n"?(m=!0,O="g"):E_[O]||(b===void 0&&(b=12),_=!0,O="g"),(g||d==="0"&&h==="=")&&(g=!0,d="0",h="=");var w=v==="$"?n:v==="#"&&/[boxX]/.test(O)?"0"+O.toLowerCase():"",M=v==="$"?r:/[%p]/.test(O)?o:"",E=E_[O],A=/[defgprs%]/.test(O);b=b===void 0?6:/[gprs]/.test(O)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b));function P(C){var j=w,N=M,k,R,D;if(O==="c")N=E(C)+N,C="";else{C=+C;var B=C<0||1/C<0;if(C=isNaN(C)?c:E(Math.abs(C),b),_&&(C=Z7(C)),B&&+C==0&&p!=="+"&&(B=!1),j=(B?p==="("?p:s:p==="-"||p==="("?"":p)+j,N=(O==="s"?P_[8+S_/3]:"")+N+(B&&p==="("?")":""),A){for(k=-1,R=C.length;++k<R;)if(D=C.charCodeAt(k),48>D||D>57){N=(D===46?i+C.slice(k+1):C.slice(k))+N,C=C.slice(0,k);break}}}m&&!g&&(C=e(C,1/0));var F=j.length+C.length+N.length,z=F<y?new Array(y-F+1).join(d):"";switch(m&&g&&(C=e(z+C,z.length?y-N.length:1/0),z=""),h){case"<":C=j+C+N+z;break;case"=":C=j+z+C+N;break;case"^":C=z.slice(0,F=z.length>>1)+j+C+N+z.slice(F);break;default:C=z+j+C+N;break}return a(C)}return P.toString=function(){return f+""},P}function u(f,d){var h=l((f=nv(f),f.type="f",f)),p=Math.max(-8,Math.min(8,Math.floor(V7(d)/3)))*3,v=Math.pow(10,-p),g=P_[8+p/3];return function(y){return h(v*y)+g}}return{format:l,formatPrefix:u}}var Hf,oo,J7;tB({thousands:",",grouping:[3],currency:["$",""]});function tB(t){return Hf=Q7(t),oo=Hf.format,J7=Hf.formatPrefix,Hf}function so(t,e){return Object.entries(t).reduce((n,[r,i])=>(n[r]=e(i,r,t),n),{})}function Zo(t){return t.map((e,n)=>n)}function Fft(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 eB(t){return t[0]}function C_(t){return t[t.length-1]}function zft(t){return!t.some(Array.isArray)}function nB(t){return Array.from(new Set(t))}function k_(t,e){const n=[[],[]];return t.forEach(r=>{n[e(r)?0:1].push(r)}),n}function R_(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);R_(i,e-1).forEach(o=>{n.push([t[r],...o])})}return n}function rB(t){if(t.length===1)return[t];const e=[];for(let n=1;n<=t.length;n++)e.push(...R_(t,n));return e}var iB=function(t){return t!==null&&typeof t!="function"&&isFinite(t.length)},ll=iB,iv=function(t,e){if(t===e)return!0;if(!t||!e||er(t)||er(e))return!1;if(ll(t)||ll(e)){if(t.length!==e.length)return!1;for(var n=!0,r=0;r<t.length&&(n=iv(t[r],e[r]),!!n);r++);return n}if(U0(t)||U0(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=iv(t[i[r]],e[i[r]]),!!n);r++);return n}return!1},L_=iv;function Di(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 Mn(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}const N_=(t={})=>{const e={startAngle:-Math.PI/2,endAngle:Math.PI*3/2,innerRadius:0,outerRadius:1};return Object.assign(Object.assign({},e),t)},ul=t=>{const{startAngle:e,endAngle:n,innerRadius:r,outerRadius:i}=N_(t);return[["translate",0,.5],["reflect.y"],["translate",0,-.5],["polar",e,n,r,i]]};ul.props={};const I_=(t={})=>{const e={startAngle:-Math.PI/2,endAngle:Math.PI*3/2,innerRadius:0,outerRadius:1};return Object.assign(Object.assign({},e),t)},av=t=>{const{startAngle:e,endAngle:n,innerRadius:r,outerRadius:i}=I_(t);return[["transpose"],["translate",.5,.5],["reflect"],["translate",-.5,-.5],...ul({startAngle:e,endAngle:n,innerRadius:r,outerRadius:i})]};av.props={};function Yf(t,e,n){return Math.max(e,Math.min(t,n))}function $f(t,e=10){return typeof t!="number"||Math.abs(t)<1e-15?t:parseFloat(t.toFixed(e))}const aB=[["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 j_=gt(16290);function $n(t){const{transformations:e}=t.getOptions();return e.map(([r])=>r).filter(r=>r==="transpose").length%2!==0}function Gn(t){const{transformations:e}=t.getOptions();return e.some(([n])=>n==="polar")}function fl(t){const{transformations:e}=t.getOptions();return e.some(([n])=>n==="reflect")&&e.some(([n])=>n.startsWith("transpose"))}function D_(t){const{transformations:e}=t.getOptions();return e.some(([n])=>n==="helix")}function dl(t){const{transformations:e}=t.getOptions();return e.some(([n])=>n==="parallel")}function B_(t){const{transformations:e}=t.getOptions();return e.some(([n])=>n==="fisheye")}function oB(t){return dl(t)&&Gn(t)}function Vs(t){return D_(t)||Gn(t)}function F_(t){return Gn(t)&&$n(t)}function Gft(t){return Gn(t)||dl(t)||fl(t)||F_(t)}function sB(t){if(Vs(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 Vf(t){const{transformations:e}=t.getOptions(),[,,,n,r]=e.find(i=>i[0]==="polar");return[+n,+r]}function ov(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 cB(t,e){const{transformations:n}=t.getOptions(),[,...r]=n.find(i=>i[0]===e);return r}function z_(t,e){e(t),t.children&&t.children.forEach(function(n){n&&z_(n,e)})}function hl(t){Xf(t,!0)}function co(t){Xf(t,!1)}function Xf(t,e){var n=e?"visible":"hidden";z_(t,function(r){r.attr("visibility",n)})}function lB(t){return typeof t=="boolean"?!1:"enter"in t&&"update"in t&&"exit"in t}function G_(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=(0,S.CR)(r,1),a=i[0];return!e.includes(a)}));return Object.fromEntries(e.map(function(r){return lB(t)?t[r]===!1?[r,!1]:[r,(0,S.pi)((0,S.pi)({},t[r]),n)]:[r,n]}))}function Xs(t,e){t?t.finished.then(e):e()}function uB(t,e){t.length===0?e():Promise.all(t.map(function(n){return n==null?void 0:n.finished})).then(e)}function W_(t,e){"update"in t?t.update(e):t.attr(e)}function H_(t,e,n){if(e.length===0)return null;if(!n){var r=e.slice(-1)[0];return W_(t,{style:r}),null}return t.animate(e,n)}function fB(t,e){return!(t.nodeName!=="text"||e.nodeName!=="text"||t.attributes.text!==e.attributes.text)}function dB(t,e,n,r){if(r===void 0&&(r="destroy"),fB(t,e))return t.remove(),[null];var i=function(){r==="destroy"?t.destroy():r==="hide"&&co(t),e.isVisible()&&hl(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(C){if(C.nodeName==="circle"){var j=(0,S.CR)(C.getLocalPosition(),2),N=j[0],k=j[1],R=C.attr("r");return[N-R,k-R]}return C.getLocalPosition()},d=(0,S.CR)(f(t),2),h=d[0],p=d[1],v=(0,S.CR)(f(e),2),g=v[0],y=v[1],m=(0,S.CR)([(h+g)/2-h,(p+y)/2-p],2),b=m[0],_=m[1],O=t.style.opacity,w=O===void 0?1:O,M=e.style.opacity,E=M===void 0?1:M,A=t.animate([{opacity:w,transform:"translate(0, 0)"},{opacity:0,transform:"translate(".concat(b,", ").concat(_,")")}],(0,S.pi)((0,S.pi)({fill:"both"},n),{duration:c+l+u})),P=e.animate([{opacity:0,transform:"translate(".concat(-b,", ").concat(-_,")"),offset:.01},{opacity:E,transform:"translate(0, 0)"}],(0,S.pi)((0,S.pi)({fill:"both"},n),{duration:l+u,delay:c+l-u}));return Xs(P,i),[A,P]}function Ki(t,e,n){var r={},i={};return Object.entries(e).forEach(function(a){var o=(0,S.CR)(a,2),s=o[0],c=o[1];if(!(0,me.Z)(c)){var l=t.style[s]||t.parsedStyle[s]||0;l!==c&&(r[s]=l,i[s]=c)}}),n?H_(t,[r,i],(0,S.pi)({fill:"both"},n)):(W_(t,i),null)}var hB=5,Y_=function(t,e,n,r){n===void 0&&(n=0),r===void 0&&(r=hB),Object.entries(e).forEach(function(i){var a=(0,S.CR)(i,2),o=a[0],s=a[1],c=t;Object.prototype.hasOwnProperty.call(e,o)&&(s?io(s)?(io(t[o])||(c[o]={}),n<r?Y_(t[o],s,n+1,r):c[o]=e[o]):Dr(s)?(c[o]=[],c[o]=c[o].concat(s)):c[o]=s:c[o]=s)})},Ra=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)Y_(t,e[r]);return t},pB=function(t){(0,S.ZT)(e,t);function e(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=t.apply(this,(0,S.ev)([],(0,S.CR)(n),!1))||this;return i.addEventListener(Ie.INSERTED,function(){co(i)}),i}return e}(Br);function $_(t){var e=t.appendChild(new pB({class:"offscreen"}));return co(e),e}function vB(t){for(var e=t;e;){if(e.className==="offscreen")return!0;e=e.parent}return!1}function gB(){Xf(this,this.attributes.visibility!=="hidden")}var Rr=function(t){(0,S.ZT)(e,t);function e(n,r){r===void 0&&(r={});var i=t.call(this,Ra({},{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=$_(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"&&gB.call(this)},e.prototype.update=function(n,r){var i;return this.attr(Ra({},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}(C0);function vi(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 yB(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 sv=function(t){(0,S.ZT)(e,t);function e(n){n===void 0&&(n={});var r=n.style,i=(0,S._T)(n,["style"]);return t.call(this,(0,S.pi)({style:(0,S.pi)({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=$_(this)),this._offscreen},enumerable:!1,configurable:!0}),e.prototype.disconnectedCallback=function(){var n;(n=this._offscreen)===null||n===void 0||n.destroy()},e}(Zi);function mB(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 bB(t){throw new Error(t)}var xB=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=(0,S.CR)(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=(0,S.Q_)(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=(0,S.Q_)(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=(0,S.Q_)(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(P){return P}),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(P,C){return[a(P.__data__,C),P]})),v=new Map(this._facetElements.map(function(P,C){return[a(P.__data__,C),P]})),g=mB(this._elements,function(P){return o(P.__data__)}),y=0;y<i.length;y++){var m=i[y],b=a(m,y),_=o(m,y);if(p.has(b)){var O=p.get(b);O.__data__=m,O.__facet__=!1,u.push(O),f.delete(O),p.delete(b)}else if(v.has(b)){var O=v.get(b);O.__data__=m,O.__facet__=!0,u.push(O),v.delete(b)}else if(g.has(b)){var w=g.get(b);d.push([m,w]);try{for(var M=(s=void 0,(0,S.XA)(w)),E=M.next();!E.done;E=M.next()){var O=E.value;f.delete(O)}}catch(P){s={error:P}}finally{try{E&&!E.done&&(c=M.return)&&c.call(M)}finally{if(s)throw s.error}}g.delete(b)}else if(p.has(_)){var O=p.get(_);O.__toData__?O.__toData__.push(m):O.__toData__=[m],h.add(O),f.delete(O)}else l.push(m)}var A=[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,A)},t.prototype.merge=function(i){var a=(0,S.ev)((0,S.ev)([],(0,S.CR)(this._elements),!1),(0,S.CR)(i._elements),!1),o=(0,S.ev)((0,S.ev)([],(0,S.CR)(this._transitions),!1),(0,S.CR)(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:bB("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=(0,S.CR)(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,(0,S.ev)([this._parent,this],(0,S.CR)(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:Br,rect:Xo,circle:nl,path:ri,text:sv,ellipse:k0,image:R0,line:rl,polygon:il,polyline:L0,html:xf},t}();function qe(t){return new xB([t],null,t,t.ownerDocument)}function _B(t,e,n){return t.querySelector(e)?qe(t).select(e):qe(t).append(n)}var Bi=function(t,e){var n=function(i){return"".concat(e,"-").concat(i)},r=Object.fromEntries(Object.entries(t).map(function(i){var a=(0,S.CR)(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},cv={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 ri({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:[]},Wft=Dt({},cv,{style:{type:"arc"}}),Hft=Dt({},cv,{style:{}}),Pn=Bi({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"),gi=function(t){return typeof t=="function"};function La(t,e){return[t[0]*e,t[1]*e]}function pl(t,e){return[t[0]+e[0],t[1]+e[1]]}function lv(t,e){return[t[0]-e[0],t[1]-e[1]]}function Ko(t,e){return[Math.min(t[0],e[0]),Math.min(t[1],e[1])]}function Qo(t,e){return[Math.max(t[0],e[0]),Math.max(t[1],e[1])]}function vl(t,e){return Math.sqrt(Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2))}function V_(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 Yft(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 OB(t,e){return e?[t[1],-t[0]]:[-t[1],t[0]]}function Us(t){return t*Math.PI/180}function X_(t){return Number((t*180/Math.PI).toPrecision(5))}function uv(t){return t.toString().charAt(0).toUpperCase()+t.toString().slice(1)}function wB(t){return t.toString().charAt(0).toLowerCase()+t.toString().slice(1)}function SB(t,e){return"".concat(e).concat(uv(t))}function U_(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?wB(a):a}function MB(t,e){Object.entries(e).forEach(function(n){var r=(0,S.CR)(n,2),i=r[0],a=r[1];(0,S.ev)([t],(0,S.CR)(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 Uf=function(t,e){if(!(t!=null&&t.startsWith(e)))return!1;var n=t[e.length];return n>="A"&&n<="Z"};function en(t,e,n){n===void 0&&(n=!1);var r={};return Object.entries(t).forEach(function(i){var a=(0,S.CR)(i,2),o=a[0],s=a[1];if(!(o==="className"||o==="class")){if(Uf(o,"show")&&Uf(U_(o,"show"),e)!==n)o===SB(e,"show")?r[o]=s:r[o.replace(new RegExp(uv(e)),"")]=s;else if(!Uf(o,"show")&&Uf(o,e)!==n){var c=U_(o,e);c==="filter"&&typeof s=="function"||(r[c]=s)}}}),r}function la(t,e){return Object.entries(t).reduce(function(n,r){var i=(0,S.CR)(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(uv(a))]=o,n},{})}function Na(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=(0,S.CR)(a,2),s=o[0],c=o[1];e.includes(s)||(n.indexOf(s)!==-1?i[s]=c:r[s]=c)}),[r,i]}function Fi(t,e){return gi(t)?t.apply(void 0,(0,S.ev)([],(0,S.CR)(e),!1)):t}function qf(t,e){return t.style.opacity||(t.style.opacity=1),Ki(t,{opacity:0},e)}var EB=["$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 AB(t){return EB.includes(t)}function q_(t){var e={};for(var n in t)AB(n)&&(e[n]=t[n]);return e}var qs=Bi({lineGroup:"line-group",line:"line",regionGroup:"region-group",region:"region"},"grid");function Z_(t){return t.reduce(function(e,n,r){return e.push((0,S.ev)([r===0?"M":"L"],(0,S.CR)(n),!1)),e},[])}function TB(t,e,n){var r=e.connect,i=r===void 0?"line":r,a=e.center;if(i==="line")return Z_(t);if(!a)return[];var o=vl(t[0],a),s=n?0:1;return t.reduce(function(c,l,u){return u===0?c.push((0,S.ev)(["M"],(0,S.CR)(l),!1)):c.push((0,S.ev)(["A",o,o,0,0,s],(0,S.CR)(l),!1)),c},[])}function fv(t,e,n){return e.type==="surround"?TB(t,e,n):Z_(t)}function PB(t,e,n){var r=n.type,i=n.connect,a=n.center,o=n.closed,s=o?[["Z"]]:[],c=(0,S.CR)([fv(t,n),fv(e.slice().reverse(),n,!0)],2),l=c[0],u=c[1],f=(0,S.CR)([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([(0,S.ev)(["L"],(0,S.CR)(h),!1)],[(0,S.ev)(["L"],(0,S.CR)(d),!1)]);if(!a)throw new Error("Arc grid need to specified center");var v=(0,S.CR)([vl(h,a),vl(d,a)],2),g=v[0],y=v[1];return p([(0,S.ev)(["A",g,g,0,0,1],(0,S.CR)(h),!1),(0,S.ev)(["L"],(0,S.CR)(h),!1)],[(0,S.ev)(["A",y,y,0,0,0],(0,S.CR)(d),!1),(0,S.ev)(["L"],(0,S.CR)(d),!1)])}function CB(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:fv(s.points,n)}});return t.selectAll(qs.line.class).data(o,function(s){return s.id}).join(function(s){return s.append("path").each(function(c,l){var u=Fi(q_((0,S.pi)({path:c.path},r)),[c,l,o]);this.attr((0,S.pi)({class:qs.line.name,stroke:"#D9D9D9",lineWidth:1,lineDash:[4,4],isBillboard:a},u))})},function(s){return s.transition(function(c,l){var u=Fi(q_((0,S.pi)({path:c.path},r)),[c,l,o]);return Ki(this,u,i.update)})},function(s){return s.transition(function(){var c=this,l=qf(this,i.exit);return Xs(l,function(){return c.remove()}),l})}).transitions()}function kB(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=(0,S.CR)([e[l].points,e[l+1].points],2),f=u[0],d=u[1],h=PB(f,d,n);c.push({path:h,fill:s(l)})}return t.selectAll(qs.region.class).data(c,function(p,v){return v}).join(function(p){return p.append("path").each(function(v,g){var y=Fi(v,[v,g,c]);this.attr(y)}).attr("className",qs.region.name)},function(p){return p.transition(function(v,g){var y=Fi(v,[v,g,c]);return Ki(this,y,r.update)})},function(p){return p.transition(function(){var v=this,g=qf(this,r.exit);return Xs(g,function(){return v.remove()}),g})}).transitions()}function RB(t){var e=t.data,n=e===void 0?[]:e,r=t.closed;return r?n.map(function(i){var a=i.points,o=(0,S.CR)(a,1),s=o[0];return(0,S.pi)((0,S.pi)({},i),{points:(0,S.ev)((0,S.ev)([],(0,S.CR)(a),!1),[s],!1)})}):n}var LB=function(t){(0,S.ZT)(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=(0,S._T)(n,["type","center","areaFill","closed"]),l=RB(n),u=qe(r).maybeAppendByClassName(qs.lineGroup,"g"),f=qe(r).maybeAppendByClassName(qs.regionGroup,"g"),d=CB(u,l,n,c),h=kB(f,l,n);return(0,S.ev)((0,S.ev)([],(0,S.CR)(d),!1),(0,S.CR)(h),!1)},e}(Rr),zi=function(t,e,n){for(var r=0,i=er(e)?e.split("."):e;t&&r<i.length;)t=t[i[r++]];return t===void 0||r<i.length?n:t},NB=function(t,e){return function(n){return t*(1-n)+e*n}};function IB(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]=dv(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 jB(t,e){t===void 0&&(t={}),e===void 0&&(e={});var n={},r={};return Object.entries(e).forEach(function(i){var a=(0,S.CR)(i,2),o=a[0],s=a[1];o in t?n[o]=dv(t[o],s):r[o]=s}),function(i){return Object.entries(n).forEach(function(a){var o=(0,S.CR)(a,2),s=o[0],c=o[1];return r[s]=c(i)}),r}}function dv(t,e){return typeof t=="number"&&typeof e=="number"?NB(t,e):Array.isArray(t)&&Array.isArray(e)?IB(t,e):typeof t=="object"&&typeof e=="object"?jB(t,e):function(n){return t}}function DB(t,e,n,r){if(!r)return t.attr("__keyframe_data__",n),null;var i=r.duration,a=i===void 0?0:i,o=dv(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,(0,S.pi)({fill:"both"},r))}function Jo(t){return typeof t=="function"?t():er(t)||(0,xr.Z)(t)?new sv({style:{text:String(t)}}):t}function hv(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 K_(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 Q_(t,e){return Object.fromEntries(Object.entries(t).map(function(n){var r=(0,S.CR)(n,2),i=r[0],a=r[1];return[i,Fi(a,e)]}))}function $ft(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 pv(t,e){return e&&gi(e)?t.filter(e):t}function J_(t,e){var n=e.startAngle,r=e.endAngle;return(r-n)*t+n}function Zf(t,e){if(e.type==="linear"){var n=(0,S.CR)(e.startPos,2),r=n[0],i=n[1],a=(0,S.CR)(e.endPos,2),o=a[0],s=a[1],c=(0,S.CR)([o-r,s-i],2),l=c[0],u=c[1];return V_([l,u])}var f=Us(J_(t,e));return[-Math.sin(f),Math.cos(f)]}function vv(t,e,n){var r=Zf(t,n);return OB(r,e!=="positive")}function gl(t,e){return vv(t,e.labelDirection,e)}function BB(t,e){var n=(0,S.CR)(e.startPos,2),r=n[0],i=n[1],a=(0,S.CR)(e.endPos,2),o=a[0],s=a[1],c=(0,S.CR)([o-r,s-i],2),l=c[0],u=c[1];return[r+l*t,i+u*t]}function FB(t,e){var n=e.radius,r=(0,S.CR)(e.center,2),i=r[0],a=r[1],o=Us(J_(t,e));return[i+n*Math.cos(o),a+n*Math.sin(o)]}function Kf(t,e){return e.type==="linear"?BB(t,e):FB(t,e)}function t2(t){return Zf(0,t)[1]===0}function e2(t){return Zf(0,t)[0]===0}function n2(t,e){return e-t===360}function r2(t,e,n,r,i){var a=e-t,o=(0,S.CR)([i,i],2),s=o[0],c=o[1],l=(0,S.CR)([Us(t),Us(e)],2),u=l[0],f=l[1],d=function(P){return[n+i*Math.cos(P),r+i*Math.sin(P)]},h=(0,S.CR)(d(u),2),p=h[0],v=h[1],g=(0,S.CR)(d(f),2),y=g[0],m=g[1];if(n2(t,e)){var b=(f+u)/2,_=(0,S.CR)(d(b),2),O=_[0],w=_[1];return[["M",p,v],["A",s,c,0,1,0,O,w],["A",s,c,0,1,0,y,m]]}var M=a>180?1:0,E=t>e?0:1,A=!1;return A?"M".concat(n,",").concat(r,",L").concat(p,",").concat(v,",A").concat(s,",").concat(c,",0,").concat(M,",").concat(E,",").concat(y,",").concat(m,",L").concat(n,",").concat(r):"M".concat(p,",").concat(v,",A").concat(s,",").concat(c,",0,").concat(M,",").concat(E,",").concat(y,",").concat(m)}function zB(t){var e=t.attributes,n=e.startAngle,r=e.endAngle,i=e.center,a=e.radius;return(0,S.ev)((0,S.ev)([n,r],(0,S.CR)(i),!1),[a],!1)}function GB(t,e,n,r){var i=e.startAngle,a=e.endAngle,o=e.center,s=e.radius;return t.selectAll(Pn.line.class).data([{path:r2.apply(void 0,(0,S.ev)((0,S.ev)([i,a],(0,S.CR)(o),!1),[s],!1))}],function(c,l){return l}).join(function(c){return c.append("path").attr("className",Pn.line.name).styles(e).styles({path:function(l){return l.path}})},function(c){return c.transition(function(){var l=this,u=DB(this,zB(this),(0,S.ev)((0,S.ev)([i,a],(0,S.CR)(o),!1),[s],!1),r.update);if(u){var f=function(){var d=zi(l.attributes,"__keyframe_data__");l.style.path=r2.apply(void 0,(0,S.ev)([],(0,S.CR)(d),!1))};u.onframe=f,u.onfinish=f}return u}).styles(e)},function(c){return c.remove()}).styles(n).transitions()}function WB(t,e){var n=e.truncRange,r=e.truncShape,i=e.lineExtension}function HB(t,e,n){n===void 0&&(n=[0,0]);var r=(0,S.CR)([t,e,n],3),i=(0,S.CR)(r[0],2),a=i[0],o=i[1],s=(0,S.CR)(r[1],2),c=s[0],l=s[1],u=(0,S.CR)(r[2],2),f=u[0],d=u[1],h=(0,S.CR)([c-a,l-o],2),p=h[0],v=h[1],g=Math.sqrt(Math.pow(p,2)+Math.pow(v,2)),y=(0,S.CR)([-f/g,d/g],2),m=y[0],b=y[1];return[m*p,m*v,b*p,b*v]}function i2(t){var e=(0,S.CR)(t,2),n=(0,S.CR)(e[0],2),r=n[0],i=n[1],a=(0,S.CR)(e[1],2),o=a[0],s=a[1];return{x1:r,y1:i,x2:o,y2:s}}function YB(t,e,n,r){var i=e.showTrunc,a=e.startPos,o=e.endPos,s=e.truncRange,c=e.lineExtension,l=(0,S.CR)([a,o],2),u=(0,S.CR)(l[0],2),f=u[0],d=u[1],h=(0,S.CR)(l[1],2),p=h[0],v=h[1],g=(0,S.CR)(c?HB(a,o,c):new Array(4).fill(0),4),y=g[0],m=g[1],b=g[2],_=g[3],O=function(F){return t.selectAll(Pn.line.class).data(F,function(z,Y){return Y}).join(function(z){return z.append("line").attr("className",function(Y){return"".concat(Pn.line.name," ").concat(Y.className)}).styles(n).transition(function(Y){return Ki(this,i2(Y.line),!1)})},function(z){return z.styles(n).transition(function(Y){var q=Y.line;return Ki(this,i2(q),r.update)})},function(z){return z.remove()}).transitions()};if(!i||!s)return O([{line:[[f+y,d+m],[p+b,v+_]],className:Pn.line.name}]);var w=(0,S.CR)(s,2),M=w[0],E=w[1],A=p-f,P=v-d,C=(0,S.CR)([f+A*M,d+P*M],2),j=C[0],N=C[1],k=(0,S.CR)([f+A*E,d+P*E],2),R=k[0],D=k[1],B=O([{line:[[f+y,d+m],[j,N]],className:Pn.lineFirst.name},{line:[[R,D],[p+b,v+_]],className:Pn.lineSecond.name}]);return WB(t,e),B}function $B(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(Pn.line.class):a?l=t.select(Pn.lineSecond.class):l=t.select(Pn.line.class),!i||!o||n.type==="arc"&&n2(n.startAngle,n.endAngle)){var u=l.node();u&&(u.style.markerEnd=void 0);return}var f=Jo(o);f.attr(r),hv(f,c,!0),l.style("markerEnd",f).style("markerEndOffset",-s)}function VB(t,e,n){var r=e.type,i,a=en(e,"line");return r==="linear"?i=YB(t,e,K_(a,"arrow"),n):i=GB(t,e,K_(a,"arrow"),n),$B(t,r,e,a),i}function XB(t,e){return vv(t,e.gridDirection,e)}function a2(t){var e=t.type,n=t.gridCenter;return e==="linear"?n:n||t.center}function UB(t,e){var n=e.gridLength;return t.map(function(r,i){var a=r.value,o=(0,S.CR)(Kf(a,e),2),s=o[0],c=o[1],l=(0,S.CR)(La(XB(a,e),n),2),u=l[0],f=l[1];return{id:i,points:[[s,c],[s+u,c+f]]}})}function qB(t,e){var n=e.gridControlAngles,r=a2(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=(0,S.CR)(r,2),a=i[0],o=i[1];return t.map(function(s,c){var l=s.value,u=(0,S.CR)(Kf(l,e),2),f=u[0],d=u[1],h=(0,S.CR)([f-a,d-o],2),p=h[0],v=h[1],g=[];return n.forEach(function(y){var m=Us(y),b=(0,S.CR)([Math.cos(m),Math.sin(m)],2),_=b[0],O=b[1],w=p*_-v*O+a,M=p*O+v*_+o;g.push([w,M])}),{points:g,id:c}})}function ZB(t,e,n,r){var i=en(n,"grid"),a=i.type,o=i.areaFill,s=a2(n),c=pv(e,n.gridFilter),l=a==="segment"?UB(c,n):qB(c,n),u=(0,S.pi)((0,S.pi)({},i),{center:s,areaFill:gi(o)?c.map(function(f,d){return Fi(o,[f,d,c])}):o,animate:r,data:l});return t.selectAll(Pn.grid.class).data([1]).join(function(f){return f.append(function(){return new LB({style:u})}).attr("className",Pn.grid.name)},function(f){return f.transition(function(){return this.update(u)})},function(f){return f.remove()}).transitions()}function Fr(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 gv(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 KB=function(t,e,n){if(n===void 0&&(n=128),!gi(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=gv(n),r},Qf,yv;function Vft(t){yv=t}var QB=KB(function(t,e){var n=e.fontSize,r=e.fontFamily,i=e.fontWeight,a=e.fontStyle,o=e.fontVariant;return yv?yv(t,n):(Qf||(Qf=Pt.offscreenCanvasCreator.getOrCreateContext(void 0)),Qf.font=[a,o,i,"".concat(n,"px"),r].join(" "),Qf.measureText(t).width)},function(t,e){return[t,Object.values(e||o2(t)).join()].join("")},4096),o2=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 s2(t){return t.nodeName==="text"?t:t.nodeName==="g"&&t.children.length===1&&t.children[0].nodeName==="text"?t.children[0]:null}function c2(t,e){var n=s2(t);n&&n.attr(e)}function mv(t,e,n){n===void 0&&(n="..."),c2(t,{wordWrap:!0,wordWrapWidth:e,maxLines:1,textOverflow:n})}function JB(t,e,n,r){n===void 0&&(n=2),r===void 0&&(r="top"),c2(t,{wordWrap:!0,wordWrapWidth:e,maxLines:n,textBaseline:r})}function tF(t,e,n){var r=t.getBBox(),i=r.width,a=r.height,o=(0,S.CR)([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 Jf(t,e){if(e)try{var n=/translate\(([+-]*[\d]+[%]*),[ ]*([+-]*[\d]+[%]*)\)/g,r=e.replace(n,function(i,a,o){return"translate(".concat(tF(t,a,o),")")});t.attr("transform",r)}catch(i){}}var l2=function(t){return t!==void 0&&t!=null&&!Number.isNaN(t)};function zr(t){if((0,xr.Z)(t))return[t,t,t,t];if(Dr(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 bv=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 td(t,e){var n=t.getEulerAngles()||0;t.setEulerAngles(0);var r=t.getLocalBounds(),i=(0,S.CR)(r.min,2),a=i[0],o=i[1],s=(0,S.CR)(r.max,2),c=s[0],l=s[1],u=xv(t),f=u.width,d=u.height,h=d,p=0,v=0,g=a,y=o,m=s2(t);if(m){h-=1.5;var b=m.style.textAlign,_=m.style.textBaseline;b==="center"?g=(a+c)/2:(b==="right"||b==="end")&&(g=c),_==="middle"?y=(o+l)/2:_==="bottom"&&(y=l)}var O=(0,S.CR)(zr(e),4),w=O[0],M=w===void 0?0:w,E=O[1],A=E===void 0?0:E,P=O[2],C=P===void 0?M:P,j=O[3],N=j===void 0?A:j,k=new bv((p+=a)-N,(v+=o)-M,p+f+A,v+h+C);return t.setEulerAngles(n),k.rotatedPoints(Us(n),g,y)}function xv(t){return t.__bbox__?t.__bbox__:t.getBBox()}function yl(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 ml(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 eF(t,e){var n=ml(t[0],t[1],e[0]),r=ml(t[0],t[1],e[1]),i=ml(e[0],e[1],t[0]),a=ml(e[0],e[1],t[1]);return!!(n!==r&&i!==a||n===0&&yl(t,e[0])||r===0&&yl(t,e[1])||i===0&&yl(e,t[0])||a===0&&yl(e,t[1]))}function nF(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(eF(o,r)){if(ml(o[0],e,o[1])===0)return yl(o,e);i++}a=(a+1)%n}while(a!==0);return!!(i&1)}function rF(t,e){return e.every(function(n){return nF(t,n)})}function iF(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=td(e,n);return rF(s,c)}function u2(t,e){var n=(0,S.CR)(t,4),r=n[0],i=n[1],a=n[2],o=n[3],s=(0,S.CR)(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,_=d*b-h*m;if(_<0===y)return!1;var O=p*b-v*m;return!(O<0===y||_>g===y||O>g===y)}function f2(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 u2(e,r)})}var Xft={lineToLine:u2,intersectBoxLine:f2,getBounds:td};function aF(t,e,n){var r,i,a=td(t,n).flat(1),o=td(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=(0,S.XA)(s),l=c.next();!l.done;l=c.next()){var u=l.value;if(f2(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 oF(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=(0,S.CR)(a,2),c=s[0],l=s[1],u=r==="negative"?0:i,f=-o-u,d=o+u,h=(0,S.CR)(zr(e),4),p=h[0],v=h[1],g=h[2],y=h[3];return new bv(c+f-y,l+f-p,c+d+v,l+d+g)}var m=(0,S.CR)(t.startPos,2),b=m[0],_=m[1],O=(0,S.CR)(t.endPos,2),w=O[0],M=O[1],E=(0,S.CR)(e2(t)?[-e,0,e,0]:[0,e,0,-e],4),A=E[0],P=E[1],C=E[2],j=E[3],N=gl(0,t),k=La(N,i),R=new bv(b,_,w,M);return R.x1+=j,R.y1+=A,R.x2+=P+k[0],R.y2+=C+k[1],R}function ed(t,e,n){var r,i,a=e.crossPadding,o=new Set,s=null,c=oF(e,a),l=function(p){return c?iF(c,p):!0},u=function(p,v){return p?!aF(p,v,zr(n)):!0};try{for(var f=(0,S.XA)(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 _v(t,e){return e===void 0&&(e={}),(0,me.Z)(t)?0:typeof t=="number"?t:Math.floor(QB(t,e))}function sF(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=o2(r.getTextShape(t[0])),p=_v(u,h),v=o?_v(o,h):p,g=_v(c,h);((0,me.Z)(g)||g===1/0)&&(g=Math.max.apply(null,t.map(function(k){return xv(k).width})));for(var y=t.slice(),m=(0,S.CR)(d,4),b=m[0],_=b===void 0?0:b,O=m[1],w=O===void 0?0:O,M=m[2],E=M===void 0?_:M,A=m[3],P=A===void 0?w:A,C=function(k){if(y.forEach(function(R){r.ellipsis(r.getTextShape(R),k,a)}),y=ed(t,n,d),y.length<1)return{value:void 0}},j=g;j>v+p;j-=p){var N=C(j);if(typeof N=="object")return N.value}}}function Uft(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 d2(t){var e=t.getLocalBounds(),n=e.min,r=e.max,i=(0,S.CR)([n,r],2),a=(0,S.CR)(i[0],2),o=a[0],s=a[1],c=(0,S.CR)(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 qft(t,e){var n=select(t).append("text").node();return n.attr(__assign(__assign({},e),{visibility:"hidden"})),n}function cF(t,e){var n=(0,S.CR)(t,2),r=n[0],i=n[1],a=(0,S.CR)(e,2),o=a[0],s=a[1];return r!==o&&i===s}function Zft(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 lF(t,e){var n,r,i=e.attributes;try{for(var a=(0,S.XA)(Object.entries(i)),o=a.next();!o.done;o=a.next()){var s=(0,S.CR)(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 uF={parity:function(t,e){var n=e.seq,r=n===void 0?2:n;return t.filter(function(i,a){return a%r?(co(i),!1):!0})}},fF=function(t){return t.filter(l2)};function dF(t,e,n,r){var i=t.length,a=e.keepHeader,o=e.keepTail;if(!(i<=1||i===2&&a&&o)){var s=uF.parity,c=function(b){return b.forEach(r.show),b},l=2,u=t.slice(),f=t.slice(),d=Math.min.apply(Math,(0,S.ev)([1],(0,S.CR)(t.map(function(b){return xv(b).width})),!1));if(n.type==="linear"&&(t2(n)||e2(n))){var h=d2(t[0]).left,p=d2(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&&ed(fF(y?(0,S.ev)((0,S.ev)([y],(0,S.CR)(f),!1),[g],!1):(0,S.ev)([g],(0,S.CR)(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 hF(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 ed(t,n,c).length<1},h=function(y){return t.forEach(function(m,b){var _=Array.isArray(y)?y[b]:y;r.rotate(m,+_)})};try{for(var p=(0,S.XA)(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 pF(t){var e=t.type,n=t.labelDirection;return e==="linear"&&t2(t)?n==="negative"?"bottom":"top":"middle"}function vF(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,(0,S.ev)([],(0,S.CR)(d),!1)),p=function(){return ed(t,n,f).length<1},v=pF(n),g=function(m){return t.forEach(function(b,_){var O=Array.isArray(m)?m[_]:m;r.wrap(b,a,O,v)})};if(!(h>s)){for(var y=h;y<=s;y++)if(g(y),p())return;l&&g(d)}}var gF=new Map([["hide",dF],["rotate",hF],["ellipsis",sF],["wrap",vF]]);function yF(t,e,n){return e.labelOverlap.length<1?!1:n==="hide"?!vB(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 mF(t,e,n){var r=e.labelOverlap,i=r===void 0?[]:r;i.length&&i.forEach(function(a){var o=a.type,s=gF.get(o);yF(t,e,o)&&(s==null||s(t,a,e,n))})}function bF(){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 h2(t){for(var e=t;e<0;)e+=360;return Math.round(e%360)}function Ov(t,e){var n=(0,S.CR)(t,2),r=n[0],i=n[1],a=(0,S.CR)(e,2),o=a[0],s=a[1],c=(0,S.CR)([r*o+i*s,r*s-i*o],2),l=c[0],u=c[1];return Math.atan2(u,l)}function xF(t){var e=(t+360)%180;return Fr(e,-90,90)||(e+=180),e}function _F(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=gl(t.value,n),c=Zf(t.value,n);return i==="horizontal"?0:(i==="perpendicular"?o=Ov([1,0],s):o=Ov([c[0]<0?-1:1,0],c),xF(X_(o)))}function p2(t,e,n){var r=n.type,i=n.labelAlign,a=gl(t,n),o=h2(e),s=h2(X_(Ov([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?(Fr(o,0,90,!1,!0)||Fr(o,0,90)||Fr(o,270,360))&&(c="start"):s===90?Fr(o,0,90,!1,!0)?c="start":(Fr(o,90,180)||Fr(o,270,360))&&(c="end"):s===270?Fr(o,0,90,!1,!0)?c="end":(Fr(o,90,180)||Fr(o,270,360))&&(c="start"):s===180&&(o===90?c="start":(Fr(o,0,90)||Fr(o,270,360))&&(c="end")):i==="parallel"?Fr(s,0,180,!0)?l="top":l="bottom":i==="horizontal"?Fr(s,90,270,!1)?c="end":(Fr(s,270,360,!1)||Fr(s,0,90))&&(c="start"):i==="perpendicular"&&(Fr(s,90,270)?c="end":c="start"),{textAlign:c,textBaseline:l}}function OF(t,e,n){e.setLocalEulerAngles(t);var r=e.__data__.value,i=p2(r,t,n),a=e.querySelector(Pn.labelItem.class);a&&g2(a,i)}function v2(t,e,n){var r=n.showTick,i=n.tickLength,a=n.tickDirection,o=n.labelDirection,s=n.labelSpacing,c=e.indexOf(t),l=Fi(s,[t,c,e]),u=(0,S.CR)([gl(t.value,n),bF(o,a)],2),f=u[0],d=u[1],h=d===1?Fi(r?i:0,[t,c,e]):0,p=(0,S.CR)(pl(La(f,l+h),Kf(t.value,n)),2),v=p[0],g=p[1];return{x:v,y:g}}function wF(t,e,n,r){var i=r.labelFormatter,a=gi(i)?function(){return Jo(Fi(i,[t,e,n,gl(t.value,r)]))}:function(){return Jo(t.label||"")};return a}function g2(t,e){t.nodeName==="text"&&t.attr(e)}function y2(t){mF(this.node().childNodes,t,{hide:co,show:hl,rotate:function(e,n){OF(+n,e,t)},ellipsis:function(e,n,r){e&&mv(e,n||1/0,r)},wrap:function(e,n,r){e&&JB(e,n,r)},getTextShape:function(e){return e.querySelector("text")}})}function m2(t,e,n,r,i){var a=n.indexOf(e),o=qe(t).append(wF(e,a,n,i)).attr("className",Pn.labelItem.name).node(),s=(0,S.CR)(Na(Q_(r,[e,a,n])),2),c=s[0],l=s[1],u=l.transform,f=(0,S._T)(l,["transform"]);Jf(t,u);var d=_F(e,t,i);return t.setLocalEulerAngles(+d),g2(o,(0,S.pi)((0,S.pi)({},p2(e.value,d,i)),c)),Jf(t,u),t.attr(f),o}function SF(t,e,n,r){var i=pv(e,n.labelFilter),a=en(n,"label");return t.selectAll(Pn.label.class).data(i,function(o,s){return s}).join(function(o){return o.append("g").attr("className",Pn.label.name).transition(function(s){return m2(this,s,e,a,n),this.attr(v2(s,e,n)),this.__bbox__=s.bbox,null}).call(function(){return y2.call(t,n)})},function(o){return o.transition(function(s){var c=this.querySelector(Pn.labelItem.class),l=m2(this,s,e,a,n),u=dB(c,l,r.update),f=Ki(this,v2(s,e,n),r.update);return this.__bbox__=s.bbox,(0,S.ev)((0,S.ev)([],(0,S.CR)(u),!1),[f],!1)}).call(function(s){var c=zi(s,"_transitions").flat().filter(l2);uB(c,function(){return y2.call(t,n)})})},function(o){return o.transition(function(){var s=this,c=qf(this.childNodes[0],r.exit);return Xs(c,function(){return qe(s).remove()}),c})}).transitions()}function b2(t,e){return vv(t,e.tickDirection,e)}function MF(t,e){var n=(0,S.CR)(t,2),r=n[0],i=n[1];return[[0,0],[r*e,i*e]]}function EF(t,e,n,r,i){var a=i.tickLength,o=(0,S.CR)(MF(r,Fi(a,[t,e,n])),2),s=(0,S.CR)(o[0],2),c=s[0],l=s[1],u=(0,S.CR)(o[1],2),f=u[0],d=u[1];return{x1:c,x2:f,y1:l,y2:d}}function AF(t,e,n,r,i){var a=i.tickFormatter,o=b2(e.value,i),s="line";return gi(a)&&(s=function(){return Fi(a,[e,n,r,o])}),t.append(s).attr("className",Pn.tickItem.name)}function TF(t,e,n,r,i,a,o){var s=b2(t.value,a),c=EF(t,e,n,s,a),l=c.x1,u=c.x2,f=c.y1,d=c.y2,h=(0,S.CR)(Na(Q_(o,[t,e,n,s])),2),p=h[0],v=h[1];r.node().nodeName==="line"&&r.styles((0,S.pi)({x1:l,x2:u,y1:f,y2:d},p)),i.attr(v),r.styles(p)}function x2(t,e,n,r,i,a){var o=AF(qe(this),t,e,n,r);TF(t,e,n,o,this,r,i);var s=(0,S.CR)(Kf(t.value,r),2),c=s[0],l=s[1];return Ki(this,{x:c,y:l},a)}function PF(t,e,n,r){var i=pv(e,n.tickFilter),a=en(n,"tick");return t.selectAll(Pn.tick.class).data(i,function(o){return o.id||o.label}).join(function(o){return o.append("g").attr("className",Pn.tick.name).transition(function(s,c){return x2.call(this,s,c,i,n,a,!1)})},function(o){return o.transition(function(s,c){return this.removeChildren(),x2.call(this,s,c,i,n,a,r.update)})},function(o){return o.transition(function(){var s=this,c=qf(this.childNodes[0],r.exit);return Xs(c,function(){return s.remove()}),c})}).transitions()}var Qn=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}();function Kft(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 Qn(r,i,c,l)}var _2=Bi({text:"text"},"title");function nd(t){return/\S+-\S+/g.test(t)?t.split("-").map(function(e){return e[0]}):t.length>2?[t[0]]:t.split("")}function CF(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=nd(r),u=(0,S.CR)(zr(o?i:0),4),f=u[0],d=u[1],h=u[2],p=u[3],v=(0,S.CR)(zr(a),4),g=v[0],y=v[1],m=v[2],b=v[3],_=(0,S.CR)([p+d,f+h],2),O=_[0],w=_[1],M=(0,S.CR)([b+y,g+m],2),E=M[0],A=M[1];if(l[0]==="l")return new Qn(s.x,s.y,c.width+s.width+O+E,Math.max(c.height+A,s.height));if(l[0]==="t")return new Qn(s.x,s.y,Math.max(c.width+E,s.width),c.height+s.height+w+A);var P=(0,S.CR)([e.attributes.width||c.width,e.attributes.height||c.height],2),C=P[0],j=P[1];return new Qn(c.x,c.y,C+s.width+O+E,j+s.height+w+A)}function kF(t,e){var n=Object.entries(e).reduce(function(r,i){var a=(0,S.CR)(i,2),o=a[0],s=a[1],c=t.node().attr(o);return c||(r[o]=s),r},{});t.styles(n)}function RF(t){var e,n,r,i,a=t,o=a.width,s=a.height,c=a.position,l=(0,S.CR)([+o/2,+s/2],2),u=l[0],f=l[1],d=(0,S.CR)([+u,+f,"center","middle"],4),h=d[0],p=d[1],v=d[2],g=d[3],y=nd(c);return y.includes("l")&&(e=(0,S.CR)([0,"start"],2),h=e[0],v=e[1]),y.includes("r")&&(n=(0,S.CR)([+o,"end"],2),h=n[0],v=n[1]),y.includes("t")&&(r=(0,S.CR)([0,"top"],2),p=r[0],g=r[1]),y.includes("b")&&(i=(0,S.CR)([+s,"bottom"],2),p=i[0],g=i[1]),{x:h,y:p,textAlign:v,textBaseline:g}}var O2=function(t){(0,S.ZT)(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(_2.text.class);if(!l)return new Qn(0,0,+i,+a);var u=l.getBBox(),f=u.width,d=u.height,h=(0,S.CR)(zr(s),4),p=h[0],v=h[1],g=h[2],y=h[3],m=(0,S.CR)([0,0,+i,+a],4),b=m[0],_=m[1],O=m[2],w=m[3],M=nd(o);if(M.includes("i"))return new Qn(b,_,O,w);M.forEach(function(D,B){var F,z,Y,q;D==="t"&&(F=(0,S.CR)(B===0?[d+g,+a-d-g]:[0,+a],2),_=F[0],w=F[1]),D==="r"&&(z=(0,S.CR)([+i-f-y],1),O=z[0]),D==="b"&&(Y=(0,S.CR)([+a-d-p],1),w=Y[0]),D==="l"&&(q=(0,S.CR)(B===0?[f+v,+i-f-v]:[0,+i],2),b=q[0],O=q[1])});var E=(0,S.CR)(zr(c),4),A=E[0],P=E[1],C=E[2],j=E[3],N=(0,S.CR)([j+P,A+C],2),k=N[0],R=N[1];return new Qn(b+j,_+A,O-k,w-R)},e.prototype.getBBox=function(){return this.title?this.title.getBBox():new Qn(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=(0,S._T)(n,["width","height","position","spacing"]),u=(0,S.CR)(Na(l),1),f=u[0],d=RF(n),h=d.x,p=d.y,v=d.textAlign,g=d.textBaseline;vi(!!l.text,qe(r),function(y){i.title=y.maybeAppendByClassName(_2.text,"text").styles(f).call(kF,{x:h,y:p,textAlign:v,textBaseline:g}).node()})},e}(Rr);function LF(t,e,n){var r=n.titlePosition,i=r===void 0?"lb":r,a=n.titleSpacing,o=nd(i),s=t.node().getLocalBounds(),c=(0,S.CR)(s.min,2),l=c[0],u=c[1],f=(0,S.CR)(s.halfExtents,2),d=f[0],h=f[1],p=(0,S.CR)(e.node().getLocalBounds().halfExtents,2),v=p[0],g=p[1],y=(0,S.CR)([l+d,u+h],2),m=y[0],b=y[1],_=(0,S.CR)(zr(a),4),O=_[0],w=_[1],M=_[2],E=_[3];if(["start","end"].includes(i)&&n.type==="linear"){var A=n.startPos,P=n.endPos,C=(0,S.CR)(i==="start"?[A,P]:[P,A],2),j=C[0],N=C[1],k=V_([-N[0]+j[0],-N[1]+j[1]]),R=(0,S.CR)(La(k,O),2),D=R[0],B=R[1];return{x:j[0]+D,y:j[1]+B}}return o.includes("t")&&(b-=h+g+O),o.includes("r")&&(m+=d+v+w),o.includes("l")&&(m-=d+v*2+E),o.includes("b")&&(b+=h+g*2+M),{x:m,y:b}}function NF(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 w2(t,e,n,r,i){var a=en(r,"title"),o=(0,S.CR)(Na(a),2),s=o[0],c=o[1],l=c.transform,u=(0,S._T)(c,["transform"]);t.styles(s),e.styles(u);var f=l||NF(t.node(),s.direction,s.position);Jf(t.node(),f);var d=LF(qe(n._offscreen||n.querySelector(Pn.mainGroup.class)),e,r),h=d.x,p=d.y,v=Ki(e.node(),{x:h,y:p},i);return Jf(t.node(),f),v}function IF(t,e,n,r){var i=n.titleText;return t.selectAll(Pn.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 Jo(i)}).attr("className",Pn.title.name).transition(function(){return w2(qe(this),t,e,n,r.enter)})},function(a){return a.transition(function(){return w2(qe(this),t,e,n,r.update)})},function(a){return a.remove()}).transitions()}function S2(t,e,n,r){var i=t.showLine,a=t.showTick,o=t.showLabel,s=e.maybeAppendByClassName(Pn.lineGroup,"g"),c=vi(i,s,function(h){return VB(h,t,r)})||[],l=e.maybeAppendByClassName(Pn.tickGroup,"g"),u=vi(a,l,function(h){return PF(h,n,t,r)})||[],f=e.maybeAppendByClassName(Pn.labelGroup,"g"),d=vi(o,f,function(h){return SF(h,n,t,r)})||[];return(0,S.ev)((0,S.ev)((0,S.ev)([],(0,S.CR)(c),!1),(0,S.CR)(u),!1),(0,S.CR)(d),!1).filter(function(h){return!!h})}var wv=function(t){(0,S.ZT)(e,t);function e(n){return t.call(this,n,cv)||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=yB(s,f).filter(function(O){var w=O.value;return!(d&&w>d[0]&&w<d[1])}),p=G_(i===void 0?c:i),v=qe(r).maybeAppendByClassName(Pn.gridGroup,"g"),g=vi(u,v,function(O){return ZB(O,h,n,p)})||[],y=qe(r).maybeAppendByClassName(Pn.mainGroup,"g");o&&(!this.initialized&&p.enter||this.initialized&&p.update)&&S2(n,qe(this.offscreenGroup),h,G_(!1));var m=S2(n,qe(y.node()),h,p),b=qe(r).maybeAppendByClassName(Pn.titleGroup,"g"),_=vi(l,b,function(O){return IF(O,a,n,p)})||[];return(0,S.ev)((0,S.ev)((0,S.ev)([],(0,S.CR)(g),!1),(0,S.CR)(m),!1),(0,S.CR)(_),!1).flat().filter(function(O){return!!O})},e}(Rr),jF={}.toString,DF=function(t,e){return jF.call(t)==="[object "+e+"]"},bl=DF,Sv=function(t){return bl(t,"Function")},M2=function(t){return Array.isArray?Array.isArray(t):bl(t,"Array")},BF=function(t){var e=typeof t;return t!==null&&e==="object"||e==="function"};function FF(t,e){if(t){var n;if(M2(t))for(var r=0,i=t.length;r<i&&(n=e(t[r],r),n!==!1);r++);else if(BF(t)){for(var a in t)if(t.hasOwnProperty(a)&&(n=e(t[a],a),n===!1))break}}}var E2=FF,Qft=Object.keys?function(t){return Object.keys(t)}:function(t){var e=[];return E2(t,function(n,r){Sv(t)&&r==="prototype"||e.push(r)}),e},Jft=null;function tdt(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 edt=null,zF=function(t){return typeof t=="object"&&t!==null},GF=zF,WF=function(t){if(!GF(t)||!bl(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},A2=WF;function ndt(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 rdt=null,idt=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},adt=null,odt=function(t){if(!isArray(t))return[];for(var e=[],n=0;n<t.length;n++)e=e.concat(t[n]);return e},sdt=null,HF=function(t,e){if(e===void 0&&(e=[]),!isArray(t))e.push(t);else for(var n=0;n<t.length;n+=1)HF(t[n],e);return e},cdt=null,ldt=function(t){if(isArray(t))return t.reduce(function(e,n){return Math.max(e,n)},t[0])},udt=function(t){if(isArray(t))return t.reduce(function(e,n){return Math.min(e,n)},t[0])},fdt=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}},ddt=null,T2=Array.prototype,YF=T2.splice,$F=T2.indexOf,hdt=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=$F.call(t,i))>-1;)YF.call(t,a,1);return t},pdt=null,VF=Array.prototype.splice,vdt=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,VF.call(e,o,1))}return e},gdt=null,ydt=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},mdt=null,bdt=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},xdt=null,XF=function(t){return bl(t,"String")};function _dt(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 Odt=null,wdt=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 Sdt(t,e){return isArray(t)||isString(t)?t[0]===e:!1}var Mdt=null;function Edt(t,e){return isArray(t)||isString(t)?t[t.length-1]===e:!1}var Adt=null,UF=Object.prototype.hasOwnProperty;function Tdt(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),UF.call(n,i)?n[i].push(o):n[i]=[o]}return n}var Pdt=null;function Cdt(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 kdt=function(t,e){if(!e)return[t];var n=groupToMap(t,e),r=[];for(var i in n)r.push(n[i]);return r},P2={};function Rdt(t){var e=P2[t];if(!e){for(var n=t.toString(16),r=n.length;r<6;r++)n="0"+n;e="#"+n,P2[t]=e}return e}var Ldt=null;function Ndt(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 Idt=null,qF=function(t){return bl(t,"Number")},Zs=qF,jdt=function(t){return isNumber(t)&&t%1!==0},Ddt=null,Bdt=function(t){return isNumber(t)&&t%2===0},Fdt=null,zdt=Number.isInteger?Number.isInteger:function(t){return Zs(t)&&t%1===0},Gdt=null,Wdt=function(t){return isNumber(t)&&t<0},Hdt=null,Ydt=function(t){return isNumber(t)&&t%2!==0},$dt=null,Vdt=function(t){return isNumber(t)&&t>0},Xdt=null,Udt=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}},qdt=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}},ZF=180/Math.PI,Zdt=function(t){return ZF*t},Kdt=null,KF=Math.PI/180,Qdt=function(t){return KF*t},Jdt=null,tht=null,QF=Object.values?function(t){return Object.values(t)}:function(t){var e=[];return E2(t,function(n,r){Sv(t)&&r==="prototype"||e.push(n)}),e},JF=QF,eht=function(t,e){return contains(values(t),e)},tz={}.toString,nht=function(t){return tz.call(t).replace(/^\[object /,"").replace(/]$/,"")},rht=null,iht=function(t){return isType(t,"Arguments")},aht=null,oht=function(t){return isType(t,"Boolean")},sht=null,cht=function(t){return isType(t,"Date")},lht=null,uht=function(t){return isType(t,"Error")},fht=null;function dht(t){return isNumber(t)&&isFinite(t)}var ez=function(t){return t===null},nz=ez,rz=Object.prototype,hht=function(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||rz;return t===n},pht=null,vht=function(t){return isType(t,"RegExp")},ght=null,iz=function(t){return t===void 0},az=iz,yht=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)}},mht=null,C2=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]=C2(t[n]):e[n]=t[n]}else{e={};for(var i in t)typeof t[i]=="object"&&t[i]!=null?e[i]=C2(t[i]):e[i]=t[i]}return e},bht=null,oz=function(t,e){if(!Sv(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},sz=5;function k2(t,e,n,r){n=n||0,r=r||sz;for(var i in e)if(e.hasOwnProperty(i)){var a=e[i];a!==null&&A2(a)?(A2(t[i])||(t[i]={}),n<r?k2(t[i],a,n+1,r):t[i]=e[i]):M2(a)?(t[i]=[],t[i]=t[i].concat(a)):a!==void 0&&(t[i]=a)}}var cz=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)k2(t,e[r]);return t},R2=cz,xht=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},_ht=null,lz=function(t){return t!==null&&typeof t!="function"&&isFinite(t.length)},L2=lz,uz=function(t,e){if(!L2(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},N2=uz,fz=Object.prototype.hasOwnProperty;function Oht(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(fz.call(t,n))return!1;return!0}var wht=null,I2=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=I2(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=I2(t[i[r]],e[i[r]]),!!n);r++);return n}return!1},Sht=null,Mht=function(t,e,n){return isFunction(n)?!!n(t,e):isEqual(t,e)},Eht=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},Aht=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},dz=Object.prototype.hasOwnProperty,Tht=function(t,e){if(t===null||!isPlainObject(t))return{};var n={};return each(e,function(r){dz.call(t,r)&&(n[r]=t[r])}),n},Pht=function(t,e){return reduce(t,function(n,r,i){return e.includes(i)||(n[i]=r),n},{})},rd={},Cht=function(t){return t=t||"g",rd[t]?rd[t]+=1:rd[t]=1,t+rd[t]},ts=function(t){return t},hz=function(t){return t==null},pz=hz;function j2(t){return pz(t)?0:L2(t)?t.length:Object.keys(t).length}var id,kht=oz(function(t,e){e===void 0&&(e={});var n=e.fontSize,r=e.fontFamily,i=e.fontWeight,a=e.fontStyle,o=e.fontVariant;return id||(id=document.createElement("canvas").getContext("2d")),id.font=[a,o,i,n+"px",r].join(" "),id.measureText(XF(t)?t:"").width},function(t,e){return e===void 0&&(e={}),(0,S.pr)([t],JF(e)).join("")}),Rht=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},Lht=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}(),Nht=null;class xl{constructor(e){this.options=R2({},this.getDefaultOptions()),this.update(e)}getOptions(){return this.options}update(e={}){this.options=R2({},this.options,e),this.rescale(e)}rescale(e){}}function ad(t,e){return e-t?n=>(n-t)/(e-t):n=>.5}function Ks(t,...e){return e.reduce((n,r)=>i=>n(r(i)),t)}function Mv(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 vz=gt(2489),gz=gt.n(vz);function Ev(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 yz(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=Ev(o,a,e+1/3),c=Ev(o,a,e),l=Ev(o,a,e-1/3);return[s*255,c*255,l*255,i]}function D2(t){const e=gz().get(t);if(!e)return null;const{model:n,value:r}=e;return n==="rgb"?r:n==="hsl"?yz(r):null}const Qs=(t,e)=>n=>t*(1-n)+e*n,mz=(t,e)=>{const n=D2(t),r=D2(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})`}},_l=(t,e)=>typeof t=="number"&&typeof e=="number"?Qs(t,e):typeof t=="string"&&typeof e=="string"?mz(t,e):()=>t,bz=(t,e)=>{const n=Qs(t,e);return r=>Math.round(n(r))};function od(t){return!az(t)&&!nz(t)&&!Number.isNaN(t)}const Av=Math.sqrt(50),Tv=Math.sqrt(10),Pv=Math.sqrt(2);function sd(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),a=r/wr(10,i);return i>=0?(a>=Av?10:a>=Tv?5:a>=Pv?2:1)*wr(10,i):-wr(10,-i)/(a>=Av?10:a>=Tv?5:a>=Pv?2:1)}function B2(t,e,n){const r=Math.abs(e-t)/Math.max(0,n);let i=wr(10,Math.floor(Math.log(r)/Math.LN10));const a=r/i;return a>=Av?i*=10:a>=Tv?i*=5:a>=Pv&&(i*=2),e<t?-i:i}const F2=(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=sd(o,s,n),c>0?(o=Math.floor(o/c)*c,s=Math.ceil(s/c)*c,c=sd(o,s,n)):c<0&&(o=Math.ceil(o*c)/c,s=Math.floor(s*c)/c,c=sd(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 xz(t,e){const n=e<t?e:t,r=t>e?t:e;return i=>Math.min(Math.max(n,i),r)}const _z=(t,e,n)=>{const[r,i]=t,[a,o]=e;let s,c;return r<i?(s=ad(r,i),c=n(a,o)):(s=ad(i,r),c=n(o,a)),Ks(c,s)},Oz=(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]=ad(s[l],s[l+1]),a[l]=n(c[l],c[l+1]);return l=>{const u=Mv(t,l,1,r)-1,f=i[u],d=a[u];return Ks(d,f)(l)}},z2=(t,e,n,r)=>(Math.min(t.length,e.length)>2?Oz:_z)(t,e,r?bz:n);class cd extends xl{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:Qs,tickCount:5}}map(e){return od(e)?this.output(e):this.options.unknown}invert(e){return od(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 F2}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?xz(i[0],i[a-1]):ts}composeOutput(e,n){const{domain:r,range:i,round:a,interpolate:o}=this.options,s=z2(r.map(e),i,o,a);this.output=Ks(s,n,e)}composeInput(e,n,r){const{domain:i,range:a}=this.options,o=z2(a,i.map(e),Qs);this.input=Ks(n,r,o)}}const es=(t,e,n)=>{let r,i,a=t,o=e;if(a===o&&n>0)return[a];let s=sd(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 Vr extends cd{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:_l,tickMethod:es,tickCount:5}}chooseTransforms(){return[ts,ts]}clone(){return new Vr(this.options)}}function wz(t,e){if(t){var n;if(Dr(t))for(var r=0,i=t.length;r<i&&(n=e(t[r],r),n!==!1);r++);else if(zo(t)){for(var a in t)if(t.hasOwnProperty(a)&&(n=e(t[a],a),n===!1))break}}}var Cv=wz,Sz=function(t,e,n){if(!Dr(t)&&!io(t))return t;var r=n;return Cv(t,function(i,a){r=e(r,i,a)}),r},G2=Sz,W2=function(t,e){return G2(t,function(n,r,i){return e.includes(i)||(n[i]=r),n},{})};function Ia(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 H2(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=(0,S.CR)([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 Qn(e,n,r-e,i-n)}var Mz=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=(0,S.CR)([0,0],2),b=m[0],_=m[1],O=e.map(function(N){var k,R=N.width,D=N.height,B=(0,S.CR)([b,_],2),F=B[0],z=B[1];return k=(0,S.CR)([b+R*y[0],_+D*y[1]],2),b=k[0],_=k[1],new Qn(F,z,R,D)}),w=H2(O),M={"flex-start":0,"flex-end":v?r-w.width:i-w.height,center:v?(r-w.width)/2:(i-w.height)/2},E=O.map(function(N){var k=N.x,R=N.y,D=Qn.fromRect(N);return D.x=v?k+M[u]:k,D.y=v?R:R+M[u],D}),A=H2(E),P=function(N){var k=(0,S.CR)(v?["height",i]:["width",r],2),R=k[0],D=k[1];switch(p){case"flex-start":return 0;case"flex-end":return D-N[R];case"center":return D/2-N[R]/2;default:return 0}},C=E.map(function(N){var k=N.x,R=N.y,D=Qn.fromRect(N);return D.x=v?k:k+P(D),D.y=v?R+P(D):R,D}),j=C.map(function(N){var k,R,D=Qn.fromRect(N);return D.x+=(k=t.x)!==null&&k!==void 0?k:0,D.y+=(R=t.y)!==null&&R!==void 0?R:0,D});return j},Ez=function(t,e,n){return[]},Az=function(t,e,n){if(e.length===0)return[];var r={flex:Mz,grid:Ez},i=n.display in r?r[n.display]:null;return(i==null?void 0:i.call(null,t,e,n))||[]},Tz=function(t){(0,S.ZT)(e,t);function e(n){var r=t.call(this,n)||this;r.layoutEvents=[Ie.BOUNDS_CHANGED,Ie.INSERTED,Ie.REMOVED],r.$margin=zr(0),r.$padding=zr(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=zr(n)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"padding",{get:function(){return this.$padding},set:function(n){this.$padding=zr(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=(0,S.CR)(this.$margin,4),u=l[0],f=l[1],d=l[2],h=l[3];return new Qn(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=(0,S.CR)(this.$padding,4),o=a[0],s=a[1],c=a[2],l=a[3],u=(0,S.CR)(this.$margin,4),f=u[0],d=u[3];return new Qn(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=Az(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}(Br),Pz=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 Cz(t){return class extends C0{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 Y2(t,e,n){return t.querySelector(e)?je(t).select(e):je(t).append(n)}function ld(t){return Array.isArray(t)?t.join(", "):`${t||""}`}function $2(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","center","center"],right:["column","center","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 V2 extends Tz{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 kz extends V2{update(e){var n;const{subOptions:r}=e;this.attr(e),(n=this.child)===null||n===void 0||n.update(r)}}function ua(t,e){var n;return(n=t.filter(r=>r.getOptions().name===e))===null||n===void 0?void 0:n[0]}function Rz(t){return t==="horizontal"||t===0}function Lz(t){return t==="vertical"||t===-Math.PI/2}function X2(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 Nz(t){return t.find(e=>e.getOptions().domain.length>0).getOptions().domain}function ud(t){const e=["arrow","crosshairs","grid","handle","handleLabel","indicator","label","line","tick","tip","title","trunc"],{style:n}=t,r=Pz(t,["style"]),i={};return Object.entries(r).forEach(([a,o])=>{e.includes(a)?i[`show${ao(a)}`]=o:i[a]=o}),Object.assign(Object.assign({},i),n)}var U2=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 q2(t,e){const{eulerAngles:n,origin:r}=e;r&&t.setOrigin(r),n&&t.rotate(n[0],n[1],n[2])}function Z2(t){const{innerWidth:e,innerHeight:n,depth:r}=t.getOptions();return[e,n,r]}function Iz(t,e){const{width:n,height:r}=e.getOptions();return i=>{if(!B_(e))return i;const a=t==="bottom"?[i,1]:[0,i],o=e.map(a);if(t==="bottom"){const s=o[0];return new Vr({domain:[0,n],range:[0,1]}).map(s)}else if(t==="left"){const s=o[1];return new Vr({domain:[0,r],range:[0,1]}).map(s)}return i}}function jz(t,e,n){if(t.getTicks)return t.getTicks();if(!n)return e;const[r,i]=Ia(e,o=>+o),{tickCount:a}=t.getOptions();return n(r,i,a)}function Dz(t,e){if(Gn(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 Vr({domain:[0,1],range:[l/f,1-u/f]});return h=>d.map(h)}function K2(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=jz(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=Dz(o,s),p=Iz(o,s),v=y=>["top","bottom","center","outer"].includes(y),g=y=>["left","right"].includes(y);return Gn(s)||$n(s)?u.map((y,m,b)=>{var _,O;const w=((_=t.getBandWidth)===null||_===void 0?void 0:_.call(t,y))/2||0,M=h(t.map(y)+w);return{value:fl(s)&&o==="center"||$n(s)&&((O=t.getTicks)===null||O===void 0?void 0:O.call(t))&&v(o)||$n(s)&&g(o)?1-M:M,label:f(d($f(y),m,b)),id:String(m)}}):u.map((y,m,b)=>{var _;const O=((_=t.getBandWidth)===null||_===void 0?void 0:_.call(t,y))/2||0,w=p(h(t.map(y)+O));return{value:g(o)?1-w:w,label:f(d($f(y),m,b)),id:String(m)}})}function Bz(t,e,n="xy"){const[r,i,a]=Z2(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 Fz(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 zz(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]=ov(i),[h,p]=Z2(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 Gz(t,e,n){return F_(e)||dl(e)?!1:t===void 0?!!n.getTicks:t}function Wz(t){const{depth:e}=t.getOptions();return e?{tickIsBillboard:!0,lineIsBillboard:!0,labelIsBillboard:!0,titleIsBillboard:!0,gridIsBillboard:!0}:{}}function Hz(t,e,n,r){const{x:i,y:a,width:o,height:s}=n;if(t==="bottom")return{startPos:[i,a],endPos:[i+o,a]};if(t==="left")return{startPos:[i+o,a+s],endPos:[i+o,a]};if(t==="right")return{startPos:[i,a+s],endPos:[i,a]};if(t==="top")return{startPos:[i,a+s],endPos:[i+o,a+s]};if(t==="center"){if(e==="vertical")return{startPos:[i,a],endPos:[i,a+s]};if(e==="horizontal")return{startPos:[i,a],endPos:[i+o,a]};if(typeof e=="number"){const[c,l]=r.getCenter(),[u,f]=Vf(r),[d,h]=ov(r),p=Math.min(o,s)/2,{insetLeft:v,insetTop:g}=r.getOptions(),y=u*p,m=f*p,[b,_]=[c+i-v,l+a-g],[O,w]=[Math.cos(e),Math.sin(e)],M=[b+m*O,_+m*w],E=[b+y*O,_+y*w];return{startPos:M,endPos:E,gridClosed:h-d===360,gridCenter:[b,_],gridControlAngles:new Array(3).fill(0).map((A,P,C)=>(h-d)/(C.length-1)*P)}}}return{}}const Yz=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=U2(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:_}=v.getOptions(),O=K2(v,_,s,a,o,c,r,y),w=f?O.map((N,k)=>{const R=f.get(k);return!R||R[0]!==N.label?N:Object.assign(Object.assign({},N),{bbox:R[1]})}):O,[M,E]=Vf(y),A=zz(r,b,M,E,y),{axis:P,axisArc:C={}}=m,j=ud(Dt({},P,C,A,Object.assign(Object.assign({type:"arc",data:w,titleText:ld(d),grid:h},p),l)));return new wv({style:W2(j,["transform"])})}};function $z(t,e,n,r,i,a){const o=n.axis,s=["top","right","bottom","left"].includes(i)?n[`axis${J0(i)}`]:n.axisLinear,c=t.getOptions().name,l=n[`axis${ao(c)}`]||{};return Object.assign({},o,s,l)}function Vz(t,e,n,r,i,a){const o=$z(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:Lz(a)?10:0,tick:r==="center"?!1:void 0}):o}const Xz=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=U2(t,["direction","important","labelFormatter","order","orientation","actualPosition","position","size","style","title","tickCount","tickFilter","tickMethod","transform","indexBBox"]);return({scales:[y],value:m,coordinate:b,theme:_})=>{const{bbox:O}=m,{domain:w}=y.getOptions(),M=Vz(y,b,_,e,s,a),E=Object.assign(Object.assign(Object.assign({},M),l),g),A=Bz(o||s,b,t.plane),P=Hz(s,a,O,b),C=Wz(b),j=K2(y,w,f,r,d,h,s,b),N=v?j.map((D,B)=>{const F=v.get(B);return!F||F[0]!==D.label?D:Object.assign(Object.assign({},D),{bbox:F[1]})}):j,k=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},E),{type:"linear",data:N,crossSize:c,titleText:ld(u),labelOverlap:Fz(p,E),grid:Gz(E.grid,b,y),gridLength:A,line:!0,indexBBox:v}),E.line?null:{lineOpacity:0}),P),C),n);return k.labelOverlap.find(D=>D.type==="hide")&&(k.crossSize=!1),new wv({className:"axis",style:ud(k)})}},Q2=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"?oo(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)}},lo=Q2(Xz),J2=Q2(Yz);lo.props={defaultPosition:"center",defaultSize:45,defaultOrder:0,defaultCrossPadding:[12,12],defaultPadding:[12,12]},J2.props={defaultPosition:"outer",defaultOrientation:"vertical",defaultSize:45,defaultOrder:0,defaultCrossPadding:[12,12],defaultPadding:[12,12]};var Uz=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){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 Zz(t,e,n,r){const{radar:i}=t,[a]=r,o=a.getOptions().name,[s,c]=ov(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 tO=t=>{const{important:e={}}=t,n=Uz(t,["important"]);return r=>{const{theme:i,coordinate:a,scales:o}=r;return lo(Object.assign(Object.assign(Object.assign({},n),qz(t.orientation)),{important:Object.assign(Object.assign({},Zz(t,i,a,o)),e)}))(r)}};tO.props=Object.assign(Object.assign({},lo.props),{defaultPosition:"center"});function fd(t,e){return+t.toPrecision(e)}function Iht(t){return t.toLocaleString()}function jht(t){return t.toExponential()}function Dht(t,e){return e===void 0&&(e=0),Math.abs(t)<1e3?String(t):"".concat(fd(t/1e3,e).toLocaleString(),"K")}var Bht=function(t,e,n){return t<0&&Number.isFinite(t)?e:n},Fht=function(t,e,n){return t>0&&Number.isFinite(t)?e:n},zht=function(t,e){return t*e},Ght=function(t,e){return t/2+(e||0)/2};function dd(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 Kz={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},kv=Bi({background:"background",labelGroup:"label-group",label:"label"},"indicator"),Qz=function(t){(0,S.ZT)(e,t);function e(n){var r=t.call(this,n,Kz)||this;return r.point=[0,0],r.group=r.appendChild(new Br({})),r.isMutationObserved=!0,r}return e.prototype.renderBackground=function(){if(this.label){var n=this.attributes,r=n.position,i=n.padding,a=(0,S.CR)(zr(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 Qn(f[0]-l,f[1]-o,d[0]+s-f[0]+l,d[1]+c-f[1]+o),p=this.getPath(r,h),v=en(this.attributes,"background");this.background=qe(this.group).maybeAppendByClassName(kv.background,"path").styles((0,S.pi)((0,S.pi)({},v),{path:p})),this.group.appendChild(this.label.node())}},e.prototype.renderLabel=function(){var n=this.attributes,r=n.formatter,i=n.labelText,a=en(this.attributes,"label"),o=(0,S.CR)(Na(a),2),s=o[0],c=o[1],l=s.text,u=(0,S._T)(s,["text"]);if(this.label=qe(this.group).maybeAppendByClassName(kv.labelGroup,"g").styles(c),!!i){var f=this.label.maybeAppendByClassName(kv.label,function(){return Jo(r(i))}).style("text",r(i).toString());f.selectAll("text").styles(u)}},e.prototype.adjustLayout=function(){var n=(0,S.CR)(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,(0,S.ev)([f+1,1],(0,S.CR)(d),!1)),l[0][0]="M",l},e.prototype.createCorner=function(n,r){r===void 0&&(r=10);var i=.8,a=cF.apply(void 0,(0,S.ev)([],(0,S.CR)(n),!1)),o=(0,S.CR)(n,2),s=(0,S.CR)(o[0],2),c=s[0],l=s[1],u=(0,S.CR)(o[1],2),f=u[0],d=u[1],h=(0,S.CR)(a?[f-c,[c,f]]:[d-l,[l,d]],2),p=h[0],v=(0,S.CR)(h[1],2),g=v[0],y=v[1],m=p/2,b=p/Math.abs(p),_=r*b,O=_/2,w=_*Math.sqrt(3)/2*i,M=(0,S.CR)([g,g+m-O,g+m,g+m+O,y],5),E=M[0],A=M[1],P=M[2],C=M[3],j=M[4];return a?(this.point=[P,l-w],[["L",E,l],["L",A,l],["L",P,l-w],["L",C,l],["L",j,l]]):(this.point=[c+w,P],[["L",c,E],["L",c,A],["L",c+w,P],["L",c,C],["L",c,j]])},e.prototype.applyVisibility=function(){var n=this.attributes.visibility;n==="hidden"?co(this):hl(this)},e.prototype.bindEvents=function(){this.label.on(Ie.BOUNDS_CHANGED,this.renderBackground)},e.prototype.render=function(){this.renderLabel(),this.renderBackground(),this.adjustLayout(),this.applyVisibility()},e}(Rr),eO={fill:"#fff",lineWidth:1,radius:2,size:10,stroke:"#bfbfbf",strokeOpacity:1,zIndex:0},nO={fill:"#000",fillOpacity:.45,fontSize:12,textAlign:"center",textBaseline:"middle",zIndex:1},rO={orientation:"horizontal",showLabel:!0,type:"start"},fa=Bi({foreground:"foreground",handle:"handle",selection:"selection",sparkline:"sparkline",sparklineGroup:"sparkline-group",track:"track",brushArea:"brush-area"},"slider"),uo=Bi({labelGroup:"label-group",label:"label",iconGroup:"icon-group",icon:"icon",iconRect:"icon-rect",iconLine:"icon-line"},"handle"),Jz=function(t){(0,S.ZT)(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=(0,S._T)(n,["size","radius","orientation"]),u=a,f=u*2.4,d=qe(r).maybeAppendByClassName(uo.iconRect,"rect").styles((0,S.pi)((0,S.pi)({},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(uo.iconLine,"-1"),"line").styles((0,S.pi)({x1:h,x2:h,y1:v,y2:g},l)),d.maybeAppendByClassName("".concat(uo.iconLine,"-2"),"line").styles((0,S.pi)({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}(Rr),iO=function(t){(0,S.ZT)(e,t);function e(n){return t.call(this,n,rO)||this}return e.prototype.renderLabel=function(n){var r=this,i=this.attributes.showLabel,a=en(this.attributes,"label"),o=a.transform,s=(0,S._T)(a,["transform"]),c=(0,S.CR)(Na(s,[]),2),l=c[0],u=c[1],f=qe(n).maybeAppendByClassName(uo.labelGroup,"g").styles(u),d=(0,S.pi)((0,S.pi)({},nO),l),h=d.text,p=(0,S._T)(d,["text"]);vi(!!i,f,function(v){r.label=v.maybeAppendByClassName(uo.label,"text").styles((0,S.pi)((0,S.pi)({},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=(0,S.pi)((0,S.pi)({orientation:i},eO),en(this.attributes,"icon")),s=this.attributes.iconShape,c=s===void 0?function(){return new Jz({style:o})}:s,l=qe(n).maybeAppendByClassName(uo.iconGroup,"g");l.selectAll(uo.icon.class).data([c]).join(function(u){return u.append(typeof c=="string"?c:function(){return c(a)}).attr("className",uo.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}(Rr),aO=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"]]},tG=aO,eG=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"]]},nG=function(t,e,n){return[["M",t-n,e],["L",t,e-n],["L",t+n,e],["L",t,e+n],["Z"]]},rG=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"]]},iG=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"]]},aG=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"]]},oG=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"]]},oO=function(t,e,n){return[["M",t,e+n],["L",t,e-n]]},sG=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]]},cG=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]]},lG=function(t,e,n){return[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]]},uG=function(t,e,n){return[["M",t-n,e],["L",t+n,e]]},sO=function(t,e,n){return[["M",t-n,e],["L",t+n,e]]},fG=sO,dG=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]]},hG=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]]},pG=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]]},vG=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 gG(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 yG=function(t,e,n){return[["M",t-n,e-n],["L",t+n,e],["L",t-n,e+n],["Z"]]};function mG(t){var e="default";if(zo(t)&&t instanceof Image)e="image";else if(gi(t))e="symbol";else if(er(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 bG(t){var e=mG(t);return["base64","url","image"].includes(e)?"image":t&&e==="symbol"?"path":null}var Rn=function(t){(0,S.ZT)(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.render=function(n,r){var i=n.symbol,a=n.size,o=a===void 0?16:a,s=(0,S._T)(n,["symbol","size"]),c=bG(i);vi(!!c,qe(r),function(l){l.maybeAppendByClassName("marker",c).attr("className","marker ".concat(c,"-marker")).call(function(u){if(c==="image"){var f=o*2;u.styles({img:i,width:f,height:f,x:-o,y:-o})}else{var f=o/2,d=gi(i)?i:e.getSymbol(i);u.styles((0,S.pi)({path:d==null?void 0:d(0,0,f)},s))}})})},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}(Rr);Rn.registerSymbol("cross",sG),Rn.registerSymbol("hyphen",uG),Rn.registerSymbol("line",oO),Rn.registerSymbol("plus",lG),Rn.registerSymbol("tick",cG),Rn.registerSymbol("circle",aO),Rn.registerSymbol("point",tG),Rn.registerSymbol("bowtie",oG),Rn.registerSymbol("hexagon",aG),Rn.registerSymbol("square",eG),Rn.registerSymbol("diamond",nG),Rn.registerSymbol("triangle",rG),Rn.registerSymbol("triangle-down",iG),Rn.registerSymbol("line",oO),Rn.registerSymbol("dot",sO),Rn.registerSymbol("dash",fG),Rn.registerSymbol("smooth",dG),Rn.registerSymbol("hv",hG),Rn.registerSymbol("vh",pG),Rn.registerSymbol("hvh",vG),Rn.registerSymbol("vhv",gG);function xG(t,e,n){var r=Math.round((t-n)/e);return n+r*e}function _G(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 cO=1.4,lO=.4;function OG(t,e,n){var r=n,i=r*cO,a=r/2,o=r/6,s=t+i*lO;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 wG(t,e,n){var r=n,i=r*cO,a=r/2,o=r/6,s=e+i*lO;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]]}Rn.registerSymbol("hiddenHandle",_G),Rn.registerSymbol("verticalHandle",OG),Rn.registerSymbol("horizontalHandle",wG);var Wht=function(t,e,n){return t===void 0&&(t="horizontal"),t==="horizontal"?e:n};function SG(t,e,n,r){var i;r===void 0&&(r=4);var a=(0,S.CR)(t,2),o=a[0],s=a[1],c=(0,S.CR)(e,2),l=c[0],u=c[1],f=(0,S.CR)(n,2),d=f[0],h=f[1],p=(0,S.CR)([l,u],2),v=p[0],g=p[1],y=g-v;return v>g&&(i=(0,S.CR)([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 da(t,e,n){return t===void 0&&(t="horizontal"),t==="horizontal"?e:n}var Ol=Bi({markerGroup:"marker-group",marker:"marker",labelGroup:"label-group",label:"label"},"handle"),uO={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},MG=function(t){(0,S.ZT)(e,t);function e(n){return t.call(this,n,uO)||this}return e.prototype.render=function(n,r){var i=qe(r).maybeAppendByClassName(Ol.markerGroup,"g");this.renderMarker(i);var a=qe(r).maybeAppendByClassName(Ol.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?da(a,"horizontalHandle","verticalHandle"):o;vi(!!s,n,function(c){var l=en(r.attributes,"marker"),u=(0,S.pi)({symbol:s},l);r.marker=c.maybeAppendByClassName(Ol.marker,function(){return new Rn({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;vi(a,n,function(u){var f,d=en(r.attributes,"label"),h=d.text,p=(0,S._T)(d,["text"]),v=((f=u.select(Ol.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,_=(0,S.CR)(da(o,[0,b+c,"center","top"],[y+c,0,"start","middle"]),4),O=_[0],w=_[1],M=_[2],E=_[3];u.maybeAppendByClassName(Ol.label,"text").styles((0,S.pi)((0,S.pi)({},p),{x:O,y:w,text:l(h).toString(),textAlign:M,textBaseline:E}))})},e}(Rr),fO={showTitle:!0,padding:0,orientation:"horizontal",backgroundFill:"transparent",titleText:"",titleSpacing:4,titlePosition:"top-left",titleFill:"#2C3542",titleFontWeight:"bold",titleFontFamily:"sans-serif",titleFontSize:12},EG=Ra({},fO,{}),AG=Ra({},fO,la(uO,"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"}),TG=.01,Hht=.5,Lr=Bi({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 PG(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 CG(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 dO(t,e){var n=(0,S.CR)(PG(t,e),2),r=n[0],i=n[1];return{tick:e>(r+i)/2?i:r,range:[r,i]}}var wl=Bi({trackGroup:"background-group",track:"background",selectionGroup:"ribbon-group",selection:"ribbon",clipPath:"clip-path"},"ribbon");function hO(t){var e=t.orientation,n=t.size,r=t.length;return da(e,[r,n],[n,r])}function pO(t){var e=t.type,n=(0,S.CR)(hO(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 kG(t){return pO(t)}function RG(t){var e=t.orientation,n=t.color,r=t.block,i=t.partition,a;if(gi(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 Aa(l).toString()});return s?s===1?c[0]:r?CG(i,c,e):c.reduce(function(l,u,f){return l+=" ".concat(f/(s-1),":").concat(u)},"l(".concat(da(e,"0","270"),")")):""}function LG(t){var e=t.orientation,n=t.range;if(!n)return[];var r=(0,S.CR)(hO(t),2),i=r[0],a=r[1],o=(0,S.CR)(n,2),s=o[0],c=o[1],l=da(e,s*i,0),u=da(e,0,s*a),f=da(e,c*i,i),d=da(e,a,c*a);return[["M",l,u],["L",l,d],["L",f,d],["L",f,u],["Z"]]}function NG(t,e){var n=en(e,"track");t.maybeAppendByClassName(wl.track,"path").styles((0,S.pi)({path:pO(e)},n))}function IG(t,e){var n=en(e,"selection"),r=RG(e),i=t.maybeAppendByClassName(wl.selection,"path").styles((0,S.pi)({path:kG(e),fill:r},n)),a=i.maybeAppendByClassName(wl.clipPath,"path").styles({path:LG(e)}).node();i.style("clip-path",a)}var jG=function(t){(0,S.ZT)(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=qe(r).maybeAppendByClassName(wl.trackGroup,"g");NG(i,n);var a=qe(r).maybeAppendByClassName(wl.selectionGroup,"g");IG(a,n)},e}(Rr);function DG(t){return{min:Math.min.apply(Math,(0,S.ev)([],(0,S.CR)(t.map(function(e){return e.value})),!1)),max:Math.max.apply(Math,(0,S.ev)([],(0,S.CR)(t.map(function(e){return e.value})),!1))}}var BG=function(t){(0,S.ZT)(e,t);function e(n){var r=t.call(this,n,AG)||this;return r.eventToOffsetScale=new Vr({}),r.innerRibbonScale=new Vr({}),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=dO(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=(0,S.CR)(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 Qn(0,0,r,i)},e.prototype.render=function(n,r){var i=this,a=n.showLabel;this.renderTitle(qe(r));var o=this.availableSpace,s=o.x,c=o.y,l=qe(r).maybeAppendByClassName(Lr.contentGroup,"g").styles({x:s,y:c}),u=l.maybeAppendByClassName(Lr.labelGroup,"g").styles({zIndex:1});vi(!!a,u,function(d){i.renderLabel(d)});var f=l.maybeAppendByClassName(Lr.ribbonGroup,"g").styles({zIndex:0});this.handlesGroup=l.maybeAppendByClassName(Lr.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]}:DG(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=(0,S.CR)(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=(0,S.CR)(o,2),c=s[0],l=s[1];return[c,l]},enumerable:!1,configurable:!0}),e.prototype.ifHorizontal=function(n,r){return da(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=en(this.attributes,"title"),l=(0,S.pi)((0,S.pi)({},c),{width:o,height:s,text:a}),u=this;n.selectAll(Lr.title.class).data(i?[a]:[]).join(function(f){return f.append(function(){return new O2({style:l})}).attr("className",Lr.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 Qn(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 Qn(0,0,0,0);if(this.cacheLabelBBox)return this.cacheLabelBBox;var i=((n=this.label.querySelector(Pn.labelGroup.class))===null||n===void 0?void 0:n.children.slice(-1)[0]).getBBox(),a=i.width,o=i.height;return this.cacheLabelBBox=new Qn(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=(0,S.CR)(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 _=Math.max(g,u),O=h-_,w=(0,S.CR)(this.ifHorizontal([O,m],[m,O]),2),M=w[0],E=w[1],A=["top","left"].includes(b)?l:0,P=(0,S.CR)(this.ifHorizontal([_/2,A],[A,_/2]),2),C=P[0],j=P[1];return new Qn(C,j,M,E)},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=en(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=Ra({x:p,y:v,length:y,size:m,type:a,orientation:o,color:s,block:c,partition:i.map(function(_){return(_.value-f)/(d-f)}),range:this.ribbonRange},l);this.ribbon=n.maybeAppendByClassName(Lr.ribbon,function(){return new jG({style:b})}).update(b)},e.prototype.getHandleClassName=function(n){return"".concat(Lr.prefix("".concat(n,"-handle")))},e.prototype.renderHandles=function(){var n=this.attributes,r=n.showHandle,i=n.orientation,a=en(this.attributes,"handle"),o=(0,S.CR)(this.selection,2),s=o[0],c=o[1],l=(0,S.pi)((0,S.pi)({},a),{orientation:i}),u=a.shape,f=u===void 0?"slider":u,d=f==="basic"?MG:iO,h=this;this.handlesGroup.selectAll(Lr.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(Lr.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=(0,S.CR)(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=(0,S.CR)(this.getElementsByClassName(Lr.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=(0,S.CR)(s.getLocalBounds().min,1),l=c[0],u=(0,S.CR)(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 Qn(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=(0,S.CR)([Math.max(r,o),Math.max(i,s)],2),l=c[0],u=c[1];return this.cacheHandleBBox=new Qn(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=(0,S.CR)(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=(0,S.CR)(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=en(this.attributes,"indicator");this.indicator=n.maybeAppendByClassName(Lr.indicator,function(){return new Qz({})}).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((0,S.pi)((0,S.pi)({},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=(0,S.CR)([a.value,f.value],2),h=d[0],p=d[1],v=(h+p)/2;i.push((0,S.pi)((0,S.pi)({},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=(0,S.CR)(["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=en(this.attributes,"tick"),l=en(this.attributes,"label"),u=l.align,f=Ra((0,S.pi)({showLine:!1,showGrid:!1,showTick:a,type:"linear",startPos:[0,0],endPos:[0,0],tickDirection:"negative",labelTransform:"rotate(0)"},this.labelStyle),la(c,"tick"),la(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=(0,S.pi)((0,S.pi)((0,S.pi)({},f),d),{labelOverlap:[{type:"hide"}]});this.label=n.maybeAppendByClassName(Lr.label,function(){return new wv({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=(0,S.CR)([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=(0,S.CR)(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=(0,cr.Z)(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}),hl(this.indicator.node())},e.prototype.hideIndicator=function(){co(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=(0,S.CR)(this.selection,2),s=o[0],c=o[1],l=(0,S.CR)([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=(0,S.CR)(SG([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 nr(r)?fd((o-a)*TG,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?dO(i.map(function(s){var c=s.value;return c}),n).tick:xG(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=(0,S.CR)(this.ribbon.node().getPosition(),2),c=s[0],l=s[1],u=this.ifHorizontal(c,l),f=this.ifHorizontal.apply(this,(0,S.ev)([],(0,S.CR)(dd(n)),!1)),d=f-u,h=(0,cr.Z)(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 Nn("valuechange",{detail:{value:this.selection}});this.dispatchEvent(n)},e.prototype.dispatchIndicated=function(n,r){var i=new Nn("indicate",{detail:{value:n,range:r}});this.dispatchEvent(i)},e}(Rr);class Sl extends xl{getDefaultOptions(){return{range:[0],domain:[0,1],unknown:void 0,tickCount:5,tickMethod:es}}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!Zs(i)||!Zs(a)?[]:e(i,a,r)}clone(){return new Sl(this.options)}}class Js extends xl{getDefaultOptions(){return{domain:[.5],range:[0,1]}}constructor(e){super(e)}map(e){if(!od(e))return this.options.unknown;const n=Mv(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 Js(this.options)}rescale(){const{domain:e,range:n}=this.options;this.n=Math.min(e.length,n.length-1),this.thresholds=e}}function Ml(t){return Math.abs(t)<1e-14?t:parseFloat(t.toFixed(14))}const FG=[1,5,2,2.5,4,3],Yht=null,vO=Number.EPSILON*100;function zG(t,e){return(t%e+e)%e}function GG(t){return Math.round(t*1e12)/1e12}function WG(t,e,n,r,i,a){const o=j2(e),s=N2(e,t);let c=0;const l=zG(r,a);return(l<vO||a-l<vO)&&r<=0&&i>=0&&(c=1),1-s/(o-1)-n+c}function HG(t,e,n){const r=j2(e),i=N2(e,t),a=1;return 1-i/(r-1)-n+a}function YG(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 $G(t,e){return t>=e?2-(t-1)/(e-1):1}function VG(t,e,n,r){const i=e-t;return 1-.5*(wr(e-r,2)+wr(t-n,2))/wr(.1*i,2)}function XG(t,e,n){const r=e-t;if(n>r){const i=(n-r)/2;return 1-wr(i,2)/wr(.1*r,2)}return 1}function UG(){return 1}const Rv=(t,e,n=5,r=!0,i=FG,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=HG(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=$G(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 _=Math.ceil(Math.log10(b));for(;_<1/0;){const O=c*v*wr(10,_),w=XG(t,e,O*(y-1));if(a[0]*g+a[1]*w+a[2]*m+a[3]<s.score)break;const M=Math.floor(e/O)*c-(y-1)*c,E=Math.ceil(t/O)*c;if(M<=E){const A=E-M;for(let P=0;P<=A;P+=1){const j=(M+P)*(O/c),N=j+O*(y-1),k=O,R=WG(v,i,c,j,N,k),D=VG(t,e,j,N),B=YG(y,o,t,e,j,N),F=UG(),z=a[0]*R+a[1]*D+a[2]*B+a[3]*F;z>s.score&&(!r||j<=t&&N>=e)&&(s.lmin=j,s.lmax=N,s.lstep=k,s.score=z)}}_+=1}y+=1}}c+=1}const l=Ml(s.lmax),u=Ml(s.lmin),f=Ml(s.lstep),d=Math.floor(GG((l-u)/f))+1,h=new Array(d);h[0]=Ml(u);for(let p=1;p<d;p+=1)h[p]=Ml(h[p-1]+f);return h};class hd extends Js{getDefaultOptions(){return{domain:[0,1],range:[.5],nice:!1,tickCount:5,tickMethod:Rv}}constructor(e){super(e)}nice(){const{nice:e}=this.options;if(e){const[n,r,i]=this.getTickMethodOptions();this.options.domain=F2(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 hd(this.options)}}function qG(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 ZG(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(qG(r,a/e));return i}class pd extends Js{getDefaultOptions(){return{domain:[],range:[],tickCount:5,unknown:void 0,tickMethod:Rv}}constructor(e){super(e)}rescale(){const{domain:e,range:n}=this.options;this.n=n.length-1,this.thresholds=ZG(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 pd(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 KG=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 QG(t,e,n){return t.size=e,Rz(n)?t.height=e:t.width=e,t}function JG(t,e,n){const{size:r}=e,i=X2(t,e,n);return QG(i,r,i.orientation)}function tW(t){return e=>({value:e/t,label:String(e)})}function eW(t,e,n,r,i){const a=e.thresholds,o=tW(r);return Object.assign(Object.assign({},t),{color:i,data:[n,...a,r].map(o)})}function nW(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 Lv(t){const{domain:e}=t.getOptions(),[n,r]=[e[0],C_(e)];return[n,r]}function rW(t,e){const n=t.getOptions(),r=t.clone();return r.update(Object.assign(Object.assign({},n),{range:[Aa(e).toString()]})),r}function iW(t,e,n,r,i,a){const{length:o}=t,s=n||r,c=i.color?a.legendContinuous.ribbonFill||"black":a.color,l=e||rW(s,c),[u,f]=Lv(l),[d,h]=Lv([e,n,r].filter(p=>p!==void 0).find(p=>!(p instanceof Sl)));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,_,O,w)=>`rgba(${_}, ${O}, ${w}, ${m})`)})})}function aW(t,e,n,r,i,a){const o=ua(t,"color"),s=JG(n,r,i);if(o instanceof Js){const{range:u}=o.getOptions(),[f,d]=Lv(o);return o instanceof hd||o instanceof pd?eW(s,o,f,d,u):nW(s,o,u)}const c=ua(t,"size"),l=ua(t,"opacity");return iW(s,o,c,l,e,a)}const fo=t=>{const{labelFormatter:e,layout:n,order:r,orientation:i,position:a,size:o,title:s,style:c,crossPadding:l,padding:u}=t,f=KG(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:_}=g,O=$2(a,n),{legendContinuous:w={}}=p,M=ud(Object.assign({},w,Object.assign(Object.assign({titleText:ld(s),labelAlign:"value",labelFormatter:typeof e=="string"?A=>oo(e)(A.label):e},aW(d,v,h,t,fo,p)),c),f)),E=new V2({style:Object.assign(Object.assign({x:y,y:m,width:b,height:_},O),{subOptions:M})});return E.appendChild(new BG({className:"legend-continuous",style:M})),E}};fo.props={defaultPosition:"top",defaultOrientation:"vertical",defaultOrder:1,defaultSize:60,defaultLength:200,defaultLegendSize:60,defaultPadding:[20,10],defaultCrossPadding:[12,12]};const gO=t=>(...e)=>fo(Object.assign({},{block:!0},t))(...e);gO.props=Object.assign(Object.assign({},fo.props),{defaultPosition:"top",defaultOrientation:"horizontal"});const Nv=t=>e=>{const{scales:n}=e,r=ua(n,"size");return fo(Object.assign({},{type:"size",data:r.getTicks().map((i,a)=>({value:i,label:String(i)}))},t))(e)};Nv.props=Object.assign(Object.assign({},fo.props),{defaultPosition:"top",defaultOrientation:"horizontal"});const yO=t=>Nv(Object.assign({},{block:!0},t));yO.props=Object.assign(Object.assign({},fo.props),{defaultPosition:"top",defaultOrientation:"horizontal"});var oW=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 mO=({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:_,coordinate:O,theme:w,component:M,interaction:E,x:A,y:P,z:C,key:j,frame:N,labelTransform:k,parentKey:R,clip:D,viewStyle:B,title:F}=e,z=oW(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:A,y:P,z:C,key:j,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:w,coordinate:O,component:M,interaction:E,frame:N,labelTransform:k,margin:v,marginLeft:g,marginBottom:y,marginTop:m,marginRight:b,parentKey:R,clip:D,style:B},!t&&{title:F}),{marks:[Object.assign(Object.assign(Object.assign({},z),{key:`${j}-0`,data:_}),t&&{title:F})]})]};mO.props={};var sW=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 tc(t){return(e,...n)=>Dt({},t(e,...n),e)}function ec(t){return(e,...n)=>Dt({},e,t(e,...n))}function Iv(t,e){if(!t)return e;if(Array.isArray(t))return t;const{value:n=e}=t,r=sW(t,["value"]);return Object.assign(Object.assign({},r),{value:n})}var jv=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 bO=()=>t=>{const{children:e}=t,n=jv(t,["children"]);if(!Array.isArray(e))return[];const{data:r,scale:i={},axis:a={},legend:o={},encode:s={},transform:c=[]}=n,l=jv(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=jv(f,["data","scale","axis","legend","encode","transform"]);return Object.assign({data:Iv(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"})]};bO.props={};function ur([t,e],[n,r]){return[t-n,e-r]}function vd([t,e],[n,r]){return[t+n,e+r]}function Jn([t,e],[n,r]){return Math.sqrt(Math.pow(t-n,2)+Math.pow(e-r,2))}function Gi([t,e]){return Math.atan2(e,t)}function nc([t,e]){return Gi([t,e])+Math.PI/2}function xO(t,e){const n=Gi(t),r=Gi(e);return n<r?r-n:Math.PI*2-(n-r)}function Dv(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 _O([t,e],[n,r]){return[(t+n)/2,(e+r)/2]}function Ae(t,e){for(const[n,r]of Object.entries(e))t.style(n,r)}function cW(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 lW(t,e,n){const{arrowSize:r}=n,i=typeof r=="string"?+parseFloat(r)/100*Jn(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 El(t,e,n,r,i){const a=Gi(ur(r,e))+Math.PI,o=Gi(ur(r,n))+Math.PI;return t.arc(r[0],r[1],i,a,o,o-a<0),t}function OO(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=Zo(s),[u,f]=Ia(l,g=>s[g]),d=new Vr({domain:[u,f],range:[0,100]}),h=g=>d.map(s[g]),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 gd(t){const[e,n,r,i]=t;return[i,e,n,r]}function ns(t,e,n){const[r,i,,a]=$n(t)?gd(e):e,[o,s]=n,c=t.getCenter(),l=nc(ur(r,c)),u=nc(ur(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:Jn(a,c),outerRadius:Jn(r,c)}}function $ht(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 wO(t){const{colorAttribute:e,opacityAttribute:n=e}=t;return`${n}Opacity`}function SO(t,e){if(!Gn(t))return"";const n=t.getCenter(),{transform:r}=e;return`translate(${n[0]}, ${n[1]}) ${r||""}`}function MO(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 EO(t){return t.replace(/-(\w)/g,function(e,n){return n.toUpperCase()})}function uW(t){return t.replace(/([A-Z])/g,"-$1").toLowerCase()}var Vht=Array.prototype.slice;function AO(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function Vn(t){return function(){return t}}function TO(t){this._context=t}TO.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 Al(t){return new TO(t)}const Bv=Math.PI,Fv=2*Bv,rs=1e-6,fW=Fv-rs;function PO(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function dW(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return PO;const n=wr(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 yd{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?PO:dW(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>rs)if(!(Math.abs(f*c-l*u)>rs)||!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((Bv-Math.acos((v+d-g)/(2*y*m)))/2),_=b/m,O=b/y;Math.abs(_-1)>rs&&this._append`L${e+_*u},${n+_*f}`,this._append`A${a},${a},0,0,${+(f*h>u*p)},${this._x1=e+O*c},${this._y1=n+O*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)>rs||Math.abs(this._y1-u)>rs)&&this._append`L${l},${u}`,r&&(d<0&&(d=d%Fv+Fv),d>fW?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>rs&&this._append`A${r},${r},0,${+(d>=Bv)},${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 Wi(){return new yd}Wi.prototype=yd.prototype;function Xht(t=3){return new yd(+t)}function zv(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 yd(e)}function CO(t){return t[0]}function kO(t){return t[1]}function ho(t,e){var n=Vn(!0),r=null,i=Al,a=null,o=zv(s);t=typeof t=="function"?t:t===void 0?CO:Vn(t),e=typeof e=="function"?e:e===void 0?kO:Vn(e);function s(c){var l,u=(c=AO(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:Vn(+c),s):t},s.y=function(c){return arguments.length?(e=typeof c=="function"?c:Vn(+c),s):e},s.defined=function(c){return arguments.length?(n=typeof c=="function"?c:Vn(!!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 rc(t){const e=typeof t=="function"?t:t.render;return class extends C0{connectedCallback(){this.draw()}attributeChangedCallback(){this.draw()}draw(){e(this)}}}var Gv=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 hW(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 pW(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 vW=(t,e,n)=>{const r=Jn(t,e),i=Jn(e,n),a=Jn(n,t);return(Math.pow(r,2)+Math.pow(i,2)-Math.pow(a,2))/(2*r*i)};function gW(t,e,n,r){const[[i,a],[o,s]]=e,[c,l]=hW(t);if(i===o&&a===s)return ho()([[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(vW(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 ho()(u)}const RO=rc(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=Gv(e,["className","class","transform","rotate","labelTransform","labelTransformOrigin","x","y","x0","y0","text","background","connector","startMarker","endMarker","coordCenter","innerHTML"]);if([c,l,u,f].some(D=>!(0,xr.Z)(D))){t.children.forEach(D=>D.remove());return}const _=fe(b,"background"),{padding:O}=_,w=Gv(_,["padding"]),M=fe(b,"connector"),{points:E=[]}=M,A=Gv(M,["points"]),P=[[+u,+f],[+c,+l]];let C;m?C=je(t).maybeAppend("html","html",n).style("zIndex",0).style("innerHTML",m).call(Ae,Object.assign({transform:o,transformOrigin:s},b)).node():C=je(t).maybeAppend("text","text").style("zIndex",0).style("text",d).call(Ae,Object.assign({textBaseline:"middle",transform:o,transformOrigin:s},b)).node();const j=je(t).maybeAppend("background","rect").style("zIndex",-1).call(Ae,pW(C,O)).call(Ae,h?w:{}).node(),N=gW(j,P,E,y),k=v&&new Rn({id:"startMarker",style:Object.assign({x:0,y:0},fe(b,"startMarker"))}),R=g&&new Rn({id:"endMarker",style:Object.assign({x:0,y:0},fe(b,"endMarker"))});je(t).maybeAppend("connector","path").style("zIndex",0).style("path",N).style("markerStart",k).style("markerEnd",R).call(Ae,p?A:{})});function ic(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 yW(t,e,n,r){const i=e.length/2,a=e.slice(0,i),o=e.slice(i);let s=ic(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=Gi(ur(f,u))/Math.PI*180;return{x:l[0],y:l[1],transform:`rotate(${d})`,textAlign:"center",textBaseline:"middle"}}function LO(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=O_(n.x,l),g=O_(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 NO(t,e,n,r){const{y:i,y1:a,autoRotate:o,rotateToAlignArc:s}=n,c=r.getCenter(),l=ns(r,e,[i,a]),{innerRadius:u,outerRadius:f,startAngle:d,endAngle:h}=l,p=t==="inside"?(d+h)/2:h,v=Wv(p,o,s),g=(()=>{const[y,m]=e,b=u+(f-u)*.5,[_,O]=t==="inside"?Tl(c,p,b):_O(y,m);return{x:_,y:O}})();return Object.assign(Object.assign({},g),{textAlign:t==="inside"?"center":"start",textBaseline:"middle",rotate:v})}function Tl(t,e,n){return[t[0]+Math.sin(e)*n,t[1]-Math.cos(e)*n]}function Wv(t,e,n){if(!e)return 0;const r=n?0:Math.sin(t)<0?90:-90;return t/Math.PI*180+r}function mW(t,e,n,r){const{y:i,y1:a,autoRotate:o,rotateToAlignArc:s,radius:c=.5,offset:l=0}=n,u=ns(r,e,[i,a]),{startAngle:f,endAngle:d}=u,h=r.getCenter(),p=(f+d)/2,g={textAlign:"center",textBaseline:"middle",rotate:Wv(p,o,s)},{innerRadius:y,outerRadius:m}=u,_=y+(m-y)*c+l,[O,w]=Tl(h,p,_);return Object.assign({x:O,y:w},g)}function IO(t){return t===void 0?null:t}function jO(t,e,n,r){const{bounds:i}=n,[a]=i;return{x:IO(a[0]),y:IO(a[1])}}function ja(t,e,n,r){const{bounds:i}=n;return i.length===1?jO(t,e,n,r):(fl(r)?NO:Vs(r)?mW:LO)(t,e,n,r)}function bW(t,e,n,r,i){const[a,o]=Tl(t,e,n),[s,c]=Tl(t,e,r),l=Math.sin(e)>0?1:-1;return[[a,o],[s,c],[s+l*i,c]]}function DO(t,e,n){const r=ns(n,t,[e.y,e.y1]),{innerRadius:i,outerRadius:a}=r;return i+(a-i)}function BO(t,e,n){const r=ns(n,t,[e.y,e.y1]),{startAngle:i,endAngle:a}=r;return(i+a)/2}function Hv(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=BO(e,n,r),h=Math.sin(d)>0?1:-1,p=Wv(d,i,a),v={textAlign:h>0||fl(r)?"start":"end",textBaseline:"middle",rotate:p},g=DO(e,n,r),y=g+(s?c:o),[[m,b],[_,O],[w,M]]=bW(f,d,g,y,s?l:0),E=s?+u*h:0,A=w+E,P=M,C={connector:s,connectorPoints:[[_-A,O-P],[w-A,M-P]]};return Object.assign(Object.assign({x0:m,y0:b,x:w+E,y:M},v),C)}function xW(t,e,n,r){const{bounds:i}=n;return i.length===1?jO(t,e,n,r):(fl(r)?NO:Vs(r)?Hv:LO)(t,e,n,r)}var _W=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 OW(t,e,n,r){if(!Vs(r))return{};const{connectorLength:i,connectorLength2:a,connectorDistance:o}=n,s=_W(Hv("outside",e,n,r),[]),c=r.getCenter(),l=DO(e,n,r),u=BO(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 wW=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 SW(t,e,n,r){if(!Vs(r))return{};const{connectorLength:i,connectorLength2:a,connectorDistance:o}=n,s=wW(Hv("outside",e,n,r),[]),{x0:c,y0:l}=s,u=r.getCenter(),d=sB(r)+i,h=nc([c-u[0],l-u[1]]),p=Math.sin(h)>0?1:-1,[v,g]=Tl(u,h,d);return s.x=v+(a+o)*p,s.y=g,s}var FO=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 MW(t,e){return t!==void 0?t:Vs(e)?"inside":$n(e)?"right":"top"}function EW(t,e,n,r,i){const{position:a}=e,{render:o}=i,s=MW(a,n),l=r[o?"htmlLabel":s==="inside"?"innerLabel":"label"],u=Object.assign({},l,e),f=_t[EO(s)];if(!f)throw new Error(`Unknown position: ${s}`);return Object.assign(Object.assign({},l),f(s,t,u,n,i))}const zO=(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=FO(o,["text","x","y","transform","transformOrigin","className"]),p=EW(a,o,n,r,t),{rotate:v=0,transform:g=""}=p,y=FO(p,["rotate","transform"]);return je(new RO).call(Ae,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(Ae,h).node()}};zO.props={defaultMarker:"point"};function GO(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 WO(t,e){if(e(t))return t;let n=t.parent;for(;n&&!e(n);)n=n.parent;return n}function AW(t){return WO(t,e=>e.className==="component")}function TW(t){return WO(t,e=>e.className==="element")}function Nr(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=TW(a),c=AW(a),l=s||c;if(!l)return;const{className:u,markType:f}=l;if(u==="element"){const d=Object.assign(Object.assign({},i),{nativeEvent:!0,data:{data:GO(l,e)}});n.emit(`element:${t}`,d),n.emit(`${f}:${t}`,d)}else{const d=Object.assign(Object.assign({},i),{nativeEvent:!0});n.emit(`component:${t}`,d),n.emit(`${o}:${t}`,d)}}}function HO(){return(t,e,n)=>{const{container:r,view:i}=t,a=Nr(Sn.CLICK,i,n,M=>M.detail===1),o=Nr(Sn.DBLCLICK,i,n,M=>M.detail===2),s=Nr(Sn.POINTER_TAP,i,n),c=Nr(Sn.POINTER_DOWN,i,n),l=Nr(Sn.POINTER_UP,i,n),u=Nr(Sn.POINTER_OVER,i,n),f=Nr(Sn.POINTER_OUT,i,n),d=Nr(Sn.POINTER_MOVE,i,n),h=Nr(Sn.POINTER_ENTER,i,n),p=Nr(Sn.POINTER_LEAVE,i,n),v=Nr(Sn.POINTER_UPOUTSIDE,i,n),g=Nr(Sn.DRAG_START,i,n),y=Nr(Sn.DRAG,i,n),m=Nr(Sn.DRAG_END,i,n),b=Nr(Sn.DRAG_ENTER,i,n),_=Nr(Sn.DRAG_LEAVE,i,n),O=Nr(Sn.DRAG_OVER,i,n),w=Nr(Sn.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",_),r.addEventListener("dragover",O),r.addEventListener("drop",w),()=>{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",_),r.removeEventListener("dragover",O),r.removeEventListener("drop",w)}}}HO.props={reapplyWhenUpdate:!0};function PW(){return{"component.axisRadar":tO,"component.axisLinear":lo,"component.axisArc":J2,"component.legendContinuousBlock":gO,"component.legendContinuousBlockSize":yO,"component.legendContinuousSize":Nv,"interaction.event":HO,"composition.mark":mO,"composition.view":bO,"shape.label.label":zO}}var CW=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 Xn(t,e){const n=Object.assign(Object.assign({},PW()),e),r=a=>{if(typeof a!="string")return a;const o=`${t}.${a}`;return n[o]||$s(`Unknown Component: ${o}`)};return[(a,o)=>{const{type:s}=a,c=CW(a,["type"]);s||$s("Plot type is required!");const l=r(s);return l==null?void 0:l(c,o)},r]}function YO(t){const{canvas:e,group:n}=t;return(e==null?void 0:e.document)||(n==null?void 0:n.ownerDocument)||$s("Cannot find library document")}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 kW(t,e,n){const[r]=Xn("coordinate",n),{innerHeight:i,innerWidth:a,insetLeft:o,insetTop:s,insetRight:c,insetBottom:l}=t,{coordinates:u=[]}=e,f=DW(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 j_.Coordinate3D(h):new j_.Coordinate(h)}function VO(t,e){const{coordinate:n={}}=t,r=$O(t,["coordinate"]),{type:i,transform:a=[]}=n,o=$O(n,["type","transform"]);if(!i)return Object.assign(Object.assign({},r),{coordinates:a});const[,s]=Xn("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 Qi(t,e){return t.filter(n=>n.type===e)}function is(t){return Qi(t,"polar").length>0}function RW(t){return Qi(t,"helix").length>0}function ac(t){return Qi(t,"transpose").length%2===1}function LW(t){return Qi(t,"parallel").length>0}function XO(t){return Qi(t,"theta").length>0}function NW(t){return Qi(t,"reflect").length>0}function Pl(t){return Qi(t,"radial").length>0}function IW(t){return Qi(t,"radar").length>0}function jW(t){return Qi(t,"reflectY").length>0}function DW(t){return t.find(e=>e.type==="cartesian"||e.type==="cartesian3D")?t:[...t,{type:"cartesian"}]}function nn(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 BW=nn("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),FW=nn("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),zW=nn("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),GW=nn("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),WW=nn("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),HW=nn("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),YW=nn("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),$W=nn("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),VW=nn("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),XW=nn("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function md(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Yv(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function oc(){}var as=.7,sc=1/as,cc="\\s*([+-]?\\d+)\\s*",Cl="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ha="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",UW=/^#([0-9a-f]{3,8})$/,qW=new RegExp("^rgb\\(".concat(cc,",").concat(cc,",").concat(cc,"\\)$")),ZW=new RegExp("^rgb\\(".concat(ha,",").concat(ha,",").concat(ha,"\\)$")),KW=new RegExp("^rgba\\(".concat(cc,",").concat(cc,",").concat(cc,",").concat(Cl,"\\)$")),QW=new RegExp("^rgba\\(".concat(ha,",").concat(ha,",").concat(ha,",").concat(Cl,"\\)$")),JW=new RegExp("^hsl\\(".concat(Cl,",").concat(ha,",").concat(ha,"\\)$")),tH=new RegExp("^hsla\\(".concat(Cl,",").concat(ha,",").concat(ha,",").concat(Cl,"\\)$")),UO={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};md(oc,$v,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:qO,formatHex:qO,formatHex8:eH,formatHsl:nH,formatRgb:ZO,toString:ZO});function qO(){return this.rgb().formatHex()}function eH(){return this.rgb().formatHex8()}function nH(){return nw(this).formatHsl()}function ZO(){return this.rgb().formatRgb()}function $v(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=UW.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?KO(e):n===3?new Xr(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?bd(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?bd(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=qW.exec(t))?new Xr(e[1],e[2],e[3],1):(e=ZW.exec(t))?new Xr(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=KW.exec(t))?bd(e[1],e[2],e[3],e[4]):(e=QW.exec(t))?bd(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=JW.exec(t))?ew(e[1],e[2]/100,e[3]/100,1):(e=tH.exec(t))?ew(e[1],e[2]/100,e[3]/100,e[4]):UO.hasOwnProperty(t)?KO(UO[t]):t==="transparent"?new Xr(NaN,NaN,NaN,0):null}function KO(t){return new Xr(t>>16&255,t>>8&255,t&255,1)}function bd(t,e,n,r){return r<=0&&(t=e=n=NaN),new Xr(t,e,n,r)}function QO(t){return t instanceof oc||(t=$v(t)),t?(t=t.rgb(),new Xr(t.r,t.g,t.b,t.opacity)):new Xr}function kl(t,e,n,r){return arguments.length===1?QO(t):new Xr(t,e,n,r==null?1:r)}function Xr(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}md(Xr,kl,Yv(oc,{brighter:function(e){return e=e==null?sc:Math.pow(sc,e),new Xr(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=e==null?as:Math.pow(as,e),new Xr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},clamp:function(){return new Xr(os(this.r),os(this.g),os(this.b),xd(this.opacity))},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:JO,formatHex:JO,formatHex8:rH,formatRgb:tw,toString:tw}));function JO(){return"#".concat(ss(this.r)).concat(ss(this.g)).concat(ss(this.b))}function rH(){return"#".concat(ss(this.r)).concat(ss(this.g)).concat(ss(this.b)).concat(ss((isNaN(this.opacity)?1:this.opacity)*255))}function tw(){var t=xd(this.opacity);return"".concat(t===1?"rgb(":"rgba(").concat(os(this.r),", ").concat(os(this.g),", ").concat(os(this.b)).concat(t===1?")":", ".concat(t,")"))}function xd(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function os(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function ss(t){return t=os(t),(t<16?"0":"")+t.toString(16)}function ew(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Ji(t,e,n,r)}function nw(t){if(t instanceof Ji)return new Ji(t.h,t.s,t.l,t.opacity);if(t instanceof oc||(t=$v(t)),!t)return new Ji;if(t instanceof Ji)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 Ji(o,s,c,t.opacity)}function iH(t,e,n,r){return arguments.length===1?nw(t):new Ji(t,e,n,r==null?1:r)}function Ji(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}md(Ji,iH,Yv(oc,{brighter:function(e){return e=e==null?sc:Math.pow(sc,e),new Ji(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=e==null?as:Math.pow(as,e),new Ji(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+(this.h<0)*360,n=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*n,a=2*r-i;return new Xr(Vv(e>=240?e-240:e+120,a,i),Vv(e,a,i),Vv(e<120?e+240:e-120,a,i),this.opacity)},clamp:function(){return new Ji(rw(this.h),_d(this.s),_d(this.l),xd(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 e=xd(this.opacity);return"".concat(e===1?"hsl(":"hsla(").concat(rw(this.h),", ").concat(_d(this.s)*100,"%, ").concat(_d(this.l)*100,"%").concat(e===1?")":", ".concat(e,")"))}}));function rw(t){return t=(t||0)%360,t<0?t+360:t}function _d(t){return Math.max(0,Math.min(1,t||0))}function Vv(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 iw(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 aH(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 iw((n-r/e)*e,o,i,a,s)}}function oH(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 iw((n-r/e)*e,i,a,o,s)}}var Xv=function(t){return function(){return t}};function aw(t,e){return function(n){return t+n*e}}function sH(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 cH(t,e){var n=e-t;return n?aw(t,n>180||n<-180?n-360*Math.round(n/360):n):Xv(isNaN(t)?e:t)}function lH(t){return(t=+t)==1?lc:function(e,n){return n-e?sH(e,n,t):Xv(isNaN(e)?n:e)}}function lc(t,e){var n=e-t;return n?aw(t,n):Xv(isNaN(t)?e:t)}var Uht=function t(e){var n=lH(e);function r(i,a){var o=n((i=kl(i)).r,(a=kl(a)).r),s=n(i.g,a.g),c=n(i.b,a.b),l=lc(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 ow(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=kl(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 uH=ow(aH),qht=ow(oH),Wn=t=>uH(t[t.length-1]),sw=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(nn),fH=Wn(sw),cw=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(nn),dH=Wn(cw),lw=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(nn),hH=Wn(lw),uw=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(nn),pH=Wn(uw),fw=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(nn),vH=Wn(fw),dw=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(nn),gH=Wn(dw),hw=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(nn),yH=Wn(hw),pw=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(nn),mH=Wn(pw),vw=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(nn),bH=Wn(vw),gw=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(nn),xH=Wn(gw),yw=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(nn),_H=Wn(yw),mw=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(nn),OH=Wn(mw),bw=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(nn),wH=Wn(bw),xw=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(nn),SH=Wn(xw),_w=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(nn),MH=Wn(_w),Ow=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(nn),EH=Wn(Ow),ww=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(nn),AH=Wn(ww),Sw=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(nn),TH=Wn(Sw),Mw=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(nn),PH=Wn(Mw),Ew=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(nn),CH=Wn(Ew),Aw=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(nn),kH=Wn(Aw),Tw=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(nn),RH=Wn(Tw),Pw=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(nn),LH=Wn(Pw),Cw=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(nn),NH=Wn(Cw),kw=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(nn),IH=Wn(kw),Rw=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(nn),jH=Wn(Rw),Lw=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(nn),DH=Wn(Lw);function BH(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 FH=Math.PI/180,zH=180/Math.PI,Nw=-.14861,Uv=1.78277,qv=-.29227,Od=-.90649,Rl=1.97294,Iw=Rl*Od,jw=Rl*Uv,Dw=Uv*qv-Od*Nw;function GH(t){if(t instanceof cs)return new cs(t.h,t.s,t.l,t.opacity);t instanceof Xr||(t=QO(t));var e=t.r/255,n=t.g/255,r=t.b/255,i=(Dw*r+Iw*e-jw*n)/(Dw+Iw-jw),a=r-i,o=(Rl*(n-i)-qv*a)/Od,s=Math.sqrt(o*o+a*a)/(Rl*i*(1-i)),c=s?Math.atan2(o,a)*zH-120:NaN;return new cs(c<0?c+360:c,s,i,t.opacity)}function pa(t,e,n,r){return arguments.length===1?GH(t):new cs(t,e,n,r==null?1:r)}function cs(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}md(cs,pa,Yv(oc,{brighter:function(e){return e=e==null?sc:Math.pow(sc,e),new cs(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=e==null?as:Math.pow(as,e),new cs(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=isNaN(this.h)?0:(this.h+120)*FH,n=+this.l,r=isNaN(this.s)?0:this.s*n*(1-n),i=Math.cos(e),a=Math.sin(e);return new Xr(255*(n+r*(Nw*i+Uv*a)),255*(n+r*(qv*i+Od*a)),255*(n+r*(Rl*i)),this.opacity)}}));function Bw(t){return function e(n){n=+n;function r(i,a){var o=t((i=pa(i)).h,(a=pa(a)).h),s=lc(i.s,a.s),c=lc(i.l,a.l),l=lc(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 Zht=Bw(cH),Zv=Bw(lc),WH=Zv(pa(300,.5,0),pa(-240,.5,1)),HH=Zv(pa(-100,.75,.35),pa(80,1.5,.8)),YH=Zv(pa(260,.75,.35),pa(80,1.5,.8)),wd=pa();function $H(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return wd.h=360*t-100,wd.s=1.5-1.5*e,wd.l=.8-.9*e,wd+""}var Sd=kl(),VH=Math.PI/3,XH=Math.PI*2/3;function UH(t){var e;return t=(.5-t)*Math.PI,Sd.r=255*(e=Math.sin(t))*e,Sd.g=255*(e=Math.sin(t+VH))*e,Sd.b=255*(e=Math.sin(t+XH))*e,Sd+""}function qH(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 Md(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}var ZH=Md(nn("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),KH=Md(nn("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),QH=Md(nn("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),JH=Md(nn("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function tY(t,e,n,r,i,a){const{guide:o={}}=n,s=lY(t,e,n);if(typeof s!="string")return n;const c=uY(s,t,e,n),l=oY(s,c,n);return Object.assign(Object.assign(Object.assign({},n),dY(s,t,e,n,r)),{domain:l,range:fY(s,t,e,n,l,i,a),expectedDomain:c,guide:o,name:t,type:s})}function eY(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 nY(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=aY(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:W2(s,i)});a.push(h)}}}return a}function rY(t){if(!t||!Array.isArray(t))return[qo,qo];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 Fw(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=Mn(a)+1,s=`${i}${o}`;t[s]=r,r.getOptions().key=s}}return t}function zw(t,e){const[n]=Xn("scale",e),{relations:r}=t,[i]=rY(r),a=n(t);return i(a)}function iY(t){const e=t.flatMap(n=>Array.from(n.values())).flatMap(n=>n.channels.map(r=>r.scale));Gw(e,"x"),Gw(e,"y")}function aY(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 Gw(t,e){const n=t.filter(({name:a,facet:o=!0})=>o&&a===e),r=n.flatMap(a=>a.domain),i=n.every(Ww)?Ia(r):n.every(Hw)?Array.from(new Set(r)):null;if(i!==null)for(const a of n)a.domain=i}function oY(t,e,n){const{ratio:r}=n;return r==null?e:Ww({type:t})?sY(e,r,t):Hw({type:t})?cY(e,r):e}function sY(t,e,n){const r=t.map(Number),i=new Vr({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 cY(t,e){const n=Math.round(t.length*e);return t.slice(0,n)}function Ww(t){const{type:e}=t;return typeof e!="string"?!1:["linear","log","pow","time"].includes(e)}function Hw(t){const{type:e}=t;return typeof e!="string"?!1:["band","point","ordinal"].includes(e)}function lY(t,e,n){const{type:r,domain:i,range:a,quantitative:o,ordinal:s}=n;return r!==void 0?r:wY(e)?"identity":typeof a=="string"?"linear":(i||a||[]).length>2?Kv(t,s):i!==void 0?Uw([i])?Kv(t,s):qw(e)?"time":$w(t,a,o):Uw(e)?Kv(t,s):qw(e)?"time":$w(t,a,o)}function uY(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 Vw(bY(n,r),r);case"band":case"ordinal":case"point":return Xw(n);case"quantile":return xY(n);case"sequential":return Vw(_Y(n),r);default:return[]}}function fY(t,e,n,r,i,a,o){const{range:s}=r;if(typeof s=="string")return hY(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=Yw(n,r,i,a,o),[f,d]=OY(e,u);return[c||f,l||d]}case"band":case"point":return[c||(e==="size"?5:0),l||(e==="size"?10:1)];case"ordinal":return Yw(n,r,i,a,o);case"sequential":return;case"constant":return[n[0][0]];default:return[]}}function dY(t,e,n,r,i){switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":return gY(i,r);case"band":case"point":return yY(t,e,i,r);case"sequential":return vY(r);default:return r}}function Yw(t,e,n,r,i){const[a]=Xn("palette",i),{category10:o,category20:s}=r,c=nB(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=pY(l,n,u);if(d)return d;throw new Error(`Unknown Component: ${l} `)}}function hY(t){return t.split("-")}function pY(t,e,n=r=>r){if(!t)return null;const r=ao(t),i=Nt[`scheme${r}`],a=Nt[`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 vY(t){const{palette:e="ylGnBu",offset:n}=t,r=ao(e),i=Nt[`interpolate${r}`];if(!i)throw new Error(`Unknown palette: ${r}`);return{interpolator:n?a=>i(n(a)):i}}function gY(t,e){const{interpolate:n=_l,nice:r=!1,tickCount:i=5}=e;return Object.assign(Object.assign({},e),{interpolate:n,nice:r,tickCount:i})}function yY(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=mY(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 mY(t,e,n){return e==="enterDelay"||e==="enterDuration"||e==="size"?0:t==="band"?XO(n)?0:.1:t==="point"?.5:0}function Kv(t,e){return e||(SY(t)?"point":"ordinal")}function $w(t,e,n){return n||(t!=="color"||e?"linear":"sequential")}function Vw(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 bY(t,e){const{zero:n=!1}=e;let r=1/0,i=-1/0;for(const a of t)for(const o of a)In(o)&&(r=Math.min(r,+o),i=Math.max(i,+o));return r===1/0?[]:n?[Math.min(0,r),i]:[r,i]}function Xw(t){return Array.from(new Set(t.flat()))}function xY(t){return Xw(t).sort()}function _Y(t){let e=1/0,n=-1/0;for(const r of t)for(const i of r)In(i)&&(e=Math.min(e,+i),n=Math.max(n,+i));return e===1/0?[]:[e<0?-n:e,n]}function OY(t,e){return t==="enterDelay"?[0,1e3]:t=="enterDuration"?[300,1e3]:t.startsWith("y")||t.startsWith("position")?[1,0]:t==="color"?[eB(e),C_(e)]:t==="opacity"?[0,1]:t==="size"?[1,10]:[0,1]}function Uw(t){return Qv(t,e=>{const n=typeof e;return n==="string"||n==="boolean"})}function qw(t){return Qv(t,e=>e instanceof Date)}function wY(t){return Qv(t,cl)}function Qv(t,e){for(const n of t)if(n.some(e))return!0;return!1}function SY(t){return t.startsWith("x")||t.startsWith("y")||t.startsWith("position")||t.startsWith("size")}function MY(t){return t.startsWith("x")||t.startsWith("y")||t.startsWith("position")||t==="enterDelay"||t==="enterDuration"||t==="updateDelay"||t==="updateDuration"||t==="exitDelay"||t==="exitDuration"}function EY(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 AY={linear:"linear",identity:"identity",log:"log",pow:"pow",sqrt:"sqrt",sequential:"sequential"},TY={threshold:"threshold",quantize:"quantize",quantile:"quantile"},PY={ordinal:"ordinal",band:"band",point:"point"},CY={constant:"constant"};var po=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 kY(t,e,n){const{coordinates:r=[],title:i}=e,[,a]=Xn("component",n),o=t.filter(({guide:u})=>u!==null),s=[],c=GY(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 jY(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:_=[0,0]}=d,O=Dt({},...f),{guide:w,field:M}=O,E=Array.isArray(w)?w:[w];for(const A of E){const[P,C]=FY(u,h,v,A,f,o,r);if(!P&&!C)continue;const j=P==="left"||P==="right",N=j?b[1]:b[0],k=j?_[1]:_[0],{size:R,order:D=y,length:B=m,padding:F=N,crossPadding:z=k}=A;s.push(Object.assign(Object.assign({title:M},A),{defaultSize:g,length:B,position:P,plane:p,orientation:C,padding:F,order:D,crossPadding:z,size:R,type:u,scales:f}))}}),s}function Zw(t,e,n,r,i){const[a]=Xn("component",r),{scaleInstances:o,scale:s,bbox:c}=t,l=po(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 RY(t){return t.map(e=>{const n=Dt(e,e.style);return delete n.style,n})}function Kht(t){return t.flatMap(e=>e.type=="group"?e.children:e)}function Kw(t,e){const n=["left","right","bottom","top"];return Gf(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=Di(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=Mn(a,u=>u.size),s=Mn(a,u=>u.order),c=Mn(a,u=>u.crossPadding),l=a[0].position;return{type:"group",size:o,order:s,position:l,children:a,crossPadding:c}})}function LY(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=Gf(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=rB(d).sort((v,g)=>g.length-v.length).map(v=>({combination:v,option:v.map(g=>[g.name,NY(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 aB)for(const{option:y,combination:m}of p)if(g.some(b=>L_(u(b),u(y))))return[v,m];return null}).filter(In)}function NY(t){const{type:e}=t;return typeof e!="string"?null:e in AY?"continuous":e in PY?"discrete":e in TY?"distribution":e in CY?"constant":null}function IY(t,e){return t.map(n=>{const{name:r}=n;if(RW(e)||XO(e)||ac(e)&&(is(e)||Pl(e)))return null;if(r.startsWith("x"))return is(e)?["axisArc",[n]]:Pl(e)?["axisLinear",[n]]:[ac(e)?"axisY":"axisX",[n]];if(r.startsWith("y"))return is(e)?["axisLinear",[n]]:Pl(e)?["axisArc",[n]]:[ac(e)?"axisX":"axisY",[n]];if(r.startsWith("z"))return["axisZ",[n]];if(r.startsWith("position")){if(IW(e))return["axisRadar",[n]];if(!is(e))return["axisY",[n]]}return null}).filter(In)}function jY(t,e){const n=t.filter(r=>EY(r));return[...LY(n,e),...IY(n,e)]}function Jv(t){const e=Qi(t,"polar");if(e.length){const r=e[e.length-1],{startAngle:i,endAngle:a}=N_(r);return[i,a]}const n=Qi(t,"radial");if(n.length){const r=n[n.length-1],{startAngle:i,endAngle:a}=I_(r);return[i,a]}return[-Math.PI/2,Math.PI/2*3]}function DY(t){const e=/position(\d*)/g.exec(t);return e?+e[1]:null}function BY(t,e,n,r,i){const{name:a}=n[0];if(t==="axisRadar"){const o=r.filter(f=>f.name.startsWith("position")),s=DY(a);if(a===o.slice(-1)[0].name||s===null)return[null,null];const[c,l]=Jv(i);return["center",(l-c)/(o.length-1)*s+c]}if(t==="axisY"&&LW(i))return ac(i)?["center","horizontal"]:["center","vertical"];if(t==="axisLinear"){const[o]=Jv(i);return["center",o]}return t==="axisArc"?e[0]==="inner"?["inner",null]:["outer",null]:is(i)?["center",null]:Pl(i)?["center",null]:t==="axisX"&&NW(i)||t==="axisX"&&jW(i)?["top",null]:e}function FY(t,e,n,r,i,a,o){const[s]=Jv(o),c=[r.position||e,s!=null?s:n];return typeof t=="string"&&t.startsWith("axis")?BY(t,c,i,a,o):typeof t=="string"&&t.startsWith("legend")&&is(o)&&r.position==="center"?["center","vertical"]:c}function zY(t,e,n=[]){return t==="x"?ac(n)?`${e}Y`:`${e}X`:t==="y"?ac(n)?`${e}X`:`${e}Y`:null}function GY(t,e,n){const[,r]=Xn("component",n),{coordinates:i}=t;function a(o,s,c,l){const u=zY(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 Qw(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")?VY:c.startsWith("group")?WY:c.startsWith("legendContinuous")?XY:c==="legendCategory"?UY:c.startsWith("slider")?$Y:c==="title"?YY:c.startsWith("scrollbar")?HY:()=>{})()(t,e,n,r,i,a)}function WY(t,e,n,r,i,a){const{children:o}=t,s=Mn(o,l=>l.crossPadding);o.forEach(l=>l.crossPadding=s),o.forEach(l=>Qw(l,e,n,r,i,a));const c=Mn(o,l=>l.size);t.size=c,o.forEach(l=>l.size=c)}function HY(t,e,n,r,i,a){const{trackSize:o=6}=Dt({},i.scrollbar,t);t.size=o}function YY(t,e,n,r,i,a){const o=Dt({},i.title,t),{title:s,subtitle:c,spacing:l=0}=o,u=po(o,["title","subtitle","spacing"]);if(s){const f=fe(u,"title"),d=Pd(s,f);t.size=d.height}if(c){const f=fe(u,"subtitle"),d=Pd(c,f);t.size+=l+d.height}}function $Y(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 VY(t,e,n,r,i,a){t.transform=t.transform||[{type:"hide"}];const o=r==="left"||r==="right",s=Jw(t,r,i),{tickLength:c=0,labelSpacing:l=0,titleSpacing:u=0,labelAutoRotate:f}=s,d=po(s,["tickLength","labelSpacing","titleSpacing","labelAutoRotate"]),h=Ed(t,a),p=Ad(d,h),v=c+l;if(p&&p.length){const y=Mn(p,b=>b.width),m=Mn(p,b=>b.height);if(o)t.size=y+v;else{const{tickFilter:b,labelTransform:_}=t;KY(h,p,e,n,b)&&!_&&f!==!1&&f!==null?(t.labelTransform="rotate(90)",t.size=y+v):t.size=m+v}}else t.size=c;const g=Td(d);g&&(o?t.size+=u+g.width:t.size+=u+g.height)}function XY(t,e,n,r,i,a){const s=(()=>{const{legendContinuous:_}=i;return Dt({},_,t)})(),{labelSpacing:c=0,titleSpacing:l=0}=s,u=po(s,["labelSpacing","titleSpacing"]),f=r==="left"||r==="right",d=fe(u,"ribbon"),{size:h}=d,p=fe(u,"handleIcon"),{size:v}=p,g=Math.max(h,v*2.4);t.size=g;const y=Ed(t,a),m=Ad(u,y);if(m){const _=f?"width":"height",O=Mn(m,w=>w[_]);t.size+=O+c}const b=Td(u);b&&(f?t.size=Math.max(t.size,b.width):t.size+=l+b.height)}function UY(t,e,n,r,i,a){const s=(()=>{const{legendCategory:k}=i,{title:R}=t,[D,B]=Array.isArray(R)?[R,void 0]:[void 0,R];return Dt({title:D},k,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=po(s,["itemSpacing","itemMarkerSize","titleSpacing","rowPadding","colPadding","maxCols","maxRows"]),{cols:g,length:y}=t,m=k=>Math.min(k,p),b=k=>Math.min(k,h),_=r==="left"||r==="right",O=y===void 0?e+(_?0:n[0]+n[1]):y,w=Td(v),M=Ed(t,a),E=Ad(v,M,"itemLabel"),A=Math.max(E[0].height,l)+f,P=(k,R=0)=>l+k+c[0]+R;_?(()=>{let k=-1/0,R=0,D=1,B=0,F=-1/0,z=-1/0;const Y=w?w.height:0,q=O-Y;for(const{width:rt}of E){const st=P(rt);k=Math.max(k,st),R+A>q?(D++,F=Math.max(F,B),z=Math.max(z,R),B=1,R=A):(R+=A,B++)}D<=1&&(F=B,z=R),t.size=k*b(D),t.length=z+Y,Dt(t,{cols:b(D),gridRow:F})})():typeof g=="number"?(()=>{const k=Math.ceil(E.length/g),R=Mn(E,D=>P(D.width))*g;t.size=A*m(k)-f,t.length=Math.min(R,O)})():(()=>{let k=1,R=0,D=-1/0;for(const{width:B}of E){const F=P(B,d);R+F>O?(D=Math.max(D,R),R=F,k++):R+=F}k===1&&(D=R),t.size=A*m(k)-f,t.length=D})(),w&&(_?t.size=Math.max(t.size,w.width):t.size+=u+w.height)}function Ed(t,e){const[n]=Xn("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 Ad(t,e,n="label"){const{labelFormatter:r,tickFilter:i,label:a=!0}=t,o=po(t,["labelFormatter","tickFilter","label"]);if(!a)return null;const s=qY(e,r,i),c=fe(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 Pd(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 Td(t){const e=l=>l===!1||l===null,{title:n}=t,r=po(t,["title"]);if(e(n)||n===void 0)return null;const i=fe(r,"title"),{direction:a,transform:o}=i,s=Array.isArray(n)?n.join(","):n;return typeof s!="string"?null:Pd(s,Object.assign(Object.assign({},i),{transform:o||(a==="vertical"?"rotate(-90)":"")}))}function Jw(t,e,n){const{title:r}=t,[i,a]=Array.isArray(r)?[r,void 0]:[void 0,r],{axis:o,[`axis${J0(e)}`]:s}=n;return Dt({title:i},o,s,Object.assign(Object.assign({},t),{title:a}))}function tS(t,e){const n=t.getTicks?t.getTicks():t.getOptions().domain;return e?n.filter(e):n}function qY(t,e,n){const i=tS(t,n).map(o=>typeof o=="number"?$f(o):o),a=e?typeof e=="string"?oo(e):e:t.getFormatter?t.getFormatter():o=>`${o}`;return i.map(a)}function ZY(t,e){return t.getBandWidth?t.getBandWidth(e)/2:0}function KY(t,e,n,r,i){if(Di(e,h=>h.width)>n)return!0;const o=t.clone();o.update({range:[0,n]});const s=tS(t,i),c=s.map(h=>o.map(h)+ZY(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 Pd(t,e){const n=QY(t),{filter:r}=e,i=po(e,["filter"]);return n.attr(Object.assign(Object.assign({},i),{visibility:"none"})),n.getBBox()}function QY(t){return t instanceof $r?t:new Zi({style:{text:`${t}`}})}function Ei(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 fr(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function JY(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 t$(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:_=y,marginRight:O=y,padding:w=n.padding,paddingBottom:M=w,paddingLeft:E=w,paddingRight:A=w,paddingTop:P=w}=n$(t,e,n,r),C=1/4,j=(ue,we,Ue,ze,Je)=>{const{marks:hn}=e;if(hn.length===0)return[ze,Je];if(ue-ze-Je-ue*C>0)return[ze,Je];const mr=ue*(1-C);return[we==="auto"?mr*ze/(ze+Je):ze,Ue==="auto"?mr*Je/(ze+Je):Je]},N=ue=>ue==="auto"?20:ue!=null?ue:20,k=N(P),R=N(M),D=eS(t,s-k-R,[k+_,R+b],["left","right"],e,n,r),{paddingLeft:B,paddingRight:F}=D,z=o-m-O,[Y,q]=j(z,E,A,B,F),rt=z-Y-q,st=eS(t,rt,[Y+m,q+O],["bottom","top"],e,n,r),{paddingTop:At,paddingBottom:Yt}=st,qt=s-b-_,[Rt,Lt]=j(qt,M,P,Yt,At),le=qt-Rt-Lt;return{width:o,height:s,depth:c,insetLeft:h,insetTop:p,insetBottom:v,insetRight:g,innerWidth:rt,innerHeight:le,paddingLeft:Y,paddingRight:q,paddingTop:Lt,paddingBottom:Rt,marginLeft:m,marginBottom:b,marginTop:_,marginRight:O,x:l,y:u,z:f}}function e$(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=O=>O==="auto"?20:O,b=n-m(i)-m(a)-l-u-p-v,_=e-m(o)-m(s)-f-d-g-y;return{width:b,height:_}}function n$(t,e,n,r){const{coordinates:i}=e;if(!is(i)&&!Pl(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 Jw(y,m,n)}),s=Mn(o,y=>{var m;return(m=y.labelSpacing)!==null&&m!==void 0?m:0}),c=a.flatMap((y,m)=>{const b=o[m],_=Ed(y,r);return Ad(b,_)}).filter(In),l=Mn(c,y=>y.height)+s,u=a.flatMap((y,m)=>{const b=o[m];return Td(b)}).filter(y=>y!==null),f=u.length===0?0:Mn(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 eS(t,e,n,r,i,a,o){const s=Kn(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${J0(EO(p))}`,g=s.get(p)||[],y=h[v],m=A=>{A.size===void 0&&(A.size=A.defaultSize)},b=A=>{A.type==="group"?(A.children.forEach(m),A.size=Mn(A.children,P=>P.size)):A.size=A.defaultSize},_=A=>{A.size||(y!=="auto"?b(A):(Qw(A,e,n,p,a,o),m(A)))},O=A=>{A.type.startsWith("axis")&&A.labelAutoHide===void 0&&(A.labelAutoHide=!0)},w=p==="bottom"||p==="top",M=Ei(g,A=>A.order),E=g.filter(A=>A.type.startsWith("axis")&&A.order==M);if(E.length&&(E[0].crossPadding=0),typeof y=="number")g.forEach(m),g.forEach(O);else if(g.length===0)h[v]=0;else{const A=w?e+n[0]+n[1]:e,P=Kw(g,A);P.forEach(_);const C=P.reduce((j,{size:N,crossPadding:k=12})=>j+N+k,0);h[v]=C}}return h}function r$(t,e,n){const r=Kn(t,w=>`${w.plane||"xy"}-${w.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:_}=n,O={xy:tg({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:tg({width:_,height:m,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,marginLeft:0,marginTop:0,marginBottom:0,marginRight:0,innerWidth:_,innerHeight:m,insetBottom:0,insetLeft:0,insetRight:0,insetTop:0}),xz:tg({width:b,height:_,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,marginLeft:0,marginTop:0,marginBottom:0,marginRight:0,innerWidth:b,innerHeight:_,insetBottom:0,insetLeft:0,insetRight:0,insetTop:0})};for(const[w,M]of r.entries()){const[E,A]=w.split("-"),P=O[E][A],[C,j]=k_(M,N=>typeof N.type!="string"?!1:!!(A==="center"||N.type.startsWith("axis")&&["inner","outer"].includes(A)));C.length&&i$(C,e,P,A),j.length&&h$(M,e,P)}}function tg({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,_=t-o-l,O=[g+h,y+v,f-h-p,u-v-d,"center",null,null];return{top:[g,0,f,y,"vertical",!0,fr,o,_],right:[t-m,y,m,u,"horizontal",!1,fr],bottom:[g,e-b,f,b,"vertical",!1,fr,o,_],left:[0,y,g,u,"horizontal",!0,fr],"top-left":[g,0,f,y,"vertical",!0,fr],"top-right":[g,0,f,y,"vertical",!0,fr],"bottom-left":[g,e-b,f,b,"vertical",!1,fr],"bottom-right":[g,e-b,f,b,"vertical",!1,fr],center:O,inner:O,outer:O}}function i$(t,e,n,r){const[i,a]=k_(t,o=>!!(typeof o.type=="string"&&o.type.startsWith("axis")));a$(i,e,n,r),p$(a,e,n)}function a$(t,e,n,r){r==="center"?oB(e)?d$(t,e,n,r):Gn(e)?c$(t,e,n):dl(e)&&l$(t,e,n,t[0].orientation):r==="inner"?o$(t,e,n):r==="outer"&&s$(t,e,n)}function o$(t,e,n){const[r,i,,a]=n,[o,s]=e.getCenter(),[c]=Vf(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 s$(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 c$(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 l$(t,e,n,r){r==="horizontal"?f$(t,e,n):r==="vertical"&&u$(t,e,n)}function u$(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 f$(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 d$(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 h$(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((A,P)=>l==null?void 0:l(A.order,P.order));const _=A=>A==="title"||A==="group"||A.startsWith("legend"),O=(A,P,C)=>C===void 0?P:_(A)?C:P,w=(A,P,C)=>C===void 0?P:_(A)?C:P,M=c?h+y:h;for(let A=0,P=M;A<t.length;A++){const C=t[A],{crossPadding:j=0,type:N}=C,{size:k}=C;C.bbox={[d]:c?P-k-j:P+j,[p]:w(N,v,u),[g]:k,[m]:O(N,b,f)},P+=(k+j)*(c?-1:1)}const E=t.filter(A=>A.type==="group");for(const A of E){const{bbox:P,children:C}=A,j=P[m],N=j/C.length,k=C.reduce((z,Y)=>{var q;const rt=(q=Y.layout)===null||q===void 0?void 0:q.justifyContent;return rt||z},"flex-start"),R=C.map((z,Y)=>{const{length:q=N,padding:rt=0}=z;return q+(Y===C.length-1?0:rt)}),D=Di(R),B=j-D,F=k==="flex-start"?0:k==="center"?B/2:B;for(let z=0,Y=P[p]+F;z<C.length;z++){const q=C[z],{padding:rt=0}=q,st=z===C.length-1?0:rt;q.bbox={[g]:P[g],[d]:P[d],[p]:Y,[m]:R[z]-st},Dt(q,{layout:{justifyContent:k}}),Y+=R[z]}}}function p$(t,e,n){if(t.length===0)return;const[r,i,a,o]=n,[s]=Vf(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 va(t,e,n={},r=!1){if(ka(t)||Array.isArray(t)&&r)return t;const i=fe(t,e);return Dt(n,i)}function eg(t,e={}){return ka(t)||Array.isArray(t)||!nS(t)?t:Dt(e,t)}function nS(t){if(Object.keys(t).length===0)return!0;const{title:e,items:n}=t;return e!==void 0||n!==void 0}function ga(t,e){return typeof t=="object"?fe(t,e):t}var v$=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())})},uc=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 g$(t,e,n){const{encode:r={},scale:i={},transform:a=[]}=e,o=uc(e,["encode","scale","transform"]);return[t,Object.assign(Object.assign({},o),{encode:r,scale:i,transform:a})]}function rS(t,e,n){return v$(this,void 0,void 0,function*(){const{library:r}=n,{data:i}=e,[a]=Xn("data",r),o=P$(i),{transform:s=[]}=o,u=[uc(o,["transform"]),...s].map(a),f=yield z7(u)(i),d=i&&!Array.isArray(i)&&!Array.isArray(f)?{value:f}:f;return[Array.isArray(f)?Zo(f):[],Object.assign(Object.assign({},e),{data:d})]})}function y$(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 m$(t,e,n){const{encode:r,data:i}=e;if(!r)return[t,e];const a=so(r,o=>E$(o)?o:{type:A$(i,o),value:o});return[t,Object.assign(Object.assign({},e),{encode:a})]}function b$(t,e,n){const{encode:r}=e;if(!r)return[t,e];const i=so(r,(a,o)=>{const{type:s}=a;return s!=="constant"||MY(o)?a:Object.assign(Object.assign({},a),{constant:!0})});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{library:a}=n,o=R$(a),s=so(r,c=>o(i,c));return[t,Object.assign(Object.assign({},e),{encode:s})]}function _$(t,e,n){const{tooltip:r={}}=e;return ka(r)?[t,e]:Array.isArray(r)?[t,Object.assign(Object.assign({},e),{tooltip:{items:r}})]:cl(r)&&nS(r)?[t,Object.assign(Object.assign({},e),{tooltip:r})]:[t,Object.assign(Object.assign({},e),{tooltip:{items:[r]}})]}function O$(t,e,n){const{data:r,encode:i,tooltip:a={}}=e;if(ka(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(cl(f)){const{field:d,channel:h,color:p,name:v=d,valueFormatter:g=w=>w}=f,y=typeof g=="string"?oo(g):g,m=h&&i[h],b=m&&i[h].field,_=v||b||h,O=[];for(const w of t){const M=d?r[w][d]:m?i[h].value[w]:null;O[w]={name:_,color:p,value:y(M)}}return O}if(typeof f=="function"){const d=[];for(const h of t){const p=f(r[h],h,r,i);cl(p)?d[h]=p:d[h]={value:p}}return d}return f},{title:s,items:c=[]}=a,l=uc(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 w$(t,e,n){const{encode:r}=e,i=uc(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=uc(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 S$(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 M$(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 E$(t){if(typeof t!="object"||t instanceof Date||t===null)return!1;const{type:e}=t;return In(e)}function A$(t,e){return typeof e=="function"?"transform":typeof e=="string"&&T$(t,e)?"field":"constant"}function T$(t,e){return Array.isArray(t)?t.some(n=>n[e]!==void 0):!1}function P$(t){if((0,xr.Z)(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=uc(t,["type"]);return Object.assign(Object.assign({},n),{type:e})}var iS=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())})},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){return iS(this,void 0,void 0,function*(){const r={library:n},[i,a]=yield L$(t,e,r),{encode:o,scale:s,data:c,tooltip:l}=a;if(Array.isArray(c)===!1)return null;const{channels:u}=e,f=K0(Object.entries(o).filter(([,h])=>In(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(([O])=>O.startsWith(p)).map(([O,w],M)=>{const E=w.some(B=>B.visual),A=w.some(B=>B.constant),P=s[O]||{},{independent:C=!1,key:j=g||O,type:N=A?"constant":E?"identity":v}=P,k=C$(P,["independent","key","type"]),R=N==="constant",D=R?void 0:y;return{name:O,values:w,scaleKey:C||R?Symbol("independent"):j,scale:Object.assign(Object.assign({type:N,range:D},k),{quantitative:m,ordinal:b})}})});return[a,Object.assign(Object.assign({},e),{index:i,channels:d,tooltip:l})]})}function R$(t){const[e]=Xn("encode",t);return(n,r)=>r===void 0||n===void 0?null:Object.assign(Object.assign({},r),{type:"column",value:e(r)(n),field:N$(r)})}function L$(t,e,n){return iS(this,void 0,void 0,function*(){const{library:r}=n,[i]=Xn("transform",r),{preInference:a=[],postInference:o=[]}=e,{transform:s=[]}=t,c=[g$,rS,y$,m$,b$,x$,w$,M$,S$,_$,...a.map(i),...s.map(i),...o.map(i),O$];let l=[],u=t;for(const f of c)[l,u]=yield f(l,u,n);return[l,u]})}function N$(t){const{type:e,value:n}=t;return e==="field"&&typeof n=="string"?n:null}var Da=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())})},vo=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 ng(t,e,n,r){var i,a;return Da(this,void 0,void 0,function*(){const[o]=Xn("composition",n),[s]=Xn("interaction",n),c=new Set(Object.keys(n).map(k=>{var R;return(R=/mark\.(.*)/.exec(k))===null||R===void 0?void 0:R[1]}).filter(In)),l=new Set(Object.keys(n).map(k=>{var R;return(R=/component\.(.*)/.exec(k))===null||R===void 0?void 0:R[1]}).filter(In)),u=k=>{const{type:R}=k;if(typeof R=="function"){const{props:D={}}=R,{composite:B=!0}=D;if(B)return"mark"}return typeof R!="string"?R:c.has(R)||l.has(R)?"mark":R},f=k=>u(k)==="mark",d=k=>u(k)==="standardView",h=k=>{const{type:R}=k;return typeof R!="string"?!1:!!l.has(R)},p=k=>{if(d(k))return[k];const R=u(k);return o({type:R,static:h(k)})(k)},v=[],g=new Map,y=new Map,m=[t],b=[];for(;m.length;){const k=m.shift();if(d(k)){const R=y.get(k),[D,B]=R?cS(R,k,n):yield oS(k,n);g.set(D,k),v.push(D);const F=B.flatMap(p).map(z=>VO(z,n));if(m.push(...F),F.every(d)){const z=yield Promise.all(F.map(Y=>sS(Y,n)));iY(z);for(let Y=0;Y<F.length;Y++){const q=F[Y],rt=z[Y];y.set(q,rt)}}}else{const R=f(k)?k:yield dS(k,n),D=p(R);Array.isArray(D)?m.push(...D):typeof D=="function"&&b.push(D())}}r.emitter.emit(Sn.BEFORE_PAINT);const _=new Map,O=new Map,w=[];e.selectAll(ya($0)).data(v,k=>k.key).join(k=>k.append("g").attr("className",$0).attr("id",R=>R.key).call(aS).each(function(R,D,B){ig(R,je(B),w,n,r),_.set(R,B)}),k=>k.call(aS).each(function(R,D,B){ig(R,je(B),w,n,r),O.set(R,B)}),k=>k.each(function(R,D,B){const F=B.nameInteraction.values();for(const z of F)z.destroy()}).remove());const M=k=>Array.from(k.entries()).map(([R,D])=>{const B=new Map,F=(q,rt=st=>st)=>B.set(q,rt),z=g.get(R),Y=j$(je(D),z,n,r);return{view:R,container:D,options:z,setState:F,update:q=>Da(this,void 0,void 0,function*(){const st=Q0(Array.from(B.values()))(z);return yield Y(st,q)})}}),E=M(_);for(const k of E){const{options:R}=k,D=new Map;k.container.nameInteraction=D;for(const B of Cd(R)){const[F,z]=B;if(z){const q=rg(k.view,F,z,s)(k,E,r.emitter);D.set(F,{destroy:q})}}}const A=M(O);for(const k of A){const{options:R,container:D}=k,B=D.nameInteraction;for(const F of Cd(R)){const[z,Y]=F,q=B.get(z);if(q&&((i=q.destroy)===null||i===void 0||i.call(q)),Y){const st=rg(k.view,z,Y,s)(k,A,r.emitter);B.set(z,{destroy:st})}}}const{width:P,height:C}=t,j=[];for(const k of b){const R=new Promise(D=>Da(this,void 0,void 0,function*(){for(const B of k){const F=Object.assign({width:P,height:C},B);yield ng(F,e,n,r)}D()}));j.push(R)}r.views=v,(a=r.animations)===null||a===void 0||a.forEach(k=>k==null?void 0:k.cancel()),r.animations=w,r.emitter.emit(Sn.AFTER_PAINT);const N=w.filter(In).map(K$).map(k=>k.finished);return Promise.all([...N,...j])})}function aS(t){t.style("transform",e=>`translate(${e.layout.x}, ${e.layout.y})`)}function I$(t){const[,e]=Xn("interaction",t);return n=>{const[r,i]=n;try{return[r,e(r)]}catch(a){return[r,i.type]}}}function j$(t,e,n,r){const i=I$(n),a=c=>c[1]&&c[1].props&&c[1].props.reapplyWhenUpdate,s=Cd(e).map(i).filter(a).map(c=>c[0]);return(c,l)=>Da(this,void 0,void 0,function*(){const u=[],[f,d]=yield oS(c,n);ig(f,t,u,n,r);for(const h of s.filter(p=>p!==l))D$(h,t,c,f,n,r);for(const h of d)ng(h,t,n,r);return{options:c,view:f}})}function D$(t,e,n,r,i,a){var o;const[s]=Xn("interaction",i),l=e.node().nameInteraction,u=Cd(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=rg(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 oS(t,e){return Da(this,void 0,void 0,function*(){const n=yield F$(t,e),r=B$(n);t.interaction=r.interaction,t.coordinate=r.coordinate,t.marks=[...r.marks,...r.components];const i=VO(r,e),a=yield sS(i,e);return cS(a,i,e)})}function B$(t){const{coordinate:e={},interaction:n={},style:r={},marks:i}=t,a=vo(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 F$(t,e){return Da(this,void 0,void 0,function*(){const[n,r]=Xn("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(In)),{marks:a}=t,o=[],s=[],c=[...a],{width:l,height:u}=e$(t),f={options:t,width:l,height:u};for(;c.length;){const[d]=c.splice(0,1),h=yield dS(d,e),{type:p=$s("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)}),_=yield n(b,f),O=Array.isArray(_)?_:[_];c.unshift(...O.map((w,M)=>Object.assign(Object.assign({},w),{key:`${v}-${M}`})))}}}return Object.assign(Object.assign({},t),{marks:o,components:s})})}function sS(t,e){return Da(this,void 0,void 0,function*(){const[n]=Xn("theme",e),[,r]=Xn("mark",e),{theme:i,marks:a,coordinates:o=[]}=t,s=n(fS(i)),c=new Map;for(const u of a){const{type:f}=u,{props:d={}}=r(f),h=yield k$(u,d,e);if(h){const[p,v]=h;c.set(p,v)}}const l=Kn(Array.from(c.values()).flatMap(u=>u.channels),({scaleKey:u})=>u);for(const u of l.values()){const f=u.reduce((b,{scale:_})=>Dt(b,_),{}),{scaleKey:d}=u[0],{values:h}=u[0],p=Array.from(new Set(h.map(b=>b.field).filter(In))),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(_=>_.value)),m=Object.assign(Object.assign({},tY(g,y,v,o,s,e)),{key:d});u.forEach(b=>b.scale=m)}return c})}function rg(t,e,n,r){const i=t.theme,a=typeof e=="string"?i[e]||{}:{};return r(Dt(a,Object.assign({type:e},n)))}function cS(t,e,n){const[r]=Xn("mark",n),[i]=Xn("theme",n),[a]=Xn("labelTransform",n),{key:o,frame:s=!1,theme:c,clip:l,style:u={},labelTransform:f=[]}=e,d=i(fS(c)),h=Array.from(t.values()),p=nY(h,e),v=RY(kY(eV(Array.from(p),h,t),e,n)),g=t$(v,e,d,n),y=kW(g,e,n),m=s?Dt({mainLineWidth:1,mainStroke:"#000"},u):u;r$(Kw(v),y,g),JY(v);const b={};for(const w of v){const{scales:M=[]}=w,E=[];for(const A of M){const{name:P}=A,C=zw(A,n);E.push(C),Fw(b,{[P]:C})}w.scaleInstances=E}const _=[];for(const[w,M]of t.entries()){const{children:E,dataDomain:A,modifier:P,key:C}=w,{index:j,channels:N,tooltip:k}=M,R=Object.fromEntries(N.map(({name:Lt,scale:le})=>[Lt,le])),D=so(R,Lt=>zw(Lt,n));Fw(b,D);const B=eY(N,D),F=r(w),[z,Y,q]=W$(F(j,D,B,y)),rt=A||z.length,st=P?P(Y,rt,g):[],At=Lt=>{var le,ue;return(ue=(le=k.title)===null||le===void 0?void 0:le[Lt])===null||ue===void 0?void 0:ue.value},Yt=Lt=>k.items.map(le=>le[Lt]),qt=z.map((Lt,le)=>{const ue=Object.assign({points:Y[le],transform:st[le],index:Lt,markKey:C,viewKey:o},k&&{title:At(Lt),items:Yt(Lt)});for(const[we,Ue]of Object.entries(B))ue[we]=Ue[Lt],q&&(ue[`series${ao(we)}`]=q[le].map(ze=>Ue[ze]));return q&&(ue.seriesIndex=q[le]),q&&k&&(ue.seriesItems=q[le].map(we=>Yt(we)),ue.seriesTitle=q[le].map(we=>At(we))),ue});M.data=qt,M.index=z;const Rt=E==null?void 0:E(qt,D,g);_.push(...Rt||[])}return[{layout:g,theme:d,coordinate:y,markState:t,key:o,clip:l,scale:b,style:m,components:v,labelTransform:Q0(f.map(a))},_]}function ig(t,e,n,r,i){return Da(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=vo(s,["x","y","width","height"]),b=["view","plot","main","content"],_=b.map((F,z)=>z),O=["a","margin","padding","inset"],w=b.map(F=>__(Object.assign({},o.view,f),F)),M=O.map(F=>fe(m,F)),E=F=>F.style("x",z=>N[z].x).style("y",z=>N[z].y).style("width",z=>N[z].width).style("height",z=>N[z].height).each(function(z,Y,q){nV(je(q),w[z])});let A=0,P=0,C=g,j=y;const N=_.map(F=>{const z=M[F],{left:Y=0,top:q=0,bottom:rt=0,right:st=0}=z;return A+=Y,P+=q,C-=Y+st,j-=q+rt,{x:A,y:P,width:C,height:j}});e.selectAll(ya(o_)).data(_.filter(F=>In(w[F])),F=>b[F]).join(F=>F.append("rect").attr("className",o_).style("zIndex",-2).call(E),F=>F.call(E),F=>F.remove());const k=V$(c),R=k?{duration:k[1]}:!1;for(const[,F]of Gf(a,z=>`${z.type}-${z.position}`))F.forEach((z,Y)=>z.index=Y);const D=e.selectAll(ya(a_)).data(a,F=>`${F.type}-${F.position}-${F.index}`).join(F=>F.append("g").style("zIndex",({zIndex:z})=>z||-1).attr("className",a_).append(z=>Zw(Dt({animate:R,scale:h},z),l,o,r,c)),F=>F.transition(function(z,Y,q){const{preserve:rt=!1}=z;if(rt)return;const st=Zw(Dt({animate:R,scale:h},z),l,o,r,c),{attributes:At}=st,[Yt]=q.childNodes;return Yt.update(At)})).transitions();n.push(...D.flat().filter(In));const B=e.selectAll(ya(Df)).data([s],()=>u).join(F=>F.append("rect").style("zIndex",0).style("fill","transparent").attr("className",Df).call(hS).call(vS,Array.from(c.keys())).call(gS,d),F=>F.call(vS,Array.from(c.keys())).call(z=>k?tV(z,k):hS(z)).call(gS,d)).transitions();n.push(...B.flat());for(const[F,z]of c.entries()){const{data:Y}=z,{key:q,class:rt,type:st}=F,At=e.select(`#${q}`),Yt=q$(F,z,t,r,i),qt=Z$(F,z,t,r),Rt=Q$(F,z,t,r),Lt=J$(F,z,t,r),le=X$(e,At,rt,"element"),ue=At.selectAll(ya(Ca)).selectFacetAll(le).data(Y,we=>we.key,we=>we.groupKey).join(we=>we.append(Yt).attr("className",Ca).attr("markType",st).transition(function(Ue,ze,Je){return qt(Ue,[Je])}),we=>we.call(Ue=>{const ze=Ue.parent(),Je=G7(hn=>{const[xn,Un]=hn.getBounds().min;return[xn,Un]});Ue.transition(function(hn,xn,Un){U$(Un,ze,Je);const mr=Yt(hn,xn),xi=Rt(hn,[Un],[mr]);return xi!==null||(Un.nodeName===mr.nodeName&&mr.nodeName!=="g"?tv(Un,mr):(Un.parentNode.replaceChild(mr,Un),mr.className=Ca,mr.markType=st,mr.__data__=Un.__data__)),xi}).attr("markType",st).attr("className",Ca)}),we=>we.each(function(Ue,ze,Je){Je.__removed__=!0}).transition(function(Ue,ze,Je){return Lt(Ue,[Je])}).remove(),we=>we.append(Yt).attr("className",Ca).attr("markType",st).transition(function(Ue,ze,Je){const{__fromElements__:hn}=Je,xn=Rt(Ue,hn,[Je]);return new _r(hn,null,Je.parentNode).transition(xn).remove(),xn}),we=>we.transition(function(Ue,ze,Je){const xn=new _r([],Je.__toData__,Je.parentNode).append(Yt).attr("className",Ca).attr("markType",st).nodes();return Rt(Ue,[Je],xn)}).remove()).transitions();n.push(...ue.flat())}z$(t,e,n,r,i)})}function z$(t,e,n,r,i){const[a]=Xn("labelTransform",r),{markState:o,labelTransform:s}=t,c=e.select(ya(Y0)).node(),l=new Map,u=new Map,f=Array.from(o.entries()).flatMap(([v,g])=>{const{labels:y=[],key:m}=v,b=$$(v,g,t,r,i),_=e.select(`#${m}`).selectAll(ya(Ca)).nodes().filter(O=>!O.__removed__);return y.flatMap((O,w)=>{const{transform:M=[]}=O,E=vo(O,["transform"]);return _.flatMap(A=>{const P=G$(E,w,A);return P.forEach(C=>{l.set(C,b),u.set(C,O)}),P})})}),d=je(c).selectAll(ya(V0)).data(f,v=>v.key).join(v=>v.append(g=>l.get(g)(g)).attr("className",V0),v=>v.each(function(g,y,m){const _=l.get(g)(g);tv(m,_)}),v=>v.remove()).nodes(),h=Kn(d,v=>u.get(v.__data__)),{coordinate:p}=t;for(const[v,g]of h){const{transform:y=[]}=v;Q0(y.map(a))(g,p)}s&&s(d,p)}function G$(t,e,n){const{seriesIndex:r,seriesKey:i,points:a,key:o,index:s}=n.__data__,c=Y$(n);if(!r)return[Object.assign(Object.assign({},t),{key:`${o}-${e}`,bounds:c,index:s,points:a,dependentElement:n})];const l=H$(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 W$([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])=>In(c)&&In(l))&&(r.push(o),i.push(s))}return[r,i]}function H$(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 Y$(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 $$(t,e,n,r,i){const[a]=Xn("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:YO(i),theme:u,coordinate:f});return h=>{const{index:p,points:v}=h,g=o[p],{formatter:y=R=>`${R}`,transform:m,style:b,render:_}=h,O=vo(h,["formatter","transform","style","render"]),w=so(Object.assign(Object.assign({},O),b),R=>lS(R,g,p,o)),{shape:M=c,text:E}=w,A=vo(w,["shape","text"]),P=typeof y=="string"?oo(y):y,C=Object.assign(Object.assign({},A),{text:P(E,g,p,o),datum:g}),j=Object.assign({type:`label.${M}`,render:_},A),N=a(j,d),k=uS(u,"label",M,"label");return N(v,C,k,l)}}function lS(t,e,n,r){return typeof t=="function"?t(e,n,r):typeof t!="string"?t:e[t]!==void 0?e[t]:t}function V$(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:_=u,updateDuration:O=f,updateDelay:w=d,enterType:M=h,enterDuration:E=p,enterDelay:A=v,exitDuration:P=y,exitDelay:C=m,exitType:j=g}=b;(_===void 0||_)&&(e=Math.max(e,O+w),n=Math.min(n,w)),(j===void 0||j)&&(e=Math.max(e,P+C),n=Math.min(n,C)),(M===void 0||M)&&(e=Math.max(e,E+A),n=Math.min(n,A))}}return e===-1/0?null:[n,e-n]}function X$(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 U$(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})`;W7(t,l),e.append(t)}function q$(t,e,n,r,i){const[a]=Xn("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:YO(i),coordinate:d,theme:f});return g=>{const{shape:y=s}=p,{shape:m=y,points:b,seriesIndex:_,index:O}=g,w=vo(g,["shape","points","seriesIndex","index"]),M=Object.assign(Object.assign({},w),{index:O}),E=_?_.map(N=>o[N]):o[O],A=_||O,P=so(p,N=>lS(N,E,A,o)),C=l[m]?l[m](P,v):a(Object.assign(Object.assign({},P),{type:pS(t,m)}),v),j=uS(f,h,m,s);return C(b,M,j,u)}}function uS(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 ag(t,e,n,r,i){var a,o;const[,s]=Xn("shape",i),[c]=Xn("animation",i),{defaultShape:l,shape:u}=n,{theme:f,coordinate:d}=r,p=`default${ao(t)}Animation`,{[p]:v}=((a=u[l])===null||a===void 0?void 0:a.props)||s(pS(e,l)).props,{[t]:g={}}=f,y=((o=e.animate)===null||o===void 0?void 0:o[t])||{},m={coordinate:d};return(b,_,O)=>{const{[`${t}Type`]:w,[`${t}Delay`]:M,[`${t}Duration`]:E,[`${t}Easing`]:A}=b,P=Object.assign({type:w||v},y);if(!P.type)return null;const N=c(P,m)(_,O,Dt(g,{delay:M,duration:E,easing:A}));return Array.isArray(N)?N:[N]}}function Z$(t,e,n,r){return ag("enter",t,e,n,r)}function K$(t){return t.finished.then(()=>{t.cancel()}),t}function Q$(t,e,n,r){return ag("update",t,e,n,r)}function J$(t,e,n,r){return ag("exit",t,e,n,r)}function fS(t={}){if(typeof t=="string")return{type:t};const{type:e="light"}=t,n=vo(t,["type"]);return Object.assign(Object.assign({},n),{type:e})}function Cd(t){const e={event:!0,tooltip:!0,sliderFilter:!0,legendFilter:!0,scrollbarFilter:!0},{interaction:n={}}=t;return Object.entries(Dt(e,n)).reverse()}function dS(t,e){return Da(this,void 0,void 0,function*(){const n={library:e},{data:r}=t,i=vo(t,["data"]);if(r==null)return t;const[,{data:a}]=yield rS([],{data:r},n);return Object.assign({data:a},i)})}function hS(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 tV(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 pS(t,e){const{type:n}=t;return typeof e=="string"?`${n}.${e}`:e}function vS(t,e){const n=a=>a.class!==void 0?`${a.class}`:"";t.nodes().length===0||(t.selectAll(ya(i_)).data(e,a=>a.key).join(a=>a.append("g").attr("className",i_).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(ya(Y0)).node())||t.append("g").attr("className",Y0).style("zIndex",0)}function ya(...t){return t.map(e=>`.${e}`).join("")}function gS(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 Xo({style:{x:i+a,y:r+o,width:s,height:c}})})}function eV(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 nV(t,e){for(const[n,r]of Object.entries(e))t.style(n,r)}function yS(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 rV(t,e){const n=new u_;return n.registerPlugin(new f_),new Fx({width:t,height:e,container:document.createElement("div"),renderer:n})}function iV(t,e={},n=()=>{},r=i=>{throw i}){const{width:i=640,height:a=480,depth:o=0}=t,s=yS(t),{canvas:c=rV(i,a),emitter:l=new Wp,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(Sn.BEFORE_RENDER);const h=je(c.document.documentElement);return c.ready.then(()=>ng(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(Sn.AFTER_RENDER),n==null||n()})}).catch(p=>{r==null||r(p)}),oV(c.getConfig().container)}function Qht(t,e={},n=()=>{},r=i=>{throw i}){var i;const{width:a=640,height:o=480}=t,s=yS(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 mS(t,e={},n=!1){const{canvas:r,emitter:i}=e;r&&(aV(r),n?r.destroy():r.destroyChildren()),i.off()}function aV(t){const e=t.getRoot().querySelectorAll(`.${$0}`);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 oV(t){return typeof t=="string"?document.getElementById(t):t}const fc=t=>t?parseInt(t):0;function sV(t){const e=getComputedStyle(t),n=t.clientWidth||fc(e.width),r=t.clientHeight||fc(e.height),i=fc(e.paddingLeft)+fc(e.paddingRight),a=fc(e.paddingTop)+fc(e.paddingBottom);return{width:n-i,height:r-a}}function Jht(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=O=>O==="auto"?20:O,b=n-m(i)-m(a)-l-u-p-v,_=e-m(o)-m(s)-f-d-g-y;return{width:b,height:_}}function og(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 sg{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 og(this,i=>{e===i.attr("key")&&(n=i)}),n}getNodesByType(e){const n=[];return og(this,i=>{e===i.type&&n.push(i)}),n}getNodeByType(e){let n=null;return og(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 bS=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 xS=["width","height","depth","padding","paddingLeft","paddingRight","paddingBottom","paddingTop","inset","insetLeft","insetRight","insetTop","insetBottom","margin","marginLeft","marginRight","marginTop","marginBottom","autoFit","theme","title"],_S="__remove__",OS="__callback__",wS=1,SS=1;function cV(t){if(t===void 0){const e=document.createElement("div");return e[_S]=!0,e}return typeof t=="string"?document.getElementById(t):t}function lV(t){const e=t.parentNode;e&&e.removeChild(t)}function uV(t){if(t.type!==null)return t;const e=t.children[t.children.length-1];for(const n of xS)e.attr(n,t.attr(n));return e}function MS(t){return Object.assign(Object.assign({},t.value),{type:t.type})}function cg(t,e){const{width:n=640,height:r=480,autoFit:i,depth:a=0}=t;let o=n,s=r;if(i){const{width:c,height:l}=sV(e);o=c||o,s=l||s}return{width:Math.max((0,xr.Z)(o)?o:wS,wS),height:Math.max((0,xr.Z)(s)?s:SS,SS),depth:a}}function fV(t){const e=uV(t),n=[e],r=new Map;for(r.set(e,MS(e));n.length;){const i=n.pop(),a=r.get(i),{children:o=[]}=i;for(const s of o)if(s.type===OS)a.children=s.value;else{const c=MS(s),{children:l=[]}=a;l.push(c),n.push(s),r.set(s,c),a.children=l}}return r.get(e)}function dV(t,e){return typeof t=="function"?!0:new Set(Object.keys(e)).has(t)}function hV(t,e,n,r){const{type:i}=t,{type:a=n||i}=e;if(a==="view"||!dV(a,r))return e;const o={type:"view"},s=Object.assign({},e);for(const c of xS)s[c]!==void 0&&(o[c]=s[c],delete s[c]);return Object.assign(Object.assign({},o),{children:[s]})}function pV(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 vV(t,e,n){if(typeof t=="function"){const c=new sg;return c.value=t,c.type=OS,c}const{type:r,children:i}=t,a=bS(t,["type","children"]),o=pV(r,e,n),s=new o;return s.value=a,s.type=r,s}function gV(t,e){const{type:n,children:r}=e,i=bS(e,["type","children"]);t.type===n||n===void 0?w_(t.value,i):typeof n=="string"&&(t.type=n,t.value=i)}function yV(t,e,n,r){if(!t)return;const i=[[t,e]];for(;i.length;){const[a,o]=i.shift(),s=vV(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 mV(t,e,n,r,i){const a=hV(t,e,n,r),o=[[null,t,a]];for(;o.length;){const[s,c,l]=o.shift();if(!c)yV(s,l,r,i);else if(!l)c.remove();else{gV(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 bV(){let t,e;return[new Promise((r,i)=>{e=r,t=i}),e,t]}const xV={visibility:"visible",opacity:1,fillOpacity:1,strokeOpacity:1};function _V(t,e){var n;return(n=t.style[e])!==null&&n!==void 0?n:xV[e]}function lg(t,e,n,r){t.style[e]=n,r&&t.children.forEach(i=>lg(i,e,n,r))}function ug(t){lg(t,"visibility","hidden",!0)}function fg(t){lg(t,"visibility","visible",!0)}function OV(t,e,{key:n=e}){t.prototype[e]=function(r){return arguments.length===0?this.attr(n):this.attr(n,r)}}function wV(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 SV(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 MV(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(cl(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 EV(t,e,{ctor:n}){t.prototype[e]=function(r){const i=this.append(n);return e==="mark"&&(i.type=r),i}}function AV(t,e,{ctor:n}){t.prototype[e]=function(){return this.type=null,this.append(n)}}function kd(t){return e=>{for(const[n,r]of Object.entries(t)){const{type:i}=r;i==="value"?OV(e,n,r):i==="array"?wV(e,n,r):i==="object"?SV(e,n,r):i==="node"?EV(e,n,r):i==="container"?AV(e,n,r):i==="mix"&&MV(e,n,r)}return e}}function ES(t){return Object.fromEntries(Object.entries(t).map(([e,n])=>[e,{type:"node",ctor:n}]))}const AS={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"}},TV=Object.assign(Object.assign({},AS),{tooltip:{type:"mix"},viewStyle:{type:"object"}}),PV=Object.assign(Object.assign({},AS),{labelTransform:{type:"array"}});var CV=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 Rd=class extends sg{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()&&fg(e)}hide(){const e=this.getGroup();e&&e.isVisible()&&ug(e)}};Rd=CV([kd(PV)],Rd);var kV=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 dg=class extends sg{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}};dg=kV([kd(TV)],dg);const TS={};function tpt(t,e){Object.assign(TS,{[t]:e})}var RV=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},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 NV="G2_CHART_KEY";class IV extends Rd{constructor(e){const{container:n,canvas:r,renderer:i,plugins:a,lib:o}=e,s=LV(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=d_(()=>{this.forceFit()},300),this._renderer=i||new u_,this._plugins=a||[],this._container=cV(n),this._emitter=new Wp,this._context={library:Object.assign(Object.assign({},o),TS),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)=>iV(this._computedOptions(),this._context,this._createResolve(a),this._createReject(o))),[n,r,i]=bV();return e.then(r).catch(i).then(()=>this._renderTrailing()),n}options(e){if(arguments.length===0)return fV(this);const{type:n}=e;return n&&(this._previousDefinedType=n),mV(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(Sn.BEFORE_CLEAR),this._reset(),mS(e,this._context,!1),this.emit(Sn.AFTER_CLEAR)}destroy(){const e=this.options();this.emit(Sn.BEFORE_DESTROY),this._unbindAutoFit(),this._reset(),mS(e,this._context,!0),this._container[_S]&&lV(this._container),this.emit(Sn.AFTER_DESTROY)}forceFit(){this.options.autoFit=!0;const{width:e,height:n}=cg(this.options(),this._container);if(e===this._width&&n===this._height)return Promise.resolve(this);this.emit(Sn.BEFORE_CHANGE_SIZE);const r=this.render();return r.then(()=>{this.emit(Sn.AFTER_CHANGE_SIZE)}),r}changeSize(e,n){if(e===this._width&&n===this._height)return Promise.resolve(this);this.emit(Sn.BEFORE_CHANGE_SIZE),this.attr("width",e),this.attr("height",n);const r=this.render();return r.then(()=>{this.emit(Sn.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 dg{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 Rd{constructor(){super({},o)}};return s=RV([kd(ES(this._marks))],s),[o,s]}));for(const a of Object.values(this._compositions))kd(ES(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=NV}=e,{width:r,height:i,depth:a}=cg(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}=cg(this.options(),this._container);this._plugins.push(new f_),this._plugins.forEach(r=>this._renderer.registerPlugin(r)),this._context.canvas=new Fx({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 jV(t,e){class n extends t{constructor(i){super(Object.assign(Object.assign({},i),{lib:e}))}}return n}Pt.enableCSSParsing=!1;var DV=Object.prototype.hasOwnProperty,PS=function(t,e){if(t===null||!io(t))return{};var n={};return Cv(e,function(r){DV.call(t,r)&&(n[r]=t[r])}),n};function CS(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 Ll(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 BV(){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(CS),o}function a(o,s){return function(c){c.children&&Ll(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 FV=gt(21320);function zV(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 GV(){return this.eachAfter(zV)}var hg=gt(38887);function WV(t,e){var n=-1,r=hg(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 HV(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 YV(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 $V(t,e){var n=-1,r=hg(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 VV(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 XV(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})}function UV(t){for(var e=this,n=qV(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 qV(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 ZV(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e}function KV(){return Array.from(this)}function QV(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t}function JV(){var t=this,e=[];return t.each(function(n){n!==t&&e.push({source:n.parent,target:n})}),e}var kS=gt(13448),tX=kS().mark(RS);function RS(){var t,e,n,r,i,a;return kS().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()}},tX,this)}function dc(t,e){t instanceof Map?(t=[void 0,t],e===void 0&&(e=rX)):e===void 0&&(e=nX);for(var n=new hc(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 hc(o[s])),a.parent=r,a.depth=r.depth+1;return n.eachBefore(LS)}function eX(){return dc(this).eachBefore(iX)}function nX(t){return t.children}function rX(t){return Array.isArray(t)?t[1]:null}function iX(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function LS(t){var e=0;do t.height=e;while((t=t.parent)&&t.height<++e)}function hc(t){this.data=t,this.depth=this.height=0,this.parent=null}hc.prototype=dc.prototype=FV({constructor:hc,count:GV,each:WV,eachAfter:YV,eachBefore:HV,find:$V,sum:VV,sort:XV,path:UV,ancestors:ZV,descendants:KV,leaves:QV,links:JV,copy:eX},Symbol.iterator,RS);var aX=function(t,e){if(!ll(t))return t;for(var n=[],r=0;r<t.length;r++){var i=t[r];e(i,r)&&n.push(i)}return n},oX=aX;function pg(t,e){for(var n in e)e.hasOwnProperty(n)&&n!=="constructor"&&e[n]!==void 0&&(t[n]=e[n])}function sX(t,e,n,r){return e&&pg(t,e),n&&pg(t,n),r&&pg(t,r),t}function cX(t){return(0,me.Z)(t)?0:ll(t)?t.length:Object.keys(t).length}const lX={field:"value",size:[1,1],round:!1,padding:0,sort:(t,e)=>e.value-t.value,as:["x","y"],ignoreParentValue:!0},uX="nodeIndex",Nl="childNodeCount",fX="nodeAncestor",vg="Invalid field: it must be a string!";function dX(t,e){const{field:n,fields:r}=t;if(er(n))return n;if(Dr(n))return console.warn(vg),n[0];if(console.warn(`${vg} will try to get fields instead.`),er(r))return r;if(Dr(r)&&r.length)return r[0];if(e)return e;throw new TypeError(vg)}function hX(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=oX((((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[fX]=s,i[Nl]=((o=i.children)===null||o===void 0?void 0:o.length)||0,i[uX]=r,e.push(i)})}else t&&t.eachNode&&t.eachNode(n=>{e.push(n)});return e}function pX(t,e){e=sX({},lX,e);const n=e.as;if(!Dr(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=dX(e)}catch(c){console.warn(c)}const a=(c=>BV().size(e.size).round(e.round).padding(e.padding)(dc(c).sum(l=>cX(l.children)?e.ignoreParentValue?0:l[r]-G2(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]})}),hX(a)}var vX=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 pc="sunburst",gg="markType",ept="value",NS="path",Ld="ancestor-node";function gX(t){const{data:e,encode:n}=t,{color:r,value:i}=n,o=pX(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({},PS(c.data,[i])),{[NS]:h,[Ld]:v.data.name}),c);r&&r!==Ld&&(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 IS={id:pc,encode:{x:"x",y:"y",key:NS,color:Ld,value:"value"},axis:{x:!1,y:!1},style:{[gg]:pc,stroke:"#fff",lineWidth:.5,fillOpacity:"fillOpacity",[Nl]:Nl,depth:"depth"},state:{active:{zIndex:2,stroke:"#000"},inactive:{zIndex:1,stroke:"#fff"}},legend:!1,interaction:{drillDown:!0},coordinate:{type:"polar",innerRadius:.2}},jS=t=>{const{encode:e,data:n=[],legend:r}=t,i=vX(t,["encode","data","legend"]),a=Object.assign(Object.assign({},i.coordinate),{innerRadius:Math.max(zi(i,["coordinate","innerRadius"],.2),1e-5)}),o=Object.assign(Object.assign({},IS.encode),e),{value:s}=o,c=gX({encode:o,data:n});return[Dt({},IS,Object.assign(Object.assign({type:"rect",data:c,encode:o,tooltip:{title:"path",items:[l=>({name:s,value:l[s]})]}},i),{coordinate:a}))]};jS.props={};var yX=Object.keys?function(t){return Object.keys(t)}:function(t){var e=[];return Cv(t,function(n,r){gi(t)&&r==="prototype"||e.push(r)}),e},mX=yX,bX=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 xX=t=>t.querySelectorAll(".element").filter(e=>zi(e,["style",gg])===pc);function _X(t){return je(t).select(`.${Df}`).node()}const OX={rootText:"root",style:{fill:"rgba(0, 0, 0, 0.85)",fontSize:12,y:1},active:{fill:"rgba(0, 0, 0, 0.5)"}};function wX(t={}){const{breadCrumb:e={},fixedColor:n=!0}=t,r=Dt({},OX,e);return i=>{const{update:a,setState:o,container:s,view:c,options:l}=i,u=_X(s),f=l.marks.find(({id:m})=>m===pc),{state:d}=f,h=new Br;u.appendChild(h);const p=(m,b)=>bX(this,void 0,void 0,function*(){if(h.removeChildren(),m){const _=new Zi({style:Object.assign({x:0,text:r.rootText,depth:0},r.style)});h.appendChild(_);let O="";const w=m==null?void 0:m.split(" / ");let M=r.style.y,E=h.getBBox().width;const A=u.getBBox().width,P=w.map((C,j)=>{const N=new Zi({style:Object.assign(Object.assign({x:E,text:" / "},r.style),{y:M})});h.appendChild(N),E+=N.getBBox().width,O=`${O}${C} / `;const k=new Zi({name:O.replace(/\s\/\s$/,""),style:Object.assign(Object.assign({text:C,x:E,depth:j+1},r.style),{y:M})});return h.appendChild(k),E+=k.getBBox().width,E>A&&(M=h.getBBox().height,E=0,N.attr({x:E,y:M}),E+=N.getBBox().width,k.attr({x:E,y:M}),E+=k.getBBox().width),k});[_,...P].forEach((C,j)=>{if(j===P.length)return;const N=Object.assign({},C.attributes);C.attr("cursor","pointer"),C.addEventListener("mouseenter",()=>{C.attr(r.active)}),C.addEventListener("mouseleave",()=>{C.attr(N)}),C.addEventListener("click",()=>{p(C.name,zi(C,["style","depth"]))})})}o("drillDown",_=>{const{marks:O}=_,w=O.map(M=>{if(M.id!==pc&&M.type!=="rect")return M;const{data:E}=M,A=Object.fromEntries(["color"].map(C=>[C,{domain:c.scale[C].getOptions().domain}])),P=E.filter(C=>{const j=C.path;return n&&(C[Ld]=j.split(" / ")[b]),m?new RegExp(`^${m}.+`).test(j):!0});return Dt({},M,n?{data:P}:{data:P,scale:A})});return Object.assign(Object.assign({},_),{marks:w})}),yield a()}),v=m=>{const b=m.target;if(zi(b,["style",gg])!==pc||zi(b,["markType"])!=="rect"||!zi(b,["style",Nl]))return;const _=zi(b,["__data__","key"]),O=zi(b,["style","depth"]);b.style.cursor="pointer",p(_,O)};u.addEventListener("click",v);const g=mX(Object.assign(Object.assign({},d.active),d.inactive)),y=()=>{xX(u).forEach(b=>{const _=zi(b,["style",Nl]);if(zi(b,["style","cursor"])!=="pointer"&&_){b.style.cursor="pointer";const w=PS(b.attributes,g);b.addEventListener("mouseenter",()=>{b.attr(d.active)}),b.addEventListener("mouseleave",()=>{b.attr(Dt(w,d.inactive))})}})};return u.addEventListener("mousemove",y),()=>{h.remove(),u.removeEventListener("click",v),u.removeEventListener("mousemove",y)}}}Pt.enableCSSParsing=!1;function SX(){return{"interaction.drillDown":wX,"mark.sunburst":jS}}const DS=()=>[["cartesian"]];DS.props={};const yg=()=>[["transpose"],["translate",.5,.5],["reflect.x"],["translate",-.5,-.5]];yg.props={transform:!0};const MX=(t={})=>{const e={startAngle:-Math.PI/2,endAngle:Math.PI*3/2,innerRadius:0,outerRadius:1};return Object.assign(Object.assign({},e),t)},BS=t=>{const{startAngle:e,endAngle:n,innerRadius:r,outerRadius:i}=MX(t);return[...yg(),...ul({startAngle:e,endAngle:n,innerRadius:r,outerRadius:i})]};BS.props={};const mg=()=>[["parallel",0,1,0,1]];mg.props={};const FS=({focusX:t=0,focusY:e=0,distortionX:n=2,distortionY:r=2,visual:i=!1})=>[["fisheye",t,e,n,r,i]];FS.props={transform:!0};const zS=t=>{const{startAngle:e=-Math.PI/2,endAngle:n=Math.PI*3/2,innerRadius:r=0,outerRadius:i=1}=t;return[...mg(),...ul({startAngle:e,endAngle:n,innerRadius:r,outerRadius:i})]};zS.props={};const GS=({value:t})=>e=>e.map(()=>t);GS.props={};const WS=({value:t})=>e=>e.map(n=>n[t]);WS.props={};const HS=({value:t})=>e=>e.map(t);HS.props={};const YS=({value:t})=>()=>t;YS.props={};function dr(t,e){if(t!==null)return{type:"column",value:t,field:e}}function Nd(t,e){const n=dr(t,e);return Object.assign(Object.assign({},n),{inferred:!0})}function Id(t,e){if(t!==null)return{type:"column",value:t,field:e,visual:!0}}function EX(t,e){const n=dr(t,e);return Object.assign(Object.assign({},n),{constant:!1})}function go(t,e){const n=[];for(const r of t)n[r]=e;return n}function un(t,e){const n=t[e];if(!n)return[null,null];const{value:r,field:i=null}=n;return[r,i]}function Il(t,...e){for(const n of e)if(typeof n=="string"){const[r,i]=un(t,n);if(r!==null)return[r,i]}else return[n,null];return[null,null]}function bg(t){return t instanceof Date?!1:typeof t=="object"}const jl=()=>(t,e)=>{const{encode:n}=e,{y1:r}=n;return r!==void 0?[t,e]:[t,Dt({},e,{encode:{y1:Nd(go(t,0))}})]};jl.props={};const ls=()=>(t,e)=>{const{encode:n}=e,{x:r}=n;return r!==void 0?[t,e]:[t,Dt({},e,{encode:{x:Nd(go(t,0))},scale:{x:{guide:null}}})]};ls.props={};const $S=Math.abs,Ur=Math.atan2,us=Math.cos,AX=Math.max,xg=Math.min,ma=Math.sin,vc=Math.sqrt,qr=1e-12,Dl=Math.PI,jd=Dl/2,TX=2*Dl;function PX(t){return t>1?0:t<-1?Dl:Math.acos(t)}function VS(t){return t>=1?jd:t<=-1?-jd:Math.asin(t)}function CX(t){return t.innerRadius}function kX(t){return t.outerRadius}function RX(t){return t.startAngle}function LX(t){return t.endAngle}function NX(t){return t&&t.padAngle}function IX(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<qr))return d=(u*(e-a)-f*(t-i))/d,[t+d*c,e+d*l]}function Dd(t,e,n,r,i,a,o){var s=t-n,c=e-r,l=(o?a:-a)/vc(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,_=m*m+b*b,O=i-a,w=d*v-p*h,M=(b<0?-1:1)*vc(AX(0,O*O*_-w*w)),E=(w*b-m*M)/_,A=(-w*m-b*M)/_,P=(w*b+m*M)/_,C=(-w*m+b*M)/_,j=E-g,N=A-y,k=P-g,R=C-y;return j*j+N*N>k*k+R*R&&(E=P,A=C),{cx:E,cy:A,x01:-u,y01:-f,x11:E*(i/O-1),y11:A*(i/O-1)}}function Bd(){var t=CX,e=kX,n=Vn(0),r=null,i=RX,a=LX,o=NX,s=null,c=zv(l);function l(){var u,f,d=+t.apply(this,arguments),h=+e.apply(this,arguments),p=i.apply(this,arguments)-jd,v=a.apply(this,arguments)-jd,g=$S(v-p),y=v>p;if(s||(s=u=c()),h<d&&(f=h,h=d,d=f),!(h>qr))s.moveTo(0,0);else if(g>TX-qr)s.moveTo(h*us(p),h*ma(p)),s.arc(0,0,h,p,v,!y),d>qr&&(s.moveTo(d*us(v),d*ma(v)),s.arc(0,0,d,v,p,y));else{var m=p,b=v,_=p,O=v,w=g,M=g,E=o.apply(this,arguments)/2,A=E>qr&&(r?+r.apply(this,arguments):vc(d*d+h*h)),P=xg($S(h-d)/2,+n.apply(this,arguments)),C=P,j=P,N,k;if(A>qr){var R=VS(A/d*ma(E)),D=VS(A/h*ma(E));(w-=R*2)>qr?(R*=y?1:-1,_+=R,O-=R):(w=0,_=O=(p+v)/2),(M-=D*2)>qr?(D*=y?1:-1,m+=D,b-=D):(M=0,m=b=(p+v)/2)}var B=h*us(m),F=h*ma(m),z=d*us(O),Y=d*ma(O);if(P>qr){var q=h*us(b),rt=h*ma(b),st=d*us(_),At=d*ma(_),Yt;if(g<Dl)if(Yt=IX(B,F,st,At,q,rt,z,Y)){var qt=B-Yt[0],Rt=F-Yt[1],Lt=q-Yt[0],le=rt-Yt[1],ue=1/ma(PX((qt*Lt+Rt*le)/(vc(qt*qt+Rt*Rt)*vc(Lt*Lt+le*le)))/2),we=vc(Yt[0]*Yt[0]+Yt[1]*Yt[1]);C=xg(P,(d-we)/(ue-1)),j=xg(P,(h-we)/(ue+1))}else C=j=0}M>qr?j>qr?(N=Dd(st,At,B,F,h,j,y),k=Dd(q,rt,z,Y,h,j,y),s.moveTo(N.cx+N.x01,N.cy+N.y01),j<P?s.arc(N.cx,N.cy,j,Ur(N.y01,N.x01),Ur(k.y01,k.x01),!y):(s.arc(N.cx,N.cy,j,Ur(N.y01,N.x01),Ur(N.y11,N.x11),!y),s.arc(0,0,h,Ur(N.cy+N.y11,N.cx+N.x11),Ur(k.cy+k.y11,k.cx+k.x11),!y),s.arc(k.cx,k.cy,j,Ur(k.y11,k.x11),Ur(k.y01,k.x01),!y))):(s.moveTo(B,F),s.arc(0,0,h,m,b,!y)):s.moveTo(B,F),!(d>qr)||!(w>qr)?s.lineTo(z,Y):C>qr?(N=Dd(z,Y,q,rt,d,-C,y),k=Dd(B,F,st,At,d,-C,y),s.lineTo(N.cx+N.x01,N.cy+N.y01),C<P?s.arc(N.cx,N.cy,C,Ur(N.y01,N.x01),Ur(k.y01,k.x01),!y):(s.arc(N.cx,N.cy,C,Ur(N.y01,N.x01),Ur(N.y11,N.x11),!y),s.arc(0,0,d,Ur(N.cy+N.y11,N.cx+N.x11),Ur(k.cy+k.y11,k.cx+k.x11),y),s.arc(k.cx,k.cy,C,Ur(k.y11,k.x11),Ur(k.y01,k.x01),!y))):s.arc(0,0,d,O,_,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-Dl/2;return[us(f)*u,ma(f)*u]},l.innerRadius=function(u){return arguments.length?(t=typeof u=="function"?u:Vn(+u),l):t},l.outerRadius=function(u){return arguments.length?(e=typeof u=="function"?u:Vn(+u),l):e},l.cornerRadius=function(u){return arguments.length?(n=typeof u=="function"?u:Vn(+u),l):n},l.padRadius=function(u){return arguments.length?(r=u==null?null:typeof u=="function"?u:Vn(+u),l):r},l.startAngle=function(u){return arguments.length?(i=typeof u=="function"?u:Vn(+u),l):i},l.endAngle=function(u){return arguments.length?(a=typeof u=="function"?u:Vn(+u),l):a},l.padAngle=function(u){return arguments.length?(o=typeof u=="function"?u:Vn(+u),l):o},l.context=function(u){return arguments.length?(s=u==null?null:u,l):s},l}var Fd=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,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=Fd(i,["inset","radius","insetLeft","insetTop","insetRight","insetBottom","radiusBottomLeft","radiusBottomRight","radiusTopLeft","radiusTopRight","minWidth","maxWidth","minHeight"]);if(!Gn(r)&&!D_(r)){const E=!!$n(r),[A,,P]=E?gd(e):e,[C,j]=A,[N,k]=ur(P,A),R=N>0?C:C+N,D=k>0?j:j+k,B=Math.abs(N),F=Math.abs(k),z=R+s,Y=D+c,q=B-(s+l),rt=F-(c+u),st=E?Yf(q,y,1/0):Yf(q,v,g),At=E?Yf(rt,v,g):Yf(rt,y,1/0),Yt=E?z:z-(st-q)/2,qt=E?Y-(At-rt)/2:Y-(At-rt);return je(t.createElement("rect",{})).style("x",Yt).style("y",qt).style("width",st).style("height",At).style("radius",[h,p,d,f]).call(Ae,m).node()}const{y:b,y1:_}=n,O=r.getCenter(),w=ns(r,e,[b,_]),M=Bd().cornerRadius(o).padAngle(a*Math.PI/180);return je(t.createElement("path",{})).style("path",M(w)).style("transform",`translate(${O[0]}, ${O[1]})`).style("radius",o).style("inset",a).call(Ae,m).node()}const Bl=(t,e)=>{const{colorAttribute:n,opacityAttribute:r="fill",first:i=!0,last:a=!0}=t,o=Fd(t,["colorAttribute","opacityAttribute","first","last"]),{coordinate:s,document:c}=e;return(l,u,f)=>{const{color:d,radius:h=0}=f,p=Fd(f,["color","radius"]),v=p.lineWidth||1,{stroke:g,radius:y=h,radiusTopLeft:m=y,radiusTopRight:b=y,radiusBottomRight:_=y,radiusBottomLeft:O=y,innerRadius:w=0,innerRadiusTopLeft:M=w,innerRadiusTopRight:E=w,innerRadiusBottomRight:A=w,innerRadiusBottomLeft:P=w,lineWidth:C=n==="stroke"||g?v:0,inset:j=0,insetLeft:N=j,insetRight:k=j,insetBottom:R=j,insetTop:D=j,minWidth:B,maxWidth:F,minHeight:z}=o,Y=Fd(o,["stroke","radius","radiusTopLeft","radiusTopRight","radiusBottomRight","radiusBottomLeft","innerRadius","innerRadiusTopLeft","innerRadiusTopRight","innerRadiusBottomRight","innerRadiusBottomLeft","lineWidth","inset","insetLeft","insetRight","insetBottom","insetTop","minWidth","maxWidth","minHeight"]),{color:q=d,opacity:rt}=u,st=[i?m:M,i?b:E,a?_:A,a?O:P],At=["radiusTopLeft","radiusTopRight","radiusBottomRight","radiusBottomLeft"];$n(s)&&At.push(At.shift());const Yt=Object.assign(Object.assign({radius:y},Object.fromEntries(At.map((qt,Rt)=>[qt,st[Rt]]))),{inset:j,insetLeft:N,insetRight:k,insetBottom:R,insetTop:D,minWidth:B,maxWidth:F,minHeight:z});return je(XS(c,l,u,s,Yt)).call(Ae,p).style("fill","transparent").style(n,q).style(wO(t),rt).style("lineWidth",C).style("stroke",g===void 0?q:g).call(Ae,Y).node()}};Bl.props={defaultEnterAnimation:"scaleInY",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const fs=(t,e)=>Bl(Object.assign({colorAttribute:"fill"},t),e);fs.props=Object.assign(Object.assign({},Bl.props),{defaultMarker:"square"});const zd=(t,e)=>Bl(Object.assign({colorAttribute:"stroke"},t),e);zd.props=Object.assign(Object.assign({},Bl.props),{defaultMarker:"hollowSquare"});function gc(){}function US(t){this._context=t}US.prototype={areaStart:gc,areaEnd:gc,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 _g(t){return new US(t)}var qS=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 jX(t,e,n){const[r,i,a,o]=t;if($n(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 Og=(t,e)=>{const{adjustPoints:n=jX}=t,r=qS(t,["adjustPoints"]),{coordinate:i,document:a}=e;return(o,s,c,l)=>{const{index:u}=s,{color:f}=c,d=qS(c,["color"]),h=l[u+1],p=n(o,h,i),v=!!$n(i),[g,y,m,b]=v?gd(p):p,{color:_=f,opacity:O}=s,w=ho().curve(_g)([g,y,m,b]);return je(a.createElement("path",{})).call(Ae,d).style("path",w).style("fill",_).style("fillOpacity",O).call(Ae,r).node()}};Og.props={defaultMarker:"square"};function DX(t,e,n){const[r,i,a,o]=t;if($n(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 ZS=(t,e)=>Og(Object.assign({adjustPoints:DX},t),e);ZS.props={defaultMarker:"square"};function Gd(t){return t==null?null:KS(t)}function KS(t){if(typeof t!="function")throw new Error;return t}var BX={depth:-1},QS={},wg={};function FX(t){return t.id}function zX(t){return t.parentId}function Sg(){var t=FX,e=zX,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(E,A){return GX(n(E,A,i))}),m=y.map(JS),b=new Set(y).add(""),_=hg(m),O;try{for(_.s();!(O=_.n()).done;){var w=O.value;b.has(w)||(b.add(w),y.push(w),m.push(JS(w)),a.push(wg))}}catch(E){_.e(E)}finally{_.f()}o=function(A,P){return y[P]},s=function(A,P){return m[P]}}for(u=0,c=a.length;u<c;++u)l=a[u],h=a[u]=new hc(l),(p=o(l,u,i))!=null&&(p+="")&&(v=h.id=p,g.set(v,g.has(v)?QS: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===QS)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===wg&&f.children.length===1;)f=f.children[0],--c;for(var M=a.length-1;M>=0&&(h=a[M],h.data===wg);--M)h.data=null}if(f.parent=BX,f.eachBefore(function(E){E.depth=E.parent.depth+1,--c}).eachBefore(LS),f.parent=null,c>0)throw new Error("cycle");return f}return r.id=function(i){return arguments.length?(t=Gd(i),r):t},r.parentId=function(i){return arguments.length?(e=Gd(i),r):e},r.path=function(i){return arguments.length?(n=Gd(i),r):n},r}function GX(t){t="".concat(t);var e=t.length;return Mg(t,e-1)&&!Mg(t,e-2)&&(t=t.slice(0,-1)),t[0]==="/"?t:"/".concat(t)}function JS(t){var e=t.length;if(e<2)return"";for(;--e>1&&!Mg(t,e););return t.slice(0,e)}function Mg(t,e){if(t[e]==="/"){for(var n=0;e>0&&t[--e]==="\\";)++n;if(!(n&1))return!0}return!1}function Fl(t){return Math.abs(t)>10?String(t):t.toString().padStart(2,"0")}function WX(t){const e=t.getFullYear(),n=Fl(t.getMonth()+1),r=Fl(t.getDate()),i=`${e}-${n}-${r}`,a=t.getHours(),o=t.getMinutes(),s=t.getSeconds();return a||o||s?`${i} ${Fl(a)}:${Fl(o)}:${Fl(s)}`:i}const Wd=(t={})=>{const{channel:e="x"}=t;return(n,r)=>{const{encode:i}=r,{tooltip:a}=r;if(ka(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=>un(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?WX(u[l]):u[l]).join(", ")};return[n,Dt({},r,{tooltip:{title:c}})]}};Wd.props={};const Hd=t=>{const{channel:e}=t;return(n,r)=>{const{encode:i,tooltip:a}=r;if(ka(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}})]}};Hd.props={};var HX=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 tM=()=>(t,e)=>{const{encode:n}=e,{key:r}=n,i=HX(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:dr(o)}})]};tM.props={};function eM(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 ii(t={}){return[...eM(t),{name:"title",scale:"identity"}]}function npt(){return[{type:MaybeTitle,channel:"color"},{type:MaybeTooltip,channel:["x","y","z"]}]}function yo(){return[{type:Wd,channel:"color"},{type:Hd,channel:["x","y"]}]}function yc(){return[{type:Wd,channel:"x"},{type:Hd,channel:["y"]}]}function YX(){return[{type:Wd,channel:"color"},{type:Hd,channel:["position"]}]}function mc(t={}){return eM(t)}function gr(){return[{type:tM}]}function Or(){return[]}function Eg(t,e){return t.getBandWidth(t.invert(e))}function ds(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?Eg(o,r[g]):0,m=h?Eg(s,i[g]):0,_=p&&a?(()=>(Eg(c,a[g])/2+ +a[g])*y)():0,[O,w]=v;return[O+u*y+_,w+f*m]}}function Yd(t){return parseFloat(t)/100}function Ag(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"?Yd(u)*o:+u,h=typeof f=="string"?Yd(f)*s:+f;return[[d,h]]});return[t,c]}function ba(t){return typeof t=="function"?t:e=>e[t]}function Tg(t,e){return Array.from(t,ba(e))}function Pg(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=Tg(a,n),c=Tg(a,r),l=Tg(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 $X(t,e){return Array.isArray(t)?typeof e=="function"?Sg().path(e)(t):Sg()(t):dc(t)}function nM(t,e){return t.getBandWidth(t.invert(e))}const rM={rect:fs,hollow:zd,funnel:Og,pyramid:ZS},iM=()=>(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=nM(l,i[v]),y=u?nM(u,s==null?void 0:s[v]):1,m=g*y,b=(+(s==null?void 0:s[v])||0)*g,_=+i[v]+b,[O,w]=h(_,m,v),M=+a[v],E=+o[v];return[[O,M],[w,M],[w,E],[O,E]].map(N=>r.map(N))});return[t,p]};iM.props={defaultShape:"rect",defaultLabelShape:"label",composite:!1,shape:rM,channels:[...ii({shapes:Object.keys(rM)}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"},{name:"size"}],preInference:[...gr(),{type:jl},{type:ls}],postInference:[...Or(),...yc()],interaction:{shareTooltip:!0}};const aM={rect:fs,hollow:zd},oM=()=>(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]};oM.props={defaultShape:"rect",defaultLabelShape:"label",composite:!1,shape:aM,channels:[...ii({shapes:Object.keys(aM)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...gr(),{type:jl}],postInference:[...Or(),...yc()],interaction:{shareTooltip:!0}};var sM=Cg(Al);function cM(t){this._curve=t}cM.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 Cg(t){function e(n){return new cM(t(n))}return e._curve=t,e}function zl(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(Cg(n)):e()._curve},t}function VX(){return zl(ho().curve(sM))}var lM=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 XX=rc(t=>{const{d1:e,d2:n,style1:r,style2:i}=t.attributes,a=t.ownerDocument;je(t).maybeAppend("line",()=>a.createElement("path",{})).style("d",e).call(Ae,r),je(t).maybeAppend("line1",()=>a.createElement("path",{})).style("d",n).call(Ae,i)});function UX(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 Hi=(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=lM(t,["curve","gradient","gradientColor","defined","connect"]),{coordinate:c,document:l}=e;return(u,f,d)=>{const{color:h,lineWidth:p}=d,v=lM(d,["color","lineWidth"]),{color:g=h,size:y=p,seriesColor:m,seriesX:b,seriesY:_}=f,O=SO(c,f),w=$n(c),M=r&&m?OO(m,b,_,r,i,w):g,E=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},v),M&&{stroke:M}),y&&{lineWidth:y}),O&&{transform:O}),s);let A;if(Gn(c)){const R=c.getCenter();A=D=>VX().angle((B,F)=>nc(ur(D[F],R))).radius((B,F)=>Jn(D[F],R)).defined(([B,F])=>a(B)&&a(F)).curve(n)(D)}else A=ho().x(R=>R[0]).y(R=>R[1]).defined(([R,D])=>a(R)&&a(D)).curve(n);const[P,C]=UX(u,a),j=fe(E,"connect"),N=!!C.length;if(!N||o&&!Object.keys(j).length)return je(l.createElement("path",{})).style("d",A(P)||[]).call(Ae,E).node();if(N&&!o)return je(l.createElement("path",{})).style("d",A(u)).call(Ae,E).node();const k=R=>R.map(A).join(",");return je(new XX).style("style1",Object.assign(Object.assign({},E),j)).style("style2",E).style("d1",k(C)).style("d2",A(u)).node()}};Hi.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const uM=(t,e)=>{const{coordinate:n}=e;return(...r)=>{const i=Gn(n)?_g:Al;return Hi(Object.assign({curve:i},t),e)(...r)}};uM.props=Object.assign(Object.assign({},Hi.props),{defaultMarker:"line"});function kg(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 Rg(t,e){this._context=t,this._k=(1-e)/6}Rg.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:kg(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:kg(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 rpt=function t(e){function n(r){return new Rg(r,e)}return n.tension=function(r){return t(+r)},n}(0);function Lg(t,e){this._context=t,this._k=(1-e)/6}Lg.prototype={areaStart:gc,areaEnd:gc,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:kg(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 ipt=function t(e){function n(r){return new Lg(r,e)}return n.tension=function(r){return t(+r)},n}(0);function fM(t,e,n){var r=t._x1,i=t._y1,a=t._x2,o=t._y2;if(t._l01_a>qr){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>qr){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 dM(t,e){this._context=t,this._alpha=e}dM.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:fM(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 apt=function t(e){function n(r){return e?new dM(r,e):new Rg(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function hM(t,e){this._context=t,this._alpha=e}hM.prototype={areaStart:gc,areaEnd:gc,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:fM(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 pM=function t(e){function n(r){return e?new hM(r,e):new Lg(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function vM(t){return t<0?-1:1}function gM(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(vM(a)+vM(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function yM(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function Ng(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 $d(t){this._context=t}$d.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:Ng(this,this._t0,yM(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,Ng(this,yM(this,n=gM(this,t,e)),n);break;default:Ng(this,this._t0,n=gM(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}};function mM(t){this._context=new bM(t)}(mM.prototype=Object.create($d.prototype)).point=function(t,e){$d.prototype.point.call(this,e,t)};function bM(t){this._context=t}bM.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 xM(t){return new $d(t)}function _M(t){return new mM(t)}var qX=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 OM=(t,e)=>{const n=qX(t,[]),{coordinate:r}=e;return(...i)=>{const a=Gn(r)?pM:$n(r)?_M:xM;return Hi(Object.assign({curve:a},n),e)(...i)}};OM.props=Object.assign(Object.assign({},Hi.props),{defaultMarker:"smooth"});function Vd(t,e){this._context=t,this._t=e}Vd.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 wM(t){return new Vd(t,.5)}function SM(t){return new Vd(t,0)}function MM(t){return new Vd(t,1)}const EM=(t,e)=>Hi(Object.assign({curve:MM},t),e);EM.props=Object.assign(Object.assign({},Hi.props),{defaultMarker:"hv"});const AM=(t,e)=>Hi(Object.assign({curve:SM},t),e);AM.props=Object.assign(Object.assign({},Hi.props),{defaultMarker:"vh"});const TM=(t,e)=>Hi(Object.assign({curve:wM},t),e);TM.props=Object.assign(Object.assign({},Hi.props),{defaultMarker:"hvh"});var ZX=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 KX(t,e,n,r,i){const a=ur(n,e),o=Gi(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=vd(e,c),h=vd(n,l),p=vd(h,u),v=vd(n,u),g=ur(v,l),y=ur(n,l),m=ur(e,c),b=ur(m,f),_=ur(e,f),O=ur(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,..._,r/2),t.arcTo(...O,...d,r/2),t.closePath()}const PM=(t,e)=>{const{document:n}=e;return(r,i,a)=>{const{seriesSize:o,color:s}=i,{color:c}=a,l=ZX(a,["color"]),u=Wi();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(In)&&KX(u,d,h,p,v)}return je(n.createElement("path",{})).call(Ae,l).style("fill",s||c).style("d",u.toString()).call(Ae,t).node()}};PM.props=Object.assign(Object.assign({},Hi.props),{defaultMarker:"line"});const CM=()=>(t,e)=>{const{style:n={},encode:r}=e,{series:i}=r,{gradient:a}=n;return!a||i?[t,e]:[t,Dt({},e,{encode:{series:Id(go(t,void 0))}})]};CM.props={};const Ig=()=>(t,e)=>{const{encode:n}=e,{series:r,color:i}=n;if(r!==void 0||i===void 0)return[t,e];const[a,o]=un(n,"color");return[t,Dt({},e,{encode:{series:dr(a,o)}})]};Ig.props={};const kM={line:uM,smooth:OM,hv:EM,vh:AM,hvh:TM,trail:PM},QX=(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(Kn(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]},JX=(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]},RM=()=>(t,e,n,r)=>(dl(r)?JX:QX)(t,e,n,r);RM.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,shape:kM,channels:[...ii({shapes:Object.keys(kM)}),{name:"x"},{name:"y"},{name:"position",independent:!0},{name:"size"},{name:"series",scale:"band"}],preInference:[...gr(),{type:CM},{type:Ig}],postInference:[...Or(),...yc(),...YX()],interaction:{shareTooltip:!0,seriesTooltip:!0,crosshairs:!0}};var tU=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 jg=(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"]];jg.style=["fill"];const LM=jg.bind(void 0);LM.style=["stroke","lineWidth"];const Xd=(t,e,n)=>[["M",t-n,e-n],["L",t+n,e-n],["L",t+n,e+n],["L",t-n,e+n],["Z"]];Xd.style=["fill"];const NM=Xd.bind(void 0);NM.style=["fill"];const IM=Xd.bind(void 0);IM.style=["stroke","lineWidth"];const Dg=(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"]]};Dg.style=["fill"];const jM=Dg.bind(void 0);jM.style=["stroke","lineWidth"];const Bg=(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"]]};Bg.style=["fill"];const DM=Bg.bind(void 0);DM.style=["stroke","lineWidth"];const Fg=(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"]]};Fg.style=["fill"];const BM=Fg.bind(void 0);BM.style=["stroke","lineWidth"];const zg=(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"]]};zg.style=["fill"];const FM=zg.bind(void 0);FM.style=["stroke","lineWidth"];const Gg=(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"]]};Gg.style=["fill"];const zM=Gg.bind(void 0);zM.style=["stroke","lineWidth"];const GM=(t,e,n)=>[["M",t,e+n],["L",t,e-n]];GM.style=["stroke","lineWidth"];const WM=(t,e,n)=>[["M",t-n,e-n],["L",t+n,e+n],["M",t+n,e-n],["L",t-n,e+n]];WM.style=["stroke","lineWidth"];const HM=(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]];HM.style=["stroke","lineWidth"];const YM=(t,e,n)=>[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]];YM.style=["stroke","lineWidth"];const $M=(t,e,n)=>[["M",t-n,e],["L",t+n,e]];$M.style=["stroke","lineWidth"];const Wg=(t,e,n)=>[["M",t-n,e],["L",t+n,e]];Wg.style=["stroke","lineWidth"];const VM=Wg.bind(void 0);VM.style=["stroke","lineWidth"];const XM=(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]];XM.style=["stroke","lineWidth"];const UM=(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]];UM.style=["stroke","lineWidth"];const qM=(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]];qM.style=["stroke","lineWidth"];const ZM=(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]];ZM.style=["stroke","lineWidth"];const KM=(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]];KM.style=["stroke","lineWidth"];const bc=new Map([["bowtie",Gg],["cross",WM],["dash",VM],["diamond",Dg],["dot",Wg],["hexagon",zg],["hollowBowtie",zM],["hollowDiamond",jM],["hollowHexagon",FM],["hollowPoint",LM],["hollowSquare",IM],["hollowTriangle",DM],["hollowTriangleDown",BM],["hv",UM],["hvh",ZM],["hyphen",$M],["line",GM],["plus",YM],["point",jg],["rect",NM],["smooth",XM],["square",Xd],["tick",HM],["triangleDown",Fg],["triangle",Bg],["vh",qM],["vhv",KM]]);function eU(t,e){var{d:n,fill:r,strokeWidth:i,path:a,stroke:o,lineWidth:s,color:c}=e,l=tU(e,["d","fill","strokeWidth","path","stroke","lineWidth","color"]);const u=bc.get(t)||bc.get("point");return(...f)=>new ri({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 opt(t,e){bc.set(t,e)}function spt(t){bc.delete(t)}var nU=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 rU(t,e,n,r){if(e.length===1)return;const{size:i}=n;if(t==="fixed")return i;if(t==="normal"||B_(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 on=(t,e)=>{const{colorAttribute:n,symbol:r,mode:i="auto"}=t,a=nU(t,["colorAttribute","symbol","mode"]),o=bc.get(r)||bc.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]=MO(l),O=rU(i,l,u,s)||a.r||f.r;return je(c.createElement("path",{})).call(Ae,f).style("fill","transparent").style("d",o(m,b,O)).style("lineWidth",p).style("transform",g).style("stroke",v).style(wO(t),y).style(n,v).call(Ae,a).node()}};on.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const QM=(t,e)=>on(Object.assign({colorAttribute:"stroke",symbol:"point"},t),e);QM.props=Object.assign({defaultMarker:"hollowPoint"},on.props);const JM=(t,e)=>on(Object.assign({colorAttribute:"stroke",symbol:"diamond"},t),e);JM.props=Object.assign({defaultMarker:"hollowDiamond"},on.props);const tE=(t,e)=>on(Object.assign({colorAttribute:"stroke",symbol:"hexagon"},t),e);tE.props=Object.assign({defaultMarker:"hollowHexagon"},on.props);const eE=(t,e)=>on(Object.assign({colorAttribute:"stroke",symbol:"square"},t),e);eE.props=Object.assign({defaultMarker:"hollowSquare"},on.props);const nE=(t,e)=>on(Object.assign({colorAttribute:"stroke",symbol:"triangle-down"},t),e);nE.props=Object.assign({defaultMarker:"hollowTriangleDown"},on.props);const rE=(t,e)=>on(Object.assign({colorAttribute:"stroke",symbol:"triangle"},t),e);rE.props=Object.assign({defaultMarker:"hollowTriangle"},on.props);const iE=(t,e)=>on(Object.assign({colorAttribute:"stroke",symbol:"bowtie"},t),e);iE.props=Object.assign({defaultMarker:"hollowBowtie"},on.props);const aE=(t,e)=>on(Object.assign({colorAttribute:"fill",symbol:"point"},t),e);aE.props=Object.assign({defaultMarker:"point"},on.props);const oE=(t,e)=>on(Object.assign({colorAttribute:"stroke",symbol:"plus"},t),e);oE.props=Object.assign({defaultMarker:"plus"},on.props);const sE=(t,e)=>on(Object.assign({colorAttribute:"fill",symbol:"diamond"},t),e);sE.props=Object.assign({defaultMarker:"diamond"},on.props);const cE=(t,e)=>on(Object.assign({colorAttribute:"fill",symbol:"square"},t),e);cE.props=Object.assign({defaultMarker:"square"},on.props);const lE=(t,e)=>on(Object.assign({colorAttribute:"fill",symbol:"triangle"},t),e);lE.props=Object.assign({defaultMarker:"triangle"},on.props);const uE=(t,e)=>on(Object.assign({colorAttribute:"fill",symbol:"hexagon"},t),e);uE.props=Object.assign({defaultMarker:"hexagon"},on.props);const fE=(t,e)=>on(Object.assign({colorAttribute:"stroke",symbol:"cross"},t),e);fE.props=Object.assign({defaultMarker:"cross"},on.props);const dE=(t,e)=>on(Object.assign({colorAttribute:"fill",symbol:"bowtie"},t),e);dE.props=Object.assign({defaultMarker:"bowtie"},on.props);const hE=(t,e)=>on(Object.assign({colorAttribute:"stroke",symbol:"hyphen"},t),e);hE.props=Object.assign({defaultMarker:"hyphen"},on.props);const pE=(t,e)=>on(Object.assign({colorAttribute:"stroke",symbol:"line"},t),e);pE.props=Object.assign({defaultMarker:"line"},on.props);const vE=(t,e)=>on(Object.assign({colorAttribute:"stroke",symbol:"tick"},t),e);vE.props=Object.assign({defaultMarker:"tick"},on.props);const gE=(t,e)=>on(Object.assign({colorAttribute:"fill",symbol:"triangle-down"},t),e);gE.props=Object.assign({defaultMarker:"triangleDown"},on.props);const Ud=()=>(t,e)=>{const{encode:n}=e,{y:r}=n;return r!==void 0?[t,e]:[t,Dt({},e,{encode:{y:Nd(go(t,0))},scale:{y:{guide:null}}})]};Ud.props={};const yE=()=>(t,e)=>{const{encode:n}=e,{size:r}=n;return r!==void 0?[t,e]:[t,Dt({},e,{encode:{size:Id(go(t,3))}})]};yE.props={};const mE={hollow:QM,hollowDiamond:JM,hollowHexagon:tE,hollowSquare:eE,hollowTriangleDown:nE,hollowTriangle:rE,hollowBowtie:iE,point:aE,plus:oE,diamond:sE,square:cE,triangle:lE,hexagon:uE,cross:fE,bowtie:dE,hyphen:hE,line:pE,tick:vE,triangleDown:gE},bE=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=ds(n,r,t),v=y=>{const m=+((u==null?void 0:u[y])||0),b=+((f==null?void 0:f[y])||0),_=s?(+a[y]+ +s[y])/2:+a[y],O=c?(+o[y]+ +c[y])/2:+o[y],w=_+m,M=O+b;return[w,M]},g=l?Array.from(e,y=>{const[m,b]=v(y),_=+l[y],O=_/d,w=_/h,M=[m-O,b-w],E=[m+O,b+w];return[i.map(p(M,y)),i.map(p(E,y))]}):Array.from(e,y=>[i.map(p(v(y),y))]);return[e,g]};bE.props={defaultShape:"hollow",defaultLabelShape:"label",composite:!1,shape:mE,channels:[...ii({shapes:Object.keys(mE)}),{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:[...gr(),{type:ls},{type:Ud}],postInference:[...Or(),{type:yE},...yo()]};const xE=(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 je(new RO).style("x",d).style("y",h).call(Ae,a).style("transform",`${u}rotate(${+l})`).style("coordCenter",n.getCenter()).call(Ae,f).call(Ae,t).node()}};xE.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var Hg=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 iU(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 aU(t){const{min:e,max:n}=t.getLocalBounds();return[(e[0]+n[0])*.5,(e[1]+n[1])*.5]}const oU=rc(t=>{const e=t.attributes,{class:n,x:r,y:i}=e,a=Hg(e,["class","x","y"]),o=fe(a,"marker"),{size:s=24}=o,c=()=>iU(s/2),l=je(t).maybeAppend("marker",()=>new Rn({})).call(d=>d.node().update(Object.assign({symbol:c},o))).node(),[u,f]=aU(l);je(t).maybeAppend("text","text").style("x",u).style("y",f).call(Ae,a)}),_E=(t,e)=>{const n=Hg(t,[]);return(r,i,a)=>{const{color:o}=a,s=Hg(a,["color"]),{color:c=o,text:l=""}=i,u={text:String(l),stroke:c,fill:c},[[f,d]]=r;return je(new oU).call(Ae,s).style("x",f).style("y",d).call(Ae,u).call(Ae,n).node()}};_E.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const qd=()=>(t,e)=>{const{data:n}=e;if(!Array.isArray(n)||n.some(bg))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:dr(i),y:dr(a)}})]};qd.props={};var OE=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 Zd=()=>(t,e)=>{const{data:n,style:r={}}=e,i=OE(e,["data","style"]),{x:a,y:o}=r,s=OE(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:dr([c]),y:dr([l])},scale:{x:{type:"identity",independent:!0,guide:null},y:{type:"identity",independent:!0,guide:null}},style:s})]};Zd.props={};const wE={text:xE,badge:_E},SE=t=>{const{cartesian:e=!1}=t;return e?Ag:(n,r,i,a)=>{const{x:o,y:s}=i,c=ds(r,i,t),l=Array.from(n,u=>{const f=[+o[u],+s[u]];return[a.map(c(f,u))]});return[n,l]}};SE.props={defaultShape:"text",defaultLabelShape:"label",composite:!1,shape:wE,channels:[...ii({shapes:Object.keys(wE)}),{name:"x",required:!0},{name:"y",required:!0},{name:"text",scale:"identity"},{name:"fontSize"},{name:"rotate"}],preInference:[...gr(),{type:qd},{type:Zd}],postInference:[...Or(),...yo()]};const Yg=()=>(t,e)=>[t,Dt({scale:{x:{padding:0},y:{padding:0}}},e)];Yg.props={};const ME={cell:fs,hollow:zd},EE=()=>(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]};EE.props={defaultShape:"cell",defaultLabelShape:"label",shape:ME,composite:!1,channels:[...ii({shapes:Object.keys(ME)}),{name:"x",required:!0,scale:"band"},{name:"y",required:!0,scale:"band"}],preInference:[...gr(),{type:ls},{type:Ud},{type:Yg}],postInference:[...Or(),...yo()]};function $g(t,e,n){var r=null,i=Vn(!0),a=null,o=Al,s=null,c=zv(l);t=typeof t=="function"?t:t===void 0?CO:Vn(+t),e=typeof e=="function"?e:Vn(e===void 0?0:+e),n=typeof n=="function"?n:n===void 0?kO:Vn(+n);function l(f){var d,h,p,v=(f=AO(f)).length,g,y=!1,m,b=new Array(v),_=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],_[p]);s.lineEnd(),s.areaEnd()}y&&(b[d]=+t(g,d,f),_[d]=+e(g,d,f),s.point(r?+r(g,d,f):b[d],n?+n(g,d,f):_[d]))}if(m)return s=null,m+""||null}function u(){return ho().defined(i).curve(o).context(a)}return l.x=function(f){return arguments.length?(t=typeof f=="function"?f:Vn(+f),r=null,l):t},l.x0=function(f){return arguments.length?(t=typeof f=="function"?f:Vn(+f),l):t},l.x1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:Vn(+f),l):r},l.y=function(f){return arguments.length?(e=typeof f=="function"?f:Vn(+f),n=null,l):e},l.y0=function(f){return arguments.length?(e=typeof f=="function"?f:Vn(+f),l):e},l.y1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:Vn(+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:Vn(!!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 sU(){var t=$g().curve(sM),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 zl(n())},delete t.lineX0,t.lineEndAngle=function(){return zl(r())},delete t.lineX1,t.lineInnerRadius=function(){return zl(i())},delete t.lineY0,t.lineOuterRadius=function(){return zl(a())},delete t.lineY1,t.curve=function(o){return arguments.length?e(Cg(o)):e()._curve},t}var cU=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 lU(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 AE=rc(t=>{const{areaPath:e,connectPath:n,areaStyle:r,connectStyle:i}=t.attributes,a=t.ownerDocument;je(t).maybeAppend("connect-path",()=>a.createElement("path",{})).style("d",n).call(Ae,i),je(t).maybeAppend("area-path",()=>a.createElement("path",{})).style("d",e).call(Ae,r)}),ta=(t,e)=>{const{curve:n,gradient:r=!1,defined:i=l=>!Number.isNaN(l)&&l!==void 0&&l!==null,connect:a=!1}=t,o=cU(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=$n(s),m=SO(s,u),b=r&&p?OO(p,v,g,r,void 0,y):h,_=Object.assign(Object.assign(Object.assign(Object.assign({},f),{stroke:b,fill:b}),m&&{transform:m}),o),[O,w]=lU(l,i),M=fe(_,"connect"),E=!!w.length,A=P=>je(c.createElement("path",{})).style("d",P||"").call(Ae,_).node();if(Gn(s)){const P=C=>{const j=s.getCenter(),N=C.slice(0,C.length/2),k=C.slice(C.length/2);return sU().angle((R,D)=>nc(ur(N[D],j))).outerRadius((R,D)=>Jn(N[D],j)).innerRadius((R,D)=>Jn(k[D],j)).defined((R,D)=>[...N[D],...k[D]].every(i)).curve(n)(k)};return!E||a&&!Object.keys(M).length?A(P(O)):E&&!a?A(P(l)):je(new AE).style("areaStyle",_).style("connectStyle",Object.assign(Object.assign({},M),o)).style("areaPath",P(l)).style("connectPath",w.map(P).join("")).node()}else{const P=C=>{const j=C.slice(0,C.length/2),N=C.slice(C.length/2);return y?$g().y((k,R)=>j[R][1]).x1((k,R)=>j[R][0]).x0((k,R)=>N[R][0]).defined((k,R)=>[...j[R],...N[R]].every(i)).curve(n)(j):$g().x((k,R)=>j[R][0]).y1((k,R)=>j[R][1]).y0((k,R)=>N[R][1]).defined((k,R)=>[...j[R],...N[R]].every(i)).curve(n)(j)};return!E||a&&!Object.keys(M).length?A(P(O)):E&&!a?A(P(l)):je(new AE).style("areaStyle",_).style("connectStyle",Object.assign(Object.assign({},M),o)).style("areaPath",P(l)).style("connectPath",w.map(P).join("")).node()}}};ta.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const TE=(t,e)=>{const{coordinate:n}=e;return(...r)=>{const i=Gn(n)?_g:Al;return ta(Object.assign({curve:i},t),e)(...r)}};TE.props=Object.assign(Object.assign({},ta.props),{defaultMarker:"square"});var uU=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 PE=(t,e)=>{const n=uU(t,[]),{coordinate:r}=e;return(...i)=>{const a=Gn(r)?pM:$n(r)?_M:xM;return ta(Object.assign({curve:a},n),e)(...i)}};PE.props=Object.assign(Object.assign({},ta.props),{defaultMarker:"smooth"});const CE=(t,e)=>(...n)=>ta(Object.assign({curve:wM},t),e)(...n);CE.props=Object.assign(Object.assign({},ta.props),{defaultMarker:"hvh"});const kE=(t,e)=>(...n)=>ta(Object.assign({curve:SM},t),e)(...n);kE.props=Object.assign(Object.assign({},ta.props),{defaultMarker:"vh"});const RE=(t,e)=>(...n)=>ta(Object.assign({curve:MM},t),e)(...n);RE.props=Object.assign(Object.assign({},ta.props),{defaultMarker:"hv"});const LE={area:TE,smooth:PE,hvh:CE,vh:kE,hv:RE},NE=()=>(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(Kn(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 _=0;_<y.length;_++){const O=y[_];b[_]=r.map([+o[O]+p,+s[O]+v]),b[m+_]=r.map([+o[O]+p,+c[O]+v])}return b});return[h,g,d]};NE.props={defaultShape:"area",defaultLabelShape:"label",composite:!1,shape:LE,channels:[...ii({shapes:Object.keys(LE)}),{name:"x",required:!0},{name:"y",required:!0},{name:"size"},{name:"series",scale:"band"}],preInference:[...gr(),{type:Ig},{type:jl},{type:Yg}],postInference:[...Or(),...yc()],interaction:{shareTooltip:!0,seriesTooltip:!0,crosshairs:!0}};const IE=()=>(t,e)=>{const{encode:n}=e,{y1:r}=n;if(r)return[t,e];const[i]=un(n,"y");return[t,Dt({},e,{encode:{y1:dr([...i])}})]};IE.props={};const jE=()=>(t,e)=>{const{encode:n}=e,{x1:r}=n;if(r)return[t,e];const[i]=un(n,"x");return[t,Dt({},e,{encode:{x1:dr([...i])}})]};jE.props={};var DE=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 Vg=(t,e)=>{const{arrow:n=!0,arrowSize:r="40%"}=t,i=DE(t,["arrow","arrowSize"]),{document:a}=e;return(o,s,c)=>{const{defaultColor:l}=c,u=DE(c,["defaultColor"]),{color:f=l,transform:d}=s,[h,p]=o,v=Wi();if(v.moveTo(...h),v.lineTo(...p),n){const[g,y]=lW(h,p,{arrowSize:r});v.moveTo(...p),v.lineTo(...g),v.moveTo(...p),v.lineTo(...y)}return je(a.createElement("path",{})).call(Ae,u).style("d",v.toString()).style("stroke",f).style("transform",d).call(Ae,i).node()}};Vg.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const BE=(t,e)=>{const{arrow:n=!1}=t;return(...r)=>Vg(Object.assign(Object.assign({},t),{arrow:n}),e)(...r)};BE.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var FE=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 zE=(t,e)=>{const n=FE(t,[]),{coordinate:r,document:i}=e;return(a,o,s)=>{const{color:c}=s,l=FE(s,["color"]),{color:u=c,transform:f}=o,[d,h]=a,p=Wi();if(p.moveTo(d[0],d[1]),Gn(r)){const v=r.getCenter();p.quadraticCurveTo(v[0],v[1],h[0],h[1])}else{const v=_O(d,h),g=Jn(d,h)/2;El(p,d,h,v,g)}return je(i.createElement("path",{})).call(Ae,l).style("d",p.toString()).style("stroke",u).style("transform",f).call(Ae,n).node()}};zE.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var GE=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 WE=(t,e)=>{const n=GE(t,[]),{document:r}=e;return(i,a,o)=>{const{color:s}=o,c=GE(o,["color"]),{color:l=s,transform:u}=a,[f,d]=i,h=Wi();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]),je(r.createElement("path",{})).call(Ae,c).style("d",h.toString()).style("stroke",l).style("transform",u).call(Ae,n).node()}};WE.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var HE=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 fU(t,e,n,r){const i=Wi();if(Gn(n)){const a=n.getCenter(),o=Jn(t,a),c=(Jn(e,a)-o)*r+o;return i.moveTo(t[0],t[1]),El(i,t,e,a,c),i.lineTo(e[0],e[1]),i}return $n(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 YE=(t,e)=>{const{cornerRatio:n=1/3}=t,r=HE(t,["cornerRatio"]),{coordinate:i,document:a}=e;return(o,s,c)=>{const{defaultColor:l}=c,u=HE(c,["defaultColor"]),{color:f=l,transform:d}=s,[h,p]=o,v=fU(h,p,i,n);return je(a.createElement("path",{})).call(Ae,u).style("d",v.toString()).style("stroke",f).style("transform",d).call(Ae,r).node()}};YE.props={defaultMarker:"vhv",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const $E={link:BE,arc:zE,smooth:WE,vhv:YE},Xg=t=>(e,n,r,i)=>{const{x:a,y:o,x1:s=a,y1:c=o}=r,l=ds(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]};Xg.props={defaultShape:"link",defaultLabelShape:"label",composite:!1,shape:$E,channels:[...ii({shapes:Object.keys($E)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...gr(),{type:IE},{type:jE}],postInference:[...Or(),...yo()]};var dU=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 VE=(t,e)=>{const{coordinate:n,document:r}=e;return(i,a,o)=>{const{color:s}=o,c=dU(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"?Yd(h)*y:h,p=typeof p=="string"?Yd(p)*m:p;const b=v-Number(h)/2,_=g-Number(p)/2;return je(r.createElement("image",{})).call(Ae,c).style("x",b).style("y",_).style("img",u).style("stroke",l).style("transform",d).call(Ae,t).style("width",h).style("height",p).node()}};VE.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const XE={image:VE},UE=t=>{const{cartesian:e}=t;return e?Ag:(n,r,i,a)=>{const{x:o,y:s}=i,c=ds(r,i,t),l=Array.from(n,u=>{const f=[+o[u],+s[u]];return[a.map(c(f,u))]});return[n,l]}};UE.props={defaultShape:"image",defaultLabelShape:"label",composite:!1,shape:XE,channels:[...ii({shapes:Object.keys(XE)}),{name:"x",required:!0},{name:"y",required:!0},{name:"src",scale:"identity"},{name:"size"}],preInference:[...gr(),{type:qd},{type:Zd}],postInference:[...Or(),...yo()]};var hU=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 pU(t,e){const n=Wi();if(Gn(e)){const r=e.getCenter(),i=[...t,t[0]],a=i.map(o=>Jn(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?El(n,l,o,r,c):n.lineTo(o[0],o[1])}),n.closePath(),n}return cW(n,t)}const qE=(t,e)=>{const{coordinate:n,document:r}=e;return(i,a,o)=>{const{color:s}=o,c=hU(o,["color"]),{color:l=s,transform:u}=a,f=pU(i,n);return je(r.createElement("path",{})).call(Ae,c).style("d",f.toString()).style("stroke",l).style("fill",l).style("transform",u).call(Ae,t).node()}};qE.props={defaultMarker:"square",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var ZE=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 vU(t,e){const[n,r,i,a]=t,o=Wi();if(Gn(e)){const s=e.getCenter(),c=Jn(s,n);return o.moveTo(n[0],n[1]),o.quadraticCurveTo(s[0],s[1],i[0],i[1]),El(o,i,a,s,c),o.quadraticCurveTo(s[0],s[1],r[0],r[1]),El(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 KE=(t,e)=>{const n=ZE(t,[]),{coordinate:r,document:i}=e;return(a,o,s)=>{const{color:c}=s,l=ZE(s,["color"]),{color:u=c,transform:f}=o,d=vU(a,r);return je(i.createElement("path",{})).call(Ae,l).style("d",d.toString()).style("fill",u||c).style("stroke",u||c).style("transform",f).call(Ae,n).node()}};KE.props={defaultMarker:"square",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const QE={polygon:qE,ribbon:KE},JE=()=>(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]};JE.props={defaultShape:"polygon",defaultLabelShape:"label",composite:!1,shape:QE,channels:[...ii({shapes:Object.keys(QE)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...gr()],postInference:[...Or(),...yo()]};var gU=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 yU(t,e){const n=Wi();if(!Gn(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=Gi(ur(t[0],r)),s=Gi(ur(t[1],r)),c=Jn(r,t[2]),l=Jn(r,t[3]),u=Jn(r,t[8]),f=Jn(r,t[10]),d=Jn(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 tA=(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=gU(o,["color","fill","stroke"]),h=yU(i,n);return je(r.createElement("path",{})).call(Ae,d).style("d",h.toString()).style("stroke",f).style("fill",s||u).style("transform",c).call(Ae,t).node()}};tA.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var mU=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 bU(t,e,n=4){const r=Wi();if(!Gn(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=Jn(i,t[3]),c=Jn(i,t[8]),l=Jn(i,t[10]),u=Gi(ur(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 eA=(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=mU(o,["color","fill","stroke"]),p=bU(i,n,l);return je(r.createElement("path",{})).call(Ae,h).style("d",p.toString()).style("stroke",d).style("fill",s||f).style("transform",c).call(Ae,t).node()}};eA.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const nA={box:tA,violin:eA},rA=()=>(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,[_,O,w,M,E]=[+a[p],+o[p],+s[p],+c[p],+l[p]];return[[b-y/2,E],[b+y/2,E],[b,E],[b,M],[b-y/2,M],[b+y/2,M],[b+y/2,O],[b-y/2,O],[b-y/2,w],[b+y/2,w],[b,O],[b,_],[b-y/2,_],[b+y/2,_]].map(P=>r.map(P))});return[t,h]};rA.props={defaultShape:"box",defaultLabelShape:"label",composite:!1,shape:nA,channels:[...ii({shapes:Object.keys(nA)}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"}],preInference:[...gr(),{type:ls}],postInference:[...Or(),...yc()],interaction:{shareTooltip:!0}};const iA={vector:Vg},aA=()=>(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]};aA.props={defaultShape:"vector",defaultLabelShape:"label",composite:!1,shape:iA,channels:[...ii({shapes:Object.keys(iA)}),{name:"x",required:!0},{name:"y",required:!0},{name:"rotate",required:!0,scale:"identity"},{name:"size",required:!0}],preInference:[...gr()],postInference:[...Or(),...yo()]};var oA=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 xU(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 _U(t,e){if(!Gn(e))return ho().x(r=>r[0]).y(r=>r[1])(t);const n=e.getCenter();return Bd()({startAngle:0,endAngle:Math.PI*2,outerRadius:Jn(t[0],n),innerRadius:Jn(t[1],n)})}function OU(t,e){if(!Gn(t))return e;const[n,r]=t.getCenter();return`translate(${n}, ${r}) ${e||""}`}const Ug=(t,e)=>{const{arrow:n,arrowSize:r=4}=t,i=oA(t,["arrow","arrowSize"]),{coordinate:a,document:o}=e;return(s,c,l)=>{const{color:u,lineWidth:f}=l,d=oA(l,["color","lineWidth"]),{color:h=u,size:p=f}=c,v=n?xU(o,r,Object.assign({fill:i.stroke||h,stroke:i.stroke||h},fe(i,"arrow"))):null,g=_U(s,a),y=OU(a,c.transform);return je(o.createElement("path",{})).call(Ae,d).style("d",g).style("stroke",h).style("lineWidth",p).style("transform",y).style("markerEnd",v).call(Ae,i).node()}};Ug.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const sA=()=>(t,e)=>{const{data:n}=e;return!Array.isArray(n)||n.some(bg)?[t,e]:[t,Dt({},e,{encode:{x:dr(n)}})]};sA.props={};const cA={line:Ug},lA=t=>(e,n,r,i)=>{const{x:a}=r,o=ds(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]};lA.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,shape:cA,channels:[...mc({shapes:Object.keys(cA)}),{name:"x",required:!0}],preInference:[...gr(),{type:sA}],postInference:[...Or()]};const uA=()=>(t,e)=>{const{data:n}=e;return!Array.isArray(n)||n.some(bg)?[t,e]:[t,Dt({},e,{encode:{y:dr(n)}})]};uA.props={};const fA={line:Ug},dA=t=>(e,n,r,i)=>{const{y:a}=r,o=ds(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]};dA.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,shape:fA,channels:[...mc({shapes:Object.keys(fA)}),{name:"y",required:!0}],preInference:[...gr(),{type:uA}],postInference:[...Or()]};var hA=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 wU(t,e,n){return[["M",t,e],["L",t+2*n,e-n],["L",t+2*n,e+n],["Z"]]}function SU(t){return ho().x(e=>e[0]).y(e=>e[1])(t)}function MU(t,e,n,r,i=0){const[[a,o],[s,c]]=e;if($n(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 pA=(t,e)=>{const{offset:n=0,offset1:r=n,offset2:i=n,connectLength1:a,endMarker:o=!0}=t,s=hA(t,["offset","offset1","offset2","connectLength1","endMarker"]),{coordinate:c}=e;return(l,u,f)=>{const{color:d,connectLength1:h}=f,p=hA(f,["color","connectLength1"]),{color:v,transform:g}=u,y=MU(c,l,r,i,a!=null?a:h),m=fe(Object.assign(Object.assign({},s),f),"endMarker");return je(new ri).call(Ae,p).style("path",SU(y)).style("stroke",v||d).style("transform",g).style("markerEnd",o?new Rn({className:"marker",style:Object.assign(Object.assign({},m),{symbol:wU})}):null).call(Ae,s).node()}};pA.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const vA={connector:pA},gA=(...t)=>Xg(...t);gA.props={defaultShape:"connector",defaultLabelShape:"label",composite:!1,shape:vA,channels:[...mc({shapes:Object.keys(vA)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...gr()],postInference:[...Or()]};function yA(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 qg(t={}){const{extendX:e=!1,extendY:n=!1}=t;return(r,i,a,o)=>{const s=yA("x",e,a,i.x),c=yA("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 mA={range:fs},bA=()=>qg();bA.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,shape:mA,channels:[...mc({shapes:Object.keys(mA)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...gr()],postInference:[...Or()]};const xA={range:fs},_A=()=>qg({extendY:!0});_A.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,shape:xA,channels:[...mc({shapes:Object.keys(xA)}),{name:"x",required:!0}],preInference:[...gr()],postInference:[...Or()]};const OA={range:fs},wA=()=>qg({extendX:!0});wA.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,shape:OA,channels:[...mc({shapes:Object.keys(OA)}),{name:"y",required:!0}],preInference:[...gr()],postInference:[...Or()]};var SA=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 Zg=(t,e)=>{const{arrow:n,colorAttribute:r}=t,i=SA(t,["arrow","colorAttribute"]),{coordinate:a,document:o}=e;return(s,c,l)=>{const{color:u,stroke:f}=l,d=SA(l,["color","stroke"]),{d:h,color:p=u}=c,[v,g]=a.getSize();return je(o.createElement("path",{})).call(Ae,d).style("d",typeof h=="function"?h({width:v,height:g}):h).style(r,p).call(Ae,i).node()}};Zg.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const MA=(t,e)=>Zg(Object.assign({colorAttribute:"fill"},t),e);MA.props={defaultMarker:"hvh",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const EA=(t,e)=>Zg(Object.assign({fill:"none",colorAttribute:"stroke"},t),e);EA.props={defaultMarker:"hvh",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const AA={path:MA,hollow:EA},TA=t=>(e,n,r,i)=>[e,e.map(()=>[[0,0]])];TA.props={defaultShape:"path",defaultLabelShape:"label",shape:AA,composite:!1,channels:[...ii({shapes:Object.keys(AA)}),{name:"d",scale:"identity"}],preInference:[...gr()],postInference:[...Or()]};var EU=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 PA=(t,e)=>{const{render:n}=t,r=EU(t,["render"]);return i=>{const[[a,o]]=i;return n(Object.assign(Object.assign({},r),{x:a,y:o}),e)}};PA.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const CA=()=>(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])))})]};CA.props={};const AU={shape:PA},kA=t=>{const{cartesian:e}=t;return e?Ag:(n,r,i,a)=>{const{x:o,y:s}=i,c=ds(r,i,t),l=Array.from(n,u=>{const f=[+o[u],+s[u]];return[a.map(c(f,u))]});return[n,l]}};kA.props={defaultShape:"shape",defaultLabelShape:"label",composite:!1,shape:AU,channels:[{name:"x",required:!0},{name:"y",required:!0}],preInference:[...gr(),{type:qd},{type:Zd},{type:CA}]};var TU=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 RA=(t,e)=>{const{document:n}=e;return(r,i,a)=>{const{transform:o}=i,{color:s}=a,c=TU(a,["color"]),{color:l=s}=i,[u,...f]=r,d=Wi();return d.moveTo(...u),f.forEach(([h,p])=>{d.lineTo(h,p)}),d.closePath(),je(n.createElement("path",{})).call(Ae,c).style("d",d.toString()).style("stroke",l||s).style("fill",l||s).style("fillOpacity",.4).style("transform",o).call(Ae,t).node()}};RA.props={defaultMarker:"square",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const LA={density:RA},NA=()=>(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]};NA.props={defaultShape:"density",defaultLabelShape:"label",composite:!1,shape:LA,channels:[...ii({shapes:Object.keys(LA)}),{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:[...gr(),{type:jl},{type:ls}],postInference:[...Or(),...yc()],interaction:{shareTooltip:!0}};const cpt=gv(3);function PU(t,e=(...r)=>`${r[0]}`,n=16){const r=gv(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 CU(t){return typeof t=="string"?t.split(" ").map(e=>{const[n,r]=e.split(":");return[+n,r]}):t}function Kd(t,e,n){const r=t?t():document.createElement("canvas");return r.width=e,r.height=n,r}const kU=PU((t,e,n)=>{const r=Kd(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 RU(t,e){const r=Kd(e,256,1).getContext("2d"),i=r.createLinearGradient(0,0,256,1);return CU(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 LU(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=kU(f,1-o,a),g=(d-e)/(n-e);t.globalAlpha=Math.max(g,.001),t.drawImage(v,h,p)}return t}function NU(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 IU(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=Kd(o,t,e).getContext("2d"),u=RU(s.gradient,o);l.clearRect(0,0,t,e),LU(l,n,r,i,s,o);const f=NU(l,t,e,u,s),h=Kd(o,t,e).getContext("2d");return h.putImageData(f,0,0),h}var jU=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 DU(t,e){return Object.keys(t).reduce((n,r)=>{const i=t[r];return e(i,r)||(n[r]=i),n},{})}const IA=(t,e)=>{const{gradient:n,opacity:r,maxOpacity:i,minOpacity:a,blur:o,useGradientOpacity:s}=t,c=jU(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(M=>({x:M[0],y:M[1],value:M[2],radius:M[3]})),b=Ei(d,M=>M[2]),_=Mn(d,M=>M[2]),w=g&&y?IU(g,y,b,_,m,DU({gradient:n,opacity:r,minOpacity:a,maxOpacity:i,blur:o,useGradientOpacity:s},M=>M===void 0),u):{canvas:null};return je(f.createElement("image",{})).call(Ae,p).style("x",0).style("y",0).style("width",g).style("height",y).style("src",w.canvas).style("transform",v).call(Ae,c).node()}};IA.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const jA={heatmap:IA},DA=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]]};DA.props={defaultShape:"heatmap",defaultLabelShape:"label",composite:!1,shape:jA,channels:[...ii({shapes:Object.keys(jA)}),{name:"x",required:!0},{name:"y",required:!0},{name:"color",scale:"identity",required:!0},{name:"size"}],preInference:[...gr(),{type:ls},{type:Ud}],postInference:[...Or(),...yo()]};const BA=()=>["#5B8FF9","#5AD8A6","#5D7092","#F6BD16","#6F5EF9","#6DC8EC","#945FB9","#FF9845","#1E9493","#FF99C3"];BA.props={};const FA=()=>["#5B8FF9","#CDDDFD","#5AD8A6","#CDF3E4","#5D7092","#CED4DE","#F6BD16","#FCEBB9","#6F5EF9","#D3CEFD","#6DC8EC","#D3EEF9","#945FB9","#DECFEA","#FF9845","#FFE0C7","#1E9493","#BBDEDE","#FF99C3","#FFE0ED"];FA.props={};const zA=t=>new Vr(t);zA.props={};const Qd=Symbol("defaultUnknown");function GA(t,e,n){for(let r=0;r<e.length;r+=1)t.has(e[r])||t.set(n(e[r]),r)}function WA(t){const{value:e,from:n,to:r,mapper:i,notFoundReturn:a}=t;let o=i.get(e);if(o===void 0){if(a!==Qd)return a;o=n.push(e)-1,i.set(e,o)}return r[o%r.length]}function HA(t){return t instanceof Date?e=>`${e}`:typeof t=="object"?e=>JSON.stringify(e):e=>e}class Jd extends xl{getDefaultOptions(){return{domain:[],range:[],unknown:Qd}}constructor(e){super(e)}map(e){return this.domainIndexMap.size===0&&GA(this.domainIndexMap,this.getDomain(),this.domainKey),WA({value:this.domainKey(e),mapper:this.domainIndexMap,from:this.getDomain(),to:this.getRange(),notFoundReturn:this.options.unknown})}invert(e){return this.rangeIndexMap.size===0&&GA(this.rangeIndexMap,this.getRange(),this.rangeKey),WA({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=HA(n),this.rangeKey=HA(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 Jd(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 YA=t=>new Jd(t);YA.props={};function $A({map:t,initKey:e},n){const r=e(n);return t.has(r)?t.get(r):n}function BU({map:t,initKey:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function FU({map:t,initKey:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function zU(t){return typeof t=="object"?t.valueOf():t}class VA extends Map{constructor(e){if(super(),this.map=new Map,this.initKey=zU,e!==null)for(const[n,r]of e)this.set(n,r)}get(e){return super.get($A({map:this.map,initKey:this.initKey},e))}has(e){return super.has($A({map:this.map,initKey:this.initKey},e))}set(e,n){return super.set(BU({map:this.map,initKey:this.initKey},e),n)}delete(e){return super.delete(FU({map:this.map,initKey:this.initKey},e))}}function GU(t){const e=Math.min(...t);return t.map(n=>n/e)}function WU(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 HU(t){return Math.round(t*1e12)/1e12}function YU(t){const{domain:e,range:n,paddingOuter:r,paddingInner:i,flex:a,round:o,align:s}=t,c=e.length,l=WU(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=GU(l),m=y.reduce((j,N)=>j+N),b=g/m,_=new VA(e.map((j,N)=>{const k=y[N]*b;return[j,o?Math.floor(k):k]})),O=new VA(e.map((j,N)=>{const R=y[N]*b+v;return[j,o?Math.floor(R):R]})),w=Array.from(O.values()).reduce((j,N)=>j+N),E=(d-(w-w/c*i))*s,A=u+E;let P=o?Math.round(A):A;const C=new Array(c);for(let j=0;j<c;j+=1){C[j]=HU(P);const N=e[j];P+=O.get(N)}return{valueBandWidth:_,valueStep:O,adjustedRange:C}}function $U(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 YU(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 mo extends Jd{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,paddingInner:0,paddingOuter:0,padding:0,unknown:Qd,flex:[]}}constructor(e){super(e)}clone(){return new mo(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}=$U({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 XA=t=>new mo(t);XA.props={};class th extends xl{getDefaultOptions(){return{domain:[0,1],range:[0,1],tickCount:5,unknown:void 0,tickMethod:Rv}}map(e){return od(e)?e:this.options.unknown}invert(e){return this.map(e)}clone(){return new th(this.options)}getTicks(){const{domain:e,tickCount:n,tickMethod:r}=this.options,[i,a]=e;return!Zs(i)||!Zs(a)?[]:r(i,a,n)}}const UA=t=>new th(t);UA.props={};class Kg extends mo{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,padding:0,unknown:Qd,paddingInner:1,paddingOuter:0}}constructor(e){super(e)}getPaddingInner(){return 1}clone(){return new Kg(this.options)}update(e){super.update(e)}getPaddingOuter(){return this.options.padding}}const qA=t=>new Kg(t);qA.props={};var ZA=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,bo="\\d\\d?",xo="\\d\\d",VU="\\d{3}",XU="\\d{4}",Gl="[^\\s]+",KA=/\[([^]*?)\]/gm;function QA(t,e){for(var n=[],r=0,i=t.length;r<i;r++)n.push(t[r].substr(0,e));return n}var JA=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 hs(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 tT=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],eT=["January","February","March","April","May","June","July","August","September","October","November","December"],UU=QA(eT,3),qU=QA(tT,3),nT={dayNamesShort:qU,dayNames:tT,monthNamesShort:UU,monthNames:eT,amPm:["am","pm"],DoFn:function(t){return t+["th","st","nd","rd"][t%10>3?0:(t-t%10!==10?1:0)*t%10]}},eh=hs({},nT),ZU=function(t){return eh=hs(eh,t)},rT=function(t){return t.replace(/[|\\{()[^$+*?.-]/g,"\\$&")},yi=function(t,e){for(e===void 0&&(e=2),t=String(t);t.length<e;)t="0"+t;return t},KU={D:function(t){return String(t.getDate())},DD:function(t){return yi(t.getDate())},Do:function(t,e){return e.DoFn(t.getDate())},d:function(t){return String(t.getDay())},dd:function(t){return yi(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 yi(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 yi(String(t.getFullYear()),4).substr(2)},YYYY:function(t){return yi(t.getFullYear(),4)},h:function(t){return String(t.getHours()%12||12)},hh:function(t){return yi(t.getHours()%12||12)},H:function(t){return String(t.getHours())},HH:function(t){return yi(t.getHours())},m:function(t){return String(t.getMinutes())},mm:function(t){return yi(t.getMinutes())},s:function(t){return String(t.getSeconds())},ss:function(t){return yi(t.getSeconds())},S:function(t){return String(Math.round(t.getMilliseconds()/100))},SS:function(t){return yi(Math.round(t.getMilliseconds()/10),2)},SSS:function(t){return yi(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?"-":"+")+yi(Math.floor(Math.abs(e)/60)*100+Math.abs(e)%60,4)},Z:function(t){var e=t.getTimezoneOffset();return(e>0?"-":"+")+yi(Math.floor(Math.abs(e)/60),2)+":"+yi(Math.abs(e)%60,2)}},iT=function(t){return+t-1},aT=[null,bo],oT=[null,Gl],sT=["isPm",Gl,function(t,e){var n=t.toLowerCase();return n===e.amPm[0]?0:n===e.amPm[1]?1:null}],cT=["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}],QU={D:["day",bo],DD:["day",xo],Do:["day",bo+Gl,function(t){return parseInt(t,10)}],M:["month",bo,iT],MM:["month",xo,iT],YY:["year",xo,function(t){var e=new Date,n=+(""+e.getFullYear()).substr(0,2);return+(""+(+t>68?n-1:n)+t)}],h:["hour",bo,void 0,"isPm"],hh:["hour",xo,void 0,"isPm"],H:["hour",bo],HH:["hour",xo],m:["minute",bo],mm:["minute",xo],s:["second",bo],ss:["second",xo],YYYY:["year",XU],S:["millisecond","\\d",function(t){return+t*100}],SS:["millisecond",xo,function(t){return+t*10}],SSS:["millisecond",VU],d:aT,dd:aT,ddd:oT,dddd:oT,MMM:["month",Gl,JA("monthNamesShort")],MMMM:["month",Gl,JA("monthNames")],a:sT,A:sT,ZZ:cT,Z:cT},nh={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"},JU=function(t){return hs(nh,t)},lT=function(t,e,n){if(e===void 0&&(e=nh.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=nh[e]||e;var r=[];e=e.replace(KA,function(a,o){return r.push(o),"@@@"});var i=hs(hs({},eh),n);return e=e.replace(ZA,function(a){return KU[a](t,i)}),e.replace(/@@@/g,function(){return r.shift()})};function tq(t,e,n){if(n===void 0&&(n={}),typeof e!="string")throw new Error("Invalid format in fecha parse");if(e=nh[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(KA,function(_,O){return o.push(rT(O)),"@@@"}),c={},l={};s=rT(s).replace(ZA,function(_){var O=QU[_],w=O[0],M=O[1],E=O[3];if(c[w])throw new Error("Invalid format. "+w+" specified twice in format");return c[w]=!0,E&&(l[E]=!0),a.push(O),"("+M+")"}),Object.keys(l).forEach(function(_){if(!c[_])throw new Error("Invalid format. "+_+" 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=hs(hs({},eh),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 lpt={format:lT,parse:tq,defaultI18n:nT,setGlobalDateI18n:ZU,setGlobalDateMasks:JU},upt=null;const Wl=1e3,Hl=Wl*60,Yl=Hl*60,ps=Yl*24,xc=ps*7,uT=ps*30,fT=ps*365;function Zr(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 eq=Zr(1,t=>t,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),nq=Zr(Wl,t=>{t.setMilliseconds(0)},(t,e=1)=>{t.setTime(+t+Wl*e)},t=>t.getSeconds()),rq=Zr(Hl,t=>{t.setSeconds(0,0)},(t,e=1)=>{t.setTime(+t+Hl*e)},t=>t.getMinutes()),iq=Zr(Yl,t=>{t.setMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+Yl*e)},t=>t.getHours()),aq=Zr(ps,t=>{t.setHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+ps*e)},t=>t.getDate()-1),dT=Zr(uT,t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e=1)=>{const n=t.getMonth();t.setMonth(n+e)},t=>t.getMonth()),oq=Zr(xc,t=>{t.setDate(t.getDate()-t.getDay()%7),t.setHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+xc*e)},t=>{const e=dT.floor(t),n=new Date(+t);return Math.floor((+n-+e)/xc)}),sq=Zr(fT,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()),hT={millisecond:eq,second:nq,minute:rq,hour:iq,day:aq,week:oq,month:dT,year:sq},cq=Zr(1,t=>t,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),lq=Zr(Wl,t=>{t.setUTCMilliseconds(0)},(t,e=1)=>{t.setTime(+t+Wl*e)},t=>t.getUTCSeconds()),uq=Zr(Hl,t=>{t.setUTCSeconds(0,0)},(t,e=1)=>{t.setTime(+t+Hl*e)},t=>t.getUTCMinutes()),fq=Zr(Yl,t=>{t.setUTCMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+Yl*e)},t=>t.getUTCHours()),dq=Zr(ps,t=>{t.setUTCHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+ps*e)},t=>t.getUTCDate()-1),pT=Zr(uT,t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e=1)=>{const n=t.getUTCMonth();t.setUTCMonth(n+e)},t=>t.getUTCMonth()),hq=Zr(xc,t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7)%7),t.setUTCHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+xc*e)},t=>{const e=pT.floor(t),n=new Date(+t);return Math.floor((+n-+e)/xc)}),pq=Zr(fT,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()),vT={millisecond:cq,second:lq,minute:uq,hour:fq,day:dq,week:hq,month:pT,year:pq};function vq(t){const e=t?vT:hT,{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 gT(t,e,n,r,i){const a=+t,o=+e,{tickIntervals:s,year:c,millisecond:l}=vq(i),u=([g,y])=>g.duration*y,f=r?(o-a)/r:n||5,d=r||(o-a)/f,h=s.length,p=Mv(s,d,0,h,u);let v;if(p===h){const g=B2(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(B2(a,o,f),1);v=[l,g]}return v}const gq=(t,e,n,r,i)=>{const a=t>e,o=a?e:t,s=a?t:e,[c,l]=gT(o,s,n,r,i),u=c.range(o,new Date(+s+1),l,!0);return a?u.reverse():u},yq=(t,e,n,r,i)=>{const a=t>e,o=a?e:t,s=a?t:e,[c,l]=gT(o,s,n,r,i),u=[c.floor(o,l),c.ceil(s,l)];return a?u.reverse():u};function mq(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 bq(t){const e=t.getTimezoneOffset(),n=new Date(t);return n.setMinutes(n.getMinutes()+e,n.getSeconds(),n.getMilliseconds()),n}class Qg extends cd{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:gq,interpolate:Qs,mask:void 0,utc:!1}}chooseTransforms(){return[r=>+r,r=>new Date(r)]}chooseNice(){return yq}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?vT:hT,i=n?bq:ts;return a=>lT(i(a),e||mq(a,r))}clone(){return new Qg(this.options)}}const yT=t=>new Qg(t);yT.props={};const mT=t=>e=>-t(-e),Jg=(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?mT(r):r},ty=(t,e)=>{const n=t===Math.E?Math.exp:r=>wr(t,r);return e?mT(n):n},xq=(t,e,n,r=10)=>{const i=t<0,a=ty(r,i),o=Jg(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=es(c,l,n))}else{const h=n===-1?f-u:Math.min(f-u,n);d=es(u,f,h).map(a)}return s?d.reverse():d},_q=(t,e,n,r)=>{const i=t<0,a=Jg(r,i),o=ty(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 ey extends cd{getDefaultOptions(){return{domain:[1,10],range:[0,1],base:10,interpolate:_l,tickMethod:xq,tickCount:5}}chooseNice(){return _q}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[Jg(e,r),ty(e,r)]}clone(){return new ey(this.options)}}const bT=t=>new ey(t);bT.props={};const Oq=t=>e=>e<0?-wr(-e,t):wr(e,t),wq=t=>e=>e<0?-wr(-e,1/t):wr(e,1/t),Sq=t=>t<0?-Math.sqrt(-t):Math.sqrt(t);class rh extends cd{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,exponent:2,interpolate:_l,tickMethod:es,tickCount:5}}constructor(e){super(e)}chooseTransforms(){const{exponent:e}=this.options;if(e===1)return[ts,ts];const n=e===.5?Sq:Oq(e),r=wq(e);return[n,r]}clone(){return new rh(this.options)}}const xT=t=>new rh(t);xT.props={};class ny extends rh{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:_l,tickMethod:es,tickCount:5,exponent:.5}}constructor(e){super(e)}update(e){super.update(e)}clone(){return new ny(this.options)}}const _T=t=>new ny(t);_T.props={};const OT=t=>new Js(t);OT.props={};const wT=t=>new pd(t);wT.props={};const ST=t=>new hd(t);ST.props={};const Mq=t=>e=>{const n=t(e);return Zs(n)?Math.round(n):n};function Eq(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?Mq(o):o;this.output=Ks(l,c,i,r)},n.prototype.invert=void 0}}var Aq=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},ry;function Tq(t){return[t(0),t(1)]}const Pq=t=>{const[e,n]=t;return Ks(Qs(0,1),ad(e,n))};let iy=ry=class extends Vr{getDefaultOptions(){return{domain:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:ts,tickMethod:es,tickCount:5}}constructor(e){super(e)}clone(){return new ry(this.options)}};iy=ry=Aq([Eq(Tq,Pq)],iy);const MT=t=>new iy(t);MT.props={};const ET=t=>new Sl(t);ET.props={};function ay({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 Cq=ay({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}),oy=t=>Dt({},Cq,t);oy.props={};const AT=t=>Dt({},oy(),{category10:"category10",category20:"category20"},t);AT.props={};const kq=ay({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}),TT=t=>Dt({},kq,{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),PT=t=>Object.assign({},TT(),{category10:"category10",category20:"category20"},t);PT.props={};const Rq=ay({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}),CT=t=>Dt({},Rq,{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);CT.props={};const kT=t=>(...e)=>{const n=lo(Object.assign({},{crossPadding:50},t))(...e);return q2(n,t),n};kT.props=Object.assign(Object.assign({},lo.props),{defaultPosition:"bottom"});function ppt(){}const RT=t=>(...e)=>{const n=lo(Object.assign({},{crossPadding:10},t))(...e);return q2(n,t),n};RT.props=Object.assign(Object.assign({},lo.props),{defaultPosition:"left"});var sy=function(){},Lq=function(t,e,n){var r=t,i=er(e)?e.split("."):e;return i.forEach(function(a,o){o<i.length-1?(zo(r[a])||(r[a]=(0,xr.Z)(i[o+1])?[]:{}),r=r[a]):r[a]=n}),t};function Nq(t,e){return t.reduce(function(n,r){return(n[r[e]]=n[r[e]]||[]).push(r),n},{})}function Iq(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 Yi=Bi({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"),jq=function(t){(0,S.ZT)(e,t);function e(n){var r=t.call(this,n,{animate:{easing:"linear",duration:200,fill:"both"},buttonCursor:"pointer",buttonFill:"black",buttonPath:yG(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 Br({class:Yi.contentGroup.name})),r.playWindow=r.contentGroup.appendChild(new Br({class:Yi.playWindow.name})),r.innerCurrPage=r.defaultPage,r}return Object.defineProperty(e.prototype,"defaultPage",{get:function(){var n=this.attributes.defaultPage;return(0,cr.Z)(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=(0,S.CR)(Iq(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,(0,S.ev)([],(0,S.CR)(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 Qn(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=(0,S.CR)(this.getFollowingPageDiff(n),2),f=u[0],d=u[1];this.playState="running";var h=H_(c,[{transform:"translate(0, 0)"},{transform:"translate(".concat(-f,", ").concat(-d,")")}],i);return Xs(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:(0,cr.Z)(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:(0,cr.Z)(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(Yi.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)?hl(r):co(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=(0,S.CR)(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,_=m.height,O=Math.max(g,u,b),w=s==="horizontal"?{offset:[[0,0],[g/2+c,0],[g+u+c*2,0]],textAlign:"start"}:{offset:[[O/2,-y-c],[O/2,0],[O/2,_+c]],textAlign:"center"},M=(0,S.CR)(w.offset,3),E=(0,S.CR)(M[0],2),A=E[0],P=E[1],C=(0,S.CR)(M[1],2),j=C[0],N=C[1],k=(0,S.CR)(M[2],2),R=k[0],D=k[1],B=w.textAlign,F=a.querySelector("text");F&&(F.style.textAlign=B),r.setLocalPosition(A,P),a.setLocalPosition(j,N),i.setLocalPosition(R,D)},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(Yi.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=(0,S.CR)(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(Yi.controller,"g");if(Xf(l.node(),c),!!c){var u=en(this.attributes,"button"),f=en(this.attributes,"pageNum"),d=(0,S.CR)(Na(u),2),h=d[0],p=d[1],v=h.size,g=(0,S._T)(h,["size"]),y=!l.select(Yi.prevBtnGroup.class).node(),m=l.maybeAppendByClassName(Yi.prevBtnGroup,"g").styles(p);this.prevBtnGroup=m.node();var b=m.maybeAppendByClassName(Yi.prevBtn,"path"),_=l.maybeAppendByClassName(Yi.nextBtnGroup,"g").styles(p);this.nextBtnGroup=_.node();var O=_.maybeAppendByClassName(Yi.nextBtn,"path");[b,O].forEach(function(M){M.styles((0,S.pi)((0,S.pi)({},g),{transformOrigin:"center"})),hv(M.node(),v,!0)});var w=l.maybeAppendByClassName(Yi.pageInfoGroup,"g");this.pageInfoGroup=w.node(),w.maybeAppendByClassName(Yi.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=qe(r);this.renderClipPath(i),this.renderController(i),this.setVisiblePages([this.defaultPage]),this.goTo(this.defaultPage)},e.prototype.bindEvents=function(){var n=this,r=d_(function(){return n.render(n.attributes,n)},50);this.playWindow.addEventListener(Ie.INSERTED,r),this.playWindow.addEventListener(Ie.REMOVED,r)},e}(Rr),Ai=Bi({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 Dq(t){var e=t.querySelector(Ai.marker.class);return e?e.style:{}}var Bq=function(t){(0,S.ZT)(e,t);function e(n){return t.call(this,n,{span:[1,1],marker:function(){return new nl({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=(0,S.CR)(zr(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=(0,S.CR)(this.spacing,2),h=d[0],p=d[1];if(a){var v=a-i-h-p,g=(0,S.CR)(this.span,2),y=g[0],m=g[1];n=(0,S.CR)([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=(0,S.CR)(zr(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=(0,S.CR)(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=Dq(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=en(this.attributes,"marker");this.markerGroup=n.maybeAppendByClassName(Ai.markerGroup,"g").style("zIndex",0),vi(!!i,this.markerGroup,function(){var o=r.markerGroup.node(),s=o.getElementsByClassName(Ai.marker.name)[0],c=i();s?c.nodeName===s.nodeName?(lF(s,c),qe(s).styles(a)):(s.remove(),qe(c).attr("className",Ai.marker.name).styles(a),o.appendChild(c)):(qe(c).attr("className",Ai.marker.name).styles(a),o.appendChild(c)),r.markerGroup.node().scale(1/r.markerGroup.node().getScale()[0]),hv(r.markerGroup.node(),r.scaleSize,!0)})},e.prototype.renderLabel=function(n){var r=en(this.attributes,"label"),i=r.text,a=(0,S._T)(r,["text"]);this.labelGroup=n.maybeAppendByClassName(Ai.labelGroup,"g").style("zIndex",0),this.labelGroup.maybeAppendByClassName(Ai.label,function(){return Jo(i)}).styles(a)},e.prototype.renderValue=function(n){var r=this,i=en(this.attributes,"value"),a=i.text,o=(0,S._T)(i,["text"]);this.valueGroup=n.maybeAppendByClassName(Ai.valueGroup,"g").style("zIndex",0),vi(this.showValue,this.valueGroup,function(){r.valueGroup.maybeAppendByClassName(Ai.value,function(){return Jo(a)}).styles(o)})},e.prototype.renderBackground=function(n){var r=this.shape,i=r.width,a=r.height,o=en(this.attributes,"background");this.background=n.maybeAppendByClassName(Ai.backgroundGroup,"g").style("zIndex",-1),this.background.maybeAppendByClassName(Ai.background,"rect").styles((0,S.pi)({width:i,height:a},o))},e.prototype.adjustLayout=function(){var n=this.layout,r=n.labelWidth,i=n.valueWidth,a=n.height,o=(0,S.CR)(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}),mv(this.labelGroup.select(Ai.label.class).node(),Math.ceil(r)),this.showValue&&(this.valueGroup.styles({x:l,y:u}),mv(this.valueGroup.select(Ai.value.class).node(),Math.ceil(i)))},e.prototype.render=function(n,r){var i=qe(r);this.renderMarker(i),this.renderLabel(i),this.renderValue(i),this.renderBackground(i),this.adjustLayout()},e}(Rr),vs=Bi({page:"item-page",navigator:"navigator",item:"item"},"items"),LT=function(t,e,n){return n===void 0&&(n=!0),t?e(t):n},Fq=function(t){(0,S.ZT)(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:sy,mouseenter:sy,mouseleave:sy})||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=en(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:(0,S.pi)({layout:i,labelText:f,valueText:d},Object.fromEntries(Object.entries(a).map(function(h){var p=(0,S.CR)(h,2),v=p[0],g=p[1];return[v,Fi(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=(0,S.CR)(this.navigatorShape,1),l=c[0],u=(0,S.CR)(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),_=g%h,O=n.ifHorizontal(d,f),w=[Math.floor(_/O),_%O];i==="vertical"&&w.reverse();var M=(0,S.CR)(w,2),E=M[0],A=M[1],P=(a-l-(d-1)*s)/d,C=v.getBBox().height,j=(0,S.CR)([0,0],2),N=j[0],k=j[1];return i==="horizontal"?(y=(0,S.CR)([p,E*(C+o)],2),N=y[0],k=y[1],p=A===d-1?0:p+P+s):(m=(0,S.CR)([A*(P+s),p],2),N=m[0],k=m[1],p=E===f-1?0:p+C+o),{page:b,index:g,row:E,col:A,pageIndex:_,width:P,height:C,x:N,y:k}})},e.prototype.getFlexLayout=function(){var n=this.attributes,r=n.width,i=n.height,a=n.rowPadding,o=n.colPadding,s=(0,S.CR)(this.navigatorShape,1),c=s[0],l=(0,S.CR)(this.grid,2),u=l[0],f=l[1],d=(0,S.CR)([r-c,i],2),h=d[0],p=d[1],v=(0,S.CR)([0,0,0,0,0,0,0,0],8),g=v[0],y=v[1],m=v[2],b=v[3],_=v[4],O=v[5],w=v[6],M=v[7];return this.pageViews.children.map(function(E,A){var P,C,j,N,k=E.getBBox(),R=k.width,D=k.height,B=w===0?0:o,F=w+B+R;if(F<=h&&LT(_,function(Y){return Y<f}))return P=(0,S.CR)([w+B,M,F],3),g=P[0],y=P[1],w=P[2],{width:R,height:D,x:g,y,page:m,index:A,pageIndex:b++,row:O,col:_++};C=(0,S.CR)([O+1,0,0,M+D+a],4),O=C[0],_=C[1],w=C[2],M=C[3];var z=M+D;return z<=p&&LT(O,function(Y){return Y<u})?(j=(0,S.CR)([w,M,R],3),g=j[0],y=j[1],w=j[2],{width:R,height:D,x:g,y,page:m,index:A,pageIndex:b++,row:O,col:_++}):(N=(0,S.CR)([0,0,R,0,m+1,0,0,0],8),g=N[0],y=N[1],w=N[2],M=N[3],m=N[4],b=N[5],O=N[6],_=N[7],{width:R,height:D,x:g,y,page:m,index:A,pageIndex:b++,row:O,col:_++})})},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 da(i,n,r)},e.prototype.flattenPage=function(n){n.querySelectorAll(vs.item.class).forEach(function(r){n.appendChild(r)}),n.querySelectorAll(vs.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);qe(n).selectAll(vs.item.class).data(this.renderData,function(c){return c.id}).join(function(c){return c.append(function(l){var u=l.style;return new Bq({style:u})}).attr("className",vs.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=(0,S.CR)(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(Nq(this.itemsLayout,"page")).map(function(a){var o=(0,S.CR)(a,2),s=o[0],c=o[1];return{page:s,layouts:c}}),i=(0,S.ev)([],(0,S.CR)(this.navigator.getContainer().children),!1);r.forEach(function(a){var o=a.layouts,s=n.pageViews.appendChild(new Br({className:vs.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),Lq(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=en(this.attributes,"nav"),a=Ra({orientation:r},i),o=this;return n.selectAll(vs.navigator.class).data(["nav"]).join(function(s){return s.append(function(){return new jq({style:a})}).attr("className",vs.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(qe(r));this.renderItems(a.getContainer()),this.adjustLayout()}},e.prototype.dispatchCustomEvent=function(n,r){var i=new Nn(n,{detail:r});this.dispatchEvent(i)},e}(Rr),zq=function(t){(0,S.ZT)(e,t);function e(n){return t.call(this,n,EG)||this}return e.prototype.renderTitle=function(n,r,i){var a=this.attributes,o=a.showTitle,s=a.titleText,c=en(this.attributes,"title"),l=(0,S.CR)(Na(c),2),u=l[0],f=l[1];this.titleGroup=n.maybeAppendByClassName(Lr.titleGroup,"g").styles(f);var d=(0,S.pi)((0,S.pi)({width:r,height:i},u),{text:o?s:""});this.title=this.titleGroup.maybeAppendByClassName(Lr.title,function(){return new O2({style:d})}).update(d)},e.prototype.renderItems=function(n,r){var i=r.x,a=r.y,o=r.width,s=r.height,c=en(this.attributes,"title",!0),l=(0,S.CR)(Na(c),2),u=l[0],f=l[1],d=(0,S.pi)((0,S.pi)({},u),{width:o,height:s,x:0,y:0});this.itemsGroup=n.maybeAppendByClassName(Lr.itemsGroup,"g").styles((0,S.pi)({x:i,y:a},f));var h=this;this.itemsGroup.selectAll(Lr.items.class).data(["items"]).join(function(p){return p.append(function(){return new Fq({style:d})}).attr("className",Lr.items.name).each(function(){h.items=qe(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 Qn(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):CF(i,a)},e.prototype.render=function(n,r){var i=n.width,a=n.height,o=qe(r);this.renderTitle(o,i,a),this.renderItems(o,this.availableSpace),this.adjustLayout()},e}(Rr);function Gq(t){if(ll(t)){var e=t;return e[e.length-1]}}var Wq=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 Hq(t,e){const n=ua(t,"shape"),r=ua(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 Yq(t,e){const{scales:n,library:r,markState:i}=e,[a,o]=Hq(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)||Gq(d.split(".")),m=typeof c=="function"?c(h):c;return()=>eU(y,{color:h.color})(0,0,m)},u=d=>`${o[d]}`;return ua(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 $q(t){const e=ua(t,"opacity");if(e){const{range:n}=e.getOptions();return(r,i)=>n[i]}}function Vq(t,e){const n=ua(t,"size");return n instanceof th?n.map(NaN)*2:e}function Xq(t,e){const{labelFormatter:n=d=>`${d}`}=t,{scales:r,theme:i}=e,a=i.legendCategory.itemMarkerSize,o=Vq(r,a),s={itemMarker:Yq(Object.assign(Object.assign({},t),{itemMarkerSize:o}),e),itemMarkerSize:o,itemMarkerOpacity:$q(r)},c=typeof n=="string"?oo(n):n,l=ua(r,"color"),u=Nz(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 Uq(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}=X2(t,e,n);return{width:i,height:a}}const cy=t=>{const{labelFormatter:e,layout:n,order:r,orientation:i,position:a,size:o,title:s,cols:c,itemMarker:l}=t,u=Wq(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}=Uq(h,t,cy),m=$2(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:ld(s)}),Xq(t,d)),{legendCategory:_={}}=p,O=ud(Object.assign({},_,b,u)),w=new kz({style:Object.assign(Object.assign({x:v.x,y:v.y,width:v.width,height:v.height},m),{subOptions:O})});return w.appendChild(new zq({className:"legend-category",style:O})),w}};cy.props={defaultPosition:"top",defaultOrder:1,defaultSize:40,defaultCrossPadding:[12,12],defaultPadding:[12,12]};const NT=t=>()=>new Br;NT.props={};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 IT(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 Zq=Cz({render(t,e){const{width:n,title:r,subtitle:i,spacing:a=2,align:o="left"}=t,s=qq(t,["width","title","subtitle","spacing","align"]),c=fe(s,"title"),l=fe(s,"subtitle"),f=Y2(e,".title","text").attr("className","title").call(Ae,Object.assign(Object.assign(Object.assign({},IT(0,0,n,o)),{fontSize:14,textBaseline:"top",text:r}),c)).node().getLocalBounds();Y2(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({},IT(0,f.max[1]+a,n,o)),{fontSize:12,textBaseline:"top",text:i}),l))})}}),jT=t=>({value:e,theme:n})=>{const{x:r,y:i,width:a,height:o}=e.bbox;return new Zq({style:Dt({},n.title,Object.assign({x:r,y:i,width:a,height:o},t))})};jT.props={defaultPosition:"top",defaultOrder:2,defaultSize:36,defaultCrossPadding:[20,20],defaultPadding:[12,12]};var ly=function(t){if(typeof t!="object"||t===null)return t;var e;if(Dr(t)){e=[];for(var n=0,r=t.length;n<r;n++)typeof t[n]=="object"&&t[n]!=null?e[n]=ly(t[n]):e[n]=t[n]}else{e={};for(var i in t)typeof t[i]=="object"&&t[i]!=null?e[i]=ly(t[i]):e[i]=t[i]}return e},uy=ly,Kq=function(t){(0,S.ZT)(e,t);function e(n){var r=this,i=n.style,a=(0,S._T)(n,["style"]);return r=t.call(this,Dt({},{type:"column"},(0,S.pi)({style:i},a)))||this,r.columnsGroup=new Br({name:"columns"}),r.appendChild(r.columnsGroup),r.render(),r}return e.prototype.render=function(){var n=this.attributes.columns;qe(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(Ra({},this.attributes,n)),this.render()},e.prototype.clear=function(){this.removeChildren()},e}($r),Qq=function(t){(0,S.ZT)(e,t);function e(n){var r=this,i=n.style,a=(0,S._T)(n,["style"]);return r=t.call(this,Dt({},{type:"lines"},(0,S.pi)({style:i},a)))||this,r.linesGroup=r.appendChild(new Br),r.areasGroup=r.appendChild(new Br),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(Ra({},this.attributes,n)),this.render()},e.prototype.renderLines=function(n){qe(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){qe(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}($r);function Jq(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=(0,S.CR)(r,2),l=i[0],u=i[1];for(var p=0,v=t.length;p<v;p+=1){var g=t[p];l=Ko(l,g),u=Qo(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=lv(c,s),b=La(b,e);var _=vl(g,s),O=vl(g,c),w=_+O;w!==0&&(_/=w,O/=w);var M=La(b,-_),E=La(b,O);d=pl(g,M),f=pl(g,E),f=Ko(f,Qo(c,g)),f=Qo(f,Ko(c,g)),M=lv(f,g),M=La(M,-_/O),d=pl(g,M),d=Ko(d,Qo(s,g)),d=Qo(d,Ko(s,g)),E=lv(g,d),E=La(E,O/_),f=pl(g,E),o&&(d=Qo(d,l),d=Ko(d,u),f=Qo(f,l),f=Ko(f,u)),a.push(h),a.push(d),h=f}}return n&&a.push(a.shift()),a}function tZ(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=Jq(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=(0,S.CR)(a,1),h=r[0],u.push(["C",f[0],f[1],d[0],d[1],h[0],h[1]])),u}function eZ(t,e){var n,r=e.x,i=e.y,a=(0,S.CR)(i.getOptions().range||[0,0],2),o=a[0],s=a[1];return s>o&&(n=(0,S.CR)([o,s],2),s=n[0],o=n[1]),t.map(function(c){var l=c.map(function(u,f){return[r.map(f),(0,cr.Z)(i.map(u),s,o)]});return l})}function $l(t,e){e===void 0&&(e=!1);var n=e?t.length-1:0,r=t.map(function(i,a){return(0,S.ev)([a===n?"M":"L"],(0,S.CR)(i),!1)});return e?r.reverse():r}function ih(t,e){if(e===void 0&&(e=!1),t.length<=2)return $l(t);for(var n=[],r=t.length,i=0;i<r;i+=1){var a=e?t[r-i-1]:t[i];L_(a,n.slice(-2))||n.push.apply(n,(0,S.ev)([],(0,S.CR)(a),!1))}var o=tZ(n,!1);return e?o.unshift((0,S.ev)(["M"],(0,S.CR)(t[r-1]),!1)):o.unshift((0,S.ev)(["M"],(0,S.CR)(t[0]),!1)),o}function fy(t,e,n){var r=uy(t);return r.push(["L",e,n],["L",0,n],["Z"]),r}function nZ(t,e,n,r){return t.map(function(i){return fy(e?ih(i):$l(i),n,r)})}function rZ(t,e,n){for(var r=[],i=t.length-1;i>=0;i-=1){var a=t[i],o=$l(a),s=void 0;if(i===0)s=fy(o,e,n);else{var c=t[i-1],l=$l(c,!0);l[0][0]="L",s=(0,S.ev)((0,S.ev)((0,S.ev)([],(0,S.CR)(o),!1),(0,S.CR)(l),!1),[["Z"]],!1)}r.push(s)}return r}function iZ(t,e,n){for(var r=[],i=t.length-1;i>=0;i-=1){var a=t[i],o=ih(a),s=void 0;if(i===0)s=fy(o,e,n);else{var c=t[i-1],l=ih(c,!0),u=a[0];l[0][0]="L",s=(0,S.ev)((0,S.ev)((0,S.ev)([],(0,S.CR)(o),!1),(0,S.CR)(l),!1),[(0,S.ev)(["M"],(0,S.CR)(u),!1),["Z"]],!1)}r.push(s)}return r}var aZ=function(t,e){if(Dr(t)){for(var n,r=1/0,i=0;i<t.length;i++){var a=t[i],o=gi(e)?e(a):a[e];o<r&&(n=a,r=o)}return n}},oZ=function(t,e){if(Dr(t)){for(var n,r=-1/0,i=0;i<t.length;i++){var a=t[i],o=gi(e)?e(a):a[e];o>r&&(n=a,r=o)}return n}};function DT(t){return t.length===0?[0,0]:[af(aZ(t,function(e){return af(e)||0})),of(oZ(t,function(e){return of(e)||0}))]}function BT(t){for(var e=uy(t),n=e[0].length,r=(0,S.CR)([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 sZ=function(t){(0,S.ZT)(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=uy(n);return(0,xr.Z)(r[0])?[r]:r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"data",{get:function(){return this.attributes.isStack?BT(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=(0,S.CR)(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=en(this.attributes,"area"),c=en(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=eZ(u,{type:"line",x:d,y:h}),v=[];if(s){var g=this.baseline;a?v=o?iZ(p,l,g):rZ(p,l,g):v=nZ(p,o,l,g)}return{lines:p.map(function(y,m){return(0,S.pi)({stroke:n.getColor(m),path:o?ih(y):$l(y)},c)}),areas:v.map(function(y,m){return(0,S.pi)({path:y,fill:n.getColor(m)},s)})}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"columnsStyle",{get:function(){var n=this,r=en(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=BT(l));var u=this.createScales(l),f=u.x,d=u.y,h=(0,S.CR)(DT(l),2),p=h[0],v=h[1],g=new Vr({domain:[0,v-(p>0?0:p)],range:[0,c*s]}),y=f.getBandWidth(),m=this.rawData;return{columns:l.map(function(b,_){return b.map(function(O,w){var M=y/l.length,E=function(){return{x:f.map(w)+M*_,y:O>=0?d.map(O):d.map(0),width:M,height:g.map(Math.abs(O))}},A=function(){return{x:f.map(w),y:d.map(O),width:y,height:g.map(m[_][w])}};return(0,S.pi)((0,S.pi)({fill:n.getColor(_)},r),a?A():E())})})}},enumerable:!1,configurable:!0}),e.prototype.render=function(n,r){_B(r,".container","rect").attr("className","container").node();var i=n.type,a="spark".concat(i),o=i==="line"?this.linesStyle:this.columnsStyle;qe(r).selectAll(".spark").data([i]).join(function(s){return s.append(function(c){return c==="line"?new Qq({className:a,style:o}):new Kq({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 Dr(r)?r[n%r.length]:gi(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=(0,S.CR)(DT(n),2),v=p[0],g=p[1],y=new Vr({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 Vr({domain:[0,n[0].length-1],range:[0,d]}),y}:{type:o,x:new mo({domain:n[0].map(function(m,b){return b}),range:[0,d],paddingInner:u,paddingOuter:u/2,align:.5}),y}},e.tag="sparkline",e}(Rr),FT=function(t){(0,S.ZT)(e,t);function e(n){var r=t.call(this,n,(0,S.pi)((0,S.pi)((0,S.pi)({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},la(rO,"handle")),la(eO,"handleIcon")),la(nO,"handleLabel")))||this;return r.range=[0,1],r.onDragStart=function(i){return function(a){a.stopPropagation(),r.target=i,r.prevPos=r.getOrientVal(dd(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(dd(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 Nn("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=en(this.attributes,"sparkline");return(0,S.pi)((0,S.pi)({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=(0,S.CR)(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=(0,S.CR)(zr(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(fa.selection.class).each(function(i,a){Ki(this,r[a],n)})},e.prototype.updateHandlesPosition=function(n){this.attributes.showHandle&&(this.startHandle&&Ki(this.startHandle,this.getHandleStyle("start"),n),this.endHandle&&Ki(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=en(this.attributes,"track");this.trackShape=qe(n).maybeAppendByClassName(fa.track,"rect").styles((0,S.pi)((0,S.pi)({},this.shape),r))},e.prototype.renderBrushArea=function(n){var r=this.attributes.brushable;this.brushArea=qe(n).maybeAppendByClassName(fa.brushArea,"rect").styles((0,S.pi)({fill:"transparent",cursor:r?"crosshair":"default"},this.shape))},e.prototype.renderSparkline=function(n){var r=this,i=this.attributes.orientation,a=qe(n).maybeAppendByClassName(fa.sparklineGroup,"g");vi(i==="horizontal",a,function(o){var s=r.sparklineStyle;o.maybeAppendByClassName(fa.sparkline,function(){return new sZ({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(fa.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 iO({style:n.getHandleStyle(d)})}).each(function(f){var d=f.type;this.attr("class","".concat(fa.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=qe(n).maybeAppendByClassName(fa.foreground,"g");var o=en(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(fa.selection.class).data(i==="value"?[]:this.calcSelectionArea().map(function(l,u){return{style:(0,S.pi)({},l),index:u,show:a==="select"?u===1:u!==1}}),function(l){return l.index}).join(function(l){return l.append("rect").attr("className",fa.selection.name).call(s).each(function(u,f){var d=this;f===1?(c.selectionShape=qe(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=(0,S.CR)(this.range,2),o=a[0],s=a[1],c=(0,S.CR)(this.getValues().map(function(g){return fd(g,r)}),2),l=c[0],u=c[1],f=Array.isArray(n)?n:[l,n!=null?n:u],d=(0,S.CR)((f||[l,u]).map(function(g){return fd(g,r)}),2),h=d[0],p=d[1];if(this.attributes.type==="value")return[0,(0,cr.Z)(p,o,s)];h>p&&(i=(0,S.CR)([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=(0,S.CR)(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=(0,S.CR)(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=en(this.attributes,"handle"),u=en(l,"label"),f=l.spacing,d=this.getHandleSize(),h=this.clampValues(),p=n==="start"?h[0]:h[1],v=s(p),g=new sv({style:(0,S.pi)((0,S.pi)((0,S.pi)({},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 _=f+d+(o==="horizontal"?m/2:0);return r={text:v},r[o==="horizontal"?"x":"y"]=n==="start"?-_:_,r}var O=0,w=0,M=this.availableSpace,E=M.width,A=M.height,P=this.calcSelectionArea()[1],C=P.x,j=P.y,N=P.width,k=P.height,R=f+d;if(o==="horizontal"){var D=R+m/2;if(n==="start"){var B=C-R-m;O=B>0?-D:D}else{var F=E-C-N-R>m;O=F?D:-D}}else{var z=R,Y=b+R;n==="start"?w=j-d>b?-Y:z:w=A-(j+k)-d>b?Y:-z}return{x:O,y:w,text:v}},e.prototype.getHandleLabelStyle=function(n){var r=en(this.attributes,"handleLabel");return(0,S.pi)((0,S.pi)((0,S.pi)({},r),this.calcHandleText(n)),this.inferTextStyle(n))},e.prototype.getHandleIconStyle=function(){var n=this.attributes.handleIconShape,r=en(this.attributes,"handleIcon"),i=this.getOrientVal(["ew-resize","ns-resize"]),a=this.getHandleSize();return(0,S.pi)({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),(0,S.pi)((0,S.pi)((0,S.pi)((0,S.pi)({},la(this.getHandleIconStyle(),"icon")),la((0,S.pi)((0,S.pi)({},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=(0,S.CR)(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=(0,S.CR)(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 Nn(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}(Rr);function cZ(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function _c(t){let e,n,r;t.length!==2?(e=fr,n=(s,c)=>fr(t(s),c),r=(s,c)=>t(s)-c):(e=t===fr||t===cZ?t:lZ,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 lZ(){return 0}function dy(t){return t===null?NaN:+t}function*uZ(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 zT=_c(fr),fZ=zT.right,dZ=zT.left,hZ=_c(dy).center;var pZ=fZ;function vZ(t,e){return Array.from(e,n=>t[n])}function Ba(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=Vl(o[i],o[a]);if(s)return s}})):(n=t.map(n),r.sort((i,a)=>Vl(n[i],n[a]))),vZ(t,r)}return t.sort(GT(n))}function GT(t=fr){if(t===fr)return Vl;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 Vl(t,e){return(t==null||!(t>=t))-(e==null||!(e>=e))||(t<e?-1:t>e?1:0)}function gZ(t,e,n){return Math.min(n,Math.max(e,t))}function Xl(t){return!!t.getBandWidth}function Oc(t,e,n){if(!Xl(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=dZ(s,e),l=gZ(c+a,0,i.length-1);return i[l]}function _o(t,e,n){if(!e)return t.getOptions().domain;if(!Xl(t)){const c=Ba(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 ah(t,e,n,r,i,a){const{x:o,y:s}=i,c=(h,p)=>{const[v,g]=a.invert(h);return[Oc(o,v,p),Oc(s,g,p)]},l=c([t,e],!0),u=c([n,r],!1),f=_o(o,[l[0],u[0]]),d=_o(s,[l[1],u[1]]);return[f,d]}function oh(t,e){const[n,r]=t,i=a=>a.getStep?a.getStep():0;return[e.map(n),e.map(r)+i(e)]}function yZ(t,e,n){const{x:r,y:i}=e,[a,o]=t,s=oh(a,r),c=oh(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]}var mZ=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 bZ(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 Ul=t=>{const{orientation:e,labelFormatter:n,size:r,style:i={},position:a}=t,o=mZ(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))||(E=>E+""),m=typeof n=="string"?oo(n):n,b=e==="horizontal",_=$n(d)&&b,{trackSize:O=g.trackSize}=i,[w,M]=bZ(h,a,O);return new FT({className:"slider",style:Object.assign({},g,Object.assign(Object.assign({x:w,y:M,trackLength:b?p:v,orientation:e,formatter:E=>{const A=m||y,P=_?1-E:E,C=Oc(l,P,!0);return A(C)},sparklineData:_Z(t,s)},i),o))})}};function xZ(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 _Z(t,e){const{markState:n}=e;return Dr(t.sparklineData)?t.sparklineData:xZ(n,["y","series"])}Ul.props={defaultPosition:"bottom",defaultSize:24,defaultOrder:1,defaultCrossPadding:[12,12],defaultPadding:[12,12]};const WT=t=>Ul(Object.assign(Object.assign({},t),{orientation:"horizontal"}));WT.props=Object.assign(Object.assign({},Ul.props),{defaultPosition:"bottom"});const HT=t=>Ul(Object.assign(Object.assign({},t),{orientation:"vertical"}));HT.props=Object.assign(Object.assign({},Ul.props),{defaultPosition:"left"});var OZ=function(t){(0,S.ZT)(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 Nn("scroll",o)),r.dispatchEvent(new Nn("valuechange",o))}},r.onTrackClick=function(i){var a=r.attributes.slidable;if(a){var o=(0,S.CR)(r.getLocalPosition(),2),s=o[0],c=o[1],l=(0,S.CR)(r.padding,4),u=l[0],f=l[3],d=r.getOrientVal([s+f,c+u]),h=r.getOrientVal(dd(i)),p=(h-d)/r.trackLength;r.setValue(p,!0)}},r.onThumbMouseenter=function(i){r.dispatchEvent(new Nn("thumbMouseenter",{detail:i.detail}))},r.onTrackMouseenter=function(i){r.dispatchEvent(new Nn("trackMouseenter",{detail:i.detail}))},r.onThumbMouseleave=function(i){r.dispatchEvent(new Nn("thumbMouseleave",{detail:i.detail}))},r.onTrackMouseleave=function(i){r.dispatchEvent(new Nn("trackMouseleave",{detail:i.detail}))},r}return Object.defineProperty(e.prototype,"padding",{get:function(){var n=this.attributes.padding;return zr(n)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){var n=this.attributes.value,r=(0,S.CR)(this.range,2),i=r[0],a=r[1];return(0,cr.Z)(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=(0,S.CR)(this.padding,4),a=i[0],o=i[1],s=i[2],c=i[3],l=(0,S.CR)(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=(0,S.CR)(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=en(this.attributes,"track"),l=en(this.attributes,"thumb"),u=(0,S.pi)((0,S.pi)({brushable:!1,orientation:i,padding:o,selectionRadius:this.thumbRadius,showHandle:!1,slidable:s,trackLength:this.trackLength,trackRadius:this.trackRadius,trackSize:a,values:this.getValues()},la(c,"track")),la(l,"selection"));this.slider=qe(n).maybeAppendByClassName("scrollbar",function(){return new FT({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=(0,S.CR)(this.range,2),o=a[0],s=a[1];this.slider.setValues(this.getValues((0,cr.Z)(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}(Rr),wZ=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{orientation:e,labelFormatter:n,style:r}=t,i=wZ(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,_=b>m?0:1;return new OZ({className:"g2-scrollbar",style:Object.assign({},h,Object.assign(Object.assign(Object.assign(Object.assign({},r),{x:l,y:u,trackLength:g,value:_}),i),{orientation:e,contentLength:y,viewportLength:g}))})}};ql.props={defaultPosition:"bottom",defaultSize:24,defaultOrder:1,defaultCrossPadding:[12,12],defaultPadding:[12,12]};const YT=t=>ql(Object.assign(Object.assign({},t),{orientation:"horizontal"}));YT.props=Object.assign(Object.assign({},ql.props),{defaultPosition:"bottom"});const $T=t=>ql(Object.assign(Object.assign({},t),{orientation:"vertical"}));$T.props=Object.assign(Object.assign({},ql.props),{defaultPosition:"left"});const hy=(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]=$n(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))}},SZ=(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]=$n(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))}},VT=(t,e)=>{const{coordinate:r}=e;return Dx.registerProperty({name:"scaleInYRadius",inherits:!1,initialValue:"",interpolable:!0,syntax:ce.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:_}=f,O=ns(r,m,[b,_]),{innerRadius:w,outerRadius:M}=O,E=Bd().cornerRadius(h).padAngle(p*Math.PI/180),A=new ri({}),P=r.getCenter(),C=k=>{A.attr({d:E(k),transform:`translate(${P[0]}, ${P[1]})`});const R=g0(A);return A.style.transform="",R},j=[{scaleInYRadius:w+1e-4,fillOpacity:0,strokeOpacity:0,opacity:0},{scaleInYRadius:w+1e-4,fillOpacity:v,strokeOpacity:g,opacity:y,offset:.01},{scaleInYRadius:M,fillOpacity:v,strokeOpacity:g,opacity:y}],N=u.animate(j,Object.assign(Object.assign({},o),t));return N.onframe=function(){u.style.path=C(Object.assign(Object.assign({},O),{outerRadius:Number(u.style.scaleInYRadius)}))},N.onfinish=function(){u.style.path=C(Object.assign(Object.assign({},O),{outerRadius:M}))},N},l=u=>{const{style:f}=u,{transform:d="",fillOpacity:h=1,strokeOpacity:p=1,opacity:v=1}=f,[g,y]=$n(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 Gn(r)?c(s):l(s)}},MZ=(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]=$n(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))}},XT=(t,e)=>{Dx.registerProperty({name:"waveInArcAngle",inherits:!1,initialValue:"",interpolable:!0,syntax:ce.NUMBER});const{coordinate:r}=e;return(i,a,o)=>{const[s]=i;if(!Gn(r))return hy(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=Bd().cornerRadius(f).padAngle(d*Math.PI/180),_=ns(r,g,[y,m]),{startAngle:O,endAngle:w}=_,M=new ri({}),E=C=>{M.attr({d:b(C),transform:`translate(${c[0]}, ${c[1]})`});const j=g0(M);return M.style.transform="",j},A=[{waveInArcAngle:O+1e-4,fillOpacity:0,strokeOpacity:0,opacity:0},{waveInArcAngle:O+1e-4,fillOpacity:h,strokeOpacity:p,opacity:v,offset:.01},{waveInArcAngle:w,fillOpacity:h,strokeOpacity:p,opacity:v}],P=s.animate(A,Object.assign(Object.assign({},o),t));return P.onframe=function(){s.style.path=E(Object.assign(Object.assign({},_),{endAngle:Number(s.style.waveInArcAngle)}))},P.onfinish=function(){s.style.path=E(Object.assign(Object.assign({},_),{endAngle:w}))},P}};XT.props={};const UT=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))};UT.props={};const qT=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))};qT.props={};const EZ=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))},AZ=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))},ZT=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))};ZT.props={};function wc(t,e){const n={};for(const r of e){const i=t.style[r];i&&(n[r]=i)}return n}const Sc=["fill","stroke","fillOpacity","strokeOpacity","opacity","lineWidth"];function py(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 TZ(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 PZ(t,e){const[n,r,i,a]=py(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(TZ([g,y,p,u]))}d-=h,f+=1}return l}function CZ(t="pack"){return typeof t=="function"?t:PZ}function kZ(t,e,n){const[r,i,a,o]=py(t),{transform:s}=t.style,{transform:c}=e.style;KT(e,t);const[l,u,f,d]=py(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})`},wc(t,Sc)),Object.assign({transform:`${c?c+" ":""}translate(0, 0) scale(1, 1)`},wc(e,Sc))];return e.animate(y,n)}function KT(t,e){t.__data__=e.__data__,t.className=e.className,t.markType=e.markType,e.parentNode.replaceChild(t,e)}function RZ(t,e){const{nodeName:n}=t;if(n==="path")return t;const r=new ri({style:Object.assign(Object.assign({},wc(t,Sc)),{d:e})});return KT(r,t),r}function QT(t,e){const n=t.indexOf(e),r=t.lastIndexOf(e);return n===r}function LZ(t){return!QT(t,"m")||!QT(t,"M")}function JT(t){const e=g0(t);if(e&&!LZ(e))return e}function vy(t,e,n,r){const{nodeName:i}=e,{nodeName:a}=n,o=JT(e),s=JT(n);if(i===a&&i!=="path"||(o===void 0||s===void 0))return kZ(e,n,r);const u=RZ(t,o),f=[Object.assign({path:o},wc(e,Sc)),Object.assign({path:s},wc(n,Sc))],d=u.animate(f,r);return d.onfinish=()=>{u.style.transform="none",tv(u,n)},u.style.transform="none",d}function NZ(t,e,n,r){t.style.visibility="hidden";const i=r(t,e.length);return e.map((a,o)=>{const s=new ri({style:Object.assign({path:i[o]},wc(t,Sc))});return vy(a,s,a,n)})}function IZ(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 ri({style:{path:i[d],fill:e.style.fill}});return vy(f,f,h,n)}),l]}const tP=t=>(e,n,r)=>{const i=CZ(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 vy(c,c,l,a)}if(o===1&&s>1){const[c]=e;return NZ(c,n,a,i)}if(o>1&&s===1){const[c]=n;return IZ(e,c,a,i)}return null};tP.props={};const eP=(t,e)=>(n,r,i)=>{const[a]=n,{height:o,width:s}=a.getBoundingClientRect(),c=new ri({style:{path:`M0,0L${s},0L${s},${o}L0,${o}Z`}});return a.appendChild(c),a.style.clipPath=c,hy(t,e)([c],r,i)};eP.props={};const nP=(t,e)=>(n,r,i)=>{const[a]=n,{height:o,width:s}=a.getBoundingClientRect(),c=new ri({style:{path:`M0,0L${s},0L${s},${o}L0,${o}Z`}});return a.appendChild(c),a.style.clipPath=c,VT(t,e)([c],r,i)};nP.props={};var Zl=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 Oo(t){return je(t).selectAll(`.${Ca}`).nodes().filter(e=>!e.__removed__)}function rP(t,e){return gy(t,e).flatMap(({container:n})=>Oo(n))}function gy(t,e){return e.filter(n=>n!==t&&n.options.parentKey===t.options.key)}function Fa(t){return je(t).select(`.${Df}`).node()}function iP(t){if(t.nodeName!=="rect")return t.getRenderBounds();const{x:e,y:n,width:r,height:i}=t.style;return{min:[e,n],max:[e+r,n+i]}}function yy(t,e){const{offsetX:n,offsetY:r}=e,i=iP(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 my(t,e){const{offsetX:n,offsetY:r}=e,[i,a,o,s]=jZ(t);return[Math.min(o,Math.max(i,n))-i,Math.min(s,Math.max(a,r))-a]}function jZ(t){const e=t.getRenderBounds(),{min:[n,r],max:[i,a]}=e;return[n,r,i,a]}function aP(t){return e=>e.__data__.color}function by(t){return e=>e.__data__.x}function gs(t){const e=Array.isArray(t)?t:[t],n=new Map(e.flatMap(r=>Array.from(r.markState.keys()).map(a=>[sh(r.key,a.key),a.data])));return r=>{const{index:i,markKey:a,viewKey:o}=r.__data__;return n.get(sh(o,a))[i]}}function za(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=_V(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 DZ(t){return t===void 0?!0:typeof t!="object"?!1:Object.keys(t).length===0}function sh(t,e){return`${t},${e}`}function Mc(t,e){const r=(Array.isArray(t)?t:[t]).flatMap(a=>a.marks.map(o=>[sh(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=DZ(f[o])?s:f[o];for(const[h,p]of Object.entries(d)){const v=c[h],g=(y,m,b,_)=>{const O=sh(_.__data__.viewKey,_.__data__.markKey);return u!==O?v==null?void 0:v(y,m,b,_):typeof p!="function"?p:p(y,m,b,_)};c[h]=g}return c},{})}return i}function Kl(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 oP(t){var{link:e=!1,valueof:n=(u,f)=>u,coordinate:r}=t,i=Zl(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=Ba(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=Wi(),v=d[h-1],g=d[h],[y,m,b,_]=s(o(v),o(g));p.moveTo(...y),p.lineTo(...m),p.lineTo(...b),p.lineTo(..._),p.closePath();const O=so(i,A=>n(A,v)),{fill:w=v.getAttribute("fill")}=O,M=Zl(O,["fill"]),E=new ri({className:a,style:Object.assign({d:p.toString(),fill:w,zIndex:-2},M)});(f=v.link)===null||f===void 0||f.remove(),v.parentNode.appendChild(E),v.link=E}},u=>{var f;(f=u.link)===null||f===void 0||f.remove(),u.link=null}]}function sP(t,e,n){const r=i=>{const{transform:a}=t.style;return a?`${a} ${i}`:i};if(Gn(n)){const{points:i}=t.__data__,[a,o]=$n(n)?gd(i):i,s=n.getCenter(),c=ur(a,s),l=ur(o,s),u=Gi(c),f=xO(c,l),d=u+f/2,h=e*Math.cos(d),p=e*Math.sin(d);return r(`translate(${h}, ${p})`)}return $n(n)?r(`translate(${e}, 0)`):r(`translate(0, ${-e})`)}function cP(t){var{document:e,background:n,scale:r,coordinate:i,valueof:a}=t,o=Zl(t,["document","background","scale","coordinate","valueof"]);const s="element-background";if(!n)return[()=>{},()=>{}];const c=(y,m,b)=>{const _=y.invert(m),O=m+y.getBandWidth(_)/2,w=y.getStep(_)/2,M=w*b;return[O-w+M,O+w-M]},l=(y,m)=>{const{x:b}=r;if(!Xl(b))return[0,1];const{__data__:_}=y,{x:O}=_,[w,M]=c(b,O,m);return[w,M]},u=(y,m)=>{const{y:b}=r;if(!Xl(b))return[0,1];const{__data__:_}=y,{y:O}=_,[w,M]=c(b,O,m);return[w,M]},f=(y,m)=>{const{padding:b}=m,[_,O]=l(y,b),[w,M]=u(y,b),E=[[_,w],[O,w],[O,M],[_,M]].map(j=>i.map(j)),{__data__:A}=y,{y:P,y1:C}=A;return XS(e,E,{y:P,y1:C},i,m)},d=(y,m)=>{const{transform:b="scale(1.2, 1.2)",transformOrigin:_="center center",stroke:O=""}=m,w=Zl(m,["transform","transformOrigin","stroke"]),M=Object.assign({transform:b,transformOrigin:_,stroke:O},w),E=y.cloneNode(!0);for(const[A,P]of Object.entries(M))E.style[A]=P;return E},h=()=>{const{x:y,y:m}=r;return[y,m].some(Xl)};return[y=>{y.background&&y.background.remove();const m=so(o,j=>a(j,y)),{fill:b="#CCD6EC",fillOpacity:_=.3,zIndex:O=-2,padding:w=.001,strokeWidth:M=0}=m,E=Zl(m,["fill","fillOpacity","zIndex","padding","strokeWidth"]),A=Object.assign(Object.assign({},E),{fill:b,fillOpacity:_,zIndex:O,padding:w,strokeWidth:M}),C=(h()?f:d)(y,A);C.className=s,y.parentNode.appendChild(C),y.background=C},y=>{var m;(m=y.background)===null||m===void 0||m.remove(),y.background=null},y=>y.className===s]}function wo(t,e){const r=t.getRootNode().defaultView.getContextService().getDomElement();r!=null&&r.style&&(t.cursor=r.style.cursor,r.style.cursor=e)}function BZ(t){wo(t,t.cursor)}function xy(t,e,n){return t.find(r=>Object.entries(e).every(([i,a])=>n(r)[i]===a))}var FZ=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 zZ(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=Kn(d,r),v=Kl(d,n),[g,y]=oP(Object.assign({elements:d,valueof:v,link:i,coordinate:c},fe(u.active,"link"))),[m,b,_]=cP(Object.assign({document:t.ownerDocument,scale:s,coordinate:c,background:a,valueof:v},fe(u.active,"background"))),O=Dt(u,{active:Object.assign({},((f=u.active)===null||f===void 0?void 0:f.offset)&&{transform:(...B)=>{const F=u.active.offset(...B),[,z]=B;return sP(d[z],F,c)}})}),{setState:w,removeState:M,hasState:E}=za(O,v);let A;const P=B=>{const{target:F,nativeEvent:z=!0}=B;if(!h.has(F))return;A&&clearTimeout(A);const Y=r(F),q=p.get(Y),rt=new Set(q);for(const st of d)rt.has(st)?E(st,"active")||w(st,"active"):(w(st,"inactive"),y(st)),st!==F&&b(st);m(F),g(q),z&&l.emit("element:highlight",{nativeEvent:z,data:{data:n(F),group:q.map(n)}})},C=()=>{A&&clearTimeout(A),A=setTimeout(()=>{j(),A=null},o)},j=(B=!0)=>{for(const F of d)M(F,"active","inactive"),b(F),y(F);B&&l.emit("element:unhighlight",{nativeEvent:B})},N=B=>{const{target:F}=B;a&&!_(F)||!a&&!h.has(F)||(o>0?C():j())},k=()=>{j()};t.addEventListener("pointerover",P),t.addEventListener("pointerout",N),t.addEventListener("pointerleave",k);const R=B=>{const{nativeEvent:F}=B;F||j(!1)},D=B=>{const{nativeEvent:F}=B;if(F)return;const{data:z}=B.data,Y=xy(d,z,n);Y&&P({target:Y,nativeEvent:!1})};return l.on("element:highlight",D),l.on("element:unhighlight",R),()=>{t.removeEventListener("pointerover",P),t.removeEventListener("pointerout",N),t.removeEventListener("pointerleave",k),l.off("element:highlight",D),l.off("element:unhighlight",R);for(const B of d)b(B),y(B)}}function ch(t){var{delay:e,createGroup:n,background:r=!1,link:i=!1}=t,a=FZ(t,["delay","createGroup","background","link"]);return(o,s,c)=>{const{container:l,view:u,options:f}=o,{scale:d,coordinate:h}=u,p=Fa(l);return zZ(p,Object.assign({elements:Oo,datum:gs(u),groupKey:n?n(u):void 0,coordinate:h,scale:d,state:Mc(f,[["active",r?{}:{lineWidth:"1",stroke:"#000"}],"inactive"]),background:r,link:i,delay:e,emitter:c},a))}}ch.props={reapplyWhenUpdate:!0};function lP(t){return ch(Object.assign(Object.assign({},t),{createGroup:by}))}lP.props={reapplyWhenUpdate:!0};function uP(t){return ch(Object.assign(Object.assign({},t),{createGroup:aP}))}uP.props={reapplyWhenUpdate:!0};var GZ=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 WZ(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=Kn(d,r),v=Kl(d,n),[g,y]=oP(Object.assign({link:i,elements:d,valueof:v,coordinate:o},fe(u.selected,"link"))),[m,b]=cP(Object.assign({document:t.ownerDocument,background:s,coordinate:o,scale:c,valueof:v},fe(u.selected,"background"))),_=Dt(u,{selected:Object.assign({},((f=u.selected)===null||f===void 0?void 0:f.offset)&&{transform:(...k)=>{const R=u.selected.offset(...k),[,D]=k;return sP(d[D],R,o)}})}),{setState:O,removeState:w,hasState:M}=za(_,v),E=(k=!0)=>{for(const R of d)w(R,"selected","unselected"),y(R),b(R);k&&l.emit("element:unselect",{nativeEvent:!0})},A=(k,R,D=!0)=>{if(M(R,"selected"))E();else{const B=r(R),F=p.get(B),z=new Set(F);for(const Y of d)z.has(Y)?O(Y,"selected"):(O(Y,"unselected"),y(Y)),Y!==R&&b(Y);if(g(F),m(R),!D)return;l.emit("element:select",Object.assign(Object.assign({},k),{nativeEvent:D,data:{data:[n(R),...F.map(n)]}}))}},P=(k,R,D=!0)=>{const B=r(R),F=p.get(B),z=new Set(F);if(M(R,"selected")){if(!d.some(q=>!z.has(q)&&M(q,"selected")))return E();for(const q of F)O(q,"unselected"),y(q),b(q)}else{const Y=F.some(q=>M(q,"selected"));for(const q of d)z.has(q)?O(q,"selected"):M(q,"selected")||O(q,"unselected");!Y&&i&&g(F),m(R)}D&&l.emit("element:select",Object.assign(Object.assign({},k),{nativeEvent:D,data:{data:d.filter(Y=>M(Y,"selected")).map(n)}}))},C=k=>{const{target:R,nativeEvent:D=!0}=k;return h.has(R)?a?A(k,R,D):P(k,R,D):E()};t.addEventListener("click",C);const j=k=>{const{nativeEvent:R,data:D}=k;if(R)return;const B=a?D.data.slice(0,1):D.data;for(const F of B){const z=xy(d,F,n);C({target:z,nativeEvent:!1})}},N=()=>{E(!1)};return l.on("element:select",j),l.on("element:unselect",N),()=>{for(const k of d)y(k);t.removeEventListener("click",C),l.off("element:select",j),l.off("element:unselect",N)}}function lh(t){var{createGroup:e,background:n=!1,link:r=!1}=t,i=GZ(t,["createGroup","background","link"]);return(a,o,s)=>{const{container:c,view:l,options:u}=a,{coordinate:f,scale:d}=l,h=Fa(c);return WZ(h,Object.assign({elements:Oo,datum:gs(l),groupKey:e?e(l):void 0,coordinate:f,scale:d,state:Mc(u,[["selected",n?{}:{lineWidth:"1",stroke:"#000"}],"unselected"]),background:n,link:r,emitter:s},i))}}lh.props={reapplyWhenUpdate:!0};function fP(t){return lh(Object.assign(Object.assign({},t),{createGroup:by}))}fP.props={reapplyWhenUpdate:!0};function dP(t){return lh(Object.assign(Object.assign({},t),{createGroup:aP}))}dP.props={reapplyWhenUpdate:!0};var ys=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 HZ(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 YZ({wait:t=30,leading:e,trailing:n=!1}){return r=>{const{options:i,update:a,setState:o,container:s}=r,c=Fa(s),l=ys(u=>{const f=yy(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=HZ(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 $Z=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())})},VZ=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 XZ(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 UZ(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 hP(t){var{wait:e=20,leading:n,trailing:r=!1,labelFormatter:i=o=>`${o}`}=t,a=VZ(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=UZ(f,"line",["x","y","series"]);if(!p)return;const{y:v,x:g,series:y=[]}=p,m=v.map((B,F)=>F),b=Ba(m.map(B=>g[B])),_=Fa(c),O=c.getElementsByClassName(Ca),w=c.getElementsByClassName(V0),E=Kn(w,B=>B.__data__.key.split("-")[0]),A=new rl({style:Object.assign({x1:0,y1:0,x2:0,y2:_.getAttribute("height"),stroke:"black",lineWidth:1},fe(a,"rule"))}),P=new Zi({style:Object.assign({x:0,y:_.getAttribute("height"),text:"",fontSize:10},fe(a,"label"))});A.append(P),_.appendChild(A);const C=(B,F,z)=>{const[Y]=B.invert(z),q=F.invert(Y);return b[hZ(b,q)]},j=(B,F)=>{A.setAttribute("x1",B[0]),A.setAttribute("x2",B[0]),P.setAttribute("text",i(F))};let N;const k=B=>$Z(this,void 0,void 0,function*(){const{x:F}=d,z=C(h,F,B);j(B,z),u("chartIndex",q=>{const rt=Dt({},q),st=rt.marks.find(Lt=>Lt.type==="line"),Yt=Mn(Z0(m,Lt=>Mn(Lt,le=>+v[le])/Ei(Lt,le=>+v[le]),Lt=>y[Lt]).values()),qt=[1/Yt,Yt];Dt(st,{scale:{y:{domain:qt}}});const Rt=XZ(st);Rt.groupBy="color",Rt.basis=(Lt,le)=>{const ue=Lt[_c(we=>g[+we]).center(Lt,z)];return le[ue]};for(const Lt of rt.marks)Lt.animate=!1;return rt}),N=(yield l("chartIndex")).view}),R=B=>{const{scale:F,coordinate:z}=N,{x:Y,y:q}=F,rt=C(z,Y,B);j(B,rt);for(const st of O){const{seriesIndex:At,key:Yt}=st.__data__,qt=At[_c(ze=>g[+ze]).center(At,rt)],Rt=[0,q.map(1)],Lt=[0,q.map(v[qt]/v[At[0]])],[,le]=z.map(Rt),[,ue]=z.map(Lt),we=le-ue;st.setAttribute("transform",`translate(0, ${we})`);const Ue=E.get(Yt)||[];for(const ze of Ue)ze.setAttribute("dy",we)}},D=ys(B=>{const F=yy(_,B);F&&R(F)},e,{leading:n,trailing:r});return k([0,0]),_.addEventListener("pointerenter",D),_.addEventListener("pointermove",D),_.addEventListener("pointerleave",D),()=>{A.remove(),_.removeEventListener("pointerenter",D),_.removeEventListener("pointermove",D),_.removeEventListener("pointerleave",D)}}}hP.props={reapplyWhenUpdate:!0};function Ql(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 uh(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 pP(t){var e=document.createElement("div");e.innerHTML=t;var n=e.childNodes[0];return n&&e.contains(n)&&e.removeChild(n),n}function qZ(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 ZZ=qZ;function KZ(t,e){return t===void 0&&(t=0),e===void 0&&(e=!1),function(n,r,i){var a=i.value,o;typeof a=="function"&&(i.value=function(){for(var s=[],c=0;c<arguments.length;c++)s[c]=arguments[c];if(!o){var l=this;e&&a.apply(l,s),o=window.setTimeout(function(){a.apply(l,s),o=null},t)}})}}function _y(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 vP={overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"};function QZ(t){var e;t===void 0&&(t="");var n=_y(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)]=(0,S.pi)({flex:1},vP),e[".".concat(n.VALUE)]=(0,S.pi)({display:"inline-block",float:"right",flex:1,"text-align":"right","min-width":"28px","margin-left":"30px",color:"rgba(0, 0, 0, 0.85)"},vP),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 JZ=function(t){(0,S.ZT)(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=_y(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:QZ(o)})||this,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,"position",{set:function(n){var r=(0,S.CR)(n,2),i=r[0],a=r[1];this.attributes.x=i,this.attributes.y=a,this.updatePosition()},enumerable:!1,configurable:!0}),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=(0,S._T)(a,["name","color","index"]),h=(0,S.pi)({name:c,color:u,index:f!=null?f:o},d);return pP(ZZ(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,a=n!==void 0&&r!==void 0;if(a){var o=this.element.style.transition;this.element.style.transition="none",this.position=[n!=null?n:+this.attributes.x,r!=null?r:+this.attributes.y],setTimeout(function(){i.element.style.transition=o},10)}this.element.style.visibility="visible"},e.prototype.hide=function(){this.element.style.visibility="hidden"},e.prototype.initShape=function(){var n=this.attributes.template;this.element=pP(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=_y(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,(0,S.ev)([],(0,S.CR)(d),!1));var p=this.element.querySelector(".".concat(u.LIST));p?p.replaceWith(h):f.appendChild(h)}MB(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=(0,S.CR)(d,2),v=p[0],g=p[1],y=(0,S.CR)(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=(0,S.CR)(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(){this.setOffsetPosition(this.autoPosition(this.getRelativeOffsetFromCursor()))},e.prototype.autoPosition=function(n){var r=(0,S.CR)(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=(0,S.CR)([+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,_=l.width,O=l.height,w={left:v<m,right:v+d>m+_,top:g<b,bottom:g+h>b+O},M=[];u.split("-").forEach(function(A){w[A]?M.push(y[A]):M.push(A)});var E=M.join("-");return this.getRelativeOffsetFromCursor(E)},e.tag="tooltip",(0,S.gn)([KZ(100,!0)],e.prototype,"updatePosition",null),e}(Rr),Jl=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 fh(t,e){return e?typeof e=="string"?document.querySelector(e):e:t.ownerDocument.defaultView.getContextService().getDomElement().parentElement}function tK(t){const e=t.getBounds(),{min:[n,r],max:[i,a]}=e;return{x:n,y:r,width:i-n,height:a-r}}function eK(t,e){const n=t.getBoundingClientRect(),r=e.getBoundingClientRect();return{x:n.x-r.x,y:n.y-r.y}}function nK(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 JZ({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 gP({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=fh(t,u),h=fh(t),p=o?h:t,v=f||tK(t),g=eK(h,d),{tooltipElement:y=nK(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 So({root:t,single:e,emitter:n,nativeEvent:r=!0}){r&&n.emit("tooltip:hide",{nativeEvent:r});const i=fh(t),a=e?i:t,{tooltipElement:o}=a;o&&o.hide()}function Oy({root:t,single:e}){const n=fh(t),r=e?n:t;if(!r)return;const{tooltipElement:i}=r;i&&(i.destroy(),r.tooltipElement=void 0)}function yP(t){const{value:e}=t;return Object.assign(Object.assign({},t),{value:e===void 0?"undefined":e})}function rK(t){const{__data__:e}=t,{title:n,items:r=[]}=e,i=r.filter(In).map(a=>{var{color:o=mP(t)}=a,s=Jl(a,["color"]);return Object.assign(Object.assign({},s),{color:o})}).map(yP);return Object.assign(Object.assign({},n&&{title:n}),{items:i})}function iK(t,e){const{color:n,series:r,facet:i=!1}=t,{color:a,series:o}=e,s=c=>c&&c.invert&&!(c instanceof mo)&&!(c instanceof Sl);if(s(r))return r.clone().invert(o);if(o&&r instanceof mo&&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 mP(t){const e=t.getAttribute("fill"),n=t.getAttribute("stroke"),{__data__:r}=t,{color:i=e&&e!=="transparent"?e:n}=r;return i}function bP(t,e=n=>n){const n=new Map(t.map(r=>[e(r),r]));return Array.from(n.values())}function xP(t,e,n,r=t.map(a=>a.__data__),i={}){const a=c=>c instanceof Date?+c:c,o=bP(r.map(c=>c.title),a).filter(In),s=r.flatMap((c,l)=>{const u=t[l],{items:f=[],title:d}=c,h=f.filter(In),p=n!==void 0?n:f.length<=1;return h.map(v=>{var{color:g=mP(u)||i.color,name:y}=v,m=Jl(v,["color","name"]);const b=iK(e,c),_=p?b||y:y||b;return Object.assign(Object.assign({},m),{color:g,name:_||d})})}).map(yP);return Object.assign(Object.assign({},o.length>0&&{title:o.join(",")}),{items:bP(s,c=>`(${a(c.name)}, ${a(c.value)}, ${a(c.color)})`)})}function aK(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=Jl(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(A=>A[1]),g=e.map(A=>A[0]),y=Ql(v),m=Ql(g),b=()=>{if(u){const A=Math.min(a,o)/2,P=s+f+a/2,C=c+d+o/2,j=Gi(ur([m,y],[P,C])),N=P+A*Math.cos(j),k=C+A*Math.sin(j);return[P,N,C,k]}return l?[s,s+r,y+c,y+c]:[m+s,m+s,c,c+i]},[_,O,w,M]=b(),E=()=>{const A=new rl({style:Object.assign({x1:_,x2:O,y1:w,y2:M},p)});return t.appendChild(A),A};if(g.length>0){const A=t.ruleY||E();A.style.x1=_,A.style.x2=O,A.style.y1=w,A.style.y2=M,t.ruleY=A}}function _P(t){t.ruleY&&(t.ruleY.remove(),t.ruleY=void 0)}function oK(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 In(o)&&In(s)}).map(a=>{const[{color:o,element:s},c]=a,l=o||s.style.fill||s.style.stroke||r.color;return new nl({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 OP(t){t.markers&&(t.markers.forEach(e=>e.remove()),t.markers=[])}function wP(t,e){return Array.from(t.values()).some(n=>{var r;return(r=n.interaction)===null||r===void 0?void 0:r[e]})}function wy(t,e){return t===void 0?e:t}function SP(t){const{title:e,items:n}=t;return n.length===0&&e===void 0}function sK(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 MP(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:_,bounding:O,theme:w,disableNative:M=!1,marker:E=!0,preserve:A=!1,style:P={},css:C={}}=e,j=Jl(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 N=n(t),k=$n(o),R=Gn(o),D=Dt(P,j),{innerWidth:B,innerHeight:F,width:z,height:Y,insetLeft:q,insetTop:rt}=o.getOptions(),st=[],At=[];for(const An of N){const{__data__:_n}=An,{seriesX:ar,title:Tn,items:Ar}=_n;ar?st.push(An):(Tn||Ar)&&At.push(An)}const qt=!!(k?a.y:a.x).getBandWidth&&At.length>0;st.sort((An,_n)=>{const ar=k?0:1,Tn=Ar=>Ar.getBounds().min[ar];return k?Tn(_n)-Tn(An):Tn(An)-Tn(_n)});const Rt=An=>{const _n=k?1:0,{min:ar,max:Tn}=An.getLocalBounds();return Ba([ar[_n],Tn[_n]])};At.sort((An,_n)=>{const[ar,Tn]=Rt(An),[Ar,Ir]=Rt(_n),ki=(ar+Tn)/2,Ri=(Ar+Ir)/2;return k?Ri-ki:ki-Ri});const Lt=new Map(st.map(An=>{const{__data__:_n}=An,{seriesX:ar}=_n,Tn=ar.map((Ir,ki)=>ki),Ar=Ba(Tn,Ir=>ar[+Ir]);return[An,[Ar,ar]]})),{x:le}=a,ue=le!=null&&le.getBandWidth?le.getBandWidth()/2:0,we=An=>{const[_n]=o.invert(An);return _n-ue},Ue=(An,_n,ar)=>{const Tn=we(An),Ar=ar.filter(In),[Ir,ki]=Ba([Ar[0],Ar[Ar.length-1]]);if(!qt&&(Tn<Ir||Tn>ki))return null;const Ri=_c(Co=>ar[+Co]).center,ra=Ri(_n,Tn);return _n[ra]},ze=(An,_n)=>{const Tn=An[k?1:0],Ar=_n.filter(Ri=>{const[ra,Co]=Rt(Ri);return Tn>=ra&&Tn<=Co});if(!qt||Ar.length>0)return Ar;const Ir=_c(Ri=>{const[ra,Co]=Rt(Ri);return(ra+Co)/2}).center,ki=Ir(_n,Tn);return[_n[ki]].filter(In)},Je=(An,_n)=>{const{__data__:ar}=An;return Object.fromEntries(Object.entries(ar).filter(([Tn])=>Tn.startsWith("series")&&Tn!=="series").map(([Tn,Ar])=>{const Ir=Ar[_n];return[x_(Tn.replace("series","")),Ir]}))},hn=ys(An=>{const _n=yy(t,An);if(!_n)return;const ar=iP(t),Tn=ar.min[0],Ar=ar.min[1],Ir=[_n[0]-p,_n[1]-v];if(!Ir)return;const ki=ze(Ir,At),Ri=[],ra=[];for(const Tr of st){const[ju,p1]=Lt.get(Tr),G3=Ue(Ir,ju,p1);if(G3!==null){Ri.push(Tr);const W3=Je(Tr,G3),{x:Qlt,y:Jlt}=W3,tut=o.map([(Qlt||0)+ue,Jlt||0]);ra.push([Object.assign(Object.assign({},W3),{element:Tr}),tut])}}const Co=Array.from(new Set(ra.map(Tr=>Tr[0].x))),Zlt=Co[uh(Co,Tr=>Math.abs(Tr-we(Ir)))],h1=ra.filter(Tr=>Tr[0].x===Zlt),Klt=[...h1.map(Tr=>Tr[0]),...ki.map(Tr=>Tr.__data__)],z3=[...Ri,...ki],Iu=xP(z3,a,l,Klt,w);if(r&&Iu.items.sort((Tr,ju)=>r(Tr)-r(ju)),i&&(Iu.items=Iu.items.filter(i)),z3.length===0||SP(Iu)){xn();return}if(g&&gP({root:t,data:Iu,x:_n[0]+Tn,y:_n[1]+Ar,render:c,event:An,single:y,position:m,enterable:b,mount:_,bounding:O,css:C}),s){const Tr=h1.map(p1=>p1[1]),ju=fe(D,"crosshairs");aK(t,Tr,Object.assign(Object.assign({},ju),{plotWidth:B,plotHeight:F,mainWidth:z,mainHeight:Y,insetLeft:q,insetTop:rt,startX:p,startY:v,transposed:k,polar:R}))}if(E){const Tr=fe(D,"marker");oK(t,{data:h1,style:Tr,theme:w})}u.emit("tooltip:show",Object.assign(Object.assign({},An),{nativeEvent:!0,data:{data:{x:Oc(a.x,we(Ir),!0)}}}))},f,{leading:d,trailing:h}),xn=()=>{So({root:t,single:y,emitter:u}),s&&_P(t),E&&OP(t)},Un=()=>{Oy({root:t,single:y}),s&&_P(t),E&&OP(t)},mr=({nativeEvent:An,data:_n})=>{if(An)return;const{x:ar}=_n.data,{x:Tn}=a,Ar=Tn.map(ar),[Ir,ki]=o.map([Ar,.5]),{min:[Ri,ra]}=t.getRenderBounds();hn({offsetX:Ir+Ri,offsetY:ki+ra})},xi=()=>{So({root:t,single:y,emitter:u,nativeEvent:!1})},Va=()=>{Ui(),Un()},ws=()=>{si()},si=()=>{M||(t.addEventListener("pointerenter",hn),t.addEventListener("pointermove",hn),t.addEventListener("pointerleave",xn))},Ui=()=>{M||(t.removeEventListener("pointerenter",hn),t.removeEventListener("pointermove",hn),t.removeEventListener("pointerleave",xn))};return si(),u.on("tooltip:show",mr),u.on("tooltip:hide",xi),u.on("tooltip:disable",Va),u.on("tooltip:enable",ws),()=>{Ui(),u.off("tooltip:show",mr),u.off("tooltip:hide",xi),u.off("tooltip:disable",Va),u.off("tooltip:enable",ws),A?So({root:t,single:y,emitter:u,nativeEvent:!1}):Un()}}function cK(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=A=>A,single:d=!0,position:h,enterable:p,datum:v,view:g,mount:y,bounding:m,theme:b,shared:_=!1,body:O=!0,disableNative:w=!1,preserve:M=!1,css:E={}}){const A=e(t),P=new Set(A),C=Kn(A,f),j=ys(Y=>{const{target:q}=Y;if(!P.has(q)){So({root:t,single:d,emitter:s});return}const rt=f(q),st=C.get(rt),At=st.length===1&&!_?rK(st[0]):xP(st,n,i,void 0,b);if(a&&At.items.sort((Rt,Lt)=>a(Rt)-a(Lt)),o&&(At.items=At.items.filter(o)),SP(At)){So({root:t,single:d,emitter:s});return}const{offsetX:Yt,offsetY:qt}=Y;O&&gP({root:t,data:At,x:Yt,y:qt,render:r,event:Y,single:d,position:h,enterable:p,mount:y,bounding:m,css:E}),s.emit("tooltip:show",Object.assign(Object.assign({},Y),{nativeEvent:!0,data:{data:GO(q,g)}}))},c,{leading:l,trailing:u}),N=Y=>{const{target:q}=Y;P.has(q)&&So({root:t,single:d,emitter:s})},k=()=>{w||(t.addEventListener("pointerover",j),t.addEventListener("pointermove",j),t.addEventListener("pointerout",N))},R=()=>{w||(t.removeEventListener("pointerover",j),t.removeEventListener("pointermove",j),t.removeEventListener("pointerout",N))},D=({nativeEvent:Y,data:q})=>{if(Y)return;const rt=xy(A,q.data,v);if(!rt)return;const st=rt.getBBox(),{x:At,y:Yt,width:qt,height:Rt}=st;j({target:rt,offsetX:At+qt/2,offsetY:Yt+Rt/2})},B=({nativeEvent:Y}={})=>{Y||So({root:t,single:d,emitter:s,nativeEvent:!1})},F=()=>{R(),Oy({root:t,single:d})},z=()=>{k()};return s.on("tooltip:show",D),s.on("tooltip:hide",B),s.on("tooltip:enable",z),s.on("tooltip:disable",F),k(),()=>{R(),s.off("tooltip:show",D),s.off("tooltip:hide",B),M?So({root:t,single:d,emitter:s,nativeEvent:!1}):Oy({root:t,single:d})}}function EP(t){const{shared:e,crosshairs:n,series:r,name:i,item:a=()=>({}),facet:o=!1}=t,s=Jl(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=wP(p,"seriesTooltip"),m=wP(p,"crosshairs"),b=Fa(f),_=wy(r,y);if(_&&sK(p)&&!o)return MP(b,Object.assign(Object.assign({},s),{theme:g,elements:Oo,scale:h,coordinate:v,crosshairs:wy(n,m),item:a,emitter:u}));if(_&&o){const O=l.filter(C=>C!==c&&C.options.parentKey===c.options.key),w=rP(c,l),M=O[0].view.scale,E=b.getBounds(),A=E.min[0],P=E.min[1];return Object.assign(M,{facet:!0}),MP(b.parentNode.parentNode,Object.assign(Object.assign({},s),{theme:g,elements:()=>w,scale:M,coordinate:v,crosshairs:wy(n,m),item:a,startX:A,startY:P,emitter:u}))}return cK(b,Object.assign(Object.assign({},s),{datum:gs(d),elements:Oo,scale:h,coordinate:v,groupKey:e?by(d):void 0,item:a,emitter:u,view:d,theme:g,shared:e}))}}EP.props={reapplyWhenUpdate:!0};var dh=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 AP="legend-category",lK="legend-continuous",uK="items-item",fK="legend-category-item-marker",dK="legend-category-item-label";function TP(t){return t.getElementsByClassName(fK)[0]}function PP(t){return t.getElementsByClassName(dK)[0]}function CP(t){return t.getElementsByClassName(uK)}function kP(t){return t.getElementsByClassName(AP)}function hK(t){return t.getElementsByClassName(lK)}function Sy(t){let e=t.parentNode;for(;e&&!e.__data__;)e=e.parentNode;return e.__data__}function vpt(t){let e=t;for(;e&&!e.attr("class").startsWith("legend");)e=e.children[0];return e.attributes}function pK(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:fe(d,"marker")},p={unselected:fe(d,"label")},{setState:v,removeState:g}=za(h,void 0),{setState:y,removeState:m}=za(p,void 0),b=Array.from(e(t));let _=b.map(i);const O=()=>{for(const E of b){const A=i(E),P=n(E),C=r(E);_.includes(A)?(g(P,"unselected"),m(C,"unselected")):(v(P,"unselected"),y(C,"unselected"))}};for(const E of b){const A=()=>{wo(t,"pointer")},P=()=>{BZ(t)},C=j=>dh(this,void 0,void 0,function*(){const N=i(E),k=_.indexOf(N);k===-1?_.push(N):_.splice(k,1),_.length===0&&_.push(...b.map(i)),yield a(_),O();const{nativeEvent:R=!0}=j;R&&(_.length===b.length?o.emit("legend:reset",{nativeEvent:R}):o.emit("legend:filter",Object.assign(Object.assign({},j),{nativeEvent:R,data:{channel:s,values:_}})))});E.addEventListener("click",C),E.addEventListener("pointerenter",A),E.addEventListener("pointerout",P),l.set(E,C),u.set(E,A),f.set(E,P)}const w=E=>dh(this,void 0,void 0,function*(){const{nativeEvent:A}=E;if(A)return;const{data:P}=E,{channel:C,values:j}=P;C===s&&(_=j,yield a(_),O())}),M=E=>dh(this,void 0,void 0,function*(){const{nativeEvent:A}=E;A||(_=b.map(i),yield a(_),O())});return o.on("legend:filter",w),o.on("legend:reset",M),()=>{for(const E of b)E.removeEventListener("click",l.get(E)),E.removeEventListener("pointerenter",u.get(E)),E.removeEventListener("pointerout",f.get(E)),o.off("legend:filter",w),o.off("legend:reset",M)}}function vK(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 RP(t,{legend:e,channel:n,value:r,ordinal:i,channels:a,allChannels:o,facet:s=!1}){return dh(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 gK(t,e){for(const n of t)RP(n,Object.assign(Object.assign({},e),{facet:!0}))}function yK(){return(t,e,n)=>{const{container:r}=t,i=e.filter(f=>f!==t),a=i.length>0,o=f=>Sy(f).scales.map(d=>d.name),s=[...kP(r),...hK(r)],c=s.flatMap(o),l=a?ys(gK,50,{trailing:!0}):ys(RP,50,{trailing:!0}),u=s.map(f=>{const{name:d,domain:h}=Sy(f).scales[0],p=o(f),v={legend:f,channel:d,channels:p,allChannels:c};return f.className===AP?pK(r,{legends:CP,marker:TP,label:PP,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}):vK(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 mK(){return(t,e,n)=>{const{container:r,view:i,options:a}=t,o=kP(r),s=Oo(r),c=h=>Sy(h).scales[0].name,l=h=>{const{scale:{[h]:p}}=i;return p},u=Mc(a,["active","inactive"]),f=Kl(s,gs(i)),d=[];for(const h of o){const p=Y=>{const{data:q}=h.attributes,{__data__:rt}=Y,{index:st}=rt;return q[st].label},v=c(h),g=CP(h),y=l(v),m=Kn(s,Y=>y.invert(Y.__data__[v])),{state:b={}}=h.attributes,{inactive:_={}}=b,{setState:O,removeState:w}=za(u,f),M={inactive:fe(_,"marker")},E={inactive:fe(_,"label")},{setState:A,removeState:P}=za(M),{setState:C,removeState:j}=za(E),N=Y=>{for(const q of g){const rt=TP(q),st=PP(q);q===Y||Y===null?(P(rt,"inactive"),j(st,"inactive")):(A(rt,"inactive"),C(st,"inactive"))}},k=(Y,q)=>{const rt=p(q),st=new Set(m.get(rt));for(const Yt of s)st.has(Yt)?O(Yt,"active"):O(Yt,"inactive");N(q);const{nativeEvent:At=!0}=Y;At&&n.emit("legend:highlight",Object.assign(Object.assign({},Y),{nativeEvent:At,data:{channel:v,value:rt}}))},R=new Map;for(const Y of g){const q=rt=>{k(rt,Y)};Y.addEventListener("pointerover",q),R.set(Y,q)}const D=Y=>{for(const rt of s)w(rt,"inactive","active");N(null);const{nativeEvent:q=!0}=Y;q&&n.emit("legend:unhighlight",{nativeEvent:q})},B=Y=>{const{nativeEvent:q,data:rt}=Y;if(q)return;const{channel:st,value:At}=rt;if(st!==v)return;const Yt=g.find(qt=>p(qt)===At);Yt&&k({nativeEvent:!1},Yt)},F=Y=>{const{nativeEvent:q}=Y;q||D({nativeEvent:!1})};h.addEventListener("pointerleave",D),n.on("legend:highlight",B),n.on("legend:unhighlight",F);const z=()=>{h.removeEventListener(D),n.off("legend:highlight",B),n.off("legend:unhighlight",F);for(const[Y,q]of R)Y.removeEventListener(q)};d.push(z)}return()=>d.forEach(h=>h())}}var Ti=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){const[n,r,i,a]=t,[o,s,c,l]=e;return!(o>i||c<n||s>a||l<r)}function xK(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 _K(t){const{width:e,height:n}=t.getBBox();return[0,0,e,n]}function Ga(t,e){for(const[n,r]of Object.entries(e))t.style(n,r)}const LP=rc(t=>{const e=t.attributes,{x:n,y:r,width:i,height:a,class:o,renders:s={},handleSize:c=10,document:l}=e,u=Ti(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=(At,Yt,qt)=>{At.handle||(At.handle=qt.createElement("rect"),At.append(At.handle));const{handle:Rt}=At;return Rt.attr(Yt),Rt},h=fe(ev(u,"handleNW","handleNE"),"handleN"),{render:p=d}=h,v=Ti(h,["render"]),g=fe(u,"handleE"),{render:y=d}=g,m=Ti(g,["render"]),b=fe(ev(u,"handleSE","handleSW"),"handleS"),{render:_=d}=b,O=Ti(b,["render"]),w=fe(u,"handleW"),{render:M=d}=w,E=Ti(w,["render"]),A=fe(u,"handleNW"),{render:P=d}=A,C=Ti(A,["render"]),j=fe(u,"handleNE"),{render:N=d}=j,k=Ti(j,["render"]),R=fe(u,"handleSE"),{render:D=d}=R,B=Ti(R,["render"]),F=fe(u,"handleSW"),{render:z=d}=F,Y=Ti(F,["render"]),q=(At,Yt)=>{const{id:qt}=At,Rt=At.attributes,{x:Lt,y:le}=Rt,ue=Ti(Rt,["x","y"]),we=Yt(At,Object.assign({x:0,y:0},ue),l);we.id=qt,we.style.draggable=!0},rt=At=>()=>{const Yt=rc(qt=>q(qt,At));return new Yt({})},st=je(t).attr("className",o).style("x",n).style("y",r).style("draggable",!0);st.maybeAppend("selection","rect").style("draggable",!0).style("fill","transparent").call(Ga,Object.assign({width:i,height:a},ev(u,"handle"))),st.maybeAppend("handle-n",rt(p)).style("x",f).style("y",-f).style("width",i-c).style("height",c).style("fill","transparent").call(Ga,v),st.maybeAppend("handle-e",rt(y)).style("x",i-f).style("y",f).style("width",c).style("height",a-c).style("fill","transparent").call(Ga,m),st.maybeAppend("handle-s",rt(_)).style("x",f).style("y",a-f).style("width",i-c).style("height",c).style("fill","transparent").call(Ga,O),st.maybeAppend("handle-w",rt(M)).style("x",-f).style("y",f).style("width",c).style("height",a-c).style("fill","transparent").call(Ga,E),st.maybeAppend("handle-nw",rt(P)).style("x",-f).style("y",-f).style("width",c).style("height",c).style("fill","transparent").call(Ga,C),st.maybeAppend("handle-ne",rt(N)).style("x",i-f).style("y",-f).style("width",c).style("height",c).style("fill","transparent").call(Ga,k),st.maybeAppend("handle-se",rt(D)).style("x",i-f).style("y",a-f).style("width",c).style("height",c).style("fill","transparent").call(Ga,B),st.maybeAppend("handle-sw",rt(z)).style("x",-f).style("y",a-f).style("width",c).style("height",c).style("fill","transparent").call(Ga,Y)});function My(t,e){var{brushed:n=()=>{},brushended:r=()=>{},brushcreated:i=()=>{},brushstarted:a=()=>{},brushupdated:o=()=>{},extent:s=_K(t),brushRegion:c=(Rt,Lt,le,ue,we)=>[Rt,Lt,le,ue],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=Ti(e,["brushed","brushended","brushcreated","brushstarted","brushupdated","extent","brushRegion","reverse","fill","fillOpacity","stroke","selectedHandles"]);let v=null,g=null,y=null,m=null,b=null,_=!1;const[O,w,M,E]=s;wo(t,"crosshair"),t.style.draggable=!0;const A=(Rt,Lt,le)=>{if(a(le),m&&m.remove(),b&&b.remove(),v=[Rt,Lt],l)return P();C()},P=()=>{b=new ri({style:Object.assign(Object.assign({},p),{fill:u,fillOpacity:f,stroke:d,pointerEvents:"none"})}),m=new LP({style:{x:0,y:0,width:0,height:0,draggable:!0,document:t.ownerDocument},className:"mask"}),t.appendChild(b),t.appendChild(m)},C=()=>{m=new LP({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)},j=(Rt=!0)=>{m&&m.remove(),b&&b.remove(),v=null,g=null,y=null,_=!1,m=null,b=null,r(Rt)},N=(Rt,Lt,le=!0)=>{const[ue,we,Ue,ze]=xK(Rt[0],Rt[1],Lt[0],Lt[1],s),[Je,hn,xn,Un]=c(ue,we,Ue,ze,s);return l?R(Je,hn,xn,Un):k(Je,hn,xn,Un),n(Je,hn,xn,Un,le),[Je,hn,xn,Un]},k=(Rt,Lt,le,ue)=>{m.style.x=Rt,m.style.y=Lt,m.style.width=le-Rt,m.style.height=ue-Lt},R=(Rt,Lt,le,ue)=>{b.style.d=`
M${O},${w}L${M},${w}L${M},${E}L${O},${E}Z
M${Rt},${Lt}L${Rt},${ue}L${le},${ue}L${le},${Lt}Z
`,m.style.x=Rt,m.style.y=Lt,m.style.width=le-Rt,m.style.height=ue-Lt},D=Rt=>{const Lt=(hn,xn,Un,mr,xi)=>hn+xn<mr?mr-xn:hn+Un>xi?xi-Un:hn,le=Rt[0]-y[0],ue=Rt[1]-y[1],we=Lt(le,v[0],g[0],O,M),Ue=Lt(ue,v[1],g[1],w,E),ze=[v[0]+we,v[1]+Ue],Je=[g[0]+we,g[1]+Ue];N(ze,Je)},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"}},F=Rt=>Y(Rt)||z(Rt),z=Rt=>{const{id:Lt}=Rt;return h.indexOf(Lt)===-1?!1:new Set(Object.keys(B)).has(Lt)},Y=Rt=>Rt===m.getElementById("selection"),q=Rt=>{const{target:Lt}=Rt,[le,ue]=my(t,Rt);if(!m||!F(Lt)){A(le,ue,Rt),_=!0;return}F(Lt)&&(y=[le,ue])},rt=Rt=>{const{target:Lt}=Rt,le=my(t,Rt);if(!v)return;if(!y)return N(v,le);if(Y(Lt))return D(le);const[ue,we]=[le[0]-y[0],le[1]-y[1]],{id:Ue}=Lt;if(B[Ue]){const[ze,Je,hn,xn]=B[Ue].vector;return N([v[0]+ue*ze,v[1]+we*Je],[g[0]+ue*hn,g[1]+we*xn])}},st=Rt=>{if(y){y=null;const{x:Ue,y:ze,width:Je,height:hn}=m.style;v=[Ue,ze],g=[Ue+Je,ze+hn],o(Ue,ze,Ue+Je,ze+hn,Rt);return}g=my(t,Rt);const[Lt,le,ue,we]=N(v,g);_=!1,i(Lt,le,ue,we,Rt)},At=Rt=>{const{target:Lt}=Rt;m&&!F(Lt)&&j()},Yt=Rt=>{const{target:Lt}=Rt;!m||!F(Lt)||_?wo(t,"crosshair"):Y(Lt)?wo(t,"move"):z(Lt)&&wo(t,B[Lt.id].cursor)},qt=()=>{wo(t,"default")};return t.addEventListener("dragstart",q),t.addEventListener("drag",rt),t.addEventListener("dragend",st),t.addEventListener("click",At),t.addEventListener("pointermove",Yt),t.addEventListener("pointerleave",qt),{mask:m,move(Rt,Lt,le,ue,we=!0){m||A(Rt,Lt,{}),v=[Rt,Lt],g=[le,ue],N([Rt,Lt],[le,ue],we)},remove(Rt=!0){m&&j(Rt)},destroy(){m&&j(!1),wo(t,"default"),t.removeEventListener("dragstart",q),t.removeEventListener("drag",rt),t.removeEventListener("dragend",st),t.removeEventListener("click",At),t.removeEventListener("pointermove",Yt),t.removeEventListener("pointerleave",qt)}}}function Ey(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 OK(t,e,n){return Ey(t,e,n).map(r=>Fa(r.container))}function wK(t,e,n){return Ey(t,e,n).map(r=>r.options)}function NP(t,e){var{elements:n,selectedHandles:r,siblings:i=rt=>[],datum:a,brushRegion:o,extent:s,reverse:c,scale:l,coordinate:u,series:f=!1,key:d=rt=>rt,bboxOf:h=rt=>{const{x:st,y:At,width:Yt,height:qt}=rt.style;return{x:st,y:At,width:Yt,height:qt}},state:p={},emitter:v}=e,g=Ti(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),_=Kl(y,a),O=fe(g,"mask"),{setState:w,removeState:M}=za(p,_),E=new Map,{width:A,height:P,x:C=0,y:j=0}=h(t),N=s||[0,0,A,P],k=()=>{for(const rt of[...y,...b])M(rt,"active","inactive")},R=(rt,st,At,Yt)=>{var qt;for(const Lt of m)(qt=Lt.brush)===null||qt===void 0||qt.remove();const Rt=new Set;for(const Lt of y){const{min:le,max:ue}=Lt.getLocalBounds(),[we,Ue]=le,[ze,Je]=ue;bK([we,Ue,ze,Je],[rt,st,At,Yt])?(w(Lt,"active"),Rt.add(d(Lt))):w(Lt,"inactive")}for(const Lt of b)Rt.has(d(Lt))?w(Lt,"active"):w(Lt,"inactive")},D=()=>{for(const rt of y)M(rt,"inactive");for(const rt of E.values())rt.remove();E.clear()},B=(rt,st,At,Yt)=>{const qt=Rt=>{const Lt=Rt.cloneNode();return Lt.__data__=Rt.__data__,Rt.parentNode.appendChild(Lt),E.set(Rt,Lt),Lt};for(const Rt of y){const Lt=E.get(Rt)||qt(Rt);Lt.style.clipPath=new Xo({style:{x:rt+C,y:st+j,width:At-rt,height:Yt-st}}),w(Rt,"inactive"),w(Lt,"active")}},F=My(t,Object.assign(Object.assign({},O),{extent:N,brushRegion:o,reverse:c,selectedHandles:r,brushended:rt=>{const st=f?D:k;rt&&v.emit("brush:remove",{nativeEvent:!0}),st()},brushed:(rt,st,At,Yt,qt)=>{const Rt=ah(rt,st,At,Yt,l,u);qt&&v.emit("brush:highlight",{nativeEvent:!0,data:{selection:Rt}}),(f?B:R)(rt,st,At,Yt)},brushcreated:(rt,st,At,Yt,qt)=>{const Rt=ah(rt,st,At,Yt,l,u);v.emit("brush:end",Object.assign(Object.assign({},qt),{nativeEvent:!0,data:{selection:Rt}}))},brushupdated:(rt,st,At,Yt,qt)=>{const Rt=ah(rt,st,At,Yt,l,u);v.emit("brush:end",Object.assign(Object.assign({},qt),{nativeEvent:!0,data:{selection:Rt}}))},brushstarted:rt=>{v.emit("brush:start",rt)}})),z=({nativeEvent:rt,data:st})=>{if(rt)return;const{selection:At}=st,[Yt,qt,Rt,Lt]=yZ(At,l,u);F.move(Yt,qt,Rt,Lt,!1)};v.on("brush:highlight",z);const Y=({nativeEvent:rt}={})=>{rt||F.remove(!1)};v.on("brush:remove",Y);const q=F.destroy.bind(F);return F.destroy=()=>{v.off("brush:highlight",z),v.off("brush:remove",Y),q()},F}function Ay(t){var{facet:e,brushKey:n}=t,r=Ti(t,["facet","brushKey"]);return(i,a,o)=>{const{container:s,view:c,options:l}=i,u=Fa(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],_=g.max[1];return NP(u.parentNode.parentNode,Object.assign(Object.assign({elements:()=>rP(i,a),datum:gs(gy(i,a).map(O=>O.view)),brushRegion:(O,w,M,E)=>[O,w,M,E],extent:[y,m,b,_],state:Mc(gy(i,a).map(O=>O.options),d),emitter:o,scale:h,coordinate:p,selectedHandles:void 0},f),r))}const v=NP(u,Object.assign(Object.assign({elements:Oo,key:g=>g.__data__.key,siblings:()=>OK(i,a,n),datum:gs([c,...Ey(i,a,n).map(g=>g.view)]),brushRegion:(g,y,m,b)=>[g,y,m,b],extent:void 0,state:Mc([l,...wK(i,a,n)],d),emitter:o,scale:h,coordinate:p,selectedHandles:void 0},f),r));return u.brush=v,()=>v.destroy()}}function Ty(t,e,n,r,i){const[,a,,o]=i;return[t,a,n,o]}function SK(t){return Ay(Object.assign(Object.assign({},t),{brushRegion:Ty,selectedHandles:["handle-e","handle-w"]}))}function Py(t,e,n,r,i){const[a,,o]=i;return[a,e,o,r]}function MK(t){return Ay(Object.assign(Object.assign({},t),{brushRegion:Py,selectedHandles:["handle-n","handle-s"]}))}var Cy=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="axis",AK="axis-line",TK="axis-main-group",IP="axis-hot-area";function PK(t){return t.getElementsByClassName(EK)}function jP(t){return t.getElementsByClassName(AK)[0]}function CK(t){return t.getElementsByClassName(TK)[0]}function DP(t){return CK(t).getLocalBounds()}function kK(t,e){var{cross:n,offsetX:r,offsetY:i}=e,a=Cy(e,["cross","offsetX","offsetY"]);const o=DP(t),s=jP(t),[c]=s.getLocalBounds().min,[l,u]=o.min,[f,d]=o.max,h=(f-l)*2;return{brushRegion:Py,hotZone:new Xo({className:IP,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 RK(t,e){var{offsetY:n,offsetX:r,cross:i=!1}=e,a=Cy(e,["offsetY","offsetX","cross"]);const o=DP(t),s=jP(t),[,c]=s.getLocalBounds().min,[l,u]=o.min,[f,d]=o.max,h=d-u;return{brushRegion:Ty,hotZone:new Xo({className:IP,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 LK(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=Cy(e,["axes","elements","points","horizontal","datum","offsetY","offsetX","reverse","state","emitter","coordinate"]);const p=r(t),v=n(t),g=Kl(p,o),{setState:y,removeState:m}=za(u,g),b=new Map,_=fe(h,"mask"),O=z=>Array.from(b.values()).every(([Y,q,rt,st])=>z.some(([At,Yt])=>At>=Y&&At<=rt&&Yt>=q&&Yt<=st)),w=v.map(z=>z.attributes.scale),M=z=>z.length>2?[z[0],z[z.length-1]]:z,E=new Map,A=()=>{E.clear();for(let z=0;z<v.length;z++){const Y=w[z],{domain:q}=Y.getOptions();E.set(z,M(q))}};A();const P=(z,Y)=>{const q=[];for(const st of p){const At=i(st);O(At)?(y(st,"active"),q.push(st)):y(st,"inactive")}if(E.set(z,j(q,z)),!Y)return;const rt=()=>{if(!N)return Array.from(E.values());const st=[];for(const[At,Yt]of E){const qt=w[At],{name:Rt}=qt.getOptions();Rt==="x"?st[0]=Yt:st[1]=Yt}return st};f.emit("brushAxis:highlight",{nativeEvent:!0,data:{selection:rt()}})},C=z=>{for(const Y of p)m(Y,"active","inactive");A(),z&&f.emit("brushAxis:remove",{nativeEvent:!0})},j=(z,Y)=>{const q=w[Y],{name:rt}=q.getOptions(),st=z.map(At=>{const Yt=At.__data__;return q.invert(Yt[rt])});return M(_o(q,st))},N=v.some(a)&&v.some(z=>!a(z)),k=[];for(let z=0;z<v.length;z++){const Y=v[z],q=a(Y)?RK:kK,{hotZone:rt,brushRegion:st,extent:At}=q(Y,{offsetY:s,offsetX:c,cross:N,zIndex:999,fill:"transparent"});Y.parentNode.appendChild(rt);const Yt=My(rt,Object.assign(Object.assign({},_),{reverse:l,brushRegion:st,brushended(qt){b.delete(Y),Array.from(b.entries()).length===0?C(qt):P(z,qt)},brushed(qt,Rt,Lt,le,ue){b.set(Y,At(qt,Rt,Lt,le)),P(z,ue)}}));k.push(Yt)}const R=(z={})=>{const{nativeEvent:Y}=z;Y||k.forEach(q=>q.remove(!1))},D=(z,Y,q)=>{const[rt,st]=z,At=Rt=>Rt.getStep?Rt.getStep():0,Yt=B(rt,Y,q),qt=B(st,Y,q)+At(Y);return a(q)?[Yt,-1/0,qt,1/0]:[-1/0,Yt,1/0,qt]},B=(z,Y,q)=>{const{height:rt,width:st}=d.getOptions(),At=Y.clone();return a(q)?At.update({range:[0,st]}):At.update({range:[rt,0]}),At.map(z)},F=z=>{const{nativeEvent:Y}=z;if(Y)return;const{selection:q}=z.data;for(let rt=0;rt<k.length;rt++){const st=q[rt],At=k[rt],Yt=v[rt];if(st){const qt=w[rt];At.move(...D(st,qt,Yt),!1)}else At.remove(!1)}};return f.on("brushAxis:remove",R),f.on("brushAxis:highlight",F),()=>{k.forEach(z=>z.destroy()),f.off("brushAxis:remove",R),f.off("brushAxis:highlight",F)}}function NK(t){return(e,n,r)=>{const{container:i,view:a,options:o}=e,s=Fa(i),{x:c,y:l}=s.getBBox(),{coordinate:u}=a;return LK(i,Object.assign({elements:Oo,axes:PK,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:gs(a),state:Mc(o,["active",["inactive",{opacity:.5}]]),coordinate:u,emitter:r},t))}}var IK=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())})},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};function jK(t=300){let e=null;return n=>{const{timeStamp:r}=n;return e!==null&&r-e<t?(e=r,!0):(e=r,!1)}}function DK(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=BP(e,["filter","reset","brushRegion","extent","reverse","emitter","scale","coordinate","selection","series"]);const h=fe(d,"mask"),{width:p,height:v}=t.getBBox(),g=a||[0,0,p,v],y=jK(),m=My(t,Object.assign(Object.assign({},h),{extent:g,brushRegion:i,reverse:o,brushcreated:b}));t.addEventListener("click",_);function b(w,M,E,A,P){P.nativeEvent=!0,n(u(w,M,E,A),P),m.remove()}function _(w){y(w)&&(w.nativeEvent=!0,r(w))}const O=({nativeEvent:w,data:M})=>{if(w)return;const{selection:E}=M;n(E,{nativeEvent:!1})};return s.on("brush:filter",O),()=>{m.destroy(),s.off("brush:filter",O),t.removeEventListener("click",_)}}function ky(t){var{hideX:e=!0,hideY:n=!0}=t,r=BP(t,["hideX","hideY"]);return(i,a,o)=>{const{container:s,view:c,options:l,update:u,setState:f}=i,d=Fa(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 DK(d,Object.assign(Object.assign({brushRegion:(b,_,O,w)=>[b,_,O,w],selection:(b,_,O,w)=>{const{scale:M,coordinate:E}=g;return ah(b,_,O,w,M,E)},filter:(b,_)=>IK(this,void 0,void 0,function*(){if(v)return;v=!0;const[O,w]=b;f("brushFilter",E=>{const{marks:A}=E,P=A.map(C=>Dt({axis:Object.assign(Object.assign({},e&&{x:{transform:[{type:"hide"}]}}),n&&{y:{transform:[{type:"hide"}]}})},C,{scale:{x:{domain:O,nice:!1},y:{domain:w,nice:!1}}}));return Object.assign(Object.assign({},l),{marks:P,clip:!0})}),o.emit("brush:filter",Object.assign(Object.assign({},_),{data:{selection:[O,w]}})),g=(yield u()).view,v=!1,p=!0}),reset:b=>{if(v||!p)return;const{scale:_}=c,{x:O,y:w}=_,M=O.getOptions().domain,E=w.getOptions().domain;o.emit("brush:filter",Object.assign(Object.assign({},b),{data:{selection:[M,E]}})),p=!1,g=c,f("brushFilter"),u()},extent:void 0,emitter:o,scale:y,coordinate:m},h),r))}}function BK(t){return ky(Object.assign(Object.assign({hideX:!0},t),{brushRegion:Ty}))}function FK(t){return ky(Object.assign(Object.assign({hideY:!0},t),{brushRegion:Py}))}var zK=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 GK="slider";function WK(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 HK(t,e,n){const[r,i]=t,a=n?c=>1-c:c=>c,o=Oc(e,a(r),!0),s=Oc(e,a(i),!1);return _o(e,[o,s])}function hh(t){return[t[0],t[t.length-1]]}function FP({initDomain:t={},className:e=GK,prefix:n="slider",setValue:r=(c,l)=>c.setValues(l),hasState:i=!1,wait:a=50,leading:o=!0,trailing:s=!1}){return(c,l,u)=>{const{container:f,view:d,update:h,setState:p}=c,v=f.getElementsByClassName(e);if(!v.length)return()=>{};let g=!1;const{scale:y,coordinate:m,layout:b}=d,{paddingLeft:_,paddingTop:O,paddingBottom:w,paddingRight:M}=b,{x:E,y:A}=y,P=$n(m),C=R=>{const D=R==="vertical"?"y":"x",B=R==="vertical"?"x":"y";return P?[B,D]:[D,B]},j=new Map,N=new Set,k={x:t.x||E.getOptions().domain,y:t.y||A.getOptions().domain};for(const R of v){const{orientation:D}=R.attributes,[B,F]=C(D),z=`${n}${ao(B)}:filter`,Y=B==="x",{ratio:q}=E.getOptions(),{ratio:rt}=A.getOptions(),st=qt=>{if(qt.data){const{selection:we}=qt.data,[Ue=hh(k.x),ze=hh(k.y)]=we;return Y?[_o(E,Ue,q),_o(A,ze,rt)]:[_o(A,ze,rt),_o(E,Ue,q)]}const{value:Rt}=qt.detail,Lt=y[B],le=HK(Rt,Lt,P&&D==="horizontal"),ue=k[F];return[le,ue]},At=ys(qt=>zK(this,void 0,void 0,function*(){if(g)return;g=!0;const{nativeEvent:Rt=!0}=qt,[Lt,le]=st(qt);if(k[B]=Lt,k[F]=le,Rt){const ue=Y?Lt:le,we=Y?le:Lt;u.emit(z,Object.assign(Object.assign({},qt),{nativeEvent:Rt,data:{selection:[hh(ue),hh(we)]}}))}p(R,ue=>Object.assign(Object.assign({},WK(ue,{[B]:{domain:Lt,nice:!1}},n,i,B,F)),{paddingLeft:_,paddingTop:O,paddingBottom:w,paddingRight:M})),yield h(),g=!1}),a,{leading:o,trailing:s}),Yt=qt=>{const{nativeEvent:Rt}=qt;if(Rt)return;const{data:Lt}=qt,{selection:le}=Lt,[ue,we]=le;R.dispatchEvent(new Nn("valuechange",{data:Lt,nativeEvent:!1}));const Ue=Y?oh(ue,E):oh(we,A);r(R,Ue)};u.on(z,Yt),R.addEventListener("valuechange",At),j.set(R,At),N.add([z,Yt])}return h(),()=>{for(const[R,D]of j)R.removeEventListener("valuechange",D);for(const[R,D]of N)u.off(R,D)}}}const zP="g2-scrollbar";function YK(t={}){return(e,n,r)=>{const{view:i,container:a}=e;if(!a.getElementsByClassName(zP).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}),FP(Object.assign(Object.assign({},t),{initDomain:u,className:zP,prefix:"scrollbar",hasState:!0,setValue:(d,h)=>d.setValue(h[0])}))(e,n,r)}}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 VK(t,e,n){return`<${t} style="${Object.entries(n).map(([r,i])=>`${uW(r)}:${i}`).join(";")}">${e}</${t}>`}const XK={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 GP(t){return t.nodeName!=="text"?!1:!!t.isOverflowing()}function WP(t){var{offsetX:e=8,offsetY:n=8}=t,r=$K(t,["offsetX","offsetY"]);return i=>{const{container:a}=i,[o,s]=a.getBounds().min,c=fe(r,"tip"),l=new Set,u=d=>{const{target:h}=d;if(!GP(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 xf({className:"poptip",style:{innerHTML:VK("div",m,Object.assign(Object.assign({},XK),c)),x:g,y}});a.appendChild(b),h.tip=b,l.add(b)},f=d=>{const{target:h}=d;if(!GP(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())}}}WP.props={reapplyWhenUpdate:!0};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};const HP=()=>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=UK(s,["data","x","y","width","height"]);return Object.assign(Object.assign({},h),{data:Iv(c,o),x:l!=null?l:n,y:u!=null?u:r,width:f!=null?f:i,height:d!=null?d:a})})};HP.props={};var qK=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 YP=()=>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=qK(g,["data"]),b=Iv(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};YP.props={};class tu{constructor(e){this.$value=e}static of(e){return new tu(e)}call(e,...n){return this.$value=e(this.$value,...n),this}value(){return this.$value}}var ZK=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 KK=tc(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=Kn(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"))}}}),Ry=tc(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")?[Ia(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)}}}),Ly=tc(()=>({animate:{enterType:"fadeIn"}})),Ny=ec(()=>({frame:!1,encode:{shape:"hollow"},style:{lineWidth:0}})),Iy=ec(()=>({type:"cell"})),$P=ec(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}))})()}}]}}}),VP=ec((t,e=QK,n=JK,r=tQ,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,_,O)=>{const{x:w,y:M}=_,{paddingLeft:E,paddingTop:A,marginLeft:P,marginTop:C}=O,{domain:j}=w.getOptions(),{domain:N}=M.getOptions(),k=Zo(b),R=b.map(e),D=b.map(({x:rt,y:st})=>[w.invert(rt),M.invert(st)]),F=D.map(([rt,st])=>At=>{const{[p]:Yt,[v]:qt}=At;return(p!==void 0?Yt===rt:!0)&&(v!==void 0?qt===st:!0)}).map(rt=>h.filter(rt)),z=f?Mn(F,rt=>rt.length):void 0,Y=D.map(([rt,st])=>({columnField:p,columnIndex:j.indexOf(rt),columnValue:rt,columnValuesLength:j.length,rowField:v,rowIndex:N.indexOf(st),rowValue:st,rowValuesLength:N.length})),q=Y.map(rt=>Array.isArray(s)?s:[s(rt)].flat(1));return k.flatMap(rt=>{const[st,At,Yt,qt]=R[rt],Rt=Y[rt],Lt=F[rt];return q[rt].map(ue=>{var we,Ue,{scale:ze,key:Je,facet:hn=!0,axis:xn={},legend:Un={}}=ue,mr=ZK(ue,["scale","key","facet","axis","legend"]);const xi=((we=ze==null?void 0:ze.y)===null||we===void 0?void 0:we.guide)||xn.y,Va=((Ue=ze==null?void 0:ze.x)===null||Ue===void 0?void 0:Ue.guide)||xn.x,ws={x:{tickCount:p?5:void 0},y:{tickCount:v?5:void 0}},si=hn?Lt:Lt.length===0?[]:h,Ui={color:{domain:y}},An={x:XP(Va,n)(Rt,si),y:XP(xi,r)(Rt,si)};return Object.assign(Object.assign({key:`${Je}-${rt}`,data:si,margin:0,x:st+E+l+P,y:At+A+u+C,parentKey:d,width:Yt,height:qt,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,frame:!!si.length,dataDomain:z,scale:Dt(ws,ze,Ui),axis:Dt({},xn,An),legend:!1},mr),i)})})}}});function QK(t){const{points:e}=t;return Dv(e)}function ph(t,e){return e.length?Dt({title:!1,tick:null,label:null},t):Dt({title:!1,tick:null,label:null,grid:null},t)}function JK(t){return(e,n)=>{const{rowIndex:r,rowValuesLength:i,columnIndex:a,columnValuesLength:o}=e;if(r!==i-1)return ph(t,n);const s=a!==o-1?!1:void 0,c=n.length?void 0:null;return Dt({title:s,grid:c},t)}}function tQ(t){return(e,n)=>{const{rowIndex:r,columnIndex:i}=e;if(i!==0)return ph(t,n);const a=r!==0?!1:void 0,o=n.length?void 0:null;return Dt({title:a,grid:o},t)}}function XP(t,e){return typeof t=="function"?t:t===null||t===!1?()=>null:e(t)}const UP=()=>t=>[tu.of(t).call(Iy).call(Ry).call(Ly).call(KK).call(Ny).call($P).call(VP).value()];UP.props={};var jy=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 eQ=tc(t=>({scale:{x:{guide:null,paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}})),nQ=ec(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=Zo(s),b=s.map(({points:M})=>Dv(M)),_=s.map(({x:M,y:E})=>[u.invert(M),f.invert(E)]),O=_.map(([M,E])=>({columnField:M,columnIndex:g.indexOf(M),columnValue:M,columnValuesLength:g.length,rowField:E,rowIndex:y.indexOf(E),rowValue:E,rowValuesLength:y.length})),w=O.map(M=>Array.isArray(n)?n:[n(M)].flat(1));return m.flatMap(M=>{const[E,A,P,C]=b[M],[j,N]=_[M],k=O[M];return w[M].map(D=>{var B,F;const{scale:z,key:Y,encode:q,axis:rt,interaction:st}=D,At=jy(D,["scale","key","encode","axis","interaction"]),Yt=(B=z==null?void 0:z.y)===null||B===void 0?void 0:B.guide,qt=(F=z==null?void 0:z.x)===null||F===void 0?void 0:F.guide,Rt={x:{facet:!1},y:{facet:!1}},Lt={x:iQ(qt)(k,e),y:aQ(Yt)(k,e)},le={x:{tickCount:5},y:{tickCount:5}};return Object.assign({data:e,parentKey:a,key:`${Y}-${M}`,x:E+d+r+p,y:A+h+i+v,width:P,height:C,margin:0,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,frame:!0,scale:Dt(Rt,z),axis:Dt(le,rt,Lt),legend:!1,encode:Dt({},q,{x:j,y:N}),interaction:Dt({},st,{legendFilter:!1})},At)})})}}}),rQ=ec(t=>{const{encode:e}=t,n=jy(t,["encode"]),{position:r=[],x:i=r,y:a=[...r].reverse()}=e,o=jy(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 iQ(t){return typeof t=="function"?t:t===null?()=>null:(e,n)=>{const{rowIndex:r,rowValuesLength:i}=e;if(r!==i-1)return ph(t,n)}}function aQ(t){return typeof t=="function"?t:t===null?()=>null:(e,n)=>{const{columnIndex:r}=e;if(r!==0)return ph(t,n)}}const oQ=()=>t=>[tu.of(t).call(Iy).call(Ry).call(nQ).call(rQ).call(Ly).call(Ny).call(eQ).value()];var sQ=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 cQ=tc(t=>({scale:{x:{guide:{type:"axisArc"},paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}})),lQ=tc(t=>({coordinate:{type:"polar"}})),uQ=t=>{const{encode:e}=t,n=sQ(t,["encode"]),{position:r}=e;return Object.assign(Object.assign({},n),{encode:{x:r}})};function qP(t){return e=>null}function fQ(t){const{points:e}=t,[n,r,i,a]=e,o=Jn(n,a),s=ur(n,a),c=ur(r,i),l=xO(s,c),u=1/Math.sin(l/2),f=o/(1+u),d=f*Math.sqrt(2),[h,p]=i,g=nc(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 dQ=()=>t=>[tu.of(t).call(Iy).call(uQ).call(Ry).call(lQ).call($P).call(VP,fQ,qP,qP,{frame:!1}).call(Ly).call(Ny).call(cQ).value()];function hQ(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 pQ(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 ZP=()=>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=>pQ(l,n,a));return function*(){let l=0,u;for(;r==="infinite"||l<r;){const[f,d]=hQ(i,l,o);for(let h=f;h<d;h+=1){const p=Math.abs(h);u!==p&&(yield c[p]),u=p}l++}}};ZP.props={};function Mo(t,e,n){const{encode:r}=n;if(t===null)return[e];const i=vQ(t).map(o=>{var s;return[o,(s=un(r,o))===null||s===void 0?void 0:s[0]]}).filter(([,o])=>In(o)),a=o=>i.map(([,s])=>s[o]).join("-");return Array.from(Kn(e,a).values())}function KP(t){return Array.isArray(t)?mQ(t):typeof t=="function"?yQ(t):t==="series"?gQ:t==="value"?bQ:t==="sum"?xQ:t==="maxIndex"?_Q:()=>null}function QP(t,e){for(const n of t)n.sort(e)}function JP(t,e){return(e==null?void 0:e.domain)||Array.from(new Set(t))}function vQ(t){return Array.isArray(t)?t:[t]}function gQ(t,e,n){return eu(r=>n[r])}function yQ(t){return(e,n,r)=>eu(i=>t(e[i]))}function mQ(t){return(e,n,r)=>(i,a)=>t.reduce((o,s)=>o!==0?o:fr(e[i][s],e[a][s]),0)}function bQ(t,e,n){return eu(r=>e[r])}function xQ(t,e,n){const r=Zo(t),i=Array.from(Kn(r,o=>n[+o]).entries()),a=new Map(i.map(([o,s])=>[o,s.reduce((c,l)=>c+ +e[l])]));return eu(o=>a.get(n[o]))}function _Q(t,e,n){const r=Zo(t),i=Array.from(Kn(r,o=>n[+o]).entries()),a=new Map(i.map(([o,s])=>[o,ic(s,c=>e[c])]));return eu(o=>a.get(n[o]))}function eu(t){return(e,n)=>fr(t(e),t(n))}const tC=(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]=un(u,"y"),[p,v]=un(u,"y1"),[g]=o?Il(u,"series","color"):un(u,"color"),y=Mo(e,s,c),b=KP(n)(l,d,g);b&&QP(y,b);const _=new Array(s.length),O=new Array(s.length),w=new Array(s.length),M=[],E=[];for(const N of y){r&&N.reverse();const k=p?+p[N[0]]:0,R=[],D=[];for(const st of N){const At=w[st]=+d[st]-k;At<0?D.push(st):At>=0&&R.push(st)}const B=R.length>0?R:D,F=D.length>0?D:R;let z=R.length-1,Y=0;for(;z>0&&d[B[z]]===0;)z--;for(;Y<F.length-1&&d[F[Y]]===0;)Y++;M.push(B[z]),E.push(F[Y]);let q=k;for(const st of D.reverse()){const At=w[st];q=_[st]=(O[st]=q)+At}let rt=k;for(const st of R){const At=w[st];At>0?rt=_[st]=(O[st]=rt)+At:_[st]=O[st]=rt}}const A=new Set(M),P=new Set(E),C=i==="y"?_:O,j=a==="y"?_:O;return[s,Dt({},c,{encode:{y0:Nd(d,h),y:dr(C,h),y1:dr(j,v)},style:Object.assign({first:(N,k)=>A.has(k),last:(N,k)=>P.has(k)},f)})]}};tC.props={};function eC(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 OQ(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 nC(t,e){const n=OQ(t,e);return n&&Math.sqrt(n)}function wQ(t,e,n){const r=eC(t),i=nC(t);return r&&i?Math.ceil((n-e)*Math.cbrt(r)/(3.49*i)):1}var rC=Array.prototype,SQ=rC.slice,gpt=rC.map;function Dy(t){return()=>t}const MQ=Math.sqrt(50),EQ=Math.sqrt(10),AQ=Math.sqrt(2);function vh(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>=MQ?10:a>=EQ?5:a>=AQ?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?vh(t,e,n*2):[s,c,l]}function TQ(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?vh(e,t,n):vh(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 nu(t,e,n){return e=+e,t=+t,n=+n,vh(t,e,n)[2]}function ypt(t,e,n){e=+e,t=+t,n=+n;const r=e<t,i=r?nu(e,t,n):nu(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}function PQ(t,e,n){let r;for(;;){const i=nu(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 CQ(t){return Math.max(1,Math.ceil(Math.log(eC(t))/Math.LN2)+1)}function kQ(){var t=sl,e=Ia,n=CQ;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,_=+h;if(e===Ia&&([f,d]=PQ(f,d,_)),h=TQ(f,d,_),h[0]<=f&&(c=nu(f,d,_)),h[h.length-1]>=d)if(b>=d&&e===Ia){const O=nu(f,d,_);isFinite(O)&&(O>0?d=(Math.floor(d/O)+1)*O:O<0&&(d=(Math.ceil(d*-O)+1)/-O))}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[pZ(h,s,0,p)].push(i[a]);return y}return r.value=function(i){return arguments.length?(t=typeof i=="function"?i:Dy(i),r):t},r.domain=function(i){return arguments.length?(e=typeof i=="function"?i:Dy([i[0],i[1]]),r):e},r.thresholds=function(i){return arguments.length?(n=typeof i=="function"?i:Dy(Array.isArray(i)?SQ.call(i):i),r):n},r}function By(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?Vl:GT(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));By(t,e,h,p,i)}const a=t[e];let o=n,s=r;for(ru(t,n,e),i(t[r],a)>0&&ru(t,n,r);o<s;){for(ru(t,o,s),++o,--s;i(t[o],a)<0;)++o;for(;i(t[s],a)>0;)--s}i(t[n],a)===0?ru(t,n,s):(++s,ru(t,s,r)),s<=e&&(n=s+1),e<=s&&(r=s-1)}return t}function ru(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function RQ(t,e=fr){let n,r=!1;if(e.length===1){let i;for(const a of t){const o=e(a);(r?fr(o,i)>0:fr(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 gh(t,e,n){if(t=Float64Array.from(uZ(t,n)),!(!(r=t.length)||isNaN(e=+e))){if(e<=0||r<2)return Ei(t);if(e>=1)return Mn(t);var r,i=(r-1)*e,a=Math.floor(i),o=Mn(By(t,a).subarray(0,a+1)),s=Ei(t.subarray(a+1));return o+(s-o)*(i-a)}}function mpt(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 LQ(t,e,n=dy){if(!isNaN(e=+e)){if(r=Float64Array.from(t,(s,c)=>dy(n(t[c],c,t))),e<=0)return uh(r);if(e>=1)return ic(r);var r,i=Uint32Array.from(t,(s,c)=>c),a=r.length-1,o=Math.floor(a*e);return By(i,o,0,a,(s,c)=>Vl(r[s],r[c])),o=RQ(i.subarray(0,o+1),s=>r[s]),o>=0?o:-1}}function Fy(t,e){return gh(t,.5,e)}function NQ(t,e){return LQ(t,.5,e)}var IQ=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 Eo(t){return e=>e===null?t:`${t} of ${e}`}function jQ(t){if(typeof t=="function")return[t,null];const n={mean:DQ,max:FQ,count:GQ,first:HQ,last:YQ,sum:WQ,min:zQ,median:BQ}[t];if(!n)throw new Error(`Unknown reducer: ${t}.`);return n()}function DQ(){const t=(n,r)=>Ql(n,i=>+r[i]),e=Eo("mean");return[t,e]}function BQ(){const t=(n,r)=>Fy(n,i=>+r[i]),e=Eo("median");return[t,e]}function FQ(){const t=(n,r)=>Mn(n,i=>+r[i]),e=Eo("max");return[t,e]}function zQ(){const t=(n,r)=>Ei(n,i=>+r[i]),e=Eo("min");return[t,e]}function GQ(){const t=(n,r)=>n.length,e=Eo("count");return[t,e]}function WQ(){const t=(n,r)=>Di(n,i=>+r[i]),e=Eo("sum");return[t,e]}function HQ(){const t=(n,r)=>r[n[0]],e=Eo("first");return[t,e]}function YQ(){const t=(n,r)=>r[n[n.length-1]],e=Eo("last");return[t,e]}const zy=(t={})=>{const{groupBy:e}=t,n=IQ(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]=un(o,v);return g},l=Object.entries(n).map(([h,p])=>{const[v,g]=jQ(p),[y,m]=un(o,h),b=c(m,p),_=s.map(O=>v(O,y!=null?y:a));return[h,Object.assign(Object.assign({},EX(_,(g==null?void 0:g(b))||b)),{aggregate:!0})]}),u=Object.keys(o).map(h=>{const[p,v]=un(o,h),g=s.map(y=>p[y[0]]);return[h,dr(g,v)]}),f=s.map(h=>a[h[0]]);return[Zo(s),Dt({},i,{data:f,encode:Object.fromEntries([...u,...l])})]}};zy.props={};var $Q=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 iC="thresholds";function VQ(t){const[e,n]=Ia(t);return Math.min(200,wQ(t,e,n))}const Gy=(t={})=>{const{groupChannels:e=["color"],binChannels:n=["x","y"]}=t,r=$Q(t,["groupChannels","binChannels"]),i={},a=(o,s)=>{const{encode:c}=s,l=n.map(p=>{const[v]=un(c,p);return v}),u=fe(r,iC),f=o.filter(p=>l.every(v=>In(v[p]))),d=[...e.map(p=>{const[v]=un(c,p);return v}).filter(In).map(p=>v=>p[v]),...n.map((p,v)=>{const g=l[v],y=u[p]||VQ(g),m=kQ().thresholds(y).value(_=>+g[_])(f),b=new Map(m.flatMap(_=>{const{x0:O,x1:w}=_,M=`${O},${w}`;return _.map(E=>[E,M])}));return i[p]=b,_=>b.get(_)})],h=p=>d.map(v=>v(p)).join("-");return Array.from(Kn(f,h).values())};return zy(Object.assign(Object.assign(Object.assign({},Object.fromEntries(Object.entries(r).filter(([o])=>!o.startsWith(iC)))),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}))};Gy.props={};const aC=(t={})=>{const{thresholds:e}=t;return Gy(Object.assign(Object.assign({},t),{thresholdsX:e,groupChannels:["color"],binChannels:["x"]}))};aC.props={};var XQ=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={})=>{const{groupBy:e="x",reverse:n=!1,orderBy:r,padding:i}=t,a=XQ(t,["groupBy","reverse","orderBy","padding"]);return(o,s)=>{const{data:c,encode:l,scale:u}=s,{series:f}=u,[d]=un(l,"y"),[h]=Il(l,"series","color"),p=JP(h,f),v=Mo(e,o,s),y=KP(r)(c,d,h);y&&QP(v,y);const m=new Array(o.length);for(const b of v){n&&b.reverse();for(let _=0;_<b.length;_++)m[b[_]]=p[_]}return[o,Dt({},s,{scale:{series:{domain:p,paddingInner:i}},encode:{series:dr(m)}})]}};oC.props={};function yh(t,e,n){if(t===null)return[-.5,.5];const r=JP(t,e),a=new mo({domain:r,range:[0,1],padding:n}).getBandWidth();return[-a/2,a/2]}function mh(t,e,n){return e*(1-t)+n*t}const sC=(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]=un(s,"x"),[d]=un(s,"y"),h=yh(f,l,n),p=yh(d,u,r),v=a.map(()=>mh(i(),...p)),g=a.map(()=>mh(i(),...h));return[a,Dt({scale:{x:{padding:.5},y:{padding:.5}}},o,{encode:{dy:dr(v),dx:dr(g)}})]}};sC.props={};const cC=(t={})=>{const{padding:e=0,random:n=Math.random}=t;return(r,i)=>{const{encode:a,scale:o}=i,{x:s}=o,[c]=un(a,"x"),l=yh(c,s,e),u=r.map(()=>mh(n(),...l));return[r,Dt({scale:{x:{padding:.5}}},i,{encode:{dx:dr(u)}})]}};cC.props={};const lC=(t={})=>{const{padding:e=0,random:n=Math.random}=t;return(r,i)=>{const{encode:a,scale:o}=i,{y:s}=o,[c]=un(a,"y"),l=yh(c,s,e),u=r.map(()=>mh(n(),...l));return[r,Dt({scale:{y:{padding:.5}}},i,{encode:{dy:dr(u)}})]}};lC.props={};var UQ=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 uC=(t={})=>{const{groupBy:e="x"}=t;return(n,r)=>{const{encode:i}=r,{x:a}=i,o=UQ(i,["x"]),s=Object.entries(o).filter(([d])=>d.startsWith("y")).map(([d])=>[d,un(i,d)[0]]),c=s.map(([d])=>[d,new Array(n.length)]),l=Mo(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]=Ia(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,dr(h,un(i,d)[1])]))})]}};uC.props={};const fC=(t={})=>{const{groupBy:e="x",series:n=!0}=t;return(r,i)=>{const{encode:a}=i,[o]=un(a,"y"),[s,c]=un(a,"y1"),[l]=n?Il(a,"series","color"):un(a,"color"),u=Mo(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:dr(f,c)}})]}};fC.props={};const dC=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,un(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(Kn(m,_=>g[_]).values());y.push(...b)}f=y}if(r){const[g]=un(c,r);g&&f.sort((y,m)=>n(y,g)-n(m,g)),i&&f.reverse()}const d=(a||3e3)/f.length,[h]=a?[go(o,d)]:Il(c,"enterDuration",go(o,d)),[p]=Il(c,"enterDelay",go(o,0)),v=new Array(o.length);for(let g=0,y=0;g<f.length;g++){const m=f[g],b=Mn(m,_=>+h[_]);for(const _ of m)v[_]=+p[_]+y;y+=b}return[o,Dt({},s,{encode:{enterDuration:Id(h),enterDelay:Id(v)}})]}};dC.props={};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){return typeof t=="function"?t:{min:(n,r)=>Ei(n,i=>r[+i]),max:(n,r)=>Mn(n,i=>r[+i]),first:(n,r)=>r[n[0]],last:(n,r)=>r[n[n.length-1]],mean:(n,r)=>Ql(n,i=>r[+i]),median:(n,r)=>Fy(n,i=>r[+i]),sum:(n,r)=>Di(n,i=>r[+i]),deviation:(n,r)=>nC(n,i=>r[+i])}[t]||Mn}const hC=(t={})=>{const{groupBy:e="x",basis:n="max"}=t;return(r,i)=>{const{encode:a,tooltip:o}=i,{x:s}=a,c=qQ(a,["x"]),l=Object.entries(c).filter(([v])=>v.startsWith("y")).map(([v])=>[v,un(a,v)[0]]),[,u]=l.find(([v])=>v==="y"),f=l.map(([v])=>[v,new Array(r.length)]),d=Mo(e,r,i),h=ZQ(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],[,_]=f[m];_[y]=+b[y]/g}}const p=ka(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,dr(g,un(a,v)[1])]))},!p&&a.y0&&{tooltip:{items:[{channel:"y0"}]}}))]}};hC.props={};function pC(t,e){return[t[0]]}function KQ(t,e){const n=t.length-1;return[t[n]]}function QQ(t,e){const n=ic(t,r=>e[r]);return[t[n]]}function JQ(t,e){const n=uh(t,r=>e[r]);return[t[n]]}function tJ(t){return typeof t=="function"?t:{first:pC,last:KQ,max:QQ,min:JQ}[t]||pC}const bh=(t={})=>{const{groupBy:e="series",channel:n,selector:r}=t;return(i,a)=>{const{encode:o}=a,s=Mo(e,i,a),[c]=un(o,n),l=tJ(r);return[s.flatMap(u=>l(u,c)),a]}};bh.props={};var eJ=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 vC=(t={})=>{const{selector:e}=t,n=eJ(t,["selector"]);return bh(Object.assign({channel:"x",selector:e},n))};vC.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};const gC=(t={})=>{const{selector:e}=t,n=nJ(t,["selector"]);return bh(Object.assign({channel:"y",selector:e},n))};gC.props={};var rJ=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 iu=(t={})=>{const{channels:e=["x","y"]}=t,n=rJ(t,["channels"]),r=(i,a)=>Mo(e,i,a);return zy(Object.assign(Object.assign({},n),{groupBy:r}))};iu.props={};const yC=(t={})=>iu(Object.assign(Object.assign({},t),{channels:["x","color","series"]}));yC.props={};const mC=(t={})=>iu(Object.assign(Object.assign({},t),{channels:["y","color","series"]}));mC.props={};const bC=(t={})=>iu(Object.assign(Object.assign({},t),{channels:["color"]}));bC.props={};function iJ(t,e,n){return(e.length!==2?Ba(Z0(t,e,n),([r,i],[a,o])=>fr(i,o)||fr(r,a)):Ba(Kn(t,n),([r,i],[a,o])=>e(i,o)||fr(r,a))).map(([r])=>r)}var xC=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 aJ(t,e,n){const{by:r=t,reducer:i="max"}=e,[a]=un(n,r);if(typeof i=="function")return o=>i(o,a);if(i==="max")return o=>Mn(o,s=>+a[s]);if(i==="min")return o=>Ei(o,s=>+a[s]);if(i==="sum")return o=>Di(o,s=>+a[s]);if(i==="median")return o=>Fy(o,s=>+a[s]);if(i==="mean")return o=>Ql(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 oJ(t,e,n){const{reverse:r,channel:i}=n,{encode:a}=e,[o]=un(a,i),s=Ba(t,c=>o[c]);return r&&s.reverse(),[s,e]}function sJ(t,e,n){if(!Array.isArray(n))return t;const r=new Set(n);return t.filter(i=>r.has(e[i]))}function cJ(t,e,n){var r;const{reverse:i,slice:a,channel:o}=n,s=xC(n,["reverse","slice","channel"]),{encode:c,scale:l={}}=e,u=(r=l[o])===null||r===void 0?void 0:r.domain,[f]=un(c,o),d=aJ(o,s,c),h=sJ(t,f,u),p=iJ(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 xh=(t={})=>{const{reverse:e=!1,slice:n,channel:r,ordinal:i=!0}=t,a=xC(t,["reverse","slice","channel","ordinal"]);return(o,s)=>i?cJ(o,s,Object.assign({reverse:e,slice:n,channel:r},a)):oJ(o,s,Object.assign({reverse:e,slice:n,channel:r},a))};xh.props={};const _C=(t={})=>xh(Object.assign(Object.assign({},t),{channel:"x"}));_C.props={};const OC=(t={})=>xh(Object.assign(Object.assign({},t),{channel:"y"}));OC.props={};const wC=(t={})=>xh(Object.assign(Object.assign({},t),{channel:"color"}));wC.props={};function lJ(t,e){return typeof e=="string"?t.map(n=>n[e]):t.map(e)}function uJ(t,e){if(typeof t=="function")return n=>t(n,e);if(t==="sum")return n=>Di(n,r=>+e[r]);throw new Error(`Unknown reducer: ${t}`)}const SC=(t={})=>{const{field:e,channel:n="y",reducer:r="sum"}=t;return(i,a)=>{const{data:o,encode:s}=a,[c]=un(s,"x"),l=e?lJ(o,e):un(s,n)[0],u=uJ(r,l),f=K0(i,u,d=>c[d]).map(d=>d[1]);return[i,Dt({},a,{scale:{x:{flex:f}}})]}};SC.props={};function fJ(t,e,n){const r=t.length;if(r===0)return[];const{innerWidth:i,innerHeight:a}=n,o=a/i;let s=Math.ceil(Math.sqrt(e/o)),c=i/s,l=Math.ceil(e/s),u=l*c;for(;u>a;)s=s+1,c=i/s,l=Math.ceil(e/s),u=l*c;const f=a-l*c,d=l<=1?0:f/(l-1),[h,p]=l<=1?[(i-r*c)/(r-1),(a-c)/2]:[0,0];return t.map((v,g)=>{const[y,m,b,_]=Dv(v),O=g%s,w=Math.floor(g/s),M=O*c,E=(l-w-1)*c+f,A=c/b,P=c/_,C=M-y+h*O,j=E-m-d*w-p;return`translate(${C}, ${j}) scale(${A}, ${P})`})}const MC=()=>(t,e)=>[t,Dt({},e,{modifier:fJ,axis:!1})];MC.props={};function dJ(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 _=Math.floor((h+1)*c)+1,O=[a(l),o(l)];for(u=f=-1;b<_;b++)f=Math.abs((O[0]-p)*(a(b)-O[1])-(O[0]-o(b))*(v-O[0]))*.5,f>u&&(u=f,d=b);s.push(d),l=d}return s.push(i-1),s.map(h=>t[h])}function hJ(t){if(typeof t=="function")return t;if(t==="lttb")return dJ;const e={first:r=>[r[0]],last:r=>[r[r.length-1]],min:(r,i,a)=>[r[uh(r,o=>a[o])]],max:(r,i,a)=>[r[ic(r,o=>a[o])]],median:(r,i,a)=>[r[NQ(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 pJ(r,s).flatMap(l=>n(l,i,a))}}function pJ(t,e){const n=t.length,r=[];let i=0;for(;i<n;)r.push(t.slice(i,i+=e));return r}const EC=(t={})=>{const{strategy:e="median",thresholds:n=2e3,groupBy:r=["series","color"]}=t,i=hJ(e);return(a,o)=>{const{encode:s}=o,c=Mo(r,a,o),[l]=un(s,"x"),[u]=un(s,"y");return[c.flatMap(f=>i(f,l,u,n)),o]}};EC.props={};function vJ(t){return typeof t=="object"?[t.value,t.ordinal]:[t,!0]}const AC=(t={})=>(e,n)=>{const{encode:r,data:i}=n,a=Object.entries(t).map(([u,f])=>{const[d]=un(r,u);if(!d)return null;const[h,p=!0]=vJ(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(In);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])})]};AC.props={};var TC={},Wy={},Hy=34,au=10,Yy=13;function PC(t){return new Function("d","return {"+t.map(function(e,n){return JSON.stringify(e)+": d["+n+'] || ""'}).join(",")+"}")}function gJ(t,e){var n=PC(t);return function(r,i){return e(n(r),i,t)}}function CC(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 mi(t,e){var n=t+"",r=n.length;return r<e?new Array(e-r+1).join(0)+n:n}function yJ(t){return t<0?"-"+mi(-t,6):t>9999?"+"+mi(t,6):mi(t,4)}function mJ(t){var e=t.getUTCHours(),n=t.getUTCMinutes(),r=t.getUTCSeconds(),i=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":yJ(t.getUTCFullYear(),4)+"-"+mi(t.getUTCMonth()+1,2)+"-"+mi(t.getUTCDate(),2)+(i?"T"+mi(e,2)+":"+mi(n,2)+":"+mi(r,2)+"."+mi(i,3)+"Z":r?"T"+mi(e,2)+":"+mi(n,2)+":"+mi(r,2)+"Z":n||e?"T"+mi(e,2)+":"+mi(n,2)+"Z":"")}function bJ(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?gJ(g,d):PC(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)===au&&--p,f.charCodeAt(p-1)===Yy&&--p;function _(){if(m)return Wy;if(b)return b=!1,TC;var w,M=v,E;if(f.charCodeAt(M)===Hy){for(;v++<p&&f.charCodeAt(v)!==Hy||f.charCodeAt(++v)===Hy;);return(w=v)>=p?m=!0:(E=f.charCodeAt(v++))===au?b=!0:E===Yy&&(b=!0,f.charCodeAt(v)===au&&++v),f.slice(M+1,w-1).replace(/""/g,'"')}for(;v<p;){if((E=f.charCodeAt(w=v++))===au)b=!0;else if(E===Yy)b=!0,f.charCodeAt(v)===au&&++v;else if(E!==n)continue;return f.slice(M,w)}return m=!0,f.slice(M,p)}for(;(y=_())!==Wy;){for(var O=[];y!==TC&&y!==Wy;)O.push(y),y=_();d&&(O=d(O,g++))==null||h.push(O)}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=CC(f)),[d.map(u).join(t)].concat(a(f,d)).join(`
`)}function s(f,d){return d==null&&(d=CC(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?mJ(f):e.test(f+="")?'"'+f.replace(/"/g,'""')+'"':f}return{parse:r,parseRows:i,format:o,formatBody:s,formatRows:c,formatRow:l,formatValue:u}}function xJ(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})?)?$/))_J&&i[4]&&!i[7]&&(n=n.replace(/-/g,"/").replace(/T/," ")),n=new Date(n);else continue;t[e]=n}return t}const _J=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours();var OJ=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 kC=t=>{const{value:e,format:n=e.split(".").pop(),delimiter:r=",",autoType:i=!0}=t;return()=>OJ(void 0,void 0,void 0,function*(){const a=yield fetch(e);if(n==="csv"){const o=yield a.text();return bJ(r).parse(o,i?xJ:qo)}else if(n==="json")return yield a.json();throw new Error(`Unknown format: ${n}.`)})};kC.props={};const RC=t=>{const{value:e}=t;return()=>e};RC.props={};function wJ(t,e){return t.map(n=>{if(Array.isArray(n)){const[r,i=e]=n;return[r,i]}return[n,e]})}const LC=t=>{const{fields:e=[]}=t,n=wJ(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)}};LC.props={};function bpt(t){return t!=null&&!Number.isNaN(t)}const NC=t=>{const{callback:e}=t;return n=>Array.isArray(n)?[...n].sort(e):n};NC.props={};function SJ(t){return t!=null&&!Number.isNaN(t)}const IC=t=>{const{callback:e=SJ}=t;return n=>n.filter(e)};IC.props={};function MJ(t,e=[]){return e.reduce((n,r)=>(r in t&&(n[r]=t[r]),n),{})}const jC=t=>{const{fields:e}=t;return n=>n.map(r=>MJ(r,e))};jC.props={};function EJ(t){return Object.keys(t).length===0}const DC=t=>e=>{if(!t||EJ(t))return e;const n=r=>Object.entries(r).reduce((i,[a,o])=>(i[t[a]||a]=o,i),{});return e.map(n)};DC.props={};function AJ(t){return!t||Object.keys(t).length===0}const BC=t=>{const{fields:e,key:n="key",value:r="value"}=t;return i=>AJ(e)?i:i.flatMap(a=>e.map(o=>Object.assign(Object.assign({},a),{[n]:o,[r]:a[o]})))};BC.props={};const FC=t=>{const{start:e,end:n}=t;return r=>r.slice(e,n)};FC.props={};const zC=t=>{const{callback:e=qo}=t;return n=>e(n)};zC.props={};const GC=t=>{const{callback:e=qo}=t;return n=>Array.isArray(n)?n.map(e):n};GC.props={};function WC(t){return typeof t=="string"?e=>e[t]:t}const HC=t=>{const{join:e,on:n,select:r=[],as:i=r,unknown:a=NaN}=t,[o,s]=n,c=WC(s),l=WC(o),u=Z0(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),{}))})};HC.props={};var TJ=gt(78434),PJ=gt.n(TJ);function xpt(t){return t!=null&&!Number.isNaN(t)}const YC=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(Kn(u,d=>n.map(h=>d[h]).join("-")).values()).map(d=>{const h=PJ().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})})};YC.props={};const $C=()=>t=>(console.log("G2 data section:",t),t);$C.props={};function $y(t){const{min:e,max:n}=t;return[[e[0],e[1]],[n[0],n[1]]]}function VC(t,e){const[n,r]=t,[i,a]=e;return n>=i[0]&&n<=a[0]&&r>=i[1]&&r<=a[1]}function CJ(t,e){const[n,r]=t;return!(VC(n,e)&&VC(r,e))}function kJ(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 RJ=t=>{const{priority:e}=t;return n=>{const r=[];return e&&n.sort(e),n.forEach(i=>{fg(i);const a=i.getLocalBounds();r.some(s=>kJ($y(a),$y(s.getLocalBounds())))?ug(i):r.push(i)}),n}};function LJ([t,e],[n,r]){return r>t&&e>n}function _h(){const t=new Map;return[r=>t.get(r),(r,i)=>t.set(r,i)]}function NJ(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 IJ=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]=_h(),[c,l]=_h(),[u,f]=_h(),[d,h]=_h();for(const p of i){const{min:v,max:g}=NJ(p),[y,m]=v,[b,_]=g;s(p,m),l(p,m),f(p,_-m),h(p,[y,b])}for(let p=0;p<e;p++){i.sort((g,y)=>fr(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])&&!LJ(d(y),d(b));)m+=1;if(b){const _=c(y),O=u(y),w=c(b),M=w-(_+O);if(M<r){const E=(r-M)/2;v=Math.max(v,E),l(y,_-E),l(b,w+E)}}}if(v<n)break}for(const p of i)p.style.y+=c(p)-o(p);return i}},jJ=()=>t=>(t.forEach(e=>{fg(e);const n=e.attr("bounds"),r=e.getLocalBounds();CJ($y(r),n)&&ug(e)}),t);function DJ(t){return typeof t=="object"?t:Aa(t)}function Vy(t){let e=t/255;return e=e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4),e}function XC(t,e,n){return .2126*Vy(t)+.7152*Vy(e)+.0722*Vy(n)}function UC(t,e){const{r:n,g:r,b:i}=t,{r:a,g:o,b:s}=e,c=XC(n,r,i),l=XC(a,o,s);return(Math.max(c,l)+.05)/(Math.min(c,l)+.05)}function BJ(t,e){const n=ic(e,r=>UC(t,DJ(r)));return e[n]}const FJ=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;UC(o,a)<e&&i.attr("fill",BJ(a,n))}),r)};function zJ(){return{"data.fetch":kC,"data.inline":RC,"data.sortBy":LC,"data.sort":NC,"data.filter":IC,"data.pick":jC,"data.rename":DC,"data.fold":BC,"data.slice":FC,"data.custom":zC,"data.map":GC,"data.join":HC,"data.kde":YC,"data.log":$C,"transform.stackY":tC,"transform.binX":aC,"transform.bin":Gy,"transform.dodgeX":oC,"transform.jitter":sC,"transform.jitterX":cC,"transform.jitterY":lC,"transform.symmetryY":uC,"transform.diffY":fC,"transform.stackEnter":dC,"transform.normalizeY":hC,"transform.select":bh,"transform.selectX":vC,"transform.selectY":gC,"transform.groupX":yC,"transform.groupY":mC,"transform.groupColor":bC,"transform.group":iu,"transform.sortX":_C,"transform.sortY":OC,"transform.sortColor":wC,"transform.flexX":SC,"transform.pack":MC,"transform.sample":EC,"transform.filter":AC,"coordinate.cartesian":DS,"coordinate.polar":ul,"coordinate.transpose":yg,"coordinate.theta":BS,"coordinate.parallel":mg,"coordinate.fisheye":FS,"coordinate.radial":av,"coordinate.radar":zS,"encode.constant":GS,"encode.field":WS,"encode.transform":HS,"encode.column":YS,"mark.interval":iM,"mark.rect":oM,"mark.line":RM,"mark.point":bE,"mark.text":SE,"mark.cell":EE,"mark.area":NE,"mark.link":Xg,"mark.image":UE,"mark.polygon":JE,"mark.box":rA,"mark.vector":aA,"mark.lineX":lA,"mark.lineY":dA,"mark.connector":gA,"mark.range":bA,"mark.rangeX":_A,"mark.rangeY":wA,"mark.path":TA,"mark.shape":kA,"mark.density":NA,"mark.heatmap":DA,"palette.category10":BA,"palette.category20":FA,"scale.linear":zA,"scale.ordinal":YA,"scale.band":XA,"scale.identity":UA,"scale.point":qA,"scale.time":yT,"scale.log":bT,"scale.pow":xT,"scale.sqrt":_T,"scale.threshold":OT,"scale.quantile":wT,"scale.quantize":ST,"scale.sequential":MT,"scale.constant":ET,"theme.classic":AT,"theme.classicDark":PT,"theme.academy":CT,"theme.light":oy,"theme.dark":TT,"component.axisX":kT,"component.axisY":RT,"component.legendCategory":cy,"component.legendContinuous":fo,"component.legends":NT,"component.title":jT,"component.sliderX":WT,"component.sliderY":HT,"component.scrollbarX":YT,"component.scrollbarY":$T,"animation.scaleInX":hy,"animation.scaleOutX":SZ,"animation.scaleInY":VT,"animation.scaleOutY":MZ,"animation.waveIn":XT,"animation.fadeIn":UT,"animation.fadeOut":qT,"animation.zoomIn":EZ,"animation.zoomOut":AZ,"animation.pathIn":ZT,"animation.morphing":tP,"animation.growInX":eP,"animation.growInY":nP,"interaction.elementHighlight":ch,"interaction.elementHighlightByX":lP,"interaction.elementHighlightByColor":uP,"interaction.elementSelect":lh,"interaction.elementSelectByX":fP,"interaction.elementSelectByColor":dP,"interaction.fisheye":YZ,"interaction.chartIndex":hP,"interaction.tooltip":EP,"interaction.legendFilter":yK,"interaction.legendHighlight":mK,"interaction.brushHighlight":Ay,"interaction.brushXHighlight":SK,"interaction.brushYHighlight":MK,"interaction.brushAxisHighlight":NK,"interaction.brushFilter":ky,"interaction.brushXFilter":BK,"interaction.brushYFilter":FK,"interaction.sliderFilter":FP,"interaction.scrollbarFilter":YK,"interaction.poptip":WP,"composition.spaceLayer":HP,"composition.spaceFlex":YP,"composition.facetRect":UP,"composition.repeatMatrix":oQ,"composition.facetCircle":dQ,"composition.timingKeyframe":ZP,"labelTransform.overlapHide":RJ,"labelTransform.overlapDodgeY":IJ,"labelTransform.overflowHide":jJ,"labelTransform.contrastReverse":FJ}}var ou=t=>t;function Oh(t,e){t&&ZC.hasOwnProperty(t.type)&&ZC[t.type](t,e)}var qC={Feature:function(t,e){Oh(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)Oh(n[r].geometry,e)}},ZC={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){Xy(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)Xy(n[r],e,0)},Polygon:function(t,e){KC(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)KC(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)Oh(n[r],e)}};function Xy(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 KC(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)Xy(t[n],e,1);e.polygonEnd()}function Ec(t,e){t&&qC.hasOwnProperty(t.type)?qC[t.type](t,e):Oh(t,e)}class Wa{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 _pt(t,e){const n=new Wa;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 Opt(t,e){const n=new Wa;let r=-1;return Float64Array.from(t,e===void 0?i=>n.add(+i||0):i=>n.add(+e(i,++r,t)||0))}var Fe=1e-6,QC=1e-12,sn=Math.PI,yr=sn/2,JC=sn/4,Pi=sn*2,Kr=180/sn,hr=sn/180,mn=Math.abs,Ac=Math.atan,Ha=Math.atan2,rn=Math.cos,wh=Math.ceil,t5=Math.exp,wpt=Math.floor,Spt=Math.hypot,Sh=Math.log,Uy=Math.pow,Qe=Math.sin,$i=Math.sign||function(t){return t>0?1:t<0?-1:0},bi=Math.sqrt,qy=Math.tan;function e5(t){return t>1?0:t<-1?sn:Math.acos(t)}function Vi(t){return t>1?yr:t<-1?-yr:Math.asin(t)}function Mpt(t){return(t=Qe(t/2))*t}function Xi(){}var Zy=new Wa,Ky=new Wa,n5,r5,Qy,Jy,Ao={point:Xi,lineStart:Xi,lineEnd:Xi,polygonStart:function(){Ao.lineStart=GJ,Ao.lineEnd=HJ},polygonEnd:function(){Ao.lineStart=Ao.lineEnd=Ao.point=Xi,Zy.add(mn(Ky)),Ky=new Wa},result:function(){var t=Zy/2;return Zy=new Wa,t}};function GJ(){Ao.point=WJ}function WJ(t,e){Ao.point=i5,n5=Qy=t,r5=Jy=e}function i5(t,e){Ky.add(Jy*t-Qy*e),Qy=t,Jy=e}function HJ(){i5(n5,r5)}var a5=Ao,Tc=1/0,Mh=Tc,su=-Tc,Eh=su,YJ={point:$J,lineStart:Xi,lineEnd:Xi,polygonStart:Xi,polygonEnd:Xi,result:function(){var t=[[Tc,Mh],[su,Eh]];return su=Eh=-(Mh=Tc=1/0),t}};function $J(t,e){t<Tc&&(Tc=t),t>su&&(su=t),e<Mh&&(Mh=e),e>Eh&&(Eh=e)}var Ah=YJ,tm=0,em=0,cu=0,Th=0,Ph=0,Pc=0,nm=0,rm=0,lu=0,o5,s5,xa,_a,ea={point:ms,lineStart:c5,lineEnd:l5,polygonStart:function(){ea.lineStart=UJ,ea.lineEnd=qJ},polygonEnd:function(){ea.point=ms,ea.lineStart=c5,ea.lineEnd=l5},result:function(){var t=lu?[nm/lu,rm/lu]:Pc?[Th/Pc,Ph/Pc]:cu?[tm/cu,em/cu]:[NaN,NaN];return tm=em=cu=Th=Ph=Pc=nm=rm=lu=0,t}};function ms(t,e){tm+=t,em+=e,++cu}function c5(){ea.point=VJ}function VJ(t,e){ea.point=XJ,ms(xa=t,_a=e)}function XJ(t,e){var n=t-xa,r=e-_a,i=bi(n*n+r*r);Th+=i*(xa+t)/2,Ph+=i*(_a+e)/2,Pc+=i,ms(xa=t,_a=e)}function l5(){ea.point=ms}function UJ(){ea.point=ZJ}function qJ(){u5(o5,s5)}function ZJ(t,e){ea.point=u5,ms(o5=xa=t,s5=_a=e)}function u5(t,e){var n=t-xa,r=e-_a,i=bi(n*n+r*r);Th+=i*(xa+t)/2,Ph+=i*(_a+e)/2,Pc+=i,i=_a*t-xa*e,nm+=i*(xa+t),rm+=i*(_a+e),lu+=i*3,ms(xa=t,_a=e)}var f5=ea;function d5(t){this._context=t}d5.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,Pi);break}}},result:Xi};var im=new Wa,am,h5,p5,uu,fu,Ch={point:Xi,lineStart:function(){Ch.point=KJ},lineEnd:function(){am&&v5(h5,p5),Ch.point=Xi},polygonStart:function(){am=!0},polygonEnd:function(){am=null},result:function(){var t=+im;return im=new Wa,t}};function KJ(t,e){Ch.point=v5,h5=uu=t,p5=fu=e}function v5(t,e){uu-=t,fu-=e,im.add(bi(uu*uu+fu*fu)),uu=t,fu=e}var g5=Ch;let y5,kh,m5,b5;class x5{constructor(e){this._append=e==null?_5:QJ(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!==m5||this._append!==kh){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`,m5=r,kh=this._append,b5=this._,this._=i}this._+=b5;break}}}result(){const e=this._;return this._="",e.length?e:null}}function _5(t){let e=1;this._+=t[0];for(const n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function QJ(t){const e=Math.floor(t);if(!(e>=0))throw new RangeError(`invalid digits: ${t}`);if(e>15)return _5;if(e!==y5){const n=wr(10,e);y5=e,kh=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 kh}function O5(t,e){let n=3,r=4.5,i,a;function o(s){return s&&(typeof r=="function"&&a.pointRadius(+r.apply(this,arguments)),Ec(s,i(a))),a.result()}return o.area=function(s){return Ec(s,i(a5)),a5.result()},o.measure=function(s){return Ec(s,i(g5)),g5.result()},o.bounds=function(s){return Ec(s,i(Ah)),Ah.result()},o.centroid=function(s){return Ec(s,i(f5)),f5.result()},o.projection=function(s){return arguments.length?(i=s==null?(t=null,ou):(t=s).stream,o):t},o.context=function(s){return arguments.length?(a=s==null?(e=null,new x5(n)):new d5(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 x5(n)),o},o.projection(t).digits(n).context(e)}function Cc(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 w5(t,e,n){var r=Cc(t,e-Fe,n).concat(e);return function(i){return r.map(function(a){return[i,a]})}}function S5(t,e,n){var r=Cc(t,e-Fe,n).concat(e);return function(i){return r.map(function(a){return[a,i]})}}function JJ(){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 Cc(wh(r/u)*u,n,u).map(p).concat(Cc(wh(s/f)*f,o,f).map(v)).concat(Cc(wh(e/c)*c,t,c).filter(function(b){return mn(b%u)>Fe}).map(d)).concat(Cc(wh(a/l)*l,i,l).filter(function(b){return mn(b%f)>Fe}).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=w5(a,i,90),h=S5(e,t,g),p=w5(s,o,90),v=S5(r,n,g),y):g},y.extentMajor([[-180,-90+Fe],[180,90-Fe]]).extentMinor([[-180,-80-Fe],[180,80+Fe]])}function ttt(){return JJ()()}function M5(){var t=[],e;return{point:function(n,r,i){e.push([n,r,i])},lineStart:function(){t.push(e=[])},lineEnd:Xi,rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))},result:function(){var n=t;return t=[],e=null,n}}}function Rh(t,e){return mn(t[0]-e[0])<Fe&&mn(t[1]-e[1])<Fe}function Lh(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 E5(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(Rh(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*Fe}a.push(m=new Lh(g,p,null,!0)),o.push(m.o=new Lh(g,null,m,!1)),a.push(m=new Lh(y,p,null,!1)),o.push(m.o=new Lh(y,null,m,!0))}}),!!a.length){for(o.sort(e),A5(a),A5(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 A5(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 om(t){return[Ha(t[1],t[0]),Vi(t[2])]}function kc(t){var e=t[0],n=t[1],r=rn(n);return[r*rn(e),r*Qe(e),Qe(n)]}function Nh(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function Ih(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 sm(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function jh(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function cm(t){var e=bi(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function lm(t){return mn(t[0])<=sn?t[0]:$i(t[0])*((mn(t[0])+sn)%Pi-sn)}function ett(t,e){var n=lm(e),r=e[1],i=Qe(r),a=[Qe(n),-rn(n),0],o=0,s=0,c=new Wa;i===1?r=yr+Fe:i===-1&&(r=-yr-Fe);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=lm(h),v=h[1]/2+JC,g=Qe(v),y=rn(v),m=0;m<d;++m,p=_,g=w,y=M,h=b){var b=f[m],_=lm(b),O=b[1]/2+JC,w=Qe(O),M=rn(O),E=_-p,A=E>=0?1:-1,P=A*E,C=P>sn,j=g*w;if(c.add(Ha(j*A*Qe(P),y*M+j*rn(P))),o+=C?E+A*Pi:E,C^p>=n^_>=n){var N=Ih(kc(h),kc(b));cm(N);var k=Ih(a,N);cm(k);var R=(C^E>=0?-1:1)*Vi(k[2]);(r>R||r===R&&(N[0]||N[1]))&&(s+=C^E>=0?1:-1)}}return(o<-Fe||o<Fe&&c<-QC)^s&1}function*ntt(t){for(const e of t)yield*e}function T5(t){return Array.from(ntt(t))}function P5(t,e,n,r){return function(i){var a=e(i),o=M5(),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=T5(u);var _=ett(l,r);u.length?(c||(i.polygonStart(),c=!0),E5(u,itt,_,n,i)):_&&(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(_,O){t(_,O)&&i.point(_,O)}function p(_,O){a.point(_,O)}function v(){d.point=p,a.lineStart()}function g(){d.point=h,a.lineEnd()}function y(_,O){f.push([_,O]),s.point(_,O)}function m(){s.lineStart(),f=[]}function b(){y(f[0][0],f[0][1]),s.lineEnd();var _=s.clean(),O=o.result(),w,M=O.length,E,A,P;if(f.pop(),l.push(f),f=null,!!M){if(_&1){if(A=O[0],(E=A.length-1)>0){for(c||(i.polygonStart(),c=!0),i.lineStart(),w=0;w<E;++w)i.point((P=A[w])[0],P[1]);i.lineEnd()}return}M>1&&_&2&&O.push(O.pop().concat(O.shift())),u.push(O.filter(rtt))}}return d}}function rtt(t){return t.length>1}function itt(t,e){return((t=t.x)[0]<0?t[1]-yr-Fe:yr-t[1])-((e=e.x)[0]<0?e[1]-yr-Fe:yr-e[1])}var C5=P5(function(){return!0},att,stt,[-sn,-yr]);function att(t){var e=NaN,n=NaN,r=NaN,i;return{lineStart:function(){t.lineStart(),i=1},point:function(a,o){var s=a>0?sn:-sn,c=mn(a-e);mn(c-sn)<Fe?(t.point(e,n=(n+o)/2>0?yr:-yr),t.point(r,n),t.lineEnd(),t.lineStart(),t.point(s,n),t.point(a,n),i=0):r!==s&&c>=sn&&(mn(e-r)<Fe&&(e-=r*Fe),mn(a-s)<Fe&&(a-=s*Fe),n=ott(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 ott(t,e,n,r){var i,a,o=Qe(t-n);return mn(o)>Fe?Ac((Qe(e)*(a=rn(r))*Qe(n)-Qe(r)*(i=rn(e))*Qe(t))/(i*a*o)):(e+r)/2}function stt(t,e,n,r){var i;if(t==null)i=n*yr,r.point(-sn,i),r.point(0,i),r.point(sn,i),r.point(sn,0),r.point(sn,-i),r.point(0,-i),r.point(-sn,-i),r.point(-sn,0),r.point(-sn,i);else if(mn(t[0]-e[0])>Fe){var a=t[0]<e[0]?sn:-sn;i=n*a/2,r.point(-a,i),r.point(0,i),r.point(a,i)}else r.point(e[0],e[1])}function k5(t,e,n,r,i,a){if(n){var o=rn(e),s=Qe(e),c=r*n;i==null?(i=e+r*Pi,a=e-c/2):(i=R5(o,i),a=R5(o,a),(r>0?i<a:i>a)&&(i+=r*Pi));for(var l,u=i;r>0?u>a:u<a;u-=c)l=om([o,-s*rn(u),-s*Qe(u)]),t.point(l[0],l[1])}}function R5(t,e){e=kc(e),e[0]-=t,cm(e);var n=e5(-e[1]);return((-e[2]<0?-n:n)+Pi-Fe)%Pi}function Ept(){var t=constant([0,0]),e=constant(90),n=constant(6),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,k5(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 ctt(t){var e=rn(t),n=6*hr,r=e>0,i=mn(e)>Fe;function a(u,f,d,h){k5(h,t,n,d,u,f)}function o(u,f){return rn(u)*rn(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,_=o(g,y),O=r?_?0:l(g,y):_?l(g+(g<0?sn:-sn),y):0;if(!f&&(p=h=_)&&u.lineStart(),_!==h&&(b=c(f,m),(!b||Rh(f,b)||Rh(m,b))&&(m[2]=1)),_!==h)v=0,_?(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^_){var w;!(O&d)&&(w=c(m,f,!0))&&(v=0,r?(u.lineStart(),u.point(w[0][0],w[0][1]),u.point(w[1][0],w[1][1]),u.lineEnd()):(u.point(w[1][0],w[1][1]),u.lineEnd(),u.lineStart(),u.point(w[0][0],w[0][1],3)))}_&&(!f||!Rh(f,m))&&u.point(m[0],m[1]),f=m,h=_,d=O},lineEnd:function(){h&&u.lineEnd(),f=null},clean:function(){return v|(p&&h)<<1}}}function c(u,f,d){var h=kc(u),p=kc(f),v=[1,0,0],g=Ih(h,p),y=Nh(g,g),m=g[0],b=y-m*m;if(!b)return!d&&u;var _=e*y/b,O=-e*m/b,w=Ih(v,g),M=jh(v,_),E=jh(g,O);sm(M,E);var A=w,P=Nh(M,A),C=Nh(A,A),j=P*P-C*(Nh(M,M)-1);if(!(j<0)){var N=bi(j),k=jh(A,(-P-N)/C);if(sm(k,M),k=om(k),!d)return k;var R=u[0],D=f[0],B=u[1],F=f[1],z;D<R&&(z=R,R=D,D=z);var Y=D-R,q=mn(Y-sn)<Fe,rt=q||Y<Fe;if(!q&&F<B&&(z=B,B=F,F=z),rt?q?B+F>0^k[1]<(mn(k[0]-R)<Fe?B:F):B<=k[1]&&k[1]<=F:Y>sn^(R<=k[0]&&k[0]<=D)){var st=jh(A,(-P+N)/C);return sm(st,M),[k,om(st)]}}}function l(u,f){var d=r?t:sn-t,h=0;return u<-d?h|=1:u>d&&(h|=2),f<-d?h|=4:f>d&&(h|=8),h}return P5(o,s,a,r?[0,-t]:[-sn,t-sn])}function ltt(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 du=1e9,Dh=-du;function L5(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 mn(l[0]-t)<Fe?u>0?0:3:mn(l[0]-n)<Fe?u>0?2:1:mn(l[1]-e)<Fe?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=M5(),d,h,p,v,g,y,m,b,_,O,w,M={point:E,lineStart:j,lineEnd:N,polygonStart:P,polygonEnd:C};function E(R,D){i(R,D)&&u.point(R,D)}function A(){for(var R=0,D=0,B=h.length;D<B;++D)for(var F=h[D],z=1,Y=F.length,q=F[0],rt,st,At=q[0],Yt=q[1];z<Y;++z)rt=At,st=Yt,q=F[z],At=q[0],Yt=q[1],st<=r?Yt>r&&(At-rt)*(r-st)>(Yt-st)*(t-rt)&&++R:Yt<=r&&(At-rt)*(r-st)<(Yt-st)*(t-rt)&&--R;return R}function P(){u=f,d=[],h=[],w=!0}function C(){var R=A(),D=w&&R,B=(d=T5(d)).length;(D||B)&&(l.polygonStart(),D&&(l.lineStart(),a(null,null,1,l),l.lineEnd()),B&&E5(d,s,R,a,l),l.polygonEnd()),u=l,d=h=p=null}function j(){M.point=k,h&&h.push(p=[]),O=!0,_=!1,m=b=NaN}function N(){d&&(k(v,g),y&&_&&f.rejoin(),d.push(f.result())),M.point=E,_&&u.lineEnd()}function k(R,D){var B=i(R,D);if(h&&p.push([R,D]),O)v=R,g=D,y=B,O=!1,B&&(u.lineStart(),u.point(R,D));else if(B&&_)u.point(R,D);else{var F=[m=Math.max(Dh,Math.min(du,m)),b=Math.max(Dh,Math.min(du,b))],z=[R=Math.max(Dh,Math.min(du,R)),D=Math.max(Dh,Math.min(du,D))];ltt(F,z,t,e,n,r)?(_||(u.lineStart(),u.point(F[0],F[1])),u.point(z[0],z[1]),B||u.lineEnd(),w=!1):B&&(u.lineStart(),u.point(R,D),w=!1)}m=R,b=D,_=B}return M}}function um(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 fm(t,e){return mn(t)>sn&&(t-=Math.round(t/Pi)*Pi),[t,e]}fm.invert=fm;function N5(t,e,n){return(t%=Pi)?e||n?um(j5(t),D5(e,n)):j5(t):e||n?D5(e,n):fm}function I5(t){return function(e,n){return e+=t,mn(e)>sn&&(e-=Math.round(e/Pi)*Pi),[e,n]}}function j5(t){var e=I5(t);return e.invert=I5(-t),e}function D5(t,e){var n=rn(t),r=Qe(t),i=rn(e),a=Qe(e);function o(s,c){var l=rn(c),u=rn(s)*l,f=Qe(s)*l,d=Qe(c),h=d*n+u*r;return[Ha(f*i-h*a,u*n-d*r),Vi(h*i+f*a)]}return o.invert=function(s,c){var l=rn(c),u=rn(s)*l,f=Qe(s)*l,d=Qe(c),h=d*i-f*a;return[Ha(f*i+d*a,u*n+h*r),Vi(h*n-u*r)]},o}function utt(t){t=N5(t[0]*hr,t[1]*hr,t.length>2?t[2]*hr:0);function e(n){return n=t(n[0]*hr,n[1]*hr),n[0]*=Kr,n[1]*=Kr,n}return e.invert=function(n){return n=t.invert(n[0]*hr,n[1]*hr),n[0]*=Kr,n[1]*=Kr,n},e}function Apt(t){return{stream:hu(t)}}function hu(t){return function(e){var n=new dm;for(var r in t)n[r]=t[r];return n.stream=e,n}}function dm(){}dm.prototype={constructor:dm,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 hm(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),r!=null&&t.clipExtent(null),Ec(n,t.stream(Ah)),e(Ah.result()),r!=null&&t.clipExtent(r),t}function Bh(t,e,n){return hm(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 pm(t,e,n){return Bh(t,[[0,0],e],n)}function vm(t,e,n){return hm(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 gm(t,e,n){return hm(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 B5=16,ftt=rn(30*hr);function F5(t,e){return+e?htt(t,e):dtt(t)}function dtt(t){return hu({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}function htt(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 _=o+d,O=s+h,w=c+p,M=bi(_*_+O*O+w*w),E=Vi(w/=M),A=mn(mn(w)-1)<Fe||mn(a-f)<Fe?(a+f)/2:Ha(O,_),P=t(A,E),C=P[0],j=P[1],N=C-r,k=j-i,R=m*N-y*k;(R*R/b>e||mn((y*N+m*k)/b-.5)>.3||o*d+s*h+c*p<ftt)&&(n(r,i,a,o,s,c,C,j,A,_/=M,O/=M,w,v,g),g.point(C,j),n(C,j,A,_,O,w,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:_,polygonStart:function(){r.polygonStart(),g.lineStart=O},polygonEnd:function(){r.polygonEnd(),g.lineStart=m}};function y(E,A){E=t(E,A),r.point(E[0],E[1])}function m(){f=NaN,g.point=b,r.lineStart()}function b(E,A){var P=kc([E,A]),C=t(E,A);n(f,d,u,h,p,v,f=C[0],d=C[1],u=E,h=P[0],p=P[1],v=P[2],B5,r),r.point(f,d)}function _(){g.point=y,r.lineEnd()}function O(){m(),g.point=w,g.lineEnd=M}function w(E,A){b(i=E,A),a=f,o=d,s=h,c=p,l=v,g.point=b}function M(){n(f,d,u,h,p,v,a,o,i,s,c,l,B5,r),g.lineEnd=_,_()}return g}}var ptt=hu({point:function(t,e){this.stream.point(t*hr,e*hr)}});function vtt(t){return hu({point:function(e,n){var r=t(e,n);return this.stream.point(r[0],r[1])}})}function gtt(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 z5(t,e,n,r,i,a){if(!a)return gtt(t,e,n,r,i);var o=rn(a),s=Qe(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 Oa(t){return ym(function(){return t})()}function ym(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=C5,g=null,y,m,b,_=ou,O=.5,w,M,E,A,P;function C(R){return E(R[0]*hr,R[1]*hr)}function j(R){return R=E.invert(R[0],R[1]),R&&[R[0]*Kr,R[1]*Kr]}C.stream=function(R){return A&&P===R?A:A=ptt(vtt(u)(v(w(_(P=R)))))},C.preclip=function(R){return arguments.length?(v=R,p=void 0,k()):v},C.postclip=function(R){return arguments.length?(_=R,g=y=m=b=null,k()):_},C.clipAngle=function(R){return arguments.length?(v=+R?ctt(p=R*hr):(p=null,C5),k()):p*Kr},C.clipExtent=function(R){return arguments.length?(_=R==null?(g=y=m=b=null,ou):L5(g=+R[0][0],y=+R[0][1],m=+R[1][0],b=+R[1][1]),k()):g==null?null:[[g,y],[m,b]]},C.scale=function(R){return arguments.length?(n=+R,N()):n},C.translate=function(R){return arguments.length?(r=+R[0],i=+R[1],N()):[r,i]},C.center=function(R){return arguments.length?(a=R[0]%360*hr,o=R[1]%360*hr,N()):[a*Kr,o*Kr]},C.rotate=function(R){return arguments.length?(s=R[0]%360*hr,c=R[1]%360*hr,l=R.length>2?R[2]%360*hr:0,N()):[s*Kr,c*Kr,l*Kr]},C.angle=function(R){return arguments.length?(f=R%360*hr,N()):f*Kr},C.reflectX=function(R){return arguments.length?(d=R?-1:1,N()):d<0},C.reflectY=function(R){return arguments.length?(h=R?-1:1,N()):h<0},C.precision=function(R){return arguments.length?(w=F5(M,O=R*R),k()):bi(O)},C.fitExtent=function(R,D){return Bh(C,R,D)},C.fitSize=function(R,D){return pm(C,R,D)},C.fitWidth=function(R,D){return vm(C,R,D)},C.fitHeight=function(R,D){return gm(C,R,D)};function N(){var R=z5(n,0,0,d,h,f).apply(null,e(a,o)),D=z5(n,r-R[0],i-R[1],d,h,f);return u=N5(s,c,l),M=um(e,D),E=um(u,M),w=F5(M,O),k()}function k(){return A=P=null,C}return function(){return e=t.apply(this,arguments),C.invert=e.invert&&j,N()}}function mm(t){var e=0,n=sn/3,r=ym(t),i=r(e,n);return i.parallels=function(a){return arguments.length?r(e=a[0]*hr,n=a[1]*hr):[e*Kr,n*Kr]},i}function ytt(t){var e=rn(t);function n(r,i){return[r*e,Qe(i)/e]}return n.invert=function(r,i){return[r/e,Vi(i*e)]},n}function G5(t,e){var n=Qe(t),r=(n+Qe(e))/2;if(mn(r)<Fe)return ytt(t);var i=1+n*(2*r-n),a=bi(i)/r;function o(s,c){var l=bi(i-2*r*Qe(c))/r;return[l*Qe(s*=r),a-l*rn(s)]}return o.invert=function(s,c){var l=a-c,u=Ha(s,mn(l))*$i(l);return l*r<0&&(u-=sn*$i(s)*$i(l)),[u/r,Vi((i-(s*s+l*l)*r*r)/(2*r))]},o}function Fh(){return mm(G5).scale(155.424).center([0,33.6442])}function W5(){return Fh().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function mtt(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 btt(){var t,e,n=W5(),r,i=Fh().rotate([154,0]).center([-2,58.5]).parallels([55,65]),a,o=Fh().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=mtt([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+Fe,v+.12*h+Fe],[p-.214*h-Fe,v+.234*h-Fe]]).stream(l),s=o.translate([p-.205*h,v+.212*h]).clipExtent([[p-.214*h+Fe,v+.166*h+Fe],[p-.115*h-Fe,v+.234*h-Fe]]).stream(l),f()},u.fitExtent=function(d,h){return Bh(u,d,h)},u.fitSize=function(d,h){return pm(u,d,h)},u.fitWidth=function(d,h){return vm(u,d,h)},u.fitHeight=function(d,h){return gm(u,d,h)};function f(){return t=e=null,u}return u.scale(1070)}function H5(t){return function(e,n){var r=rn(e),i=rn(n),a=t(r*i);return a===1/0?[2,0]:[a*i*Qe(e),a*Qe(n)]}}function pu(t){return function(e,n){var r=bi(e*e+n*n),i=t(r),a=Qe(i),o=rn(i);return[Ha(e*a,r*o),Vi(r&&n*a/r)]}}var bm=H5(function(t){return bi(2/(1+t))});bm.invert=pu(function(t){return 2*Vi(t/2)});function xtt(){return Oa(bm).scale(124.75).clipAngle(180-.001)}var xm=H5(function(t){return(t=e5(t))&&t/Qe(t)});xm.invert=pu(function(t){return t});function _tt(){return Oa(xm).scale(79.4188).clipAngle(180-.001)}function vu(t,e){return[t,Sh(qy((yr+e)/2))]}vu.invert=function(t,e){return[t,2*Ac(t5(e))-yr]};function Ott(){return Y5(vu).scale(961/Pi)}function Y5(t){var e=Oa(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=sn*r(),d=e(utt(e.rotate()).invert([0,0]));return a(o==null?[[d[0]-f,d[1]-f],[d[0]+f,d[1]+f]]:t===vu?[[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 zh(t){return qy((yr+t)/2)}function $5(t,e){var n=rn(t),r=t===e?Qe(t):Sh(n/rn(e))/Sh(zh(e)/zh(t)),i=n*Uy(zh(t),r)/r;if(!r)return vu;function a(o,s){i>0?s<-yr+Fe&&(s=-yr+Fe):s>yr-Fe&&(s=yr-Fe);var c=i/Uy(zh(s),r);return[c*Qe(r*o),i-c*rn(r*o)]}return a.invert=function(o,s){var c=i-s,l=$i(r)*bi(o*o+c*c),u=Ha(o,mn(c))*$i(c);return c*r<0&&(u-=sn*$i(o)*$i(c)),[u/r,2*Ac(Uy(i/l,1/r))-yr]},a}function wtt(){return mm($5).scale(109.5).parallels([30,30])}function gu(t,e){return[t,e]}gu.invert=gu;function Stt(){return Oa(gu).scale(152.63)}function V5(t,e){var n=rn(t),r=t===e?Qe(t):(n-rn(e))/(e-t),i=n/r+t;if(mn(r)<Fe)return gu;function a(o,s){var c=i-s,l=r*o;return[c*Qe(l),i-c*rn(l)]}return a.invert=function(o,s){var c=i-s,l=Ha(o,mn(c))*$i(c);return c*r<0&&(l-=sn*$i(o)*$i(c)),[l/r,i-$i(r)*bi(o*o+c*c)]},a}function Mtt(){return mm(V5).scale(131.154).center([0,13.9389])}var yu=1.340264,mu=-.081106,bu=893e-6,xu=.003796,Gh=bi(3)/2,Ett=12;function _m(t,e){var n=Vi(Gh*Qe(e)),r=n*n,i=r*r*r;return[t*rn(n)/(Gh*(yu+3*mu*r+i*(7*bu+9*xu*r))),n*(yu+mu*r+i*(bu+xu*r))]}_m.invert=function(t,e){for(var n=e,r=n*n,i=r*r*r,a=0,o,s,c;a<Ett&&(s=n*(yu+mu*r+i*(bu+xu*r))-e,c=yu+3*mu*r+i*(7*bu+9*xu*r),n-=o=s/c,r=n*n,i=r*r*r,!(mn(o)<QC));++a);return[Gh*t*(yu+3*mu*r+i*(7*bu+9*xu*r))/rn(n),Vi(Qe(n)/Gh)]};function Att(){return Oa(_m).scale(177.158)}function Om(t,e){var n=rn(e),r=rn(t)*n;return[n*Qe(t)/r,Qe(e)/r]}Om.invert=pu(Ac);function Ttt(){return Oa(Om).scale(144.049).clipAngle(60)}function Ptt(){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=hu({point:function(_,O){var w=b([_,O]);this.stream.point(w[0],w[1])}}),v=ou,g,y;function m(){return d=t*r,h=t*i,g=y=null,b}function b(_){var O=_[0]*d,w=_[1]*h;if(a){var M=w*o-O*s;O=O*o+w*s,w=M}return[O+e,w+n]}return b.invert=function(_){var O=_[0]-e,w=_[1]-n;if(a){var M=w*o+O*s;O=O*o-w*s,w=M}return[O/d,w/h]},b.stream=function(_){return g&&y===_?g:g=p(v(y=_))},b.postclip=function(_){return arguments.length?(v=_,c=l=u=f=null,m()):v},b.clipExtent=function(_){return arguments.length?(v=_==null?(c=l=u=f=null,ou):L5(c=+_[0][0],l=+_[0][1],u=+_[1][0],f=+_[1][1]),m()):c==null?null:[[c,l],[u,f]]},b.scale=function(_){return arguments.length?(t=+_,m()):t},b.translate=function(_){return arguments.length?(e=+_[0],n=+_[1],m()):[e,n]},b.angle=function(_){return arguments.length?(a=_%360*hr,s=Qe(a),o=rn(a),m()):a*Kr},b.reflectX=function(_){return arguments.length?(r=_?-1:1,m()):r<0},b.reflectY=function(_){return arguments.length?(i=_?-1:1,m()):i<0},b.fitExtent=function(_,O){return Bh(b,_,O)},b.fitSize=function(_,O){return pm(b,_,O)},b.fitWidth=function(_,O){return vm(b,_,O)},b.fitHeight=function(_,O){return gm(b,_,O)},b}function wm(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)))]}wm.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(mn(i)>Fe&&--r>0);return[t/(.8707+(a=n*n)*(-.131979+a*(-.013791+a*a*a*(.003971-.001529*a)))),n]};function Ctt(){return Oa(wm).scale(175.295)}function Sm(t,e){return[rn(e)*Qe(t),Qe(e)]}Sm.invert=pu(Vi);function ktt(){return Oa(Sm).scale(249.5).clipAngle(90+Fe)}function Mm(t,e){var n=rn(e),r=1+rn(t)*n;return[n*Qe(t)/r,Qe(e)/r]}Mm.invert=pu(function(t){return 2*Ac(t)});function Rtt(){return Oa(Mm).scale(250).clipAngle(142)}function Em(t,e){return[Sh(qy((yr+e)/2)),-t]}Em.invert=function(t,e){return[-e,2*Ac(t5(t))-yr]};function Ltt(){var t=Y5(Em),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 Ntt=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 Itt(t){if(typeof t=="function")return t;const e=`geo${ao(t)}`,n=ye[e];if(!n)throw new Error(`Unknown coordinate: ${t}`);return n}function jtt(t){return{type:"FeatureCollection",features:t.flatMap(e=>Dtt(e).features)}}function Dtt(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 Btt(t,e){var n;for(const[r,i]of Object.entries(e))(n=t[r])===null||n===void 0||n.call(t,i)}function Ftt(t,e,n,r){const i=()=>{const s=e.filter(X5);return s.find(l=>l.sphere)?{type:"Sphere"}:jtt(s.filter(l=>!l.sphere).flatMap(l=>l.data.value))},{outline:a=i()}=r,{size:o="fitExtent"}=r;if(o==="fitExtent")return ztt(t,a,n);if(o==="fitWidth")return Gtt(t,a,n)}function ztt(t,e,n){const{x:r,y:i,width:a,height:o}=n;t.fitExtent([[r,i],[a,o]],e)}function Gtt(t,e,n){const{width:r,height:i}=n,[[a,o],[s,c]]=O5(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 Wtt(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:[ttt()]}}):n==="sphere"?Object.assign(Object.assign({},t),{sphere:!0,data:{value:[{type:"Sphere"}]}}):t}function X5(t){return t.type==="geoPath"}const U5=()=>t=>{const{children:e,coordinate:n={}}=t;if(!Array.isArray(e))return[];const{type:r="equalEarth"}=n,i=Ntt(n,["type"]),a=Itt(r),o=e.map(Wtt);let s;function c(){return[["custom",(f,d,h,p)=>{const v=a();Ftt(v,o,{x:f,y:d,width:h,height:p},i),Btt(v,i),s=O5(v);const y=new Vr({domain:[f,f+h]}),m=new Vr({domain:[d,d+p]}),b=O=>{const w=v(O);if(!w)return[null,null];const[M,E]=w;return[y.map(M),m.map(E)]},_=O=>{if(!O)return null;const[w,M]=O,E=[y.invert(w),m.invert(M)];return v.invert(E)};return{transform:O=>b(O),untransform:O=>_(O)}}]]}function l(f){const{style:d,tooltip:h={}}=f;return Object.assign(Object.assign({},f),{type:"path",tooltip:eg(h,{title:"id",items:[{channel:"color"}]}),style:Object.assign(Object.assign({},d),{d:p=>s(p)||[]})})}const u=f=>X5(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)})]};U5.props={};var Htt=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 q5=()=>t=>{const{type:e,data:n,scale:r,encode:i,style:a,animate:o,key:s,state:c}=t,l=Htt(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}]})]};q5.props={};function Ytt(){return{"composition.geoView":U5,"composition.geoPath":q5}}function $tt(t){const e=+this._x.call(null,t),n=+this._y.call(null,t);return Z5(this.cover(e,n),e,n,t)}function Z5(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 Vtt(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)Z5(this,o[n],s[n],t[n]);return this}function Xtt(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 Utt(){var t=[];return this.visit(function(e){if(!e.length)do t.push(e.data);while(e=e.next)}),t}function qtt(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 ai(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function Ztt(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 ai(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 ai(h[3],g,y,c,l),new ai(h[2],o,y,g,l),new ai(h[1],g,s,c,y),new ai(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),_=m*m+b*b;if(_<n){var O=Math.sqrt(n=_);i=t-O,a=e-O,u=t+O,f=e+O,r=h.data}}return r}function Ktt(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 Qtt(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this}function Jtt(){return this._root}function tet(){var t=0;return this.visit(function(e){if(!e.length)do++t;while(e=e.next)}),t}function eet(t){var e=[],n,r=this._root,i,a,o,s,c;for(r&&e.push(new ai(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 ai(i,l,u,s,c)),(i=r[2])&&e.push(new ai(i,a,u,l,c)),(i=r[1])&&e.push(new ai(i,l,o,s,u)),(i=r[0])&&e.push(new ai(i,a,o,l,u))}return this}function net(t){var e=[],n=[],r;for(this._root&&e.push(new ai(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 ai(a,o,s,u,f)),(a=i[1])&&e.push(new ai(a,u,s,c,f)),(a=i[2])&&e.push(new ai(a,o,f,u,l)),(a=i[3])&&e.push(new ai(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 ret(t){return t[0]}function iet(t){return arguments.length?(this._x=t,this):this._x}function aet(t){return t[1]}function oet(t){return arguments.length?(this._y=t,this):this._y}function K5(t,e,n){var r=new Am(e==null?ret:e,n==null?aet:n,NaN,NaN,NaN,NaN);return t==null?r:r.addAll(t)}function Am(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 Q5(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var oi=K5.prototype=Am.prototype;oi.copy=function(){var t=new Am(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=Q5(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]=Q5(r));return t},oi.add=$tt,oi.addAll=Vtt,oi.cover=Xtt,oi.data=Utt,oi.extent=qtt,oi.find=Ztt,oi.remove=Ktt,oi.removeAll=Qtt,oi.root=Jtt,oi.size=tet,oi.visit=eet,oi.visitAfter=net,oi.x=iet,oi.y=oet;function Ci(t){return function(){return t}}function Rc(t){return(t()-.5)*1e-6}var set={value:function(){}};function J5(){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 Wh(n)}function Wh(t){this._=t}function cet(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}})}Wh.prototype=J5.prototype={constructor:Wh,on:function(e,n){var r=this._,i=cet(e+"",r),a,o=-1,s=i.length;if(arguments.length<2){for(;++o<s;)if((a=(e=i[o]).type)&&(a=uet(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]=tk(r[a],e.name,n);else if(n==null)for(a in r)r[a]=tk(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 Wh(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 uet(t,e){for(var n=0,r=t.length,i;n<r;++n)if((i=t[n]).name===e)return i.value}function tk(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=set,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var fet=J5,Lc=0,_u=0,Ou=0,ek=1e3,Hh,wu,Yh=0,bs=0,$h=0,Su=typeof performance=="object"&&performance.now?performance:Date,nk=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function rk(){return bs||(nk(det),bs=Su.now()+$h)}function det(){bs=0}function Tm(){this._call=this._time=this._next=null}Tm.prototype=ik.prototype={constructor:Tm,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?rk():+n)+(e==null?0:+e),!this._next&&wu!==this&&(wu?wu._next=this:Hh=this,wu=this),this._call=t,this._time=n,Pm()},stop:function(){this._call&&(this._call=null,this._time=1/0,Pm())}};function ik(t,e,n){var r=new Tm;return r.restart(t,e,n),r}function het(){rk(),++Lc;for(var t=Hh,e;t;)(e=bs-t._time)>=0&&t._call.call(void 0,e),t=t._next;--Lc}function ak(){bs=(Yh=Su.now())+$h,Lc=_u=0;try{het()}finally{Lc=0,vet(),bs=0}}function pet(){var t=Su.now(),e=t-Yh;e>ek&&($h-=e,Yh=t)}function vet(){for(var t,e=Hh,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:Hh=n);wu=t,Pm(r)}function Pm(t){if(!Lc){_u&&(_u=clearTimeout(_u));var e=t-bs;e>24?(t<1/0&&(_u=setTimeout(ak,t-Su.now()-$h)),Ou&&(Ou=clearInterval(Ou))):(Ou||(Yh=Su.now(),Ou=setInterval(pet,ek)),Lc=1,nk(ak))}}const get=1664525,yet=1013904223,ok=4294967296;function met(){let t=1;return()=>(t=(get*t+yet)%ok)/ok}function bet(t){return t.x}function xet(t){return t.y}var _et=10,Oet=Math.PI*(3-Math.sqrt(5));function wet(t){var e,n=1,r=.001,i=1-Math.pow(r,1/300),a=0,o=.6,s=new Map,c=ik(f),l=fet("tick","end"),u=met();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(_){_(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=_et*Math.sqrt(.5+v),b=v*Oet;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,_,O,w,M,E;for(y==null?y=1/0:y*=y,m=0;m<b;++m)M=t[m],_=v-M.x,O=g-M.y,w=_*_+O*O,w<y&&(E=M,y=w);return E},on:function(v,g){return arguments.length>1?(l.on(v,g),e):l.on(v)}}}function Met(){var t,e,n,r,i=Ci(-30),a,o=1,s=1/0,c=.81;function l(h){var p,v=t.length,g=K5(t,bet,xet).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,_;if(h.length){for(m=b=_=0;_<4;++_)(v=h[_])&&(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,_=y*y+m*m;if(b*b/c<_)return _<s&&(y===0&&(y=Rc(n),_+=y*y),m===0&&(m=Rc(n),_+=m*m),_<o&&(_=Math.sqrt(o*_)),e.vx+=y*h.value*r/_,e.vy+=m*h.value*r/_),!0;if(h.length||_>=s)return;(h.data!==e||h.next)&&(y===0&&(y=Rc(n),_+=y*y),m===0&&(m=Rc(n),_+=m*m),_<o&&(_=Math.sqrt(o*_)));do h.data!==e&&(b=a[h.data.index]*r/_,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:Ci(+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 Eet(t){return t.index}function sk(t,e){var n=t.get(e);if(!n)throw new Error("node not found: "+e);return n}function Aet(t){var e=Eet,n=f,r,i=Ci(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,_,O,w,M,E,A,P;b<m;++b)_=t[b],O=_.source,w=_.target,M=w.x+w.vx-O.x-O.vx||Rc(l),E=w.y+w.vy-O.y-O.vy||Rc(l),A=Math.sqrt(M*M+E*E),A=(A-a[b])/A*g*r[b],M*=A,E*=A,w.vx-=M*(P=c[b]),w.vy-=E*P,O.vx+=M*(P=1-P),O.vy+=E*P}function h(){if(o){var g,y=o.length,m=t.length,b=new Map(o.map((O,w)=>[e(O,w,o),O])),_;for(g=0,s=new Array(y);g<m;++g)_=t[g],_.index=g,typeof _.source!="object"&&(_.source=sk(b,_.source)),typeof _.target!="object"&&(_.target=sk(b,_.target)),s[_.source.index]=(s[_.source.index]||0)+1,s[_.target.index]=(s[_.target.index]||0)+1;for(g=0,c=new Array(m);g<m;++g)_=t[g],c[g]=s[_.source.index]/(s[_.source.index]+s[_.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:Ci(+g),p(),d):n},d.distance=function(g){return arguments.length?(i=typeof g=="function"?g:Ci(+g),v(),d):i},d}function Tet(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 Pet(t){var e=Ci(.1),n,r,i;typeof t!="function"&&(t=Ci(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:Ci(+s),o(),a):e},a.x=function(s){return arguments.length?(t=typeof s=="function"?s:Ci(+s),o(),a):t},a}function Cet(t){var e=Ci(.1),n,r,i;typeof t!="function"&&(t=Ci(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:Ci(+s),o(),a):e},a.y=function(s){return arguments.length?(t=typeof s=="function"?s:Ci(+s),o(),a):t},a}var ket=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 Ret={joint:!0},Let={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}},Net={type:"point",axis:!1,legend:!1,encode:{x:"x",y:"y",size:5,color:"group",shape:"point"},style:{stroke:"#fff"}},Iet={text:""};function jet(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=Met(),f=Aet(i).id(ba(l));typeof o=="function"&&u.strength(o),typeof s=="function"&&f.strength(s);const d=wet(r).force("link",f).force("charge",u);a?d.force("center",Tet()):d.force("x",Pet()).force("y",Cet()),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 ck=t=>{const{data:e,encode:n={},scale:r,style:i={},layout:a={},nodeLabels:o=[],linkLabels:s=[],animate:c={},tooltip:l={}}=t,{nodeKey:u=w=>w.id,linkKey:f=w=>w.id}=n,d=ket(n,["nodeKey","linkKey"]),h=Object.assign({nodeKey:u,linkKey:f},d),p=fe(h,"node"),v=fe(h,"link"),{links:g,nodes:y}=Pg(e,h),{nodesData:m,linksData:b}=jet({links:g,nodes:y},Dt({},Ret,a),h),_=va(l,"link",{items:[w=>({name:"source",value:ba(f)(w.source)}),w=>({name:"target",value:ba(f)(w.target)})]}),O=va(l,"node",{items:[w=>({name:"key",value:ba(u)(w)})]},!0);return[Dt({},Let,{data:b,encode:v,labels:s,style:fe(i,"link"),tooltip:_,animate:ga(c,"link")}),Dt({},Net,{data:m,encode:Object.assign({},p),scale:r,style:fe(i,"node"),tooltip:O,labels:[Object.assign(Object.assign({},Iet),fe(i,"label")),...o],animate:ga(c,"link")})]};ck.props={};function Det(t,e){return t.parent===e.parent?1:2}function Cm(t){var e=t.children;return e?e[0]:t.t}function km(t){var e=t.children;return e?e[e.length-1]:t.t}function Bet(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 Fet(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 zet(t,e,n){return t.a.parent===e.parent?t.a:n}function Vh(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}Vh.prototype=Object.create(hc.prototype);function Get(t){for(var e=new Vh(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 Vh(a[o],o)),i.parent=n;return(e.parent=new Vh(null,0)).children=[e],e}function Wet(){var t=Det,e=1,n=1,r=null;function i(l){var u=Get(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){Fet(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,_;p=km(p),d=Cm(d),p&&d;)v=Cm(v),h=km(h),h.a=l,_=p.z+m-d.z-g+t(p._,d._),_>0&&(Bet(zet(p,l,f),l,_),g+=_,y+=_),m+=p.m,g+=d.m,b+=v.m,y+=h.m;p&&!km(h)&&(h.t=p,h.m+=m-y),d&&!Cm(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 Het(t,e){return t.parent===e.parent?1:2}function Yet(t){return t.reduce($et,0)/t.length}function $et(t,e){return t+e.x}function Vet(t){return 1+t.reduce(Xet,0)}function Xet(t,e){return Math.max(t,e.y)}function Uet(t){for(var e;e=t.children;)t=e[0];return t}function qet(t){for(var e;e=t.children;)t=e[e.length-1];return t}function Zet(){var t=Het,e=1,n=1,r=!1;function i(a){var o,s=0;a.eachAfter(function(d){var h=d.children;h?(d.x=Yet(h),d.y=Vet(h)):(d.x=o?s+=t(d,o):0,d.y=0,o=d)});var c=Uet(a),l=qet(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 lk=t=>e=>n=>{const{field:r="value",nodeSize:i,separation:a,sortBy:o,as:s=["x","y"]}=e,[c,l]=s,u=dc(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}},uk=t=>lk(Zet)(t);uk.props={};const fk=t=>lk(Wet)(t);fk.props={};const Ket={sortBy:(t,e)=>e.value-t.value},Qet={axis:!1,legend:!1,type:"point",encode:{x:"x",y:"y",size:2,shape:"point"}},Jet={type:"link",encode:{x:"x",y:"y",shape:"smooth"}},tnt={text:"",fontSize:10},dk=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}=fk(Object.assign(Object.assign(Object.assign({},Ket),a),{field:u}))(e),h=va(l,"node",{title:"name",items:["value"]},!0),p=va(l,"link",{title:"",items:[v=>({name:"source",value:v.source.name}),v=>({name:"target",value:v.target.name})]});return[Dt({},Jet,{data:d,encode:fe(n,"link"),scale:fe(r,"link"),labels:s,style:Object.assign({stroke:"#999"},fe(i,"link")),tooltip:p,animate:ga(c,"link")}),Dt({},Qet,{data:f,scale:fe(r,"node"),encode:fe(n,"node"),labels:[Object.assign(Object.assign({},tnt),fe(i,"label")),...o],style:Object.assign({},fe(i,"node")),tooltip:h,animate:ga(c,"node")})]};dk.props={};function xs(){return 0}function Nc(t){return function(){return t}}var ent=1664525,nnt=1013904223,hk=4294967296;function rnt(){var t=1;return function(){return(t=(ent*t+nnt)%hk)/hk}}var int=gt(27566);function ant(t){return int(t)==="object"&&"length"in t?t:Array.from(t)}function ont(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 Tpt(t){return pk(t,lcg())}function pk(t,e){for(var n=0,r=(t=ont(Array.from(t),e)).length,i=[],a,o;n<r;)a=t[n],o&&vk(o,a)?++n:(o=cnt(i=snt(i,a)),n=0);return o}function snt(t,e){var n,r;if(Rm(e,t))return[e];for(n=0;n<t.length;++n)if(Xh(e,t[n])&&Rm(Mu(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(Xh(Mu(t[n],t[r]),e)&&Xh(Mu(t[n],e),t[r])&&Xh(Mu(t[r],e),t[n])&&Rm(gk(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}function Xh(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 vk(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 Rm(t,e){for(var n=0;n<e.length;++n)if(!vk(t,e[n]))return!1;return!0}function cnt(t){switch(t.length){case 1:return lnt(t[0]);case 2:return Mu(t[0],t[1]);case 3:return gk(t[0],t[1],t[2])}}function lnt(t){return{x:t.x,y:t.y,r:t.r}}function Mu(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 gk(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,_=m-l*l-u*u+f*f,O=h*p-d*v,w=(p*_-v*b)/(O*2)-r,M=(v*g-p*y)/O,E=(h*b-d*_)/(O*2)-i,A=(d*y-h*g)/O,P=M*M+A*A-1,C=2*(a+w*M+E*A),j=w*w+E*E-a*a,N=-(Math.abs(P)>1e-6?(C+Math.sqrt(C*C-4*P*j))/(2*P):j/C);return{x:r+w+M*N,y:i+E+A*N,r:N}}function yk(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 mk(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 bk(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 Uh(t){this._=t,this.next=null,this.previous=null}function xk(t,e){if(!(a=(t=ant(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;yk(r,n,i=t[2]),n=new Uh(n),r=new Uh(r),i=new Uh(i),n.next=i.previous=r,r.next=n.previous=i,i.next=r.previous=n;t:for(c=3;c<a;++c){yk(n._,r._,i=t[c]),i=new Uh(i),l=r.next,u=n.previous,f=r._.r,d=n._.r;do if(f<=d){if(mk(l._,i._)){r=l,n.next=r,r.previous=n,--c;continue t}f+=l._.r,l=l.next}else{if(mk(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=bk(n);(i=i.next)!==r;)(s=bk(i))<o&&(n=i,o=s);r=n.next}for(n=[r._],i=r;(i=i.next)!==r;)n.push(i._);for(i=pk(n,e),c=0;c<a;++c)n=t[c],n.x-=i.x,n.y-=i.y;return i.r}function Ppt(t){return xk(t,lcg()),t}function unt(t){return Math.sqrt(t.value)}function fnt(){var t=null,e=1,n=1,r=xs;function i(a){var o=rnt();return a.x=e/2,a.y=n/2,t?a.eachBefore(_k(t)).eachAfter(Lm(r,.5,o)).eachBefore(Ok(1)):a.eachBefore(_k(unt)).eachAfter(Lm(xs,1,o)).eachAfter(Lm(r,a.r/Math.min(e,n),o)).eachBefore(Ok(Math.min(e,n)/(2*a.r))),a}return i.radius=function(a){return arguments.length?(t=Gd(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:Nc(+a),i):r},i}function _k(t){return function(e){e.children||(e.r=Math.max(0,+t(e)||0))}}function Lm(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=xk(i,n),s)for(a=0;a<o;++a)i[a].r-=s;r.r=c+s}}}function Ok(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 dnt=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 hnt=(t,e)=>({size:[t,e],padding:0,sort:(n,r)=>r.value-n.value}),pnt=(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"}}),vnt={text:"",position:"inside",textOverflow:"clip",wordWrap:!0,maxLines:1,wordWrapWidth:t=>t.r*2},gnt={title:t=>t.data.name,items:[{field:"value"}]},ynt=(t,e,n)=>{const{value:r}=n,i=Dr(t)?Sg().path(e.path)(t):dc(t);return r?i.sum(a=>ba(r)(a)).sort(e.sort):i.count(),fnt().size(e.size).padding(e.padding)(i),i.descendants()},wk=(t,e)=>{const{width:n,height:r}=e,{data:i,encode:a={},scale:o={},style:s={},layout:c={},labels:l=[],tooltip:u={}}=t,f=dnt(t,["data","encode","scale","style","layout","labels","tooltip"]),d=pnt(n,r,a),h=ynt(i,Dt({},hnt(n,r),c),Dt({},d.encode,a)),p=fe(s,"label");return Dt({},d,Object.assign(Object.assign({data:h,encode:a,scale:o,style:s,labels:[Object.assign(Object.assign({},vnt),p),...l]},f),{tooltip:eg(u,gnt),axis:!1}))};wk.props={};function mnt(t){return t.target.depth}function bnt(t){return t.depth}function xnt(t,e){return e-1-t.height}function qh(t,e){return t.sourceLinks.length?t.depth:e-1}function _nt(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?Ei(t.sourceLinks,mnt)-1:0}function Zh(t){return function(){return t}}function Sk(t,e){return Kh(t.source,e.source)||t.index-e.index}function Mk(t,e){return Kh(t.target,e.target)||t.index-e.index}function Kh(t,e){return t.y0-e.y0}function Nm(t){return t.value}function Ont(t){return t.index}function wnt(t){return t.nodes}function Snt(t){return t.links}function Ek(t,e){const n=t.get(e);if(!n)throw new Error("missing: "+e);return n}function Ak({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 Mnt(){let t=0,e=0,n=1,r=1,i=24,a=8,o,s=Ont,c=qh,l,u,f,d=wnt,h=Snt,p=6;function v(D){const B={nodes:d(D),links:h(D)};return g(B),y(B),m(B),b(B),w(B),Ak(B),B}v.update=function(D){return Ak(D),D},v.nodeId=function(D){return arguments.length?(s=typeof D=="function"?D:Zh(D),v):s},v.nodeAlign=function(D){return arguments.length?(c=typeof D=="function"?D:Zh(D),v):c},v.nodeDepth=function(D){return arguments.length?(l=D,v):l},v.nodeSort=function(D){return arguments.length?(u=D,v):u},v.nodeWidth=function(D){return arguments.length?(i=+D,v):i},v.nodePadding=function(D){return arguments.length?(a=o=+D,v):a},v.nodes=function(D){return arguments.length?(d=typeof D=="function"?D:Zh(D),v):d},v.links=function(D){return arguments.length?(h=typeof D=="function"?D:Zh(D),v):h},v.linkSort=function(D){return arguments.length?(f=D,v):f},v.size=function(D){return arguments.length?(t=e=0,n=+D[0],r=+D[1],v):[n-t,r-e]},v.extent=function(D){return arguments.length?(t=+D[0][0],n=+D[1][0],e=+D[0][1],r=+D[1][1],v):[[t,e],[n,r]]},v.iterations=function(D){return arguments.length?(p=+D,v):p};function g({nodes:D,links:B}){D.forEach((z,Y)=>{z.index=Y,z.sourceLinks=[],z.targetLinks=[]});const F=new Map(D.map(z=>[s(z),z]));if(B.forEach((z,Y)=>{z.index=Y;let{source:q,target:rt}=z;typeof q!="object"&&(q=z.source=Ek(F,q)),typeof rt!="object"&&(rt=z.target=Ek(F,rt)),q.sourceLinks.push(z),rt.targetLinks.push(z)}),f!=null)for(const{sourceLinks:z,targetLinks:Y}of D)z.sort(f),Y.sort(f)}function y({nodes:D}){for(const B of D)B.value=B.fixedValue===void 0?Math.max(Di(B.sourceLinks,Nm),Di(B.targetLinks,Nm)):B.fixedValue}function m({nodes:D}){const B=D.length;let F=new Set(D),z=new Set,Y=0;for(;F.size;){if(F.forEach(q=>{q.depth=Y;for(const{target:rt}of q.sourceLinks)z.add(rt)}),++Y>B)throw new Error("circular link");F=z,z=new Set}if(l){const q=Math.max(Mn(D,st=>st.depth)+1,0);let rt;for(let st=0;st<D.length;st++)rt=D[st],rt.depth=l.call(null,rt,q)}}function b({nodes:D}){const B=D.length;let F=new Set(D),z=new Set,Y=0;for(;F.size;){if(F.forEach(q=>{q.height=Y;for(const{source:rt}of q.targetLinks)z.add(rt)}),++Y>B)throw new Error("circular link");F=z,z=new Set}}function _({nodes:D}){const B=Math.max(Mn(D,Y=>Y.depth)+1,0),F=(n-t-i)/(B-1),z=new Array(B).fill(0).map(()=>[]);for(const Y of D){const q=Math.max(0,Math.min(B-1,Math.floor(c.call(null,Y,B))));Y.layer=q,Y.x0=t+q*F,Y.x1=Y.x0+i,z[q]?z[q].push(Y):z[q]=[Y]}if(u)for(const Y of z)Y.sort(u);return z}function O(D){const B=Ei(D,F=>(r-e-(F.length-1)*o)/Di(F,Nm));for(const F of D){let z=e;for(const Y of F){Y.y0=z,Y.y1=z+Y.value*B,z=Y.y1+o;for(const q of Y.sourceLinks)q.width=q.value*B}z=(r-z+o)/(F.length+1);for(let Y=0;Y<F.length;++Y){const q=F[Y];q.y0+=z*(Y+1),q.y1+=z*(Y+1)}N(F)}}function w(D){const B=_(D);o=Math.min(a,(r-e)/(Mn(B,F=>F.length)-1)),O(B);for(let F=0;F<p;++F){const z=Math.pow(.99,F),Y=Math.max(1-z,(F+1)/p);E(B,z,Y),M(B,z,Y)}}function M(D,B,F){for(let z=1,Y=D.length;z<Y;++z){const q=D[z];for(const rt of q){let st=0,At=0;for(const{source:qt,value:Rt}of rt.targetLinks){const Lt=Rt*(rt.layer-qt.layer);st+=k(qt,rt)*Lt,At+=Lt}if(!(At>0))continue;const Yt=(st/At-rt.y0)*B;rt.y0+=Yt,rt.y1+=Yt,j(rt)}u===void 0&&q.sort(Kh),q.length&&A(q,F)}}function E(D,B,F){for(let z=D.length,Y=z-2;Y>=0;--Y){const q=D[Y];for(const rt of q){let st=0,At=0;for(const{target:qt,value:Rt}of rt.sourceLinks){const Lt=Rt*(qt.layer-rt.layer);st+=R(rt,qt)*Lt,At+=Lt}if(!(At>0))continue;const Yt=(st/At-rt.y0)*B;rt.y0+=Yt,rt.y1+=Yt,j(rt)}u===void 0&&q.sort(Kh),q.length&&A(q,F)}}function A(D,B){const F=D.length>>1,z=D[F];C(D,z.y0-o,F-1,B),P(D,z.y1+o,F+1,B),C(D,r,D.length-1,B),P(D,e,0,B)}function P(D,B,F,z){for(;F<D.length;++F){const Y=D[F],q=(B-Y.y0)*z;q>1e-6&&(Y.y0+=q,Y.y1+=q),B=Y.y1+o}}function C(D,B,F,z){for(;F>=0;--F){const Y=D[F],q=(Y.y1-B)*z;q>1e-6&&(Y.y0-=q,Y.y1-=q),B=Y.y0-o}}function j({sourceLinks:D,targetLinks:B}){if(f===void 0){for(const{source:{sourceLinks:F}}of B)F.sort(Mk);for(const{target:{targetLinks:F}}of D)F.sort(Sk)}}function N(D){if(f===void 0)for(const{sourceLinks:B,targetLinks:F}of D)B.sort(Mk),F.sort(Sk)}function k(D,B){let F=D.y0-(D.sourceLinks.length-1)*o/2;for(const{target:z,width:Y}of D.sourceLinks){if(z===B)break;F+=Y+o}for(const{source:z,width:Y}of B.targetLinks){if(z===D)break;F-=Y}return F}function R(D,B){let F=B.y0-(B.targetLinks.length-1)*o/2;for(const{source:z,width:Y}of B.targetLinks){if(z===D)break;F+=Y+o}for(const{target:z,width:Y}of D.sourceLinks){if(z===B)break;F-=Y}return F}return v}const Ent={nodeAlign:"justify",nodeWidth:.008,nodePadding:.03,nodes:t=>t.nodes,links:t=>t.links,nodeSort:void 0,linkSort:void 0,iterations:6},Ant={left:bnt,right:xnt,center:_nt,justify:qh};function Tnt(t){const e=typeof t;return e==="string"?Ant[t]||qh:e==="function"?t:qh}const Tk=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({},Ent,t),d=Mnt().nodeSort(r).linkSort(u).links(l).nodes(c).nodeWidth(a).nodePadding(o).nodeDepth(s).nodeAlign(Tnt(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:_,y0:O,y1:w}=m;return Object.assign(Object.assign({},m),{x:[b,_,_,b],y:[O,O,w,w]})}),y=v.map(m=>{const{source:b,target:_}=m,O=b.x1,w=_.x0,M=m.width/2;return Object.assign(Object.assign({},m),{x:[O,O,w,w],y:[m.y0+M,m.y0-M,m.y1+M,m.y1-M]})});return{nodes:g,links:y}};Tk.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 Cnt={nodeId:t=>t.key,nodeWidth:.02,nodePadding:.02},knt={type:"polygon",axis:!1,legend:!1,encode:{shape:"polygon",x:"x",y:"y"},scale:{x:{type:"identity"},y:{type:"identity"}},style:{stroke:"#000"}},Rnt={type:"polygon",axis:!1,legend:!1,encode:{shape:"ribbon",x:"x",y:"y"},style:{fillOpacity:.5,stroke:void 0}},Lnt={textAlign:t=>t.x[0]<.5?"start":"end",position:t=>t.x[0]<.5?"right":"left",fontSize:10},Pk=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}=Pg(e,n),d=fe(n,"node"),h=fe(n,"link"),{key:p=A=>A.key,color:v=p}=d,{links:g,nodes:y}=Tk(Object.assign(Object.assign(Object.assign({},Cnt),{nodeId:ba(p)}),a))({links:u,nodes:f}),m=fe(i,"label"),{text:b=p,spacing:_=5}=m,O=Pnt(m,["text","spacing"]),w=ba(p),M=va(l,"node",{title:w,items:[{field:"value"}]},!0),E=va(l,"link",{title:"",items:[A=>({name:"source",value:w(A.source)}),A=>({name:"target",value:w(A.target)})]});return[Dt({},knt,{data:y,encode:Object.assign(Object.assign({},d),{color:v}),scale:r,style:fe(i,"node"),labels:[Object.assign(Object.assign(Object.assign({},Lnt),{text:b,dx:A=>A.x[0]<.5?_:-_}),O),...o],tooltip:M,animate:ga(c,"node"),axis:!1}),Dt({},Rnt,{data:g,encode:h,labels:s,style:Object.assign({fill:h.color?void 0:"#aaa",strokeWidth:0},fe(i,"link")),tooltip:E,animate:ga(c,"link")})]};Pk.props={};function Nnt(t,e){return e.value-t.value}function Int(t,e){return e.frequency-t.frequency}function jnt(t,e){return`${t.id}`.localeCompare(`${e.id}`)}function Dnt(t,e){return`${t.name}`.localeCompare(`${e.name}`)}const Bnt={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 Fnt(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({},Bnt),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(_=>{_.source=o(_),_.target=s(_),_.sourceWeight=c(_),_.targetWeight=l(_)});const m=Kn(y,_=>_.source),b=Kn(y,_=>_.target);return g.forEach(_=>{_.id=a(_);const O=m.has(_.id)?m.get(_.id):[],w=b.has(_.id)?b.get(_.id):[];_.frequency=O.length+w.length,_.value=Di(O,M=>M.sourceWeight)+Di(w,M=>M.targetWeight)}),{nodes:g,edges:y}}function h(g,y){const m=typeof u=="function"?u:Be[u];m&&g.sort(m)}function p(g,y){const m=g.length;if(!m)throw $s("Invalid nodes: it's empty!");if(!r){const O=1/m;return g.forEach((w,M)=>{w.x=(M+.5)*O,w.y=e}),{nodes:g,edges:y}}const b=i/(2*m),_=g.reduce((O,w)=>O+=w.value,0);return g.reduce((O,w)=>{w.weight=w.value/_,w.width=w.weight*(1-i),w.height=n;const M=b+O,E=M+w.width,A=e-n/2,P=A+n;return w.x=[M,E,E,M],w.y=[A,A,P,P],O+w.width+2*b},0),{nodes:g,edges:y}}function v(g,y){const m=new Map(g.map(O=>[O.id,O]));if(!r)return y.forEach(O=>{const w=o(O),M=s(O),E=m.get(w),A=m.get(M);E&&A&&(O.x=[E.x,A.x],O.y=[E.y,A.y])}),{nodes:g,edges:y};y.forEach(O=>{O.x=[0,0,0,0],O.y=[e,e,e,e]});const b=Kn(y,O=>O.source),_=Kn(y,O=>O.target);g.forEach(O=>{const{edges:w,width:M,x:E,y:A,value:P,id:C}=O,j=b.get(C)||[],N=_.get(C)||[];let k=0;j.map(R=>{const D=R.sourceWeight/P*M;R.x[0]=E[0]+k,R.x[1]=E[0]+k+D,k+=D}),N.forEach(R=>{const D=R.targetWeight/P*M;R.x[3]=E[0]+k,R.x[2]=E[0]+k+D,k+=D})})}return f}const Im=t=>e=>Fnt(t)(e);Im.props={};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 jm={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},znt={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}},Gnt={type:"polygon",axis:!1,legend:!1,encode:{shape:"ribbon",x:"x",y:"y"},style:{opacity:.5,lineWidth:1,strokeWidth:1}},Wnt={position:"outside",fontSize:10},kk=(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}=Pg(n,r),h=fe(r,"node"),p=fe(r,"link"),{key:v=R=>R.key,color:g=v}=h,{linkEncodeColor:y=R=>R.source}=p,{nodeWidthRatio:m=jm.thickness,nodePaddingRatio:b=jm.marginRatio}=o,_=Ck(o,["nodeWidthRatio","nodePaddingRatio"]),{nodes:O,edges:w}=Im(Object.assign(Object.assign(Object.assign(Object.assign({},jm),{id:ba(v),thickness:m,marginRatio:b}),_),{weight:!0}))({nodes:f,edges:d}),M=fe(a,"label"),{text:E=v}=M,A=Ck(M,["text"]),P=va(u,"node",{title:"",items:[R=>({name:R.key,value:R.value})]},!0),C=va(u,"link",{title:"",items:[R=>({name:`${R.source} -> ${R.target}`,value:R.value})]}),{height:j,width:N}=e,k=Math.min(j,N);return[Dt({},Gnt,{data:w,encode:Object.assign(Object.assign({},p),{color:y}),labels:c,style:Object.assign({fill:y?void 0:"#aaa"},fe(a,"link")),tooltip:C,animate:ga(l,"link")}),Dt({},znt,{data:O,encode:Object.assign(Object.assign({},h),{color:g}),scale:i,style:fe(a,"node"),coordinate:{type:"polar",outerRadius:(k-20)/k,startAngle:-Math.PI*2,endAngle:0},labels:[Object.assign(Object.assign(Object.assign({},Wnt),{text:E}),A),...s],tooltip:P,animate:ga(l,"node"),axis:!1})]};kk.props={};function Hnt(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],_=h/2+b,O=f+1,w=d-1;O<w;){var M=O+w>>>1;l[M]<_?O=M+1:w=M}_-l[O-1]<l[O]-_&&f+1<O&&--O;var E=l[O]-b,A=h-E;if(g-p>y-v){var P=h?(p*A+g*E)/h:g;u(f,O,E,p,v,P,y),u(O,d,A,P,v,g,y)}else{var C=h?(v*A+y*E)/h:y;u(f,O,E,p,v,g,C),u(O,d,A,p,C,g,y)}}}function Qh(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 Ynt(t,e,n,r,i){(t.depth&1?Qh:Ll)(t,e,n,r,i)}var Rk=(1+Math.sqrt(5))/2;function Lk(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,_,O,w;u<d;){h=i-n,p=a-r;do g=s[f++].value;while(!g&&f<d);for(y=m=g,O=Math.max(p/h,h/p)/(v*t),w=g*g*O,_=Math.max(m/w,w/y);f<d;++f){if(g+=l=s[f].value,l<y&&(y=l),l>m&&(m=l),w=g*g*O,b=Math.max(m/w,w/y),b>_){g-=l;break}_=b}o.push(c={value:g,dice:h<p,children:s.slice(u,f)}),c.dice?Ll(c,n,r,i,v?r+=p*g/v:a):Qh(c,n,r,v?n+=h*g/v:i,a),v-=g,u=f}return o}var Nk=function t(e){function n(r,i,a,o,s){Lk(e,r,i,a,o,s)}return n.ratio=function(r){return t((r=+r)>1?r:1)},n}(Rk),$nt=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?Ll(l,i,a,o,v?a+=(s-a)*l.value/v:s):Qh(l,i,a,v?i+=(o-i)*l.value/v:o,s),v-=l.value}else r._squarify=c=Lk(e,r,i,a,o,s),c.ratio=e}return n.ratio=function(r){return t((r=+r)>1?r:1)},n}(Rk);function Vnt(){var t=Nk,e=!1,n=1,r=1,i=[0],a=xs,o=xs,s=xs,c=xs,l=xs;function u(d){return d.x0=d.y0=0,d.x1=n,d.y1=r,d.eachBefore(f),i=[0],e&&d.eachBefore(CS),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=KS(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:Nc(+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:Nc(+d),u):o},u.paddingRight=function(d){return arguments.length?(s=typeof d=="function"?d:Nc(+d),u):s},u.paddingBottom=function(d){return arguments.length?(c=typeof d=="function"?d:Nc(+d),u):c},u.paddingLeft=function(d){return arguments.length?(l=typeof d=="function"?d:Nc(+d),u):l},u}var Xnt=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 Unt(t,e){const n={treemapBinary:Hnt,treemapDice:Ll,treemapSlice:Qh,treemapSliceDice:Ynt,treemapSquarify:Nk,treemapResquarify:$nt},r=t==="treemapSquarify"?n[t].ratio(e):n[t];if(!r)throw new TypeError("Invalid tile method!");return r}function qnt(t,e,n){const{value:r}=n,i=Unt(e.tile,e.ratio),a=$X(t,e.path);return r?a.sum(o=>e.ignoreParentValue&&o.children?0:ba(r)(o)).sort(e.sort):a.count(),Vnt().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),a.descendants().map(o=>Object.assign(o,{x:[o.x0,o.x1],y:[o.y0,o.y1]})).filter(typeof e.layer=="function"?e.layer:o=>o.height===e.layer)}const Znt=(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}),Knt=(t,e)=>({type:"rect",axis:!1,encode:{x:"x",y:"y",color:n=>n.data.parent.name},scale:{x:{domain:[0,t],range:[0,1]},y:{domain:[0,e],range:[0,1]}},style:{stroke:"#fff"}}),Qnt={fontSize:10,text:t=>t.data.name,position:"inside",fill:"#000",textOverflow:"clip",wordWrap:!0,maxLines:1,wordWrapWidth:t=>t.x1-t.x0},Jnt={title:t=>t.data.name,items:[{field:"value"}]},Ik=(t,e)=>{const{width:n,height:r}=e,{data:i,encode:a={},scale:o,style:s={},layout:c={},labels:l=[],tooltip:u={}}=t,f=Xnt(t,["data","encode","scale","style","layout","labels","tooltip"]),d=qnt(i,Dt({},Znt(n,r),c),a),h=fe(s,"label");return Dt({},Knt(n,r),Object.assign(Object.assign({data:d,encode:a,scale:o,style:s,labels:[Object.assign(Object.assign({},Qnt),h),...l]},f),{tooltip:eg(u,Jnt),axis:!1}))};Ik.props={};function trt(){return{"data.arc":Im,"data.cluster":uk,"mark.forceGraph":ck,"mark.tree":dk,"mark.pack":wk,"mark.sankey":Pk,"mark.chord":kk,"mark.treemap":Ik}}var jk=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 ert(t,e){return Ei(t,n=>e[n])}function nrt(t,e){return Mn(t,n=>e[n])}function Dk(t,e){const n=Dm(t,e)*2.5-Bm(t,e)*1.5;return Ei(t,r=>e[r]>=n?e[r]:NaN)}function Dm(t,e){return gh(t,.25,n=>e[n])}function rrt(t,e){return gh(t,.5,n=>e[n])}function Bm(t,e){return gh(t,.75,n=>e[n])}function Bk(t,e){const n=Bm(t,e)*2.5-Dm(t,e)*1.5;return Mn(t,r=>e[r]<=n?e[r]:NaN)}function irt(){return(t,e)=>{const{encode:n}=e,{y:r,x:i}=n,{value:a}=r,{value:o}=i;return[Array.from(Kn(t,l=>o[+l]).values()).flatMap(l=>{const u=Dk(l,a),f=Bk(l,a);return l.filter(d=>a[d]<u||a[d]>f)}),e]}}const Fk=t=>{const{data:e,encode:n,style:r={},tooltip:i={},transform:a,animate:o}=t,s=jk(t,["data","encode","style","tooltip","transform","animate"]),{point:c=!0}=r,l=jk(r,["point"]),{y:u}=n,f={y:u,y1:u,y2:u,y3:u,y4:u},d={y1:Dm,y2:rrt,y3:Bm},h=va(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=va(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:ert},d),{y4:nrt})],encode:Object.assign(Object.assign({},n),f),style:l,tooltip:h},s);const v=fe(l,"box"),g=fe(l,"point");return[Object.assign({type:"box",data:e,transform:[Object.assign(Object.assign({type:"groupX",y:Dk},d),{y4:Bk})],encode:Object.assign(Object.assign({},n),f),style:v,tooltip:h,animate:ga(o,"box")},s),{type:"point",data:e,transform:[{type:irt}],encode:n,style:Object.assign({},g),tooltip:p,animate:ga(o,"point")}]};Fk.props={};var Jh=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 art=(t,e)=>{const{shape:n,radius:r}=t,i=Jh(t,["shape","radius"]),a=fe(i,"pointer"),o=fe(i,"pin"),{shape:s}=a,c=Jh(a,["shape"]),{shape:l}=o,u=Jh(o,["shape"]),{coordinate:f,theme:d}=e;return(h,p)=>{const v=h.map(k=>f.invert(k)),[g,y,m]=cB(f,"polar"),b=f.clone(),{color:_}=p,O=av({startAngle:g,endAngle:y,innerRadius:m,outerRadius:r});O.push(["cartesian"]),b.update({transformations:O});const w=v.map(k=>b.map(k)),[M,E]=MO(w),[A,P]=f.getCenter(),C=Object.assign(Object.assign({x1:M,y1:E,x2:A,y2:P,stroke:_},c),i),j=Object.assign(Object.assign({cx:A,cy:P,stroke:_},u),i),N=je(new Br);return ka(s)||(typeof s=="function"?N.append(()=>s(w,p,b,d)):N.append("line").call(Ae,C).node()),ka(l)||(typeof l=="function"?N.append(()=>l(w,p,b,d)):N.append("circle").call(Ae,j).node()),N.node()}},zk={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"]}}},ort={style:{shape:art,lineWidth:4,pointerLineCap:"round",pinR:10,pinFill:"#fff",radius:.6}},srt={type:"text",style:{x:"50%",y:"60%",textAlign:"center",textBaseline:"middle",fontSize:20,fontWeight:800,fill:"#888"}};function crt(t){if((0,xr.Z)(t)){const e=Math.max(0,Math.min(t,1));return{percent:e,target:e,total:1}}return t}function lrt(t,e){const{name:n="score",target:r,total:i,percent:a,thresholds:o=[]}=crt(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 urt(t,{target:e,total:n}){const{content:r}=t;return r?r(e,n):e.toString()}const Gk=t=>{const{data:e={},scale:n={},style:r={},animate:i={},transform:a=[]}=t,o=Jh(t,["data","scale","style","animate","transform"]),{targetData:s,totalData:c,target:l,total:u,scale:f}=lrt(e,n),d=fe(r,"text"),h=H7(r,["pointer","pin"]);return[Dt({},zk,Object.assign({type:"interval",transform:[{type:"stackY"}],data:c,scale:f,style:fe(r,"arc"),animate:typeof i=="object"?fe(i,"arc"):i},o)),Dt({},zk,ort,Object.assign({type:"point",data:s,scale:f,style:h,animate:typeof i=="object"?fe(i,"indicator"):i},o)),Dt({},srt,{style:Object.assign({text:urt(d,{target:l,total:u})},d),animate:typeof i=="object"?fe(i,"text"):i})]};Gk.props={};const Fm=Math.PI/180,Eu=64,tp=2048;function frt(t){return t.text}function drt(){return"serif"}function Wk(){return"normal"}function hrt(t){return t.value}function prt(){return~~(Math.random()*2)*90}function vrt(){return 1}function grt(){}function yrt(t,e,n,r){if(e.sprite)return;const i=t.context,a=t.ratio;i.clearRect(0,0,(Eu<<5)/a,tp/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*Fm),v=Math.cos(e.rotate*Fm),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>=Eu<<5&&(o=0,s+=c,c=0),s+h>=tp)break;i.translate((o+(d>>1))/a,(s+(h>>1))/a),e.rotate&&i.rotate(e.rotate*Fm),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,(Eu<<5)/a,tp/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),_=u[(s+y)*(Eu<<5)+(o+m)<<2]?1<<31-m%32:0;f[b]|=_,v|=_}v?g=y:(e.y0++,p--,y--,s++)}e.y1=e.y0+g,e.sprite=f.slice(0,(e.y1-e.y0)*h)}}function mrt(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 brt(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 xrt(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 Hk(t){const e=t[0]/t[1];return function(n){return[e*(n*=.1)*Math.cos(n),n*Math.sin(n)]}}function _rt(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 Yk(t){const e=[];let n=-1;for(;++n<t;)e[n]=0;return e}function Ort(){return document.createElement("canvas")}function To(t){return typeof t=="function"?t:function(){return t}}const wrt={archimedean:Hk,rectangular:_rt};function Srt(){let t=[256,256],e=frt,n=drt,r=hrt,i=Wk,a=prt,o=vrt,s=Hk,c=Math.random,l=grt,u=[],f=null,d=1/0;const h=Wk,p=Ort,v={};v.start=function(){const[m,b]=t,_=g(p()),O=v.board?v.board:Yk((t[0]>>5)*t[1]),w=u.length,M=[],E=u.map(function(j,N,k){return j.text=e.call(this,j,N,k),j.font=n.call(this,j,N,k),j.style=h.call(this,j,N,k),j.weight=i.call(this,j,N,k),j.rotate=a.call(this,j,N,k),j.size=~~r.call(this,j,N,k),j.padding=o.call(this,j,N,k),j}).sort(function(j,N){return N.size-j.size});let A=-1,P=v.board?[{x:0,y:0},{x:m,y:b}]:void 0;f&&clearInterval(f),f=setInterval(C,0),C();function C(){const j=Date.now();for(;Date.now()-j<d&&++A<w;){const N=E[A];N.x=m*(c()+.5)>>1,N.y=b*(c()+.5)>>1,yrt(_,N,E,A),N.hasText&&y(O,N,P)&&(l.call(null,"word",{cloud:v,word:N}),M.push(N),P?v.hasImage||brt(P,N):P=[{x:N.x+N.x0,y:N.y+N.y0},{x:N.x+N.x1,y:N.y+N.y1}],N.x-=t[0]>>1,N.y-=t[1]>>1)}v._tags=M,v._bounds=P,A>=w&&(v.stop(),l.call(null,"end",{cloud:v,words:M,bounds:P}))}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=(Eu<<5)/b,m.height=tp/b;const _=m.getContext("2d");return _.fillStyle=_.strokeStyle="red",_.textAlign="center",{context:_,ratio:b}}function y(m,b,_){const O=b.x,w=b.y,M=Math.sqrt(t[0]*t[0]+t[1]*t[1]),E=s(t),A=c()<.5?1:-1;let P,C=-A,j,N;for(;(P=E(C+=A))&&(j=~~P[0],N=~~P[1],!(Math.min(Math.abs(j),Math.abs(N))>=M));)if(b.x=O+j,b.y=w+N,!(b.x+b.x0<0||b.y+b.y0<0||b.x+b.x1>t[0]||b.y+b.y1>t[1])&&(!_||!mrt(b,m,t[0]))&&(!_||xrt(b,_))){const k=b.sprite,R=b.width>>5,D=t[0]>>5,B=b.x-(R<<4),F=B&127,z=32-F,Y=b.y1-b.y0;let q,rt=(b.y+b.y0)*D+(B>>5);for(let st=0;st<Y;st++){q=0;for(let At=0;At<=R;At++)m[rt+At]|=q<<z|(At<R?(q=k[st*R+At])>>>F:0);rt+=D}return delete b.sprite,!0}return!1}return v.createMask=m=>{const b=document.createElement("canvas"),[_,O]=t;if(!_||!O)return;const w=_>>5,M=Yk((_>>5)*O);b.width=_,b.height=O;const E=b.getContext("2d");E.drawImage(m,0,0,m.width,m.height,0,0,_,O);const A=E.getImageData(0,0,_,O).data;for(let P=0;P<O;P++)for(let C=0;C<_;C++){const j=w*P+(C>>5),N=P*_+C<<2,R=A[N]>=250&&A[N+1]>=250&&A[N+2]>=250?1<<31-C%32:0;M[j]|=R}v.board=M,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=To(m)},v.font=function(m){n=To(m)},v.fontWeight=function(m){i=To(m)},v.rotate=function(m){a=To(m)},v.spiral=function(m){s=wrt[m]||m},v.fontSize=function(m){r=To(m)},v.padding=function(m){o=To(m)},v.random=function(m){c=To(m)},v.on=function(m){l=To(m)},v}var Mrt=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 Ert(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 Mrt(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 Art=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())})},Trt=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 Prt={size:[500,500],fontSize:[14,28]};function Crt(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 krt(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 $k=t=>e=>Art(void 0,void 0,void 0,function*(){const n=Object.assign({},Prt,t),r=Srt();yield Ert(r,n).set("fontSize",y=>{const m=e.map(b=>b.value);return krt(y,[Ei(m),Mn(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",Crt,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,_=Trt(y,["x","y"]);return Object.assign(Object.assign({},_),{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});$k.props={};var Rrt=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())})},Lrt=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 Nrt(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 Irt=(t,e)=>({size:[t,e]}),jrt=(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"}}),Vk=(t,e)=>Rrt(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=Lrt(t,["data","encode","scale","style","layout"]),u=Nrt(i,a),f=yield $k(Object.assign(Object.assign({},Irt(n,r)),c))(u);return Dt({},jrt(n,r),Object.assign(Object.assign({data:f,encode:a,scale:o,style:s},l),{axis:!1}))});Vk.props={};const Xk=5e3;function Uk(t,e,n){return t+(e-t)*n}function Drt(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 Brt(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=Drt(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 Frt(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=Brt(s,o+s*n,c,0,s/40,t,e),y=u.createElement("path",{style:{path:g,fill:f,opacity:Uk(.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:Uk(.5*Xk,Xk,v)*2,iterations:1/0})}catch(m){console.warn("off-screen group animate error!")}}}function zrt(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 Grt(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 Wrt(t,e,n){return`
M ${t} ${e-n}
L ${t+n} ${e}
L ${t} ${e+n}
L ${t-n} ${e}
Z
`}function Hrt(t,e,n){return`
M ${t} ${e-n}
L ${t+n} ${e+n}
L ${t-n} ${e+n}
Z
`}function Yrt(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 qk={pin:Yrt,rect:Grt,circle:zrt,diamond:Wrt,triangle:Hrt};var Zk=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 $rt=(t="circle")=>qk[t]||qk.circle,Kk=(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=Zk(i,["background","outline","wave"]),{border:f=2,distance:d=0}=c,h=Zk(c,["border","distance"]),{length:p=192,count:v=3}=l;return(g,y,m)=>{const{document:b}=e.canvas,{color:_,fillOpacity:O}=m,w=Object.assign(Object.assign({fill:_},m),u),M=b.createElement("g",{}),[E,A]=n.getCenter(),P=n.getSize(),C=Math.min(...P)/2,N=(gi(a)?a:$rt(a))(E,A,C,...P);if(Object.keys(s).length){const D=b.createElement("path",{style:Object.assign({path:N,fill:"#fff"},s)});M.appendChild(D)}if(o>0){const D=b.createElement("path",{style:{path:N}});M.appendChild(D),M.style.clipPath=D,Frt(E,A,1-o,v,w,M,D.getBBox().y,C*2,p,!0,b)}const k=b.createElement("path",{style:{path:N,fill:"transparent",lineWidth:f+2*d,stroke:"#fff"}}),R=b.createElement("path",{style:Object.assign(Object.assign(Object.assign({path:N,stroke:_,strokeOpacity:O,lineWidth:f},w),h),{fill:"transparent"})});return M.appendChild(k),M.appendChild(R),M}};Kk.props={};var Vrt=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 Xrt={axis:{x:!1,y:!1},legend:!1,tooltip:!1,encode:{x:"type",y:"percent"},scale:{y:{domain:[0,1]}},style:{shape:Kk},animate:{enter:{type:"fadeIn"}}},Urt={type:"text",style:{x:"50%",y:"50%",textAlign:"center",textBaseline:"middle",fontSize:20,fontWeight:800,fill:"#888"},animate:{enter:{type:"fadeIn"}}},Qk=t=>{const{data:e={},style:n={},animate:r}=t,i=Vrt(t,["data","style","animate"]),a=Math.max(0,(0,xr.Z)(e)?e:e==null?void 0:e.percent),o=[{percent:a,type:"liquid"}],s=fe(n,"text"),c=fe(n,"outline"),l=fe(n,"wave"),u=fe(n,"background");return[Dt({},Xrt,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({},Urt,{style:Object.assign({text:`${$f(a*100)} %`},s),animate:r})]};Qk.props={};var Ya=gt(52827);const Jk=1e-10;function t3(t,e){const n=Zrt(t),r=n.filter(function(c){return qrt(c,t)});let i=0,a=0,o;const s=[];if(r.length>1){const c=Krt(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=Au(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+=zm(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(Au(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-Jk,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 qrt(t,e){for(let n=0;n<e.length;++n)if(Au(t,e[n])>e[n].radius+Jk)return!1;return!0}function Zrt(t){const e=[];for(let n=0;n<t.length;++n)for(let r=n+1;r<t.length;++r){const i=n3(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 zm(t,e){return t*t*Math.acos(1-e/t)-(t-e)*Math.sqrt(e*(2*t-e))}function Au(t,e){return Math.sqrt((t.x-e.x)*(t.x-e.x)+(t.y-e.y)*(t.y-e.y))}function e3(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 zm(t,r)+zm(e,i)}function n3(t,e){const n=Au(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 Krt(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 Qrt(t,e){e=e||{},e.maxIterations=e.maxIterations||500;const n=e.initialLayout||nit,r=e.lossFunction||Wm;t=Jrt(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,Ya.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 r3=1e-10;function Gm(t,e,n){return Math.min(t,e)*Math.min(t,e)*Math.PI<=n+r3?Math.abs(t-e):(0,Ya.bisect)(function(r){return e3(t,e,r)-n},0,t+e)}function Jrt(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 tit(t,e,n){const r=(0,Ya.zerosM)(e.length,e.length),i=(0,Ya.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=Gm(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 eit(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 nit(t,e){let n=iit(t,e);const r=e.lossFunction||Wm;if(t.length>=8){const i=rit(t,e),a=r(i,t),o=r(n,t);a+1e-8<o&&(n=i)}return n}function rit(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=tit(t,r,i);let s=o.distances;const c=o.constraints,l=(0,Ya.norm2)(s.map(Ya.norm2))/s.length;s=s.map(function(v){return v.map(function(g){return g/l})});const u=function(v,g){return eit(v,g,s,c)};let f,d;for(a=0;a<n;++a){const v=(0,Ya.zeros)(s.length*2).map(Math.random);d=(0,Ya.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,Ya.scale)(e.history[a].x,l);return p}function iit(t,e){const n=e&&e.lossFunction?e.lossFunction:Wm,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+r3>=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=Gm(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 _=y+1;_<h.length;++_){const O=r[h[_].set],w=Gm(a.radius,O.radius,h[_].size),M=n3({x:m.x,y:m.y,radius:b},{x:O.x,y:O.y,radius:w});for(let E=0;E<M.length;++E)p.push(M[E])}}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 Wm(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=e3(c.radius,l.radius,Au(c,l))}else o=t3(r(a.sets));const s=a.hasOwnProperty("weight")?a.weight:1;n+=s*(o-a.size)*(o-a.size)}return n}function ait(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 oit(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 Hm(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 Cpt(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=oit(r);for(i=0;i<o.length;++i){ait(o[i],e,n);const d=Hm(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=Hm(r);const f={};for(i=0;i<r.length;++i)f[r[i].setid]=r[i];return f}function sit(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=Hm(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 cit(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 lit(t){const e={};t3(t,e);const n=e.arcs;if(n.length===0)return"M 0 0";if(n.length==1){const r=n[0].circle;return cit(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 i3=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=Qrt(c);let u;return c.map(f=>{const d=f[e],h=({width:p,height:v})=>{u=u||sit(l,p,v,i);const g=d.map(m=>u[m]);let y=lit(g);return/[zZ]$/.test(y)||(y+=" Z"),y};return Object.assign(Object.assign({},f),{[o]:h})})}};i3.props={};function uit(){return{"data.venn":i3,"mark.boxplot":Fk,"mark.gauge":Gk,"mark.wordCloud":Vk,"mark.liquid":Qk}}function fit(){return Object.assign(Object.assign(Object.assign(Object.assign({},Ytt()),trt()),uit()),zJ())}var ep=function(){return ep=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},ep.apply(this,arguments)},dit=jV(IV,ep(ep({},fit()),SX())),np=function(){return np=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},np.apply(this,arguments)},hit=function(){function t(e,n){this.container=[],n&&(this.chart=e,this.options=n,this.init())}return t.prototype.getElementsLayout=function(){var e=this.canvas.document.getElementsByClassName("element"),n=[];return e.forEach(function(r){var i=r.getBBox(),a=i.x,o=i.y,s=i.width,c=i.height;n.push({bbox:i,x:a,y:o,width:s,height:c,data:r.__data__})}),n},t.prototype.getConversionTagLayout=function(){var e=this.direction==="vertical",n=this.getElementsLayout(),r=n[0],i=r.x,a=r.y,o=r.height,s=r.width,c=r.data,l=["items",0,"value"],u=Mr(c,l),f=e?n[1].y-a-o:n[1].x-i-s,d=[],h=this.options,p=h.size,v=p===void 0?40:p,g=h.arrowSize,y=g===void 0?20:g,m=h.spacing,b=m===void 0?4:m;return n.forEach(function(_,O){if(O>0){var w=_.x,M=_.y,E=_.height,A=_.width,P=_.data,C=Mr(P,l),j=v/2;if(e){var N=w+A/2,k=M;d.push({points:[[N+j,k-f+b],[N+j,k-y-b],[N,k-b],[N-j,k-y-b],[N-j,k-f+b]],center:[N,k-f/2-b],width:f,value:[u,C]})}else{var N=w,k=M+E/2;d.push({points:[[w-f+b,k-j],[w-y-b,k-j],[N-b,k],[w-y-b,k+j],[w-f+b,k+j]],center:[N-f/2-b,k],width:f,value:[u,C]})}u=C}}),d},t.prototype.init=function(){var e=this.chart.getContext().canvas;this.canvas=e,this.setDirection(),this.drawConversionTag()},t.prototype.setDirection=function(){var e=this.chart.getCoordinate(),n=Mr(e,"options.transformations"),r="horizontal";n.forEach(function(i){i.includes("transpose")&&(r="vertical")}),this.direction=r},t.prototype.drawConversionTag=function(){var e=this,n=this.getConversionTagLayout(),r=this.options,i=r.style,a=r.text,o=a.style,s=a.formatter;n.forEach(function(c){var l=c.points,u=c.center,f=c.value,d=f[0],h=f[1],p=u[0],v=u[1],g=new il({style:np({points:l,fill:"#eee"},i)}),y=new Zi({style:np({x:p,y:v,text:Wt(s)?s(d,h):(h/d*100).toFixed(2)+"%",fontSize:12,textBaseline:"middle",textAlign:"center",fill:"#000"},o)});e.canvas.appendChild(g),e.canvas.appendChild(y),e.container.push(g,y)})},t.prototype.update=function(e){},t.prototype.destroy=function(){this.container.forEach(function(e){e.destroy()})},t}(),pit=1,vit=2;function git(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 zc;if(r)var d=r(l,u,c,t,e,f);if(!(d===void 0?kp(u,l,pit|vit,r,f):d))return!1}}return!0}var yit=git;function mit(t){return t===t&&!Ot(t)}var a3=mit;function bit(t){for(var e=Bo(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,a3(i)]}return e}var xit=bit;function _it(t,e){return function(n){return n==null?!1:n[t]===e&&(e!==void 0||t in Object(n))}}var o3=_it;function Oit(t){var e=xit(t);return e.length==1&&e[0][2]?o3(e[0][0],e[0][1]):function(n){return n===t||yit(n,t,e)}}var wit=Oit;function Sit(t,e){return t!=null&&e in Object(t)}var Mit=Sit;function Eit(t,e,n){e=ks(e,t);for(var r=-1,i=e.length,a=!1;++r<i;){var o=Rs(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&&Mp(i)&&Yu(o,i)&&(Mt(t)||Sp(t)))}var Ait=Eit;function Tit(t,e){return t!=null&&Ait(t,e,Mit)}var s3=Tit,Pit=1,Cit=2;function kit(t,e){return Dp(t)&&a3(e)?o3(Rs(t),e):function(n){var r=Mr(n,t);return r===void 0&&r===e?s3(n,t):kp(e,r,Pit|Cit)}}var Rit=kit;function Lit(t){return t}var Ym=Lit;function Nit(t){return function(e){return e==null?void 0:e[t]}}var Iit=Nit;function jit(t){return function(e){return Ku(e,t)}}var Dit=jit;function Bit(t){return Dp(t)?Iit(Rs(t)):Dit(t)}var Fit=Bit;function zit(t){return typeof t=="function"?t:t==null?Ym:typeof t=="object"?Mt(t)?Rit(t[0],t[1]):wit(t):Fit(t)}var $m=zit;function Git(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 Wit=Git;function Hit(t){return t!==t}var Yit=Hit;function $it(t,e,n){for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}var Vit=$it;function Xit(t,e,n){return e===e?Vit(t,e,n):Wit(t,Yit,n)}var c3=Xit;function Uit(t,e){var n=t==null?0:t.length;return!!n&&c3(t,e,0)>-1}var qit=Uit;function Zit(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 Kit=Zit;function Qit(){}var l3=Qit,Jit=1/0,tat=Ps&&1/xp(new Ps([,-0]))[1]==Jit?function(t){return new Ps(t)}:l3,eat=tat,nat=200;function rat(t,e,n){var r=-1,i=qit,a=t.length,o=!0,s=[],c=s;if(n)o=!1,i=Kit;else if(a>=nat){var l=e?null:eat(t);if(l)return xp(l);o=!1,i=g1,c=new v1}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 iat=rat;function aat(t,e){return t&&t.length?iat(t,$m(e,2)):[]}var Vm=aat;function oat(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 sat=oat;function cat(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 lat=cat,uat=lat(),fat=uat;function dat(t,e){return t&&fat(t,e,Bo)}var hat=dat;function pat(t,e){return function(n,r){if(n==null)return n;if(!Do(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 vat=pat,gat=vat(hat),u3=gat;function yat(t,e,n,r){return u3(t,function(i,a,o){e(r,i,n(i),o)}),r}var mat=yat;function bat(t,e){return function(n,r){var i=Mt(n)?sat:mat,a=e?e():{};return i(n,t,$m(r,2),a)}}var xat=bat,_at=Object.prototype,Oat=_at.hasOwnProperty,wat=xat(function(t,e,n){Oat.call(t,n)?t[n].push(e):Rp(t,n,[e])}),f3=wat,Xm=32,d3=16,h3=48,Tu=function(){return Tu=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},Tu.apply(this,arguments)},Sat=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},Mat=function(){function t(e,n){this.container=[],n&&(this.chart=e,this.options=n,this.init())}return t.prototype.getElementsLayout=function(){var e=this.options.layout,n=e==="vertical",r=this.canvas.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;i.push({bbox:o,x:s,y:c,width:l,height:u,data:a.__data__})}),n?Vm(i,"x"):Vm(i,"y")},t.prototype.getBidirectionalBarAxisTextLayout=function(){var e=this.options.layout,n=e==="vertical",r=this.getElementsLayout(),i=["title"],a=[],o=Mr(this.views,[0,"layout"]),s=o.width,c=o.height;return r.forEach(function(l){var u=l.x,f=l.y,d=l.height,h=l.width,p=l.data,v=Mr(p,i);n?a.push({x:u+h/2,y:c,text:v}):a.push({x:s,y:f+d/2,text:v})}),Vm(a,"text").length!==a.length&&(a=Object.values(f3(a,"text")).map(function(l){var u,f=l.reduce(function(d,h){return d+(n?h.x:h.y)},0);return Tu(Tu({},l[0]),(u={},u[n?"x":"y"]=f/l.length,u))})),a},t.prototype.init=function(){var e=this.chart.getContext(),n=e.canvas,r=e.views;this.views=r,this.canvas=n,this.drawBidirectionalBarAxisText()},t.prototype.transformLabelStyle=function(e){var n={},r=/^label[A-Z]/;return Object.keys(e).forEach(function(i){r.test(i)&&(n[i.replace("label","").replace(/^[A-Z]/,function(a){return a.toLowerCase()})]=e[i])}),n},t.prototype.drawBidirectionalBarAxisText=function(){var e=this,n=this.getBidirectionalBarAxisTextLayout(),r=this.options,i=r.layout,a=r.labelFormatter,o=Sat(r,["layout","labelFormatter"]);n.forEach(function(s){var c=s.x,l=s.y,u=s.text,f=new Zi({style:Tu({x:c,y:l,text:Wt(a)?a(u):u,fontSize:12,textBaseline:"middle",textAlign:"center",fill:"#000",wordWrap:!0,wordWrapWidth:i==="horizontal"?Xm*2:120,maxLines:2,textOverflow:"ellipsis"},e.transformLabelStyle(o))});e.canvas.appendChild(f),e.container.push(f)})},t.prototype.update=function(e){},t.prototype.destroy=function(){this.container.forEach(function(e){e.destroy()})},t}(),Eat={ConversionTag:hit,BidirectionalBarAxisText:Mat},Aat="[object Boolean]";function Tat(t){return t===!0||t===!1||Oi(t)&&ot(t)==Aat}var Um=Tat,Pu=function(){return Pu=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},Pu.apply(this,arguments)},Pat=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},Cat=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))},qm=["width","height","renderer","autoFit","canvas","theme","inset","insetLeft","insetRight","insetTop","insetBottom","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","margin","marginTop","marginRight","marginBottom","marginLeft","depth","title"],kat=["data","type","children","direction"],Zm="__transform__",Rat="__skipDelCustomKeys__",_s=function(t,e){return Um(e)?{type:t,available:e}:Pu({type:t},e)},Cu={encode:{xField:"x",yField:"y",colorField:"color",angleField:"y",keyField:"key",sizeField:"size",shapeField:"shape",seriesField:"series",positionField:"position",textField:"text",valueField:"value",binField:"x",srcField:"src"},transform:{stack:function(t){return _s("stackY",t)},normalize:function(t){return _s("normalizeY",t)},percent:function(t){return _s("normalizeY",t)},group:function(t){return _s("dodgeX",t)},sort:function(t){return _s("sortX",t)},symmetry:function(t){return _s("symmetryY",t)},diff:function(t){return _s("diffY",t)}},scale:{meta:function(t){return t}},labels:{label:function(t){return t}},style:{shape:"shape",connectNulls:function(t){return Um(t)?{connect:t}:t}}},Km=Cat(["xField","yField","seriesField","colorField","keyField","positionField","meta","tooltip","animate"],Object.keys(Cu.transform),!0),Qm=[{key:"annotations",extend_keys:[]},{key:"line",type:"line",extend_keys:Km},{key:"point",type:"point",extend_keys:Km},{key:"area",type:"area",extend_keys:Km}],Lat=[{key:"transform",callback:function(t,e,n){var r;t[e]=t[e]||[];var i=n.available,a=i===void 0?!0:i,o=Pat(n,["available"]);a?t[e].push(Pu((r={},r[Zm]=!0,r),o)):t[e].splice(t[e].indexOf(function(s){return s.type===n.type}),1)}},{key:"labels",callback:function(t,e,n){var r;if(!n||Mt(n)){t[e]=n||[];return}n.text||(n.text=t.yField),t[e]=t[e]||[],t[e].push(Pu((r={},r[Zm]=!0,r),n))}}],Nat=[{key:"conversionTag",shape:"ConversionTag"},{key:"axisText",shape:"BidirectionalBarAxisText"}];function Iat(t,e,n,r){if(!Ot(t))return t;e=ks(e,t);for(var i=-1,a=e.length,o=a-1,s=t;s!=null&&++i<a;){var c=Rs(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=Ot(u)?u:Yu(e[i+1])?[]:{})}Uu(s,c,l),s=s[c]}return t}var p3=Iat;function jat(t,e,n){for(var r=-1,i=e.length,a={};++r<i;){var o=e[r],s=Ku(t,o);n(s,o)&&p3(a,ks(o,t),s)}return a}var Dat=jat;function Bat(t,e){return Dat(t,e,function(n,r){return s3(t,r)})}var Fat=Bat,v3=$?$.isConcatSpreadable:void 0;function zat(t){return Mt(t)||Sp(t)||!!(v3&&t&&t[v3])}var Gat=zat;function g3(t,e,n,r,i){var a=-1,o=t.length;for(n||(n=Gat),i||(i=[]);++a<o;){var s=t[a];e>0&&n(s)?e>1?g3(s,e-1,n,r,i):Op(i,s):r||(i[i.length]=s)}return i}var Wat=g3;function Hat(t){var e=t==null?0:t.length;return e?Wat(t,1):[]}var Yat=Hat;function $at(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 Vat=$at,y3=Math.max;function Xat(t,e,n){return e=y3(e===void 0?t.length-1:e,0),function(){for(var r=arguments,i=-1,a=y3(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),Vat(t,this,s)}}var m3=Xat;function Uat(t){return function(){return t}}var qat=Uat,Zat=Xu?function(t,e){return Xu(t,"toString",{configurable:!0,enumerable:!1,value:qat(e),writable:!0})}:Ym,Kat=Zat,Qat=800,Jat=16,tot=Date.now;function eot(t){var e=0,n=0;return function(){var r=tot(),i=Jat-(r-n);if(n=r,i>0){if(++e>=Qat)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var not=eot,rot=not(Kat),b3=rot;function iot(t){return b3(m3(t,void 0,Yat),t+"")}var Jm=iot,aot=Jm(function(t,e){return t==null?{}:Fat(t,e)}),rp=aot;function oot(t,e,n){return t==null?t:p3(t,e,n)}var $e=oot,ku=function(){return ku=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},ku.apply(this,arguments)},t1=["radius","innerRadius","startAngle","endAngle","focusX","focusY","distortionX","distortionY","visual"];function ip(t){var e=t.options,n=e.coordinate,r=n===void 0?{}:n;return $e(t,["options","coordinate"],ku(ku(ku({},r),rp(e,t1)),{outerRadius:Mr(e,"radius")})),t}var x3=function(){var t=[];return Qm.forEach(function(e){t.push(e.key)}),t},sot=function(){var t=[];Object.keys(Cu).forEach(function(n){t.push.apply(t,Object.keys(Cu[n]))});var e=x3();return t.push.apply(t,e),t},_3=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))},O3=function(t,e){var n,r=sot();return _3(_3([],r,!0),t1,!0).forEach(function(i){delete t[i]}),(n=t.children)===null||n===void 0||n.forEach(function(i){Object.keys(i).forEach(function(a){r.includes(a)&&delete i[a]})}),e&&Object.keys(t).forEach(function(i){kat.includes(i)||delete t[i]}),t};function cot(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}var lot=cot;function uot(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 fot=uot;function dot(t,e){return e.length<2?t:Ku(t,fot(e,0,-1))}var hot=dot;function pot(t,e){return e=ks(e,t),t=hot(t,e),t==null||delete t[Rs(lot(e))]}var vot=pot,got="[object Object]",yot=Function.prototype,mot=Object.prototype,w3=yot.toString,bot=mot.hasOwnProperty,xot=w3.call(Object);function _ot(t){if(!Oi(t)||ot(t)!=got)return!1;var e=Np(t);if(e===null)return!0;var n=bot.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&w3.call(n)==xot}var S3=_ot;function Oot(t){return S3(t)?void 0:t}var wot=Oot,Sot=1,Mot=2,Eot=4,Aot=Jm(function(t,e){var n={};if(t==null)return n;var r=!1;e=Zu(e,function(a){return a=ks(a,t),r||(r=a.length>1),a}),Cs(t,U1(t),n),r&&(n=rb(n,Sot|Mot|Eot,wot));for(var i=e.length;i--;)vot(n,e[i]);return n}),e1=Aot,Tot=function(t){return Object.keys(t).forEach(function(e){qm.includes(e)&&delete t[e]}),t},Pot=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)}}(),Ic=function(){return Ic=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},Ic.apply(this,arguments)},M3="data-chart-source-type",n1=new Map,yn=function(t){Pot(e,t);function e(n,r){var i=t.call(this)||this;return i.container=typeof n=="string"?document.getElementById(n):n,i.options=X({},i.getBaseOptions(),i.getDefaultOptions(),r),i.createG2(),i.bindEvents(),i}return e.prototype.getChartOptions=function(){var n=this.options.autoFit,r=n===void 0?!0:n;return Ic(Ic({},rp(this.options,qm)),{container:this.container,autoFit:r})},e.prototype.getSpecOptions=function(){return this.type==="base"||this[Rat]?Ic(Ic({},this.options),this.getChartOptions()):O3(e1(this.options,qm),!0)},e.prototype.createG2=function(){if(!this.container)throw Error("The container is not initialized!");this.chart=new dit(this.getChartOptions()),this.container.setAttribute(M3,"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"}},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.annotations()}),this.bindSizeSensor()},e.prototype.annotations=function(){var n=this;Nat.forEach(function(r){var i=r.key,a=r.shape,o=n.options[i];n1.has(i)&&n1.get(i).destroy(),o&&n1.set(i,new Eat[a](n.chart,o))})},e.prototype.update=function(n){this.updateOption(n)},e.prototype.updateOption=function(n){this.options=X({},this.options,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(M3)},e.prototype.execAdaptor=function(){var n=this.getSchemaAdaptor();n({chart:this.chart,options:Tot(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(Sn.AFTER_CHANGE_SIZE,function(){n.annotations()})},e}(Wp),Cot=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)}}(),kot=function(t){Cot(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}(yn);function Rot(){}var r1=Rot;function ap(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=void 0}ap.prototype=jp(r1.prototype),ap.prototype.constructor=ap;var Ru=ap,Lot=Wc&&new Wc,E3=Lot,Not=E3?function(t){return E3.get(t)}:l3,A3=Not,Iot={},T3=Iot,jot=Object.prototype,Dot=jot.hasOwnProperty;function Bot(t){for(var e=t.name+"",n=T3[e],r=Dot.call(T3,e)?n.length:0;r--;){var i=n[r],a=i.func;if(a==null||a==t)return i.name}return e}var op=Bot,Fot=4294967295;function sp(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Fot,this.__views__=[]}sp.prototype=jp(r1.prototype),sp.prototype.constructor=sp;var i1=sp;function zot(t){if(t instanceof i1)return t.clone();var e=new Ru(t.__wrapped__,t.__chain__);return e.__actions__=V1(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var Got=zot,Wot=Object.prototype,Hot=Wot.hasOwnProperty;function cp(t){if(Oi(t)&&!Mt(t)&&!(t instanceof i1)){if(t instanceof Ru)return t;if(Hot.call(t,"__wrapped__"))return Got(t)}return new Ru(t)}cp.prototype=r1.prototype,cp.prototype.constructor=cp;var Yot=cp;function $ot(t){var e=op(t),n=Yot[e];if(typeof n!="function"||!(e in i1.prototype))return!1;if(t===n)return!0;var r=A3(n);return!!r&&t===r[0]}var P3=$ot,Vot="Expected a function",Xot=8,Uot=32,qot=128,Zot=256;function Kot(t){return Jm(function(e){var n=e.length,r=n,i=Ru.prototype.thru;for(t&&e.reverse();r--;){var a=e[r];if(typeof a!="function")throw new TypeError(Vot);if(i&&!o&&op(a)=="wrapper")var o=new Ru([],!0)}for(r=o?r:n;++r<n;){a=e[r];var s=op(a),c=s=="wrapper"?A3(a):void 0;c&&P3(c[0])&&c[1]==(qot|Xot|Uot|Zot)&&!c[4].length&&c[9]==1?o=o[op(c[0])].apply(o,c[3]):o=a.length==1&&P3(a)?o[s]():o.thru(a)}return function(){var l=arguments,u=l[0];if(o&&l.length==1&&Mt(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 Qot=Kot,Jot=Qot(),bn=Jot,tst=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){Mt(i[a])&&a!=="data"&&(i[a]=i[a].filter(function(o){return!o[Zm]}))})}),e},est=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},En=function(t){var e=tst(t),n=e.children,r=n===void 0?[]:n,i=function(f){var d=f.children,h=f.type,p=f.data,v=est(f,["children","type","data"]);return e1(v,x3())},a=i(e),o=function(f,d,h){var p;return typeof f=="function"?f(d,h):(p={},p[f]=d,p)},s=function(f){var d;return(d=Lat.find(function(h){return h.key===f}))===null||d===void 0?void 0:d.callback},c=function(f,d,h){var p=s(d);p?p(f,d,h):f[d]=X({},f[d],h)},l=function(f){Object.keys(f).forEach(function(d){var h=Qm.find(function(g){return g.key===d});if(h){var p=h.type,v=h.extend_keys;p?r.push(u(X({},rp(f,v),{type:p},f[d]))):Mt(f[d])&&f[d].forEach(function(g){r.push(u(g))})}})},u=function(f,d){return l(f),Object.keys(Cu).forEach(function(h){var p=Cu[h];Object.keys(p).forEach(function(v){if(f[v]){var g=o(p[v],f[v],f);c(f,h,g)}Wt(d)&&d(p,h,v)})}),f};return r.forEach(function(f){var d=X({},a,f);u(X(f,d))}),l(e),O3(e),t},a1=function(){return a1=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},a1.apply(this,arguments)};function nst(t){var e=t.options,n=e.stack,r=e.tooltip,i=e.xField;if(!n)return t;var a=Qm.map(function(s){return s.type}).filter(function(s){return!!s}),o=!1;return a.forEach(function(s){e[s]&&(o=!0,$e(e,[s,"stack"],a1({y1:"y"},typeof n=="object"?n:{})))}),o&&!Um(r)&&!r&&$e(e,"tooltip",{title:i,items:[{channel:"y"}]}),t}function pr(t){return bn(nst)(t)}function rst(t){return bn(pr,En)(t)}var ist=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)}}(),ast=function(t){ist(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 rst},e}(yn),Lu=function(){return Lu=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},Lu.apply(this,arguments)};function C3(t){var e=function(n){var r=n.options;Mr(r,"children.length")>1&&$e(r,"children",[{type:"interval"}]);var i=r.scale,a=r.markBackground,o=r.data,s=r.children,c=Mr(i,"y.domain",[]);if(a&&c.length&&Mt(o)){var l="domainMax",u=o.map(function(f){var d;return Lu(Lu({},f),(d={},d[l]=c[c.length-1],d))});s.unshift(Lu({type:"interval",data:u,yField:l,tooltip:!1,legend:!1,style:{fill:"#eee"},label:!1},a))}return n};return bn(e,pr,En)(t)}var ost=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)}}(),sst=function(t){ost(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}}}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return C3},e}(yn),cst=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)}}(),lst=function(t){cst(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 C3},e}(yn);function ust(t){var e=function(n){var r=n.options,i=r.annotations,a=i===void 0?[]:i,o=r.children,s=o===void 0?[]:o,c=!1;return s.forEach(function(l,u){var f="child".concat(u,"Scale");$e(l,"scale.y.key",f);var d=l.annotations,h=d===void 0?[]:d;h.length>0&&($e(l,"scale.y.independent",!1),h.forEach(function(p){$e(p,"scale.y.key",f)})),!c&&a.length>0&&Mr(l,"scale.y.independent")===void 0&&(c=!0,$e(l,"scale.y.independent",!1),a.forEach(function(p){$e(p,"scale.y.key",f)}))}),n};return bn(e,pr,En)(t)}var fst=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)}}(),k3=function(t){fst(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 ust},e}(yn);function dst(t){var e=function(a){var o=a.options,s=o.xField,c=o.colorField;return c||$e(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?$e(o,"transform",[]):$e(o,"transform",[{type:"symmetryY"}])),!f&&u&&$e(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(f3(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&&($e(o,"type","spaceFlex"),$e(o,"ratio",[1,1]),$e(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||$e(o,"tooltip",{title:!1,items:[function(u){return{name:u[c],value:u[l]}}]}),a};return bn(e,n,r,i,pr,En)(t)}var hst=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)}}(),pst=function(t){hst(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 dst},e}(yn);function vst(t){return bn(pr,En)(t)}var gst=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)}}(),yst=function(t){gst(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 vst},e}(yn);function mst(t){return bn(ip,En)(t)}var bst=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)}}(),xst=function(t){bst(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 mst},e}(yn);function _st(t){return bn(pr,En)(t)}var Ost=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)}}(),wst=function(t){Ost(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 _st},e}(yn);function Sst(t){var e=function(n){return $e(n,"options.coordinate",{type:Mr(n,"options.coordinateType","polar")}),n};return bn(e,ip,En)(t)}var Mst=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)}}(),Est=function(t){Mst(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 Sst},e}(yn);function Ast(t,e){var n=-1,r=Do(t)?Array(t.length):[];return u3(t,function(i,a,o){r[++n]=e(i,a,o)}),r}var Tst=Ast;function Pst(t,e){var n=Mt(t)?Zu:Tst;return n(t,$m(e,3))}var jc=Pst,$a=function(){return $a=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},$a.apply(this,arguments)},Cst="__stock-range__",kst="trend",Rst="up",Lst="down";function Nst(t){var e=function(r){var i=r.options,a=i.data,o=i.yField;return r.options.data=jc(a,function(s){var c=s&&$a({},s);if(Array.isArray(o)&&c){var l=o[0],u=o[1],f=o[2],d=o[3];c[kst]=c[l]<=c[u]?Rst:Lst,c[Cst]=[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];return r.options.children=jc(r.options.children,function(h,p){var v=p===0;return $a($a({},h),{tooltip:{title:function(g){return g[a]instanceof Date?g[a].toLocaleString():g[a]},items:[{field:f},{field:d},{field:l},{field:u}]},encode:$a($a({},h.encode||{}),{y:v?[f,d]:[l,u],color:function(g){return Math.sign(g[u]-g[l])}}),style:$a($a({},h.style||{}),{lineWidth:v?1:10})})}),delete i.yField,r.options.legend={color:!1},s&&$e(r,"options.scale.color.range[0]",s),c&&$e(r,"options.scale.color.range[2]",c),r};return bn(e,n,En)(t)}var Ist=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)}}(),jst=["#26a69a","#999999","#ef5350"],Dst=function(t){Ist(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:jst},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 Nst},e}(yn);function Bst(t){return bn(pr,En)(t)}var Fst=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)}}(),zst=function(t){Fst(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 Bst},e}(yn);function Gst(t){return bn(pr,En)(t)}var Wst=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)}}(),Hst=function(t){Wst(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 Gst},e}(yn);function Yst(t){return bn(pr,En)(t)}var $st=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)}}(),Vst=function(t){$st(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 Yst},e}(yn),o1=function(){return o1=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},o1.apply(this,arguments)};function Xst(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,o1({},s)),n};return bn(e,pr,En)(t)}var Ust=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)}}(),qst=function(t){Ust(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 Xst},e}(yn),s1=function(){return s1=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},s1.apply(this,arguments)};function Zst(t){var e=function(r){var i=r.options,a=i.radius,o=a===void 0?.8:a;return $e(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,s1({},c)),r};return bn(e,n,pr,En)(t)}var Kst=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)}}(),Qst=function(t){Kst(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 Zst},e}(yn);function Jst(t){return bn(ip,En)(t)}var tct=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)}}(),ect=function(t){tct(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 Jst},e}(yn),c1="__start__",Dc="__end__",l1="__waterfall_value__",u1=function(){return u1=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},u1.apply(this,arguments)},nct=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 rct(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;if(u===0||l.isTotal)l[c1]=0,l[Dc]=l[s],l[l1]=l[s];else{var d=(f=c[Dc])!==null&&f!==void 0?f:c[s];l[c1]=d,l[Dc]=d+l[s],l[l1]=c[Dc]}return l},[]),Object.assign(i,{yField:[c1,Dc]})),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=nct([],o,!0);return u.reduce(function(f,d,h){return h>0&&(d.x1=f[s],d.x2=d[s],d.y1=f[Dc]),d},[]),u.shift(),c.push({type:"link",xField:["x1","x2"],yField:"y1",zIndex:-1,data:u,style:u1({stroke:"#697474"},l),label:!1,tooltip:!1}),r};return bn(e,n,pr,En)(t)}var ict=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)}}(),act=function(t){ict(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:l1,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 rct},e}(yn),oct="[object Number]";function sct(t){return typeof t=="number"||Oi(t)&&ot(t)==oct}var Bc=sct;function cct(t,e){return b3(m3(t,e,Ym),t+"")}var lct=cct;function uct(t,e,n){if(!Ot(n))return!1;var r=typeof e;return(r=="number"?Do(n)&&Yu(e,n.length):r=="string"&&e in n)?Pe(n[e],t):!1}var fct=uct;function dct(t){return lct(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&&fct(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 hct=dct,pct=Object.prototype,vct=pct.hasOwnProperty,gct=hct(function(t,e){if($u(e)||Do(e)){Cs(e,Bo(e),t);return}for(var n in e)vct.call(e,n)&&Uu(t,n,e[n])}),R3=gct,yct=/\s/;function mct(t){for(var e=t.length;e--&&yct.test(t.charAt(e)););return e}var bct=mct,xct=/^\s+/;function _ct(t){return t&&t.slice(0,bct(t)+1).replace(xct,"")}var Oct=_ct,L3=0/0,wct=/^[-+]0x[0-9a-f]+$/i,Sct=/^0b[01]+$/i,Mct=/^0o[0-7]+$/i,Ect=parseInt;function Act(t){if(typeof t=="number")return t;if(Yc(t))return L3;if(Ot(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Ot(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=Oct(t);var n=Sct.test(t);return n||Mct.test(t)?Ect(t.slice(2),n?2:8):wct.test(t)?L3:+t}var N3=Act,I3=1/0,Tct=17976931348623157e292;function Pct(t){if(!t)return t===0?t:0;if(t=N3(t),t===I3||t===-I3){var e=t<0?-1:1;return e*Tct}return t===t?t:0}var Cct=Pct;function kct(t){var e=Cct(t),n=e%1;return e===e?n?e-n:e:0}var j3=kct,Rct=Ct.isFinite,Lct=Math.min;function Nct(t){var e=Math[t];return function(n,r){if(n=N3(n),r=r==null?0:Lct(j3(r),292),r&&Rct(n)){var i=(zp(n)+"e").split("e"),a=e(i[0]+"e"+(+i[1]+r));return i=(zp(a)+"e").split("e"),+(i[0]+"e"+(+i[1]-r))}return e(n)}}var Ict=Nct,jct=Ict("ceil"),Dct=jct,Bct=0/0;function Fct(t){return typeof t=="number"?t:Yc(t)?Bct:+t}var D3=Fct;function zct(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=Fp(n),r=Fp(r)):(n=D3(n),r=D3(r)),i=t(n,r)}return i}}var Gct=zct,Wct=Gct(function(t,e){return t/e},1),Hct=Wct;function Yct(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=Mr(s,"[0].transform[0]",{});return Bc(o)?(R3(u,{thresholds:Dct(Hct(i.length,o)),y:l}),n):(Bc(a)&&R3(u,{thresholds:a,y:l}),n)};return bn(e,pr,En)(t)}var $ct=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)}}(),Vct=function(t){$ct(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 Yct},e}(yn);function Xct(t){var e=function(r){var i=r.options,a=i.tooltip,o=i.colorField,s=i.sizeField;return a.field||(a.field=o||s),r},n=function(r){var i=r.options,a=i.mark,o=i.children;return a&&(o[0].type=a),r};return bn(e,n,pr,En)(t)}var Uct=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)}}(),qct=function(t){Uct(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 Xct},e}(yn);function Zct(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 bn(e,pr,En)(t)}var Kct=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)}}(),Qct=function(t){Kct(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 Zct},e}(yn);function Jct(t){return bn(pr,En)(t)}var tlt=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)}}(),elt=function(t){tlt(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 Jct},e}(yn);function nlt(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 rlt(t){return t==null}var ilt=rlt,alt="[object String]";function olt(t){return typeof t=="string"||!Mt(t)&&Oi(t)&&ot(t)==alt}var B3=olt;function slt(t,e){return Zu(e,function(n){return t[n]})}var clt=slt;function llt(t){return t==null?[]:clt(t,Bo(t))}var ult=llt,flt=Math.max;function dlt(t,e,n,r){t=Do(t)?t:ult(t),n=n&&!r?j3(n):0;var i=t.length;return n<0&&(n=flt(i+n,0)),B3(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&c3(t,e,n)>-1}var hlt=dlt,na=function(){return na=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},na.apply(this,arguments)},lp=["#f0efff","#5B8FF9","#3D76DD"];function f1(t,e,n,r){r===void 0&&(r=!0);var i=0,a=!1,o=jc(t,function(s){var c,l,u=Mr(s,[e]);if(ilt(u))return[];if(B3(u)){var f=Number(u);return isNaN(f)?[]:(c={},c[n]=s[n],c[e]=f,c)}return Mt(u)?(a=!0,i=Math.max(i,u.length),jc(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 na({index:0},s)}),i]:[o,i]}function d1(t,e){return new Array(t).fill("").map(function(n,r){return Mt(e)?e[r%e.length]:e})}function plt(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=f1(g,c,p),m=y[0],b=y[1],_=f1(g,u,p,!1),O=_[0],w=_[1],M=f1(g,d,p,!1),E=M[0],A=M[1],P=Mr(o,[c],lp[0]),C=Mr(o,[u],lp[1]),j=Mr(o,[d],lp[2]),N=[d1(b,P),d1(w,C),d1(A,j)].flat();return i.options.children=jc(i.options.children,function(k,R){var D=[m,O,E][R],B=[c,u,d][R];return na(na({},k),{data:D,encode:na(na({},k.encode||{}),{x:p,y:B,color:function(F){var z=F.index,Y=Bc(z)?"".concat(B,"_").concat(z):B;return v?Mr(v,[B,z],Y):Y}}),style:na(na({},k.style||{}),{zIndex:function(F){return-F[B]}}),labels:R!==0?jc(k.labels,function(F){return na(na({},F),{text:B})}):void 0})}),i.options.scale.color.range=N,i.options.legend.color.itemMarker=function(k){return v&&hlt(v==null?void 0:v[d],k)||(k==null?void 0:k.replace(/\_\d$/,""))===d?"line":"square"},i},n=function(i){var a=i.options.layout,o=a===void 0?"horizontal":a;return o!=="horizontal"&&$e(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 X(d[p],h)}),i};return bn(e,n,r,nlt,En)(t)}var vlt=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)}}(),glt=function(t){vlt(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:lp}},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 plt},e}(yn);function ylt(t){var e=function(n){var r=n.options.data;return n.options.data={value:r},n};return bn(e,pr,En)(t)}var mlt=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)}}(),blt=function(t){mlt(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 ylt},e}(yn);function xlt(t){var e=function(n){var r=n.options.percent;return Bc(r)&&$e(n,"options.data",r),n};return bn(e,pr,En)(t)}var _lt=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)}}(),Olt=function(t){_lt(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 xlt},e}(yn);function wlt(t){return bn(pr,En)(t)}var Slt=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)}}(),Mlt=function(t){Slt(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 wlt},e}(yn);function Elt(t){var e=function(n){var r=n.options,i=r.data;return i&&$e(r,"data",{value:i}),n};return bn(e,pr,En)(t)}var Alt=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)}}(),Tlt=function(t){Alt(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 Elt},e}(yn),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)};function Plt(t){var e=function(i){var a=i.options,o=a.startAngle,s=a.maxAngle,c=a.coordinate,l=a.radius,u=a.innerRadius,f=Bc(o)?o/(2*Math.PI)*360:-90,d=Bc(s)?(Number(s)+f)/180*Math.PI:Math.PI;return $e(i,["options","coordinate"],Po(Po(Po({},c),rp(a.coordinate,t1)),{endAngle:d,outerRadius:l,innerRadius: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;return o||$e(a,"tooltip",{title:!1,items:[function(l){return{name:l[s],value:l[c]}}]}),i},r=function(i){var a=i.options,o=a.markBackground,s=a.children,c=a.scale,l=a.coordinate,u=a.xField,f=Mr(c,"y.domain",[]);return o&&s.unshift(Po({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:Po(Po({},l),{startAngle:-Math.PI/2,endAngle:1.5*Math.PI}),animate:!1},o)),i};return bn(e,n,r,pr,En)(t)}var Clt=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){Clt(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 Plt},e}(yn);function Rlt(t){return bn(En)(t)}var 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)}}(),Nlt=function(t){Llt(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 Rlt},e}(yn),up=function(){return up=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},up.apply(this,arguments)};function Ilt(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 up(up({},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 $e(r,"children",c),r.violinType==="polar"&&$e(r,"coordinate",{type:"polar"}),$e(r,"violinType",void 0),n};return bn(e,pr,En)(t)}var jlt=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)}}(),Dlt=function(t){jlt(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 Ilt},e}(yn),Nu=function(){return Nu=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},Nu.apply(this,arguments)},Blt=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 Flt(t){var e=function(a){var o=a.options,s=o.yField,c=o.children;return c.forEach(function(l,u){$e(l,"yField",s[u])}),a},n=function(a){var o=a.options,s=o.yField,c=o.children,l=o.data;if(S3(l))return a;var u=Mt(Mr(l,[0]))?l:[l,l];return c.forEach(function(f,d){$e(f,"data",Blt([],u[d].map(function(h){return Nu({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||$e(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?h3:u,d=o.paddingLeft,h=d===void 0?h3:d,p=o.axis;$e(o,"axisText",Nu(Nu({},(p==null?void 0:p.x)||{}),{layout:c}));var v=s[0],g=s[1];if(c==="vertical")$e(o,"direction","col"),$e(o,"paddingLeft",h),$e(o,"coordinate.transform",l.filter(function(O){return O.type!=="transpose"})),$e(v,"paddingBottom",d3),$e(g,"paddingTop",d3),$e(g,"axis",{x:{position:"top"}}),$e(g,"scale",{y:{range:[0,1]}});else{$e(o,"paddingBottom",f),$e(v,"scale",{y:{range:[0,1]}});var y=v.paddingRight,m=y===void 0?Xm:y,b=g.paddingLeft,_=b===void 0?Xm:b;$e(v,"paddingRight",m),$e(v,"axis",{x:{position:"right"}}),$e(g,"paddingLeft",_)}return a};return bn(e,n,r,i,pr,En)(t)}var 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)}}(),Glt=function(t){zlt(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 Flt},e}(yn),Os;(function(t){t.color="key",t.d="path"})(Os||(Os={}));function Wlt(t){var e=function(n){var r=n.options,i=r.data,a=r.setsField,o=r.sizeField;return Mt(i)&&($e(r,"data",{type:"inline",value:i,transform:[{type:"venn",sets:a,size:o,as:[Os.color,Os.d]}]}),$e(r,"colorField",a),$e(r,["children","0","encode","d"],Os.d)),$e(n,"options",e1(r,["sizeField","setsField"])),n};return bn(e,En)(t)}var Hlt=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)}}(),Ylt=function(t){Hlt(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:Os.color,d:Os.d}}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return Wlt},e}(yn);function $lt(t){var e=function(n){return n};return bn(e,ip,En)(t)}var Vlt=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)}}(),Xlt=function(t){Vlt(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 $lt},e}(yn),Ult={Base:kot,Line:yst,Column:lst,Pie:xst,Area:ast,Bar:sst,DualAxes:k3,Funnel:pst,Scatter:wst,Radar:Est,Rose:ect,Stock:Dst,TinyLine:zst,TinyArea:Hst,TinyColumn:Vst,TinyProgress:qst,TinyRing:Qst,Waterfall:act,Histogram:Vct,Heatmap:qct,Box:Qct,Sankey:elt,Bullet:glt,Gauge:blt,Liquid:Olt,WordCloud:Mlt,Treemap:Tlt,RadialBar:klt,CirclePacking:Nlt,Violin:Dlt,BidirectionalBar:Glt,Venn:Ylt,Mix:k3,Sunburst:Xlt},F3=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},qlt=(0,Jt.forwardRef)(function(t,e){var n=t.chartType,r=n===void 0?"Base":n,i=F3(t,["chartType"]),a=i.containerStyle,o=a===void 0?{height:"inherit"}:a,s=i.className,c=i.loading,l=i.loadingTemplate,u=i.errorTemplate,f=F3(i,["containerStyle","className","loading","loadingTemplate","errorTemplate"]),d=jI(Ult[r],f),h=d.chart,p=d.container;return(0,Jt.useImperativeHandle)(e,function(){return h.current}),Jt.createElement(ln,{errorTemplate:u},c&&Jt.createElement(Ln,{loadingTemplate:l}),Jt.createElement("div",{className:s,style:o,ref:p}))})},16290:function(Ve,Ge){(function(gt,_t){_t(Ge)})(this,function(gt){"use strict";function _t(L){var I=typeof Symbol=="function"&&Symbol.iterator,G=I&&L[I],V=0;if(G)return G.call(L);if(L&&typeof L.length=="number")return{next:function(){return{value:(L=L&&V>=L.length?void 0:L)&&L[V++],done:!L}}};throw new TypeError(I?"Object is not iterable.":"Symbol.iterator is not defined.")}function Nt(L,I){var G=typeof Symbol=="function"&&L[Symbol.iterator];if(!G)return L;var V,at,lt=G.call(L),Q=[];try{for(;(I===void 0||0<I--)&&!(V=lt.next()).done;)Q.push(V.value)}catch(J){at={error:J}}finally{try{V&&!V.done&&(G=lt.return)&&G.call(lt)}finally{if(at)throw at.error}}return Q}function ye(L,I,G){if(G||arguments.length===2)for(var V,at=0,lt=I.length;at<lt;at++)!V&&at in I||((V=V||Array.prototype.slice.call(I,0,at))[at]=I[at]);return L.concat(V||Array.prototype.slice.call(I))}function Be(L){return he(L,"Function")}var Jt={}.toString,he=function(L,I){return Jt.call(L)==="[object "+I+"]"},ie=function(L){return Array.isArray?Array.isArray(L):he(L,"Array")},Ht=function(L){if(typeof(I=L)!="object"||I===null||!he(L,"Object"))return!1;var I;if(Object.getPrototypeOf(L)===null)return!0;for(var G=L;Object.getPrototypeOf(G)!==null;)G=Object.getPrototypeOf(G);return Object.getPrototypeOf(L)===G},yt=function(L){return he(L,"Number")},pe=Object.values?function(L){return Object.values(L)}:function(L){var I,G=[],V=L,at=function(pt,bt){Be(L)&&bt==="prototype"||G.push(pt)};if(V){if(ie(V))for(var lt=0,Q=V.length;lt<Q&&at(V[lt],lt)!==!1;lt++);else if(I=typeof V,V!==null&&I=="object"||I=="function"){for(var J in V)if(V.hasOwnProperty(J)&&at(V[J],J)===!1)break}}return G},Zt=5;function $t(L){for(var I=[],G=1;G<arguments.length;G++)I[G-1]=arguments[G];for(var V=0;V<I.length;V+=1)(function at(lt,Q,J,pt){for(var bt in J=J||0,pt=pt||Zt,Q){var ne;Q.hasOwnProperty(bt)&&((ne=Q[bt])!==null&&Ht(ne)?(Ht(lt[bt])||(lt[bt]={}),J<pt?at(lt[bt],ne,J+1,pt):lt[bt]=Q[bt]):ie(ne)?(lt[bt]=[],lt[bt]=lt[bt].concat(ne)):ne!==void 0&&(lt[bt]=ne))}})(L,I[V]);return L}function te(L){return L}(function(L,I){var G;if(Be(L))return(G=function(){for(var V=[],at=0;at<arguments.length;at++)V[at]=arguments[at];var lt,Q=I?I.apply(this,V):V[0],J=G.cache;return J.has(Q)?J.get(Q):(lt=L.apply(this,V),J.set(Q,lt),lt)}).cache=new Map;throw new TypeError("Expected a function")})(function(L,Q){var G=(Q=Q===void 0?{}:Q).fontSize,V=Q.fontFamily,at=Q.fontWeight,lt=Q.fontStyle,Q=Q.fontVariant;return(Bt=Bt||document.createElement("canvas").getContext("2d")).font=[lt,Q,at,G+"px",V].join(" "),Bt.measureText(he(L,"String")?L:"").width},function(L,I){return function(){for(var G=0,V=0,at=arguments.length;V<at;V++)G+=arguments[V].length;for(var lt=Array(G),Q=0,V=0;V<at;V++)for(var J=arguments[V],pt=0,bt=J.length;pt<bt;pt++,Q++)lt[Q]=J[pt];return lt}([L],pe(I=I===void 0?{}:I)).join("")});var Bt,It=typeof Float32Array!="undefined"?Float32Array:Array;function kt(){var L=new It(9);return It!=Float32Array&&(L[1]=0,L[2]=0,L[3]=0,L[5]=0,L[6]=0,L[7]=0),L[0]=1,L[4]=1,L[8]=1,L}Math.hypot||(Math.hypot=function(){for(var L=0,I=arguments.length;I--;)L+=arguments[I]*arguments[I];return Math.sqrt(L)});var Ft=function(L,ae,ge){var V=ae[0],at=ae[1],lt=ae[2],Q=ae[3],J=ae[4],pt=ae[5],bt=ae[6],ne=ae[7],ae=ae[8],be=ge[0],re=ge[1],de=ge[2],ve=ge[3],Xt=ge[4],Ce=ge[5],xe=ge[6],ke=ge[7],ge=ge[8];return L[0]=be*V+re*Q+de*bt,L[1]=be*at+re*J+de*ne,L[2]=be*lt+re*pt+de*ae,L[3]=ve*V+Xt*Q+Ce*bt,L[4]=ve*at+Xt*J+Ce*ne,L[5]=ve*lt+Xt*pt+Ce*ae,L[6]=xe*V+ke*Q+ge*bt,L[7]=xe*at+ke*J+ge*ne,L[8]=xe*lt+ke*pt+ge*ae,L};function Se(){var L=new It(16);return It!=Float32Array&&(L[1]=0,L[2]=0,L[3]=0,L[4]=0,L[6]=0,L[7]=0,L[8]=0,L[9]=0,L[11]=0,L[12]=0,L[13]=0,L[14]=0),L[0]=1,L[5]=1,L[10]=1,L[15]=1,L}var Re=function(L,xe,G){var V=xe[0],at=xe[1],lt=xe[2],Q=xe[3],J=xe[4],pt=xe[5],bt=xe[6],ne=xe[7],ae=xe[8],be=xe[9],re=xe[10],de=xe[11],ve=xe[12],Xt=xe[13],Ce=xe[14],xe=xe[15],ke=G[0],ge=G[1],Te=G[2],tn=G[3];return L[0]=ke*V+ge*J+Te*ae+tn*ve,L[1]=ke*at+ge*pt+Te*be+tn*Xt,L[2]=ke*lt+ge*bt+Te*re+tn*Ce,L[3]=ke*Q+ge*ne+Te*de+tn*xe,ke=G[4],ge=G[5],Te=G[6],tn=G[7],L[4]=ke*V+ge*J+Te*ae+tn*ve,L[5]=ke*at+ge*pt+Te*be+tn*Xt,L[6]=ke*lt+ge*bt+Te*re+tn*Ce,L[7]=ke*Q+ge*ne+Te*de+tn*xe,ke=G[8],ge=G[9],Te=G[10],tn=G[11],L[8]=ke*V+ge*J+Te*ae+tn*ve,L[9]=ke*at+ge*pt+Te*be+tn*Xt,L[10]=ke*lt+ge*bt+Te*re+tn*Ce,L[11]=ke*Q+ge*ne+Te*de+tn*xe,ke=G[12],ge=G[13],Te=G[14],tn=G[15],L[12]=ke*V+ge*J+Te*ae+tn*ve,L[13]=ke*at+ge*pt+Te*be+tn*Xt,L[14]=ke*lt+ge*bt+Te*re+tn*Ce,L[15]=ke*Q+ge*ne+Te*de+tn*xe,L};function Ke(L){for(var I=[],G=1;G<arguments.length;G++)I[G-1]=arguments[G];return L?I.reduce(function(V,at){return function(lt){return at(V(lt))}},L):te}function We(L){return L instanceof Float32Array||L instanceof Array}function Ze(L,I,G){for(;L<I;)L+=2*Math.PI;for(;G<L;)L-=2*Math.PI;return L}Ee=new It(3),It!=Float32Array&&(Ee[0]=0,Ee[1]=0,Ee[2]=0),Ee=new It(4),It!=Float32Array&&(Ee[0]=0,Ee[1]=0,Ee[2]=0,Ee[3]=0);function cn(Q,I,G,V,at){var lt=(Q=Nt(Q,2))[0],Q=Q[1],J=kt();return lt=[lt,Q],(Q=J)[0]=1,Q[1]=0,Q[2]=0,Q[3]=0,Q[4]=1,Q[5]=0,Q[6]=lt[0],Q[7]=lt[1],Q[8]=1,Q}function He(L,...I){return I.reduce((G,V)=>at=>G(V(at)),L)}function De(L,I){return I-L?G=>(G-L)/(I-L):G=>.5}const an=Math.sqrt(50),_e=Math.sqrt(10),Me=Math.sqrt(2);function pn(L,I,G){return I=(I-L)/Math.max(0,G),L=Math.floor(Math.log(I)/Math.LN10),G=I/wr(10,L),0<=L?(G>=an?10:G>=_e?5:G>=Me?2:1)*wr(10,L):-wr(10,-L)/(G>=an?10:G>=_e?5:G>=Me?2:1)}const Ln=(L,I,G=5)=>{L=[L,I];let V=0,at=L.length-1,lt=L[V],Q=L[at],J;return Q<lt&&([lt,Q]=[Q,lt],[V,at]=[at,V]),0<(J=pn(lt,Q,G))?(lt=Math.floor(lt/J)*J,Q=Math.ceil(Q/J)*J,J=pn(lt,Q,G)):J<0&&(lt=Math.ceil(lt*J)/J,Q=Math.floor(Q*J)/J,J=pn(lt,Q,G)),0<J?(L[V]=Math.floor(lt/J)*J,L[at]=Math.ceil(Q/J)*J):J<0&&(L[V]=Math.ceil(lt*J)/J,L[at]=Math.floor(Q*J)/J),L};function qn(L){return L!=null&&!Number.isNaN(L)}function ln(L,I){return G=>{G.prototype.rescale=function(){this.initRange(),this.nice();var[V]=this.chooseTransforms();this.composeOutput(V,this.chooseClamp(V))},G.prototype.initRange=function(){var V=this.options.interpolator;this.options.range=L(V)},G.prototype.composeOutput=function(V,at){var lt,{domain:J,interpolator:Q,round:pt}=this.getOptions(),J=I(J.map(V)),pt=pt?(lt=Q,bt=>(bt=lt(bt),yt(bt)?Math.round(bt):bt)):Q;this.output=He(pt,J,at,V)},G.prototype.invert=void 0}}var fn,Ee={exports:{}},Xe={exports:{}},mt=function(L){return!(!L||typeof L=="string")&&(L instanceof Array||Array.isArray(L)||0<=L.length&&(L.splice instanceof Function||Object.getOwnPropertyDescriptor(L,L.length-1)&&L.constructor.name!=="String"))},U=Array.prototype.concat,X=Array.prototype.slice,Z=Xe.exports=function(L){for(var I=[],G=0,V=L.length;G<V;G++){var at=L[G];mt(at)?I=U.call(I,X.call(at)):I.push(at)}return I},it=(Z.wrap=function(L){return function(){return L(Z(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]}),ct=Xe.exports,zt=Object.hasOwnProperty,Ct=Object.create(null);for(fn in it)zt.call(it,fn)&&(Ct[it[fn]]=fn);var ee=Ee.exports={to:{},get:{}};function $(L,I,G){return Math.min(Math.max(I,L),G)}function ut(L){return L=Math.round(L).toString(16).toUpperCase(),L.length<2?"0"+L:L}ee.get=function(L){var I,G;switch(L.substring(0,3).toLowerCase()){case"hsl":I=ee.get.hsl(L),G="hsl";break;case"hwb":I=ee.get.hwb(L),G="hwb";break;default:I=ee.get.rgb(L),G="rgb"}return I?{model:G,value:I}:null},ee.get.rgb=function(L){if(!L)return null;var I,G,V,at=[0,0,0,1];if(I=L.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(V=I[2],I=I[1],G=0;G<3;G++){var lt=2*G;at[G]=parseInt(I.slice(lt,2+lt),16)}V&&(at[3]=parseInt(V,16)/255)}else if(I=L.match(/^#([a-f0-9]{3,4})$/i)){for(V=(I=I[1])[3],G=0;G<3;G++)at[G]=parseInt(I[G]+I[G],16);V&&(at[3]=parseInt(V+V,16)/255)}else{if(I=L.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/))for(G=0;G<3;G++)at[G]=parseInt(I[G+1],0);else{if(!(I=L.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)))return(I=L.match(/^(\w+)$/))?I[1]==="transparent"?[0,0,0,0]:zt.call(it,I[1])?((at=it[I[1]])[3]=1,at):null:null;for(G=0;G<3;G++)at[G]=Math.round(2.55*parseFloat(I[G+1]))}I[4]&&(I[5]?at[3]=.01*parseFloat(I[4]):at[3]=parseFloat(I[4]))}for(G=0;G<3;G++)at[G]=$(at[G],0,255);return at[3]=$(at[3],0,1),at},ee.get.hsl=function(L){var I;return(L=L&&L.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(L[4]),[(parseFloat(L[1])%360+360)%360,$(parseFloat(L[2]),0,100),$(parseFloat(L[3]),0,100),$(isNaN(I)?1:I,0,1)]):null},ee.get.hwb=function(L){var I;return(L=L&&L.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(L[4]),[(parseFloat(L[1])%360+360)%360,$(parseFloat(L[2]),0,100),$(parseFloat(L[3]),0,100),$(isNaN(I)?1:I,0,1)]):null},ee.to.hex=function(){var L=ct(arguments);return"#"+ut(L[0])+ut(L[1])+ut(L[2])+(L[3]<1?ut(Math.round(255*L[3])):"")},ee.to.rgb=function(){var L=ct(arguments);return L.length<4||L[3]===1?"rgb("+Math.round(L[0])+", "+Math.round(L[1])+", "+Math.round(L[2])+")":"rgba("+Math.round(L[0])+", "+Math.round(L[1])+", "+Math.round(L[2])+", "+L[3]+")"},ee.to.rgb.percent=function(){var L=ct(arguments),I=Math.round(L[0]/255*100),G=Math.round(L[1]/255*100),V=Math.round(L[2]/255*100);return L.length<4||L[3]===1?"rgb("+I+"%, "+G+"%, "+V+"%)":"rgba("+I+"%, "+G+"%, "+V+"%, "+L[3]+")"},ee.to.hsl=function(){var L=ct(arguments);return L.length<4||L[3]===1?"hsl("+L[0]+", "+L[1]+"%, "+L[2]+"%)":"hsla("+L[0]+", "+L[1]+"%, "+L[2]+"%, "+L[3]+")"},ee.to.hwb=function(){var L=ct(arguments),I="";return 4<=L.length&&L[3]!==1&&(I=", "+L[3]),"hwb("+L[0]+", "+L[1]+"%, "+L[2]+"%"+I+")"},ee.to.keyword=function(L){return Ct[L.slice(0,3)]};var vt=Ee.exports;function Ut(L,I,G){let V=G;return V<0&&(V+=1),1<V&&--V,V<1/6?L+6*(I-L)*V:V<.5?I:V<2/3?L+(I-L)*(2/3-V)*6:L}function et(at){var I,G,V,at=vt.get(at);return at?({model:at,value:I}=at,at==="rgb"?I:at==="hsl"?(I=(at=I)[0]/360,G=at[1]/100,V=at[2]/100,at=at[3],G==0?[255*V,255*V,255*V,at]:[255*Ut(G=2*V-(V=V<.5?V*(1+G):V+G-V*G),V,I+1/3),255*Ut(G,V,I),255*Ut(G,V,I-1/3),at]):null):null}const ft=(L,I)=>G=>L*(1-G)+I*G,wt=(L,I)=>{if(typeof L=="number"&&typeof I=="number")return ft(L,I);if(typeof L!="string"||typeof I!="string")return()=>L;{var G=L,V=I;const at=et(G),lt=et(V);return at===null||lt===null?at?()=>G:()=>V:Q=>{var J=new Array(4);for(let de=0;de<4;de+=1){var pt=at[de],bt=lt[de];J[de]=pt*(1-Q)+bt*Q}var[ne,ae,be,re]=J;return`rgba(${Math.round(ne)}, ${Math.round(ae)}, ${Math.round(be)}, ${re})`}}},H=(L,I)=>{const G=ft(L,I);return V=>Math.round(G(V))};function tt({map:L,initKey:I},G){return I=I(G),L.has(I)?L.get(I):G}function ht(L){return typeof L=="object"?L.valueOf():L}class x extends Map{constructor(I){if(super(),this.map=new Map,this.initKey=ht,I!==null)for(var[G,V]of I)this.set(G,V)}get(I){return super.get(tt({map:this.map,initKey:this.initKey},I))}has(I){return super.has(tt({map:this.map,initKey:this.initKey},I))}set(I,G){return super.set(([{map:I,initKey:V},at]=[{map:this.map,initKey:this.initKey},I],V=V(at),I.has(V)?I.get(V):(I.set(V,at),at)),G);var V,at}delete(I){return super.delete(([{map:I,initKey:G},V]=[{map:this.map,initKey:this.initKey},I],G=G(V),I.has(G)&&(V=I.get(G),I.delete(G)),V));var G,V}}class T{constructor(I){this.options=$t({},this.getDefaultOptions()),this.update(I)}getOptions(){return this.options}update(I={}){this.options=$t({},this.options,I),this.rescale(I)}rescale(I){}}const W=Symbol("defaultUnknown");function K(L,I,G){for(let V=0;V<I.length;V+=1)L.has(I[V])||L.set(G(I[V]),V)}function nt(I){var{value:I,from:G,to:V,mapper:at,notFoundReturn:lt}=I;let Q=at.get(I);if(Q===void 0){if(lt!==W)return lt;Q=G.push(I)-1,at.set(I,Q)}return V[Q%V.length]}function ot(L){return L instanceof Date?I=>""+I:typeof L=="object"?I=>JSON.stringify(I):I=>I}class xt extends T{getDefaultOptions(){return{domain:[],range:[],unknown:W}}constructor(I){super(I)}map(I){return this.domainIndexMap.size===0&&K(this.domainIndexMap,this.getDomain(),this.domainKey),nt({value:this.domainKey(I),mapper:this.domainIndexMap,from:this.getDomain(),to:this.getRange(),notFoundReturn:this.options.unknown})}invert(I){return this.rangeIndexMap.size===0&&K(this.rangeIndexMap,this.getRange(),this.rangeKey),nt({value:this.rangeKey(I),mapper:this.rangeIndexMap,from:this.getRange(),to:this.getDomain(),notFoundReturn:this.options.unknown})}rescale(I){var[G]=this.options.domain,[V]=this.options.range;this.domainKey=ot(G),this.rangeKey=ot(V),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 xt(this.options)}getRange(){return this.options.range}getDomain(){var I,G;return this.sortedDomain||({domain:I,compare:G}=this.options,this.sortedDomain=G?[...I].sort(G):I),this.sortedDomain}}function Ot(Xt){const{domain:I,range:G,paddingOuter:V,paddingInner:at,flex:lt,round:Q,align:J}=Xt;var pt=I.length,re=0<(re=(Xt=pt)-(bt=lt).length)?[...bt,...new Array(re).fill(1)]:re<0?bt.slice(0,Xt):bt,[Xt,bt]=G,bt=bt-Xt,ve=bt/(2/pt*V+1-1/pt*at);const ne=ve*at/pt;ve-=pt*ne;const ae=function(ge){const Te=Math.min(...ge);return ge.map(tn=>tn/Te)}(re),be=ve/ae.reduce((ge,Te)=>ge+Te);var re=new x(I.map((ge,Te)=>(Te=ae[Te]*be,[ge,Q?Math.floor(Te):Te]))),de=new x(I.map((ge,Te)=>(Te=ae[Te]*be+ne,[ge,Q?Math.floor(Te):Te]))),ve=Array.from(de.values()).reduce((ge,Te)=>ge+Te),Xt=Xt+(bt-(ve-ve/pt*at))*J;let Ce=Q?Math.round(Xt):Xt;var xe=new Array(pt);for(let ge=0;ge<pt;ge+=1){xe[ge]=(ke=Ce,Math.round(1e12*ke)/1e12);var ke=I[ge];Ce+=de.get(ke)}return{valueBandWidth:re,valueStep:de,adjustedRange:xe}}class Et extends xt{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,paddingInner:0,paddingOuter:0,padding:0,unknown:W,flex:[]}}constructor(I){super(I)}clone(){return new Et(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:G}=this.options;return 0<I?I:G}getPaddingOuter(){var{padding:I,paddingOuter:G}=this.options;return 0<I?I:G}rescale(){super.rescale();var{align:V,domain:I,range:at,round:lt,flex:G}=this.options,{adjustedRange:V,valueBandWidth:at,valueStep:lt}=function(bt){var J=bt.domain;if((J=J.length)===0)return{valueBandWidth:void 0,valueStep:void 0,adjustedRange:[]};if(!((pt=bt.flex)==null||!pt.length))return Ot(bt);var{range:pt,paddingOuter:bt,paddingInner:ne,round:ae,align:be}=bt;let re,de,ve=pt[0];return pt=pt[1]-ve,re=pt/Math.max(1,2*bt+(J-ne)),ae&&(re=Math.floor(re)),ve+=(pt-re*(J-ne))*be,de=re*(1-ne),ae&&(ve=Math.round(ve),de=Math.round(de)),bt=new Array(J).fill(0).map((Xt,Ce)=>ve+Ce*re),{valueStep:re,valueBandWidth:de,adjustedRange:bt}}({align:V,range:at,round:lt,flex:G,paddingInner:this.getPaddingInner(),paddingOuter:this.getPaddingOuter(),domain:I});this.valueStep=lt,this.valueBandWidth=at,this.adjustedRange=V}}const Tt=(L,I,G)=>{let V,at,lt=L,Q=I;if(lt===Q&&0<G)return[lt];let J=pn(lt,Q,G);if(J===0||!Number.isFinite(J))return[];if(0<J){lt=Math.ceil(lt/J),Q=Math.floor(Q/J),at=new Array(V=Math.ceil(Q-lt+1));for(let pt=0;pt<V;pt+=1)at[pt]=(lt+pt)*J}else{J=-J,lt=Math.ceil(lt*J),Q=Math.floor(Q*J),at=new Array(V=Math.ceil(Q-lt+1));for(let pt=0;pt<V;pt+=1)at[pt]=(lt+pt)/J}return at},Gt=(V,lt,G)=>{var[V,at]=V,[lt,Q]=lt;let J,pt;return He(pt=V<at?(J=De(V,at),G(lt,Q)):(J=De(at,V),G(Q,lt)),J)},jt=(L,I,G)=>{const V=Math.min(L.length,I.length)-1,at=new Array(V),lt=new Array(V);var Q=L[0]>L[V],J=Q?[...L].reverse():L,pt=Q?[...I].reverse():I;for(let bt=0;bt<V;bt+=1)at[bt]=De(J[bt],J[bt+1]),lt[bt]=G(pt[bt],pt[bt+1]);return bt=>{var ne=function(be,re,de,ve,Xt){let Ce=de||0,xe=ve||be.length;for(var ke=Xt||(Te=>Te);Ce<xe;){var ge=Math.floor((Ce+xe)/2);ke(be[ge])>re?xe=ge:Ce=ge+1}return Ce}(L,bt,1,V)-1,ae=at[ne];return He(lt[ne],ae)(bt)}},Vt=(L,I,G,V)=>(2<Math.min(L.length,I.length)?jt:Gt)(L,I,V?H:G);class Wt extends T{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:ft,tickCount:5}}map(I){return qn(I)?this.output(I):this.options.unknown}invert(I){return qn(I)?this.input(I):this.options.unknown}nice(){var I,G,V,at;this.options.nice&&([I,G,V,...at]=this.getTickMethodOptions(),this.options.domain=this.chooseNice()(I,G,V,...at))}getTicks(){var I=this.options.tickMethod,[G,V,at,...lt]=this.getTickMethodOptions();return I(G,V,at,...lt)}getTickMethodOptions(){var{domain:I,tickCount:G}=this.options;return[I[0],I[I.length-1],G]}chooseNice(){return Ln}rescale(){this.nice();var[I,G]=this.chooseTransforms();this.composeOutput(I,this.chooseClamp(I)),this.composeInput(I,G,this.chooseClamp(G))}chooseClamp(V){var{clamp:G,range:at}=this.options,V=this.options.domain.map(V),at=Math.min(V.length,at.length);if(G){G=V[0],V=V[at-1];const lt=V<G?V:G,Q=V<G?G:V;return J=>Math.min(Math.max(lt,J),Q)}return te}composeOutput(I,G){var{domain:Q,range:V,round:at,interpolate:lt}=this.options,Q=Vt(Q.map(I),V,lt,at);this.output=He(Q,G,I)}composeInput(I,G,V){var{domain:at,range:lt}=this.options,lt=Vt(lt,at.map(I),ft);this.input=He(G,V,lt)}}class Qt extends Wt{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:wt,tickMethod:Tt,tickCount:5}}chooseTransforms(){return[te,te]}clone(){return new Qt(this.options)}}class se extends Et{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,padding:0,unknown:W,paddingInner:1,paddingOuter:0}}constructor(I){super(I)}getPaddingInner(){return 1}clone(){return new se(this.options)}update(I){super.update(I)}getPaddingOuter(){return this.options.padding}}function Mt(L,I){for(var G=[],V=0,at=L.length;V<at;V++)G.push(L[V].substr(0,I));return G}var Oe,Xe=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Ee=["January","February","March","April","May","June","July","August","September","October","November","December"],Pe=Mt(Ee,3);(function(L){for(var I=[],G=1;G<arguments.length;G++)I[G-1]=arguments[G];for(var V=0,at=I;V<at.length;V++){var lt,Q=at[V];for(lt in Q)L[lt]=Q[lt]}})({},{dayNamesShort:Mt(Xe,3),dayNames:Xe,monthNamesShort:Pe,monthNames:Ee,amPm:["am","pm"],DoFn:function(L){return L+["th","st","nd","rd"][3<L%10?0:(L-L%10!=10?1:0)*L%10]}});var Ne;let Le=Oe=class extends Qt{getDefaultOptions(){return{domain:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:te,tickMethod:Tt,tickCount:5}}constructor(L){super(L)}clone(){return new Oe(this.options)}};Le=Oe=function(L,I,G,V){var at,lt=arguments.length,Q=lt<3?I:V===null?V=Object.getOwnPropertyDescriptor(I,G):V;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Q=Reflect.decorate(L,I,G,V);else for(var J=L.length-1;0<=J;J--)(at=L[J])&&(Q=(lt<3?at(Q):3<lt?at(I,G,Q):at(I,G))||Q);return 3<lt&&Q&&Object.defineProperty(I,G,Q),Q}([ln(function(L){return[L(0),L(1)]},I=>{var[I,G]=I;return He(ft(0,1),De(I,G))})],Le);let jn=Ne=class extends Qt{getDefaultOptions(){return{domain:[0,.5,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:te,tickMethod:Tt,tickCount:5}}constructor(L){super(L)}clone(){return new Ne(this.options)}};jn=Ne=function(L,I,G,V){var at,lt=arguments.length,Q=lt<3?I:V===null?V=Object.getOwnPropertyDescriptor(I,G):V;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Q=Reflect.decorate(L,I,G,V);else for(var J=L.length-1;0<=J;J--)(at=L[J])&&(Q=(lt<3?at(Q):3<lt?at(I,G,Q):at(I,G))||Q);return 3<lt&&Q&&Object.defineProperty(I,G,Q),Q}([ln(function(L){return[L(0),L(.5),L(1)]},L=>{const[I,G,V]=L,at=He(ft(0,.5),De(I,G)),lt=He(ft(.5,1),De(G,V));return Q=>(I>V?Q<G?lt:at:Q<G?at:lt)(Q)})],jn);function Dn(L,I,G,V,at){var lt=new Qt({range:[I,I+V]}),Q=new Qt({range:[G,G+at]});return{transform:function(bt){var bt=Nt(bt,2),pt=bt[0],bt=bt[1];return[lt.map(pt),Q.map(bt)]},untransform:function(bt){var bt=Nt(bt,2),pt=bt[0],bt=bt[1];return[lt.invert(pt),Q.invert(bt)]}}}function Bn(L,I,G,V,at){return(0,Nt(L,1)[0])(I,G,V,at)}function Fn(L,I,G,V,at){return Nt(L,1)[0]}function On(pt,I,G,V,at){var lt=(pt=Nt(pt,4))[0],Q=pt[1],J=pt[2],pt=pt[3],bt=new Qt({range:[J,pt]}),ne=new Qt({range:[lt,Q]}),ae=1<(J=at/V)?1:J,be=1<J?1/J:1;return{transform:function(ve){var ve=Nt(ve,2),de=ve[0],ve=ve[1],de=ne.map(de),ve=bt.map(ve);return[.5*(ve*Math.cos(de)*ae)+.5,.5*(ve*Math.sin(de)*be)+.5]},untransform:function(Xt){var Xt=Nt(Xt,2),de=Xt[0],Xt=Xt[1],de=2*(de-.5)/ae,Xt=2*(Xt-.5)/be,ve=Math.sqrt(Math.pow(de,2)+Math.pow(Xt,2)),Xt=Ze(Math.atan2(Xt,de),lt,Q);return[ne.invert(Xt),bt.invert(ve)]}}}function gn(L,I,G,V,at){return{transform:function(Q){var Q=Nt(Q,2),J=Q[0];return[Q[1],J]},untransform:function(Q){var Q=Nt(Q,2),J=Q[0];return[Q[1],J]}}}function or(L){for(var I=[],G=1;G<arguments.length;G++)I[G-1]=arguments[G];return Ma.apply(void 0,ye([[-1,-1]],Nt(I),!1))}function dn(L){for(var I=[],G=1;G<arguments.length;G++)I[G-1]=arguments[G];return Ma.apply(void 0,ye([[-1,1]],Nt(I),!1))}function Qr(L){for(var I=[],G=1;G<arguments.length;G++)I[G-1]=arguments[G];return Ma.apply(void 0,ye([[1,-1]],Nt(I),!1))}function wa(Q,I,G,V,at){var lt,Q=Nt(Q,1)[0],J=kt();return J=J,Q=Q,lt=Math.sin(Q),Q=Math.cos(Q),J[0]=Q,J[1]=lt,J[2]=0,J[3]=-lt,J[4]=Q,J[5]=0,J[6]=0,J[7]=0,J[8]=1,J}function ci(L,I,G,V,at){var lt=(L=Nt(L,4))[0],Q=L[1],J=L[2],pt=(L[3]-J)/(+Q/(2*Math.PI)+1),bt=pt/(2*Math.PI),ne=new Qt({range:[J,J+.99*pt]}),ae=new Qt({range:[lt,Q]}),be=1<(L=at/V)?1:L,re=1<L?1/L:1;return{transform:function(Xt){var Xt=Nt(Xt,2),ve=Xt[0],Xt=Xt[1],ve=ae.map(ve),Xt=ne.map(Xt);return[.5*(Math.cos(ve)*(bt*ve+Xt)*be)+.5,.5*(Math.sin(ve)*(bt*ve+Xt)*re)+.5]},untransform:function(Xt){var Xt=Nt(Xt,2),Ce=Xt[0],Xt=Xt[1],Ce=2*(Ce-.5)/be,Xt=2*(Xt-.5)/re,ve=Math.sqrt(Math.pow(Ce,2)+Math.pow(Xt,2)),Xt=Ze(Math.atan2(Xt,Ce)+Math.floor(ve/pt)*Math.PI*2,lt,Q),Ce=ve-bt*Xt;return[ae.invert(Xt),ne.invert(Ce)]}}}function Sa(pt,I,G,V,at){var lt=(pt=Nt(pt,4))[0],Q=pt[1],J=pt[2],pt=pt[3],bt=new Qt({range:[J,pt]});return{transform:function(ne){for(var ae=[],be=ne.length,re=new se({domain:new Array(be).fill(0).map(function(Ce,xe){return xe}),range:[lt,Q]}),de=0;de<be;de++){var Xt=ne[de],ve=re.map(de),Xt=bt.map(Xt);ae.push(ve,Xt)}return ae},untransform:function(ne){for(var ae=[],be=0;be<ne.length;be+=2){var re=ne[be+1];ae.push(bt.invert(re))}return ae}}}var Ma=function(Q,I,G,V,at){var Q=Nt(Q,2),lt=Q[0],Q=Q[1],J=kt();return lt=[lt,Q],(Q=J)[0]=lt[0],Q[1]=0,Q[2]=0,Q[3]=0,Q[4]=lt[1],Q[5]=0,Q[6]=0,Q[7]=0,Q[8]=1,Q};function Du(L){return 1/Math.tan(L)}function fp(L,I,G,V,at){var lt=Du(Nt(L,1)[0]);return{transform:function(pt){var pt=Nt(pt,2),J=pt[0],pt=pt[1];return[J+pt*lt,pt]},untransform:function(pt){var pt=Nt(pt,2),J=pt[0],pt=pt[1];return[J-pt*lt,pt]}}}function dp(L,I,G,V,at){var lt=Du(Nt(L,1)[0]);return{transform:function(J){var J=Nt(J,2),pt=J[0];return[pt,J[1]+pt*lt]},untransform:function(J){var J=Nt(J,2),pt=J[0];return[pt,J[1]-pt*lt]}}}function ko(L,I,G,J,Q){var lt=L<I,Q=(lt?I-J:Q-I)||Q-J,J=lt?-1:1;return J*Q*(G+1)/(G+Q/((L-I)*J))+I}function Ro(L,I,G,V,Q){var lt=L<I,Q=(lt?I-V:Q-I)||Q-V;return Q/(Q*(G+1)/(L-I)-G*(lt?-1:1))+I}function Ss(L,I,G){return G?new Qt({range:[0,1],domain:[0,I]}).map(L):L}function hp(J,I,G,V,at){var lt=(J=Nt(J,3))[0],Q=J[1],J=J[2],pt=Ss(lt,V,J!==void 0&&J);return{transform:function(ae){var ae=Nt(ae,2),ne=ae[0],ae=ae[1];return[ko(ne,pt,Q,0,1),ae]},untransform:function(ae){var ae=Nt(ae,2),ne=ae[0],ae=ae[1];return[Ro(ne,pt,Q,0,1),ae]}}}function pp(J,I,G,V,at){var lt=(J=Nt(J,3))[0],Q=J[1],J=J[2],pt=Ss(lt,at,J!==void 0&&J);return{transform:function(bt){return bt=Nt(bt,2),[bt[0],ko(bt[1],pt,Q,0,1)]},untransform:function(bt){return bt=Nt(bt,2),[bt[0],Ro(bt[1],pt,Q,0,1)]}}}function Fc(bt,I,G,V,at){var lt=(bt=Nt(bt,5))[0],Q=bt[1],J=bt[2],pt=bt[3],bt=bt[4],ne=Ss(lt,V,bt=bt!==void 0&&bt),ae=Ss(Q,at,bt);return{transform:function(de){var de=Nt(de,2),re=de[0],de=de[1];return[ko(re,ne,J,0,1),ko(de,ae,pt,0,1)]},untransform:function(de){var de=Nt(de,2),re=de[0],de=de[1];return[Ro(re,ne,J,0,1),Ro(de,ae,pt,0,1)]}}}function Bu(bt,I,G,V,at){var lt=(bt=Nt(bt,5))[0],Q=bt[1],J=bt[2],pt=bt[3],bt=(bt=bt[4])!==void 0&&bt,ne=new Qt({range:[0,V]}),ae=new Qt({range:[0,at]}),be=bt?lt:ne.map(lt),re=bt?Q:ae.map(Q);return{transform:function(Xt){var Xt=Nt(Xt,2),ve=Xt[0],Xt=Xt[1],Ce=ne.map(ve)-be,xe=ae.map(Xt)-re,ke=Math.sqrt(Ce*Ce+xe*xe);return J<ke?[ve,Xt]:(ve=ko(ke,0,pt,0,J),Xt=Math.atan2(xe,Ce),ke=be+ve*Math.cos(Xt),xe=re+ve*Math.sin(Xt),[ne.invert(ke),ae.invert(xe)])},untransform:function(Xt){var Xt=Nt(Xt,2),ve=Xt[0],Xt=Xt[1],Ce=ne.map(ve)-be,xe=ae.map(Xt)-re,ke=Math.sqrt(Ce*Ce+xe*xe);return J<ke?[ve,Xt]:(ve=Ro(ke,0,pt,0,J),Xt=Math.atan2(xe,Ce),ke=be+ve*Math.cos(Xt),xe=re+ve*Math.sin(Xt),[ne.invert(ke),ae.invert(xe)])}}}function vp(L,I,G,V,at,lt,Q){var J=new Qt({range:[I,I+at]}),pt=new Qt({range:[G,G+lt]}),bt=new Qt({range:[V,V+Q]});return{transform:function(re){var re=Nt(re,3),ae=re[0],be=re[1],re=re[2];return[J.map(ae),pt.map(be),bt.map(re)]},untransform:function(re){var re=Nt(re,3),ae=re[0],be=re[1],re=re[2];return[J.invert(ae),pt.invert(be),bt.invert(re)]}}}function gp(ne,I,G,V,at,lt,Q){var J,pt=(ne=Nt(ne,3))[0],bt=ne[1],ne=ne[2];return J=Se(),pt=[pt,bt,ne],J[0]=1,J[1]=0,J[2]=0,J[3]=0,J[4]=0,J[5]=1,J[6]=0,J[7]=0,J[8]=0,J[9]=0,J[10]=1,J[11]=0,J[12]=pt[0],J[13]=pt[1],J[14]=pt[2],J[15]=1,J}function yp(L,I,G,V,at,lt,Q){return{transform:function(pt){var pt=Nt(pt,3),bt=pt[0];return[pt[1],bt,pt[2]]},untransform:function(pt){var pt=Nt(pt,3),bt=pt[0];return[pt[1],bt,pt[2]]}}}function mp(ne,I,G,V,at,lt,Q){var J,pt=(ne=Nt(ne,3))[0],bt=ne[1],ne=ne[2];return J=Se(),pt=[pt,bt,ne],J[0]=pt[0],J[1]=0,J[2]=0,J[3]=0,J[4]=0,J[5]=pt[1],J[6]=0,J[7]=0,J[8]=0,J[9]=0,J[10]=pt[2],J[11]=0,J[12]=0,J[13]=0,J[14]=0,J[15]=1,J}Gr.prototype.update=function(L){this.options=$t({},this.options,L),this.recoordinate()},Gr.prototype.clone=function(){return new Gr(this.options)},Gr.prototype.getOptions=function(){return this.options},Gr.prototype.clear=function(){this.update({transformations:[]})},Gr.prototype.getSize=function(){var L=this.options;return[L.width,L.height]},Gr.prototype.getCenter=function(){var L=this.options,I=L.x,G=L.y;return[(2*I+L.width)/2,(2*G+L.height)/2]},Gr.prototype.transform=function(){for(var L=[],I=0;I<arguments.length;I++)L[I]=arguments[I];var G=this.options.transformations;return this.update({transformations:ye(ye([],Nt(G),!1),[ye([],Nt(L),!1)],!1)}),this},Gr.prototype.map=function(L){return this.output(L)},Gr.prototype.invert=function(L){return this.input(L)},Gr.prototype.recoordinate=function(){this.output=this.compose(),this.input=this.compose(!0)},Gr.prototype.compose=function(L){function I(ge,Te){var tn;J.push((Te=Te===void 0?!0:Te)?(tn=ge,function(Jr){for(var li=[],jr=0;jr<Jr.length-1;jr+=2){var ti=[Jr[jr],Jr[jr+1]],ti=tn(ti);li.push.apply(li,ye([],Nt(ti),!1))}return li}):ge)}var G,V,at=(L=L===void 0?!1:L)?ye([],Nt(this.options.transformations),!1).reverse():this.options.transformations,lt=L?function(ge){return ge.untransform}:function(ge){return ge.transform},Q=[],J=[];try{for(var pt=_t(at),bt=pt.next();!bt.done;bt=pt.next()){var ne,ae,be,re,de,ve,Xt=Nt(bt.value),Ce=Xt[0],xe=Xt.slice(1),ke=this.transformers[Ce];ke&&(ae=(ne=this.options).x,be=ne.y,re=ne.width,de=ne.height,We(ve=ke(ye([],Nt(xe),!1),ae,be,re,de))?Q.push(ve):(Q.length&&(I(this.createMatrixTransform(Q,L)),Q.splice(0,Q.length)),I(lt(ve)||te,Ce!=="parallel")))}}catch(ge){G={error:ge}}finally{try{bt&&!bt.done&&(V=pt.return)&&V.call(pt)}finally{if(G)throw G.error}}return Q.length&&I(this.createMatrixTransform(Q,L)),Ke.apply(void 0,ye([],Nt(J),!1))},Gr.prototype.createMatrixTransform=function(L,I){var G,V,at,lt,Q,J,pt,bt,ne,ae,be,re,de=kt();return I&&L.reverse(),L.forEach(function(ve){return Ft(de,de,ve)}),I&&(I=L=de,(re=new It(9))[0]=I[0],re[1]=I[1],re[2]=I[2],re[3]=I[3],re[4]=I[4],re[5]=I[5],re[6]=I[6],re[7]=I[7],re[8]=I[8],re=(I=re)[0],G=I[1],V=I[2],at=I[3],lt=I[4],Q=I[5],J=I[6],pt=I[7],bt=(I=I[8])*lt-Q*pt,be=re*bt+G*(ne=-I*at+Q*J)+V*(ae=pt*at-lt*J))&&(L[0]=bt*(be=1/be),L[1]=(-I*G+V*pt)*be,L[2]=(Q*G-V*lt)*be,L[3]=ne*be,L[4]=(I*re-V*J)*be,L[5]=(-Q*re+V*at)*be,L[6]=ae*be,L[7]=(-pt*re+G*J)*be,L[8]=(lt*re-G*at)*be),function(Te){var Xt,Ce,xe,ke,ge,Te=[Te[0],Te[1],1];return xe=de,ke=(Ce=Xt=Te)[0],ge=Ce[1],Ce=Ce[2],Xt[0]=ke*xe[0]+ge*xe[3]+Ce*xe[6],Xt[1]=ke*xe[1]+ge*xe[4]+Ce*xe[7],Xt[2]=ke*xe[2]+ge*xe[5]+Ce*xe[8],[Te[0],Te[1]]}},Xe=Gr;function Gr(L){this.options={x:0,y:0,width:300,height:150,transformations:[]},this.transformers={cartesian:Dn,translate:cn,custom:Bn,matrix:Fn,polar:On,transpose:gn,scale:Ma,"shear.x":fp,"shear.y":dp,reflect:or,"reflect.x":dn,"reflect.y":Qr,rotate:wa,helix:ci,parallel:Sa,fisheye:Fc,"fisheye.x":hp,"fisheye.y":pp,"fisheye.circular":Bu},this.update(L)}vr.prototype.update=function(L){this.options=$t({},this.options,L),this.recoordinate()},vr.prototype.clone=function(){return new vr(this.options)},vr.prototype.getOptions=function(){return this.options},vr.prototype.clear=function(){this.update({transformations:[]})},vr.prototype.getSize=function(){var L=this.options;return[L.width,L.height,L.depth]},vr.prototype.getCenter=function(){var L=this.options,I=L.x,G=L.y,V=L.z;return[(2*I+L.width)/2,(2*G+L.height)/2,(2*V+L.depth)/2]},vr.prototype.transform=function(){for(var L=[],I=0;I<arguments.length;I++)L[I]=arguments[I];var G=this.options.transformations;return this.update({transformations:ye(ye([],Nt(G),!1),[ye([],Nt(L),!1)],!1)}),this},vr.prototype.map=function(L){return this.output(L)},vr.prototype.invert=function(L){return this.input(L)},vr.prototype.recoordinate=function(){this.output=this.compose(),this.input=this.compose(!0)},vr.prototype.compose=function(L){function I(tn,Jr){var li;J.push((Jr=Jr===void 0?!0:Jr)?(li=tn,function(jr){for(var ti=[],_i=0;_i<jr.length-1;_i+=3){var tr=[jr[_i],jr[_i+1],jr[_i+2]],tr=li(tr);ti.push.apply(ti,ye([],Nt(tr),!1))}return ti}):tn)}var G,V,at=(L=L===void 0?!1:L)?ye([],Nt(this.options.transformations),!1).reverse():this.options.transformations,lt=L?function(tn){return tn.untransform}:function(tn){return tn.transform},Q=[],J=[];try{for(var pt=_t(at),bt=pt.next();!bt.done;bt=pt.next()){var ne,ae,be,re,de,ve,Xt,Ce,xe=Nt(bt.value),ke=xe[0],ge=xe.slice(1),Te=this.transformers[ke];Te&&(ae=(ne=this.options).x,be=ne.y,re=ne.z,de=ne.width,ve=ne.height,Xt=ne.depth,We(Ce=Te(ye([],Nt(ge),!1),ae,be,re,de,ve,Xt))?Q.push(Ce):(Q.length&&(I(this.createMatrixTransform(Q,L)),Q.splice(0,Q.length)),I(lt(Ce)||te,!0)))}}catch(tn){G={error:tn}}finally{try{bt&&!bt.done&&(V=pt.return)&&V.call(pt)}finally{if(G)throw G.error}}return Q.length&&I(this.createMatrixTransform(Q,L)),Ke.apply(void 0,ye([],Nt(J),!1))},vr.prototype.createMatrixTransform=function(L,I){var G,V,at,lt,Q,J,pt,bt,ne,ae,be,re,de,ve,Xt,Ce,xe,ke,ge,Te,tn,Jr,li,jr,ti,_i,tr,Hn,Ms=Se();return I&&L.reverse(),L.forEach(function(bp){return Re(Ms,Ms,bp)}),I&&(I=L=Ms,(Hn=new It(16))[0]=I[0],Hn[1]=I[1],Hn[2]=I[2],Hn[3]=I[3],Hn[4]=I[4],Hn[5]=I[5],Hn[6]=I[6],Hn[7]=I[7],Hn[8]=I[8],Hn[9]=I[9],Hn[10]=I[10],Hn[11]=I[11],Hn[12]=I[12],Hn[13]=I[13],Hn[14]=I[14],Hn[15]=I[15],Hn=(I=Hn)[0],G=I[1],V=I[2],at=I[3],lt=I[4],Q=I[5],J=I[6],pt=I[7],bt=I[8],ne=I[9],ae=I[10],be=I[11],re=I[12],de=I[13],ve=I[14],I=I[15],tr=(Xt=Hn*Q-G*lt)*(_i=ae*I-be*ve)-(Ce=Hn*J-V*lt)*(ti=ne*I-be*de)+(xe=Hn*pt-at*lt)*(jr=ne*ve-ae*de)+(ke=G*J-V*Q)*(li=bt*I-be*re)-(ge=G*pt-at*Q)*(Jr=bt*ve-ae*re)+(Te=V*pt-at*J)*(tn=bt*de-ne*re))&&(L[0]=(Q*_i-J*ti+pt*jr)*(tr=1/tr),L[1]=(V*ti-G*_i-at*jr)*tr,L[2]=(de*Te-ve*ge+I*ke)*tr,L[3]=(ae*ge-ne*Te-be*ke)*tr,L[4]=(J*li-lt*_i-pt*Jr)*tr,L[5]=(Hn*_i-V*li+at*Jr)*tr,L[6]=(ve*xe-re*Te-I*Ce)*tr,L[7]=(bt*Te-ae*xe+be*Ce)*tr,L[8]=(lt*ti-Q*li+pt*tn)*tr,L[9]=(G*li-Hn*ti-at*tn)*tr,L[10]=(re*ge-de*xe+I*Xt)*tr,L[11]=(ne*xe-bt*ge-be*Xt)*tr,L[12]=(Q*Jr-lt*jr-J*tn)*tr,L[13]=(Hn*jr-G*Jr+V*tn)*tr,L[14]=(de*Ce-re*ke-ve*Xt)*tr,L[15]=(bt*ke-ne*Ce+ae*Xt)*tr),function(ia){var Lo,Wr,Sr,No,Io,jo,ia=[ia[0],ia[1],ia[2],1];return Sr=Ms,No=(Wr=Lo=ia)[0],Io=Wr[1],jo=Wr[2],Wr=Wr[3],Lo[0]=Sr[0]*No+Sr[4]*Io+Sr[8]*jo+Sr[12]*Wr,Lo[1]=Sr[1]*No+Sr[5]*Io+Sr[9]*jo+Sr[13]*Wr,Lo[2]=Sr[2]*No+Sr[6]*Io+Sr[10]*jo+Sr[14]*Wr,Lo[3]=Sr[3]*No+Sr[7]*Io+Sr[11]*jo+Sr[15]*Wr,[ia[0],ia[1],ia[2]]}},Pe=vr;function vr(L){this.options={x:0,y:0,z:0,width:300,height:150,depth:150,transformations:[]},this.transformers={cartesian3D:vp,translate3D:gp,scale3D:mp,transpose3D:yp},this.update(L)}gt.Coordinate=Xe,gt.Coordinate3D=Pe,Object.defineProperty(gt,"__esModule",{value:!0})})},39083:function(Ve,Ge){"use strict";var gt=function(_t,Nt,ye){return _t<Nt?Nt:_t>ye?ye:_t};Ge.Z=gt},58622:function(Ve,Ge){"use strict";var gt=function(_t){return _t==null};Ge.Z=gt},39696:function(Ve,Ge,gt){"use strict";var _t=gt(98104),Nt=function(ye){return(0,_t.Z)(ye,"Number")};Ge.Z=Nt},98104:function(Ve,Ge){"use strict";var gt={}.toString,_t=function(Nt,ye){return gt.call(Nt)==="[object "+ye+"]"};Ge.Z=_t},50304:function(Ve,Ge,gt){"use strict";gt.d(Ge,{Z:function(){return mt}});var _t=gt(50959),Nt=gt(84875),ye=gt.n(Nt),Be=gt(87017),Jt=gt(31594),he=gt(17436),ie=gt(25670),Ht=gt(66146),yt=function(U,X){var Z={};for(var it in U)Object.prototype.hasOwnProperty.call(U,it)&&X.indexOf(it)<0&&(Z[it]=U[it]);if(U!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ct=0,it=Object.getOwnPropertySymbols(U);ct<it.length;ct++)X.indexOf(it[ct])<0&&Object.prototype.propertyIsEnumerable.call(U,it[ct])&&(Z[it[ct]]=U[it[ct]]);return Z},Zt=U=>{var{prefixCls:X,className:Z,hoverable:it=!0}=U,ct=yt(U,["prefixCls","className","hoverable"]);const{getPrefixCls:zt}=_t.useContext(Jt.E_),Ct=zt("card",X),ee=ye()(`${Ct}-grid`,Z,{[`${Ct}-grid-hoverable`]:it});return _t.createElement("div",Object.assign({},ct,{className:ee}))},$t=gt(60076),te=gt(6301),Bt=gt(81501),It=gt(90467);const kt=U=>{const{antCls:X,componentCls:Z,headerHeight:it,cardPaddingBase:ct,tabsMarginBottom:zt}=U;return Object.assign(Object.assign({display:"flex",justifyContent:"center",flexDirection:"column",minHeight:it,marginBottom:-1,padding:`0 ${(0,$t.bf)(ct)}`,color:U.colorTextHeading,fontWeight:U.fontWeightStrong,fontSize:U.headerFontSize,background:U.headerBg,borderBottom:`${(0,$t.bf)(U.lineWidth)} ${U.lineType} ${U.colorBorderSecondary}`,borderRadius:`${(0,$t.bf)(U.borderRadiusLG)} ${(0,$t.bf)(U.borderRadiusLG)} 0 0`},(0,te.dF)()),{"&-wrapper":{width:"100%",display:"flex",alignItems:"center"},"&-title":Object.assign(Object.assign({display:"inline-block",flex:1},te.vS),{[`
> ${Z}-typography,
> ${Z}-typography-edit-content
`]:{insetInlineStart:0,marginTop:0,marginBottom:0}}),[`${X}-tabs-top`]:{clear:"both",marginBottom:zt,color:U.colorText,fontWeight:"normal",fontSize:U.fontSize,"&-bar":{borderBottom:`${(0,$t.bf)(U.lineWidth)} ${U.lineType} ${U.colorBorderSecondary}`}}})},Ft=U=>{const{cardPaddingBase:X,colorBorderSecondary:Z,cardShadow:it,lineWidth:ct}=U;return{width:"33.33%",padding:X,border:0,borderRadius:0,boxShadow:`
${(0,$t.bf)(ct)} 0 0 0 ${Z},
0 ${(0,$t.bf)(ct)} 0 0 ${Z},
${(0,$t.bf)(ct)} ${(0,$t.bf)(ct)} 0 0 ${Z},
${(0,$t.bf)(ct)} 0 0 0 ${Z} inset,
0 ${(0,$t.bf)(ct)} 0 0 ${Z} inset;
`,transition:`all ${U.motionDurationMid}`,"&-hoverable:hover":{position:"relative",zIndex:1,boxShadow:it}}},Se=U=>{const{componentCls:X,iconCls:Z,actionsLiMargin:it,cardActionsIconSize:ct,colorBorderSecondary:zt,actionsBg:Ct}=U;return Object.assign(Object.assign({margin:0,padding:0,listStyle:"none",background:Ct,borderTop:`${(0,$t.bf)(U.lineWidth)} ${U.lineType} ${zt}`,display:"flex",borderRadius:`0 0 ${(0,$t.bf)(U.borderRadiusLG)} ${(0,$t.bf)(U.borderRadiusLG)}`},(0,te.dF)()),{"& > li":{margin:it,color:U.colorTextDescription,textAlign:"center","> span":{position:"relative",display:"block",minWidth:U.calc(U.cardActionsIconSize).mul(2).equal(),fontSize:U.fontSize,lineHeight:U.lineHeight,cursor:"pointer","&:hover":{color:U.colorPrimary,transition:`color ${U.motionDurationMid}`},[`a:not(${X}-btn), > ${Z}`]:{display:"inline-block",width:"100%",color:U.colorTextDescription,lineHeight:(0,$t.bf)(U.fontHeight),transition:`color ${U.motionDurationMid}`,"&:hover":{color:U.colorPrimary}},[`> ${Z}`]:{fontSize:ct,lineHeight:(0,$t.bf)(U.calc(ct).mul(U.lineHeight).equal())}},"&:not(:last-child)":{borderInlineEnd:`${(0,$t.bf)(U.lineWidth)} ${U.lineType} ${zt}`}}})},Re=U=>Object.assign(Object.assign({margin:`${(0,$t.bf)(U.calc(U.marginXXS).mul(-1).equal())} 0`,display:"flex"},(0,te.dF)()),{"&-avatar":{paddingInlineEnd:U.padding},"&-detail":{overflow:"hidden",flex:1,"> div:not(:last-child)":{marginBottom:U.marginXS}},"&-title":Object.assign({color:U.colorTextHeading,fontWeight:U.fontWeightStrong,fontSize:U.fontSizeLG},te.vS),"&-description":{color:U.colorTextDescription}}),Ke=U=>{const{componentCls:X,cardPaddingBase:Z,colorFillAlter:it}=U;return{[`${X}-head`]:{padding:`0 ${(0,$t.bf)(Z)}`,background:it,"&-title":{fontSize:U.fontSize}},[`${X}-body`]:{padding:`${(0,$t.bf)(U.padding)} ${(0,$t.bf)(Z)}`}}},We=U=>{const{componentCls:X}=U;return{overflow:"hidden",[`${X}-body`]:{userSelect:"none"}}},Ze=U=>{const{antCls:X,componentCls:Z,cardShadow:it,cardHeadPadding:ct,colorBorderSecondary:zt,boxShadowTertiary:Ct,cardPaddingBase:ee,extraColor:$}=U;return{[Z]:Object.assign(Object.assign({},(0,te.Wf)(U)),{position:"relative",background:U.colorBgContainer,borderRadius:U.borderRadiusLG,[`&:not(${Z}-bordered)`]:{boxShadow:Ct},[`${Z}-head`]:kt(U),[`${Z}-extra`]:{marginInlineStart:"auto",color:$,fontWeight:"normal",fontSize:U.fontSize},[`${Z}-body`]:Object.assign({padding:ee,borderRadius:` 0 0 ${(0,$t.bf)(U.borderRadiusLG)} ${(0,$t.bf)(U.borderRadiusLG)}`},(0,te.dF)()),[`${Z}-grid`]:Ft(U),[`${Z}-cover`]:{"> *":{display:"block",width:"100%"},[`img, img + ${X}-image-mask`]:{borderRadius:`${(0,$t.bf)(U.borderRadiusLG)} ${(0,$t.bf)(U.borderRadiusLG)} 0 0`}},[`${Z}-actions`]:Se(U),[`${Z}-meta`]:Re(U)}),[`${Z}-bordered`]:{border:`${(0,$t.bf)(U.lineWidth)} ${U.lineType} ${zt}`,[`${Z}-cover`]:{marginTop:-1,marginInlineStart:-1,marginInlineEnd:-1}},[`${Z}-hoverable`]:{cursor:"pointer",transition:`box-shadow ${U.motionDurationMid}, border-color ${U.motionDurationMid}`,"&:hover":{borderColor:"transparent",boxShadow:it}},[`${Z}-contain-grid`]:{borderRadius:`${(0,$t.bf)(U.borderRadiusLG)} ${(0,$t.bf)(U.borderRadiusLG)} 0 0 `,[`${Z}-body`]:{display:"flex",flexWrap:"wrap"},[`&:not(${Z}-loading) ${Z}-body`]:{marginBlockStart:U.calc(U.lineWidth).mul(-1).equal(),marginInlineStart:U.calc(U.lineWidth).mul(-1).equal(),padding:0}},[`${Z}-contain-tabs`]:{[`> ${Z}-head`]:{minHeight:0,[`${Z}-head-title, ${Z}-extra`]:{paddingTop:ct}}},[`${Z}-type-inner`]:Ke(U),[`${Z}-loading`]:We(U),[`${Z}-rtl`]:{direction:"rtl"}}},cn=U=>{const{componentCls:X,cardPaddingSM:Z,headerHeightSM:it,headerFontSizeSM:ct}=U;return{[`${X}-small`]:{[`> ${X}-head`]:{minHeight:it,padding:`0 ${(0,$t.bf)(Z)}`,fontSize:ct,[`> ${X}-head-wrapper`]:{[`> ${X}-extra`]:{fontSize:U.fontSize}}},[`> ${X}-body`]:{padding:Z}},[`${X}-small${X}-contain-tabs`]:{[`> ${X}-head`]:{[`${X}-head-title, ${X}-extra`]:{paddingTop:0,display:"flex",alignItems:"center"}}}}},He=U=>({headerBg:"transparent",headerFontSize:U.fontSizeLG,headerFontSizeSM:U.fontSize,headerHeight:U.fontSizeLG*U.lineHeightLG+U.padding*2,headerHeightSM:U.fontSize*U.lineHeight+U.paddingXS*2,actionsBg:U.colorBgContainer,actionsLiMargin:`${U.paddingSM}px 0`,tabsMarginBottom:-U.padding-U.lineWidth,extraColor:U.colorText});var De=(0,Bt.I$)("Card",U=>{const X=(0,It.TS)(U,{cardShadow:U.boxShadowCard,cardHeadPadding:U.padding,cardPaddingBase:U.paddingLG,cardActionsIconSize:U.fontSize,cardPaddingSM:12});return[Ze(X),cn(X)]},He),an=function(U,X){var Z={};for(var it in U)Object.prototype.hasOwnProperty.call(U,it)&&X.indexOf(it)<0&&(Z[it]=U[it]);if(U!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ct=0,it=Object.getOwnPropertySymbols(U);ct<it.length;ct++)X.indexOf(it[ct])<0&&Object.prototype.propertyIsEnumerable.call(U,it[ct])&&(Z[it[ct]]=U[it[ct]]);return Z};const _e=U=>{const{prefixCls:X,actions:Z=[]}=U;return _t.createElement("ul",{className:`${X}-actions`},Z.map((it,ct)=>{const zt=`action-${ct}`;return _t.createElement("li",{style:{width:`${100/Z.length}%`},key:zt},_t.createElement("span",null,it))}))};var pn=_t.forwardRef((U,X)=>{const{prefixCls:Z,className:it,rootClassName:ct,style:zt,extra:Ct,headStyle:ee={},bodyStyle:$={},title:ut,loading:vt,bordered:Ut=!0,size:et,type:ft,cover:wt,actions:H,tabList:tt,children:ht,activeTabKey:x,defaultActiveTabKey:T,tabBarExtraContent:W,hoverable:K,tabProps:nt={}}=U,ot=an(U,["prefixCls","className","rootClassName","style","extra","headStyle","bodyStyle","title","loading","bordered","size","type","cover","actions","tabList","children","activeTabKey","defaultActiveTabKey","tabBarExtraContent","hoverable","tabProps"]),{getPrefixCls:xt,direction:Ot,card:Et}=_t.useContext(Jt.E_),Tt=On=>{var gn;(gn=U.onTabChange)===null||gn===void 0||gn.call(U,On)},Gt=_t.useMemo(()=>{let On=!1;return _t.Children.forEach(ht,gn=>{gn&&gn.type&&gn.type===Zt&&(On=!0)}),On},[ht]),jt=xt("card",Z),[Vt,Wt]=De(jt),Qt=_t.createElement(ie.Z,{loading:!0,active:!0,paragraph:{rows:4},title:!1},ht),se=x!==void 0,Mt=Object.assign(Object.assign({},nt),{[se?"activeKey":"defaultActiveKey"]:se?x:T,tabBarExtraContent:W});let Oe;const Xe=(0,he.Z)(et),Ee=!Xe||Xe==="default"?"large":Xe,Pe=tt?_t.createElement(Ht.Z,Object.assign({size:Ee},Mt,{className:`${jt}-head-tabs`,onChange:Tt,items:tt.map(On=>{var{tab:gn}=On,or=an(On,["tab"]);return Object.assign({label:gn},or)})})):null;(ut||Ct||Pe)&&(Oe=_t.createElement("div",{className:`${jt}-head`,style:ee},_t.createElement("div",{className:`${jt}-head-wrapper`},ut&&_t.createElement("div",{className:`${jt}-head-title`},ut),Ct&&_t.createElement("div",{className:`${jt}-extra`},Ct)),Pe));const Ne=wt?_t.createElement("div",{className:`${jt}-cover`},wt):null,Le=_t.createElement("div",{className:`${jt}-body`,style:$},vt?Qt:ht),jn=H&&H.length?_t.createElement(_e,{prefixCls:jt,actions:H}):null,Dn=(0,Be.Z)(ot,["onTabChange"]),Bn=ye()(jt,Et==null?void 0:Et.className,{[`${jt}-loading`]:vt,[`${jt}-bordered`]:Ut,[`${jt}-hoverable`]:K,[`${jt}-contain-grid`]:Gt,[`${jt}-contain-tabs`]:tt&&tt.length,[`${jt}-${Xe}`]:Xe,[`${jt}-type-${ft}`]:!!ft,[`${jt}-rtl`]:Ot==="rtl"},it,ct,Wt),Fn=Object.assign(Object.assign({},Et==null?void 0:Et.style),zt);return Vt(_t.createElement("div",Object.assign({ref:X},Dn,{className:Bn,style:Fn}),Oe,Ne,Le,jn))}),Ln=function(U,X){var Z={};for(var it in U)Object.prototype.hasOwnProperty.call(U,it)&&X.indexOf(it)<0&&(Z[it]=U[it]);if(U!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ct=0,it=Object.getOwnPropertySymbols(U);ct<it.length;ct++)X.indexOf(it[ct])<0&&Object.prototype.propertyIsEnumerable.call(U,it[ct])&&(Z[it[ct]]=U[it[ct]]);return Z},ln=U=>{const{prefixCls:X,className:Z,avatar:it,title:ct,description:zt}=U,Ct=Ln(U,["prefixCls","className","avatar","title","description"]),{getPrefixCls:ee}=_t.useContext(Jt.E_),$=ee("card",X),ut=ye()(`${$}-meta`,Z),vt=it?_t.createElement("div",{className:`${$}-meta-avatar`},it):null,Ut=ct?_t.createElement("div",{className:`${$}-meta-title`},ct):null,et=zt?_t.createElement("div",{className:`${$}-meta-description`},zt):null,ft=Ut||et?_t.createElement("div",{className:`${$}-meta-detail`},Ut,et):null;return _t.createElement("div",Object.assign({},Ct,{className:ut}),vt,ft)};const fn=pn;fn.Grid=Zt,fn.Meta=ln;var mt=fn},82099:function(Ve,Ge,gt){"use strict";var _t=gt(50120);Ge.Z=_t.Z},23870:function(Ve,Ge,gt){"use strict";var _t=gt(72611);Ge.Z=_t.Z},99419:function(Ve){"use strict";Ve.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]}},2489:function(Ve,Ge,gt){var _t=gt(99419),Nt=gt(27933),ye=Object.hasOwnProperty,Be=Object.create(null);for(var Jt in _t)ye.call(_t,Jt)&&(Be[_t[Jt]]=Jt);var he=Ve.exports={to:{},get:{}};he.get=function(yt){var pe=yt.substring(0,3).toLowerCase(),Zt,$t;switch(pe){case"hsl":Zt=he.get.hsl(yt),$t="hsl";break;case"hwb":Zt=he.get.hwb(yt),$t="hwb";break;default:Zt=he.get.rgb(yt),$t="rgb";break}return Zt?{model:$t,value:Zt}:null},he.get.rgb=function(yt){if(!yt)return null;var pe=/^#([a-f0-9]{3,4})$/i,Zt=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,$t=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,te=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,Bt=/^(\w+)$/,It=[0,0,0,1],kt,Ft,Se;if(kt=yt.match(Zt)){for(Se=kt[2],kt=kt[1],Ft=0;Ft<3;Ft++){var Re=Ft*2;It[Ft]=parseInt(kt.slice(Re,Re+2),16)}Se&&(It[3]=parseInt(Se,16)/255)}else if(kt=yt.match(pe)){for(kt=kt[1],Se=kt[3],Ft=0;Ft<3;Ft++)It[Ft]=parseInt(kt[Ft]+kt[Ft],16);Se&&(It[3]=parseInt(Se+Se,16)/255)}else if(kt=yt.match($t)){for(Ft=0;Ft<3;Ft++)It[Ft]=parseInt(kt[Ft+1],0);kt[4]&&(kt[5]?It[3]=parseFloat(kt[4])*.01:It[3]=parseFloat(kt[4]))}else if(kt=yt.match(te)){for(Ft=0;Ft<3;Ft++)It[Ft]=Math.round(parseFloat(kt[Ft+1])*2.55);kt[4]&&(kt[5]?It[3]=parseFloat(kt[4])*.01:It[3]=parseFloat(kt[4]))}else return(kt=yt.match(Bt))?kt[1]==="transparent"?[0,0,0,0]:ye.call(_t,kt[1])?(It=_t[kt[1]],It[3]=1,It):null:null;for(Ft=0;Ft<3;Ft++)It[Ft]=ie(It[Ft],0,255);return It[3]=ie(It[3],0,1),It},he.get.hsl=function(yt){if(!yt)return null;var pe=/^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*)?\)$/,Zt=yt.match(pe);if(Zt){var $t=parseFloat(Zt[4]),te=(parseFloat(Zt[1])%360+360)%360,Bt=ie(parseFloat(Zt[2]),0,100),It=ie(parseFloat(Zt[3]),0,100),kt=ie(isNaN($t)?1:$t,0,1);return[te,Bt,It,kt]}return null},he.get.hwb=function(yt){if(!yt)return null;var pe=/^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*)?\)$/,Zt=yt.match(pe);if(Zt){var $t=parseFloat(Zt[4]),te=(parseFloat(Zt[1])%360+360)%360,Bt=ie(parseFloat(Zt[2]),0,100),It=ie(parseFloat(Zt[3]),0,100),kt=ie(isNaN($t)?1:$t,0,1);return[te,Bt,It,kt]}return null},he.to.hex=function(){var yt=Nt(arguments);return"#"+Ht(yt[0])+Ht(yt[1])+Ht(yt[2])+(yt[3]<1?Ht(Math.round(yt[3]*255)):"")},he.to.rgb=function(){var yt=Nt(arguments);return yt.length<4||yt[3]===1?"rgb("+Math.round(yt[0])+", "+Math.round(yt[1])+", "+Math.round(yt[2])+")":"rgba("+Math.round(yt[0])+", "+Math.round(yt[1])+", "+Math.round(yt[2])+", "+yt[3]+")"},he.to.rgb.percent=function(){var yt=Nt(arguments),pe=Math.round(yt[0]/255*100),Zt=Math.round(yt[1]/255*100),$t=Math.round(yt[2]/255*100);return yt.length<4||yt[3]===1?"rgb("+pe+"%, "+Zt+"%, "+$t+"%)":"rgba("+pe+"%, "+Zt+"%, "+$t+"%, "+yt[3]+")"},he.to.hsl=function(){var yt=Nt(arguments);return yt.length<4||yt[3]===1?"hsl("+yt[0]+", "+yt[1]+"%, "+yt[2]+"%)":"hsla("+yt[0]+", "+yt[1]+"%, "+yt[2]+"%, "+yt[3]+")"},he.to.hwb=function(){var yt=Nt(arguments),pe="";return yt.length>=4&&yt[3]!==1&&(pe=", "+yt[3]),"hwb("+yt[0]+", "+yt[1]+"%, "+yt[2]+"%"+pe+")"},he.to.keyword=function(yt){return Be[yt.slice(0,3)]};function ie(yt,pe,Zt){return Math.min(Math.max(pe,yt),Zt)}function Ht(yt){var pe=Math.round(yt).toString(16).toUpperCase();return pe.length<2?"0"+pe:pe}},52617:function(Ve,Ge,gt){"use strict";gt.d(Ge,{ZP:function(){return Ke},B8:function(){return He}});function _t(mt,U,X){mt.prototype=U.prototype=X,X.constructor=mt}function Nt(mt,U){var X=Object.create(mt.prototype);for(var Z in U)X[Z]=U[Z];return X}function ye(){}var Be=.7,Jt=1/Be,he="\\s*([+-]?\\d+)\\s*",ie="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ht="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",yt=/^#([0-9a-f]{3,8})$/,pe=new RegExp("^rgb\\("+[he,he,he]+"\\)$"),Zt=new RegExp("^rgb\\("+[Ht,Ht,Ht]+"\\)$"),$t=new RegExp("^rgba\\("+[he,he,he,ie]+"\\)$"),te=new RegExp("^rgba\\("+[Ht,Ht,Ht,ie]+"\\)$"),Bt=new RegExp("^hsl\\("+[ie,Ht,Ht]+"\\)$"),It=new RegExp("^hsla\\("+[ie,Ht,Ht,ie]+"\\)$"),kt={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};_t(ye,Ke,{copy:function(mt){return Object.assign(new this.constructor,this,mt)},displayable:function(){return this.rgb().displayable()},hex:Ft,formatHex:Ft,formatHsl:Se,formatRgb:Re,toString:Re});function Ft(){return this.rgb().formatHex()}function Se(){return Ln(this).formatHsl()}function Re(){return this.rgb().formatRgb()}function Ke(mt){var U,X;return mt=(mt+"").trim().toLowerCase(),(U=yt.exec(mt))?(X=U[1].length,U=parseInt(U[1],16),X===6?We(U):X===3?new De(U>>8&15|U>>4&240,U>>4&15|U&240,(U&15)<<4|U&15,1):X===8?Ze(U>>24&255,U>>16&255,U>>8&255,(U&255)/255):X===4?Ze(U>>12&15|U>>8&240,U>>8&15|U>>4&240,U>>4&15|U&240,((U&15)<<4|U&15)/255):null):(U=pe.exec(mt))?new De(U[1],U[2],U[3],1):(U=Zt.exec(mt))?new De(U[1]*255/100,U[2]*255/100,U[3]*255/100,1):(U=$t.exec(mt))?Ze(U[1],U[2],U[3],U[4]):(U=te.exec(mt))?Ze(U[1]*255/100,U[2]*255/100,U[3]*255/100,U[4]):(U=Bt.exec(mt))?pn(U[1],U[2]/100,U[3]/100,1):(U=It.exec(mt))?pn(U[1],U[2]/100,U[3]/100,U[4]):kt.hasOwnProperty(mt)?We(kt[mt]):mt==="transparent"?new De(NaN,NaN,NaN,0):null}function We(mt){return new De(mt>>16&255,mt>>8&255,mt&255,1)}function Ze(mt,U,X,Z){return Z<=0&&(mt=U=X=NaN),new De(mt,U,X,Z)}function cn(mt){return mt instanceof ye||(mt=Ke(mt)),mt?(mt=mt.rgb(),new De(mt.r,mt.g,mt.b,mt.opacity)):new De}function He(mt,U,X,Z){return arguments.length===1?cn(mt):new De(mt,U,X,Z==null?1:Z)}function De(mt,U,X,Z){this.r=+mt,this.g=+U,this.b=+X,this.opacity=+Z}_t(De,He,Nt(ye,{brighter:function(mt){return mt=mt==null?Jt:Math.pow(Jt,mt),new De(this.r*mt,this.g*mt,this.b*mt,this.opacity)},darker:function(mt){return mt=mt==null?Be:Math.pow(Be,mt),new De(this.r*mt,this.g*mt,this.b*mt,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:an,formatHex:an,formatRgb:_e,toString:_e}));function an(){return"#"+Me(this.r)+Me(this.g)+Me(this.b)}function _e(){var mt=this.opacity;return mt=isNaN(mt)?1:Math.max(0,Math.min(1,mt)),(mt===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))+(mt===1?")":", "+mt+")")}function Me(mt){return mt=Math.max(0,Math.min(255,Math.round(mt)||0)),(mt<16?"0":"")+mt.toString(16)}function pn(mt,U,X,Z){return Z<=0?mt=U=X=NaN:X<=0||X>=1?mt=U=NaN:U<=0&&(mt=NaN),new ln(mt,U,X,Z)}function Ln(mt){if(mt instanceof ln)return new ln(mt.h,mt.s,mt.l,mt.opacity);if(mt instanceof ye||(mt=Ke(mt)),!mt)return new ln;if(mt instanceof ln)return mt;mt=mt.rgb();var U=mt.r/255,X=mt.g/255,Z=mt.b/255,it=Math.min(U,X,Z),ct=Math.max(U,X,Z),zt=NaN,Ct=ct-it,ee=(ct+it)/2;return Ct?(U===ct?zt=(X-Z)/Ct+(X<Z)*6:X===ct?zt=(Z-U)/Ct+2:zt=(U-X)/Ct+4,Ct/=ee<.5?ct+it:2-ct-it,zt*=60):Ct=ee>0&&ee<1?0:zt,new ln(zt,Ct,ee,mt.opacity)}function qn(mt,U,X,Z){return arguments.length===1?Ln(mt):new ln(mt,U,X,Z==null?1:Z)}function ln(mt,U,X,Z){this.h=+mt,this.s=+U,this.l=+X,this.opacity=+Z}_t(ln,qn,Nt(ye,{brighter:function(mt){return mt=mt==null?Jt:Math.pow(Jt,mt),new ln(this.h,this.s,this.l*mt,this.opacity)},darker:function(mt){return mt=mt==null?Be:Math.pow(Be,mt),new ln(this.h,this.s,this.l*mt,this.opacity)},rgb:function(){var mt=this.h%360+(this.h<0)*360,U=isNaN(mt)||isNaN(this.s)?0:this.s,X=this.l,Z=X+(X<.5?X:1-X)*U,it=2*X-Z;return new De(fn(mt>=240?mt-240:mt+120,it,Z),fn(mt,it,Z),fn(mt<120?mt+240:mt-120,it,Z),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 mt=this.opacity;return mt=isNaN(mt)?1:Math.max(0,Math.min(1,mt)),(mt===1?"hsl(":"hsla(")+(this.h||0)+", "+(this.s||0)*100+"%, "+(this.l||0)*100+"%"+(mt===1?")":", "+mt+")")}}));function fn(mt,U,X){return(mt<60?U+(X-U)*mt/60:mt<180?X:mt<240?U+(X-U)*(240-mt)/60:U)*255}},2337:function(Ve){"use strict";var Ge=Object.prototype.hasOwnProperty,gt="~";function _t(){}Object.create&&(_t.prototype=Object.create(null),new _t().__proto__||(gt=!1));function Nt(he,ie,Ht){this.fn=he,this.context=ie,this.once=Ht||!1}function ye(he,ie,Ht,yt,pe){if(typeof Ht!="function")throw new TypeError("The listener must be a function");var Zt=new Nt(Ht,yt||he,pe),$t=gt?gt+ie:ie;return he._events[$t]?he._events[$t].fn?he._events[$t]=[he._events[$t],Zt]:he._events[$t].push(Zt):(he._events[$t]=Zt,he._eventsCount++),he}function Be(he,ie){--he._eventsCount===0?he._events=new _t:delete he._events[ie]}function Jt(){this._events=new _t,this._eventsCount=0}Jt.prototype.eventNames=function(){var ie=[],Ht,yt;if(this._eventsCount===0)return ie;for(yt in Ht=this._events)Ge.call(Ht,yt)&&ie.push(gt?yt.slice(1):yt);return Object.getOwnPropertySymbols?ie.concat(Object.getOwnPropertySymbols(Ht)):ie},Jt.prototype.listeners=function(ie){var Ht=gt?gt+ie:ie,yt=this._events[Ht];if(!yt)return[];if(yt.fn)return[yt.fn];for(var pe=0,Zt=yt.length,$t=new Array(Zt);pe<Zt;pe++)$t[pe]=yt[pe].fn;return $t},Jt.prototype.listenerCount=function(ie){var Ht=gt?gt+ie:ie,yt=this._events[Ht];return yt?yt.fn?1:yt.length:0},Jt.prototype.emit=function(ie,Ht,yt,pe,Zt,$t){var te=gt?gt+ie:ie;if(!this._events[te])return!1;var Bt=this._events[te],It=arguments.length,kt,Ft;if(Bt.fn){switch(Bt.once&&this.removeListener(ie,Bt.fn,void 0,!0),It){case 1:return Bt.fn.call(Bt.context),!0;case 2:return Bt.fn.call(Bt.context,Ht),!0;case 3:return Bt.fn.call(Bt.context,Ht,yt),!0;case 4:return Bt.fn.call(Bt.context,Ht,yt,pe),!0;case 5:return Bt.fn.call(Bt.context,Ht,yt,pe,Zt),!0;case 6:return Bt.fn.call(Bt.context,Ht,yt,pe,Zt,$t),!0}for(Ft=1,kt=new Array(It-1);Ft<It;Ft++)kt[Ft-1]=arguments[Ft];Bt.fn.apply(Bt.context,kt)}else{var Se=Bt.length,Re;for(Ft=0;Ft<Se;Ft++)switch(Bt[Ft].once&&this.removeListener(ie,Bt[Ft].fn,void 0,!0),It){case 1:Bt[Ft].fn.call(Bt[Ft].context);break;case 2:Bt[Ft].fn.call(Bt[Ft].context,Ht);break;case 3:Bt[Ft].fn.call(Bt[Ft].context,Ht,yt);break;case 4:Bt[Ft].fn.call(Bt[Ft].context,Ht,yt,pe);break;default:if(!kt)for(Re=1,kt=new Array(It-1);Re<It;Re++)kt[Re-1]=arguments[Re];Bt[Ft].fn.apply(Bt[Ft].context,kt)}}return!0},Jt.prototype.on=function(ie,Ht,yt){return ye(this,ie,Ht,yt,!1)},Jt.prototype.once=function(ie,Ht,yt){return ye(this,ie,Ht,yt,!0)},Jt.prototype.removeListener=function(ie,Ht,yt,pe){var Zt=gt?gt+ie:ie;if(!this._events[Zt])return this;if(!Ht)return Be(this,Zt),this;var $t=this._events[Zt];if($t.fn)$t.fn===Ht&&(!pe||$t.once)&&(!yt||$t.context===yt)&&Be(this,Zt);else{for(var te=0,Bt=[],It=$t.length;te<It;te++)($t[te].fn!==Ht||pe&&!$t[te].once||yt&&$t[te].context!==yt)&&Bt.push($t[te]);Bt.length?this._events[Zt]=Bt.length===1?Bt[0]:Bt:Be(this,Zt)}return this},Jt.prototype.removeAllListeners=function(ie){var Ht;return ie?(Ht=gt?gt+ie:ie,this._events[Ht]&&Be(this,Ht)):(this._events=new _t,this._eventsCount=0),this},Jt.prototype.off=Jt.prototype.removeListener,Jt.prototype.addListener=Jt.prototype.on,Jt.prefixed=gt,Jt.EventEmitter=Jt,Ve.exports=Jt},52827:function(Ve,Ge){(function(gt,_t){_t(Ge)})(this,function(gt){"use strict";function _t(te,Bt,It,kt){kt=kt||{};var Ft=kt.maxIterations||100,Se=kt.tolerance||1e-10,Re=te(Bt),Ke=te(It),We=It-Bt;if(Re*Ke>0)throw"Initial bisect points must have opposite signs";if(Re===0)return Bt;if(Ke===0)return It;for(var Ze=0;Ze<Ft;++Ze){We/=2;var cn=Bt+We,He=te(cn);if(He*Re>=0&&(Bt=cn),Math.abs(We)<Se||He===0)return cn}return Bt+We}function Nt(te){for(var Bt=new Array(te),It=0;It<te;++It)Bt[It]=0;return Bt}function ye(te,Bt){return Nt(te).map(function(){return Nt(Bt)})}function Be(te,Bt){for(var It=0,kt=0;kt<te.length;++kt)It+=te[kt]*Bt[kt];return It}function Jt(te){return Math.sqrt(Be(te,te))}function he(te,Bt,It){for(var kt=0;kt<Bt.length;++kt)te[kt]=Bt[kt]*It}function ie(te,Bt,It,kt,Ft){for(var Se=0;Se<te.length;++Se)te[Se]=Bt*It[Se]+kt*Ft[Se]}function Ht(te,Bt,It){It=It||{};var kt=It.maxIterations||Bt.length*200,Ft=It.nonZeroDelta||1.05,Se=It.zeroDelta||.001,Re=It.minErrorDelta||1e-6,Ke=It.minErrorDelta||1e-5,We=It.rho!==void 0?It.rho:1,Ze=It.chi!==void 0?It.chi:2,cn=It.psi!==void 0?It.psi:-.5,He=It.sigma!==void 0?It.sigma:.5,De,an=Bt.length,_e=new Array(an+1);_e[0]=Bt,_e[0].fx=te(Bt),_e[0].id=0;for(var Me=0;Me<an;++Me){var pn=Bt.slice();pn[Me]=pn[Me]?pn[Me]*Ft:Se,_e[Me+1]=pn,_e[Me+1].fx=te(pn),_e[Me+1].id=Me+1}function Ln(Ct){for(var ee=0;ee<Ct.length;ee++)_e[an][ee]=Ct[ee];_e[an].fx=Ct.fx}for(var qn=function(Ct,ee){return Ct.fx-ee.fx},ln=Bt.slice(),fn=Bt.slice(),mt=Bt.slice(),U=Bt.slice(),X=0;X<kt;++X){if(_e.sort(qn),It.history){var Z=_e.map(function(Ct){var ee=Ct.slice();return ee.fx=Ct.fx,ee.id=Ct.id,ee});Z.sort(function(Ct,ee){return Ct.id-ee.id}),It.history.push({x:_e[0].slice(),fx:_e[0].fx,simplex:Z})}for(De=0,Me=0;Me<an;++Me)De=Math.max(De,Math.abs(_e[0][Me]-_e[1][Me]));if(Math.abs(_e[0].fx-_e[an].fx)<Re&&De<Ke)break;for(Me=0;Me<an;++Me){ln[Me]=0;for(var it=0;it<an;++it)ln[Me]+=_e[it][Me];ln[Me]/=an}var ct=_e[an];if(ie(fn,1+We,ln,-We,ct),fn.fx=te(fn),fn.fx<_e[0].fx)ie(U,1+Ze,ln,-Ze,ct),U.fx=te(U),U.fx<fn.fx?Ln(U):Ln(fn);else if(fn.fx>=_e[an-1].fx){var zt=!1;if(fn.fx>ct.fx?(ie(mt,1+cn,ln,-cn,ct),mt.fx=te(mt),mt.fx<ct.fx?Ln(mt):zt=!0):(ie(mt,1-cn*We,ln,cn*We,ct),mt.fx=te(mt),mt.fx<fn.fx?Ln(mt):zt=!0),zt){if(He>=1)break;for(Me=1;Me<_e.length;++Me)ie(_e[Me],1-He,_e[0],He,_e[Me]),_e[Me].fx=te(_e[Me])}}else Ln(fn)}return _e.sort(qn),{fx:_e[0].fx,x:_e[0]}}function yt(te,Bt,It,kt,Ft,Se,Re){var Ke=It.fx,We=Be(It.fxprime,Bt),Ze=Ke,cn=Ke,He=We,De=0;Ft=Ft||1,Se=Se||1e-6,Re=Re||.1;function an(Me,pn,Ln){for(var qn=0;qn<16;++qn)if(Ft=(Me+pn)/2,ie(kt.x,1,It.x,Ft,Bt),Ze=kt.fx=te(kt.x,kt.fxprime),He=Be(kt.fxprime,Bt),Ze>Ke+Se*Ft*We||Ze>=Ln)pn=Ft;else{if(Math.abs(He)<=-Re*We)return Ft;He*(pn-Me)>=0&&(pn=Me),Me=Ft,Ln=Ze}return 0}for(var _e=0;_e<10;++_e){if(ie(kt.x,1,It.x,Ft,Bt),Ze=kt.fx=te(kt.x,kt.fxprime),He=Be(kt.fxprime,Bt),Ze>Ke+Se*Ft*We||_e&&Ze>=cn)return an(De,Ft,cn);if(Math.abs(He)<=-Re*We)return Ft;if(He>=0)return an(Ft,De,Ze);cn=Ze,De=Ft,Ft*=2}return Ft}function pe(te,Bt,It){var kt={x:Bt.slice(),fx:0,fxprime:Bt.slice()},Ft={x:Bt.slice(),fx:0,fxprime:Bt.slice()},Se=Bt.slice(),Re,Ke,We=1,Ze;It=It||{},Ze=It.maxIterations||Bt.length*20,kt.fx=te(kt.x,kt.fxprime),Re=kt.fxprime.slice(),he(Re,kt.fxprime,-1);for(var cn=0;cn<Ze;++cn){if(We=yt(te,Re,kt,Ft,We),It.history&&It.history.push({x:kt.x.slice(),fx:kt.fx,fxprime:kt.fxprime.slice(),alpha:We}),!We)he(Re,kt.fxprime,-1);else{ie(Se,1,Ft.fxprime,-1,kt.fxprime);var He=Be(kt.fxprime,kt.fxprime),De=Math.max(0,Be(Se,Ft.fxprime)/He);ie(Re,De,Re,-1,Ft.fxprime),Ke=kt,kt=Ft,Ft=Ke}if(Jt(kt.fxprime)<=1e-5)break}return It.history&&It.history.push({x:kt.x.slice(),fx:kt.fx,fxprime:kt.fxprime.slice(),alpha:We}),kt}function Zt(te,Bt,It){It=It||{};for(var kt=It.maxIterations||Bt.length*100,Ft=It.learnRate||.001,Se={x:Bt.slice(),fx:0,fxprime:Bt.slice()},Re=0;Re<kt&&(Se.fx=te(Se.x,Se.fxprime),It.history&&It.history.push({x:Se.x.slice(),fx:Se.fx,fxprime:Se.fxprime.slice()}),ie(Se.x,1,Se.x,-Ft,Se.fxprime),!(Jt(Se.fxprime)<=1e-5));++Re);return Se}function $t(te,Bt,It){It=It||{};var kt={x:Bt.slice(),fx:0,fxprime:Bt.slice()},Ft={x:Bt.slice(),fx:0,fxprime:Bt.slice()},Se=It.maxIterations||Bt.length*100,Re=It.learnRate||1,Ke=Bt.slice(),We=It.c1||.001,Ze=It.c2||.1,cn,He=[];if(It.history){var De=te;te=function(_e,Me){return He.push(_e.slice()),De(_e,Me)}}kt.fx=te(kt.x,kt.fxprime);for(var an=0;an<Se&&(he(Ke,kt.fxprime,-1),Re=yt(te,Ke,kt,Ft,Re,We,Ze),It.history&&(It.history.push({x:kt.x.slice(),fx:kt.fx,fxprime:kt.fxprime.slice(),functionCalls:He,learnRate:Re,alpha:Re}),He=[]),cn=kt,kt=Ft,Ft=cn,!(Re===0||Jt(kt.fxprime)<1e-5));++an);return kt}gt.bisect=_t,gt.nelderMead=Ht,gt.conjugateGradient=pe,gt.gradientDescent=Zt,gt.gradientDescentLineSearch=$t,gt.zeros=Nt,gt.zerosM=ye,gt.norm2=Jt,gt.weightedSum=ie,gt.scale=he})},31767:function(Ve,Ge,gt){"use strict";gt.d(Ge,{FD:function(){return ye},Ib:function(){return _t},WT:function(){return Nt}});var _t=1e-6,Nt=typeof Float32Array!="undefined"?Float32Array:Array,ye=Math.random;function Be(Ht){Nt=Ht}var Jt=Math.PI/180;function he(Ht){return Ht*Jt}function ie(Ht,yt){return Math.abs(Ht-yt)<=_t*Math.max(1,Math.abs(Ht),Math.abs(yt))}Math.hypot||(Math.hypot=function(){for(var Ht=0,yt=arguments.length;yt--;)Ht+=arguments[yt]*arguments[yt];return Math.sqrt(Ht)})},39536:function(Ve,Ge,gt){"use strict";gt.r(Ge),gt.d(Ge,{add:function(){return vt},adjoint:function(){return pe},clone:function(){return ye},copy:function(){return Be},create:function(){return Nt},determinant:function(){return Zt},equals:function(){return H},exactEquals:function(){return wt},frob:function(){return ut},fromQuat:function(){return ln},fromQuat2:function(){return an},fromRotation:function(){return We},fromRotationTranslation:function(){return De},fromRotationTranslationScale:function(){return Ln},fromRotationTranslationScaleOrigin:function(){return qn},fromScaling:function(){return Ke},fromTranslation:function(){return Re},fromValues:function(){return Jt},fromXRotation:function(){return Ze},fromYRotation:function(){return cn},fromZRotation:function(){return He},frustum:function(){return fn},getRotation:function(){return pn},getScaling:function(){return Me},getTranslation:function(){return _e},identity:function(){return ie},invert:function(){return yt},lookAt:function(){return Ct},mul:function(){return tt},multiply:function(){return $t},multiplyScalar:function(){return et},multiplyScalarAndAdd:function(){return ft},ortho:function(){return ct},orthoNO:function(){return it},orthoZO:function(){return zt},perspective:function(){return U},perspectiveFromFieldOfView:function(){return Z},perspectiveNO:function(){return mt},perspectiveZO:function(){return X},rotate:function(){return It},rotateX:function(){return kt},rotateY:function(){return Ft},rotateZ:function(){return Se},scale:function(){return Bt},set:function(){return he},str:function(){return $},sub:function(){return ht},subtract:function(){return Ut},targetTo:function(){return ee},translate:function(){return te},transpose:function(){return Ht}});var _t=gt(31767);function Nt(){var x=new _t.WT(16);return _t.WT!=Float32Array&&(x[1]=0,x[2]=0,x[3]=0,x[4]=0,x[6]=0,x[7]=0,x[8]=0,x[9]=0,x[11]=0,x[12]=0,x[13]=0,x[14]=0),x[0]=1,x[5]=1,x[10]=1,x[15]=1,x}function ye(x){var T=new _t.WT(16);return T[0]=x[0],T[1]=x[1],T[2]=x[2],T[3]=x[3],T[4]=x[4],T[5]=x[5],T[6]=x[6],T[7]=x[7],T[8]=x[8],T[9]=x[9],T[10]=x[10],T[11]=x[11],T[12]=x[12],T[13]=x[13],T[14]=x[14],T[15]=x[15],T}function Be(x,T){return x[0]=T[0],x[1]=T[1],x[2]=T[2],x[3]=T[3],x[4]=T[4],x[5]=T[5],x[6]=T[6],x[7]=T[7],x[8]=T[8],x[9]=T[9],x[10]=T[10],x[11]=T[11],x[12]=T[12],x[13]=T[13],x[14]=T[14],x[15]=T[15],x}function Jt(x,T,W,K,nt,ot,xt,Ot,Et,Tt,Gt,jt,Vt,Wt,Qt,se){var Mt=new _t.WT(16);return Mt[0]=x,Mt[1]=T,Mt[2]=W,Mt[3]=K,Mt[4]=nt,Mt[5]=ot,Mt[6]=xt,Mt[7]=Ot,Mt[8]=Et,Mt[9]=Tt,Mt[10]=Gt,Mt[11]=jt,Mt[12]=Vt,Mt[13]=Wt,Mt[14]=Qt,Mt[15]=se,Mt}function he(x,T,W,K,nt,ot,xt,Ot,Et,Tt,Gt,jt,Vt,Wt,Qt,se,Mt){return x[0]=T,x[1]=W,x[2]=K,x[3]=nt,x[4]=ot,x[5]=xt,x[6]=Ot,x[7]=Et,x[8]=Tt,x[9]=Gt,x[10]=jt,x[11]=Vt,x[12]=Wt,x[13]=Qt,x[14]=se,x[15]=Mt,x}function ie(x){return x[0]=1,x[1]=0,x[2]=0,x[3]=0,x[4]=0,x[5]=1,x[6]=0,x[7]=0,x[8]=0,x[9]=0,x[10]=1,x[11]=0,x[12]=0,x[13]=0,x[14]=0,x[15]=1,x}function Ht(x,T){if(x===T){var W=T[1],K=T[2],nt=T[3],ot=T[6],xt=T[7],Ot=T[11];x[1]=T[4],x[2]=T[8],x[3]=T[12],x[4]=W,x[6]=T[9],x[7]=T[13],x[8]=K,x[9]=ot,x[11]=T[14],x[12]=nt,x[13]=xt,x[14]=Ot}else x[0]=T[0],x[1]=T[4],x[2]=T[8],x[3]=T[12],x[4]=T[1],x[5]=T[5],x[6]=T[9],x[7]=T[13],x[8]=T[2],x[9]=T[6],x[10]=T[10],x[11]=T[14],x[12]=T[3],x[13]=T[7],x[14]=T[11],x[15]=T[15];return x}function yt(x,T){var W=T[0],K=T[1],nt=T[2],ot=T[3],xt=T[4],Ot=T[5],Et=T[6],Tt=T[7],Gt=T[8],jt=T[9],Vt=T[10],Wt=T[11],Qt=T[12],se=T[13],Mt=T[14],Oe=T[15],Xe=W*Ot-K*xt,Ee=W*Et-nt*xt,Pe=W*Tt-ot*xt,Ne=K*Et-nt*Ot,Le=K*Tt-ot*Ot,jn=nt*Tt-ot*Et,Dn=Gt*se-jt*Qt,Bn=Gt*Mt-Vt*Qt,Fn=Gt*Oe-Wt*Qt,On=jt*Mt-Vt*se,gn=jt*Oe-Wt*se,or=Vt*Oe-Wt*Mt,dn=Xe*or-Ee*gn+Pe*On+Ne*Fn-Le*Bn+jn*Dn;return dn?(dn=1/dn,x[0]=(Ot*or-Et*gn+Tt*On)*dn,x[1]=(nt*gn-K*or-ot*On)*dn,x[2]=(se*jn-Mt*Le+Oe*Ne)*dn,x[3]=(Vt*Le-jt*jn-Wt*Ne)*dn,x[4]=(Et*Fn-xt*or-Tt*Bn)*dn,x[5]=(W*or-nt*Fn+ot*Bn)*dn,x[6]=(Mt*Pe-Qt*jn-Oe*Ee)*dn,x[7]=(Gt*jn-Vt*Pe+Wt*Ee)*dn,x[8]=(xt*gn-Ot*Fn+Tt*Dn)*dn,x[9]=(K*Fn-W*gn-ot*Dn)*dn,x[10]=(Qt*Le-se*Pe+Oe*Xe)*dn,x[11]=(jt*Pe-Gt*Le-Wt*Xe)*dn,x[12]=(Ot*Bn-xt*On-Et*Dn)*dn,x[13]=(W*On-K*Bn+nt*Dn)*dn,x[14]=(se*Ee-Qt*Ne-Mt*Xe)*dn,x[15]=(Gt*Ne-jt*Ee+Vt*Xe)*dn,x):null}function pe(x,T){var W=T[0],K=T[1],nt=T[2],ot=T[3],xt=T[4],Ot=T[5],Et=T[6],Tt=T[7],Gt=T[8],jt=T[9],Vt=T[10],Wt=T[11],Qt=T[12],se=T[13],Mt=T[14],Oe=T[15];return x[0]=Ot*(Vt*Oe-Wt*Mt)-jt*(Et*Oe-Tt*Mt)+se*(Et*Wt-Tt*Vt),x[1]=-(K*(Vt*Oe-Wt*Mt)-jt*(nt*Oe-ot*Mt)+se*(nt*Wt-ot*Vt)),x[2]=K*(Et*Oe-Tt*Mt)-Ot*(nt*Oe-ot*Mt)+se*(nt*Tt-ot*Et),x[3]=-(K*(Et*Wt-Tt*Vt)-Ot*(nt*Wt-ot*Vt)+jt*(nt*Tt-ot*Et)),x[4]=-(xt*(Vt*Oe-Wt*Mt)-Gt*(Et*Oe-Tt*Mt)+Qt*(Et*Wt-Tt*Vt)),x[5]=W*(Vt*Oe-Wt*Mt)-Gt*(nt*Oe-ot*Mt)+Qt*(nt*Wt-ot*Vt),x[6]=-(W*(Et*Oe-Tt*Mt)-xt*(nt*Oe-ot*Mt)+Qt*(nt*Tt-ot*Et)),x[7]=W*(Et*Wt-Tt*Vt)-xt*(nt*Wt-ot*Vt)+Gt*(nt*Tt-ot*Et),x[8]=xt*(jt*Oe-Wt*se)-Gt*(Ot*Oe-Tt*se)+Qt*(Ot*Wt-Tt*jt),x[9]=-(W*(jt*Oe-Wt*se)-Gt*(K*Oe-ot*se)+Qt*(K*Wt-ot*jt)),x[10]=W*(Ot*Oe-Tt*se)-xt*(K*Oe-ot*se)+Qt*(K*Tt-ot*Ot),x[11]=-(W*(Ot*Wt-Tt*jt)-xt*(K*Wt-ot*jt)+Gt*(K*Tt-ot*Ot)),x[12]=-(xt*(jt*Mt-Vt*se)-Gt*(Ot*Mt-Et*se)+Qt*(Ot*Vt-Et*jt)),x[13]=W*(jt*Mt-Vt*se)-Gt*(K*Mt-nt*se)+Qt*(K*Vt-nt*jt),x[14]=-(W*(Ot*Mt-Et*se)-xt*(K*Mt-nt*se)+Qt*(K*Et-nt*Ot)),x[15]=W*(Ot*Vt-Et*jt)-xt*(K*Vt-nt*jt)+Gt*(K*Et-nt*Ot),x}function Zt(x){var T=x[0],W=x[1],K=x[2],nt=x[3],ot=x[4],xt=x[5],Ot=x[6],Et=x[7],Tt=x[8],Gt=x[9],jt=x[10],Vt=x[11],Wt=x[12],Qt=x[13],se=x[14],Mt=x[15],Oe=T*xt-W*ot,Xe=T*Ot-K*ot,Ee=T*Et-nt*ot,Pe=W*Ot-K*xt,Ne=W*Et-nt*xt,Le=K*Et-nt*Ot,jn=Tt*Qt-Gt*Wt,Dn=Tt*se-jt*Wt,Bn=Tt*Mt-Vt*Wt,Fn=Gt*se-jt*Qt,On=Gt*Mt-Vt*Qt,gn=jt*Mt-Vt*se;return Oe*gn-Xe*On+Ee*Fn+Pe*Bn-Ne*Dn+Le*jn}function $t(x,T,W){var K=T[0],nt=T[1],ot=T[2],xt=T[3],Ot=T[4],Et=T[5],Tt=T[6],Gt=T[7],jt=T[8],Vt=T[9],Wt=T[10],Qt=T[11],se=T[12],Mt=T[13],Oe=T[14],Xe=T[15],Ee=W[0],Pe=W[1],Ne=W[2],Le=W[3];return x[0]=Ee*K+Pe*Ot+Ne*jt+Le*se,x[1]=Ee*nt+Pe*Et+Ne*Vt+Le*Mt,x[2]=Ee*ot+Pe*Tt+Ne*Wt+Le*Oe,x[3]=Ee*xt+Pe*Gt+Ne*Qt+Le*Xe,Ee=W[4],Pe=W[5],Ne=W[6],Le=W[7],x[4]=Ee*K+Pe*Ot+Ne*jt+Le*se,x[5]=Ee*nt+Pe*Et+Ne*Vt+Le*Mt,x[6]=Ee*ot+Pe*Tt+Ne*Wt+Le*Oe,x[7]=Ee*xt+Pe*Gt+Ne*Qt+Le*Xe,Ee=W[8],Pe=W[9],Ne=W[10],Le=W[11],x[8]=Ee*K+Pe*Ot+Ne*jt+Le*se,x[9]=Ee*nt+Pe*Et+Ne*Vt+Le*Mt,x[10]=Ee*ot+Pe*Tt+Ne*Wt+Le*Oe,x[11]=Ee*xt+Pe*Gt+Ne*Qt+Le*Xe,Ee=W[12],Pe=W[13],Ne=W[14],Le=W[15],x[12]=Ee*K+Pe*Ot+Ne*jt+Le*se,x[13]=Ee*nt+Pe*Et+Ne*Vt+Le*Mt,x[14]=Ee*ot+Pe*Tt+Ne*Wt+Le*Oe,x[15]=Ee*xt+Pe*Gt+Ne*Qt+Le*Xe,x}function te(x,T,W){var K=W[0],nt=W[1],ot=W[2],xt,Ot,Et,Tt,Gt,jt,Vt,Wt,Qt,se,Mt,Oe;return T===x?(x[12]=T[0]*K+T[4]*nt+T[8]*ot+T[12],x[13]=T[1]*K+T[5]*nt+T[9]*ot+T[13],x[14]=T[2]*K+T[6]*nt+T[10]*ot+T[14],x[15]=T[3]*K+T[7]*nt+T[11]*ot+T[15]):(xt=T[0],Ot=T[1],Et=T[2],Tt=T[3],Gt=T[4],jt=T[5],Vt=T[6],Wt=T[7],Qt=T[8],se=T[9],Mt=T[10],Oe=T[11],x[0]=xt,x[1]=Ot,x[2]=Et,x[3]=Tt,x[4]=Gt,x[5]=jt,x[6]=Vt,x[7]=Wt,x[8]=Qt,x[9]=se,x[10]=Mt,x[11]=Oe,x[12]=xt*K+Gt*nt+Qt*ot+T[12],x[13]=Ot*K+jt*nt+se*ot+T[13],x[14]=Et*K+Vt*nt+Mt*ot+T[14],x[15]=Tt*K+Wt*nt+Oe*ot+T[15]),x}function Bt(x,T,W){var K=W[0],nt=W[1],ot=W[2];return x[0]=T[0]*K,x[1]=T[1]*K,x[2]=T[2]*K,x[3]=T[3]*K,x[4]=T[4]*nt,x[5]=T[5]*nt,x[6]=T[6]*nt,x[7]=T[7]*nt,x[8]=T[8]*ot,x[9]=T[9]*ot,x[10]=T[10]*ot,x[11]=T[11]*ot,x[12]=T[12],x[13]=T[13],x[14]=T[14],x[15]=T[15],x}function It(x,T,W,K){var nt=K[0],ot=K[1],xt=K[2],Ot=Math.hypot(nt,ot,xt),Et,Tt,Gt,jt,Vt,Wt,Qt,se,Mt,Oe,Xe,Ee,Pe,Ne,Le,jn,Dn,Bn,Fn,On,gn,or,dn,Qr;return Ot<_t.Ib?null:(Ot=1/Ot,nt*=Ot,ot*=Ot,xt*=Ot,Et=Math.sin(W),Tt=Math.cos(W),Gt=1-Tt,jt=T[0],Vt=T[1],Wt=T[2],Qt=T[3],se=T[4],Mt=T[5],Oe=T[6],Xe=T[7],Ee=T[8],Pe=T[9],Ne=T[10],Le=T[11],jn=nt*nt*Gt+Tt,Dn=ot*nt*Gt+xt*Et,Bn=xt*nt*Gt-ot*Et,Fn=nt*ot*Gt-xt*Et,On=ot*ot*Gt+Tt,gn=xt*ot*Gt+nt*Et,or=nt*xt*Gt+ot*Et,dn=ot*xt*Gt-nt*Et,Qr=xt*xt*Gt+Tt,x[0]=jt*jn+se*Dn+Ee*Bn,x[1]=Vt*jn+Mt*Dn+Pe*Bn,x[2]=Wt*jn+Oe*Dn+Ne*Bn,x[3]=Qt*jn+Xe*Dn+Le*Bn,x[4]=jt*Fn+se*On+Ee*gn,x[5]=Vt*Fn+Mt*On+Pe*gn,x[6]=Wt*Fn+Oe*On+Ne*gn,x[7]=Qt*Fn+Xe*On+Le*gn,x[8]=jt*or+se*dn+Ee*Qr,x[9]=Vt*or+Mt*dn+Pe*Qr,x[10]=Wt*or+Oe*dn+Ne*Qr,x[11]=Qt*or+Xe*dn+Le*Qr,T!==x&&(x[12]=T[12],x[13]=T[13],x[14]=T[14],x[15]=T[15]),x)}function kt(x,T,W){var K=Math.sin(W),nt=Math.cos(W),ot=T[4],xt=T[5],Ot=T[6],Et=T[7],Tt=T[8],Gt=T[9],jt=T[10],Vt=T[11];return T!==x&&(x[0]=T[0],x[1]=T[1],x[2]=T[2],x[3]=T[3],x[12]=T[12],x[13]=T[13],x[14]=T[14],x[15]=T[15]),x[4]=ot*nt+Tt*K,x[5]=xt*nt+Gt*K,x[6]=Ot*nt+jt*K,x[7]=Et*nt+Vt*K,x[8]=Tt*nt-ot*K,x[9]=Gt*nt-xt*K,x[10]=jt*nt-Ot*K,x[11]=Vt*nt-Et*K,x}function Ft(x,T,W){var K=Math.sin(W),nt=Math.cos(W),ot=T[0],xt=T[1],Ot=T[2],Et=T[3],Tt=T[8],Gt=T[9],jt=T[10],Vt=T[11];return T!==x&&(x[4]=T[4],x[5]=T[5],x[6]=T[6],x[7]=T[7],x[12]=T[12],x[13]=T[13],x[14]=T[14],x[15]=T[15]),x[0]=ot*nt-Tt*K,x[1]=xt*nt-Gt*K,x[2]=Ot*nt-jt*K,x[3]=Et*nt-Vt*K,x[8]=ot*K+Tt*nt,x[9]=xt*K+Gt*nt,x[10]=Ot*K+jt*nt,x[11]=Et*K+Vt*nt,x}function Se(x,T,W){var K=Math.sin(W),nt=Math.cos(W),ot=T[0],xt=T[1],Ot=T[2],Et=T[3],Tt=T[4],Gt=T[5],jt=T[6],Vt=T[7];return T!==x&&(x[8]=T[8],x[9]=T[9],x[10]=T[10],x[11]=T[11],x[12]=T[12],x[13]=T[13],x[14]=T[14],x[15]=T[15]),x[0]=ot*nt+Tt*K,x[1]=xt*nt+Gt*K,x[2]=Ot*nt+jt*K,x[3]=Et*nt+Vt*K,x[4]=Tt*nt-ot*K,x[5]=Gt*nt-xt*K,x[6]=jt*nt-Ot*K,x[7]=Vt*nt-Et*K,x}function Re(x,T){return x[0]=1,x[1]=0,x[2]=0,x[3]=0,x[4]=0,x[5]=1,x[6]=0,x[7]=0,x[8]=0,x[9]=0,x[10]=1,x[11]=0,x[12]=T[0],x[13]=T[1],x[14]=T[2],x[15]=1,x}function Ke(x,T){return x[0]=T[0],x[1]=0,x[2]=0,x[3]=0,x[4]=0,x[5]=T[1],x[6]=0,x[7]=0,x[8]=0,x[9]=0,x[10]=T[2],x[11]=0,x[12]=0,x[13]=0,x[14]=0,x[15]=1,x}function We(x,T,W){var K=W[0],nt=W[1],ot=W[2],xt=Math.hypot(K,nt,ot),Ot,Et,Tt;return xt<_t.Ib?null:(xt=1/xt,K*=xt,nt*=xt,ot*=xt,Ot=Math.sin(T),Et=Math.cos(T),Tt=1-Et,x[0]=K*K*Tt+Et,x[1]=nt*K*Tt+ot*Ot,x[2]=ot*K*Tt-nt*Ot,x[3]=0,x[4]=K*nt*Tt-ot*Ot,x[5]=nt*nt*Tt+Et,x[6]=ot*nt*Tt+K*Ot,x[7]=0,x[8]=K*ot*Tt+nt*Ot,x[9]=nt*ot*Tt-K*Ot,x[10]=ot*ot*Tt+Et,x[11]=0,x[12]=0,x[13]=0,x[14]=0,x[15]=1,x)}function Ze(x,T){var W=Math.sin(T),K=Math.cos(T);return x[0]=1,x[1]=0,x[2]=0,x[3]=0,x[4]=0,x[5]=K,x[6]=W,x[7]=0,x[8]=0,x[9]=-W,x[10]=K,x[11]=0,x[12]=0,x[13]=0,x[14]=0,x[15]=1,x}function cn(x,T){var W=Math.sin(T),K=Math.cos(T);return x[0]=K,x[1]=0,x[2]=-W,x[3]=0,x[4]=0,x[5]=1,x[6]=0,x[7]=0,x[8]=W,x[9]=0,x[10]=K,x[11]=0,x[12]=0,x[13]=0,x[14]=0,x[15]=1,x}function He(x,T){var W=Math.sin(T),K=Math.cos(T);return x[0]=K,x[1]=W,x[2]=0,x[3]=0,x[4]=-W,x[5]=K,x[6]=0,x[7]=0,x[8]=0,x[9]=0,x[10]=1,x[11]=0,x[12]=0,x[13]=0,x[14]=0,x[15]=1,x}function De(x,T,W){var K=T[0],nt=T[1],ot=T[2],xt=T[3],Ot=K+K,Et=nt+nt,Tt=ot+ot,Gt=K*Ot,jt=K*Et,Vt=K*Tt,Wt=nt*Et,Qt=nt*Tt,se=ot*Tt,Mt=xt*Ot,Oe=xt*Et,Xe=xt*Tt;return x[0]=1-(Wt+se),x[1]=jt+Xe,x[2]=Vt-Oe,x[3]=0,x[4]=jt-Xe,x[5]=1-(Gt+se),x[6]=Qt+Mt,x[7]=0,x[8]=Vt+Oe,x[9]=Qt-Mt,x[10]=1-(Gt+Wt),x[11]=0,x[12]=W[0],x[13]=W[1],x[14]=W[2],x[15]=1,x}function an(x,T){var W=new _t.WT(3),K=-T[0],nt=-T[1],ot=-T[2],xt=T[3],Ot=T[4],Et=T[5],Tt=T[6],Gt=T[7],jt=K*K+nt*nt+ot*ot+xt*xt;return jt>0?(W[0]=(Ot*xt+Gt*K+Et*ot-Tt*nt)*2/jt,W[1]=(Et*xt+Gt*nt+Tt*K-Ot*ot)*2/jt,W[2]=(Tt*xt+Gt*ot+Ot*nt-Et*K)*2/jt):(W[0]=(Ot*xt+Gt*K+Et*ot-Tt*nt)*2,W[1]=(Et*xt+Gt*nt+Tt*K-Ot*ot)*2,W[2]=(Tt*xt+Gt*ot+Ot*nt-Et*K)*2),De(x,T,W),x}function _e(x,T){return x[0]=T[12],x[1]=T[13],x[2]=T[14],x}function Me(x,T){var W=T[0],K=T[1],nt=T[2],ot=T[4],xt=T[5],Ot=T[6],Et=T[8],Tt=T[9],Gt=T[10];return x[0]=Math.hypot(W,K,nt),x[1]=Math.hypot(ot,xt,Ot),x[2]=Math.hypot(Et,Tt,Gt),x}function pn(x,T){var W=new _t.WT(3);Me(W,T);var K=1/W[0],nt=1/W[1],ot=1/W[2],xt=T[0]*K,Ot=T[1]*nt,Et=T[2]*ot,Tt=T[4]*K,Gt=T[5]*nt,jt=T[6]*ot,Vt=T[8]*K,Wt=T[9]*nt,Qt=T[10]*ot,se=xt+Gt+Qt,Mt=0;return se>0?(Mt=Math.sqrt(se+1)*2,x[3]=.25*Mt,x[0]=(jt-Wt)/Mt,x[1]=(Vt-Et)/Mt,x[2]=(Ot-Tt)/Mt):xt>Gt&&xt>Qt?(Mt=Math.sqrt(1+xt-Gt-Qt)*2,x[3]=(jt-Wt)/Mt,x[0]=.25*Mt,x[1]=(Ot+Tt)/Mt,x[2]=(Vt+Et)/Mt):Gt>Qt?(Mt=Math.sqrt(1+Gt-xt-Qt)*2,x[3]=(Vt-Et)/Mt,x[0]=(Ot+Tt)/Mt,x[1]=.25*Mt,x[2]=(jt+Wt)/Mt):(Mt=Math.sqrt(1+Qt-xt-Gt)*2,x[3]=(Ot-Tt)/Mt,x[0]=(Vt+Et)/Mt,x[1]=(jt+Wt)/Mt,x[2]=.25*Mt),x}function Ln(x,T,W,K){var nt=T[0],ot=T[1],xt=T[2],Ot=T[3],Et=nt+nt,Tt=ot+ot,Gt=xt+xt,jt=nt*Et,Vt=nt*Tt,Wt=nt*Gt,Qt=ot*Tt,se=ot*Gt,Mt=xt*Gt,Oe=Ot*Et,Xe=Ot*Tt,Ee=Ot*Gt,Pe=K[0],Ne=K[1],Le=K[2];return x[0]=(1-(Qt+Mt))*Pe,x[1]=(Vt+Ee)*Pe,x[2]=(Wt-Xe)*Pe,x[3]=0,x[4]=(Vt-Ee)*Ne,x[5]=(1-(jt+Mt))*Ne,x[6]=(se+Oe)*Ne,x[7]=0,x[8]=(Wt+Xe)*Le,x[9]=(se-Oe)*Le,x[10]=(1-(jt+Qt))*Le,x[11]=0,x[12]=W[0],x[13]=W[1],x[14]=W[2],x[15]=1,x}function qn(x,T,W,K,nt){var ot=T[0],xt=T[1],Ot=T[2],Et=T[3],Tt=ot+ot,Gt=xt+xt,jt=Ot+Ot,Vt=ot*Tt,Wt=ot*Gt,Qt=ot*jt,se=xt*Gt,Mt=xt*jt,Oe=Ot*jt,Xe=Et*Tt,Ee=Et*Gt,Pe=Et*jt,Ne=K[0],Le=K[1],jn=K[2],Dn=nt[0],Bn=nt[1],Fn=nt[2],On=(1-(se+Oe))*Ne,gn=(Wt+Pe)*Ne,or=(Qt-Ee)*Ne,dn=(Wt-Pe)*Le,Qr=(1-(Vt+Oe))*Le,wa=(Mt+Xe)*Le,ci=(Qt+Ee)*jn,Sa=(Mt-Xe)*jn,Ma=(1-(Vt+se))*jn;return x[0]=On,x[1]=gn,x[2]=or,x[3]=0,x[4]=dn,x[5]=Qr,x[6]=wa,x[7]=0,x[8]=ci,x[9]=Sa,x[10]=Ma,x[11]=0,x[12]=W[0]+Dn-(On*Dn+dn*Bn+ci*Fn),x[13]=W[1]+Bn-(gn*Dn+Qr*Bn+Sa*Fn),x[14]=W[2]+Fn-(or*Dn+wa*Bn+Ma*Fn),x[15]=1,x}function ln(x,T){var W=T[0],K=T[1],nt=T[2],ot=T[3],xt=W+W,Ot=K+K,Et=nt+nt,Tt=W*xt,Gt=K*xt,jt=K*Ot,Vt=nt*xt,Wt=nt*Ot,Qt=nt*Et,se=ot*xt,Mt=ot*Ot,Oe=ot*Et;return x[0]=1-jt-Qt,x[1]=Gt+Oe,x[2]=Vt-Mt,x[3]=0,x[4]=Gt-Oe,x[5]=1-Tt-Qt,x[6]=Wt+se,x[7]=0,x[8]=Vt+Mt,x[9]=Wt-se,x[10]=1-Tt-jt,x[11]=0,x[12]=0,x[13]=0,x[14]=0,x[15]=1,x}function fn(x,T,W,K,nt,ot,xt){var Ot=1/(W-T),Et=1/(nt-K),Tt=1/(ot-xt);return x[0]=ot*2*Ot,x[1]=0,x[2]=0,x[3]=0,x[4]=0,x[5]=ot*2*Et,x[6]=0,x[7]=0,x[8]=(W+T)*Ot,x[9]=(nt+K)*Et,x[10]=(xt+ot)*Tt,x[11]=-1,x[12]=0,x[13]=0,x[14]=xt*ot*2*Tt,x[15]=0,x}function mt(x,T,W,K,nt){var ot=1/Math.tan(T/2),xt;return x[0]=ot/W,x[1]=0,x[2]=0,x[3]=0,x[4]=0,x[5]=ot,x[6]=0,x[7]=0,x[8]=0,x[9]=0,x[11]=-1,x[12]=0,x[13]=0,x[15]=0,nt!=null&&nt!==1/0?(xt=1/(K-nt),x[10]=(nt+K)*xt,x[14]=2*nt*K*xt):(x[10]=-1,x[14]=-2*K),x}var U=mt;function X(x,T,W,K,nt){var ot=1/Math.tan(T/2),xt;return x[0]=ot/W,x[1]=0,x[2]=0,x[3]=0,x[4]=0,x[5]=ot,x[6]=0,x[7]=0,x[8]=0,x[9]=0,x[11]=-1,x[12]=0,x[13]=0,x[15]=0,nt!=null&&nt!==1/0?(xt=1/(K-nt),x[10]=nt*xt,x[14]=nt*K*xt):(x[10]=-1,x[14]=-K),x}function Z(x,T,W,K){var nt=Math.tan(T.upDegrees*Math.PI/180),ot=Math.tan(T.downDegrees*Math.PI/180),xt=Math.tan(T.leftDegrees*Math.PI/180),Ot=Math.tan(T.rightDegrees*Math.PI/180),Et=2/(xt+Ot),Tt=2/(nt+ot);return x[0]=Et,x[1]=0,x[2]=0,x[3]=0,x[4]=0,x[5]=Tt,x[6]=0,x[7]=0,x[8]=-((xt-Ot)*Et*.5),x[9]=(nt-ot)*Tt*.5,x[10]=K/(W-K),x[11]=-1,x[12]=0,x[13]=0,x[14]=K*W/(W-K),x[15]=0,x}function it(x,T,W,K,nt,ot,xt){var Ot=1/(T-W),Et=1/(K-nt),Tt=1/(ot-xt);return x[0]=-2*Ot,x[1]=0,x[2]=0,x[3]=0,x[4]=0,x[5]=-2*Et,x[6]=0,x[7]=0,x[8]=0,x[9]=0,x[10]=2*Tt,x[11]=0,x[12]=(T+W)*Ot,x[13]=(nt+K)*Et,x[14]=(xt+ot)*Tt,x[15]=1,x}var ct=it;function zt(x,T,W,K,nt,ot,xt){var Ot=1/(T-W),Et=1/(K-nt),Tt=1/(ot-xt);return x[0]=-2*Ot,x[1]=0,x[2]=0,x[3]=0,x[4]=0,x[5]=-2*Et,x[6]=0,x[7]=0,x[8]=0,x[9]=0,x[10]=Tt,x[11]=0,x[12]=(T+W)*Ot,x[13]=(nt+K)*Et,x[14]=ot*Tt,x[15]=1,x}function Ct(x,T,W,K){var nt,ot,xt,Ot,Et,Tt,Gt,jt,Vt,Wt,Qt=T[0],se=T[1],Mt=T[2],Oe=K[0],Xe=K[1],Ee=K[2],Pe=W[0],Ne=W[1],Le=W[2];return Math.abs(Qt-Pe)<_t.Ib&&Math.abs(se-Ne)<_t.Ib&&Math.abs(Mt-Le)<_t.Ib?ie(x):(Gt=Qt-Pe,jt=se-Ne,Vt=Mt-Le,Wt=1/Math.hypot(Gt,jt,Vt),Gt*=Wt,jt*=Wt,Vt*=Wt,nt=Xe*Vt-Ee*jt,ot=Ee*Gt-Oe*Vt,xt=Oe*jt-Xe*Gt,Wt=Math.hypot(nt,ot,xt),Wt?(Wt=1/Wt,nt*=Wt,ot*=Wt,xt*=Wt):(nt=0,ot=0,xt=0),Ot=jt*xt-Vt*ot,Et=Vt*nt-Gt*xt,Tt=Gt*ot-jt*nt,Wt=Math.hypot(Ot,Et,Tt),Wt?(Wt=1/Wt,Ot*=Wt,Et*=Wt,Tt*=Wt):(Ot=0,Et=0,Tt=0),x[0]=nt,x[1]=Ot,x[2]=Gt,x[3]=0,x[4]=ot,x[5]=Et,x[6]=jt,x[7]=0,x[8]=xt,x[9]=Tt,x[10]=Vt,x[11]=0,x[12]=-(nt*Qt+ot*se+xt*Mt),x[13]=-(Ot*Qt+Et*se+Tt*Mt),x[14]=-(Gt*Qt+jt*se+Vt*Mt),x[15]=1,x)}function ee(x,T,W,K){var nt=T[0],ot=T[1],xt=T[2],Ot=K[0],Et=K[1],Tt=K[2],Gt=nt-W[0],jt=ot-W[1],Vt=xt-W[2],Wt=Gt*Gt+jt*jt+Vt*Vt;Wt>0&&(Wt=1/Math.sqrt(Wt),Gt*=Wt,jt*=Wt,Vt*=Wt);var Qt=Et*Vt-Tt*jt,se=Tt*Gt-Ot*Vt,Mt=Ot*jt-Et*Gt;return Wt=Qt*Qt+se*se+Mt*Mt,Wt>0&&(Wt=1/Math.sqrt(Wt),Qt*=Wt,se*=Wt,Mt*=Wt),x[0]=Qt,x[1]=se,x[2]=Mt,x[3]=0,x[4]=jt*Mt-Vt*se,x[5]=Vt*Qt-Gt*Mt,x[6]=Gt*se-jt*Qt,x[7]=0,x[8]=Gt,x[9]=jt,x[10]=Vt,x[11]=0,x[12]=nt,x[13]=ot,x[14]=xt,x[15]=1,x}function $(x){return"mat4("+x[0]+", "+x[1]+", "+x[2]+", "+x[3]+", "+x[4]+", "+x[5]+", "+x[6]+", "+x[7]+", "+x[8]+", "+x[9]+", "+x[10]+", "+x[11]+", "+x[12]+", "+x[13]+", "+x[14]+", "+x[15]+")"}function ut(x){return Math.hypot(x[0],x[1],x[2],x[3],x[4],x[5],x[6],x[7],x[8],x[9],x[10],x[11],x[12],x[13],x[14],x[15])}function vt(x,T,W){return x[0]=T[0]+W[0],x[1]=T[1]+W[1],x[2]=T[2]+W[2],x[3]=T[3]+W[3],x[4]=T[4]+W[4],x[5]=T[5]+W[5],x[6]=T[6]+W[6],x[7]=T[7]+W[7],x[8]=T[8]+W[8],x[9]=T[9]+W[9],x[10]=T[10]+W[10],x[11]=T[11]+W[11],x[12]=T[12]+W[12],x[13]=T[13]+W[13],x[14]=T[14]+W[14],x[15]=T[15]+W[15],x}function Ut(x,T,W){return x[0]=T[0]-W[0],x[1]=T[1]-W[1],x[2]=T[2]-W[2],x[3]=T[3]-W[3],x[4]=T[4]-W[4],x[5]=T[5]-W[5],x[6]=T[6]-W[6],x[7]=T[7]-W[7],x[8]=T[8]-W[8],x[9]=T[9]-W[9],x[10]=T[10]-W[10],x[11]=T[11]-W[11],x[12]=T[12]-W[12],x[13]=T[13]-W[13],x[14]=T[14]-W[14],x[15]=T[15]-W[15],x}function et(x,T,W){return x[0]=T[0]*W,x[1]=T[1]*W,x[2]=T[2]*W,x[3]=T[3]*W,x[4]=T[4]*W,x[5]=T[5]*W,x[6]=T[6]*W,x[7]=T[7]*W,x[8]=T[8]*W,x[9]=T[9]*W,x[10]=T[10]*W,x[11]=T[11]*W,x[12]=T[12]*W,x[13]=T[13]*W,x[14]=T[14]*W,x[15]=T[15]*W,x}function ft(x,T,W,K){return x[0]=T[0]+W[0]*K,x[1]=T[1]+W[1]*K,x[2]=T[2]+W[2]*K,x[3]=T[3]+W[3]*K,x[4]=T[4]+W[4]*K,x[5]=T[5]+W[5]*K,x[6]=T[6]+W[6]*K,x[7]=T[7]+W[7]*K,x[8]=T[8]+W[8]*K,x[9]=T[9]+W[9]*K,x[10]=T[10]+W[10]*K,x[11]=T[11]+W[11]*K,x[12]=T[12]+W[12]*K,x[13]=T[13]+W[13]*K,x[14]=T[14]+W[14]*K,x[15]=T[15]+W[15]*K,x}function wt(x,T){return x[0]===T[0]&&x[1]===T[1]&&x[2]===T[2]&&x[3]===T[3]&&x[4]===T[4]&&x[5]===T[5]&&x[6]===T[6]&&x[7]===T[7]&&x[8]===T[8]&&x[9]===T[9]&&x[10]===T[10]&&x[11]===T[11]&&x[12]===T[12]&&x[13]===T[13]&&x[14]===T[14]&&x[15]===T[15]}function H(x,T){var W=x[0],K=x[1],nt=x[2],ot=x[3],xt=x[4],Ot=x[5],Et=x[6],Tt=x[7],Gt=x[8],jt=x[9],Vt=x[10],Wt=x[11],Qt=x[12],se=x[13],Mt=x[14],Oe=x[15],Xe=T[0],Ee=T[1],Pe=T[2],Ne=T[3],Le=T[4],jn=T[5],Dn=T[6],Bn=T[7],Fn=T[8],On=T[9],gn=T[10],or=T[11],dn=T[12],Qr=T[13],wa=T[14],ci=T[15];return Math.abs(W-Xe)<=_t.Ib*Math.max(1,Math.abs(W),Math.abs(Xe))&&Math.abs(K-Ee)<=_t.Ib*Math.max(1,Math.abs(K),Math.abs(Ee))&&Math.abs(nt-Pe)<=_t.Ib*Math.max(1,Math.abs(nt),Math.abs(Pe))&&Math.abs(ot-Ne)<=_t.Ib*Math.max(1,Math.abs(ot),Math.abs(Ne))&&Math.abs(xt-Le)<=_t.Ib*Math.max(1,Math.abs(xt),Math.abs(Le))&&Math.abs(Ot-jn)<=_t.Ib*Math.max(1,Math.abs(Ot),Math.abs(jn))&&Math.abs(Et-Dn)<=_t.Ib*Math.max(1,Math.abs(Et),Math.abs(Dn))&&Math.abs(Tt-Bn)<=_t.Ib*Math.max(1,Math.abs(Tt),Math.abs(Bn))&&Math.abs(Gt-Fn)<=_t.Ib*Math.max(1,Math.abs(Gt),Math.abs(Fn))&&Math.abs(jt-On)<=_t.Ib*Math.max(1,Math.abs(jt),Math.abs(On))&&Math.abs(Vt-gn)<=_t.Ib*Math.max(1,Math.abs(Vt),Math.abs(gn))&&Math.abs(Wt-or)<=_t.Ib*Math.max(1,Math.abs(Wt),Math.abs(or))&&Math.abs(Qt-dn)<=_t.Ib*Math.max(1,Math.abs(Qt),Math.abs(dn))&&Math.abs(se-Qr)<=_t.Ib*Math.max(1,Math.abs(se),Math.abs(Qr))&&Math.abs(Mt-wa)<=_t.Ib*Math.max(1,Math.abs(Mt),Math.abs(wa))&&Math.abs(Oe-ci)<=_t.Ib*Math.max(1,Math.abs(Oe),Math.abs(ci))}var tt=$t,ht=Ut},38015:function(Ve,Ge,gt){"use strict";gt.d(Ge,{$X:function(){return Ht},AK:function(){return De},Fv:function(){return He},I6:function(){return Z},IH:function(){return ie},JG:function(){return Jt},Ue:function(){return Nt},al:function(){return Be},lu:function(){return zt},t7:function(){return _e},t8:function(){return he},tk:function(){return Ze}});var _t=gt(31767);function Nt(){var et=new _t.WT(2);return _t.WT!=Float32Array&&(et[0]=0,et[1]=0),et}function ye(et){var ft=new glMatrix.ARRAY_TYPE(2);return ft[0]=et[0],ft[1]=et[1],ft}function Be(et,ft){var wt=new _t.WT(2);return wt[0]=et,wt[1]=ft,wt}function Jt(et,ft){return et[0]=ft[0],et[1]=ft[1],et}function he(et,ft,wt){return et[0]=ft,et[1]=wt,et}function ie(et,ft,wt){return et[0]=ft[0]+wt[0],et[1]=ft[1]+wt[1],et}function Ht(et,ft,wt){return et[0]=ft[0]-wt[0],et[1]=ft[1]-wt[1],et}function yt(et,ft,wt){return et[0]=ft[0]*wt[0],et[1]=ft[1]*wt[1],et}function pe(et,ft,wt){return et[0]=ft[0]/wt[0],et[1]=ft[1]/wt[1],et}function Zt(et,ft){return et[0]=Math.ceil(ft[0]),et[1]=Math.ceil(ft[1]),et}function $t(et,ft){return et[0]=Math.floor(ft[0]),et[1]=Math.floor(ft[1]),et}function te(et,ft,wt){return et[0]=Math.min(ft[0],wt[0]),et[1]=Math.min(ft[1],wt[1]),et}function Bt(et,ft,wt){return et[0]=Math.max(ft[0],wt[0]),et[1]=Math.max(ft[1],wt[1]),et}function It(et,ft){return et[0]=Math.round(ft[0]),et[1]=Math.round(ft[1]),et}function kt(et,ft,wt){return et[0]=ft[0]*wt,et[1]=ft[1]*wt,et}function Ft(et,ft,wt,H){return et[0]=ft[0]+wt[0]*H,et[1]=ft[1]+wt[1]*H,et}function Se(et,ft){var wt=ft[0]-et[0],H=ft[1]-et[1];return Math.hypot(wt,H)}function Re(et,ft){var wt=ft[0]-et[0],H=ft[1]-et[1];return wt*wt+H*H}function Ke(et){var ft=et[0],wt=et[1];return Math.hypot(ft,wt)}function We(et){var ft=et[0],wt=et[1];return ft*ft+wt*wt}function Ze(et,ft){return et[0]=-ft[0],et[1]=-ft[1],et}function cn(et,ft){return et[0]=1/ft[0],et[1]=1/ft[1],et}function He(et,ft){var wt=ft[0],H=ft[1],tt=wt*wt+H*H;return tt>0&&(tt=1/Math.sqrt(tt)),et[0]=ft[0]*tt,et[1]=ft[1]*tt,et}function De(et,ft){return et[0]*ft[0]+et[1]*ft[1]}function an(et,ft,wt){var H=ft[0]*wt[1]-ft[1]*wt[0];return et[0]=et[1]=0,et[2]=H,et}function _e(et,ft,wt,H){var tt=ft[0],ht=ft[1];return et[0]=tt+H*(wt[0]-tt),et[1]=ht+H*(wt[1]-ht),et}function Me(et,ft){ft=ft||1;var wt=glMatrix.RANDOM()*2*Math.PI;return et[0]=Math.cos(wt)*ft,et[1]=Math.sin(wt)*ft,et}function pn(et,ft,wt){var H=ft[0],tt=ft[1];return et[0]=wt[0]*H+wt[2]*tt,et[1]=wt[1]*H+wt[3]*tt,et}function Ln(et,ft,wt){var H=ft[0],tt=ft[1];return et[0]=wt[0]*H+wt[2]*tt+wt[4],et[1]=wt[1]*H+wt[3]*tt+wt[5],et}function qn(et,ft,wt){var H=ft[0],tt=ft[1];return et[0]=wt[0]*H+wt[3]*tt+wt[6],et[1]=wt[1]*H+wt[4]*tt+wt[7],et}function ln(et,ft,wt){var H=ft[0],tt=ft[1];return et[0]=wt[0]*H+wt[4]*tt+wt[12],et[1]=wt[1]*H+wt[5]*tt+wt[13],et}function fn(et,ft,wt,H){var tt=ft[0]-wt[0],ht=ft[1]-wt[1],x=Math.sin(H),T=Math.cos(H);return et[0]=tt*T-ht*x+wt[0],et[1]=tt*x+ht*T+wt[1],et}function mt(et,ft){var wt=et[0],H=et[1],tt=ft[0],ht=ft[1],x=Math.sqrt(wt*wt+H*H)*Math.sqrt(tt*tt+ht*ht),T=x&&(wt*tt+H*ht)/x;return Math.acos(Math.min(Math.max(T,-1),1))}function U(et){return et[0]=0,et[1]=0,et}function X(et){return"vec2("+et[0]+", "+et[1]+")"}function Z(et,ft){return et[0]===ft[0]&&et[1]===ft[1]}function it(et,ft){var wt=et[0],H=et[1],tt=ft[0],ht=ft[1];return Math.abs(wt-tt)<=glMatrix.EPSILON*Math.max(1,Math.abs(wt),Math.abs(tt))&&Math.abs(H-ht)<=glMatrix.EPSILON*Math.max(1,Math.abs(H),Math.abs(ht))}var ct=null,zt=Ht,Ct=null,ee=null,$=null,ut=null,vt=null,Ut=function(){var et=Nt();return function(ft,wt,H,tt,ht,x){var T,W;for(wt||(wt=2),H||(H=0),tt?W=Math.min(tt*wt+H,ft.length):W=ft.length,T=H;T<W;T+=wt)et[0]=ft[T],et[1]=ft[T+1],ht(et,et,x),ft[T]=et[0],ft[T+1]=et[1];return ft}}()},54442:function(Ve,Ge,gt){"use strict";gt.r(Ge),gt.d(Ge,{add:function(){return Ht},angle:function(){return Z},bezier:function(){return pn},ceil:function(){return $t},clone:function(){return ye},copy:function(){return he},create:function(){return Nt},cross:function(){return an},dist:function(){return vt},distance:function(){return Re},div:function(){return ut},divide:function(){return Zt},dot:function(){return De},equals:function(){return Ct},exactEquals:function(){return zt},floor:function(){return te},forEach:function(){return wt},fromValues:function(){return Jt},hermite:function(){return Me},inverse:function(){return cn},len:function(){return et},length:function(){return Be},lerp:function(){return _e},max:function(){return It},min:function(){return Bt},mul:function(){return $},multiply:function(){return pe},negate:function(){return Ze},normalize:function(){return He},random:function(){return Ln},rotateX:function(){return mt},rotateY:function(){return U},rotateZ:function(){return X},round:function(){return kt},scale:function(){return Ft},scaleAndAdd:function(){return Se},set:function(){return ie},sqrDist:function(){return Ut},sqrLen:function(){return ft},squaredDistance:function(){return Ke},squaredLength:function(){return We},str:function(){return ct},sub:function(){return ee},subtract:function(){return yt},transformMat3:function(){return ln},transformMat4:function(){return qn},transformQuat:function(){return fn},zero:function(){return it}});var _t=gt(31767);function Nt(){var H=new _t.WT(3);return _t.WT!=Float32Array&&(H[0]=0,H[1]=0,H[2]=0),H}function ye(H){var tt=new _t.WT(3);return tt[0]=H[0],tt[1]=H[1],tt[2]=H[2],tt}function Be(H){var tt=H[0],ht=H[1],x=H[2];return Math.hypot(tt,ht,x)}function Jt(H,tt,ht){var x=new _t.WT(3);return x[0]=H,x[1]=tt,x[2]=ht,x}function he(H,tt){return H[0]=tt[0],H[1]=tt[1],H[2]=tt[2],H}function ie(H,tt,ht,x){return H[0]=tt,H[1]=ht,H[2]=x,H}function Ht(H,tt,ht){return H[0]=tt[0]+ht[0],H[1]=tt[1]+ht[1],H[2]=tt[2]+ht[2],H}function yt(H,tt,ht){return H[0]=tt[0]-ht[0],H[1]=tt[1]-ht[1],H[2]=tt[2]-ht[2],H}function pe(H,tt,ht){return H[0]=tt[0]*ht[0],H[1]=tt[1]*ht[1],H[2]=tt[2]*ht[2],H}function Zt(H,tt,ht){return H[0]=tt[0]/ht[0],H[1]=tt[1]/ht[1],H[2]=tt[2]/ht[2],H}function $t(H,tt){return H[0]=Math.ceil(tt[0]),H[1]=Math.ceil(tt[1]),H[2]=Math.ceil(tt[2]),H}function te(H,tt){return H[0]=Math.floor(tt[0]),H[1]=Math.floor(tt[1]),H[2]=Math.floor(tt[2]),H}function Bt(H,tt,ht){return H[0]=Math.min(tt[0],ht[0]),H[1]=Math.min(tt[1],ht[1]),H[2]=Math.min(tt[2],ht[2]),H}function It(H,tt,ht){return H[0]=Math.max(tt[0],ht[0]),H[1]=Math.max(tt[1],ht[1]),H[2]=Math.max(tt[2],ht[2]),H}function kt(H,tt){return H[0]=Math.round(tt[0]),H[1]=Math.round(tt[1]),H[2]=Math.round(tt[2]),H}function Ft(H,tt,ht){return H[0]=tt[0]*ht,H[1]=tt[1]*ht,H[2]=tt[2]*ht,H}function Se(H,tt,ht,x){return H[0]=tt[0]+ht[0]*x,H[1]=tt[1]+ht[1]*x,H[2]=tt[2]+ht[2]*x,H}function Re(H,tt){var ht=tt[0]-H[0],x=tt[1]-H[1],T=tt[2]-H[2];return Math.hypot(ht,x,T)}function Ke(H,tt){var ht=tt[0]-H[0],x=tt[1]-H[1],T=tt[2]-H[2];return ht*ht+x*x+T*T}function We(H){var tt=H[0],ht=H[1],x=H[2];return tt*tt+ht*ht+x*x}function Ze(H,tt){return H[0]=-tt[0],H[1]=-tt[1],H[2]=-tt[2],H}function cn(H,tt){return H[0]=1/tt[0],H[1]=1/tt[1],H[2]=1/tt[2],H}function He(H,tt){var ht=tt[0],x=tt[1],T=tt[2],W=ht*ht+x*x+T*T;return W>0&&(W=1/Math.sqrt(W)),H[0]=tt[0]*W,H[1]=tt[1]*W,H[2]=tt[2]*W,H}function De(H,tt){return H[0]*tt[0]+H[1]*tt[1]+H[2]*tt[2]}function an(H,tt,ht){var x=tt[0],T=tt[1],W=tt[2],K=ht[0],nt=ht[1],ot=ht[2];return H[0]=T*ot-W*nt,H[1]=W*K-x*ot,H[2]=x*nt-T*K,H}function _e(H,tt,ht,x){var T=tt[0],W=tt[1],K=tt[2];return H[0]=T+x*(ht[0]-T),H[1]=W+x*(ht[1]-W),H[2]=K+x*(ht[2]-K),H}function Me(H,tt,ht,x,T,W){var K=W*W,nt=K*(2*W-3)+1,ot=K*(W-2)+W,xt=K*(W-1),Ot=K*(3-2*W);return H[0]=tt[0]*nt+ht[0]*ot+x[0]*xt+T[0]*Ot,H[1]=tt[1]*nt+ht[1]*ot+x[1]*xt+T[1]*Ot,H[2]=tt[2]*nt+ht[2]*ot+x[2]*xt+T[2]*Ot,H}function pn(H,tt,ht,x,T,W){var K=1-W,nt=K*K,ot=W*W,xt=nt*K,Ot=3*W*nt,Et=3*ot*K,Tt=ot*W;return H[0]=tt[0]*xt+ht[0]*Ot+x[0]*Et+T[0]*Tt,H[1]=tt[1]*xt+ht[1]*Ot+x[1]*Et+T[1]*Tt,H[2]=tt[2]*xt+ht[2]*Ot+x[2]*Et+T[2]*Tt,H}function Ln(H,tt){tt=tt||1;var ht=_t.FD()*2*Math.PI,x=_t.FD()*2-1,T=Math.sqrt(1-x*x)*tt;return H[0]=Math.cos(ht)*T,H[1]=Math.sin(ht)*T,H[2]=x*tt,H}function qn(H,tt,ht){var x=tt[0],T=tt[1],W=tt[2],K=ht[3]*x+ht[7]*T+ht[11]*W+ht[15];return K=K||1,H[0]=(ht[0]*x+ht[4]*T+ht[8]*W+ht[12])/K,H[1]=(ht[1]*x+ht[5]*T+ht[9]*W+ht[13])/K,H[2]=(ht[2]*x+ht[6]*T+ht[10]*W+ht[14])/K,H}function ln(H,tt,ht){var x=tt[0],T=tt[1],W=tt[2];return H[0]=x*ht[0]+T*ht[3]+W*ht[6],H[1]=x*ht[1]+T*ht[4]+W*ht[7],H[2]=x*ht[2]+T*ht[5]+W*ht[8],H}function fn(H,tt,ht){var x=ht[0],T=ht[1],W=ht[2],K=ht[3],nt=tt[0],ot=tt[1],xt=tt[2],Ot=T*xt-W*ot,Et=W*nt-x*xt,Tt=x*ot-T*nt,Gt=T*Tt-W*Et,jt=W*Ot-x*Tt,Vt=x*Et-T*Ot,Wt=K*2;return Ot*=Wt,Et*=Wt,Tt*=Wt,Gt*=2,jt*=2,Vt*=2,H[0]=nt+Ot+Gt,H[1]=ot+Et+jt,H[2]=xt+Tt+Vt,H}function mt(H,tt,ht,x){var T=[],W=[];return T[0]=tt[0]-ht[0],T[1]=tt[1]-ht[1],T[2]=tt[2]-ht[2],W[0]=T[0],W[1]=T[1]*Math.cos(x)-T[2]*Math.sin(x),W[2]=T[1]*Math.sin(x)+T[2]*Math.cos(x),H[0]=W[0]+ht[0],H[1]=W[1]+ht[1],H[2]=W[2]+ht[2],H}function U(H,tt,ht,x){var T=[],W=[];return T[0]=tt[0]-ht[0],T[1]=tt[1]-ht[1],T[2]=tt[2]-ht[2],W[0]=T[2]*Math.sin(x)+T[0]*Math.cos(x),W[1]=T[1],W[2]=T[2]*Math.cos(x)-T[0]*Math.sin(x),H[0]=W[0]+ht[0],H[1]=W[1]+ht[1],H[2]=W[2]+ht[2],H}function X(H,tt,ht,x){var T=[],W=[];return T[0]=tt[0]-ht[0],T[1]=tt[1]-ht[1],T[2]=tt[2]-ht[2],W[0]=T[0]*Math.cos(x)-T[1]*Math.sin(x),W[1]=T[0]*Math.sin(x)+T[1]*Math.cos(x),W[2]=T[2],H[0]=W[0]+ht[0],H[1]=W[1]+ht[1],H[2]=W[2]+ht[2],H}function Z(H,tt){var ht=H[0],x=H[1],T=H[2],W=tt[0],K=tt[1],nt=tt[2],ot=Math.sqrt(ht*ht+x*x+T*T),xt=Math.sqrt(W*W+K*K+nt*nt),Ot=ot*xt,Et=Ot&&De(H,tt)/Ot;return Math.acos(Math.min(Math.max(Et,-1),1))}function it(H){return H[0]=0,H[1]=0,H[2]=0,H}function ct(H){return"vec3("+H[0]+", "+H[1]+", "+H[2]+")"}function zt(H,tt){return H[0]===tt[0]&&H[1]===tt[1]&&H[2]===tt[2]}function Ct(H,tt){var ht=H[0],x=H[1],T=H[2],W=tt[0],K=tt[1],nt=tt[2];return Math.abs(ht-W)<=_t.Ib*Math.max(1,Math.abs(ht),Math.abs(W))&&Math.abs(x-K)<=_t.Ib*Math.max(1,Math.abs(x),Math.abs(K))&&Math.abs(T-nt)<=_t.Ib*Math.max(1,Math.abs(T),Math.abs(nt))}var ee=yt,$=pe,ut=Zt,vt=Re,Ut=Ke,et=Be,ft=We,wt=function(){var H=Nt();return function(tt,ht,x,T,W,K){var nt,ot;for(ht||(ht=3),x||(x=0),T?ot=Math.min(T*ht+x,tt.length):ot=tt.length,nt=x;nt<ot;nt+=ht)H[0]=tt[nt],H[1]=tt[nt+1],H[2]=tt[nt+2],W(H,H,K),tt[nt]=H[0],tt[nt+1]=H[1],tt[nt+2]=H[2];return tt}}()},49953:function(Ve,Ge,gt){"use strict";gt.d(Ge,{AK:function(){return De},Fv:function(){return He},I6:function(){return fn},IH:function(){return ie},JG:function(){return Jt},Ue:function(){return Nt},al:function(){return Be},bA:function(){return kt},d9:function(){return ye},fF:function(){return pn},fS:function(){return mt},kE:function(){return Ke},t7:function(){return _e},t8:function(){return he},we:function(){return We}});var _t=gt(31767);function Nt(){var $=new _t.WT(4);return _t.WT!=Float32Array&&($[0]=0,$[1]=0,$[2]=0,$[3]=0),$}function ye($){var ut=new _t.WT(4);return ut[0]=$[0],ut[1]=$[1],ut[2]=$[2],ut[3]=$[3],ut}function Be($,ut,vt,Ut){var et=new _t.WT(4);return et[0]=$,et[1]=ut,et[2]=vt,et[3]=Ut,et}function Jt($,ut){return $[0]=ut[0],$[1]=ut[1],$[2]=ut[2],$[3]=ut[3],$}function he($,ut,vt,Ut,et){return $[0]=ut,$[1]=vt,$[2]=Ut,$[3]=et,$}function ie($,ut,vt){return $[0]=ut[0]+vt[0],$[1]=ut[1]+vt[1],$[2]=ut[2]+vt[2],$[3]=ut[3]+vt[3],$}function Ht($,ut,vt){return $[0]=ut[0]-vt[0],$[1]=ut[1]-vt[1],$[2]=ut[2]-vt[2],$[3]=ut[3]-vt[3],$}function yt($,ut,vt){return $[0]=ut[0]*vt[0],$[1]=ut[1]*vt[1],$[2]=ut[2]*vt[2],$[3]=ut[3]*vt[3],$}function pe($,ut,vt){return $[0]=ut[0]/vt[0],$[1]=ut[1]/vt[1],$[2]=ut[2]/vt[2],$[3]=ut[3]/vt[3],$}function Zt($,ut){return $[0]=Math.ceil(ut[0]),$[1]=Math.ceil(ut[1]),$[2]=Math.ceil(ut[2]),$[3]=Math.ceil(ut[3]),$}function $t($,ut){return $[0]=Math.floor(ut[0]),$[1]=Math.floor(ut[1]),$[2]=Math.floor(ut[2]),$[3]=Math.floor(ut[3]),$}function te($,ut,vt){return $[0]=Math.min(ut[0],vt[0]),$[1]=Math.min(ut[1],vt[1]),$[2]=Math.min(ut[2],vt[2]),$[3]=Math.min(ut[3],vt[3]),$}function Bt($,ut,vt){return $[0]=Math.max(ut[0],vt[0]),$[1]=Math.max(ut[1],vt[1]),$[2]=Math.max(ut[2],vt[2]),$[3]=Math.max(ut[3],vt[3]),$}function It($,ut){return $[0]=Math.round(ut[0]),$[1]=Math.round(ut[1]),$[2]=Math.round(ut[2]),$[3]=Math.round(ut[3]),$}function kt($,ut,vt){return $[0]=ut[0]*vt,$[1]=ut[1]*vt,$[2]=ut[2]*vt,$[3]=ut[3]*vt,$}function Ft($,ut,vt,Ut){return $[0]=ut[0]+vt[0]*Ut,$[1]=ut[1]+vt[1]*Ut,$[2]=ut[2]+vt[2]*Ut,$[3]=ut[3]+vt[3]*Ut,$}function Se($,ut){var vt=ut[0]-$[0],Ut=ut[1]-$[1],et=ut[2]-$[2],ft=ut[3]-$[3];return Math.hypot(vt,Ut,et,ft)}function Re($,ut){var vt=ut[0]-$[0],Ut=ut[1]-$[1],et=ut[2]-$[2],ft=ut[3]-$[3];return vt*vt+Ut*Ut+et*et+ft*ft}function Ke($){var ut=$[0],vt=$[1],Ut=$[2],et=$[3];return Math.hypot(ut,vt,Ut,et)}function We($){var ut=$[0],vt=$[1],Ut=$[2],et=$[3];return ut*ut+vt*vt+Ut*Ut+et*et}function Ze($,ut){return $[0]=-ut[0],$[1]=-ut[1],$[2]=-ut[2],$[3]=-ut[3],$}function cn($,ut){return $[0]=1/ut[0],$[1]=1/ut[1],$[2]=1/ut[2],$[3]=1/ut[3],$}function He($,ut){var vt=ut[0],Ut=ut[1],et=ut[2],ft=ut[3],wt=vt*vt+Ut*Ut+et*et+ft*ft;return wt>0&&(wt=1/Math.sqrt(wt)),$[0]=vt*wt,$[1]=Ut*wt,$[2]=et*wt,$[3]=ft*wt,$}function De($,ut){return $[0]*ut[0]+$[1]*ut[1]+$[2]*ut[2]+$[3]*ut[3]}function an($,ut,vt,Ut){var et=vt[0]*Ut[1]-vt[1]*Ut[0],ft=vt[0]*Ut[2]-vt[2]*Ut[0],wt=vt[0]*Ut[3]-vt[3]*Ut[0],H=vt[1]*Ut[2]-vt[2]*Ut[1],tt=vt[1]*Ut[3]-vt[3]*Ut[1],ht=vt[2]*Ut[3]-vt[3]*Ut[2],x=ut[0],T=ut[1],W=ut[2],K=ut[3];return $[0]=T*ht-W*tt+K*H,$[1]=-(x*ht)+W*wt-K*ft,$[2]=x*tt-T*wt+K*et,$[3]=-(x*H)+T*ft-W*et,$}function _e($,ut,vt,Ut){var et=ut[0],ft=ut[1],wt=ut[2],H=ut[3];return $[0]=et+Ut*(vt[0]-et),$[1]=ft+Ut*(vt[1]-ft),$[2]=wt+Ut*(vt[2]-wt),$[3]=H+Ut*(vt[3]-H),$}function Me($,ut){ut=ut||1;var vt,Ut,et,ft,wt,H;do vt=glMatrix.RANDOM()*2-1,Ut=glMatrix.RANDOM()*2-1,wt=vt*vt+Ut*Ut;while(wt>=1);do et=glMatrix.RANDOM()*2-1,ft=glMatrix.RANDOM()*2-1,H=et*et+ft*ft;while(H>=1);var tt=Math.sqrt((1-wt)/H);return $[0]=ut*vt,$[1]=ut*Ut,$[2]=ut*et*tt,$[3]=ut*ft*tt,$}function pn($,ut,vt){var Ut=ut[0],et=ut[1],ft=ut[2],wt=ut[3];return $[0]=vt[0]*Ut+vt[4]*et+vt[8]*ft+vt[12]*wt,$[1]=vt[1]*Ut+vt[5]*et+vt[9]*ft+vt[13]*wt,$[2]=vt[2]*Ut+vt[6]*et+vt[10]*ft+vt[14]*wt,$[3]=vt[3]*Ut+vt[7]*et+vt[11]*ft+vt[15]*wt,$}function Ln($,ut,vt){var Ut=ut[0],et=ut[1],ft=ut[2],wt=vt[0],H=vt[1],tt=vt[2],ht=vt[3],x=ht*Ut+H*ft-tt*et,T=ht*et+tt*Ut-wt*ft,W=ht*ft+wt*et-H*Ut,K=-wt*Ut-H*et-tt*ft;return $[0]=x*ht+K*-wt+T*-tt-W*-H,$[1]=T*ht+K*-H+W*-wt-x*-tt,$[2]=W*ht+K*-tt+x*-H-T*-wt,$[3]=ut[3],$}function qn($){return $[0]=0,$[1]=0,$[2]=0,$[3]=0,$}function ln($){return"vec4("+$[0]+", "+$[1]+", "+$[2]+", "+$[3]+")"}function fn($,ut){return $[0]===ut[0]&&$[1]===ut[1]&&$[2]===ut[2]&&$[3]===ut[3]}function mt($,ut){var vt=$[0],Ut=$[1],et=$[2],ft=$[3],wt=ut[0],H=ut[1],tt=ut[2],ht=ut[3];return Math.abs(vt-wt)<=_t.Ib*Math.max(1,Math.abs(vt),Math.abs(wt))&&Math.abs(Ut-H)<=_t.Ib*Math.max(1,Math.abs(Ut),Math.abs(H))&&Math.abs(et-tt)<=_t.Ib*Math.max(1,Math.abs(et),Math.abs(tt))&&Math.abs(ft-ht)<=_t.Ib*Math.max(1,Math.abs(ft),Math.abs(ht))}var U=null,X=null,Z=null,it=null,ct=null,zt=null,Ct=null,ee=function(){var $=Nt();return function(ut,vt,Ut,et,ft,wt){var H,tt;for(vt||(vt=4),Ut||(Ut=0),et?tt=Math.min(et*vt+Ut,ut.length):tt=ut.length,H=Ut;H<tt;H+=vt)$[0]=ut[H],$[1]=ut[H+1],$[2]=ut[H+2],$[3]=ut[H+3],ft($,$,wt),ut[H]=$[0],ut[H+1]=$[1],ut[H+2]=$[2],ut[H+3]=$[3];return ut}}()},48254:function(Ve){Ve.exports=function(gt){return!gt||typeof gt=="string"?!1:gt instanceof Array||Array.isArray(gt)||gt.length>=0&&(gt.splice instanceof Function||Object.getOwnPropertyDescriptor(gt,gt.length-1)&&gt.constructor.name!=="String")}},42956:function(Ve){"use strict";var Ge=Ve.exports;Ve.exports.isNumber=function(gt){return typeof gt=="number"},Ve.exports.findMin=function(gt){if(gt.length===0)return 1/0;for(var _t=gt[0],Nt=1;Nt<gt.length;Nt++)_t=Math.min(_t,gt[Nt]);return _t},Ve.exports.findMax=function(gt){if(gt.length===0)return-1/0;for(var _t=gt[0],Nt=1;Nt<gt.length;Nt++)_t=Math.max(_t,gt[Nt]);return _t},Ve.exports.findMinMulti=function(gt){for(var _t=Ge.findMin(gt[0]),Nt=1;Nt<gt.length;Nt++)_t=Math.min(_t,Ge.findMin(gt[Nt]));return _t},Ve.exports.findMaxMulti=function(gt){for(var _t=Ge.findMax(gt[0]),Nt=1;Nt<gt.length;Nt++)_t=Math.max(_t,Ge.findMax(gt[Nt]));return _t},Ve.exports.inside=function(gt,_t,Nt){return gt<=Nt&&Nt<=_t}},78434:function(Ve,Ge,gt){"use strict";var _t=50,Nt=2,ye=Math.log(2),Be=Ve.exports,Jt=gt(42956);function he(Ht){return 1-Math.abs(Ht)}Ve.exports.getUnifiedMinMax=function(Ht,yt){return Be.getUnifiedMinMaxMulti([Ht],yt)},Ve.exports.getUnifiedMinMaxMulti=function(Ht,yt){yt=yt||{};var pe=!1,Zt=!1,$t=Jt.isNumber(yt.width)?yt.width:Nt,te=Jt.isNumber(yt.size)?yt.size:_t,Bt=Jt.isNumber(yt.min)?yt.min:(pe=!0,Jt.findMinMulti(Ht)),It=Jt.isNumber(yt.max)?yt.max:(Zt=!0,Jt.findMaxMulti(Ht)),kt=It-Bt,Ft=kt/(te-1);return pe&&(Bt=Bt-2*$t*Ft),Zt&&(It=It+2*$t*Ft),{min:Bt,max:It}},Ve.exports.create=function(Ht,yt){if(yt=yt||{},!Ht||Ht.length===0)return[];var pe=Jt.isNumber(yt.size)?yt.size:_t,Zt=Jt.isNumber(yt.width)?yt.width:Nt,$t=Be.getUnifiedMinMax(Ht,{size:pe,width:Zt,min:yt.min,max:yt.max}),te=$t.min,Bt=$t.max,It=Bt-te,kt=It/(pe-1);if(It===0)return[{x:te,y:1}];for(var Ft=[],Se=0;Se<pe;Se++)Ft.push({x:te+Se*kt,y:0});var Re=function(_e){return Math.floor((_e-te)/kt)},Ke=ie(he,Zt),We=Ke[Zt],Ze=Ke[Zt-1]-Ke[Zt-2],cn=0;Ht.forEach(function(_e){var Me=Re(_e);if(!(Me+Zt<0||Me-Zt>=Ft.length)){var pn=Math.max(Me-Zt,0),Ln=Me,qn=Math.min(Me+Zt,Ft.length-1),ln=pn-(Me-Zt),fn=Me+Zt-qn,mt=Ke[-Zt-1+ln]||0,U=Ke[-Zt-1+fn]||0,X=We/(We-mt-U);ln>0&&(cn+=X*(ln-1)*Ze);var Z=Math.max(0,Me-Zt+1);Jt.inside(0,Ft.length-1,Z)&&(Ft[Z].y+=X*1*Ze),Jt.inside(0,Ft.length-1,Ln+1)&&(Ft[Ln+1].y-=X*2*Ze),Jt.inside(0,Ft.length-1,qn+1)&&(Ft[qn+1].y+=X*1*Ze)}});var He=cn,De=0,an=0;return Ft.forEach(function(_e){De+=_e.y,He+=De,_e.y=He,an+=He}),an>0&&Ft.forEach(function(_e){_e.y/=an}),Ft};function ie(Ht,yt){for(var pe={},Zt=0,$t=-yt;$t<=yt;$t++)Zt+=Ht($t/yt),pe[$t]=Zt;return pe}Ve.exports.getExpectedValueFromPdf=function(Ht){if(!(!Ht||Ht.length===0)){var yt=0;return Ht.forEach(function(pe){yt+=pe.x*pe.y}),yt}},Ve.exports.getXWithLeftTailArea=function(Ht,yt){if(!(!Ht||Ht.length===0)){for(var pe=0,Zt=0,$t=0;$t<Ht.length&&(Zt=$t,pe+=Ht[$t].y,!(pe>=yt));$t++);return Ht[Zt].x}},Ve.exports.getPerplexity=function(Ht){if(!(!Ht||Ht.length===0)){var yt=0;return Ht.forEach(function(pe){var Zt=Math.log(pe.y);isFinite(Zt)&&(yt+=pe.y*Zt)}),yt=-yt/ye,Math.pow(2,yt)}}},27933:function(Ve,Ge,gt){"use strict";var _t=gt(48254),Nt=Array.prototype.concat,ye=Array.prototype.slice,Be=Ve.exports=function(he){for(var ie=[],Ht=0,yt=he.length;Ht<yt;Ht++){var pe=he[Ht];_t(pe)?ie=Nt.call(ie,ye.call(pe)):ie.push(pe)}return ie};Be.wrap=function(Jt){return function(){return Jt(Be(arguments))}}},38887:function(Ve,Ge,gt){var _t=gt(61533);function Nt(ye,Be){var Jt=typeof Symbol!="undefined"&&ye[Symbol.iterator]||ye["@@iterator"];if(!Jt){if(Array.isArray(ye)||(Jt=_t(ye))||Be&&ye&&typeof ye.length=="number"){Jt&&(ye=Jt);var he=0,ie=function(){};return{s:ie,n:function(){return he>=ye.length?{done:!0}:{done:!1,value:ye[he++]}},e:function($t){throw $t},f:ie}}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 Ht=!0,yt=!1,pe;return{s:function(){Jt=Jt.call(ye)},n:function(){var $t=Jt.next();return Ht=$t.done,$t},e:function($t){yt=!0,pe=$t},f:function(){try{!Ht&&Jt.return!=null&&Jt.return()}finally{if(yt)throw pe}}}}Ve.exports=Nt,Ve.exports.__esModule=!0,Ve.exports.default=Ve.exports},73983:function(Ve,Ge,gt){"use strict";var _t=gt(2337);Ge.Z=_t},99938:function(Ve,Ge,gt){"use strict";gt.d(Ge,{CR:function(){return Ft},Jh:function(){return te},Q_:function(){return pn},XA:function(){return kt},ZT:function(){return Nt},_T:function(){return Be},ev:function(){return Ke},gn:function(){return Jt},mG:function(){return $t},pi:function(){return ye},pr:function(){return Re}});var _t=function(X,Z){return _t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(it,ct){it.__proto__=ct}||function(it,ct){for(var zt in ct)Object.prototype.hasOwnProperty.call(ct,zt)&&(it[zt]=ct[zt])},_t(X,Z)};function Nt(X,Z){if(typeof Z!="function"&&Z!==null)throw new TypeError("Class extends value "+String(Z)+" is not a constructor or null");_t(X,Z);function it(){this.constructor=X}X.prototype=Z===null?Object.create(Z):(it.prototype=Z.prototype,new it)}var ye=function(){return ye=Object.assign||function(Z){for(var it,ct=1,zt=arguments.length;ct<zt;ct++){it=arguments[ct];for(var Ct in it)Object.prototype.hasOwnProperty.call(it,Ct)&&(Z[Ct]=it[Ct])}return Z},ye.apply(this,arguments)};function Be(X,Z){var it={};for(var ct in X)Object.prototype.hasOwnProperty.call(X,ct)&&Z.indexOf(ct)<0&&(it[ct]=X[ct]);if(X!=null&&typeof Object.getOwnPropertySymbols=="function")for(var zt=0,ct=Object.getOwnPropertySymbols(X);zt<ct.length;zt++)Z.indexOf(ct[zt])<0&&Object.prototype.propertyIsEnumerable.call(X,ct[zt])&&(it[ct[zt]]=X[ct[zt]]);return it}function Jt(X,Z,it,ct){var zt=arguments.length,Ct=zt<3?Z:ct===null?ct=Object.getOwnPropertyDescriptor(Z,it):ct,ee;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Ct=Reflect.decorate(X,Z,it,ct);else for(var $=X.length-1;$>=0;$--)(ee=X[$])&&(Ct=(zt<3?ee(Ct):zt>3?ee(Z,it,Ct):ee(Z,it))||Ct);return zt>3&&Ct&&Object.defineProperty(Z,it,Ct),Ct}function he(X,Z){return function(it,ct){Z(it,ct,X)}}function ie(X,Z,it,ct,zt,Ct){function ee(x){if(x!==void 0&&typeof x!="function")throw new TypeError("Function expected");return x}for(var $=ct.kind,ut=$==="getter"?"get":$==="setter"?"set":"value",vt=!Z&&X?ct.static?X:X.prototype:null,Ut=Z||(vt?Object.getOwnPropertyDescriptor(vt,ct.name):{}),et,ft=!1,wt=it.length-1;wt>=0;wt--){var H={};for(var tt in ct)H[tt]=tt==="access"?{}:ct[tt];for(var tt in ct.access)H.access[tt]=ct.access[tt];H.addInitializer=function(x){if(ft)throw new TypeError("Cannot add initializers after decoration has completed");Ct.push(ee(x||null))};var ht=(0,it[wt])($==="accessor"?{get:Ut.get,set:Ut.set}:Ut[ut],H);if($==="accessor"){if(ht===void 0)continue;if(ht===null||typeof ht!="object")throw new TypeError("Object expected");(et=ee(ht.get))&&(Ut.get=et),(et=ee(ht.set))&&(Ut.set=et),(et=ee(ht.init))&&zt.unshift(et)}else(et=ee(ht))&&($==="field"?zt.unshift(et):Ut[ut]=et)}vt&&Object.defineProperty(vt,ct.name,Ut),ft=!0}function Ht(X,Z,it){for(var ct=arguments.length>2,zt=0;zt<Z.length;zt++)it=ct?Z[zt].call(X,it):Z[zt].call(X);return ct?it:void 0}function yt(X){return typeof X=="symbol"?X:"".concat(X)}function pe(X,Z,it){return typeof Z=="symbol"&&(Z=Z.description?"[".concat(Z.description,"]"):""),Object.defineProperty(X,"name",{configurable:!0,value:it?"".concat(it," ",Z):Z})}function Zt(X,Z){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(X,Z)}function $t(X,Z,it,ct){function zt(Ct){return Ct instanceof it?Ct:new it(function(ee){ee(Ct)})}return new(it||(it=Promise))(function(Ct,ee){function $(Ut){try{vt(ct.next(Ut))}catch(et){ee(et)}}function ut(Ut){try{vt(ct.throw(Ut))}catch(et){ee(et)}}function vt(Ut){Ut.done?Ct(Ut.value):zt(Ut.value).then($,ut)}vt((ct=ct.apply(X,Z||[])).next())})}function te(X,Z){var it={label:0,sent:function(){if(Ct[0]&1)throw Ct[1];return Ct[1]},trys:[],ops:[]},ct,zt,Ct,ee;return ee={next:$(0),throw:$(1),return:$(2)},typeof Symbol=="function"&&(ee[Symbol.iterator]=function(){return this}),ee;function $(vt){return function(Ut){return ut([vt,Ut])}}function ut(vt){if(ct)throw new TypeError("Generator is already executing.");for(;ee&&(ee=0,vt[0]&&(it=0)),it;)try{if(ct=1,zt&&(Ct=vt[0]&2?zt.return:vt[0]?zt.throw||((Ct=zt.return)&&Ct.call(zt),0):zt.next)&&!(Ct=Ct.call(zt,vt[1])).done)return Ct;switch(zt=0,Ct&&(vt=[vt[0]&2,Ct.value]),vt[0]){case 0:case 1:Ct=vt;break;case 4:return it.label++,{value:vt[1],done:!1};case 5:it.label++,zt=vt[1],vt=[0];continue;case 7:vt=it.ops.pop(),it.trys.pop();continue;default:if(Ct=it.trys,!(Ct=Ct.length>0&&Ct[Ct.length-1])&&(vt[0]===6||vt[0]===2)){it=0;continue}if(vt[0]===3&&(!Ct||vt[1]>Ct[0]&&vt[1]<Ct[3])){it.label=vt[1];break}if(vt[0]===6&&it.label<Ct[1]){it.label=Ct[1],Ct=vt;break}if(Ct&&it.label<Ct[2]){it.label=Ct[2],it.ops.push(vt);break}Ct[2]&&it.ops.pop(),it.trys.pop();continue}vt=Z.call(X,it)}catch(Ut){vt=[6,Ut],zt=0}finally{ct=Ct=0}if(vt[0]&5)throw vt[1];return{value:vt[0]?vt[1]:void 0,done:!0}}}var Bt=Object.create?function(X,Z,it,ct){ct===void 0&&(ct=it);var zt=Object.getOwnPropertyDescriptor(Z,it);(!zt||("get"in zt?!Z.__esModule:zt.writable||zt.configurable))&&(zt={enumerable:!0,get:function(){return Z[it]}}),Object.defineProperty(X,ct,zt)}:function(X,Z,it,ct){ct===void 0&&(ct=it),X[ct]=Z[it]};function It(X,Z){for(var it in X)it!=="default"&&!Object.prototype.hasOwnProperty.call(Z,it)&&Bt(Z,X,it)}function kt(X){var Z=typeof Symbol=="function"&&Symbol.iterator,it=Z&&X[Z],ct=0;if(it)return it.call(X);if(X&&typeof X.length=="number")return{next:function(){return X&&ct>=X.length&&(X=void 0),{value:X&&X[ct++],done:!X}}};throw new TypeError(Z?"Object is not iterable.":"Symbol.iterator is not defined.")}function Ft(X,Z){var it=typeof Symbol=="function"&&X[Symbol.iterator];if(!it)return X;var ct=it.call(X),zt,Ct=[],ee;try{for(;(Z===void 0||Z-- >0)&&!(zt=ct.next()).done;)Ct.push(zt.value)}catch($){ee={error:$}}finally{try{zt&&!zt.done&&(it=ct.return)&&it.call(ct)}finally{if(ee)throw ee.error}}return Ct}function Se(){for(var X=[],Z=0;Z<arguments.length;Z++)X=X.concat(Ft(arguments[Z]));return X}function Re(){for(var X=0,Z=0,it=arguments.length;Z<it;Z++)X+=arguments[Z].length;for(var ct=Array(X),zt=0,Z=0;Z<it;Z++)for(var Ct=arguments[Z],ee=0,$=Ct.length;ee<$;ee++,zt++)ct[zt]=Ct[ee];return ct}function Ke(X,Z,it){if(it||arguments.length===2)for(var ct=0,zt=Z.length,Ct;ct<zt;ct++)(Ct||!(ct in Z))&&(Ct||(Ct=Array.prototype.slice.call(Z,0,ct)),Ct[ct]=Z[ct]);return X.concat(Ct||Array.prototype.slice.call(Z))}function We(X){return this instanceof We?(this.v=X,this):new We(X)}function Ze(X,Z,it){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var ct=it.apply(X,Z||[]),zt,Ct=[];return zt={},ee("next"),ee("throw"),ee("return"),zt[Symbol.asyncIterator]=function(){return this},zt;function ee(ft){ct[ft]&&(zt[ft]=function(wt){return new Promise(function(H,tt){Ct.push([ft,wt,H,tt])>1||$(ft,wt)})})}function $(ft,wt){try{ut(ct[ft](wt))}catch(H){et(Ct[0][3],H)}}function ut(ft){ft.value instanceof We?Promise.resolve(ft.value.v).then(vt,Ut):et(Ct[0][2],ft)}function vt(ft){$("next",ft)}function Ut(ft){$("throw",ft)}function et(ft,wt){ft(wt),Ct.shift(),Ct.length&&$(Ct[0][0],Ct[0][1])}}function cn(X){var Z,it;return Z={},ct("next"),ct("throw",function(zt){throw zt}),ct("return"),Z[Symbol.iterator]=function(){return this},Z;function ct(zt,Ct){Z[zt]=X[zt]?function(ee){return(it=!it)?{value:We(X[zt](ee)),done:!1}:Ct?Ct(ee):ee}:Ct}}function He(X){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var Z=X[Symbol.asyncIterator],it;return Z?Z.call(X):(X=typeof kt=="function"?kt(X):X[Symbol.iterator](),it={},ct("next"),ct("throw"),ct("return"),it[Symbol.asyncIterator]=function(){return this},it);function ct(Ct){it[Ct]=X[Ct]&&function(ee){return new Promise(function($,ut){ee=X[Ct](ee),zt($,ut,ee.done,ee.value)})}}function zt(Ct,ee,$,ut){Promise.resolve(ut).then(function(vt){Ct({value:vt,done:$})},ee)}}function De(X,Z){return Object.defineProperty?Object.defineProperty(X,"raw",{value:Z}):X.raw=Z,X}var an=Object.create?function(X,Z){Object.defineProperty(X,"default",{enumerable:!0,value:Z})}:function(X,Z){X.default=Z};function _e(X){if(X&&X.__esModule)return X;var Z={};if(X!=null)for(var it in X)it!=="default"&&Object.prototype.hasOwnProperty.call(X,it)&&Bt(Z,X,it);return an(Z,X),Z}function Me(X){return X&&X.__esModule?X:{default:X}}function pn(X,Z,it,ct){if(it==="a"&&!ct)throw new TypeError("Private accessor was defined without a getter");if(typeof Z=="function"?X!==Z||!ct:!Z.has(X))throw new TypeError("Cannot read private member from an object whose class did not declare it");return it==="m"?ct:it==="a"?ct.call(X):ct?ct.value:Z.get(X)}function Ln(X,Z,it,ct,zt){if(ct==="m")throw new TypeError("Private method is not writable");if(ct==="a"&&!zt)throw new TypeError("Private accessor was defined without a setter");if(typeof Z=="function"?X!==Z||!zt:!Z.has(X))throw new TypeError("Cannot write private member to an object whose class did not declare it");return ct==="a"?zt.call(X,it):zt?zt.value=it:Z.set(X,it),it}function qn(X,Z){if(Z===null||typeof Z!="object"&&typeof Z!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof X=="function"?Z===X:X.has(Z)}function ln(X,Z,it){if(Z!=null){if(typeof Z!="object"&&typeof Z!="function")throw new TypeError("Object expected.");var ct;if(it){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");ct=Z[Symbol.asyncDispose]}if(ct===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");ct=Z[Symbol.dispose]}if(typeof ct!="function")throw new TypeError("Object not disposable.");X.stack.push({value:Z,dispose:ct,async:it})}else it&&X.stack.push({async:!0});return Z}var fn=typeof SuppressedError=="function"?SuppressedError:function(X,Z,it){var ct=new Error(it);return ct.name="SuppressedError",ct.error=X,ct.suppressed=Z,ct};function mt(X){function Z(ct){X.error=X.hasError?new fn(ct,X.error,"An error was suppressed during disposal."):ct,X.hasError=!0}function it(){for(;X.stack.length;){var ct=X.stack.pop();try{var zt=ct.dispose&&ct.dispose.call(ct.value);if(ct.async)return Promise.resolve(zt).then(it,function(Ct){return Z(Ct),it()})}catch(Ct){Z(Ct)}}if(X.hasError)throw X.error}return it()}var U={__extends:Nt,__assign:ye,__rest:Be,__decorate:Jt,__param:he,__metadata:Zt,__awaiter:$t,__generator:te,__createBinding:Bt,__exportStar:It,__values:kt,__read:Ft,__spread:Se,__spreadArrays:Re,__spreadArray:Ke,__await:We,__asyncGenerator:Ze,__asyncDelegator:cn,__asyncValues:He,__makeTemplateObject:De,__importStar:_e,__importDefault:Me,__classPrivateFieldGet:pn,__classPrivateFieldSet:Ln,__classPrivateFieldIn:qn,__addDisposableResource:ln,__disposeResources:mt}}}]);
}());