👨🏻‍💻👩🏻‍💻 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.
 
 
 

108 lines
1.1 MiB

!(function(){var wr=Math.pow;(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[9217],{81383:function(Ye,Ve,yt){"use strict";yt.d(Ve,{P:function(){return tut}});var kt={};yt.r(kt),yt.d(kt,{area:function(){return _W},bottom:function(){return ja},bottomLeft:function(){return ja},bottomRight:function(){return ja},inside:function(){return ja},left:function(){return ja},outside:function(){return SW},right:function(){return ja},spider:function(){return EW},surround:function(){return TW},top:function(){return ja},topLeft:function(){return ja},topRight:function(){return ja}});var Rt={};yt.r(Rt),yt.d(Rt,{interpolateBlues:function(){return jH},interpolateBrBG:function(){return vH},interpolateBuGn:function(){return SH},interpolateBuPu:function(){return MH},interpolateCividis:function(){return WH},interpolateCool:function(){return UH},interpolateCubehelixDefault:function(){return XH},interpolateGnBu:function(){return EH},interpolateGreens:function(){return DH},interpolateGreys:function(){return FH},interpolateInferno:function(){return nY},interpolateMagma:function(){return eY},interpolateOrRd:function(){return AH},interpolateOranges:function(){return GH},interpolatePRGn:function(){return gH},interpolatePiYG:function(){return yH},interpolatePlasma:function(){return rY},interpolatePuBu:function(){return PH},interpolatePuBuGn:function(){return TH},interpolatePuOr:function(){return mH},interpolatePuRd:function(){return CH},interpolatePurples:function(){return BH},interpolateRainbow:function(){return qH},interpolateRdBu:function(){return bH},interpolateRdGy:function(){return xH},interpolateRdPu:function(){return kH},interpolateRdYlBu:function(){return _H},interpolateRdYlGn:function(){return OH},interpolateReds:function(){return zH},interpolateSinebow:function(){return QH},interpolateSpectral:function(){return wH},interpolateTurbo:function(){return JH},interpolateViridis:function(){return tY},interpolateWarm:function(){return $H},interpolateYlGn:function(){return LH},interpolateYlGnBu:function(){return RH},interpolateYlOrBr:function(){return NH},interpolateYlOrRd:function(){return IH},schemeAccent:function(){return HW},schemeBlues:function(){return kw},schemeBrBG:function(){return uw},schemeBuGn:function(){return bw},schemeBuPu:function(){return xw},schemeCategory10:function(){return WW},schemeDark2:function(){return YW},schemeGnBu:function(){return _w},schemeGreens:function(){return Rw},schemeGreys:function(){return Lw},schemeOrRd:function(){return Ow},schemeOranges:function(){return jw},schemePRGn:function(){return fw},schemePaired:function(){return VW},schemePastel1:function(){return XW},schemePastel2:function(){return $W},schemePiYG:function(){return dw},schemePuBu:function(){return Sw},schemePuBuGn:function(){return ww},schemePuOr:function(){return hw},schemePuRd:function(){return Mw},schemePurples:function(){return Nw},schemeRdBu:function(){return pw},schemeRdGy:function(){return vw},schemeRdPu:function(){return Ew},schemeRdYlBu:function(){return gw},schemeRdYlGn:function(){return yw},schemeReds:function(){return Iw},schemeSet1:function(){return UW},schemeSet2:function(){return qW},schemeSet3:function(){return ZW},schemeSpectral:function(){return mw},schemeTableau10:function(){return KW},schemeYlGn:function(){return Tw},schemeYlGnBu:function(){return Aw},schemeYlOrBr:function(){return Pw},schemeYlOrRd:function(){return Cw}});var be={};yt.r(be),yt.d(be,{geoAlbers:function(){return Xk},geoAlbersUsa:function(){return Ott},geoAzimuthalEqualArea:function(){return wtt},geoAzimuthalEqualAreaRaw:function(){return bm},geoAzimuthalEquidistant:function(){return Stt},geoAzimuthalEquidistantRaw:function(){return xm},geoConicConformal:function(){return Ett},geoConicConformalRaw:function(){return qk},geoConicEqualArea:function(){return zh},geoConicEqualAreaRaw:function(){return Vk},geoConicEquidistant:function(){return Ttt},geoConicEquidistantRaw:function(){return Zk},geoEqualEarth:function(){return Ctt},geoEqualEarthRaw:function(){return _m},geoEquirectangular:function(){return Att},geoEquirectangularRaw:function(){return yu},geoGnomonic:function(){return ktt},geoGnomonicRaw:function(){return Om},geoIdentity:function(){return Rtt},geoMercator:function(){return Mtt},geoMercatorRaw:function(){return gu},geoNaturalEarth1:function(){return Ltt},geoNaturalEarth1Raw:function(){return wm},geoOrthographic:function(){return Ntt},geoOrthographicRaw:function(){return Sm},geoProjection:function(){return Oa},geoProjectionMutator:function(){return ym},geoStereographic:function(){return Itt},geoStereographicRaw:function(){return Mm},geoTransverseMercator:function(){return jtt},geoTransverseMercatorRaw:function(){return Em}});var We={};yt.r(We),yt.d(We,{frequency:function(){return Fnt},id:function(){return Bnt},name:function(){return znt},weight:function(){return Dnt}});var te=yt(79685),ge=yt(50374),re=yt.t(ge,2),Gt=function(){return Gt=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},Gt.apply(this,arguments)},dt=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=Gt({},re),ue=Zt.version,ie=Zt.render,jt=Zt.unmountComponentAtNode,Lt;try{var Tt=Number((ue||"").split(".")[0]);Tt>=18&&(Lt=Zt.createRoot)}catch(t){}function Dt(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 ke(t,e){Dt(!0);var n=e[Se]||Lt(e);Dt(!1),n.render(t),e[Se]=n}function Qe(t,e){ie(t,e)}function Xe(t,e){}function qe(t,e){if(Lt){ke(t,e);return}Qe(t,e)}function ln(t){return dt(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 $e(t){jt(t)}function Be(t){}function cn(t){return dt(this,void 0,void 0,function(){return pe(this,function(e){return Lt!==void 0?[2,ln(t)]:($e(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)),qe(t,n),n},gn=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)},Dn=function(t){var e=t.loadingTemplate,n=t.theme,r=n===void 0?"light":n,i=te.useRef(null);te.useEffect(function(){!e&&i.current&&gn(i.current)},[]);var a=function(){return e||te.createElement("div",{ref:i})};return te.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)}}(),un=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||te.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):te.createElement(te.Fragment,null,this.props.children)},e}(te.Component),yn=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))},vt=function(t){return Array.isArray(t)},Yt=function(t){return t!==null&&typeof t=="object"&&!vt(t)},et=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)&&(Yt(r[i])?((!t[i]||typeof t[i]!="object")&&(t[i]={}),et(t[i],r[i])):t[i]=r[i]);return et.apply(void 0,yn([t],e,!1))},lt=typeof global=="object"&&global&&global.Object===Object&&global,_t=lt,Ot=typeof self=="object"&&self&&self.Object===Object&&self,$t=_t||Ot||Function("return this")(),It=$t,ae=It.Symbol,X=ae,ct=Object.prototype,ht=ct.hasOwnProperty,Ut=ct.toString,Q=X?X.toStringTag:void 0;function st(t){var e=ht.call(t,Q),n=t[Q];try{t[Q]=void 0;var r=!0}catch(a){}var i=Ut.call(t);return r&&(e?t[Q]=n:delete t[Q]),i}var xt=st,H=Object.prototype,K=H.toString;function ut(t){return K.call(t)}var x=ut,T="[object Null]",W="[object Undefined]",q=X?X.toStringTag:void 0;function J(t){return t==null?t===void 0?W:T:q&&q in Object(t)?xt(t):x(t)}var rt=J;function gt(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var mt=gt,At="[object AsyncFunction]",Mt="[object Function]",Bt="[object GeneratorFunction]",Wt="[object Proxy]";function Vt(t){if(!mt(t))return!1;var e=rt(t);return e==Mt||e==Bt||e==At||e==Wt}var zt=Vt,Kt=function(t){var e=/react|\.jsx|children:\[\(/i;return e.test(t)},fe=Array.isArray,wt=fe;function we(){this.__data__=[],this.size=0}var Je=we;function Ae(t,e){return t===e||t!==t&&e!==e}var Re=Ae;function Ie(t,e){for(var n=t.length;n--;)if(Re(t[n][0],e))return n;return-1}var Le=Ie,Vn=Array.prototype,Xn=Vn.splice;function $n(t){var e=this.__data__,n=Le(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():Xn.call(e,n,1),--this.size,!0}var Un=$n;function ar(t){var e=this.__data__,n=Le(e,t);return n<0?void 0:e[n][1]}var or=ar;function mr(t){return Le(this.__data__,t)>-1}var fn=mr;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=Je,ci.prototype.delete=Un,ci.prototype.get=or,ci.prototype.has=fn,ci.prototype.set=wa;var Sa=ci;function Ma(){this.__data__=new Sa,this.size=0}var Fu=Ma;function dp(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}var hp=dp;function ko(t){return this.__data__.get(t)}var Ro=ko;function Ss(t){return this.__data__.has(t)}var pp=Ss,vp=It["__core-js_shared__"],Bc=vp,Bu=function(){var t=/[^.]+$/.exec(Bc&&Bc.keys&&Bc.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function gp(t){return!!Bu&&Bu in t}var yp=gp,mp=Function.prototype,bp=mp.toString;function Gr(t){if(t!=null){try{return bp.call(t)}catch(e){}try{return t+""}catch(e){}}return""}var pr=Gr,L=/[\\^$.*+?()[\]{}|]/g,I=/^\[object .+?Constructor\]$/,G=Function.prototype,V=Object.prototype,nt=G.toString,at=V.hasOwnProperty,U=RegExp("^"+nt.call(at).replace(L,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Z(t){if(!mt(t)||yp(t))return!1;var e=zt(t)?U:I;return e.test(pr(t))}var ft=Z;function pt(t,e){return t==null?void 0:t[e]}var Qt=pt;function ee(t,e){var n=Qt(t,e);return ft(n)?n:void 0}var me=ee,Jt=me(It,"Map"),de=Jt,he=me(Object,"create"),Ht=he;function Pe(){this.__data__=Ht?Ht(null):{},this.size=0}var xe=Pe;function Ce(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var ve=Ce,Te="__lodash_hash_undefined__",tn=Object.prototype,Jr=tn.hasOwnProperty;function li(t){var e=this.__data__;if(Ht){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,Oi=ti.hasOwnProperty;function Jn(t){var e=this.__data__;return Ht?e[t]!==void 0:Oi.call(e,t)}var Fn=Jn,Ms="__lodash_hash_undefined__";function xp(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Ht&&e===void 0?Ms:e,this}var Lo=xp;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=ve,Wr.prototype.get=jr,Wr.prototype.has=Fn,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 $3(t,e){var n=t.__data__;return ia(e)?n[typeof e=="string"?"string":"hash"]:n.map}var zu=$3;function U3(t){var e=zu(this,t).delete(t);return this.size-=e?1:0,e}var q3=U3;function Z3(t){return zu(this,t).get(t)}var K3=Z3;function Q3(t){return zu(this,t).has(t)}var J3=Q3;function tR(t,e){var n=zu(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}var eR=tR;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=q3,Es.prototype.get=K3,Es.prototype.has=J3,Es.prototype.set=eR;var Gu=Es,nR=200;function rR(t,e){var n=this.__data__;if(n instanceof Sa){var r=n.__data__;if(!de||r.length<nR-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Gu(r)}return n.set(t,e),this.size=n.size,this}var iR=rR;function As(t){var e=this.__data__=new Sa(t);this.size=e.size}As.prototype.clear=Fu,As.prototype.delete=hp,As.prototype.get=Ro,As.prototype.has=pp,As.prototype.set=iR;var zc=As,aR="__lodash_hash_undefined__";function oR(t){return this.__data__.set(t,aR),this}var sR=oR;function cR(t){return this.__data__.has(t)}var lR=cR;function Wu(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new Gu;++e<n;)this.add(t[e])}Wu.prototype.add=Wu.prototype.push=sR,Wu.prototype.has=lR;var g1=Wu;function uR(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 fR=uR;function dR(t,e){return t.has(e)}var y1=dR,hR=1,pR=2;function vR(t,e,n,r,i,a){var o=n&hR,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&pR?new g1: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(!fR(e,function(y,m){if(!y1(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 m1=vR,gR=It.Uint8Array,Hu=gR;function yR(t){var e=-1,n=Array(t.size);return t.forEach(function(r,i){n[++e]=[i,r]}),n}var mR=yR;function bR(t){var e=-1,n=Array(t.size);return t.forEach(function(r){n[++e]=r}),n}var _p=bR,xR=1,_R=2,OR="[object Boolean]",wR="[object Date]",SR="[object Error]",MR="[object Map]",ER="[object Number]",AR="[object RegExp]",TR="[object Set]",PR="[object String]",CR="[object Symbol]",kR="[object ArrayBuffer]",RR="[object DataView]",b1=X?X.prototype:void 0,Op=b1?b1.valueOf:void 0;function LR(t,e,n,r,i,a,o){switch(n){case RR:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case kR:return!(t.byteLength!=e.byteLength||!a(new Hu(t),new Hu(e)));case OR:case wR:case ER:return Re(+t,+e);case SR:return t.name==e.name&&t.message==e.message;case AR:case PR:return t==e+"";case MR:var s=mR;case TR:var c=r&xR;if(s||(s=_p),t.size!=e.size&&!c)return!1;var l=o.get(t);if(l)return l==e;r|=_R,o.set(t,e);var u=m1(s(t),s(e),r,i,a,o);return o.delete(t),u;case CR:if(Op)return Op.call(t)==Op.call(e)}return!1}var NR=LR;function IR(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}var wp=IR;function jR(t,e,n){var r=e(t);return wt(t)?r:wp(r,n(t))}var x1=jR;function DR(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 FR=DR;function BR(){return[]}var _1=BR,zR=Object.prototype,GR=zR.propertyIsEnumerable,O1=Object.getOwnPropertySymbols,WR=O1?function(t){return t==null?[]:(t=Object(t),FR(O1(t),function(e){return GR.call(t,e)}))}:_1,Sp=WR;function HR(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}var YR=HR;function VR(t){return t!=null&&typeof t=="object"}var wi=VR,XR="[object Arguments]";function $R(t){return wi(t)&&rt(t)==XR}var w1=$R,S1=Object.prototype,UR=S1.hasOwnProperty,qR=S1.propertyIsEnumerable,ZR=w1(function(){return arguments}())?w1:function(t){return wi(t)&&UR.call(t,"callee")&&!qR.call(t,"callee")},Mp=ZR;function KR(){return!1}var QR=KR,M1=typeof exports=="object"&&exports&&!exports.nodeType&&exports,E1=M1&&typeof module=="object"&&module&&!module.nodeType&&module,JR=E1&&E1.exports===M1,A1=JR?It.Buffer:void 0,tL=A1?A1.isBuffer:void 0,eL=tL||QR,Yu=eL,nL=9007199254740991,rL=/^(?:0|[1-9]\d*)$/;function iL(t,e){var n=typeof t;return e=e==null?nL:e,!!e&&(n=="number"||n!="symbol"&&rL.test(t))&&t>-1&&t%1==0&&t<e}var Vu=iL,aL=9007199254740991;function oL(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=aL}var Ep=oL,sL="[object Arguments]",cL="[object Array]",lL="[object Boolean]",uL="[object Date]",fL="[object Error]",dL="[object Function]",hL="[object Map]",pL="[object Number]",vL="[object Object]",gL="[object RegExp]",yL="[object Set]",mL="[object String]",bL="[object WeakMap]",xL="[object ArrayBuffer]",_L="[object DataView]",OL="[object Float32Array]",wL="[object Float64Array]",SL="[object Int8Array]",ML="[object Int16Array]",EL="[object Int32Array]",AL="[object Uint8Array]",TL="[object Uint8ClampedArray]",PL="[object Uint16Array]",CL="[object Uint32Array]",qn={};qn[OL]=qn[wL]=qn[SL]=qn[ML]=qn[EL]=qn[AL]=qn[TL]=qn[PL]=qn[CL]=!0,qn[sL]=qn[cL]=qn[xL]=qn[lL]=qn[_L]=qn[uL]=qn[fL]=qn[dL]=qn[hL]=qn[pL]=qn[vL]=qn[gL]=qn[yL]=qn[mL]=qn[bL]=!1;function kL(t){return wi(t)&&Ep(t.length)&&!!qn[rt(t)]}var RL=kL;function LL(t){return function(e){return t(e)}}var Ap=LL,T1=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Gc=T1&&typeof module=="object"&&module&&!module.nodeType&&module,NL=Gc&&Gc.exports===T1,Tp=NL&&_t.process,IL=function(){try{var t=Gc&&Gc.require&&Gc.require("util").types;return t||Tp&&Tp.binding&&Tp.binding("util")}catch(e){}}(),Ts=IL,P1=Ts&&Ts.isTypedArray,jL=P1?Ap(P1):RL,C1=jL,DL=Object.prototype,FL=DL.hasOwnProperty;function BL(t,e){var n=wt(t),r=!n&&Mp(t),i=!n&&!r&&Yu(t),a=!n&&!r&&!i&&C1(t),o=n||r||i||a,s=o?YR(t.length,String):[],c=s.length;for(var l in t)(e||FL.call(t,l))&&!(o&&(l=="length"||i&&(l=="offset"||l=="parent")||a&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||Vu(l,c)))&&s.push(l);return s}var k1=BL,zL=Object.prototype;function GL(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||zL;return t===n}var Xu=GL;function WL(t,e){return function(n){return t(e(n))}}var R1=WL,HL=R1(Object.keys,Object),YL=HL,VL=Object.prototype,XL=VL.hasOwnProperty;function $L(t){if(!Xu(t))return YL(t);var e=[];for(var n in Object(t))XL.call(t,n)&&n!="constructor"&&e.push(n);return e}var UL=$L;function qL(t){return t!=null&&Ep(t.length)&&!zt(t)}var Do=qL;function ZL(t){return Do(t)?k1(t):UL(t)}var Fo=ZL;function KL(t){return x1(t,Fo,Sp)}var Pp=KL,QL=1,JL=Object.prototype,tN=JL.hasOwnProperty;function eN(t,e,n,r,i,a){var o=n&QL,s=Pp(t),c=s.length,l=Pp(e),u=l.length;if(c!=u&&!o)return!1;for(var f=c;f--;){var d=s[f];if(!(o?d in e:tN.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 nN=eN,rN=me(It,"DataView"),Cp=rN,iN=me(It,"Promise"),kp=iN,aN=me(It,"Set"),Ps=aN,oN=me(It,"WeakMap"),Wc=oN,L1="[object Map]",sN="[object Object]",N1="[object Promise]",I1="[object Set]",j1="[object WeakMap]",D1="[object DataView]",cN=pr(Cp),lN=pr(de),uN=pr(kp),fN=pr(Ps),dN=pr(Wc),Bo=rt;(Cp&&Bo(new Cp(new ArrayBuffer(1)))!=D1||de&&Bo(new de)!=L1||kp&&Bo(kp.resolve())!=N1||Ps&&Bo(new Ps)!=I1||Wc&&Bo(new Wc)!=j1)&&(Bo=function(t){var e=rt(t),n=e==sN?t.constructor:void 0,r=n?pr(n):"";if(r)switch(r){case cN:return D1;case lN:return L1;case uN:return N1;case fN:return I1;case dN:return j1}return e});var Hc=Bo,hN=1,F1="[object Arguments]",B1="[object Array]",$u="[object Object]",pN=Object.prototype,z1=pN.hasOwnProperty;function vN(t,e,n,r,i,a){var o=wt(t),s=wt(e),c=o?B1:Hc(t),l=s?B1:Hc(e);c=c==F1?$u:c,l=l==F1?$u:l;var u=c==$u,f=l==$u,d=c==l;if(d&&Yu(t)){if(!Yu(e))return!1;o=!0,u=!1}if(d&&!u)return a||(a=new zc),o||C1(t)?m1(t,e,n,r,i,a):NR(t,e,c,n,r,i,a);if(!(n&hN)){var h=u&&z1.call(t,"__wrapped__"),p=f&&z1.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),nN(t,e,n,r,i,a)):!1}var gN=vN;function G1(t,e,n,r,i){return t===e?!0:t==null||e==null||!wi(t)&&!wi(e)?t!==t&&e!==e:gN(t,e,n,r,G1,i)}var Rp=G1;function yN(t,e){return Rp(t,e)}var W1=yN;function mN(t,e){for(var n=-1,r=t==null?0:t.length;++n<r&&e(t[n],n,t)!==!1;);return t}var bN=mN,xN=function(){try{var t=me(Object,"defineProperty");return t({},"",{}),t}catch(e){}}(),Uu=xN;function _N(t,e,n){e=="__proto__"&&Uu?Uu(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}var Lp=_N,ON=Object.prototype,wN=ON.hasOwnProperty;function SN(t,e,n){var r=t[e];(!(wN.call(t,e)&&Re(r,n))||n===void 0&&!(e in t))&&Lp(t,e,n)}var qu=SN;function MN(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?Lp(n,s,c):qu(n,s,c)}return n}var Cs=MN;function EN(t,e){return t&&Cs(e,Fo(e),t)}var AN=EN;function TN(t){var e=[];if(t!=null)for(var n in Object(t))e.push(n);return e}var PN=TN,CN=Object.prototype,kN=CN.hasOwnProperty;function RN(t){if(!mt(t))return PN(t);var e=Xu(t),n=[];for(var r in t)r=="constructor"&&(e||!kN.call(t,r))||n.push(r);return n}var LN=RN;function NN(t){return Do(t)?k1(t,!0):LN(t)}var Np=NN;function IN(t,e){return t&&Cs(e,Np(e),t)}var jN=IN,H1=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Y1=H1&&typeof module=="object"&&module&&!module.nodeType&&module,DN=Y1&&Y1.exports===H1,V1=DN?It.Buffer:void 0,X1=V1?V1.allocUnsafe:void 0;function FN(t,e){if(e)return t.slice();var n=t.length,r=X1?X1(n):new t.constructor(n);return t.copy(r),r}var BN=FN;function zN(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}var $1=zN;function GN(t,e){return Cs(t,Sp(t),e)}var WN=GN,HN=R1(Object.getPrototypeOf,Object),Ip=HN,YN=Object.getOwnPropertySymbols,VN=YN?function(t){for(var e=[];t;)wp(e,Sp(t)),t=Ip(t);return e}:_1,U1=VN;function XN(t,e){return Cs(t,U1(t),e)}var $N=XN;function UN(t){return x1(t,Np,U1)}var q1=UN,qN=Object.prototype,ZN=qN.hasOwnProperty;function KN(t){var e=t.length,n=new t.constructor(e);return e&&typeof t[0]=="string"&&ZN.call(t,"index")&&(n.index=t.index,n.input=t.input),n}var QN=KN;function JN(t){var e=new t.constructor(t.byteLength);return new Hu(e).set(new Hu(t)),e}var jp=JN;function t4(t,e){var n=e?jp(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}var e4=t4,n4=/\w*$/;function r4(t){var e=new t.constructor(t.source,n4.exec(t));return e.lastIndex=t.lastIndex,e}var i4=r4,Z1=X?X.prototype:void 0,K1=Z1?Z1.valueOf:void 0;function a4(t){return K1?Object(K1.call(t)):{}}var o4=a4;function s4(t,e){var n=e?jp(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}var c4=s4,l4="[object Boolean]",u4="[object Date]",f4="[object Map]",d4="[object Number]",h4="[object RegExp]",p4="[object Set]",v4="[object String]",g4="[object Symbol]",y4="[object ArrayBuffer]",m4="[object DataView]",b4="[object Float32Array]",x4="[object Float64Array]",_4="[object Int8Array]",O4="[object Int16Array]",w4="[object Int32Array]",S4="[object Uint8Array]",M4="[object Uint8ClampedArray]",E4="[object Uint16Array]",A4="[object Uint32Array]";function T4(t,e,n){var r=t.constructor;switch(e){case y4:return jp(t);case l4:case u4:return new r(+t);case m4:return e4(t,n);case b4:case x4:case _4:case O4:case w4:case S4:case M4:case E4:case A4:return c4(t,n);case f4:return new r;case d4:case v4:return new r(t);case h4:return i4(t);case p4:return new r;case g4:return o4(t)}}var P4=T4,Q1=Object.create,C4=function(){function t(){}return function(e){if(!mt(e))return{};if(Q1)return Q1(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}(),Dp=C4;function k4(t){return typeof t.constructor=="function"&&!Xu(t)?Dp(Ip(t)):{}}var R4=k4,L4="[object Map]";function N4(t){return wi(t)&&Hc(t)==L4}var I4=N4,J1=Ts&&Ts.isMap,j4=J1?Ap(J1):I4,D4=j4,F4="[object Set]";function B4(t){return wi(t)&&Hc(t)==F4}var z4=B4,tb=Ts&&Ts.isSet,G4=tb?Ap(tb):z4,W4=G4,H4=1,Y4=2,V4=4,eb="[object Arguments]",X4="[object Array]",$4="[object Boolean]",U4="[object Date]",q4="[object Error]",nb="[object Function]",Z4="[object GeneratorFunction]",K4="[object Map]",Q4="[object Number]",rb="[object Object]",J4="[object RegExp]",tI="[object Set]",eI="[object String]",nI="[object Symbol]",rI="[object WeakMap]",iI="[object ArrayBuffer]",aI="[object DataView]",oI="[object Float32Array]",sI="[object Float64Array]",cI="[object Int8Array]",lI="[object Int16Array]",uI="[object Int32Array]",fI="[object Uint8Array]",dI="[object Uint8ClampedArray]",hI="[object Uint16Array]",pI="[object Uint32Array]",Bn={};Bn[eb]=Bn[X4]=Bn[iI]=Bn[aI]=Bn[$4]=Bn[U4]=Bn[oI]=Bn[sI]=Bn[cI]=Bn[lI]=Bn[uI]=Bn[K4]=Bn[Q4]=Bn[rb]=Bn[J4]=Bn[tI]=Bn[eI]=Bn[nI]=Bn[fI]=Bn[dI]=Bn[hI]=Bn[pI]=!0,Bn[q4]=Bn[nb]=Bn[rI]=!1;function Zu(t,e,n,r,i,a){var o,s=e&H4,c=e&Y4,l=e&V4;if(n&&(o=i?n(t,r,i,a):n(t)),o!==void 0)return o;if(!mt(t))return t;var u=wt(t);if(u){if(o=QN(t),!s)return $1(t,o)}else{var f=Hc(t),d=f==nb||f==Z4;if(Yu(t))return BN(t,s);if(f==rb||f==eb||d&&!i){if(o=c||d?{}:R4(t),!s)return c?$N(t,jN(o,t)):WN(t,AN(o,t))}else{if(!Bn[f])return i?t:{};o=P4(t,f,s)}}a||(a=new zc);var h=a.get(t);if(h)return h;a.set(t,o),W4(t)?t.forEach(function(g){o.add(Zu(g,e,n,g,t,a))}):D4(t)&&t.forEach(function(g,y){o.set(y,Zu(g,e,n,y,t,a))});var p=l?c?q1:Pp:c?Np:Fo,v=u?void 0:p(t);return bN(v||t,function(g,y){v&&(y=g,g=t[y]),qu(o,y,Zu(g,e,n,y,t,a))}),o}var ib=Zu,vI=1,gI=4;function yI(t){return ib(t,vI|gI)}var ab=yI,mI="[object Symbol]";function bI(t){return typeof t=="symbol"||wi(t)&&rt(t)==mI}var Yc=bI,xI=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,_I=/^\w*$/;function OI(t,e){if(wt(t))return!1;var n=typeof t;return n=="number"||n=="symbol"||n=="boolean"||t==null||Yc(t)?!0:_I.test(t)||!xI.test(t)||e!=null&&t in Object(e)}var Fp=OI,wI="Expected a function";function Bp(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(wI);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||Gu),n}Bp.Cache=Gu;var SI=Bp,MI=500;function EI(t){var e=SI(t,function(r){return n.size===MI&&n.clear(),r}),n=e.cache;return e}var AI=EI,TI=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,PI=/\\(\\)?/g,CI=AI(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(TI,function(n,r,i,a){e.push(i?a.replace(PI,"$1"):r||n)}),e}),kI=CI;function RI(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 Ku=RI,LI=1/0,ob=X?X.prototype:void 0,sb=ob?ob.toString:void 0;function cb(t){if(typeof t=="string")return t;if(wt(t))return Ku(t,cb)+"";if(Yc(t))return sb?sb.call(t):"";var e=t+"";return e=="0"&&1/t==-LI?"-0":e}var zp=cb;function NI(t){return t==null?"":zp(t)}var Gp=NI;function II(t,e){return wt(t)?t:Fp(t,e)?[t]:kI(Gp(t))}var ks=II,jI=1/0;function DI(t){if(typeof t=="string"||Yc(t))return t;var e=t+"";return e=="0"&&1/t==-jI?"-0":e}var Rs=DI;function FI(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 Qu=FI;function BI(t,e,n){var r=t==null?void 0:Qu(t,e);return r===void 0?n:r}var Mr=BI,Wp=function(){return Wp=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},Wp.apply(this,arguments)},lb=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 zI(t,e){var n=(0,te.useRef)(),r=(0,te.useRef)(),i=(0,te.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),zt(v)&&Kt("".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)}:wt(v)?v.forEach(function(g){l(g,h)}):mt(v)&&l(v,h)})};return(0,te.useEffect)(function(){if(n.current&&!W1(r.current,e)){var u=!1;if(r.current){var f=r.current,d=f.data,h=lb(f,["data"]),p=e.data,v=lb(e,["data"]);u=W1(h,v)}r.current=ab(e),u?n.current.changeData(Mr(e,"data")):(l(e),n.current.update(e),n.current.render())}},[e]),(0,te.useEffect)(function(){if(!i.current)return function(){return null};r.current||(r.current=ab(e)),l(e);var u=new t(i.current,Wp({},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 GI="*",WI=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[GI]||[],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}(),Hp=WI,S=yt(21769),Yp=yt(69687),ot=yt(68072),qt=yt(49701),Ls=yt(96140);function ub(){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 HI(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 aut(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 out(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 YI(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 sut(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 cut(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 lut(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 uut(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 fut(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 dut(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 hut(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 put(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 vut(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 gut(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 yut(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 mut(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 but(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 xut(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 _ut(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 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=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 wut(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 Sut(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"}function Mut(t){return Math.hypot(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8])}function Eut(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 Aut(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 Tut(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 Put(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 Cut(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 kut(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 Rut=null,Lut=null,sr=yt(76126);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 Nut(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t}function $a(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 Iut(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 jut(t,e){var n=qI(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 Dut(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 Fut(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 But(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 zut(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 VI(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 XI(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 Gut(t,e,n){return XI(t,e),UI(t,t,n),VI(t,t),t}function Vp(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 Wut(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 Xp(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 Hut(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t}function $I(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 Ju(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 Yut(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"}var Vut=sr.d9,$p=sr.al,tf=sr.JG,Xut=sr.t8,$ut=sr.IH,fb=Ua,UI=sr.bA,qI=sr.AK,Uut=sr.t7,qut=sr.kE,Zut=null,Kut=sr.we,Qut=null,ef=sr.Fv,Jut=sr.I6,tft=sr.fS,eft=function(){var t=ot.create(),e=ot.fromValues(1,0,0),n=ot.fromValues(0,1,0);return function(r,i,a){var o=ot.dot(i,a);return o<-.999999?(ot.cross(t,e,i),ot.len(t)<1e-6&&ot.cross(t,n,i),ot.normalize(t,t),$a(r,t,Math.PI),r):o>.999999?(r[0]=0,r[1]=0,r[2]=0,r[3]=1,r):(ot.cross(t,i,a),r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=1+o,ef(r,r))}}(),nft=function(){var t=br(),e=br();return function(n,r,i,a,o,s){return Vp(t,r,o,s),Vp(e,i,a,s),Vp(n,t,e,2*s*(1-s)),n}}(),rft=function(){var t=ub();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],ef(e,$I(e,t))}}(),Vc=yt(1153),xr=yt(72909);function ui(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}var ye=yt(63385),nf=yt(33317),tr=function(t){return(0,nf.Z)(t,"String")},cr=yt(58046),Xc={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0};function db(t){return Array.isArray(t)&&t.every(function(e){var n=e[0].toLowerCase();return Xc[n]===e.length-1&&"achlmqstvz".includes(n)})}function hb(t){return db(t)&&t.every(function(e){var n=e[0];return n===n.toUpperCase()})}function pb(t){return hb(t)&&t.every(function(e){var n=e[0];return"ACLMQZ".includes(n)})}var vb={x1:0,y1:0,x2:0,y2:0,x:0,y:0,qx:null,qy:null};function gb(t){for(var e=t.pathValue[t.segmentStart],n=e.toLowerCase(),r=t.data;r.length>=Xc[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,Xc[n]))),!!Xc[n]););}function ZI(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 KI(t){return t>=48&&t<=57||t===43||t===45||t===46}function Ns(t){return t>=48&&t<=57}function QI(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 JI(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 rf(t){for(var e=t.pathValue,n=t.max;t.index<n&&JI(e.charCodeAt(t.index));)t.index+=1}function tj(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 ej(t){return(t|32)===97}function nj(t){var e=t.max,n=t.pathValue,r=t.index,i=n.charCodeAt(r),a=Xc[n[r].toLowerCase()];if(t.segmentStart=r,!tj(i)){t.err='[path-util]: Invalid path value "'+n[r]+'" is not a path command';return}if(t.index+=1,rf(t),t.data=[],!a){gb(t);return}for(;;){for(var o=a;o>0;o-=1){if(ej(i)&&(o===3||o===4)?ZI(t):QI(t),t.err.length)return;t.data.push(t.param),rf(t),t.index<e&&n.charCodeAt(t.index)===44&&(t.index+=1,rf(t))}if(t.index>=t.max||!KI(n.charCodeAt(t.index)))break}gb(t)}var rj=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 ij(t){if(db(t))return[].concat(t);var e=new rj(t);for(rf(e);e.index<e.max&&!e.err.length;)nj(e);return e.err?e.err:e.segments}function aj(t){if(hb(t))return[].concat(t);var e=ij(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 oj(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 af(t){if(pb(t))return[].concat(t);for(var e=aj(t),n=(0,S.pi)({},vb),r=0;r<e.length;r+=1){e[r]=oj(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 Up(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 yb(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 sj(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 Up(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=yb({x:1,y:0},N),R={x:(-O.x-C.x)/v,y:(-O.y-C.y)/g},D=yb(N,R);!o&&D>0?D-=2*p:o&&D<0&&(D+=2*p),D%=2*p;var F=k+D*l,B=v*d(F),z=g*f(F),Y={x:d(m)*B-f(m)*z+j.x,y:f(m)*B+d(m)*z+j.y};return Y}function cj(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=sj(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 lj(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 mb(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=lj(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 uj(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 fj(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=uj(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 bb(t,e,n){for(var r,i,a,o,s,c,l=af(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=Up(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=cj(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=mb(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=fj(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=Up(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 dj(t,e){return bb(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,nf.Z)(t,"Array")},of=function(t){if(Dr(t))return t.reduce(function(e,n){return Math.min(e,n)},t[0])},sf=function(t){if(Dr(t))return t.reduce(function(e,n){return Math.max(e,n)},t[0])},hj=1e-5;function $c(t,e,n){return n===void 0&&(n=hj),Math.abs(t-e)<n}var pj=function(t,e){return(t%e+e)%e},xb=pj;function vj(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 gj(t){return pb(t)&&t.every(function(e){var n=e[0];return"MC".includes(n)})}function cf(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 qp(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=cf(u,f,-y),u=b.x,f=b.y,b=cf(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,F=v;O=_+g*(o&&O>_?1:-1),p=w+d*Math.cos(O),v=M+h*Math.sin(O),m=qp(p,v,d,h,i,0,o,D,F,[O,R,w,M])}k=O-_;var B=Math.cos(_),z=Math.sin(_),Y=Math.cos(O),$=Math.sin(O),tt=Math.tan(k/4),it=4/3*d*tt,St=4/3*h*tt,Ft=[u,f],Xt=[u+it*z,f-St*B],Pt=[p+it*$,v-St*Y],Ct=[p,v];if(Xt[0]=2*Ft[0]-Xt[0],Xt[1]=2*Ft[1]-Xt[1],l)return Xt.concat(Pt,Ct,m);m=Xt.concat(Pt,Ct,m);for(var se=[],ce=0,Oe=m.length;ce<Oe;ce+=1)se[ce]=ce%2?cf(m[ce-1],m[ce],y).y:cf(m[ce],m[ce+1],y).x;return se}function yj(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 _b=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 mj(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(qp(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(yj(o[0],o[1],o[2],o[3],o[4],o[5]));case"L":return["C"].concat(_b(s,c,i,a));case"Z":return s===l&&c===u?["C",s,c,l,u,l,u]:["C"].concat(_b(s,c,l,u));default:}return t}function Zp(t,e){if(e===void 0&&(e=!1),gj(t)){var n=[].concat(t);return e?[n,[]]:n}for(var r=af(t),i=(0,S.pi)({},vb),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=mj(r[f],i);r[f]=d,vj(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 bj(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 Ob(t){return t.map(function(e,n,r){var i=n&&r[n-1].slice(-2).concat(e.slice(1)),a=n?mb(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?bj(i):[e,e]:o=[e],{s:e,ss:o,l:a}})}function wb(t,e,n){var r=Ob(t),i=Ob(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:wb(v[0],v[1],f)}function xj(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 _j(t){var e=0,n=0,r=0;return Zp(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=xj(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 Sb(t){return _j(t)>=0}function Oj(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 wj(t){return t.map(function(e){return Array.isArray(e)?[].concat(e):e})}function Sj(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 Mj(t,e){var n=t.length-1,r=[],i=0,a=0,o=Sj(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 Ej=function(t){return(0,nf.Z)(t,"Boolean")},Mb=Ej,zo=function(t){var e=typeof t;return t!==null&&e==="object"||e==="function"},Aj=function(t){return t===void 0},er=Aj;function Tj(t,e,n){return bb(t,e,(0,S.pi)((0,S.pi)({},n),{bbox:!1,length:!0})).point}var Pj=yt(19007);function Hr(t,e,n,r){var i=t-n,a=e-r;return Math.sqrt(i*i+a*a)}function lf(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 Eb(t){return(t+Math.PI*2)%(Math.PI*2)}function Ab(t,e){var n=Math.abs(t);return e>0?n:n*-1}function Cj(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+Ab(v,c),y:e+Ab(g,l)}}function kj(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 Rj(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 Lj(t,e,n){return Math.atan(-e/t*Math.tan(n))}function Nj(t,e,n){return Math.atan(e/(t*Math.tan(n)))}function Ij(t,e,n,r,i,a){return n*Math.cos(i)*Math.cos(a)-r*Math.sin(i)*Math.sin(a)+t}function jj(t,e,n,r,i,a){return n*Math.sin(i)*Math.cos(a)+r*Math.cos(i)*Math.sin(a)+e}function Dj(t,e,n,r){var i=Math.atan2(r*t,n*e);return(i+Math.PI*2)%(Math.PI*2)}function Tb(t,e,n){return{x:t*Math.cos(n),y:e*Math.sin(n)}}function Pb(t,e,n){var r=Math.cos(n),i=Math.sin(n);return[t*r-e*i,t*i+e*r]}function Fj(t,e,n,r,i,a,o){for(var s=Lj(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=Ij(t,e,n,r,i,u[f]);h<c&&(c=h),h>l&&(l=h)}for(var p=Nj(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=jj(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 ift(t,e,n,r,i,a,o,s,c){var l=Pb(s-t,c-e,-i),u=__read(l,2),f=u[0],d=u[1],h=Cj(0,0,n,r,f,d),p=Dj(n,r,h.x,h.y);p<a?h=Tb(n,r,a):p>o&&(h=Tb(n,r,o));var v=Pb(h.x,h.y,i);return{x:v[0]+t,y:v[1]+e}}function aft(t,e,n,r,i,a,o,s){var c=(o-a)*s+a,l=kj(t,e,n,r,i,a,o,c),u=Rj(t,e,n,r,i,a,o,c);return Eb(Math.atan2(u,l))}var Bj=1e-4;function Cb(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<Bj);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 zj(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 oft(t,e,n,r){return lf([t,n],[e,r])}function kb(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 Gj(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):Rb(t,e,n,r,i,a)}function Rb(t,e,n,r,i,a){var o=[n-t,r-e];if(Vc.I6(o,[0,0]))return Math.sqrt((i-t)*(i-t)+(a-e)*(a-e));var s=[-o[1],o[0]];Vc.Fv(s,s);var c=[i-t,a-e];return Math.abs(Vc.AK(c,s))}function sft(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 Lb(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 Nb(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($c(i,0))$c(a,0)||(c=-o/a,c>=0&&c<=1&&s.push(c));else{var f=a*a-4*i*o;$c(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 Wj(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 Kp(t,e,n,r,i,a,o,s,c){if(c===0)return zj([t,n,i,o],[e,r,a,s]);var l=Wj(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 Kp.apply(void 0,__spreadArray([],__read(u),!1))+Kp.apply(void 0,__spreadArray([],__read(f),!1))}function Hj(t,e,n,r,i,a,o,s){for(var c=[t,o],l=[e,s],u=Nb(t,n,i,o),f=Nb(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 lf(c,l)}function cft(t,e,n,r,i,a,o,s){return Kp(t,e,n,r,i,a,o,s,3)}function Yj(t,e,n,r,i,a,o,s,c,l,u){return Cb([t,n,i,o],[e,r,a,s],c,l,Go,u)}function Ib(t,e,n,r,i,a,o,s,c,l,u){var f=Yj(t,e,n,r,i,a,o,s,c,l,u);return Hr(f.x,f.y,c,l)}function lft(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 uft(t,e,n,r,i,a,o,s,c){var l=Lb(t,n,i,o,c),u=Lb(e,r,a,s,c);return Eb(Math.atan2(u,l))}function jb(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 Db(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 Fb(t,e){if(e>1||e<0||t.length<2)return null;var n=jb(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=jb(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 zb(t,e,n){for(var r=1/0,i=0;i<t.length-1;i++){var a=t[i],o=t[i+1],s=Gj(a[0],a[1],o[0],o[1],e,n);s<r&&(r=s)}return r}function Vj(t){for(var e=[],n=[],r=0;r<t.length;r++){var i=t[r];e.push(i[0]),n.push(i[1])}return lf(e,n)}function Xj(t){return Db(t)}function fft(t,e){return Fb(t,e)}function dft(t,e,n){return zb(t,e,n)}function hft(t,e){return Bb(t,e)}function uf(t){var e=t.slice(0);return t.length&&e.push(t[0]),e}function pft(t){return Vj(t)}function vft(t){return Db(uf(t))}function gft(t,e){return Fb(uf(t),e)}function yft(t,e,n){return zb(uf(t),e,n)}function mft(t,e){return Bb(uf(t),e)}function Uc(t,e,n,r){var i=1-r;return i*i*t+2*r*i*e+r*r*n}function Gb(t,e,n){var r=t+n-2*e;if($c(r,0))return[.5];var i=(t-e)/r;return i<=1&&i>=0?[i]:[]}function $j(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 Qp(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=$j(t,e,n,r,i,a,.5),c=s[0],l=s[1];return c.push(o-1),l.push(o-1),Qp.apply(void 0,__spreadArray([],__read(c),!1))+Qp.apply(void 0,__spreadArray([],__read(l),!1))}function Uj(t,e,n,r,i,a){var o=Gb(t,n,i)[0],s=Gb(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)),lf(c,l)}function bft(t,e,n,r,i,a){return Qp(t,e,n,r,i,a,3)}function qj(t,e,n,r,i,a,o,s){return Cb([t,n,i],[e,r,a],o,s,Uc)}function Zj(t,e,n,r,i,a,o,s){var c=qj(t,e,n,r,i,a,o,s);return Hr(c.x,c.y,o,s)}var Kj=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof yt.g!="undefined"?yt.g:typeof self!="undefined"?self:{},Wb={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(Kj,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 F=O[w],B=M,z=E;for(i(O,M,w),A(O[E],F)>0&&i(O,M,E);B<z;){for(i(O,B,z),B++,z--;A(O[B],F)<0;)B++;for(;A(O[z],F)>0;)z--}A(O[M],F)===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 F=R;F<=D;F+=N){var B=Math.min(F+N-1,D);j.children.push(this._build(w,F,B,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 F=w.children[D];u(j,w.leaf?P(F):F),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})})(Wb);var Qj=Wb.exports,bt;(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"})(bt||(bt={}));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}(),Jj=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 Jp(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function ff(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function Hb(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function t6(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 e6(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?ot.clone(t):(0,xr.Z)(t)?ot.fromValues(t,e,n):ot.fromValues(t[0],t[1]||e,t[2]||n)}function nr(t){return t*(Math.PI/180)}function Li(t){return t*(180/Math.PI)}function xft(t){return t=t%400,t<0&&(t+=400),t/400*360}function _ft(t){return t/360}function n6(t){return 360*t}function r6(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 i6(t,e){var n,r,i=Math.PI*.5,a=(0,S.CR)(qt.getScaling(ot.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 t0(t,e){return e.length===16?i6(t,e):r6(t,e)}function a6(t,e,n,r,i){var a=Math.cos(t),o=Math.sin(t);return YI(r*a,i*o,0,-r*o,i*a,0,e,n,1)}function o6(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 Yb(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=qt.create(),qi=qt.create(),qc=sr.Ue(),ze=[ot.create(),ot.create(),ot.create()],Vb=ot.create();function s6(t,e,n,r,i,a){if(!c6(oa,t)||(qt.copy(qi,oa),qi[3]=0,qi[7]=0,qi[11]=0,qi[15]=1,Math.abs(qt.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=qt.invert(qi,qi);if(!h)return!1;qt.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,l6(ze,oa),n[0]=ot.length(ze[0]),ot.normalize(ze[0],ze[0]),r[0]=ot.dot(ze[0],ze[1]),e0(ze[1],ze[1],ze[0],1,-r[0]),n[1]=ot.length(ze[1]),ot.normalize(ze[1],ze[1]),r[0]/=n[1],r[1]=ot.dot(ze[0],ze[2]),e0(ze[2],ze[2],ze[0],1,-r[1]),r[2]=ot.dot(ze[1],ze[2]),e0(ze[2],ze[2],ze[1],1,-r[2]),n[2]=ot.length(ze[2]),ot.normalize(ze[2],ze[2]),r[1]/=n[2],r[2]/=n[2],ot.cross(Vb,ze[1],ze[2]),ot.dot(ze[0],Vb)<0)for(var p=0;p<3;p++)n[p]*=-1,ze[p][0]*=-1,ze[p][1]*=-1,ze[p][2]*=-1;return a[0]=.5*Math.sqrt(Math.max(1+ze[0][0]-ze[1][1]-ze[2][2],0)),a[1]=.5*Math.sqrt(Math.max(1-ze[0][0]+ze[1][1]-ze[2][2],0)),a[2]=.5*Math.sqrt(Math.max(1-ze[0][0]-ze[1][1]+ze[2][2],0)),a[3]=.5*Math.sqrt(Math.max(1+ze[0][0]+ze[1][1]+ze[2][2],0)),ze[2][1]>ze[1][2]&&(a[0]=-a[0]),ze[0][2]>ze[2][0]&&(a[1]=-a[1]),ze[1][0]>ze[0][1]&&(a[2]=-a[2]),!0}function c6(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 l6(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 e0(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),Jp(this.min,this.center,this.halfExtents),ff(this.max,this.center,this.halfExtents)},t.prototype.setMinMax=function(e,n){ff(this.center,n,e),Hb(this.center,this.center,.5),Jp(this.halfExtents,n,e),Hb(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],Jp(this.min,r,i),ff(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=t6([0,0,0],this.getMin(),e.getMin()),i=e6([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}(),u6=function(){function t(e,n){this.distance=e||0,this.normal=n||ot.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 ot.dot(e,this.normal)-this.distance},t.prototype.normalize=function(){var e=1/ot.len(this.normal);ot.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&&ot.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 f6=function(){function t(e){if(this.planes=[],e)this.planes=e;else for(var n=0;n<6;n++)this.planes.push(new u6)}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];ot.set(this.planes[0].normal,o-r,u-s,p-f),this.planes[0].distance=m-v,ot.set(this.planes[1].normal,o+r,u+s,p+f),this.planes[1].distance=m+v,ot.set(this.planes[2].normal,o+i,u+c,p+d),this.planes[2].distance=m+g,ot.set(this.planes[3].normal,o-i,u-c,p-d),this.planes[3].distance=m-g,ot.set(this.planes[4].normal,o-a,u-l,p-h),this.planes[4].distance=m-y,ot.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}(),Cr=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}(),Tn="Method not implemented.",Fs="Use document.documentElement instead.",d6="Cannot append a destroyed element.",On;(function(t){t[t.ORBITING=0]="ORBITING",t[t.EXPLORING=1]="EXPLORING",t[t.TRACKING=2]="TRACKING"})(On||(On={}));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 Xb={UPDATED:"updated"},$b=2e-4,Ub=function(){function t(){this.clipSpaceNearZ=Is.NEGATIVE_ONE,this.eventEmitter=new Yp.Z,this.matrix=qt.create(),this.right=ot.fromValues(1,0,0),this.up=ot.fromValues(0,1,0),this.forward=ot.fromValues(0,0,1),this.position=ot.fromValues(0,0,1),this.focalPoint=ot.fromValues(0,0,0),this.distanceVector=ot.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=qt.create(),this.projectionMatrixInverse=qt.create(),this.jitteredProjectionMatrix=void 0,this.enableUpdate=!0,this.type=On.EXPLORING,this.trackingMode=Zc.DEFAULT,this.projectionMode=fi.PERSPECTIVE,this.frustum=new f6,this.orthoMatrix=qt.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===On.EXPLORING?this.setWorldRotation(!0):this.setWorldRotation(!1),this._getAngles(),this.type===On.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!==On.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 qt.invert(qt.create(),this.matrix)},t.prototype.getWorldTransform=function(){return this.matrix},t.prototype.jitterProjectionMatrix=function(e,n){var r=qt.fromTranslation(qt.create(),[e,n,0]);this.jitteredProjectionMatrix=qt.multiply(qt.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=ot.fromValues(c-i,l-a,0),f=ot.dot(u,this.right)/ot.length(this.right),d=ot.dot(u,this.up)/ot.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(nr(.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 o6(this.projectionMatrix,l,l+c,o,o-s,e,this.far,this.clipSpaceNearZ===Is.ZERO),qt.scale(this.projectionMatrix,this.projectionMatrix,ot.fromValues(1,-1,1)),qt.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?qt.ortho(this.projectionMatrix,d,h,v,p,a,o):qt.orthoZO(this.projectionMatrix,d,h,v,p,a,o),qt.scale(this.projectionMatrix,this.projectionMatrix,ot.fromValues(1,-1,1)),qt.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=ot.fromValues(0,1,0);if(this.focalPoint=ei(e,n,r),this.trackingMode===Zc.CINEMATIC){var a=ot.subtract(ot.create(),this.focalPoint,this.position);e=a[0],n=a[1],r=a[2];var o=ot.length(a),s=Li(Math.asin(n/o)),c=90+Li(Math.atan2(r,e)),l=qt.create();qt.rotateY(l,l,nr(c)),qt.rotateX(l,l,nr(s)),i=ot.transformMat4(ot.create(),[0,1,0],l)}return qt.invert(this.matrix,qt.lookAt(qt.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<$b&&(this.distance=$b),this.dollyingStep=this.distance/100;var n=ot.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===On.ORBITING||this.type===On.EXPLORING?this._getPosition():this.type===On.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===On.ORBITING||this.type===On.EXPLORING?this._getPosition():this.type===On.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===On.ORBITING||this.type===On.EXPLORING?this._getPosition():this.type===On.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=$a(br(),[0,0,1],nr(this.roll));qt.identity(this.matrix);var n=$a(br(),[1,0,0],nr((this.rotateWorld&&this.type!==On.TRACKING||this.type===On.TRACKING?1:-1)*this.elevation)),r=$a(br(),[0,1,0],nr((this.rotateWorld&&this.type!==On.TRACKING||this.type===On.TRACKING?1:-1)*this.azimuth)),i=Ua(br(),r,n);i=Ua(br(),i,e);var a=qt.fromQuat(qt.create(),i);this.type===On.ORBITING||this.type===On.EXPLORING?(qt.translate(this.matrix,this.matrix,this.focalPoint),qt.multiply(this.matrix,this.matrix,a),qt.translate(this.matrix,this.matrix,[0,0,this.distance])):this.type===On.TRACKING&&(qt.translate(this.matrix,this.matrix,this.position),qt.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(){ot.copy(this.right,ei(sr.fF(sr.Ue(),[1,0,0,0],this.matrix))),ot.copy(this.up,ei(sr.fF(sr.Ue(),[0,1,0,0],this.matrix))),ot.copy(this.forward,ei(sr.fF(sr.Ue(),[0,0,1,0],this.matrix))),ot.normalize(this.right,this.right),ot.normalize(this.up,this.up),ot.normalize(this.forward,this.forward)},t.prototype._getAngles=function(){var e=this.distanceVector[0],n=this.distanceVector[1],r=this.distanceVector[2],i=ot.length(this.distanceVector);if(i===0){this.elevation=0,this.azimuth=0;return}this.type===On.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(){ot.copy(this.position,ei(sr.fF(sr.Ue(),[0,0,0,1],this.matrix))),this._getDistance()},t.prototype._getFocalPoint=function(){ot.transformMat3(this.distanceVector,[0,0,-this.distance],HI(ub(),this.matrix)),ot.add(this.focalPoint,this.position,this.distanceVector),this._getDistance()},t.prototype._getDistance=function(){this.distanceVector=ot.subtract(ot.create(),this.focalPoint,this.position),this.distance=ot.length(this.distanceVector),this.dollyingStep=this.distance/100},t.prototype._getOrthoMatrix=function(){if(this.projectionMode===fi.ORTHOGRAPHIC){var e=this.position,n=$a(br(),[0,0,1],-this.roll*Math.PI/180);qt.fromRotationTranslationScaleOrigin(this.orthoMatrix,n,ot.fromValues((this.rright-this.left)/2-e[0],(this.top-this.bottom)/2-e[1],0),ot.fromValues(this.zoom,this.zoom,1),e)}},t.prototype.triggerUpdate=function(){if(this.enableUpdate){var e=this.getViewTransform(),n=qt.multiply(qt.create(),this.getPerspective(),e);this.getFrustum().extractFromVPMatrix(n),this.eventEmitter.emit(Xb.UPDATED)}},t.prototype.rotate=function(e,n,r){throw new Error(Tn)},t.prototype.pan=function(e,n){throw new Error(Tn)},t.prototype.dolly=function(e){throw new Error(Tn)},t.prototype.createLandmark=function(e,n){throw new Error(Tn)},t.prototype.gotoLandmark=function(e,n){throw new Error(Tn)},t.prototype.cancelLandmarkAnimation=function(){throw new Error(Tn)},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 ne;(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"})(ne||(ne={}));var Si;(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"})(Si||(Si={}));var qb;(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"})(qb||(qb={}));var n0;(function(t){t[t.kYes=0]="kYes",t[t.kNo=1]="kNo"})(n0||(n0={}));var r0;(function(t){t[t.kYes=0]="kYes",t[t.kNo=1]="kNo"})(r0||(r0={}));var h6=[{name:"em",unit_type:ne.kEms},{name:"px",unit_type:ne.kPixels},{name:"deg",unit_type:ne.kDegrees},{name:"rad",unit_type:ne.kRadians},{name:"grad",unit_type:ne.kGradians},{name:"ms",unit_type:ne.kMilliseconds},{name:"s",unit_type:ne.kSeconds},{name:"rem",unit_type:ne.kRems},{name:"turn",unit_type:ne.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 p6=function(t){return h6.find(function(e){return e.name===t}).unit_type},v6=function(t){return t?t==="number"?ne.kNumber:t==="percent"||t==="%"?ne.kPercentage:p6(t):ne.kUnknown},g6=function(t){switch(t){case ne.kNumber:case ne.kInteger:return Si.kUNumber;case ne.kPercentage:return Si.kUPercent;case ne.kPixels:return Si.kULength;case ne.kMilliseconds:case ne.kSeconds:return Si.kUTime;case ne.kDegrees:case ne.kRadians:case ne.kGradians:case ne.kTurns:return Si.kUAngle;default:return Si.kUOther}},y6=function(t){switch(t){case Si.kUNumber:return ne.kNumber;case Si.kULength:return ne.kPixels;case Si.kUPercent:return ne.kPercentage;case Si.kUTime:return ne.kSeconds;case Si.kUAngle:return ne.kDegrees;default:return ne.kUnknown}},Zb=function(t){var e=1;switch(t){case ne.kPixels:case ne.kDegrees:case ne.kSeconds:break;case ne.kMilliseconds:e=.001;break;case ne.kRadians:e=180/Math.PI;break;case ne.kGradians:e=.9;break;case ne.kTurns:e=360;break}return e},i0=function(t){switch(t){case ne.kNumber:case ne.kInteger:return"";case ne.kPercentage:return"%";case ne.kEms:return"em";case ne.kRems:return"rem";case ne.kPixels:return"px";case ne.kDegrees:return"deg";case ne.kRadians:return"rad";case ne.kGradians:return"grad";case ne.kMilliseconds:return"ms";case ne.kSeconds:return"s";case ne.kTurns:return"turn"}return""},df=function(){function t(){}return t.isAngle=function(e){return e===ne.kDegrees||e===ne.kRadians||e===ne.kGradians||e===ne.kTurns},t.isLength=function(e){return e>=ne.kEms&&e<ne.kDegrees},t.isRelativeUnit=function(e){return e===ne.kPercentage||e===ne.kEms||e===ne.kRems},t.isTime=function(e){return e===ne.kSeconds||e===ne.kMilliseconds},t.prototype.toString=function(){return this.buildCSSText(n0.kNo,r0.kNo,"")},t.prototype.isNumericValue=function(){return this.getType()>=Qa.kUnitType&&this.getType()<=Qa.kClampType},t}(),m6=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}(df),sa;(function(t){t[t.Constant=0]="Constant",t[t.LinearGradient=1]="LinearGradient",t[t.RadialGradient=2]="RadialGradient"})(sa||(sa={}));var hf=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}(df),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}(df),b6=Yr(function(t){return t===void 0&&(t=""),t.replace(/-([a-z])/g,function(e){return e[1].toUpperCase()})}),Kb=function(t){return t.split("").map(function(e,n){return e.toUpperCase()===e?"".concat(n!==0?"-":"").concat(e.toLowerCase()):e}).join("")};function x6(t){if(!t)throw new Error}function Bs(t){return typeof t=="function"}function _6(t){return typeof t=="symbol"}var Oft=function(t){return Object.fromEntries(Object.entries(t).filter(function(e){var n=__read(e,2),r=n[1];return r!==void 0}))},O6={d:{alias:"path"},strokeDasharray:{alias:"lineDash"},strokeWidth:{alias:"lineWidth"},textAnchor:{alias:"textAlign"},src:{alias:"img"}},a0=Yr(function(t){var e=b6(t),n=O6[e];return e=(n==null?void 0:n.alias)||e,e}),w6=function(t,e){e===void 0&&(e="");var n="";return Number.isFinite(t)?(x6(Number.isNaN(t)),n="NaN"):t>0?n="infinity":n="-infinity",n+=e},o0=function(t){return y6(g6(t))},Pn=function(t){(0,S.ZT)(e,t);function e(n,r){r===void 0&&(r=ne.kNumber);var i=t.call(this)||this,a;return typeof r=="string"?a=v6(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=o0(this.unit);if(r!==o0(n)||r===ne.kUnknown)return null;var i=Zb(this.unit)/Zb(n);return new e(this.value*i,n)},e.prototype.buildCSSText=function(n,r,i){var a;switch(this.unit){case ne.kUnknown:break;case ne.kInteger:a=Number(this.value).toFixed(0);break;case ne.kNumber:case ne.kPercentage:case ne.kEms:case ne.kRems:case ne.kPixels:case ne.kDegrees:case ne.kRadians:case ne.kGradians:case ne.kMilliseconds:case ne.kSeconds:case ne.kTurns:{var o=-999999,s=999999,c=this.value,l=i0(this.unit);if(c<o||c>s){var u=i0(this.unit);!Number.isFinite(c)||Number.isNaN(c)?a=w6(c,u):a=c+(u||"")}else a="".concat(c).concat(l)}}return i+=a,i},e}(df),kr=new Pn(0,"px");new Pn(1,"px");var Ea=new Pn(0,"deg"),s0=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}(m6),Ln=new di("unset"),S6=new di("initial"),M6=new di("inherit"),c0={"":Ln,unset:Ln,initial:S6,inherit:M6},l0=function(t){return c0[t]||(c0[t]=new di(t)),c0[t]},u0=new s0(0,0,0,0,!0),Qb=new s0(0,0,0,0),E6=Yr(function(t,e,n,r){return new s0(t,e,n,r)},function(t,e,n,r){return"rgba(".concat(t,",").concat(e,",").concat(n,",").concat(r,")")}),rr=function(t,e){return e===void 0&&(e=ne.kNumber),new Pn(t,e)},pf=new Pn(50,"%"),f0;(function(t){t[t.Standard=0]="Standard"})(f0||(f0={}));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 Jb={absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new Wo(0,0,0,0)},oe;(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>"})(oe||(oe={}));function A6(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 T6=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(F){throw new Error(e+": "+F)}function r(){var F=i();return e.length>0&&n("Invalid input not EOF"),F}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(F,B,z){return s(B,function(Y){var $=z();return $&&(R(t.comma)||n("Missing comma before color stops")),{type:F,orientation:$,colorStops:b(_)}})}function s(F,B){var z=R(F);if(z){R(t.startCall)||n("Missing (");var Y=B(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 F,B=d(),z;return B&&(F=[],F.push(B),z=e,R(t.comma)&&(B=d(),B?F.push(B):e=z)),F}function d(){var F=h()||p();if(F)F.at=g();else{var B=v();if(B){F=B;var z=g();z&&(F.at=z)}else{var Y=y();Y&&(F={type:"default-radial",at:Y})}}return F}function h(){var F=k("shape",/^(circle)/i,0);return F&&(F.style=N()||v()),F}function p(){var F=k("shape",/^(ellipse)/i,0);return F&&(F.style=C()||v()),F}function v(){return k("extent-keyword",t.extentKeywords,1)}function g(){if(k("position",/^at/,0)){var F=y();return F||n("Missing positioning value"),F}}function y(){var F=m();if(F.x||F.y)return{type:"position",value:F}}function m(){return{x:C(),y:C()}}function b(F){var B=F(),z=[];if(B)for(z.push(B);R(t.comma);)B=F(),B?z.push(B):n("One extra comma");return z}function _(){var F=O();return F||n("Expected color definition"),F.length=C(),F}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(F,B,z){var Y=R(B);if(Y)return{type:F,value:Y[z]}}function R(F){var B=/^[\n\r\t\s]+/.exec(e);B&&D(B[0].length);var z=F.exec(e);return z&&D(z[0].length),z}function D(F){e=e.substring(F)}return function(F){return e=F,r()}}();function P6(t,e,n){var r=nr(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 C6(t,e,n,r,i){var a=n.value,o=r.value;n.unit===ne.kPercentage&&(a=n.value/100*t),r.unit===ne.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 Pn?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 k6=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,R6=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,L6=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,tx=/[\d.]+:(#[^\s]+|[^\)]+\))/gi;function N6(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,ye.Z)(c)&&!(0,ye.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 I6={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},j6=Yr(function(t){var e;return t.type==="angular"?e=Number(t.value):e=I6[t.value]||0,rr(e,"deg")}),D6=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:rr(e,r),cy:rr(n,i)}}),F6=Yr(function(t){var e;if(t.indexOf("linear")>-1||t.indexOf("radial")>-1){var n=T6(t);return n.map(function(s){var c=s.type,l=s.orientation,u=s.colorStops;N6(u);var f=u.map(function(b){return{offset:rr(Number(b.length.value),"%"),color:A6(b)}});if(c==="linear-gradient")return new hf(sa.LinearGradient,{angle:l?j6(l):Ea,steps:f});if(c==="radial-gradient"&&(l||(l=[{type:"shape",value:"circle"}]),l[0].type==="shape"&&l[0].value==="circle")){var d=D6(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=l0(m):v=rr(m,y)}return new hf(sa.RadialGradient,{cx:h,cy:p,size:v,steps:f})}})}var r=t[0];if(t[1]==="("||t[2]==="("){if(r==="l"){var i=k6.exec(t);if(i){var a=((e=i[2].match(tx))===null||e===void 0?void 0:e.map(function(s){return s.split(":")}))||[];return[new hf(sa.LinearGradient,{angle:rr(parseFloat(i[1]),"deg"),steps:a.map(function(s){var c=(0,S.CR)(s,2),l=c[0],u=c[1];return{offset:rr(Number(l)*100,"%"),color:u}})})]}}else if(r==="r"){var o=B6(t);if(o)if(tr(o))t=o;else return[new hf(sa.RadialGradient,o)]}else if(r==="p")return z6(t)}});function B6(t){var e,n=R6.exec(t);if(n){var r=((e=n[4].match(tx))===null||e===void 0?void 0:e.map(function(i){return i.split(":")}))||[];return{cx:rr(50,"%"),cy:rr(50,"%"),steps:r.map(function(i){var a=(0,S.CR)(i,2),o=a[0],s=a[1];return{offset:rr(Number(o)*100,"%"),color:s}})}}return null}function z6(t){var e=L6.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 wft(t){return!!t.type&&!!t.value}function Kc(t){return t&&!!t.image}function vf(t){return t&&!(0,ye.Z)(t.r)&&!(0,ye.Z)(t.g)&&!(0,ye.Z)(t.b)}var Aa=Yr(function(t){if(Kc(t))return(0,S.pi)({repetition:"repeat"},t);if((0,ye.Z)(t)&&(t=""),t==="transparent")return Qb;t==="currentColor"&&(t="black");var e=F6(t);if(e)return e;var n=Pj.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),E6.apply(void 0,(0,S.ev)([],(0,S.CR)(r),!1))});function G6(t,e){if(!(!vf(t)||!vf(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,ye.Z)(e))return rr(0,"px");if(e="".concat(e).trim().toLowerCase(),isFinite(Number(e))){if("px".search(t)>=0)return rr(Number(e),"px");if("deg".search(t)>=0)return rr(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 rr(Number(e.replace(new RegExp("U"+i,"g"),"").replace(new RegExp(r,"g"),"*0")),i)})[0]}var W6=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))?rr(Number(t)||0,"px"):Qc(new RegExp("px|%|em|rem","g"),t)},ex=Yr(function(t){return Qc(new RegExp("deg|rad|grad|turn","g"),t)});function H6(t,e,n,r,i){i===void 0&&(i=0);var a="",o=t.value||0,s=e.value||0,c=o0(t.unit),l=t.convertTo(c),u=e.convertTo(c);return l&&u?(o=l.value,s=u.value,a=i0(t.unit)):(Pn.isLength(t.unit)||Pn.isLength(e.unit))&&(o=Ei(t,i,n),s=Ei(e,i,n),a="px"),[o,s,function(f){return r&&(f=Math.max(f,0)),f+a}]}function Mi(t){var e=0;return t.unit===ne.kDegrees?e=t.value:t.unit===ne.kRadians?e=Li(Number(t.value)):t.unit===ne.kTurns&&(e=n6(Number(t.value))),e}function d0(t,e){var n;return Array.isArray(t)?n=t.map(function(r){return Number(r)}):tr(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 nx(t){return tr(t)?t.split(" ").map(function(e){return Gs(e)}):t.map(function(e){return Gs(e.toString())})}function Ei(t,e,n){if(t.value===0)return 0;if(t.unit===ne.kPixels)return Number(t.value);if(t.unit===ne.kPercentage&&n){var r=n.nodeName===bt.GROUP?n.getLocalBounds():n.geometry.contentBounds;return t.value/100*r.halfExtents[e]*2}return 0}var Y6=function(t){return Qc(/deg|rad|grad|turn|px|%/g,t)},V6=["blur","brightness","drop-shadow","contrast","grayscale","sepia","saturate","hue-rotate","invert"];function rx(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,V6.indexOf(r[1])>-1&&n.push({name:r[1],params:r[2].split(" ").map(function(a){return Y6(a)||Aa(a)})}),e.lastIndex===t.length)return n}return[]}function ix(t){return t.toString()}var Ho=Yr(function(t){return typeof t=="number"?rr(t):/^\s*[-+]?(\d*\.)?\d+\s*$/.test(t)?rr(Number(t)):rr(0)});Yr(function(t){return tr(t)?t.split(" ").map(Ho):t.map(Ho)});function h0(t,e){return[t,e,ix]}function p0(t,e){return function(n,r){return[n,r,function(i){return ix((0,cr.Z)(i,t,e))}]}}function ax(t,e){if(t.length===e.length)return[t,e,function(n){return n}]}function v0(t){return t.parsedStyle.path.totalLength===0&&(t.parsedStyle.path.totalLength=dj(t.parsedStyle.path.absolutePath)),t.parsedStyle.path.totalLength}function X6(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&&gf(o,s)&&(t.splice(e,1),e--)}}}function $6(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 U6(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 gf(t,e){return t[0]===e[0]&&t[1]===e[1]}function q6(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=Uj(l[0],l[1],c[1],c[2],c[3],c[4]);break;case"C":u=Hj(l[0],l[1],c[1],c[2],c[3],c[4],c[5],c[6]);break;case"A":var f=o.arcParams;u=Fj(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=of(n),h=of(r),p=sf(n),v=sf(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=yf(o,e),d=d-g.xExtra):s[0]===p&&(g=yf(o,e),p=p+g.xExtra),s[1]===h?(g=yf(o,e),h=h-g.yExtra):s[1]===v&&(g=yf(o,e),v=v+g.yExtra)}return{x:d,y:h,width:p-d,height:v-h}}function yf(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||$c(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 ox(t,e){return[e[0]+(e[0]-t[0]),e[1]+(e[1]-t[1])]}var sx=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},cx=function(t,e,n,r,i,a,o,s){e=Math.abs(e),n=Math.abs(n),r=xb(r,360);var c=nr(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},_=sx({x:1,y:0},b),O={x:(-f.x-y.x)/e,y:(-f.y-y.y)/n},w=sx(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 Z6(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=K6(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]&&gf(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=ox(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=ox(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=lx(u,0),_=b.x,O=b.y,w=lx(u,1,!1),M=w.x,E=w.y;u.startTangent=[_,O],u.endTangent=[M,E]}e.push(u)}return e}function lx(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=cx({x:t.prePoint[0],y:t.prePoint[1]},a,s,c,!!l,!!u,{x:t.currentPoint[0],y:t.currentPoint[1]},e),d=cx({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 mf(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function g0(t,e){return mf(t)*mf(e)?(t[0]*e[0]+t[1]*e[1])/(mf(t)*mf(e)):1}function ux(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(g0(t,e))}function K6(t,e){var n=e[1],r=e[2],i=xb(nr(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=ux([1,0],_),M=ux(_,O);return g0(_,O)<=-1&&(M=Math.PI),g0(_,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:gf(t,[l,u])?0:n,ry:gf(t,[l,u])?0:r,startAngle:w,endAngle:w+M,xRotation:i,arcFlag:a,sweepFlag:o}}function Q6(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=ot.fromValues(l[1]-a,l[2]-s,0);n&&ot.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=ot.fromValues(l[1]-a,l[2]-s,0),h=ot.fromValues(l[3]-a,l[4]-s,0),p=ot.fromValues(l[5]-a,l[6]-s,0);n&&(ot.transformMat4(d,d,n),ot.transformMat4(h,h,n),ot.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=ot.fromValues(l[6]-a,l[7]-s,0);n&&ot.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=ot.fromValues(l[1]-a,l[2]-s,0),h=ot.fromValues(l[3]-a,l[4]-s,0);n&&(ot.transformMat4(d,d,n),ot.transformMat4(h,h,n)),u="".concat(l[0]).concat(l[1],",").concat(l[2],",").concat(l[3],",").concat(l[4],"}")}return c+=u},"")}function J6(t,e,n,r){return[["M",t,e],["L",n,r]]}function fx(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 t8(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 e8(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 y0(t,e){e===void 0&&(e=t.getLocalTransform());var n=[];switch(t.nodeName){case bt.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=J6(a,s,l,f);break;case bt.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=fx(p,p,g,m);break}case bt.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=fx(O,M,g,m);break}case bt.POLYLINE:case bt.POLYGON:var P=t.parsedStyle.points;n=t8(P.points,t.nodeName===bt.POLYGON);break;case bt.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,F=D===void 0?0:D,B=C.y,z=B===void 0?0:B,Y=C.radius,$=Y&&Y.some(function(it){return it!==0});n=e8(N,R,F,z,$&&Y.map(function(it){return(0,cr.Z)(it,0,Math.min(Math.abs(N)/2,Math.abs(R)/2))}));break;case bt.PATH:var tt=t.parsedStyle.path.absolutePath;n=(0,S.ev)([],(0,S.CR)(tt),!1);break}if(n.length)return Q6(n,t,e)}function Sft(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 dx=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=af(t)}catch(d){e=af(""),console.error("[g]: Invalid SVG Path definition: ".concat(t))}X6(e);var n=$6(e),r=U6(e),i=r.polygons,a=r.polylines,o=Z6(e),s=q6(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}}},n8=Yr(dx);function m0(t){return tr(t)?n8(t):dx(t)}function r8(t,e,n){var r=t.curve,i=e.curve;(!r||r.length===0)&&(r=Zp(t.absolutePath,!1),t.curve=r),(!i||i.length===0)&&(i=Zp(e.absolutePath,!1),e.curve=i);var a=[r,i];r.length!==i.length&&(a=wb(r,i));var o=Sb(a[0])!==Sb(a[1])?Oj(a[0]):wj(a[0]);return[o,Mj(a[1],o),function(s){return s}]}function hx(t,e){var n;tr(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=Xj(n);n.forEach(function(u,f){n[f+1]&&(a=[0,0],a[0]=i/s,o=kb(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 i8(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 b0={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 Pn(1)]),Yo],scalex:["N",hi([lr,new Pn(1),new Pn(1)]),hi([lr,new Pn(1)])],scaley:["N",hi([new Pn(1),lr,new Pn(1)]),hi([new Pn(1),lr])],scalez:["N",hi([new Pn(1),new Pn(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,kr]),Yo],translatex:["T",hi([lr,kr,kr]),hi([lr,kr])],translatey:["T",hi([kr,lr,kr]),hi([kr,lr])],translatez:["L",hi([kr,kr,lr])],translate3d:["TTL",Yo]};function bf(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=b0[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:ex(p)},N:Ho,T:Gs,L:W6}[d.toUpperCase()](f):h={a:Ea,n:l[0],t:kr}[d],h===void 0)return[];l.push(h)}if(n.push({t:a,d:l}),e.lastIndex===t.length)return n}return[]}function a8(t){var e,n,r,i;switch(t.t){case"rotatex":return i=nr(Mi(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=nr(Mi(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=nr(Mi(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=nr(Mi(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=nr(Mi(t.d[0])),f=nr(Mi(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=nr(Mi(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=nr(Mi(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=Ei(t.d[0],0,null)||0,n=Ei(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=Ei(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=Ei(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=Ei(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=Ei(t.d[0],0,null)||0,n=Ei(t.d[1],0,null)||0,r=Ei(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=Ei(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 o8(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 s8(t){return t.length===0?[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]:t.map(a8).reduce(o8)}function px(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 s6(s8(t),e,n,r,i,a),[[e,n,r,a,i]]}var c8=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 l8(t){return t.toFixed(6).replace(".000000","")}function x0(t,e){var n,r;return t.decompositionPair!==e&&(t.decompositionPair=e,n=px(t)),e.decompositionPair!==t&&(e.decompositionPair=t,r=px(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=f8(n[0][3],r[0][3],i[5]),o=c8(i[0],i[1],i[2],a,i[4]),s=o.map(l8).join(",");return s}])}function u8(t,e){for(var n=0,r=0;r<t.length;r++)n+=t[r]*e[r];return n}function f8(t,e,n){var r=u8(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 _0(t){return t.replace(/[xy]/,"")}function O0(t){return t.replace(/(x|y|z|3d)?$/,"3d")}var d8=function(t,e){return t==="perspective"&&e==="perspective"||(t==="matrix"||t==="matrix3d")&&(e==="matrix"||e==="matrix3d")};function h8(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"?rr(P):rr(P,C.unit)})})},a=0;a<t.length;a++)i(a)}var o=[],s=[],c=[];if(t.length!==e.length){var l=x0(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=b0[u],v=b0[f],g=void 0;if(d8(u,f)){var l=x0([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]&&_0(u)===_0(f))g=_0(u),d=p[2](d),h=v[2](h);else if(p[1]&&v[1]&&O0(u)===O0(f))g=O0(u),d=p[1](d),h=v[1](h);else{var l=x0(t,e);o=[l[0]],s=[l[1]],c=[["matrix",[l[2]]]];break}for(var y=[],m=[],b=[],_=0;_<d.length;_++){var l=H6(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 vx=Yr(function(t){if(tr(t)){if(t==="text-anchor")return[rr(0,"px"),rr(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(gx(e[0])),Gs(gx(e[1]))]}else return[rr(t[0]||0,"px"),rr(t[1]||0,"px")]});function gx(t){return t==="center"?"50%":t==="left"||t==="top"?"0":t==="right"||t==="bottom"?"100%":t}var w0=[{n:"display",k:["none"]},{n:"opacity",int:!0,inh:!0,d:"1",syntax:oe.OPACITY_VALUE},{n:"fillOpacity",int:!0,inh:!0,d:"1",syntax:oe.OPACITY_VALUE},{n:"strokeOpacity",int:!0,inh:!0,d:"1",syntax:oe.OPACITY_VALUE},{n:"fill",int:!0,k:["none"],d:"none",syntax:oe.PAINT},{n:"fillRule",k:["nonzero","evenodd"],d:"nonzero"},{n:"stroke",int:!0,k:["none"],d:"none",syntax:oe.PAINT,l:!0},{n:"shadowType",k:["inner","outer","both"],d:"outer",l:!0},{n:"shadowColor",int:!0,syntax:oe.COLOR},{n:"shadowOffsetX",int:!0,l:!0,d:"0",syntax:oe.LENGTH_PERCENTAGE},{n:"shadowOffsetY",int:!0,l:!0,d:"0",syntax:oe.LENGTH_PERCENTAGE},{n:"shadowBlur",int:!0,l:!0,d:"0",syntax:oe.SHADOW_BLUR},{n:"lineWidth",int:!0,inh:!0,d:"1",l:!0,a:["strokeWidth"],syntax:oe.LENGTH_PERCENTAGE},{n:"increasedLineWidthForHitTesting",inh:!0,d:"0",l:!0,syntax:oe.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:oe.LENGTH_PERCENTAGE_12},{n:"lineDashOffset",int:!0,inh:!0,d:"0",a:["strokeDashoffset"],syntax:oe.LENGTH_PERCENTAGE},{n:"offsetPath",syntax:oe.DEFINED_PATH},{n:"offsetDistance",int:!0,syntax:oe.OFFSET_DISTANCE},{n:"dx",int:!0,l:!0,d:"0",syntax:oe.LENGTH_PERCENTAGE},{n:"dy",int:!0,l:!0,d:"0",syntax:oe.LENGTH_PERCENTAGE},{n:"zIndex",ind:!0,int:!0,d:"0",k:["auto"],syntax:oe.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:oe.FILTER},{n:"clipPath",syntax:oe.DEFINED_PATH},{n:"textPath",syntax:oe.DEFINED_PATH},{n:"textPathSide",k:["left","right"],d:"left"},{n:"textPathStartOffset",l:!0,d:"0",syntax:oe.LENGTH_PERCENTAGE},{n:"transform",p:100,int:!0,k:["none"],d:"none",syntax:oe.TRANSFORM},{n:"transformOrigin",p:100,d:function(t){return t===bt.CIRCLE||t===bt.ELLIPSE?"center":t===bt.TEXT?"text-anchor":"left top"},l:!0,syntax:oe.TRANSFORM_ORIGIN},{n:"anchor",p:99,d:function(t){return t===bt.CIRCLE||t===bt.ELLIPSE?"0.5 0.5":"0 0"},l:!0,syntax:oe.LENGTH_PERCENTAGE_12},{n:"cx",int:!0,d:"0",syntax:oe.COORDINATE},{n:"cy",int:!0,d:"0",syntax:oe.COORDINATE},{n:"cz",int:!0,d:"0",syntax:oe.COORDINATE},{n:"r",int:!0,l:!0,d:"0",syntax:oe.LENGTH_PERCENTAGE},{n:"rx",int:!0,l:!0,d:"0",syntax:oe.LENGTH_PERCENTAGE},{n:"ry",int:!0,l:!0,d:"0",syntax:oe.LENGTH_PERCENTAGE},{n:"x",int:!0,d:"0",syntax:oe.COORDINATE},{n:"y",int:!0,d:"0",syntax:oe.COORDINATE},{n:"z",int:!0,d:"0",syntax:oe.COORDINATE},{n:"width",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:oe.LENGTH_PERCENTAGE},{n:"height",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:oe.LENGTH_PERCENTAGE},{n:"radius",int:!0,l:!0,d:"0",syntax:oe.LENGTH_PERCENTAGE_14},{n:"x1",int:!0,l:!0,syntax:oe.COORDINATE},{n:"y1",int:!0,l:!0,syntax:oe.COORDINATE},{n:"z1",int:!0,l:!0,syntax:oe.COORDINATE},{n:"x2",int:!0,l:!0,syntax:oe.COORDINATE},{n:"y2",int:!0,l:!0,syntax:oe.COORDINATE},{n:"z2",int:!0,l:!0,syntax:oe.COORDINATE},{n:"path",int:!0,l:!0,d:"",a:["d"],syntax:oe.PATH,p:50},{n:"points",int:!0,l:!0,syntax:oe.LIST_OF_POINTS,p:50},{n:"text",l:!0,d:"",syntax:oe.TEXT,p:50},{n:"textTransform",l:!0,inh:!0,k:["capitalize","uppercase","lowercase","none"],d:"none",syntax:oe.TEXT_TRANSFORM,p:51},{n:"font",l:!0},{n:"fontSize",int:!0,inh:!0,d:"16px",l:!0,syntax:oe.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:oe.LENGTH,int:!0,d:"0"},{n:"letterSpacing",l:!0,syntax:oe.LENGTH,int:!0,d:"0"},{n:"miterLimit",l:!0,syntax:oe.NUMBER,d:function(t){return t===bt.PATH||t===bt.POLYGON||t===bt.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:oe.MARKER},{n:"markerEnd",syntax:oe.MARKER},{n:"markerMid",syntax:oe.MARKER},{n:"markerStartOffset",syntax:oe.LENGTH,l:!0,int:!0,d:"0"},{n:"markerEndOffset",syntax:oe.LENGTH,l:!0,int:!0,d:"0"}],yx=w0.filter(function(t){return!!t.l}).map(function(t){return t.n}),Ja={},Ws=new WeakMap,p8=function(t,e){var n=Ws.get(t);return!n||n.length===0?!0:n.includes(e)},v8=function(){function t(e){var n=this;this.runtime=e,w0.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<yx.length;l++)if(yx[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=rx(n.filter)),(0,ye.Z)(n.radius)||(e.parsedStyle.radius=d0(n.radius,4)),(0,ye.Z)(n.lineDash)||(e.parsedStyle.lineDash=d0(n.lineDash,2)),n.points&&(e.parsedStyle.points=hx(n.points,e)),n.path===""&&(e.parsedStyle.path=(0,S.pi)({},Jb)),n.path&&(e.parsedStyle.path=m0(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=d0(n.anchor,2)),n.transform&&(e.parsedStyle.transform=bf(n.transform)),n.transformOrigin&&(e.parsedStyle.transformOrigin=vx(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===bt.CIRCLE||e.nodeName===bt.ELLIPSE)&&(!(0,ye.Z)(n.cx)||!(0,ye.Z)(n.cy))||(e.nodeName===bt.RECT||e.nodeName===bt.IMAGE||e.nodeName===bt.GROUP||e.nodeName===bt.HTML||e.nodeName===bt.TEXT||e.nodeName===bt.MESH)&&(!(0,ye.Z)(n.x)||!(0,ye.Z)(n.y)||!(0,ye.Z)(n.z))||e.nodeName===bt.LINE&&(!(0,ye.Z)(n.x1)||!(0,ye.Z)(n.y1)||!(0,ye.Z)(n.z1)||!(0,ye.Z)(n.x2)||!(0,ye.Z)(n.y2)||!(0,ye.Z)(n.z2)))&&this.runtime.CSSPropertySyntaxFactory["<coordinate>"].postProcessor(e,a),(0,ye.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,ye.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,ye.Z)(n))&&(n="unset"),n==="unset"||n==="initial"||n==="inherit")a=l0(n);else if(i){var o=i.k,s=i.syntax,c=s&&this.getPropertySyntax(s);o&&o.indexOf(n)>-1?a=l0(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,ye.Z)(l)||(n=this.parseProperty(e,Bs(l)?l(r.nodeName):l,r));else if(u==="inherit"){var f=this.tryToResolveProperty(r,e,{inherited:!0});if((0,ye.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&&p8(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===bt.TEXT?delete a.anchor:n===bt.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===bt.POLYLINE||n===bt.POLYGON||n===bt.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,F=D.min,B=D.max,z=a,Y=z.shadowBlur,$=z.shadowOffsetX,tt=z.shadowOffsetY,it=Y||0,St=$||0,Ft=tt||0,Xt=F[0]-it+St,Pt=B[0]+it+St,Ct=F[1]-it+Ft,se=B[1]+it+Ft;F[0]=Math.min(F[0],Xt),B[0]=Math.max(B[0],Pt),F[1]=Math.min(F[1],Ct),B[1]=Math.max(B[1],se),i.renderBounds.setMinMax(F,B)}A.forEach(function(Ke){var dn=Ke.name,xn=Ke.params;if(dn==="blur"){var Yn=xn[0].value;i.renderBounds.update(i.renderBounds.center,ff(i.renderBounds.halfExtents,i.renderBounds.halfExtents,[Yn,Yn,0]))}else if(dn==="drop-shadow"){var yr=xn[0].value,xi=xn[1].value,Xa=xn[2].value,ws=i.renderBounds,si=ws.min,Ui=ws.max,pn=si[0]-Xa+yr,_n=Ui[0]+Xa+yr,ir=si[1]-Xa+xi,En=Ui[1]+Xa+xi;si[0]=Math.min(si[0],pn),Ui[0]=Math.max(Ui[0],_n),si[1]=Math.min(si[1],ir),Ui[1]=Math.max(Ui[1],En),i.renderBounds.setMinMax(si,Ui)}}),C=a.anchor;var ce=s<0,Oe=c<0,He=(ce?-1:1)*(P?Ei(P[0],0,e):0),Fe=(Oe?-1:1)*(P?Ei(P[1],1,e):0);He=He-(ce?-1:1)*(C&&C[0]||0)*i.contentBounds.halfExtents[0]*2,Fe=Fe-(Oe?-1:1)*(C&&C[1]||0)*i.contentBounds.halfExtents[1]*2,e.setOrigin(He,Fe),this.runtime.sceneGraphService.dirtifyToRoot(e)}},t.prototype.isPropertyInheritable=function(e){var n=Ja[e];return n?n.inh:!1},t}(),g8=function(){function t(){this.parser=ex,this.parserWithCSSDisabled=null,this.mixer=h0}return t.prototype.calculator=function(e,n,r,i){return Mi(r)},t}(),y8=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}(),m8=function(){function t(){this.parser=Aa,this.parserWithCSSDisabled=Aa,this.mixer=G6}return t.prototype.calculator=function(e,n,r,i){return r instanceof di?r.value==="none"?u0:Qb:r},t}(),b8=function(){function t(){this.parser=rx}return t.prototype.calculator=function(e,n,r){return r instanceof di?[]:r},t}();function mx(t){var e=t.parsedStyle.fontSize;return(0,ye.Z)(e)?null:e}var S0=function(){function t(){this.parser=Gs,this.parserWithCSSDisabled=null,this.mixer=h0}return t.prototype.calculator=function(e,n,r,i,a){var o;if((0,xr.Z)(r))return r;if(Pn.isRelativeUnit(r.unit)){var s=a.styleValueRegistry;if(r.unit===ne.kPercentage)return 0;if(r.unit===ne.kEms){if(i.parentNode){var c=mx(i.parentNode);if(c)return c*=r.value,c;s.addUnresolveProperty(i,e)}else s.addUnresolveProperty(i,e);return 0}else if(r.unit===ne.kRems){if(!((o=i==null?void 0:i.ownerDocument)===null||o===void 0)&&o.documentElement){var c=mx(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}(),x8=function(){function t(){this.mixer=ax}return t.prototype.parser=function(e){var n=nx((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}(),_8=function(){function t(){this.mixer=ax}return t.prototype.parser=function(e){var n=nx((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=qt.create();function M0(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||[kr,kr];e.translateLocal(c[0].value,c[1].value,0)}else if(a==="translatex"){var c=o||[kr];e.translateLocal(c[0].value,0,0)}else if(a==="translatey"){var c=o||[kr];e.translateLocal(0,c[0].value,0)}else if(a==="translatez"){var c=o||[kr];e.translateLocal(0,0,c[0].value)}else if(a==="translate3d"){var c=o||[kr,kr,kr];e.translateLocal(c[0].value,c[1].value,c[2].value)}else if(a==="rotate"){var l=o||[Ea];e.rotateLocal(0,0,Mi(l[0]))}else if(a==="rotatex"){var l=o||[Ea];e.rotateLocal(Mi(l[0]),0,0)}else if(a==="rotatey"){var l=o||[Ea];e.rotateLocal(0,Mi(l[0]),0)}else if(a==="rotatez"){var l=o||[Ea];e.rotateLocal(0,0,Mi(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(nr(u[0]),nr(u[1]))}else if(a==="skewx"){var u=(o==null?void 0:o.map(function(b){return b.value}))||[0];e.setLocalSkew(nr(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],nr(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(qt.set(Jc,d,h,0,0,p,v,0,0,0,0,1,0,g+n,y+r,0,1))}else a==="matrix3d"&&(qt.set.apply(qt,(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 O8=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 bt.CIRCLE:case bt.ELLIPSE:var s=n.parsedStyle,c=s.cx,l=s.cy,u=s.cz;(0,ye.Z)(c)||(i=c),(0,ye.Z)(l)||(a=l),(0,ye.Z)(u)||(o=u);break;case bt.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 bt.RECT:case bt.IMAGE:case bt.GROUP:case bt.HTML:case bt.TEXT:case bt.MESH:(0,ye.Z)(n.parsedStyle.x)||(i=n.parsedStyle.x),(0,ye.Z)(n.parsedStyle.y)||(a=n.parsedStyle.y),(0,ye.Z)(n.parsedStyle.z)||(o=n.parsedStyle.z);break}n.nodeName!==bt.PATH&&n.nodeName!==bt.POLYLINE&&n.nodeName!==bt.POLYGON&&(n.parsedStyle.defX=i||0,n.parsedStyle.defY=a||0);var m=!(0,ye.Z)(i)||!(0,ye.Z)(a)||!(0,ye.Z)(o);if(m&&r.indexOf("transform")===-1){var b=n.parsedStyle.transform;if(b&&b.length)M0(b,n);else{var _=(0,S.CR)(n.getLocalPosition(),3),O=_[0],w=_[1],M=_[2];n.setLocalPosition((0,ye.Z)(i)?O:i,(0,ye.Z)(a)?w:a,(0,ye.Z)(o)?M:o)}}},e}(S0),w8=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}(),S8=function(){function t(){this.mixer=h0,this.parser=Ho,this.parserWithCSSDisabled=null}return t.prototype.calculator=function(e,n,r){return r.value},t}(),M8=function(){function t(){this.parser=Ho,this.parserWithCSSDisabled=null,this.mixer=p0(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===bt.LINE||a===bt.PATH||a===bt.POLYLINE){var o=r.getPoint(i);o&&(e.parsedStyle.defX=o.x,e.parsedStyle.defY=o.y,e.setLocalPosition(o.x,o.y))}}},t}(),E8=function(){function t(){this.parser=Ho,this.parserWithCSSDisabled=null,this.mixer=p0(0,1)}return t.prototype.calculator=function(e,n,r){return r.value},t}(),A8=function(){function t(){this.parser=m0,this.parserWithCSSDisabled=m0,this.mixer=r8}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===bt.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}(),T8=function(){function t(){this.parser=hx,this.mixer=i8}return t.prototype.postProcessor=function(e,n){if((e.nodeName===bt.POLYGON||e.nodeName===bt.POLYLINE)&&n.indexOf("transform")===-1){var r=e.parsedStyle,i=r.defX,a=r.defY;e.setLocalPosition(i,a)}},t}(),P8=function(t){(0,S.ZT)(e,t);function e(){var n=t.apply(this,(0,S.ev)([],(0,S.CR)(arguments),!1))||this;return n.mixer=p0(0,1/0),n}return e}(S0),C8=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}(),k8=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}(),E0={},R8=0;function L8(t,e){if(t){var n=typeof t=="string"?t:t.id||R8++;E0[n]&&E0[n].destroy(),E0[n]=e}}var tl=typeof window!="undefined"&&typeof window.document!="undefined";function N8(t){return!!t.getAttribute}function I8(t,e){for(var n=0,r=t.length;n<r;){var i=n+r>>>1;bx(t[i],e)<0?n=i+1:r=i}return n}function bx(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 xx(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 _x="px";function j8(t,e,n){tl&&t.style&&(t.style.width=e+_x,t.style.height=n+_x)}function Ox(t,e){if(tl)return document.defaultView.getComputedStyle(t,null).getPropertyValue(e)}function D8(t){var e=Ox(t,"width");return e==="auto"?t.offsetWidth:parseFloat(e)}function F8(t){var e=Ox(t,"height");return e==="auto"?t.offsetHeight:parseFloat(e)}var B8=1,z8={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"},A0=typeof performance=="object"&&performance.now?performance:Date;function Vo(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 G8=1,W8=function(){return G8++},ca=typeof self=="object"&&self.self==self?self:typeof yt.g=="object"&&yt.g.global==yt.g?yt.g:{},H8=Date.now(),Y8=function(){return ca.performance&&typeof ca.performance.now=="function"?ca.performance.now():Date.now()-H8},el={},wx=Date.now(),V8=function(t){if(typeof t!="function")throw new TypeError(t+" is not a function");var e=Date.now(),n=e-wx,r=n>16?0:16-n,i=W8();return el[i]=t,Object.keys(el).length>1||setTimeout(function(){wx=e;var a=el;el={},Object.keys(a).forEach(function(o){return a[o](Y8())})},r),i},X8=function(t){delete el[t]},$8=["","webkit","moz","ms","o"],Sx=function(t){return typeof t!="string"?V8:t===""?ca.requestAnimationFrame:ca[t+"RequestAnimationFrame"]},U8=function(t){return typeof t!="string"?X8:t===""?ca.cancelAnimationFrame:ca[t+"CancelAnimationFrame"]||ca[t+"CancelRequestAnimationFrame"]},q8=function(t,e){for(var n=0;t[n]!==void 0;){if(e(t[n]))return t[n];n=n+1}},Mx=q8($8,function(t){return!!Sx(t)}),Ex=Sx(Mx),Ax=U8(Mx);ca.requestAnimationFrame=Ex,ca.cancelAnimationFrame=Ax;var Z8=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}(),K8=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}(),T0=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}(),Q8=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],J8=/([\"\'])[^\'\"]+\1/;function tD(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();!J8.test(l)&&Q8.indexOf(l)<0&&(l='"'.concat(l,'"')),s[c]=l}return"".concat(r," ").concat(i," ").concat(a," ").concat(o," ").concat(s.join(","))}var eD=function(){function t(){this.parser=bf,this.parserWithCSSDisabled=bf,this.mixer=h8}return t.prototype.calculator=function(e,n,r,i){return r instanceof di?[]:r},t.prototype.postProcessor=function(e){var n=e.parsedStyle.transform;M0(n,e)},t}(),nD=function(){function t(){this.parser=vx}return t}(),rD=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}(),iD=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}(),aD=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}(),oD=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}(),sD=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}(),cD=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}(),lD=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&&!tr(r)&&(c||(c=r.width,e.width=c),l||(l=r.height,e.height=l)),{width:c,height:l}},t}(),uD=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,ye.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 fD(t){return!!t.type}var xf=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 Cr,this.page=new Cr,this.canvas=new Cr,this.viewport=new Cr,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(Tn)},t}(),Tx=function(t){(0,S.ZT)(e,t);function e(){var n=t.apply(this,(0,S.ev)([],(0,S.CR)(arguments),!1))||this;return n.client=new Cr,n.movement=new Cr,n.offset=new Cr,n.global=new Cr,n.screen=new Cr,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(Tn)},e}(xf),P0=function(t){(0,S.ZT)(e,t);function e(){var n=t.apply(this,(0,S.ev)([],(0,S.CR)(arguments),!1))||this;return n.width=0,n.height=0,n.isPrimary=!1,n}return e.prototype.getCoalescedEvents=function(){return this.type==="pointermove"||this.type==="mousemove"||this.type==="touchmove"?[this]:[]},e.prototype.getPredictedEvents=function(){throw new Error("getPredictedEvents is not supported!")},e.prototype.clone=function(){return this.manager.clonePointerEvent(this)},e}(Tx),C0=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}(Tx),kn=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}(xf),Px=":",Cx=function(){function t(){this.emitter=new Yp.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=Mb(r)&&r||zo(r)&&r.capture,a=zo(r)&&r.once,o=Bs(n)?void 0:n,s=!1,c="";if(e.indexOf(Px)>-1){var l=(0,S.CR)(e.split(Px),2),u=l[0],f=l[1];e=f,c=u,s=!0}if(e=i?"".concat(e,"capture"):e,n=Bs(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=Mb(r)&&r||zo(r)&&r.capture,a=Bs(n)?void 0:n;return e=i?"".concat(e,"capture"):e,n=Bs(n)?n:n==null?void 0:n.handleEvent,this.emitter.off(e,n,a),this},t.prototype.emit=function(e,n){this.dispatchEvent(new kn(e,n))},t.prototype.dispatchEvent=function(e,n){var r,i;if(n===void 0&&(n=!1),!fD(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}(),Rr=function(t){(0,S.ZT)(e,t);function e(){var n=t.apply(this,(0,S.ev)([],(0,S.CR)(arguments),!1))||this;return n.shadow=!1,n.ownerDocument=null,n.isConnected=!1,n.baseURI="",n.childNodes=[],n.nodeType=0,n.nodeName="",n.nodeValue=null,n.parentNode=null,n}return e.isNode=function(n){return!!n.childNodes},Object.defineProperty(e.prototype,"textContent",{get:function(){var n,r,i="";this.nodeName===bt.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===bt.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===bt.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(Tn)},e.prototype.lookupNamespaceURI=function(n){throw new Error(Tn)},e.prototype.lookupPrefix=function(n){throw new Error(Tn)},e.prototype.normalize=function(){throw new Error(Tn)},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}(Cx),dD=2048,hD=function(){function t(e,n){var r=this;this.globalRuntime=e,this.context=n,this.emitter=new Yp.Z,this.nativeHTMLMap=new WeakMap,this.cursor="default",this.mappingTable={},this.mappingState={trackingData:{}},this.eventPool=new Map,this.tmpMatrix=qt.create(),this.tmpVec3=ot.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=A0.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")}Rr.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"),Rr.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&&Rr.isNode(c)&&c.parentNode;p&&p!==(Rr.isNode(r.rootTarget)&&r.rootTarget.parentNode)&&p!==a.target;)p=p.parentNode;var v=!p||p===(Rr.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!==(Rr.isNode(r.rootTarget)&&r.rootTarget.parentNode);)g.currentTarget=g.target,r.notifyTarget(g),o&&r.notifyTarget(g,"mouseenter"),Rr.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!==(Rr.isNode(r.rootTarget)&&r.rootTarget.parentNode);)l.currentTarget=l.target,r.notifyTarget(l),o&&r.notifyTarget(l,"mouseleave"),Rr.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!==(Rr.isNode(r.rootTarget)&&r.rootTarget.parentNode);)c.currentTarget=c.target,r.notifyTarget(c),s&&r.notifyTarget(c,"mouseenter"),Rr.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"),Rr.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 Cr(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 Cr(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=qt.multiply(this.tmpMatrix,u,l),d=ot.set(this.tmpVec3,n/s*2-1,(1-r/c)*2-1,0);return ot.transformMat4(d,d,f),new Cr(d[0],d[1])},t.prototype.canvas2Viewport=function(e){var n=this.rootTarget.defaultView,r=n.getCamera(),i=r.getPerspective(),a=r.getViewTransform(),o=qt.multiply(this.tmpMatrix,i,a),s=ot.set(this.tmpVec3,e.x,e.y,0);ot.transformMat4(this.tmpVec3,this.tmpVec3,o);var c=this.context.config,l=c.width,u=c.height;return new Cr((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<dD&&e!==this.rootTarget;i++)Rr.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.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(P0);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(C0);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(C0);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(P0);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=A0.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||Rr.isNode(i)&&i.parentNode===n)n=e[r];else break}return n},t.prototype.getCursor=function(e){for(var n=e;n;){var r=N8(n)&&n.getAttribute("cursor");if(r)return r;n=Rr.isNode(n)&&n.parentNode}},t}(),pD=function(){function t(){}return t.prototype.getOrCreateCanvas=function(e,n){if(this.canvas)return this.canvas;if(e||Et.offscreenCanvas)this.canvas=e||Et.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 vD=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 Z8,dirtycheck:new T0,cull:new T0,beginFrame:new ni,beforeRender:new ni,render:new ni,afterRender:new ni,endFrame:new ni,destroy:new ni,pick:new K8,pickSync:new T0,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=I8(n.sorted,r);n.sorted.splice(o,0,r)}}):n.sorted=e.childNodes.slice().sort(bx)},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}(),gD=/\[\s*(.*)=(.*)\s*\]/,yD=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(gD),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,ye.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}(xf),Ne;(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"})(Ne||(Ne={}));function kx(t){var e=t.renderable;e&&(e.renderBoundsDirty=!0,e.boundsDirty=!0)}var mD=new eo(Ne.REPARENT,null,"","","",0,"",""),bD=function(){function t(e){var n=this;this.runtime=e,this.pendingEvents=[],this.boundsChangedEvent=new kn(Ne.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=ot.fromValues(a,o,s));var c=i.transformable;if(i.parentNode===null||!i.parentNode.transformable)n.rotateLocal(i,a);else{var l=br();Ju(l,a[0],a[1],a[2]);var u=n.getRotation(i),f=n.getRotation(i.parentNode);tf(r,f),Xp(r,r),Ua(l,r,l),Ua(c.localRotation,l,u),ef(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=ot.fromValues(a,o,s));var c=i.transformable;Ju(r,a[0],a[1],a[2]),fb(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=ot.fromValues(a,o,s));var c=i.transformable;if(i.parentNode===null||!i.parentNode.transformable)n.setLocalEulerAngles(i,a);else{Ju(c.localRotation,a[0],a[1],a[2]);var l=n.getRotation(i.parentNode);tf(r,Xp(br(),l)),fb(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=ot.fromValues(i,a,o));var s=r.transformable;ot.equals(i,ot.create())||(ot.transformQuat(i,i,s.localRotation),ot.add(s.localPosition,s.localPosition,i),n.dirtifyLocal(r,s))}}(),this.setPosition=function(){var r=qt.create(),i=ot.create();return function(a,o){var s=a.transformable;if(i[0]=o[0],i[1]=o[1],i[2]=o[2]||0,!ot.equals(n.getPosition(a),i)){if(ot.copy(s.position,i),a.parentNode===null||!a.parentNode.transformable)ot.copy(s.localPosition,i);else{var c=a.parentNode.transformable;qt.copy(r,c.worldTransform),qt.invert(r,r),ot.transformMat4(s.localPosition,i,r)}n.dirtifyLocal(a,s)}}}(),this.setLocalPosition=function(){var r=ot.create();return function(i,a){var o=i.transformable;r[0]=a[0],r[1]=a[1],r[2]=a[2]||0,!ot.equals(o.localPosition,r)&&(ot.copy(o.localPosition,r),n.dirtifyLocal(i,o))}}(),this.translate=function(){var r=ot.create(),i=ot.create(),a=ot.create();return function(o,s,c,l){c===void 0&&(c=0),l===void 0&&(l=0),typeof s=="number"&&(s=ot.set(i,s,c,l)),!ot.equals(s,r)&&(ot.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=$p(a,o,s,c)),i.parentNode===null||!i.parentNode.transformable)n.setLocalRotation(i,a);else{var u=n.getRotation(i.parentNode);tf(r,u),Xp(r,r),Ua(l.localRotation,r,a),ef(l.localRotation,l.localRotation),n.dirtifyLocal(i,l)}}},this.displayObjectDependencyMap=new WeakMap,this.calcLocalTransform=function(){var r=qt.create(),i=ot.create(),a=$p(0,0,0,1);return function(o){var s=o.localSkew[0]!==0||o.localSkew[1]!==0;if(s){if(qt.fromRotationTranslationScaleOrigin(o.localTransform,o.localRotation,o.localPosition,ot.fromValues(1,1,1),o.origin),o.localSkew[0]!==0||o.localSkew[1]!==0){var c=qt.identity(r);c[4]=Math.tan(o.localSkew[0]),c[1]=Math.tan(o.localSkew[1]),qt.multiply(o.localTransform,o.localTransform,c)}var l=qt.fromRotationTranslationScaleOrigin(r,a,i,o.localScale,o.origin);qt.multiply(o.localTransform,o.localTransform,l)}else qt.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,ye.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(mD)},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=ot.fromValues(n,r,i));var a=e.transformable;Ju(a.localRotation,n[0],n[1],n[2]),this.dirtifyLocal(e,a)},t.prototype.scaleLocal=function(e,n){var r=e.transformable;ot.multiply(r.localScale,r.localScale,ot.fromValues(n[0],n[1],n[2]||1)),this.dirtifyLocal(e,r)},t.prototype.setLocalScale=function(e,n){var r=e.transformable,i=ot.fromValues(n[0],n[1],n[2]||r.localScale[2]);ot.equals(i,r.localScale)||(ot.copy(r.localScale,i),this.dirtifyLocal(e,r))},t.prototype.setLocalRotation=function(e,n,r,i,a){typeof n=="number"&&(n=$p(n,r,i,a));var o=e.transformable;tf(o.localRotation,n),this.dirtifyLocal(e,o)},t.prototype.setLocalSkew=function(e,n,r){typeof n=="number"&&(n=Vc.al(n,r));var i=e.transformable;Vc.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;)kx(r),r=r.parentNode;n&&e.forEach(function(i){kx(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(Ne.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 qt.getTranslation(n.position,this.getWorldTransform(e,n))},t.prototype.getRotation=function(e){var n=e.transformable;return qt.getRotation(n.rotation,this.getWorldTransform(e,n))},t.prototype.getScale=function(e){var n=e.transformable;return qt.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=qt.getTranslation(ot.create(),n),i=qt.getRotation(br(),n),a=qt.getScaling(ot.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=xx(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=qt.create();e.parentNode.transformable&&(n=qt.invert(qt.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?qt.copy(n.worldTransform,n.localTransform):qt.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}(),Xo={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]},Rx=/[a-zA-Z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff!"#$%&'()*+,-./:;]/,xD=/[!%),.:;?\]}¢°·'""†‡›℃∶、。〃〆〕〗〞﹚﹜!"%'),.:;?!]}~]/,_D=/[$(£¥·'"〈《「『【〔〖〝﹙﹛$(.[{£¥]/,OD=/[!),.:;?\]}¢·–—'"•"、。〆〞〕〉》」︰︱︲︳﹐﹑﹒﹓﹔﹕﹖﹘﹚﹜!),.:;?︶︸︺︼︾﹀﹂﹗]|}、]/,wD=/[([{£¥'"‵〈《「『〔〝︴﹙﹛({︵︷︹︻︽︿﹁﹃﹏]/,SD=/[)\]}〕〉》」』】〙〗〟'"⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、:;,。.]/,MD=/[([{〔〈《「『【〘〖〝'"⦅«—...‥〳〴〵]/,ED=/[!%),.:;?\]}¢°'"†‡℃〆〈《「『〕!%),.:;?]}]/,AD=/[$([{£¥'"々〇〉》」〔$([{⦆¥₩#]/,TD=new RegExp("".concat(xD.source,"|").concat(OD.source,"|").concat(SD.source,"|").concat(ED.source)),PD=new RegExp("".concat(_D.source,"|").concat(wD.source,"|").concat(MD.source,"|").concat(AD.source)),CD=function(){function t(e){var n=this;this.runtime=e,this.fontMetricsCache={},this.shouldBreakByKinsokuShorui=function(r,i){return n.isBreakingSpace(i)?!1:!!(r&&(PD.exec(i)||TD.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=Xo.MetricsString+Xo.BaselineSymbol,s=Math.ceil(a.measureText(o).width),c=Math.ceil(a.measureText(Xo.BaselineSymbol).width),l=Xo.HeightMultiplier*c;c=c*Xo.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=tD(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:Xo.BreakingSpaces.indexOf(e.charCodeAt(0))>=0},t.prototype.isNewline=function(e){return typeof e!="string"?!1:Xo.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&&Rx.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(!Rx.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}(),Et={},kD=function(){var t,e=new lD,n=new cD;return t={},t[bt.CIRCLE]=new iD,t[bt.ELLIPSE]=new aD,t[bt.RECT]=e,t[bt.IMAGE]=e,t[bt.GROUP]=e,t[bt.LINE]=new oD,t[bt.TEXT]=new uD(Et),t[bt.POLYLINE]=n,t[bt.POLYGON]=n,t[bt.PATH]=new sD,t[bt.HTML]=null,t[bt.MESH]=null,t}(),RD=function(){var t,e=new m8,n=new S0;return t={},t[oe.PERCENTAGE]=null,t[oe.NUMBER]=new S8,t[oe.ANGLE]=new g8,t[oe.DEFINED_PATH]=new y8,t[oe.PAINT]=e,t[oe.COLOR]=e,t[oe.FILTER]=new b8,t[oe.LENGTH]=n,t[oe.LENGTH_PERCENTAGE]=n,t[oe.LENGTH_PERCENTAGE_12]=new x8,t[oe.LENGTH_PERCENTAGE_14]=new _8,t[oe.COORDINATE]=new O8,t[oe.OFFSET_DISTANCE]=new M8,t[oe.OPACITY_VALUE]=new E8,t[oe.PATH]=new A8,t[oe.LIST_OF_POINTS]=new T8,t[oe.SHADOW_BLUR]=new P8,t[oe.TEXT]=new C8,t[oe.TEXT_TRANSFORM]=new k8,t[oe.TRANSFORM]=new eD,t[oe.TRANSFORM_ORIGIN]=new nD,t[oe.Z_INDEX]=new rD,t[oe.MARKER]=new w8,t}(),LD=function(){return typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof yt.g!="undefined"?yt.g:{}};Et.CameraContribution=Ub,Et.AnimationTimeline=null,Et.EasingFunction=null,Et.offscreenCanvasCreator=new pD,Et.sceneGraphSelector=new yD,Et.sceneGraphService=new bD(Et),Et.textService=new CD(Et),Et.geometryUpdaterFactory=kD,Et.CSSPropertySyntaxFactory=RD,Et.styleValueRegistry=new v8(Et),Et.layoutRegistry=null,Et.globalThis=LD(),Et.enableCSSParsing=!0,Et.enableDataset=!1,Et.enableStyleSyntax=!0;var Lx=0;function Mft(){Lx=0}var Nx=new eo(Ne.INSERTED,null,"","","",0,"",""),Ix=new eo(Ne.REMOVED,null,"","","",0,"",""),ND=new kn(Ne.DESTROY),ID=function(t){(0,S.ZT)(e,t);function e(){var n=t.apply(this,(0,S.ev)([],(0,S.CR)(arguments),!1))||this;return n.entity=Lx++,n.renderable={bounds:void 0,boundsDirty:!0,renderBounds:void 0,renderBoundsDirty:!0,dirtyRenderBounds:void 0,dirty:!1},n.cullable={strategy:f0.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=Et.enableCSSParsing?{anchor:Ln,opacity:Ln,fillOpacity:Ln,strokeOpacity:Ln,fill:Ln,stroke:Ln,transform:Ln,transformOrigin:Ln,visibility:Ln,pointerEvents:Ln,lineWidth:Ln,lineCap:Ln,lineJoin:Ln,increasedLineWidthForHitTesting:Ln,fontSize:Ln,fontFamily:Ln,fontStyle:Ln,fontWeight:Ln,fontVariant:Ln,textAlign:Ln,textBaseline:Ln,textTransform:Ln,zIndex:Ln,filter:Ln,shadowType:Ln}: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(Tn)},e.prototype.appendChild=function(n,r){var i;if(n.destroyed)throw new Error(d6);return Et.sceneGraphService.attach(n,this,r),!((i=this.ownerDocument)===null||i===void 0)&&i.defaultView&&this.ownerDocument.defaultView.mountChildren(n),Nx.relatedNode=this,n.dispatchEvent(Nx),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 Ix.relatedNode=this,n.dispatchEvent(Ix),!((r=n.ownerDocument)===null||r===void 0)&&r.defaultView&&n.ownerDocument.defaultView.unmountChildren(n),Et.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 Et.sceneGraphService.matches(n,this)},e.prototype.getElementById=function(n){return Et.sceneGraphService.querySelector("#".concat(n),this)},e.prototype.getElementsByName=function(n){return Et.sceneGraphService.querySelectorAll('[name="'.concat(n,'"]'),this)},e.prototype.getElementsByClassName=function(n){return Et.sceneGraphService.querySelectorAll(".".concat(n),this)},e.prototype.getElementsByTagName=function(n){return Et.sceneGraphService.querySelectorAll(n,this)},e.prototype.querySelector=function(n){return Et.sceneGraphService.querySelector(n,this)},e.prototype.querySelectorAll=function(n){return Et.sceneGraphService.querySelectorAll(n,this)},e.prototype.closest=function(n){var r=this;do{if(Et.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(ND),this.remove(),this.emitter.removeAllListeners(),this.destroyed=!0},e.prototype.getGeometryBounds=function(){return Et.sceneGraphService.getGeometryBounds(this)},e.prototype.getRenderBounds=function(){return Et.sceneGraphService.getBounds(this,!0)},e.prototype.getBounds=function(){return Et.sceneGraphService.getBounds(this)},e.prototype.getLocalBounds=function(){return Et.sceneGraphService.getLocalBounds(this)},e.prototype.getBoundingClientRect=function(){return Et.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(_6(n))return Et.enableCSSParsing?null:void 0;var r=this.attributes[n];if(r===void 0){var i=a0(n);return r=this.attributes[i],Et.enableCSSParsing&&(0,ye.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(Tn)},e.prototype.getAttributeNode=function(n){throw new Error(Tn)},e.prototype.getAttributeNodeNS=function(n,r){throw new Error(Tn)},e.prototype.hasAttributeNS=function(n,r){throw new Error(Tn)},e.prototype.removeAttributeNS=function(n,r){throw new Error(Tn)},e.prototype.removeAttributeNode=function(n){throw new Error(Tn)},e.prototype.setAttributeNS=function(n,r,i){throw new Error(Tn)},e.prototype.setAttributeNode=function(n){throw new Error(Tn)},e.prototype.setAttributeNodeNS=function(n){throw new Error(Tn)},e.prototype.toggleAttribute=function(n,r){throw new Error(Tn)},e}(Rr);function hn(t){return!!(t!=null&&t.nodeName)}var Ta=new eo(Ne.ATTR_MODIFIED,null,null,null,null,eo.MODIFICATION,null,null),jD={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:""},jx={anchor:[0,0],fill:u0,stroke:u0,transform:[],zIndex:0,filter:[],shadowType:"outer",miterLimit:10},DD=(0,S.pi)((0,S.pi)({},jx),{opacity:1,fillOpacity:1,strokeOpacity:1,visibility:"visible",pointerEvents:"auto",lineWidth:1,lineCap:"butt",lineJoin:"miter",increasedLineWidthForHitTesting:0,fillRule:"nonzero"}),FD=["opacity","fillOpacity","strokeOpacity","transformOrigin","visibility","pointerEvents","lineWidth","lineCap","lineJoin","increasedLineWidthForHitTesting"],BD=(0,S.ev)((0,S.ev)([],(0,S.CR)(FD),!1),["fontSize","fontFamily","fontStyle","fontWeight","fontVariant","textAlign","textBaseline","textTransform"],!1),Dx="data-",Vr=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||bt.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,Et.enableCSSParsing?jx:DD,i.config.initialParsedStyle),Et.enableCSSParsing&&Object.assign(i.attributes,jD),i.initAttributes(i.config.style);var a=Et.globalThis.Proxy?Et.globalThis.Proxy:function(){};return Et.enableDataset&&(i.dataset=new a({},{get:function(o,s){var c="".concat(Dx).concat(Kb(s));return o[c]!==void 0?o[c]:i.getAttribute(c)},set:function(o,s,c){return i.setAttribute("".concat(Dx).concat(Kb(s)),c),!0}})),Et.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];hn(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};Et.enableCSSParsing&&(i.usedAttributes=BD);var a={};for(var o in n){var s=a0(o);a[s]=n[o]}Et.styleValueRegistry.processProperties(this,a,i),r.dirty=!0},e.prototype.setAttribute=function(n,r,i){i===void 0&&(i=!1);var a=a0(n);er(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];Et.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),Et.sceneGraphService.setOrigin(this,ei(n,r,i)),this},e.prototype.getOrigin=function(){return Et.sceneGraphService.getOrigin(this)},e.prototype.setPosition=function(n,r,i){return r===void 0&&(r=0),i===void 0&&(i=0),Et.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),Et.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),Et.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),Et.sceneGraphService.translateLocal(this,ei(n,r,i)),this},e.prototype.getPosition=function(){return Et.sceneGraphService.getPosition(this)},e.prototype.getLocalPosition=function(){return Et.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)),Et.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)),Et.sceneGraphService.setLocalScale(this,n),this},e.prototype.getLocalScale=function(){return Et.sceneGraphService.getLocalScale(this)},e.prototype.getScale=function(){return Et.sceneGraphService.getScale(this)},e.prototype.getEulerAngles=function(){var n=(0,S.CR)(t0(ot.create(),Et.sceneGraphService.getWorldTransform(this)),3),r=n[2];return Li(r)},e.prototype.getLocalEulerAngles=function(){var n=(0,S.CR)(t0(ot.create(),Et.sceneGraphService.getLocalRotation(this)),3),r=n[2];return Li(r)},e.prototype.setEulerAngles=function(n){return Et.sceneGraphService.setEulerAngles(this,0,0,n),this},e.prototype.setLocalEulerAngles=function(n){return Et.sceneGraphService.setLocalEulerAngles(this,0,0,n),this},e.prototype.rotateLocal=function(n,r,i){return(0,ye.Z)(r)&&(0,ye.Z)(i)?Et.sceneGraphService.rotateLocal(this,0,0,n):Et.sceneGraphService.rotateLocal(this,n,r,i),this},e.prototype.rotate=function(n,r,i){return(0,ye.Z)(r)&&(0,ye.Z)(i)?Et.sceneGraphService.rotate(this,0,0,n):Et.sceneGraphService.rotate(this,n,r,i),this},e.prototype.setRotation=function(n,r,i,a){return Et.sceneGraphService.setRotation(this,n,r,i,a),this},e.prototype.setLocalRotation=function(n,r,i,a){return Et.sceneGraphService.setLocalRotation(this,n,r,i,a),this},e.prototype.setLocalSkew=function(n,r){return Et.sceneGraphService.setLocalSkew(this,n,r),this},e.prototype.getRotation=function(){return Et.sceneGraphService.getRotation(this)},e.prototype.getLocalRotation=function(){return Et.sceneGraphService.getLocalRotation(this)},e.prototype.getLocalSkew=function(){return Et.sceneGraphService.getLocalSkew(this)},e.prototype.getLocalTransform=function(){return Et.sceneGraphService.getLocalTransform(this)},e.prototype.getWorldTransform=function(){return Et.sceneGraphService.getWorldTransform(this)},e.prototype.setLocalTransform=function(n){return Et.sceneGraphService.setLocalTransform(this,n),this},e.prototype.resetLocalTransform=function(){Et.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)(qt.getTranslation(ot.create(),r),2),a=i[0],o=i[1],s=(0,S.CR)(qt.getScaling(ot.create(),r),2),c=s[0],l=s[1],u=qt.getRotation(br(),r),f=(0,S.CR)(t0(ot.create(),u),3),d=f[0],h=f[2];return a6(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)(Yb(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)(Yb(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(){Et.enableCSSParsing?this.style.visibility="visible":this.forEach(function(n){n.style.visibility="visible"})},e.prototype.hide=function(){Et.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}(ID),Fx={number:function(t){return new Pn(t)},percent:function(t){return new Pn(t,"%")},px:function(t){return new Pn(t,"px")},em:function(t){return new Pn(t,"em")},rem:function(t){return new Pn(t,"rem")},deg:function(t){return new Pn(t,"deg")},grad:function(t){return new Pn(t,"grad")},rad:function(t){return new Pn(t,"rad")},turn:function(t){return new Pn(t,"turn")},s:function(t){return new Pn(t,"s")},ms:function(t){return new Pn(t,"ms")},registerProperty:function(t){var e=t.name,n=t.inherits,r=t.interpolable,i=t.initialValue,a=t.syntax;Et.styleValueRegistry.registerMetadata({n:e,inh:n,int:r,d:i,syntax:a})},registerLayout:function(t,e){Et.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:bt.CIRCLE,style:Et.enableCSSParsing?(0,S.pi)({cx:"",cy:"",r:""},r):(0,S.pi)({},r),initialParsedStyle:{anchor:[.5,.5],transformOrigin:Et.enableCSSParsing?null:[pf,pf]}},i))||this}return e}(Vr),k0=function(t){(0,S.ZT)(e,t);function e(n){n===void 0&&(n={});var r=this,i=n.style,a=(0,S._T)(n,["style"]);return r=t.call(this,(0,S.pi)({style:Et.enableCSSParsing?(0,S.pi)({x:"",y:""},i):(0,S.pi)({},i)},a))||this,r.isCustomElement=!0,r}return e}(Vr),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:bt.ELLIPSE,style:Et.enableCSSParsing?(0,S.pi)({cx:"",cy:"",rx:"",ry:""},r):(0,S.pi)({},r),initialParsedStyle:{anchor:[.5,.5],transformOrigin:Et.enableCSSParsing?null:[pf,pf]}},i))||this}return e}(Vr),Fr=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:bt.GROUP,style:Et.enableCSSParsing?(0,S.pi)({x:"",y:"",width:"",height:""},r):(0,S.pi)({},r)},i))||this}return e}(Vr),_f=function(t){(0,S.ZT)(e,t);function e(n){n===void 0&&(n={});var r=this,i=n.style,a=(0,S._T)(n,["style"]);return r=t.call(this,(0,S.pi)({type:bt.HTML,style:Et.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=qt.invert(qt.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}(Vr),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:bt.IMAGE,style:Et.enableCSSParsing?(0,S.pi)({x:"",y:"",img:"",width:"",height:""},r):(0,S.pi)({},r)},i))||this}return e}(Vr),rl=function(t){(0,S.ZT)(e,t);function e(n){n===void 0&&(n={});var r=this,i=n.style,a=(0,S._T)(n,["style"]);r=t.call(this,(0,S.pi)({type:bt.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&&hn(s)&&(r.markerStartAngle=s.getLocalEulerAngles(),r.appendChild(s)),c&&hn(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&&hn(a)&&(this.markerStartAngle=0,a.remove()),o&&hn(o)&&(this.markerStartAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!0))):n==="markerEnd"&&(a&&hn(a)&&(this.markerEndAngle=0,a.remove()),o&&hn(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||!hn(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=ot.transformMat4(ot.create(),ot.fromValues(d-l,h-u,0),r?this.getWorldTransform():this.getLocalTransform());return new Cr(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 kb(r,i,a,o)},e}(Vr),ri=function(t){(0,S.ZT)(e,t);function e(n){n===void 0&&(n={});var r=this,i=n.style,a=(0,S._T)(n,["style"]);r=t.call(this,(0,S.pi)({type:bt.PATH,style:Et.enableCSSParsing?(0,S.pi)({path:"",miterLimit:""},i):(0,S.pi)({},i),initialParsedStyle:Et.enableCSSParsing?null:{miterLimit:4,path:(0,S.pi)({},Jb)}},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&&hn(s)&&(r.markerStartAngle=s.getLocalEulerAngles(),r.appendChild(s)),l&&hn(l)&&r.placeMarkerMid(l),c&&hn(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&&hn(a)&&(this.markerStartAngle=0,a.remove()),o&&hn(o)&&(this.markerStartAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!0))):n==="markerEnd"?(a&&hn(a)&&(this.markerEndAngle=0,a.remove()),o&&hn(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||!hn(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&&hn(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 v0(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=Tj(s,n),l=c.x,u=c.y,f=ot.transformMat4(ot.create(),ot.fromValues(l-a,u-o,0),r?this.getWorldTransform():this.getLocalTransform());return new Cr(f[0],f[1])},e.prototype.getPoint=function(n,r){return r===void 0&&(r=!1),this.getPointAtLength(n*v0(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}(Vr),il=function(t){(0,S.ZT)(e,t);function e(n){n===void 0&&(n={});var r=this,i=n.style,a=(0,S._T)(n,["style"]);r=t.call(this,(0,S.pi)({type:bt.POLYGON,style:Et.enableCSSParsing?(0,S.pi)({points:"",miterLimit:"",isClosed:!0},i):(0,S.pi)({},i),initialParsedStyle:Et.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&&hn(s)&&(r.markerStartAngle=s.getLocalEulerAngles(),r.appendChild(s)),l&&hn(l)&&r.placeMarkerMid(l),c&&hn(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&&hn(a)&&(this.markerStartAngle=0,a.remove()),o&&hn(o)&&(this.markerStartAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!0))):n==="markerEnd"?(a&&hn(a)&&(this.markerEndAngle=0,a.remove()),o&&hn(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||!hn(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&&hn(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}(Vr),N0=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:bt.POLYLINE,style:Et.enableCSSParsing?(0,S.pi)({points:"",miterLimit:"",isClosed:!1},r):(0,S.pi)({},r),initialParsedStyle:Et.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=ot.transformMat4(ot.create(),ot.fromValues(h-a,p-o,0),r?this.getWorldTransform():this.getLocalTransform());return new Cr(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),$o=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:bt.RECT,style:Et.enableCSSParsing?(0,S.pi)({x:"",y:"",width:"",height:"",radius:""},r):(0,S.pi)({},r)},i))||this}return e}(Vr),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:bt.TEXT,style:Et.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:Et.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}(Vr),zD=function(){function t(){this.registry={},this.define(bt.CIRCLE,nl),this.define(bt.ELLIPSE,R0),this.define(bt.RECT,$o),this.define(bt.IMAGE,L0),this.define(bt.LINE,rl),this.define(bt.GROUP,Fr),this.define(bt.PATH,ri),this.define(bt.POLYGON,il),this.define(bt.POLYLINE,N0),this.define(bt.TEXT,Zi),this.define(bt.HTML,_f)}return t.prototype.define=function(e,n){this.registry[e]=n},t.prototype.get=function(e){return this.registry[e]},t}(),GD=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 Et.AnimationTimeline(n)}catch(i){}var r={};return w0.forEach(function(i){var a=i.n,o=i.inh,s=i.d;o&&s&&(r[a]=Bs(s)?s(bt.GROUP):s)}),n.documentElement=new Fr({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:Fr);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(Tn)},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(Fs)},e.prototype.insertBefore=function(n,r){throw new Error(Fs)},e.prototype.removeChild=function(n,r){throw new Error(Fs)},e.prototype.replaceChild=function(n,r,i){throw new Error(Fs)},e.prototype.append=function(){throw new Error(Fs)},e.prototype.prepend=function(){throw new Error(Fs)},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}(Rr),WD=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 kn(Ne.CULLED)),null)}return o}),r.hooks.afterRender.tap(t.tag,function(o){o.cullable.visibilityPlaneMask=-1})},t.tag="Culling",t}(),HD=function(){function t(){var e=this;this.autoPreventDefault=!1,this.rootPointerEvent=new P0(null),this.rootWheelEvent=new C0(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,ye.Z)(i)&&!(0,ye.Z)(a))n=i,r=a;else{var c=this.context.eventService.client2Viewport(new Cr(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=z8[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=A0.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];er(a.button)&&(a.button=0),er(a.buttons)&&(a.buttons=1),er(a.isPrimary)&&(a.isPrimary=e.touches.length===1&&e.type==="touchstart"),er(a.width)&&(a.width=a.radiusX||1),er(a.height)&&(a.height=a.radiusY||1),er(a.tiltX)&&(a.tiltX=0),er(a.tiltY)&&(a.tiltY=0),er(a.pointerType)&&(a.pointerType="touch"),er(a.pointerId)&&(a.pointerId=a.identifier||0),er(a.pressure)&&(a.pressure=a.force||.5),er(a.twist)&&(a.twist=0),er(a.tangentialPressure)&&(a.tangentialPressure=0),a.isNormalized=!0,a.type=e.type,r.push(a)}else if(n.isMouseEvent(e)){var o=e;er(o.isPrimary)&&(o.isPrimary=!0),er(o.width)&&(o.width=1),er(o.height)&&(o.height=1),er(o.tiltX)&&(o.tiltX=0),er(o.tiltY)&&(o.tiltY=0),er(o.pointerType)&&(o.pointerType="mouse"),er(o.pointerId)&&(o.pointerId=B8),er(o.pressure)&&(o.pressure=.5),er(o.twist)&&(o.twist=0),er(o.tangentialPressure)&&(o.tangentialPressure=0),o.isNormalized=!0,r.push(o)}else r.push(e);return r},t.tag="Event",t}(),YD=[bt.CIRCLE,bt.ELLIPSE,bt.IMAGE,bt.RECT,bt.LINE,bt.POLYLINE,bt.POLYGON,bt.TEXT,bt.PATH,bt.HTML],VD=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=YD.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(ot.dot(f,n.getPositiveFarPoint(i[s]))+d<0)return Ka.OUTSIDE;ot.dot(f,n.getNegativeFarPoint(i[s]))+d<0&&(a|=l)}}return a},t}(),XD=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;Et.enableCSSParsing&&Et.styleValueRegistry.recalc(d),Et.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),Et.sceneGraphService.dirtifyToRoot(d),r.dirtify()};r.hooks.init.tap(t.tag,function(){o.addEventListener(Ne.MOUNTED,l),o.addEventListener(Ne.UNMOUNTED,u),o.addEventListener(Ne.ATTR_MODIFIED,s),o.addEventListener(Ne.BOUNDS_CHANGED,c)}),r.hooks.destroy.tap(t.tag,function(){o.removeEventListener(Ne.MOUNTED,l),o.removeEventListener(Ne.UNMOUNTED,u),o.removeEventListener(Ne.ATTR_MODIFIED,s),o.removeEventListener(Ne.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 Eft(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,$D=.1,UD=1e3,I0=new kn(Ne.MOUNTED),j0=new kn(Ne.UNMOUNTED),qD=new kn(pi.BEFORE_RENDER),ZD=new kn(pi.RERENDER),KD=new kn(pi.AFTER_RENDER),zx=function(t){(0,S.ZT)(e,t);function e(n){var r=t.call(this)||this;r.Element=Vr,r.inited=!1,r.context={},r.document=new GD,r.document.defaultView=r,r.customElements=new zD;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;_||L8(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||D8(a)||a.width/C,P=c||F8(a)||a.height/C),o&&(Et.offscreenCanvas=o),r.devicePixelRatio=C,r.requestAnimationFrame=p!=null?p:Ex.bind(Et.globalThis),r.cancelAnimationFrame=v!=null?v:Ax.bind(Et.globalThis),r.supportsTouchEvents=m!=null?m:"ontouchstart"in Et.globalThis,r.supportsPointerEvents=y!=null?y:!!Et.globalThis.PointerEvent,r.isTouchEvent=M!=null?M:function(j){return r.supportsTouchEvents&&j instanceof Et.globalThis.TouchEvent},r.isMouseEvent=E!=null?E:function(j){return!Et.globalThis.MouseEvent||j instanceof Et.globalThis.MouseEvent&&(!r.supportsPointerEvents||!(j instanceof Et.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 Et.CameraContribution;o.clipSpaceNearZ=i,o.setType(On.EXPLORING,Zc.DEFAULT).setPosition(n/2,r/2,Bx).setFocalPoint(n/2,r/2,0).setOrthographic(n/-2,n/2,r/2,r/-2,$D,UD),o.canvas=this,o.eventEmitter.on(Xb.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 kn(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 kn(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 kn(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(qD);var r=this.getRenderingService();r.render(this.getConfig(),function(){n.dispatchEvent(ZD)}),this.dispatchEvent(KD)},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 Qj,this.context.renderingPlugins=[],this.context.renderingPlugins.push(new HD,new XD,new WD([new VD])),this.loadRendererContainerModule(n),this.context.contextService=new this.context.ContextService((0,S.pi)((0,S.pi)({},Et),this.context)),this.context.renderingService=new vD(Et,this.context),this.context.eventService=new hD(Et,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 kn(pi.READY))}):a.dispatchEvent(new kn(pi.READY)),a.readyPromise&&a.resolveReadyPromise()):a.dispatchEvent(new kn(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(Et)})},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(Et)}),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(j0):(j0.target=n,this.dispatchEvent(j0,!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(I0):(I0.target=n,this.dispatchEvent(I0,!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}(Cx),QD=function(t){(0,S.ZT)(e,t);function e(){var n=t.apply(this,(0,S.ev)([],(0,S.CR)(arguments),!1))||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===On.EXPLORING){var a=$a(br(),[1,0,0],nr((this.rotateWorld?1:-1)*this.relElevation)),o=$a(br(),[0,1,0],nr((this.rotateWorld?1:-1)*this.relAzimuth)),s=$a(br(),[0,0,1],nr(this.relRoll)),c=Ua(br(),o,a);c=Ua(br(),c,s);var l=qt.fromQuat(qt.create(),c);qt.translate(this.matrix,this.matrix,[0,0,-this.distance]),qt.multiply(this.matrix,this.matrix,l),qt.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===On.ORBITING||this.type===On.EXPLORING?this._getPosition():this.type===On.TRACKING&&this._getFocalPoint(),this._update(),this},e.prototype.pan=function(n,r){var i=ei(n,r,0),a=ot.clone(this.position);return ot.add(a,a,ot.scale(ot.create(),this.right,i[0])),ot.add(a,a,ot.scale(ot.create(),this.up,i[1])),this._setPosition(a),this.triggerUpdate(),this},e.prototype.dolly=function(n){var r=this.forward,i=ot.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===On.ORBITING||this.type===On.EXPLORING?this._getDistance():this.type===On.TRACKING&&ot.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 Et.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:qt.clone(p.getWorldTransform()),right:ot.clone(p.right),up:ot.clone(p.up),forward:ot.clone(p.forward),position:ot.clone(p.getPosition()),focalPoint:ot.clone(p.getFocalPoint()),distanceVector:ot.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=tr(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||Et.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=ot.create(),k=ot.create(),R=1,D=0;ot.lerp(N,i.focalPoint,b,j),ot.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 F=ot.dist(N,b)+ot.dist(k,m);if(F<=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=qt.copy(this.matrix,n.matrix),this.right=ot.copy(this.right,n.right),this.up=ot.copy(this.up,n.up),this.forward=ot.copy(this.forward,n.forward),this.position=ot.copy(this.position,n.position),this.focalPoint=ot.copy(this.focalPoint,n.focalPoint),this.distanceVector=ot.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}(Ub);Et.CameraContribution=QD;var Gx=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}(),JD=0,Hs=new WeakMap,t9=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=i9(i,e);if(a){n[r-1]=a;return}}else o9(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(Ne.ATTR_MODIFIED,this,!0),n.childList&&e.addEventListener(Ne.INSERTED,this,!0),(n.childList||n.subtree)&&e.addEventListener(Ne.REMOVED,this,!0)},t.prototype.removeListeners=function(){this.removeListeners_(this.target)},t.prototype.removeListeners_=function(e){var n=this.options;n.attributes&&e.removeEventListener(Ne.ATTR_MODIFIED,this,!0),n.childList&&e.removeEventListener(Ne.INSERTED,this,!0),(n.childList||n.subtree)&&e.removeEventListener(Ne.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 Ne.ATTR_MODIFIED:var i=e.attrName,a=e.relatedNode.namespaceURI;r=e.target,n=Wx("attributes",r),n.attributeName=i,n.attributeNamespace=a;var o=e.attrChange===eo.ADDITION?null:e.prevValue;Hx(r,function(d){if(d.attributes&&!(d.attributeFilter&&d.attributeFilter.length&&d.attributeFilter.indexOf(i)===-1&&d.attributeFilter.indexOf(a)===-1))return d.attributeOldValue?e9(o):n});break;case Ne.REMOVED:case Ne.INSERTED:r=e.relatedNode;var s=e.target,c=void 0,l=void 0;e.type===Ne.INSERTED?(c=[s],l=[]):(c=[],l=[s]);var u=s.previousSibling,f=s.nextSibling;n=Wx("childList",r),n.addedNodes=c,n.removedNodes=l,n.previousSibling=u,n.nextSibling=f,Hx(r,function(d){if(d.childList)return n})}n9()},t}(),Aft=function(){function t(e){this.callback=e,this.nodes=[],this.records=[],this.uid=JD++}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 t9(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}(),Of,Pa;function Wx(t,e){return Of=new Gx(t,e)}function e9(t){return Pa||(Pa=Gx.copy(Of),Pa.oldValue=t,Pa)}function n9(){Of=Pa=void 0}function r9(t){return t===Pa||t===Of}function i9(t,e){return t===e?t:Pa&&r9(t)?Pa:null}function a9(t){t.nodes.forEach(function(e){var n=Hs.get(e);n&&n.forEach(function(r){r.observer===t&&r.removeTransientObservers()})})}function Hx(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 D0=!1,F0=[];function o9(t){F0.push(t),D0||(D0=!0,typeof Et.globalThis!="undefined"?Et.globalThis.setTimeout(B0):B0())}function B0(){D0=!1;var t=F0;F0=[],t.sort(function(n,r){return n.uid-r.uid});var e=!1;t.forEach(function(n){var r=n.takeRecords();a9(n),r.length&&(n.callback(r,n),e=!0)}),e&&B0()}var z0=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}(xf),s9=0,c9=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(s9++),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 z0(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(Tn)},t.prototype.addEventListener=function(e,n,r){throw new Error(Tn)},t.prototype.removeEventListener=function(e,n,r){throw new Error(Tn)},t.prototype.dispatchEvent=function(e){throw new Error(Tn)},t.prototype.commitStyles=function(){throw new Error(Tn)},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 z0(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 z0(null,this,this.currentTime,e);this.onframe(i)}this._finishedFlag=!1}},t}(),l9=4,u9=.001,f9=1e-7,d9=10,al=11,wf=1/(al-1),h9=typeof Float32Array=="function",Yx=function(t,e){return 1-3*e+3*t},Vx=function(t,e){return 3*e-6*t},Xx=function(t){return 3*t},Sf=function(t,e,n){return((Yx(e,n)*t+Vx(e,n))*t+Xx(e))*t},$x=function(t,e,n){return 3*Yx(e,n)*t*t+2*Vx(e,n)*t+Xx(e)},p9=function(t,e,n,r,i){var a,o,s=0;do o=e+(n-e)/2,a=Sf(o,r,i)-t,a>0?n=o:e=o;while(Math.abs(a)>f9&&++s<d9);return o},v9=function(t,e,n,r){for(var i=0;i<l9;++i){var a=$x(e,n,r);if(a===0)return e;var o=Sf(e,n,r)-t;e-=o/a}return e},G0=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=h9?new Float32Array(al):new Array(al),a=0;a<al;++a)i[a]=Sf(a*wf,t,n);var o=function(s){for(var c=0,l=1,u=al-1;l!==u&&i[l]<=s;++l)c+=wf;--l;var f=(s-i[l])/(i[l+1]-i[l]),d=c+f*wf,h=$x(d,t,n);return h>=u9?v9(s,d,t,n):h===0?d:p9(s,c,c+wf,t,n)};return function(s){return s===0||s===1?s:Sf(o(s),e,r)}},g9=function(t){return t=t.replace(/([A-Z])/g,function(e){return"-".concat(e.toLowerCase())}),t.charAt(0)==="-"?t.substring(1):t},Mf=function(t){return Math.pow(t,2)},Ef=function(t){return Math.pow(t,3)},Af=function(t){return Math.pow(t,4)},Tf=function(t){return Math.pow(t,5)},Pf=function(t){return Math.pow(t,6)},Cf=function(t){return 1-Math.cos(t*Math.PI/2)},kf=function(t){return 1-Math.sqrt(1-t*t)},Rf=function(t){return t*t*(3*t-2)},Lf=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)},Nf=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},W0=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},Ux=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 G0(r,i,a,o)(t)},If=G0(.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}},qx={steps:W0,"step-start":function(t){return W0(t,[1,"start"])},"step-end":function(t){return W0(t,[1,"end"])},linear:function(t){return t},"cubic-bezier":Ux,ease:function(t){return Ux(t,[.25,.1,.25,1])},in:If,out:Ni(If),"in-out":Ii(If),"out-in":ji(If),"in-quad":Mf,"out-quad":Ni(Mf),"in-out-quad":Ii(Mf),"out-in-quad":ji(Mf),"in-cubic":Ef,"out-cubic":Ni(Ef),"in-out-cubic":Ii(Ef),"out-in-cubic":ji(Ef),"in-quart":Af,"out-quart":Ni(Af),"in-out-quart":Ii(Af),"out-in-quart":ji(Af),"in-quint":Tf,"out-quint":Ni(Tf),"in-out-quint":Ii(Tf),"out-in-quint":ji(Tf),"in-expo":Pf,"out-expo":Ni(Pf),"in-out-expo":Ii(Pf),"out-in-expo":ji(Pf),"in-sine":Cf,"out-sine":Ni(Cf),"in-out-sine":Ii(Cf),"out-in-sine":ji(Cf),"in-circ":kf,"out-circ":Ni(kf),"in-out-circ":Ii(kf),"out-in-circ":ji(kf),"in-back":Rf,"out-back":Ni(Rf),"in-out-back":Ii(Rf),"out-in-back":ji(Rf),"in-bounce":Lf,"out-bounce":Ni(Lf),"in-out-bounce":Ii(Lf),"out-in-bounce":ji(Lf),"in-elastic":Nf,"out-elastic":Ni(Nf),"in-out-elastic":Ii(Nf),"out-in-elastic":ji(Nf),spring:ol,"spring-in":ol,"spring-out":Ni(ol),"spring-in-out":Ii(ol),"spring-out-in":ji(ol)},y9=function(t){return g9(t).replace(/^ease-/,"").replace(/(\(|\s).+/,"").toLowerCase().trim()},m9=function(t){return qx[y9(t)]||qx.linear},b9=function(t){return t},x9=1,_9=.5,Zx=0;function Kx(t,e){return function(n){if(n>=1)return 1;var r=1/t;return n+=e*r,n-n%r}}var jf="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",O9=new RegExp("cubic-bezier\\("+jf+","+jf+","+jf+","+jf+"\\)"),w9=/steps\(\s*(\d+)\s*\)/,S9=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/;function H0(t){var e=O9.exec(t);if(e)return G0.apply(void 0,(0,S.ev)([],(0,S.CR)(e.slice(1).map(Number)),!1));var n=w9.exec(t);if(n)return Kx(Number(n[1]),Zx);var r=S9.exec(t);return r?Kx(Number(r[1]),{start:x9,middle:_9,end:Zx}[r[2]]):m9(t)}function M9(t){return Math.abs(E9(t)/(t.playbackRate||1))}function E9(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 Qx=0,Y0=1,Df=2,Jx=3;function A9(t,e,n){if(e===null)return Qx;var r=n.endTime;return e<Math.min(n.delay,r)?Y0:e>=Math.min(n.delay+t+n.endDelay,r)?Df:Jx}function T9(t,e,n,r,i){switch(r){case Y0:return e==="backwards"||e==="both"?0:null;case Jx:return n-i;case Df:return e==="forwards"||e==="both"?t:null;case Qx:return null}}function P9(t,e,n,r,i){var a=i;return t===0?e!==Y0&&(a+=n):a+=r/t,a}function C9(t,e,n,r,i,a){var o=t===1/0?e%1:t%1;return o===0&&n===Df&&r!==0&&(i!==0||a===0)&&(o=1),o}function k9(t,e,n,r){return t===Df&&e===1/0?1/0:n===1?Math.floor(r)-1:Math.floor(r)}function R9(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 L9(t,e,n){var r=A9(t,e,n),i=T9(t,n.fill,e,r,n.delay);if(i===null)return null;var a=n.duration==="auto"?0:n.duration,o=P9(a,r,n.iterations,i,n.iterationStart),s=C9(o,n.iterationStart,r,n.iterations,i,a),c=k9(r,n.iterations,s,o),l=R9(n.direction,c,s);return n.currentIteration=c,n.progress=l,n.easingFunction(l)}function N9(t,e,n){var r=I9(t,e),i=j9(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)t_(s)&&a.setAttribute(s,null)}}function t_(t){return t!=="offset"&&t!=="easing"&&t!=="composite"&&t!=="computedOffset"}function I9(t,e){for(var n={},r=0;r<t.length;r++)for(var i in t[r])if(t_(i)){var a={offset:t[r].offset,computedOffset:t[r].computedOffset,easing:t[r].easing,easingFunction:H0(t[r].easing)||e.easingFunction,value:t[r][i]};n[i]=n[i]||[],n[i].push(a)}return n}function j9(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:D9(r,i[o].value,i[s].value,e)})}return n.sort(function(d,h){return d.startOffset-h.startOffset}),n}var e_=function(t,e,n){return function(r){var i=n_(t,e,r);return!Et.enableCSSParsing&&(0,xr.Z)(i)?i:n(i)}};function D9(t,e,n,r){var i=Ja[t];if(i&&i.syntax&&i.int){var a=Et.styleValueRegistry.getPropertySyntax(i.syntax);if(a){var o=void 0,s=void 0;if(Et.enableCSSParsing){var c=Et.styleValueRegistry.parseProperty(t,e,r),l=Et.styleValueRegistry.parseProperty(t,n,r);o=Et.styleValueRegistry.computeProperty(t,c,r),s=Et.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=e_.apply(void 0,(0,S.ev)([],(0,S.CR)(f),!1));return function(h){return h===0?e:h===1?n:d(h)}}}}return e_(!1,!0,function(h){return h?n:e})}function n_(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(n_(t[s<r?s:r-1],e[s<i?s:i-1],n));return o}throw new Error("Mismatched interpolation arguments "+t+":"+e)}var F9=function(){function t(){this.delay=0,this.direction="normal",this.duration="auto",this._easing="linear",this.easingFunction=b9,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=H0(e),this._easing=e},enumerable:!1,configurable:!0}),t}();function B9(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 r_(t,e){if(t===null)return[];Array.isArray(t)||(t=B9(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,ye.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,ye.Z)(p)&&!(0,ye.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 z9="backwards|forwards|both|none".split("|"),G9="reverse|alternate|alternate-reverse".split("|");function W9(t,e){var n=new F9;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"&&z9.indexOf(t[r])===-1||r==="direction"&&G9.indexOf(t[r])===-1)return;n[r]=t[r]}}),n}function H9(t,e){return t=Y9(t!=null?t:{duration:"auto"}),W9(t,e)}function Y9(t){return typeof t=="number"&&(isNaN(t)?t={duration:"auto"}:t={duration:t}),t}var V9=function(){function t(e,n,r){var i=this;this.composite="replace",this.iterationComposite="replace",this.target=e,this.timing=H9(r,!1),this.timing.effect=this,this.timing.activeDuration=M9(this.timing),this.timing.endTime=Math.max(0,this.timing.delay+this.timing.activeDuration+this.timing.endDelay),this.normalizedKeyframes=r_(n,this.timing),this.interpolations=N9(this.normalizedKeyframes,this.timing,this.target);var a=Et.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=L9(this.timing.activeDuration,e,this.timing),this.timeFraction!==null)},t.prototype.getKeyframes=function(){return this.normalizedKeyframes},t.prototype.setKeyframes=function(e){this.normalizedKeyframes=r_(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 i_(t,e){return Number(t.id)-Number(e.id)}var X9=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(i_),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 V9(e,n,r),a=new c9(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(i_);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}();Et.EasingFunction=H0,Et.AnimationTimeline=X9;const a_="main-layer",V0="label-layer",Ca="element",X0="view",Ff="plot",o_="component",$0="label",s_="area",Tft="mask",c_={};function l_(t,e){Object.assign(c_,{[t]:e})}function $9(t,e){var n=e.r;t.arc(n,n,n,0,Math.PI*2,!1)}function U9(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 q9(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&&hn(u)&&d&&(b=i-n,_=a-r,m=Math.atan2(_,b),p=Math.cos(m)*(d||0),v=Math.sin(m)*(d||0)),f&&hn(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 Z9(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&&hn(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&&hn(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,F=k.rx,B=k.ry,z=k.startAngle,Y=k.endAngle,$=k.xRotation,tt=k.sweepFlag;if(t.ellipse)t.ellipse(R-r,D-a,F,B,$,z,Y,!!(1-tt));else{var it=F>B?F:B,St=F>B?1:F/B,Ft=F>B?B/F:1;t.translate(R-r,D-a),t.rotate($),t.scale(St,Ft),t.arc(0,0,it,z,Y,!!(1-tt)),t.scale(1/St,1/Ft),t.rotate(-$),t.translate(-(R-r),-(D-a))}N&&t.lineTo(A[6]-r+v,A[7]-a+g);break}case"Z":t.closePath();break}}}function K9(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&&hn(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&&hn(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 Q9(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&&hn(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&&hn(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 J9(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 t7=function(t){(0,S.ZT)(e,t);function e(){var n=t.apply(this,(0,S.ev)([],(0,S.CR)(arguments),!1))||this;return n.name="canvas-path-generator",n}return e.prototype.init=function(){var n,r=(n={},n[bt.CIRCLE]=$9,n[bt.ELLIPSE]=U9,n[bt.RECT]=J9,n[bt.LINE]=q9,n[bt.POLYLINE]=Q9,n[bt.POLYGON]=K9,n[bt.PATH]=Z9,n[bt.TEXT]=void 0,n[bt.GROUP]=void 0,n[bt.IMAGE]=void 0,n[bt.HTML]=void 0,n[bt.MESH]=void 0,n);this.context.pathGeneratorFactory=r},e.prototype.destroy=function(){delete this.context.pathGeneratorFactory},e}(Za),e7=ot.create(),n7=ot.create(),r7=ot.create(),i7=qt.create(),a7=function(){function t(){var e=this;this.isHit=function(n,r,i,a){var o=e.context.pointInPathPickerFactory[n.nodeName];if(o){var s=qt.invert(i7,i),c=ot.transformMat4(n7,ot.set(r7,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 Cr(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=ot.set(e7,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=xx(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 o7(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)(Vo(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 s7(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)(Vo(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 c7(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 zf(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?Rb(t,e,n,r,a,o)<=i/2:!1}function u_(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 l7=1e-6;function U0(t){return Math.abs(t)<l7?0:t<0?-1:1}function u7(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 f_(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(u7(o,s,[e,n]))return!0;U0(o[1]-n)>0!=U0(s[1]-n)>0&&U0(e-(n-o[1])*(o[0]-s[0])/(o[1]-s[1])-o[0])<0&&(r=!r)}return r}function d_(t,e,n){for(var r=!1,i=0;i<t.length;i++){var a=t[i];if(r=f_(a,e,n),r)break}return r}function f7(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)(Vo(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 d7(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=Zj(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=Ib(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=qp(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=Ib(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 h7(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)(Vo(g,(_==null?void 0:_.length)&&u,l),2),w=O[0],M=O[1],E=v0(t),A=!1;return w||n?(m?A=r(t,e):A=d_(_,e.x+d,e.y+p)||d_(b,e.x+d,e.y+p),A):((M||n)&&(A=d7(y,(s||0)+(c||0),e.x+d,e.y+p,E)),A)}function p7(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)(Vo(h,a,i),2),v=p[0],g=p[1],y=!1;return(g||n)&&(y=u_(c.points,(o||0)+(s||0),e.x+u,e.y+d,!0)),!y&&(v||n)&&(y=f_(c.points,e.x+u,e.y+d)),y}function v7(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)(Vo(f,d,h),2),v=p[1];return!v&&!n||!i?!1:u_(o.points,(i||0)+(a||0),e.x+c,e.y+u,!1)}function g7(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)(Vo(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)&&(_=y7(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 c7(0,0,f,d,m,e.x,e.y)}return!1}function y7(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)||zf(t+n-u,e+u,u,1.5*Math.PI,2*Math.PI,a,o,s)||zf(t+n-f,e+r-f,f,0,.5*Math.PI,a,o,s)||zf(t+d,e+r-d,d,.5*Math.PI,Math.PI,a,o,s)||zf(t+l,e+l,l,Math.PI,1.5*Math.PI,a,o,s)}function m7(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[bt.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 b7=function(t){(0,S.ZT)(e,t);function e(){var n=t.apply(this,(0,S.ev)([],(0,S.CR)(arguments),!1))||this;return n.name="canvas-picker",n}return e.prototype.init=function(){var n,r=function(){return!0},i=(n={},n[bt.CIRCLE]=o7,n[bt.ELLIPSE]=s7,n[bt.RECT]=g7,n[bt.LINE]=f7,n[bt.POLYLINE]=v7,n[bt.POLYGON]=p7,n[bt.PATH]=h7,n[bt.TEXT]=r,n[bt.GROUP]=null,n[bt.IMAGE]=m7,n[bt.HTML]=null,n[bt.MESH]=null,n);this.context.pointInPathPickerFactory=i,this.addRenderingPlugin(new a7)},e.prototype.destroy=function(){delete this.context.pointInPathPickerFactory,this.removeAllRenderingPlugins()},e}(Za),x7=function(){function t(e){this.canvasRendererPluginOptions=e,this.removedRBushNodeAABBs=[],this.renderQueue=[],this.restoreStack=[],this.clearFullScreen=!1,this.vpMatrix=qt.create(),this.dprMatrix=qt.create(),this.tmpMat4=qt.create(),this.vec3a=ot.create(),this.vec3b=ot.create(),this.vec3c=ot.create(),this.vec3d=ot.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(Ne.UNMOUNTED,d),f.addEventListener(Ne.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(Ne.UNMOUNTED,d),f.removeEventListener(Ne.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(qt.fromScaling(r.dprMatrix,[g,g,1]),qt.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($){var tt=$.minX,it=$.minY,St=$.maxX,Ft=$.maxY,Xt=new Er;return Xt.setMinMax([tt,it,0],[St,Ft,0]),Xt})),!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=ot.transformMat4(r.vec3a,[b,_,0],r.vpMatrix),E=ot.transformMat4(r.vec3b,[b+O,_,0],r.vpMatrix),A=ot.transformMat4(r.vec3c,[b,_+w,0],r.vpMatrix),P=ot.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),F=Math.ceil(N-C),B=Math.ceil(k-j);v.save(),r.clearRect(v,R,D,F,B,i.background),v.beginPath(),v.rect(R,D,F,B),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 kn(pi.DIRTY_RECTANGLE,{dirtyRect:{x:R,y:D,width:F,height:B}}));var Y=r.searchDirtyObjects(y);Y.sort(function($,tt){return $.sortable.renderOrder-tt.sortable.renderOrder}).forEach(function($){$&&$.isVisible()&&!$.isCulled()&&r.renderDisplayObject($,v,r.context,r.restoreStack,n)}),v.restore(),r.renderQueue.forEach(function($){r.saveDirtyAABB($)}),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)&Rr.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!==bt.LINE&&e.nodeName!==bt.PATH&&e.nodeName!==bt.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,ye.Z)(c)||(e.lineDashOffset=c),(0,ye.Z)(o)||(e.globalAlpha*=o),!(0,ye.Z)(i)&&!Array.isArray(i)&&!i.isNone&&(e.strokeStyle=n.attributes.stroke),!(0,ye.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?(qt.copy(this.tmpMat4,n.getLocalTransform()),this.vec3a[0]=i,this.vec3a[1]=a,this.vec3a[2]=0,qt.translate(this.tmpMat4,this.tmpMat4,this.vec3a),qt.multiply(this.tmpMat4,r,this.tmpMat4),qt.multiply(this.tmpMat4,this.vpMatrix,this.tmpMat4)):(qt.copy(this.tmpMat4,n.getWorldTransform()),this.vec3a[0]=i,this.vec3a[1]=a,this.vec3a[2]=0,qt.translate(this.tmpMat4,this.tmpMat4,this.vec3a),qt.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,ye.Z)(s)&&!s.isNone,w=!(0,ye.Z)(f)&&!f.isNone&&h>0,M=s.alpha===0,E=!!(b&&b.length),A=!(0,ye.Z)(y)&&m>0,P=r.nodeName,C=g==="inner",j=w&&A&&(P===bt.PATH||P===bt.LINE||P===bt.POLYLINE||M||C);O&&(e.globalAlpha=l*u,j||Gf(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,ye.Z)(_)||(e.miterLimit=_),(0,ye.Z)(p)||(e.lineCap=p),(0,ye.Z)(v)||(e.lineJoin=v),j&&(C&&(e.globalCompositeOperation="source-atop"),Gf(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,ye.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 Gf(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 _7=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(tr(o)?l=this.imagePool.getImageSync(o):(u||(u=o.width),f||(f=o.height),l=o),l){var d=!(0,ye.Z)(s)&&c>0;Gf(r,e,d);try{e.drawImage(l,0,0,u,f)}catch(h){}}},t}(),O7=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,ye.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,ye.Z)(w)&&M>0;Gf(r,e,D);for(var F=0;F<A.length;F++){var B=c/2+R;k+=C,!(0,ye.Z)(p)&&!p.isNone&&c&&this.drawLetterSpacing(e,A[F],j[F],l,B,k,h,g,y,m,!0),(0,ye.Z)(v)||this.drawLetterSpacing(e,A[F],j[F],l,B,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,ye.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,ye.Z)(a)&&a!==1;s&&(o=e.globalAlpha,e.globalAlpha=a),e.strokeText(n,r,i),s&&(e.globalAlpha=o)},t}(),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),Rft=function(t){(0,S.ZT)(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(ro),Lft=function(t){(0,S.ZT)(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(ro),Nft=function(t){(0,S.ZT)(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(ro),Ift=function(t){(0,S.ZT)(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(ro),w7=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[bt.CIRCLE]=a,n[bt.ELLIPSE]=a,n[bt.RECT]=a,n[bt.IMAGE]=new _7(i),n[bt.TEXT]=new O7,n[bt.LINE]=a,n[bt.POLYLINE]=a,n[bt.POLYGON]=a,n[bt.PATH]=a,n[bt.GROUP]=void 0,n[bt.HTML]=void 0,n[bt.MESH]=void 0,n);this.context.defaultStyleRendererFactory=o,this.context.styleRendererFactory=o,this.addRenderingPlugin(new x7(r))},e.prototype.destroy=function(){this.removeAllRenderingPlugins(),delete this.context.defaultStyleRendererFactory,delete this.context.styleRendererFactory},e}(Za),S7=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}(),M7=function(t){(0,S.ZT)(e,t);function e(){var n=t.apply(this,(0,S.ev)([],(0,S.CR)(arguments),!1))||this;return n.name="dom-interaction",n}return e.prototype.init=function(){this.addRenderingPlugin(new S7)},e.prototype.destroy=function(){this.removeAllRenderingPlugins()},e}(Za),E7="g-canvas-camera",A7=function(){function t(){this.displayObjectHTMLElementMap=new WeakMap}return t.prototype.joinTransformMatrix=function(e){return"matrix(".concat([e[0],e[1],e[4],e[5],e[12],e[13]].join(","),")")},t.prototype.apply=function(e,n){var r=this,i=e.camera,a=e.renderingContext,o=e.renderingService;this.context=e;var s=a.root.ownerDocument.defaultView,c=s.context.eventService.nativeHTMLMap,l=function(v,g){g.style.transform=r.joinTransformMatrix(v.getWorldTransform())},u=function(v){var g=v.target;if(g.nodeName===bt.HTML){r.$camera||(r.$camera=r.createCamera(i));var y=r.getOrCreateEl(g);if(r.$camera.appendChild(y),n.enableCSSParsing){var m=g.ownerDocument.documentElement.attributes;Object.keys(m).forEach(function(b){y.style[b]=m[b]})}Object.keys(g.attributes).forEach(function(b){r.updateAttribute(b,g)}),l(g,y),c.set(y,g)}},f=function(v){var g=v.target;if(g.nodeName===bt.HTML&&r.$camera){var y=r.getOrCreateEl(g);y&&(y.remove(),c.delete(y))}},d=function(v){var g=v.target;if(g.nodeName===bt.HTML){var y=v.attrName;r.updateAttribute(y,g)}},h=function(v){var g=v.target;if(g.nodeName===bt.HTML){var y=r.getOrCreateEl(g);l(g,y)}},p=function(){if(r.$camera){var v=r.context.config,g=v.width,y=v.height;r.$camera.style.width="".concat(g||0,"px"),r.$camera.style.height="".concat(y||0,"px")}};o.hooks.init.tap(t.tag,function(){s.addEventListener(pi.RESIZE,p),s.addEventListener(Ne.MOUNTED,u),s.addEventListener(Ne.UNMOUNTED,f),s.addEventListener(Ne.ATTR_MODIFIED,d),s.addEventListener(Ne.BOUNDS_CHANGED,h)}),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,p),s.removeEventListener(Ne.MOUNTED,u),s.removeEventListener(Ne.UNMOUNTED,f),s.removeEventListener(Ne.ATTR_MODIFIED,d),s.removeEventListener(Ne.BOUNDS_CHANGED,h)})},t.prototype.createCamera=function(e){var n=this.context.config,r=n.document,i=n.width,a=n.height,o=this.context.contextService.getDomElement(),s=o.parentNode;if(s){var c=E7,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;tr(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="";vf(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="";vf(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,ye.Z)(n.style[e])&&n.style[e]!==""&&(r.style[e]=n.style[e])}},t.tag="HTMLRendering",t}(),T7=function(t){(0,S.ZT)(e,t);function e(){var n=t.apply(this,(0,S.ev)([],(0,S.CR)(arguments),!1))||this;return n.name="html-renderer",n}return e.prototype.init=function(){this.addRenderingPlugin(new A7)},e.prototype.destroy=function(){this.removeAllRenderingPlugins()},e}(Za),P7=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;tr(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=M0(bf(l),new Vr({})):h=qt.identity(qt.create()),f&&qt.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=P6(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=C6(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===ne.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(tr(n))return"pattern-".concat(n,"-").concat(r);if(n.nodeName==="rect")return"pattern-".concat(n.entity,"-").concat(r)},t}(),C7=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===bt.IMAGE){var h=d.img,p=d.keepAspectRatio;tr(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===bt.IMAGE&&f==="img"&&tr(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(Ne.MOUNTED,s),a.addEventListener(Ne.ATTR_MODIFIED,c)}),n.hooks.destroy.tap(t.tag,function(){a.removeEventListener(Ne.MOUNTED,s),a.removeEventListener(Ne.ATTR_MODIFIED,c)})},t.tag="LoadImage",t}(),k7=function(t){(0,S.ZT)(e,t);function e(){var n=t.apply(this,(0,S.ev)([],(0,S.CR)(arguments),!1))||this;return n.name="image-loader",n}return e.prototype.init=function(){this.context.imagePool=new P7(this.context.config),this.addRenderingPlugin(new C7)},e.prototype.destroy=function(){this.removeAllRenderingPlugins()},e}(Za),R7=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=tr(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,j8(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}(),L7=function(t){(0,S.ZT)(e,t);function e(){var n=t.apply(this,(0,S.ev)([],(0,S.CR)(arguments),!1))||this;return n.name="canvas-context-register",n}return e.prototype.init=function(){this.context.ContextService=R7},e.prototype.destroy=function(){delete this.context.ContextService},e}(Za),h_=function(t){(0,S.ZT)(e,t);function e(n){var r=t.call(this,n)||this;return r.registerPlugin(new L7),r.registerPlugin(new k7),r.registerPlugin(new t7),r.registerPlugin(new w7),r.registerPlugin(new M7),r.registerPlugin(new b7),r.registerPlugin(new T7),r}return e}(Jj),N7=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}(),p_=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 N7((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 I7(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 v_=I7,j7=function(t){return typeof t=="object"&&t!==null},q0=j7,D7=function(t){if(!q0(t)||!(0,nf.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=D7,F7=5;function B7(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 g_(t,e,n,r){n=n||0,r=r||F7;for(var i in e)if(B7(e,i)){var a=e[i];a!==null&&io(a)?(io(t[i])||(t[i]={}),n<r?g_(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 z7=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)g_(t,e[r]);return t},Nt=z7;class G7 extends Map{constructor(e,n=b_){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(Z0(this,e))}has(e){return super.has(Z0(this,e))}set(e,n){return super.set(y_(this,e),n)}delete(e){return super.delete(m_(this,e))}}class jft extends null{constructor(e,n=b_){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(Z0(this,e))}add(e){return super.add(y_(this,e))}delete(e){return super.delete(m_(this,e))}}function Z0({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function y_({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function m_({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function b_(t){return t!==null&&typeof t=="object"?t.valueOf():t}function sl(t){return t}function Zn(t,...e){return Ys(t,sl,sl,e)}function Wf(t,...e){return Ys(t,Array.from,sl,e)}function x_(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 Dft(t,...e){return x_(Wf(t,...e),e)}function Fft(t,e,...n){return x_(Q0(t,e,...n),n)}function K0(t,e,...n){return Ys(t,sl,e,n)}function Q0(t,e,...n){return Ys(t,Array.from,e,n)}function Bft(t,...e){return Ys(t,identity,__,e)}function zft(t,...e){return Ys(t,Array.from,__,e)}function __(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 G7,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 O_=function(t){return(0,ye.Z)(t)?"":t.toString()},W7=function(t){var e=O_(t);return e.charAt(0).toLowerCase()+e.substring(1)},w_=W7,H7=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 J0(t){return t.reduce((e,n)=>(r,...i)=>n(e(r,...i),...i),qo)}function Y7(t){return t.reduce((e,n)=>r=>H7(this,void 0,void 0,function*(){const i=yield e(r);return n(i)}),qo)}function tv(t){return t.replace(/( |^)[a-z]/g,e=>e.toUpperCase())}function Vs(t=""){throw new Error(t)}function ev(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 Rn(t){return t!=null&&!Number.isNaN(t)}function Gft(t,e){return t+(e-t)*Math.random()}function V7(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 X7(t,e){const{transform:n}=t.style,i=(a=>a==="none"||a===void 0)(n)?"":n;t.style.transform=`${i} ${e}`.trimStart()}function le(t,e){return S_(t,e)||{}}function S_(t,e){const n=Object.entries(t||{}).filter(([r])=>r.startsWith(e)).map(([r,i])=>[w_(r.replace(e,"").trim()),i]).filter(([r])=>!!r);return n.length===0?null:Object.fromEntries(n)}function Wft(t,e){return Object.fromEntries(Object.entries(t).map(([n,r])=>[`${e}${upperFirst(n)}`,r]))}function $7(t,e){return Object.fromEntries(Object.entries(t).filter(([n])=>e.find(r=>n.startsWith(r))))}function nv(t,...e){return Object.fromEntries(Object.entries(t).filter(([n])=>e.every(r=>!n.startsWith(r))))}function M_(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 E_(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:E_(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=Zn(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:Vs(`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:Fr,rect:$o,circle:nl,path:ri,text:Zi,ellipse:R0,image:L0,line:rl,polygon:il,polyline:N0,html:_f};const wn={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 U7=function(t){var e=O_(t);return e.charAt(0).toUpperCase()+e.substring(1)},ao=U7;function q7(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function Hf(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 Z7(t){return t=Hf(Math.abs(t)),t?t[1]:NaN}function K7(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 Q7(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var J7=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function rv(t){if(!(e=J7.exec(t)))throw new Error("invalid format: "+t);var e;return new iv({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]})}rv.prototype=iv.prototype;function iv(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+""}iv.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 tF(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 A_;function eF(t,e){var n=Hf(t,e);if(!n)return t+"";var r=n[0],i=n[1],a=i-(A_=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")+Hf(t,Math.max(0,e+a-1))[0]}function T_(t,e){var n=Hf(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 P_={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:q7,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)=>T_(t*100,e),r:T_,s:eF,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function C_(t){return t}var k_=Array.prototype.map,R_=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function nF(t){var e=t.grouping===void 0||t.thousands===void 0?C_:K7(k_.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?C_:Q7(k_.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=rv(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"):P_[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=P_[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 F=C<0||1/C<0;if(C=isNaN(C)?c:E(Math.abs(C),b),_&&(C=tF(C)),F&&+C==0&&p!=="+"&&(F=!1),j=(F?p==="("?p:s:p==="-"||p==="("?"":p)+j,N=(O==="s"?R_[8+A_/3]:"")+N+(F&&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 B=j.length+C.length+N.length,z=B<y?new Array(y-B+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,B=z.length>>1)+j+C+N+z.slice(B);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=rv(f),f.type="f",f)),p=Math.max(-8,Math.min(8,Math.floor(Z7(d)/3)))*3,v=Math.pow(10,-p),g=R_[8+p/3];return function(y){return h(v*y)+g}}return{format:l,formatPrefix:u}}var Yf,oo,rF;iF({thousands:",",grouping:[3],currency:["$",""]});function iF(t){return Yf=nF(t),oo=Yf.format,rF=Yf.formatPrefix,Yf}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 Hft(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 aF(t){return t[0]}function L_(t){return t[t.length-1]}function Yft(t){return!t.some(Array.isArray)}function oF(t){return Array.from(new Set(t))}function N_(t,e){const n=[[],[]];return t.forEach(r=>{n[e(r)?0:1].push(r)}),n}function I_(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);I_(i,e-1).forEach(o=>{n.push([t[r],...o])})}return n}function sF(t){if(t.length===1)return[t];const e=[];for(let n=1;n<=t.length;n++)e.push(...I_(t,n));return e}var cF=function(t){return t!==null&&typeof t!="function"&&isFinite(t.length)},ll=cF,av=function(t,e){if(t===e)return!0;if(!t||!e||tr(t)||tr(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=av(t[r],e[r]),!!n);r++);return n}if(q0(t)||q0(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=av(t[i[r]],e[i[r]]),!!n);r++);return n}return!1},j_=av;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 Sn(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}const D_=(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}=D_(t);return[["translate",0,.5],["reflect.y"],["translate",0,-.5],["polar",e,n,r,i]]};ul.props={};const F_=(t={})=>{const e={startAngle:-Math.PI/2,endAngle:Math.PI*3/2,innerRadius:0,outerRadius:1};return Object.assign(Object.assign({},e),t)},ov=t=>{const{startAngle:e,endAngle:n,innerRadius:r,outerRadius:i}=F_(t);return[["transpose"],["translate",.5,.5],["reflect"],["translate",-.5,-.5],...ul({startAngle:e,endAngle:n,innerRadius:r,outerRadius:i})]};ov.props={};function Vf(t,e,n){return Math.max(e,Math.min(t,n))}function Xf(t,e=10){return typeof t!="number"||Math.abs(t)<1e-15?t:parseFloat(t.toFixed(e))}const lF=[["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 B_=yt(38628);function zn(t){const{transformations:e}=t.getOptions();return e.map(([r])=>r).filter(r=>r==="transpose").length%2!==0}function Nn(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 z_(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 G_(t){const{transformations:e}=t.getOptions();return e.some(([n])=>n==="fisheye")}function uF(t){return dl(t)&&Nn(t)}function Xs(t){return z_(t)||Nn(t)}function W_(t){return Nn(t)&&zn(t)}function Vft(t){return Nn(t)||dl(t)||fl(t)||W_(t)}function fF(t){if(Xs(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 $f(t){const{transformations:e}=t.getOptions(),[,,,n,r]=e.find(i=>i[0]==="polar");return[+n,+r]}function sv(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 dF(t,e){const{transformations:n}=t.getOptions(),[,...r]=n.find(i=>i[0]===e);return r}function H_(t,e){e(t),t.children&&t.children.forEach(function(n){n&&H_(n,e)})}function hl(t){Uf(t,!0)}function co(t){Uf(t,!1)}function Uf(t,e){var n=e?"visible":"hidden";H_(t,function(r){r.attr("visibility",n)})}function hF(t){return typeof t=="boolean"?!1:"enter"in t&&"update"in t&&"exit"in t}function Y_(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 hF(t)?t[r]===!1?[r,!1]:[r,(0,S.pi)((0,S.pi)({},t[r]),n)]:[r,n]}))}function $s(t,e){t?t.finished.then(e):e()}function pF(t,e){t.length===0?e():Promise.all(t.map(function(n){return n==null?void 0:n.finished})).then(e)}function V_(t,e){"update"in t?t.update(e):t.attr(e)}function X_(t,e,n){if(e.length===0)return null;if(!n){var r=e.slice(-1)[0];return V_(t,{style:r}),null}return t.animate(e,n)}function vF(t,e){return!(t.nodeName!=="text"||e.nodeName!=="text"||t.attributes.text!==e.attributes.text)}function gF(t,e,n,r){if(r===void 0&&(r="destroy"),vF(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 $s(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,ye.Z)(c)){var l=t.style[s]||t.parsedStyle[s]||0;l!==c&&(r[s]=l,i[s]=c)}}),n?X_(t,[r,i],(0,S.pi)({fill:"both"},n)):(V_(t,i),null)}var yF=5,$_=function(t,e,n,r){n===void 0&&(n=0),r===void 0&&(r=yF),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?$_(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)$_(t,e[r]);return t},mF=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(Ne.INSERTED,function(){co(i)}),i}return e}(Fr);function U_(t){var e=t.appendChild(new mF({class:"offscreen"}));return co(e),e}function bF(t){for(var e=t;e;){if(e.className==="offscreen")return!0;e=e.parent}return!1}function xF(){Uf(this,this.attributes.visibility!=="hidden")}var Lr=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=U_(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"&&xF.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}(k0);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 _F(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 cv=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=U_(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 OF(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 wF(t){throw new Error(t)}var SF=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=OF(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:wF("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:Fr,rect:$o,circle:nl,path:ri,text:cv,ellipse:R0,image:L0,line:rl,polygon:il,polyline:N0,html:_f},t}();function Ue(t){return new SF([t],null,t,t.ownerDocument)}function MF(t,e,n){return t.querySelector(e)?Ue(t).select(e):Ue(t).append(n)}var Fi=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},lv={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:[]},Xft=Nt({},lv,{style:{type:"arc"}}),$ft=Nt({},lv,{style:{}}),An=Fi({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 uv(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 q_(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 Uft(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 EF(t,e){return e?[t[1],-t[0]]:[-t[1],t[0]]}function Us(t){return t*Math.PI/180}function Z_(t){return Number((t*180/Math.PI).toPrecision(5))}function fv(t){return t.toString().charAt(0).toUpperCase()+t.toString().slice(1)}function AF(t){return t.toString().charAt(0).toLowerCase()+t.toString().slice(1)}function TF(t,e){return"".concat(e).concat(fv(t))}function K_(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?AF(a):a}function PF(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 qf=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(qf(o,"show")&&qf(K_(o,"show"),e)!==n)o===TF(e,"show")?r[o]=s:r[o.replace(new RegExp(fv(e)),"")]=s;else if(!qf(o,"show")&&qf(o,e)!==n){var c=K_(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(fv(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 Bi(t,e){return gi(t)?t.apply(void 0,(0,S.ev)([],(0,S.CR)(e),!1)):t}function Zf(t,e){return t.style.opacity||(t.style.opacity=1),Ki(t,{opacity:0},e)}var CF=["$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 kF(t){return CF.includes(t)}function Q_(t){var e={};for(var n in t)kF(n)&&(e[n]=t[n]);return e}var qs=Fi({lineGroup:"line-group",line:"line",regionGroup:"region-group",region:"region"},"grid");function J_(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 RF(t,e,n){var r=e.connect,i=r===void 0?"line":r,a=e.center;if(i==="line")return J_(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 dv(t,e,n){return e.type==="surround"?RF(t,e,n):J_(t)}function LF(t,e,n){var r=n.type,i=n.connect,a=n.center,o=n.closed,s=o?[["Z"]]:[],c=(0,S.CR)([dv(t,n),dv(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 NF(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:dv(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=Bi(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=Bi(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=Zf(this,i.exit);return $s(l,function(){return c.remove()}),l})}).transitions()}function IF(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=LF(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=Bi(v,[v,g,c]);this.attr(y)}).attr("className",qs.region.name)},function(p){return p.transition(function(v,g){var y=Bi(v,[v,g,c]);return Ki(this,y,r.update)})},function(p){return p.transition(function(){var v=this,g=Zf(this,r.exit);return $s(g,function(){return v.remove()}),g})}).transitions()}function jF(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 DF=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=jF(n),u=Ue(r).maybeAppendByClassName(qs.lineGroup,"g"),f=Ue(r).maybeAppendByClassName(qs.regionGroup,"g"),d=NF(u,l,n,c),h=IF(f,l,n);return(0,S.ev)((0,S.ev)([],(0,S.CR)(d),!1),(0,S.CR)(h),!1)},e}(Lr),zi=function(t,e,n){for(var r=0,i=tr(e)?e.split("."):e;t&&r<i.length;)t=t[i[r++]];return t===void 0||r<i.length?n:t},FF=function(t,e){return function(n){return t*(1-n)+e*n}};function BF(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]=hv(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 zF(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]=hv(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 hv(t,e){return typeof t=="number"&&typeof e=="number"?FF(t,e):Array.isArray(t)&&Array.isArray(e)?BF(t,e):typeof t=="object"&&typeof e=="object"?zF(t,e):function(n){return t}}function GF(t,e,n,r){if(!r)return t.attr("__keyframe_data__",n),null;var i=r.duration,a=i===void 0?0:i,o=hv(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():tr(t)||(0,xr.Z)(t)?new cv({style:{text:String(t)}}):t}function pv(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 t2(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 e2(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,Bi(a,e)]}))}function qft(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 vv(t,e){return e&&gi(e)?t.filter(e):t}function n2(t,e){var n=e.startAngle,r=e.endAngle;return(r-n)*t+n}function Kf(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 q_([l,u])}var f=Us(n2(t,e));return[-Math.sin(f),Math.cos(f)]}function gv(t,e,n){var r=Kf(t,n);return EF(r,e!=="positive")}function gl(t,e){return gv(t,e.labelDirection,e)}function WF(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 HF(t,e){var n=e.radius,r=(0,S.CR)(e.center,2),i=r[0],a=r[1],o=Us(n2(t,e));return[i+n*Math.cos(o),a+n*Math.sin(o)]}function Qf(t,e){return e.type==="linear"?WF(t,e):HF(t,e)}function r2(t){return Kf(0,t)[1]===0}function i2(t){return Kf(0,t)[0]===0}function a2(t,e){return e-t===360}function o2(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(a2(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 YF(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 VF(t,e,n,r){var i=e.startAngle,a=e.endAngle,o=e.center,s=e.radius;return t.selectAll(An.line.class).data([{path:o2.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",An.line.name).styles(e).styles({path:function(l){return l.path}})},function(c){return c.transition(function(){var l=this,u=GF(this,YF(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=o2.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 XF(t,e){var n=e.truncRange,r=e.truncShape,i=e.lineExtension}function $F(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 s2(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 UF(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?$F(a,o,c):new Array(4).fill(0),4),y=g[0],m=g[1],b=g[2],_=g[3],O=function(B){return t.selectAll(An.line.class).data(B,function(z,Y){return Y}).join(function(z){return z.append("line").attr("className",function(Y){return"".concat(An.line.name," ").concat(Y.className)}).styles(n).transition(function(Y){return Ki(this,s2(Y.line),!1)})},function(z){return z.styles(n).transition(function(Y){var $=Y.line;return Ki(this,s2($),r.update)})},function(z){return z.remove()}).transitions()};if(!i||!s)return O([{line:[[f+y,d+m],[p+b,v+_]],className:An.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],F=O([{line:[[f+y,d+m],[j,N]],className:An.lineFirst.name},{line:[[R,D],[p+b,v+_]],className:An.lineSecond.name}]);return XF(t,e),F}function qF(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(An.line.class):a?l=t.select(An.lineSecond.class):l=t.select(An.line.class),!i||!o||n.type==="arc"&&a2(n.startAngle,n.endAngle)){var u=l.node();u&&(u.style.markerEnd=void 0);return}var f=Jo(o);f.attr(r),pv(f,c,!0),l.style("markerEnd",f).style("markerEndOffset",-s)}function ZF(t,e,n){var r=e.type,i,a=en(e,"line");return r==="linear"?i=UF(t,e,t2(a,"arrow"),n):i=VF(t,e,t2(a,"arrow"),n),qF(t,r,e,a),i}function KF(t,e){return gv(t,e.gridDirection,e)}function c2(t){var e=t.type,n=t.gridCenter;return e==="linear"?n:n||t.center}function QF(t,e){var n=e.gridLength;return t.map(function(r,i){var a=r.value,o=(0,S.CR)(Qf(a,e),2),s=o[0],c=o[1],l=(0,S.CR)(La(KF(a,e),n),2),u=l[0],f=l[1];return{id:i,points:[[s,c],[s+u,c+f]]}})}function JF(t,e){var n=e.gridControlAngles,r=c2(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)(Qf(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 tB(t,e,n,r){var i=en(n,"grid"),a=i.type,o=i.areaFill,s=c2(n),c=vv(e,n.gridFilter),l=a==="segment"?QF(c,n):JF(c,n),u=(0,S.pi)((0,S.pi)({},i),{center:s,areaFill:gi(o)?c.map(function(f,d){return Bi(o,[f,d,c])}):o,animate:r,data:l});return t.selectAll(An.grid.class).data([1]).join(function(f){return f.append(function(){return new DF({style:u})}).attr("className",An.grid.name)},function(f){return f.transition(function(){return this.update(u)})},function(f){return f.remove()}).transitions()}function Br(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 yv(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 eB=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=yv(n),r},Jf,mv;function Zft(t){mv=t}var nB=eB(function(t,e){var n=e.fontSize,r=e.fontFamily,i=e.fontWeight,a=e.fontStyle,o=e.fontVariant;return mv?mv(t,n):(Jf||(Jf=Et.offscreenCanvasCreator.getOrCreateContext(void 0)),Jf.font=[a,o,i,"".concat(n,"px"),r].join(" "),Jf.measureText(t).width)},function(t,e){return[t,Object.values(e||l2(t)).join()].join("")},4096),l2=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 u2(t){return t.nodeName==="text"?t:t.nodeName==="g"&&t.children.length===1&&t.children[0].nodeName==="text"?t.children[0]:null}function f2(t,e){var n=u2(t);n&&n.attr(e)}function bv(t,e,n){n===void 0&&(n="..."),f2(t,{wordWrap:!0,wordWrapWidth:e,maxLines:1,textOverflow:n})}function rB(t,e,n,r){n===void 0&&(n=2),r===void 0&&(r="top"),f2(t,{wordWrap:!0,wordWrapWidth:e,maxLines:n,textBaseline:r})}function iB(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 td(t,e){if(e)try{var n=/translate\(([+-]*[\d]+[%]*),[ ]*([+-]*[\d]+[%]*)\)/g,r=e.replace(n,function(i,a,o){return"translate(".concat(iB(t,a,o),")")});t.attr("transform",r)}catch(i){}}var d2=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 xv=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 ed(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=_v(t),f=u.width,d=u.height,h=d,p=0,v=0,g=a,y=o,m=u2(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 xv((p+=a)-N,(v+=o)-M,p+f+A,v+h+C);return t.setEulerAngles(n),k.rotatedPoints(Us(n),g,y)}function _v(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 aB(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 oB(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(aB(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 sB(t,e){return e.every(function(n){return oB(t,n)})}function cB(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=ed(e,n);return sB(s,c)}function h2(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 p2(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 h2(e,r)})}var Kft={lineToLine:h2,intersectBoxLine:p2,getBounds:ed};function lB(t,e,n){var r,i,a=ed(t,n).flat(1),o=ed(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(p2(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 uB(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 xv(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)(i2(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 xv(b,_,w,M);return R.x1+=j,R.y1+=A,R.x2+=P+k[0],R.y2+=C+k[1],R}function nd(t,e,n){var r,i,a=e.crossPadding,o=new Set,s=null,c=uB(e,a),l=function(p){return c?cB(c,p):!0},u=function(p,v){return p?!lB(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 Ov(t,e){return e===void 0&&(e={}),(0,ye.Z)(t)?0:typeof t=="number"?t:Math.floor(nB(t,e))}function fB(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=l2(r.getTextShape(t[0])),p=Ov(u,h),v=o?Ov(o,h):p,g=Ov(c,h);((0,ye.Z)(g)||g===1/0)&&(g=Math.max.apply(null,t.map(function(k){return _v(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=nd(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 Qft(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 v2(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 Jft(t,e){var n=select(t).append("text").node();return n.attr(__assign(__assign({},e),{visibility:"hidden"})),n}function dB(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 tdt(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 hB(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 pB={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})}},vB=function(t){return t.filter(d2)};function gB(t,e,n,r){var i=t.length,a=e.keepHeader,o=e.keepTail;if(!(i<=1||i===2&&a&&o)){var s=pB.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 _v(b).width})),!1));if(n.type==="linear"&&(r2(n)||i2(n))){var h=v2(t[0]).left,p=v2(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&&nd(vB(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 yB(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 nd(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 mB(t){var e=t.type,n=t.labelDirection;return e==="linear"&&r2(t)?n==="negative"?"bottom":"top":"middle"}function bB(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 nd(t,n,f).length<1},v=mB(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 xB=new Map([["hide",gB],["rotate",yB],["ellipsis",fB],["wrap",bB]]);function _B(t,e,n){return e.labelOverlap.length<1?!1:n==="hide"?!bF(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 OB(t,e,n){var r=e.labelOverlap,i=r===void 0?[]:r;i.length&&i.forEach(function(a){var o=a.type,s=xB.get(o);_B(t,e,o)&&(s==null||s(t,a,e,n))})}function wB(){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 g2(t){for(var e=t;e<0;)e+=360;return Math.round(e%360)}function wv(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 SB(t){var e=(t+360)%180;return Br(e,-90,90)||(e+=180),e}function MB(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=Kf(t.value,n);return i==="horizontal"?0:(i==="perpendicular"?o=wv([1,0],s):o=wv([c[0]<0?-1:1,0],c),SB(Z_(o)))}function y2(t,e,n){var r=n.type,i=n.labelAlign,a=gl(t,n),o=g2(e),s=g2(Z_(wv([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?(Br(o,0,90,!1,!0)||Br(o,0,90)||Br(o,270,360))&&(c="start"):s===90?Br(o,0,90,!1,!0)?c="start":(Br(o,90,180)||Br(o,270,360))&&(c="end"):s===270?Br(o,0,90,!1,!0)?c="end":(Br(o,90,180)||Br(o,270,360))&&(c="start"):s===180&&(o===90?c="start":(Br(o,0,90)||Br(o,270,360))&&(c="end")):i==="parallel"?Br(s,0,180,!0)?l="top":l="bottom":i==="horizontal"?Br(s,90,270,!1)?c="end":(Br(s,270,360,!1)||Br(s,0,90))&&(c="start"):i==="perpendicular"&&(Br(s,90,270)?c="end":c="start"),{textAlign:c,textBaseline:l}}function EB(t,e,n){e.setLocalEulerAngles(t);var r=e.__data__.value,i=y2(r,t,n),a=e.querySelector(An.labelItem.class);a&&b2(a,i)}function m2(t,e,n){var r=n.showTick,i=n.tickLength,a=n.tickDirection,o=n.labelDirection,s=n.labelSpacing,c=e.indexOf(t),l=Bi(s,[t,c,e]),u=(0,S.CR)([gl(t.value,n),wB(o,a)],2),f=u[0],d=u[1],h=d===1?Bi(r?i:0,[t,c,e]):0,p=(0,S.CR)(pl(La(f,l+h),Qf(t.value,n)),2),v=p[0],g=p[1];return{x:v,y:g}}function AB(t,e,n,r){var i=r.labelFormatter,a=gi(i)?function(){return Jo(Bi(i,[t,e,n,gl(t.value,r)]))}:function(){return Jo(t.label||"")};return a}function b2(t,e){t.nodeName==="text"&&t.attr(e)}function x2(t){OB(this.node().childNodes,t,{hide:co,show:hl,rotate:function(e,n){EB(+n,e,t)},ellipsis:function(e,n,r){e&&bv(e,n||1/0,r)},wrap:function(e,n,r){e&&rB(e,n,r)},getTextShape:function(e){return e.querySelector("text")}})}function _2(t,e,n,r,i){var a=n.indexOf(e),o=Ue(t).append(AB(e,a,n,i)).attr("className",An.labelItem.name).node(),s=(0,S.CR)(Na(e2(r,[e,a,n])),2),c=s[0],l=s[1],u=l.transform,f=(0,S._T)(l,["transform"]);td(t,u);var d=MB(e,t,i);return t.setLocalEulerAngles(+d),b2(o,(0,S.pi)((0,S.pi)({},y2(e.value,d,i)),c)),td(t,u),t.attr(f),o}function TB(t,e,n,r){var i=vv(e,n.labelFilter),a=en(n,"label");return t.selectAll(An.label.class).data(i,function(o,s){return s}).join(function(o){return o.append("g").attr("className",An.label.name).transition(function(s){return _2(this,s,e,a,n),this.attr(m2(s,e,n)),this.__bbox__=s.bbox,null}).call(function(){return x2.call(t,n)})},function(o){return o.transition(function(s){var c=this.querySelector(An.labelItem.class),l=_2(this,s,e,a,n),u=gF(c,l,r.update),f=Ki(this,m2(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(d2);pF(c,function(){return x2.call(t,n)})})},function(o){return o.transition(function(){var s=this,c=Zf(this.childNodes[0],r.exit);return $s(c,function(){return Ue(s).remove()}),c})}).transitions()}function O2(t,e){return gv(t,e.tickDirection,e)}function PB(t,e){var n=(0,S.CR)(t,2),r=n[0],i=n[1];return[[0,0],[r*e,i*e]]}function CB(t,e,n,r,i){var a=i.tickLength,o=(0,S.CR)(PB(r,Bi(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 kB(t,e,n,r,i){var a=i.tickFormatter,o=O2(e.value,i),s="line";return gi(a)&&(s=function(){return Bi(a,[e,n,r,o])}),t.append(s).attr("className",An.tickItem.name)}function RB(t,e,n,r,i,a,o){var s=O2(t.value,a),c=CB(t,e,n,s,a),l=c.x1,u=c.x2,f=c.y1,d=c.y2,h=(0,S.CR)(Na(e2(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 w2(t,e,n,r,i,a){var o=kB(Ue(this),t,e,n,r);RB(t,e,n,o,this,r,i);var s=(0,S.CR)(Qf(t.value,r),2),c=s[0],l=s[1];return Ki(this,{x:c,y:l},a)}function LB(t,e,n,r){var i=vv(e,n.tickFilter),a=en(n,"tick");return t.selectAll(An.tick.class).data(i,function(o){return o.id||o.label}).join(function(o){return o.append("g").attr("className",An.tick.name).transition(function(s,c){return w2.call(this,s,c,i,n,a,!1)})},function(o){return o.transition(function(s,c){return this.removeChildren(),w2.call(this,s,c,i,n,a,r.update)})},function(o){return o.transition(function(){var s=this,c=Zf(this.childNodes[0],r.exit);return $s(c,function(){return s.remove()}),c})}).transitions()}var Gn=function(){function t(e,n,r,i){e===void 0&&(e=0),n===void 0&&(n=0),r===void 0&&(r=0),i===void 0&&(i=0),this.x=0,this.y=0,this.width=0,this.height=0,this.x=e,this.y=n,this.width=r,this.height=i}return Object.defineProperty(t.prototype,"bottom",{get:function(){return this.y+this.height},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"left",{get:function(){return this.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"right",{get:function(){return this.x+this.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"top",{get:function(){return this.y},enumerable:!1,configurable:!0}),t.fromRect=function(e){return new t(e.x,e.y,e.width,e.height)},t.prototype.toJSON=function(){return{x:this.x,y:this.y,width:this.width,height:this.height,top:this.top,right:this.right,bottom:this.bottom,left:this.left}},t.prototype.isPointIn=function(e,n){return e>=this.left&&e<=this.right&&n>=this.top&&n<=this.bottom},t}();function edt(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 Gn(r,i,c,l)}var S2=Fi({text:"text"},"title");function rd(t){return/\S+-\S+/g.test(t)?t.split("-").map(function(e){return e[0]}):t.length>2?[t[0]]:t.split("")}function NB(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=rd(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 Gn(s.x,s.y,c.width+s.width+O+E,Math.max(c.height+A,s.height));if(l[0]==="t")return new Gn(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 Gn(c.x,c.y,C+s.width+O+E,j+s.height+w+A)}function IB(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 jB(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=rd(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 M2=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(S2.text.class);if(!l)return new Gn(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=rd(o);if(M.includes("i"))return new Gn(b,_,O,w);M.forEach(function(D,F){var B,z,Y,$;D==="t"&&(B=(0,S.CR)(F===0?[d+g,+a-d-g]:[0,+a],2),_=B[0],w=B[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"&&($=(0,S.CR)(F===0?[f+v,+i-f-v]:[0,+i],2),b=$[0],O=$[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 Gn(b+j,_+A,O-k,w-R)},e.prototype.getBBox=function(){return this.title?this.title.getBBox():new Gn(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=jB(n),h=d.x,p=d.y,v=d.textAlign,g=d.textBaseline;vi(!!l.text,Ue(r),function(y){i.title=y.maybeAppendByClassName(S2.text,"text").styles(f).call(IB,{x:h,y:p,textAlign:v,textBaseline:g}).node()})},e}(Lr);function DB(t,e,n){var r=n.titlePosition,i=r===void 0?"lb":r,a=n.titleSpacing,o=rd(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=q_([-N[0]+j[0],-N[1]+j[1]]),R=(0,S.CR)(La(k,O),2),D=R[0],F=R[1];return{x:j[0]+D,y:j[1]+F}}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 FB(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 E2(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||FB(t.node(),s.direction,s.position);td(t.node(),f);var d=DB(Ue(n._offscreen||n.querySelector(An.mainGroup.class)),e,r),h=d.x,p=d.y,v=Ki(e.node(),{x:h,y:p},i);return td(t.node(),f),v}function BB(t,e,n,r){var i=n.titleText;return t.selectAll(An.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",An.title.name).transition(function(){return E2(Ue(this),t,e,n,r.enter)})},function(a){return a.transition(function(){return E2(Ue(this),t,e,n,r.update)})},function(a){return a.remove()}).transitions()}function A2(t,e,n,r){var i=t.showLine,a=t.showTick,o=t.showLabel,s=e.maybeAppendByClassName(An.lineGroup,"g"),c=vi(i,s,function(h){return ZF(h,t,r)})||[],l=e.maybeAppendByClassName(An.tickGroup,"g"),u=vi(a,l,function(h){return LB(h,n,t,r)})||[],f=e.maybeAppendByClassName(An.labelGroup,"g"),d=vi(o,f,function(h){return TB(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 Sv=function(t){(0,S.ZT)(e,t);function e(n){return t.call(this,n,lv)||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=_F(s,f).filter(function(O){var w=O.value;return!(d&&w>d[0]&&w<d[1])}),p=Y_(i===void 0?c:i),v=Ue(r).maybeAppendByClassName(An.gridGroup,"g"),g=vi(u,v,function(O){return tB(O,h,n,p)})||[],y=Ue(r).maybeAppendByClassName(An.mainGroup,"g");o&&(!this.initialized&&p.enter||this.initialized&&p.update)&&A2(n,Ue(this.offscreenGroup),h,Y_(!1));var m=A2(n,Ue(y.node()),h,p),b=Ue(r).maybeAppendByClassName(An.titleGroup,"g"),_=vi(l,b,function(O){return BB(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}(Lr),zB={}.toString,GB=function(t,e){return zB.call(t)==="[object "+e+"]"},bl=GB,Mv=function(t){return bl(t,"Function")},T2=function(t){return Array.isArray?Array.isArray(t):bl(t,"Array")},WB=function(t){var e=typeof t;return t!==null&&e==="object"||e==="function"};function HB(t,e){if(t){var n;if(T2(t))for(var r=0,i=t.length;r<i&&(n=e(t[r],r),n!==!1);r++);else if(WB(t)){for(var a in t)if(t.hasOwnProperty(a)&&(n=e(t[a],a),n===!1))break}}}var P2=HB,ndt=Object.keys?function(t){return Object.keys(t)}:function(t){var e=[];return P2(t,function(n,r){Mv(t)&&r==="prototype"||e.push(r)}),e},rdt=null;function idt(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 adt=null,YB=function(t){return typeof t=="object"&&t!==null},VB=YB,XB=function(t){if(!VB(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},C2=XB;function odt(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 sdt=null,cdt=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},ldt=null,udt=function(t){if(!isArray(t))return[];for(var e=[],n=0;n<t.length;n++)e=e.concat(t[n]);return e},fdt=null,$B=function(t,e){if(e===void 0&&(e=[]),!isArray(t))e.push(t);else for(var n=0;n<t.length;n+=1)$B(t[n],e);return e},ddt=null,hdt=function(t){if(isArray(t))return t.reduce(function(e,n){return Math.max(e,n)},t[0])},pdt=function(t){if(isArray(t))return t.reduce(function(e,n){return Math.min(e,n)},t[0])},vdt=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}},gdt=null,k2=Array.prototype,UB=k2.splice,qB=k2.indexOf,ydt=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=qB.call(t,i))>-1;)UB.call(t,a,1);return t},mdt=null,ZB=Array.prototype.splice,bdt=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,ZB.call(e,o,1))}return e},xdt=null,_dt=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},Odt=null,wdt=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},Sdt=null,KB=function(t){return bl(t,"String")};function Mdt(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 Edt=null,Adt=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 Tdt(t,e){return isArray(t)||isString(t)?t[0]===e:!1}var Pdt=null;function Cdt(t,e){return isArray(t)||isString(t)?t[t.length-1]===e:!1}var kdt=null,QB=Object.prototype.hasOwnProperty;function Rdt(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),QB.call(n,i)?n[i].push(o):n[i]=[o]}return n}var Ldt=null;function Ndt(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 Idt=function(t,e){if(!e)return[t];var n=groupToMap(t,e),r=[];for(var i in n)r.push(n[i]);return r},R2={};function jdt(t){var e=R2[t];if(!e){for(var n=t.toString(16),r=n.length;r<6;r++)n="0"+n;e="#"+n,R2[t]=e}return e}var Ddt=null;function Fdt(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 Bdt=null,JB=function(t){return bl(t,"Number")},Zs=JB,zdt=function(t){return isNumber(t)&&t%1!==0},Gdt=null,Wdt=function(t){return isNumber(t)&&t%2===0},Hdt=null,Ydt=Number.isInteger?Number.isInteger:function(t){return Zs(t)&&t%1===0},Vdt=null,Xdt=function(t){return isNumber(t)&&t<0},$dt=null,Udt=function(t){return isNumber(t)&&t%2!==0},qdt=null,Zdt=function(t){return isNumber(t)&&t>0},Kdt=null,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}},Jdt=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}},tz=180/Math.PI,tht=function(t){return tz*t},eht=null,ez=Math.PI/180,nht=function(t){return ez*t},rht=null,iht=null,nz=Object.values?function(t){return Object.values(t)}:function(t){var e=[];return P2(t,function(n,r){Mv(t)&&r==="prototype"||e.push(n)}),e},rz=nz,aht=function(t,e){return contains(values(t),e)},iz={}.toString,oht=function(t){return iz.call(t).replace(/^\[object /,"").replace(/]$/,"")},sht=null,cht=function(t){return isType(t,"Arguments")},lht=null,uht=function(t){return isType(t,"Boolean")},fht=null,dht=function(t){return isType(t,"Date")},hht=null,pht=function(t){return isType(t,"Error")},vht=null;function ght(t){return isNumber(t)&&isFinite(t)}var az=function(t){return t===null},oz=az,sz=Object.prototype,yht=function(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||sz;return t===n},mht=null,bht=function(t){return isType(t,"RegExp")},xht=null,cz=function(t){return t===void 0},lz=cz,_ht=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)}},Oht=null,L2=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]=L2(t[n]):e[n]=t[n]}else{e={};for(var i in t)typeof t[i]=="object"&&t[i]!=null?e[i]=L2(t[i]):e[i]=t[i]}return e},wht=null,uz=function(t,e){if(!Mv(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},fz=5;function N2(t,e,n,r){n=n||0,r=r||fz;for(var i in e)if(e.hasOwnProperty(i)){var a=e[i];a!==null&&C2(a)?(C2(t[i])||(t[i]={}),n<r?N2(t[i],a,n+1,r):t[i]=e[i]):T2(a)?(t[i]=[],t[i]=t[i].concat(a)):a!==void 0&&(t[i]=a)}}var dz=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)N2(t,e[r]);return t},I2=dz,Sht=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},Mht=null,hz=function(t){return t!==null&&typeof t!="function"&&isFinite(t.length)},j2=hz,pz=function(t,e){if(!j2(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},D2=pz,vz=Object.prototype.hasOwnProperty;function Eht(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(vz.call(t,n))return!1;return!0}var Aht=null,F2=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=F2(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=F2(t[i[r]],e[i[r]]),!!n);r++);return n}return!1},Tht=null,Pht=function(t,e,n){return isFunction(n)?!!n(t,e):isEqual(t,e)},Cht=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},kht=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},gz=Object.prototype.hasOwnProperty,Rht=function(t,e){if(t===null||!isPlainObject(t))return{};var n={};return each(e,function(r){gz.call(t,r)&&(n[r]=t[r])}),n},Lht=function(t,e){return reduce(t,function(n,r,i){return e.includes(i)||(n[i]=r),n},{})},id={},Nht=function(t){return t=t||"g",id[t]?id[t]+=1:id[t]=1,t+id[t]},ts=function(t){return t},yz=function(t){return t==null},mz=yz;function B2(t){return mz(t)?0:j2(t)?t.length:Object.keys(t).length}var ad,Iht=uz(function(t,e){e===void 0&&(e={});var n=e.fontSize,r=e.fontFamily,i=e.fontWeight,a=e.fontStyle,o=e.fontVariant;return ad||(ad=document.createElement("canvas").getContext("2d")),ad.font=[a,o,i,n+"px",r].join(" "),ad.measureText(KB(t)?t:"").width},function(t,e){return e===void 0&&(e={}),(0,S.pr)([t],rz(e)).join("")}),jht=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},Dht=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}(),Fht=null;class xl{constructor(e){this.options=I2({},this.getDefaultOptions()),this.update(e)}getOptions(){return this.options}update(e={}){this.options=I2({},this.options,e),this.rescale(e)}rescale(e){}}function od(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 Ev(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 bz=yt(39872),xz=yt.n(bz);function Av(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 _z(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=Av(o,a,e+1/3),c=Av(o,a,e),l=Av(o,a,e-1/3);return[s*255,c*255,l*255,i]}function z2(t){const e=xz().get(t);if(!e)return null;const{model:n,value:r}=e;return n==="rgb"?r:n==="hsl"?_z(r):null}const Qs=(t,e)=>n=>t*(1-n)+e*n,Oz=(t,e)=>{const n=z2(t),r=z2(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"?Oz(t,e):()=>t,wz=(t,e)=>{const n=Qs(t,e);return r=>Math.round(n(r))};function sd(t){return!lz(t)&&!oz(t)&&!Number.isNaN(t)}const Tv=Math.sqrt(50),Pv=Math.sqrt(10),Cv=Math.sqrt(2);function cd(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>=Tv?10:a>=Pv?5:a>=Cv?2:1)*wr(10,i):-wr(10,-i)/(a>=Tv?10:a>=Pv?5:a>=Cv?2:1)}function G2(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>=Tv?i*=10:a>=Pv?i*=5:a>=Cv&&(i*=2),e<t?-i:i}const W2=(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=cd(o,s,n),c>0?(o=Math.floor(o/c)*c,s=Math.ceil(s/c)*c,c=cd(o,s,n)):c<0&&(o=Math.ceil(o*c)/c,s=Math.floor(s*c)/c,c=cd(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 Sz(t,e){const n=e<t?e:t,r=t>e?t:e;return i=>Math.min(Math.max(n,i),r)}const Mz=(t,e,n)=>{const[r,i]=t,[a,o]=e;let s,c;return r<i?(s=od(r,i),c=n(a,o)):(s=od(i,r),c=n(o,a)),Ks(c,s)},Ez=(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]=od(s[l],s[l+1]),a[l]=n(c[l],c[l+1]);return l=>{const u=Ev(t,l,1,r)-1,f=i[u],d=a[u];return Ks(d,f)(l)}},H2=(t,e,n,r)=>(Math.min(t.length,e.length)>2?Ez:Mz)(t,e,r?wz:n);class ld extends xl{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:Qs,tickCount:5}}map(e){return sd(e)?this.output(e):this.options.unknown}invert(e){return sd(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 W2}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?Sz(i[0],i[a-1]):ts}composeOutput(e,n){const{domain:r,range:i,round:a,interpolate:o}=this.options,s=H2(r.map(e),i,o,a);this.output=Ks(s,n,e)}composeInput(e,n,r){const{domain:i,range:a}=this.options,o=H2(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=cd(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 Xr extends ld{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 Xr(this.options)}}function Az(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 kv=Az,Tz=function(t,e,n){if(!Dr(t)&&!io(t))return t;var r=n;return kv(t,function(i,a){r=e(r,i,a)}),r},Y2=Tz,V2=function(t,e){return Y2(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 X2(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 Gn(e,n,r-e,i-n)}var Pz=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,F=(0,S.CR)([b,_],2),B=F[0],z=F[1];return k=(0,S.CR)([b+R*y[0],_+D*y[1]],2),b=k[0],_=k[1],new Gn(B,z,R,D)}),w=X2(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=Gn.fromRect(N);return D.x=v?k+M[u]:k,D.y=v?R:R+M[u],D}),A=X2(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=Gn.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=Gn.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},Cz=function(t,e,n){return[]},kz=function(t,e,n){if(e.length===0)return[];var r={flex:Pz,grid:Cz},i=n.display in r?r[n.display]:null;return(i==null?void 0:i.call(null,t,e,n))||[]},Rz=function(t){(0,S.ZT)(e,t);function e(n){var r=t.call(this,n)||this;r.layoutEvents=[Ne.BOUNDS_CHANGED,Ne.INSERTED,Ne.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 Gn(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 Gn(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=kz(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}(Fr),Lz=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 Nz(t){return class extends k0{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(Nt({},this.attributes,e)),(r=(n=this.descriptor).render)===null||r===void 0||r.call(n,this.attributes,this)}}}function $2(t,e,n){return t.querySelector(e)?je(t).select(e):je(t).append(n)}function ud(t){return Array.isArray(t)?t.join(", "):`${t||""}`}function U2(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 q2 extends Rz{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 Iz extends q2{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 jz(t){return t==="horizontal"||t===0}function Dz(t){return t==="vertical"||t===-Math.PI/2}function Z2(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 Fz(t){return t.find(e=>e.getOptions().domain.length>0).getOptions().domain}function fd(t){const e=["arrow","crosshairs","grid","handle","handleLabel","indicator","label","line","tick","tip","title","trunc"],{style:n}=t,r=Lz(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 K2=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 J2(t){const{innerWidth:e,innerHeight:n,depth:r}=t.getOptions();return[e,n,r]}function Bz(t,e){const{width:n,height:r}=e.getOptions();return i=>{if(!G_(e))return i;const a=t==="bottom"?[i,1]:[0,i],o=e.map(a);if(t==="bottom"){const s=o[0];return new Xr({domain:[0,n],range:[0,1]}).map(s)}else if(t==="left"){const s=o[1];return new Xr({domain:[0,r],range:[0,1]}).map(s)}return i}}function zz(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 Gz(t,e){if(Nn(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 Xr({domain:[0,1],range:[l/f,1-u/f]});return h=>d.map(h)}function tO(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=zz(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=Gz(o,s),p=Bz(o,s),v=y=>["top","bottom","center","outer"].includes(y),g=y=>["left","right"].includes(y);return Nn(s)||zn(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"||zn(s)&&((O=t.getTicks)===null||O===void 0?void 0:O.call(t))&&v(o)||zn(s)&&g(o)?1-M:M,label:f(d(Xf(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(Xf(y),m,b)),id:String(m)}})}function Wz(t,e,n="xy"){const[r,i,a]=J2(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 Hz(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 Yz(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]=sv(i),[h,p]=J2(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 Vz(t,e,n){return W_(e)||dl(e)?!1:t===void 0?!!n.getTicks:t}function Xz(t){const{depth:e}=t.getOptions();return e?{tickIsBillboard:!0,lineIsBillboard:!0,labelIsBillboard:!0,titleIsBillboard:!0,gridIsBillboard:!0}:{}}function $z(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]=$f(r),[d,h]=sv(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 Uz=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=K2(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=tO(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]=$f(y),A=Yz(r,b,M,E,y),{axis:P,axisArc:C={}}=m,j=fd(Nt({},P,C,A,Object.assign(Object.assign({type:"arc",data:w,titleText:ud(d),grid:h},p),l)));return new Sv({style:V2(j,["transform"])})}};function qz(t,e,n,r,i,a){const o=n.axis,s=["top","right","bottom","left"].includes(i)?n[`axis${tv(i)}`]:n.axisLinear,c=t.getOptions().name,l=n[`axis${ao(c)}`]||{};return Object.assign({},o,s,l)}function Zz(t,e,n,r,i,a){const o=qz(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:Dz(a)?10:0,tick:r==="center"?!1:void 0}):o}const Kz=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=K2(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=Zz(y,b,_,e,s,a),E=Object.assign(Object.assign(Object.assign({},M),l),g),A=Wz(o||s,b,t.plane),P=$z(s,a,O,b),C=Xz(b),j=tO(y,w,f,r,d,h,s,b),N=v?j.map((D,F)=>{const B=v.get(F);return!B||B[0]!==D.label?D:Object.assign(Object.assign({},D),{bbox:B[1]})}):j,k=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},E),{type:"linear",data:N,crossSize:c,titleText:ud(u),labelOverlap:Hz(p,E),grid:Vz(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 Sv({className:"axis",style:fd(k)})}},eO=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=eO(Kz),nO=eO(Uz);lo.props={defaultPosition:"center",defaultSize:45,defaultOrder:0,defaultCrossPadding:[12,12],defaultPadding:[12,12]},nO.props={defaultPosition:"outer",defaultOrientation:"vertical",defaultSize:45,defaultOrder:0,defaultCrossPadding:[12,12],defaultPadding:[12,12]};var Qz=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function Jz(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 tG(t,e,n,r){const{radar:i}=t,[a]=r,o=a.getOptions().name,[s,c]=sv(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 rO=t=>{const{important:e={}}=t,n=Qz(t,["important"]);return r=>{const{theme:i,coordinate:a,scales:o}=r;return lo(Object.assign(Object.assign(Object.assign({},n),Jz(t.orientation)),{important:Object.assign(Object.assign({},tG(t,i,a,o)),e)}))(r)}};rO.props=Object.assign(Object.assign({},lo.props),{defaultPosition:"center"});function dd(t,e){return+t.toPrecision(e)}function Bht(t){return t.toLocaleString()}function zht(t){return t.toExponential()}function Ght(t,e){return e===void 0&&(e=0),Math.abs(t)<1e3?String(t):"".concat(dd(t/1e3,e).toLocaleString(),"K")}var Wht=function(t,e,n){return t<0&&Number.isFinite(t)?e:n},Hht=function(t,e,n){return t>0&&Number.isFinite(t)?e:n},Yht=function(t,e){return t*e},Vht=function(t,e){return t/2+(e||0)/2};function hd(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 eG={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},Rv=Fi({background:"background",labelGroup:"label-group",label:"label"},"indicator"),nG=function(t){(0,S.ZT)(e,t);function e(n){var r=t.call(this,n,eG)||this;return r.point=[0,0],r.group=r.appendChild(new Fr({})),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 Gn(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=Ue(this.group).maybeAppendByClassName(Rv.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=Ue(this.group).maybeAppendByClassName(Rv.labelGroup,"g").styles(c),!!i){var f=this.label.maybeAppendByClassName(Rv.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=dB.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(Ne.BOUNDS_CHANGED,this.renderBackground)},e.prototype.render=function(){this.renderLabel(),this.renderBackground(),this.adjustLayout(),this.applyVisibility()},e}(Lr),iO={fill:"#fff",lineWidth:1,radius:2,size:10,stroke:"#bfbfbf",strokeOpacity:1,zIndex:0},aO={fill:"#000",fillOpacity:.45,fontSize:12,textAlign:"center",textBaseline:"middle",zIndex:1},oO={orientation:"horizontal",showLabel:!0,type:"start"},fa=Fi({foreground:"foreground",handle:"handle",selection:"selection",sparkline:"sparkline",sparklineGroup:"sparkline-group",track:"track",brushArea:"brush-area"},"slider"),uo=Fi({labelGroup:"label-group",label:"label",iconGroup:"icon-group",icon:"icon",iconRect:"icon-rect",iconLine:"icon-line"},"handle"),rG=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=Ue(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}(Lr),sO=function(t){(0,S.ZT)(e,t);function e(n){return t.call(this,n,oO)||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=Ue(n).maybeAppendByClassName(uo.labelGroup,"g").styles(u),d=(0,S.pi)((0,S.pi)({},aO),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},iO),en(this.attributes,"icon")),s=this.attributes.iconShape,c=s===void 0?function(){return new rG({style:o})}:s,l=Ue(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}(Lr),cO=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"]]},iG=cO,aG=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"]]},oG=function(t,e,n){return[["M",t-n,e],["L",t,e-n],["L",t+n,e],["L",t,e+n],["Z"]]},sG=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"]]},cG=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"]]},lG=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"]]},uG=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"]]},lO=function(t,e,n){return[["M",t,e+n],["L",t,e-n]]},fG=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]]},dG=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]]},hG=function(t,e,n){return[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]]},pG=function(t,e,n){return[["M",t-n,e],["L",t+n,e]]},uO=function(t,e,n){return[["M",t-n,e],["L",t+n,e]]},vG=uO,gG=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]]},yG=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]]},mG=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]]},bG=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 xG(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 _G=function(t,e,n){return[["M",t-n,e-n],["L",t+n,e],["L",t-n,e+n],["Z"]]};function OG(t){var e="default";if(zo(t)&&t instanceof Image)e="image";else if(gi(t))e="symbol";else if(tr(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 wG(t){var e=OG(t);return["base64","url","image"].includes(e)?"image":t&&e==="symbol"?"path":null}var Cn=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=wG(i);vi(!!c,Ue(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}(Lr);Cn.registerSymbol("cross",fG),Cn.registerSymbol("hyphen",pG),Cn.registerSymbol("line",lO),Cn.registerSymbol("plus",hG),Cn.registerSymbol("tick",dG),Cn.registerSymbol("circle",cO),Cn.registerSymbol("point",iG),Cn.registerSymbol("bowtie",uG),Cn.registerSymbol("hexagon",lG),Cn.registerSymbol("square",aG),Cn.registerSymbol("diamond",oG),Cn.registerSymbol("triangle",sG),Cn.registerSymbol("triangle-down",cG),Cn.registerSymbol("line",lO),Cn.registerSymbol("dot",uO),Cn.registerSymbol("dash",vG),Cn.registerSymbol("smooth",gG),Cn.registerSymbol("hv",yG),Cn.registerSymbol("vh",mG),Cn.registerSymbol("hvh",bG),Cn.registerSymbol("vhv",xG);function SG(t,e,n){var r=Math.round((t-n)/e);return n+r*e}function MG(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 fO=1.4,dO=.4;function EG(t,e,n){var r=n,i=r*fO,a=r/2,o=r/6,s=t+i*dO;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 AG(t,e,n){var r=n,i=r*fO,a=r/2,o=r/6,s=e+i*dO;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]]}Cn.registerSymbol("hiddenHandle",MG),Cn.registerSymbol("verticalHandle",EG),Cn.registerSymbol("horizontalHandle",AG);var Xht=function(t,e,n){return t===void 0&&(t="horizontal"),t==="horizontal"?e:n};function TG(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=Fi({markerGroup:"marker-group",marker:"marker",labelGroup:"label-group",label:"label"},"handle"),hO={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},PG=function(t){(0,S.ZT)(e,t);function e(n){return t.call(this,n,hO)||this}return e.prototype.render=function(n,r){var i=Ue(r).maybeAppendByClassName(Ol.markerGroup,"g");this.renderMarker(i);var a=Ue(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 Cn({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}(Lr),pO={showTitle:!0,padding:0,orientation:"horizontal",backgroundFill:"transparent",titleText:"",titleSpacing:4,titlePosition:"top-left",titleFill:"#2C3542",titleFontWeight:"bold",titleFontFamily:"sans-serif",titleFontSize:12},CG=Ra({},pO,{}),kG=Ra({},pO,la(hO,"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"}),RG=.01,$ht=.5,Nr=Fi({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 LG(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 NG(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 vO(t,e){var n=(0,S.CR)(LG(t,e),2),r=n[0],i=n[1];return{tick:e>(r+i)/2?i:r,range:[r,i]}}var wl=Fi({trackGroup:"background-group",track:"background",selectionGroup:"ribbon-group",selection:"ribbon",clipPath:"clip-path"},"ribbon");function gO(t){var e=t.orientation,n=t.size,r=t.length;return da(e,[r,n],[n,r])}function yO(t){var e=t.type,n=(0,S.CR)(gO(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 IG(t){return yO(t)}function jG(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?NG(i,c,e):c.reduce(function(l,u,f){return l+=" ".concat(f/(s-1),":").concat(u)},"l(".concat(da(e,"0","270"),")")):""}function DG(t){var e=t.orientation,n=t.range;if(!n)return[];var r=(0,S.CR)(gO(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 FG(t,e){var n=en(e,"track");t.maybeAppendByClassName(wl.track,"path").styles((0,S.pi)({path:yO(e)},n))}function BG(t,e){var n=en(e,"selection"),r=jG(e),i=t.maybeAppendByClassName(wl.selection,"path").styles((0,S.pi)({path:IG(e),fill:r},n)),a=i.maybeAppendByClassName(wl.clipPath,"path").styles({path:DG(e)}).node();i.style("clip-path",a)}var zG=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=Ue(r).maybeAppendByClassName(wl.trackGroup,"g");FG(i,n);var a=Ue(r).maybeAppendByClassName(wl.selectionGroup,"g");BG(a,n)},e}(Lr);function GG(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 WG=function(t){(0,S.ZT)(e,t);function e(n){var r=t.call(this,n,kG)||this;return r.eventToOffsetScale=new Xr({}),r.innerRibbonScale=new Xr({}),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=vO(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 Gn(0,0,r,i)},e.prototype.render=function(n,r){var i=this,a=n.showLabel;this.renderTitle(Ue(r));var o=this.availableSpace,s=o.x,c=o.y,l=Ue(r).maybeAppendByClassName(Nr.contentGroup,"g").styles({x:s,y:c}),u=l.maybeAppendByClassName(Nr.labelGroup,"g").styles({zIndex:1});vi(!!a,u,function(d){i.renderLabel(d)});var f=l.maybeAppendByClassName(Nr.ribbonGroup,"g").styles({zIndex:0});this.handlesGroup=l.maybeAppendByClassName(Nr.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]}:GG(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(Nr.title.class).data(i?[a]:[]).join(function(f){return f.append(function(){return new M2({style:l})}).attr("className",Nr.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 Gn(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 Gn(0,0,0,0);if(this.cacheLabelBBox)return this.cacheLabelBBox;var i=((n=this.label.querySelector(An.labelGroup.class))===null||n===void 0?void 0:n.children.slice(-1)[0]).getBBox(),a=i.width,o=i.height;return this.cacheLabelBBox=new Gn(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 Gn(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(Nr.ribbon,function(){return new zG({style:b})}).update(b)},e.prototype.getHandleClassName=function(n){return"".concat(Nr.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"?PG:sO,h=this;this.handlesGroup.selectAll(Nr.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(Nr.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(Nr.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 Gn(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 Gn(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(Nr.indicator,function(){return new nG({})}).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(Nr.label,function(){return new Sv({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)(TG([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 er(r)?dd((o-a)*RG,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?vO(i.map(function(s){var c=s.value;return c}),n).tick:SG(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)(hd(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 kn("valuechange",{detail:{value:this.selection}});this.dispatchEvent(n)},e.prototype.dispatchIndicated=function(n,r){var i=new kn("indicate",{detail:{value:n,range:r}});this.dispatchEvent(i)},e}(Lr);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(!sd(e))return this.options.unknown;const n=Ev(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 HG=[1,5,2,2.5,4,3],Uht=null,mO=Number.EPSILON*100;function YG(t,e){return(t%e+e)%e}function VG(t){return Math.round(t*1e12)/1e12}function XG(t,e,n,r,i,a){const o=B2(e),s=D2(e,t);let c=0;const l=YG(r,a);return(l<mO||a-l<mO)&&r<=0&&i>=0&&(c=1),1-s/(o-1)-n+c}function $G(t,e,n){const r=B2(e),i=D2(e,t),a=1;return 1-i/(r-1)-n+a}function UG(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 qG(t,e){return t>=e?2-(t-1)/(e-1):1}function ZG(t,e,n,r){const i=e-t;return 1-.5*(wr(e-r,2)+wr(t-n,2))/wr(.1*i,2)}function KG(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 QG(){return 1}const Lv=(t,e,n=5,r=!0,i=HG,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=$G(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=qG(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=KG(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=XG(v,i,c,j,N,k),D=ZG(t,e,j,N),F=UG(y,o,t,e,j,N),B=QG(),z=a[0]*R+a[1]*D+a[2]*F+a[3]*B;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(VG((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 pd extends Js{getDefaultOptions(){return{domain:[0,1],range:[.5],nice:!1,tickCount:5,tickMethod:Lv}}constructor(e){super(e)}nice(){const{nice:e}=this.options;if(e){const[n,r,i]=this.getTickMethodOptions();this.options.domain=W2(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 pd(this.options)}}function JG(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 tW(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(JG(r,a/e));return i}class vd extends Js{getDefaultOptions(){return{domain:[],range:[],tickCount:5,unknown:void 0,tickMethod:Lv}}constructor(e){super(e)}rescale(){const{domain:e,range:n}=this.options;this.n=n.length-1,this.thresholds=tW(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 vd(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 eW=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 nW(t,e,n){return t.size=e,jz(n)?t.height=e:t.width=e,t}function rW(t,e,n){const{size:r}=e,i=Z2(t,e,n);return nW(i,r,i.orientation)}function iW(t){return e=>({value:e/t,label:String(e)})}function aW(t,e,n,r,i){const a=e.thresholds,o=iW(r);return Object.assign(Object.assign({},t),{color:i,data:[n,...a,r].map(o)})}function oW(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 Nv(t){const{domain:e}=t.getOptions(),[n,r]=[e[0],L_(e)];return[n,r]}function sW(t,e){const n=t.getOptions(),r=t.clone();return r.update(Object.assign(Object.assign({},n),{range:[Aa(e).toString()]})),r}function cW(t,e,n,r,i,a){const{length:o}=t,s=n||r,c=i.color?a.legendContinuous.ribbonFill||"black":a.color,l=e||sW(s,c),[u,f]=Nv(l),[d,h]=Nv([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 lW(t,e,n,r,i,a){const o=ua(t,"color"),s=rW(n,r,i);if(o instanceof Js){const{range:u}=o.getOptions(),[f,d]=Nv(o);return o instanceof pd||o instanceof vd?aW(s,o,f,d,u):oW(s,o,u)}const c=ua(t,"size"),l=ua(t,"opacity");return cW(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=eW(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=U2(a,n),{legendContinuous:w={}}=p,M=fd(Object.assign({},w,Object.assign(Object.assign({titleText:ud(s),labelAlign:"value",labelFormatter:typeof e=="string"?A=>oo(e)(A.label):e},lW(d,v,h,t,fo,p)),c),f)),E=new q2({style:Object.assign(Object.assign({x:y,y:m,width:b,height:_},O),{subOptions:M})});return E.appendChild(new WG({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 bO=t=>(...e)=>fo(Object.assign({},{block:!0},t))(...e);bO.props=Object.assign(Object.assign({},fo.props),{defaultPosition:"top",defaultOrientation:"horizontal"});const Iv=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)};Iv.props=Object.assign(Object.assign({},fo.props),{defaultPosition:"top",defaultOrientation:"horizontal"});const xO=t=>Iv(Object.assign({},{block:!0},t));xO.props=Object.assign(Object.assign({},fo.props),{defaultPosition:"top",defaultOrientation:"horizontal"});var uW=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 _O=({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:F,title:B}=e,z=uW(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:F},!t&&{title:B}),{marks:[Object.assign(Object.assign(Object.assign({},z),{key:`${j}-0`,data:_}),t&&{title:B})]})]};_O.props={};var fW=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)=>Nt({},t(e,...n),e)}function ec(t){return(e,...n)=>Nt({},e,t(e,...n))}function jv(t,e){if(!t)return e;if(Array.isArray(t))return t;const{value:n=e}=t,r=fW(t,["value"]);return Object.assign(Object.assign({},r),{value:n})}var Dv=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const OO=()=>t=>{const{children:e}=t,n=Dv(t,["children"]);if(!Array.isArray(e))return[];const{data:r,scale:i={},axis:a={},legend:o={},encode:s={},transform:c=[]}=n,l=Dv(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=Dv(f,["data","scale","axis","legend","encode","transform"]);return Object.assign({data:jv(d,r),scale:Nt({},i,h),encode:Nt({},s,g),transform:[...c,...y],axis:p&&a?Nt({},a,p):!1,legend:v&&o?Nt({},o,v):!1},m)});return[Object.assign(Object.assign({},l),{marks:u,type:"standardView"})]};OO.props={};function ur([t,e],[n,r]){return[t-n,e-r]}function gd([t,e],[n,r]){return[t+n,e+r]}function Kn([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 wO(t,e){const n=Gi(t),r=Gi(e);return n<r?r-n:Math.PI*2-(n-r)}function Fv(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 SO([t,e],[n,r]){return[(t+n)/2,(e+r)/2]}function Ee(t,e){for(const[n,r]of Object.entries(e))t.style(n,r)}function dW(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 hW(t,e,n){const{arrowSize:r}=n,i=typeof r=="string"?+parseFloat(r)/100*Kn(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 MO(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 Xr({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 yd(t){const[e,n,r,i]=t;return[i,e,n,r]}function ns(t,e,n){const[r,i,,a]=zn(t)?yd(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:Kn(a,c),outerRadius:Kn(r,c)}}function qht(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 EO(t){const{colorAttribute:e,opacityAttribute:n=e}=t;return`${n}Opacity`}function AO(t,e){if(!Nn(t))return"";const n=t.getCenter(),{transform:r}=e;return`translate(${n[0]}, ${n[1]}) ${r||""}`}function TO(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 PO(t){return t.replace(/-(\w)/g,function(e,n){return n.toUpperCase()})}function pW(t){return t.replace(/([A-Z])/g,"-$1").toLowerCase()}var Zht=Array.prototype.slice;function CO(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function Wn(t){return function(){return t}}function kO(t){this._context=t}kO.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 kO(t)}const Bv=Math.PI,zv=2*Bv,rs=1e-6,vW=zv-rs;function RO(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function gW(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return RO;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 md{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?RO:gW(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%zv+zv),d>vW?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 md}Wi.prototype=md.prototype;function Kht(t=3){return new md(+t)}function Gv(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 md(e)}function LO(t){return t[0]}function NO(t){return t[1]}function ho(t,e){var n=Wn(!0),r=null,i=Al,a=null,o=Gv(s);t=typeof t=="function"?t:t===void 0?LO:Wn(t),e=typeof e=="function"?e:e===void 0?NO:Wn(e);function s(c){var l,u=(c=CO(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:Wn(+c),s):t},s.y=function(c){return arguments.length?(e=typeof c=="function"?c:Wn(+c),s):e},s.defined=function(c){return arguments.length?(n=typeof c=="function"?c:Wn(!!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 k0{connectedCallback(){this.draw()}attributeChangedCallback(){this.draw()}draw(){e(this)}}}var Wv=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 yW(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 mW(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 bW=(t,e,n)=>{const r=Kn(t,e),i=Kn(e,n),a=Kn(n,t);return(Math.pow(r,2)+Math.pow(i,2)-Math.pow(a,2))/(2*r*i)};function xW(t,e,n,r){const[[i,a],[o,s]]=e,[c,l]=yW(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(bW(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 IO=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=Wv(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 _=le(b,"background"),{padding:O}=_,w=Wv(_,["padding"]),M=le(b,"connector"),{points:E=[]}=M,A=Wv(M,["points"]),P=[[+u,+f],[+c,+l]];let C;m?C=je(t).maybeAppend("html","html",n).style("zIndex",0).style("innerHTML",m).call(Ee,Object.assign({transform:o,transformOrigin:s},b)).node():C=je(t).maybeAppend("text","text").style("zIndex",0).style("text",d).call(Ee,Object.assign({textBaseline:"middle",transform:o,transformOrigin:s},b)).node();const j=je(t).maybeAppend("background","rect").style("zIndex",-1).call(Ee,mW(C,O)).call(Ee,h?w:{}).node(),N=xW(j,P,E,y),k=v&&new Cn({id:"startMarker",style:Object.assign({x:0,y:0},le(b,"startMarker"))}),R=g&&new Cn({id:"endMarker",style:Object.assign({x:0,y:0},le(b,"endMarker"))});je(t).maybeAppend("connector","path").style("zIndex",0).style("path",N).style("markerStart",k).style("markerEnd",R).call(Ee,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 _W(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 jO(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=M_(n.x,l),g=M_(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 DO(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=Hv(p,o,s),g=(()=>{const[y,m]=e,b=u+(f-u)*.5,[_,O]=t==="inside"?Tl(c,p,b):SO(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 Hv(t,e,n){if(!e)return 0;const r=n?0:Math.sin(t)<0?90:-90;return t/Math.PI*180+r}function OW(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:Hv(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 FO(t){return t===void 0?null:t}function BO(t,e,n,r){const{bounds:i}=n,[a]=i;return{x:FO(a[0]),y:FO(a[1])}}function ja(t,e,n,r){const{bounds:i}=n;return i.length===1?BO(t,e,n,r):(fl(r)?DO:Xs(r)?OW:jO)(t,e,n,r)}function wW(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 zO(t,e,n){const r=ns(n,t,[e.y,e.y1]),{innerRadius:i,outerRadius:a}=r;return i+(a-i)}function GO(t,e,n){const r=ns(n,t,[e.y,e.y1]),{startAngle:i,endAngle:a}=r;return(i+a)/2}function Yv(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=GO(e,n,r),h=Math.sin(d)>0?1:-1,p=Hv(d,i,a),v={textAlign:h>0||fl(r)?"start":"end",textBaseline:"middle",rotate:p},g=zO(e,n,r),y=g+(s?c:o),[[m,b],[_,O],[w,M]]=wW(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 SW(t,e,n,r){const{bounds:i}=n;return i.length===1?BO(t,e,n,r):(fl(r)?DO:Xs(r)?Yv:jO)(t,e,n,r)}var MW=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 EW(t,e,n,r){if(!Xs(r))return{};const{connectorLength:i,connectorLength2:a,connectorDistance:o}=n,s=MW(Yv("outside",e,n,r),[]),c=r.getCenter(),l=zO(e,n,r),u=GO(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 AW=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 TW(t,e,n,r){if(!Xs(r))return{};const{connectorLength:i,connectorLength2:a,connectorDistance:o}=n,s=AW(Yv("outside",e,n,r),[]),{x0:c,y0:l}=s,u=r.getCenter(),d=fF(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 WO=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 PW(t,e){return t!==void 0?t:Xs(e)?"inside":zn(e)?"right":"top"}function CW(t,e,n,r,i){const{position:a}=e,{render:o}=i,s=PW(a,n),l=r[o?"htmlLabel":s==="inside"?"innerLabel":"label"],u=Object.assign({},l,e),f=kt[PO(s)];if(!f)throw new Error(`Unknown position: ${s}`);return Object.assign(Object.assign({},l),f(s,t,u,n,i))}const HO=(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=WO(o,["text","x","y","transform","transformOrigin","className"]),p=CW(a,o,n,r,t),{rotate:v=0,transform:g=""}=p,y=WO(p,["rotate","transform"]);return je(new IO).call(Ee,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(Ee,h).node()}};HO.props={defaultMarker:"point"};function YO(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 VO(t,e){if(e(t))return t;let n=t.parent;for(;n&&!e(n);)n=n.parent;return n}function kW(t){return VO(t,e=>e.className==="component")}function RW(t){return VO(t,e=>e.className==="element")}function Ir(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=RW(a),c=kW(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:YO(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 XO(){return(t,e,n)=>{const{container:r,view:i}=t,a=Ir(wn.CLICK,i,n,M=>M.detail===1),o=Ir(wn.DBLCLICK,i,n,M=>M.detail===2),s=Ir(wn.POINTER_TAP,i,n),c=Ir(wn.POINTER_DOWN,i,n),l=Ir(wn.POINTER_UP,i,n),u=Ir(wn.POINTER_OVER,i,n),f=Ir(wn.POINTER_OUT,i,n),d=Ir(wn.POINTER_MOVE,i,n),h=Ir(wn.POINTER_ENTER,i,n),p=Ir(wn.POINTER_LEAVE,i,n),v=Ir(wn.POINTER_UPOUTSIDE,i,n),g=Ir(wn.DRAG_START,i,n),y=Ir(wn.DRAG,i,n),m=Ir(wn.DRAG_END,i,n),b=Ir(wn.DRAG_ENTER,i,n),_=Ir(wn.DRAG_LEAVE,i,n),O=Ir(wn.DRAG_OVER,i,n),w=Ir(wn.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)}}}XO.props={reapplyWhenUpdate:!0};function LW(){return{"component.axisRadar":rO,"component.axisLinear":lo,"component.axisArc":nO,"component.legendContinuousBlock":bO,"component.legendContinuousBlockSize":xO,"component.legendContinuousSize":Iv,"interaction.event":XO,"composition.mark":_O,"composition.view":OO,"shape.label.label":HO}}var NW=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 Hn(t,e){const n=Object.assign(Object.assign({},LW()),e),r=a=>{if(typeof a!="string")return a;const o=`${t}.${a}`;return n[o]||Vs(`Unknown Component: ${o}`)};return[(a,o)=>{const{type:s}=a,c=NW(a,["type"]);s||Vs("Plot type is required!");const l=r(s);return l==null?void 0:l(c,o)},r]}function $O(t){const{canvas:e,group:n}=t;return(e==null?void 0:e.document)||(n==null?void 0:n.ownerDocument)||Vs("Cannot find library document")}var UO=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 IW(t,e,n){const[r]=Hn("coordinate",n),{innerHeight:i,innerWidth:a,insetLeft:o,insetTop:s,insetRight:c,insetBottom:l}=t,{coordinates:u=[]}=e,f=GW(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 B_.Coordinate3D(h):new B_.Coordinate(h)}function qO(t,e){const{coordinate:n={}}=t,r=UO(t,["coordinate"]),{type:i,transform:a=[]}=n,o=UO(n,["type","transform"]);if(!i)return Object.assign(Object.assign({},r),{coordinates:a});const[,s]=Hn("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 jW(t){return Qi(t,"helix").length>0}function ac(t){return Qi(t,"transpose").length%2===1}function DW(t){return Qi(t,"parallel").length>0}function ZO(t){return Qi(t,"theta").length>0}function FW(t){return Qi(t,"reflect").length>0}function Pl(t){return Qi(t,"radial").length>0}function BW(t){return Qi(t,"radar").length>0}function zW(t){return Qi(t,"reflectY").length>0}function GW(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 WW=nn("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),HW=nn("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),YW=nn("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),VW=nn("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),XW=nn("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),$W=nn("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),UW=nn("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),qW=nn("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),ZW=nn("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),KW=nn("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function bd(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Vv(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*",QW=/^#([0-9a-f]{3,8})$/,JW=new RegExp("^rgb\\(".concat(cc,",").concat(cc,",").concat(cc,"\\)$")),tH=new RegExp("^rgb\\(".concat(ha,",").concat(ha,",").concat(ha,"\\)$")),eH=new RegExp("^rgba\\(".concat(cc,",").concat(cc,",").concat(cc,",").concat(Cl,"\\)$")),nH=new RegExp("^rgba\\(".concat(ha,",").concat(ha,",").concat(ha,",").concat(Cl,"\\)$")),rH=new RegExp("^hsl\\(".concat(Cl,",").concat(ha,",").concat(ha,"\\)$")),iH=new RegExp("^hsla\\(".concat(Cl,",").concat(ha,",").concat(ha,",").concat(Cl,"\\)$")),KO={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};bd(oc,Xv,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:QO,formatHex:QO,formatHex8:aH,formatHsl:oH,formatRgb:JO,toString:JO});function QO(){return this.rgb().formatHex()}function aH(){return this.rgb().formatHex8()}function oH(){return aw(this).formatHsl()}function JO(){return this.rgb().formatRgb()}function Xv(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=QW.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?tw(e):n===3?new $r(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?xd(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?xd(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=JW.exec(t))?new $r(e[1],e[2],e[3],1):(e=tH.exec(t))?new $r(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=eH.exec(t))?xd(e[1],e[2],e[3],e[4]):(e=nH.exec(t))?xd(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=rH.exec(t))?iw(e[1],e[2]/100,e[3]/100,1):(e=iH.exec(t))?iw(e[1],e[2]/100,e[3]/100,e[4]):KO.hasOwnProperty(t)?tw(KO[t]):t==="transparent"?new $r(NaN,NaN,NaN,0):null}function tw(t){return new $r(t>>16&255,t>>8&255,t&255,1)}function xd(t,e,n,r){return r<=0&&(t=e=n=NaN),new $r(t,e,n,r)}function ew(t){return t instanceof oc||(t=Xv(t)),t?(t=t.rgb(),new $r(t.r,t.g,t.b,t.opacity)):new $r}function kl(t,e,n,r){return arguments.length===1?ew(t):new $r(t,e,n,r==null?1:r)}function $r(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}bd($r,kl,Vv(oc,{brighter:function(e){return e=e==null?sc:Math.pow(sc,e),new $r(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=e==null?as:Math.pow(as,e),new $r(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},clamp:function(){return new $r(os(this.r),os(this.g),os(this.b),_d(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:nw,formatHex:nw,formatHex8:sH,formatRgb:rw,toString:rw}));function nw(){return"#".concat(ss(this.r)).concat(ss(this.g)).concat(ss(this.b))}function sH(){return"#".concat(ss(this.r)).concat(ss(this.g)).concat(ss(this.b)).concat(ss((isNaN(this.opacity)?1:this.opacity)*255))}function rw(){var t=_d(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 _d(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 iw(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 aw(t){if(t instanceof Ji)return new Ji(t.h,t.s,t.l,t.opacity);if(t instanceof oc||(t=Xv(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 cH(t,e,n,r){return arguments.length===1?aw(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}bd(Ji,cH,Vv(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 $r($v(e>=240?e-240:e+120,a,i),$v(e,a,i),$v(e<120?e+240:e-120,a,i),this.opacity)},clamp:function(){return new Ji(ow(this.h),Od(this.s),Od(this.l),_d(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=_d(this.opacity);return"".concat(e===1?"hsl(":"hsla(").concat(ow(this.h),", ").concat(Od(this.s)*100,"%, ").concat(Od(this.l)*100,"%").concat(e===1?")":", ".concat(e,")"))}}));function ow(t){return t=(t||0)%360,t<0?t+360:t}function Od(t){return Math.max(0,Math.min(1,t||0))}function $v(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 sw(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 lH(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 sw((n-r/e)*e,o,i,a,s)}}function uH(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 sw((n-r/e)*e,i,a,o,s)}}var Uv=function(t){return function(){return t}};function cw(t,e){return function(n){return t+n*e}}function fH(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 dH(t,e){var n=e-t;return n?cw(t,n>180||n<-180?n-360*Math.round(n/360):n):Uv(isNaN(t)?e:t)}function hH(t){return(t=+t)==1?lc:function(e,n){return n-e?fH(e,n,t):Uv(isNaN(e)?n:e)}}function lc(t,e){var n=e-t;return n?cw(t,n):Uv(isNaN(t)?e:t)}var Qht=function t(e){var n=hH(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 lw(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 pH=lw(lH),Jht=lw(uH),In=t=>pH(t[t.length-1]),uw=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(nn),vH=In(uw),fw=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(nn),gH=In(fw),dw=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(nn),yH=In(dw),hw=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(nn),mH=In(hw),pw=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(nn),bH=In(pw),vw=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(nn),xH=In(vw),gw=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(nn),_H=In(gw),yw=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(nn),OH=In(yw),mw=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(nn),wH=In(mw),bw=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(nn),SH=In(bw),xw=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(nn),MH=In(xw),_w=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(nn),EH=In(_w),Ow=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(nn),AH=In(Ow),ww=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(nn),TH=In(ww),Sw=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(nn),PH=In(Sw),Mw=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(nn),CH=In(Mw),Ew=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(nn),kH=In(Ew),Aw=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(nn),RH=In(Aw),Tw=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(nn),LH=In(Tw),Pw=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(nn),NH=In(Pw),Cw=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(nn),IH=In(Cw),kw=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(nn),jH=In(kw),Rw=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(nn),DH=In(Rw),Lw=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(nn),FH=In(Lw),Nw=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(nn),BH=In(Nw),Iw=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(nn),zH=In(Iw),jw=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(nn),GH=In(jw);function WH(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 HH=Math.PI/180,YH=180/Math.PI,Dw=-.14861,qv=1.78277,Zv=-.29227,wd=-.90649,Rl=1.97294,Fw=Rl*wd,Bw=Rl*qv,zw=qv*Zv-wd*Dw;function VH(t){if(t instanceof cs)return new cs(t.h,t.s,t.l,t.opacity);t instanceof $r||(t=ew(t));var e=t.r/255,n=t.g/255,r=t.b/255,i=(zw*r+Fw*e-Bw*n)/(zw+Fw-Bw),a=r-i,o=(Rl*(n-i)-Zv*a)/wd,s=Math.sqrt(o*o+a*a)/(Rl*i*(1-i)),c=s?Math.atan2(o,a)*YH-120:NaN;return new cs(c<0?c+360:c,s,i,t.opacity)}function pa(t,e,n,r){return arguments.length===1?VH(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}bd(cs,pa,Vv(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)*HH,n=+this.l,r=isNaN(this.s)?0:this.s*n*(1-n),i=Math.cos(e),a=Math.sin(e);return new $r(255*(n+r*(Dw*i+qv*a)),255*(n+r*(Zv*i+wd*a)),255*(n+r*(Rl*i)),this.opacity)}}));function Gw(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 tpt=Gw(dH),Kv=Gw(lc),XH=Kv(pa(300,.5,0),pa(-240,.5,1)),$H=Kv(pa(-100,.75,.35),pa(80,1.5,.8)),UH=Kv(pa(260,.75,.35),pa(80,1.5,.8)),Sd=pa();function qH(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return Sd.h=360*t-100,Sd.s=1.5-1.5*e,Sd.l=.8-.9*e,Sd+""}var Md=kl(),ZH=Math.PI/3,KH=Math.PI*2/3;function QH(t){var e;return t=(.5-t)*Math.PI,Md.r=255*(e=Math.sin(t))*e,Md.g=255*(e=Math.sin(t+ZH))*e,Md.b=255*(e=Math.sin(t+KH))*e,Md+""}function JH(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 Ed(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}var tY=Ed(nn("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),eY=Ed(nn("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),nY=Ed(nn("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),rY=Ed(nn("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function iY(t,e,n,r,i,a){const{guide:o={}}=n,s=hY(t,e,n);if(typeof s!="string")return n;const c=pY(s,t,e,n),l=uY(s,c,n);return Object.assign(Object.assign(Object.assign({},n),gY(s,t,e,n,r)),{domain:l,range:vY(s,t,e,n,l,i,a),expectedDomain:c,guide:o,name:t,type:s})}function aY(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 oY(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=lY(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=Nt({},p,s),Object.assign(u,f)}else{const h=Object.assign(Object.assign({},f),{expectedDomain:f.domain,name:l,guide:V2(s,i)});a.push(h)}}}return a}function sY(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 Ww(t,e){const n=Object.keys(t);for(const r of Object.values(e)){const{name:i}=r.getOptions();if(!(i in t))t[i]=r;else{const a=n.filter(c=>c.startsWith(i)).map(c=>+(c.replace(i,"")||0)),o=Sn(a)+1,s=`${i}${o}`;t[s]=r,r.getOptions().key=s}}return t}function Hw(t,e){const[n]=Hn("scale",e),{relations:r}=t,[i]=sY(r),a=n(t);return i(a)}function cY(t){const e=t.flatMap(n=>Array.from(n.values())).flatMap(n=>n.channels.map(r=>r.scale));Yw(e,"x"),Yw(e,"y")}function lY(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 Yw(t,e){const n=t.filter(({name:a,facet:o=!0})=>o&&a===e),r=n.flatMap(a=>a.domain),i=n.every(Vw)?Ia(r):n.every(Xw)?Array.from(new Set(r)):null;if(i!==null)for(const a of n)a.domain=i}function uY(t,e,n){const{ratio:r}=n;return r==null?e:Vw({type:t})?fY(e,r,t):Xw({type:t})?dY(e,r):e}function fY(t,e,n){const r=t.map(Number),i=new Xr({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 dY(t,e){const n=Math.round(t.length*e);return t.slice(0,n)}function Vw(t){const{type:e}=t;return typeof e!="string"?!1:["linear","log","pow","time"].includes(e)}function Xw(t){const{type:e}=t;return typeof e!="string"?!1:["band","point","ordinal"].includes(e)}function hY(t,e,n){const{type:r,domain:i,range:a,quantitative:o,ordinal:s}=n;return r!==void 0?r:AY(e)?"identity":typeof a=="string"?"linear":(i||a||[]).length>2?Qv(t,s):i!==void 0?Kw([i])?Qv(t,s):Qw(e)?"time":Uw(t,a,o):Kw(e)?Qv(t,s):Qw(e)?"time":Uw(t,a,o)}function pY(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 qw(wY(n,r),r);case"band":case"ordinal":case"point":return Zw(n);case"quantile":return SY(n);case"sequential":return qw(MY(n),r);default:return[]}}function vY(t,e,n,r,i,a,o){const{range:s}=r;if(typeof s=="string")return yY(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=$w(n,r,i,a,o),[f,d]=EY(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 $w(n,r,i,a,o);case"sequential":return;case"constant":return[n[0][0]];default:return[]}}function gY(t,e,n,r,i){switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":return xY(i,r);case"band":case"point":return _Y(t,e,i,r);case"sequential":return bY(r);default:return r}}function $w(t,e,n,r,i){const[a]=Hn("palette",i),{category10:o,category20:s}=r,c=oF(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=mY(l,n,u);if(d)return d;throw new Error(`Unknown Component: ${l} `)}}function yY(t){return t.split("-")}function mY(t,e,n=r=>r){if(!t)return null;const r=ao(t),i=Rt[`scheme${r}`],a=Rt[`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 bY(t){const{palette:e="ylGnBu",offset:n}=t,r=ao(e),i=Rt[`interpolate${r}`];if(!i)throw new Error(`Unknown palette: ${r}`);return{interpolator:n?a=>i(n(a)):i}}function xY(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 _Y(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=OY(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 OY(t,e,n){return e==="enterDelay"||e==="enterDuration"||e==="size"?0:t==="band"?ZO(n)?0:.1:t==="point"?.5:0}function Qv(t,e){return e||(TY(t)?"point":"ordinal")}function Uw(t,e,n){return n||(t!=="color"||e?"linear":"sequential")}function qw(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 wY(t,e){const{zero:n=!1}=e;let r=1/0,i=-1/0;for(const a of t)for(const o of a)Rn(o)&&(r=Math.min(r,+o),i=Math.max(i,+o));return r===1/0?[]:n?[Math.min(0,r),i]:[r,i]}function Zw(t){return Array.from(new Set(t.flat()))}function SY(t){return Zw(t).sort()}function MY(t){let e=1/0,n=-1/0;for(const r of t)for(const i of r)Rn(i)&&(e=Math.min(e,+i),n=Math.max(n,+i));return e===1/0?[]:[e<0?-n:e,n]}function EY(t,e){return t==="enterDelay"?[0,1e3]:t=="enterDuration"?[300,1e3]:t.startsWith("y")||t.startsWith("position")?[1,0]:t==="color"?[aF(e),L_(e)]:t==="opacity"?[0,1]:t==="size"?[1,10]:[0,1]}function Kw(t){return Jv(t,e=>{const n=typeof e;return n==="string"||n==="boolean"})}function Qw(t){return Jv(t,e=>e instanceof Date)}function AY(t){return Jv(t,cl)}function Jv(t,e){for(const n of t)if(n.some(e))return!0;return!1}function TY(t){return t.startsWith("x")||t.startsWith("y")||t.startsWith("position")||t.startsWith("size")}function PY(t){return t.startsWith("x")||t.startsWith("y")||t.startsWith("position")||t==="enterDelay"||t==="enterDuration"||t==="updateDelay"||t==="updateDuration"||t==="exitDelay"||t==="exitDuration"}function CY(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 kY={linear:"linear",identity:"identity",log:"log",pow:"pow",sqrt:"sqrt",sequential:"sequential"},RY={threshold:"threshold",quantize:"quantize",quantile:"quantile"},LY={ordinal:"ordinal",band:"band",point:"point"},NY={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 IY(t,e,n){const{coordinates:r=[],title:i}=e,[,a]=Hn("component",n),o=t.filter(({guide:u})=>u!==null),s=[],c=VY(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 zY(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=Nt({},...f),{guide:w,field:M}=O,E=Array.isArray(w)?w:[w];for(const A of E){const[P,C]=HY(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:F=m,padding:B=N,crossPadding:z=k}=A;s.push(Object.assign(Object.assign({title:M},A),{defaultSize:g,length:F,position:P,plane:p,orientation:C,padding:B,order:D,crossPadding:z,size:R,type:u,scales:f}))}}),s}function Jw(t,e,n,r,i){const[a]=Hn("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 jY(t){return t.map(e=>{const n=Nt(e,e.style);return delete n.style,n})}function ept(t){return t.flatMap(e=>e.type=="group"?e.children:e)}function tS(t,e){const n=["left","right","bottom","top"];return Wf(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=Sn(a,u=>u.size),s=Sn(a,u=>u.order),c=Sn(a,u=>u.crossPadding),l=a[0].position;return{type:"group",size:o,order:s,position:l,children:a,crossPadding:c}})}function DY(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=Wf(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=sF(d).sort((v,g)=>g.length-v.length).map(v=>({combination:v,option:v.map(g=>[g.name,FY(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 lF)for(const{option:y,combination:m}of p)if(g.some(b=>j_(u(b),u(y))))return[v,m];return null}).filter(Rn)}function FY(t){const{type:e}=t;return typeof e!="string"?null:e in kY?"continuous":e in LY?"discrete":e in RY?"distribution":e in NY?"constant":null}function BY(t,e){return t.map(n=>{const{name:r}=n;if(jW(e)||ZO(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(BW(e))return["axisRadar",[n]];if(!is(e))return["axisY",[n]]}return null}).filter(Rn)}function zY(t,e){const n=t.filter(r=>CY(r));return[...DY(n,e),...BY(n,e)]}function tg(t){const e=Qi(t,"polar");if(e.length){const r=e[e.length-1],{startAngle:i,endAngle:a}=D_(r);return[i,a]}const n=Qi(t,"radial");if(n.length){const r=n[n.length-1],{startAngle:i,endAngle:a}=F_(r);return[i,a]}return[-Math.PI/2,Math.PI/2*3]}function GY(t){const e=/position(\d*)/g.exec(t);return e?+e[1]:null}function WY(t,e,n,r,i){const{name:a}=n[0];if(t==="axisRadar"){const o=r.filter(f=>f.name.startsWith("position")),s=GY(a);if(a===o.slice(-1)[0].name||s===null)return[null,null];const[c,l]=tg(i);return["center",(l-c)/(o.length-1)*s+c]}if(t==="axisY"&&DW(i))return ac(i)?["center","horizontal"]:["center","vertical"];if(t==="axisLinear"){const[o]=tg(i);return["center",o]}return t==="axisArc"?e[0]==="inner"?["inner",null]:["outer",null]:is(i)?["center",null]:Pl(i)?["center",null]:t==="axisX"&&FW(i)||t==="axisX"&&zW(i)?["top",null]:e}function HY(t,e,n,r,i,a,o){const[s]=tg(o),c=[r.position||e,s!=null?s:n];return typeof t=="string"&&t.startsWith("axis")?WY(t,c,i,a,o):typeof t=="string"&&t.startsWith("legend")&&is(o)&&r.position==="center"?["center","vertical"]:c}function YY(t,e,n=[]){return t==="x"?ac(n)?`${e}Y`:`${e}X`:t==="y"?ac(n)?`${e}X`:`${e}Y`:null}function VY(t,e,n){const[,r]=Hn("component",n),{coordinates:i}=t;function a(o,s,c,l){const u=YY(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 eS(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")?ZY:c.startsWith("group")?XY:c.startsWith("legendContinuous")?KY:c==="legendCategory"?QY:c.startsWith("slider")?qY:c==="title"?UY:c.startsWith("scrollbar")?$Y:()=>{})()(t,e,n,r,i,a)}function XY(t,e,n,r,i,a){const{children:o}=t,s=Sn(o,l=>l.crossPadding);o.forEach(l=>l.crossPadding=s),o.forEach(l=>eS(l,e,n,r,i,a));const c=Sn(o,l=>l.size);t.size=c,o.forEach(l=>l.size=c)}function $Y(t,e,n,r,i,a){const{trackSize:o=6}=Nt({},i.scrollbar,t);t.size=o}function UY(t,e,n,r,i,a){const o=Nt({},i.title,t),{title:s,subtitle:c,spacing:l=0}=o,u=po(o,["title","subtitle","spacing"]);if(s){const f=le(u,"title"),d=Cd(s,f);t.size=d.height}if(c){const f=le(u,"subtitle"),d=Cd(c,f);t.size+=l+d.height}}function qY(t,e,n,r,i,a){const o=()=>{const{slider:u}=i;return Nt({},u,t)},{trackSize:s,handleIconSize:c}=o(),l=Math.max(s,c*2.4);t.size=l}function ZY(t,e,n,r,i,a){t.transform=t.transform||[{type:"hide"}];const o=r==="left"||r==="right",s=nS(t,r,i),{tickLength:c=0,labelSpacing:l=0,titleSpacing:u=0,labelAutoRotate:f}=s,d=po(s,["tickLength","labelSpacing","titleSpacing","labelAutoRotate"]),h=Ad(t,a),p=Td(d,h),v=c+l;if(p&&p.length){const y=Sn(p,b=>b.width),m=Sn(p,b=>b.height);if(o)t.size=y+v;else{const{tickFilter:b,labelTransform:_}=t;eV(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=Pd(d);g&&(o?t.size+=u+g.width:t.size+=u+g.height)}function KY(t,e,n,r,i,a){const s=(()=>{const{legendContinuous:_}=i;return Nt({},_,t)})(),{labelSpacing:c=0,titleSpacing:l=0}=s,u=po(s,["labelSpacing","titleSpacing"]),f=r==="left"||r==="right",d=le(u,"ribbon"),{size:h}=d,p=le(u,"handleIcon"),{size:v}=p,g=Math.max(h,v*2.4);t.size=g;const y=Ad(t,a),m=Td(u,y);if(m){const _=f?"width":"height",O=Sn(m,w=>w[_]);t.size+=O+c}const b=Pd(u);b&&(f?t.size=Math.max(t.size,b.width):t.size+=l+b.height)}function QY(t,e,n,r,i,a){const s=(()=>{const{legendCategory:k}=i,{title:R}=t,[D,F]=Array.isArray(R)?[R,void 0]:[void 0,R];return Nt({title:D},k,Object.assign(Object.assign({},t),{title:F}))})(),{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=Pd(v),M=Ad(t,a),E=Td(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,F=0,B=-1/0,z=-1/0;const Y=w?w.height:0,$=O-Y;for(const{width:tt}of E){const it=P(tt);k=Math.max(k,it),R+A>$?(D++,B=Math.max(B,F),z=Math.max(z,R),F=1,R=A):(R+=A,F++)}D<=1&&(B=F,z=R),t.size=k*b(D),t.length=z+Y,Nt(t,{cols:b(D),gridRow:B})})():typeof g=="number"?(()=>{const k=Math.ceil(E.length/g),R=Sn(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:F}of E){const B=P(F,d);R+B>O?(D=Math.max(D,R),R=B,k++):R+=B}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 Ad(t,e){const[n]=Hn("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 Td(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=JY(e,r,i),c=le(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 Cd(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 Pd(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=le(r,"title"),{direction:a,transform:o}=i,s=Array.isArray(n)?n.join(","):n;return typeof s!="string"?null:Cd(s,Object.assign(Object.assign({},i),{transform:o||(a==="vertical"?"rotate(-90)":"")}))}function nS(t,e,n){const{title:r}=t,[i,a]=Array.isArray(r)?[r,void 0]:[void 0,r],{axis:o,[`axis${tv(e)}`]:s}=n;return Nt({title:i},o,s,Object.assign(Object.assign({},t),{title:a}))}function rS(t,e){const n=t.getTicks?t.getTicks():t.getOptions().domain;return e?n.filter(e):n}function JY(t,e,n){const i=rS(t,n).map(o=>typeof o=="number"?Xf(o):o),a=e?typeof e=="string"?oo(e):e:t.getFormatter?t.getFormatter():o=>`${o}`;return i.map(a)}function tV(t,e){return t.getBandWidth?t.getBandWidth(e)/2:0}function eV(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=rS(t,i),c=s.map(h=>o.map(h)+tV(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 Cd(t,e){const n=nV(t),{filter:r}=e,i=po(e,["filter"]);return n.attr(Object.assign(Object.assign({},i),{visibility:"none"})),n.getBBox()}function nV(t){return t instanceof Vr?t:new Zi({style:{text:`${t}`}})}function Ai(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 rV(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 iV(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}=oV(t,e,n,r),C=1/4,j=(ce,Oe,He,Fe,Ke)=>{const{marks:dn}=e;if(dn.length===0)return[Fe,Ke];if(ce-Fe-Ke-ce*C>0)return[Fe,Ke];const yr=ce*(1-C);return[Oe==="auto"?yr*Fe/(Fe+Ke):Fe,He==="auto"?yr*Ke/(Fe+Ke):Ke]},N=ce=>ce==="auto"?20:ce!=null?ce:20,k=N(P),R=N(M),D=iS(t,s-k-R,[k+_,R+b],["left","right"],e,n,r),{paddingLeft:F,paddingRight:B}=D,z=o-m-O,[Y,$]=j(z,E,A,F,B),tt=z-Y-$,it=iS(t,tt,[Y+m,$+O],["bottom","top"],e,n,r),{paddingTop:St,paddingBottom:Ft}=it,Xt=s-b-_,[Pt,Ct]=j(Xt,M,P,Ft,St),se=Xt-Pt-Ct;return{width:o,height:s,depth:c,insetLeft:h,insetTop:p,insetBottom:v,insetRight:g,innerWidth:tt,innerHeight:se,paddingLeft:Y,paddingRight:$,paddingTop:Ct,paddingBottom:Pt,marginLeft:m,marginBottom:b,marginTop:_,marginRight:O,x:l,y:u,z:f}}function aV(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 oV(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 nS(y,m,n)}),s=Sn(o,y=>{var m;return(m=y.labelSpacing)!==null&&m!==void 0?m:0}),c=a.flatMap((y,m)=>{const b=o[m],_=Ad(y,r);return Td(b,_)}).filter(Rn),l=Sn(c,y=>y.height)+s,u=a.flatMap((y,m)=>{const b=o[m];return Pd(b)}).filter(y=>y!==null),f=u.length===0?0:Sn(u,y=>y.height),{inset:d=l,insetLeft:h=d,insetBottom:p=d,insetTop:v=d+f,insetRight:g=d}=e;return Object.assign(Object.assign({},e),{insetLeft:h,insetBottom:p,insetTop:v,insetRight:g})}function iS(t,e,n,r,i,a,o){const s=Zn(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${tv(PO(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=Sn(A.children,P=>P.size)):A.size=A.defaultSize},_=A=>{A.size||(y!=="auto"?b(A):(eS(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=Ai(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=tS(g,A);P.forEach(_);const C=P.reduce((j,{size:N,crossPadding:k=12})=>j+N+k,0);h[v]=C}}return h}function sV(t,e,n){const r=Zn(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:eg({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:eg({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:eg({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]=N_(M,N=>typeof N.type!="string"?!1:!!(A==="center"||N.type.startsWith("axis")&&["inner","outer"].includes(A)));C.length&&cV(C,e,P,A),j.length&&yV(M,e,P)}}function eg({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 cV(t,e,n,r){const[i,a]=N_(t,o=>!!(typeof o.type=="string"&&o.type.startsWith("axis")));lV(i,e,n,r),mV(a,e,n)}function lV(t,e,n,r){r==="center"?uF(e)?gV(t,e,n,r):Nn(e)?dV(t,e,n):dl(e)&&hV(t,e,n,t[0].orientation):r==="inner"?uV(t,e,n):r==="outer"&&fV(t,e,n)}function uV(t,e,n){const[r,i,,a]=n,[o,s]=e.getCenter(),[c]=$f(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 fV(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 dV(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 hV(t,e,n,r){r==="horizontal"?vV(t,e,n):r==="vertical"&&pV(t,e,n)}function pV(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 vV(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 gV(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 yV(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 $;const tt=($=Y.layout)===null||$===void 0?void 0:$.justifyContent;return tt||z},"flex-start"),R=C.map((z,Y)=>{const{length:$=N,padding:tt=0}=z;return $+(Y===C.length-1?0:tt)}),D=Di(R),F=j-D,B=k==="flex-start"?0:k==="center"?F/2:F;for(let z=0,Y=P[p]+B;z<C.length;z++){const $=C[z],{padding:tt=0}=$,it=z===C.length-1?0:tt;$.bbox={[g]:P[g],[d]:P[d],[p]:Y,[m]:R[z]-it},Nt($,{layout:{justifyContent:k}}),Y+=R[z]}}}function mV(t,e,n){if(t.length===0)return;const[r,i,a,o]=n,[s]=$f(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=le(t,e);return Nt(n,i)}function ng(t,e={}){return ka(t)||Array.isArray(t)||!aS(t)?t:Nt(e,t)}function aS(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"?le(t,e):t}var bV=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 xV(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 oS(t,e,n){return bV(this,void 0,void 0,function*(){const{library:r}=n,{data:i}=e,[a]=Hn("data",r),o=LV(i),{transform:s=[]}=o,u=[uc(o,["transform"]),...s].map(a),f=yield Y7(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 _V(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 OV(t,e,n){const{encode:r,data:i}=e;if(!r)return[t,e];const a=so(r,o=>CV(o)?o:{type:kV(i,o),value:o});return[t,Object.assign(Object.assign({},e),{encode:a})]}function wV(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"||PY(o)?a:Object.assign(Object.assign({},a),{constant:!0})});return[t,Object.assign(Object.assign({},e),{encode:i})]}function SV(t,e,n){const{encode:r,data:i}=e;if(!r)return[t,e];const{library:a}=n,o=jV(a),s=so(r,c=>o(i,c));return[t,Object.assign(Object.assign({},e),{encode:s})]}function MV(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)&&aS(r)?[t,Object.assign(Object.assign({},e),{tooltip:r})]:[t,Object.assign(Object.assign({},e),{tooltip:{items:[r]}})]}function EV(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 AV(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 TV(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 Nt(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 PV(t,e,n){const{animate:r}=e;return r||r===void 0?[t,e]:(Nt(e,{animate:{enter:{type:null},exit:{type:null},update:{type:null}}}),[t,e])}function CV(t){if(typeof t!="object"||t instanceof Date||t===null)return!1;const{type:e}=t;return Rn(e)}function kV(t,e){return typeof e=="function"?"transform":typeof e=="string"&&RV(t,e)?"field":"constant"}function RV(t,e){return Array.isArray(t)?t.some(n=>n[e]!==void 0):!1}function LV(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 sS=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())})},NV=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 IV(t,e,n){return sS(this,void 0,void 0,function*(){const r={library:n},[i,a]=yield DV(t,e,r),{encode:o,scale:s,data:c,tooltip:l}=a;if(Array.isArray(c)===!1)return null;const{channels:u}=e,f=Q0(Object.entries(o).filter(([,h])=>Rn(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(F=>F.visual),A=w.some(F=>F.constant),P=s[O]||{},{independent:C=!1,key:j=g||O,type:N=A?"constant":E?"identity":v}=P,k=NV(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 jV(t){const[e]=Hn("encode",t);return(n,r)=>r===void 0||n===void 0?null:Object.assign(Object.assign({},r),{type:"column",value:e(r)(n),field:FV(r)})}function DV(t,e,n){return sS(this,void 0,void 0,function*(){const{library:r}=n,[i]=Hn("transform",r),{preInference:a=[],postInference:o=[]}=e,{transform:s=[]}=t,c=[xV,oS,_V,OV,wV,SV,AV,PV,TV,MV,...a.map(i),...s.map(i),...o.map(i),EV];let l=[],u=t;for(const f of c)[l,u]=yield f(l,u,n);return[l,u]})}function FV(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 rg(t,e,n,r){var i,a;return Da(this,void 0,void 0,function*(){const[o]=Hn("composition",n),[s]=Hn("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(Rn)),l=new Set(Object.keys(n).map(k=>{var R;return(R=/component\.(.*)/.exec(k))===null||R===void 0?void 0:R[1]}).filter(Rn)),u=k=>{const{type:R}=k;if(typeof R=="function"){const{props:D={}}=R,{composite:F=!0}=D;if(F)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,F]=R?fS(R,k,n):yield lS(k,n);g.set(D,k),v.push(D);const B=F.flatMap(p).map(z=>qO(z,n));if(m.push(...B),B.every(d)){const z=yield Promise.all(B.map(Y=>uS(Y,n)));cY(z);for(let Y=0;Y<B.length;Y++){const $=B[Y],tt=z[Y];y.set($,tt)}}}else{const R=f(k)?k:yield vS(k,n),D=p(R);Array.isArray(D)?m.push(...D):typeof D=="function"&&b.push(D())}}r.emitter.emit(wn.BEFORE_PAINT);const _=new Map,O=new Map,w=[];e.selectAll(ya(X0)).data(v,k=>k.key).join(k=>k.append("g").attr("className",X0).attr("id",R=>R.key).call(cS).each(function(R,D,F){ag(R,je(F),w,n,r),_.set(R,F)}),k=>k.call(cS).each(function(R,D,F){ag(R,je(F),w,n,r),O.set(R,F)}),k=>k.each(function(R,D,F){const B=F.nameInteraction.values();for(const z of B)z.destroy()}).remove());const M=k=>Array.from(k.entries()).map(([R,D])=>{const F=new Map,B=($,tt=it=>it)=>F.set($,tt),z=g.get(R),Y=zV(je(D),z,n,r);return{view:R,container:D,options:z,setState:B,update:$=>Da(this,void 0,void 0,function*(){const it=J0(Array.from(F.values()))(z);return yield Y(it,$)})}}),E=M(_);for(const k of E){const{options:R}=k,D=new Map;k.container.nameInteraction=D;for(const F of kd(R)){const[B,z]=F;if(z){const $=ig(k.view,B,z,s)(k,E,r.emitter);D.set(B,{destroy:$})}}}const A=M(O);for(const k of A){const{options:R,container:D}=k,F=D.nameInteraction;for(const B of kd(R)){const[z,Y]=B,$=F.get(z);if($&&((i=$.destroy)===null||i===void 0||i.call($)),Y){const it=ig(k.view,z,Y,s)(k,A,r.emitter);F.set(z,{destroy:it})}}}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 F of k){const B=Object.assign({width:P,height:C},F);yield rg(B,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(wn.AFTER_PAINT);const N=w.filter(Rn).map(eX).map(k=>k.finished);return Promise.all([...N,...j])})}function cS(t){t.style("transform",e=>`translate(${e.layout.x}, ${e.layout.y})`)}function BV(t){const[,e]=Hn("interaction",t);return n=>{const[r,i]=n;try{return[r,e(r)]}catch(a){return[r,i.type]}}}function zV(t,e,n,r){const i=BV(n),a=c=>c[1]&&c[1].props&&c[1].props.reapplyWhenUpdate,s=kd(e).map(i).filter(a).map(c=>c[0]);return(c,l)=>Da(this,void 0,void 0,function*(){const u=[],[f,d]=yield lS(c,n);ag(f,t,u,n,r);for(const h of s.filter(p=>p!==l))GV(h,t,c,f,n,r);for(const h of d)rg(h,t,n,r);return{options:c,view:f}})}function GV(t,e,n,r,i,a){var o;const[s]=Hn("interaction",i),l=e.node().nameInteraction,u=kd(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=ig(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 lS(t,e){return Da(this,void 0,void 0,function*(){const n=yield HV(t,e),r=WV(n);t.interaction=r.interaction,t.coordinate=r.coordinate,t.marks=[...r.marks,...r.components];const i=qO(r,e),a=yield uS(i,e);return fS(a,i,e)})}function WV(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)=>Nt(d,h),{}),u=[n,...s].reduce((d,h)=>Nt(d,h),{}),f=[...c,r].reduce((d,h)=>Nt(d,h),{});return Object.assign(Object.assign({},a),{marks:i,coordinate:l,interaction:u,style:f})}function HV(t,e){return Da(this,void 0,void 0,function*(){const[n,r]=Hn("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(Rn)),{marks:a}=t,o=[],s=[],c=[...a],{width:l,height:u}=aV(t),f={options:t,width:l,height:u};for(;c.length;){const[d]=c.splice(0,1),h=yield vS(d,e),{type:p=Vs("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 uS(t,e){return Da(this,void 0,void 0,function*(){const[n]=Hn("theme",e),[,r]=Hn("mark",e),{theme:i,marks:a,coordinates:o=[]}=t,s=n(pS(i)),c=new Map;for(const u of a){const{type:f}=u,{props:d={}}=r(f),h=yield IV(u,d,e);if(h){const[p,v]=h;c.set(p,v)}}const l=Zn(Array.from(c.values()).flatMap(u=>u.channels),({scaleKey:u})=>u);for(const u of l.values()){const f=u.reduce((b,{scale:_})=>Nt(b,_),{}),{scaleKey:d}=u[0],{values:h}=u[0],p=Array.from(new Set(h.map(b=>b.field).filter(Rn))),v=Nt({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({},iY(g,y,v,o,s,e)),{key:d});u.forEach(b=>b.scale=m)}return c})}function ig(t,e,n,r){const i=t.theme,a=typeof e=="string"?i[e]||{}:{};return r(Nt(a,Object.assign({type:e},n)))}function fS(t,e,n){const[r]=Hn("mark",n),[i]=Hn("theme",n),[a]=Hn("labelTransform",n),{key:o,frame:s=!1,theme:c,clip:l,style:u={},labelTransform:f=[]}=e,d=i(pS(c)),h=Array.from(t.values()),p=oY(h,e),v=jY(IY(aX(Array.from(p),h,t),e,n)),g=iV(v,e,d,n),y=IW(g,e,n),m=s?Nt({mainLineWidth:1,mainStroke:"#000"},u):u;sV(tS(v),y,g),rV(v);const b={};for(const w of v){const{scales:M=[]}=w,E=[];for(const A of M){const{name:P}=A,C=Hw(A,n);E.push(C),Ww(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:Ct,scale:se})=>[Ct,se])),D=so(R,Ct=>Hw(Ct,n));Ww(b,D);const F=aY(N,D),B=r(w),[z,Y,$]=XV(B(j,D,F,y)),tt=A||z.length,it=P?P(Y,tt,g):[],St=Ct=>{var se,ce;return(ce=(se=k.title)===null||se===void 0?void 0:se[Ct])===null||ce===void 0?void 0:ce.value},Ft=Ct=>k.items.map(se=>se[Ct]),Xt=z.map((Ct,se)=>{const ce=Object.assign({points:Y[se],transform:it[se],index:Ct,markKey:C,viewKey:o},k&&{title:St(Ct),items:Ft(Ct)});for(const[Oe,He]of Object.entries(F))ce[Oe]=He[Ct],$&&(ce[`series${ao(Oe)}`]=$[se].map(Fe=>He[Fe]));return $&&(ce.seriesIndex=$[se]),$&&k&&(ce.seriesItems=$[se].map(Oe=>Ft(Oe)),ce.seriesTitle=$[se].map(Oe=>St(Oe))),ce});M.data=Xt,M.index=z;const Pt=E==null?void 0:E(Xt,D,g);_.push(...Pt||[])}return[{layout:g,theme:d,coordinate:y,markState:t,key:o,clip:l,scale:b,style:m,components:v,labelTransform:J0(f.map(a))},_]}function ag(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((B,z)=>z),O=["a","margin","padding","inset"],w=b.map(B=>S_(Object.assign({},o.view,f),B)),M=O.map(B=>le(m,B)),E=B=>B.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,$){oX(je($),w[z])});let A=0,P=0,C=g,j=y;const N=_.map(B=>{const z=M[B],{left:Y=0,top:$=0,bottom:tt=0,right:it=0}=z;return A+=Y,P+=$,C-=Y+it,j-=$+tt,{x:A,y:P,width:C,height:j}});e.selectAll(ya(s_)).data(_.filter(B=>Rn(w[B])),B=>b[B]).join(B=>B.append("rect").attr("className",s_).style("zIndex",-2).call(E),B=>B.call(E),B=>B.remove());const k=ZV(c),R=k?{duration:k[1]}:!1;for(const[,B]of Wf(a,z=>`${z.type}-${z.position}`))B.forEach((z,Y)=>z.index=Y);const D=e.selectAll(ya(o_)).data(a,B=>`${B.type}-${B.position}-${B.index}`).join(B=>B.append("g").style("zIndex",({zIndex:z})=>z||-1).attr("className",o_).append(z=>Jw(Nt({animate:R,scale:h},z),l,o,r,c)),B=>B.transition(function(z,Y,$){const{preserve:tt=!1}=z;if(tt)return;const it=Jw(Nt({animate:R,scale:h},z),l,o,r,c),{attributes:St}=it,[Ft]=$.childNodes;return Ft.update(St)})).transitions();n.push(...D.flat().filter(Rn));const F=e.selectAll(ya(Ff)).data([s],()=>u).join(B=>B.append("rect").style("zIndex",0).style("fill","transparent").attr("className",Ff).call(gS).call(mS,Array.from(c.keys())).call(bS,d),B=>B.call(mS,Array.from(c.keys())).call(z=>k?iX(z,k):gS(z)).call(bS,d)).transitions();n.push(...F.flat());for(const[B,z]of c.entries()){const{data:Y}=z,{key:$,class:tt,type:it}=B,St=e.select(`#${$}`),Ft=JV(B,z,t,r,i),Xt=tX(B,z,t,r),Pt=nX(B,z,t,r),Ct=rX(B,z,t,r),se=KV(e,St,tt,"element"),ce=St.selectAll(ya(Ca)).selectFacetAll(se).data(Y,Oe=>Oe.key,Oe=>Oe.groupKey).join(Oe=>Oe.append(Ft).attr("className",Ca).attr("markType",it).transition(function(He,Fe,Ke){return Xt(He,[Ke])}),Oe=>Oe.call(He=>{const Fe=He.parent(),Ke=V7(dn=>{const[xn,Yn]=dn.getBounds().min;return[xn,Yn]});He.transition(function(dn,xn,Yn){QV(Yn,Fe,Ke);const yr=Ft(dn,xn),xi=Pt(dn,[Yn],[yr]);return xi!==null||(Yn.nodeName===yr.nodeName&&yr.nodeName!=="g"?ev(Yn,yr):(Yn.parentNode.replaceChild(yr,Yn),yr.className=Ca,yr.markType=it,yr.__data__=Yn.__data__)),xi}).attr("markType",it).attr("className",Ca)}),Oe=>Oe.each(function(He,Fe,Ke){Ke.__removed__=!0}).transition(function(He,Fe,Ke){return Ct(He,[Ke])}).remove(),Oe=>Oe.append(Ft).attr("className",Ca).attr("markType",it).transition(function(He,Fe,Ke){const{__fromElements__:dn}=Ke,xn=Pt(He,dn,[Ke]);return new _r(dn,null,Ke.parentNode).transition(xn).remove(),xn}),Oe=>Oe.transition(function(He,Fe,Ke){const xn=new _r([],Ke.__toData__,Ke.parentNode).append(Ft).attr("className",Ca).attr("markType",it).nodes();return Pt(He,[Ke],xn)}).remove()).transitions();n.push(...ce.flat())}YV(t,e,n,r,i)})}function YV(t,e,n,r,i){const[a]=Hn("labelTransform",r),{markState:o,labelTransform:s}=t,c=e.select(ya(V0)).node(),l=new Map,u=new Map,f=Array.from(o.entries()).flatMap(([v,g])=>{const{labels:y=[],key:m}=v,b=qV(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=VV(E,w,A);return P.forEach(C=>{l.set(C,b),u.set(C,O)}),P})})}),d=je(c).selectAll(ya($0)).data(f,v=>v.key).join(v=>v.append(g=>l.get(g)(g)).attr("className",$0),v=>v.each(function(g,y,m){const _=l.get(g)(g);ev(m,_)}),v=>v.remove()).nodes(),h=Zn(d,v=>u.get(v.__data__)),{coordinate:p}=t;for(const[v,g]of h){const{transform:y=[]}=v;J0(y.map(a))(g,p)}s&&s(d,p)}function VV(t,e,n){const{seriesIndex:r,seriesKey:i,points:a,key:o,index:s}=n.__data__,c=UV(n);if(!r)return[Object.assign(Object.assign({},t),{key:`${o}-${e}`,bounds:c,index:s,points:a,dependentElement:n})];const l=$V(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 XV([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])=>Rn(c)&&Rn(l))&&(r.push(o),i.push(s))}return[r,i]}function $V(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 UV(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 qV(t,e,n,r,i){const[a]=Hn("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:$O(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=>dS(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=hS(u,"label",M,"label");return N(v,C,k,l)}}function dS(t,e,n,r){return typeof t=="function"?t(e,n,r):typeof t!="string"?t:e[t]!==void 0?e[t]:t}function ZV(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 KV(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 QV(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})`;X7(t,l),e.append(t)}function JV(t,e,n,r,i){const[a]=Hn("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:$O(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=>dS(N,E,A,o)),C=l[m]?l[m](P,v):a(Object.assign(Object.assign({},P),{type:yS(t,m)}),v),j=hS(f,h,m,s);return C(b,M,j,u)}}function hS(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 og(t,e,n,r,i){var a,o;const[,s]=Hn("shape",i),[c]=Hn("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(yS(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,Nt(g,{delay:M,duration:E,easing:A}));return Array.isArray(N)?N:[N]}}function tX(t,e,n,r){return og("enter",t,e,n,r)}function eX(t){return t.finished.then(()=>{t.cancel()}),t}function nX(t,e,n,r){return og("update",t,e,n,r)}function rX(t,e,n,r){return og("exit",t,e,n,r)}function pS(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 kd(t){const e={event:!0,tooltip:!0,sliderFilter:!0,legendFilter:!0,scrollbarFilter:!0},{interaction:n={}}=t;return Object.entries(Nt(e,n)).reverse()}function vS(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 oS([],{data:r},n);return Object.assign({data:a},i)})}function gS(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 iX(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 yS(t,e){const{type:n}=t;return typeof e=="string"?`${n}.${e}`:e}function mS(t,e){const n=a=>a.class!==void 0?`${a.class}`:"";t.nodes().length===0||(t.selectAll(ya(a_)).data(e,a=>a.key).join(a=>a.append("g").attr("className",a_).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(V0)).node())||t.append("g").attr("className",V0).style("zIndex",0)}function ya(...t){return t.map(e=>`.${e}`).join("")}function bS(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 $o({style:{x:i+a,y:r+o,width:s,height:c}})})}function aX(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 oX(t,e){for(const[n,r]of Object.entries(e))t.style(n,r)}function xS(t){const e=Nt({},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=Nt({},o[s]);o[s]=c,n.set(c,a),r.set(c,s),i.push(c)}}return e}function sX(t,e){const n=new h_;return n.registerPlugin(new p_),new zx({width:t,height:e,container:document.createElement("div"),renderer:n})}function cX(t,e={},n=()=>{},r=i=>{throw i}){const{width:i=640,height:a=480,depth:o=0}=t,s=xS(t),{canvas:c=sX(i,a),emitter:l=new Hp,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(wn.BEFORE_RENDER);const h=je(c.document.documentElement);return c.ready.then(()=>rg(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(wn.AFTER_RENDER),n==null||n()})}).catch(p=>{r==null||r(p)}),uX(c.getConfig().container)}function npt(t,e={},n=()=>{},r=i=>{throw i}){var i;const{width:a=640,height:o=480}=t,s=xS(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 _S(t,e={},n=!1){const{canvas:r,emitter:i}=e;r&&(lX(r),n?r.destroy():r.destroyChildren()),i.off()}function lX(t){const e=t.getRoot().querySelectorAll(`.${X0}`);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 uX(t){return typeof t=="string"?document.getElementById(t):t}const fc=t=>t?parseInt(t):0;function fX(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 rpt(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 sg(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 cg{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 sg(this,i=>{e===i.attr("key")&&(n=i)}),n}getNodesByType(e){const n=[];return sg(this,i=>{e===i.type&&n.push(i)}),n}getNodeByType(e){let n=null;return sg(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 OS=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const wS=["width","height","depth","padding","paddingLeft","paddingRight","paddingBottom","paddingTop","inset","insetLeft","insetRight","insetTop","insetBottom","margin","marginLeft","marginRight","marginTop","marginBottom","autoFit","theme","title"],SS="__remove__",MS="__callback__",ES=1,AS=1;function dX(t){if(t===void 0){const e=document.createElement("div");return e[SS]=!0,e}return typeof t=="string"?document.getElementById(t):t}function hX(t){const e=t.parentNode;e&&e.removeChild(t)}function pX(t){if(t.type!==null)return t;const e=t.children[t.children.length-1];for(const n of wS)e.attr(n,t.attr(n));return e}function TS(t){return Object.assign(Object.assign({},t.value),{type:t.type})}function lg(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}=fX(e);o=c||o,s=l||s}return{width:Math.max((0,xr.Z)(o)?o:ES,ES),height:Math.max((0,xr.Z)(s)?s:AS,AS),depth:a}}function vX(t){const e=pX(t),n=[e],r=new Map;for(r.set(e,TS(e));n.length;){const i=n.pop(),a=r.get(i),{children:o=[]}=i;for(const s of o)if(s.type===MS)a.children=s.value;else{const c=TS(s),{children:l=[]}=a;l.push(c),n.push(s),r.set(s,c),a.children=l}}return r.get(e)}function gX(t,e){return typeof t=="function"?!0:new Set(Object.keys(e)).has(t)}function yX(t,e,n,r){const{type:i}=t,{type:a=n||i}=e;if(a==="view"||!gX(a,r))return e;const o={type:"view"},s=Object.assign({},e);for(const c of wS)s[c]!==void 0&&(o[c]=s[c],delete s[c]);return Object.assign(Object.assign({},o),{children:[s]})}function mX(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 bX(t,e,n){if(typeof t=="function"){const c=new cg;return c.value=t,c.type=MS,c}const{type:r,children:i}=t,a=OS(t,["type","children"]),o=mX(r,e,n),s=new o;return s.value=a,s.type=r,s}function xX(t,e){const{type:n,children:r}=e,i=OS(e,["type","children"]);t.type===n||n===void 0?E_(t.value,i):typeof n=="string"&&(t.type=n,t.value=i)}function _X(t,e,n,r){if(!t)return;const i=[[t,e]];for(;i.length;){const[a,o]=i.shift(),s=bX(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 OX(t,e,n,r,i){const a=yX(t,e,n,r),o=[[null,t,a]];for(;o.length;){const[s,c,l]=o.shift();if(!c)_X(s,l,r,i);else if(!l)c.remove();else{xX(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 wX(){let t,e;return[new Promise((r,i)=>{e=r,t=i}),e,t]}const SX={visibility:"visible",opacity:1,fillOpacity:1,strokeOpacity:1};function MX(t,e){var n;return(n=t.style[e])!==null&&n!==void 0?n:SX[e]}function ug(t,e,n,r){t.style[e]=n,r&&t.children.forEach(i=>ug(i,e,n,r))}function fg(t){ug(t,"visibility","hidden",!0)}function dg(t){ug(t,"visibility","visible",!0)}function EX(t,e,{key:n=e}){t.prototype[e]=function(r){return arguments.length===0?this.attr(n):this.attr(n,r)}}function AX(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 TX(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 PX(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 CX(t,e,{ctor:n}){t.prototype[e]=function(r){const i=this.append(n);return e==="mark"&&(i.type=r),i}}function kX(t,e,{ctor:n}){t.prototype[e]=function(){return this.type=null,this.append(n)}}function Rd(t){return e=>{for(const[n,r]of Object.entries(t)){const{type:i}=r;i==="value"?EX(e,n,r):i==="array"?AX(e,n,r):i==="object"?TX(e,n,r):i==="node"?CX(e,n,r):i==="container"?kX(e,n,r):i==="mix"&&PX(e,n,r)}return e}}function PS(t){return Object.fromEntries(Object.entries(t).map(([e,n])=>[e,{type:"node",ctor:n}]))}const CS={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"}},RX=Object.assign(Object.assign({},CS),{tooltip:{type:"mix"},viewStyle:{type:"object"}}),LX=Object.assign(Object.assign({},CS),{labelTransform:{type:"array"}});var NX=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 Ld=class extends cg{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()&&dg(e)}hide(){const e=this.getGroup();e&&e.isVisible()&&fg(e)}};Ld=NX([Rd(LX)],Ld);var IX=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 hg=class extends cg{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}};hg=IX([Rd(RX)],hg);var jX=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},DX=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 FX="G2_CHART_KEY";class BX extends Ld{constructor(e){const{container:n,canvas:r,renderer:i,plugins:a,lib:o}=e,s=DX(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=v_(()=>{this.forceFit()},300),this._renderer=i||new h_,this._plugins=a||[],this._container=dX(n),this._emitter=new Hp,this._context={library:Object.assign(Object.assign({},o),c_),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)=>cX(this._computedOptions(),this._context,this._createResolve(a),this._createReject(o))),[n,r,i]=wX();return e.then(r).catch(i).then(()=>this._renderTrailing()),n}options(e){if(arguments.length===0)return vX(this);const{type:n}=e;return n&&(this._previousDefinedType=n),OX(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(wn.BEFORE_CLEAR),this._reset(),_S(e,this._context,!1),this.emit(wn.AFTER_CLEAR)}destroy(){const e=this.options();this.emit(wn.BEFORE_DESTROY),this._unbindAutoFit(),this._reset(),_S(e,this._context,!0),this._container[SS]&&hX(this._container),this.emit(wn.AFTER_DESTROY)}forceFit(){this.options.autoFit=!0;const{width:e,height:n}=lg(this.options(),this._container);if(e===this._width&&n===this._height)return Promise.resolve(this);this.emit(wn.BEFORE_CHANGE_SIZE);const r=this.render();return r.then(()=>{this.emit(wn.AFTER_CHANGE_SIZE)}),r}changeSize(e,n){if(e===this._width&&n===this._height)return Promise.resolve(this);this.emit(wn.BEFORE_CHANGE_SIZE),this.attr("width",e),this.attr("height",n);const r=this.render();return r.then(()=>{this.emit(wn.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 hg{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 Ld{constructor(){super({},o)}};return s=jX([Rd(PS(this._marks))],s),[o,s]}));for(const a of Object.values(this._compositions))Rd(PS(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=FX}=e,{width:r,height:i,depth:a}=lg(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}=lg(this.options(),this._container);this._plugins.push(new p_),this._plugins.forEach(r=>this._renderer.registerPlugin(r)),this._context.canvas=new zx({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 zX(t,e){class n extends t{constructor(i){super(Object.assign(Object.assign({},i),{lib:e}))}}return n}Et.enableCSSParsing=!1;var GX=Object.prototype.hasOwnProperty,kS=function(t,e){if(t===null||!io(t))return{};var n={};return kv(e,function(r){GX.call(t,r)&&(n[r]=t[r])}),n};function RS(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 WX(){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(RS),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 HX=yt(37482);function YX(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 VX(){return this.eachAfter(YX)}var pg=yt(6419);function XX(t,e){var n=-1,r=pg(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 $X(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 UX(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 qX(t,e){var n=-1,r=pg(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 ZX(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 KX(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})}function QX(t){for(var e=this,n=JX(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 JX(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 t$(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e}function e$(){return Array.from(this)}function n$(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t}function r$(){var t=this,e=[];return t.each(function(n){n!==t&&e.push({source:n.parent,target:n})}),e}var LS=yt(29195),i$=LS().mark(NS);function NS(){var t,e,n,r,i,a;return LS().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()}},i$,this)}function dc(t,e){t instanceof Map?(t=[void 0,t],e===void 0&&(e=s$)):e===void 0&&(e=o$);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(IS)}function a$(){return dc(this).eachBefore(c$)}function o$(t){return t.children}function s$(t){return Array.isArray(t)?t[1]:null}function c$(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function IS(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=HX({constructor:hc,count:VX,each:XX,eachAfter:UX,eachBefore:$X,find:qX,sum:ZX,sort:KX,path:QX,ancestors:t$,descendants:e$,leaves:n$,links:r$,copy:a$},Symbol.iterator,NS);var l$=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},u$=l$;function vg(t,e){for(var n in e)e.hasOwnProperty(n)&&n!=="constructor"&&e[n]!==void 0&&(t[n]=e[n])}function f$(t,e,n,r){return e&&vg(t,e),n&&vg(t,n),r&&vg(t,r),t}function d$(t){return(0,ye.Z)(t)?0:ll(t)?t.length:Object.keys(t).length}const h$={field:"value",size:[1,1],round:!1,padding:0,sort:(t,e)=>e.value-t.value,as:["x","y"],ignoreParentValue:!0},p$="nodeIndex",Nl="childNodeCount",v$="nodeAncestor",gg="Invalid field: it must be a string!";function g$(t,e){const{field:n,fields:r}=t;if(tr(n))return n;if(Dr(n))return console.warn(gg),n[0];if(console.warn(`${gg} will try to get fields instead.`),tr(r))return r;if(Dr(r)&&r.length)return r[0];if(e)return e;throw new TypeError(gg)}function y$(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=u$((((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[v$]=s,i[Nl]=((o=i.children)===null||o===void 0?void 0:o.length)||0,i[p$]=r,e.push(i)})}else t&&t.eachNode&&t.eachNode(n=>{e.push(n)});return e}function m$(t,e){e=f$({},h$,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=g$(e)}catch(c){console.warn(c)}const a=(c=>WX().size(e.size).round(e.round).padding(e.padding)(dc(c).sum(l=>d$(l.children)?e.ignoreParentValue?0:l[r]-Y2(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]})}),y$(a)}var b$=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",yg="markType",ipt="value",jS="path",Nd="ancestor-node";function x$(t){const{data:e,encode:n}=t,{color:r,value:i}=n,o=m$(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({},kS(c.data,[i])),{[jS]:h,[Nd]:v.data.name}),c);r&&r!==Nd&&(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 DS={id:pc,encode:{x:"x",y:"y",key:jS,color:Nd,value:"value"},axis:{x:!1,y:!1},style:{[yg]: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}},FS=t=>{const{encode:e,data:n=[],legend:r}=t,i=b$(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({},DS.encode),e),{value:s}=o,c=x$({encode:o,data:n});return[Nt({},DS,Object.assign(Object.assign({type:"rect",data:c,encode:o,tooltip:{title:"path",items:[l=>({name:s,value:l[s]})]}},i),{coordinate:a}))]};FS.props={};var _$=Object.keys?function(t){return Object.keys(t)}:function(t){var e=[];return kv(t,function(n,r){gi(t)&&r==="prototype"||e.push(r)}),e},O$=_$,w$=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 S$=t=>t.querySelectorAll(".element").filter(e=>zi(e,["style",yg])===pc);function M$(t){return je(t).select(`.${Ff}`).node()}const E$={rootText:"root",style:{fill:"rgba(0, 0, 0, 0.85)",fontSize:12,y:1},active:{fill:"rgba(0, 0, 0, 0.5)"}};function A$(t={}){const{breadCrumb:e={},fixedColor:n=!0}=t,r=Nt({},E$,e);return i=>{const{update:a,setState:o,container:s,view:c,options:l}=i,u=M$(s),f=l.marks.find(({id:m})=>m===pc),{state:d}=f,h=new Fr;u.appendChild(h);const p=(m,b)=>w$(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[Nd]=j.split(" / ")[b]),m?new RegExp(`^${m}.+`).test(j):!0});return Nt({},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",yg])!==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=O$(Object.assign(Object.assign({},d.active),d.inactive)),y=()=>{S$(u).forEach(b=>{const _=zi(b,["style",Nl]);if(zi(b,["style","cursor"])!=="pointer"&&_){b.style.cursor="pointer";const w=kS(b.attributes,g);b.addEventListener("mouseenter",()=>{b.attr(d.active)}),b.addEventListener("mouseleave",()=>{b.attr(Nt(w,d.inactive))})}})};return u.addEventListener("mousemove",y),()=>{h.remove(),u.removeEventListener("click",v),u.removeEventListener("mousemove",y)}}}Et.enableCSSParsing=!1;function T$(){return{"interaction.drillDown":A$,"mark.sunburst":FS}}const BS=()=>[["cartesian"]];BS.props={};const mg=()=>[["transpose"],["translate",.5,.5],["reflect.x"],["translate",-.5,-.5]];mg.props={transform:!0};const P$=(t={})=>{const e={startAngle:-Math.PI/2,endAngle:Math.PI*3/2,innerRadius:0,outerRadius:1};return Object.assign(Object.assign({},e),t)},zS=t=>{const{startAngle:e,endAngle:n,innerRadius:r,outerRadius:i}=P$(t);return[...mg(),...ul({startAngle:e,endAngle:n,innerRadius:r,outerRadius:i})]};zS.props={};const bg=()=>[["parallel",0,1,0,1]];bg.props={};const GS=({focusX:t=0,focusY:e=0,distortionX:n=2,distortionY:r=2,visual:i=!1})=>[["fisheye",t,e,n,r,i]];GS.props={transform:!0};const WS=t=>{const{startAngle:e=-Math.PI/2,endAngle:n=Math.PI*3/2,innerRadius:r=0,outerRadius:i=1}=t;return[...bg(),...ul({startAngle:e,endAngle:n,innerRadius:r,outerRadius:i})]};WS.props={};const HS=({value:t})=>e=>e.map(()=>t);HS.props={};const YS=({value:t})=>e=>e.map(n=>n[t]);YS.props={};const VS=({value:t})=>e=>e.map(t);VS.props={};const XS=({value:t})=>()=>t;XS.props={};function jn(t,e){if(t!==null)return{type:"column",value:t,field:e}}function Id(t,e){const n=jn(t,e);return Object.assign(Object.assign({},n),{inferred:!0})}function jd(t,e){if(t!==null)return{type:"column",value:t,field:e,visual:!0}}function C$(t,e){const n=jn(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 sn(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]=sn(t,n);if(r!==null)return[r,i]}else return[n,null];return[null,null]}function jl(t){return t instanceof Date?!1:typeof t=="object"}const Dl=()=>(t,e)=>{const{encode:n}=e,{y1:r}=n;return r!==void 0?[t,e]:[t,Nt({},e,{encode:{y1:Id(go(t,0))}})]};Dl.props={};const ls=()=>(t,e)=>{const{encode:n}=e,{x:r}=n;return r!==void 0?[t,e]:[t,Nt({},e,{encode:{x:Id(go(t,0))},scale:{x:{guide:null}}})]};ls.props={};const $S=Math.abs,Ur=Math.atan2,us=Math.cos,k$=Math.max,xg=Math.min,ma=Math.sin,vc=Math.sqrt,qr=1e-12,Fl=Math.PI,Dd=Fl/2,R$=2*Fl;function L$(t){return t>1?0:t<-1?Fl:Math.acos(t)}function US(t){return t>=1?Dd:t<=-1?-Dd:Math.asin(t)}function N$(t){return t.innerRadius}function I$(t){return t.outerRadius}function j$(t){return t.startAngle}function D$(t){return t.endAngle}function F$(t){return t&&t.padAngle}function B$(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 Fd(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(k$(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=N$,e=I$,n=Wn(0),r=null,i=j$,a=D$,o=F$,s=null,c=Gv(l);function l(){var u,f,d=+t.apply(this,arguments),h=+e.apply(this,arguments),p=i.apply(this,arguments)-Dd,v=a.apply(this,arguments)-Dd,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>R$-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=US(A/d*ma(E)),D=US(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 F=h*us(m),B=h*ma(m),z=d*us(O),Y=d*ma(O);if(P>qr){var $=h*us(b),tt=h*ma(b),it=d*us(_),St=d*ma(_),Ft;if(g<Fl)if(Ft=B$(F,B,it,St,$,tt,z,Y)){var Xt=F-Ft[0],Pt=B-Ft[1],Ct=$-Ft[0],se=tt-Ft[1],ce=1/ma(L$((Xt*Ct+Pt*se)/(vc(Xt*Xt+Pt*Pt)*vc(Ct*Ct+se*se)))/2),Oe=vc(Ft[0]*Ft[0]+Ft[1]*Ft[1]);C=xg(P,(d-Oe)/(ce-1)),j=xg(P,(h-Oe)/(ce+1))}else C=j=0}M>qr?j>qr?(N=Fd(it,St,F,B,h,j,y),k=Fd($,tt,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(F,B),s.arc(0,0,h,m,b,!y)):s.moveTo(F,B),!(d>qr)||!(w>qr)?s.lineTo(z,Y):C>qr?(N=Fd(z,Y,$,tt,d,-C,y),k=Fd(F,B,it,St,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-Fl/2;return[us(f)*u,ma(f)*u]},l.innerRadius=function(u){return arguments.length?(t=typeof u=="function"?u:Wn(+u),l):t},l.outerRadius=function(u){return arguments.length?(e=typeof u=="function"?u:Wn(+u),l):e},l.cornerRadius=function(u){return arguments.length?(n=typeof u=="function"?u:Wn(+u),l):n},l.padRadius=function(u){return arguments.length?(r=u==null?null:typeof u=="function"?u:Wn(+u),l):r},l.startAngle=function(u){return arguments.length?(i=typeof u=="function"?u:Wn(+u),l):i},l.endAngle=function(u){return arguments.length?(a=typeof u=="function"?u:Wn(+u),l):a},l.padAngle=function(u){return arguments.length?(o=typeof u=="function"?u:Wn(+u),l):o},l.context=function(u){return arguments.length?(s=u==null?null:u,l):s},l}var zd=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 qS(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=zd(i,["inset","radius","insetLeft","insetTop","insetRight","insetBottom","radiusBottomLeft","radiusBottomRight","radiusTopLeft","radiusTopRight","minWidth","maxWidth","minHeight"]);if(!Nn(r)&&!z_(r)){const E=!!zn(r),[A,,P]=E?yd(e):e,[C,j]=A,[N,k]=ur(P,A),R=N>0?C:C+N,D=k>0?j:j+k,F=Math.abs(N),B=Math.abs(k),z=R+s,Y=D+c,$=F-(s+l),tt=B-(c+u),it=E?Vf($,y,1/0):Vf($,v,g),St=E?Vf(tt,v,g):Vf(tt,y,1/0),Ft=E?z:z-(it-$)/2,Xt=E?Y-(St-tt)/2:Y-(St-tt);return je(t.createElement("rect",{})).style("x",Ft).style("y",Xt).style("width",it).style("height",St).style("radius",[h,p,d,f]).call(Ee,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(Ee,m).node()}const Bl=(t,e)=>{const{colorAttribute:n,opacityAttribute:r="fill",first:i=!0,last:a=!0}=t,o=zd(t,["colorAttribute","opacityAttribute","first","last"]),{coordinate:s,document:c}=e;return(l,u,f)=>{const{color:d,radius:h=0}=f,p=zd(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:F,maxWidth:B,minHeight:z}=o,Y=zd(o,["stroke","radius","radiusTopLeft","radiusTopRight","radiusBottomRight","radiusBottomLeft","innerRadius","innerRadiusTopLeft","innerRadiusTopRight","innerRadiusBottomRight","innerRadiusBottomLeft","lineWidth","inset","insetLeft","insetRight","insetBottom","insetTop","minWidth","maxWidth","minHeight"]),{color:$=d,opacity:tt}=u,it=[i?m:M,i?b:E,a?_:A,a?O:P],St=["radiusTopLeft","radiusTopRight","radiusBottomRight","radiusBottomLeft"];zn(s)&&St.push(St.shift());const Ft=Object.assign(Object.assign({radius:y},Object.fromEntries(St.map((Xt,Pt)=>[Xt,it[Pt]]))),{inset:j,insetLeft:N,insetRight:k,insetBottom:R,insetTop:D,minWidth:F,maxWidth:B,minHeight:z});return je(qS(c,l,u,s,Ft)).call(Ee,p).style("fill","transparent").style(n,$).style(EO(t),tt).style("lineWidth",C).style("stroke",g===void 0?$:g).call(Ee,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 Gd=(t,e)=>Bl(Object.assign({colorAttribute:"stroke"},t),e);Gd.props=Object.assign(Object.assign({},Bl.props),{defaultMarker:"hollowSquare"});function gc(){}function ZS(t){this._context=t}ZS.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 ZS(t)}var KS=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 z$(t,e,n){const[r,i,a,o]=t;if(zn(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=z$}=t,r=KS(t,["adjustPoints"]),{coordinate:i,document:a}=e;return(o,s,c,l)=>{const{index:u}=s,{color:f}=c,d=KS(c,["color"]),h=l[u+1],p=n(o,h,i),v=!!zn(i),[g,y,m,b]=v?yd(p):p,{color:_=f,opacity:O}=s,w=ho().curve(_g)([g,y,m,b]);return je(a.createElement("path",{})).call(Ee,d).style("path",w).style("fill",_).style("fillOpacity",O).call(Ee,r).node()}};Og.props={defaultMarker:"square"};function G$(t,e,n){const[r,i,a,o]=t;if(zn(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 QS=(t,e)=>Og(Object.assign({adjustPoints:G$},t),e);QS.props={defaultMarker:"square"};function Wd(t){return t==null?null:JS(t)}function JS(t){if(typeof t!="function")throw new Error;return t}var W$={depth:-1},tM={},wg={};function H$(t){return t.id}function Y$(t){return t.parentId}function Sg(){var t=H$,e=Y$,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 V$(n(E,A,i))}),m=y.map(eM),b=new Set(y).add(""),_=pg(m),O;try{for(_.s();!(O=_.n()).done;){var w=O.value;b.has(w)||(b.add(w),y.push(w),m.push(eM(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)?tM: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===tM)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=W$,f.eachBefore(function(E){E.depth=E.parent.depth+1,--c}).eachBefore(IS),f.parent=null,c>0)throw new Error("cycle");return f}return r.id=function(i){return arguments.length?(t=Wd(i),r):t},r.parentId=function(i){return arguments.length?(e=Wd(i),r):e},r.path=function(i){return arguments.length?(n=Wd(i),r):n},r}function V$(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 eM(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 zl(t){return Math.abs(t)>10?String(t):t.toString().padStart(2,"0")}function X$(t){const e=t.getFullYear(),n=zl(t.getMonth()+1),r=zl(t.getDate()),i=`${e}-${n}-${r}`,a=t.getHours(),o=t.getMinutes(),s=t.getSeconds();return a||o||s?`${i} ${zl(a)}:${zl(o)}:${zl(s)}`:i}const Hd=(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=>sn(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?X$(u[l]):u[l]).join(", ")};return[n,Nt({},r,{tooltip:{title:c}})]}};Hd.props={};const Yd=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,Nt({},r,{tooltip:{items:c}})]}};Yd.props={};var $$=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 nM=()=>(t,e)=>{const{encode:n}=e,{key:r}=n,i=$$(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,Nt({},e,{encode:{key:jn(o)}})]};nM.props={};function rM(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[...rM(t),{name:"title",scale:"identity"}]}function apt(){return[{type:MaybeTitle,channel:"color"},{type:MaybeTooltip,channel:["x","y","z"]}]}function yo(){return[{type:Hd,channel:"color"},{type:Yd,channel:["x","y"]}]}function yc(){return[{type:Hd,channel:"x"},{type:Yd,channel:["y"]}]}function U$(){return[{type:Hd,channel:"color"},{type:Yd,channel:["position"]}]}function mc(t={}){return rM(t)}function vr(){return[{type:nM}]}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 Vd(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"?Vd(u)*o:+u,h=typeof f=="string"?Vd(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 q$(t,e){return Array.isArray(t)?typeof e=="function"?Sg().path(e)(t):Sg()(t):dc(t)}function iM(t,e){return t.getBandWidth(t.invert(e))}const aM={rect:fs,hollow:Gd,funnel:Og,pyramid:QS},oM=()=>(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=iM(l,i[v]),y=u?iM(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]};oM.props={defaultShape:"rect",defaultLabelShape:"label",composite:!1,shape:aM,channels:[...ii({shapes:Object.keys(aM)}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"},{name:"size"}],preInference:[...vr(),{type:Dl},{type:ls}],postInference:[...Or(),...yc()],interaction:{shareTooltip:!0}};const sM={rect:fs,hollow:Gd},cM=()=>(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]};cM.props={defaultShape:"rect",defaultLabelShape:"label",composite:!1,shape:sM,channels:[...ii({shapes:Object.keys(sM)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...vr(),{type:Dl}],postInference:[...Or(),...yc()],interaction:{shareTooltip:!0}};var lM=Cg(Al);function uM(t){this._curve=t}uM.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 uM(t(n))}return e._curve=t,e}function Gl(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 Z$(){return Gl(ho().curve(lM))}var fM=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 K$=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(Ee,r),je(t).maybeAppend("line1",()=>a.createElement("path",{})).style("d",n).call(Ee,i)});function Q$(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=fM(t,["curve","gradient","gradientColor","defined","connect"]),{coordinate:c,document:l}=e;return(u,f,d)=>{const{color:h,lineWidth:p}=d,v=fM(d,["color","lineWidth"]),{color:g=h,size:y=p,seriesColor:m,seriesX:b,seriesY:_}=f,O=AO(c,f),w=zn(c),M=r&&m?MO(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(Nn(c)){const R=c.getCenter();A=D=>Z$().angle((F,B)=>nc(ur(D[B],R))).radius((F,B)=>Kn(D[B],R)).defined(([F,B])=>a(F)&&a(B)).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]=Q$(u,a),j=le(E,"connect"),N=!!C.length;if(!N||o&&!Object.keys(j).length)return je(l.createElement("path",{})).style("d",A(P)||[]).call(Ee,E).node();if(N&&!o)return je(l.createElement("path",{})).style("d",A(u)).call(Ee,E).node();const k=R=>R.map(A).join(",");return je(new K$).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 dM=(t,e)=>{const{coordinate:n}=e;return(...r)=>{const i=Nn(n)?_g:Al;return Hi(Object.assign({curve:i},t),e)(...r)}};dM.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 opt=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 spt=function t(e){function n(r){return new Lg(r,e)}return n.tension=function(r){return t(+r)},n}(0);function hM(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 pM(t,e){this._context=t,this._alpha=e}pM.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:hM(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 cpt=function t(e){function n(r){return e?new pM(r,e):new Rg(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function vM(t,e){this._context=t,this._alpha=e}vM.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:hM(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 gM=function t(e){function n(r){return e?new vM(r,e):new Lg(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function yM(t){return t<0?-1:1}function mM(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(yM(a)+yM(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function bM(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 Xd(t){this._context=t}Xd.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,bM(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,bM(this,n=mM(this,t,e)),n);break;default:Ng(this,this._t0,n=mM(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}};function xM(t){this._context=new _M(t)}(xM.prototype=Object.create(Xd.prototype)).point=function(t,e){Xd.prototype.point.call(this,e,t)};function _M(t){this._context=t}_M.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 OM(t){return new Xd(t)}function wM(t){return new xM(t)}var J$=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 SM=(t,e)=>{const n=J$(t,[]),{coordinate:r}=e;return(...i)=>{const a=Nn(r)?gM:zn(r)?wM:OM;return Hi(Object.assign({curve:a},n),e)(...i)}};SM.props=Object.assign(Object.assign({},Hi.props),{defaultMarker:"smooth"});function $d(t,e){this._context=t,this._t=e}$d.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 MM(t){return new $d(t,.5)}function EM(t){return new $d(t,0)}function AM(t){return new $d(t,1)}const TM=(t,e)=>Hi(Object.assign({curve:AM},t),e);TM.props=Object.assign(Object.assign({},Hi.props),{defaultMarker:"hv"});const PM=(t,e)=>Hi(Object.assign({curve:EM},t),e);PM.props=Object.assign(Object.assign({},Hi.props),{defaultMarker:"vh"});const CM=(t,e)=>Hi(Object.assign({curve:MM},t),e);CM.props=Object.assign(Object.assign({},Hi.props),{defaultMarker:"hvh"});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};function eU(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=gd(e,c),h=gd(n,l),p=gd(h,u),v=gd(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 kM=(t,e)=>{const{document:n}=e;return(r,i,a)=>{const{seriesSize:o,color:s}=i,{color:c}=a,l=tU(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(Rn)&&eU(u,d,h,p,v)}return je(n.createElement("path",{})).call(Ee,l).style("fill",s||c).style("d",u.toString()).call(Ee,t).node()}};kM.props=Object.assign(Object.assign({},Hi.props),{defaultMarker:"line"});const RM=()=>(t,e)=>{const{style:n={},encode:r}=e,{series:i}=r,{gradient:a}=n;return!a||i?[t,e]:[t,Nt({},e,{encode:{series:jd(go(t,void 0))}})]};RM.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]=sn(n,"color");return[t,Nt({},e,{encode:{series:jn(a,o)}})]};Ig.props={};const LM={line:dM,smooth:SM,hv:TM,vh:PM,hvh:CM,trail:kM},nU=(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(Zn(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]},rU=(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]},NM=()=>(t,e,n,r)=>(dl(r)?rU:nU)(t,e,n,r);NM.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,shape:LM,channels:[...ii({shapes:Object.keys(LM)}),{name:"x"},{name:"y"},{name:"position",independent:!0},{name:"size"},{name:"series",scale:"band"}],preInference:[...vr(),{type:RM},{type:Ig}],postInference:[...Or(),...yc(),...U$()],interaction:{shareTooltip:!0,seriesTooltip:!0,crosshairs:!0}};var iU=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 IM=jg.bind(void 0);IM.style=["stroke","lineWidth"];const Ud=(t,e,n)=>[["M",t-n,e-n],["L",t+n,e-n],["L",t+n,e+n],["L",t-n,e+n],["Z"]];Ud.style=["fill"];const jM=Ud.bind(void 0);jM.style=["fill"];const DM=Ud.bind(void 0);DM.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 FM=Dg.bind(void 0);FM.style=["stroke","lineWidth"];const Fg=(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"]]};Fg.style=["fill"];const BM=Fg.bind(void 0);BM.style=["stroke","lineWidth"];const Bg=(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"]]};Bg.style=["fill"];const zM=Bg.bind(void 0);zM.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 GM=zg.bind(void 0);GM.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 WM=Gg.bind(void 0);WM.style=["stroke","lineWidth"];const HM=(t,e,n)=>[["M",t,e+n],["L",t,e-n]];HM.style=["stroke","lineWidth"];const YM=(t,e,n)=>[["M",t-n,e-n],["L",t+n,e+n],["M",t+n,e-n],["L",t-n,e+n]];YM.style=["stroke","lineWidth"];const VM=(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]];VM.style=["stroke","lineWidth"];const XM=(t,e,n)=>[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]];XM.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 UM=Wg.bind(void 0);UM.style=["stroke","lineWidth"];const qM=(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]];qM.style=["stroke","lineWidth"];const ZM=(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]];ZM.style=["stroke","lineWidth"];const KM=(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]];KM.style=["stroke","lineWidth"];const QM=(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]];QM.style=["stroke","lineWidth"];const JM=(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]];JM.style=["stroke","lineWidth"];const bc=new Map([["bowtie",Gg],["cross",YM],["dash",UM],["diamond",Dg],["dot",Wg],["hexagon",zg],["hollowBowtie",WM],["hollowDiamond",FM],["hollowHexagon",GM],["hollowPoint",IM],["hollowSquare",DM],["hollowTriangle",BM],["hollowTriangleDown",zM],["hv",ZM],["hvh",QM],["hyphen",$M],["line",HM],["plus",XM],["point",jg],["rect",jM],["smooth",qM],["square",Ud],["tick",VM],["triangleDown",Bg],["triangle",Fg],["vh",KM],["vhv",JM]]);function aU(t,e){var{d:n,fill:r,strokeWidth:i,path:a,stroke:o,lineWidth:s,color:c}=e,l=iU(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 lpt(t,e){bc.set(t,e)}function upt(t){bc.delete(t)}var oU=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 sU(t,e,n,r){if(e.length===1)return;const{size:i}=n;if(t==="fixed")return i;if(t==="normal"||G_(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 an=(t,e)=>{const{colorAttribute:n,symbol:r,mode:i="auto"}=t,a=oU(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]=TO(l),O=sU(i,l,u,s)||a.r||f.r;return je(c.createElement("path",{})).call(Ee,f).style("fill","transparent").style("d",o(m,b,O)).style("lineWidth",p).style("transform",g).style("stroke",v).style(EO(t),y).style(n,v).call(Ee,a).node()}};an.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const tE=(t,e)=>an(Object.assign({colorAttribute:"stroke",symbol:"point"},t),e);tE.props=Object.assign({defaultMarker:"hollowPoint"},an.props);const eE=(t,e)=>an(Object.assign({colorAttribute:"stroke",symbol:"diamond"},t),e);eE.props=Object.assign({defaultMarker:"hollowDiamond"},an.props);const nE=(t,e)=>an(Object.assign({colorAttribute:"stroke",symbol:"hexagon"},t),e);nE.props=Object.assign({defaultMarker:"hollowHexagon"},an.props);const rE=(t,e)=>an(Object.assign({colorAttribute:"stroke",symbol:"square"},t),e);rE.props=Object.assign({defaultMarker:"hollowSquare"},an.props);const iE=(t,e)=>an(Object.assign({colorAttribute:"stroke",symbol:"triangle-down"},t),e);iE.props=Object.assign({defaultMarker:"hollowTriangleDown"},an.props);const aE=(t,e)=>an(Object.assign({colorAttribute:"stroke",symbol:"triangle"},t),e);aE.props=Object.assign({defaultMarker:"hollowTriangle"},an.props);const oE=(t,e)=>an(Object.assign({colorAttribute:"stroke",symbol:"bowtie"},t),e);oE.props=Object.assign({defaultMarker:"hollowBowtie"},an.props);const sE=(t,e)=>an(Object.assign({colorAttribute:"fill",symbol:"point"},t),e);sE.props=Object.assign({defaultMarker:"point"},an.props);const cE=(t,e)=>an(Object.assign({colorAttribute:"stroke",symbol:"plus"},t),e);cE.props=Object.assign({defaultMarker:"plus"},an.props);const lE=(t,e)=>an(Object.assign({colorAttribute:"fill",symbol:"diamond"},t),e);lE.props=Object.assign({defaultMarker:"diamond"},an.props);const uE=(t,e)=>an(Object.assign({colorAttribute:"fill",symbol:"square"},t),e);uE.props=Object.assign({defaultMarker:"square"},an.props);const fE=(t,e)=>an(Object.assign({colorAttribute:"fill",symbol:"triangle"},t),e);fE.props=Object.assign({defaultMarker:"triangle"},an.props);const dE=(t,e)=>an(Object.assign({colorAttribute:"fill",symbol:"hexagon"},t),e);dE.props=Object.assign({defaultMarker:"hexagon"},an.props);const hE=(t,e)=>an(Object.assign({colorAttribute:"stroke",symbol:"cross"},t),e);hE.props=Object.assign({defaultMarker:"cross"},an.props);const pE=(t,e)=>an(Object.assign({colorAttribute:"fill",symbol:"bowtie"},t),e);pE.props=Object.assign({defaultMarker:"bowtie"},an.props);const vE=(t,e)=>an(Object.assign({colorAttribute:"stroke",symbol:"hyphen"},t),e);vE.props=Object.assign({defaultMarker:"hyphen"},an.props);const gE=(t,e)=>an(Object.assign({colorAttribute:"stroke",symbol:"line"},t),e);gE.props=Object.assign({defaultMarker:"line"},an.props);const yE=(t,e)=>an(Object.assign({colorAttribute:"stroke",symbol:"tick"},t),e);yE.props=Object.assign({defaultMarker:"tick"},an.props);const mE=(t,e)=>an(Object.assign({colorAttribute:"fill",symbol:"triangle-down"},t),e);mE.props=Object.assign({defaultMarker:"triangleDown"},an.props);const qd=()=>(t,e)=>{const{encode:n}=e,{y:r}=n;return r!==void 0?[t,e]:[t,Nt({},e,{encode:{y:Id(go(t,0))},scale:{y:{guide:null}}})]};qd.props={};const bE=()=>(t,e)=>{const{encode:n}=e,{size:r}=n;return r!==void 0?[t,e]:[t,Nt({},e,{encode:{size:jd(go(t,3))}})]};bE.props={};const xE={hollow:tE,hollowDiamond:eE,hollowHexagon:nE,hollowSquare:rE,hollowTriangleDown:iE,hollowTriangle:aE,hollowBowtie:oE,point:sE,plus:cE,diamond:lE,square:uE,triangle:fE,hexagon:dE,cross:hE,bowtie:pE,hyphen:vE,line:gE,tick:yE,triangleDown:mE},_E=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]};_E.props={defaultShape:"hollow",defaultLabelShape:"label",composite:!1,shape:xE,channels:[...ii({shapes:Object.keys(xE)}),{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:[...vr(),{type:ls},{type:qd}],postInference:[...Or(),{type:bE},...yo()]};const OE=(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 IO).style("x",d).style("y",h).call(Ee,a).style("transform",`${u}rotate(${+l})`).style("coordCenter",n.getCenter()).call(Ee,f).call(Ee,t).node()}};OE.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 cU(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 lU(t){const{min:e,max:n}=t.getLocalBounds();return[(e[0]+n[0])*.5,(e[1]+n[1])*.5]}const uU=rc(t=>{const e=t.attributes,{class:n,x:r,y:i}=e,a=Hg(e,["class","x","y"]),o=le(a,"marker"),{size:s=24}=o,c=()=>cU(s/2),l=je(t).maybeAppend("marker",()=>new Cn({})).call(d=>d.node().update(Object.assign({symbol:c},o))).node(),[u,f]=lU(l);je(t).maybeAppend("text","text").style("x",u).style("y",f).call(Ee,a)}),wE=(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 uU).call(Ee,s).style("x",f).style("y",d).call(Ee,u).call(Ee,n).node()}};wE.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const Zd=()=>(t,e)=>{const{data:n}=e;if(!Array.isArray(n)||n.some(jl))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,Nt({},e,{encode:{x:jn(i),y:jn(a)}})]};Zd.props={};var SE=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 Kd=()=>(t,e)=>{const{data:n,style:r={}}=e,i=SE(e,["data","style"]),{x:a,y:o}=r,s=SE(r,["x","y"]);if(a==null||o==null)return[t,e];const c=a||0,l=o||0;return[[0],Nt({},i,{data:[0],cartesian:!0,encode:{x:jn([c]),y:jn([l])},scale:{x:{type:"identity",independent:!0,guide:null},y:{type:"identity",independent:!0,guide:null}},style:s})]};Kd.props={};const ME={text:OE,badge:wE},EE=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]}};EE.props={defaultShape:"text",defaultLabelShape:"label",composite:!1,shape:ME,channels:[...ii({shapes:Object.keys(ME)}),{name:"x",required:!0},{name:"y",required:!0},{name:"text",scale:"identity"},{name:"fontSize"},{name:"rotate"}],preInference:[...vr(),{type:Zd},{type:Kd}],postInference:[...Or(),...yo()]};const Yg=()=>(t,e)=>[t,Nt({scale:{x:{padding:0},y:{padding:0}}},e)];Yg.props={};const AE={cell:fs,hollow:Gd},TE=()=>(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]};TE.props={defaultShape:"cell",defaultLabelShape:"label",shape:AE,composite:!1,channels:[...ii({shapes:Object.keys(AE)}),{name:"x",required:!0,scale:"band"},{name:"y",required:!0,scale:"band"}],preInference:[...vr(),{type:ls},{type:qd},{type:Yg}],postInference:[...Or(),...yo()]};function Vg(t,e,n){var r=null,i=Wn(!0),a=null,o=Al,s=null,c=Gv(l);t=typeof t=="function"?t:t===void 0?LO:Wn(+t),e=typeof e=="function"?e:Wn(e===void 0?0:+e),n=typeof n=="function"?n:n===void 0?NO:Wn(+n);function l(f){var d,h,p,v=(f=CO(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:Wn(+f),r=null,l):t},l.x0=function(f){return arguments.length?(t=typeof f=="function"?f:Wn(+f),l):t},l.x1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:Wn(+f),l):r},l.y=function(f){return arguments.length?(e=typeof f=="function"?f:Wn(+f),n=null,l):e},l.y0=function(f){return arguments.length?(e=typeof f=="function"?f:Wn(+f),l):e},l.y1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:Wn(+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:Wn(!!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 fU(){var t=Vg().curve(lM),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 Gl(n())},delete t.lineX0,t.lineEndAngle=function(){return Gl(r())},delete t.lineX1,t.lineInnerRadius=function(){return Gl(i())},delete t.lineY0,t.lineOuterRadius=function(){return Gl(a())},delete t.lineY1,t.curve=function(o){return arguments.length?e(Cg(o)):e()._curve},t}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};function hU(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 PE=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(Ee,i),je(t).maybeAppend("area-path",()=>a.createElement("path",{})).style("d",e).call(Ee,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=dU(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=zn(s),m=AO(s,u),b=r&&p?MO(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]=hU(l,i),M=le(_,"connect"),E=!!w.length,A=P=>je(c.createElement("path",{})).style("d",P||"").call(Ee,_).node();if(Nn(s)){const P=C=>{const j=s.getCenter(),N=C.slice(0,C.length/2),k=C.slice(C.length/2);return fU().angle((R,D)=>nc(ur(N[D],j))).outerRadius((R,D)=>Kn(N[D],j)).innerRadius((R,D)=>Kn(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 PE).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?Vg().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):Vg().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 PE).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 CE=(t,e)=>{const{coordinate:n}=e;return(...r)=>{const i=Nn(n)?_g:Al;return ta(Object.assign({curve:i},t),e)(...r)}};CE.props=Object.assign(Object.assign({},ta.props),{defaultMarker:"square"});var pU=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 kE=(t,e)=>{const n=pU(t,[]),{coordinate:r}=e;return(...i)=>{const a=Nn(r)?gM:zn(r)?wM:OM;return ta(Object.assign({curve:a},n),e)(...i)}};kE.props=Object.assign(Object.assign({},ta.props),{defaultMarker:"smooth"});const RE=(t,e)=>(...n)=>ta(Object.assign({curve:MM},t),e)(...n);RE.props=Object.assign(Object.assign({},ta.props),{defaultMarker:"hvh"});const LE=(t,e)=>(...n)=>ta(Object.assign({curve:EM},t),e)(...n);LE.props=Object.assign(Object.assign({},ta.props),{defaultMarker:"vh"});const NE=(t,e)=>(...n)=>ta(Object.assign({curve:AM},t),e)(...n);NE.props=Object.assign(Object.assign({},ta.props),{defaultMarker:"hv"});const IE={area:CE,smooth:kE,hvh:RE,vh:LE,hv:NE},jE=()=>(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(Zn(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]};jE.props={defaultShape:"area",defaultLabelShape:"label",composite:!1,shape:IE,channels:[...ii({shapes:Object.keys(IE)}),{name:"x",required:!0},{name:"y",required:!0},{name:"size"},{name:"series",scale:"band"}],preInference:[...vr(),{type:Ig},{type:Dl},{type:Yg}],postInference:[...Or(),...yc()],interaction:{shareTooltip:!0,seriesTooltip:!0,crosshairs:!0}};const DE=()=>(t,e)=>{const{encode:n}=e,{y1:r}=n;if(r)return[t,e];const[i]=sn(n,"y");return[t,Nt({},e,{encode:{y1:jn([...i])}})]};DE.props={};const FE=()=>(t,e)=>{const{encode:n}=e,{x1:r}=n;if(r)return[t,e];const[i]=sn(n,"x");return[t,Nt({},e,{encode:{x1:jn([...i])}})]};FE.props={};var BE=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 Xg=(t,e)=>{const{arrow:n=!0,arrowSize:r="40%"}=t,i=BE(t,["arrow","arrowSize"]),{document:a}=e;return(o,s,c)=>{const{defaultColor:l}=c,u=BE(c,["defaultColor"]),{color:f=l,transform:d}=s,[h,p]=o,v=Wi();if(v.moveTo(...h),v.lineTo(...p),n){const[g,y]=hW(h,p,{arrowSize:r});v.moveTo(...p),v.lineTo(...g),v.moveTo(...p),v.lineTo(...y)}return je(a.createElement("path",{})).call(Ee,u).style("d",v.toString()).style("stroke",f).style("transform",d).call(Ee,i).node()}};Xg.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const zE=(t,e)=>{const{arrow:n=!1}=t;return(...r)=>Xg(Object.assign(Object.assign({},t),{arrow:n}),e)(...r)};zE.props={defaultMarker:"line",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,[]),{coordinate:r,document:i}=e;return(a,o,s)=>{const{color:c}=s,l=GE(s,["color"]),{color:u=c,transform:f}=o,[d,h]=a,p=Wi();if(p.moveTo(d[0],d[1]),Nn(r)){const v=r.getCenter();p.quadraticCurveTo(v[0],v[1],h[0],h[1])}else{const v=SO(d,h),g=Kn(d,h)/2;El(p,d,h,v,g)}return je(i.createElement("path",{})).call(Ee,l).style("d",p.toString()).style("stroke",u).style("transform",f).call(Ee,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};const YE=(t,e)=>{const n=HE(t,[]),{document:r}=e;return(i,a,o)=>{const{color:s}=o,c=HE(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(Ee,c).style("d",h.toString()).style("stroke",l).style("transform",u).call(Ee,n).node()}};YE.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var VE=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,n,r){const i=Wi();if(Nn(n)){const a=n.getCenter(),o=Kn(t,a),c=(Kn(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 zn(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 XE=(t,e)=>{const{cornerRatio:n=1/3}=t,r=VE(t,["cornerRatio"]),{coordinate:i,document:a}=e;return(o,s,c)=>{const{defaultColor:l}=c,u=VE(c,["defaultColor"]),{color:f=l,transform:d}=s,[h,p]=o,v=vU(h,p,i,n);return je(a.createElement("path",{})).call(Ee,u).style("d",v.toString()).style("stroke",f).style("transform",d).call(Ee,r).node()}};XE.props={defaultMarker:"vhv",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const $E={link:zE,arc:WE,smooth:YE,vhv:XE},$g=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]};$g.props={defaultShape:"link",defaultLabelShape:"label",composite:!1,shape:$E,channels:[...ii({shapes:Object.keys($E)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...vr(),{type:DE},{type:FE}],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};const UE=(t,e)=>{const{coordinate:n,document:r}=e;return(i,a,o)=>{const{color:s}=o,c=gU(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"?Vd(h)*y:h,p=typeof p=="string"?Vd(p)*m:p;const b=v-Number(h)/2,_=g-Number(p)/2;return je(r.createElement("image",{})).call(Ee,c).style("x",b).style("y",_).style("img",u).style("stroke",l).style("transform",d).call(Ee,t).style("width",h).style("height",p).node()}};UE.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const qE={image:UE},ZE=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]}};ZE.props={defaultShape:"image",defaultLabelShape:"label",composite:!1,shape:qE,channels:[...ii({shapes:Object.keys(qE)}),{name:"x",required:!0},{name:"y",required:!0},{name:"src",scale:"identity"},{name:"size"}],preInference:[...vr(),{type:Zd},{type:Kd}],postInference:[...Or(),...yo()]};var yU=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 mU(t,e){const n=Wi();if(Nn(e)){const r=e.getCenter(),i=[...t,t[0]],a=i.map(o=>Kn(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 dW(n,t)}const KE=(t,e)=>{const{coordinate:n,document:r}=e;return(i,a,o)=>{const{color:s}=o,c=yU(o,["color"]),{color:l=s,transform:u}=a,f=mU(i,n);return je(r.createElement("path",{})).call(Ee,c).style("d",f.toString()).style("stroke",l).style("fill",l).style("transform",u).call(Ee,t).node()}};KE.props={defaultMarker:"square",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var QE=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){const[n,r,i,a]=t,o=Wi();if(Nn(e)){const s=e.getCenter(),c=Kn(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 JE=(t,e)=>{const n=QE(t,[]),{coordinate:r,document:i}=e;return(a,o,s)=>{const{color:c}=s,l=QE(s,["color"]),{color:u=c,transform:f}=o,d=bU(a,r);return je(i.createElement("path",{})).call(Ee,l).style("d",d.toString()).style("fill",u||c).style("stroke",u||c).style("transform",f).call(Ee,n).node()}};JE.props={defaultMarker:"square",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const tA={polygon:KE,ribbon:JE},eA=()=>(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]};eA.props={defaultShape:"polygon",defaultLabelShape:"label",composite:!1,shape:tA,channels:[...ii({shapes:Object.keys(tA)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...vr()],postInference:[...Or(),...yo()]};var xU=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 _U(t,e){const n=Wi();if(!Nn(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=Kn(r,t[2]),l=Kn(r,t[3]),u=Kn(r,t[8]),f=Kn(r,t[10]),d=Kn(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 nA=(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=xU(o,["color","fill","stroke"]),h=_U(i,n);return je(r.createElement("path",{})).call(Ee,d).style("d",h.toString()).style("stroke",f).style("fill",s||u).style("transform",c).call(Ee,t).node()}};nA.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var OU=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=4){const r=Wi();if(!Nn(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=Kn(i,t[3]),c=Kn(i,t[8]),l=Kn(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 rA=(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=OU(o,["color","fill","stroke"]),p=wU(i,n,l);return je(r.createElement("path",{})).call(Ee,h).style("d",p.toString()).style("stroke",d).style("fill",s||f).style("transform",c).call(Ee,t).node()}};rA.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const iA={box:nA,violin:rA},aA=()=>(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]};aA.props={defaultShape:"box",defaultLabelShape:"label",composite:!1,shape:iA,channels:[...ii({shapes:Object.keys(iA)}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"}],preInference:[...vr(),{type:ls}],postInference:[...Or(),...yc()],interaction:{shareTooltip:!0}};const oA={vector:Xg},sA=()=>(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]};sA.props={defaultShape:"vector",defaultLabelShape:"label",composite:!1,shape:oA,channels:[...ii({shapes:Object.keys(oA)}),{name:"x",required:!0},{name:"y",required:!0},{name:"rotate",required:!0,scale:"identity"},{name:"size",required:!0}],preInference:[...vr()],postInference:[...Or(),...yo()]};var cA=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 SU(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 MU(t,e){if(!Nn(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:Kn(t[0],n),innerRadius:Kn(t[1],n)})}function EU(t,e){if(!Nn(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=cA(t,["arrow","arrowSize"]),{coordinate:a,document:o}=e;return(s,c,l)=>{const{color:u,lineWidth:f}=l,d=cA(l,["color","lineWidth"]),{color:h=u,size:p=f}=c,v=n?SU(o,r,Object.assign({fill:i.stroke||h,stroke:i.stroke||h},le(i,"arrow"))):null,g=MU(s,a),y=EU(a,c.transform);return je(o.createElement("path",{})).call(Ee,d).style("d",g).style("stroke",h).style("lineWidth",p).style("transform",y).style("markerEnd",v).call(Ee,i).node()}};Ug.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const lA=()=>(t,e)=>{const{data:n}=e;return!Array.isArray(n)||n.some(jl)?[t,e]:[t,Nt({},e,{encode:{x:jn(n)}})]};lA.props={};const uA={line:Ug},fA=t=>(e,n,r,i)=>{const{x:a}=r,o=ds(n,r,Nt({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]};fA.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,shape:uA,channels:[...mc({shapes:Object.keys(uA)}),{name:"x",required:!0}],preInference:[...vr(),{type:lA}],postInference:[...Or()]};const dA=()=>(t,e)=>{const{data:n}=e;return!Array.isArray(n)||n.some(jl)?[t,e]:[t,Nt({},e,{encode:{y:jn(n)}})]};dA.props={};const hA={line:Ug},pA=t=>(e,n,r,i)=>{const{y:a}=r,o=ds(n,r,Nt({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]};pA.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,shape:hA,channels:[...mc({shapes:Object.keys(hA)}),{name:"y",required:!0}],preInference:[...vr(),{type:dA}],postInference:[...Or()]};var vA=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 AU(t,e,n){return[["M",t,e],["L",t+2*n,e-n],["L",t+2*n,e+n],["Z"]]}function TU(t){return ho().x(e=>e[0]).y(e=>e[1])(t)}function PU(t,e,n,r,i=0){const[[a,o],[s,c]]=e;if(zn(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 gA=(t,e)=>{const{offset:n=0,offset1:r=n,offset2:i=n,connectLength1:a,endMarker:o=!0}=t,s=vA(t,["offset","offset1","offset2","connectLength1","endMarker"]),{coordinate:c}=e;return(l,u,f)=>{const{color:d,connectLength1:h}=f,p=vA(f,["color","connectLength1"]),{color:v,transform:g}=u,y=PU(c,l,r,i,a!=null?a:h),m=le(Object.assign(Object.assign({},s),f),"endMarker");return je(new ri).call(Ee,p).style("path",TU(y)).style("stroke",v||d).style("transform",g).style("markerEnd",o?new Cn({className:"marker",style:Object.assign(Object.assign({},m),{symbol:AU})}):null).call(Ee,s).node()}};gA.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const yA={connector:gA},mA=(...t)=>$g(...t);mA.props={defaultShape:"connector",defaultLabelShape:"label",composite:!1,shape:yA,channels:[...mc({shapes:Object.keys(yA)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...vr()],postInference:[...Or()]};function bA(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=bA("x",e,a,i.x),c=bA("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 xA={range:fs},_A=()=>qg();_A.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,shape:xA,channels:[...mc({shapes:Object.keys(xA)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...vr()],postInference:[...Or()]};const OA=()=>(t,e)=>{const{data:n}=e;if(Array.isArray(n)&&(n.every(Array.isArray)||!n.some(jl))){const r=(i,a)=>Array.isArray(i[0])?i.map(o=>o[a]):[i[a]];return[t,Nt({},e,{encode:{x:jn(r(n,0)),x1:jn(r(n,1))}})]}return[t,e]};OA.props={};const wA={range:fs},SA=()=>qg({extendY:!0});SA.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,shape:wA,channels:[...mc({shapes:Object.keys(wA)}),{name:"x",required:!0}],preInference:[...vr(),{type:OA}],postInference:[...Or()]};const MA=()=>(t,e)=>{const{data:n}=e;if(Array.isArray(n)&&(n.every(Array.isArray)||!n.some(jl))){const r=(i,a)=>Array.isArray(i[0])?i.map(o=>o[a]):[i[a]];return[t,Nt({},e,{encode:{y:jn(r(n,0)),y1:jn(r(n,1))}})]}return[t,e]};MA.props={};const EA={range:fs},AA=()=>qg({extendX:!0});AA.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,shape:EA,channels:[...mc({shapes:Object.keys(EA)}),{name:"y",required:!0}],preInference:[...vr(),{type:MA}],postInference:[...Or()]};var TA=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const Zg=(t,e)=>{const{arrow:n,colorAttribute:r}=t,i=TA(t,["arrow","colorAttribute"]),{coordinate:a,document:o}=e;return(s,c,l)=>{const{color:u,stroke:f}=l,d=TA(l,["color","stroke"]),{d:h,color:p=u}=c,[v,g]=a.getSize();return je(o.createElement("path",{})).call(Ee,d).style("d",typeof h=="function"?h({width:v,height:g}):h).style(r,p).call(Ee,i).node()}};Zg.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const PA=(t,e)=>Zg(Object.assign({colorAttribute:"fill"},t),e);PA.props={defaultMarker:"hvh",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const CA=(t,e)=>Zg(Object.assign({fill:"none",colorAttribute:"stroke"},t),e);CA.props={defaultMarker:"hvh",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const kA={path:PA,hollow:CA},RA=t=>(e,n,r,i)=>[e,e.map(()=>[[0,0]])];RA.props={defaultShape:"path",defaultLabelShape:"label",shape:kA,composite:!1,channels:[...ii({shapes:Object.keys(kA)}),{name:"d",scale:"identity"}],preInference:[...vr()],postInference:[...Or()]};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};const LA=(t,e)=>{const{render:n}=t,r=CU(t,["render"]);return i=>{const[[a,o]]=i;return n(Object.assign(Object.assign({},r),{x:a,y:o}),e)}};LA.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const NA=()=>(t,e)=>{const{style:n={}}=e;return[t,Nt({},e,{style:Object.assign(Object.assign({},n),Object.fromEntries(Object.entries(n).filter(([,r])=>typeof r=="function").map(([r,i])=>[r,()=>i])))})]};NA.props={};const kU={shape:LA},IA=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]}};IA.props={defaultShape:"shape",defaultLabelShape:"label",composite:!1,shape:kU,channels:[{name:"x",required:!0},{name:"y",required:!0}],preInference:[...vr(),{type:Zd},{type:Kd},{type:NA}]};var RU=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 jA=(t,e)=>{const{document:n}=e;return(r,i,a)=>{const{transform:o}=i,{color:s}=a,c=RU(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(Ee,c).style("d",d.toString()).style("stroke",l||s).style("fill",l||s).style("fillOpacity",.4).style("transform",o).call(Ee,t).node()}};jA.props={defaultMarker:"square",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const DA={density:jA},FA=()=>(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]};FA.props={defaultShape:"density",defaultLabelShape:"label",composite:!1,shape:DA,channels:[...ii({shapes:Object.keys(DA)}),{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:[...vr(),{type:Dl},{type:ls}],postInference:[...Or(),...yc()],interaction:{shareTooltip:!0}};const fpt=yv(3);function LU(t,e=(...r)=>`${r[0]}`,n=16){const r=yv(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 NU(t){return typeof t=="string"?t.split(" ").map(e=>{const[n,r]=e.split(":");return[+n,r]}):t}function Qd(t,e,n){const r=t?t():document.createElement("canvas");return r.width=e,r.height=n,r}const IU=LU((t,e,n)=>{const r=Qd(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 jU(t,e){const r=Qd(e,256,1).getContext("2d"),i=r.createLinearGradient(0,0,256,1);return NU(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 DU(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=IU(f,1-o,a),g=(d-e)/(n-e);t.globalAlpha=Math.max(g,.001),t.drawImage(v,h,p)}return t}function FU(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 BU(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=Qd(o,t,e).getContext("2d"),u=jU(s.gradient,o);l.clearRect(0,0,t,e),DU(l,n,r,i,s,o);const f=FU(l,t,e,u,s),h=Qd(o,t,e).getContext("2d");return h.putImageData(f,0,0),h}var zU=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 GU(t,e){return Object.keys(t).reduce((n,r)=>{const i=t[r];return e(i,r)||(n[r]=i),n},{})}const BA=(t,e)=>{const{gradient:n,opacity:r,maxOpacity:i,minOpacity:a,blur:o,useGradientOpacity:s}=t,c=zU(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=Ai(d,M=>M[2]),_=Sn(d,M=>M[2]),w=g&&y?BU(g,y,b,_,m,GU({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(Ee,p).style("x",0).style("y",0).style("width",g).style("height",y).style("src",w.canvas).style("transform",v).call(Ee,c).node()}};BA.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const zA={heatmap:BA},GA=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]]};GA.props={defaultShape:"heatmap",defaultLabelShape:"label",composite:!1,shape:zA,channels:[...ii({shapes:Object.keys(zA)}),{name:"x",required:!0},{name:"y",required:!0},{name:"color",scale:"identity",required:!0},{name:"size"}],preInference:[...vr(),{type:ls},{type:qd}],postInference:[...Or(),...yo()]};const WA=()=>["#5B8FF9","#5AD8A6","#5D7092","#F6BD16","#6F5EF9","#6DC8EC","#945FB9","#FF9845","#1E9493","#FF99C3"];WA.props={};const HA=()=>["#5B8FF9","#CDDDFD","#5AD8A6","#CDF3E4","#5D7092","#CED4DE","#F6BD16","#FCEBB9","#6F5EF9","#D3CEFD","#6DC8EC","#D3EEF9","#945FB9","#DECFEA","#FF9845","#FFE0C7","#1E9493","#BBDEDE","#FF99C3","#FFE0ED"];HA.props={};const YA=t=>new Xr(t);YA.props={};const Jd=Symbol("defaultUnknown");function VA(t,e,n){for(let r=0;r<e.length;r+=1)t.has(e[r])||t.set(n(e[r]),r)}function XA(t){const{value:e,from:n,to:r,mapper:i,notFoundReturn:a}=t;let o=i.get(e);if(o===void 0){if(a!==Jd)return a;o=n.push(e)-1,i.set(e,o)}return r[o%r.length]}function $A(t){return t instanceof Date?e=>`${e}`:typeof t=="object"?e=>JSON.stringify(e):e=>e}class th extends xl{getDefaultOptions(){return{domain:[],range:[],unknown:Jd}}constructor(e){super(e)}map(e){return this.domainIndexMap.size===0&&VA(this.domainIndexMap,this.getDomain(),this.domainKey),XA({value:this.domainKey(e),mapper:this.domainIndexMap,from:this.getDomain(),to:this.getRange(),notFoundReturn:this.options.unknown})}invert(e){return this.rangeIndexMap.size===0&&VA(this.rangeIndexMap,this.getRange(),this.rangeKey),XA({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=$A(n),this.rangeKey=$A(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 th(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 UA=t=>new th(t);UA.props={};function qA({map:t,initKey:e},n){const r=e(n);return t.has(r)?t.get(r):n}function WU({map:t,initKey:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function HU({map:t,initKey:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function YU(t){return typeof t=="object"?t.valueOf():t}class ZA extends Map{constructor(e){if(super(),this.map=new Map,this.initKey=YU,e!==null)for(const[n,r]of e)this.set(n,r)}get(e){return super.get(qA({map:this.map,initKey:this.initKey},e))}has(e){return super.has(qA({map:this.map,initKey:this.initKey},e))}set(e,n){return super.set(WU({map:this.map,initKey:this.initKey},e),n)}delete(e){return super.delete(HU({map:this.map,initKey:this.initKey},e))}}function VU(t){const e=Math.min(...t);return t.map(n=>n/e)}function XU(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 $U(t){return Math.round(t*1e12)/1e12}function UU(t){const{domain:e,range:n,paddingOuter:r,paddingInner:i,flex:a,round:o,align:s}=t,c=e.length,l=XU(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=VU(l),m=y.reduce((j,N)=>j+N),b=g/m,_=new ZA(e.map((j,N)=>{const k=y[N]*b;return[j,o?Math.floor(k):k]})),O=new ZA(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]=$U(P);const N=e[j];P+=O.get(N)}return{valueBandWidth:_,valueStep:O,adjustedRange:C}}function qU(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 UU(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 th{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,paddingInner:0,paddingOuter:0,padding:0,unknown:Jd,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}=qU({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 KA=t=>new mo(t);KA.props={};class eh extends xl{getDefaultOptions(){return{domain:[0,1],range:[0,1],tickCount:5,unknown:void 0,tickMethod:Lv}}map(e){return sd(e)?e:this.options.unknown}invert(e){return this.map(e)}clone(){return new eh(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 QA=t=>new eh(t);QA.props={};class Kg extends mo{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,padding:0,unknown:Jd,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 JA=t=>new Kg(t);JA.props={};var tT=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,bo="\\d\\d?",xo="\\d\\d",ZU="\\d{3}",KU="\\d{4}",Wl="[^\\s]+",eT=/\[([^]*?)\]/gm;function nT(t,e){for(var n=[],r=0,i=t.length;r<i;r++)n.push(t[r].substr(0,e));return n}var rT=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 iT=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],aT=["January","February","March","April","May","June","July","August","September","October","November","December"],QU=nT(aT,3),JU=nT(iT,3),oT={dayNamesShort:JU,dayNames:iT,monthNamesShort:QU,monthNames:aT,amPm:["am","pm"],DoFn:function(t){return t+["th","st","nd","rd"][t%10>3?0:(t-t%10!==10?1:0)*t%10]}},nh=hs({},oT),tq=function(t){return nh=hs(nh,t)},sT=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},eq={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)}},cT=function(t){return+t-1},lT=[null,bo],uT=[null,Wl],fT=["isPm",Wl,function(t,e){var n=t.toLowerCase();return n===e.amPm[0]?0:n===e.amPm[1]?1:null}],dT=["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}],nq={D:["day",bo],DD:["day",xo],Do:["day",bo+Wl,function(t){return parseInt(t,10)}],M:["month",bo,cT],MM:["month",xo,cT],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",KU],S:["millisecond","\\d",function(t){return+t*100}],SS:["millisecond",xo,function(t){return+t*10}],SSS:["millisecond",ZU],d:lT,dd:lT,ddd:uT,dddd:uT,MMM:["month",Wl,rT("monthNamesShort")],MMMM:["month",Wl,rT("monthNames")],a:fT,A:fT,ZZ:dT,Z:dT},rh={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"},rq=function(t){return hs(rh,t)},hT=function(t,e,n){if(e===void 0&&(e=rh.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=rh[e]||e;var r=[];e=e.replace(eT,function(a,o){return r.push(o),"@@@"});var i=hs(hs({},nh),n);return e=e.replace(tT,function(a){return eq[a](t,i)}),e.replace(/@@@/g,function(){return r.shift()})};function iq(t,e,n){if(n===void 0&&(n={}),typeof e!="string")throw new Error("Invalid format in fecha parse");if(e=rh[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(eT,function(_,O){return o.push(sT(O)),"@@@"}),c={},l={};s=sT(s).replace(tT,function(_){var O=nq[_],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({},nh),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 dpt={format:hT,parse:iq,defaultI18n:oT,setGlobalDateI18n:tq,setGlobalDateMasks:rq},hpt=null;const Hl=1e3,Yl=Hl*60,Vl=Yl*60,ps=Vl*24,xc=ps*7,pT=ps*30,vT=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 aq=Zr(1,t=>t,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),oq=Zr(Hl,t=>{t.setMilliseconds(0)},(t,e=1)=>{t.setTime(+t+Hl*e)},t=>t.getSeconds()),sq=Zr(Yl,t=>{t.setSeconds(0,0)},(t,e=1)=>{t.setTime(+t+Yl*e)},t=>t.getMinutes()),cq=Zr(Vl,t=>{t.setMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+Vl*e)},t=>t.getHours()),lq=Zr(ps,t=>{t.setHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+ps*e)},t=>t.getDate()-1),gT=Zr(pT,t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e=1)=>{const n=t.getMonth();t.setMonth(n+e)},t=>t.getMonth()),uq=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=gT.floor(t),n=new Date(+t);return Math.floor((+n-+e)/xc)}),fq=Zr(vT,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()),yT={millisecond:aq,second:oq,minute:sq,hour:cq,day:lq,week:uq,month:gT,year:fq},dq=Zr(1,t=>t,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),hq=Zr(Hl,t=>{t.setUTCMilliseconds(0)},(t,e=1)=>{t.setTime(+t+Hl*e)},t=>t.getUTCSeconds()),pq=Zr(Yl,t=>{t.setUTCSeconds(0,0)},(t,e=1)=>{t.setTime(+t+Yl*e)},t=>t.getUTCMinutes()),vq=Zr(Vl,t=>{t.setUTCMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+Vl*e)},t=>t.getUTCHours()),gq=Zr(ps,t=>{t.setUTCHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+ps*e)},t=>t.getUTCDate()-1),mT=Zr(pT,t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e=1)=>{const n=t.getUTCMonth();t.setUTCMonth(n+e)},t=>t.getUTCMonth()),yq=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=mT.floor(t),n=new Date(+t);return Math.floor((+n-+e)/xc)}),mq=Zr(vT,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()),bT={millisecond:dq,second:hq,minute:pq,hour:vq,day:gq,week:yq,month:mT,year:mq};function bq(t){const e=t?bT:yT,{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 xT(t,e,n,r,i){const a=+t,o=+e,{tickIntervals:s,year:c,millisecond:l}=bq(i),u=([g,y])=>g.duration*y,f=r?(o-a)/r:n||5,d=r||(o-a)/f,h=s.length,p=Ev(s,d,0,h,u);let v;if(p===h){const g=G2(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(G2(a,o,f),1);v=[l,g]}return v}const xq=(t,e,n,r,i)=>{const a=t>e,o=a?e:t,s=a?t:e,[c,l]=xT(o,s,n,r,i),u=c.range(o,new Date(+s+1),l,!0);return a?u.reverse():u},_q=(t,e,n,r,i)=>{const a=t>e,o=a?e:t,s=a?t:e,[c,l]=xT(o,s,n,r,i),u=[c.floor(o,l),c.ceil(s,l)];return a?u.reverse():u};function Oq(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 wq(t){const e=t.getTimezoneOffset(),n=new Date(t);return n.setMinutes(n.getMinutes()+e,n.getSeconds(),n.getMilliseconds()),n}class Qg extends ld{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:xq,interpolate:Qs,mask:void 0,utc:!1}}chooseTransforms(){return[r=>+r,r=>new Date(r)]}chooseNice(){return _q}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?bT:yT,i=n?wq:ts;return a=>hT(i(a),e||Oq(a,r))}clone(){return new Qg(this.options)}}const _T=t=>new Qg(t);_T.props={};const OT=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?OT(r):r},ty=(t,e)=>{const n=t===Math.E?Math.exp:r=>wr(t,r);return e?OT(n):n},Sq=(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},Mq=(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 ld{getDefaultOptions(){return{domain:[1,10],range:[0,1],base:10,interpolate:_l,tickMethod:Sq,tickCount:5}}chooseNice(){return Mq}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 wT=t=>new ey(t);wT.props={};const Eq=t=>e=>e<0?-wr(-e,t):wr(e,t),Aq=t=>e=>e<0?-wr(-e,1/t):wr(e,1/t),Tq=t=>t<0?-Math.sqrt(-t):Math.sqrt(t);class ih extends ld{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?Tq:Eq(e),r=Aq(e);return[n,r]}clone(){return new ih(this.options)}}const ST=t=>new ih(t);ST.props={};class ny extends ih{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 MT=t=>new ny(t);MT.props={};const ET=t=>new Js(t);ET.props={};const AT=t=>new vd(t);AT.props={};const TT=t=>new pd(t);TT.props={};const Pq=t=>e=>{const n=t(e);return Zs(n)?Math.round(n):n};function Cq(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?Pq(o):o;this.output=Ks(l,c,i,r)},n.prototype.invert=void 0}}var kq=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 Rq(t){return[t(0),t(1)]}const Lq=t=>{const[e,n]=t;return Ks(Qs(0,1),od(e,n))};let iy=ry=class extends Xr{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=kq([Cq(Rq,Lq)],iy);const PT=t=>new iy(t);PT.props={};const CT=t=>new Sl(t);CT.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 Nq=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=>Nt({},Nq,t);oy.props={};const kT=t=>Nt({},oy(),{category10:"category10",category20:"category20"},t);kT.props={};const Iq=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}),RT=t=>Nt({},Iq,{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),LT=t=>Object.assign({},RT(),{category10:"category10",category20:"category20"},t);LT.props={};const jq=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}),NT=t=>Nt({},jq,{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);NT.props={};const IT=t=>(...e)=>{const n=lo(Object.assign({},{crossPadding:50},t))(...e);return Q2(n,t),n};IT.props=Object.assign(Object.assign({},lo.props),{defaultPosition:"bottom"});function ypt(){}const jT=t=>(...e)=>{const n=lo(Object.assign({},{crossPadding:10},t))(...e);return Q2(n,t),n};jT.props=Object.assign(Object.assign({},lo.props),{defaultPosition:"left"});var sy=function(){},Dq=function(t,e,n){var r=t,i=tr(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 Fq(t,e){return t.reduce(function(n,r){return(n[r[e]]=n[r[e]]||[]).push(r),n},{})}function Bq(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=Fi({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"),zq=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:_G(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 Fr({class:Yi.contentGroup.name})),r.playWindow=r.contentGroup.appendChild(new Fr({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)(Bq(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 Gn(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=X_(c,[{transform:"translate(0, 0)"},{transform:"translate(".concat(-f,", ").concat(-d,")")}],i);return $s(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],F=w.textAlign,B=a.querySelector("text");B&&(B.style.textAlign=F),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(Uf(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"})),pv(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=Ue(r);this.renderClipPath(i),this.renderController(i),this.setVisiblePages([this.defaultPage]),this.goTo(this.defaultPage)},e.prototype.bindEvents=function(){var n=this,r=v_(function(){return n.render(n.attributes,n)},50);this.playWindow.addEventListener(Ne.INSERTED,r),this.playWindow.addEventListener(Ne.REMOVED,r)},e}(Lr),Ti=Fi({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 Gq(t){var e=t.querySelector(Ti.marker.class);return e?e.style:{}}var Wq=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=Gq(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(Ti.markerGroup,"g").style("zIndex",0),vi(!!i,this.markerGroup,function(){var o=r.markerGroup.node(),s=o.getElementsByClassName(Ti.marker.name)[0],c=i();s?c.nodeName===s.nodeName?(hB(s,c),Ue(s).styles(a)):(s.remove(),Ue(c).attr("className",Ti.marker.name).styles(a),o.appendChild(c)):(Ue(c).attr("className",Ti.marker.name).styles(a),o.appendChild(c)),r.markerGroup.node().scale(1/r.markerGroup.node().getScale()[0]),pv(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(Ti.labelGroup,"g").style("zIndex",0),this.labelGroup.maybeAppendByClassName(Ti.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(Ti.valueGroup,"g").style("zIndex",0),vi(this.showValue,this.valueGroup,function(){r.valueGroup.maybeAppendByClassName(Ti.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(Ti.backgroundGroup,"g").style("zIndex",-1),this.background.maybeAppendByClassName(Ti.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}),bv(this.labelGroup.select(Ti.label.class).node(),Math.ceil(r)),this.showValue&&(this.valueGroup.styles({x:l,y:u}),bv(this.valueGroup.select(Ti.value.class).node(),Math.ceil(i)))},e.prototype.render=function(n,r){var i=Ue(r);this.renderMarker(i),this.renderLabel(i),this.renderValue(i),this.renderBackground(i),this.adjustLayout()},e}(Lr),vs=Fi({page:"item-page",navigator:"navigator",item:"item"},"items"),DT=function(t,e,n){return n===void 0&&(n=!0),t?e(t):n},Hq=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,Bi(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,F=w===0?0:o,B=w+F+R;if(B<=h&&DT(_,function(Y){return Y<f}))return P=(0,S.CR)([w+F,M,B],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&&DT(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);Ue(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 Wq({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(Fq(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 Fr({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),Dq(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 zq({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(Ue(r));this.renderItems(a.getContainer()),this.adjustLayout()}},e.prototype.dispatchCustomEvent=function(n,r){var i=new kn(n,{detail:r});this.dispatchEvent(i)},e}(Lr),Yq=function(t){(0,S.ZT)(e,t);function e(n){return t.call(this,n,CG)||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(Nr.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(Nr.title,function(){return new M2({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(Nr.itemsGroup,"g").styles((0,S.pi)({x:i,y:a},f));var h=this;this.itemsGroup.selectAll(Nr.items.class).data(["items"]).join(function(p){return p.append(function(){return new Hq({style:d})}).attr("className",Nr.items.name).each(function(){h.items=Ue(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 Gn(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):NB(i,a)},e.prototype.render=function(n,r){var i=n.width,a=n.height,o=Ue(r);this.renderTitle(o,i,a),this.renderItems(o,this.availableSpace),this.adjustLayout()},e}(Lr);function Vq(t){if(ll(t)){var e=t;return e[e.length-1]}}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};function $q(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 Uq(t,e){const{scales:n,library:r,markState:i}=e,[a,o]=$q(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)||Vq(d.split(".")),m=typeof c=="function"?c(h):c;return()=>aU(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 qq(t){const e=ua(t,"opacity");if(e){const{range:n}=e.getOptions();return(r,i)=>n[i]}}function Zq(t,e){const n=ua(t,"size");return n instanceof eh?n.map(NaN)*2:e}function Kq(t,e){const{labelFormatter:n=d=>`${d}`}=t,{scales:r,theme:i}=e,a=i.legendCategory.itemMarkerSize,o=Zq(r,a),s={itemMarker:Uq(Object.assign(Object.assign({},t),{itemMarkerSize:o}),e),itemMarkerSize:o,itemMarkerOpacity:qq(r)},c=typeof n=="string"?oo(n):n,l=ua(r,"color"),u=Fz(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 Qq(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}=Z2(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=Xq(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}=Qq(h,t,cy),m=U2(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:ud(s)}),Kq(t,d)),{legendCategory:_={}}=p,O=fd(Object.assign({},_,b,u)),w=new Iz({style:Object.assign(Object.assign({x:v.x,y:v.y,width:v.width,height:v.height},m),{subOptions:O})});return w.appendChild(new Yq({className:"legend-category",style:O})),w}};cy.props={defaultPosition:"top",defaultOrder:1,defaultSize:40,defaultCrossPadding:[12,12],defaultPadding:[12,12]};const FT=t=>()=>new Fr;FT.props={};var Jq=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 BT(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 tZ=Nz({render(t,e){const{width:n,title:r,subtitle:i,spacing:a=2,align:o="left"}=t,s=Jq(t,["width","title","subtitle","spacing","align"]),c=le(s,"title"),l=le(s,"subtitle"),f=$2(e,".title","text").attr("className","title").call(Ee,Object.assign(Object.assign(Object.assign({},BT(0,0,n,o)),{fontSize:14,textBaseline:"top",text:r}),c)).node().getLocalBounds();$2(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({},BT(0,f.max[1]+a,n,o)),{fontSize:12,textBaseline:"top",text:i}),l))})}}),zT=t=>({value:e,theme:n})=>{const{x:r,y:i,width:a,height:o}=e.bbox;return new tZ({style:Nt({},n.title,Object.assign({x:r,y:i,width:a,height:o},t))})};zT.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,eZ=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,Nt({},{type:"column"},(0,S.pi)({style:i},a)))||this,r.columnsGroup=new Fr({name:"columns"}),r.appendChild(r.columnsGroup),r.render(),r}return e.prototype.render=function(){var n=this.attributes.columns;Ue(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}(Vr),nZ=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,Nt({},{type:"lines"},(0,S.pi)({style:i},a)))||this,r.linesGroup=r.appendChild(new Fr),r.areasGroup=r.appendChild(new Fr),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){Ue(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){Ue(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}(Vr);function rZ(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=uv(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=uv(f,g),M=La(M,-_/O),d=pl(g,M),d=Ko(d,Qo(s,g)),d=Qo(d,Ko(s,g)),E=uv(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 iZ(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=rZ(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 aZ(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 Xl(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 ah(t,e){if(e===void 0&&(e=!1),t.length<=2)return Xl(t);for(var n=[],r=t.length,i=0;i<r;i+=1){var a=e?t[r-i-1]:t[i];j_(a,n.slice(-2))||n.push.apply(n,(0,S.ev)([],(0,S.CR)(a),!1))}var o=iZ(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 oZ(t,e,n,r){return t.map(function(i){return fy(e?ah(i):Xl(i),n,r)})}function sZ(t,e,n){for(var r=[],i=t.length-1;i>=0;i-=1){var a=t[i],o=Xl(a),s=void 0;if(i===0)s=fy(o,e,n);else{var c=t[i-1],l=Xl(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 cZ(t,e,n){for(var r=[],i=t.length-1;i>=0;i-=1){var a=t[i],o=ah(a),s=void 0;if(i===0)s=fy(o,e,n);else{var c=t[i-1],l=ah(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 lZ=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}},uZ=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 GT(t){return t.length===0?[0,0]:[of(lZ(t,function(e){return of(e)||0})),sf(uZ(t,function(e){return sf(e)||0}))]}function WT(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 fZ=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?WT(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=aZ(u,{type:"line",x:d,y:h}),v=[];if(s){var g=this.baseline;a?v=o?cZ(p,l,g):sZ(p,l,g):v=oZ(p,o,l,g)}return{lines:p.map(function(y,m){return(0,S.pi)({stroke:n.getColor(m),path:o?ah(y):Xl(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=WT(l));var u=this.createScales(l),f=u.x,d=u.y,h=(0,S.CR)(GT(l),2),p=h[0],v=h[1],g=new Xr({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){MF(r,".container","rect").attr("className","container").node();var i=n.type,a="spark".concat(i),o=i==="line"?this.linesStyle:this.columnsStyle;Ue(r).selectAll(".spark").data([i]).join(function(s){return s.append(function(c){return c==="line"?new nZ({className:a,style:o}):new eZ({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)(GT(n),2),v=p[0],g=p[1],y=new Xr({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 Xr({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}(Lr),HT=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(oO,"handle")),la(iO,"handleIcon")),la(aO,"handleLabel")))||this;return r.range=[0,1],r.onDragStart=function(i){return function(a){a.stopPropagation(),r.target=i,r.prevPos=r.getOrientVal(hd(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(hd(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 kn("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=Ue(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=Ue(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=Ue(n).maybeAppendByClassName(fa.sparklineGroup,"g");vi(i==="horizontal",a,function(o){var s=r.sparklineStyle;o.maybeAppendByClassName(fa.sparkline,function(){return new fZ({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 sO({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=Ue(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=Ue(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 dd(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 dd(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 cv({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 F=C-R-m;O=F>0?-D:D}else{var B=E-C-N-R>m;O=B?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 kn(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}(Lr);function dZ(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===dZ?t:hZ,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 hZ(){return 0}function dy(t){return t===null?NaN:+t}function*pZ(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 YT=_c(fr),vZ=YT.right,gZ=YT.left,yZ=_c(dy).center;var mZ=vZ;function bZ(t,e){return Array.from(e,n=>t[n])}function Fa(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=$l(o[i],o[a]);if(s)return s}})):(n=t.map(n),r.sort((i,a)=>$l(n[i],n[a]))),bZ(t,r)}return t.sort(VT(n))}function VT(t=fr){if(t===fr)return $l;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 $l(t,e){return(t==null||!(t>=t))-(e==null||!(e>=e))||(t<e?-1:t>e?1:0)}function xZ(t,e,n){return Math.min(n,Math.max(e,t))}function Ul(t){return!!t.getBandWidth}function Oc(t,e,n){if(!Ul(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=gZ(s,e),l=xZ(c+a,0,i.length-1);return i[l]}function _o(t,e,n){if(!e)return t.getOptions().domain;if(!Ul(t)){const c=Fa(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 oh(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 sh(t,e){const[n,r]=t,i=a=>a.getStep?a.getStep():0;return[e.map(n),e.map(r)+i(e)]}function _Z(t,e,n){const{x:r,y:i}=e,[a,o]=t,s=sh(a,r),c=sh(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 OZ=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,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 ql=t=>{const{orientation:e,labelFormatter:n,size:r,style:i={},position:a}=t,o=OZ(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",_=zn(d)&&b,{trackSize:O=g.trackSize}=i,[w,M]=wZ(h,a,O);return new HT({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:MZ(t,s)},i),o))})}};function SZ(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 MZ(t,e){const{markState:n}=e;return Dr(t.sparklineData)?t.sparklineData:SZ(n,["y","series"])}ql.props={defaultPosition:"bottom",defaultSize:24,defaultOrder:1,defaultCrossPadding:[12,12],defaultPadding:[12,12]};const XT=t=>ql(Object.assign(Object.assign({},t),{orientation:"horizontal"}));XT.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"});var EZ=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 kn("scroll",o)),r.dispatchEvent(new kn("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(hd(i)),p=(h-d)/r.trackLength;r.setValue(p,!0)}},r.onThumbMouseenter=function(i){r.dispatchEvent(new kn("thumbMouseenter",{detail:i.detail}))},r.onTrackMouseenter=function(i){r.dispatchEvent(new kn("trackMouseenter",{detail:i.detail}))},r.onThumbMouseleave=function(i){r.dispatchEvent(new kn("thumbMouseleave",{detail:i.detail}))},r.onTrackMouseleave=function(i){r.dispatchEvent(new kn("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=Ue(n).maybeAppendByClassName("scrollbar",function(){return new HT({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}(Lr),AZ=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const Zl=t=>{const{orientation:e,labelFormatter:n,style:r}=t,i=AZ(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 EZ({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}))})}};Zl.props={defaultPosition:"bottom",defaultSize:24,defaultOrder:1,defaultCrossPadding:[12,12],defaultPadding:[12,12]};const UT=t=>Zl(Object.assign(Object.assign({},t),{orientation:"horizontal"}));UT.props=Object.assign(Object.assign({},Zl.props),{defaultPosition:"bottom"});const qT=t=>Zl(Object.assign(Object.assign({},t),{orientation:"vertical"}));qT.props=Object.assign(Object.assign({},Zl.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]=zn(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))}},TZ=(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]=zn(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))}},ZT=(t,e)=>{const{coordinate:r}=e;return Fx.registerProperty({name:"scaleInYRadius",inherits:!1,initialValue:"",interpolable:!0,syntax:oe.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=y0(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]=zn(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 Nn(r)?c(s):l(s)}},PZ=(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]=zn(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))}},KT=(t,e)=>{Fx.registerProperty({name:"waveInArcAngle",inherits:!1,initialValue:"",interpolable:!0,syntax:oe.NUMBER});const{coordinate:r}=e;return(i,a,o)=>{const[s]=i;if(!Nn(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=y0(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}};KT.props={};const QT=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))};QT.props={};const JT=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))};JT.props={};const CZ=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))},kZ=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))},tP=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))};tP.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 RZ(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 LZ(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(RZ([g,y,p,u]))}d-=h,f+=1}return l}function NZ(t="pack"){return typeof t=="function"?t:LZ}function IZ(t,e,n){const[r,i,a,o]=py(t),{transform:s}=t.style,{transform:c}=e.style;eP(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 eP(t,e){t.__data__=e.__data__,t.className=e.className,t.markType=e.markType,e.parentNode.replaceChild(t,e)}function jZ(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 eP(r,t),r}function nP(t,e){const n=t.indexOf(e),r=t.lastIndexOf(e);return n===r}function DZ(t){return!nP(t,"m")||!nP(t,"M")}function rP(t){const e=y0(t);if(e&&!DZ(e))return e}function vy(t,e,n,r){const{nodeName:i}=e,{nodeName:a}=n,o=rP(e),s=rP(n);if(i===a&&i!=="path"||(o===void 0||s===void 0))return IZ(e,n,r);const u=jZ(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",ev(u,n)},u.style.transform="none",d}function FZ(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 BZ(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 iP=t=>(e,n,r)=>{const i=NZ(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 FZ(c,n,a,i)}if(o>1&&s===1){const[c]=n;return BZ(e,c,a,i)}return null};iP.props={};const aP=(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)};aP.props={};const oP=(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,ZT(t,e)([c],r,i)};oP.props={};var Kl=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 sP(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 Ba(t){return je(t).select(`.${Ff}`).node()}function cP(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=cP(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]=zZ(t);return[Math.min(o,Math.max(i,n))-i,Math.min(s,Math.max(a,r))-a]}function zZ(t){const e=t.getRenderBounds(),{min:[n,r],max:[i,a]}=e;return[n,r,i,a]}function lP(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=>[ch(r.key,a.key),a.data])));return r=>{const{index:i,markKey:a,viewKey:o}=r.__data__;return n.get(ch(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=MX(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 GZ(t){return t===void 0?!0:typeof t!="object"?!1:Object.keys(t).length===0}function ch(t,e){return`${t},${e}`}function Mc(t,e){const r=(Array.isArray(t)?t:[t]).flatMap(a=>a.marks.map(o=>[ch(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=GZ(f[o])?s:f[o];for(const[h,p]of Object.entries(d)){const v=c[h],g=(y,m,b,_)=>{const O=ch(_.__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 Ql(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 uP(t){var{link:e=!1,valueof:n=(u,f)=>u,coordinate:r}=t,i=Kl(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=Fa(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=Kl(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 fP(t,e,n){const r=i=>{const{transform:a}=t.style;return a?`${a} ${i}`:i};if(Nn(n)){const{points:i}=t.__data__,[a,o]=zn(n)?yd(i):i,s=n.getCenter(),c=ur(a,s),l=ur(o,s),u=Gi(c),f=wO(c,l),d=u+f/2,h=e*Math.cos(d),p=e*Math.sin(d);return r(`translate(${h}, ${p})`)}return zn(n)?r(`translate(${e}, 0)`):r(`translate(0, ${-e})`)}function dP(t){var{document:e,background:n,scale:r,coordinate:i,valueof:a}=t,o=Kl(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(!Ul(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(!Ul(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 qS(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=Kl(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(Ul)};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=Kl(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 WZ(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 HZ=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 YZ(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=Zn(d,r),v=Ql(d,n),[g,y]=uP(Object.assign({elements:d,valueof:v,link:i,coordinate:c},le(u.active,"link"))),[m,b,_]=dP(Object.assign({document:t.ownerDocument,scale:s,coordinate:c,background:a,valueof:v},le(u.active,"background"))),O=Nt(u,{active:Object.assign({},((f=u.active)===null||f===void 0?void 0:f.offset)&&{transform:(...F)=>{const B=u.active.offset(...F),[,z]=F;return fP(d[z],B,c)}})}),{setState:w,removeState:M,hasState:E}=za(O,v);let A;const P=F=>{const{target:B,nativeEvent:z=!0}=F;if(!h.has(B))return;A&&clearTimeout(A);const Y=r(B),$=p.get(Y),tt=new Set($);for(const it of d)tt.has(it)?E(it,"active")||w(it,"active"):(w(it,"inactive"),y(it)),it!==B&&b(it);m(B),g($),z&&l.emit("element:highlight",{nativeEvent:z,data:{data:n(B),group:$.map(n)}})},C=()=>{A&&clearTimeout(A),A=setTimeout(()=>{j(),A=null},o)},j=(F=!0)=>{for(const B of d)M(B,"active","inactive"),b(B),y(B);F&&l.emit("element:unhighlight",{nativeEvent:F})},N=F=>{const{target:B}=F;a&&!_(B)||!a&&!h.has(B)||(o>0?C():j())},k=()=>{j()};t.addEventListener("pointerover",P),t.addEventListener("pointerout",N),t.addEventListener("pointerleave",k);const R=F=>{const{nativeEvent:B}=F;B||j(!1)},D=F=>{const{nativeEvent:B}=F;if(B)return;const{data:z}=F.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 F of d)b(F),y(F)}}function lh(t){var{delay:e,createGroup:n,background:r=!1,link:i=!1}=t,a=HZ(t,["delay","createGroup","background","link"]);return(o,s,c)=>{const{container:l,view:u,options:f}=o,{scale:d,coordinate:h}=u,p=Ba(l);return YZ(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))}}lh.props={reapplyWhenUpdate:!0};function hP(t){return lh(Object.assign(Object.assign({},t),{createGroup:by}))}hP.props={reapplyWhenUpdate:!0};function pP(t){return lh(Object.assign(Object.assign({},t),{createGroup:lP}))}pP.props={reapplyWhenUpdate:!0};var 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,{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=Zn(d,r),v=Ql(d,n),[g,y]=uP(Object.assign({link:i,elements:d,valueof:v,coordinate:o},le(u.selected,"link"))),[m,b]=dP(Object.assign({document:t.ownerDocument,background:s,coordinate:o,scale:c,valueof:v},le(u.selected,"background"))),_=Nt(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 fP(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 F=r(R),B=p.get(F),z=new Set(B);for(const Y of d)z.has(Y)?O(Y,"selected"):(O(Y,"unselected"),y(Y)),Y!==R&&b(Y);if(g(B),m(R),!D)return;l.emit("element:select",Object.assign(Object.assign({},k),{nativeEvent:D,data:{data:[n(R),...B.map(n)]}}))}},P=(k,R,D=!0)=>{const F=r(R),B=p.get(F),z=new Set(B);if(M(R,"selected")){if(!d.some($=>!z.has($)&&M($,"selected")))return E();for(const $ of B)O($,"unselected"),y($),b($)}else{const Y=B.some($=>M($,"selected"));for(const $ of d)z.has($)?O($,"selected"):M($,"selected")||O($,"unselected");!Y&&i&&g(B),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 F=a?D.data.slice(0,1):D.data;for(const B of F){const z=xy(d,B,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 uh(t){var{createGroup:e,background:n=!1,link:r=!1}=t,i=VZ(t,["createGroup","background","link"]);return(a,o,s)=>{const{container:c,view:l,options:u}=a,{coordinate:f,scale:d}=l,h=Ba(c);return XZ(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))}}uh.props={reapplyWhenUpdate:!0};function vP(t){return uh(Object.assign(Object.assign({},t),{createGroup:by}))}vP.props={reapplyWhenUpdate:!0};function gP(t){return uh(Object.assign(Object.assign({},t),{createGroup:lP}))}gP.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 $Z(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 UZ({wait:t=30,leading:e,trailing:n=!1}){return r=>{const{options:i,update:a,setState:o,container:s}=r,c=Ba(s),l=ys(u=>{const f=yy(c,u);if(!f){o("fisheye"),a();return}o("fisheye",d=>{const h=Nt({},d,{interaction:{tooltip:{preserve:!0}}});for(const y of h.marks)y.animate=!1;const[p,v]=f,g=$Z(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 qZ=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())})},ZZ=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 KZ(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 QZ(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 yP(t){var{wait:e=20,leading:n,trailing:r=!1,labelFormatter:i=o=>`${o}`}=t,a=ZZ(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=QZ(f,"line",["x","y","series"]);if(!p)return;const{y:v,x:g,series:y=[]}=p,m=v.map((F,B)=>B),b=Fa(m.map(F=>g[F])),_=Ba(c),O=c.getElementsByClassName(Ca),w=c.getElementsByClassName($0),E=Zn(w,F=>F.__data__.key.split("-")[0]),A=new rl({style:Object.assign({x1:0,y1:0,x2:0,y2:_.getAttribute("height"),stroke:"black",lineWidth:1},le(a,"rule"))}),P=new Zi({style:Object.assign({x:0,y:_.getAttribute("height"),text:"",fontSize:10},le(a,"label"))});A.append(P),_.appendChild(A);const C=(F,B,z)=>{const[Y]=F.invert(z),$=B.invert(Y);return b[yZ(b,$)]},j=(F,B)=>{A.setAttribute("x1",F[0]),A.setAttribute("x2",F[0]),P.setAttribute("text",i(B))};let N;const k=F=>qZ(this,void 0,void 0,function*(){const{x:B}=d,z=C(h,B,F);j(F,z),u("chartIndex",$=>{const tt=Nt({},$),it=tt.marks.find(Ct=>Ct.type==="line"),Ft=Sn(K0(m,Ct=>Sn(Ct,se=>+v[se])/Ai(Ct,se=>+v[se]),Ct=>y[Ct]).values()),Xt=[1/Ft,Ft];Nt(it,{scale:{y:{domain:Xt}}});const Pt=KZ(it);Pt.groupBy="color",Pt.basis=(Ct,se)=>{const ce=Ct[_c(Oe=>g[+Oe]).center(Ct,z)];return se[ce]};for(const Ct of tt.marks)Ct.animate=!1;return tt}),N=(yield l("chartIndex")).view}),R=F=>{const{scale:B,coordinate:z}=N,{x:Y,y:$}=B,tt=C(z,Y,F);j(F,tt);for(const it of O){const{seriesIndex:St,key:Ft}=it.__data__,Xt=St[_c(Fe=>g[+Fe]).center(St,tt)],Pt=[0,$.map(1)],Ct=[0,$.map(v[Xt]/v[St[0]])],[,se]=z.map(Pt),[,ce]=z.map(Ct),Oe=se-ce;it.setAttribute("transform",`translate(0, ${Oe})`);const He=E.get(Ft)||[];for(const Fe of He)Fe.setAttribute("dy",Oe)}},D=ys(F=>{const B=yy(_,F);B&&R(B)},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)}}}yP.props={reapplyWhenUpdate:!0};function Jl(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 fh(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 mP(t){var e=document.createElement("div");e.innerHTML=t;var n=e.childNodes[0];return n&&e.contains(n)&&e.removeChild(n),n}function JZ(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 tK=JZ;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 bP={overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"};function eK(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},bP),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)"},bP),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 nK=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:eK(o)})||this,r.timestamp=-1,r.prevCustomContentKey=r.attributes.contentKey,r.initShape(),r.render(r.attributes,r),r}return Object.defineProperty(e.prototype,"HTMLTooltipElement",{get:function(){return this.element},enumerable:!1,configurable:!0}),e.prototype.getContainer=function(){return this.element},Object.defineProperty(e.prototype,"elementSize",{get:function(){var n=this.element.offsetWidth,r=this.element.offsetHeight;return{width:n,height:r}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"HTMLTooltipItemsElements",{get:function(){var n=this.attributes,r=n.data,i=n.template;return r.map(function(a,o){var s=a.name,c=s===void 0?"":s,l=a.color,u=l===void 0?"black":l,f=a.index,d=(0,S._T)(a,["name","color","index"]),h=(0,S.pi)({name:c,color:u,index:f!=null?f:o},d);return mP(tK(i.item,h))})},enumerable:!1,configurable:!0}),e.prototype.render=function(n,r){this.renderHTMLTooltipElement(),this.updatePosition()},e.prototype.destroy=function(){var n;(n=this.element)===null||n===void 0||n.remove(),t.prototype.destroy.call(this)},e.prototype.show=function(n,r){var i=this;if(n!==void 0&&r!==void 0){var a=this.element.style.visibility==="hidden",o=function(){i.attributes.x=n!=null?n:i.attributes.x,i.attributes.y=r!=null?r:i.attributes.y,i.updatePosition()};a?this.closeTransition(o):o()}this.element.style.visibility="visible"},e.prototype.hide=function(n,r){n===void 0&&(n=0),r===void 0&&(r=0);var i=this.attributes.enterable;i&&this.isCursorEntered(n,r)||(this.element.style.visibility="hidden")},e.prototype.initShape=function(){var n=this.attributes.template;this.element=mP(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)}PF(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(){var n=this.attributes.showDelay,r=n===void 0?60:n,i=Date.now();this.timestamp>0&&i-this.timestamp<r||(this.timestamp=i,this.setOffsetPosition(this.autoPosition(this.getRelativeOffsetFromCursor())))},e.prototype.autoPosition=function(n){var r=(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.prototype.isCursorEntered=function(n,r){if(this.element){var i=this.element.getBoundingClientRect(),a=i.x,o=i.y,s=i.width,c=i.height;return new Gn(a,o,s,c).isPointIn(n,r)}return!1},e.prototype.closeTransition=function(n){var r=this,i=this.element.style.transition;this.element.style.transition="none",n(),setTimeout(function(){r.element.style.transition=i},10)},e.tag="tooltip",e}(Lr),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};function dh(t,e){return e?typeof e=="string"?document.querySelector(e):e:t.ownerDocument.defaultView.getContextService().getDomElement().parentElement}function rK(t){const e=t.getBounds(),{min:[n,r],max:[i,a]}=e;return{x:n,y:r,width:i-n,height:a-r}}function iK(t,e){const n=t.getBoundingClientRect(),r=e.getBoundingClientRect();return{x:n.x-r.x,y:n.y-r.y}}function aK(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 nK({className:"tooltip",style:{x:e,y:n,container:o,data:[],bounding:a,position:r,enterable:i,title:"",offset:[10,10],template:{prefixCls:"g2-"},style:Nt(c,s)}});return t.appendChild(l.HTMLTooltipElement),l}function xP({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=dh(t,u),h=dh(t),p=o?h:t,v=f||rK(t),g=iK(h,d),{tooltipElement:y=aK(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,event:i=null}){r&&n.emit("tooltip:hide",{nativeEvent:r});const a=dh(t),o=e?a:t,{tooltipElement:s}=o;s&&s.hide(i==null?void 0:i.clientX,i==null?void 0:i.clientY)}function Oy({root:t,single:e}){const n=dh(t),r=e?n:t;if(!r)return;const{tooltipElement:i}=r;i&&(i.destroy(),r.tooltipElement=void 0)}function _P(t){const{value:e}=t;return Object.assign(Object.assign({},t),{value:e===void 0?"undefined":e})}function oK(t){const{__data__:e}=t,{title:n,items:r=[]}=e,i=r.filter(Rn).map(a=>{var{color:o=OP(t)}=a,s=tu(a,["color"]);return Object.assign(Object.assign({},s),{color:o})}).map(_P);return Object.assign(Object.assign({},n&&{title:n}),{items:i})}function sK(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 OP(t){const e=t.getAttribute("fill"),n=t.getAttribute("stroke"),{__data__:r}=t,{color:i=e&&e!=="transparent"?e:n}=r;return i}function wP(t,e=n=>n){const n=new Map(t.map(r=>[e(r),r]));return Array.from(n.values())}function SP(t,e,n,r=t.map(a=>a.__data__),i={}){const a=c=>c instanceof Date?+c:c,o=wP(r.map(c=>c.title),a).filter(Rn),s=r.flatMap((c,l)=>{const u=t[l],{items:f=[],title:d}=c,h=f.filter(Rn),p=n!==void 0?n:f.length<=1;return h.map(v=>{var{color:g=OP(u)||i.color,name:y}=v,m=tu(v,["color","name"]);const b=sK(e,c),_=p?b||y:y||b;return Object.assign(Object.assign({},m),{color:g,name:_||d})})}).map(_P);return Object.assign(Object.assign({},o.length>0&&{title:o.join(",")}),{items:wP(s,c=>`(${a(c.name)}, ${a(c.value)}, ${a(c.color)})`)})}function cK(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=tu(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=Jl(v),m=Jl(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 MP(t){t.ruleY&&(t.ruleY.remove(),t.ruleY=void 0)}function lK(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 Rn(o)&&Rn(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 EP(t){t.markers&&(t.markers.forEach(e=>e.remove()),t.markers=[])}function AP(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 TP(t){const{title:e,items:n}=t;return n.length===0&&e===void 0}function uK(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 PP(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=tu(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=zn(o),R=Nn(o),D=Nt(P,j),{innerWidth:F,innerHeight:B,width:z,height:Y,insetLeft:$,insetTop:tt}=o.getOptions(),it=[],St=[];for(const pn of N){const{__data__:_n}=pn,{seriesX:ir,title:En,items:Ar}=_n;ir?it.push(pn):(En||Ar)&&St.push(pn)}const Xt=!!(k?a.y:a.x).getBandWidth&&St.length>0;it.sort((pn,_n)=>{const ir=k?0:1,En=Ar=>Ar.getBounds().min[ir];return k?En(_n)-En(pn):En(pn)-En(_n)});const Pt=pn=>{const _n=k?1:0,{min:ir,max:En}=pn.getLocalBounds();return Fa([ir[_n],En[_n]])};St.sort((pn,_n)=>{const[ir,En]=Pt(pn),[Ar,Pr]=Pt(_n),_i=(ir+En)/2,Ri=(Ar+Pr)/2;return k?Ri-_i:_i-Ri});const Ct=new Map(it.map(pn=>{const{__data__:_n}=pn,{seriesX:ir}=_n,En=ir.map((Pr,_i)=>_i),Ar=Fa(En,Pr=>ir[+Pr]);return[pn,[Ar,ir]]})),{x:se}=a,ce=se!=null&&se.getBandWidth?se.getBandWidth()/2:0,Oe=pn=>{const[_n]=o.invert(pn);return _n-ce},He=(pn,_n,ir)=>{const En=Oe(pn),Ar=ir.filter(Rn),[Pr,_i]=Fa([Ar[0],Ar[Ar.length-1]]),Ri=Pr===_i;if(!Xt&&(En<Pr||En>_i)&&!Ri)return null;const ra=_c(h1=>ir[+h1]).center,Co=ra(_n,En);return _n[Co]},Fe=(pn,_n)=>{const En=pn[k?1:0],Ar=_n.filter(Ri=>{const[ra,Co]=Pt(Ri);return En>=ra&&En<=Co});if(!Xt||Ar.length>0)return Ar;const Pr=_c(Ri=>{const[ra,Co]=Pt(Ri);return(ra+Co)/2}).center,_i=Pr(_n,En);return[_n[_i]].filter(Rn)},Ke=(pn,_n)=>{const{__data__:ir}=pn;return Object.fromEntries(Object.entries(ir).filter(([En])=>En.startsWith("series")&&En!=="series").map(([En,Ar])=>{const Pr=Ar[_n];return[w_(En.replace("series","")),Pr]}))},dn=ys(pn=>{const _n=yy(t,pn);if(!_n)return;const ir=cP(t),En=ir.min[0],Ar=ir.min[1],Pr=[_n[0]-p,_n[1]-v];if(!Pr)return;const _i=Fe(Pr,St),Ri=[],ra=[];for(const Tr of it){const[Du,v1]=Ct.get(Tr),V3=He(Pr,Du,v1);if(V3!==null){Ri.push(Tr);const X3=Ke(Tr,V3),{x:nut,y:rut}=X3,iut=o.map([(nut||0)+ce,rut||0]);ra.push([Object.assign(Object.assign({},X3),{element:Tr}),iut])}}const Co=Array.from(new Set(ra.map(Tr=>Tr[0].x))),h1=Co[fh(Co,Tr=>Math.abs(Tr-Oe(Pr)))],p1=ra.filter(Tr=>Tr[0].x===h1),eut=[...p1.map(Tr=>Tr[0]),..._i.map(Tr=>Tr.__data__)],Y3=[...Ri,..._i],ju=SP(Y3,a,l,eut,w);if(r&&ju.items.sort((Tr,Du)=>r(Tr)-r(Du)),i&&(ju.items=ju.items.filter(i)),Y3.length===0||TP(ju)){xn(pn);return}if(g&&xP({root:t,data:ju,x:_n[0]+En,y:_n[1]+Ar,render:c,event:pn,single:y,position:m,enterable:b,mount:_,bounding:O,css:C}),s){const Tr=p1.map(v1=>v1[1]),Du=le(D,"crosshairs");cK(t,Tr,Object.assign(Object.assign({},Du),{plotWidth:F,plotHeight:B,mainWidth:z,mainHeight:Y,insetLeft:$,insetTop:tt,startX:p,startY:v,transposed:k,polar:R}))}if(E){const Tr=le(D,"marker");lK(t,{data:p1,style:Tr,theme:w})}u.emit("tooltip:show",Object.assign(Object.assign({},pn),{nativeEvent:!0,data:{data:{x:Oc(a.x,Oe(Pr),!0)}}}))},f,{leading:d,trailing:h}),xn=pn=>{So({root:t,single:y,emitter:u,event:pn}),s&&MP(t),E&&EP(t)},Yn=()=>{Oy({root:t,single:y}),s&&MP(t),E&&EP(t)},yr=({nativeEvent:pn,data:_n})=>{if(pn)return;const{x:ir}=_n.data,{x:En}=a,Ar=En.map(ir),[Pr,_i]=o.map([Ar,.5]),{min:[Ri,ra]}=t.getRenderBounds();dn({offsetX:Pr+Ri,offsetY:_i+ra})},xi=()=>{So({root:t,single:y,emitter:u,nativeEvent:!1})},Xa=()=>{Ui(),Yn()},ws=()=>{si()},si=()=>{M||(t.addEventListener("pointerenter",dn),t.addEventListener("pointermove",dn),t.addEventListener("pointerleave",xn))},Ui=()=>{M||(t.removeEventListener("pointerenter",dn),t.removeEventListener("pointermove",dn),t.removeEventListener("pointerleave",xn))};return si(),u.on("tooltip:show",yr),u.on("tooltip:hide",xi),u.on("tooltip:disable",Xa),u.on("tooltip:enable",ws),()=>{Ui(),u.off("tooltip:show",yr),u.off("tooltip:hide",xi),u.off("tooltip:disable",Xa),u.off("tooltip:enable",ws),A?So({root:t,single:y,emitter:u,nativeEvent:!1}):Yn()}}function fK(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=Zn(A,f),j=ys(Y=>{const{target:$}=Y;if(!P.has($)){So({root:t,single:d,emitter:s,event:Y});return}const tt=f($),it=C.get(tt),St=it.length===1&&!_?oK(it[0]):SP(it,n,i,void 0,b);if(a&&St.items.sort((Pt,Ct)=>a(Pt)-a(Ct)),o&&(St.items=St.items.filter(o)),TP(St)){So({root:t,single:d,emitter:s,event:Y});return}const{offsetX:Ft,offsetY:Xt}=Y;O&&xP({root:t,data:St,x:Ft,y:Xt,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:YO($,g)}}))},c,{leading:l,trailing:u}),N=Y=>{So({root:t,single:d,emitter:s,event:Y})},k=()=>{w||(t.addEventListener("pointermove",j),t.addEventListener("pointerleave",N))},R=()=>{w||(t.removeEventListener("pointermove",j),t.removeEventListener("pointerleave",N))},D=({nativeEvent:Y,data:$})=>{if(Y)return;const tt=xy(A,$.data,v);if(!tt)return;const it=tt.getBBox(),{x:St,y:Ft,width:Xt,height:Pt}=it;j({target:tt,offsetX:St+Xt/2,offsetY:Ft+Pt/2})},F=({nativeEvent:Y}={})=>{Y||So({root:t,single:d,emitter:s,nativeEvent:!1})},B=()=>{R(),Oy({root:t,single:d})},z=()=>{k()};return s.on("tooltip:show",D),s.on("tooltip:hide",F),s.on("tooltip:enable",z),s.on("tooltip:disable",B),k(),()=>{R(),s.off("tooltip:show",D),s.off("tooltip:hide",F),M?So({root:t,single:d,emitter:s,nativeEvent:!1}):Oy({root:t,single:d})}}function CP(t){const{shared:e,crosshairs:n,series:r,name:i,item:a=()=>({}),facet:o=!1}=t,s=tu(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=AP(p,"seriesTooltip"),m=AP(p,"crosshairs"),b=Ba(f),_=wy(r,y);if(_&&uK(p)&&!o)return PP(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=sP(c,l),M=O[0].view.scale,E=b.getBounds(),A=E.min[0],P=E.min[1];return Object.assign(M,{facet:!0}),PP(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 fK(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}))}}CP.props={reapplyWhenUpdate:!0};var hh=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 kP="legend-category",dK="legend-continuous",hK="items-item",pK="legend-category-item-marker",vK="legend-category-item-label";function RP(t){return t.getElementsByClassName(pK)[0]}function LP(t){return t.getElementsByClassName(vK)[0]}function NP(t){return t.getElementsByClassName(hK)}function IP(t){return t.getElementsByClassName(kP)}function gK(t){return t.getElementsByClassName(dK)}function Sy(t){let e=t.parentNode;for(;e&&!e.__data__;)e=e.parentNode;return e.__data__}function mpt(t){let e=t;for(;e&&!e.attr("class").startsWith("legend");)e=e.children[0];return e.attributes}function yK(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:le(d,"marker")},p={unselected:le(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=()=>{WZ(t)},C=j=>hh(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=>hh(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=>hh(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 mK(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 jP(t,{legend:e,channel:n,value:r,ordinal:i,channels:a,allChannels:o,facet:s=!1}){return hh(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 Nt({},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 bK(t,e){for(const n of t)jP(n,Object.assign(Object.assign({},e),{facet:!0}))}function xK(){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=[...IP(r),...gK(r)],c=s.flatMap(o),l=a?ys(bK,50,{trailing:!0}):ys(jP,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===kP?yK(r,{legends:NP,marker:RP,label:LP,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}):mK(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 _K(){return(t,e,n)=>{const{container:r,view:i,options:a}=t,o=IP(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=Ql(s,gs(i)),d=[];for(const h of o){const p=Y=>{const{data:$}=h.attributes,{__data__:tt}=Y,{index:it}=tt;return $[it].label},v=c(h),g=NP(h),y=l(v),m=Zn(s,Y=>y.invert(Y.__data__[v])),{state:b={}}=h.attributes,{inactive:_={}}=b,{setState:O,removeState:w}=za(u,f),M={inactive:le(_,"marker")},E={inactive:le(_,"label")},{setState:A,removeState:P}=za(M),{setState:C,removeState:j}=za(E),N=Y=>{for(const $ of g){const tt=RP($),it=LP($);$===Y||Y===null?(P(tt,"inactive"),j(it,"inactive")):(A(tt,"inactive"),C(it,"inactive"))}},k=(Y,$)=>{const tt=p($),it=new Set(m.get(tt));for(const Ft of s)it.has(Ft)?O(Ft,"active"):O(Ft,"inactive");N($);const{nativeEvent:St=!0}=Y;St&&n.emit("legend:highlight",Object.assign(Object.assign({},Y),{nativeEvent:St,data:{channel:v,value:tt}}))},R=new Map;for(const Y of g){const $=tt=>{k(tt,Y)};Y.addEventListener("pointerover",$),R.set(Y,$)}const D=Y=>{for(const tt of s)w(tt,"inactive","active");N(null);const{nativeEvent:$=!0}=Y;$&&n.emit("legend:unhighlight",{nativeEvent:$})},F=Y=>{const{nativeEvent:$,data:tt}=Y;if($)return;const{channel:it,value:St}=tt;if(it!==v)return;const Ft=g.find(Xt=>p(Xt)===St);Ft&&k({nativeEvent:!1},Ft)},B=Y=>{const{nativeEvent:$}=Y;$||D({nativeEvent:!1})};h.addEventListener("pointerleave",D),n.on("legend:highlight",F),n.on("legend:unhighlight",B);const z=()=>{h.removeEventListener(D),n.off("legend:highlight",F),n.off("legend:unhighlight",B);for(const[Y,$]of R)Y.removeEventListener($)};d.push(z)}return()=>d.forEach(h=>h())}}var Pi=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function OK(t,e){const[n,r,i,a]=t,[o,s,c,l]=e;return!(o>i||c<n||s>a||l<r)}function wK(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 SK(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 DP=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=Pi(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=(St,Ft,Xt)=>{St.handle||(St.handle=Xt.createElement("rect"),St.append(St.handle));const{handle:Pt}=St;return Pt.attr(Ft),Pt},h=le(nv(u,"handleNW","handleNE"),"handleN"),{render:p=d}=h,v=Pi(h,["render"]),g=le(u,"handleE"),{render:y=d}=g,m=Pi(g,["render"]),b=le(nv(u,"handleSE","handleSW"),"handleS"),{render:_=d}=b,O=Pi(b,["render"]),w=le(u,"handleW"),{render:M=d}=w,E=Pi(w,["render"]),A=le(u,"handleNW"),{render:P=d}=A,C=Pi(A,["render"]),j=le(u,"handleNE"),{render:N=d}=j,k=Pi(j,["render"]),R=le(u,"handleSE"),{render:D=d}=R,F=Pi(R,["render"]),B=le(u,"handleSW"),{render:z=d}=B,Y=Pi(B,["render"]),$=(St,Ft)=>{const{id:Xt}=St,Pt=St.attributes,{x:Ct,y:se}=Pt,ce=Pi(Pt,["x","y"]),Oe=Ft(St,Object.assign({x:0,y:0},ce),l);Oe.id=Xt,Oe.style.draggable=!0},tt=St=>()=>{const Ft=rc(Xt=>$(Xt,St));return new Ft({})},it=je(t).attr("className",o).style("x",n).style("y",r).style("draggable",!0);it.maybeAppend("selection","rect").style("draggable",!0).style("fill","transparent").call(Ga,Object.assign({width:i,height:a},nv(u,"handle"))),it.maybeAppend("handle-n",tt(p)).style("x",f).style("y",-f).style("width",i-c).style("height",c).style("fill","transparent").call(Ga,v),it.maybeAppend("handle-e",tt(y)).style("x",i-f).style("y",f).style("width",c).style("height",a-c).style("fill","transparent").call(Ga,m),it.maybeAppend("handle-s",tt(_)).style("x",f).style("y",a-f).style("width",i-c).style("height",c).style("fill","transparent").call(Ga,O),it.maybeAppend("handle-w",tt(M)).style("x",-f).style("y",f).style("width",c).style("height",a-c).style("fill","transparent").call(Ga,E),it.maybeAppend("handle-nw",tt(P)).style("x",-f).style("y",-f).style("width",c).style("height",c).style("fill","transparent").call(Ga,C),it.maybeAppend("handle-ne",tt(N)).style("x",i-f).style("y",-f).style("width",c).style("height",c).style("fill","transparent").call(Ga,k),it.maybeAppend("handle-se",tt(D)).style("x",i-f).style("y",a-f).style("width",c).style("height",c).style("fill","transparent").call(Ga,F),it.maybeAppend("handle-sw",tt(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=SK(t),brushRegion:c=(Pt,Ct,se,ce,Oe)=>[Pt,Ct,se,ce],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=Pi(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=(Pt,Ct,se)=>{if(a(se),m&&m.remove(),b&&b.remove(),v=[Pt,Ct],l)return P();C()},P=()=>{b=new ri({style:Object.assign(Object.assign({},p),{fill:u,fillOpacity:f,stroke:d,pointerEvents:"none"})}),m=new DP({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 DP({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=(Pt=!0)=>{m&&m.remove(),b&&b.remove(),v=null,g=null,y=null,_=!1,m=null,b=null,r(Pt)},N=(Pt,Ct,se=!0)=>{const[ce,Oe,He,Fe]=wK(Pt[0],Pt[1],Ct[0],Ct[1],s),[Ke,dn,xn,Yn]=c(ce,Oe,He,Fe,s);return l?R(Ke,dn,xn,Yn):k(Ke,dn,xn,Yn),n(Ke,dn,xn,Yn,se),[Ke,dn,xn,Yn]},k=(Pt,Ct,se,ce)=>{m.style.x=Pt,m.style.y=Ct,m.style.width=se-Pt,m.style.height=ce-Ct},R=(Pt,Ct,se,ce)=>{b.style.d=`
M${O},${w}L${M},${w}L${M},${E}L${O},${E}Z
M${Pt},${Ct}L${Pt},${ce}L${se},${ce}L${se},${Ct}Z
`,m.style.x=Pt,m.style.y=Ct,m.style.width=se-Pt,m.style.height=ce-Ct},D=Pt=>{const Ct=(dn,xn,Yn,yr,xi)=>dn+xn<yr?yr-xn:dn+Yn>xi?xi-Yn:dn,se=Pt[0]-y[0],ce=Pt[1]-y[1],Oe=Ct(se,v[0],g[0],O,M),He=Ct(ce,v[1],g[1],w,E),Fe=[v[0]+Oe,v[1]+He],Ke=[g[0]+Oe,g[1]+He];N(Fe,Ke)},F={"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"}},B=Pt=>Y(Pt)||z(Pt),z=Pt=>{const{id:Ct}=Pt;return h.indexOf(Ct)===-1?!1:new Set(Object.keys(F)).has(Ct)},Y=Pt=>Pt===m.getElementById("selection"),$=Pt=>{const{target:Ct}=Pt,[se,ce]=my(t,Pt);if(!m||!B(Ct)){A(se,ce,Pt),_=!0;return}B(Ct)&&(y=[se,ce])},tt=Pt=>{const{target:Ct}=Pt,se=my(t,Pt);if(!v)return;if(!y)return N(v,se);if(Y(Ct))return D(se);const[ce,Oe]=[se[0]-y[0],se[1]-y[1]],{id:He}=Ct;if(F[He]){const[Fe,Ke,dn,xn]=F[He].vector;return N([v[0]+ce*Fe,v[1]+Oe*Ke],[g[0]+ce*dn,g[1]+Oe*xn])}},it=Pt=>{if(y){y=null;const{x:He,y:Fe,width:Ke,height:dn}=m.style;v=[He,Fe],g=[He+Ke,Fe+dn],o(He,Fe,He+Ke,Fe+dn,Pt);return}g=my(t,Pt);const[Ct,se,ce,Oe]=N(v,g);_=!1,i(Ct,se,ce,Oe,Pt)},St=Pt=>{const{target:Ct}=Pt;m&&!B(Ct)&&j()},Ft=Pt=>{const{target:Ct}=Pt;!m||!B(Ct)||_?wo(t,"crosshair"):Y(Ct)?wo(t,"move"):z(Ct)&&wo(t,F[Ct.id].cursor)},Xt=()=>{wo(t,"default")};return t.addEventListener("dragstart",$),t.addEventListener("drag",tt),t.addEventListener("dragend",it),t.addEventListener("click",St),t.addEventListener("pointermove",Ft),t.addEventListener("pointerleave",Xt),{mask:m,move(Pt,Ct,se,ce,Oe=!0){m||A(Pt,Ct,{}),v=[Pt,Ct],g=[se,ce],N([Pt,Ct],[se,ce],Oe)},remove(Pt=!0){m&&j(Pt)},destroy(){m&&j(!1),wo(t,"default"),t.removeEventListener("dragstart",$),t.removeEventListener("drag",tt),t.removeEventListener("dragend",it),t.removeEventListener("click",St),t.removeEventListener("pointermove",Ft),t.removeEventListener("pointerleave",Xt)}}}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 MK(t,e,n){return Ey(t,e,n).map(r=>Ba(r.container))}function EK(t,e,n){return Ey(t,e,n).map(r=>r.options)}function FP(t,e){var{elements:n,selectedHandles:r,siblings:i=tt=>[],datum:a,brushRegion:o,extent:s,reverse:c,scale:l,coordinate:u,series:f=!1,key:d=tt=>tt,bboxOf:h=tt=>{const{x:it,y:St,width:Ft,height:Xt}=tt.style;return{x:it,y:St,width:Ft,height:Xt}},state:p={},emitter:v}=e,g=Pi(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),_=Ql(y,a),O=le(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 tt of[...y,...b])M(tt,"active","inactive")},R=(tt,it,St,Ft)=>{var Xt;for(const Ct of m)(Xt=Ct.brush)===null||Xt===void 0||Xt.remove();const Pt=new Set;for(const Ct of y){const{min:se,max:ce}=Ct.getLocalBounds(),[Oe,He]=se,[Fe,Ke]=ce;OK([Oe,He,Fe,Ke],[tt,it,St,Ft])?(w(Ct,"active"),Pt.add(d(Ct))):w(Ct,"inactive")}for(const Ct of b)Pt.has(d(Ct))?w(Ct,"active"):w(Ct,"inactive")},D=()=>{for(const tt of y)M(tt,"inactive");for(const tt of E.values())tt.remove();E.clear()},F=(tt,it,St,Ft)=>{const Xt=Pt=>{const Ct=Pt.cloneNode();return Ct.__data__=Pt.__data__,Pt.parentNode.appendChild(Ct),E.set(Pt,Ct),Ct};for(const Pt of y){const Ct=E.get(Pt)||Xt(Pt);Ct.style.clipPath=new $o({style:{x:tt+C,y:it+j,width:St-tt,height:Ft-it}}),w(Pt,"inactive"),w(Ct,"active")}},B=My(t,Object.assign(Object.assign({},O),{extent:N,brushRegion:o,reverse:c,selectedHandles:r,brushended:tt=>{const it=f?D:k;tt&&v.emit("brush:remove",{nativeEvent:!0}),it()},brushed:(tt,it,St,Ft,Xt)=>{const Pt=oh(tt,it,St,Ft,l,u);Xt&&v.emit("brush:highlight",{nativeEvent:!0,data:{selection:Pt}}),(f?F:R)(tt,it,St,Ft)},brushcreated:(tt,it,St,Ft,Xt)=>{const Pt=oh(tt,it,St,Ft,l,u);v.emit("brush:end",Object.assign(Object.assign({},Xt),{nativeEvent:!0,data:{selection:Pt}}))},brushupdated:(tt,it,St,Ft,Xt)=>{const Pt=oh(tt,it,St,Ft,l,u);v.emit("brush:end",Object.assign(Object.assign({},Xt),{nativeEvent:!0,data:{selection:Pt}}))},brushstarted:tt=>{v.emit("brush:start",tt)}})),z=({nativeEvent:tt,data:it})=>{if(tt)return;const{selection:St}=it,[Ft,Xt,Pt,Ct]=_Z(St,l,u);B.move(Ft,Xt,Pt,Ct,!1)};v.on("brush:highlight",z);const Y=({nativeEvent:tt}={})=>{tt||B.remove(!1)};v.on("brush:remove",Y);const $=B.destroy.bind(B);return B.destroy=()=>{v.off("brush:highlight",z),v.off("brush:remove",Y),$()},B}function Ay(t){var{facet:e,brushKey:n}=t,r=Pi(t,["facet","brushKey"]);return(i,a,o)=>{const{container:s,view:c,options:l}=i,u=Ba(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 FP(u.parentNode.parentNode,Object.assign(Object.assign({elements:()=>sP(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=FP(u,Object.assign(Object.assign({elements:Oo,key:g=>g.__data__.key,siblings:()=>MK(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,...EK(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 AK(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 TK(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 PK="axis",CK="axis-line",kK="axis-main-group",BP="axis-hot-area";function RK(t){return t.getElementsByClassName(PK)}function zP(t){return t.getElementsByClassName(CK)[0]}function LK(t){return t.getElementsByClassName(kK)[0]}function GP(t){return LK(t).getLocalBounds()}function NK(t,e){var{cross:n,offsetX:r,offsetY:i}=e,a=Cy(e,["cross","offsetX","offsetY"]);const o=GP(t),s=zP(t),[c]=s.getLocalBounds().min,[l,u]=o.min,[f,d]=o.max,h=(f-l)*2;return{brushRegion:Py,hotZone:new $o({className:BP,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 IK(t,e){var{offsetY:n,offsetX:r,cross:i=!1}=e,a=Cy(e,["offsetY","offsetX","cross"]);const o=GP(t),s=zP(t),[,c]=s.getLocalBounds().min,[l,u]=o.min,[f,d]=o.max,h=d-u;return{brushRegion:Ty,hotZone:new $o({className:BP,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 jK(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=Ql(p,o),{setState:y,removeState:m}=za(u,g),b=new Map,_=le(h,"mask"),O=z=>Array.from(b.values()).every(([Y,$,tt,it])=>z.some(([St,Ft])=>St>=Y&&St<=tt&&Ft>=$&&Ft<=it)),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:$}=Y.getOptions();E.set(z,M($))}};A();const P=(z,Y)=>{const $=[];for(const it of p){const St=i(it);O(St)?(y(it,"active"),$.push(it)):y(it,"inactive")}if(E.set(z,j($,z)),!Y)return;const tt=()=>{if(!N)return Array.from(E.values());const it=[];for(const[St,Ft]of E){const Xt=w[St],{name:Pt}=Xt.getOptions();Pt==="x"?it[0]=Ft:it[1]=Ft}return it};f.emit("brushAxis:highlight",{nativeEvent:!0,data:{selection:tt()}})},C=z=>{for(const Y of p)m(Y,"active","inactive");A(),z&&f.emit("brushAxis:remove",{nativeEvent:!0})},j=(z,Y)=>{const $=w[Y],{name:tt}=$.getOptions(),it=z.map(St=>{const Ft=St.__data__;return $.invert(Ft[tt])});return M(_o($,it))},N=v.some(a)&&v.some(z=>!a(z)),k=[];for(let z=0;z<v.length;z++){const Y=v[z],$=a(Y)?IK:NK,{hotZone:tt,brushRegion:it,extent:St}=$(Y,{offsetY:s,offsetX:c,cross:N,zIndex:999,fill:"transparent"});Y.parentNode.appendChild(tt);const Ft=My(tt,Object.assign(Object.assign({},_),{reverse:l,brushRegion:it,brushended(Xt){b.delete(Y),Array.from(b.entries()).length===0?C(Xt):P(z,Xt)},brushed(Xt,Pt,Ct,se,ce){b.set(Y,St(Xt,Pt,Ct,se)),P(z,ce)}}));k.push(Ft)}const R=(z={})=>{const{nativeEvent:Y}=z;Y||k.forEach($=>$.remove(!1))},D=(z,Y,$)=>{const[tt,it]=z,St=Pt=>Pt.getStep?Pt.getStep():0,Ft=F(tt,Y,$),Xt=F(it,Y,$)+St(Y);return a($)?[Ft,-1/0,Xt,1/0]:[-1/0,Ft,1/0,Xt]},F=(z,Y,$)=>{const{height:tt,width:it}=d.getOptions(),St=Y.clone();return a($)?St.update({range:[0,it]}):St.update({range:[tt,0]}),St.map(z)},B=z=>{const{nativeEvent:Y}=z;if(Y)return;const{selection:$}=z.data;for(let tt=0;tt<k.length;tt++){const it=$[tt],St=k[tt],Ft=v[tt];if(it){const Xt=w[tt];St.move(...D(it,Xt,Ft),!1)}else St.remove(!1)}};return f.on("brushAxis:remove",R),f.on("brushAxis:highlight",B),()=>{k.forEach(z=>z.destroy()),f.off("brushAxis:remove",R),f.off("brushAxis:highlight",B)}}function DK(t){return(e,n,r)=>{const{container:i,view:a,options:o}=e,s=Ba(i),{x:c,y:l}=s.getBBox(),{coordinate:u}=a;return jK(i,Object.assign({elements:Oo,axes:RK,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 FK=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())})},WP=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=300){let e=null;return n=>{const{timeStamp:r}=n;return e!==null&&r-e<t?(e=r,!0):(e=r,!1)}}function zK(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=WP(e,["filter","reset","brushRegion","extent","reverse","emitter","scale","coordinate","selection","series"]);const h=le(d,"mask"),{width:p,height:v}=t.getBBox(),g=a||[0,0,p,v],y=BK(),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=WP(t,["hideX","hideY"]);return(i,a,o)=>{const{container:s,view:c,options:l,update:u,setState:f}=i,d=Ba(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 zK(d,Object.assign(Object.assign({brushRegion:(b,_,O,w)=>[b,_,O,w],selection:(b,_,O,w)=>{const{scale:M,coordinate:E}=g;return oh(b,_,O,w,M,E)},filter:(b,_)=>FK(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=>Nt({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 GK(t){return ky(Object.assign(Object.assign({hideX:!0},t),{brushRegion:Ty}))}function WK(t){return ky(Object.assign(Object.assign({hideY:!0},t),{brushRegion:Py}))}var HK=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 YK="slider";function VK(t,e,n,r=!1,i="x",a="y"){const{marks:o}=t,s=o.map(c=>{var l,u;return Nt({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 XK(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 ph(t){return[t[0],t[t.length-1]]}function HP({initDomain:t={},className:e=YK,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=zn(m),C=R=>{const D=R==="vertical"?"y":"x",F=R==="vertical"?"x":"y";return P?[F,D]:[D,F]},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,[F,B]=C(D),z=`${n}${ao(F)}:filter`,Y=F==="x",{ratio:$}=E.getOptions(),{ratio:tt}=A.getOptions(),it=Xt=>{if(Xt.data){const{selection:Oe}=Xt.data,[He=ph(k.x),Fe=ph(k.y)]=Oe;return Y?[_o(E,He,$),_o(A,Fe,tt)]:[_o(A,Fe,tt),_o(E,He,$)]}const{value:Pt}=Xt.detail,Ct=y[F],se=XK(Pt,Ct,P&&D==="horizontal"),ce=k[B];return[se,ce]},St=ys(Xt=>HK(this,void 0,void 0,function*(){if(g)return;g=!0;const{nativeEvent:Pt=!0}=Xt,[Ct,se]=it(Xt);if(k[F]=Ct,k[B]=se,Pt){const ce=Y?Ct:se,Oe=Y?se:Ct;u.emit(z,Object.assign(Object.assign({},Xt),{nativeEvent:Pt,data:{selection:[ph(ce),ph(Oe)]}}))}p(R,ce=>Object.assign(Object.assign({},VK(ce,{[F]:{domain:Ct,nice:!1}},n,i,F,B)),{paddingLeft:_,paddingTop:O,paddingBottom:w,paddingRight:M})),yield h(),g=!1}),a,{leading:o,trailing:s}),Ft=Xt=>{const{nativeEvent:Pt}=Xt;if(Pt)return;const{data:Ct}=Xt,{selection:se}=Ct,[ce,Oe]=se;R.dispatchEvent(new kn("valuechange",{data:Ct,nativeEvent:!1}));const He=Y?sh(ce,E):sh(Oe,A);r(R,He)};u.on(z,Ft),R.addEventListener("valuechange",St),j.set(R,St),N.add([z,Ft])}return h(),()=>{for(const[R,D]of j)R.removeEventListener("valuechange",D);for(const[R,D]of N)u.off(R,D)}}}const YP="g2-scrollbar";function $K(t={}){return(e,n,r)=>{const{view:i,container:a}=e;if(!a.getElementsByClassName(YP).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}),HP(Object.assign(Object.assign({},t),{initDomain:u,className:YP,prefix:"scrollbar",hasState:!0,setValue:(d,h)=>d.setValue(h[0])}))(e,n,r)}}var UK=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function qK(t,e,n){return`<${t} style="${Object.entries(n).map(([r,i])=>`${pW(r)}:${i}`).join(";")}">${e}</${t}>`}const ZK={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 VP(t){return t.nodeName!=="text"?!1:!!t.isOverflowing()}function XP(t){var{offsetX:e=8,offsetY:n=8}=t,r=UK(t,["offsetX","offsetY"]);return i=>{const{container:a}=i,[o,s]=a.getBounds().min,c=le(r,"tip"),l=new Set,u=d=>{const{target:h}=d;if(!VP(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 _f({className:"poptip",style:{innerHTML:qK("div",m,Object.assign(Object.assign({},ZK),c)),x:g,y}});a.appendChild(b),h.tip=b,l.add(b)},f=d=>{const{target:h}=d;if(!VP(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())}}}XP.props={reapplyWhenUpdate:!0};var KK=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const $P=()=>t=>{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=KK(s,["data","x","y","width","height"]);return Object.assign(Object.assign({},h),{data:jv(c,o),x:l!=null?l:n,y:u!=null?u:r,width:f!=null?f:i,height:d!=null?d:a})})};$P.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 UP=()=>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=jv(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};UP.props={};class eu{constructor(e){this.$value=e}static of(e){return new eu(e)}call(e,...n){return this.$value=e(this.$value,...n),this}value(){return this.$value}}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};const tQ=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=Zn(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:Nt({},a,{domain:l,type:u})},legend:{color:Nt({title:c},o)}}}),Ly=tc(()=>({animate:{enterType:"fadeIn"}})),Ny=ec(()=>({frame:!1,encode:{shape:"hollow"},style:{lineWidth:0}})),Iy=ec(()=>({type:"cell"})),qP=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}))})()}}]}}}),ZP=ec((t,e=eQ,n=nQ,r=rQ,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:tt,y:it})=>[w.invert(tt),M.invert(it)]),B=D.map(([tt,it])=>St=>{const{[p]:Ft,[v]:Xt}=St;return(p!==void 0?Ft===tt:!0)&&(v!==void 0?Xt===it:!0)}).map(tt=>h.filter(tt)),z=f?Sn(B,tt=>tt.length):void 0,Y=D.map(([tt,it])=>({columnField:p,columnIndex:j.indexOf(tt),columnValue:tt,columnValuesLength:j.length,rowField:v,rowIndex:N.indexOf(it),rowValue:it,rowValuesLength:N.length})),$=Y.map(tt=>Array.isArray(s)?s:[s(tt)].flat(1));return k.flatMap(tt=>{const[it,St,Ft,Xt]=R[tt],Pt=Y[tt],Ct=B[tt];return $[tt].map(ce=>{var Oe,He,{scale:Fe,key:Ke,facet:dn=!0,axis:xn={},legend:Yn={}}=ce,yr=JK(ce,["scale","key","facet","axis","legend"]);const xi=((Oe=Fe==null?void 0:Fe.y)===null||Oe===void 0?void 0:Oe.guide)||xn.y,Xa=((He=Fe==null?void 0:Fe.x)===null||He===void 0?void 0:He.guide)||xn.x,ws={x:{tickCount:p?5:void 0},y:{tickCount:v?5:void 0}},si=dn?Ct:Ct.length===0?[]:h,Ui={color:{domain:y}},pn={x:KP(Xa,n)(Pt,si),y:KP(xi,r)(Pt,si)};return Object.assign(Object.assign({key:`${Ke}-${tt}`,data:si,margin:0,x:it+E+l+P,y:St+A+u+C,parentKey:d,width:Ft,height:Xt,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,frame:!!si.length,dataDomain:z,scale:Nt(ws,Fe,Ui),axis:Nt({},xn,pn),legend:!1},yr),i)})})}}});function eQ(t){const{points:e}=t;return Fv(e)}function vh(t,e){return e.length?Nt({title:!1,tick:null,label:null},t):Nt({title:!1,tick:null,label:null,grid:null},t)}function nQ(t){return(e,n)=>{const{rowIndex:r,rowValuesLength:i,columnIndex:a,columnValuesLength:o}=e;if(r!==i-1)return vh(t,n);const s=a!==o-1?!1:void 0,c=n.length?void 0:null;return Nt({title:s,grid:c},t)}}function rQ(t){return(e,n)=>{const{rowIndex:r,columnIndex:i}=e;if(i!==0)return vh(t,n);const a=r!==0?!1:void 0,o=n.length?void 0:null;return Nt({title:a,grid:o},t)}}function KP(t,e){return typeof t=="function"?t:t===null||t===!1?()=>null:e(t)}const QP=()=>t=>[eu.of(t).call(Iy).call(Ry).call(Ly).call(tQ).call(Ny).call(qP).call(ZP).value()];QP.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 iQ=tc(t=>({scale:{x:{guide:null,paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}})),aQ=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})=>Fv(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 F,B;const{scale:z,key:Y,encode:$,axis:tt,interaction:it}=D,St=jy(D,["scale","key","encode","axis","interaction"]),Ft=(F=z==null?void 0:z.y)===null||F===void 0?void 0:F.guide,Xt=(B=z==null?void 0:z.x)===null||B===void 0?void 0:B.guide,Pt={x:{facet:!1},y:{facet:!1}},Ct={x:sQ(Xt)(k,e),y:cQ(Ft)(k,e)},se={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:Nt(Pt,z),axis:Nt(se,tt,Ct),legend:!1,encode:Nt({},$,{x:j,y:N}),interaction:Nt({},it,{legendFilter:!1})},St)})})}}}),oQ=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 sQ(t){return typeof t=="function"?t:t===null?()=>null:(e,n)=>{const{rowIndex:r,rowValuesLength:i}=e;if(r!==i-1)return vh(t,n)}}function cQ(t){return typeof t=="function"?t:t===null?()=>null:(e,n)=>{const{columnIndex:r}=e;if(r!==0)return vh(t,n)}}const lQ=()=>t=>[eu.of(t).call(Iy).call(Ry).call(aQ).call(oQ).call(Ly).call(Ny).call(iQ).value()];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 fQ=tc(t=>({scale:{x:{guide:{type:"axisArc"},paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}})),dQ=tc(t=>({coordinate:{type:"polar"}})),hQ=t=>{const{encode:e}=t,n=uQ(t,["encode"]),{position:r}=e;return Object.assign(Object.assign({},n),{encode:{x:r}})};function JP(t){return e=>null}function pQ(t){const{points:e}=t,[n,r,i,a]=e,o=Kn(n,a),s=ur(n,a),c=ur(r,i),l=wO(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 vQ=()=>t=>[eu.of(t).call(Iy).call(hQ).call(Ry).call(dQ).call(qP).call(ZP,pQ,JP,JP,{frame:!1}).call(Ly).call(Ny).call(fQ).value()];function gQ(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 yQ(t,e,n){const r=[t];for(;r.length;){const i=r.pop();i.animate=Nt({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 tC=()=>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=>yQ(l,n,a));return function*(){let l=0,u;for(;r==="infinite"||l<r;){const[f,d]=gQ(i,l,o);for(let h=f;h<d;h+=1){const p=Math.abs(h);u!==p&&(yield c[p]),u=p}l++}}};tC.props={};function Mo(t,e,n){const{encode:r}=n;if(t===null)return[e];const i=mQ(t).map(o=>{var s;return[o,(s=sn(r,o))===null||s===void 0?void 0:s[0]]}).filter(([,o])=>Rn(o)),a=o=>i.map(([,s])=>s[o]).join("-");return Array.from(Zn(e,a).values())}function eC(t){return Array.isArray(t)?_Q(t):typeof t=="function"?xQ(t):t==="series"?bQ:t==="value"?OQ:t==="sum"?wQ:t==="maxIndex"?SQ:()=>null}function nC(t,e){for(const n of t)n.sort(e)}function rC(t,e){return(e==null?void 0:e.domain)||Array.from(new Set(t))}function mQ(t){return Array.isArray(t)?t:[t]}function bQ(t,e,n){return nu(r=>n[r])}function xQ(t){return(e,n,r)=>nu(i=>t(e[i]))}function _Q(t){return(e,n,r)=>(i,a)=>t.reduce((o,s)=>o!==0?o:fr(e[i][s],e[a][s]),0)}function OQ(t,e,n){return nu(r=>e[r])}function wQ(t,e,n){const r=Zo(t),i=Array.from(Zn(r,o=>n[+o]).entries()),a=new Map(i.map(([o,s])=>[o,s.reduce((c,l)=>c+ +e[l])]));return nu(o=>a.get(n[o]))}function SQ(t,e,n){const r=Zo(t),i=Array.from(Zn(r,o=>n[+o]).entries()),a=new Map(i.map(([o,s])=>[o,ic(s,c=>e[c])]));return nu(o=>a.get(n[o]))}function nu(t){return(e,n)=>fr(t(e),t(n))}const iC=(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]=sn(u,"y"),[p,v]=sn(u,"y1"),[g]=o?Il(u,"series","color"):sn(u,"color"),y=Mo(e,s,c),b=eC(n)(l,d,g);b&&nC(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 it of N){const St=w[it]=+d[it]-k;St<0?D.push(it):St>=0&&R.push(it)}const F=R.length>0?R:D,B=D.length>0?D:R;let z=R.length-1,Y=0;for(;z>0&&d[F[z]]===0;)z--;for(;Y<B.length-1&&d[B[Y]]===0;)Y++;M.push(F[z]),E.push(B[Y]);let $=k;for(const it of D.reverse()){const St=w[it];$=_[it]=(O[it]=$)+St}let tt=k;for(const it of R){const St=w[it];St>0?tt=_[it]=(O[it]=tt)+St:_[it]=O[it]=tt}}const A=new Set(M),P=new Set(E),C=i==="y"?_:O,j=a==="y"?_:O;return[s,Nt({},c,{encode:{y0:Id(d,h),y:jn(C,h),y1:jn(j,v)},style:Object.assign({first:(N,k)=>A.has(k),last:(N,k)=>P.has(k)},f)})]}};iC.props={};function aC(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 MQ(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 oC(t,e){const n=MQ(t,e);return n&&Math.sqrt(n)}function EQ(t,e,n){const r=aC(t),i=oC(t);return r&&i?Math.ceil((n-e)*Math.cbrt(r)/(3.49*i)):1}var sC=Array.prototype,AQ=sC.slice,bpt=sC.map;function Dy(t){return()=>t}const TQ=Math.sqrt(50),PQ=Math.sqrt(10),CQ=Math.sqrt(2);function gh(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>=TQ?10:a>=PQ?5:a>=CQ?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?gh(t,e,n*2):[s,c,l]}function kQ(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?gh(e,t,n):gh(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 ru(t,e,n){return e=+e,t=+t,n=+n,gh(t,e,n)[2]}function xpt(t,e,n){e=+e,t=+t,n=+n;const r=e<t,i=r?ru(e,t,n):ru(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}function RQ(t,e,n){let r;for(;;){const i=ru(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 LQ(t){return Math.max(1,Math.ceil(Math.log(aC(t))/Math.LN2)+1)}function NQ(){var t=sl,e=Ia,n=LQ;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]=RQ(f,d,_)),h=kQ(f,d,_),h[0]<=f&&(c=ru(f,d,_)),h[h.length-1]>=d)if(b>=d&&e===Ia){const O=ru(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[mZ(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)?AQ.call(i):i),r):n},r}function Fy(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?$l:VT(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));Fy(t,e,h,p,i)}const a=t[e];let o=n,s=r;for(iu(t,n,e),i(t[r],a)>0&&iu(t,n,r);o<s;){for(iu(t,o,s),++o,--s;i(t[o],a)<0;)++o;for(;i(t[s],a)>0;)--s}i(t[n],a)===0?iu(t,n,s):(++s,iu(t,s,r)),s<=e&&(n=s+1),e<=s&&(r=s-1)}return t}function iu(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function IQ(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 yh(t,e,n){if(t=Float64Array.from(pZ(t,n)),!(!(r=t.length)||isNaN(e=+e))){if(e<=0||r<2)return Ai(t);if(e>=1)return Sn(t);var r,i=(r-1)*e,a=Math.floor(i),o=Sn(Fy(t,a).subarray(0,a+1)),s=Ai(t.subarray(a+1));return o+(s-o)*(i-a)}}function _pt(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 jQ(t,e,n=dy){if(!isNaN(e=+e)){if(r=Float64Array.from(t,(s,c)=>dy(n(t[c],c,t))),e<=0)return fh(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 Fy(i,o,0,a,(s,c)=>$l(r[s],r[c])),o=IQ(i.subarray(0,o+1),s=>r[s]),o>=0?o:-1}}function By(t,e){return yh(t,.5,e)}function DQ(t,e){return jQ(t,.5,e)}var FQ=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 BQ(t){if(typeof t=="function")return[t,null];const n={mean:zQ,max:WQ,count:YQ,first:XQ,last:$Q,sum:VQ,min:HQ,median:GQ}[t];if(!n)throw new Error(`Unknown reducer: ${t}.`);return n()}function zQ(){const t=(n,r)=>Jl(n,i=>+r[i]),e=Eo("mean");return[t,e]}function GQ(){const t=(n,r)=>By(n,i=>+r[i]),e=Eo("median");return[t,e]}function WQ(){const t=(n,r)=>Sn(n,i=>+r[i]),e=Eo("max");return[t,e]}function HQ(){const t=(n,r)=>Ai(n,i=>+r[i]),e=Eo("min");return[t,e]}function YQ(){const t=(n,r)=>n.length,e=Eo("count");return[t,e]}function VQ(){const t=(n,r)=>Di(n,i=>+r[i]),e=Eo("sum");return[t,e]}function XQ(){const t=(n,r)=>r[n[0]],e=Eo("first");return[t,e]}function $Q(){const t=(n,r)=>r[n[n.length-1]],e=Eo("last");return[t,e]}const zy=(t={})=>{const{groupBy:e}=t,n=FQ(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]=sn(o,v);return g},l=Object.entries(n).map(([h,p])=>{const[v,g]=BQ(p),[y,m]=sn(o,h),b=c(m,p),_=s.map(O=>v(O,y!=null?y:a));return[h,Object.assign(Object.assign({},C$(_,(g==null?void 0:g(b))||b)),{aggregate:!0})]}),u=Object.keys(o).map(h=>{const[p,v]=sn(o,h),g=s.map(y=>p[y[0]]);return[h,jn(g,v)]}),f=s.map(h=>a[h[0]]);return[Zo(s),Nt({},i,{data:f,encode:Object.fromEntries([...u,...l])})]}};zy.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 cC="thresholds";function qQ(t){const[e,n]=Ia(t);return Math.min(200,EQ(t,e,n))}const Gy=(t={})=>{const{groupChannels:e=["color"],binChannels:n=["x","y"]}=t,r=UQ(t,["groupChannels","binChannels"]),i={},a=(o,s)=>{const{encode:c}=s,l=n.map(p=>{const[v]=sn(c,p);return v}),u=le(r,cC),f=o.filter(p=>l.every(v=>Rn(v[p]))),d=[...e.map(p=>{const[v]=sn(c,p);return v}).filter(Rn).map(p=>v=>p[v]),...n.map((p,v)=>{const g=l[v],y=u[p]||qQ(g),m=NQ().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(Zn(f,h).values())};return zy(Object.assign(Object.assign(Object.assign({},Object.fromEntries(Object.entries(r).filter(([o])=>!o.startsWith(cC)))),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 lC=(t={})=>{const{thresholds:e}=t;return Gy(Object.assign(Object.assign({},t),{thresholdsX:e,groupChannels:["color"],binChannels:["x"]}))};lC.props={};var ZQ=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",reverse:n=!1,orderBy:r,padding:i}=t,a=ZQ(t,["groupBy","reverse","orderBy","padding"]);return(o,s)=>{const{data:c,encode:l,scale:u}=s,{series:f}=u,[d]=sn(l,"y"),[h]=Il(l,"series","color"),p=rC(h,f),v=Mo(e,o,s),y=eC(r)(c,d,h);y&&nC(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,Nt({},s,{scale:{series:{domain:p,paddingInner:i}},encode:{series:jn(m)}})]}};uC.props={};function mh(t,e,n){if(t===null)return[-.5,.5];const r=rC(t,e),a=new mo({domain:r,range:[0,1],padding:n}).getBandWidth();return[-a/2,a/2]}function bh(t,e,n){return e*(1-t)+n*t}const fC=(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]=sn(s,"x"),[d]=sn(s,"y"),h=mh(f,l,n),p=mh(d,u,r),v=a.map(()=>bh(i(),...p)),g=a.map(()=>bh(i(),...h));return[a,Nt({scale:{x:{padding:.5},y:{padding:.5}}},o,{encode:{dy:jn(v),dx:jn(g)}})]}};fC.props={};const dC=(t={})=>{const{padding:e=0,random:n=Math.random}=t;return(r,i)=>{const{encode:a,scale:o}=i,{x:s}=o,[c]=sn(a,"x"),l=mh(c,s,e),u=r.map(()=>bh(n(),...l));return[r,Nt({scale:{x:{padding:.5}}},i,{encode:{dx:jn(u)}})]}};dC.props={};const hC=(t={})=>{const{padding:e=0,random:n=Math.random}=t;return(r,i)=>{const{encode:a,scale:o}=i,{y:s}=o,[c]=sn(a,"y"),l=mh(c,s,e),u=r.map(()=>bh(n(),...l));return[r,Nt({scale:{y:{padding:.5}}},i,{encode:{dy:jn(u)}})]}};hC.props={};var KQ=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=(t={})=>{const{groupBy:e="x"}=t;return(n,r)=>{const{encode:i}=r,{x:a}=i,o=KQ(i,["x"]),s=Object.entries(o).filter(([d])=>d.startsWith("y")).map(([d])=>[d,sn(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,Nt({},r,{encode:Object.fromEntries(c.map(([d,h])=>[d,jn(h,sn(i,d)[1])]))})]}};pC.props={};const vC=(t={})=>{const{groupBy:e="x",series:n=!0}=t;return(r,i)=>{const{encode:a}=i,[o]=sn(a,"y"),[s,c]=sn(a,"y1"),[l]=n?Il(a,"series","color"):sn(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,Nt({},i,{encode:{y1:jn(f,c)}})]}};vC.props={};const gC=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,sn(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(Zn(m,_=>g[_]).values());y.push(...b)}f=y}if(r){const[g]=sn(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=Sn(m,_=>+h[_]);for(const _ of m)v[_]=+p[_]+y;y+=b}return[o,Nt({},s,{encode:{enterDuration:jd(h),enterDelay:jd(v)}})]}};gC.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 JQ(t){return typeof t=="function"?t:{min:(n,r)=>Ai(n,i=>r[+i]),max:(n,r)=>Sn(n,i=>r[+i]),first:(n,r)=>r[n[0]],last:(n,r)=>r[n[n.length-1]],mean:(n,r)=>Jl(n,i=>r[+i]),median:(n,r)=>By(n,i=>r[+i]),sum:(n,r)=>Di(n,i=>r[+i]),deviation:(n,r)=>oC(n,i=>r[+i])}[t]||Sn}const yC=(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,sn(a,v)[0]]),[,u]=l.find(([v])=>v==="y"),f=l.map(([v])=>[v,new Array(r.length)]),d=Mo(e,r,i),h=JQ(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,Nt({},i,Object.assign({encode:Object.fromEntries(f.map(([v,g])=>[v,jn(g,sn(a,v)[1])]))},!p&&a.y0&&{tooltip:{items:[{channel:"y0"}]}}))]}};yC.props={};function mC(t,e){return[t[0]]}function tJ(t,e){const n=t.length-1;return[t[n]]}function eJ(t,e){const n=ic(t,r=>e[r]);return[t[n]]}function nJ(t,e){const n=fh(t,r=>e[r]);return[t[n]]}function rJ(t){return typeof t=="function"?t:{first:mC,last:tJ,max:eJ,min:nJ}[t]||mC}const xh=(t={})=>{const{groupBy:e="series",channel:n,selector:r}=t;return(i,a)=>{const{encode:o}=a,s=Mo(e,i,a),[c]=sn(o,n),l=rJ(r);return[s.flatMap(u=>l(u,c)),a]}};xh.props={};var iJ=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 bC=(t={})=>{const{selector:e}=t,n=iJ(t,["selector"]);return xh(Object.assign({channel:"x",selector:e},n))};bC.props={};var aJ=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 xC=(t={})=>{const{selector:e}=t,n=aJ(t,["selector"]);return xh(Object.assign({channel:"y",selector:e},n))};xC.props={};var oJ=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 au=(t={})=>{const{channels:e=["x","y"]}=t,n=oJ(t,["channels"]),r=(i,a)=>Mo(e,i,a);return zy(Object.assign(Object.assign({},n),{groupBy:r}))};au.props={};const _C=(t={})=>au(Object.assign(Object.assign({},t),{channels:["x","color","series"]}));_C.props={};const OC=(t={})=>au(Object.assign(Object.assign({},t),{channels:["y","color","series"]}));OC.props={};const wC=(t={})=>au(Object.assign(Object.assign({},t),{channels:["color"]}));wC.props={};function sJ(t,e,n){return(e.length!==2?Fa(K0(t,e,n),([r,i],[a,o])=>fr(i,o)||fr(r,a)):Fa(Zn(t,n),([r,i],[a,o])=>e(i,o)||fr(r,a))).map(([r])=>r)}var SC=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 cJ(t,e,n){const{by:r=t,reducer:i="max"}=e,[a]=sn(n,r);if(typeof i=="function")return o=>i(o,a);if(i==="max")return o=>Sn(o,s=>+a[s]);if(i==="min")return o=>Ai(o,s=>+a[s]);if(i==="sum")return o=>Di(o,s=>+a[s]);if(i==="median")return o=>By(o,s=>+a[s]);if(i==="mean")return o=>Jl(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 lJ(t,e,n){const{reverse:r,channel:i}=n,{encode:a}=e,[o]=sn(a,i),s=Fa(t,c=>o[c]);return r&&s.reverse(),[s,e]}function uJ(t,e,n){if(!Array.isArray(n))return t;const r=new Set(n);return t.filter(i=>r.has(e[i]))}function fJ(t,e,n){var r;const{reverse:i,slice:a,channel:o}=n,s=SC(n,["reverse","slice","channel"]),{encode:c,scale:l={}}=e,u=(r=l[o])===null||r===void 0?void 0:r.domain,[f]=sn(c,o),d=cJ(o,s,c),h=uJ(t,f,u),p=sJ(h,d,y=>f[y]);i&&p.reverse();const v=typeof a=="number"?[0,a]:a,g=a?p.slice(...v):p;return[t,Nt(e,{scale:{[o]:{domain:g}}})]}const _h=(t={})=>{const{reverse:e=!1,slice:n,channel:r,ordinal:i=!0}=t,a=SC(t,["reverse","slice","channel","ordinal"]);return(o,s)=>i?fJ(o,s,Object.assign({reverse:e,slice:n,channel:r},a)):lJ(o,s,Object.assign({reverse:e,slice:n,channel:r},a))};_h.props={};const MC=(t={})=>_h(Object.assign(Object.assign({},t),{channel:"x"}));MC.props={};const EC=(t={})=>_h(Object.assign(Object.assign({},t),{channel:"y"}));EC.props={};const AC=(t={})=>_h(Object.assign(Object.assign({},t),{channel:"color"}));AC.props={};function dJ(t,e){return typeof e=="string"?t.map(n=>n[e]):t.map(e)}function hJ(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 TC=(t={})=>{const{field:e,channel:n="y",reducer:r="sum"}=t;return(i,a)=>{const{data:o,encode:s}=a,[c]=sn(s,"x"),l=e?dJ(o,e):sn(s,n)[0],u=hJ(r,l),f=Q0(i,u,d=>c[d]).map(d=>d[1]);return[i,Nt({},a,{scale:{x:{flex:f}}})]}};TC.props={};function pJ(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,_]=Fv(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 PC=()=>(t,e)=>[t,Nt({},e,{modifier:pJ,axis:!1})];PC.props={};function vJ(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 gJ(t){if(typeof t=="function")return t;if(t==="lttb")return vJ;const e={first:r=>[r[0]],last:r=>[r[r.length-1]],min:(r,i,a)=>[r[fh(r,o=>a[o])]],max:(r,i,a)=>[r[ic(r,o=>a[o])]],median:(r,i,a)=>[r[DQ(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 yJ(r,s).flatMap(l=>n(l,i,a))}}function yJ(t,e){const n=t.length,r=[];let i=0;for(;i<n;)r.push(t.slice(i,i+=e));return r}const CC=(t={})=>{const{strategy:e="median",thresholds:n=2e3,groupBy:r=["series","color"]}=t,i=gJ(e);return(a,o)=>{const{encode:s}=o,c=Mo(r,a,o),[l]=sn(s,"x"),[u]=sn(s,"y");return[c.flatMap(f=>i(f,l,u,n)),o]}};CC.props={};function mJ(t){return typeof t=="object"?[t.value,t.ordinal]:[t,!0]}const kC=(t={})=>(e,n)=>{const{encode:r,data:i}=n,a=Object.entries(t).map(([u,f])=>{const[d]=sn(r,u);if(!d)return null;const[h,p=!0]=mJ(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(Rn);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,Nt({},n,{encode:Object.fromEntries(l),data:s.map(u=>i[u])})]};kC.props={};var RC={},Wy={},Hy=34,ou=10,Yy=13;function LC(t){return new Function("d","return {"+t.map(function(e,n){return JSON.stringify(e)+": d["+n+'] || ""'}).join(",")+"}")}function bJ(t,e){var n=LC(t);return function(r,i){return e(n(r),i,t)}}function NC(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 xJ(t){return t<0?"-"+mi(-t,6):t>9999?"+"+mi(t,6):mi(t,4)}function _J(t){var e=t.getUTCHours(),n=t.getUTCMinutes(),r=t.getUTCSeconds(),i=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":xJ(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 OJ(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?bJ(g,d):LC(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)===ou&&--p,f.charCodeAt(p-1)===Yy&&--p;function _(){if(m)return Wy;if(b)return b=!1,RC;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++))===ou?b=!0:E===Yy&&(b=!0,f.charCodeAt(v)===ou&&++v),f.slice(M+1,w-1).replace(/""/g,'"')}for(;v<p;){if((E=f.charCodeAt(w=v++))===ou)b=!0;else if(E===Yy)b=!0,f.charCodeAt(v)===ou&&++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!==RC&&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=NC(f)),[d.map(u).join(t)].concat(a(f,d)).join(`
`)}function s(f,d){return d==null&&(d=NC(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?_J(f):e.test(f+="")?'"'+f.replace(/"/g,'""')+'"':f}return{parse:r,parseRows:i,format:o,formatBody:s,formatRows:c,formatRow:l,formatValue:u}}function wJ(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})?)?$/))SJ&&i[4]&&!i[7]&&(n=n.replace(/-/g,"/").replace(/T/," ")),n=new Date(n);else continue;t[e]=n}return t}const SJ=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours();var MJ=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 IC=t=>{const{value:e,format:n=e.split(".").pop(),delimiter:r=",",autoType:i=!0}=t;return()=>MJ(void 0,void 0,void 0,function*(){const a=yield fetch(e);if(n==="csv"){const o=yield a.text();return OJ(r).parse(o,i?wJ:qo)}else if(n==="json")return yield a.json();throw new Error(`Unknown format: ${n}.`)})};IC.props={};const jC=t=>{const{value:e}=t;return()=>e};jC.props={};function EJ(t,e){return t.map(n=>{if(Array.isArray(n)){const[r,i=e]=n;return[r,i]}return[n,e]})}const DC=t=>{const{fields:e=[]}=t,n=EJ(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)}};DC.props={};function Opt(t){return t!=null&&!Number.isNaN(t)}const FC=t=>{const{callback:e}=t;return n=>Array.isArray(n)?[...n].sort(e):n};FC.props={};function AJ(t){return t!=null&&!Number.isNaN(t)}const BC=t=>{const{callback:e=AJ}=t;return n=>n.filter(e)};BC.props={};function TJ(t,e=[]){return e.reduce((n,r)=>(r in t&&(n[r]=t[r]),n),{})}const zC=t=>{const{fields:e}=t;return n=>n.map(r=>TJ(r,e))};zC.props={};function PJ(t){return Object.keys(t).length===0}const GC=t=>e=>{if(!t||PJ(t))return e;const n=r=>Object.entries(r).reduce((i,[a,o])=>(i[t[a]||a]=o,i),{});return e.map(n)};GC.props={};function CJ(t){return!t||Object.keys(t).length===0}const WC=t=>{const{fields:e,key:n="key",value:r="value"}=t;return i=>CJ(e)?i:i.flatMap(a=>e.map(o=>Object.assign(Object.assign({},a),{[n]:o,[r]:a[o]})))};WC.props={};const HC=t=>{const{start:e,end:n}=t;return r=>r.slice(e,n)};HC.props={};const YC=t=>{const{callback:e=qo}=t;return n=>e(n)};YC.props={};const VC=t=>{const{callback:e=qo}=t;return n=>Array.isArray(n)?n.map(e):n};VC.props={};function XC(t){return typeof t=="string"?e=>e[t]:t}const $C=t=>{const{join:e,on:n,select:r=[],as:i=r,unknown:a=NaN}=t,[o,s]=n,c=XC(s),l=XC(o),u=K0(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),{}))})};$C.props={};var kJ=yt(50517),RJ=yt.n(kJ);function wpt(t){return t!=null&&!Number.isNaN(t)}const UC=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(Zn(u,d=>n.map(h=>d[h]).join("-")).values()).map(d=>{const h=RJ().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})})};UC.props={};const qC=()=>t=>(console.log("G2 data section:",t),t);qC.props={};function Vy(t){const{min:e,max:n}=t;return[[e[0],e[1]],[n[0],n[1]]]}function ZC(t,e){const[n,r]=t,[i,a]=e;return n>=i[0]&&n<=a[0]&&r>=i[1]&&r<=a[1]}function LJ(t,e){const[n,r]=t;return!(ZC(n,e)&&ZC(r,e))}function NJ(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 IJ=t=>{const{priority:e}=t;return n=>{const r=[];return e&&n.sort(e),n.forEach(i=>{dg(i);const a=i.getLocalBounds();r.some(s=>NJ(Vy(a),Vy(s.getLocalBounds())))?fg(i):r.push(i)}),n}};function jJ([t,e],[n,r]){return r>t&&e>n}function Oh(){const t=new Map;return[r=>t.get(r),(r,i)=>t.set(r,i)]}function DJ(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 FJ=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]=Oh(),[c,l]=Oh(),[u,f]=Oh(),[d,h]=Oh();for(const p of i){const{min:v,max:g}=DJ(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])&&!jJ(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}},BJ=()=>t=>(t.forEach(e=>{dg(e);const n=e.attr("bounds"),r=e.getLocalBounds();LJ(Vy(r),n)&&fg(e)}),t);function zJ(t){return typeof t=="object"?t:Aa(t)}function Xy(t){let e=t/255;return e=e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4),e}function KC(t,e,n){return .2126*Xy(t)+.7152*Xy(e)+.0722*Xy(n)}function QC(t,e){const{r:n,g:r,b:i}=t,{r:a,g:o,b:s}=e,c=KC(n,r,i),l=KC(a,o,s);return(Math.max(c,l)+.05)/(Math.min(c,l)+.05)}function GJ(t,e){const n=ic(e,r=>QC(t,zJ(r)));return e[n]}const WJ=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;QC(o,a)<e&&i.attr("fill",GJ(a,n))}),r)};function HJ(){return{"data.fetch":IC,"data.inline":jC,"data.sortBy":DC,"data.sort":FC,"data.filter":BC,"data.pick":zC,"data.rename":GC,"data.fold":WC,"data.slice":HC,"data.custom":YC,"data.map":VC,"data.join":$C,"data.kde":UC,"data.log":qC,"transform.stackY":iC,"transform.binX":lC,"transform.bin":Gy,"transform.dodgeX":uC,"transform.jitter":fC,"transform.jitterX":dC,"transform.jitterY":hC,"transform.symmetryY":pC,"transform.diffY":vC,"transform.stackEnter":gC,"transform.normalizeY":yC,"transform.select":xh,"transform.selectX":bC,"transform.selectY":xC,"transform.groupX":_C,"transform.groupY":OC,"transform.groupColor":wC,"transform.group":au,"transform.sortX":MC,"transform.sortY":EC,"transform.sortColor":AC,"transform.flexX":TC,"transform.pack":PC,"transform.sample":CC,"transform.filter":kC,"coordinate.cartesian":BS,"coordinate.polar":ul,"coordinate.transpose":mg,"coordinate.theta":zS,"coordinate.parallel":bg,"coordinate.fisheye":GS,"coordinate.radial":ov,"coordinate.radar":WS,"encode.constant":HS,"encode.field":YS,"encode.transform":VS,"encode.column":XS,"mark.interval":oM,"mark.rect":cM,"mark.line":NM,"mark.point":_E,"mark.text":EE,"mark.cell":TE,"mark.area":jE,"mark.link":$g,"mark.image":ZE,"mark.polygon":eA,"mark.box":aA,"mark.vector":sA,"mark.lineX":fA,"mark.lineY":pA,"mark.connector":mA,"mark.range":_A,"mark.rangeX":SA,"mark.rangeY":AA,"mark.path":RA,"mark.shape":IA,"mark.density":FA,"mark.heatmap":GA,"palette.category10":WA,"palette.category20":HA,"scale.linear":YA,"scale.ordinal":UA,"scale.band":KA,"scale.identity":QA,"scale.point":JA,"scale.time":_T,"scale.log":wT,"scale.pow":ST,"scale.sqrt":MT,"scale.threshold":ET,"scale.quantile":AT,"scale.quantize":TT,"scale.sequential":PT,"scale.constant":CT,"theme.classic":kT,"theme.classicDark":LT,"theme.academy":NT,"theme.light":oy,"theme.dark":RT,"component.axisX":IT,"component.axisY":jT,"component.legendCategory":cy,"component.legendContinuous":fo,"component.legends":FT,"component.title":zT,"component.sliderX":XT,"component.sliderY":$T,"component.scrollbarX":UT,"component.scrollbarY":qT,"animation.scaleInX":hy,"animation.scaleOutX":TZ,"animation.scaleInY":ZT,"animation.scaleOutY":PZ,"animation.waveIn":KT,"animation.fadeIn":QT,"animation.fadeOut":JT,"animation.zoomIn":CZ,"animation.zoomOut":kZ,"animation.pathIn":tP,"animation.morphing":iP,"animation.growInX":aP,"animation.growInY":oP,"interaction.elementHighlight":lh,"interaction.elementHighlightByX":hP,"interaction.elementHighlightByColor":pP,"interaction.elementSelect":uh,"interaction.elementSelectByX":vP,"interaction.elementSelectByColor":gP,"interaction.fisheye":UZ,"interaction.chartIndex":yP,"interaction.tooltip":CP,"interaction.legendFilter":xK,"interaction.legendHighlight":_K,"interaction.brushHighlight":Ay,"interaction.brushXHighlight":AK,"interaction.brushYHighlight":TK,"interaction.brushAxisHighlight":DK,"interaction.brushFilter":ky,"interaction.brushXFilter":GK,"interaction.brushYFilter":WK,"interaction.sliderFilter":HP,"interaction.scrollbarFilter":$K,"interaction.poptip":XP,"composition.spaceLayer":$P,"composition.spaceFlex":UP,"composition.facetRect":QP,"composition.repeatMatrix":lQ,"composition.facetCircle":vQ,"composition.timingKeyframe":tC,"labelTransform.overlapHide":IJ,"labelTransform.overlapDodgeY":FJ,"labelTransform.overflowHide":BJ,"labelTransform.contrastReverse":WJ}}var su=t=>t;function wh(t,e){t&&tk.hasOwnProperty(t.type)&&tk[t.type](t,e)}var JC={Feature:function(t,e){wh(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)wh(n[r].geometry,e)}},tk={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){$y(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)$y(n[r],e,0)},Polygon:function(t,e){ek(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)ek(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)wh(n[r],e)}};function $y(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 ek(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)$y(t[n],e,1);e.polygonEnd()}function Ec(t,e){t&&JC.hasOwnProperty(t.type)?JC[t.type](t,e):wh(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 Spt(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 Mpt(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 De=1e-6,nk=1e-12,on=Math.PI,gr=on/2,rk=on/4,Ci=on*2,Kr=180/on,dr=on/180,mn=Math.abs,Ac=Math.atan,Ha=Math.atan2,rn=Math.cos,Sh=Math.ceil,ik=Math.exp,Ept=Math.floor,Apt=Math.hypot,Mh=Math.log,Uy=Math.pow,Ze=Math.sin,Vi=Math.sign||function(t){return t>0?1:t<0?-1:0},bi=Math.sqrt,qy=Math.tan;function ak(t){return t>1?0:t<-1?on:Math.acos(t)}function Xi(t){return t>1?gr:t<-1?-gr:Math.asin(t)}function Tpt(t){return(t=Ze(t/2))*t}function $i(){}var Zy=new Wa,Ky=new Wa,ok,sk,Qy,Jy,Ao={point:$i,lineStart:$i,lineEnd:$i,polygonStart:function(){Ao.lineStart=YJ,Ao.lineEnd=XJ},polygonEnd:function(){Ao.lineStart=Ao.lineEnd=Ao.point=$i,Zy.add(mn(Ky)),Ky=new Wa},result:function(){var t=Zy/2;return Zy=new Wa,t}};function YJ(){Ao.point=VJ}function VJ(t,e){Ao.point=ck,ok=Qy=t,sk=Jy=e}function ck(t,e){Ky.add(Jy*t-Qy*e),Qy=t,Jy=e}function XJ(){ck(ok,sk)}var lk=Ao,Tc=1/0,Eh=Tc,cu=-Tc,Ah=cu,$J={point:UJ,lineStart:$i,lineEnd:$i,polygonStart:$i,polygonEnd:$i,result:function(){var t=[[Tc,Eh],[cu,Ah]];return cu=Ah=-(Eh=Tc=1/0),t}};function UJ(t,e){t<Tc&&(Tc=t),t>cu&&(cu=t),e<Eh&&(Eh=e),e>Ah&&(Ah=e)}var Th=$J,tm=0,em=0,lu=0,Ph=0,Ch=0,Pc=0,nm=0,rm=0,uu=0,uk,fk,xa,_a,ea={point:ms,lineStart:dk,lineEnd:hk,polygonStart:function(){ea.lineStart=KJ,ea.lineEnd=QJ},polygonEnd:function(){ea.point=ms,ea.lineStart=dk,ea.lineEnd=hk},result:function(){var t=uu?[nm/uu,rm/uu]:Pc?[Ph/Pc,Ch/Pc]:lu?[tm/lu,em/lu]:[NaN,NaN];return tm=em=lu=Ph=Ch=Pc=nm=rm=uu=0,t}};function ms(t,e){tm+=t,em+=e,++lu}function dk(){ea.point=qJ}function qJ(t,e){ea.point=ZJ,ms(xa=t,_a=e)}function ZJ(t,e){var n=t-xa,r=e-_a,i=bi(n*n+r*r);Ph+=i*(xa+t)/2,Ch+=i*(_a+e)/2,Pc+=i,ms(xa=t,_a=e)}function hk(){ea.point=ms}function KJ(){ea.point=JJ}function QJ(){pk(uk,fk)}function JJ(t,e){ea.point=pk,ms(uk=xa=t,fk=_a=e)}function pk(t,e){var n=t-xa,r=e-_a,i=bi(n*n+r*r);Ph+=i*(xa+t)/2,Ch+=i*(_a+e)/2,Pc+=i,i=_a*t-xa*e,nm+=i*(xa+t),rm+=i*(_a+e),uu+=i*3,ms(xa=t,_a=e)}var vk=ea;function gk(t){this._context=t}gk.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,Ci);break}}},result:$i};var im=new Wa,am,yk,mk,fu,du,kh={point:$i,lineStart:function(){kh.point=ttt},lineEnd:function(){am&&bk(yk,mk),kh.point=$i},polygonStart:function(){am=!0},polygonEnd:function(){am=null},result:function(){var t=+im;return im=new Wa,t}};function ttt(t,e){kh.point=bk,yk=fu=t,mk=du=e}function bk(t,e){fu-=t,du-=e,im.add(bi(fu*fu+du*du)),fu=t,du=e}var xk=kh;let _k,Rh,Ok,wk;class Sk{constructor(e){this._append=e==null?Mk:ett(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!==Ok||this._append!==Rh){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`,Ok=r,Rh=this._append,wk=this._,this._=i}this._+=wk;break}}}result(){const e=this._;return this._="",e.length?e:null}}function Mk(t){let e=1;this._+=t[0];for(const n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function ett(t){const e=Math.floor(t);if(!(e>=0))throw new RangeError(`invalid digits: ${t}`);if(e>15)return Mk;if(e!==_k){const n=wr(10,e);_k=e,Rh=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 Rh}function Ek(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(lk)),lk.result()},o.measure=function(s){return Ec(s,i(xk)),xk.result()},o.bounds=function(s){return Ec(s,i(Th)),Th.result()},o.centroid=function(s){return Ec(s,i(vk)),vk.result()},o.projection=function(s){return arguments.length?(i=s==null?(t=null,su):(t=s).stream,o):t},o.context=function(s){return arguments.length?(a=s==null?(e=null,new Sk(n)):new gk(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 Sk(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 Ak(t,e,n){var r=Cc(t,e-De,n).concat(e);return function(i){return r.map(function(a){return[i,a]})}}function Tk(t,e,n){var r=Cc(t,e-De,n).concat(e);return function(i){return r.map(function(a){return[a,i]})}}function ntt(){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(Sh(r/u)*u,n,u).map(p).concat(Cc(Sh(s/f)*f,o,f).map(v)).concat(Cc(Sh(e/c)*c,t,c).filter(function(b){return mn(b%u)>De}).map(d)).concat(Cc(Sh(a/l)*l,i,l).filter(function(b){return mn(b%f)>De}).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=Ak(a,i,90),h=Tk(e,t,g),p=Ak(s,o,90),v=Tk(r,n,g),y):g},y.extentMajor([[-180,-90+De],[180,90-De]]).extentMinor([[-180,-80-De],[180,80+De]])}function rtt(){return ntt()()}function Pk(){var t=[],e;return{point:function(n,r,i){e.push([n,r,i])},lineStart:function(){t.push(e=[])},lineEnd:$i,rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))},result:function(){var n=t;return t=[],e=null,n}}}function Lh(t,e){return mn(t[0]-e[0])<De&&mn(t[1]-e[1])<De}function Nh(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 Ck(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(Lh(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*De}a.push(m=new Nh(g,p,null,!0)),o.push(m.o=new Nh(g,null,m,!1)),a.push(m=new Nh(y,p,null,!1)),o.push(m.o=new Nh(y,null,m,!0))}}),!!a.length){for(o.sort(e),kk(a),kk(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 kk(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]),Xi(t[2])]}function kc(t){var e=t[0],n=t[1],r=rn(n);return[r*rn(e),r*Ze(e),Ze(n)]}function Ih(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function jh(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 Dh(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])<=on?t[0]:Vi(t[0])*((mn(t[0])+on)%Ci-on)}function itt(t,e){var n=lm(e),r=e[1],i=Ze(r),a=[Ze(n),-rn(n),0],o=0,s=0,c=new Wa;i===1?r=gr+De:i===-1&&(r=-gr-De);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+rk,g=Ze(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+rk,w=Ze(O),M=rn(O),E=_-p,A=E>=0?1:-1,P=A*E,C=P>on,j=g*w;if(c.add(Ha(j*A*Ze(P),y*M+j*rn(P))),o+=C?E+A*Ci:E,C^p>=n^_>=n){var N=jh(kc(h),kc(b));cm(N);var k=jh(a,N);cm(k);var R=(C^E>=0?-1:1)*Xi(k[2]);(r>R||r===R&&(N[0]||N[1]))&&(s+=C^E>=0?1:-1)}}return(o<-De||o<De&&c<-nk)^s&1}function*att(t){for(const e of t)yield*e}function Rk(t){return Array.from(att(t))}function Lk(t,e,n,r){return function(i){var a=e(i),o=Pk(),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=Rk(u);var _=itt(l,r);u.length?(c||(i.polygonStart(),c=!0),Ck(u,stt,_,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(ott))}}return d}}function ott(t){return t.length>1}function stt(t,e){return((t=t.x)[0]<0?t[1]-gr-De:gr-t[1])-((e=e.x)[0]<0?e[1]-gr-De:gr-e[1])}var Nk=Lk(function(){return!0},ctt,utt,[-on,-gr]);function ctt(t){var e=NaN,n=NaN,r=NaN,i;return{lineStart:function(){t.lineStart(),i=1},point:function(a,o){var s=a>0?on:-on,c=mn(a-e);mn(c-on)<De?(t.point(e,n=(n+o)/2>0?gr:-gr),t.point(r,n),t.lineEnd(),t.lineStart(),t.point(s,n),t.point(a,n),i=0):r!==s&&c>=on&&(mn(e-r)<De&&(e-=r*De),mn(a-s)<De&&(a-=s*De),n=ltt(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 ltt(t,e,n,r){var i,a,o=Ze(t-n);return mn(o)>De?Ac((Ze(e)*(a=rn(r))*Ze(n)-Ze(r)*(i=rn(e))*Ze(t))/(i*a*o)):(e+r)/2}function utt(t,e,n,r){var i;if(t==null)i=n*gr,r.point(-on,i),r.point(0,i),r.point(on,i),r.point(on,0),r.point(on,-i),r.point(0,-i),r.point(-on,-i),r.point(-on,0),r.point(-on,i);else if(mn(t[0]-e[0])>De){var a=t[0]<e[0]?on:-on;i=n*a/2,r.point(-a,i),r.point(0,i),r.point(a,i)}else r.point(e[0],e[1])}function Ik(t,e,n,r,i,a){if(n){var o=rn(e),s=Ze(e),c=r*n;i==null?(i=e+r*Ci,a=e-c/2):(i=jk(o,i),a=jk(o,a),(r>0?i<a:i>a)&&(i+=r*Ci));for(var l,u=i;r>0?u>a:u<a;u-=c)l=om([o,-s*rn(u),-s*Ze(u)]),t.point(l[0],l[1])}}function jk(t,e){e=kc(e),e[0]-=t,cm(e);var n=ak(-e[1]);return((-e[2]<0?-n:n)+Ci-De)%Ci}function Ppt(){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,Ik(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 ftt(t){var e=rn(t),n=6*dr,r=e>0,i=mn(e)>De;function a(u,f,d,h){Ik(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?on:-on),y):0;if(!f&&(p=h=_)&&u.lineStart(),_!==h&&(b=c(f,m),(!b||Lh(f,b)||Lh(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||!Lh(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=jh(h,p),y=Ih(g,g),m=g[0],b=y-m*m;if(!b)return!d&&u;var _=e*y/b,O=-e*m/b,w=jh(v,g),M=Dh(v,_),E=Dh(g,O);sm(M,E);var A=w,P=Ih(M,A),C=Ih(A,A),j=P*P-C*(Ih(M,M)-1);if(!(j<0)){var N=bi(j),k=Dh(A,(-P-N)/C);if(sm(k,M),k=om(k),!d)return k;var R=u[0],D=f[0],F=u[1],B=f[1],z;D<R&&(z=R,R=D,D=z);var Y=D-R,$=mn(Y-on)<De,tt=$||Y<De;if(!$&&B<F&&(z=F,F=B,B=z),tt?$?F+B>0^k[1]<(mn(k[0]-R)<De?F:B):F<=k[1]&&k[1]<=B:Y>on^(R<=k[0]&&k[0]<=D)){var it=Dh(A,(-P+N)/C);return sm(it,M),[k,om(it)]}}}function l(u,f){var d=r?t:on-t,h=0;return u<-d?h|=1:u>d&&(h|=2),f<-d?h|=4:f>d&&(h|=8),h}return Lk(o,s,a,r?[0,-t]:[-on,t-on])}function dtt(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 hu=1e9,Fh=-hu;function Dk(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)<De?u>0?0:3:mn(l[0]-n)<De?u>0?2:1:mn(l[1]-e)<De?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=Pk(),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,F=h.length;D<F;++D)for(var B=h[D],z=1,Y=B.length,$=B[0],tt,it,St=$[0],Ft=$[1];z<Y;++z)tt=St,it=Ft,$=B[z],St=$[0],Ft=$[1],it<=r?Ft>r&&(St-tt)*(r-it)>(Ft-it)*(t-tt)&&++R:Ft<=r&&(St-tt)*(r-it)<(Ft-it)*(t-tt)&&--R;return R}function P(){u=f,d=[],h=[],w=!0}function C(){var R=A(),D=w&&R,F=(d=Rk(d)).length;(D||F)&&(l.polygonStart(),D&&(l.lineStart(),a(null,null,1,l),l.lineEnd()),F&&Ck(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 F=i(R,D);if(h&&p.push([R,D]),O)v=R,g=D,y=F,O=!1,F&&(u.lineStart(),u.point(R,D));else if(F&&_)u.point(R,D);else{var B=[m=Math.max(Fh,Math.min(hu,m)),b=Math.max(Fh,Math.min(hu,b))],z=[R=Math.max(Fh,Math.min(hu,R)),D=Math.max(Fh,Math.min(hu,D))];dtt(B,z,t,e,n,r)?(_||(u.lineStart(),u.point(B[0],B[1])),u.point(z[0],z[1]),F||u.lineEnd(),w=!1):F&&(u.lineStart(),u.point(R,D),w=!1)}m=R,b=D,_=F}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)>on&&(t-=Math.round(t/Ci)*Ci),[t,e]}fm.invert=fm;function Fk(t,e,n){return(t%=Ci)?e||n?um(zk(t),Gk(e,n)):zk(t):e||n?Gk(e,n):fm}function Bk(t){return function(e,n){return e+=t,mn(e)>on&&(e-=Math.round(e/Ci)*Ci),[e,n]}}function zk(t){var e=Bk(t);return e.invert=Bk(-t),e}function Gk(t,e){var n=rn(t),r=Ze(t),i=rn(e),a=Ze(e);function o(s,c){var l=rn(c),u=rn(s)*l,f=Ze(s)*l,d=Ze(c),h=d*n+u*r;return[Ha(f*i-h*a,u*n-d*r),Xi(h*i+f*a)]}return o.invert=function(s,c){var l=rn(c),u=rn(s)*l,f=Ze(s)*l,d=Ze(c),h=d*i-f*a;return[Ha(f*i+d*a,u*n+h*r),Xi(h*n-u*r)]},o}function htt(t){t=Fk(t[0]*dr,t[1]*dr,t.length>2?t[2]*dr:0);function e(n){return n=t(n[0]*dr,n[1]*dr),n[0]*=Kr,n[1]*=Kr,n}return e.invert=function(n){return n=t.invert(n[0]*dr,n[1]*dr),n[0]*=Kr,n[1]*=Kr,n},e}function Cpt(t){return{stream:pu(t)}}function pu(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(Th)),e(Th.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 Wk=16,ptt=rn(30*dr);function Hk(t,e){return+e?gtt(t,e):vtt(t)}function vtt(t){return pu({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}function gtt(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=Xi(w/=M),A=mn(mn(w)-1)<De||mn(a-f)<De?(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<ptt)&&(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],Wk,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,Wk,r),g.lineEnd=_,_()}return g}}var ytt=pu({point:function(t,e){this.stream.point(t*dr,e*dr)}});function mtt(t){return pu({point:function(e,n){var r=t(e,n);return this.stream.point(r[0],r[1])}})}function btt(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 Yk(t,e,n,r,i,a){if(!a)return btt(t,e,n,r,i);var o=rn(a),s=Ze(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=Nk,g=null,y,m,b,_=su,O=.5,w,M,E,A,P;function C(R){return E(R[0]*dr,R[1]*dr)}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=ytt(mtt(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?ftt(p=R*dr):(p=null,Nk),k()):p*Kr},C.clipExtent=function(R){return arguments.length?(_=R==null?(g=y=m=b=null,su):Dk(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*dr,o=R[1]%360*dr,N()):[a*Kr,o*Kr]},C.rotate=function(R){return arguments.length?(s=R[0]%360*dr,c=R[1]%360*dr,l=R.length>2?R[2]%360*dr:0,N()):[s*Kr,c*Kr,l*Kr]},C.angle=function(R){return arguments.length?(f=R%360*dr,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=Hk(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=Yk(n,0,0,d,h,f).apply(null,e(a,o)),D=Yk(n,r-R[0],i-R[1],d,h,f);return u=Fk(s,c,l),M=um(e,D),E=um(u,M),w=Hk(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=on/3,r=ym(t),i=r(e,n);return i.parallels=function(a){return arguments.length?r(e=a[0]*dr,n=a[1]*dr):[e*Kr,n*Kr]},i}function xtt(t){var e=rn(t);function n(r,i){return[r*e,Ze(i)/e]}return n.invert=function(r,i){return[r/e,Xi(i*e)]},n}function Vk(t,e){var n=Ze(t),r=(n+Ze(e))/2;if(mn(r)<De)return xtt(t);var i=1+n*(2*r-n),a=bi(i)/r;function o(s,c){var l=bi(i-2*r*Ze(c))/r;return[l*Ze(s*=r),a-l*rn(s)]}return o.invert=function(s,c){var l=a-c,u=Ha(s,mn(l))*Vi(l);return l*r<0&&(u-=on*Vi(s)*Vi(l)),[u/r,Xi((i-(s*s+l*l)*r*r)/(2*r))]},o}function zh(){return mm(Vk).scale(155.424).center([0,33.6442])}function Xk(){return zh().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function _tt(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 Ott(){var t,e,n=Xk(),r,i=zh().rotate([154,0]).center([-2,58.5]).parallels([55,65]),a,o=zh().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=_tt([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+De,v+.12*h+De],[p-.214*h-De,v+.234*h-De]]).stream(l),s=o.translate([p-.205*h,v+.212*h]).clipExtent([[p-.214*h+De,v+.166*h+De],[p-.115*h-De,v+.234*h-De]]).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 $k(t){return function(e,n){var r=rn(e),i=rn(n),a=t(r*i);return a===1/0?[2,0]:[a*i*Ze(e),a*Ze(n)]}}function vu(t){return function(e,n){var r=bi(e*e+n*n),i=t(r),a=Ze(i),o=rn(i);return[Ha(e*a,r*o),Xi(r&&n*a/r)]}}var bm=$k(function(t){return bi(2/(1+t))});bm.invert=vu(function(t){return 2*Xi(t/2)});function wtt(){return Oa(bm).scale(124.75).clipAngle(180-.001)}var xm=$k(function(t){return(t=ak(t))&&t/Ze(t)});xm.invert=vu(function(t){return t});function Stt(){return Oa(xm).scale(79.4188).clipAngle(180-.001)}function gu(t,e){return[t,Mh(qy((gr+e)/2))]}gu.invert=function(t,e){return[t,2*Ac(ik(e))-gr]};function Mtt(){return Uk(gu).scale(961/Ci)}function Uk(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=on*r(),d=e(htt(e.rotate()).invert([0,0]));return a(o==null?[[d[0]-f,d[1]-f],[d[0]+f,d[1]+f]]:t===gu?[[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 Gh(t){return qy((gr+t)/2)}function qk(t,e){var n=rn(t),r=t===e?Ze(t):Mh(n/rn(e))/Mh(Gh(e)/Gh(t)),i=n*Uy(Gh(t),r)/r;if(!r)return gu;function a(o,s){i>0?s<-gr+De&&(s=-gr+De):s>gr-De&&(s=gr-De);var c=i/Uy(Gh(s),r);return[c*Ze(r*o),i-c*rn(r*o)]}return a.invert=function(o,s){var c=i-s,l=Vi(r)*bi(o*o+c*c),u=Ha(o,mn(c))*Vi(c);return c*r<0&&(u-=on*Vi(o)*Vi(c)),[u/r,2*Ac(Uy(i/l,1/r))-gr]},a}function Ett(){return mm(qk).scale(109.5).parallels([30,30])}function yu(t,e){return[t,e]}yu.invert=yu;function Att(){return Oa(yu).scale(152.63)}function Zk(t,e){var n=rn(t),r=t===e?Ze(t):(n-rn(e))/(e-t),i=n/r+t;if(mn(r)<De)return yu;function a(o,s){var c=i-s,l=r*o;return[c*Ze(l),i-c*rn(l)]}return a.invert=function(o,s){var c=i-s,l=Ha(o,mn(c))*Vi(c);return c*r<0&&(l-=on*Vi(o)*Vi(c)),[l/r,i-Vi(r)*bi(o*o+c*c)]},a}function Ttt(){return mm(Zk).scale(131.154).center([0,13.9389])}var mu=1.340264,bu=-.081106,xu=893e-6,_u=.003796,Wh=bi(3)/2,Ptt=12;function _m(t,e){var n=Xi(Wh*Ze(e)),r=n*n,i=r*r*r;return[t*rn(n)/(Wh*(mu+3*bu*r+i*(7*xu+9*_u*r))),n*(mu+bu*r+i*(xu+_u*r))]}_m.invert=function(t,e){for(var n=e,r=n*n,i=r*r*r,a=0,o,s,c;a<Ptt&&(s=n*(mu+bu*r+i*(xu+_u*r))-e,c=mu+3*bu*r+i*(7*xu+9*_u*r),n-=o=s/c,r=n*n,i=r*r*r,!(mn(o)<nk));++a);return[Wh*t*(mu+3*bu*r+i*(7*xu+9*_u*r))/rn(n),Xi(Ze(n)/Wh)]};function Ctt(){return Oa(_m).scale(177.158)}function Om(t,e){var n=rn(e),r=rn(t)*n;return[n*Ze(t)/r,Ze(e)/r]}Om.invert=vu(Ac);function ktt(){return Oa(Om).scale(144.049).clipAngle(60)}function Rtt(){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=pu({point:function(_,O){var w=b([_,O]);this.stream.point(w[0],w[1])}}),v=su,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,su):Dk(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*dr,s=Ze(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)>De&&--r>0);return[t/(.8707+(a=n*n)*(-.131979+a*(-.013791+a*a*a*(.003971-.001529*a)))),n]};function Ltt(){return Oa(wm).scale(175.295)}function Sm(t,e){return[rn(e)*Ze(t),Ze(e)]}Sm.invert=vu(Xi);function Ntt(){return Oa(Sm).scale(249.5).clipAngle(90+De)}function Mm(t,e){var n=rn(e),r=1+rn(t)*n;return[n*Ze(t)/r,Ze(e)/r]}Mm.invert=vu(function(t){return 2*Ac(t)});function Itt(){return Oa(Mm).scale(250).clipAngle(142)}function Em(t,e){return[Mh(qy((gr+e)/2)),-t]}Em.invert=function(t,e){return[-e,2*Ac(ik(t))-gr]};function jtt(){var t=Uk(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 Dtt=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 Ftt(t){if(typeof t=="function")return t;const e=`geo${ao(t)}`,n=be[e];if(!n)throw new Error(`Unknown coordinate: ${t}`);return n}function Btt(t){return{type:"FeatureCollection",features:t.flatMap(e=>ztt(e).features)}}function ztt(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 Gtt(t,e){var n;for(const[r,i]of Object.entries(e))(n=t[r])===null||n===void 0||n.call(t,i)}function Wtt(t,e,n,r){const i=()=>{const s=e.filter(Kk);return s.find(l=>l.sphere)?{type:"Sphere"}:Btt(s.filter(l=>!l.sphere).flatMap(l=>l.data.value))},{outline:a=i()}=r,{size:o="fitExtent"}=r;if(o==="fitExtent")return Htt(t,a,n);if(o==="fitWidth")return Ytt(t,a,n)}function Htt(t,e,n){const{x:r,y:i,width:a,height:o}=n;t.fitExtent([[r,i],[a,o]],e)}function Ytt(t,e,n){const{width:r,height:i}=n,[[a,o],[s,c]]=Ek(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 Vtt(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:[rtt()]}}):n==="sphere"?Object.assign(Object.assign({},t),{sphere:!0,data:{value:[{type:"Sphere"}]}}):t}function Kk(t){return t.type==="geoPath"}const Qk=()=>t=>{const{children:e,coordinate:n={}}=t;if(!Array.isArray(e))return[];const{type:r="equalEarth"}=n,i=Dtt(n,["type"]),a=Ftt(r),o=e.map(Vtt);let s;function c(){return[["custom",(f,d,h,p)=>{const v=a();Wtt(v,o,{x:f,y:d,width:h,height:p},i),Gtt(v,i),s=Ek(v);const y=new Xr({domain:[f,f+h]}),m=new Xr({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:ng(h,{title:"id",items:[{channel:"color"}]}),style:Object.assign(Object.assign({},d),{d:p=>s(p)||[]})})}const u=f=>Kk(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)})]};Qk.props={};var Xtt=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 Jk=()=>t=>{const{type:e,data:n,scale:r,encode:i,style:a,animate:o,key:s,state:c}=t,l=Xtt(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}]})]};Jk.props={};function $tt(){return{"composition.geoView":Qk,"composition.geoPath":Jk}}function Utt(t){const e=+this._x.call(null,t),n=+this._y.call(null,t);return t5(this.cover(e,n),e,n,t)}function t5(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 qtt(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)t5(this,o[n],s[n],t[n]);return this}function Ztt(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 Ktt(){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 Jtt(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 tet(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 eet(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this}function net(){return this._root}function ret(){var t=0;return this.visit(function(e){if(!e.length)do++t;while(e=e.next)}),t}function iet(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 aet(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 oet(t){return t[0]}function set(t){return arguments.length?(this._x=t,this):this._x}function cet(t){return t[1]}function uet(t){return arguments.length?(this._y=t,this):this._y}function e5(t,e,n){var r=new Am(e==null?oet:e,n==null?cet: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 n5(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var oi=e5.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=n5(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]=n5(r));return t},oi.add=Utt,oi.addAll=qtt,oi.cover=Ztt,oi.data=Ktt,oi.extent=Qtt,oi.find=Jtt,oi.remove=tet,oi.removeAll=eet,oi.root=net,oi.size=ret,oi.visit=iet,oi.visitAfter=aet,oi.x=set,oi.y=uet;function ki(t){return function(){return t}}function Rc(t){return(t()-.5)*1e-6}var fet={value:function(){}};function r5(){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 Hh(n)}function Hh(t){this._=t}function det(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}})}Hh.prototype=r5.prototype={constructor:Hh,on:function(e,n){var r=this._,i=det(e+"",r),a,o=-1,s=i.length;if(arguments.length<2){for(;++o<s;)if((a=(e=i[o]).type)&&(a=het(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]=i5(r[a],e.name,n);else if(n==null)for(a in r)r[a]=i5(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 Hh(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 het(t,e){for(var n=0,r=t.length,i;n<r;++n)if((i=t[n]).name===e)return i.value}function i5(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=fet,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var pet=r5,Lc=0,Ou=0,wu=0,a5=1e3,Yh,Su,Vh=0,bs=0,Xh=0,Mu=typeof performance=="object"&&performance.now?performance:Date,o5=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function s5(){return bs||(o5(vet),bs=Mu.now()+Xh)}function vet(){bs=0}function Tm(){this._call=this._time=this._next=null}Tm.prototype=c5.prototype={constructor:Tm,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?s5():+n)+(e==null?0:+e),!this._next&&Su!==this&&(Su?Su._next=this:Yh=this,Su=this),this._call=t,this._time=n,Pm()},stop:function(){this._call&&(this._call=null,this._time=1/0,Pm())}};function c5(t,e,n){var r=new Tm;return r.restart(t,e,n),r}function get(){s5(),++Lc;for(var t=Yh,e;t;)(e=bs-t._time)>=0&&t._call.call(void 0,e),t=t._next;--Lc}function l5(){bs=(Vh=Mu.now())+Xh,Lc=Ou=0;try{get()}finally{Lc=0,met(),bs=0}}function yet(){var t=Mu.now(),e=t-Vh;e>a5&&(Xh-=e,Vh=t)}function met(){for(var t,e=Yh,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:Yh=n);Su=t,Pm(r)}function Pm(t){if(!Lc){Ou&&(Ou=clearTimeout(Ou));var e=t-bs;e>24?(t<1/0&&(Ou=setTimeout(l5,t-Mu.now()-Xh)),wu&&(wu=clearInterval(wu))):(wu||(Vh=Mu.now(),wu=setInterval(yet,a5)),Lc=1,o5(l5))}}const bet=1664525,xet=1013904223,u5=4294967296;function _et(){let t=1;return()=>(t=(bet*t+xet)%u5)/u5}function Oet(t){return t.x}function wet(t){return t.y}var Met=10,Eet=Math.PI*(3-Math.sqrt(5));function Aet(t){var e,n=1,r=.001,i=1-Math.pow(r,1/300),a=0,o=.6,s=new Map,c=c5(f),l=pet("tick","end"),u=_et();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=Met*Math.sqrt(.5+v),b=v*Eet;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 Tet(){var t,e,n,r,i=ki(-30),a,o=1,s=1/0,c=.81;function l(h){var p,v=t.length,g=e5(t,Oet,wet).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:ki(+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 Pet(t){return t.index}function f5(t,e){var n=t.get(e);if(!n)throw new Error("node not found: "+e);return n}function Cet(t){var e=Pet,n=f,r,i=ki(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=f5(b,_.source)),typeof _.target!="object"&&(_.target=f5(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:ki(+g),p(),d):n},d.distance=function(g){return arguments.length?(i=typeof g=="function"?g:ki(+g),v(),d):i},d}function ket(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 Ret(t){var e=ki(.1),n,r,i;typeof t!="function"&&(t=ki(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:ki(+s),o(),a):e},a.x=function(s){return arguments.length?(t=typeof s=="function"?s:ki(+s),o(),a):t},a}function Let(t){var e=ki(.1),n,r,i;typeof t!="function"&&(t=ki(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:ki(+s),o(),a):e},a.y=function(s){return arguments.length?(t=typeof s=="function"?s:ki(+s),o(),a):t},a}var Net=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const Iet={joint:!0},jet={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}},Det={type:"point",axis:!1,legend:!1,encode:{x:"x",y:"y",size:5,color:"group",shape:"point"},style:{stroke:"#fff"}},Fet={text:""};function Bet(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=Tet(),f=Cet(i).id(ba(l));typeof o=="function"&&u.strength(o),typeof s=="function"&&f.strength(s);const d=Aet(r).force("link",f).force("charge",u);a?d.force("center",ket()):d.force("x",Ret()).force("y",Let()),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 d5=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=Net(n,["nodeKey","linkKey"]),h=Object.assign({nodeKey:u,linkKey:f},d),p=le(h,"node"),v=le(h,"link"),{links:g,nodes:y}=Pg(e,h),{nodesData:m,linksData:b}=Bet({links:g,nodes:y},Nt({},Iet,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[Nt({},jet,{data:b,encode:v,labels:s,style:le(i,"link"),tooltip:_,animate:ga(c,"link")}),Nt({},Det,{data:m,encode:Object.assign({},p),scale:r,style:le(i,"node"),tooltip:O,labels:[Object.assign(Object.assign({},Fet),le(i,"label")),...o],animate:ga(c,"link")})]};d5.props={};function zet(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 Get(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 Wet(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 Het(t,e,n){return t.a.parent===e.parent?t.a:n}function $h(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}$h.prototype=Object.create(hc.prototype);function Yet(t){for(var e=new $h(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 $h(a[o],o)),i.parent=n;return(e.parent=new $h(null,0)).children=[e],e}function Vet(){var t=zet,e=1,n=1,r=null;function i(l){var u=Yet(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){Wet(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&&(Get(Het(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 Xet(t,e){return t.parent===e.parent?1:2}function $et(t){return t.reduce(Uet,0)/t.length}function Uet(t,e){return t+e.x}function qet(t){return 1+t.reduce(Zet,0)}function Zet(t,e){return Math.max(t,e.y)}function Ket(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 Jet(){var t=Xet,e=1,n=1,r=!1;function i(a){var o,s=0;a.eachAfter(function(d){var h=d.children;h?(d.x=$et(h),d.y=qet(h)):(d.x=o?s+=t(d,o):0,d.y=0,o=d)});var c=Ket(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 h5=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}},p5=t=>h5(Jet)(t);p5.props={};const v5=t=>h5(Vet)(t);v5.props={};const tnt={sortBy:(t,e)=>e.value-t.value},ent={axis:!1,legend:!1,type:"point",encode:{x:"x",y:"y",size:2,shape:"point"}},nnt={type:"link",encode:{x:"x",y:"y",shape:"smooth"}},rnt={text:"",fontSize:10},g5=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}=v5(Object.assign(Object.assign(Object.assign({},tnt),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[Nt({},nnt,{data:d,encode:le(n,"link"),scale:le(r,"link"),labels:s,style:Object.assign({stroke:"#999"},le(i,"link")),tooltip:p,animate:ga(c,"link")}),Nt({},ent,{data:f,scale:le(r,"node"),encode:le(n,"node"),labels:[Object.assign(Object.assign({},rnt),le(i,"label")),...o],style:Object.assign({},le(i,"node")),tooltip:h,animate:ga(c,"node")})]};g5.props={};function xs(){return 0}function Nc(t){return function(){return t}}var int=1664525,ant=1013904223,y5=4294967296;function ont(){var t=1;return function(){return(t=(int*t+ant)%y5)/y5}}var snt=yt(80445);function cnt(t){return snt(t)==="object"&&"length"in t?t:Array.from(t)}function lnt(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 kpt(t){return m5(t,lcg())}function m5(t,e){for(var n=0,r=(t=lnt(Array.from(t),e)).length,i=[],a,o;n<r;)a=t[n],o&&b5(o,a)?++n:(o=fnt(i=unt(i,a)),n=0);return o}function unt(t,e){var n,r;if(Rm(e,t))return[e];for(n=0;n<t.length;++n)if(Uh(e,t[n])&&Rm(Eu(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(Uh(Eu(t[n],t[r]),e)&&Uh(Eu(t[n],e),t[r])&&Uh(Eu(t[r],e),t[n])&&Rm(x5(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}function Uh(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 b5(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(!b5(t,e[n]))return!1;return!0}function fnt(t){switch(t.length){case 1:return dnt(t[0]);case 2:return Eu(t[0],t[1]);case 3:return x5(t[0],t[1],t[2])}}function dnt(t){return{x:t.x,y:t.y,r:t.r}}function Eu(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 x5(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 _5(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 O5(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 w5(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 qh(t){this._=t,this.next=null,this.previous=null}function S5(t,e){if(!(a=(t=cnt(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;_5(r,n,i=t[2]),n=new qh(n),r=new qh(r),i=new qh(i),n.next=i.previous=r,r.next=n.previous=i,i.next=r.previous=n;t:for(c=3;c<a;++c){_5(n._,r._,i=t[c]),i=new qh(i),l=r.next,u=n.previous,f=r._.r,d=n._.r;do if(f<=d){if(O5(l._,i._)){r=l,n.next=r,r.previous=n,--c;continue t}f+=l._.r,l=l.next}else{if(O5(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=w5(n);(i=i.next)!==r;)(s=w5(i))<o&&(n=i,o=s);r=n.next}for(n=[r._],i=r;(i=i.next)!==r;)n.push(i._);for(i=m5(n,e),c=0;c<a;++c)n=t[c],n.x-=i.x,n.y-=i.y;return i.r}function Rpt(t){return S5(t,lcg()),t}function hnt(t){return Math.sqrt(t.value)}function pnt(){var t=null,e=1,n=1,r=xs;function i(a){var o=ont();return a.x=e/2,a.y=n/2,t?a.eachBefore(M5(t)).eachAfter(Lm(r,.5,o)).eachBefore(E5(1)):a.eachBefore(M5(hnt)).eachAfter(Lm(xs,1,o)).eachAfter(Lm(r,a.r/Math.min(e,n),o)).eachBefore(E5(Math.min(e,n)/(2*a.r))),a}return i.radius=function(a){return arguments.length?(t=Wd(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 M5(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=S5(i,n),s)for(a=0;a<o;++a)i[a].r-=s;r.r=c+s}}}function E5(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 vnt=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const gnt=(t,e)=>({size:[t,e],padding:0,sort:(n,r)=>r.value-n.value}),ynt=(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"}}),mnt={text:"",position:"inside",textOverflow:"clip",wordWrap:!0,maxLines:1,wordWrapWidth:t=>t.r*2},bnt={title:t=>t.data.name,items:[{field:"value"}]},xnt=(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(),pnt().size(e.size).padding(e.padding)(i),i.descendants()},A5=(t,e)=>{const{width:n,height:r}=e,{data:i,encode:a={},scale:o={},style:s={},layout:c={},labels:l=[],tooltip:u={}}=t,f=vnt(t,["data","encode","scale","style","layout","labels","tooltip"]),d=ynt(n,r,a),h=xnt(i,Nt({},gnt(n,r),c),Nt({},d.encode,a)),p=le(s,"label");return Nt({},d,Object.assign(Object.assign({data:h,encode:a,scale:o,style:s,labels:[Object.assign(Object.assign({},mnt),p),...l]},f),{tooltip:ng(u,bnt),axis:!1}))};A5.props={};function _nt(t){return t.target.depth}function Ont(t){return t.depth}function wnt(t,e){return e-1-t.height}function Zh(t,e){return t.sourceLinks.length?t.depth:e-1}function Snt(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?Ai(t.sourceLinks,_nt)-1:0}function Kh(t){return function(){return t}}function T5(t,e){return Qh(t.source,e.source)||t.index-e.index}function P5(t,e){return Qh(t.target,e.target)||t.index-e.index}function Qh(t,e){return t.y0-e.y0}function Nm(t){return t.value}function Mnt(t){return t.index}function Ent(t){return t.nodes}function Ant(t){return t.links}function C5(t,e){const n=t.get(e);if(!n)throw new Error("missing: "+e);return n}function k5({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 Tnt(){let t=0,e=0,n=1,r=1,i=24,a=8,o,s=Mnt,c=Zh,l,u,f,d=Ent,h=Ant,p=6;function v(D){const F={nodes:d(D),links:h(D)};return g(F),y(F),m(F),b(F),w(F),k5(F),F}v.update=function(D){return k5(D),D},v.nodeId=function(D){return arguments.length?(s=typeof D=="function"?D:Kh(D),v):s},v.nodeAlign=function(D){return arguments.length?(c=typeof D=="function"?D:Kh(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:Kh(D),v):d},v.links=function(D){return arguments.length?(h=typeof D=="function"?D:Kh(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:F}){D.forEach((z,Y)=>{z.index=Y,z.sourceLinks=[],z.targetLinks=[]});const B=new Map(D.map(z=>[s(z),z]));if(F.forEach((z,Y)=>{z.index=Y;let{source:$,target:tt}=z;typeof $!="object"&&($=z.source=C5(B,$)),typeof tt!="object"&&(tt=z.target=C5(B,tt)),$.sourceLinks.push(z),tt.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 F of D)F.value=F.fixedValue===void 0?Math.max(Di(F.sourceLinks,Nm),Di(F.targetLinks,Nm)):F.fixedValue}function m({nodes:D}){const F=D.length;let B=new Set(D),z=new Set,Y=0;for(;B.size;){if(B.forEach($=>{$.depth=Y;for(const{target:tt}of $.sourceLinks)z.add(tt)}),++Y>F)throw new Error("circular link");B=z,z=new Set}if(l){const $=Math.max(Sn(D,it=>it.depth)+1,0);let tt;for(let it=0;it<D.length;it++)tt=D[it],tt.depth=l.call(null,tt,$)}}function b({nodes:D}){const F=D.length;let B=new Set(D),z=new Set,Y=0;for(;B.size;){if(B.forEach($=>{$.height=Y;for(const{source:tt}of $.targetLinks)z.add(tt)}),++Y>F)throw new Error("circular link");B=z,z=new Set}}function _({nodes:D}){const F=Math.max(Sn(D,Y=>Y.depth)+1,0),B=(n-t-i)/(F-1),z=new Array(F).fill(0).map(()=>[]);for(const Y of D){const $=Math.max(0,Math.min(F-1,Math.floor(c.call(null,Y,F))));Y.layer=$,Y.x0=t+$*B,Y.x1=Y.x0+i,z[$]?z[$].push(Y):z[$]=[Y]}if(u)for(const Y of z)Y.sort(u);return z}function O(D){const F=Ai(D,B=>(r-e-(B.length-1)*o)/Di(B,Nm));for(const B of D){let z=e;for(const Y of B){Y.y0=z,Y.y1=z+Y.value*F,z=Y.y1+o;for(const $ of Y.sourceLinks)$.width=$.value*F}z=(r-z+o)/(B.length+1);for(let Y=0;Y<B.length;++Y){const $=B[Y];$.y0+=z*(Y+1),$.y1+=z*(Y+1)}N(B)}}function w(D){const F=_(D);o=Math.min(a,(r-e)/(Sn(F,B=>B.length)-1)),O(F);for(let B=0;B<p;++B){const z=Math.pow(.99,B),Y=Math.max(1-z,(B+1)/p);E(F,z,Y),M(F,z,Y)}}function M(D,F,B){for(let z=1,Y=D.length;z<Y;++z){const $=D[z];for(const tt of $){let it=0,St=0;for(const{source:Xt,value:Pt}of tt.targetLinks){const Ct=Pt*(tt.layer-Xt.layer);it+=k(Xt,tt)*Ct,St+=Ct}if(!(St>0))continue;const Ft=(it/St-tt.y0)*F;tt.y0+=Ft,tt.y1+=Ft,j(tt)}u===void 0&&$.sort(Qh),$.length&&A($,B)}}function E(D,F,B){for(let z=D.length,Y=z-2;Y>=0;--Y){const $=D[Y];for(const tt of $){let it=0,St=0;for(const{target:Xt,value:Pt}of tt.sourceLinks){const Ct=Pt*(Xt.layer-tt.layer);it+=R(tt,Xt)*Ct,St+=Ct}if(!(St>0))continue;const Ft=(it/St-tt.y0)*F;tt.y0+=Ft,tt.y1+=Ft,j(tt)}u===void 0&&$.sort(Qh),$.length&&A($,B)}}function A(D,F){const B=D.length>>1,z=D[B];C(D,z.y0-o,B-1,F),P(D,z.y1+o,B+1,F),C(D,r,D.length-1,F),P(D,e,0,F)}function P(D,F,B,z){for(;B<D.length;++B){const Y=D[B],$=(F-Y.y0)*z;$>1e-6&&(Y.y0+=$,Y.y1+=$),F=Y.y1+o}}function C(D,F,B,z){for(;B>=0;--B){const Y=D[B],$=(Y.y1-F)*z;$>1e-6&&(Y.y0-=$,Y.y1-=$),F=Y.y0-o}}function j({sourceLinks:D,targetLinks:F}){if(f===void 0){for(const{source:{sourceLinks:B}}of F)B.sort(P5);for(const{target:{targetLinks:B}}of D)B.sort(T5)}}function N(D){if(f===void 0)for(const{sourceLinks:F,targetLinks:B}of D)F.sort(P5),B.sort(T5)}function k(D,F){let B=D.y0-(D.sourceLinks.length-1)*o/2;for(const{target:z,width:Y}of D.sourceLinks){if(z===F)break;B+=Y+o}for(const{source:z,width:Y}of F.targetLinks){if(z===D)break;B-=Y}return B}function R(D,F){let B=F.y0-(F.targetLinks.length-1)*o/2;for(const{source:z,width:Y}of F.targetLinks){if(z===D)break;B+=Y+o}for(const{target:z,width:Y}of D.sourceLinks){if(z===F)break;B-=Y}return B}return v}const Pnt={nodeAlign:"justify",nodeWidth:.008,nodePadding:.03,nodes:t=>t.nodes,links:t=>t.links,nodeSort:void 0,linkSort:void 0,iterations:6},Cnt={left:Ont,right:wnt,center:Snt,justify:Zh};function knt(t){const e=typeof t;return e==="string"?Cnt[t]||Zh:e==="function"?t:Zh}const R5=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({},Pnt,t),d=Tnt().nodeSort(r).linkSort(u).links(l).nodes(c).nodeWidth(a).nodePadding(o).nodeDepth(s).nodeAlign(knt(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}};R5.props={};var Rnt=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 Lnt={nodeId:t=>t.key,nodeWidth:.02,nodePadding:.02},Nnt={type:"polygon",axis:!1,legend:!1,encode:{shape:"polygon",x:"x",y:"y"},scale:{x:{type:"identity"},y:{type:"identity"}},style:{stroke:"#000"}},Int={type:"polygon",axis:!1,legend:!1,encode:{shape:"ribbon",x:"x",y:"y"},style:{fillOpacity:.5,stroke:void 0}},jnt={textAlign:t=>t.x[0]<.5?"start":"end",position:t=>t.x[0]<.5?"right":"left",fontSize:10},L5=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=le(n,"node"),h=le(n,"link"),{key:p=A=>A.key,color:v=p}=d,{links:g,nodes:y}=R5(Object.assign(Object.assign(Object.assign({},Lnt),{nodeId:ba(p)}),a))({links:u,nodes:f}),m=le(i,"label"),{text:b=p,spacing:_=5}=m,O=Rnt(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[Nt({},Nnt,{data:y,encode:Object.assign(Object.assign({},d),{color:v}),scale:r,style:le(i,"node"),labels:[Object.assign(Object.assign(Object.assign({},jnt),{text:b,dx:A=>A.x[0]<.5?_:-_}),O),...o],tooltip:M,animate:ga(c,"node"),axis:!1}),Nt({},Int,{data:g,encode:h,labels:s,style:Object.assign({fill:h.color?void 0:"#aaa",strokeWidth:0},le(i,"link")),tooltip:E,animate:ga(c,"link")})]};L5.props={};function Dnt(t,e){return e.value-t.value}function Fnt(t,e){return e.frequency-t.frequency}function Bnt(t,e){return`${t.id}`.localeCompare(`${e.id}`)}function znt(t,e){return`${t.name}`.localeCompare(`${e.name}`)}const Gnt={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 Wnt(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({},Gnt),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=Zn(y,_=>_.source),b=Zn(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:We[u];m&&g.sort(m)}function p(g,y){const m=g.length;if(!m)throw Vs("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=Zn(y,O=>O.source),_=Zn(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=>Wnt(t)(e);Im.props={};var N5=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},Hnt={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}},Ynt={type:"polygon",axis:!1,legend:!1,encode:{shape:"ribbon",x:"x",y:"y"},style:{opacity:.5,lineWidth:1,strokeWidth:1}},Vnt={position:"outside",fontSize:10},I5=(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=le(r,"node"),p=le(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,_=N5(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=le(a,"label"),{text:E=v}=M,A=N5(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[Nt({},Ynt,{data:w,encode:Object.assign(Object.assign({},p),{color:y}),labels:c,style:Object.assign({fill:y?void 0:"#aaa"},le(a,"link")),tooltip:C,animate:ga(l,"link")}),Nt({},Hnt,{data:O,encode:Object.assign(Object.assign({},h),{color:g}),scale:i,style:le(a,"node"),coordinate:{type:"polar",outerRadius:(k-20)/k,startAngle:-Math.PI*2,endAngle:0},labels:[Object.assign(Object.assign(Object.assign({},Vnt),{text:E}),A),...s],tooltip:P,animate:ga(l,"node"),axis:!1})]};I5.props={};function Xnt(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 Jh(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 $nt(t,e,n,r,i){(t.depth&1?Jh:Ll)(t,e,n,r,i)}var j5=(1+Math.sqrt(5))/2;function D5(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):Jh(c,n,r,v?n+=h*g/v:i,a),v-=g,u=f}return o}var F5=function t(e){function n(r,i,a,o,s){D5(e,r,i,a,o,s)}return n.ratio=function(r){return t((r=+r)>1?r:1)},n}(j5),Unt=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):Jh(l,i,a,v?i+=(o-i)*l.value/v:o,s),v-=l.value}else r._squarify=c=D5(e,r,i,a,o,s),c.ratio=e}return n.ratio=function(r){return t((r=+r)>1?r:1)},n}(j5);function qnt(){var t=F5,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(RS),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=JS(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 Znt=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 Knt(t,e){const n={treemapBinary:Xnt,treemapDice:Ll,treemapSlice:Jh,treemapSliceDice:$nt,treemapSquarify:F5,treemapResquarify:Unt},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=Knt(e.tile,e.ratio),a=q$(t,e.path);return r?a.sum(o=>e.ignoreParentValue&&o.children?0:ba(r)(o)).sort(e.sort):a.count(),qnt().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 Jnt=(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}),trt=(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"}}),ert={fontSize:10,text:t=>t.data.name,position:"inside",fill:"#000",textOverflow:"clip",wordWrap:!0,maxLines:1,wordWrapWidth:t=>t.x1-t.x0},nrt={title:t=>t.data.name,items:[{field:"value"}]},B5=(t,e)=>{const{width:n,height:r}=e,{data:i,encode:a={},scale:o,style:s={},layout:c={},labels:l=[],tooltip:u={}}=t,f=Znt(t,["data","encode","scale","style","layout","labels","tooltip"]),d=Qnt(i,Nt({},Jnt(n,r),c),a),h=le(s,"label");return Nt({},trt(n,r),Object.assign(Object.assign({data:d,encode:a,scale:o,style:s,labels:[Object.assign(Object.assign({},ert),h),...l]},f),{tooltip:ng(u,nrt),axis:!1}))};B5.props={};function rrt(){return{"data.arc":Im,"data.cluster":p5,"mark.forceGraph":d5,"mark.tree":g5,"mark.pack":A5,"mark.sankey":L5,"mark.chord":I5,"mark.treemap":B5}}var z5=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 irt(t,e){return Ai(t,n=>e[n])}function art(t,e){return Sn(t,n=>e[n])}function G5(t,e){const n=Dm(t,e)*2.5-Fm(t,e)*1.5;return Ai(t,r=>e[r]>=n?e[r]:NaN)}function Dm(t,e){return yh(t,.25,n=>e[n])}function ort(t,e){return yh(t,.5,n=>e[n])}function Fm(t,e){return yh(t,.75,n=>e[n])}function W5(t,e){const n=Fm(t,e)*2.5-Dm(t,e)*1.5;return Sn(t,r=>e[r]<=n?e[r]:NaN)}function srt(){return(t,e)=>{const{encode:n}=e,{y:r,x:i}=n,{value:a}=r,{value:o}=i;return[Array.from(Zn(t,l=>o[+l]).values()).flatMap(l=>{const u=G5(l,a),f=W5(l,a);return l.filter(d=>a[d]<u||a[d]>f)}),e]}}const H5=t=>{const{data:e,encode:n,style:r={},tooltip:i={},transform:a,animate:o}=t,s=z5(t,["data","encode","style","tooltip","transform","animate"]),{point:c=!0}=r,l=z5(r,["point"]),{y:u}=n,f={y:u,y1:u,y2:u,y3:u,y4:u},d={y1:Dm,y2:ort,y3:Fm},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:irt},d),{y4:art})],encode:Object.assign(Object.assign({},n),f),style:l,tooltip:h},s);const v=le(l,"box"),g=le(l,"point");return[Object.assign({type:"box",data:e,transform:[Object.assign(Object.assign({type:"groupX",y:G5},d),{y4:W5})],encode:Object.assign(Object.assign({},n),f),style:v,tooltip:h,animate:ga(o,"box")},s),{type:"point",data:e,transform:[{type:srt}],encode:n,style:Object.assign({},g),tooltip:p,animate:ga(o,"point")}]};H5.props={};var tp=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 crt=(t,e)=>{const{shape:n,radius:r}=t,i=tp(t,["shape","radius"]),a=le(i,"pointer"),o=le(i,"pin"),{shape:s}=a,c=tp(a,["shape"]),{shape:l}=o,u=tp(o,["shape"]),{coordinate:f,theme:d}=e;return(h,p)=>{const v=h.map(k=>f.invert(k)),[g,y,m]=dF(f,"polar"),b=f.clone(),{color:_}=p,O=ov({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]=TO(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 Fr);return ka(s)||(typeof s=="function"?N.append(()=>s(w,p,b,d)):N.append("line").call(Ee,C).node()),ka(l)||(typeof l=="function"?N.append(()=>l(w,p,b,d)):N.append("circle").call(Ee,j).node()),N.node()}},Y5={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"]}}},lrt={style:{shape:crt,lineWidth:4,pointerLineCap:"round",pinR:10,pinFill:"#fff",radius:.6}},urt={type:"text",style:{x:"50%",y:"60%",textAlign:"center",textBaseline:"middle",fontSize:20,fontWeight:800,fill:"#888"}};function frt(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 drt(t,e){const{name:n="score",target:r,total:i,percent:a,thresholds:o=[]}=frt(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 hrt(t,{target:e,total:n}){const{content:r}=t;return r?r(e,n):e.toString()}const V5=t=>{const{data:e={},scale:n={},style:r={},animate:i={},transform:a=[]}=t,o=tp(t,["data","scale","style","animate","transform"]),{targetData:s,totalData:c,target:l,total:u,scale:f}=drt(e,n),d=le(r,"text"),h=$7(r,["pointer","pin"]);return[Nt({},Y5,Object.assign({type:"interval",transform:[{type:"stackY"}],data:c,scale:f,style:le(r,"arc"),animate:typeof i=="object"?le(i,"arc"):i},o)),Nt({},Y5,lrt,Object.assign({type:"point",data:s,scale:f,style:h,animate:typeof i=="object"?le(i,"indicator"):i},o)),Nt({},urt,{style:Object.assign({text:hrt(d,{target:l,total:u})},d),animate:typeof i=="object"?le(i,"text"):i})]};V5.props={};const Bm=Math.PI/180,Au=64,ep=2048;function prt(t){return t.text}function vrt(){return"serif"}function X5(){return"normal"}function grt(t){return t.value}function yrt(){return~~(Math.random()*2)*90}function mrt(){return 1}function brt(){}function xrt(t,e,n,r){if(e.sprite)return;const i=t.context,a=t.ratio;i.clearRect(0,0,(Au<<5)/a,ep/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*Bm),v=Math.cos(e.rotate*Bm),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>=Au<<5&&(o=0,s+=c,c=0),s+h>=ep)break;i.translate((o+(d>>1))/a,(s+(h>>1))/a),e.rotate&&i.rotate(e.rotate*Bm),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,(Au<<5)/a,ep/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)*(Au<<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 _rt(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 Ort(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 wrt(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 $5(t){const e=t[0]/t[1];return function(n){return[e*(n*=.1)*Math.cos(n),n*Math.sin(n)]}}function Srt(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 U5(t){const e=[];let n=-1;for(;++n<t;)e[n]=0;return e}function Mrt(){return document.createElement("canvas")}function To(t){return typeof t=="function"?t:function(){return t}}const Ert={archimedean:$5,rectangular:Srt};function Art(){let t=[256,256],e=prt,n=vrt,r=grt,i=X5,a=yrt,o=mrt,s=$5,c=Math.random,l=brt,u=[],f=null,d=1/0;const h=X5,p=Mrt,v={};v.start=function(){const[m,b]=t,_=g(p()),O=v.board?v.board:U5((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,xrt(_,N,E,A),N.hasText&&y(O,N,P)&&(l.call(null,"word",{cloud:v,word:N}),M.push(N),P?v.hasImage||Ort(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=(Au<<5)/b,m.height=ep/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])&&(!_||!_rt(b,m,t[0]))&&(!_||wrt(b,_))){const k=b.sprite,R=b.width>>5,D=t[0]>>5,F=b.x-(R<<4),B=F&127,z=32-B,Y=b.y1-b.y0;let $,tt=(b.y+b.y0)*D+(F>>5);for(let it=0;it<Y;it++){$=0;for(let St=0;St<=R;St++)m[tt+St]|=$<<z|(St<R?($=k[it*R+St])>>>B:0);tt+=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=U5((_>>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=Ert[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 Trt=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 Prt(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 Trt(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 Crt=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())})},krt=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 Rrt={size:[500,500],fontSize:[14,28]};function Lrt(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 Nrt(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 q5=t=>e=>Crt(void 0,void 0,void 0,function*(){const n=Object.assign({},Rrt,t),r=Art();yield Prt(r,n).set("fontSize",y=>{const m=e.map(b=>b.value);return Nrt(y,[Ai(m),Sn(m)])}).set("font").set("fontStyle").set("fontWeight").set("padding").set("rotate").set("size").set("spiral").set("timeInterval").set("random").set("text").set("on").setAsync("imageMask",Lrt,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,_=krt(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});q5.props={};var Irt=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())})},jrt=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 Drt(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 Frt=(t,e)=>({size:[t,e]}),Brt=(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"}}),Z5=(t,e)=>Irt(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=jrt(t,["data","encode","scale","style","layout"]),u=Drt(i,a),f=yield q5(Object.assign(Object.assign({},Frt(n,r)),c))(u);return Nt({},Brt(n,r),Object.assign(Object.assign({data:f,encode:a,scale:o,style:s},l),{axis:!1}))});Z5.props={};const K5=5e3;function Q5(t,e,n){return t+(e-t)*n}function zrt(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 Grt(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=zrt(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 Wrt(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=Grt(s,o+s*n,c,0,s/40,t,e),y=u.createElement("path",{style:{path:g,fill:f,opacity:Q5(.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:Q5(.5*K5,K5,v)*2,iterations:1/0})}catch(m){console.warn("off-screen group animate error!")}}}function Hrt(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 Yrt(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 Vrt(t,e,n){return`
M ${t} ${e-n}
L ${t+n} ${e}
L ${t} ${e+n}
L ${t-n} ${e}
Z
`}function Xrt(t,e,n){return`
M ${t} ${e-n}
L ${t+n} ${e+n}
L ${t-n} ${e+n}
Z
`}function $rt(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 J5={pin:$rt,rect:Yrt,circle:Hrt,diamond:Vrt,triangle:Xrt};var t3=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 Urt=(t="circle")=>J5[t]||J5.circle,e3=(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=t3(i,["background","outline","wave"]),{border:f=2,distance:d=0}=c,h=t3(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:Urt(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,Wrt(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}};e3.props={};var qrt=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 Zrt={axis:{x:!1,y:!1},legend:!1,tooltip:!1,encode:{x:"type",y:"percent"},scale:{y:{domain:[0,1]}},style:{shape:e3},animate:{enter:{type:"fadeIn"}}},Krt={type:"text",style:{x:"50%",y:"50%",textAlign:"center",textBaseline:"middle",fontSize:20,fontWeight:800,fill:"#888"},animate:{enter:{type:"fadeIn"}}},n3=t=>{const{data:e={},style:n={},animate:r}=t,i=qrt(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=le(n,"text"),c=le(n,"outline"),l=le(n,"wave"),u=le(n,"background");return[Nt({},Zrt,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)),Nt({},Krt,{style:Object.assign({text:`${Xf(a*100)} %`},s),animate:r})]};n3.props={};var Ya=yt(12886);const r3=1e-10;function i3(t,e){const n=Jrt(t),r=n.filter(function(c){return Qrt(c,t)});let i=0,a=0,o;const s=[];if(r.length>1){const c=tit(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=Tu(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(Tu(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-r3,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(Tu(t,e[n])>e[n].radius+r3)return!1;return!0}function Jrt(t){const e=[];for(let n=0;n<t.length;++n)for(let r=n+1;r<t.length;++r){const i=o3(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 Tu(t,e){return Math.sqrt((t.x-e.x)*(t.x-e.x)+(t.y-e.y)*(t.y-e.y))}function a3(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 o3(t,e){const n=Tu(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 tit(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 eit(t,e){e=e||{},e.maxIterations=e.maxIterations||500;const n=e.initialLayout||ait,r=e.lossFunction||Wm;t=nit(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 s3=1e-10;function Gm(t,e,n){return Math.min(t,e)*Math.min(t,e)*Math.PI<=n+s3?Math.abs(t-e):(0,Ya.bisect)(function(r){return a3(t,e,r)-n},0,t+e)}function nit(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 rit(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 iit(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 ait(t,e){let n=sit(t,e);const r=e.lossFunction||Wm;if(t.length>=8){const i=oit(t,e),a=r(i,t),o=r(n,t);a+1e-8<o&&(n=i)}return n}function oit(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=rit(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 iit(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 sit(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+s3>=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=o3({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=a3(c.radius,l.radius,Tu(c,l))}else o=i3(r(a.sets));const s=a.hasOwnProperty("weight")?a.weight:1;n+=s*(o-a.size)*(o-a.size)}return n}function cit(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 lit(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 Lpt(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=lit(r);for(i=0;i<o.length;++i){cit(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 uit(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 fit(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 dit(t){const e={};i3(t,e);const n=e.arcs;if(n.length===0)return"M 0 0";if(n.length==1){const r=n[0].circle;return fit(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 c3=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=eit(c);let u;return c.map(f=>{const d=f[e],h=({width:p,height:v})=>{u=u||uit(l,p,v,i);const g=d.map(m=>u[m]);let y=dit(g);return/[zZ]$/.test(y)||(y+=" Z"),y};return Object.assign(Object.assign({},f),{[o]:h})})}};c3.props={};function hit(){return{"data.venn":c3,"mark.boxplot":H5,"mark.gauge":V5,"mark.wordCloud":Z5,"mark.liquid":n3}}function pit(){return Object.assign(Object.assign(Object.assign(Object.assign({},$tt()),rrt()),hit()),HJ())}var 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)},vit=zX(BX,np(np({},pit()),T$())),rp=function(){return rp=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},rp.apply(this,arguments)},git=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:rp({points:l,fill:"#eee"},i)}),y=new Zi({style:rp({x:p,y:v,text:zt(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}(),yit=1,mit=2;function bit(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?Rp(u,l,yit|mit,r,f):d))return!1}}return!0}var xit=bit;function _it(t){return t===t&&!mt(t)}var l3=_it;function Oit(t){for(var e=Fo(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,l3(i)]}return e}var wit=Oit;function Sit(t,e){return function(n){return n==null?!1:n[t]===e&&(e!==void 0||t in Object(n))}}var u3=Sit;function Mit(t){var e=wit(t);return e.length==1&&e[0][2]?u3(e[0][0],e[0][1]):function(n){return n===t||xit(n,t,e)}}var Eit=Mit;function Ait(t,e){return t!=null&&e in Object(t)}var Tit=Ait;function Pit(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&&Ep(i)&&Vu(o,i)&&(wt(t)||Mp(t)))}var Cit=Pit;function kit(t,e){return t!=null&&Cit(t,e,Tit)}var f3=kit,Rit=1,Lit=2;function Nit(t,e){return Fp(t)&&l3(e)?u3(Rs(t),e):function(n){var r=Mr(n,t);return r===void 0&&r===e?f3(n,t):Rp(e,r,Rit|Lit)}}var Iit=Nit;function jit(t){return t}var Ym=jit;function Dit(t){return function(e){return e==null?void 0:e[t]}}var Fit=Dit;function Bit(t){return function(e){return Qu(e,t)}}var zit=Bit;function Git(t){return Fp(t)?Fit(Rs(t)):zit(t)}var Wit=Git;function Hit(t){return typeof t=="function"?t:t==null?Ym:typeof t=="object"?wt(t)?Iit(t[0],t[1]):Eit(t):Wit(t)}var Vm=Hit;function Yit(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 Vit=Yit;function Xit(t){return t!==t}var $it=Xit;function Uit(t,e,n){for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}var qit=Uit;function Zit(t,e,n){return e===e?qit(t,e,n):Vit(t,$it,n)}var d3=Zit;function Kit(t,e){var n=t==null?0:t.length;return!!n&&d3(t,e,0)>-1}var Qit=Kit;function Jit(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 tat=Jit;function eat(){}var h3=eat,nat=1/0,rat=Ps&&1/_p(new Ps([,-0]))[1]==nat?function(t){return new Ps(t)}:h3,iat=rat,aat=200;function oat(t,e,n){var r=-1,i=Qit,a=t.length,o=!0,s=[],c=s;if(n)o=!1,i=tat;else if(a>=aat){var l=e?null:iat(t);if(l)return _p(l);o=!1,i=y1,c=new g1}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 sat=oat;function cat(t,e){return t&&t.length?sat(t,Vm(e,2)):[]}var Xm=cat;function lat(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 uat=lat;function fat(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 dat=fat,hat=dat(),pat=hat;function vat(t,e){return t&&pat(t,e,Fo)}var gat=vat;function yat(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 mat=yat,bat=mat(gat),p3=bat;function xat(t,e,n,r){return p3(t,function(i,a,o){e(r,i,n(i),o)}),r}var _at=xat;function Oat(t,e){return function(n,r){var i=wt(n)?uat:_at,a=e?e():{};return i(n,t,Vm(r,2),a)}}var wat=Oat,Sat=Object.prototype,Mat=Sat.hasOwnProperty,Eat=wat(function(t,e,n){Mat.call(t,n)?t[n].push(e):Lp(t,n,[e])}),v3=Eat,$m=32,g3=16,y3=48,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)},Aat=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},Tat=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?Xm(i,"x"):Xm(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})}),Xm(a,"text").length!==a.length&&(a=Object.values(v3(a,"text")).map(function(l){var u,f=l.reduce(function(d,h){return d+(n?h.x:h.y)},0);return Pu(Pu({},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=Aat(r,["layout","labelFormatter"]);n.forEach(function(s){var c=s.x,l=s.y,u=s.text,f=new Zi({style:Pu({x:c,y:l,text:zt(a)?a(u):u,fontSize:12,textBaseline:"middle",textAlign:"center",fill:"#000",wordWrap:!0,wordWrapWidth:i==="horizontal"?$m*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}(),Pat={ConversionTag:git,BidirectionalBarAxisText:Tat},Cat="[object Boolean]";function kat(t){return t===!0||t===!1||wi(t)&&rt(t)==Cat}var Um=kat,Cu=function(){return Cu=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},Cu.apply(this,arguments)},Rat=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},Lat=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","clip"],Nat=["data","type","children","direction"],Zm="__transform__",Iat="__skipDelCustomKeys__",_s=function(t,e){return Um(e)?{type:t,available:e}:Cu({type:t},e)},ku={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=Lat(["xField","yField","seriesField","colorField","keyField","positionField","meta","tooltip","animate"],Object.keys(ku.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}],jat=[{key:"transform",callback:function(t,e,n){var r;t[e]=t[e]||[];var i=n.available,a=i===void 0?!0:i,o=Rat(n,["available"]);a?t[e].push(Cu((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||wt(n)){t[e]=n||[];return}n.text||(n.text=t.yField),t[e]=t[e]||[],t[e].push(Cu((r={},r[Zm]=!0,r),n))}}],Dat=[{key:"conversionTag",shape:"ConversionTag"},{key:"axisText",shape:"BidirectionalBarAxisText"}];function Fat(t,e,n,r){if(!mt(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=mt(u)?u:Vu(e[i+1])?[]:{})}qu(s,c,l),s=s[c]}return t}var m3=Fat;function Bat(t,e,n){for(var r=-1,i=e.length,a={};++r<i;){var o=e[r],s=Qu(t,o);n(s,o)&&m3(a,ks(o,t),s)}return a}var zat=Bat;function Gat(t,e){return zat(t,e,function(n,r){return f3(t,r)})}var Wat=Gat,b3=X?X.isConcatSpreadable:void 0;function Hat(t){return wt(t)||Mp(t)||!!(b3&&t&&t[b3])}var Yat=Hat;function x3(t,e,n,r,i){var a=-1,o=t.length;for(n||(n=Yat),i||(i=[]);++a<o;){var s=t[a];e>0&&n(s)?e>1?x3(s,e-1,n,r,i):wp(i,s):r||(i[i.length]=s)}return i}var Vat=x3;function Xat(t){var e=t==null?0:t.length;return e?Vat(t,1):[]}var $at=Xat;function Uat(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 qat=Uat,_3=Math.max;function Zat(t,e,n){return e=_3(e===void 0?t.length-1:e,0),function(){for(var r=arguments,i=-1,a=_3(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),qat(t,this,s)}}var O3=Zat;function Kat(t){return function(){return t}}var Qat=Kat,Jat=Uu?function(t,e){return Uu(t,"toString",{configurable:!0,enumerable:!1,value:Qat(e),writable:!0})}:Ym,tot=Jat,eot=800,not=16,rot=Date.now;function iot(t){var e=0,n=0;return function(){var r=rot(),i=not-(r-n);if(n=r,i>0){if(++e>=eot)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var aot=iot,oot=aot(tot),w3=oot;function sot(t){return w3(O3(t,void 0,$at),t+"")}var Jm=sot,cot=Jm(function(t,e){return t==null?{}:Wat(t,e)}),ip=cot;function lot(t,e,n){return t==null?t:m3(t,e,n)}var Ge=lot,Ru=function(){return Ru=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},Ru.apply(this,arguments)},t1=["radius","innerRadius","startAngle","endAngle","focusX","focusY","distortionX","distortionY","visual"];function ap(t){var e=t.options,n=e.coordinate,r=n===void 0?{}:n;return Ge(t,["options","coordinate"],Ru(Ru(Ru({},r),ip(e,t1)),{outerRadius:Mr(e,"radius")})),t}var S3=function(){var t=[];return Qm.forEach(function(e){t.push(e.key)}),t},uot=function(){var t=[];Object.keys(ku).forEach(function(n){t.push.apply(t,Object.keys(ku[n]))});var e=S3();return t.push.apply(t,e),t},M3=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))},E3=function(t,e){var n,r=uot();return M3(M3([],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){Nat.includes(i)||delete t[i]}),t};function fot(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}var dot=fot;function hot(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 pot=hot;function vot(t,e){return e.length<2?t:Qu(t,pot(e,0,-1))}var got=vot;function yot(t,e){return e=ks(e,t),t=got(t,e),t==null||delete t[Rs(dot(e))]}var mot=yot,bot="[object Object]",xot=Function.prototype,_ot=Object.prototype,A3=xot.toString,Oot=_ot.hasOwnProperty,wot=A3.call(Object);function Sot(t){if(!wi(t)||rt(t)!=bot)return!1;var e=Ip(t);if(e===null)return!0;var n=Oot.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&A3.call(n)==wot}var T3=Sot;function Mot(t){return T3(t)?void 0:t}var Eot=Mot,Aot=1,Tot=2,Pot=4,Cot=Jm(function(t,e){var n={};if(t==null)return n;var r=!1;e=Ku(e,function(a){return a=ks(a,t),r||(r=a.length>1),a}),Cs(t,q1(t),n),r&&(n=ib(n,Aot|Tot|Pot,Eot));for(var i=e.length;i--;)mot(n,e[i]);return n}),e1=Cot,kot=function(t){return Object.keys(t).forEach(function(e){qm.includes(e)&&delete t[e]}),t},Rot=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)},P3="data-chart-source-type",n1=new Map,vn=function(t){Rot(e,t);function e(n,r){var i=t.call(this)||this;return i.container=typeof n=="string"?document.getElementById(n):n,i.options=et({},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({},ip(this.options,qm)),{container:this.container,autoFit:r})},e.prototype.getSpecOptions=function(){return this.type==="base"||this[Iat]?Ic(Ic({},this.options),this.getChartOptions()):E3(e1(this.options,qm),!0)},e.prototype.createG2=function(){if(!this.container)throw Error("The container is not initialized!");this.chart=new vit(this.getChartOptions()),this.container.setAttribute(P3,"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;Dat.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 Pat[a](n.chart,o))})},e.prototype.update=function(n){this.updateOption(n)},e.prototype.updateOption=function(n){this.options=et({},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(P3)},e.prototype.execAdaptor=function(){var n=this.getSchemaAdaptor();n({chart:this.chart,options:kot(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(wn.AFTER_CHANGE_SIZE,function(){n.annotations()})},e}(Hp),Lot=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)}}(),Not=function(t){Lot(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}(vn);function Iot(){}var r1=Iot;function op(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=void 0}op.prototype=Dp(r1.prototype),op.prototype.constructor=op;var Lu=op,jot=Wc&&new Wc,C3=jot,Dot=C3?function(t){return C3.get(t)}:h3,k3=Dot,Fot={},R3=Fot,Bot=Object.prototype,zot=Bot.hasOwnProperty;function Got(t){for(var e=t.name+"",n=R3[e],r=zot.call(R3,e)?n.length:0;r--;){var i=n[r],a=i.func;if(a==null||a==t)return i.name}return e}var sp=Got,Wot=4294967295;function cp(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Wot,this.__views__=[]}cp.prototype=Dp(r1.prototype),cp.prototype.constructor=cp;var i1=cp;function Hot(t){if(t instanceof i1)return t.clone();var e=new Lu(t.__wrapped__,t.__chain__);return e.__actions__=$1(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var Yot=Hot,Vot=Object.prototype,Xot=Vot.hasOwnProperty;function lp(t){if(wi(t)&&!wt(t)&&!(t instanceof i1)){if(t instanceof Lu)return t;if(Xot.call(t,"__wrapped__"))return Yot(t)}return new Lu(t)}lp.prototype=r1.prototype,lp.prototype.constructor=lp;var $ot=lp;function Uot(t){var e=sp(t),n=$ot[e];if(typeof n!="function"||!(e in i1.prototype))return!1;if(t===n)return!0;var r=k3(n);return!!r&&t===r[0]}var L3=Uot,qot="Expected a function",Zot=8,Kot=32,Qot=128,Jot=256;function tst(t){return Jm(function(e){var n=e.length,r=n,i=Lu.prototype.thru;for(t&&e.reverse();r--;){var a=e[r];if(typeof a!="function")throw new TypeError(qot);if(i&&!o&&sp(a)=="wrapper")var o=new Lu([],!0)}for(r=o?r:n;++r<n;){a=e[r];var s=sp(a),c=s=="wrapper"?k3(a):void 0;c&&L3(c[0])&&c[1]==(Qot|Zot|Kot|Jot)&&!c[4].length&&c[9]==1?o=o[sp(c[0])].apply(o,c[3]):o=a.length==1&&L3(a)?o[s]():o.thru(a)}return function(){var l=arguments,u=l[0];if(o&&l.length==1&&wt(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 est=tst,nst=est(),bn=nst,rst=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){wt(i[a])&&a!=="data"&&(i[a]=i[a].filter(function(o){return!o[Zm]}))})}),e},ist=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n},Mn=function(t){var e=rst(t),n=e.children,r=n===void 0?[]:n,i=function(f){var d=f.children,h=f.type,p=f.data,v=ist(f,["children","type","data"]);return e1(v,S3())},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=jat.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]=et({},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(et({},ip(f,v),{type:p},f[d]))):wt(f[d])&&f[d].forEach(function(g){r.push(u(g))})}})},u=function(f,d){return l(f),Object.keys(ku).forEach(function(h){var p=ku[h];Object.keys(p).forEach(function(v){if(f[v]){var g=o(p[v],f[v],f);c(f,h,g)}zt(d)&&d(p,h,v)})}),f};return r.forEach(function(f){var d=et({},a,f);u(et(f,d))}),l(e),E3(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 ast(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,Ge(e,[s,"stack"],a1({y1:"y"},typeof n=="object"?n:{})))}),o&&!Um(r)&&!r&&Ge(e,"tooltip",{title:i,items:[{channel:"y"}]}),t}function hr(t){return bn(ast)(t)}function ost(t){return bn(hr,Mn)(t)}var sst=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)}}(),cst=function(t){sst(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 ost},e}(vn),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)};function N3(t){var e=function(n){var r=n.options;Mr(r,"children.length")>1&&Ge(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&&wt(o)){var l="domainMax",u=o.map(function(f){var d;return Nu(Nu({},f),(d={},d[l]=c[c.length-1],d))});s.unshift(Nu({type:"interval",data:u,yField:l,tooltip:!1,legend:!1,style:{fill:"#eee"},label:!1},a))}return n};return bn(e,hr,Mn)(t)}var lst=function(){var t=function(e,n){return function(r){var i=e.fill,a=i===void 0?"#2888FF":i,o=e.stroke,s=e.fillOpacity,c=s===void 0?1:s,l=e.strokeOpacity,u=l===void 0?.2:l,f=e.pitch,d=f===void 0?8:f,h=r[0],p=r[1],v=r[2],g=r[3],y=(p[1]-h[1])/2,m=n.document,b=m.createElement("g",{}),_=m.createElement("polygon",{style:{points:[h,[h[0]-d,h[1]+y],[v[0]-d,h[1]+y],g],fill:a,fillOpacity:c,stroke:o,strokeOpacity:u,inset:30}}),O=m.createElement("polygon",{style:{points:[[h[0]-d,h[1]+y],p,v,[v[0]-d,h[1]+y]],fill:a,fillOpacity:c,stroke:o,strokeOpacity:u}}),w=m.createElement("polygon",{style:{points:[h,[h[0]-d,h[1]+y],p,[h[0]+d,h[1]+y]],fill:a,fillOpacity:c-.2}});return b.appendChild(_),b.appendChild(O),b.appendChild(w),b}};l_("shape.interval.bar25D",t)},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)}}();lst();var fst=function(t){ust(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type="Bar",n}return e.getDefaultOptions=function(){return{type:"view",coordinate:{transform:[{type:"transpose"}]},children:[{type:"interval"}],scale:{y:{nice:!0}},axis:{y:{title:!1},x:{title:!1}},interaction:{tooltip:{shared:!0},elementHighlightByColor:{background:!0}}}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return N3},e}(vn),dst=function(){var t=function(e,n){return function(r){var i=e.fill,a=i===void 0?"#2888FF":i,o=e.stroke,s=e.fillOpacity,c=s===void 0?1:s,l=e.strokeOpacity,u=l===void 0?.2:l,f=e.pitch,d=f===void 0?8:f,h=r[1][0]-r[0][0],p=h/2+r[0][0],v=n.document,g=v.createElement("g",{}),y=v.createElement("polygon",{style:{points:[[r[0][0],r[0][1]],[p,r[1][1]+d],[p,r[3][1]+d],[r[3][0],r[3][1]]],fill:a,fillOpacity:c,stroke:o,strokeOpacity:u,inset:30}}),m=v.createElement("polygon",{style:{points:[[p,r[1][1]+d],[r[1][0],r[1][1]],[r[2][0],r[2][1]],[p,r[2][1]+d]],fill:a,fillOpacity:c,stroke:o,strokeOpacity:u}}),b=v.createElement("polygon",{style:{points:[[r[0][0],r[0][1]],[p,r[1][1]-d],[r[1][0],r[1][1]],[p,r[1][1]+d]],fill:a,fillOpacity:c-.2}});return g.appendChild(m),g.appendChild(y),g.appendChild(b),g}};l_("shape.interval.column25D",t)},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)}}();dst();var 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:{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 N3},e}(vn);function vst(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");Ge(l,"scale.y.key",f);var d=l.annotations,h=d===void 0?[]:d;h.length>0&&(Ge(l,"scale.y.independent",!1),h.forEach(function(p){Ge(p,"scale.y.key",f)})),!c&&a.length>0&&Mr(l,"scale.y.independent")===void 0&&(c=!0,Ge(l,"scale.y.independent",!1),a.forEach(function(p){Ge(p,"scale.y.key",f)}))}),n};return bn(e,hr,Mn)(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)}}(),I3=function(t){gst(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 vst},e}(vn);function yst(t){var e=function(a){var o=a.options,s=o.xField,c=o.colorField;return c||Ge(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?Ge(o,"transform",[]):Ge(o,"transform",[{type:"symmetryY"}])),!f&&u&&Ge(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(v3(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&&(Ge(o,"type","spaceFlex"),Ge(o,"ratio",[1,1]),Ge(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||Ge(o,"tooltip",{title:!1,items:[function(u){return{name:u[c],value:u[l]}}]}),a};return bn(e,n,r,i,hr,Mn)(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)}}(),bst=function(t){mst(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 yst},e}(vn);function xst(t){return bn(hr,Mn)(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)}}(),Ost=function(t){_st(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 xst},e}(vn);function wst(t){return bn(ap,Mn)(t)}var Sst=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)}}(),Mst=function(t){Sst(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 wst},e}(vn);function Est(t){return bn(hr,Mn)(t)}var Ast=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)}}(),Tst=function(t){Ast(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 Est},e}(vn);function Pst(t){var e=function(n){return Ge(n,"options.coordinate",{type:Mr(n,"options.coordinateType","polar")}),n};return bn(e,ap,Mn)(t)}var 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)}}(),kst=function(t){Cst(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 Pst},e}(vn);function Rst(t,e){var n=-1,r=Do(t)?Array(t.length):[];return p3(t,function(i,a,o){r[++n]=e(i,a,o)}),r}var Lst=Rst;function Nst(t,e){var n=wt(t)?Ku:Lst;return n(t,Vm(e,3))}var jc=Nst,Va=function(){return Va=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},Va.apply(this,arguments)},Ist="__stock-range__",jst="trend",Dst="up",Fst="down";function Bst(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&&Va({},s);if(Array.isArray(o)&&c){var l=o[0],u=o[1],f=o[2],d=o[3];c[jst]=c[l]<=c[u]?Dst:Fst,c[Ist]=[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 Va(Va({},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:Va(Va({},h.encode||{}),{y:v?[f,d]:[l,u],color:function(g){return Math.sign(g[u]-g[l])}}),style:Va(Va({},h.style||{}),{lineWidth:v?1:10})})}),delete i.yField,r.options.legend={color:!1},s&&Ge(r,"options.scale.color.range[0]",s),c&&Ge(r,"options.scale.color.range[2]",c),r};return bn(e,n,Mn)(t)}var zst=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)}}(),Gst=["#26a69a","#999999","#ef5350"],Wst=function(t){zst(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:Gst},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 Bst},e}(vn);function Hst(t){return bn(hr,Mn)(t)}var Yst=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){Yst(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 Hst},e}(vn);function Xst(t){return bn(hr,Mn)(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)}}(),Ust=function(t){$st(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 Xst},e}(vn);function qst(t){return bn(hr,Mn)(t)}var Zst=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)}}(),Kst=function(t){Zst(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 qst},e}(vn),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 Qst(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,hr,Mn)(t)}var Jst=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)}}(),tct=function(t){Jst(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 Qst},e}(vn),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 ect(t){var e=function(r){var i=r.options,a=i.radius,o=a===void 0?.8:a;return Ge(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,hr,Mn)(t)}var nct=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)}}(),rct=function(t){nct(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 ect},e}(vn);function ict(t){return bn(ap,Mn)(t)}var act=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)}}(),oct=function(t){act(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 ict},e}(vn),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)},sct=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 cct(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=sct([],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,hr,Mn)(t)}var lct=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)}}(),uct=function(t){lct(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 cct},e}(vn),fct="[object Number]";function dct(t){return typeof t=="number"||wi(t)&&rt(t)==fct}var Fc=dct;function hct(t,e){return w3(O3(t,e,Ym),t+"")}var pct=hct;function vct(t,e,n){if(!mt(n))return!1;var r=typeof e;return(r=="number"?Do(n)&&Vu(e,n.length):r=="string"&&e in n)?Re(n[e],t):!1}var gct=vct;function yct(t){return pct(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&&gct(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 mct=yct,bct=Object.prototype,xct=bct.hasOwnProperty,_ct=mct(function(t,e){if(Xu(e)||Do(e)){Cs(e,Fo(e),t);return}for(var n in e)xct.call(e,n)&&qu(t,n,e[n])}),j3=_ct,Oct=/\s/;function wct(t){for(var e=t.length;e--&&Oct.test(t.charAt(e)););return e}var Sct=wct,Mct=/^\s+/;function Ect(t){return t&&t.slice(0,Sct(t)+1).replace(Mct,"")}var Act=Ect,D3=0/0,Tct=/^[-+]0x[0-9a-f]+$/i,Pct=/^0b[01]+$/i,Cct=/^0o[0-7]+$/i,kct=parseInt;function Rct(t){if(typeof t=="number")return t;if(Yc(t))return D3;if(mt(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=mt(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=Act(t);var n=Pct.test(t);return n||Cct.test(t)?kct(t.slice(2),n?2:8):Tct.test(t)?D3:+t}var F3=Rct,B3=1/0,Lct=17976931348623157e292;function Nct(t){if(!t)return t===0?t:0;if(t=F3(t),t===B3||t===-B3){var e=t<0?-1:1;return e*Lct}return t===t?t:0}var Ict=Nct;function jct(t){var e=Ict(t),n=e%1;return e===e?n?e-n:e:0}var z3=jct,Dct=It.isFinite,Fct=Math.min;function Bct(t){var e=Math[t];return function(n,r){if(n=F3(n),r=r==null?0:Fct(z3(r),292),r&&Dct(n)){var i=(Gp(n)+"e").split("e"),a=e(i[0]+"e"+(+i[1]+r));return i=(Gp(a)+"e").split("e"),+(i[0]+"e"+(+i[1]-r))}return e(n)}}var zct=Bct,Gct=zct("ceil"),Wct=Gct,Hct=0/0;function Yct(t){return typeof t=="number"?t:Yc(t)?Hct:+t}var G3=Yct;function Vct(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=zp(n),r=zp(r)):(n=G3(n),r=G3(r)),i=t(n,r)}return i}}var Xct=Vct,$ct=Xct(function(t,e){return t/e},1),Uct=$ct;function qct(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 Fc(o)?(j3(u,{thresholds:Wct(Uct(i.length,o)),y:l}),n):(Fc(a)&&j3(u,{thresholds:a,y:l}),n)};return bn(e,hr,Mn)(t)}var Zct=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)}}(),Kct=function(t){Zct(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 qct},e}(vn);function Qct(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,hr,Mn)(t)}var Jct=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){Jct(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 Qct},e}(vn);function elt(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,hr,Mn)(t)}var nlt=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)}}(),rlt=function(t){nlt(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 elt},e}(vn);function ilt(t){return bn(hr,Mn)(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)}}(),olt=function(t){alt(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 ilt},e}(vn);function slt(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 clt(t){return t==null}var llt=clt,ult="[object String]";function flt(t){return typeof t=="string"||!wt(t)&&wi(t)&&rt(t)==ult}var W3=flt;function dlt(t,e){return Ku(e,function(n){return t[n]})}var hlt=dlt;function plt(t){return t==null?[]:hlt(t,Fo(t))}var vlt=plt,glt=Math.max;function ylt(t,e,n,r){t=Do(t)?t:vlt(t),n=n&&!r?z3(n):0;var i=t.length;return n<0&&(n=glt(i+n,0)),W3(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&d3(t,e,n)>-1}var mlt=ylt,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)},up=["#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(llt(u))return[];if(W3(u)){var f=Number(u);return isNaN(f)?[]:(c={},c[n]=s[n],c[e]=f,c)}return wt(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 wt(e)?e[r%e.length]:e})}function blt(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],up[0]),C=Mr(o,[u],up[1]),j=Mr(o,[d],up[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],F=[c,u,d][R];return na(na({},k),{data:D,encode:na(na({},k.encode||{}),{x:p,y:F,color:function(B){var z=B.index,Y=Fc(z)?"".concat(F,"_").concat(z):F;return v?Mr(v,[F,z],Y):Y}}),style:na(na({},k.style||{}),{zIndex:function(B){return-B[F]}}),labels:R!==0?jc(k.labels,function(B){return na(na({},B),{text:F})}):void 0})}),i.options.scale.color.range=N,i.options.legend.color.itemMarker=function(k){return v&&mlt(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"&&Ge(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 et(d[p],h)}),i};return bn(e,n,r,slt,Mn)(t)}var xlt=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)}}(),_lt=function(t){xlt(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:up}},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 blt},e}(vn);function Olt(t){var e=function(n){var r=n.options.data;return n.options.data={value:r},n};return bn(e,hr,Mn)(t)}var wlt=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)}}(),Slt=function(t){wlt(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 Olt},e}(vn);function Mlt(t){var e=function(n){var r=n.options.percent;return Fc(r)&&Ge(n,"options.data",r),n};return bn(e,hr,Mn)(t)}var Elt=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)}}(),Alt=function(t){Elt(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 Mlt},e}(vn);function Tlt(t){return bn(hr,Mn)(t)}var Plt=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)}}(),Clt=function(t){Plt(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 Tlt},e}(vn);function klt(t){var e=function(n){var r=n.options,i=r.data;return i&&Ge(r,"data",{value:i}),n};return bn(e,hr,Mn)(t)}var Rlt=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)}}(),Llt=function(t){Rlt(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 klt},e}(vn),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 Nlt(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=Fc(o)?o/(2*Math.PI)*360:-90,d=Fc(s)?(Number(s)+f)/180*Math.PI:Math.PI;return Ge(i,["options","coordinate"],Po(Po(Po({},c),ip(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||Ge(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,hr,Mn)(t)}var Ilt=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)}}(),jlt=function(t){Ilt(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 Nlt},e}(vn);function Dlt(t){return bn(Mn)(t)}var Flt=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){Flt(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 Dlt},e}(vn),fp=function(){return fp=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},fp.apply(this,arguments)};function zlt(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 fp(fp({},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 Ge(r,"children",c),r.violinType==="polar"&&Ge(r,"coordinate",{type:"polar"}),Ge(r,"violinType",void 0),n};return bn(e,hr,Mn)(t)}var Glt=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)}}(),Wlt=function(t){Glt(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 zlt},e}(vn),Iu=function(){return Iu=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},Iu.apply(this,arguments)},Hlt=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 Ylt(t){var e=function(a){var o=a.options,s=o.yField,c=o.children;return c.forEach(function(l,u){Ge(l,"yField",s[u])}),a},n=function(a){var o=a.options,s=o.yField,c=o.children,l=o.data;if(T3(l))return a;var u=wt(Mr(l,[0]))?l:[l,l];return c.forEach(function(f,d){Ge(f,"data",Hlt([],u[d].map(function(h){return Iu({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||Ge(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?y3:u,d=o.paddingLeft,h=d===void 0?y3:d,p=o.axis;Ge(o,"axisText",Iu(Iu({},(p==null?void 0:p.x)||{}),{layout:c}));var v=s[0],g=s[1];if(c==="vertical")Ge(o,"direction","col"),Ge(o,"paddingLeft",h),Ge(o,"coordinate.transform",l.filter(function(O){return O.type!=="transpose"})),Ge(v,"paddingBottom",g3),Ge(g,"paddingTop",g3),Ge(g,"axis",{x:{position:"top"}}),Ge(g,"scale",{y:{range:[0,1]}});else{Ge(o,"paddingBottom",f),Ge(v,"scale",{y:{range:[0,1]}});var y=v.paddingRight,m=y===void 0?$m:y,b=g.paddingLeft,_=b===void 0?$m:b;Ge(v,"paddingRight",m),Ge(v,"axis",{x:{position:"right"}}),Ge(g,"paddingLeft",_)}return a};return bn(e,n,r,i,hr,Mn)(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="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 Ylt},e}(vn),Os;(function(t){t.color="key",t.d="path"})(Os||(Os={}));function $lt(t){var e=function(n){var r=n.options,i=r.data,a=r.setsField,o=r.sizeField;return wt(i)&&(Ge(r,"data",{type:"inline",value:i,transform:[{type:"venn",sets:a,size:o,as:[Os.color,Os.d]}]}),Ge(r,"colorField",a),Ge(r,["children","0","encode","d"],Os.d)),Ge(n,"options",e1(r,["sizeField","setsField"])),n};return bn(e,Mn)(t)}var Ult=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)}}(),qlt=function(t){Ult(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 $lt},e}(vn);function Zlt(t){var e=function(n){return n};return bn(e,ap,Mn)(t)}var Klt=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)}}(),Qlt=function(t){Klt(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 Zlt},e}(vn),Jlt={Base:Not,Line:Ost,Column:pst,Pie:Mst,Area:cst,Bar:fst,DualAxes:I3,Funnel:bst,Scatter:Tst,Radar:kst,Rose:oct,Stock:Wst,TinyLine:Vst,TinyArea:Ust,TinyColumn:Kst,TinyProgress:tct,TinyRing:rct,Waterfall:uct,Histogram:Kct,Heatmap:tlt,Box:rlt,Sankey:olt,Bullet:_lt,Gauge:Slt,Liquid:Alt,WordCloud:Clt,Treemap:Llt,RadialBar:jlt,CirclePacking:Blt,Violin:Wlt,BidirectionalBar:Xlt,Venn:qlt,Mix:I3,Sunburst:Qlt},H3=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},tut=(0,te.forwardRef)(function(t,e){var n=t.chartType,r=n===void 0?"Base":n,i=H3(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=H3(i,["containerStyle","className","loading","loadingTemplate","errorTemplate"]),d=zI(Jlt[r],f),h=d.chart,p=d.container;return(0,te.useImperativeHandle)(e,function(){return h.current}),te.createElement(un,{errorTemplate:u},c&&te.createElement(Dn,{loadingTemplate:l}),te.createElement("div",{className:s,style:o,ref:p}))})},38628:function(Ye,Ve){(function(yt,kt){kt(Ve)})(this,function(yt){"use strict";function kt(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 Rt(L,I){var G=typeof Symbol=="function"&&L[Symbol.iterator];if(!G)return L;var V,nt,at=G.call(L),U=[];try{for(;(I===void 0||0<I--)&&!(V=at.next()).done;)U.push(V.value)}catch(Z){nt={error:Z}}finally{try{V&&!V.done&&(G=at.return)&&G.call(at)}finally{if(nt)throw nt.error}}return U}function be(L,I,G){if(G||arguments.length===2)for(var V,nt=0,at=I.length;nt<at;nt++)!V&&nt in I||((V=V||Array.prototype.slice.call(I,0,nt))[nt]=I[nt]);return L.concat(V||Array.prototype.slice.call(I))}function We(L){return ge(L,"Function")}var te={}.toString,ge=function(L,I){return te.call(L)==="[object "+I+"]"},re=function(L){return Array.isArray?Array.isArray(L):ge(L,"Array")},Gt=function(L){if(typeof(I=L)!="object"||I===null||!ge(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},dt=function(L){return ge(L,"Number")},pe=Object.values?function(L){return Object.values(L)}:function(L){var I,G=[],V=L,nt=function(ft,pt){We(L)&&pt==="prototype"||G.push(ft)};if(V){if(re(V))for(var at=0,U=V.length;at<U&&nt(V[at],at)!==!1;at++);else if(I=typeof V,V!==null&&I=="object"||I=="function"){for(var Z in V)if(V.hasOwnProperty(Z)&&nt(V[Z],Z)===!1)break}}return G},Zt=5;function ue(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 nt(at,U,Z,ft){for(var pt in Z=Z||0,ft=ft||Zt,U){var Qt;U.hasOwnProperty(pt)&&((Qt=U[pt])!==null&&Gt(Qt)?(Gt(at[pt])||(at[pt]={}),Z<ft?nt(at[pt],Qt,Z+1,ft):at[pt]=U[pt]):re(Qt)?(at[pt]=[],at[pt]=at[pt].concat(Qt)):Qt!==void 0&&(at[pt]=Qt))}})(L,I[V]);return L}function ie(L){return L}(function(L,I){var G;if(We(L))return(G=function(){for(var V=[],nt=0;nt<arguments.length;nt++)V[nt]=arguments[nt];var at,U=I?I.apply(this,V):V[0],Z=G.cache;return Z.has(U)?Z.get(U):(at=L.apply(this,V),Z.set(U,at),at)}).cache=new Map;throw new TypeError("Expected a function")})(function(L,U){var G=(U=U===void 0?{}:U).fontSize,V=U.fontFamily,nt=U.fontWeight,at=U.fontStyle,U=U.fontVariant;return(jt=jt||document.createElement("canvas").getContext("2d")).font=[at,U,nt,G+"px",V].join(" "),jt.measureText(ge(L,"String")?L:"").width},function(L,I){return function(){for(var G=0,V=0,nt=arguments.length;V<nt;V++)G+=arguments[V].length;for(var at=Array(G),U=0,V=0;V<nt;V++)for(var Z=arguments[V],ft=0,pt=Z.length;ft<pt;ft++,U++)at[U]=Z[ft];return at}([L],pe(I=I===void 0?{}:I)).join("")});var jt,Lt=typeof Float32Array!="undefined"?Float32Array:Array;function Tt(){var L=new Lt(9);return Lt!=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 Dt=function(L,ee,ve){var V=ee[0],nt=ee[1],at=ee[2],U=ee[3],Z=ee[4],ft=ee[5],pt=ee[6],Qt=ee[7],ee=ee[8],me=ve[0],Jt=ve[1],de=ve[2],he=ve[3],Ht=ve[4],Pe=ve[5],xe=ve[6],Ce=ve[7],ve=ve[8];return L[0]=me*V+Jt*U+de*pt,L[1]=me*nt+Jt*Z+de*Qt,L[2]=me*at+Jt*ft+de*ee,L[3]=he*V+Ht*U+Pe*pt,L[4]=he*nt+Ht*Z+Pe*Qt,L[5]=he*at+Ht*ft+Pe*ee,L[6]=xe*V+Ce*U+ve*pt,L[7]=xe*nt+Ce*Z+ve*Qt,L[8]=xe*at+Ce*ft+ve*ee,L};function Se(){var L=new Lt(16);return Lt!=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 ke=function(L,xe,G){var V=xe[0],nt=xe[1],at=xe[2],U=xe[3],Z=xe[4],ft=xe[5],pt=xe[6],Qt=xe[7],ee=xe[8],me=xe[9],Jt=xe[10],de=xe[11],he=xe[12],Ht=xe[13],Pe=xe[14],xe=xe[15],Ce=G[0],ve=G[1],Te=G[2],tn=G[3];return L[0]=Ce*V+ve*Z+Te*ee+tn*he,L[1]=Ce*nt+ve*ft+Te*me+tn*Ht,L[2]=Ce*at+ve*pt+Te*Jt+tn*Pe,L[3]=Ce*U+ve*Qt+Te*de+tn*xe,Ce=G[4],ve=G[5],Te=G[6],tn=G[7],L[4]=Ce*V+ve*Z+Te*ee+tn*he,L[5]=Ce*nt+ve*ft+Te*me+tn*Ht,L[6]=Ce*at+ve*pt+Te*Jt+tn*Pe,L[7]=Ce*U+ve*Qt+Te*de+tn*xe,Ce=G[8],ve=G[9],Te=G[10],tn=G[11],L[8]=Ce*V+ve*Z+Te*ee+tn*he,L[9]=Ce*nt+ve*ft+Te*me+tn*Ht,L[10]=Ce*at+ve*pt+Te*Jt+tn*Pe,L[11]=Ce*U+ve*Qt+Te*de+tn*xe,Ce=G[12],ve=G[13],Te=G[14],tn=G[15],L[12]=Ce*V+ve*Z+Te*ee+tn*he,L[13]=Ce*nt+ve*ft+Te*me+tn*Ht,L[14]=Ce*at+ve*pt+Te*Jt+tn*Pe,L[15]=Ce*U+ve*Qt+Te*de+tn*xe,L};function Qe(L){for(var I=[],G=1;G<arguments.length;G++)I[G-1]=arguments[G];return L?I.reduce(function(V,nt){return function(at){return nt(V(at))}},L):ie}function Xe(L){return L instanceof Float32Array||L instanceof Array}function qe(L,I,G){for(;L<I;)L+=2*Math.PI;for(;G<L;)L-=2*Math.PI;return L}Ae=new Lt(3),Lt!=Float32Array&&(Ae[0]=0,Ae[1]=0,Ae[2]=0),Ae=new Lt(4),Lt!=Float32Array&&(Ae[0]=0,Ae[1]=0,Ae[2]=0,Ae[3]=0);function ln(U,I,G,V,nt){var at=(U=Rt(U,2))[0],U=U[1],Z=Tt();return at=[at,U],(U=Z)[0]=1,U[1]=0,U[2]=0,U[3]=0,U[4]=1,U[5]=0,U[6]=at[0],U[7]=at[1],U[8]=1,U}function $e(L,...I){return I.reduce((G,V)=>nt=>G(V(nt)),L)}function Be(L,I){return I-L?G=>(G-L)/(I-L):G=>.5}const cn=Math.sqrt(50),_e=Math.sqrt(10),Me=Math.sqrt(2);function gn(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>=cn?10:G>=_e?5:G>=Me?2:1)*wr(10,L):-wr(10,-L)/(G>=cn?10:G>=_e?5:G>=Me?2:1)}const Dn=(L,I,G=5)=>{L=[L,I];let V=0,nt=L.length-1,at=L[V],U=L[nt],Z;return U<at&&([at,U]=[U,at],[V,nt]=[nt,V]),0<(Z=gn(at,U,G))?(at=Math.floor(at/Z)*Z,U=Math.ceil(U/Z)*Z,Z=gn(at,U,G)):Z<0&&(at=Math.ceil(at*Z)/Z,U=Math.floor(U*Z)/Z,Z=gn(at,U,G)),0<Z?(L[V]=Math.floor(at/Z)*Z,L[nt]=Math.ceil(U/Z)*Z):Z<0&&(L[V]=Math.ceil(at*Z)/Z,L[nt]=Math.floor(U*Z)/Z),L};function Qn(L){return L!=null&&!Number.isNaN(L)}function un(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,nt){var at,{domain:Z,interpolator:U,round:ft}=this.getOptions(),Z=I(Z.map(V)),ft=ft?(at=U,pt=>(pt=at(pt),dt(pt)?Math.round(pt):pt)):U;this.output=$e(ft,Z,nt,V)},G.prototype.invert=void 0}}var yn,Ae={exports:{}},Je={exports:{}},vt=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"))},Yt=Array.prototype.concat,et=Array.prototype.slice,lt=Je.exports=function(L){for(var I=[],G=0,V=L.length;G<V;G++){var nt=L[G];vt(nt)?I=Yt.call(I,et.call(nt)):I.push(nt)}return I},_t=(lt.wrap=function(L){return function(){return L(lt(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]}),Ot=Je.exports,$t=Object.hasOwnProperty,It=Object.create(null);for(yn in _t)$t.call(_t,yn)&&(It[_t[yn]]=yn);var ae=Ae.exports={to:{},get:{}};function X(L,I,G){return Math.min(Math.max(I,L),G)}function ct(L){return L=Math.round(L).toString(16).toUpperCase(),L.length<2?"0"+L:L}ae.get=function(L){var I,G;switch(L.substring(0,3).toLowerCase()){case"hsl":I=ae.get.hsl(L),G="hsl";break;case"hwb":I=ae.get.hwb(L),G="hwb";break;default:I=ae.get.rgb(L),G="rgb"}return I?{model:G,value:I}:null},ae.get.rgb=function(L){if(!L)return null;var I,G,V,nt=[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 at=2*G;nt[G]=parseInt(I.slice(at,2+at),16)}V&&(nt[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++)nt[G]=parseInt(I[G]+I[G],16);V&&(nt[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++)nt[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]:$t.call(_t,I[1])?((nt=_t[I[1]])[3]=1,nt):null:null;for(G=0;G<3;G++)nt[G]=Math.round(2.55*parseFloat(I[G+1]))}I[4]&&(I[5]?nt[3]=.01*parseFloat(I[4]):nt[3]=parseFloat(I[4]))}for(G=0;G<3;G++)nt[G]=X(nt[G],0,255);return nt[3]=X(nt[3],0,1),nt},ae.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,X(parseFloat(L[2]),0,100),X(parseFloat(L[3]),0,100),X(isNaN(I)?1:I,0,1)]):null},ae.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,X(parseFloat(L[2]),0,100),X(parseFloat(L[3]),0,100),X(isNaN(I)?1:I,0,1)]):null},ae.to.hex=function(){var L=Ot(arguments);return"#"+ct(L[0])+ct(L[1])+ct(L[2])+(L[3]<1?ct(Math.round(255*L[3])):"")},ae.to.rgb=function(){var L=Ot(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]+")"},ae.to.rgb.percent=function(){var L=Ot(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]+")"},ae.to.hsl=function(){var L=Ot(arguments);return L.length<4||L[3]===1?"hsl("+L[0]+", "+L[1]+"%, "+L[2]+"%)":"hsla("+L[0]+", "+L[1]+"%, "+L[2]+"%, "+L[3]+")"},ae.to.hwb=function(){var L=Ot(arguments),I="";return 4<=L.length&&L[3]!==1&&(I=", "+L[3]),"hwb("+L[0]+", "+L[1]+"%, "+L[2]+"%"+I+")"},ae.to.keyword=function(L){return It[L.slice(0,3)]};var ht=Ae.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 Q(nt){var I,G,V,nt=ht.get(nt);return nt?({model:nt,value:I}=nt,nt==="rgb"?I:nt==="hsl"?(I=(nt=I)[0]/360,G=nt[1]/100,V=nt[2]/100,nt=nt[3],G==0?[255*V,255*V,255*V,nt]:[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),nt]):null):null}const st=(L,I)=>G=>L*(1-G)+I*G,xt=(L,I)=>{if(typeof L=="number"&&typeof I=="number")return st(L,I);if(typeof L!="string"||typeof I!="string")return()=>L;{var G=L,V=I;const nt=Q(G),at=Q(V);return nt===null||at===null?nt?()=>G:()=>V:U=>{var Z=new Array(4);for(let de=0;de<4;de+=1){var ft=nt[de],pt=at[de];Z[de]=ft*(1-U)+pt*U}var[Qt,ee,me,Jt]=Z;return`rgba(${Math.round(Qt)}, ${Math.round(ee)}, ${Math.round(me)}, ${Jt})`}}},H=(L,I)=>{const G=st(L,I);return V=>Math.round(G(V))};function K({map:L,initKey:I},G){return I=I(G),L.has(I)?L.get(I):G}function ut(L){return typeof L=="object"?L.valueOf():L}class x extends Map{constructor(I){if(super(),this.map=new Map,this.initKey=ut,I!==null)for(var[G,V]of I)this.set(G,V)}get(I){return super.get(K({map:this.map,initKey:this.initKey},I))}has(I){return super.has(K({map:this.map,initKey:this.initKey},I))}set(I,G){return super.set(([{map:I,initKey:V},nt]=[{map:this.map,initKey:this.initKey},I],V=V(nt),I.has(V)?I.get(V):(I.set(V,nt),nt)),G);var V,nt}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=ue({},this.getDefaultOptions()),this.update(I)}getOptions(){return this.options}update(I={}){this.options=ue({},this.options,I),this.rescale(I)}rescale(I){}}const W=Symbol("defaultUnknown");function q(L,I,G){for(let V=0;V<I.length;V+=1)L.has(I[V])||L.set(G(I[V]),V)}function J(I){var{value:I,from:G,to:V,mapper:nt,notFoundReturn:at}=I;let U=nt.get(I);if(U===void 0){if(at!==W)return at;U=G.push(I)-1,nt.set(I,U)}return V[U%V.length]}function rt(L){return L instanceof Date?I=>""+I:typeof L=="object"?I=>JSON.stringify(I):I=>I}class gt extends T{getDefaultOptions(){return{domain:[],range:[],unknown:W}}constructor(I){super(I)}map(I){return this.domainIndexMap.size===0&&q(this.domainIndexMap,this.getDomain(),this.domainKey),J({value:this.domainKey(I),mapper:this.domainIndexMap,from:this.getDomain(),to:this.getRange(),notFoundReturn:this.options.unknown})}invert(I){return this.rangeIndexMap.size===0&&q(this.rangeIndexMap,this.getRange(),this.rangeKey),J({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=rt(G),this.rangeKey=rt(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 gt(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 mt(Ht){const{domain:I,range:G,paddingOuter:V,paddingInner:nt,flex:at,round:U,align:Z}=Ht;var ft=I.length,Jt=0<(Jt=(Ht=ft)-(pt=at).length)?[...pt,...new Array(Jt).fill(1)]:Jt<0?pt.slice(0,Ht):pt,[Ht,pt]=G,pt=pt-Ht,he=pt/(2/ft*V+1-1/ft*nt);const Qt=he*nt/ft;he-=ft*Qt;const ee=function(ve){const Te=Math.min(...ve);return ve.map(tn=>tn/Te)}(Jt),me=he/ee.reduce((ve,Te)=>ve+Te);var Jt=new x(I.map((ve,Te)=>(Te=ee[Te]*me,[ve,U?Math.floor(Te):Te]))),de=new x(I.map((ve,Te)=>(Te=ee[Te]*me+Qt,[ve,U?Math.floor(Te):Te]))),he=Array.from(de.values()).reduce((ve,Te)=>ve+Te),Ht=Ht+(pt-(he-he/ft*nt))*Z;let Pe=U?Math.round(Ht):Ht;var xe=new Array(ft);for(let ve=0;ve<ft;ve+=1){xe[ve]=(Ce=Pe,Math.round(1e12*Ce)/1e12);var Ce=I[ve];Pe+=de.get(Ce)}return{valueBandWidth:Jt,valueStep:de,adjustedRange:xe}}class At extends gt{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 At(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:nt,round:at,flex:G}=this.options,{adjustedRange:V,valueBandWidth:nt,valueStep:at}=function(pt){var Z=pt.domain;if((Z=Z.length)===0)return{valueBandWidth:void 0,valueStep:void 0,adjustedRange:[]};if(!((ft=pt.flex)==null||!ft.length))return mt(pt);var{range:ft,paddingOuter:pt,paddingInner:Qt,round:ee,align:me}=pt;let Jt,de,he=ft[0];return ft=ft[1]-he,Jt=ft/Math.max(1,2*pt+(Z-Qt)),ee&&(Jt=Math.floor(Jt)),he+=(ft-Jt*(Z-Qt))*me,de=Jt*(1-Qt),ee&&(he=Math.round(he),de=Math.round(de)),pt=new Array(Z).fill(0).map((Ht,Pe)=>he+Pe*Jt),{valueStep:Jt,valueBandWidth:de,adjustedRange:pt}}({align:V,range:nt,round:at,flex:G,paddingInner:this.getPaddingInner(),paddingOuter:this.getPaddingOuter(),domain:I});this.valueStep=at,this.valueBandWidth=nt,this.adjustedRange=V}}const Mt=(L,I,G)=>{let V,nt,at=L,U=I;if(at===U&&0<G)return[at];let Z=gn(at,U,G);if(Z===0||!Number.isFinite(Z))return[];if(0<Z){at=Math.ceil(at/Z),U=Math.floor(U/Z),nt=new Array(V=Math.ceil(U-at+1));for(let ft=0;ft<V;ft+=1)nt[ft]=(at+ft)*Z}else{Z=-Z,at=Math.ceil(at*Z),U=Math.floor(U*Z),nt=new Array(V=Math.ceil(U-at+1));for(let ft=0;ft<V;ft+=1)nt[ft]=(at+ft)/Z}return nt},Bt=(V,at,G)=>{var[V,nt]=V,[at,U]=at;let Z,ft;return $e(ft=V<nt?(Z=Be(V,nt),G(at,U)):(Z=Be(nt,V),G(U,at)),Z)},Wt=(L,I,G)=>{const V=Math.min(L.length,I.length)-1,nt=new Array(V),at=new Array(V);var U=L[0]>L[V],Z=U?[...L].reverse():L,ft=U?[...I].reverse():I;for(let pt=0;pt<V;pt+=1)nt[pt]=Be(Z[pt],Z[pt+1]),at[pt]=G(ft[pt],ft[pt+1]);return pt=>{var Qt=function(me,Jt,de,he,Ht){let Pe=de||0,xe=he||me.length;for(var Ce=Ht||(Te=>Te);Pe<xe;){var ve=Math.floor((Pe+xe)/2);Ce(me[ve])>Jt?xe=ve:Pe=ve+1}return Pe}(L,pt,1,V)-1,ee=nt[Qt];return $e(at[Qt],ee)(pt)}},Vt=(L,I,G,V)=>(2<Math.min(L.length,I.length)?Wt:Bt)(L,I,V?H:G);class zt extends T{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:st,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,nt;this.options.nice&&([I,G,V,...nt]=this.getTickMethodOptions(),this.options.domain=this.chooseNice()(I,G,V,...nt))}getTicks(){var I=this.options.tickMethod,[G,V,nt,...at]=this.getTickMethodOptions();return I(G,V,nt,...at)}getTickMethodOptions(){var{domain:I,tickCount:G}=this.options;return[I[0],I[I.length-1],G]}chooseNice(){return Dn}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:nt}=this.options,V=this.options.domain.map(V),nt=Math.min(V.length,nt.length);if(G){G=V[0],V=V[nt-1];const at=V<G?V:G,U=V<G?G:V;return Z=>Math.min(Math.max(at,Z),U)}return ie}composeOutput(I,G){var{domain:U,range:V,round:nt,interpolate:at}=this.options,U=Vt(U.map(I),V,at,nt);this.output=$e(U,G,I)}composeInput(I,G,V){var{domain:nt,range:at}=this.options,at=Vt(at,nt.map(I),st);this.input=$e(G,V,at)}}class Kt extends zt{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:xt,tickMethod:Mt,tickCount:5}}chooseTransforms(){return[ie,ie]}clone(){return new Kt(this.options)}}class fe extends At{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 fe(this.options)}update(I){super.update(I)}getPaddingOuter(){return this.options.padding}}function wt(L,I){for(var G=[],V=0,nt=L.length;V<nt;V++)G.push(L[V].substr(0,I));return G}var we,Je=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Ae=["January","February","March","April","May","June","July","August","September","October","November","December"],Re=wt(Ae,3);(function(L){for(var I=[],G=1;G<arguments.length;G++)I[G-1]=arguments[G];for(var V=0,nt=I;V<nt.length;V++){var at,U=nt[V];for(at in U)L[at]=U[at]}})({},{dayNamesShort:wt(Je,3),dayNames:Je,monthNamesShort:Re,monthNames:Ae,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 Ie;let Le=we=class extends Kt{getDefaultOptions(){return{domain:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:ie,tickMethod:Mt,tickCount:5}}constructor(L){super(L)}clone(){return new we(this.options)}};Le=we=function(L,I,G,V){var nt,at=arguments.length,U=at<3?I:V===null?V=Object.getOwnPropertyDescriptor(I,G):V;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")U=Reflect.decorate(L,I,G,V);else for(var Z=L.length-1;0<=Z;Z--)(nt=L[Z])&&(U=(at<3?nt(U):3<at?nt(I,G,U):nt(I,G))||U);return 3<at&&U&&Object.defineProperty(I,G,U),U}([un(function(L){return[L(0),L(1)]},I=>{var[I,G]=I;return $e(st(0,1),Be(I,G))})],Le);let Vn=Ie=class extends Kt{getDefaultOptions(){return{domain:[0,.5,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:ie,tickMethod:Mt,tickCount:5}}constructor(L){super(L)}clone(){return new Ie(this.options)}};Vn=Ie=function(L,I,G,V){var nt,at=arguments.length,U=at<3?I:V===null?V=Object.getOwnPropertyDescriptor(I,G):V;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")U=Reflect.decorate(L,I,G,V);else for(var Z=L.length-1;0<=Z;Z--)(nt=L[Z])&&(U=(at<3?nt(U):3<at?nt(I,G,U):nt(I,G))||U);return 3<at&&U&&Object.defineProperty(I,G,U),U}([un(function(L){return[L(0),L(.5),L(1)]},L=>{const[I,G,V]=L,nt=$e(st(0,.5),Be(I,G)),at=$e(st(.5,1),Be(G,V));return U=>(I>V?U<G?at:nt:U<G?nt:at)(U)})],Vn);function Xn(L,I,G,V,nt){var at=new Kt({range:[I,I+V]}),U=new Kt({range:[G,G+nt]});return{transform:function(pt){var pt=Rt(pt,2),ft=pt[0],pt=pt[1];return[at.map(ft),U.map(pt)]},untransform:function(pt){var pt=Rt(pt,2),ft=pt[0],pt=pt[1];return[at.invert(ft),U.invert(pt)]}}}function $n(L,I,G,V,nt){return(0,Rt(L,1)[0])(I,G,V,nt)}function Un(L,I,G,V,nt){return Rt(L,1)[0]}function ar(ft,I,G,V,nt){var at=(ft=Rt(ft,4))[0],U=ft[1],Z=ft[2],ft=ft[3],pt=new Kt({range:[Z,ft]}),Qt=new Kt({range:[at,U]}),ee=1<(Z=nt/V)?1:Z,me=1<Z?1/Z:1;return{transform:function(he){var he=Rt(he,2),de=he[0],he=he[1],de=Qt.map(de),he=pt.map(he);return[.5*(he*Math.cos(de)*ee)+.5,.5*(he*Math.sin(de)*me)+.5]},untransform:function(Ht){var Ht=Rt(Ht,2),de=Ht[0],Ht=Ht[1],de=2*(de-.5)/ee,Ht=2*(Ht-.5)/me,he=Math.sqrt(Math.pow(de,2)+Math.pow(Ht,2)),Ht=qe(Math.atan2(Ht,de),at,U);return[Qt.invert(Ht),pt.invert(he)]}}}function or(L,I,G,V,nt){return{transform:function(U){var U=Rt(U,2),Z=U[0];return[U[1],Z]},untransform:function(U){var U=Rt(U,2),Z=U[0];return[U[1],Z]}}}function mr(L){for(var I=[],G=1;G<arguments.length;G++)I[G-1]=arguments[G];return Ma.apply(void 0,be([[-1,-1]],Rt(I),!1))}function fn(L){for(var I=[],G=1;G<arguments.length;G++)I[G-1]=arguments[G];return Ma.apply(void 0,be([[-1,1]],Rt(I),!1))}function Qr(L){for(var I=[],G=1;G<arguments.length;G++)I[G-1]=arguments[G];return Ma.apply(void 0,be([[1,-1]],Rt(I),!1))}function wa(U,I,G,V,nt){var at,U=Rt(U,1)[0],Z=Tt();return Z=Z,U=U,at=Math.sin(U),U=Math.cos(U),Z[0]=U,Z[1]=at,Z[2]=0,Z[3]=-at,Z[4]=U,Z[5]=0,Z[6]=0,Z[7]=0,Z[8]=1,Z}function ci(L,I,G,V,nt){var at=(L=Rt(L,4))[0],U=L[1],Z=L[2],ft=(L[3]-Z)/(+U/(2*Math.PI)+1),pt=ft/(2*Math.PI),Qt=new Kt({range:[Z,Z+.99*ft]}),ee=new Kt({range:[at,U]}),me=1<(L=nt/V)?1:L,Jt=1<L?1/L:1;return{transform:function(Ht){var Ht=Rt(Ht,2),he=Ht[0],Ht=Ht[1],he=ee.map(he),Ht=Qt.map(Ht);return[.5*(Math.cos(he)*(pt*he+Ht)*me)+.5,.5*(Math.sin(he)*(pt*he+Ht)*Jt)+.5]},untransform:function(Ht){var Ht=Rt(Ht,2),Pe=Ht[0],Ht=Ht[1],Pe=2*(Pe-.5)/me,Ht=2*(Ht-.5)/Jt,he=Math.sqrt(Math.pow(Pe,2)+Math.pow(Ht,2)),Ht=qe(Math.atan2(Ht,Pe)+Math.floor(he/ft)*Math.PI*2,at,U),Pe=he-pt*Ht;return[ee.invert(Ht),Qt.invert(Pe)]}}}function Sa(ft,I,G,V,nt){var at=(ft=Rt(ft,4))[0],U=ft[1],Z=ft[2],ft=ft[3],pt=new Kt({range:[Z,ft]});return{transform:function(Qt){for(var ee=[],me=Qt.length,Jt=new fe({domain:new Array(me).fill(0).map(function(Pe,xe){return xe}),range:[at,U]}),de=0;de<me;de++){var Ht=Qt[de],he=Jt.map(de),Ht=pt.map(Ht);ee.push(he,Ht)}return ee},untransform:function(Qt){for(var ee=[],me=0;me<Qt.length;me+=2){var Jt=Qt[me+1];ee.push(pt.invert(Jt))}return ee}}}var Ma=function(U,I,G,V,nt){var U=Rt(U,2),at=U[0],U=U[1],Z=Tt();return at=[at,U],(U=Z)[0]=at[0],U[1]=0,U[2]=0,U[3]=0,U[4]=at[1],U[5]=0,U[6]=0,U[7]=0,U[8]=1,U};function Fu(L){return 1/Math.tan(L)}function dp(L,I,G,V,nt){var at=Fu(Rt(L,1)[0]);return{transform:function(ft){var ft=Rt(ft,2),Z=ft[0],ft=ft[1];return[Z+ft*at,ft]},untransform:function(ft){var ft=Rt(ft,2),Z=ft[0],ft=ft[1];return[Z-ft*at,ft]}}}function hp(L,I,G,V,nt){var at=Fu(Rt(L,1)[0]);return{transform:function(Z){var Z=Rt(Z,2),ft=Z[0];return[ft,Z[1]+ft*at]},untransform:function(Z){var Z=Rt(Z,2),ft=Z[0];return[ft,Z[1]-ft*at]}}}function ko(L,I,G,Z,U){var at=L<I,U=(at?I-Z:U-I)||U-Z,Z=at?-1:1;return Z*U*(G+1)/(G+U/((L-I)*Z))+I}function Ro(L,I,G,V,U){var at=L<I,U=(at?I-V:U-I)||U-V;return U/(U*(G+1)/(L-I)-G*(at?-1:1))+I}function Ss(L,I,G){return G?new Kt({range:[0,1],domain:[0,I]}).map(L):L}function pp(Z,I,G,V,nt){var at=(Z=Rt(Z,3))[0],U=Z[1],Z=Z[2],ft=Ss(at,V,Z!==void 0&&Z);return{transform:function(ee){var ee=Rt(ee,2),Qt=ee[0],ee=ee[1];return[ko(Qt,ft,U,0,1),ee]},untransform:function(ee){var ee=Rt(ee,2),Qt=ee[0],ee=ee[1];return[Ro(Qt,ft,U,0,1),ee]}}}function vp(Z,I,G,V,nt){var at=(Z=Rt(Z,3))[0],U=Z[1],Z=Z[2],ft=Ss(at,nt,Z!==void 0&&Z);return{transform:function(pt){return pt=Rt(pt,2),[pt[0],ko(pt[1],ft,U,0,1)]},untransform:function(pt){return pt=Rt(pt,2),[pt[0],Ro(pt[1],ft,U,0,1)]}}}function Bc(pt,I,G,V,nt){var at=(pt=Rt(pt,5))[0],U=pt[1],Z=pt[2],ft=pt[3],pt=pt[4],Qt=Ss(at,V,pt=pt!==void 0&&pt),ee=Ss(U,nt,pt);return{transform:function(de){var de=Rt(de,2),Jt=de[0],de=de[1];return[ko(Jt,Qt,Z,0,1),ko(de,ee,ft,0,1)]},untransform:function(de){var de=Rt(de,2),Jt=de[0],de=de[1];return[Ro(Jt,Qt,Z,0,1),Ro(de,ee,ft,0,1)]}}}function Bu(pt,I,G,V,nt){var at=(pt=Rt(pt,5))[0],U=pt[1],Z=pt[2],ft=pt[3],pt=(pt=pt[4])!==void 0&&pt,Qt=new Kt({range:[0,V]}),ee=new Kt({range:[0,nt]}),me=pt?at:Qt.map(at),Jt=pt?U:ee.map(U);return{transform:function(Ht){var Ht=Rt(Ht,2),he=Ht[0],Ht=Ht[1],Pe=Qt.map(he)-me,xe=ee.map(Ht)-Jt,Ce=Math.sqrt(Pe*Pe+xe*xe);return Z<Ce?[he,Ht]:(he=ko(Ce,0,ft,0,Z),Ht=Math.atan2(xe,Pe),Ce=me+he*Math.cos(Ht),xe=Jt+he*Math.sin(Ht),[Qt.invert(Ce),ee.invert(xe)])},untransform:function(Ht){var Ht=Rt(Ht,2),he=Ht[0],Ht=Ht[1],Pe=Qt.map(he)-me,xe=ee.map(Ht)-Jt,Ce=Math.sqrt(Pe*Pe+xe*xe);return Z<Ce?[he,Ht]:(he=Ro(Ce,0,ft,0,Z),Ht=Math.atan2(xe,Pe),Ce=me+he*Math.cos(Ht),xe=Jt+he*Math.sin(Ht),[Qt.invert(Ce),ee.invert(xe)])}}}function gp(L,I,G,V,nt,at,U){var Z=new Kt({range:[I,I+nt]}),ft=new Kt({range:[G,G+at]}),pt=new Kt({range:[V,V+U]});return{transform:function(Jt){var Jt=Rt(Jt,3),ee=Jt[0],me=Jt[1],Jt=Jt[2];return[Z.map(ee),ft.map(me),pt.map(Jt)]},untransform:function(Jt){var Jt=Rt(Jt,3),ee=Jt[0],me=Jt[1],Jt=Jt[2];return[Z.invert(ee),ft.invert(me),pt.invert(Jt)]}}}function yp(Qt,I,G,V,nt,at,U){var Z,ft=(Qt=Rt(Qt,3))[0],pt=Qt[1],Qt=Qt[2];return Z=Se(),ft=[ft,pt,Qt],Z[0]=1,Z[1]=0,Z[2]=0,Z[3]=0,Z[4]=0,Z[5]=1,Z[6]=0,Z[7]=0,Z[8]=0,Z[9]=0,Z[10]=1,Z[11]=0,Z[12]=ft[0],Z[13]=ft[1],Z[14]=ft[2],Z[15]=1,Z}function mp(L,I,G,V,nt,at,U){return{transform:function(ft){var ft=Rt(ft,3),pt=ft[0];return[ft[1],pt,ft[2]]},untransform:function(ft){var ft=Rt(ft,3),pt=ft[0];return[ft[1],pt,ft[2]]}}}function bp(Qt,I,G,V,nt,at,U){var Z,ft=(Qt=Rt(Qt,3))[0],pt=Qt[1],Qt=Qt[2];return Z=Se(),ft=[ft,pt,Qt],Z[0]=ft[0],Z[1]=0,Z[2]=0,Z[3]=0,Z[4]=0,Z[5]=ft[1],Z[6]=0,Z[7]=0,Z[8]=0,Z[9]=0,Z[10]=ft[2],Z[11]=0,Z[12]=0,Z[13]=0,Z[14]=0,Z[15]=1,Z}Gr.prototype.update=function(L){this.options=ue({},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:be(be([],Rt(G),!1),[be([],Rt(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(ve,Te){var tn;Z.push((Te=Te===void 0?!0:Te)?(tn=ve,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,be([],Rt(ti),!1))}return li}):ve)}var G,V,nt=(L=L===void 0?!1:L)?be([],Rt(this.options.transformations),!1).reverse():this.options.transformations,at=L?function(ve){return ve.untransform}:function(ve){return ve.transform},U=[],Z=[];try{for(var ft=kt(nt),pt=ft.next();!pt.done;pt=ft.next()){var Qt,ee,me,Jt,de,he,Ht=Rt(pt.value),Pe=Ht[0],xe=Ht.slice(1),Ce=this.transformers[Pe];Ce&&(ee=(Qt=this.options).x,me=Qt.y,Jt=Qt.width,de=Qt.height,Xe(he=Ce(be([],Rt(xe),!1),ee,me,Jt,de))?U.push(he):(U.length&&(I(this.createMatrixTransform(U,L)),U.splice(0,U.length)),I(at(he)||ie,Pe!=="parallel")))}}catch(ve){G={error:ve}}finally{try{pt&&!pt.done&&(V=ft.return)&&V.call(ft)}finally{if(G)throw G.error}}return U.length&&I(this.createMatrixTransform(U,L)),Qe.apply(void 0,be([],Rt(Z),!1))},Gr.prototype.createMatrixTransform=function(L,I){var G,V,nt,at,U,Z,ft,pt,Qt,ee,me,Jt,de=Tt();return I&&L.reverse(),L.forEach(function(he){return Dt(de,de,he)}),I&&(I=L=de,(Jt=new Lt(9))[0]=I[0],Jt[1]=I[1],Jt[2]=I[2],Jt[3]=I[3],Jt[4]=I[4],Jt[5]=I[5],Jt[6]=I[6],Jt[7]=I[7],Jt[8]=I[8],Jt=(I=Jt)[0],G=I[1],V=I[2],nt=I[3],at=I[4],U=I[5],Z=I[6],ft=I[7],pt=(I=I[8])*at-U*ft,me=Jt*pt+G*(Qt=-I*nt+U*Z)+V*(ee=ft*nt-at*Z))&&(L[0]=pt*(me=1/me),L[1]=(-I*G+V*ft)*me,L[2]=(U*G-V*at)*me,L[3]=Qt*me,L[4]=(I*Jt-V*Z)*me,L[5]=(-U*Jt+V*nt)*me,L[6]=ee*me,L[7]=(-ft*Jt+G*Z)*me,L[8]=(at*Jt-G*nt)*me),function(Te){var Ht,Pe,xe,Ce,ve,Te=[Te[0],Te[1],1];return xe=de,Ce=(Pe=Ht=Te)[0],ve=Pe[1],Pe=Pe[2],Ht[0]=Ce*xe[0]+ve*xe[3]+Pe*xe[6],Ht[1]=Ce*xe[1]+ve*xe[4]+Pe*xe[7],Ht[2]=Ce*xe[2]+ve*xe[5]+Pe*xe[8],[Te[0],Te[1]]}},Je=Gr;function Gr(L){this.options={x:0,y:0,width:300,height:150,transformations:[]},this.transformers={cartesian:Xn,translate:ln,custom:$n,matrix:Un,polar:ar,transpose:or,scale:Ma,"shear.x":dp,"shear.y":hp,reflect:mr,"reflect.x":fn,"reflect.y":Qr,rotate:wa,helix:ci,parallel:Sa,fisheye:Bc,"fisheye.x":pp,"fisheye.y":vp,"fisheye.circular":Bu},this.update(L)}pr.prototype.update=function(L){this.options=ue({},this.options,L),this.recoordinate()},pr.prototype.clone=function(){return new pr(this.options)},pr.prototype.getOptions=function(){return this.options},pr.prototype.clear=function(){this.update({transformations:[]})},pr.prototype.getSize=function(){var L=this.options;return[L.width,L.height,L.depth]},pr.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]},pr.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:be(be([],Rt(G),!1),[be([],Rt(L),!1)],!1)}),this},pr.prototype.map=function(L){return this.output(L)},pr.prototype.invert=function(L){return this.input(L)},pr.prototype.recoordinate=function(){this.output=this.compose(),this.input=this.compose(!0)},pr.prototype.compose=function(L){function I(tn,Jr){var li;Z.push((Jr=Jr===void 0?!0:Jr)?(li=tn,function(jr){for(var ti=[],Oi=0;Oi<jr.length-1;Oi+=3){var Jn=[jr[Oi],jr[Oi+1],jr[Oi+2]],Jn=li(Jn);ti.push.apply(ti,be([],Rt(Jn),!1))}return ti}):tn)}var G,V,nt=(L=L===void 0?!1:L)?be([],Rt(this.options.transformations),!1).reverse():this.options.transformations,at=L?function(tn){return tn.untransform}:function(tn){return tn.transform},U=[],Z=[];try{for(var ft=kt(nt),pt=ft.next();!pt.done;pt=ft.next()){var Qt,ee,me,Jt,de,he,Ht,Pe,xe=Rt(pt.value),Ce=xe[0],ve=xe.slice(1),Te=this.transformers[Ce];Te&&(ee=(Qt=this.options).x,me=Qt.y,Jt=Qt.z,de=Qt.width,he=Qt.height,Ht=Qt.depth,Xe(Pe=Te(be([],Rt(ve),!1),ee,me,Jt,de,he,Ht))?U.push(Pe):(U.length&&(I(this.createMatrixTransform(U,L)),U.splice(0,U.length)),I(at(Pe)||ie,!0)))}}catch(tn){G={error:tn}}finally{try{pt&&!pt.done&&(V=ft.return)&&V.call(ft)}finally{if(G)throw G.error}}return U.length&&I(this.createMatrixTransform(U,L)),Qe.apply(void 0,be([],Rt(Z),!1))},pr.prototype.createMatrixTransform=function(L,I){var G,V,nt,at,U,Z,ft,pt,Qt,ee,me,Jt,de,he,Ht,Pe,xe,Ce,ve,Te,tn,Jr,li,jr,ti,Oi,Jn,Fn,Ms=Se();return I&&L.reverse(),L.forEach(function(xp){return ke(Ms,Ms,xp)}),I&&(I=L=Ms,(Fn=new Lt(16))[0]=I[0],Fn[1]=I[1],Fn[2]=I[2],Fn[3]=I[3],Fn[4]=I[4],Fn[5]=I[5],Fn[6]=I[6],Fn[7]=I[7],Fn[8]=I[8],Fn[9]=I[9],Fn[10]=I[10],Fn[11]=I[11],Fn[12]=I[12],Fn[13]=I[13],Fn[14]=I[14],Fn[15]=I[15],Fn=(I=Fn)[0],G=I[1],V=I[2],nt=I[3],at=I[4],U=I[5],Z=I[6],ft=I[7],pt=I[8],Qt=I[9],ee=I[10],me=I[11],Jt=I[12],de=I[13],he=I[14],I=I[15],Jn=(Ht=Fn*U-G*at)*(Oi=ee*I-me*he)-(Pe=Fn*Z-V*at)*(ti=Qt*I-me*de)+(xe=Fn*ft-nt*at)*(jr=Qt*he-ee*de)+(Ce=G*Z-V*U)*(li=pt*I-me*Jt)-(ve=G*ft-nt*U)*(Jr=pt*he-ee*Jt)+(Te=V*ft-nt*Z)*(tn=pt*de-Qt*Jt))&&(L[0]=(U*Oi-Z*ti+ft*jr)*(Jn=1/Jn),L[1]=(V*ti-G*Oi-nt*jr)*Jn,L[2]=(de*Te-he*ve+I*Ce)*Jn,L[3]=(ee*ve-Qt*Te-me*Ce)*Jn,L[4]=(Z*li-at*Oi-ft*Jr)*Jn,L[5]=(Fn*Oi-V*li+nt*Jr)*Jn,L[6]=(he*xe-Jt*Te-I*Pe)*Jn,L[7]=(pt*Te-ee*xe+me*Pe)*Jn,L[8]=(at*ti-U*li+ft*tn)*Jn,L[9]=(G*li-Fn*ti-nt*tn)*Jn,L[10]=(Jt*ve-de*xe+I*Ht)*Jn,L[11]=(Qt*xe-pt*ve-me*Ht)*Jn,L[12]=(U*Jr-at*jr-Z*tn)*Jn,L[13]=(Fn*jr-G*Jr+V*tn)*Jn,L[14]=(de*Pe-Jt*Ce-he*Ht)*Jn,L[15]=(pt*Ce-Qt*Pe+ee*Ht)*Jn),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]]}},Re=pr;function pr(L){this.options={x:0,y:0,z:0,width:300,height:150,depth:150,transformations:[]},this.transformers={cartesian3D:gp,translate3D:yp,scale3D:bp,transpose3D:mp},this.update(L)}yt.Coordinate=Je,yt.Coordinate3D=Re,Object.defineProperty(yt,"__esModule",{value:!0})})},58046:function(Ye,Ve){"use strict";var yt=function(kt,Rt,be){return kt<Rt?Rt:kt>be?be:kt};Ve.Z=yt},63385:function(Ye,Ve){"use strict";var yt=function(kt){return kt==null};Ve.Z=yt},72909:function(Ye,Ve,yt){"use strict";var kt=yt(33317),Rt=function(be){return(0,kt.Z)(be,"Number")};Ve.Z=Rt},33317:function(Ye,Ve){"use strict";var yt={}.toString,kt=function(Rt,be){return yt.call(Rt)==="[object "+be+"]"};Ve.Z=kt},43241:function(Ye,Ve,yt){"use strict";var kt=yt(49425);Ve.Z=kt.Z},61728:function(Ye,Ve,yt){"use strict";var kt=yt(27634);Ve.Z=kt.Z},74553:function(Ye){"use strict";Ye.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]}},39872:function(Ye,Ve,yt){var kt=yt(74553),Rt=yt(55607),be=Object.hasOwnProperty,We=Object.create(null);for(var te in kt)be.call(kt,te)&&(We[kt[te]]=te);var ge=Ye.exports={to:{},get:{}};ge.get=function(dt){var pe=dt.substring(0,3).toLowerCase(),Zt,ue;switch(pe){case"hsl":Zt=ge.get.hsl(dt),ue="hsl";break;case"hwb":Zt=ge.get.hwb(dt),ue="hwb";break;default:Zt=ge.get.rgb(dt),ue="rgb";break}return Zt?{model:ue,value:Zt}:null},ge.get.rgb=function(dt){if(!dt)return null;var pe=/^#([a-f0-9]{3,4})$/i,Zt=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,ue=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,ie=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,jt=/^(\w+)$/,Lt=[0,0,0,1],Tt,Dt,Se;if(Tt=dt.match(Zt)){for(Se=Tt[2],Tt=Tt[1],Dt=0;Dt<3;Dt++){var ke=Dt*2;Lt[Dt]=parseInt(Tt.slice(ke,ke+2),16)}Se&&(Lt[3]=parseInt(Se,16)/255)}else if(Tt=dt.match(pe)){for(Tt=Tt[1],Se=Tt[3],Dt=0;Dt<3;Dt++)Lt[Dt]=parseInt(Tt[Dt]+Tt[Dt],16);Se&&(Lt[3]=parseInt(Se+Se,16)/255)}else if(Tt=dt.match(ue)){for(Dt=0;Dt<3;Dt++)Lt[Dt]=parseInt(Tt[Dt+1],0);Tt[4]&&(Tt[5]?Lt[3]=parseFloat(Tt[4])*.01:Lt[3]=parseFloat(Tt[4]))}else if(Tt=dt.match(ie)){for(Dt=0;Dt<3;Dt++)Lt[Dt]=Math.round(parseFloat(Tt[Dt+1])*2.55);Tt[4]&&(Tt[5]?Lt[3]=parseFloat(Tt[4])*.01:Lt[3]=parseFloat(Tt[4]))}else return(Tt=dt.match(jt))?Tt[1]==="transparent"?[0,0,0,0]:be.call(kt,Tt[1])?(Lt=kt[Tt[1]],Lt[3]=1,Lt):null:null;for(Dt=0;Dt<3;Dt++)Lt[Dt]=re(Lt[Dt],0,255);return Lt[3]=re(Lt[3],0,1),Lt},ge.get.hsl=function(dt){if(!dt)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=dt.match(pe);if(Zt){var ue=parseFloat(Zt[4]),ie=(parseFloat(Zt[1])%360+360)%360,jt=re(parseFloat(Zt[2]),0,100),Lt=re(parseFloat(Zt[3]),0,100),Tt=re(isNaN(ue)?1:ue,0,1);return[ie,jt,Lt,Tt]}return null},ge.get.hwb=function(dt){if(!dt)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=dt.match(pe);if(Zt){var ue=parseFloat(Zt[4]),ie=(parseFloat(Zt[1])%360+360)%360,jt=re(parseFloat(Zt[2]),0,100),Lt=re(parseFloat(Zt[3]),0,100),Tt=re(isNaN(ue)?1:ue,0,1);return[ie,jt,Lt,Tt]}return null},ge.to.hex=function(){var dt=Rt(arguments);return"#"+Gt(dt[0])+Gt(dt[1])+Gt(dt[2])+(dt[3]<1?Gt(Math.round(dt[3]*255)):"")},ge.to.rgb=function(){var dt=Rt(arguments);return dt.length<4||dt[3]===1?"rgb("+Math.round(dt[0])+", "+Math.round(dt[1])+", "+Math.round(dt[2])+")":"rgba("+Math.round(dt[0])+", "+Math.round(dt[1])+", "+Math.round(dt[2])+", "+dt[3]+")"},ge.to.rgb.percent=function(){var dt=Rt(arguments),pe=Math.round(dt[0]/255*100),Zt=Math.round(dt[1]/255*100),ue=Math.round(dt[2]/255*100);return dt.length<4||dt[3]===1?"rgb("+pe+"%, "+Zt+"%, "+ue+"%)":"rgba("+pe+"%, "+Zt+"%, "+ue+"%, "+dt[3]+")"},ge.to.hsl=function(){var dt=Rt(arguments);return dt.length<4||dt[3]===1?"hsl("+dt[0]+", "+dt[1]+"%, "+dt[2]+"%)":"hsla("+dt[0]+", "+dt[1]+"%, "+dt[2]+"%, "+dt[3]+")"},ge.to.hwb=function(){var dt=Rt(arguments),pe="";return dt.length>=4&&dt[3]!==1&&(pe=", "+dt[3]),"hwb("+dt[0]+", "+dt[1]+"%, "+dt[2]+"%"+pe+")"},ge.to.keyword=function(dt){return We[dt.slice(0,3)]};function re(dt,pe,Zt){return Math.min(Math.max(pe,dt),Zt)}function Gt(dt){var pe=Math.round(dt).toString(16).toUpperCase();return pe.length<2?"0"+pe:pe}},19007:function(Ye,Ve,yt){"use strict";yt.d(Ve,{ZP:function(){return Qe},B8:function(){return $e}});function kt(vt,Yt,et){vt.prototype=Yt.prototype=et,et.constructor=vt}function Rt(vt,Yt){var et=Object.create(vt.prototype);for(var lt in Yt)et[lt]=Yt[lt];return et}function be(){}var We=.7,te=1/We,ge="\\s*([+-]?\\d+)\\s*",re="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Gt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",dt=/^#([0-9a-f]{3,8})$/,pe=new RegExp("^rgb\\("+[ge,ge,ge]+"\\)$"),Zt=new RegExp("^rgb\\("+[Gt,Gt,Gt]+"\\)$"),ue=new RegExp("^rgba\\("+[ge,ge,ge,re]+"\\)$"),ie=new RegExp("^rgba\\("+[Gt,Gt,Gt,re]+"\\)$"),jt=new RegExp("^hsl\\("+[re,Gt,Gt]+"\\)$"),Lt=new RegExp("^hsla\\("+[re,Gt,Gt,re]+"\\)$"),Tt={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};kt(be,Qe,{copy:function(vt){return Object.assign(new this.constructor,this,vt)},displayable:function(){return this.rgb().displayable()},hex:Dt,formatHex:Dt,formatHsl:Se,formatRgb:ke,toString:ke});function Dt(){return this.rgb().formatHex()}function Se(){return Dn(this).formatHsl()}function ke(){return this.rgb().formatRgb()}function Qe(vt){var Yt,et;return vt=(vt+"").trim().toLowerCase(),(Yt=dt.exec(vt))?(et=Yt[1].length,Yt=parseInt(Yt[1],16),et===6?Xe(Yt):et===3?new Be(Yt>>8&15|Yt>>4&240,Yt>>4&15|Yt&240,(Yt&15)<<4|Yt&15,1):et===8?qe(Yt>>24&255,Yt>>16&255,Yt>>8&255,(Yt&255)/255):et===4?qe(Yt>>12&15|Yt>>8&240,Yt>>8&15|Yt>>4&240,Yt>>4&15|Yt&240,((Yt&15)<<4|Yt&15)/255):null):(Yt=pe.exec(vt))?new Be(Yt[1],Yt[2],Yt[3],1):(Yt=Zt.exec(vt))?new Be(Yt[1]*255/100,Yt[2]*255/100,Yt[3]*255/100,1):(Yt=ue.exec(vt))?qe(Yt[1],Yt[2],Yt[3],Yt[4]):(Yt=ie.exec(vt))?qe(Yt[1]*255/100,Yt[2]*255/100,Yt[3]*255/100,Yt[4]):(Yt=jt.exec(vt))?gn(Yt[1],Yt[2]/100,Yt[3]/100,1):(Yt=Lt.exec(vt))?gn(Yt[1],Yt[2]/100,Yt[3]/100,Yt[4]):Tt.hasOwnProperty(vt)?Xe(Tt[vt]):vt==="transparent"?new Be(NaN,NaN,NaN,0):null}function Xe(vt){return new Be(vt>>16&255,vt>>8&255,vt&255,1)}function qe(vt,Yt,et,lt){return lt<=0&&(vt=Yt=et=NaN),new Be(vt,Yt,et,lt)}function ln(vt){return vt instanceof be||(vt=Qe(vt)),vt?(vt=vt.rgb(),new Be(vt.r,vt.g,vt.b,vt.opacity)):new Be}function $e(vt,Yt,et,lt){return arguments.length===1?ln(vt):new Be(vt,Yt,et,lt==null?1:lt)}function Be(vt,Yt,et,lt){this.r=+vt,this.g=+Yt,this.b=+et,this.opacity=+lt}kt(Be,$e,Rt(be,{brighter:function(vt){return vt=vt==null?te:Math.pow(te,vt),new Be(this.r*vt,this.g*vt,this.b*vt,this.opacity)},darker:function(vt){return vt=vt==null?We:Math.pow(We,vt),new Be(this.r*vt,this.g*vt,this.b*vt,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:cn,formatHex:cn,formatRgb:_e,toString:_e}));function cn(){return"#"+Me(this.r)+Me(this.g)+Me(this.b)}function _e(){var vt=this.opacity;return vt=isNaN(vt)?1:Math.max(0,Math.min(1,vt)),(vt===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))+(vt===1?")":", "+vt+")")}function Me(vt){return vt=Math.max(0,Math.min(255,Math.round(vt)||0)),(vt<16?"0":"")+vt.toString(16)}function gn(vt,Yt,et,lt){return lt<=0?vt=Yt=et=NaN:et<=0||et>=1?vt=Yt=NaN:Yt<=0&&(vt=NaN),new un(vt,Yt,et,lt)}function Dn(vt){if(vt instanceof un)return new un(vt.h,vt.s,vt.l,vt.opacity);if(vt instanceof be||(vt=Qe(vt)),!vt)return new un;if(vt instanceof un)return vt;vt=vt.rgb();var Yt=vt.r/255,et=vt.g/255,lt=vt.b/255,_t=Math.min(Yt,et,lt),Ot=Math.max(Yt,et,lt),$t=NaN,It=Ot-_t,ae=(Ot+_t)/2;return It?(Yt===Ot?$t=(et-lt)/It+(et<lt)*6:et===Ot?$t=(lt-Yt)/It+2:$t=(Yt-et)/It+4,It/=ae<.5?Ot+_t:2-Ot-_t,$t*=60):It=ae>0&&ae<1?0:$t,new un($t,It,ae,vt.opacity)}function Qn(vt,Yt,et,lt){return arguments.length===1?Dn(vt):new un(vt,Yt,et,lt==null?1:lt)}function un(vt,Yt,et,lt){this.h=+vt,this.s=+Yt,this.l=+et,this.opacity=+lt}kt(un,Qn,Rt(be,{brighter:function(vt){return vt=vt==null?te:Math.pow(te,vt),new un(this.h,this.s,this.l*vt,this.opacity)},darker:function(vt){return vt=vt==null?We:Math.pow(We,vt),new un(this.h,this.s,this.l*vt,this.opacity)},rgb:function(){var vt=this.h%360+(this.h<0)*360,Yt=isNaN(vt)||isNaN(this.s)?0:this.s,et=this.l,lt=et+(et<.5?et:1-et)*Yt,_t=2*et-lt;return new Be(yn(vt>=240?vt-240:vt+120,_t,lt),yn(vt,_t,lt),yn(vt<120?vt+240:vt-120,_t,lt),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 vt=this.opacity;return vt=isNaN(vt)?1:Math.max(0,Math.min(1,vt)),(vt===1?"hsl(":"hsla(")+(this.h||0)+", "+(this.s||0)*100+"%, "+(this.l||0)*100+"%"+(vt===1?")":", "+vt+")")}}));function yn(vt,Yt,et){return(vt<60?Yt+(et-Yt)*vt/60:vt<180?et:vt<240?Yt+(et-Yt)*(240-vt)/60:Yt)*255}},77572:function(Ye){"use strict";var Ve=Object.prototype.hasOwnProperty,yt="~";function kt(){}Object.create&&(kt.prototype=Object.create(null),new kt().__proto__||(yt=!1));function Rt(ge,re,Gt){this.fn=ge,this.context=re,this.once=Gt||!1}function be(ge,re,Gt,dt,pe){if(typeof Gt!="function")throw new TypeError("The listener must be a function");var Zt=new Rt(Gt,dt||ge,pe),ue=yt?yt+re:re;return ge._events[ue]?ge._events[ue].fn?ge._events[ue]=[ge._events[ue],Zt]:ge._events[ue].push(Zt):(ge._events[ue]=Zt,ge._eventsCount++),ge}function We(ge,re){--ge._eventsCount===0?ge._events=new kt:delete ge._events[re]}function te(){this._events=new kt,this._eventsCount=0}te.prototype.eventNames=function(){var re=[],Gt,dt;if(this._eventsCount===0)return re;for(dt in Gt=this._events)Ve.call(Gt,dt)&&re.push(yt?dt.slice(1):dt);return Object.getOwnPropertySymbols?re.concat(Object.getOwnPropertySymbols(Gt)):re},te.prototype.listeners=function(re){var Gt=yt?yt+re:re,dt=this._events[Gt];if(!dt)return[];if(dt.fn)return[dt.fn];for(var pe=0,Zt=dt.length,ue=new Array(Zt);pe<Zt;pe++)ue[pe]=dt[pe].fn;return ue},te.prototype.listenerCount=function(re){var Gt=yt?yt+re:re,dt=this._events[Gt];return dt?dt.fn?1:dt.length:0},te.prototype.emit=function(re,Gt,dt,pe,Zt,ue){var ie=yt?yt+re:re;if(!this._events[ie])return!1;var jt=this._events[ie],Lt=arguments.length,Tt,Dt;if(jt.fn){switch(jt.once&&this.removeListener(re,jt.fn,void 0,!0),Lt){case 1:return jt.fn.call(jt.context),!0;case 2:return jt.fn.call(jt.context,Gt),!0;case 3:return jt.fn.call(jt.context,Gt,dt),!0;case 4:return jt.fn.call(jt.context,Gt,dt,pe),!0;case 5:return jt.fn.call(jt.context,Gt,dt,pe,Zt),!0;case 6:return jt.fn.call(jt.context,Gt,dt,pe,Zt,ue),!0}for(Dt=1,Tt=new Array(Lt-1);Dt<Lt;Dt++)Tt[Dt-1]=arguments[Dt];jt.fn.apply(jt.context,Tt)}else{var Se=jt.length,ke;for(Dt=0;Dt<Se;Dt++)switch(jt[Dt].once&&this.removeListener(re,jt[Dt].fn,void 0,!0),Lt){case 1:jt[Dt].fn.call(jt[Dt].context);break;case 2:jt[Dt].fn.call(jt[Dt].context,Gt);break;case 3:jt[Dt].fn.call(jt[Dt].context,Gt,dt);break;case 4:jt[Dt].fn.call(jt[Dt].context,Gt,dt,pe);break;default:if(!Tt)for(ke=1,Tt=new Array(Lt-1);ke<Lt;ke++)Tt[ke-1]=arguments[ke];jt[Dt].fn.apply(jt[Dt].context,Tt)}}return!0},te.prototype.on=function(re,Gt,dt){return be(this,re,Gt,dt,!1)},te.prototype.once=function(re,Gt,dt){return be(this,re,Gt,dt,!0)},te.prototype.removeListener=function(re,Gt,dt,pe){var Zt=yt?yt+re:re;if(!this._events[Zt])return this;if(!Gt)return We(this,Zt),this;var ue=this._events[Zt];if(ue.fn)ue.fn===Gt&&(!pe||ue.once)&&(!dt||ue.context===dt)&&We(this,Zt);else{for(var ie=0,jt=[],Lt=ue.length;ie<Lt;ie++)(ue[ie].fn!==Gt||pe&&!ue[ie].once||dt&&ue[ie].context!==dt)&&jt.push(ue[ie]);jt.length?this._events[Zt]=jt.length===1?jt[0]:jt:We(this,Zt)}return this},te.prototype.removeAllListeners=function(re){var Gt;return re?(Gt=yt?yt+re:re,this._events[Gt]&&We(this,Gt)):(this._events=new kt,this._eventsCount=0),this},te.prototype.off=te.prototype.removeListener,te.prototype.addListener=te.prototype.on,te.prefixed=yt,te.EventEmitter=te,Ye.exports=te},12886:function(Ye,Ve){(function(yt,kt){kt(Ve)})(this,function(yt){"use strict";function kt(ie,jt,Lt,Tt){Tt=Tt||{};var Dt=Tt.maxIterations||100,Se=Tt.tolerance||1e-10,ke=ie(jt),Qe=ie(Lt),Xe=Lt-jt;if(ke*Qe>0)throw"Initial bisect points must have opposite signs";if(ke===0)return jt;if(Qe===0)return Lt;for(var qe=0;qe<Dt;++qe){Xe/=2;var ln=jt+Xe,$e=ie(ln);if($e*ke>=0&&(jt=ln),Math.abs(Xe)<Se||$e===0)return ln}return jt+Xe}function Rt(ie){for(var jt=new Array(ie),Lt=0;Lt<ie;++Lt)jt[Lt]=0;return jt}function be(ie,jt){return Rt(ie).map(function(){return Rt(jt)})}function We(ie,jt){for(var Lt=0,Tt=0;Tt<ie.length;++Tt)Lt+=ie[Tt]*jt[Tt];return Lt}function te(ie){return Math.sqrt(We(ie,ie))}function ge(ie,jt,Lt){for(var Tt=0;Tt<jt.length;++Tt)ie[Tt]=jt[Tt]*Lt}function re(ie,jt,Lt,Tt,Dt){for(var Se=0;Se<ie.length;++Se)ie[Se]=jt*Lt[Se]+Tt*Dt[Se]}function Gt(ie,jt,Lt){Lt=Lt||{};var Tt=Lt.maxIterations||jt.length*200,Dt=Lt.nonZeroDelta||1.05,Se=Lt.zeroDelta||.001,ke=Lt.minErrorDelta||1e-6,Qe=Lt.minErrorDelta||1e-5,Xe=Lt.rho!==void 0?Lt.rho:1,qe=Lt.chi!==void 0?Lt.chi:2,ln=Lt.psi!==void 0?Lt.psi:-.5,$e=Lt.sigma!==void 0?Lt.sigma:.5,Be,cn=jt.length,_e=new Array(cn+1);_e[0]=jt,_e[0].fx=ie(jt),_e[0].id=0;for(var Me=0;Me<cn;++Me){var gn=jt.slice();gn[Me]=gn[Me]?gn[Me]*Dt:Se,_e[Me+1]=gn,_e[Me+1].fx=ie(gn),_e[Me+1].id=Me+1}function Dn(It){for(var ae=0;ae<It.length;ae++)_e[cn][ae]=It[ae];_e[cn].fx=It.fx}for(var Qn=function(It,ae){return It.fx-ae.fx},un=jt.slice(),yn=jt.slice(),vt=jt.slice(),Yt=jt.slice(),et=0;et<Tt;++et){if(_e.sort(Qn),Lt.history){var lt=_e.map(function(It){var ae=It.slice();return ae.fx=It.fx,ae.id=It.id,ae});lt.sort(function(It,ae){return It.id-ae.id}),Lt.history.push({x:_e[0].slice(),fx:_e[0].fx,simplex:lt})}for(Be=0,Me=0;Me<cn;++Me)Be=Math.max(Be,Math.abs(_e[0][Me]-_e[1][Me]));if(Math.abs(_e[0].fx-_e[cn].fx)<ke&&Be<Qe)break;for(Me=0;Me<cn;++Me){un[Me]=0;for(var _t=0;_t<cn;++_t)un[Me]+=_e[_t][Me];un[Me]/=cn}var Ot=_e[cn];if(re(yn,1+Xe,un,-Xe,Ot),yn.fx=ie(yn),yn.fx<_e[0].fx)re(Yt,1+qe,un,-qe,Ot),Yt.fx=ie(Yt),Yt.fx<yn.fx?Dn(Yt):Dn(yn);else if(yn.fx>=_e[cn-1].fx){var $t=!1;if(yn.fx>Ot.fx?(re(vt,1+ln,un,-ln,Ot),vt.fx=ie(vt),vt.fx<Ot.fx?Dn(vt):$t=!0):(re(vt,1-ln*Xe,un,ln*Xe,Ot),vt.fx=ie(vt),vt.fx<yn.fx?Dn(vt):$t=!0),$t){if($e>=1)break;for(Me=1;Me<_e.length;++Me)re(_e[Me],1-$e,_e[0],$e,_e[Me]),_e[Me].fx=ie(_e[Me])}}else Dn(yn)}return _e.sort(Qn),{fx:_e[0].fx,x:_e[0]}}function dt(ie,jt,Lt,Tt,Dt,Se,ke){var Qe=Lt.fx,Xe=We(Lt.fxprime,jt),qe=Qe,ln=Qe,$e=Xe,Be=0;Dt=Dt||1,Se=Se||1e-6,ke=ke||.1;function cn(Me,gn,Dn){for(var Qn=0;Qn<16;++Qn)if(Dt=(Me+gn)/2,re(Tt.x,1,Lt.x,Dt,jt),qe=Tt.fx=ie(Tt.x,Tt.fxprime),$e=We(Tt.fxprime,jt),qe>Qe+Se*Dt*Xe||qe>=Dn)gn=Dt;else{if(Math.abs($e)<=-ke*Xe)return Dt;$e*(gn-Me)>=0&&(gn=Me),Me=Dt,Dn=qe}return 0}for(var _e=0;_e<10;++_e){if(re(Tt.x,1,Lt.x,Dt,jt),qe=Tt.fx=ie(Tt.x,Tt.fxprime),$e=We(Tt.fxprime,jt),qe>Qe+Se*Dt*Xe||_e&&qe>=ln)return cn(Be,Dt,ln);if(Math.abs($e)<=-ke*Xe)return Dt;if($e>=0)return cn(Dt,Be,qe);ln=qe,Be=Dt,Dt*=2}return Dt}function pe(ie,jt,Lt){var Tt={x:jt.slice(),fx:0,fxprime:jt.slice()},Dt={x:jt.slice(),fx:0,fxprime:jt.slice()},Se=jt.slice(),ke,Qe,Xe=1,qe;Lt=Lt||{},qe=Lt.maxIterations||jt.length*20,Tt.fx=ie(Tt.x,Tt.fxprime),ke=Tt.fxprime.slice(),ge(ke,Tt.fxprime,-1);for(var ln=0;ln<qe;++ln){if(Xe=dt(ie,ke,Tt,Dt,Xe),Lt.history&&Lt.history.push({x:Tt.x.slice(),fx:Tt.fx,fxprime:Tt.fxprime.slice(),alpha:Xe}),!Xe)ge(ke,Tt.fxprime,-1);else{re(Se,1,Dt.fxprime,-1,Tt.fxprime);var $e=We(Tt.fxprime,Tt.fxprime),Be=Math.max(0,We(Se,Dt.fxprime)/$e);re(ke,Be,ke,-1,Dt.fxprime),Qe=Tt,Tt=Dt,Dt=Qe}if(te(Tt.fxprime)<=1e-5)break}return Lt.history&&Lt.history.push({x:Tt.x.slice(),fx:Tt.fx,fxprime:Tt.fxprime.slice(),alpha:Xe}),Tt}function Zt(ie,jt,Lt){Lt=Lt||{};for(var Tt=Lt.maxIterations||jt.length*100,Dt=Lt.learnRate||.001,Se={x:jt.slice(),fx:0,fxprime:jt.slice()},ke=0;ke<Tt&&(Se.fx=ie(Se.x,Se.fxprime),Lt.history&&Lt.history.push({x:Se.x.slice(),fx:Se.fx,fxprime:Se.fxprime.slice()}),re(Se.x,1,Se.x,-Dt,Se.fxprime),!(te(Se.fxprime)<=1e-5));++ke);return Se}function ue(ie,jt,Lt){Lt=Lt||{};var Tt={x:jt.slice(),fx:0,fxprime:jt.slice()},Dt={x:jt.slice(),fx:0,fxprime:jt.slice()},Se=Lt.maxIterations||jt.length*100,ke=Lt.learnRate||1,Qe=jt.slice(),Xe=Lt.c1||.001,qe=Lt.c2||.1,ln,$e=[];if(Lt.history){var Be=ie;ie=function(_e,Me){return $e.push(_e.slice()),Be(_e,Me)}}Tt.fx=ie(Tt.x,Tt.fxprime);for(var cn=0;cn<Se&&(ge(Qe,Tt.fxprime,-1),ke=dt(ie,Qe,Tt,Dt,ke,Xe,qe),Lt.history&&(Lt.history.push({x:Tt.x.slice(),fx:Tt.fx,fxprime:Tt.fxprime.slice(),functionCalls:$e,learnRate:ke,alpha:ke}),$e=[]),ln=Tt,Tt=Dt,Dt=ln,!(ke===0||te(Tt.fxprime)<1e-5));++cn);return Tt}yt.bisect=kt,yt.nelderMead=Gt,yt.conjugateGradient=pe,yt.gradientDescent=Zt,yt.gradientDescentLineSearch=ue,yt.zeros=Rt,yt.zerosM=be,yt.norm2=te,yt.weightedSum=re,yt.scale=ge})},96140:function(Ye,Ve,yt){"use strict";yt.d(Ve,{FD:function(){return be},Ib:function(){return kt},WT:function(){return Rt}});var kt=1e-6,Rt=typeof Float32Array!="undefined"?Float32Array:Array,be=Math.random;function We(Gt){Rt=Gt}var te=Math.PI/180;function ge(Gt){return Gt*te}function re(Gt,dt){return Math.abs(Gt-dt)<=kt*Math.max(1,Math.abs(Gt),Math.abs(dt))}Math.hypot||(Math.hypot=function(){for(var Gt=0,dt=arguments.length;dt--;)Gt+=arguments[dt]*arguments[dt];return Math.sqrt(Gt)})},49701:function(Ye,Ve,yt){"use strict";yt.r(Ve),yt.d(Ve,{add:function(){return ht},adjoint:function(){return pe},clone:function(){return be},copy:function(){return We},create:function(){return Rt},determinant:function(){return Zt},equals:function(){return H},exactEquals:function(){return xt},frob:function(){return ct},fromQuat:function(){return un},fromQuat2:function(){return cn},fromRotation:function(){return Xe},fromRotationTranslation:function(){return Be},fromRotationTranslationScale:function(){return Dn},fromRotationTranslationScaleOrigin:function(){return Qn},fromScaling:function(){return Qe},fromTranslation:function(){return ke},fromValues:function(){return te},fromXRotation:function(){return qe},fromYRotation:function(){return ln},fromZRotation:function(){return $e},frustum:function(){return yn},getRotation:function(){return gn},getScaling:function(){return Me},getTranslation:function(){return _e},identity:function(){return re},invert:function(){return dt},lookAt:function(){return It},mul:function(){return K},multiply:function(){return ue},multiplyScalar:function(){return Q},multiplyScalarAndAdd:function(){return st},ortho:function(){return Ot},orthoNO:function(){return _t},orthoZO:function(){return $t},perspective:function(){return Yt},perspectiveFromFieldOfView:function(){return lt},perspectiveNO:function(){return vt},perspectiveZO:function(){return et},rotate:function(){return Lt},rotateX:function(){return Tt},rotateY:function(){return Dt},rotateZ:function(){return Se},scale:function(){return jt},set:function(){return ge},str:function(){return X},sub:function(){return ut},subtract:function(){return Ut},targetTo:function(){return ae},translate:function(){return ie},transpose:function(){return Gt}});var kt=yt(96140);function Rt(){var x=new kt.WT(16);return kt.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 be(x){var T=new kt.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 We(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 te(x,T,W,q,J,rt,gt,mt,At,Mt,Bt,Wt,Vt,zt,Kt,fe){var wt=new kt.WT(16);return wt[0]=x,wt[1]=T,wt[2]=W,wt[3]=q,wt[4]=J,wt[5]=rt,wt[6]=gt,wt[7]=mt,wt[8]=At,wt[9]=Mt,wt[10]=Bt,wt[11]=Wt,wt[12]=Vt,wt[13]=zt,wt[14]=Kt,wt[15]=fe,wt}function ge(x,T,W,q,J,rt,gt,mt,At,Mt,Bt,Wt,Vt,zt,Kt,fe,wt){return x[0]=T,x[1]=W,x[2]=q,x[3]=J,x[4]=rt,x[5]=gt,x[6]=mt,x[7]=At,x[8]=Mt,x[9]=Bt,x[10]=Wt,x[11]=Vt,x[12]=zt,x[13]=Kt,x[14]=fe,x[15]=wt,x}function re(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 Gt(x,T){if(x===T){var W=T[1],q=T[2],J=T[3],rt=T[6],gt=T[7],mt=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]=q,x[9]=rt,x[11]=T[14],x[12]=J,x[13]=gt,x[14]=mt}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 dt(x,T){var W=T[0],q=T[1],J=T[2],rt=T[3],gt=T[4],mt=T[5],At=T[6],Mt=T[7],Bt=T[8],Wt=T[9],Vt=T[10],zt=T[11],Kt=T[12],fe=T[13],wt=T[14],we=T[15],Je=W*mt-q*gt,Ae=W*At-J*gt,Re=W*Mt-rt*gt,Ie=q*At-J*mt,Le=q*Mt-rt*mt,Vn=J*Mt-rt*At,Xn=Bt*fe-Wt*Kt,$n=Bt*wt-Vt*Kt,Un=Bt*we-zt*Kt,ar=Wt*wt-Vt*fe,or=Wt*we-zt*fe,mr=Vt*we-zt*wt,fn=Je*mr-Ae*or+Re*ar+Ie*Un-Le*$n+Vn*Xn;return fn?(fn=1/fn,x[0]=(mt*mr-At*or+Mt*ar)*fn,x[1]=(J*or-q*mr-rt*ar)*fn,x[2]=(fe*Vn-wt*Le+we*Ie)*fn,x[3]=(Vt*Le-Wt*Vn-zt*Ie)*fn,x[4]=(At*Un-gt*mr-Mt*$n)*fn,x[5]=(W*mr-J*Un+rt*$n)*fn,x[6]=(wt*Re-Kt*Vn-we*Ae)*fn,x[7]=(Bt*Vn-Vt*Re+zt*Ae)*fn,x[8]=(gt*or-mt*Un+Mt*Xn)*fn,x[9]=(q*Un-W*or-rt*Xn)*fn,x[10]=(Kt*Le-fe*Re+we*Je)*fn,x[11]=(Wt*Re-Bt*Le-zt*Je)*fn,x[12]=(mt*$n-gt*ar-At*Xn)*fn,x[13]=(W*ar-q*$n+J*Xn)*fn,x[14]=(fe*Ae-Kt*Ie-wt*Je)*fn,x[15]=(Bt*Ie-Wt*Ae+Vt*Je)*fn,x):null}function pe(x,T){var W=T[0],q=T[1],J=T[2],rt=T[3],gt=T[4],mt=T[5],At=T[6],Mt=T[7],Bt=T[8],Wt=T[9],Vt=T[10],zt=T[11],Kt=T[12],fe=T[13],wt=T[14],we=T[15];return x[0]=mt*(Vt*we-zt*wt)-Wt*(At*we-Mt*wt)+fe*(At*zt-Mt*Vt),x[1]=-(q*(Vt*we-zt*wt)-Wt*(J*we-rt*wt)+fe*(J*zt-rt*Vt)),x[2]=q*(At*we-Mt*wt)-mt*(J*we-rt*wt)+fe*(J*Mt-rt*At),x[3]=-(q*(At*zt-Mt*Vt)-mt*(J*zt-rt*Vt)+Wt*(J*Mt-rt*At)),x[4]=-(gt*(Vt*we-zt*wt)-Bt*(At*we-Mt*wt)+Kt*(At*zt-Mt*Vt)),x[5]=W*(Vt*we-zt*wt)-Bt*(J*we-rt*wt)+Kt*(J*zt-rt*Vt),x[6]=-(W*(At*we-Mt*wt)-gt*(J*we-rt*wt)+Kt*(J*Mt-rt*At)),x[7]=W*(At*zt-Mt*Vt)-gt*(J*zt-rt*Vt)+Bt*(J*Mt-rt*At),x[8]=gt*(Wt*we-zt*fe)-Bt*(mt*we-Mt*fe)+Kt*(mt*zt-Mt*Wt),x[9]=-(W*(Wt*we-zt*fe)-Bt*(q*we-rt*fe)+Kt*(q*zt-rt*Wt)),x[10]=W*(mt*we-Mt*fe)-gt*(q*we-rt*fe)+Kt*(q*Mt-rt*mt),x[11]=-(W*(mt*zt-Mt*Wt)-gt*(q*zt-rt*Wt)+Bt*(q*Mt-rt*mt)),x[12]=-(gt*(Wt*wt-Vt*fe)-Bt*(mt*wt-At*fe)+Kt*(mt*Vt-At*Wt)),x[13]=W*(Wt*wt-Vt*fe)-Bt*(q*wt-J*fe)+Kt*(q*Vt-J*Wt),x[14]=-(W*(mt*wt-At*fe)-gt*(q*wt-J*fe)+Kt*(q*At-J*mt)),x[15]=W*(mt*Vt-At*Wt)-gt*(q*Vt-J*Wt)+Bt*(q*At-J*mt),x}function Zt(x){var T=x[0],W=x[1],q=x[2],J=x[3],rt=x[4],gt=x[5],mt=x[6],At=x[7],Mt=x[8],Bt=x[9],Wt=x[10],Vt=x[11],zt=x[12],Kt=x[13],fe=x[14],wt=x[15],we=T*gt-W*rt,Je=T*mt-q*rt,Ae=T*At-J*rt,Re=W*mt-q*gt,Ie=W*At-J*gt,Le=q*At-J*mt,Vn=Mt*Kt-Bt*zt,Xn=Mt*fe-Wt*zt,$n=Mt*wt-Vt*zt,Un=Bt*fe-Wt*Kt,ar=Bt*wt-Vt*Kt,or=Wt*wt-Vt*fe;return we*or-Je*ar+Ae*Un+Re*$n-Ie*Xn+Le*Vn}function ue(x,T,W){var q=T[0],J=T[1],rt=T[2],gt=T[3],mt=T[4],At=T[5],Mt=T[6],Bt=T[7],Wt=T[8],Vt=T[9],zt=T[10],Kt=T[11],fe=T[12],wt=T[13],we=T[14],Je=T[15],Ae=W[0],Re=W[1],Ie=W[2],Le=W[3];return x[0]=Ae*q+Re*mt+Ie*Wt+Le*fe,x[1]=Ae*J+Re*At+Ie*Vt+Le*wt,x[2]=Ae*rt+Re*Mt+Ie*zt+Le*we,x[3]=Ae*gt+Re*Bt+Ie*Kt+Le*Je,Ae=W[4],Re=W[5],Ie=W[6],Le=W[7],x[4]=Ae*q+Re*mt+Ie*Wt+Le*fe,x[5]=Ae*J+Re*At+Ie*Vt+Le*wt,x[6]=Ae*rt+Re*Mt+Ie*zt+Le*we,x[7]=Ae*gt+Re*Bt+Ie*Kt+Le*Je,Ae=W[8],Re=W[9],Ie=W[10],Le=W[11],x[8]=Ae*q+Re*mt+Ie*Wt+Le*fe,x[9]=Ae*J+Re*At+Ie*Vt+Le*wt,x[10]=Ae*rt+Re*Mt+Ie*zt+Le*we,x[11]=Ae*gt+Re*Bt+Ie*Kt+Le*Je,Ae=W[12],Re=W[13],Ie=W[14],Le=W[15],x[12]=Ae*q+Re*mt+Ie*Wt+Le*fe,x[13]=Ae*J+Re*At+Ie*Vt+Le*wt,x[14]=Ae*rt+Re*Mt+Ie*zt+Le*we,x[15]=Ae*gt+Re*Bt+Ie*Kt+Le*Je,x}function ie(x,T,W){var q=W[0],J=W[1],rt=W[2],gt,mt,At,Mt,Bt,Wt,Vt,zt,Kt,fe,wt,we;return T===x?(x[12]=T[0]*q+T[4]*J+T[8]*rt+T[12],x[13]=T[1]*q+T[5]*J+T[9]*rt+T[13],x[14]=T[2]*q+T[6]*J+T[10]*rt+T[14],x[15]=T[3]*q+T[7]*J+T[11]*rt+T[15]):(gt=T[0],mt=T[1],At=T[2],Mt=T[3],Bt=T[4],Wt=T[5],Vt=T[6],zt=T[7],Kt=T[8],fe=T[9],wt=T[10],we=T[11],x[0]=gt,x[1]=mt,x[2]=At,x[3]=Mt,x[4]=Bt,x[5]=Wt,x[6]=Vt,x[7]=zt,x[8]=Kt,x[9]=fe,x[10]=wt,x[11]=we,x[12]=gt*q+Bt*J+Kt*rt+T[12],x[13]=mt*q+Wt*J+fe*rt+T[13],x[14]=At*q+Vt*J+wt*rt+T[14],x[15]=Mt*q+zt*J+we*rt+T[15]),x}function jt(x,T,W){var q=W[0],J=W[1],rt=W[2];return x[0]=T[0]*q,x[1]=T[1]*q,x[2]=T[2]*q,x[3]=T[3]*q,x[4]=T[4]*J,x[5]=T[5]*J,x[6]=T[6]*J,x[7]=T[7]*J,x[8]=T[8]*rt,x[9]=T[9]*rt,x[10]=T[10]*rt,x[11]=T[11]*rt,x[12]=T[12],x[13]=T[13],x[14]=T[14],x[15]=T[15],x}function Lt(x,T,W,q){var J=q[0],rt=q[1],gt=q[2],mt=Math.hypot(J,rt,gt),At,Mt,Bt,Wt,Vt,zt,Kt,fe,wt,we,Je,Ae,Re,Ie,Le,Vn,Xn,$n,Un,ar,or,mr,fn,Qr;return mt<kt.Ib?null:(mt=1/mt,J*=mt,rt*=mt,gt*=mt,At=Math.sin(W),Mt=Math.cos(W),Bt=1-Mt,Wt=T[0],Vt=T[1],zt=T[2],Kt=T[3],fe=T[4],wt=T[5],we=T[6],Je=T[7],Ae=T[8],Re=T[9],Ie=T[10],Le=T[11],Vn=J*J*Bt+Mt,Xn=rt*J*Bt+gt*At,$n=gt*J*Bt-rt*At,Un=J*rt*Bt-gt*At,ar=rt*rt*Bt+Mt,or=gt*rt*Bt+J*At,mr=J*gt*Bt+rt*At,fn=rt*gt*Bt-J*At,Qr=gt*gt*Bt+Mt,x[0]=Wt*Vn+fe*Xn+Ae*$n,x[1]=Vt*Vn+wt*Xn+Re*$n,x[2]=zt*Vn+we*Xn+Ie*$n,x[3]=Kt*Vn+Je*Xn+Le*$n,x[4]=Wt*Un+fe*ar+Ae*or,x[5]=Vt*Un+wt*ar+Re*or,x[6]=zt*Un+we*ar+Ie*or,x[7]=Kt*Un+Je*ar+Le*or,x[8]=Wt*mr+fe*fn+Ae*Qr,x[9]=Vt*mr+wt*fn+Re*Qr,x[10]=zt*mr+we*fn+Ie*Qr,x[11]=Kt*mr+Je*fn+Le*Qr,T!==x&&(x[12]=T[12],x[13]=T[13],x[14]=T[14],x[15]=T[15]),x)}function Tt(x,T,W){var q=Math.sin(W),J=Math.cos(W),rt=T[4],gt=T[5],mt=T[6],At=T[7],Mt=T[8],Bt=T[9],Wt=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]=rt*J+Mt*q,x[5]=gt*J+Bt*q,x[6]=mt*J+Wt*q,x[7]=At*J+Vt*q,x[8]=Mt*J-rt*q,x[9]=Bt*J-gt*q,x[10]=Wt*J-mt*q,x[11]=Vt*J-At*q,x}function Dt(x,T,W){var q=Math.sin(W),J=Math.cos(W),rt=T[0],gt=T[1],mt=T[2],At=T[3],Mt=T[8],Bt=T[9],Wt=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]=rt*J-Mt*q,x[1]=gt*J-Bt*q,x[2]=mt*J-Wt*q,x[3]=At*J-Vt*q,x[8]=rt*q+Mt*J,x[9]=gt*q+Bt*J,x[10]=mt*q+Wt*J,x[11]=At*q+Vt*J,x}function Se(x,T,W){var q=Math.sin(W),J=Math.cos(W),rt=T[0],gt=T[1],mt=T[2],At=T[3],Mt=T[4],Bt=T[5],Wt=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]=rt*J+Mt*q,x[1]=gt*J+Bt*q,x[2]=mt*J+Wt*q,x[3]=At*J+Vt*q,x[4]=Mt*J-rt*q,x[5]=Bt*J-gt*q,x[6]=Wt*J-mt*q,x[7]=Vt*J-At*q,x}function ke(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 Qe(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 Xe(x,T,W){var q=W[0],J=W[1],rt=W[2],gt=Math.hypot(q,J,rt),mt,At,Mt;return gt<kt.Ib?null:(gt=1/gt,q*=gt,J*=gt,rt*=gt,mt=Math.sin(T),At=Math.cos(T),Mt=1-At,x[0]=q*q*Mt+At,x[1]=J*q*Mt+rt*mt,x[2]=rt*q*Mt-J*mt,x[3]=0,x[4]=q*J*Mt-rt*mt,x[5]=J*J*Mt+At,x[6]=rt*J*Mt+q*mt,x[7]=0,x[8]=q*rt*Mt+J*mt,x[9]=J*rt*Mt-q*mt,x[10]=rt*rt*Mt+At,x[11]=0,x[12]=0,x[13]=0,x[14]=0,x[15]=1,x)}function qe(x,T){var W=Math.sin(T),q=Math.cos(T);return x[0]=1,x[1]=0,x[2]=0,x[3]=0,x[4]=0,x[5]=q,x[6]=W,x[7]=0,x[8]=0,x[9]=-W,x[10]=q,x[11]=0,x[12]=0,x[13]=0,x[14]=0,x[15]=1,x}function ln(x,T){var W=Math.sin(T),q=Math.cos(T);return x[0]=q,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]=q,x[11]=0,x[12]=0,x[13]=0,x[14]=0,x[15]=1,x}function $e(x,T){var W=Math.sin(T),q=Math.cos(T);return x[0]=q,x[1]=W,x[2]=0,x[3]=0,x[4]=-W,x[5]=q,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 Be(x,T,W){var q=T[0],J=T[1],rt=T[2],gt=T[3],mt=q+q,At=J+J,Mt=rt+rt,Bt=q*mt,Wt=q*At,Vt=q*Mt,zt=J*At,Kt=J*Mt,fe=rt*Mt,wt=gt*mt,we=gt*At,Je=gt*Mt;return x[0]=1-(zt+fe),x[1]=Wt+Je,x[2]=Vt-we,x[3]=0,x[4]=Wt-Je,x[5]=1-(Bt+fe),x[6]=Kt+wt,x[7]=0,x[8]=Vt+we,x[9]=Kt-wt,x[10]=1-(Bt+zt),x[11]=0,x[12]=W[0],x[13]=W[1],x[14]=W[2],x[15]=1,x}function cn(x,T){var W=new kt.WT(3),q=-T[0],J=-T[1],rt=-T[2],gt=T[3],mt=T[4],At=T[5],Mt=T[6],Bt=T[7],Wt=q*q+J*J+rt*rt+gt*gt;return Wt>0?(W[0]=(mt*gt+Bt*q+At*rt-Mt*J)*2/Wt,W[1]=(At*gt+Bt*J+Mt*q-mt*rt)*2/Wt,W[2]=(Mt*gt+Bt*rt+mt*J-At*q)*2/Wt):(W[0]=(mt*gt+Bt*q+At*rt-Mt*J)*2,W[1]=(At*gt+Bt*J+Mt*q-mt*rt)*2,W[2]=(Mt*gt+Bt*rt+mt*J-At*q)*2),Be(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],q=T[1],J=T[2],rt=T[4],gt=T[5],mt=T[6],At=T[8],Mt=T[9],Bt=T[10];return x[0]=Math.hypot(W,q,J),x[1]=Math.hypot(rt,gt,mt),x[2]=Math.hypot(At,Mt,Bt),x}function gn(x,T){var W=new kt.WT(3);Me(W,T);var q=1/W[0],J=1/W[1],rt=1/W[2],gt=T[0]*q,mt=T[1]*J,At=T[2]*rt,Mt=T[4]*q,Bt=T[5]*J,Wt=T[6]*rt,Vt=T[8]*q,zt=T[9]*J,Kt=T[10]*rt,fe=gt+Bt+Kt,wt=0;return fe>0?(wt=Math.sqrt(fe+1)*2,x[3]=.25*wt,x[0]=(Wt-zt)/wt,x[1]=(Vt-At)/wt,x[2]=(mt-Mt)/wt):gt>Bt&&gt>Kt?(wt=Math.sqrt(1+gt-Bt-Kt)*2,x[3]=(Wt-zt)/wt,x[0]=.25*wt,x[1]=(mt+Mt)/wt,x[2]=(Vt+At)/wt):Bt>Kt?(wt=Math.sqrt(1+Bt-gt-Kt)*2,x[3]=(Vt-At)/wt,x[0]=(mt+Mt)/wt,x[1]=.25*wt,x[2]=(Wt+zt)/wt):(wt=Math.sqrt(1+Kt-gt-Bt)*2,x[3]=(mt-Mt)/wt,x[0]=(Vt+At)/wt,x[1]=(Wt+zt)/wt,x[2]=.25*wt),x}function Dn(x,T,W,q){var J=T[0],rt=T[1],gt=T[2],mt=T[3],At=J+J,Mt=rt+rt,Bt=gt+gt,Wt=J*At,Vt=J*Mt,zt=J*Bt,Kt=rt*Mt,fe=rt*Bt,wt=gt*Bt,we=mt*At,Je=mt*Mt,Ae=mt*Bt,Re=q[0],Ie=q[1],Le=q[2];return x[0]=(1-(Kt+wt))*Re,x[1]=(Vt+Ae)*Re,x[2]=(zt-Je)*Re,x[3]=0,x[4]=(Vt-Ae)*Ie,x[5]=(1-(Wt+wt))*Ie,x[6]=(fe+we)*Ie,x[7]=0,x[8]=(zt+Je)*Le,x[9]=(fe-we)*Le,x[10]=(1-(Wt+Kt))*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,q,J){var rt=T[0],gt=T[1],mt=T[2],At=T[3],Mt=rt+rt,Bt=gt+gt,Wt=mt+mt,Vt=rt*Mt,zt=rt*Bt,Kt=rt*Wt,fe=gt*Bt,wt=gt*Wt,we=mt*Wt,Je=At*Mt,Ae=At*Bt,Re=At*Wt,Ie=q[0],Le=q[1],Vn=q[2],Xn=J[0],$n=J[1],Un=J[2],ar=(1-(fe+we))*Ie,or=(zt+Re)*Ie,mr=(Kt-Ae)*Ie,fn=(zt-Re)*Le,Qr=(1-(Vt+we))*Le,wa=(wt+Je)*Le,ci=(Kt+Ae)*Vn,Sa=(wt-Je)*Vn,Ma=(1-(Vt+fe))*Vn;return x[0]=ar,x[1]=or,x[2]=mr,x[3]=0,x[4]=fn,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]+Xn-(ar*Xn+fn*$n+ci*Un),x[13]=W[1]+$n-(or*Xn+Qr*$n+Sa*Un),x[14]=W[2]+Un-(mr*Xn+wa*$n+Ma*Un),x[15]=1,x}function un(x,T){var W=T[0],q=T[1],J=T[2],rt=T[3],gt=W+W,mt=q+q,At=J+J,Mt=W*gt,Bt=q*gt,Wt=q*mt,Vt=J*gt,zt=J*mt,Kt=J*At,fe=rt*gt,wt=rt*mt,we=rt*At;return x[0]=1-Wt-Kt,x[1]=Bt+we,x[2]=Vt-wt,x[3]=0,x[4]=Bt-we,x[5]=1-Mt-Kt,x[6]=zt+fe,x[7]=0,x[8]=Vt+wt,x[9]=zt-fe,x[10]=1-Mt-Wt,x[11]=0,x[12]=0,x[13]=0,x[14]=0,x[15]=1,x}function yn(x,T,W,q,J,rt,gt){var mt=1/(W-T),At=1/(J-q),Mt=1/(rt-gt);return x[0]=rt*2*mt,x[1]=0,x[2]=0,x[3]=0,x[4]=0,x[5]=rt*2*At,x[6]=0,x[7]=0,x[8]=(W+T)*mt,x[9]=(J+q)*At,x[10]=(gt+rt)*Mt,x[11]=-1,x[12]=0,x[13]=0,x[14]=gt*rt*2*Mt,x[15]=0,x}function vt(x,T,W,q,J){var rt=1/Math.tan(T/2),gt;return x[0]=rt/W,x[1]=0,x[2]=0,x[3]=0,x[4]=0,x[5]=rt,x[6]=0,x[7]=0,x[8]=0,x[9]=0,x[11]=-1,x[12]=0,x[13]=0,x[15]=0,J!=null&&J!==1/0?(gt=1/(q-J),x[10]=(J+q)*gt,x[14]=2*J*q*gt):(x[10]=-1,x[14]=-2*q),x}var Yt=vt;function et(x,T,W,q,J){var rt=1/Math.tan(T/2),gt;return x[0]=rt/W,x[1]=0,x[2]=0,x[3]=0,x[4]=0,x[5]=rt,x[6]=0,x[7]=0,x[8]=0,x[9]=0,x[11]=-1,x[12]=0,x[13]=0,x[15]=0,J!=null&&J!==1/0?(gt=1/(q-J),x[10]=J*gt,x[14]=J*q*gt):(x[10]=-1,x[14]=-q),x}function lt(x,T,W,q){var J=Math.tan(T.upDegrees*Math.PI/180),rt=Math.tan(T.downDegrees*Math.PI/180),gt=Math.tan(T.leftDegrees*Math.PI/180),mt=Math.tan(T.rightDegrees*Math.PI/180),At=2/(gt+mt),Mt=2/(J+rt);return x[0]=At,x[1]=0,x[2]=0,x[3]=0,x[4]=0,x[5]=Mt,x[6]=0,x[7]=0,x[8]=-((gt-mt)*At*.5),x[9]=(J-rt)*Mt*.5,x[10]=q/(W-q),x[11]=-1,x[12]=0,x[13]=0,x[14]=q*W/(W-q),x[15]=0,x}function _t(x,T,W,q,J,rt,gt){var mt=1/(T-W),At=1/(q-J),Mt=1/(rt-gt);return x[0]=-2*mt,x[1]=0,x[2]=0,x[3]=0,x[4]=0,x[5]=-2*At,x[6]=0,x[7]=0,x[8]=0,x[9]=0,x[10]=2*Mt,x[11]=0,x[12]=(T+W)*mt,x[13]=(J+q)*At,x[14]=(gt+rt)*Mt,x[15]=1,x}var Ot=_t;function $t(x,T,W,q,J,rt,gt){var mt=1/(T-W),At=1/(q-J),Mt=1/(rt-gt);return x[0]=-2*mt,x[1]=0,x[2]=0,x[3]=0,x[4]=0,x[5]=-2*At,x[6]=0,x[7]=0,x[8]=0,x[9]=0,x[10]=Mt,x[11]=0,x[12]=(T+W)*mt,x[13]=(J+q)*At,x[14]=rt*Mt,x[15]=1,x}function It(x,T,W,q){var J,rt,gt,mt,At,Mt,Bt,Wt,Vt,zt,Kt=T[0],fe=T[1],wt=T[2],we=q[0],Je=q[1],Ae=q[2],Re=W[0],Ie=W[1],Le=W[2];return Math.abs(Kt-Re)<kt.Ib&&Math.abs(fe-Ie)<kt.Ib&&Math.abs(wt-Le)<kt.Ib?re(x):(Bt=Kt-Re,Wt=fe-Ie,Vt=wt-Le,zt=1/Math.hypot(Bt,Wt,Vt),Bt*=zt,Wt*=zt,Vt*=zt,J=Je*Vt-Ae*Wt,rt=Ae*Bt-we*Vt,gt=we*Wt-Je*Bt,zt=Math.hypot(J,rt,gt),zt?(zt=1/zt,J*=zt,rt*=zt,gt*=zt):(J=0,rt=0,gt=0),mt=Wt*gt-Vt*rt,At=Vt*J-Bt*gt,Mt=Bt*rt-Wt*J,zt=Math.hypot(mt,At,Mt),zt?(zt=1/zt,mt*=zt,At*=zt,Mt*=zt):(mt=0,At=0,Mt=0),x[0]=J,x[1]=mt,x[2]=Bt,x[3]=0,x[4]=rt,x[5]=At,x[6]=Wt,x[7]=0,x[8]=gt,x[9]=Mt,x[10]=Vt,x[11]=0,x[12]=-(J*Kt+rt*fe+gt*wt),x[13]=-(mt*Kt+At*fe+Mt*wt),x[14]=-(Bt*Kt+Wt*fe+Vt*wt),x[15]=1,x)}function ae(x,T,W,q){var J=T[0],rt=T[1],gt=T[2],mt=q[0],At=q[1],Mt=q[2],Bt=J-W[0],Wt=rt-W[1],Vt=gt-W[2],zt=Bt*Bt+Wt*Wt+Vt*Vt;zt>0&&(zt=1/Math.sqrt(zt),Bt*=zt,Wt*=zt,Vt*=zt);var Kt=At*Vt-Mt*Wt,fe=Mt*Bt-mt*Vt,wt=mt*Wt-At*Bt;return zt=Kt*Kt+fe*fe+wt*wt,zt>0&&(zt=1/Math.sqrt(zt),Kt*=zt,fe*=zt,wt*=zt),x[0]=Kt,x[1]=fe,x[2]=wt,x[3]=0,x[4]=Wt*wt-Vt*fe,x[5]=Vt*Kt-Bt*wt,x[6]=Bt*fe-Wt*Kt,x[7]=0,x[8]=Bt,x[9]=Wt,x[10]=Vt,x[11]=0,x[12]=J,x[13]=rt,x[14]=gt,x[15]=1,x}function X(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 ct(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 ht(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 Q(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 st(x,T,W,q){return x[0]=T[0]+W[0]*q,x[1]=T[1]+W[1]*q,x[2]=T[2]+W[2]*q,x[3]=T[3]+W[3]*q,x[4]=T[4]+W[4]*q,x[5]=T[5]+W[5]*q,x[6]=T[6]+W[6]*q,x[7]=T[7]+W[7]*q,x[8]=T[8]+W[8]*q,x[9]=T[9]+W[9]*q,x[10]=T[10]+W[10]*q,x[11]=T[11]+W[11]*q,x[12]=T[12]+W[12]*q,x[13]=T[13]+W[13]*q,x[14]=T[14]+W[14]*q,x[15]=T[15]+W[15]*q,x}function xt(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],q=x[1],J=x[2],rt=x[3],gt=x[4],mt=x[5],At=x[6],Mt=x[7],Bt=x[8],Wt=x[9],Vt=x[10],zt=x[11],Kt=x[12],fe=x[13],wt=x[14],we=x[15],Je=T[0],Ae=T[1],Re=T[2],Ie=T[3],Le=T[4],Vn=T[5],Xn=T[6],$n=T[7],Un=T[8],ar=T[9],or=T[10],mr=T[11],fn=T[12],Qr=T[13],wa=T[14],ci=T[15];return Math.abs(W-Je)<=kt.Ib*Math.max(1,Math.abs(W),Math.abs(Je))&&Math.abs(q-Ae)<=kt.Ib*Math.max(1,Math.abs(q),Math.abs(Ae))&&Math.abs(J-Re)<=kt.Ib*Math.max(1,Math.abs(J),Math.abs(Re))&&Math.abs(rt-Ie)<=kt.Ib*Math.max(1,Math.abs(rt),Math.abs(Ie))&&Math.abs(gt-Le)<=kt.Ib*Math.max(1,Math.abs(gt),Math.abs(Le))&&Math.abs(mt-Vn)<=kt.Ib*Math.max(1,Math.abs(mt),Math.abs(Vn))&&Math.abs(At-Xn)<=kt.Ib*Math.max(1,Math.abs(At),Math.abs(Xn))&&Math.abs(Mt-$n)<=kt.Ib*Math.max(1,Math.abs(Mt),Math.abs($n))&&Math.abs(Bt-Un)<=kt.Ib*Math.max(1,Math.abs(Bt),Math.abs(Un))&&Math.abs(Wt-ar)<=kt.Ib*Math.max(1,Math.abs(Wt),Math.abs(ar))&&Math.abs(Vt-or)<=kt.Ib*Math.max(1,Math.abs(Vt),Math.abs(or))&&Math.abs(zt-mr)<=kt.Ib*Math.max(1,Math.abs(zt),Math.abs(mr))&&Math.abs(Kt-fn)<=kt.Ib*Math.max(1,Math.abs(Kt),Math.abs(fn))&&Math.abs(fe-Qr)<=kt.Ib*Math.max(1,Math.abs(fe),Math.abs(Qr))&&Math.abs(wt-wa)<=kt.Ib*Math.max(1,Math.abs(wt),Math.abs(wa))&&Math.abs(we-ci)<=kt.Ib*Math.max(1,Math.abs(we),Math.abs(ci))}var K=ue,ut=Ut},1153:function(Ye,Ve,yt){"use strict";yt.d(Ve,{$X:function(){return Gt},AK:function(){return Be},Fv:function(){return $e},I6:function(){return lt},IH:function(){return re},JG:function(){return te},Ue:function(){return Rt},al:function(){return We},lu:function(){return $t},t7:function(){return _e},t8:function(){return ge},tk:function(){return qe}});var kt=yt(96140);function Rt(){var Q=new kt.WT(2);return kt.WT!=Float32Array&&(Q[0]=0,Q[1]=0),Q}function be(Q){var st=new glMatrix.ARRAY_TYPE(2);return st[0]=Q[0],st[1]=Q[1],st}function We(Q,st){var xt=new kt.WT(2);return xt[0]=Q,xt[1]=st,xt}function te(Q,st){return Q[0]=st[0],Q[1]=st[1],Q}function ge(Q,st,xt){return Q[0]=st,Q[1]=xt,Q}function re(Q,st,xt){return Q[0]=st[0]+xt[0],Q[1]=st[1]+xt[1],Q}function Gt(Q,st,xt){return Q[0]=st[0]-xt[0],Q[1]=st[1]-xt[1],Q}function dt(Q,st,xt){return Q[0]=st[0]*xt[0],Q[1]=st[1]*xt[1],Q}function pe(Q,st,xt){return Q[0]=st[0]/xt[0],Q[1]=st[1]/xt[1],Q}function Zt(Q,st){return Q[0]=Math.ceil(st[0]),Q[1]=Math.ceil(st[1]),Q}function ue(Q,st){return Q[0]=Math.floor(st[0]),Q[1]=Math.floor(st[1]),Q}function ie(Q,st,xt){return Q[0]=Math.min(st[0],xt[0]),Q[1]=Math.min(st[1],xt[1]),Q}function jt(Q,st,xt){return Q[0]=Math.max(st[0],xt[0]),Q[1]=Math.max(st[1],xt[1]),Q}function Lt(Q,st){return Q[0]=Math.round(st[0]),Q[1]=Math.round(st[1]),Q}function Tt(Q,st,xt){return Q[0]=st[0]*xt,Q[1]=st[1]*xt,Q}function Dt(Q,st,xt,H){return Q[0]=st[0]+xt[0]*H,Q[1]=st[1]+xt[1]*H,Q}function Se(Q,st){var xt=st[0]-Q[0],H=st[1]-Q[1];return Math.hypot(xt,H)}function ke(Q,st){var xt=st[0]-Q[0],H=st[1]-Q[1];return xt*xt+H*H}function Qe(Q){var st=Q[0],xt=Q[1];return Math.hypot(st,xt)}function Xe(Q){var st=Q[0],xt=Q[1];return st*st+xt*xt}function qe(Q,st){return Q[0]=-st[0],Q[1]=-st[1],Q}function ln(Q,st){return Q[0]=1/st[0],Q[1]=1/st[1],Q}function $e(Q,st){var xt=st[0],H=st[1],K=xt*xt+H*H;return K>0&&(K=1/Math.sqrt(K)),Q[0]=st[0]*K,Q[1]=st[1]*K,Q}function Be(Q,st){return Q[0]*st[0]+Q[1]*st[1]}function cn(Q,st,xt){var H=st[0]*xt[1]-st[1]*xt[0];return Q[0]=Q[1]=0,Q[2]=H,Q}function _e(Q,st,xt,H){var K=st[0],ut=st[1];return Q[0]=K+H*(xt[0]-K),Q[1]=ut+H*(xt[1]-ut),Q}function Me(Q,st){st=st||1;var xt=glMatrix.RANDOM()*2*Math.PI;return Q[0]=Math.cos(xt)*st,Q[1]=Math.sin(xt)*st,Q}function gn(Q,st,xt){var H=st[0],K=st[1];return Q[0]=xt[0]*H+xt[2]*K,Q[1]=xt[1]*H+xt[3]*K,Q}function Dn(Q,st,xt){var H=st[0],K=st[1];return Q[0]=xt[0]*H+xt[2]*K+xt[4],Q[1]=xt[1]*H+xt[3]*K+xt[5],Q}function Qn(Q,st,xt){var H=st[0],K=st[1];return Q[0]=xt[0]*H+xt[3]*K+xt[6],Q[1]=xt[1]*H+xt[4]*K+xt[7],Q}function un(Q,st,xt){var H=st[0],K=st[1];return Q[0]=xt[0]*H+xt[4]*K+xt[12],Q[1]=xt[1]*H+xt[5]*K+xt[13],Q}function yn(Q,st,xt,H){var K=st[0]-xt[0],ut=st[1]-xt[1],x=Math.sin(H),T=Math.cos(H);return Q[0]=K*T-ut*x+xt[0],Q[1]=K*x+ut*T+xt[1],Q}function vt(Q,st){var xt=Q[0],H=Q[1],K=st[0],ut=st[1],x=Math.sqrt(xt*xt+H*H)*Math.sqrt(K*K+ut*ut),T=x&&(xt*K+H*ut)/x;return Math.acos(Math.min(Math.max(T,-1),1))}function Yt(Q){return Q[0]=0,Q[1]=0,Q}function et(Q){return"vec2("+Q[0]+", "+Q[1]+")"}function lt(Q,st){return Q[0]===st[0]&&Q[1]===st[1]}function _t(Q,st){var xt=Q[0],H=Q[1],K=st[0],ut=st[1];return Math.abs(xt-K)<=glMatrix.EPSILON*Math.max(1,Math.abs(xt),Math.abs(K))&&Math.abs(H-ut)<=glMatrix.EPSILON*Math.max(1,Math.abs(H),Math.abs(ut))}var Ot=null,$t=Gt,It=null,ae=null,X=null,ct=null,ht=null,Ut=function(){var Q=Rt();return function(st,xt,H,K,ut,x){var T,W;for(xt||(xt=2),H||(H=0),K?W=Math.min(K*xt+H,st.length):W=st.length,T=H;T<W;T+=xt)Q[0]=st[T],Q[1]=st[T+1],ut(Q,Q,x),st[T]=Q[0],st[T+1]=Q[1];return st}}()},68072:function(Ye,Ve,yt){"use strict";yt.r(Ve),yt.d(Ve,{add:function(){return Gt},angle:function(){return lt},bezier:function(){return gn},ceil:function(){return ue},clone:function(){return be},copy:function(){return ge},create:function(){return Rt},cross:function(){return cn},dist:function(){return ht},distance:function(){return ke},div:function(){return ct},divide:function(){return Zt},dot:function(){return Be},equals:function(){return It},exactEquals:function(){return $t},floor:function(){return ie},forEach:function(){return xt},fromValues:function(){return te},hermite:function(){return Me},inverse:function(){return ln},len:function(){return Q},length:function(){return We},lerp:function(){return _e},max:function(){return Lt},min:function(){return jt},mul:function(){return X},multiply:function(){return pe},negate:function(){return qe},normalize:function(){return $e},random:function(){return Dn},rotateX:function(){return vt},rotateY:function(){return Yt},rotateZ:function(){return et},round:function(){return Tt},scale:function(){return Dt},scaleAndAdd:function(){return Se},set:function(){return re},sqrDist:function(){return Ut},sqrLen:function(){return st},squaredDistance:function(){return Qe},squaredLength:function(){return Xe},str:function(){return Ot},sub:function(){return ae},subtract:function(){return dt},transformMat3:function(){return un},transformMat4:function(){return Qn},transformQuat:function(){return yn},zero:function(){return _t}});var kt=yt(96140);function Rt(){var H=new kt.WT(3);return kt.WT!=Float32Array&&(H[0]=0,H[1]=0,H[2]=0),H}function be(H){var K=new kt.WT(3);return K[0]=H[0],K[1]=H[1],K[2]=H[2],K}function We(H){var K=H[0],ut=H[1],x=H[2];return Math.hypot(K,ut,x)}function te(H,K,ut){var x=new kt.WT(3);return x[0]=H,x[1]=K,x[2]=ut,x}function ge(H,K){return H[0]=K[0],H[1]=K[1],H[2]=K[2],H}function re(H,K,ut,x){return H[0]=K,H[1]=ut,H[2]=x,H}function Gt(H,K,ut){return H[0]=K[0]+ut[0],H[1]=K[1]+ut[1],H[2]=K[2]+ut[2],H}function dt(H,K,ut){return H[0]=K[0]-ut[0],H[1]=K[1]-ut[1],H[2]=K[2]-ut[2],H}function pe(H,K,ut){return H[0]=K[0]*ut[0],H[1]=K[1]*ut[1],H[2]=K[2]*ut[2],H}function Zt(H,K,ut){return H[0]=K[0]/ut[0],H[1]=K[1]/ut[1],H[2]=K[2]/ut[2],H}function ue(H,K){return H[0]=Math.ceil(K[0]),H[1]=Math.ceil(K[1]),H[2]=Math.ceil(K[2]),H}function ie(H,K){return H[0]=Math.floor(K[0]),H[1]=Math.floor(K[1]),H[2]=Math.floor(K[2]),H}function jt(H,K,ut){return H[0]=Math.min(K[0],ut[0]),H[1]=Math.min(K[1],ut[1]),H[2]=Math.min(K[2],ut[2]),H}function Lt(H,K,ut){return H[0]=Math.max(K[0],ut[0]),H[1]=Math.max(K[1],ut[1]),H[2]=Math.max(K[2],ut[2]),H}function Tt(H,K){return H[0]=Math.round(K[0]),H[1]=Math.round(K[1]),H[2]=Math.round(K[2]),H}function Dt(H,K,ut){return H[0]=K[0]*ut,H[1]=K[1]*ut,H[2]=K[2]*ut,H}function Se(H,K,ut,x){return H[0]=K[0]+ut[0]*x,H[1]=K[1]+ut[1]*x,H[2]=K[2]+ut[2]*x,H}function ke(H,K){var ut=K[0]-H[0],x=K[1]-H[1],T=K[2]-H[2];return Math.hypot(ut,x,T)}function Qe(H,K){var ut=K[0]-H[0],x=K[1]-H[1],T=K[2]-H[2];return ut*ut+x*x+T*T}function Xe(H){var K=H[0],ut=H[1],x=H[2];return K*K+ut*ut+x*x}function qe(H,K){return H[0]=-K[0],H[1]=-K[1],H[2]=-K[2],H}function ln(H,K){return H[0]=1/K[0],H[1]=1/K[1],H[2]=1/K[2],H}function $e(H,K){var ut=K[0],x=K[1],T=K[2],W=ut*ut+x*x+T*T;return W>0&&(W=1/Math.sqrt(W)),H[0]=K[0]*W,H[1]=K[1]*W,H[2]=K[2]*W,H}function Be(H,K){return H[0]*K[0]+H[1]*K[1]+H[2]*K[2]}function cn(H,K,ut){var x=K[0],T=K[1],W=K[2],q=ut[0],J=ut[1],rt=ut[2];return H[0]=T*rt-W*J,H[1]=W*q-x*rt,H[2]=x*J-T*q,H}function _e(H,K,ut,x){var T=K[0],W=K[1],q=K[2];return H[0]=T+x*(ut[0]-T),H[1]=W+x*(ut[1]-W),H[2]=q+x*(ut[2]-q),H}function Me(H,K,ut,x,T,W){var q=W*W,J=q*(2*W-3)+1,rt=q*(W-2)+W,gt=q*(W-1),mt=q*(3-2*W);return H[0]=K[0]*J+ut[0]*rt+x[0]*gt+T[0]*mt,H[1]=K[1]*J+ut[1]*rt+x[1]*gt+T[1]*mt,H[2]=K[2]*J+ut[2]*rt+x[2]*gt+T[2]*mt,H}function gn(H,K,ut,x,T,W){var q=1-W,J=q*q,rt=W*W,gt=J*q,mt=3*W*J,At=3*rt*q,Mt=rt*W;return H[0]=K[0]*gt+ut[0]*mt+x[0]*At+T[0]*Mt,H[1]=K[1]*gt+ut[1]*mt+x[1]*At+T[1]*Mt,H[2]=K[2]*gt+ut[2]*mt+x[2]*At+T[2]*Mt,H}function Dn(H,K){K=K||1;var ut=kt.FD()*2*Math.PI,x=kt.FD()*2-1,T=Math.sqrt(1-x*x)*K;return H[0]=Math.cos(ut)*T,H[1]=Math.sin(ut)*T,H[2]=x*K,H}function Qn(H,K,ut){var x=K[0],T=K[1],W=K[2],q=ut[3]*x+ut[7]*T+ut[11]*W+ut[15];return q=q||1,H[0]=(ut[0]*x+ut[4]*T+ut[8]*W+ut[12])/q,H[1]=(ut[1]*x+ut[5]*T+ut[9]*W+ut[13])/q,H[2]=(ut[2]*x+ut[6]*T+ut[10]*W+ut[14])/q,H}function un(H,K,ut){var x=K[0],T=K[1],W=K[2];return H[0]=x*ut[0]+T*ut[3]+W*ut[6],H[1]=x*ut[1]+T*ut[4]+W*ut[7],H[2]=x*ut[2]+T*ut[5]+W*ut[8],H}function yn(H,K,ut){var x=ut[0],T=ut[1],W=ut[2],q=ut[3],J=K[0],rt=K[1],gt=K[2],mt=T*gt-W*rt,At=W*J-x*gt,Mt=x*rt-T*J,Bt=T*Mt-W*At,Wt=W*mt-x*Mt,Vt=x*At-T*mt,zt=q*2;return mt*=zt,At*=zt,Mt*=zt,Bt*=2,Wt*=2,Vt*=2,H[0]=J+mt+Bt,H[1]=rt+At+Wt,H[2]=gt+Mt+Vt,H}function vt(H,K,ut,x){var T=[],W=[];return T[0]=K[0]-ut[0],T[1]=K[1]-ut[1],T[2]=K[2]-ut[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]+ut[0],H[1]=W[1]+ut[1],H[2]=W[2]+ut[2],H}function Yt(H,K,ut,x){var T=[],W=[];return T[0]=K[0]-ut[0],T[1]=K[1]-ut[1],T[2]=K[2]-ut[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]+ut[0],H[1]=W[1]+ut[1],H[2]=W[2]+ut[2],H}function et(H,K,ut,x){var T=[],W=[];return T[0]=K[0]-ut[0],T[1]=K[1]-ut[1],T[2]=K[2]-ut[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]+ut[0],H[1]=W[1]+ut[1],H[2]=W[2]+ut[2],H}function lt(H,K){var ut=H[0],x=H[1],T=H[2],W=K[0],q=K[1],J=K[2],rt=Math.sqrt(ut*ut+x*x+T*T),gt=Math.sqrt(W*W+q*q+J*J),mt=rt*gt,At=mt&&Be(H,K)/mt;return Math.acos(Math.min(Math.max(At,-1),1))}function _t(H){return H[0]=0,H[1]=0,H[2]=0,H}function Ot(H){return"vec3("+H[0]+", "+H[1]+", "+H[2]+")"}function $t(H,K){return H[0]===K[0]&&H[1]===K[1]&&H[2]===K[2]}function It(H,K){var ut=H[0],x=H[1],T=H[2],W=K[0],q=K[1],J=K[2];return Math.abs(ut-W)<=kt.Ib*Math.max(1,Math.abs(ut),Math.abs(W))&&Math.abs(x-q)<=kt.Ib*Math.max(1,Math.abs(x),Math.abs(q))&&Math.abs(T-J)<=kt.Ib*Math.max(1,Math.abs(T),Math.abs(J))}var ae=dt,X=pe,ct=Zt,ht=ke,Ut=Qe,Q=We,st=Xe,xt=function(){var H=Rt();return function(K,ut,x,T,W,q){var J,rt;for(ut||(ut=3),x||(x=0),T?rt=Math.min(T*ut+x,K.length):rt=K.length,J=x;J<rt;J+=ut)H[0]=K[J],H[1]=K[J+1],H[2]=K[J+2],W(H,H,q),K[J]=H[0],K[J+1]=H[1],K[J+2]=H[2];return K}}()},76126:function(Ye,Ve,yt){"use strict";yt.d(Ve,{AK:function(){return Be},Fv:function(){return $e},I6:function(){return yn},IH:function(){return re},JG:function(){return te},Ue:function(){return Rt},al:function(){return We},bA:function(){return Tt},d9:function(){return be},fF:function(){return gn},fS:function(){return vt},kE:function(){return Qe},t7:function(){return _e},t8:function(){return ge},we:function(){return Xe}});var kt=yt(96140);function Rt(){var X=new kt.WT(4);return kt.WT!=Float32Array&&(X[0]=0,X[1]=0,X[2]=0,X[3]=0),X}function be(X){var ct=new kt.WT(4);return ct[0]=X[0],ct[1]=X[1],ct[2]=X[2],ct[3]=X[3],ct}function We(X,ct,ht,Ut){var Q=new kt.WT(4);return Q[0]=X,Q[1]=ct,Q[2]=ht,Q[3]=Ut,Q}function te(X,ct){return X[0]=ct[0],X[1]=ct[1],X[2]=ct[2],X[3]=ct[3],X}function ge(X,ct,ht,Ut,Q){return X[0]=ct,X[1]=ht,X[2]=Ut,X[3]=Q,X}function re(X,ct,ht){return X[0]=ct[0]+ht[0],X[1]=ct[1]+ht[1],X[2]=ct[2]+ht[2],X[3]=ct[3]+ht[3],X}function Gt(X,ct,ht){return X[0]=ct[0]-ht[0],X[1]=ct[1]-ht[1],X[2]=ct[2]-ht[2],X[3]=ct[3]-ht[3],X}function dt(X,ct,ht){return X[0]=ct[0]*ht[0],X[1]=ct[1]*ht[1],X[2]=ct[2]*ht[2],X[3]=ct[3]*ht[3],X}function pe(X,ct,ht){return X[0]=ct[0]/ht[0],X[1]=ct[1]/ht[1],X[2]=ct[2]/ht[2],X[3]=ct[3]/ht[3],X}function Zt(X,ct){return X[0]=Math.ceil(ct[0]),X[1]=Math.ceil(ct[1]),X[2]=Math.ceil(ct[2]),X[3]=Math.ceil(ct[3]),X}function ue(X,ct){return X[0]=Math.floor(ct[0]),X[1]=Math.floor(ct[1]),X[2]=Math.floor(ct[2]),X[3]=Math.floor(ct[3]),X}function ie(X,ct,ht){return X[0]=Math.min(ct[0],ht[0]),X[1]=Math.min(ct[1],ht[1]),X[2]=Math.min(ct[2],ht[2]),X[3]=Math.min(ct[3],ht[3]),X}function jt(X,ct,ht){return X[0]=Math.max(ct[0],ht[0]),X[1]=Math.max(ct[1],ht[1]),X[2]=Math.max(ct[2],ht[2]),X[3]=Math.max(ct[3],ht[3]),X}function Lt(X,ct){return X[0]=Math.round(ct[0]),X[1]=Math.round(ct[1]),X[2]=Math.round(ct[2]),X[3]=Math.round(ct[3]),X}function Tt(X,ct,ht){return X[0]=ct[0]*ht,X[1]=ct[1]*ht,X[2]=ct[2]*ht,X[3]=ct[3]*ht,X}function Dt(X,ct,ht,Ut){return X[0]=ct[0]+ht[0]*Ut,X[1]=ct[1]+ht[1]*Ut,X[2]=ct[2]+ht[2]*Ut,X[3]=ct[3]+ht[3]*Ut,X}function Se(X,ct){var ht=ct[0]-X[0],Ut=ct[1]-X[1],Q=ct[2]-X[2],st=ct[3]-X[3];return Math.hypot(ht,Ut,Q,st)}function ke(X,ct){var ht=ct[0]-X[0],Ut=ct[1]-X[1],Q=ct[2]-X[2],st=ct[3]-X[3];return ht*ht+Ut*Ut+Q*Q+st*st}function Qe(X){var ct=X[0],ht=X[1],Ut=X[2],Q=X[3];return Math.hypot(ct,ht,Ut,Q)}function Xe(X){var ct=X[0],ht=X[1],Ut=X[2],Q=X[3];return ct*ct+ht*ht+Ut*Ut+Q*Q}function qe(X,ct){return X[0]=-ct[0],X[1]=-ct[1],X[2]=-ct[2],X[3]=-ct[3],X}function ln(X,ct){return X[0]=1/ct[0],X[1]=1/ct[1],X[2]=1/ct[2],X[3]=1/ct[3],X}function $e(X,ct){var ht=ct[0],Ut=ct[1],Q=ct[2],st=ct[3],xt=ht*ht+Ut*Ut+Q*Q+st*st;return xt>0&&(xt=1/Math.sqrt(xt)),X[0]=ht*xt,X[1]=Ut*xt,X[2]=Q*xt,X[3]=st*xt,X}function Be(X,ct){return X[0]*ct[0]+X[1]*ct[1]+X[2]*ct[2]+X[3]*ct[3]}function cn(X,ct,ht,Ut){var Q=ht[0]*Ut[1]-ht[1]*Ut[0],st=ht[0]*Ut[2]-ht[2]*Ut[0],xt=ht[0]*Ut[3]-ht[3]*Ut[0],H=ht[1]*Ut[2]-ht[2]*Ut[1],K=ht[1]*Ut[3]-ht[3]*Ut[1],ut=ht[2]*Ut[3]-ht[3]*Ut[2],x=ct[0],T=ct[1],W=ct[2],q=ct[3];return X[0]=T*ut-W*K+q*H,X[1]=-(x*ut)+W*xt-q*st,X[2]=x*K-T*xt+q*Q,X[3]=-(x*H)+T*st-W*Q,X}function _e(X,ct,ht,Ut){var Q=ct[0],st=ct[1],xt=ct[2],H=ct[3];return X[0]=Q+Ut*(ht[0]-Q),X[1]=st+Ut*(ht[1]-st),X[2]=xt+Ut*(ht[2]-xt),X[3]=H+Ut*(ht[3]-H),X}function Me(X,ct){ct=ct||1;var ht,Ut,Q,st,xt,H;do ht=glMatrix.RANDOM()*2-1,Ut=glMatrix.RANDOM()*2-1,xt=ht*ht+Ut*Ut;while(xt>=1);do Q=glMatrix.RANDOM()*2-1,st=glMatrix.RANDOM()*2-1,H=Q*Q+st*st;while(H>=1);var K=Math.sqrt((1-xt)/H);return X[0]=ct*ht,X[1]=ct*Ut,X[2]=ct*Q*K,X[3]=ct*st*K,X}function gn(X,ct,ht){var Ut=ct[0],Q=ct[1],st=ct[2],xt=ct[3];return X[0]=ht[0]*Ut+ht[4]*Q+ht[8]*st+ht[12]*xt,X[1]=ht[1]*Ut+ht[5]*Q+ht[9]*st+ht[13]*xt,X[2]=ht[2]*Ut+ht[6]*Q+ht[10]*st+ht[14]*xt,X[3]=ht[3]*Ut+ht[7]*Q+ht[11]*st+ht[15]*xt,X}function Dn(X,ct,ht){var Ut=ct[0],Q=ct[1],st=ct[2],xt=ht[0],H=ht[1],K=ht[2],ut=ht[3],x=ut*Ut+H*st-K*Q,T=ut*Q+K*Ut-xt*st,W=ut*st+xt*Q-H*Ut,q=-xt*Ut-H*Q-K*st;return X[0]=x*ut+q*-xt+T*-K-W*-H,X[1]=T*ut+q*-H+W*-xt-x*-K,X[2]=W*ut+q*-K+x*-H-T*-xt,X[3]=ct[3],X}function Qn(X){return X[0]=0,X[1]=0,X[2]=0,X[3]=0,X}function un(X){return"vec4("+X[0]+", "+X[1]+", "+X[2]+", "+X[3]+")"}function yn(X,ct){return X[0]===ct[0]&&X[1]===ct[1]&&X[2]===ct[2]&&X[3]===ct[3]}function vt(X,ct){var ht=X[0],Ut=X[1],Q=X[2],st=X[3],xt=ct[0],H=ct[1],K=ct[2],ut=ct[3];return Math.abs(ht-xt)<=kt.Ib*Math.max(1,Math.abs(ht),Math.abs(xt))&&Math.abs(Ut-H)<=kt.Ib*Math.max(1,Math.abs(Ut),Math.abs(H))&&Math.abs(Q-K)<=kt.Ib*Math.max(1,Math.abs(Q),Math.abs(K))&&Math.abs(st-ut)<=kt.Ib*Math.max(1,Math.abs(st),Math.abs(ut))}var Yt=null,et=null,lt=null,_t=null,Ot=null,$t=null,It=null,ae=function(){var X=Rt();return function(ct,ht,Ut,Q,st,xt){var H,K;for(ht||(ht=4),Ut||(Ut=0),Q?K=Math.min(Q*ht+Ut,ct.length):K=ct.length,H=Ut;H<K;H+=ht)X[0]=ct[H],X[1]=ct[H+1],X[2]=ct[H+2],X[3]=ct[H+3],st(X,X,xt),ct[H]=X[0],ct[H+1]=X[1],ct[H+2]=X[2],ct[H+3]=X[3];return ct}}()},11144:function(Ye){Ye.exports=function(yt){return!yt||typeof yt=="string"?!1:yt instanceof Array||Array.isArray(yt)||yt.length>=0&&(yt.splice instanceof Function||Object.getOwnPropertyDescriptor(yt,yt.length-1)&&yt.constructor.name!=="String")}},86319:function(Ye){"use strict";var Ve=Ye.exports;Ye.exports.isNumber=function(yt){return typeof yt=="number"},Ye.exports.findMin=function(yt){if(yt.length===0)return 1/0;for(var kt=yt[0],Rt=1;Rt<yt.length;Rt++)kt=Math.min(kt,yt[Rt]);return kt},Ye.exports.findMax=function(yt){if(yt.length===0)return-1/0;for(var kt=yt[0],Rt=1;Rt<yt.length;Rt++)kt=Math.max(kt,yt[Rt]);return kt},Ye.exports.findMinMulti=function(yt){for(var kt=Ve.findMin(yt[0]),Rt=1;Rt<yt.length;Rt++)kt=Math.min(kt,Ve.findMin(yt[Rt]));return kt},Ye.exports.findMaxMulti=function(yt){for(var kt=Ve.findMax(yt[0]),Rt=1;Rt<yt.length;Rt++)kt=Math.max(kt,Ve.findMax(yt[Rt]));return kt},Ye.exports.inside=function(yt,kt,Rt){return yt<=Rt&&Rt<=kt}},50517:function(Ye,Ve,yt){"use strict";var kt=50,Rt=2,be=Math.log(2),We=Ye.exports,te=yt(86319);function ge(Gt){return 1-Math.abs(Gt)}Ye.exports.getUnifiedMinMax=function(Gt,dt){return We.getUnifiedMinMaxMulti([Gt],dt)},Ye.exports.getUnifiedMinMaxMulti=function(Gt,dt){dt=dt||{};var pe=!1,Zt=!1,ue=te.isNumber(dt.width)?dt.width:Rt,ie=te.isNumber(dt.size)?dt.size:kt,jt=te.isNumber(dt.min)?dt.min:(pe=!0,te.findMinMulti(Gt)),Lt=te.isNumber(dt.max)?dt.max:(Zt=!0,te.findMaxMulti(Gt)),Tt=Lt-jt,Dt=Tt/(ie-1);return pe&&(jt=jt-2*ue*Dt),Zt&&(Lt=Lt+2*ue*Dt),{min:jt,max:Lt}},Ye.exports.create=function(Gt,dt){if(dt=dt||{},!Gt||Gt.length===0)return[];var pe=te.isNumber(dt.size)?dt.size:kt,Zt=te.isNumber(dt.width)?dt.width:Rt,ue=We.getUnifiedMinMax(Gt,{size:pe,width:Zt,min:dt.min,max:dt.max}),ie=ue.min,jt=ue.max,Lt=jt-ie,Tt=Lt/(pe-1);if(Lt===0)return[{x:ie,y:1}];for(var Dt=[],Se=0;Se<pe;Se++)Dt.push({x:ie+Se*Tt,y:0});var ke=function(_e){return Math.floor((_e-ie)/Tt)},Qe=re(ge,Zt),Xe=Qe[Zt],qe=Qe[Zt-1]-Qe[Zt-2],ln=0;Gt.forEach(function(_e){var Me=ke(_e);if(!(Me+Zt<0||Me-Zt>=Dt.length)){var gn=Math.max(Me-Zt,0),Dn=Me,Qn=Math.min(Me+Zt,Dt.length-1),un=gn-(Me-Zt),yn=Me+Zt-Qn,vt=Qe[-Zt-1+un]||0,Yt=Qe[-Zt-1+yn]||0,et=Xe/(Xe-vt-Yt);un>0&&(ln+=et*(un-1)*qe);var lt=Math.max(0,Me-Zt+1);te.inside(0,Dt.length-1,lt)&&(Dt[lt].y+=et*1*qe),te.inside(0,Dt.length-1,Dn+1)&&(Dt[Dn+1].y-=et*2*qe),te.inside(0,Dt.length-1,Qn+1)&&(Dt[Qn+1].y+=et*1*qe)}});var $e=ln,Be=0,cn=0;return Dt.forEach(function(_e){Be+=_e.y,$e+=Be,_e.y=$e,cn+=$e}),cn>0&&Dt.forEach(function(_e){_e.y/=cn}),Dt};function re(Gt,dt){for(var pe={},Zt=0,ue=-dt;ue<=dt;ue++)Zt+=Gt(ue/dt),pe[ue]=Zt;return pe}Ye.exports.getExpectedValueFromPdf=function(Gt){if(!(!Gt||Gt.length===0)){var dt=0;return Gt.forEach(function(pe){dt+=pe.x*pe.y}),dt}},Ye.exports.getXWithLeftTailArea=function(Gt,dt){if(!(!Gt||Gt.length===0)){for(var pe=0,Zt=0,ue=0;ue<Gt.length&&(Zt=ue,pe+=Gt[ue].y,!(pe>=dt));ue++);return Gt[Zt].x}},Ye.exports.getPerplexity=function(Gt){if(!(!Gt||Gt.length===0)){var dt=0;return Gt.forEach(function(pe){var Zt=Math.log(pe.y);isFinite(Zt)&&(dt+=pe.y*Zt)}),dt=-dt/be,Math.pow(2,dt)}}},55607:function(Ye,Ve,yt){"use strict";var kt=yt(11144),Rt=Array.prototype.concat,be=Array.prototype.slice,We=Ye.exports=function(ge){for(var re=[],Gt=0,dt=ge.length;Gt<dt;Gt++){var pe=ge[Gt];kt(pe)?re=Rt.call(re,be.call(pe)):re.push(pe)}return re};We.wrap=function(te){return function(){return te(We(arguments))}}},6419:function(Ye,Ve,yt){var kt=yt(1507);function Rt(be,We){var te=typeof Symbol!="undefined"&&be[Symbol.iterator]||be["@@iterator"];if(!te){if(Array.isArray(be)||(te=kt(be))||We&&be&&typeof be.length=="number"){te&&(be=te);var ge=0,re=function(){};return{s:re,n:function(){return ge>=be.length?{done:!0}:{done:!1,value:be[ge++]}},e:function(ue){throw ue},f:re}}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 Gt=!0,dt=!1,pe;return{s:function(){te=te.call(be)},n:function(){var ue=te.next();return Gt=ue.done,ue},e:function(ue){dt=!0,pe=ue},f:function(){try{!Gt&&te.return!=null&&te.return()}finally{if(dt)throw pe}}}}Ye.exports=Rt,Ye.exports.__esModule=!0,Ye.exports.default=Ye.exports},69687:function(Ye,Ve,yt){"use strict";var kt=yt(77572);Ve.Z=kt},21769:function(Ye,Ve,yt){"use strict";yt.d(Ve,{CR:function(){return Dt},Jh:function(){return ie},Q_:function(){return gn},XA:function(){return Tt},ZT:function(){return Rt},_T:function(){return We},ev:function(){return Qe},mG:function(){return ue},pi:function(){return be},pr:function(){return ke}});var kt=function(et,lt){return kt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_t,Ot){_t.__proto__=Ot}||function(_t,Ot){for(var $t in Ot)Object.prototype.hasOwnProperty.call(Ot,$t)&&(_t[$t]=Ot[$t])},kt(et,lt)};function Rt(et,lt){if(typeof lt!="function"&&lt!==null)throw new TypeError("Class extends value "+String(lt)+" is not a constructor or null");kt(et,lt);function _t(){this.constructor=et}et.prototype=lt===null?Object.create(lt):(_t.prototype=lt.prototype,new _t)}var be=function(){return be=Object.assign||function(lt){for(var _t,Ot=1,$t=arguments.length;Ot<$t;Ot++){_t=arguments[Ot];for(var It in _t)Object.prototype.hasOwnProperty.call(_t,It)&&(lt[It]=_t[It])}return lt},be.apply(this,arguments)};function We(et,lt){var _t={};for(var Ot in et)Object.prototype.hasOwnProperty.call(et,Ot)&&lt.indexOf(Ot)<0&&(_t[Ot]=et[Ot]);if(et!=null&&typeof Object.getOwnPropertySymbols=="function")for(var $t=0,Ot=Object.getOwnPropertySymbols(et);$t<Ot.length;$t++)lt.indexOf(Ot[$t])<0&&Object.prototype.propertyIsEnumerable.call(et,Ot[$t])&&(_t[Ot[$t]]=et[Ot[$t]]);return _t}function te(et,lt,_t,Ot){var $t=arguments.length,It=$t<3?lt:Ot===null?Ot=Object.getOwnPropertyDescriptor(lt,_t):Ot,ae;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")It=Reflect.decorate(et,lt,_t,Ot);else for(var X=et.length-1;X>=0;X--)(ae=et[X])&&(It=($t<3?ae(It):$t>3?ae(lt,_t,It):ae(lt,_t))||It);return $t>3&&It&&Object.defineProperty(lt,_t,It),It}function ge(et,lt){return function(_t,Ot){lt(_t,Ot,et)}}function re(et,lt,_t,Ot,$t,It){function ae(x){if(x!==void 0&&typeof x!="function")throw new TypeError("Function expected");return x}for(var X=Ot.kind,ct=X==="getter"?"get":X==="setter"?"set":"value",ht=!lt&&et?Ot.static?et:et.prototype:null,Ut=lt||(ht?Object.getOwnPropertyDescriptor(ht,Ot.name):{}),Q,st=!1,xt=_t.length-1;xt>=0;xt--){var H={};for(var K in Ot)H[K]=K==="access"?{}:Ot[K];for(var K in Ot.access)H.access[K]=Ot.access[K];H.addInitializer=function(x){if(st)throw new TypeError("Cannot add initializers after decoration has completed");It.push(ae(x||null))};var ut=(0,_t[xt])(X==="accessor"?{get:Ut.get,set:Ut.set}:Ut[ct],H);if(X==="accessor"){if(ut===void 0)continue;if(ut===null||typeof ut!="object")throw new TypeError("Object expected");(Q=ae(ut.get))&&(Ut.get=Q),(Q=ae(ut.set))&&(Ut.set=Q),(Q=ae(ut.init))&&$t.unshift(Q)}else(Q=ae(ut))&&(X==="field"?$t.unshift(Q):Ut[ct]=Q)}ht&&Object.defineProperty(ht,Ot.name,Ut),st=!0}function Gt(et,lt,_t){for(var Ot=arguments.length>2,$t=0;$t<lt.length;$t++)_t=Ot?lt[$t].call(et,_t):lt[$t].call(et);return Ot?_t:void 0}function dt(et){return typeof et=="symbol"?et:"".concat(et)}function pe(et,lt,_t){return typeof lt=="symbol"&&(lt=lt.description?"[".concat(lt.description,"]"):""),Object.defineProperty(et,"name",{configurable:!0,value:_t?"".concat(_t," ",lt):lt})}function Zt(et,lt){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(et,lt)}function ue(et,lt,_t,Ot){function $t(It){return It instanceof _t?It:new _t(function(ae){ae(It)})}return new(_t||(_t=Promise))(function(It,ae){function X(Ut){try{ht(Ot.next(Ut))}catch(Q){ae(Q)}}function ct(Ut){try{ht(Ot.throw(Ut))}catch(Q){ae(Q)}}function ht(Ut){Ut.done?It(Ut.value):$t(Ut.value).then(X,ct)}ht((Ot=Ot.apply(et,lt||[])).next())})}function ie(et,lt){var _t={label:0,sent:function(){if(It[0]&1)throw It[1];return It[1]},trys:[],ops:[]},Ot,$t,It,ae;return ae={next:X(0),throw:X(1),return:X(2)},typeof Symbol=="function"&&(ae[Symbol.iterator]=function(){return this}),ae;function X(ht){return function(Ut){return ct([ht,Ut])}}function ct(ht){if(Ot)throw new TypeError("Generator is already executing.");for(;ae&&(ae=0,ht[0]&&(_t=0)),_t;)try{if(Ot=1,$t&&(It=ht[0]&2?$t.return:ht[0]?$t.throw||((It=$t.return)&&It.call($t),0):$t.next)&&!(It=It.call($t,ht[1])).done)return It;switch($t=0,It&&(ht=[ht[0]&2,It.value]),ht[0]){case 0:case 1:It=ht;break;case 4:return _t.label++,{value:ht[1],done:!1};case 5:_t.label++,$t=ht[1],ht=[0];continue;case 7:ht=_t.ops.pop(),_t.trys.pop();continue;default:if(It=_t.trys,!(It=It.length>0&&It[It.length-1])&&(ht[0]===6||ht[0]===2)){_t=0;continue}if(ht[0]===3&&(!It||ht[1]>It[0]&&ht[1]<It[3])){_t.label=ht[1];break}if(ht[0]===6&&_t.label<It[1]){_t.label=It[1],It=ht;break}if(It&&_t.label<It[2]){_t.label=It[2],_t.ops.push(ht);break}It[2]&&_t.ops.pop(),_t.trys.pop();continue}ht=lt.call(et,_t)}catch(Ut){ht=[6,Ut],$t=0}finally{Ot=It=0}if(ht[0]&5)throw ht[1];return{value:ht[0]?ht[1]:void 0,done:!0}}}var jt=Object.create?function(et,lt,_t,Ot){Ot===void 0&&(Ot=_t);var $t=Object.getOwnPropertyDescriptor(lt,_t);(!$t||("get"in $t?!lt.__esModule:$t.writable||$t.configurable))&&($t={enumerable:!0,get:function(){return lt[_t]}}),Object.defineProperty(et,Ot,$t)}:function(et,lt,_t,Ot){Ot===void 0&&(Ot=_t),et[Ot]=lt[_t]};function Lt(et,lt){for(var _t in et)_t!=="default"&&!Object.prototype.hasOwnProperty.call(lt,_t)&&jt(lt,et,_t)}function Tt(et){var lt=typeof Symbol=="function"&&Symbol.iterator,_t=lt&&et[lt],Ot=0;if(_t)return _t.call(et);if(et&&typeof et.length=="number")return{next:function(){return et&&Ot>=et.length&&(et=void 0),{value:et&&et[Ot++],done:!et}}};throw new TypeError(lt?"Object is not iterable.":"Symbol.iterator is not defined.")}function Dt(et,lt){var _t=typeof Symbol=="function"&&et[Symbol.iterator];if(!_t)return et;var Ot=_t.call(et),$t,It=[],ae;try{for(;(lt===void 0||lt-- >0)&&!($t=Ot.next()).done;)It.push($t.value)}catch(X){ae={error:X}}finally{try{$t&&!$t.done&&(_t=Ot.return)&&_t.call(Ot)}finally{if(ae)throw ae.error}}return It}function Se(){for(var et=[],lt=0;lt<arguments.length;lt++)et=et.concat(Dt(arguments[lt]));return et}function ke(){for(var et=0,lt=0,_t=arguments.length;lt<_t;lt++)et+=arguments[lt].length;for(var Ot=Array(et),$t=0,lt=0;lt<_t;lt++)for(var It=arguments[lt],ae=0,X=It.length;ae<X;ae++,$t++)Ot[$t]=It[ae];return Ot}function Qe(et,lt,_t){if(_t||arguments.length===2)for(var Ot=0,$t=lt.length,It;Ot<$t;Ot++)(It||!(Ot in lt))&&(It||(It=Array.prototype.slice.call(lt,0,Ot)),It[Ot]=lt[Ot]);return et.concat(It||Array.prototype.slice.call(lt))}function Xe(et){return this instanceof Xe?(this.v=et,this):new Xe(et)}function qe(et,lt,_t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var Ot=_t.apply(et,lt||[]),$t,It=[];return $t={},ae("next"),ae("throw"),ae("return"),$t[Symbol.asyncIterator]=function(){return this},$t;function ae(st){Ot[st]&&($t[st]=function(xt){return new Promise(function(H,K){It.push([st,xt,H,K])>1||X(st,xt)})})}function X(st,xt){try{ct(Ot[st](xt))}catch(H){Q(It[0][3],H)}}function ct(st){st.value instanceof Xe?Promise.resolve(st.value.v).then(ht,Ut):Q(It[0][2],st)}function ht(st){X("next",st)}function Ut(st){X("throw",st)}function Q(st,xt){st(xt),It.shift(),It.length&&X(It[0][0],It[0][1])}}function ln(et){var lt,_t;return lt={},Ot("next"),Ot("throw",function($t){throw $t}),Ot("return"),lt[Symbol.iterator]=function(){return this},lt;function Ot($t,It){lt[$t]=et[$t]?function(ae){return(_t=!_t)?{value:Xe(et[$t](ae)),done:!1}:It?It(ae):ae}:It}}function $e(et){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var lt=et[Symbol.asyncIterator],_t;return lt?lt.call(et):(et=typeof Tt=="function"?Tt(et):et[Symbol.iterator](),_t={},Ot("next"),Ot("throw"),Ot("return"),_t[Symbol.asyncIterator]=function(){return this},_t);function Ot(It){_t[It]=et[It]&&function(ae){return new Promise(function(X,ct){ae=et[It](ae),$t(X,ct,ae.done,ae.value)})}}function $t(It,ae,X,ct){Promise.resolve(ct).then(function(ht){It({value:ht,done:X})},ae)}}function Be(et,lt){return Object.defineProperty?Object.defineProperty(et,"raw",{value:lt}):et.raw=lt,et}var cn=Object.create?function(et,lt){Object.defineProperty(et,"default",{enumerable:!0,value:lt})}:function(et,lt){et.default=lt};function _e(et){if(et&&et.__esModule)return et;var lt={};if(et!=null)for(var _t in et)_t!=="default"&&Object.prototype.hasOwnProperty.call(et,_t)&&jt(lt,et,_t);return cn(lt,et),lt}function Me(et){return et&&et.__esModule?et:{default:et}}function gn(et,lt,_t,Ot){if(_t==="a"&&!Ot)throw new TypeError("Private accessor was defined without a getter");if(typeof lt=="function"?et!==lt||!Ot:!lt.has(et))throw new TypeError("Cannot read private member from an object whose class did not declare it");return _t==="m"?Ot:_t==="a"?Ot.call(et):Ot?Ot.value:lt.get(et)}function Dn(et,lt,_t,Ot,$t){if(Ot==="m")throw new TypeError("Private method is not writable");if(Ot==="a"&&!$t)throw new TypeError("Private accessor was defined without a setter");if(typeof lt=="function"?et!==lt||!$t:!lt.has(et))throw new TypeError("Cannot write private member to an object whose class did not declare it");return Ot==="a"?$t.call(et,_t):$t?$t.value=_t:lt.set(et,_t),_t}function Qn(et,lt){if(lt===null||typeof lt!="object"&&typeof lt!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof et=="function"?lt===et:et.has(lt)}function un(et,lt,_t){if(lt!=null){if(typeof lt!="object"&&typeof lt!="function")throw new TypeError("Object expected.");var Ot;if(_t){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");Ot=lt[Symbol.asyncDispose]}if(Ot===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");Ot=lt[Symbol.dispose]}if(typeof Ot!="function")throw new TypeError("Object not disposable.");et.stack.push({value:lt,dispose:Ot,async:_t})}else _t&&et.stack.push({async:!0});return lt}var yn=typeof SuppressedError=="function"?SuppressedError:function(et,lt,_t){var Ot=new Error(_t);return Ot.name="SuppressedError",Ot.error=et,Ot.suppressed=lt,Ot};function vt(et){function lt(Ot){et.error=et.hasError?new yn(Ot,et.error,"An error was suppressed during disposal."):Ot,et.hasError=!0}function _t(){for(;et.stack.length;){var Ot=et.stack.pop();try{var $t=Ot.dispose&&Ot.dispose.call(Ot.value);if(Ot.async)return Promise.resolve($t).then(_t,function(It){return lt(It),_t()})}catch(It){lt(It)}}if(et.hasError)throw et.error}return _t()}var Yt={__extends:Rt,__assign:be,__rest:We,__decorate:te,__param:ge,__metadata:Zt,__awaiter:ue,__generator:ie,__createBinding:jt,__exportStar:Lt,__values:Tt,__read:Dt,__spread:Se,__spreadArrays:ke,__spreadArray:Qe,__await:Xe,__asyncGenerator:qe,__asyncDelegator:ln,__asyncValues:$e,__makeTemplateObject:Be,__importStar:_e,__importDefault:Me,__classPrivateFieldGet:gn,__classPrivateFieldSet:Dn,__classPrivateFieldIn:Qn,__addDisposableResource:un,__disposeResources:vt}}}]);
}());