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
108 lines
1.1 MiB
!(function(){var ir=Math.pow;(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[841],{11415:function(je,Dn,tt){"use strict";tt.d(Dn,{Z:function(){return aht}});var Et={};tt.r(Et),tt.d(Et,{add:function(){return r6},adjoint:function(){return $D},clone:function(){return Px},copy:function(){return is},create:function(){return cn},determinant:function(){return Tx},equals:function(){return s6},exactEquals:function(){return o6},frob:function(){return n6},fromQuat:function(){return Z0},fromQuat2:function(){return XD},fromRotation:function(){return Lx},fromRotationTranslation:function(){return Rx},fromRotationTranslationScale:function(){return qD},fromRotationTranslationScaleOrigin:function(){return Rl},fromScaling:function(){return ss},fromTranslation:function(){return os},fromValues:function(){return HD},fromXRotation:function(){return Nx},fromYRotation:function(){return jx},fromZRotation:function(){return q0},frustum:function(){return ZD},getRotation:function(){return Xf},getScaling:function(){return uc},getTranslation:function(){return Vf},identity:function(){return as},invert:function(){return da},lookAt:function(){return zx},mul:function(){return Wx},multiply:function(){return Rr},multiplyScalar:function(){return i6},multiplyScalarAndAdd:function(){return a6},ortho:function(){return Fx},orthoNO:function(){return Dx},orthoZO:function(){return Bx},perspective:function(){return KD},perspectiveFromFieldOfView:function(){return JD},perspectiveNO:function(){return Ix},perspectiveZO:function(){return QD},rotate:function(){return UD},rotateX:function(){return kx},rotateY:function(){return Cx},rotateZ:function(){return VD},scale:function(){return Uf},set:function(){return X0},str:function(){return e6},sub:function(){return c6},subtract:function(){return Gx},targetTo:function(){return t6},translate:function(){return lc},transpose:function(){return Ax}});var lt={};tt.r(lt),tt.d(lt,{area:function(){return KH},bottom:function(){return $a},bottomLeft:function(){return $a},bottomRight:function(){return $a},inside:function(){return $a},left:function(){return $a},outside:function(){return t$},right:function(){return $a},spider:function(){return n$},surround:function(){return i$},top:function(){return $a},topLeft:function(){return $a},topRight:function(){return $a}});var te={};tt.r(te),tt.d(te,{interpolateBlues:function(){return TU},interpolateBrBG:function(){return cU},interpolateBuGn:function(){return yU},interpolateBuPu:function(){return mU},interpolateCividis:function(){return RU},interpolateCool:function(){return GU},interpolateCubehelixDefault:function(){return BU},interpolateGnBu:function(){return bU},interpolateGreens:function(){return kU},interpolateGreys:function(){return CU},interpolateInferno:function(){return qU},interpolateMagma:function(){return XU},interpolateOrRd:function(){return xU},interpolateOranges:function(){return jU},interpolatePRGn:function(){return lU},interpolatePiYG:function(){return uU},interpolatePlasma:function(){return ZU},interpolatePuBu:function(){return OU},interpolatePuBuGn:function(){return _U},interpolatePuOr:function(){return fU},interpolatePuRd:function(){return wU},interpolatePurples:function(){return LU},interpolateRainbow:function(){return WU},interpolateRdBu:function(){return dU},interpolateRdGy:function(){return hU},interpolateRdPu:function(){return SU},interpolateRdYlBu:function(){return pU},interpolateRdYlGn:function(){return vU},interpolateReds:function(){return NU},interpolateSinebow:function(){return $U},interpolateSpectral:function(){return gU},interpolateTurbo:function(){return UU},interpolateViridis:function(){return VU},interpolateWarm:function(){return zU},interpolateYlGn:function(){return EU},interpolateYlGnBu:function(){return MU},interpolateYlOrBr:function(){return PU},interpolateYlOrRd:function(){return AU},schemeAccent:function(){return U$},schemeBlues:function(){return uM},schemeBrBG:function(){return YS},schemeBuGn:function(){return QS},schemeBuPu:function(){return JS},schemeCategory10:function(){return $$},schemeDark2:function(){return V$},schemeGnBu:function(){return tM},schemeGreens:function(){return fM},schemeGreys:function(){return dM},schemeObservable10:function(){return X$},schemeOrRd:function(){return eM},schemeOranges:function(){return vM},schemePRGn:function(){return HS},schemePaired:function(){return q$},schemePastel1:function(){return Z$},schemePastel2:function(){return K$},schemePiYG:function(){return $S},schemePuBu:function(){return rM},schemePuBuGn:function(){return nM},schemePuOr:function(){return US},schemePuRd:function(){return iM},schemePurples:function(){return hM},schemeRdBu:function(){return VS},schemeRdGy:function(){return XS},schemeRdPu:function(){return aM},schemeRdYlBu:function(){return qS},schemeRdYlGn:function(){return ZS},schemeReds:function(){return pM},schemeSet1:function(){return Q$},schemeSet2:function(){return J$},schemeSet3:function(){return tU},schemeSpectral:function(){return KS},schemeTableau10:function(){return eU},schemeYlGn:function(){return sM},schemeYlGnBu:function(){return oM},schemeYlOrBr:function(){return cM},schemeYlOrRd:function(){return lM}});var xe={};tt.r(xe),tt.d(xe,{geoAlbers:function(){return C5},geoAlbersUsa:function(){return Brt},geoAzimuthalEqualArea:function(){return zrt},geoAzimuthalEqualAreaRaw:function(){return P1},geoAzimuthalEquidistant:function(){return Grt},geoAzimuthalEquidistantRaw:function(){return A1},geoConicConformal:function(){return Yrt},geoConicConformalRaw:function(){return j5},geoConicEqualArea:function(){return Bp},geoConicEqualAreaRaw:function(){return k5},geoConicEquidistant:function(){return $rt},geoConicEquidistantRaw:function(){return R5},geoEqualEarth:function(){return Vrt},geoEqualEarthRaw:function(){return T1},geoEquirectangular:function(){return Hrt},geoEquirectangularRaw:function(){return hf},geoGnomonic:function(){return Xrt},geoGnomonicRaw:function(){return k1},geoIdentity:function(){return qrt},geoMercator:function(){return Wrt},geoMercatorRaw:function(){return df},geoNaturalEarth1:function(){return Zrt},geoNaturalEarth1Raw:function(){return C1},geoOrthographic:function(){return Krt},geoOrthographicRaw:function(){return L1},geoProjection:function(){return Ca},geoProjectionMutator:function(){return M1},geoStereographic:function(){return Qrt},geoStereographicRaw:function(){return N1},geoTransverseMercator:function(){return Jrt},geoTransverseMercatorRaw:function(){return j1}});var zt={};tt.r(zt),tt.d(zt,{frequency:function(){return Jat},id:function(){return tot},name:function(){return eot},weight:function(){return Qat}});var mt=tt(67294),bt=tt(73935),At=tt.t(bt,2),Q=function(){return Q=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},Q.apply(this,arguments)},jt=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())})},St=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}}},kt=Q({},At),pt=kt.version,ut=kt.render,ot=kt.unmountComponentAtNode,rt;try{var ht=Number((pt||"").split(".")[0]);ht>=18&&(rt=kt.createRoot)}catch(t){}function Wt(t){var e=kt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;e&&typeof e=="object"&&(e.usingClientEntryPoint=t)}var ae="__rc_react_root__";function We(t,e){Wt(!0);var n=e[ae]||rt(e);Wt(!1),n.render(t),e[ae]=n}function ke(t,e){ut(t,e)}function Ie(t,e){}function Ve(t,e){if(rt){We(t,e);return}ke(t,e)}function we(t){return jt(this,void 0,void 0,function(){return St(this,function(e){return[2,Promise.resolve().then(function(){var n;(n=t[ae])===null||n===void 0||n.unmount(),delete t[ae]})]})})}function Je(t){ot(t)}function Xe(t){}function Zt(t){return jt(this,void 0,void 0,function(){return St(this,function(e){return rt!==void 0?[2,we(t)]:(Je(t),[2])})})}var Vt=new Map;Vt.set("tooltip",document.createElement("div"));var ar=function(t,e){e===void 0&&(e=!1);var n=null;if(e)n=Vt.get("tooltip");else if(n=document.createElement("div"),t!=null&&t.key){var r=Vt.get(t.key);r?n=r:Vt.set(t.key,n)}return Ve(t,n),n},xr=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)},Tr=function(t){var e=t.loadingTemplate,n=t.theme,r=n===void 0?"light":n,i=mt.useRef(null);mt.useEffect(function(){!e&&i.current&&xr(i.current)},[]);var a=function(){return e||mt.createElement("div",{ref:i})};return mt.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())},hr=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)}}(),Qn=function(t){hr(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||mt.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):mt.createElement(mt.Fragment,null,this.props.children)},e}(mt.Component),pr=typeof global=="object"&&global&&global.Object===Object&&global,ei=pr,mi=typeof self=="object"&&self&&self.Object===Object&&self,Ei=ei||mi||Function("return this")(),$n=Ei,vr=$n.Symbol,Jn=vr,lr=Object.prototype,tn=lr.hasOwnProperty,Pi=lr.toString,Ai=Jn?Jn.toStringTag:void 0;function bl(t){var e=tn.call(t,Ai),n=t[Ai];try{t[Ai]=void 0;var r=!0}catch(a){}var i=Pi.call(t);return r&&(e?t[Ai]=n:delete t[Ai]),i}var Yo=bl,Zs=Object.prototype,Xi=Zs.toString;function xl(t){return Xi.call(t)}var _l=xl,Ks="[object Null]",Ol="[object Undefined]",eo=Jn?Jn.toStringTag:void 0;function Qs(t){return t==null?t===void 0?Ol:Ks:eo&&eo in Object(t)?Yo(t):_l(t)}var _r=Qs;function Js(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var bn=Js,tc="[object AsyncFunction]",Ho="[object Function]",ee="[object GeneratorFunction]",ft="[object Proxy]";function ve(t){if(!bn(t))return!1;var e=_r(t);return e==Ho||e==ee||e==tc||e==ft}var Yt=ve,Ae=function(t){var e=/react|\.jsx|children:\[\(|return\s+[A-Za-z0-9].createElement\((?!['"][g|circle|ellipse|image|rect|line|polyline|polygon|text|path|html|mesh]['"])([^\)])*,/i;return e.test(t)},Tn=Array.isArray,Xt=Tn;function he(){this.__data__=[],this.size=0}var Ye=he;function Rn(t,e){return t===e||t!==t&&e!==e}var xn=Rn;function Ce(t,e){for(var n=t.length;n--;)if(xn(t[n][0],e))return n;return-1}var ue=Ce,kr=Array.prototype,Cr=kr.splice;function oa(t){var e=this.__data__,n=ue(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():Cr.call(e,n,1),--this.size,!0}var Ti=oa;function or(t){var e=this.__data__,n=ue(e,t);return n<0?void 0:e[n][1]}var ki=or;function sa(t){return ue(this.__data__,t)>-1}var Or=sa;function ni(t,e){var n=this.__data__,r=ue(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}var $r=ni;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=Ye,Ci.prototype.delete=Ti,Ci.prototype.get=ki,Ci.prototype.has=Or,Ci.prototype.set=$r;var ca=Ci;function $o(){this.__data__=new ca,this.size=0}var no=$o;function ro(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}var la=ro;function Uo(t){return this.__data__.get(t)}var wl=Uo;function Sl(t){return this.__data__.has(t)}var Vo=Sl,Xo=$n["__core-js_shared__"],io=Xo,kf=function(){var t=/[^.]+$/.exec(io&&io.keys&&io.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function d0(t){return!!kf&&kf in t}var h0=d0,p0=Function.prototype,v0=p0.toString;function g0(t){if(t!=null){try{return v0.call(t)}catch(e){}try{return t+""}catch(e){}}return""}var La=g0,y0=/[\\^$.*+?()[\]{}|]/g,Lr=/^\[object .+?Constructor\]$/,Nr=Function.prototype,L=Object.prototype,j=Nr.toString,B=L.hasOwnProperty,G=RegExp("^"+j.call(B).replace(y0,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function V(t){if(!bn(t)||h0(t))return!1;var e=Yt(t)?G:Lr;return e.test(La(t))}var X=V;function Y(t,e){return t==null?void 0:t[e]}var H=Y;function q(t,e){var n=H(t,e);return X(n)?n:void 0}var Z=q,Ot=Z($n,"Map"),wt=Ot,Ft=Z(Object,"create"),yt=Ft;function Rt(){this.__data__=yt?yt(null):{},this.size=0}var Ct=Rt;function vt(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var $t=vt,Dt="__lodash_hash_undefined__",Ut=Object.prototype,Lt=Ut.hasOwnProperty;function Ht(t){var e=this.__data__;if(yt){var n=e[t];return n===Dt?void 0:n}return Lt.call(e,t)?e[t]:void 0}var _e=Ht,Ur=Object.prototype,ri=Ur.hasOwnProperty;function wr(t){var e=this.__data__;return yt?e[t]!==void 0:ri.call(e,t)}var Vr=wr,bi="__lodash_hash_undefined__";function In(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=yt&&e===void 0?bi:e,this}var _n=In;function qi(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])}}qi.prototype.clear=Ct,qi.prototype.delete=$t,qi.prototype.get=_e,qi.prototype.has=Vr,qi.prototype.set=_n;var Cf=qi;function qo(){this.size=0,this.__data__={hash:new Cf,map:new(wt||ca),string:new Cf}}var Zi=qo;function ur(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var Zo=ur;function Ko(t,e){var n=t.__data__;return Zo(e)?n[typeof e=="string"?"string":"hash"]:n.map}var ua=Ko;function fa(t){var e=ua(this,t).delete(t);return this.size-=e?1:0,e}var TN=fa;function kN(t){return ua(this,t).get(t)}var CN=kN;function LN(t){return ua(this,t).has(t)}var NN=LN;function jN(t,e){var n=ua(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}var RN=jN;function ec(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])}}ec.prototype.clear=Zi,ec.prototype.delete=TN,ec.prototype.get=CN,ec.prototype.has=NN,ec.prototype.set=RN;var Lf=ec,IN=200;function DN(t,e){var n=this.__data__;if(n instanceof ca){var r=n.__data__;if(!wt||r.length<IN-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Lf(r)}return n.set(t,e),this.size=n.size,this}var FN=DN;function nc(t){var e=this.__data__=new ca(t);this.size=e.size}nc.prototype.clear=no,nc.prototype.delete=la,nc.prototype.get=wl,nc.prototype.has=Vo,nc.prototype.set=FN;var rc=nc,BN="__lodash_hash_undefined__";function zN(t){return this.__data__.set(t,BN),this}var GN=zN;function WN(t){return this.__data__.has(t)}var YN=WN;function Nf(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new Lf;++e<n;)this.add(t[e])}Nf.prototype.add=Nf.prototype.push=GN,Nf.prototype.has=YN;var Sb=Nf;function HN(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 $N=HN;function UN(t,e){return t.has(e)}var Mb=UN,VN=1,XN=2;function qN(t,e,n,r,i,a){var o=n&VN,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&XN?new Sb: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(!$N(e,function(y,m){if(!Mb(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 Eb=qN,ZN=$n.Uint8Array,jf=ZN;function KN(t){var e=-1,n=Array(t.size);return t.forEach(function(r,i){n[++e]=[i,r]}),n}var QN=KN;function JN(t){var e=-1,n=Array(t.size);return t.forEach(function(r){n[++e]=r}),n}var m0=JN,tj=1,ej=2,nj="[object Boolean]",rj="[object Date]",ij="[object Error]",aj="[object Map]",oj="[object Number]",sj="[object RegExp]",cj="[object Set]",lj="[object String]",uj="[object Symbol]",fj="[object ArrayBuffer]",dj="[object DataView]",Pb=Jn?Jn.prototype:void 0,b0=Pb?Pb.valueOf:void 0;function hj(t,e,n,r,i,a,o){switch(n){case dj:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case fj:return!(t.byteLength!=e.byteLength||!a(new jf(t),new jf(e)));case nj:case rj:case oj:return xn(+t,+e);case ij:return t.name==e.name&&t.message==e.message;case sj:case lj:return t==e+"";case aj:var s=QN;case cj:var c=r&tj;if(s||(s=m0),t.size!=e.size&&!c)return!1;var l=o.get(t);if(l)return l==e;r|=ej,o.set(t,e);var u=Eb(s(t),s(e),r,i,a,o);return o.delete(t),u;case uj:if(b0)return b0.call(t)==b0.call(e)}return!1}var pj=hj;function vj(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}var x0=vj;function gj(t,e,n){var r=e(t);return Xt(t)?r:x0(r,n(t))}var Ab=gj;function yj(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 mj=yj;function bj(){return[]}var Tb=bj,xj=Object.prototype,_j=xj.propertyIsEnumerable,kb=Object.getOwnPropertySymbols,Oj=kb?function(t){return t==null?[]:(t=Object(t),mj(kb(t),function(e){return _j.call(t,e)}))}:Tb,_0=Oj;function wj(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}var Sj=wj;function Mj(t){return t!=null&&typeof t=="object"}var ii=Mj,Ej="[object Arguments]";function Pj(t){return ii(t)&&_r(t)==Ej}var Cb=Pj,Lb=Object.prototype,Aj=Lb.hasOwnProperty,Tj=Lb.propertyIsEnumerable,kj=Cb(function(){return arguments}())?Cb:function(t){return ii(t)&&Aj.call(t,"callee")&&!Tj.call(t,"callee")},Ml=kj;function Cj(){return!1}var Lj=Cj,Nb=typeof exports=="object"&&exports&&!exports.nodeType&&exports,jb=Nb&&typeof module=="object"&&module&&!module.nodeType&&module,Nj=jb&&jb.exports===Nb,Rb=Nj?$n.Buffer:void 0,jj=Rb?Rb.isBuffer:void 0,Rj=jj||Lj,El=Rj,Ij=9007199254740991,Dj=/^(?:0|[1-9]\d*)$/;function Fj(t,e){var n=typeof t;return e=e==null?Ij:e,!!e&&(n=="number"||n!="symbol"&&Dj.test(t))&&t>-1&&t%1==0&&t<e}var Rf=Fj,Bj=9007199254740991;function zj(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Bj}var O0=zj,Gj="[object Arguments]",Wj="[object Array]",Yj="[object Boolean]",Hj="[object Date]",$j="[object Error]",Uj="[object Function]",Vj="[object Map]",Xj="[object Number]",qj="[object Object]",Zj="[object RegExp]",Kj="[object Set]",Qj="[object String]",Jj="[object WeakMap]",t4="[object ArrayBuffer]",e4="[object DataView]",n4="[object Float32Array]",r4="[object Float64Array]",i4="[object Int8Array]",a4="[object Int16Array]",o4="[object Int32Array]",s4="[object Uint8Array]",c4="[object Uint8ClampedArray]",l4="[object Uint16Array]",u4="[object Uint32Array]",kn={};kn[n4]=kn[r4]=kn[i4]=kn[a4]=kn[o4]=kn[s4]=kn[c4]=kn[l4]=kn[u4]=!0,kn[Gj]=kn[Wj]=kn[t4]=kn[Yj]=kn[e4]=kn[Hj]=kn[$j]=kn[Uj]=kn[Vj]=kn[Xj]=kn[qj]=kn[Zj]=kn[Kj]=kn[Qj]=kn[Jj]=!1;function f4(t){return ii(t)&&O0(t.length)&&!!kn[_r(t)]}var d4=f4;function h4(t){return function(e){return t(e)}}var w0=h4,Ib=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Pl=Ib&&typeof module=="object"&&module&&!module.nodeType&&module,p4=Pl&&Pl.exports===Ib,S0=p4&&ei.process,v4=function(){try{var t=Pl&&Pl.require&&Pl.require("util").types;return t||S0&&S0.binding&&S0.binding("util")}catch(e){}}(),ic=v4,Db=ic&&ic.isTypedArray,g4=Db?w0(Db):d4,M0=g4,y4=Object.prototype,m4=y4.hasOwnProperty;function b4(t,e){var n=Xt(t),r=!n&&Ml(t),i=!n&&!r&&El(t),a=!n&&!r&&!i&&M0(t),o=n||r||i||a,s=o?Sj(t.length,String):[],c=s.length;for(var l in t)(e||m4.call(t,l))&&!(o&&(l=="length"||i&&(l=="offset"||l=="parent")||a&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||Rf(l,c)))&&s.push(l);return s}var Fb=b4,x4=Object.prototype;function _4(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||x4;return t===n}var If=_4;function O4(t,e){return function(n){return t(e(n))}}var Bb=O4,w4=Bb(Object.keys,Object),S4=w4,M4=Object.prototype,E4=M4.hasOwnProperty;function P4(t){if(!If(t))return S4(t);var e=[];for(var n in Object(t))E4.call(t,n)&&n!="constructor"&&e.push(n);return e}var A4=P4;function T4(t){return t!=null&&O0(t.length)&&!Yt(t)}var ao=T4;function k4(t){return ao(t)?Fb(t):A4(t)}var Qo=k4;function C4(t){return Ab(t,Qo,_0)}var E0=C4,L4=1,N4=Object.prototype,j4=N4.hasOwnProperty;function R4(t,e,n,r,i,a){var o=n&L4,s=E0(t),c=s.length,l=E0(e),u=l.length;if(c!=u&&!o)return!1;for(var f=c;f--;){var d=s[f];if(!(o?d in e:j4.call(e,d)))return!1}var h=a.get(t),p=a.get(e);if(h&&p)return h==e&&p==t;var v=!0;a.set(t,e),a.set(e,t);for(var g=o;++f<c;){d=s[f];var y=t[d],m=e[d];if(r)var b=o?r(m,y,d,e,t,a):r(y,m,d,t,e,a);if(!(b===void 0?y===m||i(y,m,n,r,a):b)){v=!1;break}g||(g=d=="constructor")}if(v&&!g){var x=t.constructor,_=e.constructor;x!=_&&"constructor"in t&&"constructor"in e&&!(typeof x=="function"&&x instanceof x&&typeof _=="function"&&_ instanceof _)&&(v=!1)}return a.delete(t),a.delete(e),v}var I4=R4,D4=Z($n,"DataView"),P0=D4,F4=Z($n,"Promise"),A0=F4,B4=Z($n,"Set"),ac=B4,z4=Z($n,"WeakMap"),Al=z4,zb="[object Map]",G4="[object Object]",Gb="[object Promise]",Wb="[object Set]",Yb="[object WeakMap]",Hb="[object DataView]",W4=La(P0),Y4=La(wt),H4=La(A0),$4=La(ac),U4=La(Al),Jo=_r;(P0&&Jo(new P0(new ArrayBuffer(1)))!=Hb||wt&&Jo(new wt)!=zb||A0&&Jo(A0.resolve())!=Gb||ac&&Jo(new ac)!=Wb||Al&&Jo(new Al)!=Yb)&&(Jo=function(t){var e=_r(t),n=e==G4?t.constructor:void 0,r=n?La(n):"";if(r)switch(r){case W4:return Hb;case Y4:return zb;case H4:return Gb;case $4:return Wb;case U4:return Yb}return e});var Tl=Jo,V4=1,$b="[object Arguments]",Ub="[object Array]",Df="[object Object]",X4=Object.prototype,Vb=X4.hasOwnProperty;function q4(t,e,n,r,i,a){var o=Xt(t),s=Xt(e),c=o?Ub:Tl(t),l=s?Ub:Tl(e);c=c==$b?Df:c,l=l==$b?Df:l;var u=c==Df,f=l==Df,d=c==l;if(d&&El(t)){if(!El(e))return!1;o=!0,u=!1}if(d&&!u)return a||(a=new rc),o||M0(t)?Eb(t,e,n,r,i,a):pj(t,e,c,n,r,i,a);if(!(n&V4)){var h=u&&Vb.call(t,"__wrapped__"),p=f&&Vb.call(e,"__wrapped__");if(h||p){var v=h?t.value():t,g=p?e.value():e;return a||(a=new rc),i(v,g,n,r,a)}}return d?(a||(a=new rc),I4(t,e,n,r,i,a)):!1}var Z4=q4;function Xb(t,e,n,r,i){return t===e?!0:t==null||e==null||!ii(t)&&!ii(e)?t!==t&&e!==e:Z4(t,e,n,r,Xb,i)}var T0=Xb;function K4(t,e){return T0(t,e)}var qb=K4;function Q4(t,e){for(var n=-1,r=t==null?0:t.length;++n<r&&e(t[n],n,t)!==!1;);return t}var J4=Q4,tR=function(){try{var t=Z(Object,"defineProperty");return t({},"",{}),t}catch(e){}}(),Ff=tR;function eR(t,e,n){e=="__proto__"&&Ff?Ff(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}var Bf=eR,nR=Object.prototype,rR=nR.hasOwnProperty;function iR(t,e,n){var r=t[e];(!(rR.call(t,e)&&xn(r,n))||n===void 0&&!(e in t))&&Bf(t,e,n)}var zf=iR;function aR(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?Bf(n,s,c):zf(n,s,c)}return n}var ts=aR;function oR(t,e){return t&&ts(e,Qo(e),t)}var sR=oR;function cR(t){var e=[];if(t!=null)for(var n in Object(t))e.push(n);return e}var lR=cR,uR=Object.prototype,fR=uR.hasOwnProperty;function dR(t){if(!bn(t))return lR(t);var e=If(t),n=[];for(var r in t)r=="constructor"&&(e||!fR.call(t,r))||n.push(r);return n}var hR=dR;function pR(t){return ao(t)?Fb(t,!0):hR(t)}var kl=pR;function vR(t,e){return t&&ts(e,kl(e),t)}var gR=vR,Zb=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Kb=Zb&&typeof module=="object"&&module&&!module.nodeType&&module,yR=Kb&&Kb.exports===Zb,Qb=yR?$n.Buffer:void 0,Jb=Qb?Qb.allocUnsafe:void 0;function mR(t,e){if(e)return t.slice();var n=t.length,r=Jb?Jb(n):new t.constructor(n);return t.copy(r),r}var tx=mR;function bR(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}var k0=bR;function xR(t,e){return ts(t,_0(t),e)}var _R=xR,OR=Bb(Object.getPrototypeOf,Object),C0=OR,wR=Object.getOwnPropertySymbols,SR=wR?function(t){for(var e=[];t;)x0(e,_0(t)),t=C0(t);return e}:Tb,ex=SR;function MR(t,e){return ts(t,ex(t),e)}var ER=MR;function PR(t){return Ab(t,kl,ex)}var nx=PR,AR=Object.prototype,TR=AR.hasOwnProperty;function kR(t){var e=t.length,n=new t.constructor(e);return e&&typeof t[0]=="string"&&TR.call(t,"index")&&(n.index=t.index,n.input=t.input),n}var CR=kR;function LR(t){var e=new t.constructor(t.byteLength);return new jf(e).set(new jf(t)),e}var L0=LR;function NR(t,e){var n=e?L0(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}var jR=NR,RR=/\w*$/;function IR(t){var e=new t.constructor(t.source,RR.exec(t));return e.lastIndex=t.lastIndex,e}var DR=IR,rx=Jn?Jn.prototype:void 0,ix=rx?rx.valueOf:void 0;function FR(t){return ix?Object(ix.call(t)):{}}var BR=FR;function zR(t,e){var n=e?L0(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}var ax=zR,GR="[object Boolean]",WR="[object Date]",YR="[object Map]",HR="[object Number]",$R="[object RegExp]",UR="[object Set]",VR="[object String]",XR="[object Symbol]",qR="[object ArrayBuffer]",ZR="[object DataView]",KR="[object Float32Array]",QR="[object Float64Array]",JR="[object Int8Array]",tI="[object Int16Array]",eI="[object Int32Array]",nI="[object Uint8Array]",rI="[object Uint8ClampedArray]",iI="[object Uint16Array]",aI="[object Uint32Array]";function oI(t,e,n){var r=t.constructor;switch(e){case qR:return L0(t);case GR:case WR:return new r(+t);case ZR:return jR(t,n);case KR:case QR:case JR:case tI:case eI:case nI:case rI:case iI:case aI:return ax(t,n);case YR:return new r;case HR:case VR:return new r(t);case $R:return DR(t);case UR:return new r;case XR:return BR(t)}}var sI=oI,ox=Object.create,cI=function(){function t(){}return function(e){if(!bn(e))return{};if(ox)return ox(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}(),N0=cI;function lI(t){return typeof t.constructor=="function"&&!If(t)?N0(C0(t)):{}}var sx=lI,uI="[object Map]";function fI(t){return ii(t)&&Tl(t)==uI}var dI=fI,cx=ic&&ic.isMap,hI=cx?w0(cx):dI,pI=hI,vI="[object Set]";function gI(t){return ii(t)&&Tl(t)==vI}var yI=gI,lx=ic&&ic.isSet,mI=lx?w0(lx):yI,bI=mI,xI=1,_I=2,OI=4,ux="[object Arguments]",wI="[object Array]",SI="[object Boolean]",MI="[object Date]",EI="[object Error]",fx="[object Function]",PI="[object GeneratorFunction]",AI="[object Map]",TI="[object Number]",dx="[object Object]",kI="[object RegExp]",CI="[object Set]",LI="[object String]",NI="[object Symbol]",jI="[object WeakMap]",RI="[object ArrayBuffer]",II="[object DataView]",DI="[object Float32Array]",FI="[object Float64Array]",BI="[object Int8Array]",zI="[object Int16Array]",GI="[object Int32Array]",WI="[object Uint8Array]",YI="[object Uint8ClampedArray]",HI="[object Uint16Array]",$I="[object Uint32Array]",On={};On[ux]=On[wI]=On[RI]=On[II]=On[SI]=On[MI]=On[DI]=On[FI]=On[BI]=On[zI]=On[GI]=On[AI]=On[TI]=On[dx]=On[kI]=On[CI]=On[LI]=On[NI]=On[WI]=On[YI]=On[HI]=On[$I]=!0,On[EI]=On[fx]=On[jI]=!1;function Gf(t,e,n,r,i,a){var o,s=e&xI,c=e&_I,l=e&OI;if(n&&(o=i?n(t,r,i,a):n(t)),o!==void 0)return o;if(!bn(t))return t;var u=Xt(t);if(u){if(o=CR(t),!s)return k0(t,o)}else{var f=Tl(t),d=f==fx||f==PI;if(El(t))return tx(t,s);if(f==dx||f==ux||d&&!i){if(o=c||d?{}:sx(t),!s)return c?ER(t,gR(o,t)):_R(t,sR(o,t))}else{if(!On[f])return i?t:{};o=sI(t,f,s)}}a||(a=new rc);var h=a.get(t);if(h)return h;a.set(t,o),bI(t)?t.forEach(function(g){o.add(Gf(g,e,n,g,t,a))}):pI(t)&&t.forEach(function(g,y){o.set(y,Gf(g,e,n,y,t,a))});var p=l?c?nx:E0:c?kl:Qo,v=u?void 0:p(t);return J4(v||t,function(g,y){v&&(y=g,g=t[y]),zf(o,y,Gf(g,e,n,y,t,a))}),o}var hx=Gf,UI=1,VI=4;function XI(t){return hx(t,UI|VI)}var px=XI,qI="[object Symbol]";function ZI(t){return typeof t=="symbol"||ii(t)&&_r(t)==qI}var Cl=ZI,KI=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,QI=/^\w*$/;function JI(t,e){if(Xt(t))return!1;var n=typeof t;return n=="number"||n=="symbol"||n=="boolean"||t==null||Cl(t)?!0:QI.test(t)||!KI.test(t)||e!=null&&t in Object(e)}var j0=JI,tD="Expected a function";function R0(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(tD);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(R0.Cache||Lf),n}R0.Cache=Lf;var eD=R0,nD=500;function rD(t){var e=eD(t,function(r){return n.size===nD&&n.clear(),r}),n=e.cache;return e}var iD=rD,aD=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,oD=/\\(\\)?/g,sD=iD(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(aD,function(n,r,i,a){e.push(i?a.replace(oD,"$1"):r||n)}),e}),cD=sD;function lD(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 Wf=lD,uD=1/0,vx=Jn?Jn.prototype:void 0,gx=vx?vx.toString:void 0;function yx(t){if(typeof t=="string")return t;if(Xt(t))return Wf(t,yx)+"";if(Cl(t))return gx?gx.call(t):"";var e=t+"";return e=="0"&&1/t==-uD?"-0":e}var I0=yx;function fD(t){return t==null?"":I0(t)}var D0=fD;function dD(t,e){return Xt(t)?t:j0(t,e)?[t]:cD(D0(t))}var oc=dD,hD=1/0;function pD(t){if(typeof t=="string"||Cl(t))return t;var e=t+"";return e=="0"&&1/t==-hD?"-0":e}var sc=pD;function vD(t,e){e=oc(e,t);for(var n=0,r=e.length;t!=null&&n<r;)t=t[sc(e[n++])];return n&&n==r?t:void 0}var Yf=vD;function gD(t,e,n){var r=t==null?void 0:Yf(t,e);return r===void 0?n:r}var pn=gD,F0=function(){return F0=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},F0.apply(this,arguments)},mx=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);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 yD(t,e){var n=(0,mt.useRef)(),r=(0,mt.useRef)(),i=(0,mt.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),Yt(v)&&Ae("".concat(v))?u[p]=function(){for(var g=[],y=0;y<arguments.length;y++)g[y]=arguments[y];return ar(v.apply(void 0,g),h)}:Xt(v)?v.forEach(function(g){l(g,h)}):bn(v)?l(v,h):h=f})};return(0,mt.useEffect)(function(){if(n.current&&!qb(r.current,e)){var u=!1;if(r.current){var f=r.current,d=f.data,h=mx(f,["data"]),p=e.data,v=mx(e,["data"]);u=qb(h,v)}r.current=px(e),u?n.current.changeData(pn(e,"data")):(l(e),n.current.update(e),n.current.render())}},[e]),(0,mt.useEffect)(function(){if(!i.current)return function(){return null};r.current||(r.current=px(e)),l(e);var u=new t(i.current,F0({},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 mD="*",bD=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[mD]||[],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}(),B0=bD;const bx="main-layer",z0="label-layer",Na="element",G0="view",Ll="plot",xx="component",W0="label",_x="area",lht="mask",Ox={};function wx(t,e){Object.assign(Ox,{[t]:e})}var Y0=function(t,e){return Y0=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},Y0(t,e)};function It(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Y0(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var J=function(){return J=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},J.apply(this,arguments)};function wn(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);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 xD(t,e,n,r){var i=arguments.length,a=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,n,a):o(e,n))||a);return i>3&&a&&Object.defineProperty(e,n,a),a}function _D(t,e){return function(n,r){e(n,r,t)}}function uht(t,e,n,r,i,a){function o(y){if(y!==void 0&&typeof y!="function")throw new TypeError("Function expected");return y}for(var s=r.kind,c=s==="getter"?"get":s==="setter"?"set":"value",l=!e&&t?r.static?t:t.prototype:null,u=e||(l?Object.getOwnPropertyDescriptor(l,r.name):{}),f,d=!1,h=n.length-1;h>=0;h--){var p={};for(var v in r)p[v]=v==="access"?{}:r[v];for(var v in r.access)p.access[v]=r.access[v];p.addInitializer=function(y){if(d)throw new TypeError("Cannot add initializers after decoration has completed");a.push(o(y||null))};var g=(0,n[h])(s==="accessor"?{get:u.get,set:u.set}:u[c],p);if(s==="accessor"){if(g===void 0)continue;if(g===null||typeof g!="object")throw new TypeError("Object expected");(f=o(g.get))&&(u.get=f),(f=o(g.set))&&(u.set=f),(f=o(g.init))&&i.unshift(f)}else(f=o(g))&&(s==="field"?i.unshift(f):u[c]=f)}l&&Object.defineProperty(l,r.name,u),d=!0}function fht(t,e,n){for(var r=arguments.length>2,i=0;i<e.length;i++)n=r?e[i].call(t,n):e[i].call(t);return r?n:void 0}function dht(t){return typeof t=="symbol"?t:"".concat(t)}function hht(t,e,n){return typeof e=="symbol"&&(e=e.description?"[".concat(e.description,"]"):""),Object.defineProperty(t,"name",{configurable:!0,value:n?"".concat(n," ",e):e})}function OD(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}function es(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 ns(t,e){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,l[0]&&(n=0)),n;)try{if(r=1,i&&(a=l[0]&2?i.return:l[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,l[1])).done)return a;switch(i=0,a&&(l=[l[0]&2,a.value]),l[0]){case 0:case 1:a=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]<a[3])){n.label=l[1];break}if(l[0]===6&&n.label<a[1]){n.label=a[1],a=l;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(l);break}a[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(t,n)}catch(u){l=[6,u],i=0}finally{r=a=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}var H0=Object.create?function(t,e,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){r===void 0&&(r=n),t[r]=e[n]};function wD(t,e){for(var n in t)n!=="default"&&!Object.prototype.hasOwnProperty.call(e,n)&&H0(e,t,n)}function jr(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function D(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,a=[],o;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function SD(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(D(arguments[e]));return t}function MD(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;for(var r=Array(t),i=0,e=0;e<n;e++)for(var a=arguments[e],o=0,s=a.length;o<s;o++,i++)r[i]=a[o];return r}function dt(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 Nl(t){return this instanceof Nl?(this.v=t,this):new Nl(t)}function ED(t,e,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(t,e||[]),i,a=[];return i={},o("next"),o("throw"),o("return"),i[Symbol.asyncIterator]=function(){return this},i;function o(d){r[d]&&(i[d]=function(h){return new Promise(function(p,v){a.push([d,h,p,v])>1||s(d,h)})})}function s(d,h){try{c(r[d](h))}catch(p){f(a[0][3],p)}}function c(d){d.value instanceof Nl?Promise.resolve(d.value.v).then(l,u):f(a[0][2],d)}function l(d){s("next",d)}function u(d){s("throw",d)}function f(d,h){d(h),a.shift(),a.length&&s(a[0][0],a[0][1])}}function PD(t){var e,n;return e={},r("next"),r("throw",function(i){throw i}),r("return"),e[Symbol.iterator]=function(){return this},e;function r(i,a){e[i]=t[i]?function(o){return(n=!n)?{value:Nl(t[i](o)),done:!1}:a?a(o):o}:a}}function AD(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],n;return e?e.call(t):(t=typeof jr=="function"?jr(t):t[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(a){n[a]=t[a]&&function(o){return new Promise(function(s,c){o=t[a](o),i(s,c,o.done,o.value)})}}function i(a,o,s,c){Promise.resolve(c).then(function(l){a({value:l,done:s})},o)}}function TD(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}var kD=Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e};function CD(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var n in t)n!=="default"&&Object.prototype.hasOwnProperty.call(t,n)&&H0(e,t,n);return kD(e,t),e}function LD(t){return t&&t.__esModule?t:{default:t}}function Hf(t,e,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(t):r?r.value:e.get(t)}function ND(t,e,n,r,i){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?i.call(t,n):i?i.value=n:e.set(t,n),n}function jD(t,e){if(e===null||typeof e!="object"&&typeof e!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof t=="function"?e===t:t.has(e)}function RD(t,e,n){if(e!=null){if(typeof e!="object"&&typeof e!="function")throw new TypeError("Object expected.");var r;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");r=e[Symbol.asyncDispose]}if(r===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");r=e[Symbol.dispose]}if(typeof r!="function")throw new TypeError("Object not disposable.");t.stack.push({value:e,dispose:r,async:n})}else n&&t.stack.push({async:!0});return e}var ID=typeof SuppressedError=="function"?SuppressedError:function(t,e,n){var r=new Error(n);return r.name="SuppressedError",r.error=t,r.suppressed=e,r};function DD(t){function e(r){t.error=t.hasError?new ID(r,t.error,"An error was suppressed during disposal."):r,t.hasError=!0}function n(){for(;t.stack.length;){var r=t.stack.pop();try{var i=r.dispose&&r.dispose.call(r.value);if(r.async)return Promise.resolve(i).then(n,function(a){return e(a),n()})}catch(a){e(a)}}if(t.hasError)throw t.error}return n()}var pht={__extends:It,__assign:J,__rest:wn,__decorate:xD,__param:_D,__metadata:OD,__awaiter:es,__generator:ns,__createBinding:H0,__exportStar:wD,__values:jr,__read:D,__spread:SD,__spreadArrays:MD,__spreadArray:dt,__await:Nl,__asyncGenerator:ED,__asyncDelegator:PD,__asyncValues:AD,__makeTemplateObject:TD,__importStar:CD,__importDefault:LD,__classPrivateFieldGet:Hf,__classPrivateFieldSet:ND,__classPrivateFieldIn:jD,__addDisposableResource:RD,__disposeResources:DD},FD=tt(26729),$0=FD,en=1e-6,Fn=typeof Float32Array!="undefined"?Float32Array:Array,vht=Math.random;function ght(t){Fn=t}var BD=Math.PI/180;function yht(t){return t*BD}function mht(t,e){return Math.abs(t-e)<=en*Math.max(1,Math.abs(t),Math.abs(e))}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});function Se(){var t=new Fn(3);return Fn!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function ja(t){var e=new Fn(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function Ra(t){var e=t[0],n=t[1],r=t[2];return Math.hypot(e,n,r)}function De(t,e,n){var r=new Fn(3);return r[0]=t,r[1]=e,r[2]=n,r}function ai(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function Ki(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}function cc(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function Sx(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function zD(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t}function bht(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t}function xht(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t}function _ht(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t}function Oht(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 wht(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 Sht(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t}function U0(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function Mht(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t}function GD(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return Math.hypot(n,r,i)}function Eht(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return n*n+r*r+i*i}function Pht(t){var e=t[0],n=t[1],r=t[2];return e*e+n*n+r*r}function Aht(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t}function Tht(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t}function rs(t,e){var n=e[0],r=e[1],i=e[2],a=n*n+r*r+i*i;return a>0&&(a=1/Math.sqrt(a)),t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a,t}function Qi(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function $f(t,e,n){var r=e[0],i=e[1],a=e[2],o=n[0],s=n[1],c=n[2];return t[0]=i*c-a*s,t[1]=a*o-r*c,t[2]=r*s-i*o,t}function V0(t,e,n,r){var i=e[0],a=e[1],o=e[2];return t[0]=i+r*(n[0]-i),t[1]=a+r*(n[1]-a),t[2]=o+r*(n[2]-o),t}function kht(t,e,n,r,i,a){var o=a*a,s=o*(2*a-3)+1,c=o*(a-2)+a,l=o*(a-1),u=o*(3-2*a);return t[0]=e[0]*s+n[0]*c+r[0]*l+i[0]*u,t[1]=e[1]*s+n[1]*c+r[1]*l+i[1]*u,t[2]=e[2]*s+n[2]*c+r[2]*l+i[2]*u,t}function Cht(t,e,n,r,i,a){var o=1-a,s=o*o,c=a*a,l=s*o,u=3*a*s,f=3*c*o,d=c*a;return t[0]=e[0]*l+n[0]*u+r[0]*f+i[0]*d,t[1]=e[1]*l+n[1]*u+r[1]*f+i[1]*d,t[2]=e[2]*l+n[2]*u+r[2]*f+i[2]*d,t}function Lht(t,e){e=e||1;var n=glMatrix.RANDOM()*2*Math.PI,r=glMatrix.RANDOM()*2-1,i=Math.sqrt(1-r*r)*e;return t[0]=Math.cos(n)*i,t[1]=Math.sin(n)*i,t[2]=r*e,t}function fr(t,e,n){var r=e[0],i=e[1],a=e[2],o=n[3]*r+n[7]*i+n[11]*a+n[15];return o=o||1,t[0]=(n[0]*r+n[4]*i+n[8]*a+n[12])/o,t[1]=(n[1]*r+n[5]*i+n[9]*a+n[13])/o,t[2]=(n[2]*r+n[6]*i+n[10]*a+n[14])/o,t}function WD(t,e,n){var r=e[0],i=e[1],a=e[2];return t[0]=r*n[0]+i*n[3]+a*n[6],t[1]=r*n[1]+i*n[4]+a*n[7],t[2]=r*n[2]+i*n[5]+a*n[8],t}function YD(t,e,n){var r=n[0],i=n[1],a=n[2],o=n[3],s=e[0],c=e[1],l=e[2],u=i*l-a*c,f=a*s-r*l,d=r*c-i*s,h=i*d-a*f,p=a*u-r*d,v=r*f-i*u,g=o*2;return u*=g,f*=g,d*=g,h*=2,p*=2,v*=2,t[0]=s+u+h,t[1]=c+f+p,t[2]=l+d+v,t}function Nht(t,e,n,r){var i=[],a=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],a[0]=i[0],a[1]=i[1]*Math.cos(r)-i[2]*Math.sin(r),a[2]=i[1]*Math.sin(r)+i[2]*Math.cos(r),t[0]=a[0]+n[0],t[1]=a[1]+n[1],t[2]=a[2]+n[2],t}function jht(t,e,n,r){var i=[],a=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],a[0]=i[2]*Math.sin(r)+i[0]*Math.cos(r),a[1]=i[1],a[2]=i[2]*Math.cos(r)-i[0]*Math.sin(r),t[0]=a[0]+n[0],t[1]=a[1]+n[1],t[2]=a[2]+n[2],t}function Rht(t,e,n,r){var i=[],a=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],a[0]=i[0]*Math.cos(r)-i[1]*Math.sin(r),a[1]=i[0]*Math.sin(r)+i[1]*Math.cos(r),a[2]=i[2],t[0]=a[0]+n[0],t[1]=a[1]+n[1],t[2]=a[2]+n[2],t}function Iht(t,e){var n=t[0],r=t[1],i=t[2],a=e[0],o=e[1],s=e[2],c=Math.sqrt(n*n+r*r+i*i),l=Math.sqrt(a*a+o*o+s*s),u=c*l,f=u&&Qi(t,e)/u;return Math.acos(Math.min(Math.max(f,-1),1))}function Dht(t){return t[0]=0,t[1]=0,t[2]=0,t}function Fht(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"}function Bht(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}function jl(t,e){var n=t[0],r=t[1],i=t[2],a=e[0],o=e[1],s=e[2];return Math.abs(n-a)<=en*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(r-o)<=en*Math.max(1,Math.abs(r),Math.abs(o))&&Math.abs(i-s)<=en*Math.max(1,Math.abs(i),Math.abs(s))}var zht=null,Ght=null,Wht=null,Mx=GD,Yht=null,Ex=Ra,Hht=null,$ht=function(){var t=Se();return function(e,n,r,i,a,o){var s,c;for(n||(n=3),r||(r=0),i?c=Math.min(i*n+r,e.length):c=e.length,s=r;s<c;s+=n)t[0]=e[s],t[1]=e[s+1],t[2]=e[s+2],a(t,t,o),e[s]=t[0],e[s+1]=t[1],e[s+2]=t[2];return e}}();function cn(){var t=new Fn(16);return Fn!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t}function Px(t){var e=new Fn(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function is(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function HD(t,e,n,r,i,a,o,s,c,l,u,f,d,h,p,v){var g=new Fn(16);return g[0]=t,g[1]=e,g[2]=n,g[3]=r,g[4]=i,g[5]=a,g[6]=o,g[7]=s,g[8]=c,g[9]=l,g[10]=u,g[11]=f,g[12]=d,g[13]=h,g[14]=p,g[15]=v,g}function X0(t,e,n,r,i,a,o,s,c,l,u,f,d,h,p,v,g){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=c,t[8]=l,t[9]=u,t[10]=f,t[11]=d,t[12]=h,t[13]=p,t[14]=v,t[15]=g,t}function as(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function Ax(t,e){if(t===e){var n=e[1],r=e[2],i=e[3],a=e[6],o=e[7],s=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[6]=e[9],t[7]=e[13],t[8]=r,t[9]=a,t[11]=e[14],t[12]=i,t[13]=o,t[14]=s}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}function da(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],s=e[5],c=e[6],l=e[7],u=e[8],f=e[9],d=e[10],h=e[11],p=e[12],v=e[13],g=e[14],y=e[15],m=n*s-r*o,b=n*c-i*o,x=n*l-a*o,_=r*c-i*s,O=r*l-a*s,w=i*l-a*c,S=u*v-f*p,M=u*g-d*p,E=u*y-h*p,P=f*g-d*v,C=f*y-h*v,A=d*y-h*g,T=m*A-b*C+x*P+_*E-O*M+w*S;return T?(T=1/T,t[0]=(s*A-c*C+l*P)*T,t[1]=(i*C-r*A-a*P)*T,t[2]=(v*w-g*O+y*_)*T,t[3]=(d*O-f*w-h*_)*T,t[4]=(c*E-o*A-l*M)*T,t[5]=(n*A-i*E+a*M)*T,t[6]=(g*x-p*w-y*b)*T,t[7]=(u*w-d*x+h*b)*T,t[8]=(o*C-s*E+l*S)*T,t[9]=(r*E-n*C-a*S)*T,t[10]=(p*O-v*x+y*m)*T,t[11]=(f*x-u*O-h*m)*T,t[12]=(s*M-o*P-c*S)*T,t[13]=(n*P-r*M+i*S)*T,t[14]=(v*b-p*_-g*m)*T,t[15]=(u*_-f*b+d*m)*T,t):null}function $D(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],s=e[5],c=e[6],l=e[7],u=e[8],f=e[9],d=e[10],h=e[11],p=e[12],v=e[13],g=e[14],y=e[15];return t[0]=s*(d*y-h*g)-f*(c*y-l*g)+v*(c*h-l*d),t[1]=-(r*(d*y-h*g)-f*(i*y-a*g)+v*(i*h-a*d)),t[2]=r*(c*y-l*g)-s*(i*y-a*g)+v*(i*l-a*c),t[3]=-(r*(c*h-l*d)-s*(i*h-a*d)+f*(i*l-a*c)),t[4]=-(o*(d*y-h*g)-u*(c*y-l*g)+p*(c*h-l*d)),t[5]=n*(d*y-h*g)-u*(i*y-a*g)+p*(i*h-a*d),t[6]=-(n*(c*y-l*g)-o*(i*y-a*g)+p*(i*l-a*c)),t[7]=n*(c*h-l*d)-o*(i*h-a*d)+u*(i*l-a*c),t[8]=o*(f*y-h*v)-u*(s*y-l*v)+p*(s*h-l*f),t[9]=-(n*(f*y-h*v)-u*(r*y-a*v)+p*(r*h-a*f)),t[10]=n*(s*y-l*v)-o*(r*y-a*v)+p*(r*l-a*s),t[11]=-(n*(s*h-l*f)-o*(r*h-a*f)+u*(r*l-a*s)),t[12]=-(o*(f*g-d*v)-u*(s*g-c*v)+p*(s*d-c*f)),t[13]=n*(f*g-d*v)-u*(r*g-i*v)+p*(r*d-i*f),t[14]=-(n*(s*g-c*v)-o*(r*g-i*v)+p*(r*c-i*s)),t[15]=n*(s*d-c*f)-o*(r*d-i*f)+u*(r*c-i*s),t}function Tx(t){var e=t[0],n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7],l=t[8],u=t[9],f=t[10],d=t[11],h=t[12],p=t[13],v=t[14],g=t[15],y=e*o-n*a,m=e*s-r*a,b=e*c-i*a,x=n*s-r*o,_=n*c-i*o,O=r*c-i*s,w=l*p-u*h,S=l*v-f*h,M=l*g-d*h,E=u*v-f*p,P=u*g-d*p,C=f*g-d*v;return y*C-m*P+b*E+x*M-_*S+O*w}function Rr(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],c=e[5],l=e[6],u=e[7],f=e[8],d=e[9],h=e[10],p=e[11],v=e[12],g=e[13],y=e[14],m=e[15],b=n[0],x=n[1],_=n[2],O=n[3];return t[0]=b*r+x*s+_*f+O*v,t[1]=b*i+x*c+_*d+O*g,t[2]=b*a+x*l+_*h+O*y,t[3]=b*o+x*u+_*p+O*m,b=n[4],x=n[5],_=n[6],O=n[7],t[4]=b*r+x*s+_*f+O*v,t[5]=b*i+x*c+_*d+O*g,t[6]=b*a+x*l+_*h+O*y,t[7]=b*o+x*u+_*p+O*m,b=n[8],x=n[9],_=n[10],O=n[11],t[8]=b*r+x*s+_*f+O*v,t[9]=b*i+x*c+_*d+O*g,t[10]=b*a+x*l+_*h+O*y,t[11]=b*o+x*u+_*p+O*m,b=n[12],x=n[13],_=n[14],O=n[15],t[12]=b*r+x*s+_*f+O*v,t[13]=b*i+x*c+_*d+O*g,t[14]=b*a+x*l+_*h+O*y,t[15]=b*o+x*u+_*p+O*m,t}function lc(t,e,n){var r=n[0],i=n[1],a=n[2],o,s,c,l,u,f,d,h,p,v,g,y;return e===t?(t[12]=e[0]*r+e[4]*i+e[8]*a+e[12],t[13]=e[1]*r+e[5]*i+e[9]*a+e[13],t[14]=e[2]*r+e[6]*i+e[10]*a+e[14],t[15]=e[3]*r+e[7]*i+e[11]*a+e[15]):(o=e[0],s=e[1],c=e[2],l=e[3],u=e[4],f=e[5],d=e[6],h=e[7],p=e[8],v=e[9],g=e[10],y=e[11],t[0]=o,t[1]=s,t[2]=c,t[3]=l,t[4]=u,t[5]=f,t[6]=d,t[7]=h,t[8]=p,t[9]=v,t[10]=g,t[11]=y,t[12]=o*r+u*i+p*a+e[12],t[13]=s*r+f*i+v*a+e[13],t[14]=c*r+d*i+g*a+e[14],t[15]=l*r+h*i+y*a+e[15]),t}function Uf(t,e,n){var r=n[0],i=n[1],a=n[2];return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*a,t[9]=e[9]*a,t[10]=e[10]*a,t[11]=e[11]*a,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function UD(t,e,n,r){var i=r[0],a=r[1],o=r[2],s=Math.hypot(i,a,o),c,l,u,f,d,h,p,v,g,y,m,b,x,_,O,w,S,M,E,P,C,A,T,k;return s<en?null:(s=1/s,i*=s,a*=s,o*=s,c=Math.sin(n),l=Math.cos(n),u=1-l,f=e[0],d=e[1],h=e[2],p=e[3],v=e[4],g=e[5],y=e[6],m=e[7],b=e[8],x=e[9],_=e[10],O=e[11],w=i*i*u+l,S=a*i*u+o*c,M=o*i*u-a*c,E=i*a*u-o*c,P=a*a*u+l,C=o*a*u+i*c,A=i*o*u+a*c,T=a*o*u-i*c,k=o*o*u+l,t[0]=f*w+v*S+b*M,t[1]=d*w+g*S+x*M,t[2]=h*w+y*S+_*M,t[3]=p*w+m*S+O*M,t[4]=f*E+v*P+b*C,t[5]=d*E+g*P+x*C,t[6]=h*E+y*P+_*C,t[7]=p*E+m*P+O*C,t[8]=f*A+v*T+b*k,t[9]=d*A+g*T+x*k,t[10]=h*A+y*T+_*k,t[11]=p*A+m*T+O*k,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)}function kx(t,e,n){var r=Math.sin(n),i=Math.cos(n),a=e[4],o=e[5],s=e[6],c=e[7],l=e[8],u=e[9],f=e[10],d=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=a*i+l*r,t[5]=o*i+u*r,t[6]=s*i+f*r,t[7]=c*i+d*r,t[8]=l*i-a*r,t[9]=u*i-o*r,t[10]=f*i-s*r,t[11]=d*i-c*r,t}function Cx(t,e,n){var r=Math.sin(n),i=Math.cos(n),a=e[0],o=e[1],s=e[2],c=e[3],l=e[8],u=e[9],f=e[10],d=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=a*i-l*r,t[1]=o*i-u*r,t[2]=s*i-f*r,t[3]=c*i-d*r,t[8]=a*r+l*i,t[9]=o*r+u*i,t[10]=s*r+f*i,t[11]=c*r+d*i,t}function VD(t,e,n){var r=Math.sin(n),i=Math.cos(n),a=e[0],o=e[1],s=e[2],c=e[3],l=e[4],u=e[5],f=e[6],d=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=a*i+l*r,t[1]=o*i+u*r,t[2]=s*i+f*r,t[3]=c*i+d*r,t[4]=l*i-a*r,t[5]=u*i-o*r,t[6]=f*i-s*r,t[7]=d*i-c*r,t}function os(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function ss(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function Lx(t,e,n){var r=n[0],i=n[1],a=n[2],o=Math.hypot(r,i,a),s,c,l;return o<en?null:(o=1/o,r*=o,i*=o,a*=o,s=Math.sin(e),c=Math.cos(e),l=1-c,t[0]=r*r*l+c,t[1]=i*r*l+a*s,t[2]=a*r*l-i*s,t[3]=0,t[4]=r*i*l-a*s,t[5]=i*i*l+c,t[6]=a*i*l+r*s,t[7]=0,t[8]=r*a*l+i*s,t[9]=i*a*l-r*s,t[10]=a*a*l+c,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)}function Nx(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=r,t[6]=n,t[7]=0,t[8]=0,t[9]=-n,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function jx(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=0,t[2]=-n,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=n,t[9]=0,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function q0(t,e){var n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=0,t[3]=0,t[4]=-n,t[5]=r,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function Rx(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3],s=r+r,c=i+i,l=a+a,u=r*s,f=r*c,d=r*l,h=i*c,p=i*l,v=a*l,g=o*s,y=o*c,m=o*l;return t[0]=1-(h+v),t[1]=f+m,t[2]=d-y,t[3]=0,t[4]=f-m,t[5]=1-(u+v),t[6]=p+g,t[7]=0,t[8]=d+y,t[9]=p-g,t[10]=1-(u+h),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function XD(t,e){var n=new Fn(3),r=-e[0],i=-e[1],a=-e[2],o=e[3],s=e[4],c=e[5],l=e[6],u=e[7],f=r*r+i*i+a*a+o*o;return f>0?(n[0]=(s*o+u*r+c*a-l*i)*2/f,n[1]=(c*o+u*i+l*r-s*a)*2/f,n[2]=(l*o+u*a+s*i-c*r)*2/f):(n[0]=(s*o+u*r+c*a-l*i)*2,n[1]=(c*o+u*i+l*r-s*a)*2,n[2]=(l*o+u*a+s*i-c*r)*2),Rx(t,e,n),t}function Vf(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t}function uc(t,e){var n=e[0],r=e[1],i=e[2],a=e[4],o=e[5],s=e[6],c=e[8],l=e[9],u=e[10];return t[0]=Math.hypot(n,r,i),t[1]=Math.hypot(a,o,s),t[2]=Math.hypot(c,l,u),t}function Xf(t,e){var n=new Fn(3);uc(n,e);var r=1/n[0],i=1/n[1],a=1/n[2],o=e[0]*r,s=e[1]*i,c=e[2]*a,l=e[4]*r,u=e[5]*i,f=e[6]*a,d=e[8]*r,h=e[9]*i,p=e[10]*a,v=o+u+p,g=0;return v>0?(g=Math.sqrt(v+1)*2,t[3]=.25*g,t[0]=(f-h)/g,t[1]=(d-c)/g,t[2]=(s-l)/g):o>u&&o>p?(g=Math.sqrt(1+o-u-p)*2,t[3]=(f-h)/g,t[0]=.25*g,t[1]=(s+l)/g,t[2]=(d+c)/g):u>p?(g=Math.sqrt(1+u-o-p)*2,t[3]=(d-c)/g,t[0]=(s+l)/g,t[1]=.25*g,t[2]=(f+h)/g):(g=Math.sqrt(1+p-o-u)*2,t[3]=(s-l)/g,t[0]=(d+c)/g,t[1]=(f+h)/g,t[2]=.25*g),t}function qD(t,e,n,r){var i=e[0],a=e[1],o=e[2],s=e[3],c=i+i,l=a+a,u=o+o,f=i*c,d=i*l,h=i*u,p=a*l,v=a*u,g=o*u,y=s*c,m=s*l,b=s*u,x=r[0],_=r[1],O=r[2];return t[0]=(1-(p+g))*x,t[1]=(d+b)*x,t[2]=(h-m)*x,t[3]=0,t[4]=(d-b)*_,t[5]=(1-(f+g))*_,t[6]=(v+y)*_,t[7]=0,t[8]=(h+m)*O,t[9]=(v-y)*O,t[10]=(1-(f+p))*O,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function Rl(t,e,n,r,i){var a=e[0],o=e[1],s=e[2],c=e[3],l=a+a,u=o+o,f=s+s,d=a*l,h=a*u,p=a*f,v=o*u,g=o*f,y=s*f,m=c*l,b=c*u,x=c*f,_=r[0],O=r[1],w=r[2],S=i[0],M=i[1],E=i[2],P=(1-(v+y))*_,C=(h+x)*_,A=(p-b)*_,T=(h-x)*O,k=(1-(d+y))*O,N=(g+m)*O,F=(p+b)*w,R=(g-m)*w,I=(1-(d+v))*w;return t[0]=P,t[1]=C,t[2]=A,t[3]=0,t[4]=T,t[5]=k,t[6]=N,t[7]=0,t[8]=F,t[9]=R,t[10]=I,t[11]=0,t[12]=n[0]+S-(P*S+T*M+F*E),t[13]=n[1]+M-(C*S+k*M+R*E),t[14]=n[2]+E-(A*S+N*M+I*E),t[15]=1,t}function Z0(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=n+n,s=r+r,c=i+i,l=n*o,u=r*o,f=r*s,d=i*o,h=i*s,p=i*c,v=a*o,g=a*s,y=a*c;return t[0]=1-f-p,t[1]=u+y,t[2]=d-g,t[3]=0,t[4]=u-y,t[5]=1-l-p,t[6]=h+v,t[7]=0,t[8]=d+g,t[9]=h-v,t[10]=1-l-f,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function ZD(t,e,n,r,i,a,o){var s=1/(n-e),c=1/(i-r),l=1/(a-o);return t[0]=a*2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a*2*c,t[6]=0,t[7]=0,t[8]=(n+e)*s,t[9]=(i+r)*c,t[10]=(o+a)*l,t[11]=-1,t[12]=0,t[13]=0,t[14]=o*a*2*l,t[15]=0,t}function Ix(t,e,n,r,i){var a=1/Math.tan(e/2),o;return t[0]=a/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,i!=null&&i!==1/0?(o=1/(r-i),t[10]=(i+r)*o,t[14]=2*i*r*o):(t[10]=-1,t[14]=-2*r),t}var KD=Ix;function QD(t,e,n,r,i){var a=1/Math.tan(e/2),o;return t[0]=a/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,i!=null&&i!==1/0?(o=1/(r-i),t[10]=i*o,t[14]=i*r*o):(t[10]=-1,t[14]=-r),t}function JD(t,e,n,r){var i=Math.tan(e.upDegrees*Math.PI/180),a=Math.tan(e.downDegrees*Math.PI/180),o=Math.tan(e.leftDegrees*Math.PI/180),s=Math.tan(e.rightDegrees*Math.PI/180),c=2/(o+s),l=2/(i+a);return t[0]=c,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=l,t[6]=0,t[7]=0,t[8]=-((o-s)*c*.5),t[9]=(i-a)*l*.5,t[10]=r/(n-r),t[11]=-1,t[12]=0,t[13]=0,t[14]=r*n/(n-r),t[15]=0,t}function Dx(t,e,n,r,i,a,o){var s=1/(e-n),c=1/(r-i),l=1/(a-o);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*c,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*l,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*c,t[14]=(o+a)*l,t[15]=1,t}var Fx=Dx;function Bx(t,e,n,r,i,a,o){var s=1/(e-n),c=1/(r-i),l=1/(a-o);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*c,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=l,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*c,t[14]=a*l,t[15]=1,t}function zx(t,e,n,r){var i,a,o,s,c,l,u,f,d,h,p=e[0],v=e[1],g=e[2],y=r[0],m=r[1],b=r[2],x=n[0],_=n[1],O=n[2];return Math.abs(p-x)<en&&Math.abs(v-_)<en&&Math.abs(g-O)<en?as(t):(u=p-x,f=v-_,d=g-O,h=1/Math.hypot(u,f,d),u*=h,f*=h,d*=h,i=m*d-b*f,a=b*u-y*d,o=y*f-m*u,h=Math.hypot(i,a,o),h?(h=1/h,i*=h,a*=h,o*=h):(i=0,a=0,o=0),s=f*o-d*a,c=d*i-u*o,l=u*a-f*i,h=Math.hypot(s,c,l),h?(h=1/h,s*=h,c*=h,l*=h):(s=0,c=0,l=0),t[0]=i,t[1]=s,t[2]=u,t[3]=0,t[4]=a,t[5]=c,t[6]=f,t[7]=0,t[8]=o,t[9]=l,t[10]=d,t[11]=0,t[12]=-(i*p+a*v+o*g),t[13]=-(s*p+c*v+l*g),t[14]=-(u*p+f*v+d*g),t[15]=1,t)}function t6(t,e,n,r){var i=e[0],a=e[1],o=e[2],s=r[0],c=r[1],l=r[2],u=i-n[0],f=a-n[1],d=o-n[2],h=u*u+f*f+d*d;h>0&&(h=1/Math.sqrt(h),u*=h,f*=h,d*=h);var p=c*d-l*f,v=l*u-s*d,g=s*f-c*u;return h=p*p+v*v+g*g,h>0&&(h=1/Math.sqrt(h),p*=h,v*=h,g*=h),t[0]=p,t[1]=v,t[2]=g,t[3]=0,t[4]=f*g-d*v,t[5]=d*p-u*g,t[6]=u*v-f*p,t[7]=0,t[8]=u,t[9]=f,t[10]=d,t[11]=0,t[12]=i,t[13]=a,t[14]=o,t[15]=1,t}function e6(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"}function n6(t){return Math.hypot(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])}function r6(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t[9]=e[9]+n[9],t[10]=e[10]+n[10],t[11]=e[11]+n[11],t[12]=e[12]+n[12],t[13]=e[13]+n[13],t[14]=e[14]+n[14],t[15]=e[15]+n[15],t}function Gx(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t[9]=e[9]-n[9],t[10]=e[10]-n[10],t[11]=e[11]-n[11],t[12]=e[12]-n[12],t[13]=e[13]-n[13],t[14]=e[14]-n[14],t[15]=e[15]-n[15],t}function i6(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12]*n,t[13]=e[13]*n,t[14]=e[14]*n,t[15]=e[15]*n,t}function a6(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t[9]=e[9]+n[9]*r,t[10]=e[10]+n[10]*r,t[11]=e[11]+n[11]*r,t[12]=e[12]+n[12]*r,t[13]=e[13]+n[13]*r,t[14]=e[14]+n[14]*r,t[15]=e[15]+n[15]*r,t}function o6(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]&&t[9]===e[9]&&t[10]===e[10]&&t[11]===e[11]&&t[12]===e[12]&&t[13]===e[13]&&t[14]===e[14]&&t[15]===e[15]}function s6(t,e){var n=t[0],r=t[1],i=t[2],a=t[3],o=t[4],s=t[5],c=t[6],l=t[7],u=t[8],f=t[9],d=t[10],h=t[11],p=t[12],v=t[13],g=t[14],y=t[15],m=e[0],b=e[1],x=e[2],_=e[3],O=e[4],w=e[5],S=e[6],M=e[7],E=e[8],P=e[9],C=e[10],A=e[11],T=e[12],k=e[13],N=e[14],F=e[15];return Math.abs(n-m)<=en*Math.max(1,Math.abs(n),Math.abs(m))&&Math.abs(r-b)<=en*Math.max(1,Math.abs(r),Math.abs(b))&&Math.abs(i-x)<=en*Math.max(1,Math.abs(i),Math.abs(x))&&Math.abs(a-_)<=en*Math.max(1,Math.abs(a),Math.abs(_))&&Math.abs(o-O)<=en*Math.max(1,Math.abs(o),Math.abs(O))&&Math.abs(s-w)<=en*Math.max(1,Math.abs(s),Math.abs(w))&&Math.abs(c-S)<=en*Math.max(1,Math.abs(c),Math.abs(S))&&Math.abs(l-M)<=en*Math.max(1,Math.abs(l),Math.abs(M))&&Math.abs(u-E)<=en*Math.max(1,Math.abs(u),Math.abs(E))&&Math.abs(f-P)<=en*Math.max(1,Math.abs(f),Math.abs(P))&&Math.abs(d-C)<=en*Math.max(1,Math.abs(d),Math.abs(C))&&Math.abs(h-A)<=en*Math.max(1,Math.abs(h),Math.abs(A))&&Math.abs(p-T)<=en*Math.max(1,Math.abs(p),Math.abs(T))&&Math.abs(v-k)<=en*Math.max(1,Math.abs(v),Math.abs(k))&&Math.abs(g-N)<=en*Math.max(1,Math.abs(g),Math.abs(N))&&Math.abs(y-F)<=en*Math.max(1,Math.abs(y),Math.abs(F))}var Wx=Rr,c6=Gx;function Yx(){var t=new Fn(9);return Fn!=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 l6(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 Uht(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 Vht(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 u6(t,e,n,r,i,a,o,s,c){var l=new Fn(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 Xht(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 qht(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 Zht(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 Kht(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 Qht(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 Jht(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 tpt(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],c=e[5],l=e[6],u=e[7],f=e[8],d=n[0],h=n[1],p=n[2],v=n[3],g=n[4],y=n[5],m=n[6],b=n[7],x=n[8];return t[0]=d*r+h*o+p*l,t[1]=d*i+h*s+p*u,t[2]=d*a+h*c+p*f,t[3]=v*r+g*o+y*l,t[4]=v*i+g*s+y*u,t[5]=v*a+g*c+y*f,t[6]=m*r+b*o+x*l,t[7]=m*i+b*s+x*u,t[8]=m*a+b*c+x*f,t}function ept(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],c=e[5],l=e[6],u=e[7],f=e[8],d=n[0],h=n[1];return t[0]=r,t[1]=i,t[2]=a,t[3]=o,t[4]=s,t[5]=c,t[6]=d*r+h*o+l,t[7]=d*i+h*s+u,t[8]=d*a+h*c+f,t}function npt(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 rpt(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 ipt(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 apt(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 opt(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 spt(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 cpt(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 lpt(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],s=e[5],c=e[6],l=e[7],u=e[8],f=e[9],d=e[10],h=e[11],p=e[12],v=e[13],g=e[14],y=e[15],m=n*s-r*o,b=n*c-i*o,x=n*l-a*o,_=r*c-i*s,O=r*l-a*s,w=i*l-a*c,S=u*v-f*p,M=u*g-d*p,E=u*y-h*p,P=f*g-d*v,C=f*y-h*v,A=d*y-h*g,T=m*A-b*C+x*P+_*E-O*M+w*S;return T?(T=1/T,t[0]=(s*A-c*C+l*P)*T,t[1]=(c*E-o*A-l*M)*T,t[2]=(o*C-s*E+l*S)*T,t[3]=(i*C-r*A-a*P)*T,t[4]=(n*A-i*E+a*M)*T,t[5]=(r*E-n*C-a*S)*T,t[6]=(v*w-g*O+y*_)*T,t[7]=(g*x-p*w-y*b)*T,t[8]=(p*O-v*x+y*m)*T,t):null}function upt(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 fpt(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"}function dpt(t){return Math.hypot(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8])}function hpt(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 ppt(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 vpt(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t}function gpt(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t}function ypt(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 mpt(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 bpt=null,xpt=null;function fc(){var t=new Fn(4);return Fn!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}function f6(t){var e=new Fn(4);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function d6(t,e,n,r){var i=new Fn(4);return i[0]=t,i[1]=e,i[2]=n,i[3]=r,i}function h6(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function p6(t,e,n,r,i){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t}function v6(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t}function _pt(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t}function Opt(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t[3]=e[3]*n[3],t}function wpt(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t[3]=e[3]/n[3],t}function Spt(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t[3]=Math.ceil(e[3]),t}function Mpt(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t[3]=Math.floor(e[3]),t}function Ept(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t[3]=Math.min(e[3],n[3]),t}function Ppt(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t[3]=Math.max(e[3],n[3]),t}function Apt(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t[3]=Math.round(e[3]),t}function g6(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t}function Tpt(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t}function kpt(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2],a=e[3]-t[3];return Math.hypot(n,r,i,a)}function Cpt(t,e){var n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2],a=e[3]-t[3];return n*n+r*r+i*i+a*a}function y6(t){var e=t[0],n=t[1],r=t[2],i=t[3];return Math.hypot(e,n,r,i)}function m6(t){var e=t[0],n=t[1],r=t[2],i=t[3];return e*e+n*n+r*r+i*i}function Lpt(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t}function Npt(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t[3]=1/e[3],t}function b6(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=n*n+r*r+i*i+a*a;return o>0&&(o=1/Math.sqrt(o)),t[0]=n*o,t[1]=r*o,t[2]=i*o,t[3]=a*o,t}function x6(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}function jpt(t,e,n,r){var i=n[0]*r[1]-n[1]*r[0],a=n[0]*r[2]-n[2]*r[0],o=n[0]*r[3]-n[3]*r[0],s=n[1]*r[2]-n[2]*r[1],c=n[1]*r[3]-n[3]*r[1],l=n[2]*r[3]-n[3]*r[2],u=e[0],f=e[1],d=e[2],h=e[3];return t[0]=f*l-d*c+h*s,t[1]=-(u*l)+d*o-h*a,t[2]=u*c-f*o+h*i,t[3]=-(u*s)+f*a-d*i,t}function _6(t,e,n,r){var i=e[0],a=e[1],o=e[2],s=e[3];return t[0]=i+r*(n[0]-i),t[1]=a+r*(n[1]-a),t[2]=o+r*(n[2]-o),t[3]=s+r*(n[3]-s),t}function Rpt(t,e){e=e||1;var n,r,i,a,o,s;do n=glMatrix.RANDOM()*2-1,r=glMatrix.RANDOM()*2-1,o=n*n+r*r;while(o>=1);do i=glMatrix.RANDOM()*2-1,a=glMatrix.RANDOM()*2-1,s=i*i+a*a;while(s>=1);var c=Math.sqrt((1-o)/s);return t[0]=e*n,t[1]=e*r,t[2]=e*i*c,t[3]=e*a*c,t}function Il(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3];return t[0]=n[0]*r+n[4]*i+n[8]*a+n[12]*o,t[1]=n[1]*r+n[5]*i+n[9]*a+n[13]*o,t[2]=n[2]*r+n[6]*i+n[10]*a+n[14]*o,t[3]=n[3]*r+n[7]*i+n[11]*a+n[15]*o,t}function Ipt(t,e,n){var r=e[0],i=e[1],a=e[2],o=n[0],s=n[1],c=n[2],l=n[3],u=l*r+s*a-c*i,f=l*i+c*r-o*a,d=l*a+o*i-s*r,h=-o*r-s*i-c*a;return t[0]=u*l+h*-o+f*-c-d*-s,t[1]=f*l+h*-s+d*-o-u*-c,t[2]=d*l+h*-c+u*-s-f*-o,t[3]=e[3],t}function Dpt(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t}function Fpt(t){return"vec4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"}function O6(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]}function w6(t,e){var n=t[0],r=t[1],i=t[2],a=t[3],o=e[0],s=e[1],c=e[2],l=e[3];return Math.abs(n-o)<=en*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(r-s)<=en*Math.max(1,Math.abs(r),Math.abs(s))&&Math.abs(i-c)<=en*Math.max(1,Math.abs(i),Math.abs(c))&&Math.abs(a-l)<=en*Math.max(1,Math.abs(a),Math.abs(l))}var Bpt=null,zpt=null,Gpt=null,Wpt=null,Ypt=null,Hpt=null,$pt=null,Upt=function(){var t=fc();return function(e,n,r,i,a,o){var s,c;for(n||(n=4),r||(r=0),i?c=Math.min(i*n+r,e.length):c=e.length,s=r;s<c;s+=n)t[0]=e[s],t[1]=e[s+1],t[2]=e[s+2],t[3]=e[s+3],a(t,t,o),e[s]=t[0],e[s+1]=t[1],e[s+2]=t[2],e[s+3]=t[3];return e}}();function tr(){var t=new Fn(4);return Fn!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function Vpt(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t}function oo(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 Xpt(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 qpt(t,e){var n=A6(t,e);return Math.acos(2*n*n-1)}function so(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 Zpt(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 Kpt(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 Qpt(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 Jpt(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 S6(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 M6(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 t0t(t,e,n){return M6(t,e),P6(t,t,n),S6(t,t),t}function K0(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>en?(d=Math.acos(h),p=Math.sin(d),v=Math.sin((1-r)*d)/p,g=Math.sin(r*d)/p):(v=1-r,g=r),t[0]=v*i+g*c,t[1]=v*a+g*l,t[2]=v*o+g*u,t[3]=v*s+g*f,t}function e0t(t){var e=glMatrix.RANDOM(),n=glMatrix.RANDOM(),r=glMatrix.RANDOM(),i=Math.sqrt(1-e),a=Math.sqrt(e);return t[0]=i*Math.sin(2*Math.PI*n),t[1]=i*Math.cos(2*Math.PI*n),t[2]=a*Math.sin(2*Math.PI*r),t[3]=a*Math.cos(2*Math.PI*r),t}function Q0(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 n0t(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t}function E6(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 qf(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 r0t(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"}var i0t=f6,J0=d6,Zf=h6,a0t=p6,o0t=v6,Hx=so,P6=g6,A6=x6,s0t=_6,c0t=y6,l0t=null,u0t=m6,f0t=null,Kf=b6,d0t=O6,h0t=w6,p0t=function(){var t=Se(),e=De(1,0,0),n=De(0,1,0);return function(r,i,a){var o=Qi(i,a);return o<-.999999?($f(t,e,i),Ex(t)<1e-6&&$f(t,n,i),rs(t,t),oo(r,t,Math.PI),r):o>.999999?(r[0]=0,r[1]=0,r[2]=0,r[3]=1,r):($f(t,i,a),r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=1+o,Kf(r,r))}}(),v0t=function(){var t=tr(),e=tr();return function(n,r,i,a,o,s){return K0(t,r,o,s),K0(e,i,a,s),K0(n,t,e,2*s*(1-s)),n}}(),g0t=function(){var t=Yx();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],Kf(e,E6(e,t))}}();function T6(){var t=new Fn(2);return Fn!=Float32Array&&(t[0]=0,t[1]=0),t}function y0t(t){var e=new glMatrix.ARRAY_TYPE(2);return e[0]=t[0],e[1]=t[1],e}function k6(t,e){var n=new Fn(2);return n[0]=t,n[1]=e,n}function C6(t,e){return t[0]=e[0],t[1]=e[1],t}function m0t(t,e,n){return t[0]=e,t[1]=n,t}function b0t(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}function x0t(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t}function _0t(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t}function O0t(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t}function w0t(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t}function S0t(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t}function M0t(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t}function E0t(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t}function P0t(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t}function A0t(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t}function T0t(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t}function k0t(t,e){var n=e[0]-t[0],r=e[1]-t[1];return Math.hypot(n,r)}function C0t(t,e){var n=e[0]-t[0],r=e[1]-t[1];return n*n+r*r}function L0t(t){var e=t[0],n=t[1];return Math.hypot(e,n)}function N0t(t){var e=t[0],n=t[1];return e*e+n*n}function j0t(t,e){return t[0]=-e[0],t[1]=-e[1],t}function R0t(t,e){return t[0]=1/e[0],t[1]=1/e[1],t}function L6(t,e){var n=e[0],r=e[1],i=n*n+r*r;return i>0&&(i=1/Math.sqrt(i)),t[0]=e[0]*i,t[1]=e[1]*i,t}function N6(t,e){return t[0]*e[0]+t[1]*e[1]}function I0t(t,e,n){var r=e[0]*n[1]-e[1]*n[0];return t[0]=t[1]=0,t[2]=r,t}function D0t(t,e,n,r){var i=e[0],a=e[1];return t[0]=i+r*(n[0]-i),t[1]=a+r*(n[1]-a),t}function F0t(t,e){e=e||1;var n=glMatrix.RANDOM()*2*Math.PI;return t[0]=Math.cos(n)*e,t[1]=Math.sin(n)*e,t}function B0t(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i,t[1]=n[1]*r+n[3]*i,t}function z0t(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i+n[4],t[1]=n[1]*r+n[3]*i+n[5],t}function G0t(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[3]*i+n[6],t[1]=n[1]*r+n[4]*i+n[7],t}function W0t(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[4]*i+n[12],t[1]=n[1]*r+n[5]*i+n[13],t}function Y0t(t,e,n,r){var i=e[0]-n[0],a=e[1]-n[1],o=Math.sin(r),s=Math.cos(r);return t[0]=i*s-a*o+n[0],t[1]=i*o+a*s+n[1],t}function H0t(t,e){var n=t[0],r=t[1],i=e[0],a=e[1],o=Math.sqrt(n*n+r*r)*Math.sqrt(i*i+a*a),s=o&&(n*i+r*a)/o;return Math.acos(Math.min(Math.max(s,-1),1))}function $0t(t){return t[0]=0,t[1]=0,t}function U0t(t){return"vec2("+t[0]+", "+t[1]+")"}function j6(t,e){return t[0]===e[0]&&t[1]===e[1]}function V0t(t,e){var n=t[0],r=t[1],i=e[0],a=e[1];return Math.abs(n-i)<=glMatrix.EPSILON*Math.max(1,Math.abs(n),Math.abs(i))&&Math.abs(r-a)<=glMatrix.EPSILON*Math.max(1,Math.abs(r),Math.abs(a))}var X0t=null,q0t=null,Z0t=null,K0t=null,Q0t=null,J0t=null,tvt=null,evt=function(){var t=T6();return function(e,n,r,i,a,o){var s,c;for(n||(n=2),r||(r=0),i?c=Math.min(i*n+r,e.length):c=e.length,s=r;s<c;s+=n)t[0]=e[s],t[1]=e[s+1],a(t,t,o),e[s]=t[0],e[s+1]=t[1];return e}}(),R6={}.toString,I6=function(t,e){return R6.call(t)==="[object "+e+"]"},Dl=I6,D6=function(t){return Dl(t,"Number")},vn=D6;function oi(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}var F6=function(t){return t==null},se=F6,Cn=function(t){return Dl(t,"String")},B6=function(t,e,n){return t<e?e:t>n?n:t},Bn=B6,Fl={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0};function $x(t){return Array.isArray(t)&&t.every(function(e){var n=e[0].toLowerCase();return Fl[n]===e.length-1&&"achlmqstvz".includes(n)})}function Ux(t){return $x(t)&&t.every(function(e){var n=e[0];return n===n.toUpperCase()})}function Vx(t){return Ux(t)&&t.every(function(e){var n=e[0];return"ACLMQZ".includes(n)})}var Xx={x1:0,y1:0,x2:0,y2:0,x:0,y:0,qx:null,qy:null};function qx(t){for(var e=t.pathValue[t.segmentStart],n=e.toLowerCase(),r=t.data;r.length>=Fl[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,Fl[n]))),!!Fl[n]););}function z6(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 G6(t){return t>=48&&t<=57||t===43||t===45||t===46}function dc(t){return t>=48&&t<=57}function W6(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)),!dc(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&&dc(l)){t.err="[path-util]: Invalid path value at index "+r+', "'+n[r]+'" illegal number';return}for(;i<e&&dc(n.charCodeAt(i));)i+=1,o=!0;l=n.charCodeAt(i)}if(l===46){for(c=!0,i+=1;dc(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&&dc(n.charCodeAt(i)))for(;i<e&&dc(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 Y6(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 Qf(t){for(var e=t.pathValue,n=t.max;t.index<n&&Y6(e.charCodeAt(t.index));)t.index+=1}function H6(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 $6(t){return(t|32)===97}function U6(t){var e=t.max,n=t.pathValue,r=t.index,i=n.charCodeAt(r),a=Fl[n[r].toLowerCase()];if(t.segmentStart=r,!H6(i)){t.err='[path-util]: Invalid path value "'+n[r]+'" is not a path command';return}if(t.index+=1,Qf(t),t.data=[],!a){qx(t);return}for(;;){for(var o=a;o>0;o-=1){if($6(i)&&(o===3||o===4)?z6(t):W6(t),t.err.length)return;t.data.push(t.param),Qf(t),t.index<e&&n.charCodeAt(t.index)===44&&(t.index+=1,Qf(t))}if(t.index>=t.max||!G6(n.charCodeAt(t.index)))break}qx(t)}var V6=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 X6(t){if($x(t))return[].concat(t);var e=new V6(t);for(Qf(e);e.index<e.max&&!e.err.length;)U6(e);return e.err?e.err:e.segments}function q6(t){if(Ux(t))return[].concat(t);var e=X6(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 Z6(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 Jf(t){if(Vx(t))return[].concat(t);for(var e=q6(t),n=J({},Xx),r=0;r<e.length;r+=1){e[r]=Z6(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 co(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 tv(t,e,n,r,i){var a=oi([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=co([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 Zx(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 K6(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 tv(t,e,s,c,l).point;var b=(t-s)/2,x=(e-c)/2,_={x:d(m)*b+f(m)*x,y:-f(m)*b+d(m)*x},O=Math.pow(_.x,2)/Math.pow(v,2)+Math.pow(_.y,2)/Math.pow(g,2);O>1&&(v*=h(O),g*=h(O));var w=Math.pow(v,2)*Math.pow(g,2)-Math.pow(v,2)*Math.pow(_.y,2)-Math.pow(g,2)*Math.pow(_.x,2),S=Math.pow(v,2)*Math.pow(_.y,2)+Math.pow(g,2)*Math.pow(_.x,2),M=w/S;M=M<0?0:M;var E=(a!==o?1:-1)*h(M),P={x:E*(v*_.y/g),y:E*(-(g*_.x)/v)},C={x:d(m)*P.x-f(m)*P.y+(t+s)/2,y:f(m)*P.x+d(m)*P.y+(e+c)/2},A={x:(_.x-P.x)/v,y:(_.y-P.y)/g},T=Zx({x:1,y:0},A),k={x:(-_.x-P.x)/v,y:(-_.y-P.y)/g},N=Zx(A,k);!o&&N>0?N-=2*p:o&&N<0&&(N+=2*p),N%=2*p;var F=T+N*l,R=v*d(F),I=g*f(F),z={x:d(m)*R-f(m)*I+C.x,y:f(m)*R+d(m)*I+C.y};return z}function Q6(t,e,n,r,i,a,o,s,c,l,u){var f,d=u.bbox,h=d===void 0?!0:d,p=u.length,v=p===void 0?!0:p,g=u.sampleSize,y=g===void 0?30:g,m=typeof l=="number",b=t,x=e,_=0,O=[b,x,_],w=[b,x],S=0,M={x:0,y:0},E=[{x:b,y:x}];m&&l<=0&&(M={x:b,y:x});for(var P=0;P<=y;P+=1){if(S=P/y,f=K6(t,e,n,r,i,a,o,s,c,S),b=f.x,x=f.y,h&&E.push({x:b,y:x}),v&&(_+=oi(w,[b,x])),w=[b,x],m&&_>=l&&l>O[2]){var C=(_-l)/(_-O[2]);M={x:w[0]*(1-C)+O[0]*C,y:w[1]*(1-C)+O[1]*C}}O=[b,x,_]}return m&&l>=_&&(M={x:s,y:c}),{length:_,point:M,min:{x:Math.min.apply(null,E.map(function(A){return A.x})),y:Math.min.apply(null,E.map(function(A){return A.y}))},max:{x:Math.max.apply(null,E.map(function(A){return A.x})),y:Math.max.apply(null,E.map(function(A){return A.y}))}}}function J6(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 Kx(t,e,n,r,i,a,o,s,c,l){var u,f=l.bbox,d=f===void 0?!0:f,h=l.length,p=h===void 0?!0:h,v=l.sampleSize,g=v===void 0?10:v,y=typeof c=="number",m=t,b=e,x=0,_=[m,b,x],O=[m,b],w=0,S={x:0,y:0},M=[{x:m,y:b}];y&&c<=0&&(S={x:m,y:b});for(var E=0;E<=g;E+=1){if(w=E/g,u=J6(t,e,n,r,i,a,o,s,w),m=u.x,b=u.y,d&&M.push({x:m,y:b}),p&&(x+=oi(O,[m,b])),O=[m,b],y&&x>=c&&c>_[2]){var P=(x-c)/(x-_[2]);S={x:O[0]*(1-P)+_[0]*P,y:O[1]*(1-P)+_[1]*P}}_=[m,b,x]}return y&&c>=x&&(S={x:o,y:s}),{length:x,point:S,min:{x:Math.min.apply(null,M.map(function(C){return C.x})),y:Math.min.apply(null,M.map(function(C){return C.y}))},max:{x:Math.max.apply(null,M.map(function(C){return C.x})),y:Math.max.apply(null,M.map(function(C){return C.y}))}}}function t8(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 e8(t,e,n,r,i,a,o,s){var c,l=s.bbox,u=l===void 0?!0:l,f=s.length,d=f===void 0?!0:f,h=s.sampleSize,p=h===void 0?10:h,v=typeof o=="number",g=t,y=e,m=0,b=[g,y,m],x=[g,y],_=0,O={x:0,y:0},w=[{x:g,y}];v&&o<=0&&(O={x:g,y});for(var S=0;S<=p;S+=1){if(_=S/p,c=t8(t,e,n,r,i,a,_),g=c.x,y=c.y,u&&w.push({x:g,y}),d&&(m+=oi(x,[g,y])),x=[g,y],v&&m>=o&&o>b[2]){var M=(m-o)/(m-b[2]);O={x:x[0]*(1-M)+b[0]*M,y:x[1]*(1-M)+b[1]*M}}b=[g,y,m]}return v&&o>=m&&(O={x:i,y:a}),{length:m,point:O,min:{x:Math.min.apply(null,w.map(function(E){return E.x})),y:Math.min.apply(null,w.map(function(E){return E.y}))},max:{x:Math.max.apply(null,w.map(function(E){return E.x})),y:Math.max.apply(null,w.map(function(E){return E.y}))}}}function Qx(t,e,n){for(var r,i,a,o,s,c,l=Jf(t),u=typeof e=="number",f,d=[],h,p=0,v=0,g=0,y=0,m,b=[],x=[],_=0,O={x:0,y:0},w=O,S=O,M=O,E=0,P=0,C=l.length;P<C;P+=1)m=l[P],h=m[0],f=h==="M",d=f?d:[p,v].concat(m.slice(1)),f?(g=m[1],y=m[2],O={x:g,y},w=O,_=0,u&&e<.001&&(M=O)):h==="L"?(r=tv(d[0],d[1],d[2],d[3],(e||0)-E),_=r.length,O=r.min,w=r.max,S=r.point):h==="A"?(i=Q6(d[0],d[1],d[2],d[3],d[4],d[5],d[6],d[7],d[8],(e||0)-E,n||{}),_=i.length,O=i.min,w=i.max,S=i.point):h==="C"?(a=Kx(d[0],d[1],d[2],d[3],d[4],d[5],d[6],d[7],(e||0)-E,n||{}),_=a.length,O=a.min,w=a.max,S=a.point):h==="Q"?(o=e8(d[0],d[1],d[2],d[3],d[4],d[5],(e||0)-E,n||{}),_=o.length,O=o.min,w=o.max,S=o.point):h==="Z"&&(d=[p,v,g,y],s=tv(d[0],d[1],d[2],d[3],(e||0)-E),_=s.length,O=s.min,w=s.max,S=s.point),u&&E<e&&E+_>=e&&(M=S),x.push(w),b.push(O),E+=_,c=h!=="Z"?m.slice(-2):[g,y],p=c[0],v=c[1];return u&&e>=E&&(M={x:p,y:v}),{length:E,point:M,min:{x:Math.min.apply(null,b.map(function(A){return A.x})),y:Math.min.apply(null,b.map(function(A){return A.y}))},max:{x:Math.max.apply(null,x.map(function(A){return A.x})),y:Math.max.apply(null,x.map(function(A){return A.y}))}}}function n8(t,e){return Qx(t,void 0,J(J({},e),{bbox:!1,length:!0})).length}var sr=function(t){return Array.isArray?Array.isArray(t):Dl(t,"Array")},td=function(t){if(sr(t))return t.reduce(function(e,n){return Math.min(e,n)},t[0])},ed=function(t){if(sr(t))return t.reduce(function(e,n){return Math.max(e,n)},t[0])},r8=1e-5;function Bl(t,e,n){return n===void 0&&(n=r8),Math.abs(t-e)<n}var i8=function(t,e){return(t%e+e)%e},Jx=i8;function a8(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 o8(t){return Vx(t)&&t.every(function(e){var n=e[0];return"MC".includes(n)})}function nd(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 ev(t,e,n,r,i,a,o,s,c,l){var u=t,f=e,d=n,h=r,p=s,v=c,g=Math.PI*120/180,y=Math.PI/180*(+i||0),m=[],b,x,_,O,w;if(l)x=l[0],_=l[1],O=l[2],w=l[3];else{b=nd(u,f,-y),u=b.x,f=b.y,b=nd(p,v,-y),p=b.x,v=b.y;var S=(u-p)/2,M=(f-v)/2,E=S*S/(d*d)+M*M/(h*h);E>1&&(E=Math.sqrt(E),d*=E,h*=E);var P=d*d,C=h*h,A=(a===o?-1:1)*Math.sqrt(Math.abs((P*C-P*M*M-C*S*S)/(P*M*M+C*S*S)));O=A*d*M/h+(u+p)/2,w=A*-h*S/d+(f+v)/2,x=Math.asin(((f-w)/h*Math.pow(10,9)>>0)/Math.pow(10,9)),_=Math.asin(((v-w)/h*Math.pow(10,9)>>0)/Math.pow(10,9)),x=u<O?Math.PI-x:x,_=p<O?Math.PI-_:_,x<0&&(x=Math.PI*2+x),_<0&&(_=Math.PI*2+_),o&&x>_&&(x-=Math.PI*2),!o&&_>x&&(_-=Math.PI*2)}var T=_-x;if(Math.abs(T)>g){var k=_,N=p,F=v;_=x+g*(o&&_>x?1:-1),p=O+d*Math.cos(_),v=w+h*Math.sin(_),m=ev(p,v,d,h,i,0,o,N,F,[_,k,O,w])}T=_-x;var R=Math.cos(x),I=Math.sin(x),z=Math.cos(_),W=Math.sin(_),U=Math.tan(T/4),$=4/3*d*U,K=4/3*h*U,ct=[u,f],gt=[u+$*I,f-K*R],it=[p+$*W,v-K*z],et=[p,v];if(gt[0]=2*ct[0]-gt[0],gt[1]=2*ct[1]-gt[1],l)return gt.concat(it,et,m);m=gt.concat(it,et,m);for(var _t=[],xt=0,Nt=m.length;xt<Nt;xt+=1)_t[xt]=xt%2?nd(m[xt-1],m[xt],y).y:nd(m[xt],m[xt+1],y).x;return _t}function s8(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 t_=function(t,e,n,r){var i=.5,a=co([t,e],[n,r],i);return dt(dt([],a,!0),[n,r,n,r],!1)};function c8(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(ev(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(s8(o[0],o[1],o[2],o[3],o[4],o[5]));case"L":return["C"].concat(t_(s,c,i,a));case"Z":return s===l&&c===u?["C",s,c,l,u,l,u]:["C"].concat(t_(s,c,l,u));default:}return t}function nv(t,e){if(e===void 0&&(e=!1),o8(t)){var n=[].concat(t);return e?[n,[]]:n}for(var r=Jf(t),i=J({},Xx),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=c8(r[f],i);r[f]=d,a8(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 l8(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=co(n,r,e),s=co(r,i,e),c=co(i,a,e),l=co(o,s,e),u=co(s,c,e),f=co(l,u,e);return[["C"].concat(o,l,f),["C"].concat(u,c,a)]}function e_(t){return t.map(function(e,n,r){var i=n&&r[n-1].slice(-2).concat(e.slice(1)),a=n?Kx(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?l8(i):[e,e]:o=[e],{s:e,ss:o,l:a}})}function n_(t,e,n){var r=e_(t),i=e_(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:n_(v[0],v[1],f)}function u8(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 f8(t){var e=0,n=0,r=0;return nv(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=u8(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 r_(t){return f8(t)>=0}function d8(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 h8(t){return t.map(function(e){return Array.isArray(e)?[].concat(e):e})}function p8(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 v8(t,e){var n=t.length-1,r=[],i=0,a=0,o=p8(t);return o.forEach(function(s,c){t.slice(1).forEach(function(l,u){a+=oi(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 g8=function(t){return t===void 0},ln=g8,y8=function(t){return Dl(t,"Boolean")},i_=y8,cs=function(t){var e=typeof t;return t!==null&&e==="object"||e==="function"};function m8(t,e,n){return Qx(t,e,J(J({},n),{bbox:!1,length:!0})).point}function rd(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function rv(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function hc(){}var ls=.7,pc=1/ls,vc="\\s*([+-]?\\d+)\\s*",zl="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ha="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",b8=/^#([0-9a-f]{3,8})$/,x8=new RegExp("^rgb\\(".concat(vc,",").concat(vc,",").concat(vc,"\\)$")),_8=new RegExp("^rgb\\(".concat(ha,",").concat(ha,",").concat(ha,"\\)$")),O8=new RegExp("^rgba\\(".concat(vc,",").concat(vc,",").concat(vc,",").concat(zl,"\\)$")),w8=new RegExp("^rgba\\(".concat(ha,",").concat(ha,",").concat(ha,",").concat(zl,"\\)$")),S8=new RegExp("^hsl\\(".concat(zl,",").concat(ha,",").concat(ha,"\\)$")),M8=new RegExp("^hsla\\(".concat(zl,",").concat(ha,",").concat(ha,",").concat(zl,"\\)$")),a_={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};rd(hc,id,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:o_,formatHex:o_,formatHex8:E8,formatHsl:P8,formatRgb:s_,toString:s_});function o_(){return this.rgb().formatHex()}function E8(){return this.rgb().formatHex8()}function P8(){return h_(this).formatHsl()}function s_(){return this.rgb().formatRgb()}function id(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=b8.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?c_(e):n===3?new Ir(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?ad(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?ad(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=x8.exec(t))?new Ir(e[1],e[2],e[3],1):(e=_8.exec(t))?new Ir(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=O8.exec(t))?ad(e[1],e[2],e[3],e[4]):(e=w8.exec(t))?ad(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=S8.exec(t))?d_(e[1],e[2]/100,e[3]/100,1):(e=M8.exec(t))?d_(e[1],e[2]/100,e[3]/100,e[4]):a_.hasOwnProperty(t)?c_(a_[t]):t==="transparent"?new Ir(NaN,NaN,NaN,0):null}function c_(t){return new Ir(t>>16&255,t>>8&255,t&255,1)}function ad(t,e,n,r){return r<=0&&(t=e=n=NaN),new Ir(t,e,n,r)}function l_(t){return t instanceof hc||(t=id(t)),t?(t=t.rgb(),new Ir(t.r,t.g,t.b,t.opacity)):new Ir}function Gl(t,e,n,r){return arguments.length===1?l_(t):new Ir(t,e,n,r==null?1:r)}function Ir(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}rd(Ir,Gl,rv(hc,{brighter:function(e){return e=e==null?pc:Math.pow(pc,e),new Ir(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=e==null?ls:Math.pow(ls,e),new Ir(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},clamp:function(){return new Ir(us(this.r),us(this.g),us(this.b),od(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:u_,formatHex:u_,formatHex8:A8,formatRgb:f_,toString:f_}));function u_(){return"#".concat(fs(this.r)).concat(fs(this.g)).concat(fs(this.b))}function A8(){return"#".concat(fs(this.r)).concat(fs(this.g)).concat(fs(this.b)).concat(fs((isNaN(this.opacity)?1:this.opacity)*255))}function f_(){var t=od(this.opacity);return"".concat(t===1?"rgb(":"rgba(").concat(us(this.r),", ").concat(us(this.g),", ").concat(us(this.b)).concat(t===1?")":", ".concat(t,")"))}function od(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function us(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function fs(t){return t=us(t),(t<16?"0":"")+t.toString(16)}function d_(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 h_(t){if(t instanceof Ji)return new Ji(t.h,t.s,t.l,t.opacity);if(t instanceof hc||(t=id(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 T8(t,e,n,r){return arguments.length===1?h_(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}rd(Ji,T8,rv(hc,{brighter:function(e){return e=e==null?pc:Math.pow(pc,e),new Ji(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=e==null?ls:Math.pow(ls,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 Ir(iv(e>=240?e-240:e+120,a,i),iv(e,a,i),iv(e<120?e+240:e-120,a,i),this.opacity)},clamp:function(){return new Ji(p_(this.h),sd(this.s),sd(this.l),od(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=od(this.opacity);return"".concat(e===1?"hsl(":"hsla(").concat(p_(this.h),", ").concat(sd(this.s)*100,"%, ").concat(sd(this.l)*100,"%").concat(e===1?")":", ".concat(e,")"))}}));function p_(t){return t=(t||0)%360,t<0?t+360:t}function sd(t){return Math.max(0,Math.min(1,t||0))}function iv(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 Dr(t,e,n,r){var i=t-n,a=e-r;return Math.sqrt(i*i+a*a)}function cd(t,e){var n=Math.min.apply(Math,dt([],D(t),!1)),r=Math.min.apply(Math,dt([],D(e),!1)),i=Math.max.apply(Math,dt([],D(t),!1)),a=Math.max.apply(Math,dt([],D(e),!1));return{x:n,y:r,width:i-n,height:a-r}}function v_(t){return(t+Math.PI*2)%(Math.PI*2)}function g_(t,e){var n=Math.abs(t);return e>0?n:n*-1}function k8(t,e,n,r,i,a){var o=n,s=r;if(o===0||s===0)return{x:t,y:e};for(var c=i-t,l=a-e,u=Math.abs(c),f=Math.abs(l),d=o*o,h=s*s,p=Math.PI/4,v=0,g=0,y=0;y<4;y++){v=o*Math.cos(p),g=s*Math.sin(p);var m=(d-h)*Math.pow(Math.cos(p),3)/o,b=(h-d)*Math.pow(Math.sin(p),3)/s,x=v-m,_=g-b,O=u-m,w=f-b,S=Math.hypot(_,x),M=Math.hypot(w,O),E=S*Math.asin((x*w-_*O)/(S*M)),P=E/Math.sqrt(d+h-v*v-g*g);p+=P,p=Math.min(Math.PI/2,Math.max(0,p))}return{x:t+g_(v,c),y:e+g_(g,l)}}function C8(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 L8(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 N8(t,e,n){return Math.atan(-e/t*Math.tan(n))}function j8(t,e,n){return Math.atan(e/(t*Math.tan(n)))}function R8(t,e,n,r,i,a){return n*Math.cos(i)*Math.cos(a)-r*Math.sin(i)*Math.sin(a)+t}function I8(t,e,n,r,i,a){return n*Math.sin(i)*Math.cos(a)+r*Math.cos(i)*Math.sin(a)+e}function D8(t,e,n,r){var i=Math.atan2(r*t,n*e);return(i+Math.PI*2)%(Math.PI*2)}function y_(t,e,n){return{x:t*Math.cos(n),y:e*Math.sin(n)}}function m_(t,e,n){var r=Math.cos(n),i=Math.sin(n);return[t*r-e*i,t*i+e*r]}function F8(t,e,n,r,i,a,o){for(var s=N8(n,r,i),c=1/0,l=-1/0,u=[a,o],f=-Math.PI*2;f<=Math.PI*2;f+=Math.PI){var d=s+f;a<o?a<d&&d<o&&u.push(d):o<d&&d<a&&u.push(d)}for(var f=0;f<u.length;f++){var h=R8(t,e,n,r,i,u[f]);h<c&&(c=h),h>l&&(l=h)}for(var p=j8(n,r,i),v=1/0,g=-1/0,y=[a,o],f=-Math.PI*2;f<=Math.PI*2;f+=Math.PI){var m=p+f;a<o?a<m&&m<o&&y.push(m):o<m&&m<a&&y.push(m)}for(var f=0;f<y.length;f++){var b=I8(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 nvt(t,e,n,r,i,a,o,s,c){var l=m_(s-t,c-e,-i),u=__read(l,2),f=u[0],d=u[1],h=k8(0,0,n,r,f,d),p=D8(n,r,h.x,h.y);p<a?h=y_(n,r,a):p>o&&(h=y_(n,r,o));var v=m_(h.x,h.y,i);return{x:v[0]+t,y:v[1]+e}}function rvt(t,e,n,r,i,a,o,s){var c=(o-a)*s+a,l=C8(t,e,n,r,i,a,o,c),u=L8(t,e,n,r,i,a,o,c);return v_(Math.atan2(u,l))}var B8=1e-4;function b_(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,dt([],D(t.concat([h])),!1)),i.apply(void 0,dt([],D(e.concat([h])),!1))],v=Dr(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<B8);d++){var y=o-f,m=o+f,p=[i.apply(void 0,dt([],D(t.concat([y])),!1)),i.apply(void 0,dt([],D(e.concat([y])),!1))],v=Dr(c[0],c[1],p[0],p[1]);if(y>=0&&v<s)o=y,s=v;else{var b=[i.apply(void 0,dt([],D(t.concat([m])),!1)),i.apply(void 0,dt([],D(e.concat([m])),!1))],x=Dr(c[0],c[1],b[0],b[1]);m<=1&&x<s?(o=m,s=x):f*=.5}}return{x:i.apply(void 0,dt([],D(t.concat([o])),!1)),y:i.apply(void 0,dt([],D(e.concat([o])),!1))}}function z8(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+=Dr(a,o,s,c)}return n/2}function ivt(t,e,n,r){return cd([t,n],[e,r])}function x_(t,e,n,r){return Dr(t,e,n,r)}function pa(t,e,n,r,i){return{x:(1-i)*t+i*n,y:(1-i)*e+i*r}}function G8(t,e,n,r,i,a){var o=(n-t)*(i-t)+(r-e)*(a-e);if(o<0)return Dr(t,e,i,a);var s=(n-t)*(n-t)+(r-e)*(r-e);return o>s?Dr(n,r,i,a):__(t,e,n,r,i,a)}function __(t,e,n,r,i,a){var o=[n-t,r-e];if(j6(o,[0,0]))return Math.sqrt((i-t)*(i-t)+(a-e)*(a-e));var s=[-o[1],o[0]];L6(s,s);var c=[i-t,a-e];return Math.abs(N6(c,s))}function avt(t,e,n,r){return Math.atan2(r-e,n-t)}function ds(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 O_(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 w_(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(Bl(i,0))Bl(a,0)||(c=-o/a,c>=0&&c<=1&&s.push(c));else{var f=a*a-4*i*o;Bl(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 W8(t,e,n,r,i,a,o,s,c){var l=ds(t,n,i,o,c),u=ds(e,r,a,s,c),f=pa(t,e,n,r,c),d=pa(n,r,i,a,c),h=pa(i,a,o,s,c),p=pa(f.x,f.y,d.x,d.y,c),v=pa(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 av(t,e,n,r,i,a,o,s,c){if(c===0)return z8([t,n,i,o],[e,r,a,s]);var l=W8(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 av.apply(void 0,__spreadArray([],__read(u),!1))+av.apply(void 0,__spreadArray([],__read(f),!1))}function Y8(t,e,n,r,i,a,o,s){for(var c=[t,o],l=[e,s],u=w_(t,n,i,o),f=w_(e,r,a,s),d=0;d<u.length;d++)c.push(ds(t,n,i,o,u[d]));for(var d=0;d<f.length;d++)l.push(ds(e,r,a,s,f[d]));return cd(c,l)}function ovt(t,e,n,r,i,a,o,s){return av(t,e,n,r,i,a,o,s,3)}function H8(t,e,n,r,i,a,o,s,c,l,u){return b_([t,n,i,o],[e,r,a,s],c,l,ds,u)}function S_(t,e,n,r,i,a,o,s,c,l,u){var f=H8(t,e,n,r,i,a,o,s,c,l,u);return Dr(f.x,f.y,c,l)}function svt(t,e,n,r,i,a,o,s,c){return{x:ds(t,n,i,o,c),y:ds(e,r,a,s,c)}}function cvt(t,e,n,r,i,a,o,s,c){var l=O_(t,n,i,o,c),u=O_(e,r,a,s,c);return v_(Math.atan2(u,l))}function M_(t){for(var e=0,n=[],r=0;r<t.length-1;r++){var i=t[r],a=t[r+1],o=Dr(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 E_(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+=Dr(r[0],r[1],i[0],i[1])}return e}function P_(t,e){if(e>1||e<0||t.length<2)return null;var n=M_(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=pa(l[0],l[1],u[0],u[1],d);break}a+=f}return o}function A_(t,e){if(e>1||e<0||t.length<2)return 0;for(var n=M_(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 T_(t,e,n){for(var r=1/0,i=0;i<t.length-1;i++){var a=t[i],o=t[i+1],s=G8(a[0],a[1],o[0],o[1],e,n);s<r&&(r=s)}return r}function $8(t){for(var e=[],n=[],r=0;r<t.length;r++){var i=t[r];e.push(i[0]),n.push(i[1])}return cd(e,n)}function U8(t){return E_(t)}function lvt(t,e){return P_(t,e)}function uvt(t,e,n){return T_(t,e,n)}function fvt(t,e){return A_(t,e)}function ld(t){var e=t.slice(0);return t.length&&e.push(t[0]),e}function dvt(t){return $8(t)}function hvt(t){return E_(ld(t))}function pvt(t,e){return P_(ld(t),e)}function vvt(t,e,n){return T_(ld(t),e,n)}function gvt(t,e){return A_(ld(t),e)}function Wl(t,e,n,r){var i=1-r;return i*i*t+2*r*i*e+r*r*n}function k_(t,e,n){var r=t+n-2*e;if(Bl(r,0))return[.5];var i=(t-e)/r;return i<=1&&i>=0?[i]:[]}function V8(t,e,n,r,i,a,o){var s=Wl(t,n,i,o),c=Wl(e,r,a,o),l=pa(t,e,n,r,o),u=pa(n,r,i,a,o);return[[t,e,l.x,l.y,s,c],[s,c,u.x,u.y,i,a]]}function ov(t,e,n,r,i,a,o){if(o===0)return(Dr(t,e,n,r)+Dr(n,r,i,a)+Dr(t,e,i,a))/2;var s=V8(t,e,n,r,i,a,.5),c=s[0],l=s[1];return c.push(o-1),l.push(o-1),ov.apply(void 0,__spreadArray([],__read(c),!1))+ov.apply(void 0,__spreadArray([],__read(l),!1))}function X8(t,e,n,r,i,a){var o=k_(t,n,i)[0],s=k_(e,r,a)[0],c=[t,i],l=[e,a];return o!==void 0&&c.push(Wl(t,n,i,o)),s!==void 0&&l.push(Wl(e,r,a,s)),cd(c,l)}function yvt(t,e,n,r,i,a){return ov(t,e,n,r,i,a,3)}function q8(t,e,n,r,i,a,o,s){return b_([t,n,i],[e,r,a],o,s,Wl)}function Z8(t,e,n,r,i,a,o,s){var c=q8(t,e,n,r,i,a,o,s);return Dr(c.x,c.y,o,s)}var K8=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof tt.g!="undefined"?tt.g:typeof self!="undefined"?self:{},C_={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(K8,function(){function n(_,O,w,S,M){r(_,O,w||0,S||_.length-1,M||a)}function r(_,O,w,S,M){for(;S>w;){if(S-w>600){var E=S-w+1,P=O-w+1,C=Math.log(E),A=.5*Math.exp(2*C/3),T=.5*Math.sqrt(C*A*(E-A)/E)*(P-E/2<0?-1:1),k=Math.max(w,Math.floor(O-P*A/E+T)),N=Math.min(S,Math.floor(O+(E-P)*A/E+T));r(_,O,k,N,M)}var F=_[O],R=w,I=S;for(i(_,w,O),M(_[S],F)>0&&i(_,w,S);R<I;){for(i(_,R,I),R++,I--;M(_[R],F)<0;)R++;for(;M(_[I],F)>0;)I--}M(_[w],F)===0?i(_,w,I):(I++,i(_,I,S)),I<=O&&(w=I+1),O<=I&&(S=I-1)}}function i(_,O,w){var S=_[O];_[O]=_[w],_[w]=S}function a(_,O){return _<O?-1:_>O?1:0}var o=function(O){O===void 0&&(O=9),this._maxEntries=Math.max(4,O),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()};o.prototype.all=function(){return this._all(this.data,[])},o.prototype.search=function(O){var w=this.data,S=[];if(!m(O,w))return S;for(var M=this.toBBox,E=[];w;){for(var P=0;P<w.children.length;P++){var C=w.children[P],A=w.leaf?M(C):C;m(O,A)&&(w.leaf?S.push(C):y(O,A)?this._all(C,S):E.push(C))}w=E.pop()}return S},o.prototype.collides=function(O){var w=this.data;if(!m(O,w))return!1;for(var S=[];w;){for(var M=0;M<w.children.length;M++){var E=w.children[M],P=w.leaf?this.toBBox(E):E;if(m(O,P)){if(w.leaf||y(O,P))return!0;S.push(E)}}w=S.pop()}return!1},o.prototype.load=function(O){if(!(O&&O.length))return this;if(O.length<this._minEntries){for(var w=0;w<O.length;w++)this.insert(O[w]);return this}var S=this._build(O.slice(),0,O.length-1,0);if(!this.data.children.length)this.data=S;else if(this.data.height===S.height)this._splitRoot(this.data,S);else{if(this.data.height<S.height){var M=this.data;this.data=S,S=M}this._insert(S,this.data.height-S.height-1,!0)}return this},o.prototype.insert=function(O){return O&&this._insert(O,this.data.height-1),this},o.prototype.clear=function(){return this.data=b([]),this},o.prototype.remove=function(O,w){if(!O)return this;for(var S=this.data,M=this.toBBox(O),E=[],P=[],C,A,T;S||E.length;){if(S||(S=E.pop(),A=E[E.length-1],C=P.pop(),T=!0),S.leaf){var k=s(O,S.children,w);if(k!==-1)return S.children.splice(k,1),E.push(S),this._condense(E),this}!T&&!S.leaf&&y(S,M)?(E.push(S),P.push(C),C=0,A=S,S=S.children[0]):A?(C++,S=A.children[C],T=!1):S=null}return this},o.prototype.toBBox=function(O){return O},o.prototype.compareMinX=function(O,w){return O.minX-w.minX},o.prototype.compareMinY=function(O,w){return O.minY-w.minY},o.prototype.toJSON=function(){return this.data},o.prototype.fromJSON=function(O){return this.data=O,this},o.prototype._all=function(O,w){for(var S=[];O;)O.leaf?w.push.apply(w,O.children):S.push.apply(S,O.children),O=S.pop();return w},o.prototype._build=function(O,w,S,M){var E=S-w+1,P=this._maxEntries,C;if(E<=P)return C=b(O.slice(w,S+1)),c(C,this.toBBox),C;M||(M=Math.ceil(Math.log(E)/Math.log(P)),P=Math.ceil(E/Math.pow(P,M-1))),C=b([]),C.leaf=!1,C.height=M;var A=Math.ceil(E/P),T=A*Math.ceil(Math.sqrt(P));x(O,w,S,T,this.compareMinX);for(var k=w;k<=S;k+=T){var N=Math.min(k+T-1,S);x(O,k,N,A,this.compareMinY);for(var F=k;F<=N;F+=A){var R=Math.min(F+A-1,N);C.children.push(this._build(O,F,R,M-1))}}return c(C,this.toBBox),C},o.prototype._chooseSubtree=function(O,w,S,M){for(;M.push(w),!(w.leaf||M.length-1===S);){for(var E=1/0,P=1/0,C=void 0,A=0;A<w.children.length;A++){var T=w.children[A],k=h(T),N=v(O,T)-k;N<P?(P=N,E=k<E?k:E,C=T):N===P&&k<E&&(E=k,C=T)}w=C||w.children[0]}return w},o.prototype._insert=function(O,w,S){var M=S?O:this.toBBox(O),E=[],P=this._chooseSubtree(M,this.data,w,E);for(P.children.push(O),u(P,M);w>=0&&E[w].children.length>this._maxEntries;)this._split(E,w),w--;this._adjustParentBBoxes(M,E,w)},o.prototype._split=function(O,w){var S=O[w],M=S.children.length,E=this._minEntries;this._chooseSplitAxis(S,E,M);var P=this._chooseSplitIndex(S,E,M),C=b(S.children.splice(P,S.children.length-P));C.height=S.height,C.leaf=S.leaf,c(S,this.toBBox),c(C,this.toBBox),w?O[w-1].children.push(C):this._splitRoot(S,C)},o.prototype._splitRoot=function(O,w){this.data=b([O,w]),this.data.height=O.height+1,this.data.leaf=!1,c(this.data,this.toBBox)},o.prototype._chooseSplitIndex=function(O,w,S){for(var M,E=1/0,P=1/0,C=w;C<=S-w;C++){var A=l(O,0,C,this.toBBox),T=l(O,C,S,this.toBBox),k=g(A,T),N=h(A)+h(T);k<E?(E=k,M=C,P=N<P?N:P):k===E&&N<P&&(P=N,M=C)}return M||S-w},o.prototype._chooseSplitAxis=function(O,w,S){var M=O.leaf?this.compareMinX:f,E=O.leaf?this.compareMinY:d,P=this._allDistMargin(O,w,S,M),C=this._allDistMargin(O,w,S,E);P<C&&O.children.sort(M)},o.prototype._allDistMargin=function(O,w,S,M){O.children.sort(M);for(var E=this.toBBox,P=l(O,0,w,E),C=l(O,S-w,S,E),A=p(P)+p(C),T=w;T<S-w;T++){var k=O.children[T];u(P,O.leaf?E(k):k),A+=p(P)}for(var N=S-w-1;N>=w;N--){var F=O.children[N];u(C,O.leaf?E(F):F),A+=p(C)}return A},o.prototype._adjustParentBBoxes=function(O,w,S){for(var M=S;M>=0;M--)u(w[M],O)},o.prototype._condense=function(O){for(var w=O.length-1,S=void 0;w>=0;w--)O[w].children.length===0?w>0?(S=O[w-1].children,S.splice(S.indexOf(O[w]),1)):this.clear():c(O[w],this.toBBox)};function s(_,O,w){if(!w)return O.indexOf(_);for(var S=0;S<O.length;S++)if(w(_,O[S]))return S;return-1}function c(_,O){l(_,0,_.children.length,O,_)}function l(_,O,w,S,M){M||(M=b(null)),M.minX=1/0,M.minY=1/0,M.maxX=-1/0,M.maxY=-1/0;for(var E=O;E<w;E++){var P=_.children[E];u(M,_.leaf?S(P):P)}return M}function u(_,O){return _.minX=Math.min(_.minX,O.minX),_.minY=Math.min(_.minY,O.minY),_.maxX=Math.max(_.maxX,O.maxX),_.maxY=Math.max(_.maxY,O.maxY),_}function f(_,O){return _.minX-O.minX}function d(_,O){return _.minY-O.minY}function h(_){return(_.maxX-_.minX)*(_.maxY-_.minY)}function p(_){return _.maxX-_.minX+(_.maxY-_.minY)}function v(_,O){return(Math.max(O.maxX,_.maxX)-Math.min(O.minX,_.minX))*(Math.max(O.maxY,_.maxY)-Math.min(O.minY,_.minY))}function g(_,O){var w=Math.max(_.minX,O.minX),S=Math.max(_.minY,O.minY),M=Math.min(_.maxX,O.maxX),E=Math.min(_.maxY,O.maxY);return Math.max(0,M-w)*Math.max(0,E-S)}function y(_,O){return _.minX<=O.minX&&_.minY<=O.minY&&O.maxX<=_.maxX&&O.maxY<=_.maxY}function m(_,O){return O.minX<=_.maxX&&O.minY<=_.maxY&&O.maxX>=_.minX&&O.maxY>=_.minY}function b(_){return{children:_,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function x(_,O,w,S,M){for(var E=[O,w];E.length;)if(w=E.pop(),O=E.pop(),!(w-O<=S)){var P=O+Math.ceil((w-O)/S/2)*S;n(_,P,O,w,M),E.push(O,P,P,w)}}return o})})(C_);var Q8=C_.exports,st;(function(t){t.GROUP="g",t.CIRCLE="circle",t.ELLIPSE="ellipse",t.IMAGE="image",t.RECT="rect",t.LINE="line",t.POLYLINE="polyline",t.POLYGON="polygon",t.TEXT="text",t.PATH="path",t.HTML="html",t.MESH="mesh"})(st||(st={}));var gc;(function(t){t[t.ZERO=0]="ZERO",t[t.NEGATIVE_ONE=1]="NEGATIVE_ONE"})(gc||(gc={}));var lo=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}(),J8=function(){function t(e){this.clipSpaceNearZ=gc.NEGATIVE_ONE,this.plugins=[],this.config=J({enableDirtyCheck:!0,enableCulling:!1,enableAutoRendering:!0,enableDirtyRectangleRendering:!0,enableDirtyRectangleRenderingDebug:!1,enableSizeAttenuation:!0},e)}return t.prototype.registerPlugin=function(e){var n=this.plugins.findIndex(function(r){return r===e});n===-1&&this.plugins.push(e)},t.prototype.unregisterPlugin=function(e){var n=this.plugins.findIndex(function(r){return r===e});n>-1&&this.plugins.splice(n,1)},t.prototype.getPlugins=function(){return this.plugins},t.prototype.getPlugin=function(e){return this.plugins.find(function(n){return n.name===e})},t.prototype.getConfig=function(){return this.config},t.prototype.setConfig=function(e){Object.assign(this.config,e)},t}();function yc(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function sv(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function ud(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function L_(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function t9(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 e9(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 mc(t){return t===void 0?0:t>360||t<-360?t%360:t}function Xr(t,e,n){return e===void 0&&(e=0),n===void 0&&(n=0),Array.isArray(t)&&t.length===3?ja(t):vn(t)?De(t,e,n):De(t[0],t[1]||e,t[2]||n)}function rn(t){return t*(Math.PI/180)}function Li(t){return t*(180/Math.PI)}function mvt(t){return t=t%400,t<0&&(t+=400),t/400*360}function bvt(t){return t/360}function n9(t){return 360*t}function r9(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 i9(t,e){var n,r,i=Math.PI*.5,a=D(uc(Se(),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 cv(t,e){return e.length===16?i9(t,e):r9(t,e)}function a9(t,e,n,r,i){var a=Math.cos(t),o=Math.sin(t);return u6(r*a,i*o,0,-r*o,i*a,0,e,n,1)}function o9(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 N_(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 va=cn(),ta=cn(),Yl=fc(),ce=[Se(),Se(),Se()],j_=Se();function s9(t,e,n,r,i,a){if(!c9(va,t)||(is(ta,va),ta[3]=0,ta[7]=0,ta[11]=0,ta[15]=1,Math.abs(Tx(ta))<1e-8))return!1;var o=va[3],s=va[7],c=va[11],l=va[12],u=va[13],f=va[14],d=va[15];if(o!==0||s!==0||c!==0){Yl[0]=o,Yl[1]=s,Yl[2]=c,Yl[3]=d;var h=da(ta,ta);if(!h)return!1;Ax(ta,ta),Il(i,Yl,ta)}else i[0]=i[1]=i[2]=0,i[3]=1;if(e[0]=l,e[1]=u,e[2]=f,l9(ce,va),n[0]=Ra(ce[0]),rs(ce[0],ce[0]),r[0]=Qi(ce[0],ce[1]),lv(ce[1],ce[1],ce[0],1,-r[0]),n[1]=Ra(ce[1]),rs(ce[1],ce[1]),r[0]/=n[1],r[1]=Qi(ce[0],ce[2]),lv(ce[2],ce[2],ce[0],1,-r[1]),r[2]=Qi(ce[1],ce[2]),lv(ce[2],ce[2],ce[1],1,-r[2]),n[2]=Ra(ce[2]),rs(ce[2],ce[2]),r[1]/=n[2],r[2]/=n[2],$f(j_,ce[1],ce[2]),Qi(ce[0],j_)<0)for(var p=0;p<3;p++)n[p]*=-1,ce[p][0]*=-1,ce[p][1]*=-1,ce[p][2]*=-1;return a[0]=.5*Math.sqrt(Math.max(1+ce[0][0]-ce[1][1]-ce[2][2],0)),a[1]=.5*Math.sqrt(Math.max(1-ce[0][0]+ce[1][1]-ce[2][2],0)),a[2]=.5*Math.sqrt(Math.max(1-ce[0][0]-ce[1][1]+ce[2][2],0)),a[3]=.5*Math.sqrt(Math.max(1+ce[0][0]+ce[1][1]+ce[2][2],0)),ce[2][1]>ce[1][2]&&(a[0]=-a[0]),ce[0][2]>ce[2][0]&&(a[1]=-a[1]),ce[1][0]>ce[0][1]&&(a[2]=-a[2]),!0}function c9(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 l9(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 lv(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 Un=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){yc(this.center,e),yc(this.halfExtents,n),sv(this.min,this.center,this.halfExtents),ud(this.max,this.center,this.halfExtents)},t.prototype.setMinMax=function(e,n){ud(this.center,n,e),L_(this.center,this.center,.5),sv(this.halfExtents,n,e),L_(this.halfExtents,this.halfExtents,.5),yc(this.min,e),yc(this.max,n)},t.prototype.getMin=function(){return this.min},t.prototype.getMax=function(){return this.max},t.prototype.add=function(e){if(!t.isEmpty(e)){if(t.isEmpty(this)){this.setMinMax(e.getMin(),e.getMax());return}var n=this.center,r=n[0],i=n[1],a=n[2],o=this.halfExtents,s=o[0],c=o[1],l=o[2],u=r-s,f=r+s,d=i-c,h=i+c,p=a-l,v=a+l,g=e.center,y=g[0],m=g[1],b=g[2],x=e.halfExtents,_=x[0],O=x[1],w=x[2],S=y-_,M=y+_,E=m-O,P=m+O,C=b-w,A=b+w;S<u&&(u=S),M>f&&(f=M),E<d&&(d=E),P>h&&(h=P),C<p&&(p=C),A>v&&(v=A),n[0]=(u+f)*.5,n[1]=(d+h)*.5,n[2]=(p+v)*.5,o[0]=(f-u)*.5,o[1]=(h-d)*.5,o[2]=(v-p)*.5,this.min[0]=u,this.min[1]=d,this.min[2]=p,this.max[0]=f,this.max[1]=h,this.max[2]=v}},t.prototype.setFromTransformedAABB=function(e,n){var r=this.center,i=this.halfExtents,a=e.center,o=e.halfExtents,s=n[0],c=n[4],l=n[8],u=n[1],f=n[5],d=n[9],h=n[2],p=n[6],v=n[10],g=Math.abs(s),y=Math.abs(c),m=Math.abs(l),b=Math.abs(u),x=Math.abs(f),_=Math.abs(d),O=Math.abs(h),w=Math.abs(p),S=Math.abs(v);r[0]=n[12]+s*a[0]+c*a[1]+l*a[2],r[1]=n[13]+u*a[0]+f*a[1]+d*a[2],r[2]=n[14]+h*a[0]+p*a[1]+v*a[2],i[0]=g*o[0]+y*o[1]+m*o[2],i[1]=b*o[0]+x*o[1]+_*o[2],i[2]=O*o[0]+w*o[1]+S*o[2],sv(this.min,r,i),ud(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=t9([0,0,0],this.getMin(),e.getMin()),i=e9([0,0,0],this.getMax(),e.getMax());return n.setMinMax(r,i),n},t.prototype.getNegativeFarPoint=function(e){return e.pnVertexFlag===273?yc([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?yc([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}(),u9=function(){function t(e,n){this.distance=e||0,this.normal=n||De(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 Qi(e,this.normal)-this.distance},t.prototype.normalize=function(){var e=1/Ex(this.normal);U0(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&&V0(r,e,n,o),s},t}(),uo;(function(t){t[t.OUTSIDE=4294967295]="OUTSIDE",t[t.INSIDE=0]="INSIDE",t[t.INDETERMINATE=2147483647]="INDETERMINATE"})(uo||(uo={}));var f9=function(){function t(e){if(this.planes=[],e)this.planes=e;else for(var n=0;n<6;n++)this.planes.push(new u9)}return t.prototype.extractFromVPMatrix=function(e){var n=D(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];Ki(this.planes[0].normal,o-r,u-s,p-f),this.planes[0].distance=m-v,Ki(this.planes[1].normal,o+r,u+s,p+f),this.planes[1].distance=m+v,Ki(this.planes[2].normal,o+i,u+c,p+d),this.planes[2].distance=m+g,Ki(this.planes[3].normal,o-i,u-c,p-d),this.planes[3].distance=m-g,Ki(this.planes[4].normal,o-a,u-l,p-h),this.planes[4].distance=m-y,Ki(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}(),Sr=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}(),hs=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}(),an="Method not implemented.",bc="Use document.documentElement instead.",d9="Cannot append a destroyed element.",qe;(function(t){t[t.ORBITING=0]="ORBITING",t[t.EXPLORING=1]="EXPLORING",t[t.TRACKING=2]="TRACKING"})(qe||(qe={}));var Hl;(function(t){t[t.DEFAULT=0]="DEFAULT",t[t.ROTATIONAL=1]="ROTATIONAL",t[t.TRANSLATIONAL=2]="TRANSLATIONAL",t[t.CINEMATIC=3]="CINEMATIC"})(Hl||(Hl={}));var si;(function(t){t[t.ORTHOGRAPHIC=0]="ORTHOGRAPHIC",t[t.PERSPECTIVE=1]="PERSPECTIVE"})(si||(si={}));var R_={UPDATED:"updated"},I_=2e-4,D_=function(){function t(){this.clipSpaceNearZ=gc.NEGATIVE_ONE,this.eventEmitter=new $0,this.matrix=cn(),this.right=De(1,0,0),this.up=De(0,1,0),this.forward=De(0,0,1),this.position=De(0,0,1),this.focalPoint=De(0,0,0),this.distanceVector=De(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=cn(),this.projectionMatrixInverse=cn(),this.jitteredProjectionMatrix=void 0,this.enableUpdate=!0,this.type=qe.EXPLORING,this.trackingMode=Hl.DEFAULT,this.projectionMode=si.PERSPECTIVE,this.frustum=new f9,this.orthoMatrix=cn()}return t.prototype.isOrtho=function(){return this.projectionMode===si.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===qe.EXPLORING?this.setWorldRotation(!0):this.setWorldRotation(!1),this._getAngles(),this.type===qe.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!==qe.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 da(cn(),this.matrix)},t.prototype.getWorldTransform=function(){return this.matrix},t.prototype.jitterProjectionMatrix=function(e,n){var r=os(cn(),[e,n,0]);this.jitteredProjectionMatrix=Rr(cn(),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.setProjectionMatrix=function(e){this.projectionMatrix=e},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===si.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===si.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===si.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===si.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===si.ORTHOGRAPHIC?this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far):this.projectionMode===si.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=De(c-i,l-a,0),f=Qi(u,this.right)/Ra(this.right),d=Qi(u,this.up)/Ra(this.up);return this.pan(-f,-d),this},t.prototype.setPerspective=function(e,n,r,i){var a;this.projectionMode=si.PERSPECTIVE,this.fov=r,this.near=e,this.far=n,this.aspect=i;var o=this.near*Math.tan(rn(.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 o9(this.projectionMatrix,l,l+c,o,o-s,e,this.far,this.clipSpaceNearZ===gc.ZERO),Uf(this.projectionMatrix,this.projectionMatrix,De(1,-1,1)),da(this.projectionMatrixInverse,this.projectionMatrix),this.triggerUpdate(),this},t.prototype.setOrthographic=function(e,n,r,i,a,o){var s;this.projectionMode=si.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===gc.NEGATIVE_ONE?Fx(this.projectionMatrix,d,h,v,p,a,o):Bx(this.projectionMatrix,d,h,v,p,a,o),Uf(this.projectionMatrix,this.projectionMatrix,De(1,-1,1)),da(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=Xr(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=De(0,1,0);if(this.focalPoint=Xr(e,n,r),this.trackingMode===Hl.CINEMATIC){var a=Sx(Se(),this.focalPoint,this.position);e=a[0],n=a[1],r=a[2];var o=Ra(a),s=Li(Math.asin(n/o)),c=90+Li(Math.atan2(r,e)),l=cn();Cx(l,l,rn(c)),kx(l,l,rn(s)),i=fr(Se(),[0,1,0],l)}return da(this.matrix,zx(cn(),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<I_&&(this.distance=I_),this.dollyingStep=this.distance/100;var n=Se();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=mc(e),this.computeMatrix(),this._getAxes(),this.type===qe.ORBITING||this.type===qe.EXPLORING?this._getPosition():this.type===qe.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},t.prototype.getAzimuth=function(){return this.azimuth},t.prototype.setElevation=function(e){return this.elevation=mc(e),this.computeMatrix(),this._getAxes(),this.type===qe.ORBITING||this.type===qe.EXPLORING?this._getPosition():this.type===qe.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},t.prototype.getElevation=function(){return this.elevation},t.prototype.setRoll=function(e){return this.roll=mc(e),this.computeMatrix(),this._getAxes(),this.type===qe.ORBITING||this.type===qe.EXPLORING?this._getPosition():this.type===qe.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=oo(tr(),[0,0,1],rn(this.roll));as(this.matrix);var n=oo(tr(),[1,0,0],rn((this.rotateWorld&&this.type!==qe.TRACKING||this.type===qe.TRACKING?1:-1)*this.elevation)),r=oo(tr(),[0,1,0],rn((this.rotateWorld&&this.type!==qe.TRACKING||this.type===qe.TRACKING?1:-1)*this.azimuth)),i=so(tr(),r,n);i=so(tr(),i,e);var a=Z0(cn(),i);this.type===qe.ORBITING||this.type===qe.EXPLORING?(lc(this.matrix,this.matrix,this.focalPoint),Rr(this.matrix,this.matrix,a),lc(this.matrix,this.matrix,[0,0,this.distance])):this.type===qe.TRACKING&&(lc(this.matrix,this.matrix,this.position),Rr(this.matrix,this.matrix,a))},t.prototype._setPosition=function(e,n,r){this.position=Xr(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(){ai(this.right,Xr(Il(fc(),[1,0,0,0],this.matrix))),ai(this.up,Xr(Il(fc(),[0,1,0,0],this.matrix))),ai(this.forward,Xr(Il(fc(),[0,0,1,0],this.matrix))),rs(this.right,this.right),rs(this.up,this.up),rs(this.forward,this.forward)},t.prototype._getAngles=function(){var e=this.distanceVector[0],n=this.distanceVector[1],r=this.distanceVector[2],i=Ra(this.distanceVector);if(i===0){this.elevation=0,this.azimuth=0;return}this.type===qe.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(){ai(this.position,Xr(Il(fc(),[0,0,0,1],this.matrix))),this._getDistance()},t.prototype._getFocalPoint=function(){WD(this.distanceVector,[0,0,-this.distance],l6(Yx(),this.matrix)),cc(this.focalPoint,this.position,this.distanceVector),this._getDistance()},t.prototype._getDistance=function(){this.distanceVector=Sx(Se(),this.focalPoint,this.position),this.distance=Ra(this.distanceVector),this.dollyingStep=this.distance/100},t.prototype._getOrthoMatrix=function(){if(this.projectionMode===si.ORTHOGRAPHIC){var e=this.position,n=oo(tr(),[0,0,1],-this.roll*Math.PI/180);Rl(this.orthoMatrix,n,De((this.rright-this.left)/2-e[0],(this.top-this.bottom)/2-e[1],0),De(this.zoom,this.zoom,1),e)}},t.prototype.triggerUpdate=function(){if(this.enableUpdate){var e=this.getViewTransform(),n=Rr(cn(),this.getPerspective(),e);this.getFrustum().extractFromVPMatrix(n),this.eventEmitter.emit(R_.UPDATED)}},t.prototype.rotate=function(e,n,r){throw new Error(an)},t.prototype.pan=function(e,n){throw new Error(an)},t.prototype.dolly=function(e){throw new Error(an)},t.prototype.createLandmark=function(e,n){throw new Error(an)},t.prototype.gotoLandmark=function(e,n){throw new Error(an)},t.prototype.cancelLandmarkAnimation=function(){throw new Error(an)},t}();function Mr(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(Mr.Cache||Map),n}Mr.Cache=Map;var Mt;(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"})(Mt||(Mt={}));var xi;(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"})(xi||(xi={}));var F_;(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"})(F_||(F_={}));var uv;(function(t){t[t.kYes=0]="kYes",t[t.kNo=1]="kNo"})(uv||(uv={}));var fv;(function(t){t[t.kYes=0]="kYes",t[t.kNo=1]="kNo"})(fv||(fv={}));var h9=[{name:"em",unit_type:Mt.kEms},{name:"px",unit_type:Mt.kPixels},{name:"deg",unit_type:Mt.kDegrees},{name:"rad",unit_type:Mt.kRadians},{name:"grad",unit_type:Mt.kGradians},{name:"ms",unit_type:Mt.kMilliseconds},{name:"s",unit_type:Mt.kSeconds},{name:"rem",unit_type:Mt.kRems},{name:"turn",unit_type:Mt.kTurns}],fo;(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"})(fo||(fo={}));var p9=function(t){return h9.find(function(e){return e.name===t}).unit_type},v9=function(t){return t?t==="number"?Mt.kNumber:t==="percent"||t==="%"?Mt.kPercentage:p9(t):Mt.kUnknown},g9=function(t){switch(t){case Mt.kNumber:case Mt.kInteger:return xi.kUNumber;case Mt.kPercentage:return xi.kUPercent;case Mt.kPixels:return xi.kULength;case Mt.kMilliseconds:case Mt.kSeconds:return xi.kUTime;case Mt.kDegrees:case Mt.kRadians:case Mt.kGradians:case Mt.kTurns:return xi.kUAngle;default:return xi.kUOther}},y9=function(t){switch(t){case xi.kUNumber:return Mt.kNumber;case xi.kULength:return Mt.kPixels;case xi.kUPercent:return Mt.kPercentage;case xi.kUTime:return Mt.kSeconds;case xi.kUAngle:return Mt.kDegrees;default:return Mt.kUnknown}},B_=function(t){var e=1;switch(t){case Mt.kPixels:case Mt.kDegrees:case Mt.kSeconds:break;case Mt.kMilliseconds:e=.001;break;case Mt.kRadians:e=180/Math.PI;break;case Mt.kGradians:e=.9;break;case Mt.kTurns:e=360;break}return e},dv=function(t){switch(t){case Mt.kNumber:case Mt.kInteger:return"";case Mt.kPercentage:return"%";case Mt.kEms:return"em";case Mt.kRems:return"rem";case Mt.kPixels:return"px";case Mt.kDegrees:return"deg";case Mt.kRadians:return"rad";case Mt.kGradians:return"grad";case Mt.kMilliseconds:return"ms";case Mt.kSeconds:return"s";case Mt.kTurns:return"turn"}return""},fd=function(){function t(){}return t.isAngle=function(e){return e===Mt.kDegrees||e===Mt.kRadians||e===Mt.kGradians||e===Mt.kTurns},t.isLength=function(e){return e>=Mt.kEms&&e<Mt.kDegrees},t.isRelativeUnit=function(e){return e===Mt.kPercentage||e===Mt.kEms||e===Mt.kRems},t.isTime=function(e){return e===Mt.kSeconds||e===Mt.kMilliseconds},t.prototype.toString=function(){return this.buildCSSText(uv.kNo,fv.kNo,"")},t.prototype.isNumericValue=function(){return this.getType()>=fo.kUnitType&&this.getType()<=fo.kClampType},t}(),m9=function(t){It(e,t);function e(n){var r=t.call(this)||this;return r.colorSpace=n,r}return e.prototype.getType=function(){return fo.kColorType},e.prototype.to=function(n){return this},e}(fd),ga;(function(t){t[t.Constant=0]="Constant",t[t.LinearGradient=1]="LinearGradient",t[t.RadialGradient=2]="RadialGradient"})(ga||(ga={}));var dd=function(t){It(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 fo.kColorType},e}(fd),ci=function(t){It(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 fo.kKeywordType},e.prototype.buildCSSText=function(n,r,i){return i+this.value},e}(fd),b9=Mr(function(t){return t===void 0&&(t=""),t.replace(/-([a-z])/g,function(e){return e[1].toUpperCase()})}),z_=function(t){return t.split("").map(function(e,n){return e.toUpperCase()===e?"".concat(n!==0?"-":"").concat(e.toLowerCase()):e}).join("")};function x9(t){if(!t)throw new Error}function xc(t){return typeof t=="function"}function _9(t){return typeof t=="symbol"}var xvt=function(t){return Object.fromEntries(Object.entries(t).filter(function(e){var n=__read(e,2),r=n[1];return r!==void 0}))},O9={d:{alias:"path"},strokeDasharray:{alias:"lineDash"},strokeWidth:{alias:"lineWidth"},textAnchor:{alias:"textAlign"},src:{alias:"img"}},hv=Mr(function(t){var e=b9(t),n=O9[e];return e=(n==null?void 0:n.alias)||e,e}),w9=function(t,e){e===void 0&&(e="");var n="";return Number.isFinite(t)?(x9(Number.isNaN(t)),n="NaN"):t>0?n="infinity":n="-infinity",n+=e},pv=function(t){return y9(g9(t))},on=function(t){It(e,t);function e(n,r){r===void 0&&(r=Mt.kNumber);var i=t.call(this)||this,a;return typeof r=="string"?a=v9(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 fo.kUnitType},e.prototype.convertTo=function(n){if(this.unit===n)return new e(this.value,this.unit);var r=pv(this.unit);if(r!==pv(n)||r===Mt.kUnknown)return null;var i=B_(this.unit)/B_(n);return new e(this.value*i,n)},e.prototype.buildCSSText=function(n,r,i){var a;switch(this.unit){case Mt.kUnknown:break;case Mt.kInteger:a=Number(this.value).toFixed(0);break;case Mt.kNumber:case Mt.kPercentage:case Mt.kEms:case Mt.kRems:case Mt.kPixels:case Mt.kDegrees:case Mt.kRadians:case Mt.kGradians:case Mt.kMilliseconds:case Mt.kSeconds:case Mt.kTurns:{var o=-999999,s=999999,c=this.value,l=dv(this.unit);if(c<o||c>s){var u=dv(this.unit);!Number.isFinite(c)||Number.isNaN(c)?a=w9(c,u):a=c+(u||"")}else a="".concat(c).concat(l)}}return i+=a,i},e}(fd),Vn=new on(0,"px");new on(1,"px");var Ni=new on(0,"deg"),vv=function(t){It(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}(m9),Sn=new ci("unset"),S9=new ci("initial"),M9=new ci("inherit"),gv={"":Sn,unset:Sn,initial:S9,inherit:M9},yv=function(t){return gv[t]||(gv[t]=new ci(t)),gv[t]},hd=new vv(0,0,0,0,!0),G_=new vv(0,0,0,0),E9=Mr(function(t,e,n,r){return new vv(t,e,n,r)},function(t,e,n,r){return"rgba(".concat(t,",").concat(e,",").concat(n,",").concat(r,")")}),un=function(t,e){return e===void 0&&(e=Mt.kNumber),new on(t,e)};new on(50,"%");var mv;(function(t){t[t.Standard=0]="Standard"})(mv||(mv={}));var _c;(function(t){t[t.ADDED=0]="ADDED",t[t.REMOVED=1]="REMOVED",t[t.Z_INDEX_CHANGED=2]="Z_INDEX_CHANGED"})(_c||(_c={}));var W_={absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new hs(0,0,0,0)},Tt;(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>"})(Tt||(Tt={}));function P9(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 A9=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,R,I){return s(R,function(z){var W=I();return W&&(k(t.comma)||n("Missing comma before color stops")),{type:F,orientation:W,colorStops:b(x)}})}function s(F,R){var I=k(F);if(I){k(t.startCall)||n("Missing (");var z=R(I);return k(t.endCall)||n("Missing )"),z}}function c(){return l()||u()}function l(){return T("directional",t.sideOrCorner,1)}function u(){return T("angular",t.angleValue,1)}function f(){var F,R=d(),I;return R&&(F=[],F.push(R),I=e,k(t.comma)&&(R=d(),R?F.push(R):e=I)),F}function d(){var F=h()||p();if(F)F.at=g();else{var R=v();if(R){F=R;var I=g();I&&(F.at=I)}else{var z=y();z&&(F={type:"default-radial",at:z})}}return F}function h(){var F=T("shape",/^(circle)/i,0);return F&&(F.style=A()||v()),F}function p(){var F=T("shape",/^(ellipse)/i,0);return F&&(F.style=P()||v()),F}function v(){return T("extent-keyword",t.extentKeywords,1)}function g(){if(T("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:P(),y:P()}}function b(F){var R=F(),I=[];if(R)for(I.push(R);k(t.comma);)R=F(),R?I.push(R):n("One extra comma");return I}function x(){var F=_();return F||n("Expected color definition"),F.length=P(),F}function _(){return w()||M()||S()||O()}function O(){return T("literal",t.literalColor,0)}function w(){return T("hex",t.hexColor,1)}function S(){return s(t.rgbColor,function(){return{type:"rgb",value:b(E)}})}function M(){return s(t.rgbaColor,function(){return{type:"rgba",value:b(E)}})}function E(){return k(t.number)[1]}function P(){return T("%",t.percentageValue,1)||C()||A()}function C(){return T("position-keyword",t.positionKeywords,1)}function A(){return T("px",t.pixelValue,1)||T("em",t.emValue,1)}function T(F,R,I){var z=k(R);if(z)return{type:F,value:z[I]}}function k(F){var R=/^[\n\r\t\s]+/.exec(e);R&&N(R[0].length);var I=F.exec(e);return I&&N(I[0].length),I}function N(F){e=e.substring(F)}return function(F){return e=F,r()}}();function T9(t,e,n,r){var i=rn(r.value),a=0,o=0,s=a+e/2,c=o+n/2,l=Math.abs(e*Math.cos(i))+Math.abs(n*Math.sin(i)),u=t[0]+s-Math.cos(i)*l/2,f=t[1]+c-Math.sin(i)*l/2,d=t[0]+s+Math.cos(i)*l/2,h=t[1]+c+Math.sin(i)*l/2;return{x1:u,y1:f,x2:d,y2:h}}function k9(t,e,n,r,i,a){var o=r.value,s=i.value;r.unit===Mt.kPercentage&&(o=r.value/100*e),i.unit===Mt.kPercentage&&(s=i.value/100*n);var c=Math.max(oi([0,0],[o,s]),oi([0,n],[o,s]),oi([e,n],[o,s]),oi([e,0],[o,s]));return a&&(a instanceof on?c=a.value:a instanceof ci&&(a.value==="closest-side"?c=Math.min(o,e-o,s,n-s):a.value==="farthest-side"?c=Math.max(o,e-o,s,n-s):a.value==="closest-corner"&&(c=Math.min(oi([0,0],[o,s]),oi([0,n],[o,s]),oi([e,n],[o,s]),oi([e,0],[o,s]))))),{x:o+t[0],y:s+t[1],r:c}}var C9=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,L9=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,N9=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,Y_=/[\d.]+:(#[^\s]+|[^\)]+\))/gi;function j9(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(!se(c)&&!se(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 R9={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},I9=Mr(function(t){var e;return t.type==="angular"?e=Number(t.value):e=R9[t.value]||0,un(e,"deg")}),D9=Mr(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:un(e,r),cy:un(n,i)}}),F9=Mr(function(t){var e;if(t.indexOf("linear")>-1||t.indexOf("radial")>-1){var n=A9(t);return n.map(function(s){var c=s.type,l=s.orientation,u=s.colorStops;j9(u);var f=u.map(function(b){return{offset:un(Number(b.length.value),"%"),color:P9(b)}});if(c==="linear-gradient")return new dd(ga.LinearGradient,{angle:l?I9(l):Ni,steps:f});if(c==="radial-gradient"&&(l||(l=[{type:"shape",value:"circle"}]),l[0].type==="shape"&&l[0].value==="circle")){var d=D9(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=yv(m):v=un(m,y)}return new dd(ga.RadialGradient,{cx:h,cy:p,size:v,steps:f})}})}var r=t[0];if(t[1]==="("||t[2]==="("){if(r==="l"){var i=C9.exec(t);if(i){var a=((e=i[2].match(Y_))===null||e===void 0?void 0:e.map(function(s){return s.split(":")}))||[];return[new dd(ga.LinearGradient,{angle:un(parseFloat(i[1]),"deg"),steps:a.map(function(s){var c=D(s,2),l=c[0],u=c[1];return{offset:un(Number(l)*100,"%"),color:u}})})]}}else if(r==="r"){var o=B9(t);if(o)if(Cn(o))t=o;else return[new dd(ga.RadialGradient,o)]}else if(r==="p")return z9(t)}});function B9(t){var e,n=L9.exec(t);if(n){var r=((e=n[4].match(Y_))===null||e===void 0?void 0:e.map(function(i){return i.split(":")}))||[];return{cx:un(50,"%"),cy:un(50,"%"),steps:r.map(function(i){var a=D(i,2),o=a[0],s=a[1];return{offset:un(Number(o)*100,"%"),color:s}})}}return null}function z9(t){var e=N9.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 _vt(t){return!!t.type&&!!t.value}function $l(t){return t&&!!t.image}function pd(t){return t&&!se(t.r)&&!se(t.g)&&!se(t.b)}var Ia=Mr(function(t){if($l(t))return J({repetition:"repeat"},t);if(se(t)&&(t=""),t==="transparent")return G_;if(t==="currentColor")t="black";else if(t==="none")return hd;var e=F9(t);if(e)return e;var n=id(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),E9.apply(void 0,dt([],D(r),!1))});function G9(t,e){if(!(!pd(t)||!pd(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(Bn(r[i],0,255));return r[3]=Bn(r[3],0,1),"rgba(".concat(r.join(","),")")}]}function Ul(t,e){if(se(e))return un(0,"px");if(e="".concat(e).trim().toLowerCase(),isFinite(Number(e))){if("px".search(t)>=0)return un(Number(e),"px");if("deg".search(t)>=0)return un(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 un(Number(e.replace(new RegExp("U"+i,"g"),"").replace(new RegExp(r,"g"),"*0")),i)})[0]}var H_=function(t){return Ul(new RegExp("px","g"),t)},W9=Mr(H_),Y9=function(t){return Ul(new RegExp("%","g"),t)};Mr(Y9);var Vl=function(t){return vn(t)||isFinite(Number(t))?un(Number(t)||0,"px"):Ul(new RegExp("px|%|em|rem","g"),t)},Oc=Mr(Vl),bv=function(t){return Ul(new RegExp("deg|rad|grad|turn","g"),t)},$_=Mr(bv);function H9(t,e,n,r,i){i===void 0&&(i=0);var a="",o=t.value||0,s=e.value||0,c=pv(t.unit),l=t.convertTo(c),u=e.convertTo(c);return l&&u?(o=l.value,s=u.value,a=dv(t.unit)):(on.isLength(t.unit)||on.isLength(e.unit))&&(o=_i(t,i,n),s=_i(e,i,n),a="px"),[o,s,function(f){return r&&(f=Math.max(f,0)),f+a}]}function li(t){var e=0;return t.unit===Mt.kDegrees?e=t.value:t.unit===Mt.kRadians?e=Li(Number(t.value)):t.unit===Mt.kTurns&&(e=n9(Number(t.value))),e}function U_(t,e){var n;return Array.isArray(t)?n=t.map(function(r){return Number(r)}):Cn(t)?n=t.split(" ").map(function(r){return Number(r)}):vn(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 V_(t){return Cn(t)?t.split(" ").map(function(e){return Oc(e)}):t.map(function(e){return Oc(e.toString())})}function _i(t,e,n,r){if(r===void 0&&(r=!1),t.unit===Mt.kPixels)return Number(t.value);if(t.unit===Mt.kPercentage&&n){var i=n.nodeName===st.GROUP?n.getLocalBounds():n.getGeometryBounds();return(r?i.min[e]:0)+t.value/100*i.halfExtents[e]*2}return 0}var $9=function(t){return Ul(/deg|rad|grad|turn|px|%/g,t)},U9=["blur","brightness","drop-shadow","contrast","grayscale","sepia","saturate","hue-rotate","invert"];function X_(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,U9.indexOf(r[1])>-1&&n.push({name:r[1],params:r[2].split(" ").map(function(a){return $9(a)||Ia(a)})}),e.lastIndex===t.length)return n}return[]}function q_(t){return t.toString()}var wc=function(t){return typeof t=="number"?un(t):/^\s*[-+]?(\d*\.)?\d+\s*$/.test(t)?un(Number(t)):un(0)},ps=Mr(wc);Mr(function(t){return Cn(t)?t.split(" ").map(ps):t.map(ps)});function xv(t,e){return[t,e,q_]}function _v(t,e){return function(n,r){return[n,r,function(i){return q_(Bn(i,t,e))}]}}function Z_(t,e){if(t.length===e.length)return[t,e,function(n){return n}]}function Ov(t){return t.parsedStyle.d.totalLength===0&&(t.parsedStyle.d.totalLength=n8(t.parsedStyle.d.absolutePath)),t.parsedStyle.d.totalLength}function V9(t){return t.parsedStyle.points.totalLength===0&&(t.parsedStyle.points.totalLength=U8(t.parsedStyle.points.points)),t.parsedStyle.points.totalLength}function X9(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&&vd(o,s)&&(t.splice(e,1),e--)}}}function q9(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 Z9(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 vd(t,e){return t[0]===e[0]&&t[1]===e[1]}function K9(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=X8(l[0],l[1],c[1],c[2],c[3],c[4]);break;case"C":u=Y8(l[0],l[1],c[1],c[2],c[3],c[4],c[5],c[6]);break;case"A":var f=o.arcParams;u=F8(f.cx,f.cy,f.rx,f.ry,f.xRotation,f.startAngle,f.endAngle);break;default:n.push(s[0]),r.push(s[1]);break}u&&(o.box=u,n.push(u.x,u.x+u.width),r.push(u.y,u.y+u.height)),e&&(o.command==="L"||o.command==="M")&&o.prePoint&&o.nextPoint&&i.push(o)}n=n.filter(function(y){return!Number.isNaN(y)&&y!==1/0&&y!==-1/0}),r=r.filter(function(y){return!Number.isNaN(y)&&y!==1/0&&y!==-1/0});var d=td(n),h=td(r),p=ed(n),v=ed(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=gd(o,e),d=d-g.xExtra):s[0]===p&&(g=gd(o,e),p=p+g.xExtra),s[1]===h?(g=gd(o,e),h=h-g.yExtra):s[1]===v&&(g=gd(o,e),v=v+g.yExtra)}return{x:d,y:h,width:p-d,height:v-h}}function gd(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||Bl(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 K_(t,e){return[e[0]+(e[0]-t[0]),e[1]+(e[1]-t[1])]}var Q_=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},J_=function(t,e,n,r,i,a,o,s){e=Math.abs(e),n=Math.abs(n),r=Jx(r,360);var c=rn(r);if(t.x===o.x&&t.y===o.y)return{x:t.x,y:t.y,ellipticalArcAngle:0};if(e===0||n===0)return{x:0,y:0,ellipticalArcAngle:0};var l=(t.x-o.x)/2,u=(t.y-o.y)/2,f={x:Math.cos(c)*l+Math.sin(c)*u,y:-Math.sin(c)*l+Math.cos(c)*u},d=Math.pow(f.x,2)/Math.pow(e,2)+Math.pow(f.y,2)/Math.pow(n,2);d>1&&(e=Math.sqrt(d)*e,n=Math.sqrt(d)*n);var h=Math.pow(e,2)*Math.pow(n,2)-Math.pow(e,2)*Math.pow(f.y,2)-Math.pow(n,2)*Math.pow(f.x,2),p=Math.pow(e,2)*Math.pow(f.y,2)+Math.pow(n,2)*Math.pow(f.x,2),v=h/p;v=v<0?0:v;var g=(i!==a?1:-1)*Math.sqrt(v),y={x:g*(e*f.y/n),y:g*(-(n*f.x)/e)},m={x:Math.cos(c)*y.x-Math.sin(c)*y.y+(t.x+o.x)/2,y:Math.sin(c)*y.x+Math.cos(c)*y.y+(t.y+o.y)/2},b={x:(f.x-y.x)/e,y:(f.y-y.y)/n},x=Q_({x:1,y:0},b),_={x:(-f.x-y.x)/e,y:(-f.y-y.y)/n},O=Q_(b,_);!a&&O>0?O-=2*Math.PI:a&&O<0&&(O+=2*Math.PI),O%=2*Math.PI;var w=x+O*s,S=e*Math.cos(w),M=n*Math.sin(w),E={x:Math.cos(c)*S-Math.sin(c)*M+m.x,y:Math.sin(c)*S+Math.cos(c)*M+m.y,ellipticalArcStartAngle:x,ellipticalArcEndAngle:x+O,ellipticalArcAngle:w,ellipticalArcCenter:m,resultantRx:e,resultantRy:n};return E};function Q9(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=J9(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]&&vd(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=K_(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=K_(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=t2(u,0),x=b.x,_=b.y,O=t2(u,1,!1),w=O.x,S=O.y;u.startTangent=[x,_],u.endTangent=[w,S]}e.push(u)}return e}function t2(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=J_({x:t.prePoint[0],y:t.prePoint[1]},a,s,c,!!l,!!u,{x:t.currentPoint[0],y:t.currentPoint[1]},e),d=J_({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 yd(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function wv(t,e){return yd(t)*yd(e)?(t[0]*e[0]+t[1]*e[1])/(yd(t)*yd(e)):1}function e2(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(wv(t,e))}function J9(t,e){var n=e[1],r=e[2],i=Jx(rn(e[3]),Math.PI*2),a=e[4],o=e[5],s=t[0],c=t[1],l=e[6],u=e[7],f=Math.cos(i)*(s-l)/2+Math.sin(i)*(c-u)/2,d=-1*Math.sin(i)*(s-l)/2+Math.cos(i)*(c-u)/2,h=f*f/(n*n)+d*d/(r*r);h>1&&(n*=Math.sqrt(h),r*=Math.sqrt(h));var p=n*n*(d*d)+r*r*(f*f),v=p?Math.sqrt((n*n*(r*r)-p)/p):1;a===o&&(v*=-1),isNaN(v)&&(v=0);var g=r?v*n*d/r:0,y=n?v*-r*f/n:0,m=(s+l)/2+Math.cos(i)*g-Math.sin(i)*y,b=(c+u)/2+Math.sin(i)*g+Math.cos(i)*y,x=[(f-g)/n,(d-y)/r],_=[(-1*f-g)/n,(-1*d-y)/r],O=e2([1,0],x),w=e2(x,_);return wv(x,_)<=-1&&(w=Math.PI),wv(x,_)>=1&&(w=0),o===0&&w>0&&(w=w-2*Math.PI),o===1&&w<0&&(w=w+2*Math.PI),{cx:m,cy:b,rx:vd(t,[l,u])?0:n,ry:vd(t,[l,u])?0:r,startAngle:O,endAngle:O+w,xRotation:i,arcFlag:a,sweepFlag:o}}function tF(t,e,n){return t.reduce(function(r,i){var a="";if(i[0]==="M"||i[0]==="L"){var o=De(i[1],i[2],0);n&&fr(o,o,n),a="".concat(i[0]).concat(o[0],",").concat(o[1])}else if(i[0]==="Z")a=i[0];else if(i[0]==="C"){var s=De(i[1],i[2],0),c=De(i[3],i[4],0),l=De(i[5],i[6],0);n&&(fr(s,s,n),fr(c,c,n),fr(l,l,n)),a="".concat(i[0]).concat(s[0],",").concat(s[1],",").concat(c[0],",").concat(c[1],",").concat(l[0],",").concat(l[1])}else if(i[0]==="A"){var u=De(i[6],i[7],0);n&&fr(u,u,n),a="".concat(i[0]).concat(i[1],",").concat(i[2],",").concat(i[3],",").concat(i[4],",").concat(i[5],",").concat(u[0],",").concat(u[1])}else if(i[0]==="Q"){var s=De(i[1],i[2],0),c=De(i[3],i[4],0);n&&(fr(s,s,n),fr(c,c,n)),a="".concat(i[0]).concat(i[1],",").concat(i[2],",").concat(i[3],",").concat(i[4],"}")}return r+=a},"")}function eF(t,e,n,r){return[["M",t,e],["L",n,r]]}function n2(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 nF(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 rF(t,e,n,r,i){if(i){var a=D(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 r2(t,e){e===void 0&&(e=t.getLocalTransform());var n=[];switch(t.nodeName){case st.LINE:var r=t.parsedStyle,i=r.x1,a=i===void 0?0:i,o=r.y1,s=o===void 0?0:o,c=r.x2,l=c===void 0?0:c,u=r.y2,f=u===void 0?0:u;n=eF(a,s,l,f);break;case st.CIRCLE:{var d=t.parsedStyle,h=d.r,p=h===void 0?0:h,v=d.cx,g=v===void 0?0:v,y=d.cy,m=y===void 0?0:y;n=n2(p,p,g,m);break}case st.ELLIPSE:{var b=t.parsedStyle,x=b.rx,_=x===void 0?0:x,O=b.ry,w=O===void 0?0:O,S=b.cx,g=S===void 0?0:S,M=b.cy,m=M===void 0?0:M;n=n2(_,w,g,m);break}case st.POLYLINE:case st.POLYGON:var E=t.parsedStyle.points;n=nF(E.points,t.nodeName===st.POLYGON);break;case st.RECT:var P=t.parsedStyle,C=P.width,A=C===void 0?0:C,T=P.height,k=T===void 0?0:T,N=P.x,F=N===void 0?0:N,R=P.y,I=R===void 0?0:R,z=P.radius,W=z&&z.some(function($){return $!==0});n=rF(A,k,F,I,W&&z.map(function($){return Bn($,0,Math.min(Math.abs(A)/2,Math.abs(k)/2))}));break;case st.PATH:var U=t.parsedStyle.d.absolutePath;n=dt([],D(U),!1);break}if(n.length)return tF(n,t,e)}function Ovt(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);var a=t.map(function(o,s){var c=o[0],l=t[s+1],u=s===0&&(e!==0||n!==0),f=(s===t.length-1||l&&(l[0]==="M"||l[0]==="Z"))&&r!==0&&i!==0;switch(c){case"M":return u?"M ".concat(o[1]+e,",").concat(o[2]+n," L ").concat(o[1],",").concat(o[2]):"M ".concat(o[1],",").concat(o[2]);case"L":return"L ".concat(o[1]+(f?r:0),",").concat(o[2]+(f?i:0));case"Q":return"Q ".concat(o[1]," ").concat(o[2],",").concat(o[3]," ").concat(o[4])+(f?" L ".concat(o[3]+r,",").concat(o[4]+i):"");case"C":return"C ".concat(o[1]," ").concat(o[2],",").concat(o[3]," ").concat(o[4],",").concat(o[5]," ").concat(o[6])+(f?" L ".concat(o[5]+r,",").concat(o[6]+i):"");case"A":return"A ".concat(o[1]," ").concat(o[2]," ").concat(o[3]," ").concat(o[4]," ").concat(o[5]," ").concat(o[6]," ").concat(o[7])+(f?" L ".concat(o[6]+r,",").concat(o[7]+i):"");case"Z":return"Z"}}).join(" ");return~a.indexOf("NaN")?"":a}var i2=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=Jf(t)}catch(d){e=Jf(""),console.error("[g]: Invalid SVG Path definition: ".concat(t))}X9(e);var n=q9(e),r=Z9(e),i=r.polygons,a=r.polylines,o=Q9(e),s=K9(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}}},iF=Mr(i2);function Sv(t){return Cn(t)?iF(t):i2(t)}function aF(t,e,n){var r=t.curve,i=e.curve;(!r||r.length===0)&&(r=nv(t.absolutePath,!1),t.curve=r),(!i||i.length===0)&&(i=nv(e.absolutePath,!1),e.curve=i);var a=[r,i];r.length!==i.length&&(a=n_(r,i));var o=r_(a[0])!==r_(a[1])?d8(a[0]):h8(a[0]);return[o,v8(a[1],o),function(s){return s}]}function a2(t,e){var n;return Cn(t)?n=t.split(" ").map(function(r){var i=D(r.split(","),2),a=i[0],o=i[1];return[Number(a),Number(o)]}):n=t,{points:n,totalLength:0,segments:[]}}function oF(t,e){return[t.points,e.points,function(n){return n}]}var zn=null;function ui(t){return function(e){var n=0;return t.map(function(r){return r===zn?e[n++]:r})}}function vs(t){return t}var md={matrix:["NNNNNN",[zn,zn,0,0,zn,zn,0,0,0,0,1,0,zn,zn,0,1],vs],matrix3d:["NNNNNNNNNNNNNNNN",vs],rotate:["A"],rotatex:["A"],rotatey:["A"],rotatez:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",ui([zn,zn,new on(1)]),vs],scalex:["N",ui([zn,new on(1),new on(1)]),ui([zn,new on(1)])],scaley:["N",ui([new on(1),zn,new on(1)]),ui([new on(1),zn])],scalez:["N",ui([new on(1),new on(1),zn])],scale3d:["NNN",vs],skew:["Aa",null,vs],skewx:["A",null,ui([zn,Ni])],skewy:["A",null,ui([Ni,zn])],translate:["Tt",ui([zn,zn,Vn]),vs],translatex:["T",ui([zn,Vn,Vn]),ui([zn,Vn])],translatey:["T",ui([Vn,zn,Vn]),ui([Vn,zn])],translatez:["L",ui([Vn,Vn,zn])],translate3d:["TTL",vs]};function Mv(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=md[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"?Ni:$_(p)},N:ps,T:Oc,L:W9}[d.toUpperCase()](f):h={a:Ni,n:l[0],t:Vn}[d],h===void 0)return[];l.push(h)}if(n.push({t:a,d:l}),e.lastIndex===t.length)return n}return[]}function o2(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=md[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"?Ni:bv(p)},N:wc,T:Vl,L:H_}[d.toUpperCase()](f):h={a:Ni,n:l[0],t:Vn}[d],h===void 0)return[];l.push(h)}if(n.push({t:a,d:l}),e.lastIndex===t.length)return n}return[]}function sF(t){var e,n,r,i;switch(t.t){case"rotatex":return i=rn(li(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=rn(li(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=rn(li(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=rn(li(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=rn(li(t.d[0])),f=rn(li(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=rn(li(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=rn(li(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=_i(t.d[0],0,null)||0,n=_i(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=_i(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=_i(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=_i(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=_i(t.d[0],0,null)||0,n=_i(t.d[1],0,null)||0,r=_i(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=_i(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 cF(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 lF(t){return t.length===0?[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]:t.map(sF).reduce(cF)}function s2(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 s9(lF(t),e,n,r,i,a),[[e,n,r,a,i]]}var uF=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 fF(t){return t.toFixed(6).replace(".000000","")}function Ev(t,e){var n,r;return t.decompositionPair!==e&&(t.decompositionPair=e,n=s2(t)),e.decompositionPair!==t&&(e.decompositionPair=t,r=s2(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=hF(n[0][3],r[0][3],i[5]),o=uF(i[0],i[1],i[2],a,i[4]),s=o.map(fF).join(",");return s}])}function dF(t,e){for(var n=0,r=0;r<t.length;r++)n+=t[r]*e[r];return n}function hF(t,e,n){var r=dF(t,e);r=Bn(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 Pv(t){return t.replace(/[xy]/,"")}function Av(t){return t.replace(/(x|y|z|3d)?$/,"3d")}var pF=function(t,e){return t==="perspective"&&e==="perspective"||(t==="matrix"||t==="matrix3d")&&(e==="matrix"||e==="matrix3d")};function vF(t,e,n){var r=!1;if(!t.length||!e.length){t.length||(r=!0,t=e,e=[]);for(var i=function(O){var w=t[O],S=w.t,M=w.d,E=S.substring(0,5)==="scale"?1:0;e.push({t:S,d:M.map(function(P){return typeof P=="number"?un(E):un(E,P.unit)})})},a=0;a<t.length;a++)i(a)}var o=[],s=[],c=[];if(t.length!==e.length){var l=Ev(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=md[u],v=md[f],g=void 0;if(pF(u,f)){var l=Ev([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]&&Pv(u)===Pv(f))g=Pv(u),d=p[2](d),h=v[2](h);else if(p[1]&&v[1]&&Av(u)===Av(f))g=Av(u),d=p[1](d),h=v[1](h);else{var l=Ev(t,e);o=[l[0]],s=[l[1]],c=[["matrix",[l[2]]]];break}for(var y=[],m=[],b=[],x=0;x<d.length;x++){var l=H9(d[x],h[x],n,!1,x);y[x]=l[0],m[x]=l[1],b.push(l[2])}o.push(y),s.push(m),c.push([g,b])}if(r){var _=o;o=s,s=_}return[o,s,function(O){return O.map(function(w,S){var M=w.map(function(E,P){return c[S][1][P](E)}).join(",");return c[S][0]==="matrix"&&M.split(",").length===16&&(c[S][0]="matrix3d"),c[S][0]==="matrix3d"&&M.split(",").length===6&&(c[S][0]="matrix"),c[S][0]+"("+M+")"}).join(" ")}]}var c2=Mr(function(t){if(Cn(t)){if(t==="text-anchor")return[un(0,"px"),un(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:[Oc(bd(e[0])),Oc(bd(e[1]))]}else return[un(t[0]||0,"px"),un(t[1]||0,"px")]}),gF=function(t){if(Cn(t)){if(t==="text-anchor")return[un(0,"px"),un(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:[Vl(bd(e[0])),Vl(bd(e[1]))]}else return[un(t[0]||0,"px"),un(t[1]||0,"px")]};function bd(t){return t==="center"?"50%":t==="left"||t==="top"?"0%":t==="right"||t==="bottom"?"100%":t}var Tv=[{n:"display",k:["none"]},{n:"opacity",int:!0,inh:!0,d:"1",syntax:Tt.OPACITY_VALUE},{n:"fillOpacity",int:!0,inh:!0,d:"1",syntax:Tt.OPACITY_VALUE},{n:"strokeOpacity",int:!0,inh:!0,d:"1",syntax:Tt.OPACITY_VALUE},{n:"fill",int:!0,k:["none"],d:"none",syntax:Tt.PAINT},{n:"fillRule",k:["nonzero","evenodd"],d:"nonzero"},{n:"stroke",int:!0,k:["none"],d:"none",syntax:Tt.PAINT,l:!0},{n:"shadowType",k:["inner","outer","both"],d:"outer",l:!0},{n:"shadowColor",int:!0,syntax:Tt.COLOR},{n:"shadowOffsetX",int:!0,l:!0,d:"0",syntax:Tt.LENGTH_PERCENTAGE},{n:"shadowOffsetY",int:!0,l:!0,d:"0",syntax:Tt.LENGTH_PERCENTAGE},{n:"shadowBlur",int:!0,l:!0,d:"0",syntax:Tt.SHADOW_BLUR},{n:"lineWidth",int:!0,inh:!0,d:"1",l:!0,a:["strokeWidth"],syntax:Tt.LENGTH_PERCENTAGE},{n:"increasedLineWidthForHitTesting",inh:!0,d:"0",l:!0,syntax:Tt.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:Tt.LENGTH_PERCENTAGE_12},{n:"lineDashOffset",int:!0,inh:!0,d:"0",a:["strokeDashoffset"],syntax:Tt.LENGTH_PERCENTAGE},{n:"offsetPath",syntax:Tt.DEFINED_PATH},{n:"offsetDistance",int:!0,syntax:Tt.OFFSET_DISTANCE},{n:"dx",int:!0,l:!0,d:"0",syntax:Tt.LENGTH_PERCENTAGE},{n:"dy",int:!0,l:!0,d:"0",syntax:Tt.LENGTH_PERCENTAGE},{n:"zIndex",ind:!0,int:!0,d:"0",k:["auto"],syntax:Tt.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:Tt.FILTER},{n:"clipPath",syntax:Tt.DEFINED_PATH},{n:"textPath",syntax:Tt.DEFINED_PATH},{n:"textPathSide",k:["left","right"],d:"left"},{n:"textPathStartOffset",l:!0,d:"0",syntax:Tt.LENGTH_PERCENTAGE},{n:"transform",p:100,int:!0,k:["none"],d:"none",syntax:Tt.TRANSFORM},{n:"transformOrigin",p:100,d:"0 0",l:!0,syntax:Tt.TRANSFORM_ORIGIN},{n:"cx",int:!0,l:!0,d:"0",syntax:Tt.COORDINATE},{n:"cy",int:!0,l:!0,d:"0",syntax:Tt.COORDINATE},{n:"cz",int:!0,l:!0,d:"0",syntax:Tt.COORDINATE},{n:"r",int:!0,l:!0,d:"0",syntax:Tt.LENGTH_PERCENTAGE},{n:"rx",int:!0,l:!0,d:"0",syntax:Tt.LENGTH_PERCENTAGE},{n:"ry",int:!0,l:!0,d:"0",syntax:Tt.LENGTH_PERCENTAGE},{n:"x",int:!0,l:!0,d:"0",syntax:Tt.COORDINATE},{n:"y",int:!0,l:!0,d:"0",syntax:Tt.COORDINATE},{n:"z",int:!0,l:!0,d:"0",syntax:Tt.COORDINATE},{n:"width",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:Tt.LENGTH_PERCENTAGE},{n:"height",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:Tt.LENGTH_PERCENTAGE},{n:"radius",int:!0,l:!0,d:"0",syntax:Tt.LENGTH_PERCENTAGE_14},{n:"x1",int:!0,l:!0,syntax:Tt.COORDINATE},{n:"y1",int:!0,l:!0,syntax:Tt.COORDINATE},{n:"z1",int:!0,l:!0,syntax:Tt.COORDINATE},{n:"x2",int:!0,l:!0,syntax:Tt.COORDINATE},{n:"y2",int:!0,l:!0,syntax:Tt.COORDINATE},{n:"z2",int:!0,l:!0,syntax:Tt.COORDINATE},{n:"d",int:!0,l:!0,d:"",syntax:Tt.PATH,p:50},{n:"points",int:!0,l:!0,syntax:Tt.LIST_OF_POINTS,p:50},{n:"text",l:!0,d:"",syntax:Tt.TEXT,p:50},{n:"textTransform",l:!0,inh:!0,k:["capitalize","uppercase","lowercase","none"],d:"none",syntax:Tt.TEXT_TRANSFORM,p:51},{n:"font",l:!0},{n:"fontSize",int:!0,inh:!0,d:"16px",l:!0,syntax:Tt.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:Tt.LENGTH,int:!0,d:"0"},{n:"letterSpacing",l:!0,syntax:Tt.LENGTH,int:!0,d:"0"},{n:"miterLimit",l:!0,syntax:Tt.NUMBER,d:function(t){return t===st.PATH||t===st.POLYGON||t===st.POLYLINE?"4":"10"}},{n:"wordWrap",l:!0},{n:"wordWrapWidth",l:!0},{n:"maxLines",l:!0},{n:"textOverflow",l:!0,d:"clip"},{n:"leading",l:!0},{n:"textBaseline",l:!0,inh:!0,k:["top","hanging","middle","alphabetic","ideographic","bottom"],d:"alphabetic"},{n:"textAlign",l:!0,inh:!0,k:["start","center","middle","end","left","right"],d:"start"},{n:"markerStart",syntax:Tt.MARKER},{n:"markerEnd",syntax:Tt.MARKER},{n:"markerMid",syntax:Tt.MARKER},{n:"markerStartOffset",syntax:Tt.LENGTH,l:!0,int:!0,d:"0"},{n:"markerEndOffset",syntax:Tt.LENGTH,l:!0,int:!0,d:"0"}],l2=Tv.filter(function(t){return!!t.l}).map(function(t){return t.n}),ho={},Sc=new WeakMap,yF=function(t,e){var n=Sc.get(t);return!n||n.length===0?!0:n.includes(e)},mF=function(){function t(e){var n=this;this.runtime=e,Tv.forEach(function(r){n.registerMetadata(r)})}return t.prototype.registerMetadata=function(e){dt([e.n],D(e.a||[]),!1).forEach(function(n){ho[n]=e})},t.prototype.unregisterMetadata=function(e){delete ho[e]},t.prototype.getPropertySyntax=function(e){return this.runtime.CSSPropertySyntaxFactory[e]},t.prototype.processProperties=function(e,n,r){var i=this;if(r===void 0&&(r={skipUpdateAttribute:!1,skipParse:!1,forceUpdateGeometry:!1,usedAttributes:[],memoize:!0}),this.runtime.enableCSSParsing){var u=r.skipUpdateAttribute,f=r.skipParse,d=r.forceUpdateGeometry,h=r.usedAttributes,p=r.memoize,v=d,g=Object.keys(n);g.forEach(function(y){var m;u||(e.attributes[y]=n[y]),!v&&(!((m=ho[y])===null||m===void 0)&&m.l)&&(v=!0)}),f||g.forEach(function(y){e.computedStyle[y]=i.parseProperty(y,e.attributes[y],e,p)}),h!=null&&h.length&&(g=Array.from(new Set(g.concat(h)))),g.forEach(function(y){y in e.computedStyle&&(e.parsedStyle[y]=i.computeProperty(y,e.computedStyle[y],e,p))}),v&&(e.geometry.dirty=!0,e.renderable.boundsDirty=!0,e.renderable.renderBoundsDirty=!0,r.forceUpdateGeometry||this.runtime.sceneGraphService.dirtifyToRoot(e)),g.forEach(function(y){y in e.parsedStyle&&i.postProcessProperty(y,e,g)}),this.runtime.enableCSSParsing&&e.children.length&&g.forEach(function(y){y in e.parsedStyle&&i.isPropertyInheritable(y)&&e.children.forEach(function(m){m.internalSetAttribute(y,null,{skipUpdateAttribute:!0,skipParse:!0})})})}else{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<l2.length;l++)if(l2[l]in n){c=!0;break}}n.fill&&(e.parsedStyle.fill=Ia(n.fill)),n.stroke&&(e.parsedStyle.stroke=Ia(n.stroke)),n.shadowColor&&(e.parsedStyle.shadowColor=Ia(n.shadowColor)),n.filter&&(e.parsedStyle.filter=X_(n.filter)),se(n.radius)||(e.parsedStyle.radius=U_(n.radius,4)),se(n.lineDash)||(e.parsedStyle.lineDash=U_(n.lineDash,2)),n.points&&(e.parsedStyle.points=a2(n.points)),n.d===""&&(e.parsedStyle.d=J({},W_)),n.d&&(e.parsedStyle.d=Sv(n.d)),n.textTransform&&this.runtime.CSSPropertySyntaxFactory["<text-transform>"].calculator(null,null,{value:n.textTransform},e,null),ln(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.transform&&(e.parsedStyle.transform=Mv(n.transform)),n.transformOrigin&&(e.parsedStyle.transformOrigin=c2(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)),se(n.zIndex)||this.runtime.CSSPropertySyntaxFactory["<z-index>"].postProcessor(e,a),se(n.offsetDistance)||this.runtime.CSSPropertySyntaxFactory["<offset-distance>"].postProcessor(e,a),n.transform&&this.runtime.CSSPropertySyntaxFactory["<transform>"].postProcessor(e,a),n.transformOrigin&&this.runtime.CSSPropertySyntaxFactory["<transform-origin>"].postProcessor(e,a),c&&(e.geometry.dirty=!0,e.renderable.boundsDirty=!0,e.renderable.renderBoundsDirty=!0,r.forceUpdateGeometry||this.runtime.sceneGraphService.dirtifyToRoot(e))}},t.prototype.parseProperty=function(e,n,r,i){var a=ho[e],o=n;if((n===""||se(n))&&(n="unset"),n==="unset"||n==="initial"||n==="inherit")o=yv(n);else if(a){var s=a.k,c=a.syntax,l=c&&this.getPropertySyntax(c);s&&s.indexOf(n)>-1?o=yv(n):l&&(!i&&l.parserUnmemoize?o=l.parserUnmemoize(n,r):l.parser&&(o=l.parser(n,r)))}return o},t.prototype.computeProperty=function(e,n,r,i){var a=ho[e],o=r.id==="g-root",s=n;if(a){var c=a.syntax,l=a.inh,u=a.d;if(n instanceof ci){var f=n.value;if(f==="unset"&&(l&&!o?f="inherit":f="initial"),f==="initial")se(u)||(n=this.parseProperty(e,xc(u)?u(r.nodeName):u,r,i));else if(f==="inherit"){var d=this.tryToResolveProperty(r,e,{inherited:!0});if(se(d)){this.addUnresolveProperty(r,e);return}else return d}}var h=c&&this.getPropertySyntax(c);if(h&&h.calculator){var p=r.parsedStyle[e];s=h.calculator(e,p,n,r,this.runtime)}else n instanceof ci?s=n.value:s=n}return s},t.prototype.postProcessProperty=function(e,n,r){var i=ho[e];if(i&&i.syntax){var a=i.syntax&&this.getPropertySyntax(i.syntax),o=a;o&&o.postProcessor&&o.postProcessor(n,r)}},t.prototype.addUnresolveProperty=function(e,n){var r=Sc.get(e);r||(Sc.set(e,[]),r=Sc.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&&yF(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=Sc.get(e);if(n&&n.length){var r={};n.forEach(function(i){r[i]=e.attributes[i]}),this.processProperties(e,r),Sc.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 Un),i.renderBounds||(i.renderBounds=new Un);var a=e.parsedStyle,o=r.update(a,e),s=o.cx,c=s===void 0?0:s,l=o.cy,u=l===void 0?0:l,f=o.cz,d=f===void 0?0:f,h=o.hwidth,p=h===void 0?0:h,v=o.hheight,g=v===void 0?0:v,y=o.hdepth,m=y===void 0?0:y,b=[Math.abs(p),Math.abs(g),m],x=a,_=x.stroke,O=x.lineWidth,w=O===void 0?1:O,S=x.increasedLineWidthForHitTesting,M=S===void 0?0:S,E=x.shadowType,P=E===void 0?"outer":E,C=x.shadowColor,A=x.filter,T=A===void 0?[]:A,k=x.transformOrigin,N=[c,u,d];i.contentBounds.update(N,b);var F=n===st.POLYLINE||n===st.POLYGON||n===st.PATH?Math.SQRT2:.5,R=_&&!_.isNone;if(R){var I=((w||0)+(M||0))*F;b[0]+=I,b[1]+=I}if(i.renderBounds.update(N,b),C&&P&&P!=="inner"){var z=i.renderBounds,W=z.min,U=z.max,$=a,K=$.shadowBlur,ct=$.shadowOffsetX,gt=$.shadowOffsetY,it=K||0,et=ct||0,_t=gt||0,xt=W[0]-it+et,Nt=U[0]+it+et,Gt=W[1]-it+_t,Qt=U[1]+it+_t;W[0]=Math.min(W[0],xt),U[0]=Math.max(U[0],Nt),W[1]=Math.min(W[1],Gt),U[1]=Math.max(U[1],Qt),i.renderBounds.setMinMax(W,U)}T.forEach(function(ye){var mn=ye.name,Zn=ye.params;if(mn==="blur"){var yi=Zn[0].value;i.renderBounds.update(i.renderBounds.center,ud(i.renderBounds.halfExtents,i.renderBounds.halfExtents,[yi,yi,0]))}else if(mn==="drop-shadow"){var Kn=Zn[0].value,br=Zn[1].value,ie=Zn[2].value,me=i.renderBounds,fe=me.min,ne=me.max,Fe=fe[0]-ie+Kn,Ne=ne[0]+ie+Kn,Pe=fe[1]-ie+br,hn=ne[1]+ie+br;fe[0]=Math.min(fe[0],Fe),ne[0]=Math.max(ne[0],Ne),fe[1]=Math.min(fe[1],Pe),ne[1]=Math.max(ne[1],hn),i.renderBounds.setMinMax(fe,ne)}}),e.geometry.dirty=!1;var Jt=p<0,pe=g<0,Ge=(Jt?-1:1)*(k?_i(k[0],0,e,!0):0),le=(pe?-1:1)*(k?_i(k[1],1,e,!0):0);(Ge||le)&&e.setOrigin(Ge,le)}},t.prototype.updateSizeAttenuation=function(e,n){e.style.isSizeAttenuation?(e.style.rawLineWidth||(e.style.rawLineWidth=e.style.lineWidth),e.style.lineWidth=(e.style.rawLineWidth||1)/n,e.nodeName===st.CIRCLE&&(e.style.rawR||(e.style.rawR=e.style.r),e.style.r=(e.style.rawR||1)/n)):(e.style.rawLineWidth&&(e.style.lineWidth=e.style.rawLineWidth,delete e.style.rawLineWidth),e.nodeName===st.CIRCLE&&e.style.rawR&&(e.style.r=e.style.rawR,delete e.style.rawR))},t.prototype.isPropertyInheritable=function(e){var n=ho[e];return n?n.inh:!1},t}(),bF=function(){function t(){this.parser=$_,this.parserUnmemoize=bv,this.parserWithCSSDisabled=null,this.mixer=xv}return t.prototype.calculator=function(e,n,r,i){return li(r)},t}(),xF=function(){function t(){}return t.prototype.calculator=function(e,n,r,i,a){return r instanceof ci&&(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}(),_F=function(){function t(){this.parser=Ia,this.parserWithCSSDisabled=Ia,this.mixer=G9}return t.prototype.calculator=function(e,n,r,i){return r instanceof ci?r.value==="none"?hd:G_:r},t}(),OF=function(){function t(){this.parser=X_}return t.prototype.calculator=function(e,n,r){return r instanceof ci?[]:r},t}();function u2(t){var e=t.parsedStyle.fontSize;return se(e)?null:e}var kv=function(){function t(){this.parser=Oc,this.parserUnmemoize=Vl,this.parserWithCSSDisabled=null,this.mixer=xv}return t.prototype.calculator=function(e,n,r,i,a){var o;if(vn(r))return r;if(on.isRelativeUnit(r.unit)){var s=a.styleValueRegistry;if(r.unit===Mt.kPercentage)return 0;if(r.unit===Mt.kEms){if(i.parentNode){var c=u2(i.parentNode);if(c)return c*=r.value,c;s.addUnresolveProperty(i,e)}else s.addUnresolveProperty(i,e);return 0}else if(r.unit===Mt.kRems){if(!((o=i==null?void 0:i.ownerDocument)===null||o===void 0)&&o.documentElement){var c=u2(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}(),wF=function(){function t(){this.mixer=Z_}return t.prototype.parser=function(e){var n=V_(vn(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}(),SF=function(){function t(){this.mixer=Z_}return t.prototype.parser=function(e){var n=V_(vn(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}(),MF=function(){function t(){}return t.prototype.calculator=function(e,n,r,i){r instanceof ci&&(r=null);var a=r==null?void 0:r.cloneNode(!0);return a&&(a.style.isMarker=!0),a},t}(),EF=function(){function t(){this.mixer=xv,this.parser=ps,this.parserUnmemoize=wc,this.parserWithCSSDisabled=null}return t.prototype.calculator=function(e,n,r){return r.value},t}(),PF=function(){function t(){this.parser=ps,this.parserUnmemoize=wc,this.parserWithCSSDisabled=null,this.mixer=_v(0,1)}return t.prototype.calculator=function(e,n,r){return r.value},t.prototype.postProcessor=function(e){var n=e.parsedStyle,r=n.offsetPath,i=n.offsetDistance;if(r){var a=r.nodeName;if(a===st.LINE||a===st.PATH||a===st.POLYLINE){var o=r.getPoint(i);o&&e.setLocalPosition(o.x,o.y)}}},t}(),AF=function(){function t(){this.parser=ps,this.parserUnmemoize=wc,this.parserWithCSSDisabled=null,this.mixer=_v(0,1)}return t.prototype.calculator=function(e,n,r){return r.value},t}(),TF=function(){function t(){this.parser=Sv,this.parserWithCSSDisabled=Sv,this.mixer=aF}return t.prototype.calculator=function(e,n,r){return r instanceof ci&&r.value==="unset"?{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new hs(0,0,0,0)}:r},t}(),kF=function(){function t(){this.parser=a2,this.mixer=oF}return t}(),CF=function(t){It(e,t);function e(){var n=t.apply(this,dt([],D(arguments),!1))||this;return n.mixer=_v(0,1/0),n}return e}(kv),LF=function(){function t(){}return t.prototype.calculator=function(e,n,r,i){return r instanceof ci?r.value==="unset"?"":r.value:"".concat(r)},t.prototype.postProcessor=function(e){e.nodeValue="".concat(e.parsedStyle.text)||""},t}(),NF=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}(),Cv={},jF=0;function RF(t,e){if(t){var n=typeof t=="string"?t:t.id||jF++;Cv[n]&&Cv[n].destroy(),Cv[n]=e}}var Xl=typeof window!="undefined"&&typeof window.document!="undefined";function IF(t){return!!t.getAttribute}function DF(t,e){for(var n=0,r=t.length;n<r;){var i=n+r>>>1;f2(t[i],e)<0?n=i+1:r=i}return n}function f2(t,e){var n=Number(t.parsedStyle.zIndex||0),r=Number(e.parsedStyle.zIndex||0);if(n===r){var i=t.parentNode;if(i){var a=i.childNodes||[];return a.indexOf(t)-a.indexOf(e)}}return n-r}function d2(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 h2="px";function FF(t,e,n){Xl&&t.style&&(t.style.width=e+h2,t.style.height=n+h2)}function p2(t,e){if(Xl)return document.defaultView.getComputedStyle(t,null).getPropertyValue(e)}function BF(t){var e=p2(t,"width");return e==="auto"?t.offsetWidth:parseFloat(e)}function zF(t){var e=p2(t,"height");return e==="auto"?t.offsetHeight:parseFloat(e)}var GF=1,WF={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"},Lv=typeof performance=="object"&&performance.now?performance:Date;function gs(t,e,n){t===void 0&&(t="auto");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 YF=1,HF=function(){return YF++},ya=typeof self=="object"&&self.self==self?self:typeof tt.g=="object"&&tt.g.global==tt.g?tt.g:{},$F=Date.now(),UF=function(){return ya.performance&&typeof ya.performance.now=="function"?ya.performance.now():Date.now()-$F},ql={},v2=Date.now(),VF=function(t){if(typeof t!="function")throw new TypeError(t+" is not a function");var e=Date.now(),n=e-v2,r=n>16?0:16-n,i=HF();return ql[i]=t,Object.keys(ql).length>1||setTimeout(function(){v2=e;var a=ql;ql={},Object.keys(a).forEach(function(o){return a[o](UF())})},r),i},XF=function(t){delete ql[t]},qF=["","webkit","moz","ms","o"],g2=function(t){return typeof t!="string"?VF:t===""?ya.requestAnimationFrame:ya[t+"RequestAnimationFrame"]},ZF=function(t){return typeof t!="string"?XF:t===""?ya.cancelAnimationFrame:ya[t+"CancelAnimationFrame"]||ya[t+"CancelRequestAnimationFrame"]},KF=function(t,e){for(var n=0;t[n]!==void 0;){if(e(t[n]))return t[n];n=n+1}},y2=KF(qF,function(t){return!!g2(t)}),Nv=g2(y2),m2=ZF(y2);ya.requestAnimationFrame=Nv,ya.cancelAnimationFrame=m2;var QF=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,dt([],D(e),!1))}))},t}(),JF=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 es(this,void 0,void 0,function(){var r,i,a,o;return ns(this,function(s){switch(s.label){case 0:return this.callbacks.length?[4,(o=this.callbacks)[0].apply(o,dt([],D(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}(),qr=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}(),jv=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}(),tB=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],eB=/([\"\'])[^\'\"]+\1/;function nB(t){for(var e=t.fontSize,n=e===void 0?16:e,r=t.fontFamily,i=r===void 0?"sans-serif":r,a=t.fontStyle,o=a===void 0?"normal":a,s=t.fontVariant,c=s===void 0?"normal":s,l=t.fontWeight,u=l===void 0?"normal":l,f=vn(n)&&"".concat(n,"px")||"16px",d=i.split(","),h=d.length-1;h>=0;h--){var p=d[h].trim();!eB.test(p)&&tB.indexOf(p)<0&&(p='"'.concat(p,'"')),d[h]=p}return"".concat(o," ").concat(c," ").concat(u," ").concat(f," ").concat(d.join(","))}function Rv(t,e,n){return as(t),t[4]=Math.tan(e),t[1]=Math.tan(n),t}var Zl=1e-5,rB=cn(),er=cn();function b2(t,e){if(t.length){var n=as(rB);t.forEach(function(r){var i=r.t,a=r.d;if(i==="scale"){var o=(a==null?void 0:a.map(function(y){return Math.max(y.value,Zl)}))||[1,1];ss(er,[o[0],o[1],1])}else if(i==="scalex"){var o=(a==null?void 0:a.map(function(m){return Math.max(m.value,Zl)}))||[1];ss(er,[o[0],1,1])}else if(i==="scaley"){var o=(a==null?void 0:a.map(function(m){return Math.max(m.value,Zl)}))||[1];ss(er,[1,o[0],1])}else if(i==="scalez"){var o=(a==null?void 0:a.map(function(m){return Math.max(m.value,Zl)}))||[1];ss(er,[1,1,o[0]])}else if(i==="scale3d"){var o=(a==null?void 0:a.map(function(m){return Math.max(m.value,Zl)}))||[1,1,1];ss(er,[o[0],o[1],o[2]])}else if(i==="translate"){var s=a||[Vn,Vn];os(er,[s[0].value,s[1].value,0])}else if(i==="translatex"){var s=a||[Vn];os(er,[s[0].value,0,0])}else if(i==="translatey"){var s=a||[Vn];os(er,[0,s[0].value,0])}else if(i==="translatez"){var s=a||[Vn];os(er,[0,0,s[0].value])}else if(i==="translate3d"){var s=a||[Vn,Vn,Vn];os(er,[s[0].value,s[1].value,s[2].value])}else if(i==="rotate"){var c=a||[Ni];q0(er,rn(li(c[0])))}else if(i==="rotatex"){var c=a||[Ni];Nx(er,rn(li(c[0])))}else if(i==="rotatey"){var c=a||[Ni];jx(er,rn(li(c[0])))}else if(i==="rotatez"){var c=a||[Ni];q0(er,rn(li(c[0])))}else if(i==="rotate3d"){var c=a||[Vn,Vn,Vn,Ni];Lx(er,rn(li(c[3])),[c[0].value,c[1].value,c[2].value])}else if(i==="skew"){var l=(a==null?void 0:a.map(function(y){return y.value}))||[0,0];Rv(er,rn(l[0]),rn(l[1]))}else if(i==="skewx"){var l=(a==null?void 0:a.map(function(m){return m.value}))||[0];Rv(er,rn(l[0]),0)}else if(i==="skewy"){var l=(a==null?void 0:a.map(function(m){return m.value}))||[0];Rv(er,0,rn(l[0]))}else if(i==="matrix"){var u=D(a.map(function(y){return y.value}),6),f=u[0],d=u[1],h=u[2],p=u[3],v=u[4],g=u[5];X0(er,f,d,0,0,h,p,0,0,0,0,1,0,v,g,0,1)}else i==="matrix3d"&&X0.apply(Et,dt([er],D(a.map(function(y){return y.value})),!1));Wx(n,n,er)}),e.setLocalTransform(n)}else e.resetLocalTransform();return e.getLocalTransform()}var iB=function(){function t(){this.parser=Mv,this.parserUnmemoize=o2,this.parserWithCSSDisabled=o2,this.mixer=vF}return t.prototype.calculator=function(e,n,r,i){return r instanceof ci?[]:r},t.prototype.postProcessor=function(e){var n=e.parsedStyle.transform;b2(n,e)},t}(),aB=function(){function t(){this.parser=c2,this.parserUnmemoize=gF}return t.prototype.postProcessor=function(e){var n=e.parsedStyle.transformOrigin;n[0].unit===Mt.kPixels&&n[1].unit===Mt.kPixels?e.setOrigin(n[0].value,n[1].value):e.getGeometryBounds()},t}(),oB=function(){function t(){this.parser=ps,this.parserUnmemoize=wc}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=_c.Z_INDEX_CHANGED)}},t}(),sB=function(){function t(){}return t.prototype.update=function(e,n){var r=e.cx,i=r===void 0?0:r,a=e.cy,o=a===void 0?0:a,s=e.r,c=s===void 0?0:s;return{cx:i,cy:o,hwidth:c,hheight:c}},t}(),cB=function(){function t(){}return t.prototype.update=function(e,n){var r=e.cx,i=r===void 0?0:r,a=e.cy,o=a===void 0?0:a,s=e.rx,c=s===void 0?0:s,l=e.ry,u=l===void 0?0:l;return{cx:i,cy:o,hwidth:c,hheight:u}},t}(),lB=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,d=u/2,h=f/2;return{cx:o+d,cy:c+h,hwidth:d,hheight:h}},t}(),uB=function(){function t(){}return t.prototype.update=function(e){var n=e.d,r=n.rect,i=r.x,a=r.y,o=r.width,s=r.height,c=o/2,l=s/2;return{cx:i+c,cy:a+l,hwidth:c,hheight:l}},t}(),fB=function(){function t(){}return t.prototype.update=function(e){if(e.points&&sr(e.points.points)){var n=e.points.points,r=Math.min.apply(Math,dt([],D(n.map(function(f){return f[0]})),!1)),i=Math.max.apply(Math,dt([],D(n.map(function(f){return f[0]})),!1)),a=Math.min.apply(Math,dt([],D(n.map(function(f){return f[1]})),!1)),o=Math.max.apply(Math,dt([],D(n.map(function(f){return f[1]})),!1)),s=i-r,c=o-a,l=s/2,u=c/2;return{cx:r+l,cy:a+u,hwidth:l,hheight:u}}return{cx:0,cy:0,hwidth:0,hheight:0}},t}(),dB=function(){function t(){}return t.prototype.update=function(e,n){var r=e.x,i=r===void 0?0:r,a=e.y,o=a===void 0?0:a,s=e.src,c=e.width,l=c===void 0?0:c,u=e.height,f=u===void 0?0:u,d=l,h=f;return s&&!Cn(s)&&(d||(d=s.width,e.width=d),h||(h=s.height,e.height=h)),{cx:i+d/2,cy:o+h/2,hwidth:d/2,hheight:h/2}},t}(),hB=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 nt.enableCSSParsing?r&&o&&s&&c&&l&&i&&a&&!se(u):r},t.prototype.update=function(e,n){var r,i,a=e.text,o=e.textAlign,s=o===void 0?"start":o,c=e.lineWidth,l=c===void 0?1:c,u=e.textBaseline,f=u===void 0?"alphabetic":u,d=e.dx,h=d===void 0?0:d,p=e.dy,v=p===void 0?0:p,g=e.x,y=g===void 0?0:g,m=e.y,b=m===void 0?0:m;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:[]},{hwidth:0,hheight:0,cx:0,cy:0};var x=(((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,_=this.globalRuntime.textService.measureText(a,e,x);e.metrics=_;var O=_.width,w=_.height,S=_.lineHeight,M=_.fontProperties,E=O/2,P=w/2,C=y+E;s==="center"||s==="middle"?C+=l/2-E:(s==="right"||s==="end")&&(C+=l-E*2);var A=b-P;return f==="middle"?A+=P:f==="top"||f==="hanging"?A+=P*2:f==="alphabetic"?A+=this.globalRuntime.enableCSSParsing?S-M.ascent:0:(f==="bottom"||f==="ideographic")&&(A+=0),h&&(C+=h),v&&(A+=v),{cx:C,cy:A,hwidth:E,hheight:P}},t}(),pB=function(){function t(){}return t.prototype.update=function(e,n){return{cx:0,cy:0,hwidth:0,hheight:0}},t}();function vB(t){return!!t.type}var xd=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 Sr,this.page=new Sr,this.canvas=new Sr,this.viewport=new Sr,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(an)},t}(),x2=function(t){It(e,t);function e(){var n=t.apply(this,dt([],D(arguments),!1))||this;return n.client=new Sr,n.movement=new Sr,n.offset=new Sr,n.global=new Sr,n.screen=new Sr,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(an)},e}(xd),Iv=function(t){It(e,t);function e(){var n=t.apply(this,dt([],D(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}(x2),Dv=function(t){It(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.clone=function(){return this.manager.cloneWheelEvent(this)},e}(x2),sn=function(t){It(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}(xd),_2=":",O2=function(){function t(){this.emitter=new $0}return t.prototype.on=function(e,n,r){return this.addEventListener(e,n,r),this},t.prototype.addEventListener=function(e,n,r){var i=i_(r)&&r||cs(r)&&r.capture,a=cs(r)&&r.once,o=xc(n)?void 0:n,s=!1,c="";if(e.indexOf(_2)>-1){var l=D(e.split(_2),2),u=l[0],f=l[1];e=f,c=u,s=!0}if(e=i?"".concat(e,"capture"):e,n=xc(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,dt([],D(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=i_(r)&&r||cs(r)&&r.capture,a=xc(n)?void 0:n;return e=i?"".concat(e,"capture"):e,n=xc(n)?n:n==null?void 0:n.handleEvent,this.emitter.off(e,n,a),this},t.prototype.emit=function(e,n){this.dispatchEvent(new sn(e,n))},t.prototype.dispatchEvent=function(e,n){var r,i;if(n===void 0&&(n=!1),!vB(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}(),gr=function(t){It(e,t);function e(){var n=t.call(this)||this;return n.shadow=!1,n.ownerDocument=null,n.isConnected=!1,n.baseURI="",n.childNodes=[],n.nodeType=0,n.nodeName="",n.nodeValue=null,n.parentNode=null,n}return e.isNode=function(n){return!!n.childNodes},Object.defineProperty(e.prototype,"textContent",{get:function(){var n,r,i="";this.nodeName===st.TEXT&&(i+=this.style.text);try{for(var a=jr(this.childNodes),o=a.next();!o.done;o=a.next()){var s=o.value;s.nodeName===st.TEXT?i+=s.nodeValue:i+=s.textContent}}catch(c){n={error:c}}finally{try{o&&!o.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return i},set:function(n){var r=this;this.childNodes.slice().forEach(function(i){r.removeChild(i)}),this.nodeName===st.TEXT&&(this.style.text="".concat(n))},enumerable:!1,configurable:!0}),e.prototype.getRootNode=function(n){return n===void 0&&(n={}),this.parentNode?this.parentNode.getRootNode(n):n.composed&&this.host?this.host.getRootNode(n):this},e.prototype.hasChildNodes=function(){return this.childNodes.length>0},e.prototype.isDefaultNamespace=function(n){throw new Error(an)},e.prototype.lookupNamespaceURI=function(n){throw new Error(an)},e.prototype.lookupPrefix=function(n){throw new Error(an)},e.prototype.normalize=function(){throw new Error(an)},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}(O2),gB=2048,yB=function(){function t(e,n){var r=this;this.globalRuntime=e,this.context=n,this.emitter=new $0,this.nativeHTMLMap=new WeakMap,this.cursor="default",this.mappingTable={},this.mappingState={trackingData:{}},this.eventPool=new Map,this.tmpMatrix=cn(),this.tmpVec3=Se(),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=Lv.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")}gr.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"),gr.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&&gr.isNode(c)&&c.parentNode;p&&p!==(gr.isNode(r.rootTarget)&&r.rootTarget.parentNode)&&p!==a.target;)p=p.parentNode;var v=!p||p===(gr.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!==(gr.isNode(r.rootTarget)&&r.rootTarget.parentNode);)g.currentTarget=g.target,r.notifyTarget(g),o&&r.notifyTarget(g,"mouseenter"),gr.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!==(gr.isNode(r.rootTarget)&&r.rootTarget.parentNode);)l.currentTarget=l.target,r.notifyTarget(l),o&&r.notifyTarget(l,"mouseleave"),gr.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!==(gr.isNode(r.rootTarget)&&r.rootTarget.parentNode);)c.currentTarget=c.target,r.notifyTarget(c),s&&r.notifyTarget(c,"mouseenter"),gr.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"),gr.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.getScale=function(){var e=this.context.contextService.getBoundingClientRect(),n=1,r=1,i=this.context.contextService.getDomElement();if(i&&e){var a=i.offsetWidth,o=i.offsetHeight;a&&o&&(n=e.width/a,r=e.height/o)}return{scaleX:n,scaleY:r,bbox:e}},t.prototype.client2Viewport=function(e){var n=this.getScale(),r=n.scaleX,i=n.scaleY,a=n.bbox;return new Sr((e.x-((a==null?void 0:a.left)||0))/r,(e.y-((a==null?void 0:a.top)||0))/i)},t.prototype.viewport2Client=function(e){var n=this.getScale(),r=n.scaleX,i=n.scaleY,a=n.bbox;return new Sr((e.x+((a==null?void 0:a.left)||0))*r,(e.y+((a==null?void 0:a.top)||0))*i)},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=Rr(this.tmpMatrix,u,l),d=Ki(this.tmpVec3,n/s*2-1,(1-r/c)*2-1,0);return fr(d,d,f),new Sr(d[0],d[1])},t.prototype.canvas2Viewport=function(e){var n=this.rootTarget.defaultView,r=n.getCamera(),i=r.getPerspective(),a=r.getViewTransform(),o=Rr(this.tmpMatrix,i,a),s=Ki(this.tmpVec3,e.x,e.y,0);fr(this.tmpVec3,this.tmpVec3,o);var c=this.context.config,l=c.width,u=c.height;return new Sr((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<gB&&e!==this.rootTarget;i++)gr.isNode(e)&&e.parentNode&&(n.push(e.parentNode),e=e.parentNode);return r&&n.push(r),n},t.prototype.hitTest=function(e){var n=e.viewportX,r=e.viewportY,i=this.context.config,a=i.width,o=i.height,s=i.disableHitTesting;return n<0||r<0||n>a||r>o?null:!s&&this.pickHandler(e)||this.rootTarget||null},t.prototype.isNativeEventFromCanvas=function(e,n){var r=n==null?void 0:n.target;if(r!=null&&r.shadowRoot&&(r=n.composedPath()[0]),r){if(r===e)return!0;if(e&&e.contains)return e.contains(r)}return n!=null&&n.composedPath?n.composedPath().indexOf(e)>-1:!1},t.prototype.getExistedHTML=function(e){var n,r;if(e.nativeEvent.composedPath)try{for(var i=jr(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(Iv);this.copyPointerData(e,a),this.copyMouseData(e,a),this.copyData(e,a),a.nativeEvent=e.nativeEvent,a.originalEvent=e;var o=this.getExistedHTML(a),s=this.context.contextService.getDomElement();return a.target=r!=null?r:o||this.isNativeEventFromCanvas(s,a.nativeEvent)&&this.pickTarget(a)||i,typeof n=="string"&&(a.type=n),a},t.prototype.createWheelEvent=function(e){var n=this.allocateEvent(Dv);this.copyWheelData(e,n),this.copyMouseData(e,n),this.copyData(e,n),n.nativeEvent=e.nativeEvent,n.originalEvent=e;var r=this.getExistedHTML(n),i=this.context.contextService.getDomElement();return n.target=r||this.isNativeEventFromCanvas(i,n.nativeEvent)&&this.pickTarget(n),n},t.prototype.trackingData=function(e){return this.mappingState.trackingData[e]||(this.mappingState.trackingData[e]={pressTargetsByButton:{},clicksByButton:{},overTarget:null}),this.mappingState.trackingData[e]},t.prototype.cloneWheelEvent=function(e){var n=this.allocateEvent(Dv);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(Iv);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=Lv.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||gr.isNode(i)&&i.parentNode===n)n=e[r];else break}return n},t.prototype.getCursor=function(e){for(var n=e;n;){var r=IF(n)&&n.getAttribute("cursor");if(r)return r;n=gr.isNode(n)&&n.parentNode}},t}(),mB=function(){function t(){}return t.prototype.getOrCreateCanvas=function(e,n){if(this.canvas)return this.canvas;if(e||nt.offscreenCanvas)this.canvas=e||nt.offscreenCanvas,this.context=this.canvas.getContext("2d",J({willReadFrequently:!0},n));else try{this.canvas=new window.OffscreenCanvas(0,0),this.context=this.canvas.getContext("2d",J({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",J({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}(),po;(function(t){t[t.CAMERA_CHANGED=0]="CAMERA_CHANGED",t[t.DISPLAY_OBJECT_CHANGED=1]="DISPLAY_OBJECT_CHANGED",t[t.NONE=2]="NONE"})(po||(po={}));var bB=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 qr,initAsync:new QF,dirtycheck:new jv,cull:new jv,beginFrame:new qr,beforeRender:new qr,render:new qr,afterRender:new qr,endFrame:new qr,destroy:new qr,pick:new JF,pickSync:new jv,pointerDown:new qr,pointerUp:new qr,pointerMove:new qr,pointerOut:new qr,pointerOver:new qr,pointerWheel:new qr,pointerCancel:new qr,click:new qr}}return t.prototype.init=function(e){var n=this,r=J(J({},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(po.CAMERA_CHANGED)},t.prototype.render=function(e,n,r){var i=this;this.stats.total=0,this.stats.rendered=0,this.zIndexCounter=0;var a=this.context.renderingContext;if(this.globalRuntime.sceneGraphService.syncHierarchy(a.root),this.globalRuntime.sceneGraphService.triggerPendingEvents(),a.renderReasons.size&&this.inited){a.dirtyRectangleRenderingDisabled=this.disableDirtyRectangleRendering();var o=a.renderReasons.size===1&&a.renderReasons.has(po.CAMERA_CHANGED),s=!e.disableRenderHooks||!(e.disableRenderHooks&&o);s&&this.renderDisplayObject(a.root,e,a),this.hooks.beginFrame.call(n),s&&a.renderListCurrentFrame.forEach(function(c){i.hooks.beforeRender.call(c),i.hooks.render.call(c),i.hooks.afterRender.call(c)}),this.hooks.endFrame.call(n),a.renderListCurrentFrame=[],a.renderReasons.clear(),r()}},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!==_c.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=DF(n.sorted,r);n.sorted.splice(o,0,r)}}):n.sorted=e.childNodes.slice().sort(f2)},t.prototype.destroy=function(){this.inited=!1,this.hooks.destroy.call(),this.globalRuntime.sceneGraphService.clearPendingEvents()},t.prototype.dirtify=function(){this.context.renderingContext.renderReasons.add(po.DISPLAY_OBJECT_CHANGED)},t}(),xB=/\[\s*(.*)=(.*)\s*\]/,_B=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(xB),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 se(r)?"":r.toString?r.toString():""},t}(),vo=function(t){It(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}(xd),re;(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"})(re||(re={}));function w2(t){var e=t.renderable;e&&(e.renderBoundsDirty=!0,e.boundsDirty=!0)}var OB=new vo(re.REPARENT,null,"","","",0,"",""),wB=function(){function t(e){var n=this;this.runtime=e,this.pendingEvents=[],this.boundsChangedEvent=new sn(re.BOUNDS_CHANGED),this.rotate=function(){var r=tr();return function(i,a,o,s,c){o===void 0&&(o=0),s===void 0&&(s=0),c===void 0&&(c=!0),typeof a=="number"&&(a=De(a,o,s));var l=i.transformable;if(i.parentNode===null||!i.parentNode.transformable)n.rotateLocal(i,a);else{var u=tr();qf(u,a[0],a[1],a[2]);var f=n.getRotation(i),d=n.getRotation(i.parentNode);Zf(r,d),Q0(r,r),so(u,r,u),so(l.localRotation,u,f),Kf(l.localRotation,l.localRotation),c&&n.dirtifyLocal(i,l)}}}(),this.rotateLocal=function(){var r=tr();return function(i,a,o,s,c){o===void 0&&(o=0),s===void 0&&(s=0),c===void 0&&(c=!0),typeof a=="number"&&(a=De(a,o,s));var l=i.transformable;qf(r,a[0],a[1],a[2]),Hx(l.localRotation,l.localRotation,r),c&&n.dirtifyLocal(i,l)}}(),this.setEulerAngles=function(){var r=tr();return function(i,a,o,s,c){o===void 0&&(o=0),s===void 0&&(s=0),c===void 0&&(c=!0),typeof a=="number"&&(a=De(a,o,s));var l=i.transformable;if(i.parentNode===null||!i.parentNode.transformable)n.setLocalEulerAngles(i,a);else{qf(l.localRotation,a[0],a[1],a[2]);var u=n.getRotation(i.parentNode);Zf(r,Q0(tr(),u)),Hx(l.localRotation,l.localRotation,r),c&&n.dirtifyLocal(i,l)}}}(),this.translateLocal=function(){return function(r,i,a,o,s){a===void 0&&(a=0),o===void 0&&(o=0),s===void 0&&(s=!0),typeof i=="number"&&(i=De(i,a,o));var c=r.transformable;jl(i,Se())||(YD(i,i,c.localRotation),cc(c.localPosition,c.localPosition,i),s&&n.dirtifyLocal(r,c))}}(),this.setPosition=function(){var r=cn(),i=Se();return function(a,o,s){s===void 0&&(s=!0);var c=a.transformable;if(i[0]=o[0],i[1]=o[1],i[2]=o[2]||0,!jl(n.getPosition(a),i)){if(ai(c.position,i),a.parentNode===null||!a.parentNode.transformable)ai(c.localPosition,i);else{var l=a.parentNode.transformable;is(r,l.worldTransform),da(r,r),fr(c.localPosition,i,r)}s&&n.dirtifyLocal(a,c)}}}(),this.setLocalPosition=function(){var r=Se();return function(i,a,o){o===void 0&&(o=!0);var s=i.transformable;r[0]=a[0],r[1]=a[1],r[2]=a[2]||0,!jl(s.localPosition,r)&&(ai(s.localPosition,r),o&&n.dirtifyLocal(i,s))}}(),this.translate=function(){var r=Se(),i=Se(),a=Se();return function(o,s,c,l,u){c===void 0&&(c=0),l===void 0&&(l=0),u===void 0&&(u=!0),typeof s=="number"&&(s=Ki(i,s,c,l)),!jl(s,r)&&(cc(a,n.getPosition(o),s),n.setPosition(o,a,u))}}(),this.setRotation=function(){var r=tr();return function(i,a,o,s,c,l){l===void 0&&(l=!0);var u=i.transformable;if(typeof a=="number"&&(a=J0(a,o,s,c)),i.parentNode===null||!i.parentNode.transformable)n.setLocalRotation(i,a);else{var f=n.getRotation(i.parentNode);Zf(r,f),Q0(r,r),so(u.localRotation,r,a),Kf(u.localRotation,u.localRotation),l&&n.dirtifyLocal(i,u)}}},this.displayObjectDependencyMap=new WeakMap,this.calcLocalTransform=function(){var r=cn(),i=Se(),a=J0(0,0,0,1);return function(o){var s=o.localSkew[0]!==0||o.localSkew[1]!==0;if(s){if(Rl(o.localTransform,o.localRotation,o.localPosition,De(1,1,1),o.origin),o.localSkew[0]!==0||o.localSkew[1]!==0){var c=as(r);c[4]=Math.tan(o.localSkew[0]),c[1]=Math.tan(o.localSkew[1]),Rr(o.localTransform,o.localTransform,c)}var l=Rl(r,a,i,o.localScale,o.origin);Rr(o.localTransform,o.localTransform,l)}else Rl(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=!1;e.parentNode&&(a=e.parentNode!==n,this.detach(e)),e.parentNode=n,se(r)?e.parentNode.childNodes.push(e):e.parentNode.childNodes.splice(r,0,e);var o=n.sortable;(!((i=o==null?void 0:o.sorted)===null||i===void 0)&&i.length||e.parsedStyle.zIndex)&&(o.dirtyChildren.indexOf(e)===-1&&o.dirtyChildren.push(e),o.dirty=!0,o.dirtyReason=_c.ADDED);var s=e.transformable;s&&this.dirtifyWorld(e,s),s.frozen&&this.unfreezeParentToRoot(e),a&&e.dispatchEvent(OB)},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=_c.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.getGeometryBounds(),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,a){r===void 0&&(r=0),i===void 0&&(i=0),a===void 0&&(a=!0),typeof n=="number"&&(n=De(n,r,i));var o=e.transformable;qf(o.localRotation,n[0],n[1],n[2]),a&&this.dirtifyLocal(e,o)},t.prototype.scaleLocal=function(e,n,r){r===void 0&&(r=!0);var i=e.transformable;zD(i.localScale,i.localScale,De(n[0],n[1],n[2]||1)),r&&this.dirtifyLocal(e,i)},t.prototype.setLocalScale=function(e,n,r){r===void 0&&(r=!0);var i=e.transformable,a=De(n[0],n[1],n[2]||i.localScale[2]);jl(a,i.localScale)||(ai(i.localScale,a),r&&this.dirtifyLocal(e,i))},t.prototype.setLocalRotation=function(e,n,r,i,a,o){o===void 0&&(o=!0),typeof n=="number"&&(n=J0(n,r,i,a));var s=e.transformable;Zf(s.localRotation,n),o&&this.dirtifyLocal(e,s)},t.prototype.setLocalSkew=function(e,n,r){typeof n=="number"&&(n=k6(n,r));var i=e.transformable;C6(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=D(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;)w2(r),r=r.parentNode;n&&e.forEach(function(i){w2(i)}),this.informDependentDisplayObjects(e),this.pendingEvents.push([e,{affectChildren:n}])},t.prototype.updateDisplayObjectDependency=function(e,n,r,i){if(n&&n!==r){var a=this.displayObjectDependencyMap.get(n);if(a&&a[e]){var o=a[e].indexOf(i);a[e].splice(o,1)}}if(r){var s=this.displayObjectDependencyMap.get(r);s||(this.displayObjectDependencyMap.set(r,{}),s=this.displayObjectDependencyMap.get(r)),s[e]||(s[e]=[]),s[e].push(i)}},t.prototype.informDependentDisplayObjects=function(e){var n=this,r=this.displayObjectDependencyMap.get(e);r&&Object.keys(r).forEach(function(i){r[i].forEach(function(a){n.dirtifyToRoot(a,!0),a.dispatchEvent(new vo(re.ATTR_MODIFIED,a,n,n,i,vo.MODIFICATION,n,n)),a.isCustomElement&&a.isConnected&&a.attributeChangedCallback&&a.attributeChangedCallback(i,n,n)})})},t.prototype.getPosition=function(e){var n=e.transformable;return Vf(n.position,this.getWorldTransform(e,n))},t.prototype.getRotation=function(e){var n=e.transformable;return Xf(n.rotation,this.getWorldTransform(e,n))},t.prototype.getScale=function(e){var n=e.transformable;return uc(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=Vf(Se(),n),i=Xf(tr(),n),a=uc(Se(),n);this.setLocalScale(e,a,!1),this.setLocalPosition(e,r,!1),this.setLocalRotation(e,i,void 0,void 0,void 0,!1),this.dirtifyLocal(e,e.transformable)},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(Un.isEmpty(i))return null;var a=r||new Un;return a.setFromTransformedAABB(i,this.getWorldTransform(e)),a},t.prototype.getGeometryBounds=function(e,n){n===void 0&&(n=!1);var r=e.geometry;r.dirty&&nt.styleValueRegistry.updateGeometry(e);var i=n?r.renderBounds:r.contentBounds||null;return i||new Un},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 Un,o.update(f.center,f.halfExtents)))}),o||(o=new Un),n){var c=d2(e);if(c){var l=c.parsedStyle.clipPath.getBounds(n);o?l&&(o=l.intersection(o)):o.update(l.center,l.halfExtents)}}return n?(i.renderBounds=o,i.renderBoundsDirty=!1):(i.bounds=o,i.boundsDirty=!1),o},t.prototype.getLocalBounds=function(e){if(e.parentNode){var n=cn();e.parentNode.transformable&&(n=da(cn(),this.getWorldTransform(e.parentNode)));var r=this.getBounds(e);if(!Un.isEmpty(r)){var i=new Un;return i.setFromTransformedAABB(r,n),i}}return this.getBounds(e)},t.prototype.getBoundingClientRect=function(e){var n,r,i,a=this.getGeometryBounds(e);Un.isEmpty(a)||(i=new Un,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=D(i.getMin(),2),c=s[0],l=s[1],u=D(i.getMax(),2),f=u[0],d=u[1];return new hs(c+((o==null?void 0:o.left)||0),l+((o==null?void 0:o.top)||0),f-c,d-l)}return new hs((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?is(n.worldTransform,n.localTransform):Rr(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}(),ys={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]},S2=/[a-zA-Z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff!"#$%&'()*+,-./:;]/,SB=/[!%),.:;?\]}¢°·'""†‡›℃∶、。〃〆〕〗〞﹚﹜!"%'),.:;?!]}~]/,MB=/[$(£¥·'"〈《「『【〔〖〝﹙﹛$(.[{£¥]/,EB=/[!),.:;?\]}¢·–—'"•"、。〆〞〕〉》」︰︱︲︳﹐﹑﹒﹔﹕﹖﹘﹚﹜!),.:;?︶︸︺︼︾﹀﹂﹗]|}、]/,PB=/[([{£¥'"‵〈《「『〔〝︴﹙﹛({︵︷︹︻︽︿﹁﹃﹏]/,AB=/[)\]}〕〉》」』】〙〗〟'"⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、:;,。.]/,TB=/[([{〔〈《「『【〘〖〝'"⦅«—...‥〳〴〵]/,kB=/[!%),.:;?\]}¢°'"†‡℃〆〈《「『〕!%),.:;?]}]/,CB=/[$([{£¥'"々〇〉》」〔$([{⦆¥₩#]/,LB=new RegExp("".concat(SB.source,"|").concat(EB.source,"|").concat(AB.source,"|").concat(kB.source)),NB=new RegExp("".concat(MB.source,"|").concat(PB.source,"|").concat(TB.source,"|").concat(CB.source)),jB=function(){function t(e){var n=this;this.runtime=e,this.fontMetricsCache={},this.shouldBreakByKinsokuShorui=function(r,i){return n.isBreakingSpace(i)?!1:!!(r&&(NB.exec(i)||LB.exec(r)))},this.trimByKinsokuShorui=function(r){var i=dt([],D(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=ys.MetricsString+ys.BaselineSymbol,s=Math.ceil(a.measureText(o).width),c=Math.ceil(a.measureText(ys.BaselineSymbol).width),l=ys.HeightMultiplier*c;c=c*ys.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=i===void 0?16:i,o=n.wordWrap,s=o===void 0?!1:o,c=n.lineHeight,l=n.lineWidth,u=l===void 0?1:l,f=n.textBaseline,d=f===void 0?"alphabetic":f,h=n.textAlign,p=h===void 0?"start":h,v=n.letterSpacing,g=v===void 0?0:v,y=n.textPath;n.textPathSide,n.textPathStartOffset;var m=n.leading,b=m===void 0?0:m,x=nB(n),_=this.measureFont(x,r);_.fontSize===0&&(_.fontSize=a,_.ascent=a);var O=this.runtime.offscreenCanvasCreator.getOrCreateContext(r);O.font=x,n.isOverflowing=!1;var w=s?this.wordWrap(e,n,r):e,S=w.split(/(?:\r\n|\r|\n)/),M=new Array(S.length),E=0;if(y){y.getTotalLength();for(var P=0;P<S.length;P++)var C=O.measureText(S[P]).width+(S[P].length-1)*g}else{for(var P=0;P<S.length;P++){var A=O.measureText(S[P]).width+(S[P].length-1)*g;M[P]=A,E=Math.max(E,A)}var C=E+u,T=c||_.fontSize+u,k=Math.max(T,_.fontSize+u)+(S.length-1)*(T+b);T+=b;var N=0;return d==="middle"?N=-k/2:d==="bottom"||d==="alphabetic"||d==="ideographic"?N=-k:(d==="top"||d==="hanging")&&(N=0),{font:x,width:C,height:k,lines:S,lineWidths:M,lineHeight:T,maxLineWidth:E,fontProperties:_,lineMetrics:M.map(function(R,I){var z=0;return p==="center"||p==="middle"?z-=R/2:(p==="right"||p==="end")&&(z-=R),new hs(z-u/2,N+I*T,R+u,T)})}}},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=s===void 0?0:s,l=n.maxLines,u=l===void 0?1/0:l,f=n.textOverflow,d=this.runtime.offscreenCanvasCreator.getOrCreateContext(r),h=o+c,p="";f==="ellipsis"?p="...":f&&f!=="clip"&&(p=f);for(var v=[],g=0,y=0,m={},b=function(N){return i.getFromCache(N,c,m,d)},x=Array.from(p).reduce(function(N,F){return N+b(F)},0),_=Array.from(e),O=0;O<_.length;O++){var w=_[O],S=e[O-1],M=e[O+1],E=b(w);if(this.isNewline(w)){if(g++,g>=u){n.isOverflowing=!0;break}y=0,v[g]="";continue}if(y>0&&y+E>h){if(g+1>=u){if(n.isOverflowing=!0,x>0&&x<=h){for(var P=v[g].length,C=0,A=P,T=0;T<P;T++){var k=b(v[g][T]);if(C+k+x>h){A=T;break}C+=k}v[g]=(v[g]||"").slice(0,A)+p}break}if(g++,y=0,v[g]="",this.isBreakingSpace(w))continue;this.canBreakInLastChar(w)||(v=this.trimToBreakable(v),y=this.sumTextWidthByCache(v[g]||"",m)),this.shouldBreakByKinsokuShorui(w,M)&&(v=this.trimByKinsokuShorui(v),y+=b(S||""))}y+=E,v[g]=(v[g]||"")+w}return v.join(`
|
|
`)},t.prototype.isBreakingSpace=function(e){return typeof e!="string"?!1:ys.BreakingSpaces.indexOf(e.charCodeAt(0))>=0},t.prototype.isNewline=function(e){return typeof e!="string"?!1:ys.Newlines.indexOf(e.charCodeAt(0))>=0},t.prototype.trimToBreakable=function(e){var n=dt([],D(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&&S2.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(!S2.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}(),nt={},RB=function(){var t,e=new dB,n=new fB;return t={},t[st.CIRCLE]=new sB,t[st.ELLIPSE]=new cB,t[st.RECT]=e,t[st.IMAGE]=e,t[st.GROUP]=new pB,t[st.LINE]=new lB,t[st.TEXT]=new hB(nt),t[st.POLYLINE]=n,t[st.POLYGON]=n,t[st.PATH]=new uB,t[st.HTML]=null,t[st.MESH]=null,t}(),IB=function(){var t,e=new _F,n=new kv;return t={},t[Tt.PERCENTAGE]=null,t[Tt.NUMBER]=new EF,t[Tt.ANGLE]=new bF,t[Tt.DEFINED_PATH]=new xF,t[Tt.PAINT]=e,t[Tt.COLOR]=e,t[Tt.FILTER]=new OF,t[Tt.LENGTH]=n,t[Tt.LENGTH_PERCENTAGE]=n,t[Tt.LENGTH_PERCENTAGE_12]=new wF,t[Tt.LENGTH_PERCENTAGE_14]=new SF,t[Tt.COORDINATE]=new kv,t[Tt.OFFSET_DISTANCE]=new PF,t[Tt.OPACITY_VALUE]=new AF,t[Tt.PATH]=new TF,t[Tt.LIST_OF_POINTS]=new kF,t[Tt.SHADOW_BLUR]=new CF,t[Tt.TEXT]=new LF,t[Tt.TEXT_TRANSFORM]=new NF,t[Tt.TRANSFORM]=new iB,t[Tt.TRANSFORM_ORIGIN]=new aB,t[Tt.Z_INDEX]=new oB,t[Tt.MARKER]=new MF,t}(),DB=function(){return typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof tt.g!="undefined"?tt.g:{}};nt.CameraContribution=D_,nt.AnimationTimeline=null,nt.EasingFunction=null,nt.offscreenCanvasCreator=new mB,nt.sceneGraphSelector=new _B,nt.sceneGraphService=new wB(nt),nt.textService=new jB(nt),nt.geometryUpdaterFactory=RB,nt.CSSPropertySyntaxFactory=IB,nt.styleValueRegistry=new mF(nt),nt.layoutRegistry=null,nt.globalThis=DB(),nt.enableCSSParsing=!1,nt.enableDataset=!1,nt.enableStyleSyntax=!0,nt.enableAttributeDashCased=!1,nt.enableSizeAttenuation=!1;var M2=0;function wvt(){M2=0}var E2=new vo(re.INSERTED,null,"","","",0,"",""),P2=new vo(re.REMOVED,null,"","","",0,"",""),FB=new sn(re.DESTROY),BB=function(t){It(e,t);function e(){var n=t.call(this)||this;return n.entity=M2++,n.renderable={bounds:void 0,boundsDirty:!0,renderBounds:void 0,renderBoundsDirty:!0,dirtyRenderBounds:void 0,dirty:!1},n.cullable={strategy:mv.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,dirty:!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=nt.enableCSSParsing?{opacity:Sn,fillOpacity:Sn,strokeOpacity:Sn,fill:Sn,stroke:Sn,transform:Sn,transformOrigin:Sn,visibility:Sn,pointerEvents:Sn,lineWidth:Sn,lineCap:Sn,lineJoin:Sn,increasedLineWidthForHitTesting:Sn,fontSize:Sn,fontFamily:Sn,fontStyle:Sn,fontWeight:Sn,fontVariant:Sn,textAlign:Sn,textBaseline:Sn,textTransform:Sn,zIndex:Sn,filter:Sn,shadowType:Sn}: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(an)},e.prototype.appendChild=function(n,r){var i;if(n.destroyed)throw new Error(d9);return nt.sceneGraphService.attach(n,this,r),!((i=this.ownerDocument)===null||i===void 0)&&i.defaultView&&this.ownerDocument.defaultView.mountChildren(n),this.isMutationObserved&&(E2.relatedNode=this,n.dispatchEvent(E2)),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 P2.relatedNode=this,n.dispatchEvent(P2),!((r=n.ownerDocument)===null||r===void 0)&&r.defaultView&&n.ownerDocument.defaultView.unmountChildren(n),nt.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 nt.sceneGraphService.matches(n,this)},e.prototype.getElementById=function(n){return nt.sceneGraphService.querySelector("#".concat(n),this)},e.prototype.getElementsByName=function(n){return nt.sceneGraphService.querySelectorAll('[name="'.concat(n,'"]'),this)},e.prototype.getElementsByClassName=function(n){return nt.sceneGraphService.querySelectorAll(".".concat(n),this)},e.prototype.getElementsByTagName=function(n){return nt.sceneGraphService.querySelectorAll(n,this)},e.prototype.querySelector=function(n){return nt.sceneGraphService.querySelector(n,this)},e.prototype.querySelectorAll=function(n){return nt.sceneGraphService.querySelectorAll(n,this)},e.prototype.closest=function(n){var r=this;do{if(nt.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=D(r),s=o[0],c=o.slice(1);this.parentNode.appendChild(s,a),(n=s).after.apply(n,dt([],D(c),!1))}},e.prototype.replaceWith=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];this.after.apply(this,dt([],D(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,dt([],D(n),!1))},e.prototype.remove=function(){return this.parentNode?this.parentNode.removeChild(this):this},e.prototype.destroy=function(){this.dispatchEvent(FB),this.remove(),this.emitter.removeAllListeners(),this.destroyed=!0},e.prototype.getGeometryBounds=function(){return nt.sceneGraphService.getGeometryBounds(this)},e.prototype.getRenderBounds=function(){return nt.sceneGraphService.getBounds(this,!0)},e.prototype.getBounds=function(){return nt.sceneGraphService.getBounds(this)},e.prototype.getLocalBounds=function(){return nt.sceneGraphService.getLocalBounds(this)},e.prototype.getBoundingClientRect=function(){return nt.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(_9(n))return nt.enableCSSParsing?null:void 0;var r=this.attributes[n];if(r===void 0){if(nt.enableAttributeDashCased){var i=hv(n);r=this.attributes[i]}return nt.enableCSSParsing&&se(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,a){this.attributes[n]=r},e.prototype.getAttributeNS=function(n,r){throw new Error(an)},e.prototype.getAttributeNode=function(n){throw new Error(an)},e.prototype.getAttributeNodeNS=function(n,r){throw new Error(an)},e.prototype.hasAttributeNS=function(n,r){throw new Error(an)},e.prototype.removeAttributeNS=function(n,r){throw new Error(an)},e.prototype.removeAttributeNode=function(n){throw new Error(an)},e.prototype.setAttributeNS=function(n,r,i){throw new Error(an)},e.prototype.setAttributeNode=function(n){throw new Error(an)},e.prototype.setAttributeNodeNS=function(n){throw new Error(an)},e.prototype.toggleAttribute=function(n,r){throw new Error(an)},e}(gr);function Be(t){return!!(t!=null&&t.nodeName)}var A2=nt.globalThis.Proxy?nt.globalThis.Proxy:function(){},Da=new vo(re.ATTR_MODIFIED,null,null,null,null,vo.MODIFICATION,null,null),zB={opacity:"",fillOpacity:"",strokeOpacity:"",fill:"",stroke:"",transform:"",transformOrigin:"",visibility:"",pointerEvents:"",lineWidth:"",lineCap:"",lineJoin:"",increasedLineWidthForHitTesting:"",fontSize:"",fontFamily:"",fontStyle:"",fontWeight:"",fontVariant:"",textAlign:"",textBaseline:"",textTransform:"",zIndex:"",filter:"",shadowType:""},GB={fill:hd,stroke:hd,transform:[],zIndex:0,filter:[],shadowType:"outer",miterLimit:10},WB=["opacity","fillOpacity","strokeOpacity","transformOrigin","visibility","pointerEvents","lineWidth","lineCap","lineJoin","increasedLineWidthForHitTesting"],YB=dt(dt([],D(WB),!1),["fontSize","fontFamily","fontStyle","fontWeight","fontVariant","textAlign","textBaseline","textTransform"],!1),T2="data-",Fr=function(t){It(e,t);function e(n){var r=t.call(this)||this;return r.isCustomElement=!1,r.isMutationObserved=!1,r.activeAnimations=[],r.config=n,r.id=r.config.id||"",r.name=r.config.name||"",(r.config.className||r.config.class)&&(r.className=r.config.className||r.config.class),r.nodeName=r.config.type||st.GROUP,nt.enableCSSParsing?(Object.assign(r.attributes,zB),Object.assign(r.parsedStyle,GB,r.config.initialParsedStyle)):r.config.initialParsedStyle&&Object.assign(r.parsedStyle,r.config.initialParsedStyle),r.initAttributes(r.config.style),nt.enableDataset&&(r.dataset=new A2({},{get:function(i,a){var o="".concat(T2).concat(z_(a));return i[o]!==void 0?i[o]:r.getAttribute(o)},set:function(i,a,o){return r.setAttribute("".concat(T2).concat(z_(a)),o),!0}})),nt.enableStyleSyntax&&(r.style=new A2({setProperty:function(i,a){r.setAttribute(i,a)},getPropertyValue:function(i){return r.getAttribute(i)},removeProperty:function(i){r.removeAttribute(i)},item:function(){return""}},{get:function(i,a){return i[a]!==void 0?i[a]:r.getAttribute(a)},set:function(i,a,o){return r.setAttribute(a,o),!0}})),r}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=J({},this.attributes);for(var a in i){var o=i[a];Be(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};nt.enableCSSParsing&&(i.usedAttributes=YB);var a=n;if(nt.enableAttributeDashCased){a={};for(var o in n){var s=hv(o);a[s]=n[o]}}nt.styleValueRegistry.processProperties(this,a,i),r.dirty=!0},e.prototype.setAttribute=function(n,r,i,a){i===void 0&&(i=!1),a===void 0&&(a=!0),nt.enableAttributeDashCased&&(n=hv(n)),!ln(r)&&(i||r!==this.attributes[n])&&(this.internalSetAttribute(n,r,{memoize:a}),t.prototype.setAttribute.call(this,n,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];nt.styleValueRegistry.processProperties(this,(a={},a[n]=r,a),i),o.dirty=!0;var l=this.parsedStyle[n];this.isConnected&&(Da.relatedNode=this,Da.prevValue=s,Da.newValue=r,Da.attrName=n,Da.prevParsedValue=c,Da.newParsedValue=l,this.isMutationObserved?this.dispatchEvent(Da):(Da.target=this,this.ownerDocument.defaultView.dispatchEvent(Da,!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=D(n.getMin(),2),i=r[0],a=r[1],o=D(n.getMax(),2),s=o[0],c=o[1];return new hs(i,a,s-i,c-a)},e.prototype.setOrigin=function(n,r,i){return r===void 0&&(r=0),i===void 0&&(i=0),nt.sceneGraphService.setOrigin(this,Xr(n,r,i)),this},e.prototype.getOrigin=function(){return nt.sceneGraphService.getOrigin(this)},e.prototype.setPosition=function(n,r,i){return r===void 0&&(r=0),i===void 0&&(i=0),nt.sceneGraphService.setPosition(this,Xr(n,r,i)),this},e.prototype.setLocalPosition=function(n,r,i){return r===void 0&&(r=0),i===void 0&&(i=0),nt.sceneGraphService.setLocalPosition(this,Xr(n,r,i)),this},e.prototype.translate=function(n,r,i){return r===void 0&&(r=0),i===void 0&&(i=0),nt.sceneGraphService.translate(this,Xr(n,r,i)),this},e.prototype.translateLocal=function(n,r,i){return r===void 0&&(r=0),i===void 0&&(i=0),nt.sceneGraphService.translateLocal(this,Xr(n,r,i)),this},e.prototype.getPosition=function(){return nt.sceneGraphService.getPosition(this)},e.prototype.getLocalPosition=function(){return nt.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=Xr(n,r,i)),nt.sceneGraphService.scaleLocal(this,n),this},e.prototype.setLocalScale=function(n,r,i){return typeof n=="number"&&(r=r||n,i=i||n,n=Xr(n,r,i)),nt.sceneGraphService.setLocalScale(this,n),this},e.prototype.getLocalScale=function(){return nt.sceneGraphService.getLocalScale(this)},e.prototype.getScale=function(){return nt.sceneGraphService.getScale(this)},e.prototype.getEulerAngles=function(){var n=D(cv(Se(),nt.sceneGraphService.getWorldTransform(this)),3),r=n[2];return Li(r)},e.prototype.getLocalEulerAngles=function(){var n=D(cv(Se(),nt.sceneGraphService.getLocalRotation(this)),3),r=n[2];return Li(r)},e.prototype.setEulerAngles=function(n){return nt.sceneGraphService.setEulerAngles(this,0,0,n),this},e.prototype.setLocalEulerAngles=function(n){return nt.sceneGraphService.setLocalEulerAngles(this,0,0,n),this},e.prototype.rotateLocal=function(n,r,i){return se(r)&&se(i)?nt.sceneGraphService.rotateLocal(this,0,0,n):nt.sceneGraphService.rotateLocal(this,n,r,i),this},e.prototype.rotate=function(n,r,i){return se(r)&&se(i)?nt.sceneGraphService.rotate(this,0,0,n):nt.sceneGraphService.rotate(this,n,r,i),this},e.prototype.setRotation=function(n,r,i,a){return nt.sceneGraphService.setRotation(this,n,r,i,a),this},e.prototype.setLocalRotation=function(n,r,i,a){return nt.sceneGraphService.setLocalRotation(this,n,r,i,a),this},e.prototype.setLocalSkew=function(n,r){return nt.sceneGraphService.setLocalSkew(this,n,r),this},e.prototype.getRotation=function(){return nt.sceneGraphService.getRotation(this)},e.prototype.getLocalRotation=function(){return nt.sceneGraphService.getLocalRotation(this)},e.prototype.getLocalSkew=function(){return nt.sceneGraphService.getLocalSkew(this)},e.prototype.getLocalTransform=function(){return nt.sceneGraphService.getLocalTransform(this)},e.prototype.getWorldTransform=function(){return nt.sceneGraphService.getWorldTransform(this)},e.prototype.setLocalTransform=function(n){return nt.sceneGraphService.setLocalTransform(this,n),this},e.prototype.resetLocalTransform=function(){nt.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,r;return nt.enableCSSParsing?((n=this.parsedStyle)===null||n===void 0?void 0:n.visibility)==="visible":((r=this.parsedStyle)===null||r===void 0?void 0:r.visibility)!=="hidden"},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,dt([],D(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,dt([],D(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=D(r,2),o=a[0],s=a[1];return o?cs(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=D(Vf(Se(),r),2),a=i[0],o=i[1],s=D(uc(Se(),r),2),c=s[0],l=s[1],u=Xf(tr(),r),f=D(cv(Se(),u),3),d=f[0],h=f[2];return a9(d||h,a,o,c,l)},e.prototype.getLocalMatrix=function(){return this.getMatrix(this.getLocalTransform())},e.prototype.setMatrix=function(n){var r=D(N_(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=D(N_(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(){nt.enableCSSParsing?this.style.visibility="visible":this.forEach(function(n){n.style.visibility="visible"})},e.prototype.hide=function(){nt.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.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}(BB),ms=function(t){It(e,t);function e(n){return n===void 0&&(n={}),t.call(this,J({type:st.CIRCLE},n))||this}return e}(Fr),_d=function(t){It(e,t);function e(n){n===void 0&&(n={});var r=this,i=n.style,a=wn(n,["style"]);return r=t.call(this,J({style:nt.enableCSSParsing?J({},i):J({},i)},a))||this,r.isCustomElement=!0,r}return e}(Fr),Fv=function(t){It(e,t);function e(n){return n===void 0&&(n={}),t.call(this,J({type:st.ELLIPSE},n))||this}return e}(Fr),dr=function(t){It(e,t);function e(n){return n===void 0&&(n={}),t.call(this,J({type:st.GROUP},n))||this}return e}(Fr),Od=function(t){It(e,t);function e(n){n===void 0&&(n={});var r=this,i=n.style,a=wn(n,["style"]);return r=t.call(this,J({type:st.HTML,style:nt.enableCSSParsing?J({x:"",y:"",width:"auto",height:"auto",innerHTML:""},i):J({},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 hs(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 Un,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=da(cn(),this.parentNode.getWorldTransform()),r=this.getBounds();if(!Un.isEmpty(r)){var i=new Un;return i.setFromTransformedAABB(r,n),i}}return this.getBounds()},e}(Fr),Bv=function(t){It(e,t);function e(n){return n===void 0&&(n={}),t.call(this,J({type:st.IMAGE},n))||this}return e}(Fr),Kl=function(t){It(e,t);function e(n){n===void 0&&(n={});var r=this,i=n.style,a=wn(n,["style"]);r=t.call(this,J({type:st.LINE,style:J({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&&Be(s)&&(r.markerStartAngle=s.getLocalEulerAngles(),r.appendChild(s)),c&&Be(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&&Be(a)&&(this.markerStartAngle=0,a.remove()),o&&Be(o)&&(this.markerStartAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!0))):n==="markerEnd"&&(a&&Be(a)&&(this.markerEndAngle=0,a.remove()),o&&Be(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=n?i:a;if(!(!d||!Be(d))){var h=0,p,v,g,y,m,b;n?(g=c,y=u,p=l-c,v=f-u,m=o||0,b=this.markerStartAngle):(g=l,y=f,p=c-l,v=u-f,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.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=pa(a,o,s,c,n),u=l.x,f=l.y,d=fr(Se(),De(u,f,0),r?this.getWorldTransform():this.getLocalTransform());return new Sr(d[0],d[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 x_(r,i,a,o)},e}(Fr),Zr=function(t){It(e,t);function e(n){n===void 0&&(n={});var r=this,i=n.style,a=wn(n,["style"]);r=t.call(this,J({type:st.PATH,style:nt.enableCSSParsing?J({d:"",miterLimit:""},i):J({},i),initialParsedStyle:nt.enableCSSParsing?null:{miterLimit:4,d:J({},W_)}},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&&Be(s)&&(r.markerStartAngle=s.getLocalEulerAngles(),r.appendChild(s)),l&&Be(l)&&r.placeMarkerMid(l),c&&Be(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==="d"?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):n==="markerStartOffset"||n==="markerEndOffset"?(this.transformMarker(!0),this.transformMarker(!1)):n==="markerStart"?(a&&Be(a)&&(this.markerStartAngle=0,a.remove()),o&&Be(o)&&(this.markerStartAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!0))):n==="markerEnd"?(a&&Be(a)&&(this.markerEndAngle=0,a.remove()),o&&Be(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=n?i:a;if(!(!c||!Be(c))){var l=0,u,f,d,h,p,v;if(n){var g=D(this.getStartTangent(),2),y=g[0],m=g[1];d=m[0],h=m[1],u=y[0]-m[0],f=y[1]-m[1],p=o||0,v=this.markerStartAngle}else{var b=D(this.getEndTangent(),2),y=b[0],m=b[1];d=m[0],h=m[1],u=y[0]-m[0],f=y[1]-m[1],p=s||0,v=this.markerEndAngle}l=Math.atan2(f,u),c.setLocalEulerAngles(l*180/Math.PI+v),c.setLocalPosition(d+Math.cos(l)*p,h+Math.sin(l)*p)}},e.prototype.placeMarkerMid=function(n){var r=this.parsedStyle.d.segments;if(this.markerMidList.forEach(function(l){l.remove()}),n&&Be(n))for(var i=1;i<r.length-1;i++){var a=D(r[i].currentPoint,2),o=a[0],s=a[1],c=i===1?n:n.cloneNode(!0);this.markerMidList.push(c),this.appendChild(c),c.setLocalPosition(o,s)}},e.prototype.getTotalLength=function(){return Ov(this)},e.prototype.getPointAtLength=function(n,r){r===void 0&&(r=!1);var i=this.parsedStyle.d.absolutePath,a=m8(i,n),o=a.x,s=a.y,c=fr(Se(),De(o,s,0),r?this.getWorldTransform():this.getLocalTransform());return new Sr(c[0],c[1])},e.prototype.getPoint=function(n,r){return r===void 0&&(r=!1),this.getPointAtLength(n*Ov(this),r)},e.prototype.getStartTangent=function(){var n=this.parsedStyle.d.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.d.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}(Fr),Ql=function(t){It(e,t);function e(n){n===void 0&&(n={});var r=this,i=n.style,a=wn(n,["style"]);r=t.call(this,J({type:st.POLYGON,style:nt.enableCSSParsing?J({points:"",miterLimit:"",isClosed:!0},i):J({},i),initialParsedStyle:nt.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&&Be(s)&&(r.markerStartAngle=s.getLocalEulerAngles(),r.appendChild(s)),l&&Be(l)&&r.placeMarkerMid(l),c&&Be(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&&Be(a)&&(this.markerStartAngle=0,a.remove()),o&&Be(o)&&(this.markerStartAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!0))):n==="markerEnd"?(a&&Be(a)&&(this.markerEndAngle=0,a.remove()),o&&Be(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=(c||{}).points,u=n?i:a;if(!(!u||!Be(u)||!l)){var f=0,d,h,p,v,g,y;if(p=l[0][0],v=l[0][1],n)d=l[1][0]-l[0][0],h=l[1][1]-l[0][1],g=o||0,y=this.markerStartAngle;else{var m=l.length;this.parsedStyle.isClosed?(d=l[m-1][0]-l[0][0],h=l[m-1][1]-l[0][1]):(p=l[m-1][0],v=l[m-1][1],d=l[m-2][0]-l[m-1][0],h=l[m-2][1]-l[m-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.points,i=(r||{}).points;if(this.markerMidList.forEach(function(l){l.remove()}),this.markerMidList=[],n&&Be(n)&&i)for(var a=1;a<(this.parsedStyle.isClosed?i.length:i.length-1);a++){var o=i[a][0],s=i[a][1],c=a===1?n:n.cloneNode(!0);this.markerMidList.push(c),this.appendChild(c),c.setLocalPosition(o,s)}},e}(Fr),zv=function(t){It(e,t);function e(n){n===void 0&&(n={});var r=n.style,i=wn(n,["style"]);return t.call(this,J({type:st.POLYLINE,style:nt.enableCSSParsing?J({points:"",miterLimit:"",isClosed:!1},r):J({},r),initialParsedStyle:nt.enableCSSParsing?null:{points:{points:[],totalLength:0,segments:[]},miterLimit:4,isClosed:!1}},i))||this}return e.prototype.getTotalLength=function(){return V9(this)},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.points.points;if(this.parsedStyle.points.segments.length===0){var a=[],o=0,s,c,l=this.getTotalLength();i.forEach(function(g,y){i[y+1]&&(s=[0,0],s[0]=o/l,c=x_(g[0],g[1],i[y+1][0],i[y+1][1]),o+=c,s[1]=o/l,a.push(s))}),this.parsedStyle.points.segments=a}var u=0,f=0;this.parsedStyle.points.segments.forEach(function(g,y){n>=g[0]&&n<=g[1]&&(u=(n-g[0])/(g[1]-g[0]),f=y)});var d=pa(i[f][0],i[f][1],i[f+1][0],i[f+1][1],u),h=d.x,p=d.y,v=fr(Se(),De(h,p,0),r?this.getWorldTransform():this.getLocalTransform());return new Sr(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}(Ql),bs=function(t){It(e,t);function e(n){return n===void 0&&(n={}),t.call(this,J({type:st.RECT},n))||this}return e}(Fr),fi=function(t){It(e,t);function e(n){n===void 0&&(n={});var r=n.style,i=wn(n,["style"]);return t.call(this,J({type:st.TEXT,style:nt.enableCSSParsing?J({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):J({fill:"black"},r)},i))||this}return e.prototype.getComputedTextLength=function(){var n;return this.getGeometryBounds(),((n=this.parsedStyle.metrics)===null||n===void 0?void 0:n.maxLineWidth)||0},e.prototype.getLineBoundingRects=function(){var n;return this.getGeometryBounds(),((n=this.parsedStyle.metrics)===null||n===void 0?void 0:n.lineMetrics)||[]},e.prototype.isOverflowing=function(){return this.getGeometryBounds(),!!this.parsedStyle.isOverflowing},e}(Fr),HB=function(){function t(){this.registry={},this.define(st.CIRCLE,ms),this.define(st.ELLIPSE,Fv),this.define(st.RECT,bs),this.define(st.IMAGE,Bv),this.define(st.LINE,Kl),this.define(st.GROUP,dr),this.define(st.PATH,Zr),this.define(st.POLYGON,Ql),this.define(st.POLYLINE,zv),this.define(st.TEXT,fi),this.define(st.HTML,Od)}return t.prototype.define=function(e,n){this.registry[e]=n},t.prototype.get=function(e){return this.registry[e]},t}(),k2={number:function(t){return new on(t)},percent:function(t){return new on(t,"%")},px:function(t){return new on(t,"px")},em:function(t){return new on(t,"em")},rem:function(t){return new on(t,"rem")},deg:function(t){return new on(t,"deg")},grad:function(t){return new on(t,"grad")},rad:function(t){return new on(t,"rad")},turn:function(t){return new on(t,"turn")},s:function(t){return new on(t,"s")},ms:function(t){return new on(t,"ms")},registerProperty:function(t){var e=t.name,n=t.inherits,r=t.interpolable,i=t.initialValue,a=t.syntax;nt.styleValueRegistry.registerMetadata({n:e,inh:n,int:r,d:i,syntax:a})},registerLayout:function(t,e){nt.layoutRegistry.registerLayout(t,e)}},$B=function(t){It(e,t);function e(){var n=t.call(this)||this;n.defaultView=null,n.ownerDocument=null,n.nodeName="document";try{n.timeline=new nt.AnimationTimeline(n)}catch(i){}var r={};return Tv.forEach(function(i){var a=i.n,o=i.inh,s=i.d;o&&s&&(r[a]=xc(s)?s(st.GROUP):s)}),n.documentElement=new dr({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"?fi:dr);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(an)},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=f===void 0?"auto":f,h=["auto","visiblepainted","visiblefill","visiblestroke","visible"].includes(d);(!h||h&&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 es(this,void 0,void 0,function(){var i,a,o,s,c,l,u,f,d,h;return ns(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 es(this,void 0,void 0,function(){var i,a,o,s,c,l,u,f,d,h;return ns(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(bc)},e.prototype.insertBefore=function(n,r){throw new Error(bc)},e.prototype.removeChild=function(n,r){throw new Error(bc)},e.prototype.replaceChild=function(n,r,i){throw new Error(bc)},e.prototype.append=function(){throw new Error(bc)},e.prototype.prepend=function(){throw new Error(bc)},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}(gr),UB=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 sn(re.CULLED)),null)}return o}),r.hooks.afterRender.tap(t.tag,function(o){o.cullable.visibilityPlaneMask=-1})},t.tag="Culling",t}(),VB=function(){function t(){var e=this;this.autoPreventDefault=!1,this.rootPointerEvent=new Iv(null),this.rootWheelEvent=new Dv(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=jr(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=jr(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=jr(c),f=u.next();!f.done;f=u.next()){var d=f.value,h=n.bootstrapEvent(n.rootPointerEvent,d,i,a);n.context.eventService.mapEvent(h)}}catch(p){o={error:p}}finally{try{f&&!f.done&&(s=u.return)&&s.call(u)}finally{if(o)throw o.error}}n.setCursor(n.context.eventService.cursor)}}),r.hooks.pointerUp.tap(t.tag,function(a){var o,s;if(!(i.supportsTouchEvents&&a.pointerType==="touch")){var c=n.context.contextService.getDomElement(),l=n.context.eventService.isNativeEventFromCanvas(c,a),u=l?"":"outside",f=n.normalizeToPointerEvent(a,i);try{for(var d=jr(f),h=d.next();!h.done;h=d.next()){var p=h.value,v=n.bootstrapEvent(n.rootPointerEvent,p,i,a);v.type+=u,n.context.eventService.mapEvent(v)}}catch(g){o={error:g}}finally{try{h&&!h.done&&(s=d.return)&&s.call(d)}finally{if(o)throw o.error}}n.setCursor(n.context.eventService.cursor)}}),r.hooks.pointerMove.tap(t.tag,this.onPointerMove),r.hooks.pointerOver.tap(t.tag,this.onPointerMove),r.hooks.pointerOut.tap(t.tag,this.onPointerMove),r.hooks.click.tap(t.tag,this.onClick),r.hooks.pointerCancel.tap(t.tag,function(a){var o,s,c=n.normalizeToPointerEvent(a,i);try{for(var l=jr(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.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.context.eventService.client2Viewport({x:n.clientX,y:n.clientY}),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=WF[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.context.eventService.client2Viewport({x:e.clientX,y:e.clientY}),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=Lv.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];ln(a.button)&&(a.button=0),ln(a.buttons)&&(a.buttons=1),ln(a.isPrimary)&&(a.isPrimary=e.touches.length===1&&e.type==="touchstart"),ln(a.width)&&(a.width=a.radiusX||1),ln(a.height)&&(a.height=a.radiusY||1),ln(a.tiltX)&&(a.tiltX=0),ln(a.tiltY)&&(a.tiltY=0),ln(a.pointerType)&&(a.pointerType="touch"),ln(a.pointerId)&&(a.pointerId=a.identifier||0),ln(a.pressure)&&(a.pressure=a.force||.5),ln(a.twist)&&(a.twist=0),ln(a.tangentialPressure)&&(a.tangentialPressure=0),a.isNormalized=!0,a.type=e.type,r.push(a)}else if(n.isMouseEvent(e)){var o=e;ln(o.isPrimary)&&(o.isPrimary=!0),ln(o.width)&&(o.width=1),ln(o.height)&&(o.height=1),ln(o.tiltX)&&(o.tiltX=0),ln(o.tiltY)&&(o.tiltY=0),ln(o.pointerType)&&(o.pointerType="mouse"),ln(o.pointerId)&&(o.pointerId=GF),ln(o.pressure)&&(o.pressure=.5),ln(o.twist)&&(o.twist=0),ln(o.tangentialPressure)&&(o.tangentialPressure=0),o.isNormalized=!0,r.push(o)}else r.push(e);return r},t.tag="Event",t}(),XB=[st.CIRCLE,st.ELLIPSE,st.IMAGE,st.RECT,st.LINE,st.POLYLINE,st.POLYGON,st.TEXT,st.PATH,st.HTML],qB=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(Un.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||uo.INDETERMINATE,s.planes),a.visible=a.visibilityPlaneMask!==uo.OUTSIDE,a.visible},t.prototype.computeVisibilityWithPlaneMask=function(e,n,r,i){if(r===uo.OUTSIDE||r===uo.INSIDE)return r;for(var a=uo.INSIDE,o=XB.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(Qi(f,n.getPositiveFarPoint(i[s]))+d<0)return uo.OUTSIDE;Qi(f,n.getNegativeFarPoint(i[s]))+d<0&&(a|=l)}}return a},t}(),ZB=function(){function t(){this.toSync=new Set,this.isFirstTimeRendering=!0,this.syncing=!1,this.isFirstTimeRenderingFinished=!1}return t.prototype.apply=function(e){var n=this,r,i=e.renderingService,a=e.renderingContext,o=e.rBushRoot,s=a.root.ownerDocument.defaultView;this.rBush=o;var c=function(h){var p=h.target;p.renderable.dirty=!0,i.dirtify()},l=function(h){var p=h.detail.affectChildren,v=h.target;p&&v.forEach(function(y){n.toSync.add(y)});for(var g=v;g;)g.renderable&&n.toSync.add(g),g=g.parentElement;i.dirtify()},u=function(h){var p=h.target;nt.enableSizeAttenuation&&nt.styleValueRegistry.updateSizeAttenuation(p,s.getCamera().getZoom()),nt.enableCSSParsing&&nt.styleValueRegistry.recalc(p),nt.sceneGraphService.dirtifyToRoot(p),i.dirtify()},f=function(h){var p=h.target,v=p.rBushNode;v.aabb&&n.rBush.remove(v.aabb),n.toSync.delete(p),nt.sceneGraphService.dirtifyToRoot(p),i.dirtify()};i.hooks.init.tap(t.tag,function(){s.addEventListener(re.MOUNTED,u),s.addEventListener(re.UNMOUNTED,f),s.addEventListener(re.ATTR_MODIFIED,c),s.addEventListener(re.BOUNDS_CHANGED,l)}),i.hooks.destroy.tap(t.tag,function(){s.removeEventListener(re.MOUNTED,u),s.removeEventListener(re.UNMOUNTED,f),s.removeEventListener(re.ATTR_MODIFIED,c),s.removeEventListener(re.BOUNDS_CHANGED,l),n.toSync.clear()});var d=(r=nt.globalThis.requestIdleCallback)!==null&&r!==void 0?r:Nv.bind(nt.globalThis);i.hooks.endFrame.tap(t.tag,function(){n.isFirstTimeRendering?(n.isFirstTimeRendering=!1,n.syncing=!0,d(function(){n.syncRTree(!0),n.isFirstTimeRenderingFinished=!0})):n.syncRTree()})},t.prototype.syncRTree=function(e){var n=this;if(e===void 0&&(e=!1),!(!e&&(this.syncing||this.toSync.size===0))){this.syncing=!0;var r=[];Array.from(this.toSync).filter(function(i){return i.isConnected}).forEach(function(i){var a=i.rBushNode;a&&a.aabb&&n.rBush.remove(a.aabb);var o=i.getRenderBounds();if(o){var s=i.renderable;e&&(s.dirtyRenderBounds||(s.dirtyRenderBounds=new Un),s.dirtyRenderBounds.update(o.center,o.halfExtents));var c=D(o.getMin(),2),l=c[0],u=c[1],f=D(o.getMax(),2),d=f[0],h=f[1];a.aabb||(a.aabb={}),a.aabb.displayObject=i,a.aabb.minX=l,a.aabb.minY=u,a.aabb.maxX=d,a.aabb.maxY=h}a.aabb&&!isNaN(a.aabb.maxX)&&!isNaN(a.aabb.maxX)&&!isNaN(a.aabb.minX)&&!isNaN(a.aabb.minY)&&r.push(a.aabb)}),this.rBush.load(r),r.length=0,this.toSync.clear(),this.syncing=!1}},t.tag="Prepare",t}();function Svt(t){return!!t.document}var di;(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"})(di||(di={}));var C2=500,KB=.1,QB=1e3,Gv=new sn(re.MOUNTED),Wv=new sn(re.UNMOUNTED),JB=new sn(di.BEFORE_RENDER),t7=new sn(di.RERENDER),e7=new sn(di.AFTER_RENDER),L2=function(t){It(e,t);function e(n){var r=t.call(this)||this;r.Element=Fr,r.inited=!1,r.context={},r.document=new $B,r.document.defaultView=r,r.customElements=new HB;var i=n.container,a=n.canvas,o=n.offscreenCanvas,s=n.width,c=n.height,l=n.devicePixelRatio,u=n.renderer,f=n.background,d=n.cursor,h=n.document,p=n.requestAnimationFrame,v=n.cancelAnimationFrame,g=n.createImage,y=n.supportsPointerEvents,m=n.supportsTouchEvents,b=n.supportsCSSTransform,x=n.supportsMutipleCanvasesInOneContainer,_=n.useNativeClickEvent,O=n.alwaysTriggerPointerEventOnCanvas,w=n.isTouchEvent,S=n.isMouseEvent;x||RF(i,r);var M=s,E=c,P=l;return a&&(P=l||Xl&&window.devicePixelRatio||1,P=P>=1?Math.ceil(P):1,M=s||BF(a)||a.width/P,E=c||zF(a)||a.height/P),o&&(nt.offscreenCanvas=o),r.devicePixelRatio=P,r.requestAnimationFrame=p!=null?p:Nv.bind(nt.globalThis),r.cancelAnimationFrame=v!=null?v:m2.bind(nt.globalThis),r.supportsTouchEvents=m!=null?m:"ontouchstart"in nt.globalThis,r.supportsPointerEvents=y!=null?y:!!nt.globalThis.PointerEvent,r.isTouchEvent=w!=null?w:function(C){return r.supportsTouchEvents&&C instanceof nt.globalThis.TouchEvent},r.isMouseEvent=S!=null?S:function(C){return!nt.globalThis.MouseEvent||C instanceof nt.globalThis.MouseEvent&&(!r.supportsPointerEvents||!(C instanceof nt.globalThis.PointerEvent))},r.initRenderingContext({container:i,canvas:a,width:M,height:E,renderer:u,offscreenCanvas:o,devicePixelRatio:P,cursor:d||"default",background:f||"transparent",createImage:g,document:h,supportsCSSTransform:b,useNativeClickEvent:_,alwaysTriggerPointerEventOnCanvas:O}),r.initDefaultCamera(M,E,u.clipSpaceNearZ),r.initRenderer(u,!0),r}return e.prototype.initRenderingContext=function(n){this.context.config=n,this.context.renderingContext={root:this.document.documentElement,renderListCurrentFrame:[],unculledEntities:[],renderReasons:new Set,force:!1,dirty:!1}},e.prototype.initDefaultCamera=function(n,r,i){var a=this,o=new nt.CameraContribution;o.clipSpaceNearZ=i,o.setType(qe.EXPLORING,Hl.DEFAULT).setPosition(n/2,r/2,C2).setFocalPoint(n/2,r/2,0).setOrthographic(n/-2,n/2,r/2,r/-2,KB,QB),o.canvas=this,o.eventEmitter.on(R_.UPDATED,function(){a.context.renderingContext.renderReasons.add(po.CAMERA_CHANGED),nt.enableSizeAttenuation&&a.getConfig().renderer.getConfig().enableSizeAttenuation&&a.updateSizeAttenuation()}),this.context.camera=o},e.prototype.updateSizeAttenuation=function(){var n=this.getCamera().getZoom();this.document.documentElement.forEach(function(r){nt.styleValueRegistry.updateSizeAttenuation(r,n)})},e.prototype.getConfig=function(){return this.context.config},e.prototype.getRoot=function(){return this.document.documentElement},e.prototype.getCamera=function(){return this.context.camera},e.prototype.getContextService=function(){return this.context.contextService},e.prototype.getEventService=function(){return this.context.eventService},e.prototype.getRenderingService=function(){return this.context.renderingService},e.prototype.getRenderingContext=function(){return this.context.renderingContext},e.prototype.getStats=function(){return this.getRenderingService().getStats()},Object.defineProperty(e.prototype,"ready",{get:function(){var n=this;return this.readyPromise||(this.readyPromise=new Promise(function(r){n.resolveReadyPromise=function(){r(n)}}),this.inited&&this.resolveReadyPromise()),this.readyPromise},enumerable:!1,configurable:!0}),e.prototype.destroy=function(n,r){if(n===void 0&&(n=!0),r===void 0&&(r=!1),r||this.dispatchEvent(new sn(di.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 sn(di.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,C2).setFocalPoint(n/2,r/2,0),o===si.ORTHOGRAPHIC?a.setOrthographic(n/-2,n/2,r/2,r/-2,a.getNear(),a.getFar()):a.setAspect(n/r),this.dispatchEvent(new sn(di.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(n){var r=this;this.dispatchEvent(JB);var i=this.getRenderingService();i.render(this.getConfig(),n,function(){r.dispatchEvent(t7)}),this.dispatchEvent(e7)},e.prototype.run=function(){var n=this,r=function(i,a){n.render(a),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 Q8,this.context.renderingPlugins=[],this.context.renderingPlugins.push(new VB,new ZB,new UB([new qB])),this.loadRendererContainerModule(n),this.context.contextService=new this.context.ContextService(J(J({},nt),this.context)),this.context.renderingService=new bB(nt,this.context),this.context.eventService=new yB(nt,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 sn(di.READY))}):a.dispatchEvent(new sn(di.READY)),a.readyPromise&&a.resolveReadyPromise()):a.dispatchEvent(new sn(di.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(nt)})},e.prototype.setRenderer=function(n){var r=this.getConfig();if(r.renderer!==n){var i=r.renderer;r.renderer=n,this.destroy(!1,!0),dt([],D(i==null?void 0:i.getPlugins()),!1).reverse().forEach(function(a){a.destroy(nt)}),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(Wv):(Wv.target=n,this.dispatchEvent(Wv,!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(Gv):(Gv.target=n,this.dispatchEvent(Gv,!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}(O2),n7=function(t){It(e,t);function e(){var n=t.apply(this,dt([],D(arguments),!1))||this;return n.landmarks=[],n}return e.prototype.rotate=function(n,r,i){if(this.relElevation=mc(r),this.relAzimuth=mc(n),this.relRoll=mc(i),this.elevation+=this.relElevation,this.azimuth+=this.relAzimuth,this.roll+=this.relRoll,this.type===qe.EXPLORING){var a=oo(tr(),[1,0,0],rn((this.rotateWorld?1:-1)*this.relElevation)),o=oo(tr(),[0,1,0],rn((this.rotateWorld?1:-1)*this.relAzimuth)),s=oo(tr(),[0,0,1],rn(this.relRoll)),c=so(tr(),o,a);c=so(tr(),c,s);var l=Z0(cn(),c);lc(this.matrix,this.matrix,[0,0,-this.distance]),Rr(this.matrix,this.matrix,l),lc(this.matrix,this.matrix,[0,0,this.distance])}else{if(Math.abs(this.elevation)>90)return this;this.computeMatrix()}return this._getAxes(),this.type===qe.ORBITING||this.type===qe.EXPLORING?this._getPosition():this.type===qe.TRACKING&&this._getFocalPoint(),this._update(),this},e.prototype.pan=function(n,r){var i=Xr(n,r,0),a=ja(this.position);return cc(a,a,U0(Se(),this.right,i[0])),cc(a,a,U0(Se(),this.up,i[1])),this._setPosition(a),this.triggerUpdate(),this},e.prototype.dolly=function(n){var r=this.forward,i=ja(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===qe.ORBITING||this.type===qe.EXPLORING?this._getDistance():this.type===qe.TRACKING&&cc(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 nt.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:Px(p.getWorldTransform()),right:ja(p.right),up:ja(p.up),forward:ja(p.forward),position:ja(p.getPosition()),focalPoint:ja(p.getFocalPoint()),distanceVector:ja(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=Cn(n)?this.landmarks.find(function(E){return E.name===n}):n;if(a){var o=vn(r)?{duration:r}:r,s=o.easing,c=s===void 0?"linear":s,l=o.duration,u=l===void 0?100:l,f=o.easingFunction,d=f===void 0?void 0:f,h=o.onfinish,p=h===void 0?void 0:h,v=o.onframe,g=v===void 0?void 0:v,y=.01;if(u===0){this.syncFromLandmark(a),p&&p();return}this.cancelLandmarkAnimation();var m=a.position,b=a.focalPoint,x=a.zoom,_=a.roll,O=d||nt.EasingFunction(c),w,S=function(){i.setFocalPoint(b),i.setPosition(m),i.setRoll(_),i.setZoom(x),i.computeMatrix(),i.triggerUpdate(),p&&p()},M=function(E){w===void 0&&(w=E);var P=E-w;if(P>u){S();return}var C=O(P/u),A=Se(),T=Se(),k=1,N=0;V0(A,i.focalPoint,b,C),V0(T,i.position,m,C),N=i.roll*(1-C)+_*C,k=i.zoom*(1-C)+x*C,i.setFocalPoint(A),i.setPosition(T),i.setRoll(N),i.setZoom(k);var F=Mx(A,b)+Mx(T,m);if(F<=y&&x==null&&_==null){S();return}i.computeMatrix(),i.triggerUpdate(),P<u&&(g&&g(C),i.landmarkAnimationID=i.canvas.requestAnimationFrame(M))};this.canvas.requestAnimationFrame(M)}},e.prototype.syncFromLandmark=function(n){this.matrix=is(this.matrix,n.matrix),this.right=ai(this.right,n.right),this.up=ai(this.up,n.up),this.forward=ai(this.forward,n.forward),this.position=ai(this.position,n.position),this.focalPoint=ai(this.focalPoint,n.focalPoint),this.distanceVector=ai(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}(D_);nt.CameraContribution=n7;var N2=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}(),r7=0,Mc=new WeakMap,i7=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=c7(i,e);if(a){n[r-1]=a;return}}else u7(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(re.ATTR_MODIFIED,this,!0),n.childList&&e.addEventListener(re.INSERTED,this,!0),(n.childList||n.subtree)&&e.addEventListener(re.REMOVED,this,!0)},t.prototype.removeListeners=function(){this.removeListeners_(this.target)},t.prototype.removeListeners_=function(e){var n=this.options;n.attributes&&e.removeEventListener(re.ATTR_MODIFIED,this,!0),n.childList&&e.removeEventListener(re.INSERTED,this,!0),(n.childList||n.subtree)&&e.removeEventListener(re.REMOVED,this,!0)},t.prototype.removeTransientObservers=function(){var e=this.transientObservedNodes;this.transientObservedNodes=[],e.forEach(function(n){this.removeListeners_(n);for(var r=Mc.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 re.ATTR_MODIFIED:var i=e.attrName,a=e.relatedNode.namespaceURI;r=e.target,n=j2("attributes",r),n.attributeName=i,n.attributeNamespace=a;var o=e.attrChange===vo.ADDITION?null:e.prevValue;R2(r,function(d){if(d.attributes&&!(d.attributeFilter&&d.attributeFilter.length&&d.attributeFilter.indexOf(i)===-1&&d.attributeFilter.indexOf(a)===-1))return d.attributeOldValue?a7(o):n});break;case re.REMOVED:case re.INSERTED:r=e.relatedNode;var s=e.target,c=void 0,l=void 0;e.type===re.INSERTED?(c=[s],l=[]):(c=[],l=[s]);var u=s.previousSibling,f=s.nextSibling;n=j2("childList",r),n.addedNodes=c,n.removedNodes=l,n.previousSibling=u,n.nextSibling=f,R2(r,function(d){if(d.childList)return n})}o7()},t}(),Mvt=function(){function t(e){this.callback=e,this.nodes=[],this.records=[],this.uid=r7++}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=Mc.get(e);r||Mc.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 i7(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=Mc.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}(),wd,Fa;function j2(t,e){return wd=new N2(t,e)}function a7(t){return Fa||(Fa=N2.copy(wd),Fa.oldValue=t,Fa)}function o7(){wd=Fa=void 0}function s7(t){return t===Fa||t===wd}function c7(t,e){return t===e?t:Fa&&s7(t)?Fa:null}function l7(t){t.nodes.forEach(function(e){var n=Mc.get(e);n&&n.forEach(function(r){r.observer===t&&r.removeTransientObservers()})})}function R2(t,e){for(var n=t;n;n=n.parentNode){var r=Mc.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 Yv=!1,Hv=[];function u7(t){Hv.push(t),Yv||(Yv=!0,typeof nt.globalThis!="undefined"?nt.globalThis.setTimeout($v):$v())}function $v(){Yv=!1;var t=Hv;Hv=[],t.sort(function(n,r){return n.uid-r.uid});var e=!1;t.forEach(function(n){var r=n.takeRecords();l7(n),r.length&&(n.callback(r,n),e=!0)}),e&&$v()}var Uv=function(t){It(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}(xd),f7=0,d7=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(f7++),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 Uv(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(an)},t.prototype.addEventListener=function(e,n,r){throw new Error(an)},t.prototype.removeEventListener=function(e,n,r){throw new Error(an)},t.prototype.dispatchEvent=function(e){throw new Error(an)},t.prototype.commitStyles=function(){throw new Error(an)},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 Uv(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 Uv(null,this,this.currentTime,e);this.onframe(i)}this._finishedFlag=!1}},t}(),h7=4,p7=.001,v7=1e-7,g7=10,Jl=11,Sd=1/(Jl-1),y7=typeof Float32Array=="function",I2=function(t,e){return 1-3*e+3*t},D2=function(t,e){return 3*e-6*t},F2=function(t){return 3*t},Md=function(t,e,n){return((I2(e,n)*t+D2(e,n))*t+F2(e))*t},B2=function(t,e,n){return 3*I2(e,n)*t*t+2*D2(e,n)*t+F2(e)},m7=function(t,e,n,r,i){var a,o,s=0;do o=e+(n-e)/2,a=Md(o,r,i)-t,a>0?n=o:e=o;while(Math.abs(a)>v7&&++s<g7);return o},b7=function(t,e,n,r){for(var i=0;i<h7;++i){var a=B2(e,n,r);if(a===0)return e;var o=Md(e,n,r)-t;e-=o/a}return e},Vv=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=y7?new Float32Array(Jl):new Array(Jl),a=0;a<Jl;++a)i[a]=Md(a*Sd,t,n);var o=function(s){for(var c=0,l=1,u=Jl-1;l!==u&&i[l]<=s;++l)c+=Sd;--l;var f=(s-i[l])/(i[l+1]-i[l]),d=c+f*Sd,h=B2(d,t,n);return h>=p7?b7(s,d,t,n):h===0?d:m7(s,c,c+Sd,t,n)};return function(s){return s===0||s===1?s:Md(o(s),e,r)}},x7=function(t){return t=t.replace(/([A-Z])/g,function(e){return"-".concat(e.toLowerCase())}),t.charAt(0)==="-"?t.substring(1):t},Ed=function(t){return Math.pow(t,2)},Pd=function(t){return Math.pow(t,3)},Ad=function(t){return Math.pow(t,4)},Td=function(t){return Math.pow(t,5)},kd=function(t){return Math.pow(t,6)},Cd=function(t){return 1-Math.cos(t*Math.PI/2)},Ld=function(t){return 1-Math.sqrt(1-t*t)},Nd=function(t){return t*t*(3*t-2)},jd=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)},Rd=function(t,e){e===void 0&&(e=[]);var n=D(e,2),r=n[0],i=r===void 0?1:r,a=n[1],o=a===void 0?.5:a,s=Bn(Number(i),1,10),c=Bn(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)},tu=function(t,e,n){e===void 0&&(e=[]);var r=D(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=Bn(a,.1,1e3),s=Bn(s,.1,1e3),l=Bn(l,.1,1e3),f=Bn(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},Xv=function(t,e){e===void 0&&(e=[]);var n=D(e,2),r=n[0],i=r===void 0?10:r,a=n[1],o=a=="start"?Math.ceil:Math.floor;return o(Bn(t,0,1)*i)/i},z2=function(t,e){e===void 0&&(e=[]);var n=D(e,4),r=n[0],i=n[1],a=n[2],o=n[3];return Vv(r,i,a,o)(t)},Id=Vv(.42,0,1,1),ji=function(t){return function(e,n,r){return n===void 0&&(n=[]),1-t(1-e,n,r)}},Ri=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}},Ii=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}},G2={steps:Xv,"step-start":function(t){return Xv(t,[1,"start"])},"step-end":function(t){return Xv(t,[1,"end"])},linear:function(t){return t},"cubic-bezier":z2,ease:function(t){return z2(t,[.25,.1,.25,1])},in:Id,out:ji(Id),"in-out":Ri(Id),"out-in":Ii(Id),"in-quad":Ed,"out-quad":ji(Ed),"in-out-quad":Ri(Ed),"out-in-quad":Ii(Ed),"in-cubic":Pd,"out-cubic":ji(Pd),"in-out-cubic":Ri(Pd),"out-in-cubic":Ii(Pd),"in-quart":Ad,"out-quart":ji(Ad),"in-out-quart":Ri(Ad),"out-in-quart":Ii(Ad),"in-quint":Td,"out-quint":ji(Td),"in-out-quint":Ri(Td),"out-in-quint":Ii(Td),"in-expo":kd,"out-expo":ji(kd),"in-out-expo":Ri(kd),"out-in-expo":Ii(kd),"in-sine":Cd,"out-sine":ji(Cd),"in-out-sine":Ri(Cd),"out-in-sine":Ii(Cd),"in-circ":Ld,"out-circ":ji(Ld),"in-out-circ":Ri(Ld),"out-in-circ":Ii(Ld),"in-back":Nd,"out-back":ji(Nd),"in-out-back":Ri(Nd),"out-in-back":Ii(Nd),"in-bounce":jd,"out-bounce":ji(jd),"in-out-bounce":Ri(jd),"out-in-bounce":Ii(jd),"in-elastic":Rd,"out-elastic":ji(Rd),"in-out-elastic":Ri(Rd),"out-in-elastic":Ii(Rd),spring:tu,"spring-in":tu,"spring-out":ji(tu),"spring-in-out":Ri(tu),"spring-out-in":Ii(tu)},_7=function(t){return x7(t).replace(/^ease-/,"").replace(/(\(|\s).+/,"").toLowerCase().trim()},O7=function(t){return G2[_7(t)]||G2.linear},w7=function(t){return t},S7=1,M7=.5,W2=0;function Y2(t,e){return function(n){if(n>=1)return 1;var r=1/t;return n+=e*r,n-n%r}}var Dd="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",E7=new RegExp("cubic-bezier\\("+Dd+","+Dd+","+Dd+","+Dd+"\\)"),P7=/steps\(\s*(\d+)\s*\)/,A7=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/;function qv(t){var e=E7.exec(t);if(e)return Vv.apply(void 0,dt([],D(e.slice(1).map(Number)),!1));var n=P7.exec(t);if(n)return Y2(Number(n[1]),W2);var r=A7.exec(t);return r?Y2(Number(r[1]),{start:S7,middle:M7,end:W2}[r[2]]):O7(t)}function T7(t){return Math.abs(k7(t)/(t.playbackRate||1))}function k7(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 H2=0,Zv=1,Fd=2,$2=3;function C7(t,e,n){if(e===null)return H2;var r=n.endTime;return e<Math.min(n.delay,r)?Zv:e>=Math.min(n.delay+t+n.endDelay,r)?Fd:$2}function L7(t,e,n,r,i){switch(r){case Zv:return e==="backwards"||e==="both"?0:null;case $2:return n-i;case Fd:return e==="forwards"||e==="both"?t:null;case H2:return null}}function N7(t,e,n,r,i){var a=i;return t===0?e!==Zv&&(a+=n):a+=r/t,a}function j7(t,e,n,r,i,a){var o=t===1/0?e%1:t%1;return o===0&&n===Fd&&r!==0&&(i!==0||a===0)&&(o=1),o}function R7(t,e,n,r){return t===Fd&&e===1/0?1/0:n===1?Math.floor(r)-1:Math.floor(r)}function I7(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 D7(t,e,n){var r=C7(t,e,n),i=L7(t,n.fill,e,r,n.delay);if(i===null)return null;var a=n.duration==="auto"?0:n.duration,o=N7(a,r,n.iterations,i,n.iterationStart),s=j7(o,n.iterationStart,r,n.iterations,i,a),c=R7(r,n.iterations,s,o),l=I7(n.direction,c,s);return n.currentIteration=c,n.progress=l,n.easingFunction(l)}function F7(t,e,n){var r=B7(t,e),i=z7(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:l/u;a.setAttribute(c.property,c.interpolation(f),!1,!1)});else for(var s in r)U2(s)&&a.setAttribute(s,null)}}function U2(t){return t!=="offset"&&t!=="easing"&&t!=="composite"&&t!=="computedOffset"}function B7(t,e){for(var n={},r=0;r<t.length;r++)for(var i in t[r])if(U2(i)){var a={offset:t[r].offset,computedOffset:t[r].computedOffset,easing:t[r].easing,easingFunction:qv(t[r].easing)||e.easingFunction,value:t[r][i]};n[i]=n[i]||[],n[i].push(a)}return n}function z7(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:G7(r,i[o].value,i[s].value,e)})}return n.sort(function(d,h){return d.startOffset-h.startOffset}),n}var V2=function(t,e,n){return function(r){var i=X2(t,e,r);return!nt.enableCSSParsing&&vn(i)?i:n(i)}};function G7(t,e,n,r){var i=ho[t];if(i&&i.syntax&&i.int){var a=nt.styleValueRegistry.getPropertySyntax(i.syntax);if(a){var o=void 0,s=void 0;if(nt.enableCSSParsing){var c=nt.styleValueRegistry.parseProperty(t,e,r,!1),l=nt.styleValueRegistry.parseProperty(t,n,r,!1);o=nt.styleValueRegistry.computeProperty(t,c,r,!1),s=nt.styleValueRegistry.computeProperty(t,l,r,!1)}else{var u=a.parserWithCSSDisabled;o=u?u(e,r):e,s=u?u(n,r):n}var f=a.mixer(o,s,r);if(f){var d=V2.apply(void 0,dt([],D(f),!1));return function(h){return h===0?e:h===1?n:d(h)}}}}return V2(!1,!0,function(h){return h?n:e})}function X2(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(X2(t[s<r?s:r-1],e[s<i?s:i-1],n));return o}throw new Error("Mismatched interpolation arguments "+t+":"+e)}var W7=function(){function t(){this.delay=0,this.direction="normal",this.duration="auto",this._easing="linear",this.easingFunction=w7,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=qv(e),this._easing=e},enumerable:!1,configurable:!0}),t}();function Y7(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 q2(t,e){if(t===null)return[];Array.isArray(t)||(t=Y7(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(se(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(!se(p)&&!se(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 H7="backwards|forwards|both|none".split("|"),$7="reverse|alternate|alternate-reverse".split("|");function U7(t,e){var n=new W7;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"&&H7.indexOf(t[r])===-1||r==="direction"&&$7.indexOf(t[r])===-1)return;n[r]=t[r]}}),n}function V7(t,e){return t=X7(t!=null?t:{duration:"auto"}),U7(t,e)}function X7(t){return typeof t=="number"&&(isNaN(t)?t={duration:"auto"}:t={duration:t}),t}var q7=function(){function t(e,n,r){var i=this;this.composite="replace",this.iterationComposite="replace",this.target=e,this.timing=V7(r,!1),this.timing.effect=this,this.timing.activeDuration=T7(this.timing),this.timing.endTime=Math.max(0,this.timing.delay+this.timing.activeDuration+this.timing.endDelay),this.normalizedKeyframes=q2(n,this.timing),this.interpolations=F7(this.normalizedKeyframes,this.timing,this.target);var a=nt.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=D7(this.timing.activeDuration,e,this.timing),this.timeFraction!==null)},t.prototype.getKeyframes=function(){return this.normalizedKeyframes},t.prototype.setKeyframes=function(e){this.normalizedKeyframes=q2(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 Z2(t,e){return Number(t.id)-Number(e.id)}var Z7=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(Z2),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 q7(e,n,r),a=new d7(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(Z2);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,dt([],D(s),!1)),(a=this.pendingEffects).push.apply(a,dt([],D(c),!1)),this.ticking&&this.requestAnimationFrame(function(){}),this.inTick=!1,[l,u]},t}();nt.EasingFunction=qv,nt.AnimationTimeline=Z7;function K7(t,e){var n=e.cx,r=n===void 0?0:n,i=e.cy,a=i===void 0?0:i,o=e.r;t.arc(r,a,o,0,Math.PI*2,!1)}function Q7(t,e){var n=e.cx,r=n===void 0?0:n,i=e.cy,a=i===void 0?0:i,o=e.rx,s=e.ry;if(t.ellipse)t.ellipse(r,a,o,s,0,0,Math.PI*2,!1);else{var c=o>s?o:s,l=o>s?1:o/s,u=o>s?s/o:1;t.save(),t.scale(l,u),t.arc(r,a,c,0,Math.PI*2)}}function J7(t,e){var n=e.x1,r=e.y1,i=e.x2,a=e.y2,o=e.markerStart,s=e.markerEnd,c=e.markerStartOffset,l=e.markerEndOffset,u=0,f=0,d=0,h=0,p=0,v,g;o&&Be(o)&&c&&(v=i-n,g=a-r,p=Math.atan2(g,v),u=Math.cos(p)*(c||0),f=Math.sin(p)*(c||0)),s&&Be(s)&&l&&(v=n-i,g=r-a,p=Math.atan2(g,v),d=Math.cos(p)*(l||0),h=Math.sin(p)*(l||0)),t.moveTo(n+u,r+f),t.lineTo(i+d,a+h)}function tz(t,e){var n=e.markerStart,r=e.markerEnd,i=e.markerStartOffset,a=e.markerEndOffset,o=e.d,s=o.absolutePath,c=o.segments,l=0,u=0,f=0,d=0,h=0,p,v;if(n&&Be(n)&&i){var g=D(n.parentNode.getStartTangent(),2),y=g[0],m=g[1];p=y[0]-m[0],v=y[1]-m[1],h=Math.atan2(v,p),l=Math.cos(h)*(i||0),u=Math.sin(h)*(i||0)}if(r&&Be(r)&&a){var b=D(r.parentNode.getEndTangent(),2),y=b[0],m=b[1];p=y[0]-m[0],v=y[1]-m[1],h=Math.atan2(v,p),f=Math.cos(h)*(a||0),d=Math.sin(h)*(a||0)}for(var x=0;x<s.length;x++){var _=s[x],O=_[0],w=s[x+1],S=x===0&&(l!==0||u!==0),M=(x===s.length-1||w&&(w[0]==="M"||w[0]==="Z"))&&f!==0&&d!==0;switch(O){case"M":S?(t.moveTo(_[1]+l,_[2]+u),t.lineTo(_[1],_[2])):t.moveTo(_[1],_[2]);break;case"L":M?t.lineTo(_[1]+f,_[2]+d):t.lineTo(_[1],_[2]);break;case"Q":t.quadraticCurveTo(_[1],_[2],_[3],_[4]),M&&t.lineTo(_[3]+f,_[4]+d);break;case"C":t.bezierCurveTo(_[1],_[2],_[3],_[4],_[5],_[6]),M&&t.lineTo(_[5]+f,_[6]+d);break;case"A":{var E=c[x].arcParams,P=E.cx,C=E.cy,A=E.rx,T=E.ry,k=E.startAngle,N=E.endAngle,F=E.xRotation,R=E.sweepFlag;if(t.ellipse)t.ellipse(P,C,A,T,F,k,N,!!(1-R));else{var I=A>T?A:T,z=A>T?1:A/T,W=A>T?T/A:1;t.translate(P,C),t.rotate(F),t.scale(z,W),t.arc(0,0,I,k,N,!!(1-R)),t.scale(1/z,1/W),t.rotate(-F),t.translate(-P,-C)}M&&t.lineTo(_[6]+f,_[7]+d);break}case"Z":t.closePath();break}}}function ez(t,e){var n=e.markerStart,r=e.markerEnd,i=e.markerStartOffset,a=e.markerEndOffset,o=e.points.points,s=o.length,c=o[0][0],l=o[0][1],u=o[s-1][0],f=o[s-1][1],d=0,h=0,p=0,v=0,g=0,y,m;n&&Be(n)&&i&&(y=o[1][0]-o[0][0],m=o[1][1]-o[0][1],g=Math.atan2(m,y),d=Math.cos(g)*(i||0),h=Math.sin(g)*(i||0)),r&&Be(r)&&a&&(y=o[s-1][0]-o[0][0],m=o[s-1][1]-o[0][1],g=Math.atan2(m,y),p=Math.cos(g)*(a||0),v=Math.sin(g)*(a||0)),t.moveTo(c+(d||p),l+(h||v));for(var b=1;b<s-1;b++){var x=o[b];t.lineTo(x[0],x[1])}t.lineTo(u,f)}function nz(t,e){var n=e.markerStart,r=e.markerEnd,i=e.markerStartOffset,a=e.markerEndOffset,o=e.points.points,s=o.length,c=o[0][0],l=o[0][1],u=o[s-1][0],f=o[s-1][1],d=0,h=0,p=0,v=0,g=0,y,m;n&&Be(n)&&i&&(y=o[1][0]-o[0][0],m=o[1][1]-o[0][1],g=Math.atan2(m,y),d=Math.cos(g)*(i||0),h=Math.sin(g)*(i||0)),r&&Be(r)&&a&&(y=o[s-2][0]-o[s-1][0],m=o[s-2][1]-o[s-1][1],g=Math.atan2(m,y),p=Math.cos(g)*(a||0),v=Math.sin(g)*(a||0)),t.moveTo(c+d,l+h);for(var b=1;b<s-1;b++){var x=o[b];t.lineTo(x[0],x[1])}t.lineTo(u+p,f+v)}function rz(t,e){var n=e.x,r=n===void 0?0:n,i=e.y,a=i===void 0?0:i,o=e.radius,s=e.width,c=e.height,l=s,u=c,f=o&&o.some(function(x){return x!==0});if(!f)t.rect(r,a,l,u);else{var d=s>0?1:-1,h=c>0?1:-1,p=d+h===0,v=D(o.map(function(x){return Bn(x,0,Math.min(Math.abs(l)/2,Math.abs(u)/2))}),4),g=v[0],y=v[1],m=v[2],b=v[3];t.moveTo(d*g+r,a),t.lineTo(l-d*y+r,a),y!==0&&t.arc(l-d*y+r,h*y+a,y,-h*Math.PI/2,d>0?0:Math.PI,p),t.lineTo(l+r,u-h*m+a),m!==0&&t.arc(l-d*m+r,u-h*m+a,m,d>0?0:Math.PI,h>0?Math.PI/2:1.5*Math.PI,p),t.lineTo(d*b+r,u+a),b!==0&&t.arc(d*b+r,u-h*b+a,b,h>0?Math.PI/2:-Math.PI/2,d>0?Math.PI:0,p),t.lineTo(r,h*g+a),g!==0&&t.arc(d*g+r,h*g+a,g,d>0?Math.PI:0,h>0?Math.PI*1.5:Math.PI/2,p)}}var iz=function(t){It(e,t);function e(){var n=t.apply(this,dt([],D(arguments),!1))||this;return n.name="canvas-path-generator",n}return e.prototype.init=function(){var n,r=(n={},n[st.CIRCLE]=K7,n[st.ELLIPSE]=Q7,n[st.RECT]=rz,n[st.LINE]=J7,n[st.POLYLINE]=nz,n[st.POLYGON]=ez,n[st.PATH]=tz,n[st.TEXT]=void 0,n[st.GROUP]=void 0,n[st.IMAGE]=void 0,n[st.HTML]=void 0,n[st.MESH]=void 0,n);this.context.pathGeneratorFactory=r},e.prototype.destroy=function(){delete this.context.pathGeneratorFactory},e}(lo),az=Se(),oz=Se(),sz=Se(),cz=cn(),lz=function(){function t(){var e=this;this.isHit=function(n,r,i,a){var o=e.context.pointInPathPickerFactory[n.nodeName];if(o){var s=da(cz,i),c=fr(oz,Ki(sz,r[0],r[1],0),s);if(o(n,new Sr(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 es(r,void 0,void 0,function(){return ns(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=Ki(az,s,c,0),u=e.elementsFromBBox(l[0],l[1],l[0],l[1]),f=[];try{for(var d=jr(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=d2(p);if(y){var m=y.parsedStyle.clipPath,b=this.isHit(m,l,m.getWorldTransform(),!0);if(b){if(a)return n.picked=[p],n;f.push(p)}}else{if(a)return n.picked=[p],n;f.push(p)}}}}catch(x){r={error:x}}finally{try{h&&!h.done&&(i=d.return)&&i.call(d)}finally{if(r)throw r.error}}return n.picked=f,n},t.tag="CanvasPicker",t}();function uz(t,e,n){var r=t.parsedStyle,i=r.cx,a=i===void 0?0:i,o=r.cy,s=o===void 0?0:o,c=r.r,l=r.fill,u=r.stroke,f=r.lineWidth,d=f===void 0?1:f,h=r.increasedLineWidthForHitTesting,p=h===void 0?0:h,v=r.pointerEvents,g=v===void 0?"auto":v,y=(d+p)/2,m=Dr(a,s,e.x,e.y),b=D(gs(g,l,u),2),x=b[0],_=b[1];return x&&_||n?m<=c+y:x?m<=c:_?m>=c-y&&m<=c+y:!1}function Bd(t,e,n,r){return t/(n*n)+e/(r*r)}function fz(t,e,n){var r=t.parsedStyle,i=r.cx,a=i===void 0?0:i,o=r.cy,s=o===void 0?0:o,c=r.rx,l=r.ry,u=r.fill,f=r.stroke,d=r.lineWidth,h=d===void 0?1:d,p=r.increasedLineWidthForHitTesting,v=p===void 0?0:p,g=r.pointerEvents,y=g===void 0?"auto":g,m=e.x,b=e.y,x=D(gs(y,u,f),2),_=x[0],O=x[1],w=(h+v)/2,S=(m-a)*(m-a),M=(b-s)*(b-s);return _&&O||n?Bd(S,M,c+w,l+w)<=1:_?Bd(S,M,c,l)<=1:O?Bd(S,M,c-w,l-w)>=1&&Bd(S,M,c+w,l+w)<=1:!1}function xs(t,e,n,r,i,a){return i>=t&&i<=t+n&&a>=e&&a<=e+r}function dz(t,e,n,r,i,a,o){var s=i/2;return xs(t-s,e-s,n,i,a,o)||xs(t+n-s,e-s,i,r,a,o)||xs(t+s,e+r-s,n,i,a,o)||xs(t-s,e+s,i,r,a,o)}function zd(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 Dr(l.x,l.y,o,s)<=a/2}function go(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?__(t,e,n,r,a,o)<=i/2:!1}function K2(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(go(s,c,l,u,e,n,r))return!0}if(i){var f=t[0],d=t[a-1];if(go(f[0],f[1],d[0],d[1],e,n,r))return!0}return!1}var hz=1e-6;function Kv(t){return Math.abs(t)<hz?0:t<0?-1:1}function pz(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 Q2(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(pz(o,s,[e,n]))return!0;Kv(o[1]-n)>0!=Kv(s[1]-n)>0&&Kv(e-(n-o[1])*(o[0]-s[0])/(o[1]-s[1])-o[0])<0&&(r=!r)}return r}function J2(t,e,n){for(var r=!1,i=0;i<t.length;i++){var a=t[i];if(r=Q2(a,e,n),r)break}return r}function vz(t,e,n){var r=t.parsedStyle,i=r.x1,a=r.y1,o=r.x2,s=r.y2,c=r.lineWidth,l=c===void 0?1:c,u=r.increasedLineWidthForHitTesting,f=u===void 0?0:u,d=r.pointerEvents,h=d===void 0?"auto":d,p=r.fill,v=r.stroke,g=D(gs(h,p,v),2),y=g[1];return!y&&!n||!l?!1:go(i,a,o,s,l+f,e.x,e.y)}function gz(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&&!xs(d.x-o,d.y-o,d.width+e,d.height+e,n,r)))switch(c.command){case"L":case"Z":if(a=go(f[0],f[1],l[0],l[1],e,n,r),a)return!0;break;case"Q":var h=Z8(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=S_(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=ev(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=S_(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 yz(t,e,n,r,i,a){var o=t.parsedStyle,s=o.lineWidth,c=s===void 0?1:s,l=o.increasedLineWidthForHitTesting,u=l===void 0?0:l,f=o.stroke,d=o.fill,h=o.d,p=o.pointerEvents,v=p===void 0?"auto":p,g=h.segments,y=h.hasArc,m=h.polylines,b=h.polygons,x=D(gs(v,(b==null?void 0:b.length)&&d,f),2),_=x[0],O=x[1],w=Ov(t),S=!1;return _||n?(y?S=r(t,e):S=J2(b,e.x,e.y)||J2(m,e.x,e.y),S):((O||n)&&(S=gz(g,c+u,e.x,e.y,w)),S)}function mz(t,e,n){var r=t.parsedStyle,i=r.stroke,a=r.fill,o=r.lineWidth,s=o===void 0?1:o,c=r.increasedLineWidthForHitTesting,l=c===void 0?0:c,u=r.points,f=r.pointerEvents,d=f===void 0?"auto":f,h=D(gs(d,a,i),2),p=h[0],v=h[1],g=!1;return(v||n)&&(g=K2(u.points,s+l,e.x,e.y,!0)),!g&&(p||n)&&(g=Q2(u.points,e.x,e.y)),g}function bz(t,e,n){var r=t.parsedStyle,i=r.lineWidth,a=i===void 0?1:i,o=r.increasedLineWidthForHitTesting,s=o===void 0?0:o,c=r.points,l=r.pointerEvents,u=l===void 0?"auto":l,f=r.fill,d=r.stroke,h=D(gs(u,f,d),2),p=h[1];return!p&&!n||!a?!1:K2(c.points,a+s,e.x,e.y,!1)}function xz(t,e,n,r,i){var a=t.parsedStyle,o=a.radius,s=a.fill,c=a.stroke,l=a.lineWidth,u=l===void 0?1:l,f=a.increasedLineWidthForHitTesting,d=f===void 0?0:f,h=a.x,p=h===void 0?0:h,v=a.y,g=v===void 0?0:v,y=a.width,m=a.height,b=a.pointerEvents,x=b===void 0?"auto":b,_=D(gs(x,s,c),2),O=_[0],w=_[1],S=o&&o.some(function(C){return C!==0}),M=u+d;if(S){var P=!1;return(w||n)&&(P=_z(p,g,y,m,o.map(function(C){return Bn(C,0,Math.min(Math.abs(y)/2,Math.abs(m)/2))}),M,e.x,e.y)),!P&&(O||n)&&(P=r(t,e)),P}else{var E=M/2;if(O&&w||n)return xs(p-E,g-E,y+E,m+E,e.x,e.y);if(O)return xs(p,g,y,m,e.x,e.y);if(w)return dz(p,g,y,m,M,e.x,e.y)}return!1}function _z(t,e,n,r,i,a,o,s){var c=D(i,4),l=c[0],u=c[1],f=c[2],d=c[3];return go(t+l,e,t+n-u,e,a,o,s)||go(t+n,e+u,t+n,e+r-f,a,o,s)||go(t+n-f,e+r,t+d,e+r,a,o,s)||go(t,e+r-d,t,e+l,a,o,s)||zd(t+n-u,e+u,u,1.5*Math.PI,2*Math.PI,a,o,s)||zd(t+n-f,e+r-f,f,0,.5*Math.PI,a,o,s)||zd(t+d,e+r-d,d,.5*Math.PI,Math.PI,a,o,s)||zd(t+l,e+l,l,Math.PI,1.5*Math.PI,a,o,s)}function Oz(t,e,n,r,i,a){var o=t.parsedStyle,s=o.pointerEvents,c=s===void 0?"auto":s,l=o.x,u=l===void 0?0:l,f=o.y,d=f===void 0?0:f,h=o.width,p=o.height;if(c==="non-transparent-pixel"){var v=i.config.offscreenCanvas,g=a.offscreenCanvasCreator.getOrCreateCanvas(v),y=a.offscreenCanvasCreator.getOrCreateContext(v,{willReadFrequently:!0});g.width=h,g.height=p,i.defaultStyleRendererFactory[st.IMAGE].render(y,J(J({},t.parsedStyle),{x:0,y:0}),t,void 0,void 0,void 0);var m=y.getImageData(e.x-u,e.y-d,1,1).data;return m.every(function(b){return b!==0})}return!0}var wz=function(t){It(e,t);function e(){var n=t.apply(this,dt([],D(arguments),!1))||this;return n.name="canvas-picker",n}return e.prototype.init=function(){var n,r=function(){return!0},i=(n={},n[st.CIRCLE]=uz,n[st.ELLIPSE]=fz,n[st.RECT]=xz,n[st.LINE]=vz,n[st.POLYLINE]=bz,n[st.POLYGON]=mz,n[st.PATH]=yz,n[st.TEXT]=r,n[st.GROUP]=null,n[st.IMAGE]=Oz,n[st.HTML]=null,n[st.MESH]=null,n);this.context.pointInPathPickerFactory=i,this.addRenderingPlugin(new lz)},e.prototype.destroy=function(){delete this.context.pointInPathPickerFactory,this.removeAllRenderingPlugins()},e}(lo),Sz=function(){function t(e){this.canvasRendererPluginOptions=e,this.removedRBushNodeAABBs=[],this.renderQueue=[],this.restoreStack=[],this.clearFullScreenLastFrame=!1,this.clearFullScreen=!1,this.vpMatrix=cn(),this.dprMatrix=cn(),this.tmpMat4=cn(),this.vec3a=Se(),this.vec3b=Se(),this.vec3c=Se(),this.vec3d=Se()}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(re.UNMOUNTED,d),f.addEventListener(re.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(re.UNMOUNTED,d),f.removeEventListener(re.CULLED,h),r.renderQueue=[],r.removedRBushNodeAABBs=[],r.restoreStack=[]}),o.hooks.beginFrame.tap(t.tag,function(){var v,g=u.getContext(),y=u.getDPR(),m=i.width,b=i.height,x=r.canvasRendererPluginOptions,_=x.dirtyObjectNumThreshold,O=x.dirtyObjectRatioThreshold,w=o.getStats(),S=w.total,M=w.rendered,E=M/S;r.clearFullScreen=r.clearFullScreenLastFrame||!(!((v=f.context.renderingPlugins[1])===null||v===void 0)&&v.isFirstTimeRenderingFinished)||o.disableDirtyRectangleRendering()||M>_&&E>O,g&&(g.resetTransform?g.resetTransform():g.setTransform(1,0,0,1,0,0),r.clearFullScreen&&r.clearRect(g,0,0,m*y,b*y,i.background))});var p=function(v,g){v.isVisible()&&!v.isCulled()&&r.renderDisplayObject(v,g,r.context,r.restoreStack,n);var y=v.sortable.sorted||v.childNodes;y.forEach(function(m){p(m,g)})};o.hooks.endFrame.tap(t.tag,function(){if(s.root.childNodes.length===0){r.clearFullScreenLastFrame=!0;return}r.clearFullScreenLastFrame=!1;var v=u.getContext(),g=u.getDPR();if(ss(r.dprMatrix,[g,g,1]),Rr(r.vpMatrix,r.dprMatrix,a.getOrthoMatrix()),r.clearFullScreen)p(s.root,v);else{var y=r.safeMergeAABB.apply(r,dt([r.mergeDirtyAABBs(r.renderQueue)],D(r.removedRBushNodeAABBs.map(function(W){var U=W.minX,$=W.minY,K=W.maxX,ct=W.maxY,gt=new Un;return gt.setMinMax([U,$,0],[K,ct,0]),gt})),!1));if(r.removedRBushNodeAABBs=[],Un.isEmpty(y)){r.renderQueue=[];return}var m=r.convertAABB2Rect(y),b=m.x,x=m.y,_=m.width,O=m.height,w=fr(r.vec3a,[b,x,0],r.vpMatrix),S=fr(r.vec3b,[b+_,x,0],r.vpMatrix),M=fr(r.vec3c,[b,x+O,0],r.vpMatrix),E=fr(r.vec3d,[b+_,x+O,0],r.vpMatrix),P=Math.min(w[0],S[0],E[0],M[0]),C=Math.min(w[1],S[1],E[1],M[1]),A=Math.max(w[0],S[0],E[0],M[0]),T=Math.max(w[1],S[1],E[1],M[1]),k=Math.floor(P),N=Math.floor(C),F=Math.ceil(A-P),R=Math.ceil(T-C);v.save(),r.clearRect(v,k,N,F,R,i.background),v.beginPath(),v.rect(k,N,F,R),v.clip(),v.setTransform(r.vpMatrix[0],r.vpMatrix[1],r.vpMatrix[4],r.vpMatrix[5],r.vpMatrix[12],r.vpMatrix[13]);var I=i.renderer.getConfig().enableDirtyRectangleRenderingDebug;I&&f.dispatchEvent(new sn(di.DIRTY_RECTANGLE,{dirtyRect:{x:k,y:N,width:F,height:R}}));var z=r.searchDirtyObjects(y);z.sort(function(W,U){return W.sortable.renderOrder-U.sortable.renderOrder}).forEach(function(W){W&&W.isVisible()&&!W.isCulled()&&r.renderDisplayObject(W,v,r.context,r.restoreStack,n)}),v.restore(),r.renderQueue.forEach(function(W){r.saveDirtyAABB(W)}),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)&gr.DOCUMENT_POSITION_CONTAINS)&&(n.restore(),i.pop());var c=this.context.styleRendererFactory[o],l=this.pathGeneratorFactory[o],u=e.parsedStyle.clipPath;if(u){this.applyWorldTransform(n,u);var f=this.pathGeneratorFactory[u.nodeName];f&&(n.save(),i.push(e),n.beginPath(),f(n,u.parsedStyle),n.closePath(),n.clip())}c&&(this.applyWorldTransform(n,e),n.save(),this.applyAttributesToContext(n,e)),l&&(n.beginPath(),l(n,e.parsedStyle),e.nodeName!==st.LINE&&e.nodeName!==st.PATH&&e.nodeName!==st.POLYLINE&&n.closePath()),c&&(c.render(n,e.parsedStyle,e,r,this,a),n.restore()),e.renderable.dirty=!1},t.prototype.convertAABB2Rect=function(e){var n=e.getMin(),r=e.getMax(),i=Math.floor(n[0]),a=Math.floor(n[1]),o=Math.ceil(r[0]),s=Math.ceil(r[1]),c=o-i,l=s-a;return{x:i,y:a,width:c,height:l}},t.prototype.mergeDirtyAABBs=function(e){var n=new Un;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=D(e.getMin(),2),r=n[0],i=n[1],a=D(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 Un);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),se(c)||(e.lineDashOffset=c),se(o)||(e.globalAlpha*=o),!se(i)&&!Array.isArray(i)&&!i.isNone&&(e.strokeStyle=n.attributes.stroke),!se(a)&&!Array.isArray(a)&&!a.isNone&&(e.fillStyle=n.attributes.fill)},t.prototype.applyWorldTransform=function(e,n,r){r?(is(this.tmpMat4,n.getLocalTransform()),Rr(this.tmpMat4,r,this.tmpMat4),Rr(this.tmpMat4,this.vpMatrix,this.tmpMat4)):(is(this.tmpMat4,n.getWorldTransform()),Rr(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 Un;return e.forEach(function(i){r.add(i)}),r},t.tag="CanvasRenderer",t}(),yo=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=l===void 0?1:l,f=n.fillOpacity,d=f===void 0?1:f,h=n.stroke,p=n.strokeOpacity,v=p===void 0?1:p,g=n.lineWidth,y=g===void 0?1:g,m=n.lineCap,b=n.lineJoin,x=n.shadowType,_=n.shadowColor,O=n.shadowBlur,w=n.filter,S=n.miterLimit,M=s&&!s.isNone,E=h&&!h.isNone&&y>0,P=(s==null?void 0:s.alpha)===0,C=!!(w&&w.length),A=!se(_)&&O>0,T=r.nodeName,k=x==="inner",N=E&&A&&(T===st.PATH||T===st.LINE||T===st.POLYLINE||P||k);M&&(e.globalAlpha=u*d,N||Gd(r,e,A),nO(e,r,s,c,i,a,o,this.imagePool),N||this.clearShadowAndFilter(e,C,A)),E&&(e.globalAlpha=u*v,e.lineWidth=y,se(S)||(e.miterLimit=S),se(m)||(e.lineCap=m),se(b)||(e.lineJoin=b),N&&(k&&(e.globalCompositeOperation="source-atop"),Gd(r,e,!0),k&&(Qv(e,r,h,i,a,o,this.imagePool),e.globalCompositeOperation="source-over",this.clearShadowAndFilter(e,C,!0))),Qv(e,r,h,i,a,o,this.imagePool))},t.prototype.clearShadowAndFilter=function(e,n,r){if(r&&(e.shadowColor="transparent",e.shadowBlur=0),n){var i=e.filter;!se(i)&&i.indexOf("drop-shadow")>-1&&(e.filter=i.replace(/drop-shadow\([^)]*\)/,"").trim()||"none")}},t}();function Gd(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)}function tO(t,e,n,r,i,a,o){var s,c;if(t.image.nodeName==="rect"){var l=t.image.parsedStyle,u=l.width,f=l.height;c=r.contextService.getDPR();var d=r.config.offscreenCanvas;s=a.offscreenCanvasCreator.getOrCreateCanvas(d),s.width=u*c,s.height=f*c;var h=a.offscreenCanvasCreator.getOrCreateContext(d),p=[];t.image.forEach(function(g){i.renderDisplayObject(g,h,r,p,a)}),p.forEach(function(){h.restore()})}var v=o.getOrCreatePatternSync(t,n,s,c,e.getGeometryBounds().min,function(){e.renderable.dirty=!0,r.renderingService.dirtify()});return v}function eO(t,e,n,r){var i;if(t.type===ga.LinearGradient||t.type===ga.RadialGradient){var a=e.getGeometryBounds(),o=a&&a.halfExtents[0]*2||1,s=a&&a.halfExtents[1]*2||1,c=a&&a.min||[0,0];i=r.getOrCreateGradient(J(J({type:t.type},t.value),{min:c,width:o,height:s}),n)}return i}function nO(t,e,n,r,i,a,o,s,c){c===void 0&&(c=!1),Array.isArray(n)?n.forEach(function(l){t.fillStyle=eO(l,e,t,s),c||(r?t.fill(r):t.fill())}):($l(n)&&(t.fillStyle=tO(n,e,t,i,a,o,s)),c||(r?t.fill(r):t.fill()))}function Qv(t,e,n,r,i,a,o,s){s===void 0&&(s=!1),Array.isArray(n)?n.forEach(function(c){t.strokeStyle=eO(c,e,t,o),s||t.stroke()}):($l(n)&&(t.strokeStyle=tO(n,e,t,r,i,a,o)),s||t.stroke())}var Mz=function(){function t(e){this.imagePool=e}return t.prototype.render=function(e,n,r){var i=n.x,a=i===void 0?0:i,o=n.y,s=o===void 0?0:o,c=n.width,l=n.height,u=n.src,f=n.shadowColor,d=n.shadowBlur,h,p=c,v=l;if(Cn(u)?h=this.imagePool.getImageSync(u):(p||(p=u.width),v||(v=u.height),h=u),h){var g=!se(f)&&d>0;Gd(r,e,g);try{e.drawImage(h,a,s,p,v)}catch(y){}}},t}(),Ez=function(){function t(e){this.imagePool=e}return t.prototype.render=function(e,n,r,i,a,o){r.getBounds();var s=n,c=s.lineWidth,l=c===void 0?1:c,u=s.textAlign,f=u===void 0?"start":u,d=s.textBaseline,h=d===void 0?"alphabetic":d,p=s.lineJoin,v=p===void 0?"miter":p,g=s.miterLimit,y=g===void 0?10:g,m=s.letterSpacing,b=m===void 0?0:m,x=s.stroke,_=s.fill,O=s.fillRule,w=s.fillOpacity,S=w===void 0?1:w,M=s.strokeOpacity,E=M===void 0?1:M,P=s.opacity,C=P===void 0?1:P,A=s.metrics,T=s.x,k=T===void 0?0:T,N=s.y,F=N===void 0?0:N,R=s.dx,I=s.dy,z=s.shadowColor,W=s.shadowBlur,U=A.font,$=A.lines,K=A.height,ct=A.lineHeight,gt=A.lineMetrics;e.font=U,e.lineWidth=l,e.textAlign=f==="middle"?"center":f;var it=h;!o.enableCSSParsing&&it==="alphabetic"&&(it="bottom"),e.lineJoin=v,se(y)||(e.miterLimit=y);var et=F;h==="middle"?et+=-K/2-ct/2:h==="bottom"||h==="alphabetic"||h==="ideographic"?et+=-K:(h==="top"||h==="hanging")&&(et+=-ct);var _t=k+(R||0);et+=I||0,$.length===1&&(it==="bottom"?(it="middle",et-=.5*K):it==="top"&&(it="middle",et+=.5*K)),e.textBaseline=it;var xt=!se(z)&&W>0;Gd(r,e,xt);for(var Nt=0;Nt<$.length;Nt++){var Gt=l/2+_t;et+=ct,!se(x)&&!x.isNone&&l&&this.drawLetterSpacing(e,r,$[Nt],gt[Nt],f,Gt,et,b,_,O,S,x,E,C,!0,i,a,o),se(_)||this.drawLetterSpacing(e,r,$[Nt],gt[Nt],f,Gt,et,b,_,O,S,x,E,C,!1,i,a,o)}},t.prototype.drawLetterSpacing=function(e,n,r,i,a,o,s,c,l,u,f,d,h,p,v,g,y,m){if(c===0){v?this.strokeText(e,n,r,o,s,d,h,g,y,m):this.fillText(e,n,r,o,s,l,u,f,p,g,y,m);return}var b=e.textAlign;e.textAlign="left";var x=o;a==="center"||a==="middle"?x=o-i.width/2:(a==="right"||a==="end")&&(x=o-i.width);for(var _=Array.from(r),O=e.measureText(r).width,w=0,S=0;S<_.length;++S){var M=_[S];v?this.strokeText(e,n,M,x,s,d,h,g,y,m):this.fillText(e,n,M,x,s,l,u,f,p,g,y,m),w=e.measureText(r.substring(S+1)).width,x+=O-w+c,O=w}e.textAlign=b},t.prototype.fillText=function(e,n,r,i,a,o,s,c,l,u,f,d){nO(e,n,o,s,u,f,d,this.imagePool,!0);var h,p=!se(c)&&c!==1;p&&(h=e.globalAlpha,e.globalAlpha=c*l),e.fillText(r,i,a),p&&(e.globalAlpha=h)},t.prototype.strokeText=function(e,n,r,i,a,o,s,c,l,u){Qv(e,n,o,c,l,u,this.imagePool,!0);var f,d=!se(s)&&s!==1;d&&(f=e.globalAlpha,e.globalAlpha=s),e.strokeText(r,i,a),d&&(e.globalAlpha=f)},t}(),Evt=function(t){It(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(yo),Pvt=function(t){It(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(yo),Avt=function(t){It(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(yo),Tvt=function(t){It(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(yo),kvt=function(t){It(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(yo),Cvt=function(t){It(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(yo),Lvt=function(t){It(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(yo),Pz=function(t){It(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=J({dirtyObjectNumThreshold:500,dirtyObjectRatioThreshold:.8},this.options),i=this.context.imagePool,a=new yo(i),o=(n={},n[st.CIRCLE]=a,n[st.ELLIPSE]=a,n[st.RECT]=a,n[st.IMAGE]=new Mz(i),n[st.TEXT]=new Ez(i),n[st.LINE]=a,n[st.POLYLINE]=a,n[st.POLYGON]=a,n[st.PATH]=a,n[st.GROUP]=void 0,n[st.HTML]=void 0,n[st.MESH]=void 0,n);this.context.defaultStyleRendererFactory=o,this.context.styleRendererFactory=o,this.addRenderingPlugin(new Sz(r))},e.prototype.destroy=function(){this.removeAllRenderingPlugins(),delete this.context.defaultStyleRendererFactory,delete this.context.styleRendererFactory},e}(lo),Az=function(){function t(){}return t.prototype.apply=function(e,n){var r=this,i=e.renderingService,a=e.renderingContext,o=e.config;this.context=e;var s=a.root.ownerDocument.defaultView,c=function(O){i.hooks.pointerMove.call(O)},l=function(O){i.hooks.pointerUp.call(O)},u=function(O){i.hooks.pointerDown.call(O)},f=function(O){i.hooks.pointerOver.call(O)},d=function(O){i.hooks.pointerOut.call(O)},h=function(O){i.hooks.pointerCancel.call(O)},p=function(O){i.hooks.pointerWheel.call(O)},v=function(O){i.hooks.click.call(O)},g=function(O){n.globalThis.document.addEventListener("pointermove",c,!0),O.addEventListener("pointerdown",u,!0),O.addEventListener("pointerleave",d,!0),O.addEventListener("pointerover",f,!0),n.globalThis.addEventListener("pointerup",l,!0),n.globalThis.addEventListener("pointercancel",h,!0)},y=function(O){O.addEventListener("touchstart",u,!0),O.addEventListener("touchend",l,!0),O.addEventListener("touchmove",c,!0),O.addEventListener("touchcancel",h,!0)},m=function(O){n.globalThis.document.addEventListener("mousemove",c,!0),O.addEventListener("mousedown",u,!0),O.addEventListener("mouseout",d,!0),O.addEventListener("mouseover",f,!0),n.globalThis.addEventListener("mouseup",l,!0)},b=function(O){n.globalThis.document.removeEventListener("pointermove",c,!0),O.removeEventListener("pointerdown",u,!0),O.removeEventListener("pointerleave",d,!0),O.removeEventListener("pointerover",f,!0),n.globalThis.removeEventListener("pointerup",l,!0)},x=function(O){O.removeEventListener("touchstart",u,!0),O.removeEventListener("touchend",l,!0),O.removeEventListener("touchmove",c,!0),O.removeEventListener("touchcancel",h,!0)},_=function(O){n.globalThis.document.removeEventListener("mousemove",c,!0),O.removeEventListener("mousedown",u,!0),O.removeEventListener("mouseout",d,!0),O.removeEventListener("mouseover",f,!0),n.globalThis.removeEventListener("mouseup",l,!0)};i.hooks.init.tap(t.tag,function(){var O=r.context.contextService.getDomElement();n.globalThis.navigator.msPointerEnabled?(O.style.msContentZooming="none",O.style.msTouchAction="none"):s.supportsPointerEvents&&(O.style.touchAction="none"),s.supportsPointerEvents?g(O):m(O),s.supportsTouchEvents&&y(O),o.useNativeClickEvent&&O.addEventListener("click",v,!0),O.addEventListener("wheel",p,{passive:!0,capture:!0})}),i.hooks.destroy.tap(t.tag,function(){var O=r.context.contextService.getDomElement();n.globalThis.navigator.msPointerEnabled?(O.style.msContentZooming="",O.style.msTouchAction=""):s.supportsPointerEvents&&(O.style.touchAction=""),s.supportsPointerEvents?b(O):_(O),s.supportsTouchEvents&&x(O),o.useNativeClickEvent&&O.removeEventListener("click",v,!0),O.removeEventListener("wheel",p,!0)})},t.tag="DOMInteraction",t}(),Tz=function(t){It(e,t);function e(){var n=t.apply(this,dt([],D(arguments),!1))||this;return n.name="dom-interaction",n}return e.prototype.init=function(){this.addRenderingPlugin(new Az)},e.prototype.destroy=function(){this.removeAllRenderingPlugins()},e}(lo),kz="g-canvas-camera",Cz=function(){function t(){this.displayObjectHTMLElementMap=new WeakMap}return t.prototype.joinTransformMatrix=function(e){return"matrix(".concat([e[0],e[1],e[4],e[5],e[12],e[13]].join(","),")")},t.prototype.apply=function(e,n){var r=this,i=e.camera,a=e.renderingContext,o=e.renderingService;this.context=e;var s=a.root.ownerDocument.defaultView,c=s.context.eventService.nativeHTMLMap,l=function(v,g){g.style.transform=r.joinTransformMatrix(v.getWorldTransform())},u=function(v){var g=v.target;if(g.nodeName===st.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===st.HTML&&r.$camera){var y=r.getOrCreateEl(g);y&&(y.remove(),c.delete(y))}},d=function(v){var g=v.target;if(g.nodeName===st.HTML){var y=v.attrName;r.updateAttribute(y,g)}},h=function(v){var g=v.target;if(g.nodeName===st.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(di.RESIZE,p),s.addEventListener(re.MOUNTED,u),s.addEventListener(re.UNMOUNTED,f),s.addEventListener(re.ATTR_MODIFIED,d),s.addEventListener(re.BOUNDS_CHANGED,h)}),o.hooks.endFrame.tap(t.tag,function(){r.$camera&&a.renderReasons.has(po.CAMERA_CHANGED)&&(r.$camera.style.transform=r.joinTransformMatrix(i.getOrthoMatrix()))}),o.hooks.destroy.tap(t.tag,function(){r.$camera&&r.$camera.remove(),s.removeEventListener(di.RESIZE,p),s.removeEventListener(re.MOUNTED,u),s.removeEventListener(re.UNMOUNTED,f),s.removeEventListener(re.ATTR_MODIFIED,d),s.removeEventListener(re.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=kz,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["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;Cn(i)?r.innerHTML=i:(r.innerHTML="",r.appendChild(i));break;case"x":r.style.left="".concat(n.parsedStyle.x,"px");break;case"y":r.style.top="".concat(n.parsedStyle.y,"px");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=vn(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=vn(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,f=u===void 0?"auto":u;r.style.pointerEvents=f;break;case"opacity":var d=n.parsedStyle.opacity;r.style.opacity="".concat(d);break;case"fill":var h=n.parsedStyle.fill,p="";pd(h)?h.isNone?p="transparent":p=n.getAttribute("fill"):Array.isArray(h)?p=n.getAttribute("fill"):$l(h),r.style.background=p;break;case"stroke":var v=n.parsedStyle.stroke,g="";pd(v)?v.isNone?g="transparent":g=n.getAttribute("stroke"):Array.isArray(v)?g=n.getAttribute("stroke"):$l(v),r.style["border-color"]=g,r.style["border-style"]="solid";break;case"lineWidth":var y=n.parsedStyle.lineWidth;r.style["border-width"]="".concat(y||0,"px");break;case"lineDash":r.style["border-style"]="dashed";break;case"filter":var m=n.style.filter;r.style.filter=m;break;default:!se(n.style[e])&&n.style[e]!==""&&(r.style[e]=n.style[e])}},t.tag="HTMLRendering",t}(),Lz=function(t){It(e,t);function e(){var n=t.apply(this,dt([],D(arguments),!1))||this;return n.name="html-renderer",n}return e.prototype.init=function(){this.addRenderingPlugin(new Cz)},e.prototype.destroy=function(){this.removeAllRenderingPlugins()},e}(lo),Nz=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):Xl&&(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,o){var s=this.generatePatternKey(e);if(s&&this.patternCache[s])return this.patternCache[s];var c=e.image,l=e.repetition,u=e.transform,f,d=!1;Cn(c)?f=this.getImageSync(c,o):r?(f=r,d=!0):f=c;var h=f&&n.createPattern(f,l);if(h){var p=void 0;u?p=b2(Mv(u),new Fr({})):p=as(cn()),d&&Uf(p,p,[1/i,1/i,1]),h.setTransform({a:p[0],b:p[1],c:p[4],d:p[5],e:p[12]+a[0],f:p[13]+a[1]})}return s&&h&&(this.patternCache[s]=h),h},t.prototype.getOrCreateGradient=function(e,n){var r=this.generateGradientKey(e),i=e.type,a=e.steps,o=e.min,s=e.width,c=e.height,l=e.angle,u=e.cx,f=e.cy,d=e.size;if(this.gradientCache[r])return this.gradientCache[r];var h=null;if(i===ga.LinearGradient){var p=T9(o,s,c,l),v=p.x1,g=p.y1,y=p.x2,m=p.y2;h=n.createLinearGradient(v,g,y,m)}else if(i===ga.RadialGradient){var b=k9(o,s,c,u,f,d),x=b.x,_=b.y,O=b.r;h=n.createRadialGradient(x,_,0,x,_,O)}return h&&(a.forEach(function(w){var S=w.offset,M=w.color;S.unit===Mt.kPercentage&&(h==null||h.addColorStop(S.value/100,M.toString()))}),this.gradientCache[r]=h),this.gradientCache[r]},t.prototype.generateGradientKey=function(e){var n=e.type,r=e.min,i=e.width,a=e.height,o=e.steps,s=e.angle,c=e.cx,l=e.cy,u=e.size;return"gradient-".concat(n,"-").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((u==null?void 0:u.toString())||0,"-").concat(r[0],"-").concat(r[1],"-").concat(i,"-").concat(a,"-").concat(o.map(function(f){var d=f.offset,h=f.color;return"".concat(d).concat(h)}).join("-"))},t.prototype.generatePatternKey=function(e){var n=e.image,r=e.repetition;if(Cn(n))return"pattern-".concat(n,"-").concat(r);if(n.nodeName==="rect")return"pattern-".concat(n.entity,"-").concat(r)},t}(),jz=function(){function t(){}return t.prototype.apply=function(e){var n=e.renderingService,r=e.renderingContext,i=e.imagePool,a=r.root.ownerDocument.defaultView,o=function(l,u,f){var d=l.parsedStyle,h=d.width,p=d.height;h&&!p?l.setAttribute("height",f/u*h):!h&&p&&l.setAttribute("width",u/f*p)},s=function(l){var u=l.target,f=u.nodeName,d=u.attributes;if(f===st.IMAGE){var h=d.src,p=d.keepAspectRatio;Cn(h)&&i.getImageSync(h,function(v){var g=v.width,y=v.height;p&&o(u,g,y),u.renderable.dirty=!0,n.dirtify()})}},c=function(l){var u=l.target,f=l.attrName,d=l.newValue;u.nodeName===st.IMAGE&&f==="src"&&Cn(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(re.MOUNTED,s),a.addEventListener(re.ATTR_MODIFIED,c)}),n.hooks.destroy.tap(t.tag,function(){a.removeEventListener(re.MOUNTED,s),a.removeEventListener(re.ATTR_MODIFIED,c)})},t.tag="LoadImage",t}(),Rz=function(t){It(e,t);function e(){var n=t.apply(this,dt([],D(arguments),!1))||this;return n.name="image-loader",n}return e.prototype.init=function(){this.context.imagePool=new Nz(this.context.config),this.addRenderingPlugin(new jz)},e.prototype.destroy=function(){this.removeAllRenderingPlugins()},e}(lo),Iz=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=Cn(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||Xl&&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,FF(this.$canvas,e,n)),this.renderingContext.renderReasons.add(po.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={}),es(this,void 0,void 0,function(){var n,r;return ns(this,function(i){return n=e.type,r=e.encoderOptions,[2,this.context.canvas.toDataURL(n,r)]})})},t}(),Dz=function(t){It(e,t);function e(){var n=t.apply(this,dt([],D(arguments),!1))||this;return n.name="canvas-context-register",n}return e.prototype.init=function(){this.context.ContextService=Iz},e.prototype.destroy=function(){delete this.context.ContextService},e}(lo),rO=function(t){It(e,t);function e(n){var r=t.call(this,n)||this;return r.registerPlugin(new Dz),r.registerPlugin(new Rz),r.registerPlugin(new iz),r.registerPlugin(new Pz),r.registerPlugin(new Tz),r.registerPlugin(new wz),r.registerPlugin(new Lz),r}return e}(J8),Fz=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 es(n,void 0,void 0,function(){var x,_,O,w,S,M;return ns(this,function(E){switch(E.label){case 0:if(!d){if(x=b.timeStamp-h,_=oi([b.clientX,b.clientY],p),x<=this.dragndropPluginOptions.dragstartTimeThreshold||_<=this.dragndropPluginOptions.dragstartDistanceThreshold)return[2];b.type="dragstart",f.dispatchEvent(b),d=!0}return b.type="drag",b.dx=b.clientX-g[0],b.dy=b.clientY-g[1],f.dispatchEvent(b),g=[b.clientX,b.clientY],u?[3,2]:(O=this.dragndropPluginOptions.overlap==="pointer"?[b.canvasX,b.canvasY]:l.getBounds().center,[4,a.elementsFromPoint(O[0],O[1])]);case 1:w=E.sent(),S=w[w.indexOf(l)+1],M=(S==null?void 0:S.closest("[droppable=true]"))||(this.dragndropPluginOptions.isDocumentDroppable?a:null),v!==M&&(v&&(b.type="dragleave",b.target=v,v.dispatchEvent(b)),M&&(b.type="dragenter",b.target=M,M.dispatchEvent(b)),v=M,v&&(b.type="dragover",b.target=v,v.dispatchEvent(b))),E.label=2;case 2:return[2]}})})};o.addEventListener("pointermove",y);var m=function(b){if(d){b.detail={preventClick:!0};var x=b.clone();v&&(x.type="drop",x.target=v,v.dispatchEvent(x)),x.type="dragend",f.dispatchEvent(x),d=!1}o.removeEventListener("pointermove",y)};l.addEventListener("pointerup",m,{once:!0}),l.addEventListener("pointerupoutside",m,{once:!0})}};r.hooks.init.tap(t.tag,function(){o.addEventListener("pointerdown",s)}),r.hooks.destroy.tap(t.tag,function(){o.removeEventListener("pointerdown",s)})},t.tag="Dragndrop",t}(),iO=function(t){It(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 Fz(J({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}(lo);function Bz(t,e,n){var r;return function(){var i=this,a=arguments,o=function(){r=null,n||t.apply(i,a)},s=n&&!r;clearTimeout(r),r=setTimeout(o,e),s&&t.apply(i,a)}}var aO=Bz,zz=function(t){return typeof t=="object"&&t!==null},Jv=zz,Gz=function(t){if(!Jv(t)||!Dl(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},Ba=Gz,Wz=5;function Yz(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 oO(t,e,n,r){n=n||0,r=r||Wz;for(var i in e)if(Yz(e,i)){var a=e[i];a!==null&&Ba(a)?(Ba(t[i])||(t[i]={}),n<r?oO(t[i],a,n+1,r):t[i]=e[i]):sr(a)?(t[i]=[],t[i]=t[i].concat(a)):a!==void 0&&(t[i]=a)}}var Hz=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)oO(t,e[r]);return t},at=Hz;class $z extends Map{constructor(e,n=lO){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(tg(this,e))}has(e){return super.has(tg(this,e))}set(e,n){return super.set(sO(this,e),n)}delete(e){return super.delete(cO(this,e))}}class Nvt extends null{constructor(e,n=lO){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(tg(this,e))}add(e){return super.add(sO(this,e))}delete(e){return super.delete(cO(this,e))}}function tg({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function sO({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function cO({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function lO(t){return t!==null&&typeof t=="object"?t.valueOf():t}function eu(t){return t}function Ln(t,...e){return Ec(t,eu,eu,e)}function Wd(t,...e){return Ec(t,Array.from,eu,e)}function uO(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 jvt(t,...e){return uO(Wd(t,...e),e)}function Rvt(t,e,...n){return uO(ng(t,e,...n),n)}function eg(t,e,...n){return Ec(t,eu,e,n)}function ng(t,e,...n){return Ec(t,Array.from,e,n)}function Ivt(t,...e){return Ec(t,identity,fO,e)}function Dvt(t,...e){return Ec(t,Array.from,fO,e)}function fO(t){if(t.length!==1)throw new Error("duplicate key");return t[0]}function Ec(t,e,n,r){return function i(a,o){if(o>=r.length)return n(a);const s=new $z,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 dO=function(t){return se(t)?"":t.toString()},Uz=function(t){var e=dO(t);return e.charAt(0).toLowerCase()+e.substring(1)},hO=Uz,Vz=function(t,e,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{l(r.next(u))}catch(f){o(f)}}function c(u){try{l(r.throw(u))}catch(f){o(f)}}function l(u){u.done?a(u.value):i(u.value).then(s,c)}l((r=r.apply(t,e||[])).next())})};function _s(t){return t}function rg(t){return t.reduce((e,n)=>(r,...i)=>n(e(r,...i),...i),_s)}function Xz(t){return t.reduce((e,n)=>r=>Vz(this,void 0,void 0,function*(){const i=yield e(r);return n(i)}),_s)}function ig(t){return t.replace(/( |^)[a-z]/g,e=>e.toUpperCase())}function Pc(t=""){throw new Error(t)}function ag(t,e){const{attributes:n}=e,r=new Set(["id","className"]);for(const[i,a]of Object.entries(n))r.has(i)||t.attr(i,a)}function fn(t){return t!=null&&!Number.isNaN(t)}function Fvt(t,e){return t+(e-t)*Math.random()}function qz(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 Zz(t,e){const{transform:n}=t.style,i=(a=>a==="none"||a===void 0)(n)?"":n;t.style.transform=`${i} ${e}`.trimStart()}function Pt(t,e){return pO(t,e)||{}}function pO(t,e){const n=Object.entries(t||{}).filter(([r])=>r.startsWith(e)).map(([r,i])=>[hO(r.replace(e,"").trim()),i]).filter(([r])=>!!r);return n.length===0?null:Object.fromEntries(n)}function Bvt(t,e){return Object.fromEntries(Object.entries(t).map(([n,r])=>[`${e}${upperFirst(n)}`,r]))}function Kz(t,e){return Object.fromEntries(Object.entries(t).filter(([n])=>e.find(r=>n.startsWith(r))))}function og(t,...e){return Object.fromEntries(Object.entries(t).filter(([n])=>e.every(r=>!n.startsWith(r))))}function vO(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 Ac(t){return typeof t=="object"&&!(t instanceof Date)&&t!==null&&!Array.isArray(t)}function za(t){return t===null||t===!1}function gO(t,e,n=5,r=0){if(!(r>=n)){for(const i of Object.keys(e)){const a=e[i];!Ba(a)||!Ba(t[i])?t[i]=a:gO(t[i],a,n,r+1)}return t}}function Kt(t){return new nr([t],null,t,t.ownerDocument)}class nr{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 nr(n,null,this._elements[0],this._document)}selectFacetAll(e){const n=typeof e=="string"?this._parent.querySelectorAll(e):e;return new nr(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 nr([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 nr(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 nr(r,null,r[0],this._document)}}maybeAppend(e,n,r){const i=this._elements[0],a=i.getElementById(e);if(a)return new nr([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 nr([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=Ln(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 nr([],i,this._parent,this._document),new nr(a,null,this._parent,this._document),new nr(o,null,this._parent,this._document),new nr([],s,this._parent,this._document),new nr(c,null,this._parent,this._document)];return new nr(this._elements,null,this._parent,this._document,d)}merge(e){const n=[...this._elements,...e._elements],r=[...this._transitions,...e._transitions];return new nr(n,null,this._parent,this._document,void 0,r)}createElement(e){if(this._document)return this._document.createElement(e,{});const n=nr.registry[e];return n?new n:Pc(`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 nr([],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}}nr.registry={g:dr,rect:bs,circle:ms,path:Zr,text:fi,ellipse:Fv,image:Bv,line:Kl,polygon:Ql,polyline:zv,html:Od};const Ze={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 Qz=function(t){var e=dO(t);return e.charAt(0).toUpperCase()+e.substring(1)},mo=Qz;function Jz(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function Yd(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 tG(t){return t=Yd(Math.abs(t)),t?t[1]:NaN}function eG(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 nG(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var rG=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function sg(t){if(!(e=rG.exec(t)))throw new Error("invalid format: "+t);var e;return new cg({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]})}sg.prototype=cg.prototype;function cg(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+""}cg.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 iG(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 yO;function aG(t,e){var n=Yd(t,e);if(!n)return t+"";var r=n[0],i=n[1],a=i-(yO=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")+Yd(t,Math.max(0,e+a-1))[0]}function mO(t,e){var n=Yd(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 bO={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:Jz,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)=>mO(t*100,e),r:mO,s:aG,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function xO(t){return t}var _O=Array.prototype.map,OO=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function oG(t){var e=t.grouping===void 0||t.thousands===void 0?xO:eG(_O.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?xO:nG(_O.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=sg(f);var d=f.fill,h=f.align,p=f.sign,v=f.symbol,g=f.zero,y=f.width,m=f.comma,b=f.precision,x=f.trim,_=f.type;_==="n"?(m=!0,_="g"):bO[_]||(b===void 0&&(b=12),x=!0,_="g"),(g||d==="0"&&h==="=")&&(g=!0,d="0",h="=");var O=v==="$"?n:v==="#"&&/[boxX]/.test(_)?"0"+_.toLowerCase():"",w=v==="$"?r:/[%p]/.test(_)?o:"",S=bO[_],M=/[defgprs%]/.test(_);b=b===void 0?6:/[gprs]/.test(_)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b));function E(P){var C=O,A=w,T,k,N;if(_==="c")A=S(P)+A,P="";else{P=+P;var F=P<0||1/P<0;if(P=isNaN(P)?c:S(Math.abs(P),b),x&&(P=iG(P)),F&&+P==0&&p!=="+"&&(F=!1),C=(F?p==="("?p:s:p==="-"||p==="("?"":p)+C,A=(_==="s"?OO[8+yO/3]:"")+A+(F&&p==="("?")":""),M){for(T=-1,k=P.length;++T<k;)if(N=P.charCodeAt(T),48>N||N>57){A=(N===46?i+P.slice(T+1):P.slice(T))+A,P=P.slice(0,T);break}}}m&&!g&&(P=e(P,1/0));var R=C.length+P.length+A.length,I=R<y?new Array(y-R+1).join(d):"";switch(m&&g&&(P=e(I+P,I.length?y-A.length:1/0),I=""),h){case"<":P=C+P+A+I;break;case"=":P=C+I+P+A;break;case"^":P=I.slice(0,R=I.length>>1)+C+P+A+I.slice(R);break;default:P=I+C+P+A;break}return a(P)}return E.toString=function(){return f+""},E}function u(f,d){var h=l((f=sg(f),f.type="f",f)),p=Math.max(-8,Math.min(8,Math.floor(tG(d)/3)))*3,v=Math.pow(10,-p),g=OO[8+p/3];return function(y){return h(v*y)+g}}return{format:l,formatPrefix:u}}var Hd,bo,sG;cG({thousands:",",grouping:[3],currency:["$",""]});function cG(t){return Hd=oG(t),bo=Hd.format,sG=Hd.formatPrefix,Hd}function xo(t,e){return Object.entries(t).reduce((n,[r,i])=>(n[r]=e(i,r,t),n),{})}function Os(t){return t.map((e,n)=>n)}function zvt(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 lG(t){return t[0]}function wO(t){return t[t.length-1]}function Gvt(t){return!t.some(Array.isArray)}function uG(t){return Array.from(new Set(t))}function SO(t,e){const n=[[],[]];return t.forEach(r=>{n[e(r)?0:1].push(r)}),n}function MO(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);MO(i,e-1).forEach(o=>{n.push([t[r],...o])})}return n}function fG(t){if(t.length===1)return[t];const e=[];for(let n=1;n<=t.length;n++)e.push(...MO(t,n));return e}var dG=function(t){return t!==null&&typeof t!="function"&&isFinite(t.length)},Tc=dG,lg=function(t,e){if(t===e)return!0;if(!t||!e||Cn(t)||Cn(e))return!1;if(Tc(t)||Tc(e)){if(t.length!==e.length)return!1;for(var n=!0,r=0;r<t.length&&(n=lg(t[r],e[r]),!!n);r++);return n}if(Jv(t)||Jv(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=lg(t[i[r]],e[i[r]]),!!n);r++);return n}return!1},EO=lg;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 Ke(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 Wvt(t){return t*Math.PI/180}function Yvt(t){return t*180/Math.PI}function hG(t,e){return t=t%(2*Math.PI),e=e%(2*Math.PI),t<0&&(t=2*Math.PI+t),e<0&&(e=2*Math.PI+e),t>=e&&(e=e+2*Math.PI),{startAngle:t,endAngle:e}}const PO=(t={})=>{const e={startAngle:-Math.PI/2,endAngle:Math.PI*3/2,innerRadius:0,outerRadius:1},n=Object.assign(Object.assign({},e),t);return Object.assign(Object.assign({},n),hG(n.startAngle,n.endAngle))},nu=t=>{const{startAngle:e,endAngle:n,innerRadius:r,outerRadius:i}=PO(t);return[["translate",0,.5],["reflect.y"],["translate",0,-.5],["polar",e,n,r,i]]};nu.props={};const AO=(t={})=>{const e={startAngle:-Math.PI/2,endAngle:Math.PI*3/2,innerRadius:0,outerRadius:1};return Object.assign(Object.assign({},e),t)},ug=t=>{const{startAngle:e,endAngle:n,innerRadius:r,outerRadius:i}=AO(t);return[["transpose"],["translate",.5,.5],["reflect"],["translate",-.5,-.5],...nu({startAngle:e,endAngle:n,innerRadius:r,outerRadius:i})]};ug.props={};function $d(t,e,n){return Math.max(e,Math.min(t,n))}function Ud(t,e=10){return typeof t!="number"||Math.abs(t)<1e-15?t:parseFloat(t.toFixed(e))}const pG=[["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 TO=tt(17816);function Mn(t){const{transformations:e}=t.getOptions();return e.map(([r])=>r).filter(r=>r==="transpose").length%2!==0}function dn(t){const{transformations:e}=t.getOptions();return e.some(([n])=>n==="polar")}function ru(t){const{transformations:e}=t.getOptions();return e.some(([n])=>n==="reflect")&&e.some(([n])=>n.startsWith("transpose"))}function kO(t){const{transformations:e}=t.getOptions();return e.some(([n])=>n==="helix")}function iu(t){const{transformations:e}=t.getOptions();return e.some(([n])=>n==="parallel")}function CO(t){const{transformations:e}=t.getOptions();return e.some(([n])=>n==="fisheye")}function vG(t){return iu(t)&&dn(t)}function kc(t){return kO(t)||dn(t)}function LO(t){return dn(t)&&Mn(t)}function Hvt(t){return dn(t)||iu(t)||ru(t)||LO(t)}function gG(t){if(kc(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 Vd(t){const{transformations:e}=t.getOptions(),[,,,n,r]=e.find(i=>i[0]==="polar");return[+n,+r]}function fg(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 yG(t,e){const{transformations:n}=t.getOptions(),[,...r]=n.find(i=>i[0]===e);return r}function NO(t,e){e(t),t.children&&t.children.forEach(function(n){n&&NO(n,e)})}function au(t){Xd(t,!0)}function _o(t){Xd(t,!1)}function Xd(t,e){var n=e?"visible":"hidden";NO(t,function(r){r.attr("visibility",n)})}function mG(t){return typeof t=="boolean"?!1:"enter"in t&&"update"in t&&"exit"in t}function jO(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=D(r,1),a=i[0];return!e.includes(a)}));return Object.fromEntries(e.map(function(r){return mG(t)?t[r]===!1?[r,!1]:[r,J(J({},t[r]),n)]:[r,n]}))}function Cc(t,e){t?t.finished.then(e):e()}function bG(t,e){t.length===0?e():Promise.all(t.map(function(n){return n==null?void 0:n.finished})).then(e)}function RO(t,e){"update"in t?t.update(e):t.attr(e)}function IO(t,e,n){if(e.length===0)return null;if(!n){var r=e.slice(-1)[0];return RO(t,{style:r}),null}return t.animate(e,n)}function xG(t,e){return!(t.nodeName!=="text"||e.nodeName!=="text"||t.attributes.text!==e.attributes.text)}function _G(t,e,n,r){if(r===void 0&&(r="destroy"),xG(t,e))return t.remove(),[null];var i=function(){r==="destroy"?t.destroy():r==="hide"&&_o(t),e.isVisible()&&au(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=D(t.getGeometryBounds().center,2),d=f[0],h=f[1],p=D(e.getGeometryBounds().center,2),v=p[0],g=p[1],y=D([(d+v)/2-d,(h+g)/2-h],2),m=y[0],b=y[1],x=t.style.opacity,_=x===void 0?1:x,O=e.style.opacity,w=O===void 0?1:O,S=t.style.transform||"",M=e.style.transform||"",E=t.animate([{opacity:_,transform:"translate(0, 0) ".concat(S)},{opacity:0,transform:"translate(".concat(m,", ").concat(b,") ").concat(S)}],J(J({fill:"both"},n),{duration:c+l+u})),P=e.animate([{opacity:0,transform:"translate(".concat(-m,", ").concat(-b,") ").concat(M),offset:.01},{opacity:w,transform:"translate(0, 0) ".concat(M)}],J(J({fill:"both"},n),{duration:l+u,delay:c+l-u}));return Cc(P,i),[E,P]}function ea(t,e,n){var r={},i={};return Object.entries(e).forEach(function(a){var o=D(a,2),s=o[0],c=o[1];if(!se(c)){var l=t.style[s]||t.parsedStyle[s]||0;l!==c&&(r[s]=l,i[s]=c)}}),n?IO(t,[r,i],J({fill:"both"},n)):(RO(t,i),null)}var OG=5,DO=function(t,e,n,r){n===void 0&&(n=0),r===void 0&&(r=OG),Object.entries(e).forEach(function(i){var a=D(i,2),o=a[0],s=a[1],c=t;Object.prototype.hasOwnProperty.call(e,o)&&(s?Ba(s)?(Ba(t[o])||(c[o]={}),n<r?DO(t[o],s,n+1,r):c[o]=e[o]):sr(s)?(c[o]=[],c[o]=c[o].concat(s)):c[o]=s:c[o]=s)})},Ga=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)DO(t,e[r]);return t},wG=function(t){It(e,t);function e(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=t.apply(this,dt([],D(n),!1))||this;return i.isMutationObserved=!0,i.addEventListener(re.INSERTED,function(){_o(i)}),i}return e}(dr);function FO(t){var e=t.appendChild(new wG({class:"offscreen"}));return _o(e),e}function SG(t){for(var e=t;e;){if(e.className==="offscreen")return!0;e=e.parent}return!1}function MG(){Xd(this,this.attributes.visibility!=="hidden")}var yr=function(t){It(e,t);function e(n,r){r===void 0&&(r={});var i=t.call(this,Ga({},{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=FO(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"&&MG.call(this)},e.prototype.update=function(n,r){var i;return this.attr(Ga({},this.attributes,n||{})),(i=this.render)===null||i===void 0?void 0:i.call(this,this.attributes,this,r)},e.prototype.clear=function(){this.removeChildren()},e.prototype.bindEvents=function(n,r){},e.prototype.getSubShapeStyle=function(n){var r=n.x,i=n.y,a=n.transform,o=n.transformOrigin,s=n.class,c=n.className,l=n.zIndex,u=wn(n,["x","y","transform","transformOrigin","class","className","zIndex"]);return u},e}(_d);function hi(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 EG(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 dg=function(t){It(e,t);function e(n){n===void 0&&(n={});var r=n.style,i=wn(n,["style"]);return t.call(this,J({style:J({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=FO(this)),this._offscreen},enumerable:!1,configurable:!0}),e.prototype.disconnectedCallback=function(){var n;(n=this._offscreen)===null||n===void 0||n.destroy()},e}(fi);function PG(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 AG(t){throw new Error(t)}var TG=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=D(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=Hf(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=Hf(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=Hf(this,e,"m",r).call(this,'[name="'.concat(i,'"]'),a);return o.attr("name",i),o},t.prototype.data=function(i,a,o){var s,c;a===void 0&&(a=function(E){return E}),o===void 0&&(o=function(){return null});for(var l=[],u=[],f=new Set(this._elements),d=[],h=new Set,p=new Map(this._elements.map(function(E,P){return[a(E.__data__,P),E]})),v=new Map(this._facetElements.map(function(E,P){return[a(E.__data__,P),E]})),g=PG(this._elements,function(E){return o(E.__data__)}),y=0;y<i.length;y++){var m=i[y],b=a(m,y),x=o(m,y);if(p.has(b)){var _=p.get(b);_.__data__=m,_.__facet__=!1,u.push(_),f.delete(_),p.delete(b)}else if(v.has(b)){var _=v.get(b);_.__data__=m,_.__facet__=!0,u.push(_),v.delete(b)}else if(g.has(b)){var O=g.get(b);d.push([m,O]);try{for(var w=(s=void 0,jr(O)),S=w.next();!S.done;S=w.next()){var _=S.value;f.delete(_)}}catch(E){s={error:E}}finally{try{S&&!S.done&&(c=w.return)&&c.call(w)}finally{if(s)throw s.error}}g.delete(b)}else if(p.has(x)){var _=p.get(x);_.__toData__?_.__toData__.push(m):_.__toData__=[m],h.add(_),f.delete(_)}else l.push(m)}var M=[new n([],l,this._parent,this._document),new n(u,null,this._parent,this._document),new n(f,null,this._parent,this._document),new n([],d,this._parent,this._document),new n(h,null,this._parent,this._document)];return new n(this._elements,null,this._parent,this._document,M)},t.prototype.merge=function(i){var a=dt(dt([],D(this._elements),!1),D(i._elements),!1),o=dt(dt([],D(this._transitions),!1),D(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:AG("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=D(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,dt([this._parent,this],D(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:dr,rect:bs,circle:ms,path:Zr,text:dg,ellipse:Fv,image:Bv,line:Kl,polygon:Ql,polyline:zv,html:Od},t}();function de(t){return new TG([t],null,t,t.ownerDocument)}function kG(t,e,n){return t.querySelector(e)?de(t).select(e):de(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=D(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},hg={data:[],animate:{enter:!1,update:{duration:100,easing:"ease-in-out-sine",fill:"both"},exit:{duration:100,fill:"both"}},showArrow:!0,showGrid:!0,showLabel:!0,showLine:!0,showTick:!0,showTitle:!0,showTrunc:!1,dataThreshold:100,lineLineWidth:1,lineStroke:"black",crossPadding:10,titleFill:"black",titleFontSize:12,titlePosition:"lb",titleSpacing:0,titleTextAlign:"center",titleTextBaseline:"middle",lineArrow:function(){return new Zr({style:{d:[["M",10,10],["L",-10,0],["L",10,-10],["L",0,0],["L",10,10],["Z"]],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:[]},$vt=at({},hg,{style:{type:"arc"}}),Uvt=at({},hg,{style:{}}),nn=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"),Kr=function(t){return typeof t=="function"};function Wa(t,e){return[t[0]*e,t[1]*e]}function ou(t,e){return[t[0]+e[0],t[1]+e[1]]}function pg(t,e){return[t[0]-e[0],t[1]-e[1]]}function ws(t,e){return[Math.min(t[0],e[0]),Math.min(t[1],e[1])]}function Ss(t,e){return[Math.max(t[0],e[0]),Math.max(t[1],e[1])]}function su(t,e){return Math.sqrt(Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2))}function BO(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 Vvt(t,e,n){var r=__read(t,2),i=r[0],a=r[1],o=__read(e,2),s=o[0],c=o[1],l=i-s,u=a-c,f=Math.sin(n),d=Math.cos(n);return[l*d-u*f+s,l*f+u*d+c]}function CG(t,e){return e?[t[1],-t[0]]:[-t[1],t[0]]}function Lc(t){return t*Math.PI/180}function zO(t){return Number((t*180/Math.PI).toPrecision(5))}function vg(t){return t.toString().charAt(0).toUpperCase()+t.toString().slice(1)}function LG(t){return t.toString().charAt(0).toLowerCase()+t.toString().slice(1)}function NG(t,e){return"".concat(e).concat(vg(t))}function GO(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?LG(a):a}function jG(t,e){Object.entries(e).forEach(function(n){var r=D(n,2),i=r[0],a=r[1];dt([t],D(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 qd=function(t,e){if(!(t!=null&&t.startsWith(e)))return!1;var n=t[e.length];return n>="A"&&n<="Z"};function Oe(t,e,n){n===void 0&&(n=!1);var r={};return Object.entries(t).forEach(function(i){var a=D(i,2),o=a[0],s=a[1];if(!(o==="className"||o==="class")){if(qd(o,"show")&&qd(GO(o,"show"),e)!==n)o===NG(e,"show")?r[o]=s:r[o.replace(new RegExp(vg(e)),"")]=s;else if(!qd(o,"show")&&qd(o,e)!==n){var c=GO(o,e);c==="filter"&&typeof s=="function"||(r[c]=s)}}}),r}function ma(t,e){return Object.entries(t).reduce(function(n,r){var i=D(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(vg(a))]=o,n},{})}function Ya(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=D(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 Kr(t)?t.apply(void 0,dt([],D(e),!1)):t}function Zd(t,e){return t.style.opacity||(t.style.opacity=1),ea(t,{opacity:0},e)}var RG=["$el","cx","cy","d","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 IG(t){return RG.includes(t)}function WO(t){var e={};for(var n in t)IG(n)&&(e[n]=t[n]);return e}var Nc=Fi({lineGroup:"line-group",line:"line",regionGroup:"region-group",region:"region"},"grid");function YO(t){return t.reduce(function(e,n,r){return e.push(dt([r===0?"M":"L"],D(n),!1)),e},[])}function DG(t,e,n){var r=e.connect,i=r===void 0?"line":r,a=e.center;if(i==="line")return YO(t);if(!a)return[];var o=su(t[0],a),s=n?0:1;return t.reduce(function(c,l,u){return u===0?c.push(dt(["M"],D(l),!1)):c.push(dt(["A",o,o,0,0,s],D(l),!1)),c},[])}function gg(t,e,n){return e.type==="surround"?DG(t,e,n):YO(t)}function FG(t,e,n){var r=n.type,i=n.connect,a=n.center,o=n.closed,s=o?[["Z"]]:[],c=D([gg(t,n),gg(e.slice().reverse(),n,!0)],2),l=c[0],u=c[1],f=D([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([dt(["L"],D(h),!1)],[dt(["L"],D(d),!1)]);if(!a)throw new Error("Arc grid need to specified center");var v=D([su(h,a),su(d,a)],2),g=v[0],y=v[1];return p([dt(["A",g,g,0,0,1],D(h),!1),dt(["L"],D(h),!1)],[dt(["A",y,y,0,0,0],D(d),!1),dt(["L"],D(d),!1)])}function BG(t,e,n,r){var i=n.animate,a=n.isBillboard,o=e.map(function(s,c){return{id:s.id||"grid-line-".concat(c),d:gg(s.points,n)}});return t.selectAll(Nc.line.class).data(o,function(s){return s.id}).join(function(s){return s.append("path").each(function(c,l){var u=Bi(WO(J({d:c.d},r)),[c,l,o]);this.attr(J({class:Nc.line.name,stroke:"#D9D9D9",lineWidth:1,lineDash:[4,4],isBillboard:a},u))})},function(s){return s.transition(function(c,l){var u=Bi(WO(J({d:c.d},r)),[c,l,o]);return ea(this,u,i.update)})},function(s){return s.transition(function(){var c=this,l=Zd(this,i.exit);return Cc(l,function(){return c.remove()}),l})}).transitions()}function zG(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=D([e[l].points,e[l+1].points],2),f=u[0],d=u[1],h=FG(f,d,n);c.push({d:h,fill:s(l)})}return t.selectAll(Nc.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",Nc.region.name)},function(p){return p.transition(function(v,g){var y=Bi(v,[v,g,c]);return ea(this,y,r.update)})},function(p){return p.transition(function(){var v=this,g=Zd(this,r.exit);return Cc(g,function(){return v.remove()}),g})}).transitions()}function GG(t){var e=t.data,n=e===void 0?[]:e,r=t.closed;return r?n.map(function(i){var a=i.points,o=D(a,1),s=o[0];return J(J({},i),{points:dt(dt([],D(a),!1),[s],!1)})}):n}var WG=function(t){It(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=wn(n,["type","center","areaFill","closed"]),l=GG(n),u=de(r).maybeAppendByClassName(Nc.lineGroup,"g"),f=de(r).maybeAppendByClassName(Nc.regionGroup,"g"),d=BG(u,l,n,c),h=zG(f,l,n);return dt(dt([],D(d),!1),D(h),!1)},e}(yr),Re=function(t,e,n){for(var r=0,i=Cn(e)?e.split("."):e;t&&r<i.length;)t=t[i[r++]];return t===void 0||r<i.length?n:t},YG=function(t,e){return function(n){return t*(1-n)+e*n}};function HG(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]=yg(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 $G(t,e){t===void 0&&(t={}),e===void 0&&(e={});var n={},r={};return Object.entries(e).forEach(function(i){var a=D(i,2),o=a[0],s=a[1];o in t?n[o]=yg(t[o],s):r[o]=s}),function(i){return Object.entries(n).forEach(function(a){var o=D(a,2),s=o[0],c=o[1];return r[s]=c(i)}),r}}function yg(t,e){return typeof t=="number"&&typeof e=="number"?YG(t,e):Array.isArray(t)&&Array.isArray(e)?HG(t,e):typeof t=="object"&&typeof e=="object"?$G(t,e):function(n){return t}}function UG(t,e,n,r){if(!r)return t.attr("__keyframe_data__",n),null;var i=r.duration,a=i===void 0?0:i,o=yg(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,J({fill:"both"},r))}function Ms(t){return typeof t=="function"?t():Cn(t)||vn(t)?new dg({style:{text:String(t)}}):t}function mg(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.style.transform="scale(".concat(o,")")),o}function HO(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 $O(t,e){return Object.fromEntries(Object.entries(t).map(function(n){var r=D(n,2),i=r[0],a=r[1];return[i,Bi(a,e)]}))}function Xvt(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 bg(t,e){return e&&Kr(e)?t.filter(e):t}function UO(t,e){var n=e.startAngle,r=e.endAngle;return(r-n)*t+n}function Kd(t,e){if(e.type==="linear"){var n=D(e.startPos,2),r=n[0],i=n[1],a=D(e.endPos,2),o=a[0],s=a[1],c=D([o-r,s-i],2),l=c[0],u=c[1];return BO([l,u])}var f=Lc(UO(t,e));return[-Math.sin(f),Math.cos(f)]}function xg(t,e,n){var r=Kd(t,n);return CG(r,e!=="positive")}function cu(t,e){return xg(t,e.labelDirection,e)}function VG(t,e){var n=D(e.startPos,2),r=n[0],i=n[1],a=D(e.endPos,2),o=a[0],s=a[1],c=D([o-r,s-i],2),l=c[0],u=c[1];return[r+l*t,i+u*t]}function XG(t,e){var n=e.radius,r=D(e.center,2),i=r[0],a=r[1],o=Lc(UO(t,e));return[i+n*Math.cos(o),a+n*Math.sin(o)]}function Qd(t,e){return e.type==="linear"?VG(t,e):XG(t,e)}function VO(t){return Kd(0,t)[1]===0}function XO(t){return Kd(0,t)[0]===0}function qO(t,e){return e-t===360}function ZO(t,e,n,r,i){var a=e-t,o=D([i,i],2),s=o[0],c=o[1],l=D([Lc(t),Lc(e)],2),u=l[0],f=l[1],d=function(E){return[n+i*Math.cos(E),r+i*Math.sin(E)]},h=D(d(u),2),p=h[0],v=h[1],g=D(d(f),2),y=g[0],m=g[1];if(qO(t,e)){var b=(f+u)/2,x=D(d(b),2),_=x[0],O=x[1];return[["M",p,v],["A",s,c,0,1,0,_,O],["A",s,c,0,1,0,y,m]]}var w=a>180?1:0,S=t>e?0:1,M=!1;return M?"M".concat(n,",").concat(r,",L").concat(p,",").concat(v,",A").concat(s,",").concat(c,",0,").concat(w,",").concat(S,",").concat(y,",").concat(m,",L").concat(n,",").concat(r):"M".concat(p,",").concat(v,",A").concat(s,",").concat(c,",0,").concat(w,",").concat(S,",").concat(y,",").concat(m)}function qG(t){var e=t.attributes,n=e.startAngle,r=e.endAngle,i=e.center,a=e.radius;return dt(dt([n,r],D(i),!1),[a],!1)}function ZG(t,e,n,r){var i=e.startAngle,a=e.endAngle,o=e.center,s=e.radius;return t.selectAll(nn.line.class).data([{d:ZO.apply(void 0,dt(dt([i,a],D(o),!1),[s],!1))}],function(c,l){return l}).join(function(c){return c.append("path").attr("className",nn.line.name).styles(e).styles({d:function(l){return l.d}})},function(c){return c.transition(function(){var l=this,u=UG(this,qG(this),dt(dt([i,a],D(o),!1),[s],!1),r.update);if(u){var f=function(){var d=Re(l.attributes,"__keyframe_data__");l.style.d=ZO.apply(void 0,dt([],D(d),!1))};u.onframe=f,u.onfinish=f}return u}).styles(e)},function(c){return c.remove()}).styles(n).transitions()}function KG(t,e){var n=e.truncRange,r=e.truncShape,i=e.lineExtension}function QG(t,e,n){n===void 0&&(n=[0,0]);var r=D([t,e,n],3),i=D(r[0],2),a=i[0],o=i[1],s=D(r[1],2),c=s[0],l=s[1],u=D(r[2],2),f=u[0],d=u[1],h=D([c-a,l-o],2),p=h[0],v=h[1],g=Math.sqrt(Math.pow(p,2)+Math.pow(v,2)),y=D([-f/g,d/g],2),m=y[0],b=y[1];return[m*p,m*v,b*p,b*v]}function KO(t){var e=D(t,2),n=D(e[0],2),r=n[0],i=n[1],a=D(e[1],2),o=a[0],s=a[1];return{x1:r,y1:i,x2:o,y2:s}}function JG(t,e,n,r){var i=e.showTrunc,a=e.startPos,o=e.endPos,s=e.truncRange,c=e.lineExtension,l=D([a,o],2),u=D(l[0],2),f=u[0],d=u[1],h=D(l[1],2),p=h[0],v=h[1],g=D(c?QG(a,o,c):new Array(4).fill(0),4),y=g[0],m=g[1],b=g[2],x=g[3],_=function(R){return t.selectAll(nn.line.class).data(R,function(I,z){return z}).join(function(I){return I.append("line").attr("className",function(z){return"".concat(nn.line.name," ").concat(z.className)}).styles(n).transition(function(z){return ea(this,KO(z.line),!1)})},function(I){return I.styles(n).transition(function(z){var W=z.line;return ea(this,KO(W),r.update)})},function(I){return I.remove()}).transitions()};if(!i||!s)return _([{line:[[f+y,d+m],[p+b,v+x]],className:nn.line.name}]);var O=D(s,2),w=O[0],S=O[1],M=p-f,E=v-d,P=D([f+M*w,d+E*w],2),C=P[0],A=P[1],T=D([f+M*S,d+E*S],2),k=T[0],N=T[1],F=_([{line:[[f+y,d+m],[C,A]],className:nn.lineFirst.name},{line:[[k,N],[p+b,v+x]],className:nn.lineSecond.name}]);return KG(t,e),F}function tW(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(nn.line.class):a?l=t.select(nn.lineSecond.class):l=t.select(nn.line.class),!i||!o||n.type==="arc"&&qO(n.startAngle,n.endAngle)){var u=l.node();u&&(u.style.markerEnd=void 0);return}var f=Ms(o);f.attr(r),mg(f,c,!0),l.style("markerEnd",f).style("markerEndOffset",-s)}function eW(t,e,n){var r=e.type,i,a=Oe(e,"line");return r==="linear"?i=JG(t,e,HO(a,"arrow"),n):i=ZG(t,e,HO(a,"arrow"),n),tW(t,r,e,a),i}function nW(t,e){return xg(t,e.gridDirection,e)}function QO(t){var e=t.type,n=t.gridCenter;return e==="linear"?n:n||t.center}function rW(t,e){var n=e.gridLength;return t.map(function(r,i){var a=r.value,o=D(Qd(a,e),2),s=o[0],c=o[1],l=D(Wa(nW(a,e),n),2),u=l[0],f=l[1];return{id:i,points:[[s,c],[s+u,c+f]]}})}function iW(t,e){var n=e.gridControlAngles,r=QO(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=D(r,2),a=i[0],o=i[1];return t.map(function(s,c){var l=s.value,u=D(Qd(l,e),2),f=u[0],d=u[1],h=D([f-a,d-o],2),p=h[0],v=h[1],g=[];return n.forEach(function(y){var m=Lc(y),b=D([Math.cos(m),Math.sin(m)],2),x=b[0],_=b[1],O=p*x-v*_+a,w=p*_+v*x+o;g.push([O,w])}),{points:g,id:c}})}function aW(t,e,n,r){var i=Oe(n,"grid"),a=i.type,o=i.areaFill,s=QO(n),c=bg(e,n.gridFilter),l=a==="segment"?rW(c,n):iW(c,n),u=J(J({},i),{center:s,areaFill:Kr(o)?c.map(function(f,d){return Bi(o,[f,d,c])}):o,animate:r,data:l});return t.selectAll(nn.grid.class).data([1]).join(function(f){return f.append(function(){return new WG({style:u})}).attr("className",nn.grid.name)},function(f){return f.transition(function(){return this.update(u)})},function(f){return f.remove()}).transitions()}function Er(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 oW(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 sW=function(t,e,n){if(n===void 0&&(n=128),!Kr(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=oW(n),r},Jd,_g;function qvt(t){_g=t}var cW=sW(function(t,e){var n=e.fontSize,r=e.fontFamily,i=e.fontWeight,a=e.fontStyle,o=e.fontVariant;return _g?_g(t,n):(Jd||(Jd=nt.offscreenCanvasCreator.getOrCreateContext(void 0)),Jd.font=[a,o,i,"".concat(n,"px"),r].join(" "),Jd.measureText(t).width)},function(t,e){return[t,Object.values(e||JO(t)).join()].join("")},4096),JO=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 tw(t){return t.nodeName==="text"?t:t.nodeName==="g"&&t.children.length===1&&t.children[0].nodeName==="text"?t.children[0]:null}function ew(t,e){var n=tw(t);n&&n.attr(e)}function Og(t,e,n){n===void 0&&(n="..."),ew(t,{wordWrap:!0,wordWrapWidth:e,maxLines:1,textOverflow:n})}function lW(t,e,n,r){n===void 0&&(n=2),r===void 0&&(r="top"),ew(t,{wordWrap:!0,wordWrapWidth:e,maxLines:n,textBaseline:r})}function uW(t,e,n){var r=t.getBBox(),i=r.width,a=r.height,o=D([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 nw(t,e){if(e)try{var n=/translate\(([+-]*[\d]+[%]*),[ ]*([+-]*[\d]+[%]*)\)/g,r=e.replace(n,function(i,a,o){return"translate(".concat(uW(t,a,o),")")});t.attr("transform",r)}catch(i){}}var rw=function(t){return t!==void 0&&t!=null&&!Number.isNaN(t)};function Pr(t){if(vn(t))return[t,t,t,t];if(sr(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 wg=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 th(t,e){var n=t.getEulerAngles()||0;t.setEulerAngles(0);var r=t.getBounds(),i=D(r.min,2),a=i[0],o=i[1],s=D(r.max,2),c=s[0],l=s[1],u=t.getBBox(),f=u.width,d=u.height,h=d,p=0,v=0,g=a,y=o,m=tw(t);if(m){h-=1.5;var b=m.style.textAlign,x=m.style.textBaseline;b==="center"?g=(a+c)/2:(b==="right"||b==="end")&&(g=c),x==="middle"?y=(o+l)/2:x==="bottom"&&(y=l)}var _=D(Pr(e),4),O=_[0],w=O===void 0?0:O,S=_[1],M=S===void 0?0:S,E=_[2],P=E===void 0?w:E,C=_[3],A=C===void 0?M:C,T=new wg((p+=a)-A,(v+=o)-w,p+f+M,v+h+P);return t.setEulerAngles(n),T.rotatedPoints(Lc(n),g,y)}function lu(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 uu(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 fW(t,e){var n=uu(t[0],t[1],e[0]),r=uu(t[0],t[1],e[1]),i=uu(e[0],e[1],t[0]),a=uu(e[0],e[1],t[1]);return!!(n!==r&&i!==a||n===0&&lu(t,e[0])||r===0&&lu(t,e[1])||i===0&&lu(e,t[0])||a===0&&lu(e,t[1]))}function dW(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(fW(o,r)){if(uu(o[0],e,o[1])===0)return lu(o,e);i++}a=(a+1)%n}while(a!==0);return!!(i&1)}function hW(t,e){return e.every(function(n){return dW(t,n)})}function pW(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=th(e,n);return hW(s,c)}function iw(t,e){var n=D(t,4),r=n[0],i=n[1],a=n[2],o=n[3],s=D(e,4),c=s[0],l=s[1],u=s[2],f=s[3],d=a-r,h=o-i,p=u-c,v=f-l,g=d*v-p*h;if(g===0)return!1;var y=g>0,m=r-c,b=i-l,x=d*b-h*m;if(x<0===y)return!1;var _=p*b-v*m;return!(_<0===y||x>g===y||_>g===y)}function aw(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 iw(e,r)})}var Zvt={lineToLine:iw,intersectBoxLine:aw,getBounds:th};function vW(t,e,n){var r,i,a=th(t,n).flat(1),o=th(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=jr(s),l=c.next();!l.done;l=c.next()){var u=l.value;if(aw(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 gW(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=D(a,2),c=s[0],l=s[1],u=r==="negative"?0:i,f=-o-u,d=o+u,h=D(Pr(e),4),p=h[0],v=h[1],g=h[2],y=h[3];return new wg(c+f-y,l+f-p,c+d+v,l+d+g)}var m=D(t.startPos,2),b=m[0],x=m[1],_=D(t.endPos,2),O=_[0],w=_[1],S=D(XO(t)?[-e,0,e,0]:[0,e,0,-e],4),M=S[0],E=S[1],P=S[2],C=S[3],A=cu(0,t),T=Wa(A,i),k=new wg(b,x,O,w);return k.x1+=C,k.y1+=M,k.x2+=E+T[0],k.y2+=P+T[1],k}function eh(t,e,n){var r,i,a=e.crossPadding,o=new Set,s=null,c=gW(e,a),l=function(p){return c?pW(c,p):!0},u=function(p,v){return!p||!p.firstChild?!0:!vW(p.firstChild,v.firstChild,Pr(n))};try{for(var f=jr(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 Sg(t,e){return e===void 0&&(e={}),se(t)?0:typeof t=="number"?t:Math.floor(cW(t,e))}function yW(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=JO(r.getTextShape(t[0])),p=Sg(u,h),v=o?Sg(o,h):p,g=Sg(c,h);(se(g)||g===1/0)&&(g=Math.max.apply(null,t.map(function(T){return T.getBBox().width})));for(var y=t.slice(),m=D(d,4),b=m[0],x=b===void 0?0:b,_=m[1],O=_===void 0?0:_,w=m[2],S=w===void 0?x:w,M=m[3],E=M===void 0?O:M,P=function(T){if(y.forEach(function(k){r.ellipsis(r.getTextShape(k),T,a)}),y=eh(t,n,d),y.length<1)return{value:void 0}},C=g;C>v+p;C-=p){var A=P(C);if(typeof A=="object")return A.value}}}function Kvt(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 ow(t){var e=t.getLocalBounds(),n=e.min,r=e.max,i=D([n,r],2),a=D(i[0],2),o=a[0],s=a[1],c=D(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 Qvt(t,e){var n=select(t).append("text").node();return n.attr(__assign(__assign({},e),{visibility:"hidden"})),n}function mW(t,e){var n=D(t,2),r=n[0],i=n[1],a=D(e,2),o=a[0],s=a[1];return r!==o&&i===s}function Jvt(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 bW(t,e){var n,r,i=e.attributes;try{for(var a=jr(Object.entries(i)),o=a.next();!o.done;o=a.next()){var s=D(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 xW={parity:function(t,e){var n=e.seq,r=n===void 0?2:n;return t.filter(function(i,a){return a%r?(_o(i),!1):!0})}},_W=function(t){return t.filter(rw)};function OW(t,e,n,r){var i=t.length,a=e.keepHeader,o=e.keepTail;if(!(i<=1||i===2&&a&&o)){var s=xW.parity,c=function(b){return b.forEach(r.show),b},l=2,u=t.slice(),f=t.slice(),d=Math.min.apply(Math,dt([1],D(t.map(function(b){return b.getBBox().width})),!1));if(n.type==="linear"&&(VO(n)||XO(n))){var h=ow(t[0]).left,p=ow(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&&eh(_W(y?dt(dt([y],D(f),!1),[g],!1):dt([g],D(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 wW(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 eh(t,n,c).length<1},h=function(y){return t.forEach(function(m,b){var x=Array.isArray(y)?y[b]:y;r.rotate(m,+x)})};try{for(var p=jr(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 SW(t){var e=t.type,n=t.labelDirection;return e==="linear"&&VO(t)?n==="negative"?"bottom":"top":"middle"}function MW(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,dt([],D(d),!1)),p=function(){return eh(t,n,f).length<1},v=SW(n),g=function(m){return t.forEach(function(b,x){var _=Array.isArray(m)?m[x]:m;r.wrap(b,a,_,v)})};if(!(h>s)){for(var y=h;y<=s;y++)if(g(y),p())return;l&&g(d)}}var EW=new Map([["hide",OW],["rotate",wW],["ellipsis",yW],["wrap",MW]]);function PW(t,e,n){return e.labelOverlap.length<1?!1:n==="hide"?!SG(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 AW(t,e,n){var r=e.labelOverlap,i=r===void 0?[]:r;i.length&&i.forEach(function(a){var o=a.type,s=EW.get(o);PW(t,e,o)&&(s==null||s(t,a,e,n))})}function TW(){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 sw(t){for(var e=t;e<0;)e+=360;return Math.round(e%360)}function Mg(t,e){var n=D(t,2),r=n[0],i=n[1],a=D(e,2),o=a[0],s=a[1],c=D([r*o+i*s,r*s-i*o],2),l=c[0],u=c[1];return Math.atan2(u,l)}function kW(t){var e=(t+360)%180;return Er(e,-90,90)||(e+=180),e}function CW(t,e,n){var r,i=n.labelAlign,a=(r=e.style.transform)===null||r===void 0?void 0:r.includes("rotate");if(a)return e.getLocalEulerAngles();var o=0,s=cu(t.value,n),c=Kd(t.value,n);return i==="horizontal"?0:(i==="perpendicular"?o=Mg([1,0],s):o=Mg([c[0]<0?-1:1,0],c),kW(zO(o)))}function cw(t,e,n){var r=n.type,i=n.labelAlign,a=cu(t,n),o=sw(e),s=sw(zO(Mg([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?(Er(o,0,90,!1,!0)||Er(o,0,90)||Er(o,270,360))&&(c="start"):s===90?Er(o,0,90,!1,!0)?c="start":(Er(o,90,180)||Er(o,270,360))&&(c="end"):s===270?Er(o,0,90,!1,!0)?c="end":(Er(o,90,180)||Er(o,270,360))&&(c="start"):s===180&&(o===90?c="start":(Er(o,0,90)||Er(o,270,360))&&(c="end")):i==="parallel"?Er(s,0,180,!0)?l="top":l="bottom":i==="horizontal"?Er(s,90,270,!1)?c="end":(Er(s,270,360,!1)||Er(s,0,90))&&(c="start"):i==="perpendicular"&&(Er(s,90,270)?c="end":c="start"),{textAlign:c,textBaseline:l}}function LW(t,e,n){e.setLocalEulerAngles(t);var r=e.__data__.value,i=cw(r,t,n),a=e.querySelector(nn.labelItem.class);a&&uw(a,i)}function lw(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=D([cu(t.value,n),TW(o,a)],2),f=u[0],d=u[1],h=d===1?Bi(r?i:0,[t,c,e]):0,p=D(ou(Wa(f,l+h),Qd(t.value,n)),2),v=p[0],g=p[1];return{x:v,y:g}}function NW(t,e,n,r){var i=r.labelFormatter,a=Kr(i)?function(){return Ms(Bi(i,[t,e,n,cu(t.value,r)]))}:function(){return Ms(t.label||"")};return a}function uw(t,e){t.nodeName==="text"&&t.attr(e)}function fw(t){AW(this.node().childNodes,t,{hide:_o,show:au,rotate:function(e,n){LW(+n,e,t)},ellipsis:function(e,n,r){e&&Og(e,n||1/0,r)},wrap:function(e,n,r){e&&lW(e,n,r)},getTextShape:function(e){return e.querySelector("text")}})}function dw(t,e,n,r,i){var a=n.indexOf(e),o=de(t).append(NW(e,a,n,i)).attr("className",nn.labelItem.name).node(),s=D(Ya($O(r,[e,a,n])),2),c=s[0],l=s[1],u=l.transform,f=wn(l,["transform"]);nw(o,u);var d=CW(e,o,i);return o.getLocalEulerAngles()||o.setLocalEulerAngles(d),uw(o,J(J({},cw(e.value,d,i)),c)),t.attr(f),o}function jW(t,e,n,r){var i=bg(e,n.labelFilter),a=Oe(n,"label");return t.selectAll(nn.label.class).data(i,function(o,s){return s}).join(function(o){return o.append("g").attr("className",nn.label.name).transition(function(s){dw(this,s,e,a,n);var c=lw(s,e,n),l=c.x,u=c.y;return this.style.transform="translate(".concat(l,", ").concat(u,")"),null}).call(function(){fw.call(t,n)})},function(o){return o.transition(function(s){var c=this.querySelector(nn.labelItem.class),l=dw(this,s,e,a,n),u=_G(c,l,r.update),f=lw(s,e,n),d=f.x,h=f.y,p=ea(this,{transform:"translate(".concat(d,", ").concat(h,")")},r.update);return dt(dt([],D(u),!1),[p],!1)}).call(function(s){var c=Re(s,"_transitions").flat().filter(rw);bG(c,function(){fw.call(t,n)})})},function(o){return o.transition(function(){var s=this,c=Zd(this.childNodes[0],r.exit);return Cc(c,function(){return de(s).remove()}),c})}).transitions()}function hw(t,e){return xg(t,e.tickDirection,e)}function RW(t,e){var n=D(t,2),r=n[0],i=n[1];return[[0,0],[r*e,i*e]]}function IW(t,e,n,r,i){var a=i.tickLength,o=D(RW(r,Bi(a,[t,e,n])),2),s=D(o[0],2),c=s[0],l=s[1],u=D(o[1],2),f=u[0],d=u[1];return{x1:c,x2:f,y1:l,y2:d}}function DW(t,e,n,r,i){var a=i.tickFormatter,o=hw(e.value,i),s="line";return Kr(a)&&(s=function(){return Bi(a,[e,n,r,o])}),t.append(s).attr("className",nn.tickItem.name)}function FW(t,e,n,r,i,a,o){var s=hw(t.value,a),c=IW(t,e,n,s,a),l=c.x1,u=c.x2,f=c.y1,d=c.y2,h=D(Ya($O(o,[t,e,n,s])),2),p=h[0],v=h[1];r.node().nodeName==="line"&&r.styles(J({x1:l,x2:u,y1:f,y2:d},p)),i.attr(v),r.styles(p)}function pw(t,e,n,r,i,a){var o=DW(de(this),t,e,n,r);FW(t,e,n,o,this,r,i);var s=D(Qd(t.value,r),2),c=s[0],l=s[1];return ea(this,{transform:"translate(".concat(c,", ").concat(l,")")},a)}function BW(t,e,n,r){var i=bg(e,n.tickFilter),a=Oe(n,"tick");return t.selectAll(nn.tick.class).data(i,function(o){return o.id||o.label}).join(function(o){return o.append("g").attr("className",nn.tick.name).transition(function(s,c){return pw.call(this,s,c,i,n,a,!1)})},function(o){return o.transition(function(s,c){return this.removeChildren(),pw.call(this,s,c,i,n,a,r.update)})},function(o){return o.transition(function(){var s=this,c=Zd(this.childNodes[0],r.exit);return Cc(c,function(){return s.remove()}),c})}).transitions()}var En=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 tgt(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 En(r,i,c,l)}var vw=Fi({text:"text"},"title");function nh(t){return/\S+-\S+/g.test(t)?t.split("-").map(function(e){return e[0]}):t.length>2?[t[0]]:t.split("")}function zW(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=nh(r),u=D(Pr(o?i:0),4),f=u[0],d=u[1],h=u[2],p=u[3],v=D(Pr(a),4),g=v[0],y=v[1],m=v[2],b=v[3],x=D([p+d,f+h],2),_=x[0],O=x[1],w=D([b+y,g+m],2),S=w[0],M=w[1];if(l[0]==="l")return new En(s.x,s.y,c.width+s.width+_+S,Math.max(c.height+M,s.height));if(l[0]==="t")return new En(s.x,s.y,Math.max(c.width+S,s.width),c.height+s.height+O+M);var E=D([e.attributes.width||c.width,e.attributes.height||c.height],2),P=E[0],C=E[1];return new En(c.x,c.y,P+s.width+_+S,C+s.height+O+M)}function GW(t,e){var n=Object.entries(e).reduce(function(r,i){var a=D(i,2),o=a[0],s=a[1],c=t.node().attr(o);return c||(r[o]=s),r},{});t.styles(n)}function WW(t){var e,n,r,i,a=t,o=a.width,s=a.height,c=a.position,l=D([+o/2,+s/2],2),u=l[0],f=l[1],d=D([+u,+f,"center","middle"],4),h=d[0],p=d[1],v=d[2],g=d[3],y=nh(c);return y.includes("l")&&(e=D([0,"start"],2),h=e[0],v=e[1]),y.includes("r")&&(n=D([+o,"end"],2),h=n[0],v=n[1]),y.includes("t")&&(r=D([0,"top"],2),p=r[0],g=r[1]),y.includes("b")&&(i=D([+s,"bottom"],2),p=i[0],g=i[1]),{x:h,y:p,textAlign:v,textBaseline:g}}var gw=function(t){It(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(vw.text.class);if(!l)return new En(0,0,+i,+a);var u=l.getBBox(),f=u.width,d=u.height,h=D(Pr(s),4),p=h[0],v=h[1],g=h[2],y=h[3],m=D([0,0,+i,+a],4),b=m[0],x=m[1],_=m[2],O=m[3],w=nh(o);if(w.includes("i"))return new En(b,x,_,O);w.forEach(function(N,F){var R,I,z,W;N==="t"&&(R=D(F===0?[d+g,+a-d-g]:[0,+a],2),x=R[0],O=R[1]),N==="r"&&(I=D([+i-f-y],1),_=I[0]),N==="b"&&(z=D([+a-d-p],1),O=z[0]),N==="l"&&(W=D(F===0?[f+v,+i-f-v]:[0,+i],2),b=W[0],_=W[1])});var S=D(Pr(c),4),M=S[0],E=S[1],P=S[2],C=S[3],A=D([C+E,M+P],2),T=A[0],k=A[1];return new En(b+C,x+M,_-T,O-k)},e.prototype.getBBox=function(){return this.title?this.title.getBBox():new En(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=wn(n,["width","height","position","spacing"]),u=D(Ya(l),1),f=u[0],d=WW(n),h=d.x,p=d.y,v=d.textAlign,g=d.textBaseline;hi(!!l.text,de(r),function(y){i.title=y.maybeAppendByClassName(vw.text,"text").styles(f).call(GW,{x:h,y:p,textAlign:v,textBaseline:g}).node()})},e}(yr);function YW(t,e,n){var r=n.titlePosition,i=r===void 0?"lb":r,a=n.titleSpacing,o=nh(i),s=t.node().getLocalBounds(),c=D(s.min,2),l=c[0],u=c[1],f=D(s.halfExtents,2),d=f[0],h=f[1],p=D(e.node().getLocalBounds().halfExtents,2),v=p[0],g=p[1],y=D([l+d,u+h],2),m=y[0],b=y[1],x=D(Pr(a),4),_=x[0],O=x[1],w=x[2],S=x[3];if(["start","end"].includes(i)&&n.type==="linear"){var M=n.startPos,E=n.endPos,P=D(i==="start"?[M,E]:[E,M],2),C=P[0],A=P[1],T=BO([-A[0]+C[0],-A[1]+C[1]]),k=D(Wa(T,_),2),N=k[0],F=k[1];return{x:C[0]+N,y:C[1]+F}}return o.includes("t")&&(b-=h+g+_),o.includes("r")&&(m+=d+v+O),o.includes("l")&&(m-=d+v+S),o.includes("b")&&(b+=h+g+w),{x:m,y:b}}function HW(t,e,n){var r=t.getGeometryBounds().halfExtents,i=r[1]*2;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 yw(t,e,n,r,i){var a=Oe(r,"title"),o=D(Ya(a),2),s=o[0],c=o[1],l=c.transform,u=c.transformOrigin,f=wn(c,["transform","transformOrigin"]);e.styles(f);var d=l||HW(t.node(),s.direction,s.position);t.styles(J(J({},s),{transformOrigin:u})),nw(t.node(),d);var h=YW(de(n._offscreen||n.querySelector(nn.mainGroup.class)),e,r),p=h.x,v=h.y,g=ea(e.node(),{transform:"translate(".concat(p,", ").concat(v,")")},i);return g}function $W(t,e,n,r){var i=n.titleText;return t.selectAll(nn.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 Ms(i)}).attr("className",nn.title.name).transition(function(){return yw(de(this),t,e,n,r.enter)})},function(a){return a.transition(function(){return yw(de(this),t,e,n,r.update)})},function(a){return a.remove()}).transitions()}function mw(t,e,n,r){var i=t.showLine,a=t.showTick,o=t.showLabel,s=e.maybeAppendByClassName(nn.lineGroup,"g"),c=hi(i,s,function(h){return eW(h,t,r)})||[],l=e.maybeAppendByClassName(nn.tickGroup,"g"),u=hi(a,l,function(h){return BW(h,n,t,r)})||[],f=e.maybeAppendByClassName(nn.labelGroup,"g"),d=hi(o,f,function(h){return jW(h,n,t,r)})||[];return dt(dt(dt([],D(c),!1),D(u),!1),D(d),!1).filter(function(h){return!!h})}var Eg=function(t){It(e,t);function e(n){return t.call(this,n,hg)||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=EG(s,f).filter(function(_){var O=_.value;return!(d&&O>d[0]&&O<d[1])}),p=jO(i===void 0?c:i),v=de(r).maybeAppendByClassName(nn.gridGroup,"g"),g=hi(u,v,function(_){return aW(_,h,n,p)})||[],y=de(r).maybeAppendByClassName(nn.mainGroup,"g");o&&(!this.initialized&&p.enter||this.initialized&&p.update)&&mw(n,de(this.offscreenGroup),h,jO(!1));var m=mw(n,de(y.node()),h,p),b=de(r).maybeAppendByClassName(nn.titleGroup,"g"),x=hi(l,b,function(_){return $W(_,a,n,p)})||[];return dt(dt(dt([],D(g),!1),D(m),!1),D(x),!1).flat().filter(function(_){return!!_})},e}(yr),Es=function(t){return t};class fu{constructor(e){this.options=at({},this.getDefaultOptions()),this.update(e)}getOptions(){return this.options}update(e={}){this.options=at({},this.options,e),this.rescale(e)}rescale(e){}}function rh(t,e){return e-t?n=>(n-t)/(e-t):n=>.5}function jc(t,...e){return e.reduce((n,r)=>i=>n(r(i)),t)}function Pg(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 UW=tt(19818),VW=tt.n(UW);function Ag(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 XW(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=Ag(o,a,e+1/3),c=Ag(o,a,e),l=Ag(o,a,e-1/3);return[s*255,c*255,l*255,i]}function bw(t){const e=VW().get(t);if(!e)return null;const{model:n,value:r}=e;return n==="rgb"?r:n==="hsl"?XW(r):null}const Rc=(t,e)=>n=>t*(1-n)+e*n,qW=(t,e)=>{const n=bw(t),r=bw(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})`}},du=(t,e)=>typeof t=="number"&&typeof e=="number"?Rc(t,e):typeof t=="string"&&typeof e=="string"?qW(t,e):()=>t,ZW=(t,e)=>{const n=Rc(t,e);return r=>Math.round(n(r))};var KW=function(t){return t===null},QW=KW;function ih(t){return!ln(t)&&!QW(t)&&!Number.isNaN(t)}const Tg=Math.sqrt(50),kg=Math.sqrt(10),Cg=Math.sqrt(2);function ah(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),a=r/ir(10,i);return i>=0?(a>=Tg?10:a>=kg?5:a>=Cg?2:1)*ir(10,i):-ir(10,-i)/(a>=Tg?10:a>=kg?5:a>=Cg?2:1)}function xw(t,e,n){const r=Math.abs(e-t)/Math.max(0,n);let i=ir(10,Math.floor(Math.log(r)/Math.LN10));const a=r/i;return a>=Tg?i*=10:a>=kg?i*=5:a>=Cg&&(i*=2),e<t?-i:i}const _w=(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=ah(o,s,n),c>0?(o=Math.floor(o/c)*c,s=Math.ceil(s/c)*c,c=ah(o,s,n)):c<0&&(o=Math.ceil(o*c)/c,s=Math.floor(s*c)/c,c=ah(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 JW(t,e){const n=e<t?e:t,r=t>e?t:e;return i=>Math.min(Math.max(n,i),r)}const tY=(t,e,n)=>{const[r,i]=t,[a,o]=e;let s,c;return r<i?(s=rh(r,i),c=n(a,o)):(s=rh(i,r),c=n(o,a)),jc(c,s)},eY=(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]=rh(s[l],s[l+1]),a[l]=n(c[l],c[l+1]);return l=>{const u=Pg(t,l,1,r)-1,f=i[u],d=a[u];return jc(d,f)(l)}},Ow=(t,e,n,r)=>(Math.min(t.length,e.length)>2?eY:tY)(t,e,r?ZW:n);class oh extends fu{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:Rc,tickCount:5}}map(e){return ih(e)?this.output(e):this.options.unknown}invert(e){return ih(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 _w}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?JW(i[0],i[a-1]):Es}composeOutput(e,n){const{domain:r,range:i,round:a,interpolate:o}=this.options,s=Ow(r.map(e),i,o,a);this.output=jc(s,n,e)}composeInput(e,n,r){const{domain:i,range:a}=this.options,o=Ow(a,i.map(e),Rc);this.input=jc(n,r,o)}}const Ps=(t,e,n)=>{let r,i,a=t,o=e;if(a===o&&n>0)return[a];let s=ah(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 Br extends oh{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:du,tickMethod:Ps,tickCount:5}}chooseTransforms(){return[Es,Es]}clone(){return new Br(this.options)}}function nY(t,e){if(t){var n;if(sr(t))for(var r=0,i=t.length;r<i&&(n=e(t[r],r),n!==!1);r++);else if(cs(t)){for(var a in t)if(t.hasOwnProperty(a)&&(n=e(t[a],a),n===!1))break}}}var Lg=nY,rY=function(t,e,n){if(!sr(t)&&!Ba(t))return t;var r=n;return Lg(t,function(i,a){r=e(r,i,a)}),r},ww=rY,As=function(t,e){return ww(t,function(n,r,i){return e.includes(i)||(n[i]=r),n},{})};function Ha(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 Sw(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=D([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 En(e,n,r-e,i-n)}var iY=function(t,e,n){var r=t.width,i=t.height,a=n.flexDirection,o=a===void 0?"row":a,s=n.flexWrap,c=s===void 0?"nowrap":s,l=n.justifyContent,u=l===void 0?"flex-start":l,f=n.alignContent,d=f===void 0?"flex-start":f,h=n.alignItems,p=h===void 0?"flex-start":h,v=o==="row",g=o==="row"||o==="column",y=v?g?[1,0]:[-1,0]:g?[0,1]:[0,-1],m=D([0,0],2),b=m[0],x=m[1],_=e.map(function(A){var T,k=A.width,N=A.height,F=D([b,x],2),R=F[0],I=F[1];return T=D([b+k*y[0],x+N*y[1]],2),b=T[0],x=T[1],new En(R,I,k,N)}),O=Sw(_),w={"flex-start":0,"flex-end":v?r-O.width:i-O.height,center:v?(r-O.width)/2:(i-O.height)/2},S=_.map(function(A){var T=A.x,k=A.y,N=En.fromRect(A);return N.x=v?T+w[u]:T,N.y=v?k:k+w[u],N}),M=Sw(S),E=function(A){var T=D(v?["height",i]:["width",r],2),k=T[0],N=T[1];switch(p){case"flex-start":return 0;case"flex-end":return N-A[k];case"center":return N/2-A[k]/2;default:return 0}},P=S.map(function(A){var T=A.x,k=A.y,N=En.fromRect(A);return N.x=v?T:T+E(N),N.y=v?k+E(N):k,N}),C=P.map(function(A){var T,k,N=En.fromRect(A);return N.x+=(T=t.x)!==null&&T!==void 0?T:0,N.y+=(k=t.y)!==null&&k!==void 0?k:0,N});return C},aY=function(t,e,n){return[]},oY=function(t,e,n){if(e.length===0)return[];var r={flex:iY,grid:aY},i=n.display in r?r[n.display]:null;return(i==null?void 0:i.call(null,t,e,n))||[]},sY=function(t){It(e,t);function e(n){var r=t.call(this,n)||this;r.layoutEvents=[re.BOUNDS_CHANGED,re.INSERTED,re.REMOVED],r.$margin=Pr(0),r.$padding=Pr(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=Pr(n)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"padding",{get:function(){return this.$padding},set:function(n){this.$padding=Pr(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=D(this.$margin,4),u=l[0],f=l[1],d=l[2],h=l[3];return new En(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=D(this.$padding,4),o=a[0],s=a[1],c=a[2],l=a[3],u=D(this.$margin,4),f=u[0],d=u[3];return new En(l+d,o+f,r-l-s,i-o-c)},e.prototype.layout=function(){if(!(!this.attributes.display||!this.isConnected)&&!this.children.some(function(o){return!o.isConnected}))try{var n=this.attributes,r=n.x,i=n.y;this.style.transform="translate(".concat(r,", ").concat(i,")");var a=oY(this.getAvailableSpace(),this.children.map(function(o){return o.getBBox()}),this.attributes);this.children.forEach(function(o,s){var c=a[s],l=c.x,u=c.y;o.style.transform="translate(".concat(l,", ").concat(u,")")})}catch(o){}},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}(dr),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};function lY(t){return class extends _d{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(at({},this.attributes,e)),(r=(n=this.descriptor).render)===null||r===void 0||r.call(n,this.attributes,this)}}}function Mw(t,e,n){return t.querySelector(e)?Kt(t).select(e):Kt(t).append(n)}function sh(t){return Array.isArray(t)?t.join(", "):`${t||""}`}function Ew(t,e){const n={display:"flex",flexDirection:"row",justifyContent:"flex-start",alignItems:"center"};let{flexDirection:r,justifyContent:i,alignItems:a}=n;const o={top:["row","flex-start","center"],bottom:["row","flex-start","center"],left:["column","flex-start","center"],right:["column","flex-start","center"],center:["column","center","center"]};return t in o&&([r,i,a]=o[t]),Object.assign({display:"flex",flexDirection:r,justifyContent:i,alignItems:a},e)}class Pw extends sY{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 uY extends Pw{update(e){var n;const{subOptions:r}=e;this.attr(e),(n=this.child)===null||n===void 0||n.update(r)}}function ba(t,e){var n;return(n=t.filter(r=>r.getOptions().name===e))===null||n===void 0?void 0:n[0]}function fY(t){return t==="horizontal"||t===0}function dY(t){return t==="vertical"||t===-Math.PI/2}function Aw(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 hY(t){return t.find(e=>e.getOptions().domain.length>0).getOptions().domain}function ch(t){const e=["arrow","crosshairs","grid","handle","handleLabel","indicator","label","line","tick","tip","title","trunc"],{style:n}=t,r=cY(t,["style"]),i={};return Object.entries(r).forEach(([a,o])=>{e.includes(a)?i[`show${mo(a)}`]=o:i[a]=o}),Object.assign(Object.assign({},i),n)}var Tw=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function kw(t,e){const{eulerAngles:n,origin:r}=e;r&&t.setOrigin(r),n&&t.rotate(n[0],n[1],n[2])}function Cw(t){const{innerWidth:e,innerHeight:n,depth:r}=t.getOptions();return[e,n,r]}function pY(t,e){const{width:n,height:r}=e.getOptions();return i=>{if(!CO(e))return i;const a=t==="bottom"?[i,1]:[0,i],o=e.map(a);if(t==="bottom"){const s=o[0];return new Br({domain:[0,n],range:[0,1]}).map(s)}else if(t==="left"){const s=o[1];return new Br({domain:[0,r],range:[0,1]}).map(s)}return i}}function vY(t,e,n){if(t.getTicks)return t.getTicks();if(!n)return e;const[r,i]=Ha(e,o=>+o),{tickCount:a}=t.getOptions();return n(r,i,a)}function gY(t,e){if(dn(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 Br({domain:[0,1],range:[l/f,1-u/f]});return h=>d.map(h)}function Lw(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=vY(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=gY(o,s),p=pY(o,s),v=y=>["top","bottom","center","outer"].includes(y),g=y=>["left","right"].includes(y);return dn(s)||Mn(s)?u.map((y,m,b)=>{var x,_;const O=((x=t.getBandWidth)===null||x===void 0?void 0:x.call(t,y))/2||0,w=h(t.map(y)+O);return{value:ru(s)&&o==="center"||Mn(s)&&((_=t.getTicks)===null||_===void 0?void 0:_.call(t))&&v(o)||Mn(s)&&g(o)?1-w:w,label:f(d(Ud(y),m,b)),id:String(m)}}):u.map((y,m,b)=>{var x;const _=((x=t.getBandWidth)===null||x===void 0?void 0:x.call(t,y))/2||0,O=p(h(t.map(y)+_));return{value:g(o)?1-O:O,label:f(d(Ud(y),m,b)),id:String(m)}})}function yY(t,e,n="xy"){const[r,i,a]=Cw(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 mY(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 bY(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]=fg(i),[h,p]=Cw(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 xY(t,e,n){return LO(e)||iu(e)?!1:t===void 0?!!n.getTicks:t}function _Y(t){const{depth:e}=t.getOptions();return e?{tickIsBillboard:!0,lineIsBillboard:!0,labelIsBillboard:!0,titleIsBillboard:!0,gridIsBillboard:!0}:{}}function OY(t,e,n,r,i){const{x:a,y:o,width:s,height:c}=n;if(t==="bottom")return{startPos:[a,o],endPos:[a+s,o]};if(t==="left")return{startPos:[a+s,o+c],endPos:[a+s,o]};if(t==="right")return{startPos:[a,o+c],endPos:[a,o]};if(t==="top")return{startPos:[a,o+c],endPos:[a+s,o+c]};if(t==="center"){if(e==="vertical")return{startPos:[a,o],endPos:[a,o+c]};if(e==="horizontal")return{startPos:[a,o],endPos:[a+s,o]};if(typeof e=="number"){const[l,u]=r.getCenter(),[f,d]=Vd(r),[h,p]=fg(r),v=Math.min(s,c)/2,{insetLeft:g,insetTop:y}=r.getOptions(),m=f*v,b=d*v,[x,_]=[l+a-g,u+o-y],[O,w]=[Math.cos(e),Math.sin(e)],S=[x+b*O,_+b*w],M=[x+m*O,_+m*w],E=()=>{const{domain:C}=i.getOptions();return C.length},P=dn(r)&&i?E():3;return{startPos:S,endPos:M,gridClosed:Math.abs(p-h-360)<1e-6,gridCenter:[x,_],gridControlAngles:new Array(P).fill(0).map((C,A,T)=>(p-h)/P*A)}}}return{}}const wY=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=Tw(t,["order","size","position","orientation","labelFormatter","tickFilter","tickCount","tickMethod","important","style","indexBBox","title","grid"]);return({scales:[v],value:g,coordinate:y,theme:m})=>{const{bbox:b}=g,{domain:x}=v.getOptions(),_=Lw(v,x,s,a,o,c,r,y),O=f?_.map((A,T)=>{const k=f.get(T);return!k||k[0]!==A.label?A:Object.assign(Object.assign({},A),{bbox:k[1]})}):_,[w,S]=Vd(y),M=bY(r,b,w,S,y),{axis:E,axisArc:P={}}=m,C=ch(at({},E,P,M,Object.assign(Object.assign({type:"arc",data:O,titleText:sh(d),grid:h},p),l)));return new Eg({style:As(C,["transform"])})}};function SY(t,e,n,r,i,a){const o=n.axis,s=["top","right","bottom","left"].includes(i)?n[`axis${ig(i)}`]:n.axisLinear,c=t.getOptions().name,l=n[`axis${mo(c)}`]||{};return Object.assign({},o,s,l)}function MY(t,e,n,r,i,a){const o=SY(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:dY(a)?10:0,tick:r==="center"?!1:void 0}):o}const EY=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=Tw(t,["direction","important","labelFormatter","order","orientation","actualPosition","position","size","style","title","tickCount","tickFilter","tickMethod","transform","indexBBox"]);return({scales:y,value:m,coordinate:b,theme:x})=>{const{bbox:_}=m,[O]=y,{domain:w,xScale:S}=O.getOptions(),M=MY(O,b,x,e,s,a),E=Object.assign(Object.assign(Object.assign({},M),l),g),P=yY(o||s,b,t.plane),C=OY(s,a,_,b,S),A=_Y(b),T=Lw(O,w,f,r,d,h,s,b),k=v?T.map((R,I)=>{const z=v.get(I);return!z||z[0]!==R.label?R:Object.assign(Object.assign({},R),{bbox:z[1]})}):T,N=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},E),{type:"linear",data:k,crossSize:c,titleText:sh(u),labelOverlap:mY(p,E),grid:xY(E.grid,b,O),gridLength:P,line:!0,indexBBox:v}),E.line?null:{lineOpacity:0}),C),A),n);return N.labelOverlap.find(R=>R.type==="hide")&&(N.crossSize=!1),new Eg({className:"axis",style:ch(N)})}},Nw=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"?bo(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)}},Oo=Nw(EY),jw=Nw(wY);Oo.props={defaultPosition:"center",defaultSize:45,defaultOrder:0,defaultCrossPadding:[12,12],defaultPadding:[12,12]},jw.props={defaultPosition:"outer",defaultOrientation:"vertical",defaultSize:45,defaultOrder:0,defaultCrossPadding:[12,12],defaultPadding:[12,12]};var PY=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);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 AY(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 TY(t,e,n,r){const{radar:i}=t,[a]=r,o=a.getOptions().name,[s,c]=fg(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 Rw=t=>{const{important:e={}}=t,n=PY(t,["important"]);return r=>{const{theme:i,coordinate:a,scales:o}=r;return Oo(Object.assign(Object.assign(Object.assign({},n),AY(t.orientation)),{important:Object.assign(Object.assign({},TY(t,i,a,o)),e)}))(r)}};Rw.props=Object.assign(Object.assign({},Oo.props),{defaultPosition:"center"});function lh(t,e){return+t.toPrecision(e)}function egt(t){return t.toLocaleString()}function ngt(t){return t.toExponential()}function rgt(t,e){return e===void 0&&(e=0),Math.abs(t)<1e3?String(t):"".concat(lh(t/1e3,e).toLocaleString(),"K")}var igt=function(t,e,n){return t<0&&Number.isFinite(t)?e:n},agt=function(t,e,n){return t>0&&Number.isFinite(t)?e:n},ogt=function(t,e){return t*e},sgt=function(t,e){return t/2+(e||0)/2};function uh(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 kY={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},Ng=Fi({background:"background",labelGroup:"label-group",label:"label"},"indicator"),CY=function(t){It(e,t);function e(n){var r=t.call(this,n,kY)||this;return r.point=[0,0],r.group=r.appendChild(new dr({})),r.isMutationObserved=!0,r}return e.prototype.renderBackground=function(){if(this.label){var n=this.attributes,r=n.position,i=n.padding,a=D(Pr(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 En(f[0]-l,f[1]-o,d[0]+s-f[0]+l,d[1]+c-f[1]+o),p=this.getPath(r,h),v=Oe(this.attributes,"background");this.background=de(this.group).maybeAppendByClassName(Ng.background,"path").styles(J(J({},v),{d:p})),this.group.appendChild(this.label.node())}},e.prototype.renderLabel=function(){var n=this.attributes,r=n.formatter,i=n.labelText,a=Oe(this.attributes,"label"),o=D(Ya(a),2),s=o[0],c=o[1],l=s.text,u=wn(s,["text"]);if(this.label=de(this.group).maybeAppendByClassName(Ng.labelGroup,"g").styles(c),!!i){var f=this.label.maybeAppendByClassName(Ng.label,function(){return Ms(r(i))}).style("text",r(i).toString());f.selectAll("text").styles(u)}},e.prototype.adjustLayout=function(){var n=D(this.point,2),r=n[0],i=n[1],a=this.attributes,o=a.x,s=a.y;this.group.attr("transform","translate(".concat(o-r,", ").concat(s-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,dt([f+1,1],D(d),!1)),l[0][0]="M",l},e.prototype.createCorner=function(n,r){r===void 0&&(r=10);var i=.8,a=mW.apply(void 0,dt([],D(n),!1)),o=D(n,2),s=D(o[0],2),c=s[0],l=s[1],u=D(o[1],2),f=u[0],d=u[1],h=D(a?[f-c,[c,f]]:[d-l,[l,d]],2),p=h[0],v=D(h[1],2),g=v[0],y=v[1],m=p/2,b=p/Math.abs(p),x=r*b,_=x/2,O=x*Math.sqrt(3)/2*i,w=D([g,g+m-_,g+m,g+m+_,y],5),S=w[0],M=w[1],E=w[2],P=w[3],C=w[4];return a?(this.point=[E,l-O],[["L",S,l],["L",M,l],["L",E,l-O],["L",P,l],["L",C,l]]):(this.point=[c+O,E],[["L",c,S],["L",c,M],["L",c+O,E],["L",c,P],["L",c,C]])},e.prototype.applyVisibility=function(){var n=this.attributes.visibility;n==="hidden"?_o(this):au(this)},e.prototype.bindEvents=function(){this.label.on(re.BOUNDS_CHANGED,this.renderBackground)},e.prototype.render=function(){this.renderLabel(),this.renderBackground(),this.adjustLayout(),this.applyVisibility()},e}(yr),Iw={fill:"#fff",lineWidth:1,radius:2,size:10,stroke:"#bfbfbf",strokeOpacity:1,zIndex:0},Dw={fill:"#000",fillOpacity:.45,fontSize:12,textAlign:"center",textBaseline:"middle",zIndex:1},Fw={x:0,y:0,orientation:"horizontal",showLabel:!0,type:"start"},xa=Fi({foreground:"foreground",handle:"handle",selection:"selection",sparkline:"sparkline",sparklineGroup:"sparkline-group",track:"track",brushArea:"brush-area"},"slider"),wo=Fi({labelGroup:"label-group",label:"label",iconGroup:"icon-group",icon:"icon",iconRect:"icon-rect",iconLine:"icon-line"},"handle"),LY=function(t){It(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.render=function(n,r){var i=n.x,a=n.y,o=n.size,s=o===void 0?10:o,c=n.radius,l=c===void 0?s/4:c,u=n.orientation,f=wn(n,["x","y","size","radius","orientation"]),d=s,h=d*2.4,p=de(r).maybeAppendByClassName(wo.iconRect,"rect").styles(J(J({},f),{width:d,height:h,radius:l,x:i-d/2,y:a-h/2,transformOrigin:"center"})),v=i+1/3*d-d/2,g=i+2/3*d-d/2,y=a+1/4*h-h/2,m=a+3/4*h-h/2;p.maybeAppendByClassName("".concat(wo.iconLine,"-1"),"line").styles(J({x1:v,x2:v,y1:y,y2:m},f)),p.maybeAppendByClassName("".concat(wo.iconLine,"-2"),"line").styles(J({x1:g,x2:g,y1:y,y2:m},f)),u==="vertical"&&(p.node().style.transform="rotate(90)")},e}(yr),Bw=function(t){It(e,t);function e(n){return t.call(this,n,Fw)||this}return e.prototype.renderLabel=function(n){var r=this,i=this.attributes,a=i.x,o=i.y,s=i.showLabel,c=Oe(this.attributes,"label"),l=c.x,u=l===void 0?0:l,f=c.y,d=f===void 0?0:f,h=c.transform,p=c.transformOrigin,v=wn(c,["x","y","transform","transformOrigin"]),g=D(Ya(v,[]),2),y=g[0],m=g[1],b=de(n).maybeAppendByClassName(wo.labelGroup,"g").styles(m),x=J(J({},Dw),y),_=x.text,O=wn(x,["text"]);hi(!!s,b,function(w){r.label=w.maybeAppendByClassName(wo.label,"text").styles(J(J({},O),{x:a+u,y:o+d,transform:h,transformOrigin:p,text:"".concat(_)})),r.label.on("mousedown",function(S){S.stopPropagation()}),r.label.on("touchstart",function(S){S.stopPropagation()})})},e.prototype.renderIcon=function(n){var r=this.attributes,i=r.x,a=r.y,o=r.orientation,s=r.type,c=J(J({x:i,y:a,orientation:o},Iw),Oe(this.attributes,"icon")),l=this.attributes.iconShape,u=l===void 0?function(){return new LY({style:c})}:l,f=de(n).maybeAppendByClassName(wo.iconGroup,"g");f.selectAll(wo.icon.class).data([u]).join(function(d){return d.append(typeof u=="string"?u:function(){return u(s)}).attr("className",wo.icon.name)},function(d){return d.update(c)},function(d){return d.remove()})},e.prototype.render=function(n,r){this.renderIcon(r),this.renderLabel(r)},e}(yr),zw=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"]]},NY=zw,jY=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"]]},RY=function(t,e,n){return[["M",t-n,e],["L",t,e-n],["L",t+n,e],["L",t,e+n],["Z"]]},IY=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"]]},DY=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"]]},FY=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"]]},BY=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"]]},Gw=function(t,e,n){return[["M",t,e+n],["L",t,e-n]]},zY=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]]},GY=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]]},WY=function(t,e,n){return[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]]},YY=function(t,e,n){return[["M",t-n,e],["L",t+n,e]]},Ww=function(t,e,n){return[["M",t-n,e],["L",t+n,e]]},HY=Ww,$Y=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]]},UY=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]]},VY=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]]},XY=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 qY(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 ZY=function(t,e,n){return[["M",t-n,e-n],["L",t+n,e],["L",t-n,e+n],["Z"]]};function KY(t){var e="default";if(cs(t)&&t instanceof Image)e="image";else if(Kr(t))e="symbol";else if(Cn(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 QY(t){var e=KY(t);return["base64","url","image"].includes(e)?"image":t&&e==="symbol"?"path":null}var He=function(t){It(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.render=function(n,r){var i=n.x,a=i===void 0?0:i,o=n.y,s=o===void 0?0:o,c=this.getSubShapeStyle(n),l=c.symbol,u=c.size,f=u===void 0?16:u,d=wn(c,["symbol","size"]),h=QY(l);hi(!!h,de(r),function(p){p.maybeAppendByClassName("marker",h).attr("className","marker ".concat(h,"-marker")).call(function(v){if(h==="image"){var g=f*2;v.styles({img:l,width:g,height:g,x:a-f,y:s-f})}else{var g=f/2,y=Kr(l)?l:e.getSymbol(l);v.styles(J({d:y==null?void 0:y(a,s,g)},d))}})})},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}(yr);He.registerSymbol("cross",zY),He.registerSymbol("hyphen",YY),He.registerSymbol("line",Gw),He.registerSymbol("plus",WY),He.registerSymbol("tick",GY),He.registerSymbol("circle",zw),He.registerSymbol("point",NY),He.registerSymbol("bowtie",BY),He.registerSymbol("hexagon",FY),He.registerSymbol("square",jY),He.registerSymbol("diamond",RY),He.registerSymbol("triangle",IY),He.registerSymbol("triangle-down",DY),He.registerSymbol("line",Gw),He.registerSymbol("dot",Ww),He.registerSymbol("dash",HY),He.registerSymbol("smooth",$Y),He.registerSymbol("hv",UY),He.registerSymbol("vh",VY),He.registerSymbol("hvh",XY),He.registerSymbol("vhv",qY);function JY(t,e,n){var r=Math.round((t-n)/e);return n+r*e}function tH(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 Yw=1.4,Hw=.4;function eH(t,e,n){var r=n,i=r*Yw,a=r/2,o=r/6,s=t+i*Hw;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 nH(t,e,n){var r=n,i=r*Yw,a=r/2,o=r/6,s=e+i*Hw;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]]}He.registerSymbol("hiddenHandle",tH),He.registerSymbol("verticalHandle",eH),He.registerSymbol("horizontalHandle",nH);var cgt=function(t,e,n){return t===void 0&&(t="horizontal"),t==="horizontal"?e:n};function rH(t,e,n,r){var i;r===void 0&&(r=4);var a=D(t,2),o=a[0],s=a[1],c=D(e,2),l=c[0],u=c[1],f=D(n,2),d=f[0],h=f[1],p=D([l,u],2),v=p[0],g=p[1],y=g-v;return v>g&&(i=D([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 _a(t,e,n){return t===void 0&&(t="horizontal"),t==="horizontal"?e:n}var hu=Fi({markerGroup:"marker-group",marker:"marker",labelGroup:"label-group",label:"label"},"handle"),$w={showLabel:!0,formatter:function(t){return t.toString()},markerSize:25,markerStroke:"#c5c5c5",markerFill:"#fff",markerLineWidth:1,labelFontSize:12,labelFill:"#c5c5c5",labelText:"",orientation:"vertical",spacing:0},iH=function(t){It(e,t);function e(n){return t.call(this,n,$w)||this}return e.prototype.render=function(n,r){var i=de(r).maybeAppendByClassName(hu.markerGroup,"g");this.renderMarker(i);var a=de(r).maybeAppendByClassName(hu.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?_a(a,"horizontalHandle","verticalHandle"):o;hi(!!s,n,function(c){var l=Oe(r.attributes,"marker"),u=J({symbol:s},l);r.marker=c.maybeAppendByClassName(hu.marker,function(){return new He({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;hi(a,n,function(u){var f,d=Oe(r.attributes,"label"),h=d.text,p=wn(d,["text"]),v=((f=u.select(hu.marker.class))===null||f===void 0?void 0:f.node().getBBox())||{},g=v.width,y=g===void 0?0:g,m=v.height,b=m===void 0?0:m,x=D(_a(o,[0,b+c,"center","top"],[y+c,0,"start","middle"]),4),_=x[0],O=x[1],w=x[2],S=x[3];u.maybeAppendByClassName(hu.label,"text").styles(J(J({},p),{x:_,y:O,text:l(h).toString(),textAlign:w,textBaseline:S}))})},e}(yr),Uw={showTitle:!0,padding:0,orientation:"horizontal",backgroundFill:"transparent",titleText:"",titleSpacing:4,titlePosition:"top-left",titleFill:"#2C3542",titleFontWeight:"bold",titleFontFamily:"sans-serif",titleFontSize:12},aH=Ga({},Uw,{}),oH=Ga({},Uw,ma($w,"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"}),sH=.01,lgt=.5,Ar=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 cH(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 lH(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 Vw(t,e){var n=D(cH(t,e),2),r=n[0],i=n[1];return{tick:e>(r+i)/2?i:r,range:[r,i]}}var pu=Fi({trackGroup:"background-group",track:"background",selectionGroup:"ribbon-group",selection:"ribbon",clipPath:"clip-path"},"ribbon");function Xw(t){var e=t.orientation,n=t.size,r=t.length;return _a(e,[r,n],[n,r])}function qw(t){var e=t.type,n=D(Xw(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 uH(t){return qw(t)}function fH(t){var e=t.orientation,n=t.color,r=t.block,i=t.partition,a;if(Kr(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 Ia(l).toString()});return s?s===1?c[0]:r?lH(i,c,e):c.reduce(function(l,u,f){return l+=" ".concat(f/(s-1),":").concat(u)},"l(".concat(_a(e,"0","270"),")")):""}function dH(t){var e=t.orientation,n=t.range;if(!n)return[];var r=D(Xw(t),2),i=r[0],a=r[1],o=D(n,2),s=o[0],c=o[1],l=_a(e,s*i,0),u=_a(e,0,s*a),f=_a(e,c*i,i),d=_a(e,a,c*a);return[["M",l,u],["L",l,d],["L",f,d],["L",f,u],["Z"]]}function hH(t,e){var n=Oe(e,"track");t.maybeAppendByClassName(pu.track,"path").styles(J({d:qw(e)},n))}function pH(t,e){var n=Oe(e,"selection"),r=fH(e),i=t.maybeAppendByClassName(pu.selection,"path").styles(J({d:uH(e),fill:r},n)),a=i.maybeAppendByClassName(pu.clipPath,"path").styles({d:dH(e)}).node();i.style("clipPath",a)}var vH=function(t){It(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=de(r).maybeAppendByClassName(pu.trackGroup,"g");hH(i,n);var a=de(r).maybeAppendByClassName(pu.selectionGroup,"g");pH(a,n)},e}(yr);function gH(t){return{min:Math.min.apply(Math,dt([],D(t.map(function(e){return e.value})),!1)),max:Math.max.apply(Math,dt([],D(t.map(function(e){return e.value})),!1))}}var yH=function(t){It(e,t);function e(n){var r=t.call(this,n,oH)||this;return r.eventToOffsetScale=new Br({}),r.innerRibbonScale=new Br({}),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=Vw(o.map(function(d){var h=d.value;return h}),c).range,u=r.getRealSelection(l);r.showIndicator((l[0]+l[1])/2,"".concat(u[0],"-").concat(u[1])),r.dispatchIndicated(c,l)}else{var f=r.getTickValue(c);r.showIndicator(f,"".concat(r.getRealValue(f))),r.dispatchIndicated(f)}},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=D(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 En(0,0,r,i)},e.prototype.render=function(n,r){var i=this,a=n.showLabel;this.renderTitle(de(r));var o=this.availableSpace,s=o.x,c=o.y,l=de(r).maybeAppendByClassName(Ar.contentGroup,"g").styles({transform:"translate(".concat(s,", ").concat(c,")")}),u=l.maybeAppendByClassName(Ar.labelGroup,"g").styles({zIndex:1});hi(!!a,u,function(d){i.renderLabel(d)});var f=l.maybeAppendByClassName(Ar.ribbonGroup,"g").styles({zIndex:0});this.handlesGroup=l.maybeAppendByClassName(Ar.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]}:gH(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=D(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=D(o,2),c=s[0],l=s[1];return[c,l]},enumerable:!1,configurable:!0}),e.prototype.ifHorizontal=function(n,r){return _a(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=Oe(this.attributes,"title"),l=J(J({},c),{width:o,height:s,text:a}),u=this;n.selectAll(Ar.title.class).data(i?[a]:[]).join(function(f){return f.append(function(){return new gw({style:l})}).attr("className",Ar.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 En(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 En(0,0,0,0);if(this.cacheLabelBBox)return this.cacheLabelBBox;var i=((n=this.label.querySelector(nn.labelGroup.class))===null||n===void 0?void 0:n.children.slice(-1)[0]).getBBox(),a=i.width,o=i.height;return this.cacheLabelBBox=new En(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=D(this.ifHorizontal([s,o],[o,s]),2),d=f[0],h=f[1],p=r?this.handleShape:{size:0,length:0},v=p.size,g=p.length,y=this.handleOffsetRatio,m=0,b=this.labelPosition;i?m=i:["bottom","right"].includes(b)?m=Math.min(d-l,(d-v)/y):d*(1-y)>v?m=Math.max(d-l,0):m=Math.max((d-l-v)/y,0);var x=Math.max(g,u),_=h-x,O=D(this.ifHorizontal([_,m],[m,_]),2),w=O[0],S=O[1],M=["top","left"].includes(b)?l:0,E=D(this.ifHorizontal([x/2,M],[M,x/2]),2),P=E[0],C=E[1];return new En(P,C,w,S)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ribbonShape",{get:function(){var n=this.ribbonBBox,r=n.width,i=n.height;return this.ifHorizontal({size:i,length:r},{size:r,length:i})},enumerable:!1,configurable:!0}),e.prototype.renderRibbon=function(n){var r=this.attributes,i=r.data,a=r.type,o=r.orientation,s=r.color,c=r.block,l=Oe(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=Ga({transform:"translate(".concat(p,", ").concat(v,")"),length:y,size:m,type:a,orientation:o,color:s,block:c,partition:i.map(function(x){return(x.value-f)/(d-f)}),range:this.ribbonRange},l);this.ribbon=n.maybeAppendByClassName(Ar.ribbon,function(){return new vH({style:b})}).update(b)},e.prototype.getHandleClassName=function(n){return"".concat(Ar.prefix("".concat(n,"-handle")))},e.prototype.renderHandles=function(){var n=this.attributes,r=n.showHandle,i=n.orientation,a=Oe(this.attributes,"handle"),o=D(this.selection,2),s=o[0],c=o[1],l=J(J({},a),{orientation:i}),u=a.shape,f=u===void 0?"slider":u,d=f==="basic"?iH:Bw,h=this;this.handlesGroup.selectAll(Ar.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(Ar.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=D(this.selection,2),r=n[0],i=n[1];this.setHandlePosition("start",r),this.setHandlePosition("end",i)},Object.defineProperty(e.prototype,"handleBBox",{get:function(){if(this.cacheHandleBBox)return this.cacheHandleBBox;if(!this.attributes.showHandle)return new En(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=D([Math.max(r,o),Math.max(i,s)],2),l=c[0],u=c[1];return this.cacheHandleBBox=new En(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=D(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=D(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({transform:"translate(".concat(f,", ").concat(d,")"),formatter:i})},e.prototype.renderIndicator=function(n){var r=Oe(this.attributes,"indicator");this.indicator=n.maybeAppendByClassName(Ar.indicator,function(){return new CY({})}).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(J(J({},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=D([a.value,f.value],2),h=d[0],p=d[1],v=(h+p)/2;i.push(J(J({},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=D(["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=Oe(this.attributes,"tick"),l=Oe(this.attributes,"label"),u=l.align,f=Ga(J({showLine:!1,showGrid:!1,showTick:a,type:"linear",startPos:[0,0],endPos:[0,0],tickDirection:"negative",labelTransform:"rotate(0)"},this.labelStyle),ma(c,"tick"),ma(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=J(J(J({},f),d),{labelOverlap:[{type:"hide"}]});this.label=n.maybeAppendByClassName(Ar.label,function(){return new Eg({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=D([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:d,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=D(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=Bn(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}),au(this.indicator.node())},e.prototype.hideIndicator=function(){_o(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=D(this.selection,2),s=o[0],c=o[1],l=D([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=D(rH([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 ln(r)?lh((o-a)*sH,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?Vw(i.map(function(s){var c=s.value;return c}),n).tick:JY(n,this.step,o)},e.prototype.getValueByCanvasPoint=function(n){var r=this.range,i=r.min,a=r.max,o=D(this.ribbon.node().getPosition(),2),s=o[0],c=o[1],l=this.ifHorizontal(s,c),u=this.ifHorizontal.apply(this,dt([],D(uh(n)),!1)),f=u-l,d=Bn(this.getOffset(f,!0),i,a);return d},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.getRealSelection=function(n){var r=this.range.max,i=D(n,2),a=i[0],o=i[1];return this.ifHorizontal([a,o],[r-o,r-a])},e.prototype.getRealValue=function(n){var r=this.range.max;return this.ifHorizontal(n,r-n)},e.prototype.dispatchSelection=function(){var n=this.getRealSelection(this.selection),r=new sn("valuechange",{detail:{value:n}});this.dispatchEvent(r)},e.prototype.dispatchIndicated=function(n,r){var i=this,a=this.range.max,o=this.ifHorizontal(function(){return{value:n,range:r}},function(){return{value:a-n,range:r?i.getRealSelection(r):void 0}}),s=new sn("indicate",{detail:o});this.dispatchEvent(s)},e}(yr);class vu extends fu{getDefaultOptions(){return{range:[0],domain:[0,1],unknown:void 0,tickCount:5,tickMethod:Ps}}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!vn(i)||!vn(a)?[]:e(i,a,r)}clone(){return new vu(this.options)}}class Ic extends fu{getDefaultOptions(){return{domain:[.5],range:[0,1]}}constructor(e){super(e)}map(e){if(!ih(e))return this.options.unknown;const n=Pg(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 Ic(this.options)}rescale(){const{domain:e,range:n}=this.options;this.n=Math.min(e.length,n.length-1),this.thresholds=e}}function gu(t){return se(t)?0:Tc(t)?t.length:Object.keys(t).length}var mH=function(t,e){if(!Tc(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},Zw=mH;function yu(t){return Math.abs(t)<1e-14?t:parseFloat(t.toFixed(14))}const bH=[1,5,2,2.5,4,3],ugt=null,Kw=Number.EPSILON*100;function xH(t,e){return(t%e+e)%e}function _H(t){return Math.round(t*1e12)/1e12}function OH(t,e,n,r,i,a){const o=gu(e),s=Zw(e,t);let c=0;const l=xH(r,a);return(l<Kw||a-l<Kw)&&r<=0&&i>=0&&(c=1),1-s/(o-1)-n+c}function wH(t,e,n){const r=gu(e),i=Zw(e,t),a=1;return 1-i/(r-1)-n+a}function SH(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 MH(t,e){return t>=e?2-(t-1)/(e-1):1}function EH(t,e,n,r){const i=e-t;return 1-.5*(ir(e-r,2)+ir(t-n,2))/ir(.1*i,2)}function PH(t,e,n){const r=e-t;if(n>r){const i=(n-r)/2;return 1-ir(i,2)/ir(.1*r,2)}return 1}function AH(){return 1}const jg=(t,e,n=5,r=!0,i=bH,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=wH(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=MH(y,o);if(a[0]*g+a[1]+a[2]*m+a[3]<s.score)break;const b=(e-t)/(y+1)/c/v;let x=Math.ceil(Math.log10(b));for(;x<1/0;){const _=c*v*ir(10,x),O=PH(t,e,_*(y-1));if(a[0]*g+a[1]*O+a[2]*m+a[3]<s.score)break;const w=Math.floor(e/_)*c-(y-1)*c,S=Math.ceil(t/_)*c;if(w<=S){const M=S-w;for(let E=0;E<=M;E+=1){const C=(w+E)*(_/c),A=C+_*(y-1),T=_,k=OH(v,i,c,C,A,T),N=EH(t,e,C,A),F=SH(y,o,t,e,C,A),R=AH(),I=a[0]*k+a[1]*N+a[2]*F+a[3]*R;I>s.score&&(!r||C<=t&&A>=e)&&(s.lmin=C,s.lmax=A,s.lstep=T,s.score=I)}}x+=1}y+=1}}c+=1}const l=yu(s.lmax),u=yu(s.lmin),f=yu(s.lstep),d=Math.floor(_H((l-u)/f))+1,h=new Array(d);h[0]=yu(u);for(let p=1;p<d;p+=1)h[p]=yu(h[p-1]+f);return h};class fh extends Ic{getDefaultOptions(){return{domain:[0,1],range:[.5],nice:!1,tickCount:5,tickMethod:jg}}constructor(e){super(e)}nice(){const{nice:e}=this.options;if(e){const[n,r,i]=this.getTickMethodOptions();this.options.domain=_w(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 fh(this.options)}}function TH(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 kH(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(TH(r,a/e));return i}class dh extends Ic{getDefaultOptions(){return{domain:[],range:[],tickCount:5,unknown:void 0,tickMethod:jg}}constructor(e){super(e)}rescale(){const{domain:e,range:n}=this.options;this.n=n.length-1,this.thresholds=kH(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 dh(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 CH=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);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 LH(t,e,n){return t.size=e,fY(n)?t.height=e:t.width=e,t}function NH(t,e,n){const{size:r}=e,i=Aw(t,e,n);return LH(i,r,i.orientation)}function jH(t){return e=>({value:e/t,label:String(e)})}function RH(t,e,n,r,i){const a=e.thresholds,o=jH(r);return Object.assign(Object.assign({},t),{color:i,data:[n,...a,r].map(o)})}function IH(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 Rg(t){const{domain:e}=t.getOptions(),[n,r]=[e[0],wO(e)];return[n,r]}function DH(t,e){const n=t.getOptions(),r=t.clone();return r.update(Object.assign(Object.assign({},n),{range:[Ia(e).toString()]})),r}function FH(t,e,n,r,i,a){const{length:o}=t,s=n||r,c=i.color?a.legendContinuous.ribbonFill||"black":a.color,l=e||DH(s,c),[u,f]=Rg(l),[d,h]=Rg([e,n,r].filter(p=>p!==void 0).find(p=>!(p instanceof vu)));return Object.assign(Object.assign({},t),{domain:[d,h],data:l.getTicks().map(p=>({value:p})),color:new Array(Math.floor(o)).fill(0).map((p,v)=>{const g=(f-u)/(o-1)*v+u,y=l.map(g)||c,m=r?r.map(g):1;return y.replace(/rgb[a]*\(([\d]{1,3}) *, *([\d]{1,3}) *, *([\d]{1,3})[\S\s]*\)/,(b,x,_,O)=>`rgba(${x}, ${_}, ${O}, ${m})`)})})}function BH(t,e,n,r,i,a){const o=ba(t,"color"),s=NH(n,r,i);if(o instanceof Ic){const{range:u}=o.getOptions(),[f,d]=Rg(o);return o instanceof fh||o instanceof dh?RH(s,o,f,d,u):IH(s,o,u)}const c=ba(t,"size"),l=ba(t,"opacity");return FH(s,o,c,l,e,a)}const So=t=>{const{labelFormatter:e,layout:n,order:r,orientation:i,position:a,size:o,title:s,style:c,crossPadding:l,padding:u}=t,f=CH(t,["labelFormatter","layout","order","orientation","position","size","title","style","crossPadding","padding"]);return({scales:d,value:h,theme:p,scale:v})=>{const{bbox:g}=h,{x:y,y:m,width:b,height:x}=g,_=Ew(a,n),{legendContinuous:O={}}=p,w=ch(Object.assign({},O,Object.assign(Object.assign({titleText:sh(s),labelAlign:"value",labelFormatter:typeof e=="string"?M=>bo(e)(M.label):e},BH(d,v,h,t,So,p)),c),f)),S=new Pw({style:Object.assign(Object.assign({x:y,y:m,width:b,height:x},_),{subOptions:w})});return S.appendChild(new yH({className:"legend-continuous",style:w})),S}};So.props={defaultPosition:"top",defaultOrientation:"vertical",defaultOrder:1,defaultSize:60,defaultLength:200,defaultLegendSize:60,defaultPadding:[20,10],defaultCrossPadding:[12,12]};const Qw=t=>(...e)=>So(Object.assign({},{block:!0},t))(...e);Qw.props=Object.assign(Object.assign({},So.props),{defaultPosition:"top",defaultOrientation:"horizontal"});const Ig=t=>e=>{const{scales:n}=e,r=ba(n,"size");return So(Object.assign({},{type:"size",data:r.getTicks().map((i,a)=>({value:i,label:String(i)}))},t))(e)};Ig.props=Object.assign(Object.assign({},So.props),{defaultPosition:"top",defaultOrientation:"horizontal"});const Jw=t=>Ig(Object.assign({},{block:!0},t));Jw.props=Object.assign(Object.assign({},So.props),{defaultPosition:"top",defaultOrientation:"horizontal"});var zH=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);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 tS=({static:t=!1}={})=>e=>{const{width:n,height:r,depth:i,paddingLeft:a,paddingRight:o,paddingTop:s,paddingBottom:c,padding:l,inset:u,insetLeft:f,insetTop:d,insetRight:h,insetBottom:p,margin:v,marginLeft:g,marginBottom:y,marginTop:m,marginRight:b,data:x,coordinate:_,theme:O,component:w,interaction:S,x:M,y:E,z:P,key:C,frame:A,labelTransform:T,parentKey:k,clip:N,viewStyle:F,title:R}=e,I=zH(e,["width","height","depth","paddingLeft","paddingRight","paddingTop","paddingBottom","padding","inset","insetLeft","insetTop","insetRight","insetBottom","margin","marginLeft","marginBottom","marginTop","marginRight","data","coordinate","theme","component","interaction","x","y","z","key","frame","labelTransform","parentKey","clip","viewStyle","title"]);return[Object.assign(Object.assign({type:"standardView",x:M,y:E,z:P,key:C,width:n,height:r,depth:i,padding:l,paddingLeft:a,paddingRight:o,paddingTop:s,inset:u,insetLeft:f,insetTop:d,insetRight:h,insetBottom:p,paddingBottom:c,theme:O,coordinate:_,component:w,interaction:S,frame:A,labelTransform:T,margin:v,marginLeft:g,marginBottom:y,marginTop:m,marginRight:b,parentKey:k,clip:N,style:F},!t&&{title:R}),{marks:[Object.assign(Object.assign(Object.assign({},I),{key:`${C}-0`,data:x}),t&&{title:R})]})]};tS.props={};var GH=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);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 Dc(t){return(e,...n)=>at({},t(e,...n),e)}function Fc(t){return(e,...n)=>at({},e,t(e,...n))}function Dg(t,e){if(!t)return e;if(Array.isArray(t))return t;const{value:n=e}=t,r=GH(t,["value"]);return Object.assign(Object.assign({},r),{value:n})}var Fg=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);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 eS=()=>t=>{const{children:e}=t,n=Fg(t,["children"]);if(!Array.isArray(e))return[];const{data:r,scale:i={},axis:a={},legend:o={},encode:s={},transform:c=[]}=n,l=Fg(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=Fg(f,["data","scale","axis","legend","encode","transform"]);return Object.assign({data:Dg(d,r),scale:at({},i,h),encode:at({},s,g),transform:[...c,...y],axis:p&&a?at({},a,p):!1,legend:v&&o?at({},o,v):!1},m)});return[Object.assign(Object.assign({},l),{marks:u,type:"standardView"})]};eS.props={};function Gn([t,e],[n,r]){return[t-n,e-r]}function hh([t,e],[n,r]){return[t+n,e+r]}function Nn([t,e],[n,r]){return Math.sqrt(Math.pow(t-n,2)+Math.pow(e-r,2))}function zi([t,e]){return Math.atan2(e,t)}function Bc([t,e]){return zi([t,e])+Math.PI/2}function nS(t,e){const n=zi(t),r=zi(e);return n<r?r-n:Math.PI*2-(n-r)}function Bg(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 rS([t,e],[n,r]){return[(t+n)/2,(e+r)/2]}function Bt(t,e){for(const[n,r]of Object.entries(e))t.style(n,r)}function WH(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 YH(t,e,n){const{arrowSize:r}=n,i=typeof r=="string"?+parseFloat(r)/100*Nn(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 mu(t,e,n,r,i){const a=zi(Gn(r,e))+Math.PI,o=zi(Gn(r,n))+Math.PI;return t.arc(r[0],r[1],i,a,o,o-a<0),t}function iS(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=Os(s),[u,f]=Ha(l,g=>s[g]),d=new Br({domain:[u,f],range:[0,100]}),h=g=>vn(s[g])&&!Number.isNaN(s[g])?d.map(s[g]):0,p={between:g=>`${t[g]} ${h(g)}%`,start:g=>g===0?`${t[g]} ${h(g)}%`:`${t[g-1]} ${h(g)}%, ${t[g]} ${h(g)}%`,end:g=>g===t.length-1?`${t[g]} ${h(g)}%`:`${t[g]} ${h(g)}%, ${t[g+1]} ${h(g)}%`},v=l.sort((g,y)=>h(g)-h(y)).map(p[i]||p.between).join(",");return`linear-gradient(${c}deg, ${v})`}function ph(t){const[e,n,r,i]=t;return[i,e,n,r]}function Ts(t,e,n){const[r,i,,a]=Mn(t)?ph(e):e,[o,s]=n,c=t.getCenter(),l=Bc(Gn(r,c)),u=Bc(Gn(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:Nn(a,c),outerRadius:Nn(r,c)}}function fgt(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 zg(t){const{colorAttribute:e,opacityAttribute:n=e}=t;return`${n}Opacity`}function aS(t,e){if(!dn(t))return"";const n=t.getCenter(),{transform:r}=e;return`translate(${n[0]}, ${n[1]}) ${r||""}`}function Gg(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 oS(t){return t.replace(/-(\w)/g,function(e,n){return n.toUpperCase()})}function HH(t){return t.replace(/([A-Z])/g,"-$1").toLowerCase()}var dgt=Array.prototype.slice;function sS(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function Pn(t){return function(){return t}}function cS(t){this._context=t}cS.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 bu(t){return new cS(t)}const Wg=Math.PI,Yg=2*Wg,ks=1e-6,$H=Yg-ks;function lS(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function UH(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return lS;const n=ir(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 vh{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?lS:UH(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>ks)if(!(Math.abs(f*c-l*u)>ks)||!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((Wg-Math.acos((v+d-g)/(2*y*m)))/2),x=b/m,_=b/y;Math.abs(x-1)>ks&&this._append`L${e+x*u},${n+x*f}`,this._append`A${a},${a},0,0,${+(f*h>u*p)},${this._x1=e+_*c},${this._y1=n+_*l}`}}arc(e,n,r,i,a,o){if(e=+e,n=+n,r=+r,o=!!o,r<0)throw new Error(`negative radius: ${r}`);let s=r*Math.cos(i),c=r*Math.sin(i),l=e+s,u=n+c,f=1^o,d=o?i-a:a-i;this._x1===null?this._append`M${l},${u}`:(Math.abs(this._x1-l)>ks||Math.abs(this._y1-u)>ks)&&this._append`L${l},${u}`,r&&(d<0&&(d=d%Yg+Yg),d>$H?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>ks&&this._append`A${r},${r},0,${+(d>=Wg)},${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 Gi(){return new vh}Gi.prototype=vh.prototype;function hgt(t=3){return new vh(+t)}function Hg(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 vh(e)}function uS(t){return t[0]}function fS(t){return t[1]}function Mo(t,e){var n=Pn(!0),r=null,i=bu,a=null,o=Hg(s);t=typeof t=="function"?t:t===void 0?uS:Pn(t),e=typeof e=="function"?e:e===void 0?fS:Pn(e);function s(c){var l,u=(c=sS(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:Pn(+c),s):t},s.y=function(c){return arguments.length?(e=typeof c=="function"?c:Pn(+c),s):e},s.defined=function(c){return arguments.length?(n=typeof c=="function"?c:Pn(!!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 zc(t){const e=typeof t=="function"?t:t.render;return class extends _d{connectedCallback(){this.draw()}attributeChangedCallback(){this.draw()}draw(){e(this)}}}var $g=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function VH(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 XH(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 qH=(t,e,n)=>{const r=Nn(t,e),i=Nn(e,n),a=Nn(n,t);return(Math.pow(r,2)+Math.pow(i,2)-Math.pow(a,2))/(2*r*i)};function ZH(t,e,n,r){const[[i,a],[o,s]]=e,[c,l]=VH(t);if(i===o&&a===s)return Mo()([[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(qH(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 Mo()(u)}const dS=zc(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=$g(e,["className","class","transform","rotate","labelTransform","labelTransformOrigin","x","y","x0","y0","text","background","connector","startMarker","endMarker","coordCenter","innerHTML"]);if(t.style.transform=`translate(${c}, ${l})`,[c,l,u,f].some(N=>!vn(N))){t.children.forEach(N=>N.remove());return}const x=Pt(b,"background"),{padding:_}=x,O=$g(x,["padding"]),w=Pt(b,"connector"),{points:S=[]}=w,M=$g(w,["points"]),E=[[+u,+f],[+c,+l]];let P;m?P=Kt(t).maybeAppend("html","html",n).style("zIndex",0).style("innerHTML",m).call(Bt,Object.assign({transform:o,transformOrigin:s},b)).node():P=Kt(t).maybeAppend("text","text").style("zIndex",0).style("text",d).call(Bt,Object.assign({textBaseline:"middle",transform:o,transformOrigin:s},b)).node();const C=Kt(t).maybeAppend("background","rect").style("zIndex",-1).call(Bt,XH(P,_)).call(Bt,h?O:{}).node(),A=ZH(C,E,S,y),T=v&&new He({id:"startMarker",style:Object.assign({x:0,y:0},Pt(b,"startMarker"))}),k=g&&new He({id:"endMarker",style:Object.assign({x:0,y:0},Pt(b,"endMarker"))});Kt(t).maybeAppend("connector","path").style("zIndex",0).style("d",A).style("markerStart",T).style("markerEnd",k).call(Bt,p?M:{})});function Gc(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 KH(t,e,n,r){const i=e.length/2,a=e.slice(0,i),o=e.slice(i);let s=Gc(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=zi(Gn(f,u))/Math.PI*180;return{x:l[0],y:l[1],transform:`rotate(${d})`,textAlign:"center",textBaseline:"middle"}}function hS(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=vO(n.x,l),g=vO(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,textAlign:"start",textBaseline:"middle"}:t==="right"?{x:l,y:u/2,textAlign:"end",textBaseline:"middle"}:t==="top"?{x:l/2,y:0,textAlign:"center",textBaseline:"top"}:t==="bottom"?{x:l/2,y:u,textAlign:"center",textBaseline:"bottom"}:t==="top-left"?{x:0,y:0,textAlign:"start",textBaseline:"top"}:t==="top-right"?{x:l,y:0,textAlign:"end",textBaseline:"top"}:t==="bottom-left"?{x:0,y:u,textAlign:"start",textBaseline:"bottom"}:t==="bottom-right"?{x:l,y:u,textAlign:"end",textBaseline:"bottom"}:{x:l/2,y:u/2,textAlign:"center",textBaseline:"middle"})}function pS(t,e,n,r){const{y:i,y1:a,autoRotate:o,rotateToAlignArc:s}=n,c=r.getCenter(),l=Ts(r,e,[i,a]),{innerRadius:u,outerRadius:f,startAngle:d,endAngle:h}=l,p=t==="inside"?(d+h)/2:h,v=Ug(p,o,s),g=(()=>{const[y,m]=e,b=u+(f-u)*.5,[x,_]=t==="inside"?xu(c,p,b):rS(y,m);return{x,y:_}})();return Object.assign(Object.assign({},g),{textAlign:t==="inside"?"center":"start",textBaseline:"middle",rotate:v})}function xu(t,e,n){return[t[0]+Math.sin(e)*n,t[1]-Math.cos(e)*n]}function Ug(t,e,n){if(!e)return 0;const r=n?0:Math.sin(t)<0?90:-90;return t/Math.PI*180+r}function QH(t,e,n,r){const{y:i,y1:a,autoRotate:o,rotateToAlignArc:s,radius:c=.5,offset:l=0}=n,u=Ts(r,e,[i,a]),{startAngle:f,endAngle:d}=u,h=r.getCenter(),p=(f+d)/2,g={textAlign:"center",textBaseline:"middle",rotate:Ug(p,o,s)},{innerRadius:y,outerRadius:m}=u,x=y+(m-y)*c+l,[_,O]=xu(h,p,x);return Object.assign({x:_,y:O},g)}function vS(t){return t===void 0?null:t}function gS(t,e,n,r){const{bounds:i}=n,[a]=i;return{x:vS(a[0]),y:vS(a[1])}}function $a(t,e,n,r){const{bounds:i}=n;return i.length===1?gS(t,e,n,r):(ru(r)?pS:kc(r)?QH:hS)(t,e,n,r)}function JH(t,e,n,r,i){const[a,o]=xu(t,e,n),[s,c]=xu(t,e,r),l=Math.sin(e)>0?1:-1;return[[a,o],[s,c],[s+l*i,c]]}function yS(t,e,n){const r=Ts(n,t,[e.y,e.y1]),{innerRadius:i,outerRadius:a}=r;return i+(a-i)}function mS(t,e,n){const r=Ts(n,t,[e.y,e.y1]),{startAngle:i,endAngle:a}=r;return(i+a)/2}function Vg(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=mS(e,n,r),h=Math.sin(d)>0?1:-1,p=Ug(d,i,a),v={textAlign:h>0||ru(r)?"start":"end",textBaseline:"middle",rotate:p},g=yS(e,n,r),y=g+(s?c:o),[[m,b],[x,_],[O,w]]=JH(f,d,g,y,s?l:0),S=s?+u*h:0,M=O+S,E=w,P={connector:s,connectorPoints:[[x-M,_-E],[O-M,w-E]]};return Object.assign(Object.assign({x0:m,y0:b,x:O+S,y:w},v),P)}function t$(t,e,n,r){const{bounds:i}=n;return i.length===1?gS(t,e,n,r):(ru(r)?pS:kc(r)?Vg:hS)(t,e,n,r)}var e$=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function n$(t,e,n,r){if(!kc(r))return{};const{connectorLength:i,connectorLength2:a,connectorDistance:o}=n,s=e$(Vg("outside",e,n,r),[]),c=r.getCenter(),l=yS(e,n,r),u=mS(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 r$=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function i$(t,e,n,r){if(!kc(r))return{};const{connectorLength:i,connectorLength2:a,connectorDistance:o}=n,s=r$(Vg("outside",e,n,r),[]),{x0:c,y0:l}=s,u=r.getCenter(),d=gG(r)+i,h=Bc([c-u[0],l-u[1]]),p=Math.sin(h)>0?1:-1,[v,g]=xu(u,h,d);return s.x=v+(a+o)*p,s.y=g,s}var bS=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function a$(t,e){return t!==void 0?t:kc(e)?"inside":Mn(e)?"right":"top"}function o$(t,e,n,r,i){const{position:a}=e,{render:o}=i,s=a$(a,n),l=r[o?"htmlLabel":s==="inside"?"innerLabel":"label"],u=Object.assign({},l,e),f=lt[oS(s)];if(!f)throw new Error(`Unknown position: ${s}`);return Object.assign(Object.assign({},l),f(s,t,u,n,i))}const xS=(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=bS(o,["text","x","y","transform","transformOrigin","className"]),p=o$(a,o,n,r,t),{rotate:v=0,transform:g=""}=p,y=bS(p,["rotate","transform"]);return Kt(new dS).call(Bt,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(Bt,h).node()}};xS.props={defaultMarker:"point"};function Wn(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function s$(t,e){return Array.from(e,n=>t[n])}function Ua(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=_u(o[i],o[a]);if(s)return s}})):(n=t.map(n),r.sort((i,a)=>_u(n[i],n[a]))),s$(t,r)}return t.sort(_S(n))}function _S(t=Wn){if(t===Wn)return _u;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 _u(t,e){return(t==null||!(t>=t))-(e==null||!(e>=e))||(t<e?-1:t>e?1:0)}var c$=function(t,e){if(!Tc(t))return t;for(var n=[],r=0;r<t.length;r++){var i=t[r];e(i,r)&&n.push(i)}return n},OS=c$;function l$(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Wc(t){let e,n,r;t.length!==2?(e=Wn,n=(s,c)=>Wn(t(s),c),r=(s,c)=>t(s)-c):(e=t===Wn||t===l$?t:u$,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 u$(){return 0}function Xg(t){return t===null?NaN:+t}function*f$(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 wS=Wc(Wn),d$=wS.right,h$=wS.left,p$=Wc(Xg).center;var v$=d$;function g$(t,e,n){return Math.min(n,Math.max(e,t))}function Ou(t){return!!t.getBandWidth}function Yc(t,e,n){if(!Ou(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=h$(s,e),l=g$(c+a,0,i.length-1);return i[l]}function Eo(t,e,n){if(!e)return t.getOptions().domain;if(!Ou(t)){const c=Ua(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 gh(t,e,n,r,i,a){const{x:o,y:s}=i,c=(h,p)=>{const[v,g]=a.invert(h);return[Yc(o,v,p),Yc(s,g,p)]},l=c([t,e],!0),u=c([n,r],!1),f=Eo(o,[l[0],u[0]]),d=Eo(s,[l[1],u[1]]);return[f,d]}function yh(t,e){const[n,r]=t,i=a=>a.getStep?a.getStep():0;return[e.map(n),e.map(r)+i(e)]}function y$(t,e,n){const{x:r,y:i}=e,[a,o]=t,s=yh(a,r),c=yh(o,i),l=[s[0],c[0]],u=[s[1],c[1]],[f,d]=n.map(l),[h,p]=n.map(u);return[f,d,h,p]}const SS=Math.abs,zr=Math.atan2,Cs=Math.cos,m$=Math.max,qg=Math.min,Oa=Math.sin,Hc=Math.sqrt,Gr=1e-12,wu=Math.PI,mh=wu/2,b$=2*wu;function x$(t){return t>1?0:t<-1?wu:Math.acos(t)}function MS(t){return t>=1?mh:t<=-1?-mh:Math.asin(t)}function _$(t){return t.innerRadius}function O$(t){return t.outerRadius}function w$(t){return t.startAngle}function S$(t){return t.endAngle}function M$(t){return t&&t.padAngle}function E$(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<Gr))return d=(u*(e-a)-f*(t-i))/d,[t+d*c,e+d*l]}function bh(t,e,n,r,i,a,o){var s=t-n,c=e-r,l=(o?a:-a)/Hc(s*s+c*c),u=l*c,f=-l*s,d=t+u,h=e+f,p=n+u,v=r+f,g=(d+p)/2,y=(h+v)/2,m=p-d,b=v-h,x=m*m+b*b,_=i-a,O=d*v-p*h,w=(b<0?-1:1)*Hc(m$(0,_*_*x-O*O)),S=(O*b-m*w)/x,M=(-O*m-b*w)/x,E=(O*b+m*w)/x,P=(-O*m+b*w)/x,C=S-g,A=M-y,T=E-g,k=P-y;return C*C+A*A>T*T+k*k&&(S=E,M=P),{cx:S,cy:M,x01:-u,y01:-f,x11:S*(i/_-1),y11:M*(i/_-1)}}function xh(){var t=_$,e=O$,n=Pn(0),r=null,i=w$,a=S$,o=M$,s=null,c=Hg(l);function l(){var u,f,d=+t.apply(this,arguments),h=+e.apply(this,arguments),p=i.apply(this,arguments)-mh,v=a.apply(this,arguments)-mh,g=SS(v-p),y=v>p;if(s||(s=u=c()),h<d&&(f=h,h=d,d=f),!(h>Gr))s.moveTo(0,0);else if(g>b$-Gr)s.moveTo(h*Cs(p),h*Oa(p)),s.arc(0,0,h,p,v,!y),d>Gr&&(s.moveTo(d*Cs(v),d*Oa(v)),s.arc(0,0,d,v,p,y));else{var m=p,b=v,x=p,_=v,O=g,w=g,S=o.apply(this,arguments)/2,M=S>Gr&&(r?+r.apply(this,arguments):Hc(d*d+h*h)),E=qg(SS(h-d)/2,+n.apply(this,arguments)),P=E,C=E,A,T;if(M>Gr){var k=MS(M/d*Oa(S)),N=MS(M/h*Oa(S));(O-=k*2)>Gr?(k*=y?1:-1,x+=k,_-=k):(O=0,x=_=(p+v)/2),(w-=N*2)>Gr?(N*=y?1:-1,m+=N,b-=N):(w=0,m=b=(p+v)/2)}var F=h*Cs(m),R=h*Oa(m),I=d*Cs(_),z=d*Oa(_);if(E>Gr){var W=h*Cs(b),U=h*Oa(b),$=d*Cs(x),K=d*Oa(x),ct;if(g<wu)if(ct=E$(F,R,$,K,W,U,I,z)){var gt=F-ct[0],it=R-ct[1],et=W-ct[0],_t=U-ct[1],xt=1/Oa(x$((gt*et+it*_t)/(Hc(gt*gt+it*it)*Hc(et*et+_t*_t)))/2),Nt=Hc(ct[0]*ct[0]+ct[1]*ct[1]);P=qg(E,(d-Nt)/(xt-1)),C=qg(E,(h-Nt)/(xt+1))}else P=C=0}w>Gr?C>Gr?(A=bh($,K,F,R,h,C,y),T=bh(W,U,I,z,h,C,y),s.moveTo(A.cx+A.x01,A.cy+A.y01),C<E?s.arc(A.cx,A.cy,C,zr(A.y01,A.x01),zr(T.y01,T.x01),!y):(s.arc(A.cx,A.cy,C,zr(A.y01,A.x01),zr(A.y11,A.x11),!y),s.arc(0,0,h,zr(A.cy+A.y11,A.cx+A.x11),zr(T.cy+T.y11,T.cx+T.x11),!y),s.arc(T.cx,T.cy,C,zr(T.y11,T.x11),zr(T.y01,T.x01),!y))):(s.moveTo(F,R),s.arc(0,0,h,m,b,!y)):s.moveTo(F,R),!(d>Gr)||!(O>Gr)?s.lineTo(I,z):P>Gr?(A=bh(I,z,W,U,d,-P,y),T=bh(F,R,$,K,d,-P,y),s.lineTo(A.cx+A.x01,A.cy+A.y01),P<E?s.arc(A.cx,A.cy,P,zr(A.y01,A.x01),zr(T.y01,T.x01),!y):(s.arc(A.cx,A.cy,P,zr(A.y01,A.x01),zr(A.y11,A.x11),!y),s.arc(0,0,d,zr(A.cy+A.y11,A.cx+A.x11),zr(T.cy+T.y11,T.cx+T.x11),y),s.arc(T.cx,T.cy,P,zr(T.y11,T.x11),zr(T.y01,T.x01),!y))):s.arc(0,0,d,_,x,y)}if(s.closePath(),u)return s=null,u+""||null}return l.centroid=function(){var u=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,f=(+i.apply(this,arguments)+ +a.apply(this,arguments))/2-wu/2;return[Cs(f)*u,Oa(f)*u]},l.innerRadius=function(u){return arguments.length?(t=typeof u=="function"?u:Pn(+u),l):t},l.outerRadius=function(u){return arguments.length?(e=typeof u=="function"?u:Pn(+u),l):e},l.cornerRadius=function(u){return arguments.length?(n=typeof u=="function"?u:Pn(+u),l):n},l.padRadius=function(u){return arguments.length?(r=u==null?null:typeof u=="function"?u:Pn(+u),l):r},l.startAngle=function(u){return arguments.length?(i=typeof u=="function"?u:Pn(+u),l):i},l.endAngle=function(u){return arguments.length?(a=typeof u=="function"?u:Pn(+u),l):a},l.padAngle=function(u){return arguments.length?(o=typeof u=="function"?u:Pn(+u),l):o},l.context=function(u){return arguments.length?(s=u==null?null:u,l):s},l}var _h=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);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 ES(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=_h(i,["inset","radius","insetLeft","insetTop","insetRight","insetBottom","radiusBottomLeft","radiusBottomRight","radiusTopLeft","radiusTopRight","minWidth","maxWidth","minHeight"]);if(!dn(r)&&!kO(r)){const S=!!Mn(r),[M,,E]=S?ph(e):e,[P,C]=M,[A,T]=Gn(E,M),k=A>0?P:P+A,N=T>0?C:C+T,F=Math.abs(A),R=Math.abs(T),I=k+s,z=N+c,W=F-(s+l),U=R-(c+u),$=S?$d(W,y,1/0):$d(W,v,g),K=S?$d(U,v,g):$d(U,y,1/0),ct=S?I:I-($-W)/2,gt=S?z-(K-U)/2:z-(K-U);return Kt(t.createElement("rect",{})).style("x",ct).style("y",gt).style("width",$).style("height",K).style("radius",[h,p,d,f]).call(Bt,m).node()}const{y:b,y1:x}=n,_=r.getCenter(),O=Ts(r,e,[b,x]),w=xh().cornerRadius(o).padAngle(a*Math.PI/180);return Kt(t.createElement("path",{})).style("d",w(O)).style("transform",`translate(${_[0]}, ${_[1]})`).style("radius",o).style("inset",a).call(Bt,m).node()}const Su=(t,e)=>{const{colorAttribute:n,opacityAttribute:r="fill",first:i=!0,last:a=!0}=t,o=_h(t,["colorAttribute","opacityAttribute","first","last"]),{coordinate:s,document:c}=e;return(l,u,f)=>{const{color:d,radius:h=0}=f,p=_h(f,["color","radius"]),v=p.lineWidth||1,{stroke:g,radius:y=h,radiusTopLeft:m=y,radiusTopRight:b=y,radiusBottomRight:x=y,radiusBottomLeft:_=y,innerRadius:O=0,innerRadiusTopLeft:w=O,innerRadiusTopRight:S=O,innerRadiusBottomRight:M=O,innerRadiusBottomLeft:E=O,lineWidth:P=n==="stroke"||g?v:0,inset:C=0,insetLeft:A=C,insetRight:T=C,insetBottom:k=C,insetTop:N=C,minWidth:F,maxWidth:R,minHeight:I}=o,z=_h(o,["stroke","radius","radiusTopLeft","radiusTopRight","radiusBottomRight","radiusBottomLeft","innerRadius","innerRadiusTopLeft","innerRadiusTopRight","innerRadiusBottomRight","innerRadiusBottomLeft","lineWidth","inset","insetLeft","insetRight","insetBottom","insetTop","minWidth","maxWidth","minHeight"]),{color:W=d,opacity:U}=u,$=[i?m:w,i?b:S,a?x:M,a?_:E],K=["radiusTopLeft","radiusTopRight","radiusBottomRight","radiusBottomLeft"];Mn(s)&&K.push(K.shift());const ct=Object.assign(Object.assign({radius:y},Object.fromEntries(K.map((gt,it)=>[gt,$[it]]))),{inset:C,insetLeft:A,insetRight:T,insetBottom:k,insetTop:N,minWidth:F,maxWidth:R,minHeight:I});return Kt(ES(c,l,u,s,ct)).call(Bt,p).style("fill","transparent").style(n,W).style(zg(t),U).style("lineWidth",P).style("stroke",g===void 0?W:g).call(Bt,z).node()}};Su.props={defaultEnterAnimation:"scaleInY",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const P$={visibility:"visible",opacity:1,fillOpacity:1,strokeOpacity:1};function A$(t,e){var n;return(n=t.style[e])!==null&&n!==void 0?n:P$[e]}function Zg(t,e,n,r){t.style[e]=n,r&&t.children.forEach(i=>Zg(i,e,n,r))}function Kg(t){Zg(t,"visibility","hidden",!0)}function Oh(t){Zg(t,"visibility","visible",!0)}var Mu=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function Po(t){return Kt(t).selectAll(`.${Na}`).nodes().filter(e=>!e.__removed__)}function PS(t,e){return Qg(t,e).flatMap(({container:n})=>Po(n))}function Qg(t,e){return e.filter(n=>n!==t&&n.options.parentKey===t.options.key)}function wa(t){return Kt(t).select(`.${Ll}`).node()}function AS(t){if(t.tagName==="g")return t.getRenderBounds();const e=t.getGeometryBounds(),n=new Un;return n.setFromTransformedAABB(e,t.getWorldTransform()),n}function Jg(t,e){const{offsetX:n,offsetY:r}=e,i=AS(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 ty(t,e){const{offsetX:n,offsetY:r}=e,[i,a,o,s]=T$(t);return[Math.min(o,Math.max(i,n))-i,Math.min(s,Math.max(a,r))-a]}function T$(t){const e=t.getRenderBounds(),{min:[n,r],max:[i,a]}=e;return[n,r,i,a]}function TS(t){return e=>e.__data__.color}function ey(t){return e=>e.__data__.x}function Ls(t){const e=Array.isArray(t)?t:[t],n=new Map(e.flatMap(r=>Array.from(r.markState.keys()).map(a=>[wh(r.key,a.key),a.data])));return r=>{const{index:i,markKey:a,viewKey:o}=r.__data__;return n.get(wh(o,a))[i]}}function Va(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=A$(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 k$(t){return t===void 0?!0:typeof t!="object"?!1:Object.keys(t).length===0}function wh(t,e){return`${t},${e}`}function $c(t,e){const r=(Array.isArray(t)?t:[t]).flatMap(a=>a.marks.map(o=>[wh(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=k$(f[o])?s:f[o];for(const[h,p]of Object.entries(d)){const v=c[h],g=(y,m,b,x)=>{const _=wh(x.__data__.viewKey,x.__data__.markKey);return u!==_?v==null?void 0:v(y,m,b,x):typeof p!="function"?p:p(y,m,b,x)};c[h]=g}return c},{})}return i}function Eu(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 kS(t){var{link:e=!1,valueof:n=(u,f)=>u,coordinate:r}=t,i=Mu(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=Ua(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=Gi(),v=d[h-1],g=d[h],[y,m,b,x]=s(o(v),o(g));p.moveTo(...y),p.lineTo(...m),p.lineTo(...b),p.lineTo(...x),p.closePath();const _=xo(i,M=>n(M,v)),{fill:O=v.getAttribute("fill")}=_,w=Mu(_,["fill"]),S=new Zr({className:a,style:Object.assign({d:p.toString(),fill:O,zIndex:-2},w)});(f=v.link)===null||f===void 0||f.remove(),v.parentNode.appendChild(S),v.link=S}},u=>{var f;(f=u.link)===null||f===void 0||f.remove(),u.link=null}]}function CS(t,e,n){const r=i=>{const{transform:a}=t.style;return a?`${a} ${i}`:i};if(dn(n)){const{points:i}=t.__data__,[a,o]=Mn(n)?ph(i):i,s=n.getCenter(),c=Gn(a,s),l=Gn(o,s),u=zi(c),f=nS(c,l),d=u+f/2,h=e*Math.cos(d),p=e*Math.sin(d);return r(`translate(${h}, ${p})`)}return Mn(n)?r(`translate(${e}, 0)`):r(`translate(0, ${-e})`)}function LS(t){var{document:e,background:n,scale:r,coordinate:i,valueof:a}=t,o=Mu(t,["document","background","scale","coordinate","valueof"]);const s="element-background";if(!n)return[()=>{},()=>{}];const c=(y,m,b)=>{const x=y.invert(m),_=m+y.getBandWidth(x)/2,O=y.getStep(x)/2,w=O*b;return[_-O+w,_+O-w]},l=(y,m)=>{const{x:b}=r;if(!Ou(b))return[0,1];const{__data__:x}=y,{x:_}=x,[O,w]=c(b,_,m);return[O,w]},u=(y,m)=>{const{y:b}=r;if(!Ou(b))return[0,1];const{__data__:x}=y,{y:_}=x,[O,w]=c(b,_,m);return[O,w]},f=(y,m)=>{const{padding:b}=m,[x,_]=l(y,b),[O,w]=u(y,b),S=[[x,O],[_,O],[_,w],[x,w]].map(C=>i.map(C)),{__data__:M}=y,{y:E,y1:P}=M;return ES(e,S,{y:E,y1:P},i,m)},d=(y,m)=>{const{transform:b="scale(1.2, 1.2)",transformOrigin:x="center center",stroke:_=""}=m,O=Mu(m,["transform","transformOrigin","stroke"]),w=Object.assign({transform:b,transformOrigin:x,stroke:_},O),S=y.cloneNode(!0);for(const[M,E]of Object.entries(w))S.style[M]=E;return S},h=()=>{const{x:y,y:m}=r;return[y,m].some(Ou)};return[y=>{y.background&&y.background.remove();const m=xo(o,C=>a(C,y)),{fill:b="#CCD6EC",fillOpacity:x=.3,zIndex:_=-2,padding:O=.001,lineWidth:w=0}=m,S=Mu(m,["fill","fillOpacity","zIndex","padding","lineWidth"]),M=Object.assign(Object.assign({},S),{fill:b,fillOpacity:x,zIndex:_,padding:O,lineWidth:w}),P=(h()?f:d)(y,M);P.className=s,y.parentNode.parentNode.appendChild(P),y.background=P},y=>{var m;(m=y.background)===null||m===void 0||m.remove(),y.background=null},y=>y.className===s]}function Ao(t,e){const r=t.getRootNode().defaultView.getContextService().getDomElement();r!=null&&r.style&&(t.cursor=r.style.cursor,r.style.cursor=e)}function C$(t){Ao(t,t.cursor)}function ny(t,e,n){return t.find(r=>Object.entries(e).every(([i,a])=>n(r)[i]===a))}function Sh(t,e){return Math.sqrt(Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2))}function Pu(t,e=!1){const n=OS(t,r=>!!r).map((r,i)=>[i===0?"M":"L",...r]);return e&&n.push(["Z"]),n}function NS(t){return t.querySelectorAll(".element")}function L$(t,e,n=0){const r=[["M",...e[1]]],i=Sh(t,e[1]),a=Sh(t,e[0]);return i===0?r.push(["L",...e[3]],["A",a,a,0,n,1,...e[0]],["Z"]):r.push(["A",i,i,0,n,0,...e[2]],["L",...e[3]],["A",a,a,0,n,1,...e[0]],["Z"]),r}function Mh(t,e){if(e(t))return t;let n=t.parent;for(;n&&!e(n);)n=n.parent;return n}function jS(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 N$(t){return Mh(t,e=>e.className==="component")}function j$(t){return Mh(t,e=>e.className==="element")}function R$(t){return Mh(t,e=>e.className==="label")}function mr(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=j$(a),c=N$(a),l=R$(a),u=s||c||l;if(!u)return;const{className:f,markType:d}=u,h=Object.assign(Object.assign({},i),{nativeEvent:!0});f==="element"?(h.data={data:jS(u,e)},n.emit(`element:${t}`,h),n.emit(`${d}:${t}`,h)):f==="label"?(h.data={data:u.attributes.datum},n.emit(`label:${t}`,h),n.emit(`${o}:${t}`,h)):(n.emit(`component:${t}`,h),n.emit(`${o}:${t}`,h))}}function RS(){return(t,e,n)=>{const{container:r,view:i}=t,a=mr(Ze.CLICK,i,n,w=>w.detail===1),o=mr(Ze.DBLCLICK,i,n,w=>w.detail===2),s=mr(Ze.POINTER_TAP,i,n),c=mr(Ze.POINTER_DOWN,i,n),l=mr(Ze.POINTER_UP,i,n),u=mr(Ze.POINTER_OVER,i,n),f=mr(Ze.POINTER_OUT,i,n),d=mr(Ze.POINTER_MOVE,i,n),h=mr(Ze.POINTER_ENTER,i,n),p=mr(Ze.POINTER_LEAVE,i,n),v=mr(Ze.POINTER_UPOUTSIDE,i,n),g=mr(Ze.DRAG_START,i,n),y=mr(Ze.DRAG,i,n),m=mr(Ze.DRAG_END,i,n),b=mr(Ze.DRAG_ENTER,i,n),x=mr(Ze.DRAG_LEAVE,i,n),_=mr(Ze.DRAG_OVER,i,n),O=mr(Ze.DROP,i,n);return r.addEventListener("click",a),r.addEventListener("click",o),r.addEventListener("pointertap",s),r.addEventListener("pointerdown",c),r.addEventListener("pointerup",l),r.addEventListener("pointerover",u),r.addEventListener("pointerout",f),r.addEventListener("pointermove",d),r.addEventListener("pointerenter",h),r.addEventListener("pointerleave",p),r.addEventListener("pointerupoutside",v),r.addEventListener("dragstart",g),r.addEventListener("drag",y),r.addEventListener("dragend",m),r.addEventListener("dragenter",b),r.addEventListener("dragleave",x),r.addEventListener("dragover",_),r.addEventListener("drop",O),()=>{r.removeEventListener("click",a),r.removeEventListener("click",o),r.removeEventListener("pointertap",s),r.removeEventListener("pointerdown",c),r.removeEventListener("pointerup",l),r.removeEventListener("pointerover",u),r.removeEventListener("pointerout",f),r.removeEventListener("pointermove",d),r.removeEventListener("pointerenter",h),r.removeEventListener("pointerleave",p),r.removeEventListener("pointerupoutside",v),r.removeEventListener("dragstart",g),r.removeEventListener("drag",y),r.removeEventListener("dragend",m),r.removeEventListener("dragenter",b),r.removeEventListener("dragleave",x),r.removeEventListener("dragover",_),r.removeEventListener("drop",O)}}}RS.props={reapplyWhenUpdate:!0};function I$(){return{"component.axisRadar":Rw,"component.axisLinear":Oo,"component.axisArc":jw,"component.legendContinuousBlock":Qw,"component.legendContinuousBlockSize":Jw,"component.legendContinuousSize":Ig,"interaction.event":RS,"composition.mark":tS,"composition.view":eS,"shape.label.label":xS}}var D$=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);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 An(t,e){const n=Object.assign(Object.assign({},I$()),e),r=a=>{if(typeof a!="string")return a;const o=`${t}.${a}`;return n[o]||Pc(`Unknown Component: ${o}`)};return[(a,o)=>{const{type:s}=a,c=D$(a,["type"]);s||Pc("Plot type is required!");const l=r(s);return l==null?void 0:l(c,o)},r]}function IS(t){const{canvas:e,group:n}=t;return(e==null?void 0:e.document)||(n==null?void 0:n.ownerDocument)||Pc("Cannot find library document")}var DS=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);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 F$(t,e,n){const[r]=An("coordinate",n),{innerHeight:i,innerWidth:a,insetLeft:o,insetTop:s,insetRight:c,insetBottom:l}=t,{coordinates:u=[]}=e,f=H$(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 TO.Coordinate3D(h):new TO.Coordinate(h)}function FS(t,e){const{coordinate:n={}}=t,r=DS(t,["coordinate"]),{type:i,transform:a=[]}=n,o=DS(n,["type","transform"]);if(!i)return Object.assign(Object.assign({},r),{coordinates:a});const[,s]=An("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 na(t,e){return t.filter(n=>n.type===e)}function Ns(t){return na(t,"polar").length>0}function B$(t){return na(t,"helix").length>0}function Uc(t){return na(t,"transpose").length%2===1}function z$(t){return na(t,"parallel").length>0}function BS(t){return na(t,"theta").length>0}function G$(t){return na(t,"reflect").length>0}function Au(t){return na(t,"radial").length>0}function W$(t){return na(t,"radar").length>0}function Y$(t){return na(t,"reflectY").length>0}function H$(t){return t.find(e=>e.type==="cartesian"||e.type==="cartesian3D")?t:[...t,{type:"cartesian"}]}function be(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 $$=be("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),U$=be("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),V$=be("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),X$=be("4269d0efb118ff725c6cc5b03ca951ff8ab7a463f297bbf59c6b4e9498a0"),q$=be("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),Z$=be("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),K$=be("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),Q$=be("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),J$=be("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),tU=be("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),eU=be("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function zS(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 nU(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 zS((n-r/e)*e,o,i,a,s)}}function rU(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 zS((n-r/e)*e,i,a,o,s)}}var ry=function(t){return function(){return t}};function GS(t,e){return function(n){return t+n*e}}function iU(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 aU(t,e){var n=e-t;return n?GS(t,n>180||n<-180?n-360*Math.round(n/360):n):ry(isNaN(t)?e:t)}function oU(t){return(t=+t)==1?Vc:function(e,n){return n-e?iU(e,n,t):ry(isNaN(e)?n:e)}}function Vc(t,e){var n=e-t;return n?GS(t,n):ry(isNaN(t)?e:t)}var pgt=function t(e){var n=oU(e);function r(i,a){var o=n((i=Gl(i)).r,(a=Gl(a)).r),s=n(i.g,a.g),c=n(i.b,a.b),l=Vc(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 WS(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=Gl(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 sU=WS(nU),vgt=WS(rU),gn=t=>sU(t[t.length-1]),YS=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(be),cU=gn(YS),HS=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(be),lU=gn(HS),$S=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(be),uU=gn($S),US=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(be),fU=gn(US),VS=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(be),dU=gn(VS),XS=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(be),hU=gn(XS),qS=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(be),pU=gn(qS),ZS=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(be),vU=gn(ZS),KS=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(be),gU=gn(KS),QS=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(be),yU=gn(QS),JS=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(be),mU=gn(JS),tM=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(be),bU=gn(tM),eM=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(be),xU=gn(eM),nM=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(be),_U=gn(nM),rM=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(be),OU=gn(rM),iM=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(be),wU=gn(iM),aM=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(be),SU=gn(aM),oM=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(be),MU=gn(oM),sM=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(be),EU=gn(sM),cM=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(be),PU=gn(cM),lM=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(be),AU=gn(lM),uM=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(be),TU=gn(uM),fM=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(be),kU=gn(fM),dM=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(be),CU=gn(dM),hM=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(be),LU=gn(hM),pM=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(be),NU=gn(pM),vM=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(be),jU=gn(vM);function RU(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 IU=Math.PI/180,DU=180/Math.PI,gM=-.14861,iy=1.78277,ay=-.29227,Eh=-.90649,Tu=1.97294,yM=Tu*Eh,mM=Tu*iy,bM=iy*ay-Eh*gM;function FU(t){if(t instanceof js)return new js(t.h,t.s,t.l,t.opacity);t instanceof Ir||(t=l_(t));var e=t.r/255,n=t.g/255,r=t.b/255,i=(bM*r+yM*e-mM*n)/(bM+yM-mM),a=r-i,o=(Tu*(n-i)-ay*a)/Eh,s=Math.sqrt(o*o+a*a)/(Tu*i*(1-i)),c=s?Math.atan2(o,a)*DU-120:NaN;return new js(c<0?c+360:c,s,i,t.opacity)}function Sa(t,e,n,r){return arguments.length===1?FU(t):new js(t,e,n,r==null?1:r)}function js(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}rd(js,Sa,rv(hc,{brighter:function(e){return e=e==null?pc:Math.pow(pc,e),new js(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=e==null?ls:Math.pow(ls,e),new js(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=isNaN(this.h)?0:(this.h+120)*IU,n=+this.l,r=isNaN(this.s)?0:this.s*n*(1-n),i=Math.cos(e),a=Math.sin(e);return new Ir(255*(n+r*(gM*i+iy*a)),255*(n+r*(ay*i+Eh*a)),255*(n+r*(Tu*i)),this.opacity)}}));function xM(t){return function e(n){n=+n;function r(i,a){var o=t((i=Sa(i)).h,(a=Sa(a)).h),s=Vc(i.s,a.s),c=Vc(i.l,a.l),l=Vc(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 ggt=xM(aU),oy=xM(Vc),BU=oy(Sa(300,.5,0),Sa(-240,.5,1)),zU=oy(Sa(-100,.75,.35),Sa(80,1.5,.8)),GU=oy(Sa(260,.75,.35),Sa(80,1.5,.8)),Ph=Sa();function WU(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return Ph.h=360*t-100,Ph.s=1.5-1.5*e,Ph.l=.8-.9*e,Ph+""}var Ah=Gl(),YU=Math.PI/3,HU=Math.PI*2/3;function $U(t){var e;return t=(.5-t)*Math.PI,Ah.r=255*(e=Math.sin(t))*e,Ah.g=255*(e=Math.sin(t+YU))*e,Ah.b=255*(e=Math.sin(t+HU))*e,Ah+""}function UU(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 Th(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}var VU=Th(be("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),XU=Th(be("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),qU=Th(be("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),ZU=Th(be("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function KU(t,e,n,r,i,a){const{guide:o={}}=n,s=oV(t,e,n);if(typeof s!="string")return n;const c=sV(s,t,e,n),l=rV(s,c,n);return Object.assign(Object.assign(Object.assign({},n),lV(s,t,e,n,r)),{domain:l,range:cV(s,t,e,n,l,i,a),expectedDomain:c,guide:o,name:t,type:s})}function QU(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 JU(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=nV(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=at({},p,s),Object.assign(u,f)}else{const h=Object.assign(Object.assign({},f),{expectedDomain:f.domain,name:l,guide:As(s,i)});a.push(h)}}}return a}function tV(t){if(!t||!Array.isArray(t))return[_s,_s];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 _M(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=Ke(a)+1,s=`${i}${o}`;t[s]=r,r.getOptions().key=s}}return t}function OM(t,e){const[n]=An("scale",e),{relations:r}=t,[i]=tV(r),a=n(t);return i(a)}function eV(t){const e=t.flatMap(n=>Array.from(n.values())).flatMap(n=>n.channels.map(r=>r.scale));wM(e,"x"),wM(e,"y")}function nV(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 wM(t,e){const n=t.filter(({name:a,facet:o=!0})=>o&&a===e),r=n.flatMap(a=>a.domain),i=n.every(SM)?Ha(r):n.every(MM)?Array.from(new Set(r)):null;if(i!==null)for(const a of n)a.domain=i}function rV(t,e,n){const{ratio:r}=n;return r==null?e:SM({type:t})?iV(e,r,t):MM({type:t})?aV(e,r):e}function iV(t,e,n){const r=t.map(Number),i=new Br({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 aV(t,e){const n=Math.round(t.length*e);return t.slice(0,n)}function SM(t){const{type:e}=t;return typeof e!="string"?!1:["linear","log","pow","time"].includes(e)}function MM(t){const{type:e}=t;return typeof e!="string"?!1:["band","point","ordinal"].includes(e)}function oV(t,e,n){const{type:r,domain:i,range:a,quantitative:o,ordinal:s}=n;return r!==void 0?r:_V(e)?"identity":typeof a=="string"?"linear":(i||a||[]).length>2?sy(t,s):i!==void 0?TM([i])?sy(t,s):kM(e)?"time":PM(t,a,o):TM(e)?sy(t,s):kM(e)?"time":PM(t,a,o)}function sV(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 AM(gV(n,r),r);case"band":case"ordinal":case"point":return yV(n);case"quantile":return mV(n);case"sequential":return AM(bV(n),r);default:return[]}}function cV(t,e,n,r,i,a,o){const{range:s}=r;if(typeof s=="string")return uV(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=EM(n,r,i,a,o),[f,d]=xV(e,u);return[c!=null?c:f,l!=null?l:d]}case"band":case"point":{const u=e==="size"?5:0,f=e==="size"?10:1;return[c!=null?c:u,l!=null?l:f]}case"ordinal":return EM(n,r,i,a,o);case"sequential":return;case"constant":return[n[0][0]];default:return[]}}function lV(t,e,n,r,i){switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":return hV(i,r);case"band":case"point":return pV(t,e,i,r);case"sequential":return dV(r);default:return r}}function EM(t,e,n,r,i){const[a]=An("palette",i),{category10:o,category20:s}=r,c=uG(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=fV(l,n,u);if(d)return d;throw new Error(`Unknown Component: ${l} `)}}function uV(t){return t.split("-")}function fV(t,e,n=r=>r){if(!t)return null;const r=mo(t),i=te[`scheme${r}`],a=te[`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 dV(t){const{palette:e="ylGnBu",offset:n}=t,r=mo(e),i=te[`interpolate${r}`];if(!i)throw new Error(`Unknown palette: ${r}`);return{interpolator:n?a=>i(n(a)):i}}function hV(t,e){const{interpolate:n=du,nice:r=!1,tickCount:i=5}=e;return Object.assign(Object.assign({},e),{interpolate:n,nice:r,tickCount:i})}function pV(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=vV(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 vV(t,e,n){return e==="enterDelay"||e==="enterDuration"||e==="size"?0:t==="band"?BS(n)?0:.1:t==="point"?.5:0}function sy(t,e){return e||(OV(t)?"point":"ordinal")}function PM(t,e,n){return n||(t!=="color"||e?"linear":"sequential")}function AM(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 gV(t,e){const{zero:n=!1}=e;let r=1/0,i=-1/0;for(const a of t)for(const o of a)fn(o)&&(r=Math.min(r,+o),i=Math.max(i,+o));return r===1/0?[]:n?[Math.min(0,r),i]:[r,i]}function yV(t){return Array.from(new Set(t.flat()))}function mV(t){return t.flat().sort()}function bV(t){let e=1/0,n=-1/0;for(const r of t)for(const i of r)fn(i)&&(e=Math.min(e,+i),n=Math.max(n,+i));return e===1/0?[]:[e<0?-n:e,n]}function xV(t,e){return t==="enterDelay"?[0,1e3]:t=="enterDuration"?[300,1e3]:t.startsWith("y")||t.startsWith("position")?[1,0]:t==="color"?[lG(e),wO(e)]:t==="opacity"?[0,1]:t==="size"?[1,10]:[0,1]}function TM(t){return cy(t,e=>{const n=typeof e;return n==="string"||n==="boolean"})}function kM(t){return cy(t,e=>e instanceof Date)}function _V(t){return cy(t,Ac)}function cy(t,e){for(const n of t)if(n.some(e))return!0;return!1}function OV(t){return t.startsWith("x")||t.startsWith("y")||t.startsWith("position")||t.startsWith("size")}function wV(t){return t.startsWith("x")||t.startsWith("y")||t.startsWith("position")||t==="enterDelay"||t==="enterDuration"||t==="updateDelay"||t==="updateDuration"||t==="exitDelay"||t==="exitDuration"}function SV(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 MV={linear:"linear",identity:"identity",log:"log",pow:"pow",sqrt:"sqrt",sequential:"sequential"},EV={threshold:"threshold",quantize:"quantize",quantile:"quantile"},PV={ordinal:"ordinal",band:"band",point:"point"},AV={constant:"constant"};var To=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);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 TV(t,e,n){const{coordinates:r=[],title:i}=e,[,a]=An("component",n),o=t.filter(({guide:u})=>u!==null),s=[],c=BV(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 jV(o,r).forEach(([u,f])=>{const{props:d}=a(u),{defaultPosition:h,defaultPlane:p="xy",defaultOrientation:v,defaultSize:g,defaultOrder:y,defaultLength:m,defaultPadding:b=[0,0],defaultCrossPadding:x=[0,0]}=d,_=at({},...f),{guide:O,field:w}=_,S=Array.isArray(O)?O:[O];for(const M of S){const[E,P]=DV(u,h,v,M,f,o,r);if(!E&&!P)continue;const C=E==="left"||E==="right",A=C?b[1]:b[0],T=C?x[1]:x[0],{size:k,order:N=y,length:F=m,padding:R=A,crossPadding:I=T}=M;s.push(Object.assign(Object.assign({title:w},M),{defaultSize:g,length:F,position:E,plane:p,orientation:P,padding:R,order:N,crossPadding:I,size:k,type:u,scales:f}))}}),s}function CM(t,e,n,r,i){const[a]=An("component",r),{scaleInstances:o,scale:s,bbox:c}=t,l=To(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 kV(t){return t.map(e=>{const n=at(e,e.style);return delete n.style,n})}function ygt(t){return t.flatMap(e=>e.type=="group"?e.children:e)}function LM(t,e){const n=["left","right","bottom","top"];return Wd(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=Ke(a,u=>u.size),s=Ke(a,u=>u.order),c=Ke(a,u=>u.crossPadding),l=a[0].position;return{type:"group",size:o,order:s,position:l,children:a,crossPadding:c}})}function CV(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=Wd(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=fG(d).sort((v,g)=>g.length-v.length).map(v=>({combination:v,option:v.map(g=>[g.name,LV(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 pG)for(const{option:y,combination:m}of p)if(g.some(b=>EO(u(b),u(y))))return[v,m];return null}).filter(fn)}function LV(t){const{type:e}=t;return typeof e!="string"?null:e in MV?"continuous":e in PV?"discrete":e in EV?"distribution":e in AV?"constant":null}function NV(t,e){return t.map(n=>{const{name:r}=n;if(B$(e)||BS(e)||Uc(e)&&(Ns(e)||Au(e)))return null;if(r.startsWith("x"))return Ns(e)?["axisArc",[n]]:Au(e)?["axisLinear",[n]]:[Uc(e)?"axisY":"axisX",[n]];if(r.startsWith("y"))return Ns(e)?["axisLinear",[n]]:Au(e)?["axisArc",[n]]:[Uc(e)?"axisX":"axisY",[n]];if(r.startsWith("z"))return["axisZ",[n]];if(r.startsWith("position")){if(W$(e))return["axisRadar",[n]];if(!Ns(e))return["axisY",[n]]}return null}).filter(fn)}function jV(t,e){const n=t.filter(r=>SV(r));return[...CV(n,e),...NV(n,e)]}function ly(t){const e=na(t,"polar");if(e.length){const r=e[e.length-1],{startAngle:i,endAngle:a}=PO(r);return[i,a]}const n=na(t,"radial");if(n.length){const r=n[n.length-1],{startAngle:i,endAngle:a}=AO(r);return[i,a]}return[-Math.PI/2,Math.PI/2*3]}function RV(t){const e=/position(\d*)/g.exec(t);return e?+e[1]:null}function IV(t,e,n,r,i){const{name:a}=n[0];if(t==="axisRadar"){const o=r.filter(f=>f.name.startsWith("position")),s=RV(a);if(a===o.slice(-1)[0].name||s===null)return[null,null];const[c,l]=ly(i);return["center",(l-c)/(o.length-1)*s+c]}if(t==="axisY"&&z$(i))return Uc(i)?["center","horizontal"]:["center","vertical"];if(t==="axisLinear"){const[o]=ly(i);return["center",o]}return t==="axisArc"?e[0]==="inner"?["inner",null]:["outer",null]:Ns(i)?["center",null]:Au(i)?["center",null]:t==="axisX"&&G$(i)||t==="axisX"&&Y$(i)?["top",null]:e}function DV(t,e,n,r,i,a,o){const[s]=ly(o),c=[r.position||e,s!=null?s:n];return typeof t=="string"&&t.startsWith("axis")?IV(t,c,i,a,o):typeof t=="string"&&t.startsWith("legend")&&Ns(o)&&r.position==="center"?["center","vertical"]:c}function FV(t,e,n=[]){return t==="x"?Uc(n)?`${e}Y`:`${e}X`:t==="y"?Uc(n)?`${e}X`:`${e}Y`:null}function BV(t,e,n){const[,r]=An("component",n),{coordinates:i}=t;function a(o,s,c,l){const u=FV(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 NM(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")?HV:c.startsWith("group")?zV:c.startsWith("legendContinuous")?$V:c==="legendCategory"?UV:c.startsWith("slider")?YV:c==="title"?WV:c.startsWith("scrollbar")?GV:()=>{})()(t,e,n,r,i,a)}function zV(t,e,n,r,i,a){const{children:o}=t,s=Ke(o,l=>l.crossPadding);o.forEach(l=>l.crossPadding=s),o.forEach(l=>NM(l,e,n,r,i,a));const c=Ke(o,l=>l.size);t.size=c,o.forEach(l=>l.size=c)}function GV(t,e,n,r,i,a){const{trackSize:o=6}=at({},i.scrollbar,t);t.size=o}function WV(t,e,n,r,i,a){const o=at({},i.title,t),{title:s,subtitle:c,spacing:l=0}=o,u=To(o,["title","subtitle","spacing"]);if(s){const f=Pt(u,"title"),d=Nh(s,f);t.size=d.height}if(c){const f=Pt(u,"subtitle"),d=Nh(c,f);t.size+=l+d.height}}function YV(t,e,n,r,i,a){const o=()=>{const{slider:u}=i;return at({},u,t)},{trackSize:s,handleIconSize:c}=o(),l=Math.max(s,c*2.4);t.size=l}function HV(t,e,n,r,i,a){t.transform=t.transform||[{type:"hide"}];const o=r==="left"||r==="right",s=jM(t,r,i),{tickLength:c=0,labelSpacing:l=0,titleSpacing:u=0,labelAutoRotate:f}=s,d=To(s,["tickLength","labelSpacing","titleSpacing","labelAutoRotate"]),h=kh(t,a),p=Ch(d,h),v=c+l;if(p&&p.length){const y=Ke(p,b=>b.width),m=Ke(p,b=>b.height);if(o)t.size=y+v;else{const{tickFilter:b,labelTransform:x}=t;qV(h,p,e,n,b)&&!x&&f!==!1&&f!==null?(t.labelTransform="rotate(90)",t.size=y+v):t.size=m+v}}else t.size=c;const g=Lh(d);g&&(o?t.size+=u+g.width:t.size+=u+g.height)}function $V(t,e,n,r,i,a){const s=(()=>{const{legendContinuous:x}=i;return at({},x,t)})(),{labelSpacing:c=0,titleSpacing:l=0}=s,u=To(s,["labelSpacing","titleSpacing"]),f=r==="left"||r==="right",d=Pt(u,"ribbon"),{size:h}=d,p=Pt(u,"handleIcon"),{size:v}=p,g=Math.max(h,v*2.4);t.size=g;const y=kh(t,a),m=Ch(u,y);if(m){const x=f?"width":"height",_=Ke(m,O=>O[x]);t.size+=_+c}const b=Lh(u);b&&(f?t.size=Math.max(t.size,b.width):t.size+=l+b.height)}function UV(t,e,n,r,i,a){const s=(()=>{const{legendCategory:T}=i,{title:k}=t,[N,F]=Array.isArray(k)?[k,void 0]:[void 0,k];return at({title:N},T,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=To(s,["itemSpacing","itemMarkerSize","titleSpacing","rowPadding","colPadding","maxCols","maxRows"]),{cols:g,length:y}=t,m=T=>Math.min(T,p),b=T=>Math.min(T,h),x=r==="left"||r==="right",_=y===void 0?e+(x?0:n[0]+n[1]):y,O=Lh(v),w=kh(t,a),S=Ch(v,w,"itemLabel"),M=Math.max(S[0].height,l)+f,E=(T,k=0)=>l+T+c[0]+k;x?(()=>{let T=-1/0,k=0,N=1,F=0,R=-1/0,I=-1/0;const z=O?O.height:0,W=_-z;for(const{width:U}of S){const $=E(U,d);T=Math.max(T,$),k+M>W?(N++,R=Math.max(R,F),I=Math.max(I,k),F=1,k=M):(k+=M,F++)}N<=1&&(R=F,I=k),t.size=T*b(N),t.length=I+z,at(t,{cols:b(N),gridRow:R})})():typeof g=="number"?(()=>{const T=Math.ceil(S.length/g),k=Ke(S,N=>E(N.width))*g;t.size=M*m(T)-f,t.length=Math.min(k,_)})():(()=>{let T=1,k=0,N=-1/0;for(const{width:F}of S){const R=E(F,d);k+R>_?(N=Math.max(N,k),k=R,T++):k+=R}T===1&&(N=k),t.size=M*m(T)-f,t.length=N})(),O&&(x?t.size=Math.max(t.size,O.width):t.size+=u+O.height)}function kh(t,e){const[n]=An("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 Ch(t,e,n="label"){const{labelFormatter:r,tickFilter:i,label:a=!0}=t,o=To(t,["labelFormatter","tickFilter","label"]);if(!a)return null;const s=VV(e,r,i),c=Pt(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 Nh(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 Lh(t){const e=l=>l===!1||l===null,{title:n}=t,r=To(t,["title"]);if(e(n)||n===void 0)return null;const i=Pt(r,"title"),{direction:a,transform:o}=i,s=Array.isArray(n)?n.join(","):n;return typeof s!="string"?null:Nh(s,Object.assign(Object.assign({},i),{transform:o||(a==="vertical"?"rotate(-90)":"")}))}function jM(t,e,n){const{title:r}=t,[i,a]=Array.isArray(r)?[r,void 0]:[void 0,r],{axis:o,[`axis${ig(e)}`]:s}=n;return at({title:i},o,s,Object.assign(Object.assign({},t),{title:a}))}function RM(t,e){const n=t.getTicks?t.getTicks():t.getOptions().domain;return e?n.filter(e):n}function VV(t,e,n){const i=RM(t,n).map(o=>typeof o=="number"?Ud(o):o),a=e?typeof e=="string"?bo(e):e:t.getFormatter?t.getFormatter():o=>`${o}`;return i.map(a)}function XV(t,e){return t.getBandWidth?t.getBandWidth(e)/2:0}function qV(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=RM(t,i),c=s.map(h=>o.map(h)+XV(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 Nh(t,e){const n=ZV(t),{filter:r}=e,i=To(e,["filter"]);return n.attr(Object.assign(Object.assign({},i),{visibility:"none"})),n.getBBox()}function ZV(t){return t instanceof Fr?t:new fi({style:{text:`${t}`}})}function Oi(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 KV(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 QV(t,e,n,r){var i,a;const{width:o,height:s,depth:c,x:l=0,y:u=0,z:f=0,inset:d=(i=n.inset)!==null&&i!==void 0?i:0,insetLeft:h=d,insetTop:p=d,insetBottom:v=d,insetRight:g=d,margin:y=(a=n.margin)!==null&&a!==void 0?a:0,marginLeft:m=y,marginBottom:b=y,marginTop:x=y,marginRight:_=y,padding:O=n.padding,paddingBottom:w=O,paddingLeft:S=O,paddingRight:M=O,paddingTop:E=O}=tX(t,e,n,r),P=1/4,C=(xt,Nt,Gt,Qt,Jt)=>{const{marks:pe}=e;if(pe.length===0)return[Qt,Jt];if(xt-Qt-Jt-xt*P>0)return[Qt,Jt];const ye=xt*(1-P);return[Nt==="auto"?ye*Qt/(Qt+Jt):Qt,Gt==="auto"?ye*Jt/(Qt+Jt):Jt]},A=xt=>xt==="auto"?20:xt!=null?xt:20,T=A(E),k=A(w),N=IM(t,s-T-k,[T+x,k+b],["left","right"],e,n,r),{paddingLeft:F,paddingRight:R}=N,I=o-m-_,[z,W]=C(I,S,M,F,R),U=I-z-W,$=IM(t,U,[z+m,W+_],["bottom","top"],e,n,r),{paddingTop:K,paddingBottom:ct}=$,gt=s-b-x,[it,et]=C(gt,w,E,ct,K),_t=gt-it-et;return{width:o,height:s,depth:c,insetLeft:h,insetTop:p,insetBottom:v,insetRight:g,innerWidth:U,innerHeight:_t,paddingLeft:z,paddingRight:W,paddingTop:et,paddingBottom:it,marginLeft:m,marginBottom:b,marginTop:x,marginRight:_,x:l,y:u,z:f}}function JV(t){const{height:e,width:n,padding:r=0,paddingLeft:i=r,paddingRight:a=r,paddingTop:o=r,paddingBottom:s=r,margin:c=16,marginLeft:l=c,marginRight:u=c,marginTop:f=c,marginBottom:d=c,inset:h=0,insetLeft:p=h,insetRight:v=h,insetTop:g=h,insetBottom:y=h}=t,m=_=>_==="auto"?20:_,b=n-m(i)-m(a)-l-u-p-v,x=e-m(o)-m(s)-f-d-g-y;return{width:b,height:x}}function tX(t,e,n,r){const{coordinates:i}=e;if(!Ns(i)&&!Au(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 jM(y,m,n)}),s=Ke(o,y=>{var m;return(m=y.labelSpacing)!==null&&m!==void 0?m:0}),c=a.flatMap((y,m)=>{const b=o[m],x=kh(y,r);return Ch(b,x)}).filter(fn),l=Ke(c,y=>y.height)+s,u=a.flatMap((y,m)=>{const b=o[m];return Lh(b)}).filter(y=>y!==null),f=u.length===0?0:Ke(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 IM(t,e,n,r,i,a,o){const s=Ln(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${ig(oS(p))}`,g=s.get(p)||[],y=h[v],m=M=>{M.size===void 0&&(M.size=M.defaultSize)},b=M=>{M.type==="group"?(M.children.forEach(m),M.size=Ke(M.children,E=>E.size)):M.size=M.defaultSize},x=M=>{M.size||(y!=="auto"?b(M):(NM(M,e,n,p,a,o),m(M)))},_=M=>{M.type.startsWith("axis")&&M.labelAutoHide===void 0&&(M.labelAutoHide=!0)},O=p==="bottom"||p==="top",w=Oi(g,M=>M.order),S=g.filter(M=>M.type.startsWith("axis")&&M.order==w);if(S.length&&(S[0].crossPadding=0),typeof y=="number")g.forEach(m),g.forEach(_);else if(g.length===0)h[v]=0;else{const M=O?e+n[0]+n[1]:e,E=LM(g,M);E.forEach(x);const P=E.reduce((C,{size:A,crossPadding:T=12})=>C+A+T,0);h[v]=P}}return h}function eX(t,e,n){const r=Ln(t,O=>`${O.plane||"xy"}-${O.position}`),{paddingLeft:i,paddingRight:a,paddingTop:o,paddingBottom:s,marginLeft:c,marginTop:l,marginBottom:u,marginRight:f,innerHeight:d,innerWidth:h,insetBottom:p,insetLeft:v,insetRight:g,insetTop:y,height:m,width:b,depth:x}=n,_={xy:uy({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:uy({width:x,height:m,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,marginLeft:0,marginTop:0,marginBottom:0,marginRight:0,innerWidth:x,innerHeight:m,insetBottom:0,insetLeft:0,insetRight:0,insetTop:0}),xz:uy({width:b,height:x,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,marginLeft:0,marginTop:0,marginBottom:0,marginRight:0,innerWidth:b,innerHeight:x,insetBottom:0,insetLeft:0,insetRight:0,insetTop:0})};for(const[O,w]of r.entries()){const[S,M]=O.split("-"),E=_[S][M],[P,C]=SO(w,A=>typeof A.type!="string"?!1:!!(M==="center"||A.type.startsWith("axis")&&["inner","outer"].includes(M)));P.length&&nX(P,e,E,M),C.length&&fX(w,e,E)}}function uy({width:t,height:e,paddingLeft:n,paddingRight:r,paddingTop:i,paddingBottom:a,marginLeft:o,marginTop:s,marginBottom:c,marginRight:l,innerHeight:u,innerWidth:f,insetBottom:d,insetLeft:h,insetRight:p,insetTop:v}){const g=n+o,y=i+s,m=r+l,b=a+c,x=t-o-l,_=[g+h,y+v,f-h-p,u-v-d,"center",null,null];return{top:[g,0,f,y,"vertical",!0,Wn,o,x],right:[t-m,y,m,u,"horizontal",!1,Wn],bottom:[g,e-b,f,b,"vertical",!1,Wn,o,x],left:[0,y,g,u,"horizontal",!0,Wn],"top-left":[g,0,f,y,"vertical",!0,Wn],"top-right":[g,0,f,y,"vertical",!0,Wn],"bottom-left":[g,e-b,f,b,"vertical",!1,Wn],"bottom-right":[g,e-b,f,b,"vertical",!1,Wn],center:_,inner:_,outer:_}}function nX(t,e,n,r){const[i,a]=SO(t,o=>!!(typeof o.type=="string"&&o.type.startsWith("axis")));rX(i,e,n,r),dX(a,e,n)}function rX(t,e,n,r){r==="center"?vG(e)?uX(t,e,n,r):dn(e)?oX(t,e,n):iu(e)&&sX(t,e,n,t[0].orientation):r==="inner"?iX(t,e,n):r==="outer"&&aX(t,e,n)}function iX(t,e,n){const[r,i,,a]=n,[o,s]=e.getCenter(),[c]=Vd(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 aX(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 oX(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 sX(t,e,n,r){r==="horizontal"?lX(t,e,n):r==="vertical"&&cX(t,e,n)}function cX(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 lX(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 uX(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 fX(t,e,n){const[r,i,a,o,s,c,l,u,f]=n,[d,h,p,v,g,y,m,b]=s==="vertical"?["y",i,"x",r,"height",o,"width",a]:["x",r,"y",i,"width",a,"height",o];t.sort((M,E)=>l==null?void 0:l(M.order,E.order));const x=M=>M==="title"||M==="group"||M.startsWith("legend"),_=(M,E,P)=>P===void 0?E:x(M)?P:E,O=(M,E,P)=>P===void 0?E:x(M)?P:E,w=c?h+y:h;for(let M=0,E=w;M<t.length;M++){const P=t[M],{crossPadding:C=0,type:A}=P,{size:T}=P;P.bbox={[d]:c?E-T-C:E+C,[p]:O(A,v,u),[g]:T,[m]:_(A,b,f)},E+=(T+C)*(c?-1:1)}const S=t.filter(M=>M.type==="group");for(const M of S){const{bbox:E,children:P}=M,C=E[m],A=C/P.length,T=P.reduce((I,z)=>{var W;const U=(W=z.layout)===null||W===void 0?void 0:W.justifyContent;return U||I},"flex-start"),k=P.map((I,z)=>{const{length:W=A,padding:U=0}=I;return W+(z===P.length-1?0:U)}),N=Di(k),F=C-N,R=T==="flex-start"?0:T==="center"?F/2:F;for(let I=0,z=E[p]+R;I<P.length;I++){const W=P[I],{padding:U=0}=W,$=I===P.length-1?0:U;W.bbox={[g]:E[g],[d]:E[d],[p]:z,[m]:k[I]-$},at(W,{layout:{justifyContent:T}}),z+=k[I]}}}function dX(t,e,n){if(t.length===0)return;const[r,i,a,o]=n,[s]=Vd(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 Ma(t,e,n={},r=!1){if(za(t)||Array.isArray(t)&&r)return t;const i=Pt(t,e);return at(n,i)}function jh(t,e={}){return za(t)||Array.isArray(t)||!DM(t)?t:at(e,t)}function DM(t){if(Object.keys(t).length===0)return!0;const{title:e,items:n}=t;return e!==void 0||n!==void 0}function Ea(t,e){return typeof t=="object"?Pt(t,e):t}var hX=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())})},Xc=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function pX(t,e,n){const{encode:r={},scale:i={},transform:a=[]}=e,o=Xc(e,["encode","scale","transform"]);return[t,Object.assign(Object.assign({},o),{encode:r,scale:i,transform:a})]}function FM(t,e,n){return hX(this,void 0,void 0,function*(){const{library:r}=n,{data:i}=e,[a]=An("data",r),o=PX(i),{transform:s=[]}=o,u=[Xc(o,["transform"]),...s].map(a),f=yield Xz(u)(i),d=i&&!Array.isArray(i)&&!Array.isArray(f)?{value:f}:f;return[Array.isArray(f)?Os(f):[],Object.assign(Object.assign({},e),{data:d})]})}function vX(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 gX(t,e,n){const{encode:r,data:i}=e;if(!r)return[t,e];const a=xo(r,o=>SX(o)?o:{type:MX(i,o),value:o});return[t,Object.assign(Object.assign({},e),{encode:a})]}function yX(t,e,n){const{encode:r}=e;if(!r)return[t,e];const i=xo(r,(a,o)=>{const{type:s}=a;return s!=="constant"||wV(o)?a:Object.assign(Object.assign({},a),{constant:!0})});return[t,Object.assign(Object.assign({},e),{encode:i})]}function mX(t,e,n){const{encode:r,data:i}=e;if(!r)return[t,e];const{library:a}=n,o=kX(a),s=xo(r,c=>o(i,c));return[t,Object.assign(Object.assign({},e),{encode:s})]}function bX(t,e,n){const{tooltip:r={}}=e;return za(r)?[t,e]:Array.isArray(r)?[t,Object.assign(Object.assign({},e),{tooltip:{items:r}})]:Ac(r)&&DM(r)?[t,Object.assign(Object.assign({},e),{tooltip:r})]:[t,Object.assign(Object.assign({},e),{tooltip:{items:[r]}})]}function xX(t,e,n){const{data:r,encode:i,tooltip:a={}}=e;if(za(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(Ac(f)){const{field:d,channel:h,color:p,name:v=d,valueFormatter:g=O=>O}=f,y=typeof g=="string"?bo(g):g,m=h&&i[h],b=m&&i[h].field,x=v||b||h,_=[];for(const O of t){const w=d?r[O][d]:m?i[h].value[O]:null;_[O]={name:x,color:p,value:y(w)}}return _}if(typeof f=="function"){const d=[];for(const h of t){const p=f(r[h],h,r,i);Ac(p)?d[h]=p:d[h]={value:p}}return d}return f},{title:s,items:c=[]}=a,l=Xc(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 _X(t,e,n){const{encode:r}=e,i=Xc(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=Xc(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 OX(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 at(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 wX(t,e,n){const{animate:r}=e;return r||r===void 0?[t,e]:(at(e,{animate:{enter:{type:null},exit:{type:null},update:{type:null}}}),[t,e])}function SX(t){if(typeof t!="object"||t instanceof Date||t===null)return!1;const{type:e}=t;return fn(e)}function MX(t,e){return typeof e=="function"?"transform":typeof e=="string"&&EX(t,e)?"field":"constant"}function EX(t,e){return Array.isArray(t)?t.some(n=>n[e]!==void 0):!1}function PX(t){if(vn(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=Xc(t,["type"]);return Object.assign(Object.assign({},n),{type:e})}var BM=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())})},AX=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);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 TX(t,e,n){return BM(this,void 0,void 0,function*(){const r={library:n},[i,a]=yield CX(t,e,r),{encode:o,scale:s,data:c,tooltip:l}=a;if(Array.isArray(c)===!1)return null;const{channels:u}=e,f=ng(Object.entries(o).filter(([,h])=>fn(h)),h=>h.map(([p,v])=>Object.assign({name:p},v)),([h])=>{var p;const v=(p=/([^\d]+)\d*$/.exec(h))===null||p===void 0?void 0:p[1],g=u.find(y=>y.name===v);return g!=null&&g.independent?h:v}),d=u.filter(h=>{const{name:p,required:v}=h;if(f.find(([g])=>g===p))return!0;if(v)throw new Error(`Missing encoding for channel: ${p}.`);return!1}).flatMap(h=>{const{name:p,scale:v,scaleKey:g,range:y,quantitative:m,ordinal:b}=h;return f.filter(([_])=>_.startsWith(p)).map(([_,O],w)=>{const S=O.some(F=>F.visual),M=O.some(F=>F.constant),E=s[_]||{},{independent:P=!1,key:C=g||_,type:A=M?"constant":S?"identity":v}=E,T=AX(E,["independent","key","type"]),k=A==="constant",N=k?void 0:y;return{name:_,values:O,scaleKey:P||k?Symbol("independent"):C,scale:Object.assign(Object.assign({type:A,range:N},T),{quantitative:m,ordinal:b})}})});return[a,Object.assign(Object.assign({},e),{index:i,channels:d,tooltip:l})]})}function kX(t){const[e]=An("encode",t);return(n,r)=>r===void 0||n===void 0?null:Object.assign(Object.assign({},r),{type:"column",value:e(r)(n),field:LX(r)})}function CX(t,e,n){return BM(this,void 0,void 0,function*(){const{library:r}=n,[i]=An("transform",r),{preInference:a=[],postInference:o=[]}=e,{transform:s=[]}=t,c=[pX,FM,vX,gX,yX,mX,_X,wX,OX,bX,...a.map(i),...s.map(i),...o.map(i),xX];let l=[],u=t;for(const f of c)[l,u]=yield f(l,u,n);return[l,u]})}function LX(t){const{type:e,value:n}=t;return e==="field"&&typeof n=="string"?n:null}var Xa=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())})},ko=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function fy(t,e,n,r){var i;return Xa(this,void 0,void 0,function*(){const[a]=An("composition",n),[o]=An("interaction",n),s=new Set(Object.keys(n).map(A=>{var T;return(T=/mark\.(.*)/.exec(A))===null||T===void 0?void 0:T[1]}).filter(fn)),c=new Set(Object.keys(n).map(A=>{var T;return(T=/component\.(.*)/.exec(A))===null||T===void 0?void 0:T[1]}).filter(fn)),l=A=>{const{type:T}=A;if(typeof T=="function"){const{props:k={}}=T,{composite:N=!0}=k;if(N)return"mark"}return typeof T!="string"?T:s.has(T)||c.has(T)?"mark":T},u=A=>l(A)==="mark",f=A=>l(A)==="standardView",d=A=>{const{type:T}=A;return typeof T!="string"?!1:!!c.has(T)},h=A=>{if(f(A))return[A];const T=l(A);return a({type:T,static:d(A)})(A)},p=[],v=new Map,g=new Map,y=[t],m=[];for(;y.length;){const A=y.shift();if(f(A)){const T=g.get(A),[k,N]=T?YM(T,A,n):yield GM(A,n);v.set(k,A),p.push(k);const F=N.flatMap(h).map(R=>FS(R,n));if(y.push(...F),F.every(f)){const R=yield Promise.all(F.map(I=>WM(I,n)));eV(R);for(let I=0;I<F.length;I++){const z=F[I],W=R[I];g.set(z,W)}}}else{const T=u(A)?A:yield VM(A,n),k=h(T);Array.isArray(k)?y.push(...k):typeof k=="function"&&m.push(k())}}r.emitter.emit(Ze.BEFORE_PAINT);const b=new Map,x=new Map,_=[];e.selectAll(Pa(G0)).data(p,A=>A.key).join(A=>A.append("g").attr("className",G0).attr("id",T=>T.key).call(zM).each(function(T,k,N){hy(T,Kt(N),_,n,r),b.set(T,N)}),A=>A.call(zM).each(function(T,k,N){hy(T,Kt(N),_,n,r),x.set(T,N)}),A=>A.each(function(T,k,N){const F=N.nameInteraction.values();for(const R of F)R.destroy()}).remove());const O=(A,T,k)=>Array.from(A.entries()).map(([N,F])=>{const R=k||new Map,I=(U,$=K=>K)=>R.set(U,$),z=v.get(N),W=jX(Kt(F),z,n,r);return{view:N,container:F,options:z,setState:I,update:(U,$)=>Xa(this,void 0,void 0,function*(){const ct=rg(Array.from(R.values()))(z);return yield W(ct,U,()=>{sr($)&&T(A,$,R)})})}}),w=(A=x,T,k)=>{var N;const F=O(A,w,k);for(const R of F){const{options:I,container:z}=R,W=z.nameInteraction;let U=Rh(I);T&&(U=U.filter($=>T.includes($[0])));for(const $ of U){const[K,ct]=$,gt=W.get(K);if(gt&&((N=gt.destroy)===null||N===void 0||N.call(gt)),ct){const et=dy(R.view,K,ct,o)(R,F,r.emitter);W.set(K,{destroy:et})}}}},S=O(b,w);for(const A of S){const{options:T}=A,k=new Map;A.container.nameInteraction=k;for(const N of Rh(T)){const[F,R]=N;if(R){const z=dy(A.view,F,R,o)(A,S,r.emitter);k.set(F,{destroy:z})}}}w();const{width:M,height:E}=t,P=[];for(const A of m){const T=new Promise(k=>Xa(this,void 0,void 0,function*(){for(const N of A){const F=Object.assign({width:M,height:E},N);yield fy(F,e,n,r)}k()}));P.push(T)}r.views=p,(i=r.animations)===null||i===void 0||i.forEach(A=>A==null?void 0:A.cancel()),r.animations=_,r.emitter.emit(Ze.AFTER_PAINT);const C=_.filter(fn).map(qX).map(A=>A.finished);return Promise.all([...C,...P])})}function zM(t){t.style("transform",e=>`translate(${e.layout.x}, ${e.layout.y})`)}function NX(t){const[,e]=An("interaction",t);return n=>{const[r,i]=n;try{return[r,e(r)]}catch(a){return[r,i.type]}}}function jX(t,e,n,r){const i=NX(n),a=c=>c[1]&&c[1].props&&c[1].props.reapplyWhenUpdate,s=Rh(e).map(i).filter(a).map(c=>c[0]);return(c,l,u)=>Xa(this,void 0,void 0,function*(){const f=[],[d,h]=yield GM(c,n);hy(d,t,f,n,r);for(const p of s.filter(v=>v!==l))RX(p,t,c,d,n,r);for(const p of h)fy(p,t,n,r);return u(),{options:c,view:d}})}function RX(t,e,n,r,i,a){var o;const[s]=An("interaction",i),l=e.node().nameInteraction,u=Rh(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=dy(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 GM(t,e){return Xa(this,void 0,void 0,function*(){const n=yield DX(t,e),r=IX(n);t.interaction=r.interaction,t.coordinate=r.coordinate,t.marks=[...r.marks,...r.components];const i=FS(r,e),a=yield WM(i,e);return YM(a,i,e)})}function IX(t){const{coordinate:e={},interaction:n={},style:r={},marks:i}=t,a=ko(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)=>at(d,h),{}),u=[n,...s].reduce((d,h)=>at(d,h),{}),f=[...c,r].reduce((d,h)=>at(d,h),{});return Object.assign(Object.assign({},a),{marks:i,coordinate:l,interaction:u,style:f})}function DX(t,e){return Xa(this,void 0,void 0,function*(){const[n,r]=An("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(fn)),{marks:a}=t,o=[],s=[],c=[...a],{width:l,height:u}=JV(t),f={options:t,width:l,height:u};for(;c.length;){const[d]=c.splice(0,1),h=yield VM(d,e),{type:p=Pc("G2Mark type is required."),key:v}=h;if(i.has(p))s.push(h);else{const{props:g={}}=r(p),{composite:y=!0}=g;if(!y)o.push(h);else{const{data:m}=h,b=Object.assign(Object.assign({},h),{data:m&&(Array.isArray(m)?m:m.value)}),x=yield n(b,f),_=Array.isArray(x)?x:[x];c.unshift(..._.map((O,w)=>Object.assign(Object.assign({},O),{key:`${v}-${w}`})))}}}return Object.assign(Object.assign({},t),{marks:o,components:s})})}function WM(t,e){return Xa(this,void 0,void 0,function*(){const[n]=An("theme",e),[,r]=An("mark",e),{theme:i,marks:a,coordinates:o=[]}=t,s=n(UM(i)),c=new Map;for(const u of a){const{type:f}=u,{props:d={}}=r(f),h=yield TX(u,d,e);if(h){const[p,v]=h;c.set(p,v)}}const l=Ln(Array.from(c.values()).flatMap(u=>u.channels),({scaleKey:u})=>u);for(const u of l.values()){const f=u.reduce((b,{scale:x})=>at(b,x),{}),{scaleKey:d}=u[0],{values:h}=u[0],p=Array.from(new Set(h.map(b=>b.field).filter(fn))),v=at({guide:{title:p.length===0?void 0:p},field:p[0]},f),{name:g}=u[0],y=u.flatMap(({values:b})=>b.map(x=>x.value)),m=Object.assign(Object.assign({},KU(g,y,v,o,s,e)),{key:d});u.forEach(b=>b.scale=m)}return c})}function dy(t,e,n,r){const i=t.theme,a=typeof e=="string"?i[e]||{}:{};return r(at(a,Object.assign({type:e},n)))}function YM(t,e,n){const[r]=An("mark",n),[i]=An("theme",n),[a]=An("labelTransform",n),{key:o,frame:s=!1,theme:c,clip:l,style:u={},labelTransform:f=[]}=e,d=i(UM(c)),h=Array.from(t.values()),p=JU(h,e),v=kV(TV(JX(Array.from(p),h,t),e,n)),g=QV(v,e,d,n),y=F$(g,e,n),m=s?at({mainLineWidth:1,mainStroke:"#000"},u):u;eX(LM(v),y,g),KV(v);const b={};for(const O of v){const{scales:w=[]}=O,S=[];for(const M of w){const{name:E}=M,P=OM(M,n);S.push(P),E==="y"&&P.update(Object.assign(Object.assign({},P.getOptions()),{xScale:b.x})),_M(b,{[E]:P})}O.scaleInstances=S}const x=[];for(const[O,w]of t.entries()){const{children:S,dataDomain:M,modifier:E,key:P}=O,{index:C,channels:A,tooltip:T}=w,k=Object.fromEntries(A.map(({name:et,scale:_t})=>[et,_t])),N=xo(k,et=>OM(et,n));_M(b,N);const F=QU(A,N),R=r(O),[I,z,W]=zX(R(C,N,F,y)),U=M||I.length,$=E?E(z,U,g):[],K=et=>{var _t,xt;return(xt=(_t=T.title)===null||_t===void 0?void 0:_t[et])===null||xt===void 0?void 0:xt.value},ct=et=>T.items.map(_t=>_t[et]),gt=I.map((et,_t)=>{const xt=Object.assign({points:z[_t],transform:$[_t],index:et,markKey:P,viewKey:o},T&&{title:K(et),items:ct(et)});for(const[Nt,Gt]of Object.entries(F))xt[Nt]=Gt[et],W&&(xt[`series${mo(Nt)}`]=W[_t].map(Qt=>Gt[Qt]));return W&&(xt.seriesIndex=W[_t]),W&&T&&(xt.seriesItems=W[_t].map(Nt=>ct(Nt)),xt.seriesTitle=W[_t].map(Nt=>K(Nt))),xt});w.data=gt,w.index=I;const it=S==null?void 0:S(gt,N,g);x.push(...it||[])}return[{layout:g,theme:d,coordinate:y,markState:t,key:o,clip:l,scale:b,style:m,components:v,labelTransform:rg(f.map(a))},x]}function hy(t,e,n,r,i){return Xa(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=ko(s,["x","y","width","height"]),b=["view","plot","main","content"],x=b.map((R,I)=>I),_=["a","margin","padding","inset"],O=b.map(R=>pO(Object.assign({},o.view,f),R)),w=_.map(R=>Pt(m,R)),S=R=>R.style("x",I=>A[I].x).style("y",I=>A[I].y).style("width",I=>A[I].width).style("height",I=>A[I].height).each(function(I,z,W){tq(Kt(W),O[I])});let M=0,E=0,P=g,C=y;const A=x.map(R=>{const I=w[R],{left:z=0,top:W=0,bottom:U=0,right:$=0}=I;return M+=z,E+=W,P-=z+$,C-=W+U,{x:M,y:E,width:P,height:C}});e.selectAll(Pa(_x)).data(x.filter(R=>fn(O[R])),R=>b[R]).join(R=>R.append("rect").attr("className",_x).style("zIndex",-2).call(S),R=>R.call(S),R=>R.remove());const T=HX(c),k=T?{duration:T[1]}:!1;for(const[,R]of Wd(a,I=>`${I.type}-${I.position}`))R.forEach((I,z)=>I.index=z);const N=e.selectAll(Pa(xx)).data(a,R=>`${R.type}-${R.position}-${R.index}`).join(R=>R.append("g").style("zIndex",({zIndex:I})=>I||-1).attr("className",xx).append(I=>CM(at({animate:k,scale:h},I),l,o,r,c)),R=>R.transition(function(I,z,W){const{preserve:U=!1}=I;if(U)return;const $=CM(at({animate:k,scale:h},I),l,o,r,c),{attributes:K}=$,[ct]=W.childNodes;return ct.update(K,!1)})).transitions();n.push(...N.flat().filter(fn));const F=e.selectAll(Pa(Ll)).data([s],()=>u).join(R=>R.append("rect").style("zIndex",0).style("fill","transparent").attr("className",Ll).call(XM).call(ZM,Array.from(c.keys())).call(KM,d),R=>R.call(ZM,Array.from(c.keys())).call(I=>T?QX(I,T):XM(I)).call(KM,d)).transitions();n.push(...F.flat());for(const[R,I]of c.entries()){const{data:z}=I,{key:W,class:U,type:$}=R,K=e.select(`#${W}`),ct=VX(R,I,t,r,i),gt=XX(R,I,t,r),it=ZX(R,I,t,r),et=KX(R,I,t,r),_t=$X(e,K,U,"element"),xt=K.selectAll(Pa(Na)).selectFacetAll(_t).data(z,Nt=>Nt.key,Nt=>Nt.groupKey).join(Nt=>Nt.append(ct).attr("className",Na).attr("markType",$).transition(function(Gt,Qt,Jt){return gt(Gt,[Jt])}),Nt=>Nt.call(Gt=>{const Qt=Gt.parent(),Jt=qz(pe=>{const[Ge,le]=pe.getBounds().min;return[Ge,le]});Gt.transition(function(pe,Ge,le){UX(le,Qt,Jt);const ye=ct(pe,Ge),mn=it(pe,[le],[ye]);return mn!==null||(le.nodeName===ye.nodeName&&ye.nodeName!=="g"?ag(le,ye):(le.parentNode.replaceChild(ye,le),ye.className=Na,ye.markType=$,ye.__data__=le.__data__)),mn}).attr("markType",$).attr("className",Na)}),Nt=>Nt.each(function(Gt,Qt,Jt){Jt.__removed__=!0}).transition(function(Gt,Qt,Jt){return et(Gt,[Jt])}).remove(),Nt=>Nt.append(ct).attr("className",Na).attr("markType",$).transition(function(Gt,Qt,Jt){const{__fromElements__:pe}=Jt,Ge=it(Gt,pe,[Jt]);return new nr(pe,null,Jt.parentNode).transition(Ge).remove(),Ge}),Nt=>Nt.transition(function(Gt,Qt,Jt){const Ge=new nr([],Jt.__toData__,Jt.parentNode).append(ct).attr("className",Na).attr("markType",$).nodes();return it(Gt,[Jt],Ge)}).remove()).transitions();n.push(...xt.flat())}FX(t,e,n,r,i)})}function FX(t,e,n,r,i){const[a]=An("labelTransform",r),{markState:o,labelTransform:s}=t,c=e.select(Pa(z0)).node(),l=new Map,u=new Map,f=Array.from(o.entries()).flatMap(([g,y])=>{const{labels:m=[],key:b}=g,x=YX(g,y,t,r,i),_=e.select(`#${b}`).selectAll(Pa(Na)).nodes().filter(O=>!O.__removed__);return m.flatMap((O,w)=>{const{transform:S=[]}=O,M=ko(O,["transform"]);return _.flatMap(E=>{const P=BX(M,w,E);return P.forEach(C=>{l.set(C,x),u.set(C,O)}),P})})}),d=Kt(c).selectAll(Pa(W0)).data(f,g=>g.key).join(g=>g.append(y=>l.get(y)(y)).attr("className",W0),g=>g.each(function(y,m,b){const _=l.get(y)(y);ag(b,_)}),g=>g.remove()).nodes(),h=Ln(d,g=>u.get(g.__data__)),{coordinate:p}=t,v={canvas:i.canvas,coordinate:p};for(const[g,y]of h){const{transform:m=[]}=g;rg(m.map(a))(y,v)}s&&s(d,v)}function BX(t,e,n){const{seriesIndex:r,seriesKey:i,points:a,key:o,index:s}=n.__data__,c=WX(n);if(!r)return[Object.assign(Object.assign({},t),{key:`${o}-${e}`,bounds:c,index:s,points:a,dependentElement:n})];const l=GX(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 zX([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])=>fn(c)&&fn(l))&&(r.push(o),i.push(s))}return[r,i]}function GX(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 WX(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 YX(t,e,n,r,i){const[a]=An("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:IS(i),theme:u,coordinate:f});return h=>{const{index:p,points:v}=h,g=o[p],{formatter:y=k=>`${k}`,transform:m,style:b,render:x}=h,_=ko(h,["formatter","transform","style","render"]),O=xo(Object.assign(Object.assign({},_),b),k=>HM(k,g,p,o)),{shape:w=c,text:S}=O,M=ko(O,["shape","text"]),E=typeof y=="string"?bo(y):y,P=Object.assign(Object.assign({},M),{text:E(S,g,p,o),datum:g}),C=Object.assign({type:`label.${w}`,render:x},M),A=a(C,d),T=$M(u,"label",w,"label");return A(v,P,T,l)}}function HM(t,e,n,r){return typeof t=="function"?t(e,n,r):typeof t!="string"?t:Ac(e)&&e[t]!==void 0?e[t]:t}function HX(t){let e=-1/0,n=1/0;for(const[r,i]of t){const{animate:a={}}=r,{data:o}=i,{enter:s={},update:c={},exit:l={}}=a,{type:u,duration:f=300,delay:d=0}=c,{type:h,duration:p=300,delay:v=0}=s,{type:g,duration:y=300,delay:m=0}=l;for(const b of o){const{updateType:x=u,updateDuration:_=f,updateDelay:O=d,enterType:w=h,enterDuration:S=p,enterDelay:M=v,exitDuration:E=y,exitDelay:P=m,exitType:C=g}=b;(x===void 0||x)&&(e=Math.max(e,_+O),n=Math.min(n,O)),(C===void 0||C)&&(e=Math.max(e,E+P),n=Math.min(n,P)),(w===void 0||w)&&(e=Math.max(e,S+M),n=Math.min(n,M))}}return e===-1/0?null:[n,e-n]}function $X(t,e,n,r){return t.node().parentElement.findAll(a=>a.style.facet!==void 0&&a.style.facet===n&&a!==e.node()).flatMap(a=>a.getElementsByClassName(r))}function UX(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})`;Zz(t,l),e.append(t)}function VX(t,e,n,r,i){const[a]=An("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:IS(i),coordinate:d,theme:f});return g=>{const{shape:y=s}=p,{shape:m=y,points:b,seriesIndex:x,index:_}=g,O=ko(g,["shape","points","seriesIndex","index"]),w=Object.assign(Object.assign({},O),{index:_}),S=x?x.map(A=>o[A]):o[_],M=x||_,E=xo(p,A=>HM(A,S,M,o)),P=l[m]?l[m](E,v):a(Object.assign(Object.assign({},E),{type:qM(t,m)}),v),C=$M(f,h,m,s);return P(b,w,C,u)}}function $M(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 py(t,e,n,r,i){var a,o;const[,s]=An("shape",i),[c]=An("animation",i),{defaultShape:l,shape:u}=n,{theme:f,coordinate:d}=r,p=`default${mo(t)}Animation`,{[p]:v}=((a=u[l])===null||a===void 0?void 0:a.props)||s(qM(e,l)).props,{[t]:g={}}=f,y=((o=e.animate)===null||o===void 0?void 0:o[t])||{},m={coordinate:d};return(b,x,_)=>{const{[`${t}Type`]:O,[`${t}Delay`]:w,[`${t}Duration`]:S,[`${t}Easing`]:M}=b,E=Object.assign({type:O||v},y);if(!E.type)return null;const A=c(E,m)(x,_,at(g,{delay:w,duration:S,easing:M}));return Array.isArray(A)?A:[A]}}function XX(t,e,n,r){return py("enter",t,e,n,r)}function qX(t){return t.finished.then(()=>{t.cancel()}),t}function ZX(t,e,n,r){return py("update",t,e,n,r)}function KX(t,e,n,r){return py("exit",t,e,n,r)}function UM(t={}){if(typeof t=="string")return{type:t};const{type:e="light"}=t,n=ko(t,["type"]);return Object.assign(Object.assign({},n),{type:e})}function Rh(t){const e={event:!0,tooltip:!0,sliderFilter:!0,legendFilter:!0,scrollbarFilter:!0},{interaction:n={}}=t;return Object.entries(at(e,n)).reverse()}function VM(t,e){return Xa(this,void 0,void 0,function*(){const n={library:e},{data:r}=t,i=ko(t,["data"]);if(r==null)return t;const[,{data:a}]=yield FM([],{data:r},n);return Object.assign({data:a},i)})}function XM(t){t.style("transform",e=>`translate(${e.paddingLeft+e.marginLeft}, ${e.paddingTop+e.marginTop})`).style("width",e=>e.innerWidth).style("height",e=>e.innerHeight)}function QX(t,e){const[n,r]=e;t.transition(function(i,a,o){const{transform:s,width:c,height:l}=o.style,{paddingLeft:u,paddingTop:f,innerWidth:d,innerHeight:h,marginLeft:p,marginTop:v}=i,g=[{transform:s,width:c,height:l},{transform:`translate(${u+p}, ${f+v})`,width:d,height:h}];return o.animate(g,{delay:n,duration:r,fill:"both"})})}function qM(t,e){const{type:n}=t;return typeof e=="string"?`${n}.${e}`:e}function ZM(t,e){const n=a=>a.class!==void 0?`${a.class}`:"";t.nodes().length===0||(t.selectAll(Pa(bx)).data(e,a=>a.key).join(a=>a.append("g").attr("className",bx).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(Pa(z0)).node())||t.append("g").attr("className",z0).style("zIndex",0)}function Pa(...t){return t.map(e=>`.${e}`).join("")}function KM(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 bs({style:{x:i+a,y:r+o,width:s,height:c}})})}function JX(t,e,n){var r;for(const[l]of n.entries())if(l.type==="cell")return t.filter(u=>u.name!=="shape");if(e.length!==1||t.some(l=>l.name==="shape"))return t;const{defaultShape:i}=e[0];if(!["point","line","rect","hollow"].includes(i))return t;const o={point:"point",line:"hyphen",rect:"square",hollow:"hollow"},c={field:((r=t.find(l=>l.name==="color"))===null||r===void 0?void 0:r.field)||null,name:"shape",type:"constant",domain:[],range:[o[i]]};return[...t,c]}function tq(t,e){for(const[n,r]of Object.entries(e))t.style(n,r)}function QM(t){const e=at({},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=at({},o[s]);o[s]=c,n.set(c,a),r.set(c,s),i.push(c)}}return e}function eq(t,e){const n=new rO;return n.registerPlugin(new iO),new L2({width:t,height:e,container:document.createElement("div"),renderer:n})}function nq(t,e={},n=()=>{},r=i=>{throw i}){const{width:i=640,height:a=480,depth:o=0}=t,s=QM(t),{canvas:c=eq(i,a),emitter:l=new B0,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(Ze.BEFORE_RENDER);const h=Kt(c.document.documentElement);return c.ready.then(()=>fy(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(Ze.AFTER_RENDER),n==null||n()})}).catch(p=>{r==null||r(p)}),iq(c.getConfig().container)}function mgt(t,e={},n=()=>{},r=i=>{throw i}){var i;const{width:a=640,height:o=480}=t,s=QM(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 JM(t,e={},n=!1){const{canvas:r,emitter:i}=e;r&&(rq(r),n?r.destroy():r.destroyChildren()),i.off()}function rq(t){const e=t.getRoot().querySelectorAll(`.${G0}`);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 iq(t){return typeof t=="string"?document.getElementById(t):t}const qc=t=>t?parseInt(t):0;function aq(t){const e=getComputedStyle(t),n=t.clientWidth||qc(e.width),r=t.clientHeight||qc(e.height),i=qc(e.paddingLeft)+qc(e.paddingRight),a=qc(e.paddingTop)+qc(e.paddingBottom);return{width:n-i,height:r-a}}function bgt(t){const{height:e,width:n,padding:r=0,paddingLeft:i=r,paddingRight:a=r,paddingTop:o=r,paddingBottom:s=r,margin:c=0,marginLeft:l=c,marginRight:u=c,marginTop:f=c,marginBottom:d=c,inset:h=0,insetLeft:p=h,insetRight:v=h,insetTop:g=h,insetBottom:y=h}=t,m=_=>_==="auto"?20:_,b=n-m(i)-m(a)-l-u-p-v,x=e-m(o)-m(s)-f-d-g-y;return{width:b,height:x}}function vy(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 gy{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 vy(this,i=>{e===i.attr("key")&&(n=i)}),n}getNodesByType(e){const n=[];return vy(this,i=>{e===i.type&&n.push(i)}),n}getNodeByType(e){let n=null;return vy(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 tE=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);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 yy=["width","height","depth","padding","paddingLeft","paddingRight","paddingBottom","paddingTop","inset","insetLeft","insetRight","insetTop","insetBottom","margin","marginLeft","marginRight","marginTop","marginBottom","autoFit","theme","title"],eE="__remove__",nE="__callback__",rE=1,iE=1;function oq(t){if(t===void 0){const e=document.createElement("div");return e[eE]=!0,e}return typeof t=="string"?document.getElementById(t):t}function sq(t){const e=t.parentNode;e&&e.removeChild(t)}function cq(t){if(t.type!==null)return t;const e=t.children[t.children.length-1];for(const n of yy)e.attr(n,t.attr(n));return e}function aE(t){return Object.assign(Object.assign({},t.value),{type:t.type})}function my(t,e){const{width:n,height:r,autoFit:i,depth:a=0}=t;let o=640,s=480;if(i){const{width:c,height:l}=aq(e);o=c||o,s=l||s}return o=n||o,s=r||s,{width:Math.max(vn(o)?o:rE,rE),height:Math.max(vn(s)?s:iE,iE),depth:a}}function lq(t){const e=cq(t),n=[e],r=new Map;for(r.set(e,aE(e));n.length;){const i=n.pop(),a=r.get(i),{children:o=[]}=i;for(const s of o)if(s.type===nE)a.children=s.value;else{const c=aE(s),{children:l=[]}=a;l.push(c),n.push(s),r.set(s,c),a.children=l}}return r.get(e)}function uq(t,e){return typeof t=="function"?!0:new Set(Object.keys(e)).has(t)}function fq(t,e){return typeof t!="function"&&new Set(Object.keys(e)).has(t)}function dq(t,e,n,r,i){const{type:a}=t,{type:o=n||a}=e;if(fq(o,i)){for(const s of yy)t.attr(s)!==void 0&&e[s]===void 0&&(e[s]=t.attr(s));return e}if(uq(o,r)){const s={type:"view"},c=Object.assign({},e);for(const l of yy)c[l]!==void 0&&(s[l]=c[l],delete c[l]);return Object.assign(Object.assign({},s),{children:[c]})}return e}function hq(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 pq(t,e,n){if(typeof t=="function"){const c=new gy;return c.value=t,c.type=nE,c}const{type:r,children:i}=t,a=tE(t,["type","children"]),o=hq(r,e,n),s=new o;return s.value=a,s.type=r,s}function vq(t,e){const{type:n,children:r}=e,i=tE(e,["type","children"]);t.type===n||n===void 0?gO(t.value,i):typeof n=="string"&&(t.type=n,t.value=i)}function gq(t,e,n,r){if(!t)return;const i=[[t,e]];for(;i.length;){const[a,o]=i.shift(),s=pq(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 yq(t,e,n,r,i){const a=dq(t,e,n,r,i),o=[[null,t,a]];for(;o.length;){const[s,c,l]=o.shift();if(!c)gq(s,l,r,i);else if(!l)c.remove();else{vq(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 mq(){let t,e;return[new Promise((r,i)=>{e=r,t=i}),e,t]}function bq(t,e,{key:n=e}){t.prototype[e]=function(r){return arguments.length===0?this.attr(n):this.attr(n,r)}}function xq(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 _q(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 Oq(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(Ac(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 wq(t,e,{ctor:n}){t.prototype[e]=function(r){const i=this.append(n);return e==="mark"&&(i.type=r),i}}function Sq(t,e,{ctor:n}){t.prototype[e]=function(){return this.type=null,this.append(n)}}function Ih(t){return e=>{for(const[n,r]of Object.entries(t)){const{type:i}=r;i==="value"?bq(e,n,r):i==="array"?xq(e,n,r):i==="object"?_q(e,n,r):i==="node"?wq(e,n,r):i==="container"?Sq(e,n,r):i==="mix"&&Oq(e,n,r)}return e}}function oE(t){return Object.fromEntries(Object.entries(t).map(([e,n])=>[e,{type:"node",ctor:n}]))}const sE={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"}},Mq=Object.assign(Object.assign({},sE),{tooltip:{type:"mix"},viewStyle:{type:"object"}}),Eq=Object.assign(Object.assign({},sE),{labelTransform:{type:"array"}});var Pq=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 Dh=class extends gy{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()&&Oh(e)}hide(){const e=this.getGroup();e&&e.isVisible()&&Kg(e)}};Dh=Pq([Ih(Eq)],Dh);var Aq=function(t,e,n,r){var i=arguments.length,a=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,n,a):o(e,n))||a);return i>3&&a&&Object.defineProperty(e,n,a),a};let by=class extends gy{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}};by=Aq([Ih(Mq)],by);var Tq=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},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 Cq="G2_CHART_KEY";class Lq extends Dh{constructor(e){const{container:n,canvas:r,renderer:i,plugins:a,lib:o}=e,s=kq(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=aO(()=>{this.forceFit()},300),this._renderer=i||new rO,this._plugins=a||[],this._container=oq(n),this._emitter=new B0,this._context={library:Object.assign(Object.assign({},o),Ox),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)=>nq(this._computedOptions(),this._context,this._createResolve(a),this._createReject(o))),[n,r,i]=mq();return e.then(r).catch(i).then(()=>this._renderTrailing()),n}options(e){if(arguments.length===0)return lq(this);const{type:n}=e;return n&&(this._previousDefinedType=n),yq(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(Ze.BEFORE_CLEAR),this._reset(),JM(e,this._context,!1),this.emit(Ze.AFTER_CLEAR)}destroy(){const e=this.options();this.emit(Ze.BEFORE_DESTROY),this._unbindAutoFit(),this._reset(),JM(e,this._context,!0),this._container[eE]&&sq(this._container),this.emit(Ze.AFTER_DESTROY)}forceFit(){this.options.autoFit=!0;const{width:e,height:n}=my(this.options(),this._container);if(e===this._width&&n===this._height)return Promise.resolve(this);this.emit(Ze.BEFORE_CHANGE_SIZE);const r=this.render();return r.then(()=>{this.emit(Ze.AFTER_CHANGE_SIZE)}),r}changeSize(e,n){if(e===this._width&&n===this._height)return Promise.resolve(this);this.emit(Ze.BEFORE_CHANGE_SIZE),this.attr("width",e),this.attr("height",n);const r=this.render();return r.then(()=>{this.emit(Ze.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 by{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 Dh{constructor(){super({},o)}};return s=Tq([Ih(oE(this._marks))],s),[o,s]}));for(const a of Object.values(this._compositions))Ih(oE(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=Cq}=e,{width:r,height:i,depth:a}=my(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}=my(this.options(),this._container);this._plugins.push(new iO),this._plugins.forEach(r=>this._renderer.registerPlugin(r)),this._context.canvas=new L2({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 Nq(t,e){class n extends t{constructor(i){super(Object.assign(Object.assign({},i),{lib:e}))}}return n}var jq=Object.prototype.hasOwnProperty,xy=function(t,e){if(t===null||!Ba(t))return{};var n={};return Lg(e,function(r){jq.call(t,r)&&(n[r]=t[r])}),n};function cE(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 ku(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 Rq(){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(cE),o}function a(o,s){return function(c){c.children&&ku(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 Iq=tt(9783);function Dq(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 Fq(){return this.eachAfter(Dq)}var _y=tt(64599);function Bq(t,e){var n=-1,r=_y(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 zq(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 Gq(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 Wq(t,e){var n=-1,r=_y(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 Yq(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 Hq(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})}function $q(t){for(var e=this,n=Uq(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 Uq(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 Vq(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e}function Xq(){return Array.from(this)}function qq(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t}function Zq(){var t=this,e=[];return t.each(function(n){n!==t&&e.push({source:n.parent,target:n})}),e}var lE=tt(15009),Kq=lE().mark(uE);function uE(){var t,e,n,r,i,a;return lE().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()}},Kq,this)}function Zc(t,e){t instanceof Map?(t=[void 0,t],e===void 0&&(e=tZ)):e===void 0&&(e=Jq);for(var n=new Kc(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 Kc(o[s])),a.parent=r,a.depth=r.depth+1;return n.eachBefore(fE)}function Qq(){return Zc(this).eachBefore(eZ)}function Jq(t){return t.children}function tZ(t){return Array.isArray(t)?t[1]:null}function eZ(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function fE(t){var e=0;do t.height=e;while((t=t.parent)&&t.height<++e)}function Kc(t){this.data=t,this.depth=this.height=0,this.parent=null}Kc.prototype=Zc.prototype=Iq({constructor:Kc,count:Fq,each:Bq,eachAfter:Gq,eachBefore:zq,find:Wq,sum:Yq,sort:Hq,path:$q,ancestors:Vq,descendants:Xq,leaves:qq,links:Zq,copy:Qq},Symbol.iterator,uE);function Oy(t,e){for(var n in e)e.hasOwnProperty(n)&&n!=="constructor"&&e[n]!==void 0&&(t[n]=e[n])}function nZ(t,e,n,r){return e&&Oy(t,e),n&&Oy(t,n),r&&Oy(t,r),t}const rZ={field:"value",size:[1,1],round:!1,padding:0,sort:(t,e)=>e.value-t.value,as:["x","y"],ignoreParentValue:!0},iZ="nodeIndex",Cu="childNodeCount",aZ="nodeAncestor",wy="Invalid field: it must be a string!";function oZ(t,e){const{field:n,fields:r}=t;if(Cn(n))return n;if(sr(n))return console.warn(wy),n[0];if(console.warn(`${wy} will try to get fields instead.`),Cn(r))return r;if(sr(r)&&r.length)return r[0];if(e)return e;throw new TypeError(wy)}function sZ(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=OS((((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[aZ]=s,i[Cu]=((o=i.children)===null||o===void 0?void 0:o.length)||0,i[iZ]=r,e.push(i)})}else t&&t.eachNode&&t.eachNode(n=>{e.push(n)});return e}function cZ(t,e){e=nZ({},rZ,e);const n=e.as;if(!sr(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=oZ(e)}catch(c){console.warn(c)}const a=(c=>Rq().size(e.size).round(e.round).padding(e.padding)(Zc(c).sum(l=>gu(l.children)?e.ignoreParentValue?0:l[r]-ww(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]})}),sZ(a)}var 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};const Qc="sunburst",Sy="markType",xgt="value",dE="path",Fh="ancestor-node";function uZ(t){const{data:e,encode:n}=t,{color:r,value:i}=n,o=cZ(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({},xy(c.data,[i])),{[dE]:h,[Fh]:v.data.name}),c);r&&r!==Fh&&(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 hE={id:Qc,encode:{x:"x",y:"y",key:dE,color:Fh,value:"value"},axis:{x:!1,y:!1},style:{[Sy]:Qc,stroke:"#fff",lineWidth:.5,fillOpacity:"fillOpacity",[Cu]:Cu,depth:"depth"},state:{active:{zIndex:2,stroke:"#000"},inactive:{zIndex:1,stroke:"#fff"}},legend:!1,interaction:{drillDown:!0},coordinate:{type:"polar",innerRadius:.2}},pE=t=>{const{encode:e,data:n=[],legend:r}=t,i=lZ(t,["encode","data","legend"]),a=Object.assign(Object.assign({},i.coordinate),{innerRadius:Math.max(Re(i,["coordinate","innerRadius"],.2),1e-5)}),o=Object.assign(Object.assign({},hE.encode),e),{value:s}=o,c=uZ({encode:o,data:n});return[at({},hE,Object.assign(Object.assign({type:"rect",data:c,encode:o,tooltip:{title:"path",items:[l=>({name:s,value:l[s]})]}},i),{coordinate:a}))]};pE.props={};var fZ=Object.keys?function(t){return Object.keys(t)}:function(t){var e=[];return Lg(t,function(n,r){Kr(t)&&r==="prototype"||e.push(r)}),e},My=fZ,dZ=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 hZ=t=>t.querySelectorAll(".element").filter(e=>Re(e,["style",Sy])===Qc);function pZ(t){return Kt(t).select(`.${Ll}`).node()}const vZ={rootText:"root",style:{fill:"rgba(0, 0, 0, 0.85)",fontSize:12,y:1},active:{fill:"rgba(0, 0, 0, 0.5)"}};function gZ(t={}){const{breadCrumb:e={},isFixedColor:n=!1,duration:r}=t,i=at({},vZ,e);return a=>{const{update:o,setState:s,container:c,view:l,options:u}=a,f=pZ(c),d=u.marks.find(({id:b})=>b===Qc),{state:h}=d,p=new dr;f.appendChild(p);const v=(b,x)=>dZ(this,void 0,void 0,function*(){if(p.removeChildren(),b){const _=new fi({style:Object.assign({x:0,text:i.rootText,depth:0},i.style)});p.appendChild(_);let O="";const w=b==null?void 0:b.split(" / ");let S=i.style.y,M=p.getBBox().width;const E=f.getBBox().width,P=w.map((C,A)=>{const T=new fi({style:Object.assign(Object.assign({x:M,text:" / "},i.style),{y:S})});p.appendChild(T),M+=T.getBBox().width,O=`${O}${C} / `;const k=new fi({name:O.replace(/\s\/\s$/,""),style:Object.assign(Object.assign({text:C,x:M,depth:A+1},i.style),{y:S})});return p.appendChild(k),M+=k.getBBox().width,M>E&&(S=p.getBBox().height,M=0,T.attr({x:M,y:S}),M+=T.getBBox().width,k.attr({x:M,y:S}),M+=k.getBBox().width),k});[_,...P].forEach((C,A)=>{if(A===P.length)return;const T=Object.assign({},C.attributes);C.attr("cursor","pointer"),C.addEventListener("mouseenter",()=>{C.attr(i.active)}),C.addEventListener("mouseleave",()=>{C.attr(T)}),C.addEventListener("click",()=>{v(C.name,Re(C,["style","depth"]))})})}s("drillDown",_=>{const{marks:O}=_,w=O.map(S=>{if(S.id!==Qc&&S.type!=="rect")return S;const{data:M}=S,E=Object.fromEntries(["color"].map(C=>[C,{domain:l.scale[C].getOptions().domain}])),P=M.filter(C=>{const A=C.path;return n||(C[Fh]=A.split(" / ")[x]),b?new RegExp(`^${b}.+`).test(A):!0});return at({},S,n?{data:P,scale:E}:{data:P})});return Object.assign(Object.assign({},_),{marks:w})}),yield o()}),g=b=>{const x=b.target;if(Re(x,["style",Sy])!==Qc||Re(x,["markType"])!=="rect"||!Re(x,["style",Cu]))return;const _=Re(x,["__data__","key"]),O=Re(x,["style","depth"]);x.style.cursor="pointer",v(_,O)};f.addEventListener("click",g);const y=My(Object.assign(Object.assign({},h.active),h.inactive)),m=()=>{hZ(f).forEach(x=>{const _=Re(x,["style",Cu]);if(Re(x,["style","cursor"])!=="pointer"&&_){x.style.cursor="pointer";const w=xy(x.attributes,y),S=at(w,h.inactive);x.addEventListener("mouseenter",()=>{r?(x.attr("zIndex",Re(h,["active","zIndex"],2)),x.animate([As(S,["zIndex"]),As(h.active,["zIndex"])],{duration:r,fill:"forwards"})):x.attr(h.active)}),x.addEventListener("mouseleave",()=>{r?(x.animate([As(h.active,["zIndex"]),As(S,["zIndex"])],{duration:r,fill:"forwards"}),setTimeout(()=>{x.attr("zIndex",Re(S,["zIndex"],1))},r)):x.attr(S)})}})};return f.addEventListener("mousemove",m),()=>{p.remove(),f.removeEventListener("click",g),f.removeEventListener("mousemove",m)}}}nt.enableCSSParsing=!1;function yZ(){return{"interaction.drillDown":gZ,"mark.sunburst":pE}}const vE=()=>[["cartesian"]];vE.props={};const Ey=()=>[["transpose"],["translate",.5,.5],["reflect.x"],["translate",-.5,-.5]];Ey.props={transform:!0};const mZ=(t={})=>{const e={startAngle:-Math.PI/2,endAngle:Math.PI*3/2,innerRadius:0,outerRadius:1};return Object.assign(Object.assign({},e),t)},gE=t=>{const{startAngle:e,endAngle:n,innerRadius:r,outerRadius:i}=mZ(t);return[...Ey(),...nu({startAngle:e,endAngle:n,innerRadius:r,outerRadius:i})]};gE.props={};const Py=()=>[["parallel",0,1,0,1]];Py.props={};const yE=({focusX:t=0,focusY:e=0,distortionX:n=2,distortionY:r=2,visual:i=!1})=>[["fisheye",t,e,n,r,i]];yE.props={transform:!0};const mE=t=>{const{startAngle:e=-Math.PI/2,endAngle:n=Math.PI*3/2,innerRadius:r=0,outerRadius:i=1}=t;return[...Py(),...nu({startAngle:e,endAngle:n,innerRadius:r,outerRadius:i})]};mE.props={};const bE=({value:t})=>e=>e.map(()=>t);bE.props={};const xE=({value:t})=>e=>e.map(n=>n[t]);xE.props={};const _E=({value:t})=>e=>e.map(t);_E.props={};const OE=({value:t})=>()=>t;OE.props={};function yn(t,e){if(t!==null)return{type:"column",value:t,field:e}}function Bh(t,e){const n=yn(t,e);return Object.assign(Object.assign({},n),{inferred:!0})}function zh(t,e){if(t!==null)return{type:"column",value:t,field:e,visual:!0}}function bZ(t,e){const n=yn(t,e);return Object.assign(Object.assign({},n),{constant:!1})}function Co(t,e){const n=[];for(const r of t)n[r]=e;return n}function Le(t,e){const n=t[e];if(!n)return[null,null];const{value:r,field:i=null}=n;return[r,i]}function Lu(t,...e){for(const n of e)if(typeof n=="string"){const[r,i]=Le(t,n);if(r!==null)return[r,i]}else return[n,null];return[null,null]}function Nu(t){return t instanceof Date?!1:typeof t=="object"}const ju=()=>(t,e)=>{const{encode:n}=e,{y1:r}=n;return r!==void 0?[t,e]:[t,at({},e,{encode:{y1:Bh(Co(t,0))}})]};ju.props={};const Rs=()=>(t,e)=>{const{encode:n}=e,{x:r}=n;return r!==void 0?[t,e]:[t,at({},e,{encode:{x:Bh(Co(t,0))},scale:{x:{guide:null}}})]};Rs.props={};const Is=(t,e)=>Su(Object.assign({colorAttribute:"fill"},t),e);Is.props=Object.assign(Object.assign({},Su.props),{defaultMarker:"square"});const Gh=(t,e)=>Su(Object.assign({colorAttribute:"stroke"},t),e);Gh.props=Object.assign(Object.assign({},Su.props),{defaultMarker:"hollowSquare"});function Jc(){}function wE(t){this._context=t}wE.prototype={areaStart:Jc,areaEnd:Jc,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 Ay(t){return new wE(t)}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};function xZ(t,e,n){const[r,i,a,o]=t;if(Mn(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 Ty=(t,e)=>{const{adjustPoints:n=xZ}=t,r=SE(t,["adjustPoints"]),{coordinate:i,document:a}=e;return(o,s,c,l)=>{const{index:u}=s,{color:f}=c,d=SE(c,["color"]),h=l[u+1],p=n(o,h,i),v=!!Mn(i),[g,y,m,b]=v?ph(p):p,{color:x=f,opacity:_}=s,O=Mo().curve(Ay)([g,y,m,b]);return Kt(a.createElement("path",{})).call(Bt,d).style("d",O).style("fill",x).style("fillOpacity",_).call(Bt,r).node()}};Ty.props={defaultMarker:"square"};function _Z(t,e,n){const[r,i,a,o]=t;if(Mn(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 ME=(t,e)=>Ty(Object.assign({adjustPoints:_Z},t),e);ME.props={defaultMarker:"square"};function Ru(t){return Math.abs(t)>10?String(t):t.toString().padStart(2,"0")}function OZ(t){const e=t.getFullYear(),n=Ru(t.getMonth()+1),r=Ru(t.getDate()),i=`${e}-${n}-${r}`,a=t.getHours(),o=t.getMinutes(),s=t.getSeconds();return a||o||s?`${i} ${Ru(a)}:${Ru(o)}:${Ru(s)}`:i}const Wh=(t={})=>{const{channel:e="x"}=t;return(n,r)=>{const{encode:i}=r,{tooltip:a}=r;if(za(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=>Le(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?OZ(u[l]):u[l]).join(", ")};return[n,at({},r,{tooltip:{title:c}})]}};Wh.props={};const Yh=t=>{const{channel:e}=t;return(n,r)=>{const{encode:i,tooltip:a}=r;if(za(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,at({},r,{tooltip:{items:c}})]}};Yh.props={};var wZ=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const EE=()=>(t,e)=>{const{encode:n}=e,{key:r}=n,i=wZ(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,at({},e,{encode:{key:yn(o)}})]};EE.props={};function PE(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 Qr(t={}){return[...PE(t),{name:"title",scale:"identity"}]}function _gt(){return[{type:MaybeTitle,channel:"color"},{type:MaybeTooltip,channel:["x","y","z"]}]}function Lo(){return[{type:Wh,channel:"color"},{type:Yh,channel:["x","y"]}]}function tl(){return[{type:Wh,channel:"x"},{type:Yh,channel:["y"]}]}function SZ(){return[{type:Wh,channel:"color"},{type:Yh,channel:["position"]}]}function el(t={}){return PE(t)}function Xn(){return[{type:EE}]}function rr(){return[]}function ky(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?ky(o,r[g]):0,m=h?ky(s,i[g]):0,x=p&&a?(()=>(ky(c,a[g])/2+ +a[g])*y)():0,[_,O]=v;return[_+u*y+x,O+f*m]}}function Hh(t){return parseFloat(t)/100}function Cy(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"?Hh(u)*o:+u,h=typeof f=="string"?Hh(f)*s:+f;return[[d,h]]});return[t,c]}function Aa(t){return typeof t=="function"?t:e=>e[t]}function Ly(t,e){return Array.from(t,Aa(e))}function Ny(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=Ly(a,n),c=Ly(a,r),l=Ly(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 AE(t,e){return t.getBandWidth(t.invert(e))}const TE={rect:Is,hollow:Gh,funnel:Ty,pyramid:ME},kE=()=>(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=AE(l,i[v]),y=u?AE(u,s==null?void 0:s[v]):1,m=g*y,b=(+(s==null?void 0:s[v])||0)*g,x=+i[v]+b,[_,O]=h(x,m,v),w=+a[v],S=+o[v];return[[_,w],[O,w],[O,S],[_,S]].map(A=>r.map(A))});return[t,p]};kE.props={defaultShape:"rect",defaultLabelShape:"label",composite:!1,shape:TE,channels:[...Qr({shapes:Object.keys(TE)}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"},{name:"size"}],preInference:[...Xn(),{type:ju},{type:Rs}],postInference:[...rr(),...tl()],interaction:{shareTooltip:!0}};const CE={rect:Is,hollow:Gh},LE=()=>(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]};LE.props={defaultShape:"rect",defaultLabelShape:"label",composite:!1,shape:CE,channels:[...Qr({shapes:Object.keys(CE)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...Xn(),{type:ju}],postInference:[...rr(),...tl()],interaction:{shareTooltip:!0}};var NE=jy(bu);function jE(t){this._curve=t}jE.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 jy(t){function e(n){return new jE(t(n))}return e._curve=t,e}function Iu(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(jy(n)):e()._curve},t}function MZ(){return Iu(Mo().curve(NE))}var RE=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);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 EZ=zc(t=>{const{d1:e,d2:n,style1:r,style2:i}=t.attributes,a=t.ownerDocument;Kt(t).maybeAppend("line",()=>a.createElement("path",{})).style("d",e).call(Bt,r),Kt(t).maybeAppend("line1",()=>a.createElement("path",{})).style("d",n).call(Bt,i)});function PZ(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 Wi=(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=RE(t,["curve","gradient","gradientColor","defined","connect"]),{coordinate:c,document:l}=e;return(u,f,d)=>{const{color:h,lineWidth:p}=d,v=RE(d,["color","lineWidth"]),{color:g=h,size:y=p,seriesColor:m,seriesX:b,seriesY:x}=f,_=aS(c,f),O=Mn(c),w=r&&m?iS(m,b,x,r,i,O):g,S=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},v),w&&{stroke:w}),y&&{lineWidth:y}),_&&{transform:_}),s);let M;if(dn(c)){const k=c.getCenter();M=N=>MZ().angle((F,R)=>Bc(Gn(N[R],k))).radius((F,R)=>Nn(N[R],k)).defined(([F,R])=>a(F)&&a(R)).curve(n)(N)}else M=Mo().x(k=>k[0]).y(k=>k[1]).defined(([k,N])=>a(k)&&a(N)).curve(n);const[E,P]=PZ(u,a),C=Pt(S,"connect"),A=!!P.length;if(!A||o&&!Object.keys(C).length)return Kt(l.createElement("path",{})).style("d",M(E)||[]).call(Bt,S).node();if(A&&!o)return Kt(l.createElement("path",{})).style("d",M(u)).call(Bt,S).node();const T=k=>k.map(M).join(",");return Kt(new EZ).style("style1",Object.assign(Object.assign({},S),C)).style("style2",S).style("d1",T(P)).style("d2",M(u)).node()}};Wi.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const IE=(t,e)=>{const{coordinate:n}=e;return(...r)=>{const i=dn(n)?Ay:bu;return Wi(Object.assign({curve:i},t),e)(...r)}};IE.props=Object.assign(Object.assign({},Wi.props),{defaultMarker:"line"});function Ry(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 Iy(t,e){this._context=t,this._k=(1-e)/6}Iy.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:Ry(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:Ry(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 Ogt=function t(e){function n(r){return new Iy(r,e)}return n.tension=function(r){return t(+r)},n}(0);function Dy(t,e){this._context=t,this._k=(1-e)/6}Dy.prototype={areaStart:Jc,areaEnd:Jc,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:Ry(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 wgt=function t(e){function n(r){return new Dy(r,e)}return n.tension=function(r){return t(+r)},n}(0);function DE(t,e,n){var r=t._x1,i=t._y1,a=t._x2,o=t._y2;if(t._l01_a>Gr){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>Gr){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 FE(t,e){this._context=t,this._alpha=e}FE.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:DE(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 Sgt=function t(e){function n(r){return e?new FE(r,e):new Iy(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function BE(t,e){this._context=t,this._alpha=e}BE.prototype={areaStart:Jc,areaEnd:Jc,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:DE(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 zE=function t(e){function n(r){return e?new BE(r,e):new Dy(r,0)}return n.alpha=function(r){return t(+r)},n}(.5);function GE(t){return t<0?-1:1}function WE(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(GE(a)+GE(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function YE(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function Fy(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 $h(t){this._context=t}$h.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:Fy(this,this._t0,YE(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,Fy(this,YE(this,n=WE(this,t,e)),n);break;default:Fy(this,this._t0,n=WE(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}};function HE(t){this._context=new $E(t)}(HE.prototype=Object.create($h.prototype)).point=function(t,e){$h.prototype.point.call(this,e,t)};function $E(t){this._context=t}$E.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 UE(t){return new $h(t)}function VE(t){return new HE(t)}var 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 XE=(t,e)=>{const n=AZ(t,[]),{coordinate:r}=e;return(...i)=>{const a=dn(r)?zE:Mn(r)?VE:UE;return Wi(Object.assign({curve:a},n),e)(...i)}};XE.props=Object.assign(Object.assign({},Wi.props),{defaultMarker:"smooth"});function Uh(t,e){this._context=t,this._t=e}Uh.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 qE(t){return new Uh(t,.5)}function ZE(t){return new Uh(t,0)}function KE(t){return new Uh(t,1)}const QE=(t,e)=>Wi(Object.assign({curve:KE},t),e);QE.props=Object.assign(Object.assign({},Wi.props),{defaultMarker:"hv"});const JE=(t,e)=>Wi(Object.assign({curve:ZE},t),e);JE.props=Object.assign(Object.assign({},Wi.props),{defaultMarker:"vh"});const tP=(t,e)=>Wi(Object.assign({curve:qE},t),e);tP.props=Object.assign(Object.assign({},Wi.props),{defaultMarker:"hvh"});var TZ=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);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,e,n,r,i){const a=Gn(n,e),o=zi(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=hh(e,c),h=hh(n,l),p=hh(h,u),v=hh(n,u),g=Gn(v,l),y=Gn(n,l),m=Gn(e,c),b=Gn(m,f),x=Gn(e,f),_=Gn(d,f);t.moveTo(...d),t.lineTo(...h),t.arcTo(...p,...v,i/2),t.arcTo(...g,...y,i/2),t.lineTo(...m),t.arcTo(...b,...x,r/2),t.arcTo(..._,...d,r/2),t.closePath()}const eP=(t,e)=>{const{document:n}=e;return(r,i,a)=>{const{seriesSize:o,color:s}=i,{color:c}=a,l=TZ(a,["color"]),u=Gi();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(fn)&&kZ(u,d,h,p,v)}return Kt(n.createElement("path",{})).call(Bt,l).style("fill",s||c).style("d",u.toString()).call(Bt,t).node()}};eP.props=Object.assign(Object.assign({},Wi.props),{defaultMarker:"line"});const nP=()=>(t,e)=>{const{style:n={},encode:r}=e,{series:i}=r,{gradient:a}=n;return!a||i?[t,e]:[t,at({},e,{encode:{series:zh(Co(t,void 0))}})]};nP.props={};const By=()=>(t,e)=>{const{encode:n}=e,{series:r,color:i}=n;if(r!==void 0||i===void 0)return[t,e];const[a,o]=Le(n,"color");return[t,at({},e,{encode:{series:yn(a,o)}})]};By.props={};const rP={line:IE,smooth:XE,hv:QE,vh:JE,hvh:tP,trail:eP},CZ=(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(Ln(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]},LZ=(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]},iP=()=>(t,e,n,r)=>(iu(r)?LZ:CZ)(t,e,n,r);iP.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,shape:rP,channels:[...Qr({shapes:Object.keys(rP)}),{name:"x"},{name:"y"},{name:"position",independent:!0},{name:"size"},{name:"series",scale:"band"}],preInference:[...Xn(),{type:nP},{type:By}],postInference:[...rr(),...tl(),...SZ()],interaction:{shareTooltip:!0,seriesTooltip:!0,crosshairs:!0}};var NZ=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);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 zy=(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"]];zy.style=["fill"];const aP=zy.bind(void 0);aP.style=["stroke","lineWidth"];const Vh=(t,e,n)=>[["M",t-n,e-n],["L",t+n,e-n],["L",t+n,e+n],["L",t-n,e+n],["Z"]];Vh.style=["fill"];const oP=Vh.bind(void 0);oP.style=["fill"];const sP=Vh.bind(void 0);sP.style=["stroke","lineWidth"];const Gy=(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"]]};Gy.style=["fill"];const cP=Gy.bind(void 0);cP.style=["stroke","lineWidth"];const Wy=(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"]]};Wy.style=["fill"];const lP=Wy.bind(void 0);lP.style=["stroke","lineWidth"];const Yy=(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"]]};Yy.style=["fill"];const uP=Yy.bind(void 0);uP.style=["stroke","lineWidth"];const Hy=(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"]]};Hy.style=["fill"];const fP=Hy.bind(void 0);fP.style=["stroke","lineWidth"];const $y=(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"]]};$y.style=["fill"];const dP=$y.bind(void 0);dP.style=["stroke","lineWidth"];const hP=(t,e,n)=>[["M",t,e+n],["L",t,e-n]];hP.style=["stroke","lineWidth"];const pP=(t,e,n)=>[["M",t-n,e-n],["L",t+n,e+n],["M",t+n,e-n],["L",t-n,e+n]];pP.style=["stroke","lineWidth"];const vP=(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]];vP.style=["stroke","lineWidth"];const gP=(t,e,n)=>[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]];gP.style=["stroke","lineWidth"];const yP=(t,e,n)=>[["M",t-n,e],["L",t+n,e]];yP.style=["stroke","lineWidth"];const Uy=(t,e,n)=>[["M",t-n,e],["L",t+n,e]];Uy.style=["stroke","lineWidth"];const mP=Uy.bind(void 0);mP.style=["stroke","lineWidth"];const bP=(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]];bP.style=["stroke","lineWidth"];const xP=(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]];xP.style=["stroke","lineWidth"];const _P=(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]];_P.style=["stroke","lineWidth"];const OP=(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]];OP.style=["stroke","lineWidth"];const wP=(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]];wP.style=["stroke","lineWidth"];const nl=new Map([["bowtie",$y],["cross",pP],["dash",mP],["diamond",Gy],["dot",Uy],["hexagon",Hy],["hollowBowtie",dP],["hollowDiamond",cP],["hollowHexagon",fP],["hollowPoint",aP],["hollowSquare",sP],["hollowTriangle",lP],["hollowTriangleDown",uP],["hv",xP],["hvh",OP],["hyphen",yP],["line",hP],["plus",gP],["point",zy],["rect",oP],["smooth",bP],["square",Vh],["tick",vP],["triangleDown",Yy],["triangle",Wy],["vh",_P],["vhv",wP]]);function jZ(t,e){var{d:n,fill:r,lineWidth:i,path:a,stroke:o,color:s}=e,c=NZ(e,["d","fill","lineWidth","path","stroke","color"]);const l=nl.get(t)||nl.get("point");return(...u)=>new Zr({style:Object.assign(Object.assign({},c),{d:l(...u),stroke:l.style.includes("stroke")?s||o:"",fill:l.style.includes("fill")?s||r:"",lineWidth:l.style.includes("lineWidth")?i||i||2:0})})}function Mgt(t,e){nl.set(t,e)}function Egt(t){nl.delete(t)}var RZ=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);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 SP(t,e,n,r){if(e.length===1)return;const{size:i}=n;if(t==="fixed")return i;if(t==="normal"||CO(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 Ee=(t,e)=>{const{colorAttribute:n,symbol:r,mode:i="auto"}=t,a=RZ(t,["colorAttribute","symbol","mode"]),o=nl.get(r)||nl.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]=Gg(l),_=SP(i,l,u,s)||a.r||f.r;return Kt(c.createElement("path",{})).call(Bt,f).style("fill","transparent").style("d",o(m,b,_)).style("lineWidth",p).style("transform",g).style("transformOrigin",`${m-_} ${b-_}`).style("stroke",v).style(zg(t),y).style(n,v).call(Bt,a).node()}};Ee.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const MP=(t,e)=>Ee(Object.assign({colorAttribute:"stroke",symbol:"point"},t),e);MP.props=Object.assign({defaultMarker:"hollowPoint"},Ee.props);const EP=(t,e)=>Ee(Object.assign({colorAttribute:"stroke",symbol:"diamond"},t),e);EP.props=Object.assign({defaultMarker:"hollowDiamond"},Ee.props);const PP=(t,e)=>Ee(Object.assign({colorAttribute:"stroke",symbol:"hexagon"},t),e);PP.props=Object.assign({defaultMarker:"hollowHexagon"},Ee.props);const AP=(t,e)=>Ee(Object.assign({colorAttribute:"stroke",symbol:"square"},t),e);AP.props=Object.assign({defaultMarker:"hollowSquare"},Ee.props);const TP=(t,e)=>Ee(Object.assign({colorAttribute:"stroke",symbol:"triangle-down"},t),e);TP.props=Object.assign({defaultMarker:"hollowTriangleDown"},Ee.props);const kP=(t,e)=>Ee(Object.assign({colorAttribute:"stroke",symbol:"triangle"},t),e);kP.props=Object.assign({defaultMarker:"hollowTriangle"},Ee.props);const CP=(t,e)=>Ee(Object.assign({colorAttribute:"stroke",symbol:"bowtie"},t),e);CP.props=Object.assign({defaultMarker:"hollowBowtie"},Ee.props);var IZ=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);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 LP=(t,e)=>{const{colorAttribute:n,mode:r="auto"}=t,i=IZ(t,["colorAttribute","mode"]),{coordinate:a,document:o}=e;return(s,c,l)=>{const{lineWidth:u,color:f}=l,d=i.stroke?u||1:u,{color:h=f,transform:p,opacity:v}=c,[g,y]=Gg(s),b=SP(r,s,c,a)||i.r||l.r;return Kt(o.createElement("circle",{})).call(Bt,l).style("fill","transparent").style("cx",g).style("cy",y).style("r",b).style("lineWidth",d).style("transform",p).style("transformOrigin",`${g} ${y}`).style("stroke",h).style(zg(t),v).style(n,h).call(Bt,i).node()}},Vy=(t,e)=>LP(Object.assign({colorAttribute:"fill"},t),e);Vy.props={defaultMarker:"circle",defaultEnterAnimation:"fadeIn",defaultExitAnimation:"fadeOut"};const NP=(t,e)=>LP(Object.assign({colorAttribute:"stroke"},t),e);NP.props=Object.assign({defaultMarker:"hollowPoint"},Vy.props);const jP=(t,e)=>Ee(Object.assign({colorAttribute:"fill",symbol:"point"},t),e);jP.props=Object.assign({defaultMarker:"point"},Ee.props);const RP=(t,e)=>Ee(Object.assign({colorAttribute:"stroke",symbol:"plus"},t),e);RP.props=Object.assign({defaultMarker:"plus"},Ee.props);const IP=(t,e)=>Ee(Object.assign({colorAttribute:"fill",symbol:"diamond"},t),e);IP.props=Object.assign({defaultMarker:"diamond"},Ee.props);const DP=(t,e)=>Ee(Object.assign({colorAttribute:"fill",symbol:"square"},t),e);DP.props=Object.assign({defaultMarker:"square"},Ee.props);const FP=(t,e)=>Ee(Object.assign({colorAttribute:"fill",symbol:"triangle"},t),e);FP.props=Object.assign({defaultMarker:"triangle"},Ee.props);const BP=(t,e)=>Ee(Object.assign({colorAttribute:"fill",symbol:"hexagon"},t),e);BP.props=Object.assign({defaultMarker:"hexagon"},Ee.props);const zP=(t,e)=>Ee(Object.assign({colorAttribute:"stroke",symbol:"cross"},t),e);zP.props=Object.assign({defaultMarker:"cross"},Ee.props);const GP=(t,e)=>Ee(Object.assign({colorAttribute:"fill",symbol:"bowtie"},t),e);GP.props=Object.assign({defaultMarker:"bowtie"},Ee.props);const WP=(t,e)=>Ee(Object.assign({colorAttribute:"stroke",symbol:"hyphen"},t),e);WP.props=Object.assign({defaultMarker:"hyphen"},Ee.props);const YP=(t,e)=>Ee(Object.assign({colorAttribute:"stroke",symbol:"line"},t),e);YP.props=Object.assign({defaultMarker:"line"},Ee.props);const HP=(t,e)=>Ee(Object.assign({colorAttribute:"stroke",symbol:"tick"},t),e);HP.props=Object.assign({defaultMarker:"tick"},Ee.props);const $P=(t,e)=>Ee(Object.assign({colorAttribute:"fill",symbol:"triangle-down"},t),e);$P.props=Object.assign({defaultMarker:"triangleDown"},Ee.props);const Xh=()=>(t,e)=>{const{encode:n}=e,{y:r}=n;return r!==void 0?[t,e]:[t,at({},e,{encode:{y:Bh(Co(t,0))},scale:{y:{guide:null}}})]};Xh.props={};const UP=()=>(t,e)=>{const{encode:n}=e,{size:r}=n;return r!==void 0?[t,e]:[t,at({},e,{encode:{size:zh(Co(t,3))}})]};UP.props={};const VP={hollow:MP,hollowDiamond:EP,hollowHexagon:PP,hollowSquare:AP,hollowTriangleDown:TP,hollowTriangle:kP,hollowBowtie:CP,hollowCircle:NP,point:jP,plus:RP,diamond:IP,square:DP,triangle:FP,hexagon:BP,cross:zP,bowtie:GP,hyphen:WP,line:YP,tick:HP,triangleDown:$P,circle:Vy},XP=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),x=s?(+a[y]+ +s[y])/2:+a[y],_=c?(+o[y]+ +c[y])/2:+o[y],O=x+m,w=_+b;return[O,w]},g=l?Array.from(e,y=>{const[m,b]=v(y),x=+l[y],_=x/d,O=x/h,w=[m-_,b-O],S=[m+_,b+O];return[i.map(p(w,y)),i.map(p(S,y))]}):Array.from(e,y=>[i.map(p(v(y),y))]);return[e,g]};XP.props={defaultShape:"hollow",defaultLabelShape:"label",composite:!1,shape:VP,channels:[...Qr({shapes:Object.keys(VP)}),{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:[...Xn(),{type:Rs},{type:Xh}],postInference:[...rr(),{type:UP},...Lo()]};const qP=(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 Kt(new dS).style("x",d).style("y",h).call(Bt,a).style("transform",`${u}rotate(${+l})`).style("coordCenter",n.getCenter()).call(Bt,f).call(Bt,t).node()}};qP.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var Xy=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);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 DZ(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 FZ(t){const{min:e,max:n}=t.getLocalBounds();return[(e[0]+n[0])*.5,(e[1]+n[1])*.5]}const BZ=zc(t=>{const e=t.attributes,{class:n,x:r,y:i,transform:a}=e,o=Xy(e,["class","x","y","transform"]),s=Pt(o,"marker"),{size:c=24}=s,l=()=>DZ(c/2),u=Kt(t).maybeAppend("marker",()=>new He({})).call(h=>h.node().update(Object.assign({symbol:l},s))).node(),[f,d]=FZ(u);Kt(t).maybeAppend("text","text").style("x",f).style("y",d).call(Bt,o)}),ZP=(t,e)=>{const n=Xy(t,[]);return(r,i,a)=>{const{color:o}=a,s=Xy(a,["color"]),{color:c=o,text:l=""}=i,u={text:String(l),stroke:c,fill:c},[[f,d]]=r;return Kt(new BZ).call(Bt,s).style("transform",`translate(${f},${d})`).call(Bt,u).call(Bt,n).node()}};ZP.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const KP=(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,textAlign:"center",textBaseline:"middle"},[[d,h]]=r;return Kt(new fi).style("x",d).style("y",h).call(Bt,a).style("transformOrigin","center center").style("transform",`${u}rotate(${l}deg)`).style("coordCenter",n.getCenter()).call(Bt,f).call(Bt,t).node()}};KP.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const qh=()=>(t,e)=>{const{data:n}=e;if(!Array.isArray(n)||n.some(Nu))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,at({},e,{encode:{x:yn(i),y:yn(a)}})]};qh.props={};var QP=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);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 Zh=()=>(t,e)=>{const{data:n,style:r={}}=e,i=QP(e,["data","style"]),{x:a,y:o}=r,s=QP(r,["x","y"]);if(a==null||o==null)return[t,e];const c=a||0,l=o||0;return[[0],at({},i,{data:[0],cartesian:!0,encode:{x:yn([c]),y:yn([l])},scale:{x:{type:"identity",independent:!0,guide:null},y:{type:"identity",independent:!0,guide:null}},style:s})]};Zh.props={};const JP={text:qP,badge:ZP,tag:KP},tA=t=>{const{cartesian:e=!1}=t;return e?Cy:(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]}};tA.props={defaultShape:"text",defaultLabelShape:"label",composite:!1,shape:JP,channels:[...Qr({shapes:Object.keys(JP)}),{name:"x",required:!0},{name:"y",required:!0},{name:"text",scale:"identity"},{name:"fontSize",scale:"identity"},{name:"rotate",scale:"identity"}],preInference:[...Xn(),{type:qh},{type:Zh}],postInference:[...rr(),...Lo()]};const qy=()=>(t,e)=>[t,at({scale:{x:{padding:0},y:{padding:0}}},e)];qy.props={};const eA={cell:Is,hollow:Gh},nA=()=>(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]};nA.props={defaultShape:"cell",defaultLabelShape:"label",shape:eA,composite:!1,channels:[...Qr({shapes:Object.keys(eA)}),{name:"x",required:!0,scale:"band"},{name:"y",required:!0,scale:"band"}],preInference:[...Xn(),{type:Rs},{type:Xh},{type:qy}],postInference:[...rr(),...Lo()]};function Zy(t,e,n){var r=null,i=Pn(!0),a=null,o=bu,s=null,c=Hg(l);t=typeof t=="function"?t:t===void 0?uS:Pn(+t),e=typeof e=="function"?e:Pn(e===void 0?0:+e),n=typeof n=="function"?n:n===void 0?fS:Pn(+n);function l(f){var d,h,p,v=(f=sS(f)).length,g,y=!1,m,b=new Array(v),x=new Array(v);for(a==null&&(s=o(m=c())),d=0;d<=v;++d){if(!(d<v&&i(g=f[d],d,f))===y)if(y=!y)h=d,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),p=d-1;p>=h;--p)s.point(b[p],x[p]);s.lineEnd(),s.areaEnd()}y&&(b[d]=+t(g,d,f),x[d]=+e(g,d,f),s.point(r?+r(g,d,f):b[d],n?+n(g,d,f):x[d]))}if(m)return s=null,m+""||null}function u(){return Mo().defined(i).curve(o).context(a)}return l.x=function(f){return arguments.length?(t=typeof f=="function"?f:Pn(+f),r=null,l):t},l.x0=function(f){return arguments.length?(t=typeof f=="function"?f:Pn(+f),l):t},l.x1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:Pn(+f),l):r},l.y=function(f){return arguments.length?(e=typeof f=="function"?f:Pn(+f),n=null,l):e},l.y0=function(f){return arguments.length?(e=typeof f=="function"?f:Pn(+f),l):e},l.y1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:Pn(+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:Pn(!!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 zZ(){var t=Zy().curve(NE),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 Iu(n())},delete t.lineX0,t.lineEndAngle=function(){return Iu(r())},delete t.lineX1,t.lineInnerRadius=function(){return Iu(i())},delete t.lineY0,t.lineOuterRadius=function(){return Iu(a())},delete t.lineY1,t.curve=function(o){return arguments.length?e(jy(o)):e()._curve},t}var GZ=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function WZ(t,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 rA=zc(t=>{const{areaPath:e,connectPath:n,areaStyle:r,connectStyle:i}=t.attributes,a=t.ownerDocument;Kt(t).maybeAppend("connect-path",()=>a.createElement("path",{})).style("d",n).call(Bt,i),Kt(t).maybeAppend("area-path",()=>a.createElement("path",{})).style("d",e).call(Bt,r)}),ra=(t,e)=>{const{curve:n,gradient:r=!1,defined:i=l=>!Number.isNaN(l)&&l!==void 0&&l!==null,connect:a=!1}=t,o=GZ(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=Mn(s),m=aS(s,u),b=r&&p?iS(p,v,g,r,void 0,y):h,x=Object.assign(Object.assign(Object.assign(Object.assign({},f),{stroke:b,fill:b}),m&&{transform:m}),o),[_,O]=WZ(l,i),w=Pt(x,"connect"),S=!!O.length,M=E=>Kt(c.createElement("path",{})).style("d",E||"").call(Bt,x).node();if(dn(s)){const E=P=>{const C=s.getCenter(),A=P.slice(0,P.length/2),T=P.slice(P.length/2);return zZ().angle((k,N)=>Bc(Gn(A[N],C))).outerRadius((k,N)=>Nn(A[N],C)).innerRadius((k,N)=>Nn(T[N],C)).defined((k,N)=>[...A[N],...T[N]].every(i)).curve(n)(T)};return!S||a&&!Object.keys(w).length?M(E(_)):S&&!a?M(E(l)):Kt(new rA).style("areaStyle",x).style("connectStyle",Object.assign(Object.assign({},w),o)).style("areaPath",E(l)).style("connectPath",O.map(E).join("")).node()}else{const E=P=>{const C=P.slice(0,P.length/2),A=P.slice(P.length/2);return y?Zy().y((T,k)=>C[k][1]).x1((T,k)=>C[k][0]).x0((T,k)=>A[k][0]).defined((T,k)=>[...C[k],...A[k]].every(i)).curve(n)(C):Zy().x((T,k)=>C[k][0]).y1((T,k)=>C[k][1]).y0((T,k)=>A[k][1]).defined((T,k)=>[...C[k],...A[k]].every(i)).curve(n)(C)};return!S||a&&!Object.keys(w).length?M(E(_)):S&&!a?M(E(l)):Kt(new rA).style("areaStyle",x).style("connectStyle",Object.assign(Object.assign({},w),o)).style("areaPath",E(l)).style("connectPath",O.map(E).join("")).node()}}};ra.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const iA=(t,e)=>{const{coordinate:n}=e;return(...r)=>{const i=dn(n)?Ay:bu;return ra(Object.assign({curve:i},t),e)(...r)}};iA.props=Object.assign(Object.assign({},ra.props),{defaultMarker:"square"});var YZ=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);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 aA=(t,e)=>{const n=YZ(t,[]),{coordinate:r}=e;return(...i)=>{const a=dn(r)?zE:Mn(r)?VE:UE;return ra(Object.assign({curve:a},n),e)(...i)}};aA.props=Object.assign(Object.assign({},ra.props),{defaultMarker:"smooth"});const oA=(t,e)=>(...n)=>ra(Object.assign({curve:qE},t),e)(...n);oA.props=Object.assign(Object.assign({},ra.props),{defaultMarker:"hvh"});const sA=(t,e)=>(...n)=>ra(Object.assign({curve:ZE},t),e)(...n);sA.props=Object.assign(Object.assign({},ra.props),{defaultMarker:"vh"});const cA=(t,e)=>(...n)=>ra(Object.assign({curve:KE},t),e)(...n);cA.props=Object.assign(Object.assign({},ra.props),{defaultMarker:"hv"});const lA={area:iA,smooth:aA,hvh:oA,vh:sA,hv:cA},uA=()=>(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(Ln(t,y=>l[y]).values()):[t],h=d.map(y=>y[0]).filter(y=>y!==void 0),p=(((i=u==null?void 0:u.getBandWidth)===null||i===void 0?void 0:i.call(u))||0)/2,v=(((a=f==null?void 0:f.getBandWidth)===null||a===void 0?void 0:a.call(f))||0)/2,g=Array.from(d,y=>{const m=y.length,b=new Array(m*2);for(let x=0;x<y.length;x++){const _=y[x];b[x]=r.map([+o[_]+p,+s[_]+v]),b[m+x]=r.map([+o[_]+p,+c[_]+v])}return b});return[h,g,d]};uA.props={defaultShape:"area",defaultLabelShape:"label",composite:!1,shape:lA,channels:[...Qr({shapes:Object.keys(lA)}),{name:"x",required:!0},{name:"y",required:!0},{name:"size"},{name:"series",scale:"band"}],preInference:[...Xn(),{type:By},{type:ju},{type:qy}],postInference:[...rr(),...tl()],interaction:{shareTooltip:!0,seriesTooltip:!0,crosshairs:!0}};const fA=()=>(t,e)=>{const{encode:n}=e,{y1:r}=n;if(r)return[t,e];const[i]=Le(n,"y");return[t,at({},e,{encode:{y1:yn([...i])}})]};fA.props={};const dA=()=>(t,e)=>{const{encode:n}=e,{x1:r}=n;if(r)return[t,e];const[i]=Le(n,"x");return[t,at({},e,{encode:{x1:yn([...i])}})]};dA.props={};var hA=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const Ky=(t,e)=>{const{arrow:n=!0,arrowSize:r="40%"}=t,i=hA(t,["arrow","arrowSize"]),{document:a}=e;return(o,s,c)=>{const{defaultColor:l}=c,u=hA(c,["defaultColor"]),{color:f=l,transform:d}=s,[h,p]=o,v=Gi();if(v.moveTo(...h),v.lineTo(...p),n){const[g,y]=YH(h,p,{arrowSize:r});v.moveTo(...p),v.lineTo(...g),v.moveTo(...p),v.lineTo(...y)}return Kt(a.createElement("path",{})).call(Bt,u).style("d",v.toString()).style("stroke",f).style("transform",d).call(Bt,i).node()}};Ky.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const pA=(t,e)=>{const{arrow:n=!1}=t;return(...r)=>Ky(Object.assign(Object.assign({},t),{arrow:n}),e)(...r)};pA.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};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};const gA=(t,e)=>{const n=vA(t,[]),{coordinate:r,document:i}=e;return(a,o,s)=>{const{color:c}=s,l=vA(s,["color"]),{color:u=c,transform:f}=o,[d,h]=a,p=Gi();if(p.moveTo(d[0],d[1]),dn(r)){const v=r.getCenter();p.quadraticCurveTo(v[0],v[1],h[0],h[1])}else{const v=rS(d,h),g=Nn(d,h)/2;mu(p,d,h,v,g)}return Kt(i.createElement("path",{})).call(Bt,l).style("d",p.toString()).style("stroke",u).style("transform",f).call(Bt,n).node()}};gA.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var yA=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);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 mA=(t,e)=>{const n=yA(t,[]),{document:r}=e;return(i,a,o)=>{const{color:s}=o,c=yA(o,["color"]),{color:l=s,transform:u}=a,[f,d]=i,h=Gi();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]),Kt(r.createElement("path",{})).call(Bt,c).style("d",h.toString()).style("stroke",l).style("transform",u).call(Bt,n).node()}};mA.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var bA=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);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 HZ(t,e,n,r){const i=Gi();if(dn(n)){const a=n.getCenter(),o=Nn(t,a),c=(Nn(e,a)-o)*r+o;return i.moveTo(t[0],t[1]),mu(i,t,e,a,c),i.lineTo(e[0],e[1]),i}return Mn(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 xA=(t,e)=>{const{cornerRatio:n=1/3}=t,r=bA(t,["cornerRatio"]),{coordinate:i,document:a}=e;return(o,s,c)=>{const{defaultColor:l}=c,u=bA(c,["defaultColor"]),{color:f=l,transform:d}=s,[h,p]=o,v=HZ(h,p,i,n);return Kt(a.createElement("path",{})).call(Bt,u).style("d",v.toString()).style("stroke",f).style("transform",d).call(Bt,r).node()}};xA.props={defaultMarker:"vhv",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const _A={link:pA,arc:gA,smooth:mA,vhv:xA},Qy=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]};Qy.props={defaultShape:"link",defaultLabelShape:"label",composite:!1,shape:_A,channels:[...Qr({shapes:Object.keys(_A)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...Xn(),{type:fA},{type:dA}],postInference:[...rr(),...Lo()]};var $Z=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);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 OA=(t,e)=>{const{coordinate:n,document:r}=e;return(i,a,o)=>{const{color:s}=o,c=$Z(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"?Hh(h)*y:h,p=typeof p=="string"?Hh(p)*m:p;const b=v-Number(h)/2,x=g-Number(p)/2;return Kt(r.createElement("image",{})).call(Bt,c).style("x",b).style("y",x).style("src",u).style("stroke",l).style("transform",d).call(Bt,t).style("width",h).style("height",p).node()}};OA.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const wA={image:OA},SA=t=>{const{cartesian:e}=t;return e?Cy:(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]}};SA.props={defaultShape:"image",defaultLabelShape:"label",composite:!1,shape:wA,channels:[...Qr({shapes:Object.keys(wA)}),{name:"x",required:!0},{name:"y",required:!0},{name:"src",scale:"identity"},{name:"size"}],preInference:[...Xn(),{type:qh},{type:Zh}],postInference:[...rr(),...Lo()]};var UZ=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function VZ(t,e){const n=Gi();if(dn(e)){const r=e.getCenter(),i=[...t,t[0]],a=i.map(o=>Nn(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?mu(n,l,o,r,c):n.lineTo(o[0],o[1])}),n.closePath(),n}return WH(n,t)}const MA=(t,e)=>{const{coordinate:n,document:r}=e;return(i,a,o)=>{const{color:s}=o,c=UZ(o,["color"]),{color:l=s,transform:u}=a,f=VZ(i,n);return Kt(r.createElement("path",{})).call(Bt,c).style("d",f.toString()).style("stroke",l).style("fill",l).style("transform",u).call(Bt,t).node()}};MA.props={defaultMarker:"square",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var EA=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);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,e){const[n,r,i,a]=t,o=Gi();if(dn(e)){const s=e.getCenter(),c=Nn(s,n);return o.moveTo(n[0],n[1]),o.quadraticCurveTo(s[0],s[1],i[0],i[1]),mu(o,i,a,s,c),o.quadraticCurveTo(s[0],s[1],r[0],r[1]),mu(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 PA=(t,e)=>{const n=EA(t,[]),{coordinate:r,document:i}=e;return(a,o,s)=>{const{color:c}=s,l=EA(s,["color"]),{color:u=c,transform:f}=o,d=XZ(a,r);return Kt(i.createElement("path",{})).call(Bt,l).style("d",d.toString()).style("fill",u||c).style("stroke",u||c).style("transform",f).call(Bt,n).node()}};PA.props={defaultMarker:"square",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const AA={polygon:MA,ribbon:PA},TA=()=>(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]};TA.props={defaultShape:"polygon",defaultLabelShape:"label",composite:!1,shape:AA,channels:[...Qr({shapes:Object.keys(AA)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...Xn()],postInference:[...rr(),...Lo()]};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 ZZ(t,e){const n=Gi();if(!dn(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=zi(Gn(t[0],r)),s=zi(Gn(t[1],r)),c=Nn(r,t[2]),l=Nn(r,t[3]),u=Nn(r,t[8]),f=Nn(r,t[10]),d=Nn(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 kA=(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=qZ(o,["color","fill","stroke"]),h=ZZ(i,n);return Kt(r.createElement("path",{})).call(Bt,d).style("d",h.toString()).style("stroke",f).style("fill",s||u).style("transform",c).call(Bt,t).node()}};kA.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var KZ=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function QZ(t,e,n=4){const r=Gi();if(!dn(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=Nn(i,t[3]),c=Nn(i,t[8]),l=Nn(i,t[10]),u=zi(Gn(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 CA=(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=KZ(o,["color","fill","stroke"]),p=QZ(i,n,l);return Kt(r.createElement("path",{})).call(Bt,h).style("d",p.toString()).style("stroke",d).style("fill",s||f).style("transform",c).call(Bt,t).node()}};CA.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const LA={box:kA,violin:CA},NA=()=>(t,e,n,r)=>{const{x:i,y:a,y1:o,y2:s,y3:c,y4:l,series:u}=n,f=e.x,d=e.series,h=Array.from(t,p=>{const v=f.getBandWidth(f.invert(+i[p])),g=d?d.getBandWidth(d.invert(+(u==null?void 0:u[p]))):1,y=v*g,m=(+(u==null?void 0:u[p])||0)*v,b=+i[p]+m+y/2,[x,_,O,w,S]=[+a[p],+o[p],+s[p],+c[p],+l[p]];return[[b-y/2,S],[b+y/2,S],[b,S],[b,w],[b-y/2,w],[b+y/2,w],[b+y/2,_],[b-y/2,_],[b-y/2,O],[b+y/2,O],[b,_],[b,x],[b-y/2,x],[b+y/2,x]].map(E=>r.map(E))});return[t,h]};NA.props={defaultShape:"box",defaultLabelShape:"label",composite:!1,shape:LA,channels:[...Qr({shapes:Object.keys(LA)}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"}],preInference:[...Xn(),{type:Rs}],postInference:[...rr(),...tl()],interaction:{shareTooltip:!0}};const jA={vector:Ky},RA=()=>(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]};RA.props={defaultShape:"vector",defaultLabelShape:"label",composite:!1,shape:jA,channels:[...Qr({shapes:Object.keys(jA)}),{name:"x",required:!0},{name:"y",required:!0},{name:"rotate",required:!0,scale:"identity"},{name:"size",required:!0}],preInference:[...Xn()],postInference:[...rr(),...Lo()]};var IA=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);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,e,n){return t.createElement("path",{style:Object.assign({d:`M ${e},${e} L -${e},0 L ${e},-${e} L 0,0 Z`,transformOrigin:"center"},n)})}function tK(t,e){if(!dn(e))return Mo().x(r=>r[0]).y(r=>r[1])(t);const n=e.getCenter();return xh()({startAngle:0,endAngle:Math.PI*2,outerRadius:Nn(t[0],n),innerRadius:Nn(t[1],n)})}function eK(t,e){if(!dn(t))return e;const[n,r]=t.getCenter();return`translate(${n}, ${r}) ${e||""}`}const Jy=(t,e)=>{const{arrow:n,arrowSize:r=4}=t,i=IA(t,["arrow","arrowSize"]),{coordinate:a,document:o}=e;return(s,c,l)=>{const{color:u,lineWidth:f}=l,d=IA(l,["color","lineWidth"]),{color:h=u,size:p=f}=c,v=n?JZ(o,r,Object.assign({fill:i.stroke||h,stroke:i.stroke||h},Pt(i,"arrow"))):null,g=tK(s,a),y=eK(a,c.transform);return Kt(o.createElement("path",{})).call(Bt,d).style("d",g).style("stroke",h).style("lineWidth",p).style("transform",y).style("markerEnd",v).call(Bt,i).node()}};Jy.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const DA=()=>(t,e)=>{const{data:n}=e;return!Array.isArray(n)||n.some(Nu)?[t,e]:[t,at({},e,{encode:{x:yn(n)}})]};DA.props={};const FA={line:Jy},BA=t=>(e,n,r,i)=>{const{x:a}=r,o=Ds(n,r,at({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]};BA.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,shape:FA,channels:[...el({shapes:Object.keys(FA)}),{name:"x",required:!0}],preInference:[...Xn(),{type:DA}],postInference:[...rr()]};const zA=()=>(t,e)=>{const{data:n}=e;return!Array.isArray(n)||n.some(Nu)?[t,e]:[t,at({},e,{encode:{y:yn(n)}})]};zA.props={};const GA={line:Jy},WA=t=>(e,n,r,i)=>{const{y:a}=r,o=Ds(n,r,at({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]};WA.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,shape:GA,channels:[...el({shapes:Object.keys(GA)}),{name:"y",required:!0}],preInference:[...Xn(),{type:zA}],postInference:[...rr()]};var YA=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);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 nK(t,e,n){return[["M",t,e],["L",t+2*n,e-n],["L",t+2*n,e+n],["Z"]]}function rK(t){return Mo().x(e=>e[0]).y(e=>e[1])(t)}function iK(t,e,n,r,i=0){const[[a,o],[s,c]]=e;if(Mn(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 HA=(t,e)=>{const{offset:n=0,offset1:r=n,offset2:i=n,connectLength1:a,endMarker:o=!0}=t,s=YA(t,["offset","offset1","offset2","connectLength1","endMarker"]),{coordinate:c}=e;return(l,u,f)=>{const{color:d,connectLength1:h}=f,p=YA(f,["color","connectLength1"]),{color:v,transform:g}=u,y=iK(c,l,r,i,a!=null?a:h),m=Pt(Object.assign(Object.assign({},s),f),"endMarker");return Kt(new Zr).call(Bt,p).style("d",rK(y)).style("stroke",v||d).style("transform",g).style("markerEnd",o?new He({className:"marker",style:Object.assign(Object.assign({},m),{symbol:nK})}):null).call(Bt,s).node()}};HA.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const $A={connector:HA},UA=(...t)=>Qy(...t);UA.props={defaultShape:"connector",defaultLabelShape:"label",composite:!1,shape:$A,channels:[...el({shapes:Object.keys($A)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...Xn()],postInference:[...rr()]};function VA(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 tm(t={}){const{extendX:e=!1,extendY:n=!1}=t;return(r,i,a,o)=>{const s=VA("x",e,a,i.x),c=VA("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:Is},qA=()=>tm();qA.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,shape:XA,channels:[...el({shapes:Object.keys(XA)}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...Xn()],postInference:[...rr()]};const ZA=()=>(t,e)=>{const{data:n}=e;if(Array.isArray(n)&&(n.every(Array.isArray)||!n.some(Nu))){const r=(i,a)=>Array.isArray(i[0])?i.map(o=>o[a]):[i[a]];return[t,at({},e,{encode:{x:yn(r(n,0)),x1:yn(r(n,1))}})]}return[t,e]};ZA.props={};const KA={range:Is},QA=()=>tm({extendY:!0});QA.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,shape:KA,channels:[...el({shapes:Object.keys(KA)}),{name:"x",required:!0}],preInference:[...Xn(),{type:ZA}],postInference:[...rr()]};const JA=()=>(t,e)=>{const{data:n}=e;if(Array.isArray(n)&&(n.every(Array.isArray)||!n.some(Nu))){const r=(i,a)=>Array.isArray(i[0])?i.map(o=>o[a]):[i[a]];return[t,at({},e,{encode:{y:yn(r(n,0)),y1:yn(r(n,1))}})]}return[t,e]};JA.props={};const tT={range:Is},eT=()=>tm({extendX:!0});eT.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,shape:tT,channels:[...el({shapes:Object.keys(tT)}),{name:"y",required:!0}],preInference:[...Xn(),{type:JA}],postInference:[...rr()]};var nT=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const em=(t,e)=>{const{arrow:n,colorAttribute:r}=t,i=nT(t,["arrow","colorAttribute"]),{coordinate:a,document:o}=e;return(s,c,l)=>{const{color:u,stroke:f}=l,d=nT(l,["color","stroke"]),{d:h,color:p=u}=c,[v,g]=a.getSize();return Kt(o.createElement("path",{})).call(Bt,d).style("d",typeof h=="function"?h({width:v,height:g}):h).style(r,p).call(Bt,i).node()}};em.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const rT=(t,e)=>em(Object.assign({colorAttribute:"fill"},t),e);rT.props={defaultMarker:"hvh",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const iT=(t,e)=>em(Object.assign({fill:"none",colorAttribute:"stroke"},t),e);iT.props={defaultMarker:"hvh",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const aT={path:rT,hollow:iT},oT=t=>(e,n,r,i)=>[e,e.map(()=>[[0,0]])];oT.props={defaultShape:"path",defaultLabelShape:"label",shape:aT,composite:!1,channels:[...Qr({shapes:Object.keys(aT)}),{name:"d",scale:"identity"}],preInference:[...Xn()],postInference:[...rr()]};var aK=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);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 sT=(t,e)=>{const{render:n}=t,r=aK(t,["render"]);return i=>{const[[a,o]]=i;return n(Object.assign(Object.assign({},r),{x:a,y:o}),e)}};sT.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const cT=()=>(t,e)=>{const{style:n={}}=e;return[t,at({},e,{style:Object.assign(Object.assign({},n),Object.fromEntries(Object.entries(n).filter(([,r])=>typeof r=="function").map(([r,i])=>[r,()=>i])))})]};cT.props={};const oK={shape:sT},lT=t=>{const{cartesian:e}=t;return e?Cy:(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]}};lT.props={defaultShape:"shape",defaultLabelShape:"label",composite:!1,shape:oK,channels:[{name:"x",required:!0},{name:"y",required:!0}],preInference:[...Xn(),{type:qh},{type:Zh},{type:cT}]};var sK=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const uT=(t,e)=>{const{document:n}=e;return(r,i,a)=>{const{transform:o}=i,{color:s}=a,c=sK(a,["color"]),{color:l=s}=i,[u,...f]=r,d=Gi();return d.moveTo(...u),f.forEach(([h,p])=>{d.lineTo(h,p)}),d.closePath(),Kt(n.createElement("path",{})).call(Bt,c).style("d",d.toString()).style("stroke",l||s).style("fill",l||s).style("fillOpacity",.4).style("transform",o).call(Bt,t).node()}};uT.props={defaultMarker:"square",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const fT={density:uT},dT=()=>(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]};dT.props={defaultShape:"density",defaultLabelShape:"label",composite:!1,shape:fT,channels:[...Qr({shapes:Object.keys(fT)}),{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:[...Xn(),{type:ju},{type:Rs}],postInference:[...rr(),...tl()],interaction:{shareTooltip:!0}};function hT(t){var e,n,r,i=t||1;function a(s,c){++e>i&&(r=n,o(1),++e),n[s]=c}function o(s){e=0,n=Object.create(null),s||(r=Object.create(null))}return o(),{clear:o,has:function(s){return n[s]!==void 0||r[s]!==void 0},get:function(s){var c=n[s];if(c!==void 0)return c;if((c=r[s])!==void 0)return a(s,c),c},set:function(s,c){n[s]!==void 0?n[s]=c:a(s,c)}}}const Pgt=hT(3);function cK(t,e=(...r)=>`${r[0]}`,n=16){const r=hT(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 lK(t){return typeof t=="string"?t.split(" ").map(e=>{const[n,r]=e.split(":");return[+n,r]}):t}function Kh(t,e,n){const r=t?t():document.createElement("canvas");return r.width=e,r.height=n,r}const uK=cK((t,e,n)=>{const r=Kh(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 fK(t,e){const r=Kh(e,256,1).getContext("2d"),i=r.createLinearGradient(0,0,256,1);return lK(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 dK(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=uK(f,1-o,a),g=(d-e)/(n-e);t.globalAlpha=Math.max(g,.001),t.drawImage(v,h,p)}return t}function hK(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 pK(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=Kh(o,t,e).getContext("2d"),u=fK(s.gradient,o);l.clearRect(0,0,t,e),dK(l,n,r,i,s,o);const f=hK(l,t,e,u,s),h=Kh(o,t,e).getContext("2d");return h.putImageData(f,0,0),h}var vK=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);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 gK(t,e){return Object.keys(t).reduce((n,r)=>{const i=t[r];return e(i,r)||(n[r]=i),n},{})}const pT=(t,e)=>{const{gradient:n,opacity:r,maxOpacity:i,minOpacity:a,blur:o,useGradientOpacity:s}=t,c=vK(t,["gradient","opacity","maxOpacity","minOpacity","blur","useGradientOpacity"]),{coordinate:l,createCanvas:u,document:f}=e;return(d,h,p)=>{const{transform:v}=h,[g,y]=l.getSize(),m=d.map(w=>({x:w[0],y:w[1],value:w[2],radius:w[3]})),b=Oi(d,w=>w[2]),x=Ke(d,w=>w[2]),O=g&&y?pK(g,y,b,x,m,gK({gradient:n,opacity:r,minOpacity:a,maxOpacity:i,blur:o,useGradientOpacity:s},w=>w===void 0),u):{canvas:null};return Kt(f.createElement("image",{})).call(Bt,p).style("x",0).style("y",0).style("width",g).style("height",y).style("src",O.canvas).style("transform",v).call(Bt,c).node()}};pT.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const vT={heatmap:pT},gT=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]]};gT.props={defaultShape:"heatmap",defaultLabelShape:"label",composite:!1,shape:vT,channels:[...Qr({shapes:Object.keys(vT)}),{name:"x",required:!0},{name:"y",required:!0},{name:"color",scale:"identity",required:!0},{name:"size"}],preInference:[...Xn(),{type:Rs},{type:Xh}],postInference:[...rr(),...Lo()]};var yK=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())})},mK=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function bK(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 xK=()=>({axis:!1,type:"text",encode:{x:"x",y:"y",text:"text",rotate:"rotate",fontSize:"size",shape:"tag"},scale:{x:{range:[0,1]},y:{range:[0,1]}},style:{fontFamily:t=>t.fontFamily}}),nm=(t,e)=>yK(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=mK(t,["data","encode","scale","style","layout"]),u=bK(i,a);return at({},xK(),Object.assign(Object.assign({data:{value:u,transform:[Object.assign({type:"wordCloud",size:[n,r]},c)]},encode:a,scale:o,style:s},l),{axis:!1}))});nm.props={};const yT=()=>["#5B8FF9","#5AD8A6","#5D7092","#F6BD16","#6F5EF9","#6DC8EC","#945FB9","#FF9845","#1E9493","#FF99C3"];yT.props={};const mT=()=>["#5B8FF9","#CDDDFD","#5AD8A6","#CDF3E4","#5D7092","#CED4DE","#F6BD16","#FCEBB9","#6F5EF9","#D3CEFD","#6DC8EC","#D3EEF9","#945FB9","#DECFEA","#FF9845","#FFE0C7","#1E9493","#BBDEDE","#FF99C3","#FFE0ED"];mT.props={};const bT=t=>new Br(t);bT.props={};const Qh=Symbol("defaultUnknown");function xT(t,e,n){for(let r=0;r<e.length;r+=1)t.has(e[r])||t.set(n(e[r]),r)}function _T(t){const{value:e,from:n,to:r,mapper:i,notFoundReturn:a}=t;let o=i.get(e);if(o===void 0){if(a!==Qh)return a;o=n.push(e)-1,i.set(e,o)}return r[o%r.length]}function OT(t){return t instanceof Date?e=>`${e}`:typeof t=="object"?e=>JSON.stringify(e):e=>e}class Jh extends fu{getDefaultOptions(){return{domain:[],range:[],unknown:Qh}}constructor(e){super(e)}map(e){return this.domainIndexMap.size===0&&xT(this.domainIndexMap,this.getDomain(),this.domainKey),_T({value:this.domainKey(e),mapper:this.domainIndexMap,from:this.getDomain(),to:this.getRange(),notFoundReturn:this.options.unknown})}invert(e){return this.rangeIndexMap.size===0&&xT(this.rangeIndexMap,this.getRange(),this.rangeKey),_T({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=OT(n),this.rangeKey=OT(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 Jh(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 wT=t=>new Jh(t);wT.props={};function ST({map:t,initKey:e},n){const r=e(n);return t.has(r)?t.get(r):n}function _K({map:t,initKey:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function OK({map:t,initKey:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function wK(t){return typeof t=="object"?t.valueOf():t}class MT extends Map{constructor(e){if(super(),this.map=new Map,this.initKey=wK,e!==null)for(const[n,r]of e)this.set(n,r)}get(e){return super.get(ST({map:this.map,initKey:this.initKey},e))}has(e){return super.has(ST({map:this.map,initKey:this.initKey},e))}set(e,n){return super.set(_K({map:this.map,initKey:this.initKey},e),n)}delete(e){return super.delete(OK({map:this.map,initKey:this.initKey},e))}}function SK(t){const e=Math.min(...t);return t.map(n=>n/e)}function MK(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 EK(t){return Math.round(t*1e12)/1e12}function PK(t){const{domain:e,range:n,paddingOuter:r,paddingInner:i,flex:a,round:o,align:s}=t,c=e.length,l=MK(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=SK(l),m=y.reduce((C,A)=>C+A),b=g/m,x=new MT(e.map((C,A)=>{const T=y[A]*b;return[C,o?Math.floor(T):T]})),_=new MT(e.map((C,A)=>{const k=y[A]*b+v;return[C,o?Math.floor(k):k]})),O=Array.from(_.values()).reduce((C,A)=>C+A),S=(d-(O-O/c*i))*s,M=u+S;let E=o?Math.round(M):M;const P=new Array(c);for(let C=0;C<c;C+=1){P[C]=EK(E);const A=e[C];E+=_.get(A)}return{valueBandWidth:x,valueStep:_,adjustedRange:P}}function AK(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 PK(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 No extends Jh{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,paddingInner:0,paddingOuter:0,padding:0,unknown:Qh,flex:[]}}constructor(e){super(e)}clone(){return new No(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}=AK({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 ET=t=>new No(t);ET.props={};class tp extends fu{getDefaultOptions(){return{domain:[0,1],range:[0,1],tickCount:5,unknown:void 0,tickMethod:jg}}map(e){return ih(e)?e:this.options.unknown}invert(e){return this.map(e)}clone(){return new tp(this.options)}getTicks(){const{domain:e,tickCount:n,tickMethod:r}=this.options,[i,a]=e;return!vn(i)||!vn(a)?[]:r(i,a,n)}}const PT=t=>new tp(t);PT.props={};class rm extends No{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,padding:0,unknown:Qh,paddingInner:1,paddingOuter:0}}constructor(e){super(e)}getPaddingInner(){return 1}clone(){return new rm(this.options)}update(e){super.update(e)}getPaddingOuter(){return this.options.padding}}const AT=t=>new rm(t);AT.props={};var TT=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,jo="\\d\\d?",Ro="\\d\\d",TK="\\d{3}",kK="\\d{4}",Du="[^\\s]+",kT=/\[([^]*?)\]/gm;function CT(t,e){for(var n=[],r=0,i=t.length;r<i;r++)n.push(t[r].substr(0,e));return n}var LT=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 Fs(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 NT=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],jT=["January","February","March","April","May","June","July","August","September","October","November","December"],CK=CT(jT,3),LK=CT(NT,3),RT={dayNamesShort:LK,dayNames:NT,monthNamesShort:CK,monthNames:jT,amPm:["am","pm"],DoFn:function(t){return t+["th","st","nd","rd"][t%10>3?0:(t-t%10!==10?1:0)*t%10]}},ep=Fs({},RT),NK=function(t){return ep=Fs(ep,t)},IT=function(t){return t.replace(/[|\\{()[^$+*?.-]/g,"\\$&")},pi=function(t,e){for(e===void 0&&(e=2),t=String(t);t.length<e;)t="0"+t;return t},jK={D:function(t){return String(t.getDate())},DD:function(t){return pi(t.getDate())},Do:function(t,e){return e.DoFn(t.getDate())},d:function(t){return String(t.getDay())},dd:function(t){return pi(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 pi(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 pi(String(t.getFullYear()),4).substr(2)},YYYY:function(t){return pi(t.getFullYear(),4)},h:function(t){return String(t.getHours()%12||12)},hh:function(t){return pi(t.getHours()%12||12)},H:function(t){return String(t.getHours())},HH:function(t){return pi(t.getHours())},m:function(t){return String(t.getMinutes())},mm:function(t){return pi(t.getMinutes())},s:function(t){return String(t.getSeconds())},ss:function(t){return pi(t.getSeconds())},S:function(t){return String(Math.round(t.getMilliseconds()/100))},SS:function(t){return pi(Math.round(t.getMilliseconds()/10),2)},SSS:function(t){return pi(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?"-":"+")+pi(Math.floor(Math.abs(e)/60)*100+Math.abs(e)%60,4)},Z:function(t){var e=t.getTimezoneOffset();return(e>0?"-":"+")+pi(Math.floor(Math.abs(e)/60),2)+":"+pi(Math.abs(e)%60,2)}},DT=function(t){return+t-1},FT=[null,jo],BT=[null,Du],zT=["isPm",Du,function(t,e){var n=t.toLowerCase();return n===e.amPm[0]?0:n===e.amPm[1]?1:null}],GT=["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}],RK={D:["day",jo],DD:["day",Ro],Do:["day",jo+Du,function(t){return parseInt(t,10)}],M:["month",jo,DT],MM:["month",Ro,DT],YY:["year",Ro,function(t){var e=new Date,n=+(""+e.getFullYear()).substr(0,2);return+(""+(+t>68?n-1:n)+t)}],h:["hour",jo,void 0,"isPm"],hh:["hour",Ro,void 0,"isPm"],H:["hour",jo],HH:["hour",Ro],m:["minute",jo],mm:["minute",Ro],s:["second",jo],ss:["second",Ro],YYYY:["year",kK],S:["millisecond","\\d",function(t){return+t*100}],SS:["millisecond",Ro,function(t){return+t*10}],SSS:["millisecond",TK],d:FT,dd:FT,ddd:BT,dddd:BT,MMM:["month",Du,LT("monthNamesShort")],MMMM:["month",Du,LT("monthNames")],a:zT,A:zT,ZZ:GT,Z:GT},np={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"},IK=function(t){return Fs(np,t)},WT=function(t,e,n){if(e===void 0&&(e=np.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=np[e]||e;var r=[];e=e.replace(kT,function(a,o){return r.push(o),"@@@"});var i=Fs(Fs({},ep),n);return e=e.replace(TT,function(a){return jK[a](t,i)}),e.replace(/@@@/g,function(){return r.shift()})};function DK(t,e,n){if(n===void 0&&(n={}),typeof e!="string")throw new Error("Invalid format in fecha parse");if(e=np[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(kT,function(x,_){return o.push(IT(_)),"@@@"}),c={},l={};s=IT(s).replace(TT,function(x){var _=RK[x],O=_[0],w=_[1],S=_[3];if(c[O])throw new Error("Invalid format. "+O+" specified twice in format");return c[O]=!0,S&&(l[S]=!0),a.push(_),"("+w+")"}),Object.keys(l).forEach(function(x){if(!c[x])throw new Error("Invalid format. "+x+" is required in specified format")}),s=s.replace(/@@@/g,function(){return o.shift()});var u=t.match(new RegExp(s,"i"));if(!u)return null;for(var f=Fs(Fs({},ep),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 Agt={format:WT,parse:DK,defaultI18n:RT,setGlobalDateI18n:NK,setGlobalDateMasks:IK},Tgt=null;const Fu=1e3,Bu=Fu*60,zu=Bu*60,Bs=zu*24,Gu=Bs*7,YT=Bs*30,HT=Bs*365;function Wr(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 FK=Wr(1,t=>t,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),BK=Wr(Fu,t=>{t.setMilliseconds(0)},(t,e=1)=>{t.setTime(+t+Fu*e)},t=>t.getSeconds()),zK=Wr(Bu,t=>{t.setSeconds(0,0)},(t,e=1)=>{t.setTime(+t+Bu*e)},t=>t.getMinutes()),GK=Wr(zu,t=>{t.setMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+zu*e)},t=>t.getHours()),WK=Wr(Bs,t=>{t.setHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+Bs*e)},t=>t.getDate()-1),$T=Wr(YT,t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e=1)=>{const n=t.getMonth();t.setMonth(n+e)},t=>t.getMonth()),YK=Wr(Gu,t=>{t.setDate(t.getDate()-t.getDay()%7),t.setHours(0,0,0,0)},(t,e=1)=>{t.setDate(t.getDate()+7*e)},t=>{const e=$T.floor(t),n=new Date(+t);return Math.floor((+n-+e)/Gu)}),HK=Wr(HT,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()),UT={millisecond:FK,second:BK,minute:zK,hour:GK,day:WK,week:YK,month:$T,year:HK},$K=Wr(1,t=>t,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),UK=Wr(Fu,t=>{t.setUTCMilliseconds(0)},(t,e=1)=>{t.setTime(+t+Fu*e)},t=>t.getUTCSeconds()),VK=Wr(Bu,t=>{t.setUTCSeconds(0,0)},(t,e=1)=>{t.setTime(+t+Bu*e)},t=>t.getUTCMinutes()),XK=Wr(zu,t=>{t.setUTCMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+zu*e)},t=>t.getUTCHours()),qK=Wr(Bs,t=>{t.setUTCHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+Bs*e)},t=>t.getUTCDate()-1),VT=Wr(YT,t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e=1)=>{const n=t.getUTCMonth();t.setUTCMonth(n+e)},t=>t.getUTCMonth()),ZK=Wr(Gu,t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7)%7),t.setUTCHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+Gu*e)},t=>{const e=VT.floor(t),n=new Date(+t);return Math.floor((+n-+e)/Gu)}),KK=Wr(HT,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()),XT={millisecond:$K,second:UK,minute:VK,hour:XK,day:qK,week:ZK,month:VT,year:KK};function QK(t){const e=t?XT:UT,{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 qT(t,e,n,r,i){const a=+t,o=+e,{tickIntervals:s,year:c,millisecond:l}=QK(i),u=([g,y])=>g.duration*y,f=r?(o-a)/r:n||5,d=r||(o-a)/f,h=s.length,p=Pg(s,d,0,h,u);let v;if(p===h){const g=xw(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(xw(a,o,f),1);v=[l,g]}return v}const JK=(t,e,n,r,i)=>{const a=t>e,o=a?e:t,s=a?t:e,[c,l]=qT(o,s,n,r,i),u=c.range(o,new Date(+s+1),l,!0);return a?u.reverse():u},tQ=(t,e,n,r,i)=>{const a=t>e,o=a?e:t,s=a?t:e,[c,l]=qT(o,s,n,r,i),u=[c.floor(o,l),c.ceil(s,l)];return a?u.reverse():u};function eQ(t,e){const{second:n,minute:r,hour:i,day:a,week:o,month:s,year:c}=e;return n.floor(t)<t?".SSS":r.floor(t)<t?":ss":i.floor(t)<t?"hh:mm":a.floor(t)<t?"hh A":s.floor(t)<t?o.floor(t)<t?"MMM DD":"ddd DD":c.floor(t)<t?"MMMM":"YYYY"}function nQ(t){const e=t.getTimezoneOffset(),n=new Date(t);return n.setMinutes(n.getMinutes()+e,n.getSeconds(),n.getMilliseconds()),n}class im extends oh{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:JK,interpolate:Rc,mask:void 0,utc:!1}}chooseTransforms(){return[r=>+r,r=>new Date(r)]}chooseNice(){return tQ}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?XT:UT,i=n?nQ:Es;return a=>WT(i(a),e||eQ(a,r))}clone(){return new im(this.options)}}const ZT=t=>new im(t);ZT.props={};const KT=t=>e=>-t(-e),am=(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?KT(r):r},om=(t,e)=>{const n=t===Math.E?Math.exp:r=>ir(t,r);return e?KT(n):n},rQ=(t,e,n,r=10)=>{const i=t<0,a=om(r,i),o=am(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=Ps(c,l,n))}else{const h=n===-1?f-u:Math.min(f-u,n);d=Ps(u,f,h).map(a)}return s?d.reverse():d},iQ=(t,e,n,r)=>{const i=t<0,a=am(r,i),o=om(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 sm extends oh{getDefaultOptions(){return{domain:[1,10],range:[0,1],base:10,interpolate:du,tickMethod:rQ,tickCount:5}}chooseNice(){return iQ}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[am(e,r),om(e,r)]}clone(){return new sm(this.options)}}const QT=t=>new sm(t);QT.props={};const aQ=t=>e=>e<0?-ir(-e,t):ir(e,t),oQ=t=>e=>e<0?-ir(-e,1/t):ir(e,1/t),sQ=t=>t<0?-Math.sqrt(-t):Math.sqrt(t);class rp extends oh{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,exponent:2,interpolate:du,tickMethod:Ps,tickCount:5}}constructor(e){super(e)}chooseTransforms(){const{exponent:e}=this.options;if(e===1)return[Es,Es];const n=e===.5?sQ:aQ(e),r=oQ(e);return[n,r]}clone(){return new rp(this.options)}}const JT=t=>new rp(t);JT.props={};class cm extends rp{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:du,tickMethod:Ps,tickCount:5,exponent:.5}}constructor(e){super(e)}update(e){super.update(e)}clone(){return new cm(this.options)}}const tk=t=>new cm(t);tk.props={};const ek=t=>new Ic(t);ek.props={};const nk=t=>new dh(t);nk.props={};const rk=t=>new fh(t);rk.props={};const cQ=t=>e=>{const n=t(e);return vn(n)?Math.round(n):n};function lQ(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?cQ(o):o;this.output=jc(l,c,i,r)},n.prototype.invert=void 0}}var uQ=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},lm;function fQ(t){return[t(0),t(1)]}const dQ=t=>{const[e,n]=t;return jc(Rc(0,1),rh(e,n))};let um=lm=class extends Br{getDefaultOptions(){return{domain:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:Es,tickMethod:Ps,tickCount:5}}constructor(e){super(e)}clone(){return new lm(this.options)}};um=lm=uQ([lQ(fQ,dQ)],um);const ik=t=>new um(t);ik.props={};const ak=t=>new vu(t);ak.props={};function fm({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,lineWidth: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,lineWidth: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",titleTransform:"translate(0, 8)"},axisLeft:{gridDirection:"positive",labelDirection:"negative",labelSpacing:4,tickDirection:"negative",titlePosition:"left",titleSpacing:12,titleTextBaseline:"middle",titleDirection:"vertical",titleTransform:"rotate(-90) translate(0, -8)",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 hQ=fm({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}),dm=t=>at({},hQ,t);dm.props={};const ok=t=>at({},dm(),{category10:"category10",category20:"category20"},t);ok.props={};const pQ=fm({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}),sk=t=>at({},pQ,{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),ck=t=>Object.assign({},sk(),{category10:"category10",category20:"category20"},t);ck.props={};const vQ=fm({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}),lk=t=>at({},vQ,{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);lk.props={};const uk=t=>(...e)=>{const n=Oo(Object.assign({},{crossPadding:50},t))(...e);return kw(n,t),n};uk.props=Object.assign(Object.assign({},Oo.props),{defaultPosition:"bottom"});function Ngt(){}const fk=t=>(...e)=>{const n=Oo(Object.assign({},{crossPadding:10},t))(...e);return kw(n,t),n};fk.props=Object.assign(Object.assign({},Oo.props),{defaultPosition:"left"});var hm=function(){},gQ=function(t,e,n){var r=t,i=Cn(e)?e.split("."):e;return i.forEach(function(a,o){o<i.length-1?(cs(r[a])||(r[a]=vn(i[o+1])?[]:{}),r=r[a]):r[a]=n}),t};function yQ(t,e){return t.reduce(function(n,r){return(n[r[e]]=n[r[e]]||[]).push(r),n},{})}function mQ(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"),bQ=function(t){It(e,t);function e(n){var r=t.call(this,n,{x:0,y:0,animate:{easing:"linear",duration:200,fill:"both"},buttonCursor:"pointer",buttonFill:"black",buttonD:ZY(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 dr({class:Yi.contentGroup.name})),r.playWindow=r.contentGroup.appendChild(new dr({class:Yi.playWindow.name})),r.innerCurrPage=r.defaultPage,r}return Object.defineProperty(e.prototype,"defaultPage",{get:function(){var n=this.attributes.defaultPage;return Bn(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=D(mQ(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,dt([],D(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 En(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=D(this.getFollowingPageDiff(n),2),f=u[0],d=u[1];this.playState="running";var h=IO(c,[{transform:"translate(0, 0)"},{transform:"translate(".concat(-f,", ").concat(-d,")")}],i);return Cc(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:Bn(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:Bn(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)?au(r):_o(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=D(s==="horizontal"?[-180,0]:[-90,90],2),h=d[0],p=d[1];r.setLocalEulerAngles(h),i.setLocalEulerAngles(p);var v=r.getBBox(),g=v.width,y=v.height,m=i.getBBox(),b=m.width,x=m.height,_=Math.max(g,u,b),O=s==="horizontal"?{offset:[[0,0],[g/2+c,0],[g+u+c*2,0]],textAlign:"start"}:{offset:[[_/2,-y-c],[_/2,0],[_/2,x+c]],textAlign:"center"},w=D(O.offset,3),S=D(w[0],2),M=S[0],E=S[1],P=D(w[1],2),C=P[0],A=P[1],T=D(w[2],2),k=T[0],N=T[1],F=O.textAlign,R=a.querySelector("text");R&&(R.style.textAlign=F),r.setLocalPosition(M,E),a.setLocalPosition(C,A),i.setLocalPosition(k,N)},e.prototype.updatePageInfo=function(){var n,r=this,i=r.currPage,a=r.pageViews,o=r.attributes.formatter;a.length<2||((n=this.pageInfoGroup.querySelector(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=D(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(Xd(l.node(),c),!!c){var u=Oe(this.attributes,"button"),f=Oe(this.attributes,"pageNum"),d=D(Ya(u),2),h=d[0],p=d[1],v=h.size,g=wn(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"),x=l.maybeAppendByClassName(Yi.nextBtnGroup,"g").styles(p);this.nextBtnGroup=x.node();var _=x.maybeAppendByClassName(Yi.nextBtn,"path");[b,_].forEach(function(w){w.styles(J(J({},g),{transformOrigin:"center"})),mg(w.node(),v,!0)});var O=l.maybeAppendByClassName(Yi.pageInfoGroup,"g");this.pageInfoGroup=O.node(),O.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=n.x,a=i===void 0?0:i,o=n.y,s=o===void 0?0:o;this.attr("transform","translate(".concat(a,", ").concat(s,")"));var c=de(r);this.renderClipPath(c),this.renderController(c),this.setVisiblePages([this.defaultPage]),this.goTo(this.defaultPage)},e.prototype.bindEvents=function(){var n=this,r=aO(function(){return n.render(n.attributes,n)},50);this.playWindow.addEventListener(re.INSERTED,r),this.playWindow.addEventListener(re.REMOVED,r)},e}(yr),wi=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 xQ(t){var e=t.querySelector(wi.marker.class);return e?e.style:{}}var _Q=function(t){It(e,t);function e(n){return t.call(this,n,{span:[1,1],marker:function(){return new ms({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=D(Pr(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=D(this.spacing,2),h=d[0],p=d[1];if(a){var v=a-i-h-p,g=D(this.span,2),y=g[0],m=g[1];n=D([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=D(Pr(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=D(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=xQ(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=Oe(this.attributes,"marker");this.markerGroup=n.maybeAppendByClassName(wi.markerGroup,"g").style("zIndex",0),hi(!!i,this.markerGroup,function(){var o,s=r.markerGroup.node(),c=(o=s.childNodes)===null||o===void 0?void 0:o[0],l=typeof i=="string"?new He({style:{symbol:i},className:wi.marker.name}):i();c?l.nodeName===c.nodeName?c instanceof He?c.update(J(J({},a),{symbol:i})):(bW(c,l),de(c).styles(a)):(c.remove(),de(l).attr("className",wi.marker.name).styles(a),s.appendChild(l)):(l instanceof He||de(l).attr("className",wi.marker.name).styles(a),s.appendChild(l)),r.markerGroup.node().scale(1/r.markerGroup.node().getScale()[0]);var u=mg(r.markerGroup.node(),r.scaleSize,!0);r.markerGroup.node().style._transform="scale(".concat(u,")")})},e.prototype.renderLabel=function(n){var r=Oe(this.attributes,"label"),i=r.text,a=wn(r,["text"]);this.labelGroup=n.maybeAppendByClassName(wi.labelGroup,"g").style("zIndex",0),this.labelGroup.maybeAppendByClassName(wi.label,function(){return Ms(i)}).styles(a)},e.prototype.renderValue=function(n){var r=this,i=Oe(this.attributes,"value"),a=i.text,o=wn(i,["text"]);this.valueGroup=n.maybeAppendByClassName(wi.valueGroup,"g").style("zIndex",0),hi(this.showValue,this.valueGroup,function(){r.valueGroup.maybeAppendByClassName(wi.value,function(){return Ms(a)}).styles(o)})},e.prototype.renderBackground=function(n){var r=this.shape,i=r.width,a=r.height,o=Oe(this.attributes,"background");this.background=n.maybeAppendByClassName(wi.backgroundGroup,"g").style("zIndex",-1),this.background.maybeAppendByClassName(wi.background,"rect").styles(J({width:i,height:a},o))},e.prototype.adjustLayout=function(){var n=this.layout,r=n.labelWidth,i=n.valueWidth,a=n.height,o=D(n.position,3),s=o[0],c=o[1],l=o[2],u=a/2;this.markerGroup.styles({transform:"translate(".concat(s,", ").concat(u,")").concat(this.markerGroup.node().style._transform)}),this.labelGroup.styles({transform:"translate(".concat(c,", ").concat(u,")")}),Og(this.labelGroup.select(wi.label.class).node(),Math.ceil(r)),this.showValue&&(this.valueGroup.styles({transform:"translate(".concat(l,", ").concat(u,")")}),Og(this.valueGroup.select(wi.value.class).node(),Math.ceil(i)))},e.prototype.render=function(n,r){var i=de(r),a=n.x,o=a===void 0?0:a,s=n.y,c=s===void 0?0:s;i.styles({transform:"translate(".concat(o,", ").concat(c,")")}),this.renderMarker(i),this.renderLabel(i),this.renderValue(i),this.renderBackground(i),this.adjustLayout()},e}(yr),zs=Fi({page:"item-page",navigator:"navigator",item:"item"},"items"),dk=function(t,e,n){return n===void 0&&(n=!0),t?e(t):n},OQ=function(t){It(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:hm,mouseenter:hm,mouseleave:hm})||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=Oe(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:J({layout:i,labelText:f,valueText:d},Object.fromEntries(Object.entries(a).map(function(h){var p=D(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=D(this.navigatorShape,1),l=c[0],u=D(this.grid,2),f=u[0],d=u[1],h=d*f,p=0;return this.pageViews.children.map(function(v,g){var y,m,b=Math.floor(g/h),x=g%h,_=n.ifHorizontal(d,f),O=[Math.floor(x/_),x%_];i==="vertical"&&O.reverse();var w=D(O,2),S=w[0],M=w[1],E=(a-l-(d-1)*s)/d,P=v.getBBox().height,C=D([0,0],2),A=C[0],T=C[1];return i==="horizontal"?(y=D([p,S*(P+o)],2),A=y[0],T=y[1],p=M===d-1?0:p+E+s):(m=D([M*(E+s),p],2),A=m[0],T=m[1],p=S===f-1?0:p+P+o),{page:b,index:g,row:S,col:M,pageIndex:x,width:E,height:P,x:A,y:T}})},e.prototype.getFlexLayout=function(){var n=this.attributes,r=n.width,i=n.height,a=n.rowPadding,o=n.colPadding,s=D(this.navigatorShape,1),c=s[0],l=D(this.grid,2),u=l[0],f=l[1],d=D([r-c,i],2),h=d[0],p=d[1],v=D([0,0,0,0,0,0,0,0],8),g=v[0],y=v[1],m=v[2],b=v[3],x=v[4],_=v[5],O=v[6],w=v[7];return this.pageViews.children.map(function(S,M){var E,P,C,A,T=S.getBBox(),k=T.width,N=T.height,F=O===0?0:o,R=O+F+k;if(R<=h&&dk(x,function(z){return z<f}))return E=D([O+F,w,R],3),g=E[0],y=E[1],O=E[2],{width:k,height:N,x:g,y,page:m,index:M,pageIndex:b++,row:_,col:x++};P=D([_+1,0,0,w+N+a],4),_=P[0],x=P[1],O=P[2],w=P[3];var I=w+N;return I<=p&&dk(_,function(z){return z<u})?(C=D([O,w,k],3),g=C[0],y=C[1],O=C[2],{width:k,height:N,x:g,y,page:m,index:M,pageIndex:b++,row:_,col:x++}):(A=D([0,0,k,0,m+1,0,0,0],8),g=A[0],y=A[1],O=A[2],w=A[3],m=A[4],b=A[5],_=A[6],x=A[7],{width:k,height:N,x:g,y,page:m,index:M,pageIndex:b++,row:_,col:x++})})},Object.defineProperty(e.prototype,"itemsLayout",{get:function(){this.navigatorShape=[0,0];var n=this.attributes.layout==="grid"?this.getGridLayout:this.getFlexLayout,r=n.call(this);return r.slice(-1)[0].page>0?(this.navigatorShape=[55,0],n.call(this)):r},enumerable:!1,configurable:!0}),e.prototype.ifHorizontal=function(n,r){var i=this.attributes.orientation;return _a(i,n,r)},e.prototype.flattenPage=function(n){n.querySelectorAll(zs.item.class).forEach(function(r){n.appendChild(r)}),n.querySelectorAll(zs.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);de(n).selectAll(zs.item.class).data(this.renderData,function(c){return c.id}).join(function(c){return c.append(function(l){var u=l.style;return new _Q({style:u})}).attr("className",zs.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=D(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(yQ(this.itemsLayout,"page")).map(function(a){var o=D(a,2),s=o[0],c=o[1];return{page:s,layouts:c}}),i=dt([],D(this.navigator.getContainer().children),!1);r.forEach(function(a){var o=a.layouts,s=n.pageViews.appendChild(new dr({className:zs.page.name}));o.forEach(function(c){var l=c.x,u=c.y,f=c.index,d=c.width,h=c.height,p=i[f];s.appendChild(p),gQ(p,"__layout__",c),p.update({x:l,y:u,width:d,height:h})})}),this.relayoutNavigator()},e.prototype.renderNavigator=function(n){var r=this.attributes.orientation,i=Oe(this.attributes,"nav"),a=Ga({orientation:r},i),o=this;return n.selectAll(zs.navigator.class).data(["nav"]).join(function(s){return s.append(function(){return new bQ({style:a})}).attr("className",zs.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(de(r));this.renderItems(a.getContainer()),this.adjustLayout()}},e.prototype.dispatchCustomEvent=function(n,r){var i=new sn(n,{detail:r});this.dispatchEvent(i)},e}(yr),wQ=function(t){It(e,t);function e(n){return t.call(this,n,aH)||this}return e.prototype.renderTitle=function(n,r,i){var a=this.attributes,o=a.showTitle,s=a.titleText,c=Oe(this.attributes,"title"),l=D(Ya(c),2),u=l[0],f=l[1];this.titleGroup=n.maybeAppendByClassName(Ar.titleGroup,"g").styles(f);var d=J(J({width:r,height:i},u),{text:o?s:""});this.title=this.titleGroup.maybeAppendByClassName(Ar.title,function(){return new gw({style:d})}).update(d)},e.prototype.renderItems=function(n,r){var i=r.x,a=r.y,o=r.width,s=r.height,c=Oe(this.attributes,"title",!0),l=D(Ya(c),2),u=l[0],f=l[1],d=J(J({},u),{width:o,height:s,x:0,y:0});this.itemsGroup=n.maybeAppendByClassName(Ar.itemsGroup,"g").styles(J(J({},f),{transform:"translate(".concat(i,", ").concat(a,")")}));var h=this;this.itemsGroup.selectAll(Ar.items.class).data(["items"]).join(function(p){return p.append(function(){return new OQ({style:d})}).attr("className",Ar.items.name).each(function(){h.items=de(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().style.transform="translate(".concat(i,", ").concat(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 En(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):zW(i,a)},e.prototype.render=function(n,r){var i=this.attributes,a=i.width,o=i.height,s=i.x,c=s===void 0?0:s,l=i.y,u=l===void 0?0:l,f=de(r);r.style.transform="translate(".concat(c,", ").concat(u,")"),this.renderTitle(f,a,o),this.renderItems(f,this.availableSpace),this.adjustLayout()},e}(yr);function Wu(t){if(Tc(t)){var e=t;return e[e.length-1]}}var SQ=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function MQ(t,e){const n=ba(t,"shape"),r=ba(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 EQ(t,e){const{scales:n,library:r,markState:i}=e,[a,o]=MQ(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)||Wu(d.split(".")),m=typeof c=="function"?c(h):c;return()=>jZ(y,{color:h.color})(0,0,m)},u=d=>`${o[d]}`;return ba(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 PQ(t){const e=ba(t,"opacity");if(e){const{range:n}=e.getOptions();return(r,i)=>n[i]}}function AQ(t,e){const n=ba(t,"size");return n instanceof tp?n.map(NaN)*2:e}function TQ(t,e){const{labelFormatter:n=d=>`${d}`}=t,{scales:r,theme:i}=e,a=i.legendCategory.itemMarkerSize,o=AQ(r,a),s={itemMarker:EQ(Object.assign(Object.assign({},t),{itemMarkerSize:o}),e),itemMarkerSize:o,itemMarkerOpacity:PQ(r)},c=typeof n=="string"?bo(n):n,l=ba(r,"color"),u=hY(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 kQ(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}=Aw(t,e,n);return{width:i,height:a}}const pm=t=>{const{labelFormatter:e,layout:n,order:r,orientation:i,position:a,size:o,title:s,cols:c,itemMarker:l}=t,u=SQ(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}=kQ(h,t,pm),m=Ew(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:sh(s)}),TQ(t,d)),{legendCategory:x={}}=p,_=ch(Object.assign({},x,b,u)),O=new uY({style:Object.assign(Object.assign({x:v.x,y:v.y,width:v.width,height:v.height},m),{subOptions:_})});return O.appendChild(new wQ({className:"legend-category",style:_})),O}};pm.props={defaultPosition:"top",defaultOrder:1,defaultSize:40,defaultCrossPadding:[12,12],defaultPadding:[12,12]};const hk=t=>()=>new dr;hk.props={};var CQ=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function pk(t,e,n,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 LQ=lY({render(t,e){const{width:n,title:r,subtitle:i,spacing:a=2,align:o="left",x:s,y:c}=t,l=CQ(t,["width","title","subtitle","spacing","align","x","y"]);e.style.transform=`translate(${s}, ${c})`;const u=Pt(l,"title"),f=Pt(l,"subtitle"),h=Mw(e,".title","text").attr("className","title").call(Bt,Object.assign(Object.assign(Object.assign({},pk(0,0,n,o)),{fontSize:14,textBaseline:"top",text:r}),u)).node().getLocalBounds();Mw(e,".sub-title","text").attr("className","sub-title").call(p=>{if(!i)return p.node().remove();p.node().attr(Object.assign(Object.assign(Object.assign({},pk(0,h.max[1]+a,n,o)),{fontSize:12,textBaseline:"top",text:i}),f))})}}),vk=t=>({value:e,theme:n})=>{const{x:r,y:i,width:a,height:o}=e.bbox;return new LQ({style:at({},n.title,Object.assign({x:r,y:i,width:a,height:o},t))})};vk.props={defaultPosition:"top",defaultOrder:2,defaultSize:36,defaultCrossPadding:[20,20],defaultPadding:[12,12]};var vm=function(t){if(typeof t!="object"||t===null)return t;var e;if(sr(t)){e=[];for(var n=0,r=t.length;n<r;n++)typeof t[n]=="object"&&t[n]!=null?e[n]=vm(t[n]):e[n]=t[n]}else{e={};for(var i in t)typeof t[i]=="object"&&t[i]!=null?e[i]=vm(t[i]):e[i]=t[i]}return e},gm=vm,NQ=function(t){It(e,t);function e(n){var r=this,i=n.style,a=wn(n,["style"]);return r=t.call(this,at({},{type:"column"},J({style:i},a)))||this,r.columnsGroup=new dr({name:"columns"}),r.appendChild(r.columnsGroup),r.render(),r}return e.prototype.render=function(){var n=this.attributes,r=n.columns,i=n.x,a=n.y;this.columnsGroup.style.transform="translate(".concat(i,", ").concat(a,")"),de(this.columnsGroup).selectAll(".column").data(r.flat()).join(function(o){return o.append("rect").attr("className","column").each(function(s){this.attr(s)})},function(o){return o.each(function(s){this.attr(s)})},function(o){return o.remove()})},e.prototype.update=function(n){this.attr(Ga({},this.attributes,n)),this.render()},e.prototype.clear=function(){this.removeChildren()},e}(Fr),jQ=function(t){It(e,t);function e(n){var r=this,i=n.style,a=wn(n,["style"]);return r=t.call(this,at({},{type:"lines"},J({style:i},a)))||this,r.linesGroup=r.appendChild(new dr),r.areasGroup=r.appendChild(new dr),r.render(),r}return e.prototype.render=function(){var n=this.attributes,r=n.lines,i=n.areas,a=n.x,o=n.y;this.style.transform="translate(".concat(a,", ").concat(o,")"),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(Ga({},this.attributes,n)),this.render()},e.prototype.renderLines=function(n){de(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){de(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}(Fr);function RQ(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=D(r,2),l=i[0],u=i[1];for(var p=0,v=t.length;p<v;p+=1){var g=t[p];l=ws(l,g),u=Ss(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=pg(c,s),b=Wa(b,e);var x=su(g,s),_=su(g,c),O=x+_;O!==0&&(x/=O,_/=O);var w=Wa(b,-x),S=Wa(b,_);d=ou(g,w),f=ou(g,S),f=ws(f,Ss(c,g)),f=Ss(f,ws(c,g)),w=pg(f,g),w=Wa(w,-x/_),d=ou(g,w),d=ws(d,Ss(s,g)),d=Ss(d,ws(s,g)),S=pg(g,d),S=Wa(S,_/x),f=ou(g,S),o&&(d=Ss(d,l),d=ws(d,u),f=Ss(f,l),f=ws(f,u)),a.push(h),a.push(d),h=f}}return n&&a.push(a.shift()),a}function IQ(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=RQ(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=D(a,1),h=r[0],u.push(["C",f[0],f[1],d[0],d[1],h[0],h[1]])),u}function DQ(t,e){var n,r=e.x,i=e.y,a=D(i.getOptions().range||[0,0],2),o=a[0],s=a[1];return s>o&&(n=D([o,s],2),s=n[0],o=n[1]),t.map(function(c){var l=c.map(function(u,f){return[r.map(f),Bn(i.map(u),s,o)]});return l})}function Yu(t,e){e===void 0&&(e=!1);var n=e?t.length-1:0,r=t.map(function(i,a){return dt([a===n?"M":"L"],D(i),!1)});return e?r.reverse():r}function ip(t,e){if(e===void 0&&(e=!1),t.length<=2)return Yu(t);for(var n=[],r=t.length,i=0;i<r;i+=1){var a=e?t[r-i-1]:t[i];EO(a,n.slice(-2))||n.push.apply(n,dt([],D(a),!1))}var o=IQ(n,!1);return e?o.unshift(dt(["M"],D(t[r-1]),!1)):o.unshift(dt(["M"],D(t[0]),!1)),o}function ym(t,e,n){var r=gm(t);return r.push(["L",e,n],["L",0,n],["Z"]),r}function FQ(t,e,n,r){return t.map(function(i){return ym(e?ip(i):Yu(i),n,r)})}function BQ(t,e,n){for(var r=[],i=t.length-1;i>=0;i-=1){var a=t[i],o=Yu(a),s=void 0;if(i===0)s=ym(o,e,n);else{var c=t[i-1],l=Yu(c,!0);l[0][0]="L",s=dt(dt(dt([],D(o),!1),D(l),!1),[["Z"]],!1)}r.push(s)}return r}function zQ(t,e,n){for(var r=[],i=t.length-1;i>=0;i-=1){var a=t[i],o=ip(a),s=void 0;if(i===0)s=ym(o,e,n);else{var c=t[i-1],l=ip(c,!0),u=a[0];l[0][0]="L",s=dt(dt(dt([],D(o),!1),D(l),!1),[dt(["M"],D(u),!1),["Z"]],!1)}r.push(s)}return r}var GQ=function(t,e){if(sr(t)){for(var n,r=1/0,i=0;i<t.length;i++){var a=t[i],o=Kr(e)?e(a):a[e];o<r&&(n=a,r=o)}return n}},WQ=function(t,e){if(sr(t)){for(var n,r=-1/0,i=0;i<t.length;i++){var a=t[i],o=Kr(e)?e(a):a[e];o>r&&(n=a,r=o)}return n}};function gk(t){return t.length===0?[0,0]:[td(GQ(t,function(e){return td(e)||0})),ed(WQ(t,function(e){return ed(e)||0}))]}function yk(t){for(var e=gm(t),n=e[0].length,r=D([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 YQ=function(t){It(e,t);function e(n){return t.call(this,n,{type:"line",x:0,y:0,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=gm(n);return vn(r[0])?[r]:r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"data",{get:function(){return this.attributes.isStack?yk(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=D(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=Oe(this.attributes,"area"),c=Oe(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=DQ(u,{type:"line",x:d,y:h}),v=[];if(s){var g=this.baseline;a?v=o?zQ(p,l,g):BQ(p,l,g):v=FQ(p,o,l,g)}return{lines:p.map(function(y,m){return J({stroke:n.getColor(m),d:o?ip(y):Yu(y)},c)}),areas:v.map(function(y,m){return J({d:y,fill:n.getColor(m)},s)})}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"columnsStyle",{get:function(){var n=this,r=Oe(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=yk(l));var u=this.createScales(l),f=u.x,d=u.y,h=D(gk(l),2),p=h[0],v=h[1],g=new Br({domain:[0,v-(p>0?0:p)],range:[0,c*s]}),y=f.getBandWidth(),m=this.rawData;return{columns:l.map(function(b,x){return b.map(function(_,O){var w=y/l.length,S=function(){return{x:f.map(O)+w*x,y:_>=0?d.map(_):d.map(0),width:w,height:g.map(Math.abs(_))}},M=function(){return{x:f.map(O),y:d.map(_),width:y,height:g.map(m[x][O])}};return J(J({fill:n.getColor(x)},r),a?M():S())})})}},enumerable:!1,configurable:!0}),e.prototype.render=function(n,r){kG(r,".container","rect").attr("className","container").node();var i=n.type,a=n.x,o=n.y,s="spark".concat(i),c=J({x:a,y:o},i==="line"?this.linesStyle:this.columnsStyle);de(r).selectAll(".spark").data([i]).join(function(l){return l.append(function(u){return u==="line"?new jQ({className:s,style:c}):new NQ({className:s,style:c})}).attr("className","spark ".concat(s))},function(l){return l.update(c)},function(l){return l.remove()})},e.prototype.getColor=function(n){var r=this.attributes.color;return sr(r)?r[n%r.length]:Kr(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=D(gk(n),2),v=p[0],g=p[1],y=new Br({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 Br({domain:[0,n[0].length-1],range:[0,d]}),y}:{type:o,x:new No({domain:n[0].map(function(m,b){return b}),range:[0,d],paddingInner:u,paddingOuter:u/2,align:.5}),y}},e.tag="sparkline",e}(yr),mk=function(t){It(e,t);function e(n){var r=t.call(this,n,J(J(J({x:0,y:0,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},ma(Fw,"handle")),ma(Iw,"handleIcon")),ma(Dw,"handleLabel")))||this;return r.range=[0,1],r.onDragStart=function(i){return function(a){a.stopPropagation(),r.target=i,r.prevPos=r.getOrientVal(uh(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(uh(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 sn("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=Oe(this.attributes,"sparkline");return J(J({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=D(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,r=n.x,i=n.y,a=n.padding,o=D(Pr(a),4),s=o[0],c=o[1],l=o[2],u=o[3],f=this.shape,d=f.width,h=f.height;return{x:u,y:s,width:d-(u+c),height:h-(s+l)}},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(xa.selection.class).each(function(i,a){ea(this,r[a],n)})},e.prototype.updateHandlesPosition=function(n){this.attributes.showHandle&&(this.startHandle&&ea(this.startHandle,this.getHandleStyle("start"),n),this.endHandle&&ea(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=this.attributes,i=r.x,a=r.y,o=Oe(this.attributes,"track");this.trackShape=de(n).maybeAppendByClassName(xa.track,"rect").styles(J(J({x:i,y:a},this.shape),o))},e.prototype.renderBrushArea=function(n){var r=this.attributes,i=r.x,a=r.y,o=r.brushable;this.brushArea=de(n).maybeAppendByClassName(xa.brushArea,"rect").styles(J({x:i,y:a,fill:"transparent",cursor:o?"crosshair":"default"},this.shape))},e.prototype.renderSparkline=function(n){var r=this,i=this.attributes,a=i.x,o=i.y,s=i.orientation,c=de(n).maybeAppendByClassName(xa.sparklineGroup,"g");hi(s==="horizontal",c,function(l){var u=J(J({},r.sparklineStyle),{x:a,y:o});l.maybeAppendByClassName(xa.sparkline,function(){return new YQ({style:u})}).update(u)})},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(xa.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 Bw({style:n.getHandleStyle(d)})}).each(function(f){var d=f.type;this.attr("class","".concat(xa.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.x,a=r.y,o=r.type,s=r.selectionType;this.foregroundGroup=de(n).maybeAppendByClassName(xa.foreground,"g");var c=Oe(this.attributes,"selection"),l=function(f){return f.style("visibility",function(d){return d.show?"visible":"hidden"}).style("cursor",function(d){return s==="select"?"grab":s==="invert"?"crosshair":"default"}).styles(J(J({},c),{transform:"translate(".concat(i,", ").concat(a,")")}))},u=this;this.foregroundGroup.selectAll(xa.selection.class).data(o==="value"?[]:this.calcSelectionArea().map(function(f,d){return{style:J({},f),index:d,show:s==="select"?d===1:d!==1}}),function(f){return f.index}).join(function(f){return f.append("rect").attr("className",xa.selection.name).call(l).each(function(d,h){var p=this;h===1?(u.selectionShape=de(this),this.on("pointerdown",function(v){p.attr("cursor","grabbing"),u.onDragStart("selection")(v)}),u.dispatchCustomEvent(this,"pointerenter","selectionMouseenter"),u.dispatchCustomEvent(this,"pointerleave","selectionMouseleave"),u.dispatchCustomEvent(this,"click","selectionClick"),this.addEventListener("pointerdown",function(){p.attr("cursor","grabbing")}),this.addEventListener("pointerup",function(){p.attr("cursor","pointer")}),this.addEventListener("pointerover",function(){p.attr("cursor","pointer")})):this.on("pointerdown",u.onDragStart("track"))})},function(f){return f.call(l)},function(f){return f.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=D(this.range,2),o=a[0],s=a[1],c=D(this.getValues().map(function(g){return lh(g,r)}),2),l=c[0],u=c[1],f=Array.isArray(n)?n:[l,n!=null?n:u],d=D((f||[l,u]).map(function(g){return lh(g,r)}),2),h=d[0],p=d[1];if(this.attributes.type==="value")return[0,Bn(p,o,s)];h>p&&(i=D([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=D(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=D(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"?{transformOrigin:"left center",transform:"rotate(90)",textAlign:"start"}:n==="end"?{transformOrigin:"right center",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=Oe(this.attributes,"handle"),u=Oe(l,"label"),f=l.spacing,d=this.getHandleSize(),h=this.clampValues(),p=n==="start"?h[0]:h[1],v=s(p),g=new dg({style:J(J(J({},u),this.inferTextStyle(n)),{text:v})}),y=g.getBBox(),m=y.width,b=y.height;if(g.destroy(),!c){if(a==="value")return{text:v,x:0,y:-b-f};var x=f+d+(o==="horizontal"?m/2:0);return r={text:v},r[o==="horizontal"?"x":"y"]=n==="start"?-x:x,r}var _=0,O=0,w=this.availableSpace,S=w.width,M=w.height,E=this.calcSelectionArea()[1],P=E.x,C=E.y,A=E.width,T=E.height,k=f+d;if(o==="horizontal"){var N=k+m/2;if(n==="start"){var F=P-k-m;_=F>0?-N:N}else{var R=S-P-A-k>m;_=R?N:-N}}else{var I=k,z=b+k;n==="start"?O=C-d>b?-z:I:O=M-(C+T)-d>b?z:-I}return{x:_,y:O,text:v}},e.prototype.getHandleLabelStyle=function(n){var r=Oe(this.attributes,"handleLabel");return J(J(J({},r),this.calcHandleText(n)),this.inferTextStyle(n))},e.prototype.getHandleIconStyle=function(){var n=this.attributes.handleIconShape,r=Oe(this.attributes,"handleIcon"),i=this.getOrientVal(["ew-resize","ns-resize"]),a=this.getHandleSize();return J({cursor:i,shape:n,size:a},r)},e.prototype.getHandleStyle=function(n){var r=this.attributes,i=r.x,a=r.y,o=r.showLabel,s=r.showLabelOnInteraction,c=r.orientation,l=this.calcHandlePosition(n),u=l.x,f=l.y,d=this.calcHandleText(n),h=o;return!o&&s&&(this.target?h=!0:h=!1),J(J(J({},ma(this.getHandleIconStyle(),"icon")),ma(J(J({},this.getHandleLabelStyle(n)),d),"label")),{transform:"translate(".concat(u+i,", ").concat(f+a,")"),orientation:c,showLabel:h,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=D(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=D(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 sn(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}(yr),HQ=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);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,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 Hu=t=>{const{orientation:e,labelFormatter:n,size:r,style:i={},position:a}=t,o=HQ(t,["orientation","labelFormatter","size","style","position"]);return s=>{var c;const{scales:[l],value:u,theme:f,coordinate:d}=s,{bbox:h}=u,{width:p,height:v}=h,{slider:g={}}=f,y=((c=l.getFormatter)===null||c===void 0?void 0:c.call(l))||(S=>S+""),m=typeof n=="string"?bo(n):n,b=e==="horizontal",x=Mn(d)&&b,{trackSize:_=g.trackSize}=i,[O,w]=$Q(h,a,_);return new mk({className:"slider",style:Object.assign({},g,Object.assign(Object.assign({x:O,y:w,trackLength:b?p:v,orientation:e,formatter:S=>{const M=m||y,E=x?1-S:S,P=Yc(l,E,!0);return M(P)},sparklineData:VQ(t,s)},i),o))})}};function UQ(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 VQ(t,e){const{markState:n}=e;return sr(t.sparklineData)?t.sparklineData:UQ(n,["y","series"])}Hu.props={defaultPosition:"bottom",defaultSize:24,defaultOrder:1,defaultCrossPadding:[12,12],defaultPadding:[12,12]};const bk=t=>Hu(Object.assign(Object.assign({},t),{orientation:"horizontal"}));bk.props=Object.assign(Object.assign({},Hu.props),{defaultPosition:"bottom"});const xk=t=>Hu(Object.assign(Object.assign({},t),{orientation:"vertical"}));xk.props=Object.assign(Object.assign({},Hu.props),{defaultPosition:"left"});var XQ=function(t){It(e,t);function e(n){var r=t.call(this,n,{x:0,y:0,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 sn("scroll",o)),r.dispatchEvent(new sn("valuechange",o))}},r.onTrackClick=function(i){var a=r.attributes.slidable;if(a){var o=D(r.getLocalPosition(),2),s=o[0],c=o[1],l=D(r.padding,4),u=l[0],f=l[3],d=r.getOrientVal([s+f,c+u]),h=r.getOrientVal(uh(i)),p=(h-d)/r.trackLength;r.setValue(p,!0)}},r.onThumbMouseenter=function(i){r.dispatchEvent(new sn("thumbMouseenter",{detail:i.detail}))},r.onTrackMouseenter=function(i){r.dispatchEvent(new sn("trackMouseenter",{detail:i.detail}))},r.onThumbMouseleave=function(i){r.dispatchEvent(new sn("thumbMouseleave",{detail:i.detail}))},r.onTrackMouseleave=function(i){r.dispatchEvent(new sn("trackMouseleave",{detail:i.detail}))},r}return Object.defineProperty(e.prototype,"padding",{get:function(){var n=this.attributes.padding;return Pr(n)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){var n=this.attributes.value,r=D(this.range,2),i=r[0],a=r[1];return Bn(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=D(this.padding,4),a=i[0],o=i[1],s=i[2],c=i[3],l=D(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=D(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.x,a=r.y,o=r.orientation,s=r.trackSize,c=r.padding,l=r.slidable,u=Oe(this.attributes,"track"),f=Oe(this.attributes,"thumb"),d=J(J({x:i,y:a,brushable:!1,orientation:o,padding:c,selectionRadius:this.thumbRadius,showHandle:!1,slidable:l,trackLength:this.trackLength,trackRadius:this.trackRadius,trackSize:s,values:this.getValues()},ma(u,"track")),ma(f,"selection"));this.slider=de(n).maybeAppendByClassName("scrollbar",function(){return new mk({style:d})}).update(d).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=D(this.range,2),o=a[0],s=a[1];this.slider.setValues(this.getValues(Bn(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}(yr),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};const $u=t=>{const{orientation:e,labelFormatter:n,style:r}=t,i=qQ(t,["orientation","labelFormatter","style"]);return({scales:[a],value:o,theme:s})=>{const{bbox:c}=o,{x:l,y:u,width:f,height:d}=c,{scrollbar:h={}}=s,{ratio:p,range:v}=a.getOptions(),g=e==="horizontal"?f:d,y=g/p,[m,b]=v,x=b>m?0:1;return new XQ({className:"g2-scrollbar",style:Object.assign({},h,Object.assign(Object.assign(Object.assign(Object.assign({},r),{x:l,y:u,trackLength:g,value:x}),i),{orientation:e,contentLength:y,viewportLength:g}))})}};$u.props={defaultPosition:"bottom",defaultSize:24,defaultOrder:1,defaultCrossPadding:[12,12],defaultPadding:[12,12]};const _k=t=>$u(Object.assign(Object.assign({},t),{orientation:"horizontal"}));_k.props=Object.assign(Object.assign({},$u.props),{defaultPosition:"bottom"});const Ok=t=>$u(Object.assign(Object.assign({},t),{orientation:"vertical"}));Ok.props=Object.assign(Object.assign({},$u.props),{defaultPosition:"left"});const mm=(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]=Mn(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))}},ZQ=(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]=Mn(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))}},wk=(t,e)=>{const{coordinate:r}=e;return k2.registerProperty({name:"scaleInYRadius",inherits:!1,initialValue:"",interpolable:!0,syntax:Tt.NUMBER}),(i,a,o)=>{const[s]=i,c=u=>{const{__data__:f,style:d}=u,{radius:h=0,inset:p=0,fillOpacity:v=1,strokeOpacity:g=1,opacity:y=1}=d,{points:m,y:b,y1:x}=f,_=Ts(r,m,[b,x]),{innerRadius:O,outerRadius:w}=_,S=xh().cornerRadius(h).padAngle(p*Math.PI/180),M=new Zr({}),E=A=>(M.attr({d:S(A)}),r2(M)),P=[{scaleInYRadius:O+1e-4,fillOpacity:0,strokeOpacity:0,opacity:0},{scaleInYRadius:O+1e-4,fillOpacity:v,strokeOpacity:g,opacity:y,offset:.01},{scaleInYRadius:w,fillOpacity:v,strokeOpacity:g,opacity:y}],C=u.animate(P,Object.assign(Object.assign({},o),t));return C.onframe=function(){u.style.d=E(Object.assign(Object.assign({},_),{outerRadius:Number(u.style.scaleInYRadius)}))},C.onfinish=function(){u.style.d=E(Object.assign(Object.assign({},_),{outerRadius:w}))},C},l=u=>{const{style:f}=u,{transform:d="",fillOpacity:h=1,strokeOpacity:p=1,opacity:v=1}=f,[g,y]=Mn(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 dn(r)?c(s):l(s)}},KQ=(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]=Mn(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))}},Sk=(t,e)=>{k2.registerProperty({name:"waveInArcAngle",inherits:!1,initialValue:"",interpolable:!0,syntax:Tt.NUMBER});const{coordinate:r}=e;return(i,a,o)=>{const[s]=i;if(!dn(r))return mm(t,e)(i,a,o);const{__data__:c,style:l}=s,{radius:u=0,inset:f=0,fillOpacity:d=1,strokeOpacity:h=1,opacity:p=1}=l,{points:v,y:g,y1:y}=c,m=xh().cornerRadius(u).padAngle(f*Math.PI/180),b=Ts(r,v,[g,y]),{startAngle:x,endAngle:_}=b,O=[{waveInArcAngle:x+1e-4,fillOpacity:0,strokeOpacity:0,opacity:0},{waveInArcAngle:x+1e-4,fillOpacity:d,strokeOpacity:h,opacity:p,offset:.01},{waveInArcAngle:_,fillOpacity:d,strokeOpacity:h,opacity:p}],w=s.animate(O,Object.assign(Object.assign({},o),t));return w.onframe=function(){s.style.d=m(Object.assign(Object.assign({},b),{endAngle:Number(s.style.waveInArcAngle)}))},w.onfinish=function(){s.style.d=m(Object.assign(Object.assign({},b),{endAngle:_}))},w}};Sk.props={};const Mk=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))};Mk.props={};const Ek=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))};Ek.props={};const QQ=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))},JQ=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))},Pk=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))};Pk.props={};const tJ={opacity:1,strokeOpacity:1,fillOpacity:1,lineWidth:0,x:0,y:0,cx:0,cy:0,r:0,rx:0,ry:0,width:0,height:0},eJ={[st.CIRCLE]:["cx","cy","r"],[st.ELLIPSE]:["cx","cy","rx","ry"],[st.RECT]:["x","y","width","height"],[st.IMAGE]:["x","y","width","height"],[st.LINE]:["x1","y1","x2","y2"],[st.POLYLINE]:["points"],[st.POLYGON]:["points"]};function rl(t,e,n=!1){const r={};for(const i of e){const a=t.style[i];a?r[i]=a:n&&(r[i]=tJ[i])}return r}const Uu=["fill","stroke","fillOpacity","strokeOpacity","opacity","lineWidth"];function bm(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 nJ(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 rJ(t,e){const[n,r,i,a]=bm(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(nJ([g,y,p,u]))}d-=h,f+=1}return l}function iJ(t="pack"){return typeof t=="function"?t:rJ}function aJ(t,e,n){let{transform:r}=t.style;const{transform:i}=e.style;Ak(e,t);let a=Uu;if(t.nodeName===st.GROUP){const[c,l,u,f]=bm(t),[d,h,p,v]=bm(e),g=c-d,y=l-h,m=u/p,b=f/v;r=`translate(${g}, ${y}) scale(${m}, ${b})`}else a=a.concat(eJ[t.nodeName]||[]);const o=[Object.assign({transform:r!=null?r:"none"},rl(t,a,!0)),Object.assign({transform:i!=null?i:"none"},rl(e,a,!0))];return e.animate(o,n)}function Ak(t,e){t.__data__=e.__data__,t.className=e.className,t.markType=e.markType,e.parentNode.replaceChild(t,e)}function oJ(t,e){const{nodeName:n}=t;if(n==="path")return t;const r=new Zr({style:Object.assign(Object.assign({},rl(t,Uu)),{d:e})});return Ak(r,t),r}function Tk(t,e){const n=t.indexOf(e),r=t.lastIndexOf(e);return n===r}function sJ(t){return!Tk(t,"m")||!Tk(t,"M")}function kk(t){const e=r2(t);if(e&&!sJ(e))return e}function xm(t,e,n,r){const{nodeName:i}=e,{nodeName:a}=n,o=kk(e),s=kk(n);if(i===a&&i!=="path"||(o===void 0||s===void 0))return aJ(e,n,r);const u=oJ(t,o),f=[Object.assign({},rl(e,Uu)),Object.assign({},rl(n,Uu))];if(o!==s){f[0].d=o,f[1].d=s;const d=u.animate(f,r);return d.onfinish=()=>{const h=u.style.d;ag(u,n),u.style.d=h,u.style.transform="none"},u.style.transform="none",d}return null}function cJ(t,e,n,r){t.style.visibility="hidden";const i=r(t,e.length);return e.map((a,o)=>{const s=new Zr({style:Object.assign({d:i[o]},rl(t,Uu))});return xm(a,s,a,n)})}function lJ(t,e,n,r){const i=r(e,t.length),{fillOpacity:a=1,strokeOpacity:o=1,opacity:s=1}=e.style,c=[{fillOpacity:0,strokeOpacity:0,opacity:0},{fillOpacity:0,strokeOpacity:0,opacity:0,offset:.99},{fillOpacity:a,strokeOpacity:o,opacity:s}],l=e.animate(c,n);return[...t.map((f,d)=>{const h=new Zr({style:{d:i[d],fill:e.style.fill}});return xm(f,f,h,n)}),l]}const Ck=t=>(e,n,r)=>{const i=iJ(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 xm(c,c,l,a)}if(o===1&&s>1){const[c]=e;return cJ(c,n,a,i)}if(o>1&&s===1){const[c]=n;return lJ(e,c,a,i)}return null};Ck.props={};const Lk=(t,e)=>(n,r,i)=>{const[a]=n,{min:[o,s],halfExtents:c}=a.getLocalBounds(),l=c[0]*2,u=c[1]*2,f=new Zr({style:{d:`M${o},${s}L${o+l},${s}L${o+l},${s+u}L${o},${s+u}Z`}});return a.appendChild(f),a.style.clipPath=f,mm(t,e)([f],r,i)};Lk.props={};const Nk=(t,e)=>(n,r,i)=>{const[a]=n,{min:[o,s],halfExtents:c}=a.getLocalBounds(),l=c[0]*2,u=c[1]*2,f=new Zr({style:{d:`M${o},${s}L${o+l},${s}L${o+l},${s+u}L${o},${s+u}Z`}});return a.appendChild(f),a.style.clipPath=f,wk(t,e)([f],r,i)};Nk.props={};var uJ=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);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 fJ(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=Ln(d,r),v=Eu(d,n),[g,y]=kS(Object.assign({elements:d,valueof:v,link:i,coordinate:c},Pt(u.active,"link"))),[m,b,x]=LS(Object.assign({document:t.ownerDocument,scale:s,coordinate:c,background:a,valueof:v},Pt(u.active,"background"))),_=at(u,{active:Object.assign({},((f=u.active)===null||f===void 0?void 0:f.offset)&&{transform:(...F)=>{const R=u.active.offset(...F),[,I]=F;return CS(d[I],R,c)}})}),{setState:O,removeState:w,hasState:S}=Va(_,v);let M;const E=F=>{const{target:R,nativeEvent:I=!0}=F;if(!h.has(R))return;M&&clearTimeout(M);const z=r(R),W=p.get(z),U=new Set(W);for(const $ of d)U.has($)?S($,"active")||O($,"active"):(O($,"inactive"),y($)),$!==R&&b($);m(R),g(W),I&&l.emit("element:highlight",{nativeEvent:I,data:{data:n(R),group:W.map(n)}})},P=()=>{M&&clearTimeout(M),M=setTimeout(()=>{C(),M=null},o)},C=(F=!0)=>{for(const R of d)w(R,"active","inactive"),b(R),y(R);F&&l.emit("element:unhighlight",{nativeEvent:F})},A=F=>{const{target:R}=F;a&&!x(R)||!a&&!h.has(R)||(o>0?P():C())},T=()=>{C()};t.addEventListener("pointerover",E),t.addEventListener("pointerout",A),t.addEventListener("pointerleave",T);const k=F=>{const{nativeEvent:R}=F;R||C(!1)},N=F=>{const{nativeEvent:R}=F;if(R)return;const{data:I}=F.data,z=ny(d,I,n);z&&E({target:z,nativeEvent:!1})};return l.on("element:highlight",N),l.on("element:unhighlight",k),()=>{t.removeEventListener("pointerover",E),t.removeEventListener("pointerout",A),t.removeEventListener("pointerleave",T),l.off("element:highlight",N),l.off("element:unhighlight",k);for(const F of d)b(F),y(F)}}function ap(t){var{delay:e,createGroup:n,background:r=!1,link:i=!1}=t,a=uJ(t,["delay","createGroup","background","link"]);return(o,s,c)=>{const{container:l,view:u,options:f}=o,{scale:d,coordinate:h}=u,p=wa(l);return fJ(p,Object.assign({elements:Po,datum:Ls(u),groupKey:n?n(u):void 0,coordinate:h,scale:d,state:$c(f,[["active",r?{}:{lineWidth:"1",stroke:"#000"}],"inactive"]),background:r,link:i,delay:e,emitter:c},a))}}ap.props={reapplyWhenUpdate:!0};function jk(t){return ap(Object.assign(Object.assign({},t),{createGroup:ey}))}jk.props={reapplyWhenUpdate:!0};function Rk(t){return ap(Object.assign(Object.assign({},t),{createGroup:TS}))}Rk.props={reapplyWhenUpdate:!0};var dJ=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);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 hJ(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=Ln(d,r),v=Eu(d,n),[g,y]=kS(Object.assign({link:i,elements:d,valueof:v,coordinate:o},Pt(u.selected,"link"))),[m,b]=LS(Object.assign({document:t.ownerDocument,background:s,coordinate:o,scale:c,valueof:v},Pt(u.selected,"background"))),x=at(u,{selected:Object.assign({},((f=u.selected)===null||f===void 0?void 0:f.offset)&&{transform:(...T)=>{const k=u.selected.offset(...T),[,N]=T;return CS(d[N],k,o)}})}),{setState:_,removeState:O,hasState:w}=Va(x,v),S=(T=!0)=>{for(const k of d)O(k,"selected","unselected"),y(k),b(k);T&&l.emit("element:unselect",{nativeEvent:!0})},M=(T,k,N=!0)=>{if(w(k,"selected"))S();else{const F=r(k),R=p.get(F),I=new Set(R);for(const z of d)I.has(z)?_(z,"selected"):(_(z,"unselected"),y(z)),z!==k&&b(z);if(g(R),m(k),!N)return;l.emit("element:select",Object.assign(Object.assign({},T),{nativeEvent:N,data:{data:[n(k),...R.map(n)]}}))}},E=(T,k,N=!0)=>{const F=r(k),R=p.get(F),I=new Set(R);if(w(k,"selected")){if(!d.some(W=>!I.has(W)&&w(W,"selected")))return S();for(const W of R)_(W,"unselected"),y(W),b(W)}else{const z=R.some(W=>w(W,"selected"));for(const W of d)I.has(W)?_(W,"selected"):w(W,"selected")||_(W,"unselected");!z&&i&&g(R),m(k)}N&&l.emit("element:select",Object.assign(Object.assign({},T),{nativeEvent:N,data:{data:d.filter(z=>w(z,"selected")).map(n)}}))},P=T=>{const{target:k,nativeEvent:N=!0}=T;return h.has(k)?a?M(T,k,N):E(T,k,N):S()};t.addEventListener("click",P);const C=T=>{const{nativeEvent:k,data:N}=T;if(k)return;const F=a?N.data.slice(0,1):N.data;for(const R of F){const I=ny(d,R,n);P({target:I,nativeEvent:!1})}},A=()=>{S(!1)};return l.on("element:select",C),l.on("element:unselect",A),()=>{for(const T of d)y(T);t.removeEventListener("click",P),l.off("element:select",C),l.off("element:unselect",A)}}function op(t){var{createGroup:e,background:n=!1,link:r=!1}=t,i=dJ(t,["createGroup","background","link"]);return(a,o,s)=>{const{container:c,view:l,options:u}=a,{coordinate:f,scale:d}=l,h=wa(c);return hJ(h,Object.assign({elements:Po,datum:Ls(l),groupKey:e?e(l):void 0,coordinate:f,scale:d,state:$c(u,[["selected",n?{}:{lineWidth:"1",stroke:"#000"}],"unselected"]),background:n,link:r,emitter:s},i))}}op.props={reapplyWhenUpdate:!0};function Ik(t){return op(Object.assign(Object.assign({},t),{createGroup:ey}))}Ik.props={reapplyWhenUpdate:!0};function Dk(t){return op(Object.assign(Object.assign({},t),{createGroup:TS}))}Dk.props={reapplyWhenUpdate:!0};var Gs=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 pJ(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 vJ({wait:t=30,leading:e,trailing:n=!1}){return r=>{const{options:i,update:a,setState:o,container:s}=r,c=wa(s),l=Gs(u=>{const f=Jg(c,u);if(!f){o("fisheye"),a();return}o("fisheye",d=>{const h=at({},d,{interaction:{tooltip:{preserve:!0}}});for(const y of h.marks)y.animate=!1;const[p,v]=f,g=pJ(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 gJ=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())})},yJ=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);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 mJ(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 bJ(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 Fk(t){var{wait:e=20,leading:n,trailing:r=!1,labelFormatter:i=o=>`${o}`}=t,a=yJ(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=bJ(f,"line",["x","y","series"]);if(!p)return;const{y:v,x:g,series:y=[]}=p,m=v.map((F,R)=>R),b=Ua(m.map(F=>g[F])),x=wa(c),_=c.getElementsByClassName(Na),O=c.getElementsByClassName(W0),S=Ln(O,F=>F.__data__.key.split("-")[0]),M=new Kl({style:Object.assign({x1:0,y1:0,x2:0,y2:x.getAttribute("height"),stroke:"black",lineWidth:1},Pt(a,"rule"))}),E=new fi({style:Object.assign({x:0,y:x.getAttribute("height"),text:"",fontSize:10},Pt(a,"label"))});M.append(E),x.appendChild(M);const P=(F,R,I)=>{const[z]=F.invert(I),W=R.invert(z);return b[p$(b,W)]},C=(F,R)=>{M.setAttribute("x1",F[0]),M.setAttribute("x2",F[0]),E.setAttribute("text",i(R))};let A;const T=F=>gJ(this,void 0,void 0,function*(){const{x:R}=d,I=P(h,R,F);C(F,I),u("chartIndex",W=>{const U=at({},W),$=U.marks.find(et=>et.type==="line"),ct=Ke(eg(m,et=>Ke(et,_t=>+v[_t])/Oi(et,_t=>+v[_t]),et=>y[et]).values()),gt=[1/ct,ct];at($,{scale:{y:{domain:gt}}});const it=mJ($);it.groupBy="color",it.basis=(et,_t)=>{const xt=et[Wc(Nt=>g[+Nt]).center(et,I)];return _t[xt]};for(const et of U.marks)et.animate=!1;return U}),A=(yield l("chartIndex")).view}),k=F=>{const{scale:R,coordinate:I}=A,{x:z,y:W}=R,U=P(I,z,F);C(F,U);for(const $ of _){const{seriesIndex:K,key:ct}=$.__data__,gt=K[Wc(Qt=>g[+Qt]).center(K,U)],it=[0,W.map(1)],et=[0,W.map(v[gt]/v[K[0]])],[,_t]=I.map(it),[,xt]=I.map(et),Nt=_t-xt;$.setAttribute("transform",`translate(0, ${Nt})`);const Gt=S.get(ct)||[];for(const Qt of Gt)Qt.setAttribute("dy",Nt)}},N=Gs(F=>{const R=Jg(x,F);R&&k(R)},e,{leading:n,trailing:r});return T([0,0]),x.addEventListener("pointerenter",N),x.addEventListener("pointermove",N),x.addEventListener("pointerleave",N),()=>{M.remove(),x.removeEventListener("pointerenter",N),x.removeEventListener("pointermove",N),x.removeEventListener("pointerleave",N)}}}Fk.props={reapplyWhenUpdate:!0};function Vu(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 sp(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 Bk(t){var e=document.createElement("div");e.innerHTML=t;var n=e.childNodes[0];return n&&e.contains(n)&&e.removeChild(n),n}function xJ(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 _J=xJ;function _m(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 zk={overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"};function OJ(t){var e;t===void 0&&(t="");var n=_m(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)]=J({flex:1},zk),e[".".concat(n.VALUE)]=J({display:"inline-block",float:"right",flex:1,"text-align":"right","min-width":"28px","margin-left":"30px",color:"rgba(0, 0, 0, 0.85)"},zk),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 wJ=function(t){It(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=_m(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:OJ(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=wn(a,["name","color","index"]),h=J({name:c,color:u,index:f!=null?f:o},d);return Bk(_J(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=Bk(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=_m(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,dt([],D(d),!1));var p=this.element.querySelector(".".concat(u.LIST));p?p.replaceWith(h):f.appendChild(h)}jG(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=D(d,2),v=p[0],g=p[1],y=D(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=D(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=D(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=D([+s+i,+c+a],2),v=p[0],g=p[1],y={left:"right",right:"left",top:"bottom",bottom:"top"},m=l.x,b=l.y,x=l.width,_=l.height,O={left:v<m,right:v+d>m+x,top:g<b,bottom:g+h>b+_},w=[];u.split("-").forEach(function(M){O[M]?w.push(y[M]):w.push(M)});var S=w.join("-");return this.getRelativeOffsetFromCursor(S)},e.prototype.isCursorEntered=function(n,r){if(this.element){var i=this.element.getBoundingClientRect(),a=i.x,o=i.y,s=i.width,c=i.height;return new En(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}(yr),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 cp(t,e){return e?typeof e=="string"?document.querySelector(e):e:t.ownerDocument.defaultView.getContextService().getDomElement().parentElement}function SJ(t){const e=t.getRenderBounds(),{min:[n,r],max:[i,a]}=e;return{x:n,y:r,width:i-n,height:a-r}}function MJ(t,e){const n=t.getBoundingClientRect(),r=e.getBoundingClientRect();return{x:n.x-r.x,y:n.y-r.y}}function EJ(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 wJ({className:"tooltip",style:{x:e,y:n,container:o,data:[],bounding:a,position:r,enterable:i,title:"",offset:[10,10],template:{prefixCls:"g2-"},style:at(c,s)}});return t.appendChild(l.HTMLTooltipElement),l}function Gk({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=cp(t,u),h=cp(t),p=o?h:t,v=f||SJ(t),g=MJ(h,d),{tooltipElement:y=EJ(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 Io({root:t,single:e,emitter:n,nativeEvent:r=!0,event:i=null}){r&&n.emit("tooltip:hide",{nativeEvent:r});const a=cp(t),o=e?a:t,{tooltipElement:s}=o;s&&s.hide(i==null?void 0:i.clientX,i==null?void 0:i.clientY)}function Om({root:t,single:e}){const n=cp(t),r=e?n:t;if(!r)return;const{tooltipElement:i}=r;i&&(i.destroy(),r.tooltipElement=void 0)}function Wk(t){const{value:e}=t;return Object.assign(Object.assign({},t),{value:e===void 0?"undefined":e})}function PJ(t){const{__data__:e}=t,{title:n,items:r=[]}=e,i=r.filter(fn).map(a=>{var{color:o=Yk(t)}=a,s=Xu(a,["color"]);return Object.assign(Object.assign({},s),{color:o})}).map(Wk);return Object.assign(Object.assign({},n&&{title:n}),{items:i})}function AJ(t,e){const{color:n,series:r,facet:i=!1}=t,{color:a,series:o}=e,s=c=>c&&c.invert&&!(c instanceof No)&&!(c instanceof vu);if(s(r))return r.clone().invert(o);if(o&&r instanceof No&&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 Yk(t){const e=t.getAttribute("fill"),n=t.getAttribute("stroke"),{__data__:r}=t,{color:i=e&&e!=="transparent"?e:n}=r;return i}function Hk(t,e=n=>n){const n=new Map(t.map(r=>[e(r),r]));return Array.from(n.values())}function $k(t,e,n,r=t.map(a=>a.__data__),i={}){const a=c=>c instanceof Date?+c:c,o=Hk(r.map(c=>c.title),a).filter(fn),s=r.flatMap((c,l)=>{const u=t[l],{items:f=[],title:d}=c,h=f.filter(fn),p=n!==void 0?n:f.length<=1;return h.map(v=>{var{color:g=Yk(u)||i.color,name:y}=v,m=Xu(v,["color","name"]);const b=AJ(e,c),x=p?b||y:y||b;return Object.assign(Object.assign({},m),{color:g,name:x||d})})}).map(Wk);return Object.assign(Object.assign({},o.length>0&&{title:o.join(",")}),{items:Hk(s,c=>`(${a(c.name)}, ${a(c.value)}, ${a(c.color)})`)})}function TJ(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=Xu(n,["plotWidth","plotHeight","mainWidth","mainHeight","startX","startY","transposed","polar","insetLeft","insetTop"]);const p=Object.assign({lineWidth:1,stroke:"#1b1e23",strokeOpacity:.5},h),v=e.map(M=>M[1]),g=e.map(M=>M[0]),y=Vu(v),m=Vu(g),b=()=>{if(u){const M=Math.min(a,o)/2,E=s+f+a/2,P=c+d+o/2,C=zi(Gn([m,y],[E,P])),A=E+M*Math.cos(C),T=P+M*Math.sin(C);return[E,A,P,T]}return l?[s,s+r,y+c,y+c]:[m+s,m+s,c,c+i]},[x,_,O,w]=b(),S=()=>{const M=new Kl({style:Object.assign({x1:x,x2:_,y1:O,y2:w},p)});return t.appendChild(M),M};if(g.length>0){const M=t.ruleY||S();M.style.x1=x,M.style.x2=_,M.style.y1=O,M.style.y2=w,t.ruleY=M}}function Uk(t){t.ruleY&&(t.ruleY.remove(),t.ruleY=void 0)}function kJ(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 fn(o)&&fn(s)}).map(a=>{const[{color:o,element:s},c]=a,l=o||s.style.fill||s.style.stroke||r.color;return new ms({style:Object.assign({cx:c[0],cy:c[1],fill:l,r:4,stroke:"#fff",lineWidth:2},n)})});for(const a of i)t.appendChild(a);t.markers=i}function Vk(t){t.markers&&(t.markers.forEach(e=>e.remove()),t.markers=[])}function Xk(t,e){return Array.from(t.values()).some(n=>{var r;return(r=n.interaction)===null||r===void 0?void 0:r[e]})}function wm(t,e){return t===void 0?e:t}function qk(t){const{title:e,items:n}=t;return n.length===0&&e===void 0}function CJ(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 LJ(t){return Mh(t,e=>e.classList?e.classList.includes("element"):!1)}function Zk(t,e){var{elements:n,sort:r,filter:i,scale:a,coordinate:o,crosshairs:s,render:c,groupName:l,emitter:u,wait:f=50,leading:d=!0,trailing:h=!1,startX:p=0,startY:v=0,body:g=!0,single:y=!0,position:m,enterable:b,mount:x,bounding:_,theme:O,disableNative:w=!1,marker:S=!0,preserve:M=!1,style:E={},css:P={}}=e,C=Xu(e,["elements","sort","filter","scale","coordinate","crosshairs","render","groupName","emitter","wait","leading","trailing","startX","startY","body","single","position","enterable","mount","bounding","theme","disableNative","marker","preserve","style","css"]);const A=n(t),T=Mn(o),k=dn(o),N=at(E,C),{innerWidth:F,innerHeight:R,width:I,height:z,insetLeft:W,insetTop:U}=o.getOptions(),$=[],K=[];for(const ie of A){const{__data__:me}=ie,{seriesX:fe,title:ne,items:Fe}=me;fe?$.push(ie):(ne||Fe)&&K.push(ie)}const gt=!!(T?a.y:a.x).getBandWidth&&K.length>0;$.sort((ie,me)=>{const fe=T?0:1,ne=Fe=>Fe.getBounds().min[fe];return T?ne(me)-ne(ie):ne(ie)-ne(me)});const it=ie=>{const me=T?1:0,{min:fe,max:ne}=ie.getLocalBounds();return Ua([fe[me],ne[me]])};K.sort((ie,me)=>{const[fe,ne]=it(ie),[Fe,Ne]=it(me),Pe=(fe+ne)/2,hn=(Fe+Ne)/2;return T?hn-Pe:Pe-hn});const et=new Map($.map(ie=>{const{__data__:me}=ie,{seriesX:fe}=me,ne=fe.map((Ne,Pe)=>Pe),Fe=Ua(ne,Ne=>fe[+Ne]);return[ie,[Fe,fe]]})),{x:_t}=a,xt=_t!=null&&_t.getBandWidth?_t.getBandWidth()/2:0,Nt=ie=>{const[me]=o.invert(ie);return me-xt},Gt=(ie,me,fe)=>{const ne=Nt(ie),Fe=fe.filter(fn),[Ne,Pe]=Ua([Fe[0],Fe[Fe.length-1]]),hn=Ne===Pe;if(!gt&&(ne<Ne||ne>Pe)&&!hn)return null;const jn=Wc(to=>fe[+to]).center,Hr=jn(me,ne);return me[Hr]},Qt=(ie,me)=>{const ne=ie[T?1:0],Fe=me.filter(hn=>{const[jn,Hr]=it(hn);return ne>=jn&&ne<=Hr});if(!gt||Fe.length>0)return Fe;const Ne=Wc(hn=>{const[jn,Hr]=it(hn);return(jn+Hr)/2}).center,Pe=Ne(me,ne);return[me[Pe]].filter(fn)},Jt=(ie,me)=>{const{__data__:fe}=ie;return Object.fromEntries(Object.entries(fe).filter(([ne])=>ne.startsWith("series")&&ne!=="series").map(([ne,Fe])=>{const Ne=Fe[me];return[hO(ne.replace("series","")),Ne]}))},pe=Gs(ie=>{const me=Jg(t,ie);if(!me)return;const fe=AS(t),ne=fe.min[0],Fe=fe.min[1],Ne=[me[0]-p,me[1]-v];if(!Ne)return;const Pe=Qt(Ne,K),hn=[],jn=[];for(const cr of $){const[Tf,wb]=et.get(cr),PN=Gt(Ne,Tf,wb);if(PN!==null){hn.push(cr);const AN=Jt(cr,PN),{x:oht,y:sht}=AN,cht=o.map([(oht||0)+xt,sht||0]);jn.push([Object.assign(Object.assign({},AN),{element:cr}),cht])}}const Hr=Array.from(new Set(jn.map(cr=>cr[0].x))),to=Hr[sp(Hr,cr=>Math.abs(cr-Nt(Ne)))],Xs=jn.filter(cr=>cr[0].x===to),u0=[...Xs.map(cr=>cr[0]),...Pe.map(cr=>cr.__data__)],f0=[...hn,...Pe],qs=$k(f0,a,l,u0,O);if(r&&qs.items.sort((cr,Tf)=>r(cr)-r(Tf)),i&&(qs.items=qs.items.filter(i)),f0.length===0||qk(qs)){Ge(ie);return}if(g&&Gk({root:t,data:qs,x:me[0]+ne,y:me[1]+Fe,render:c,event:ie,single:y,position:m,enterable:b,mount:x,bounding:_,css:P}),s){const cr=Xs.map(wb=>wb[1]),Tf=Pt(N,"crosshairs");TJ(t,cr,Object.assign(Object.assign({},Tf),{plotWidth:F,plotHeight:R,mainWidth:I,mainHeight:z,insetLeft:W,insetTop:U,startX:p,startY:v,transposed:T,polar:k}))}if(S){const cr=Pt(N,"marker");kJ(t,{data:Xs,style:cr,theme:O})}u.emit("tooltip:show",Object.assign(Object.assign({},ie),{nativeEvent:!0,data:{data:{x:Yc(a.x,Nt(Ne),!0)}}}))},f,{leading:d,trailing:h}),Ge=ie=>{Io({root:t,single:y,emitter:u,event:ie}),s&&Uk(t),S&&Vk(t)},le=()=>{Om({root:t,single:y}),s&&Uk(t),S&&Vk(t)},ye=({nativeEvent:ie,data:me})=>{if(ie)return;const{x:fe}=me.data,{x:ne}=a,Fe=ne.map(fe),[Ne,Pe]=o.map([Fe,.5]),{min:[hn,jn]}=t.getRenderBounds();pe({offsetX:Ne+hn,offsetY:Pe+jn})},mn=()=>{Io({root:t,single:y,emitter:u,nativeEvent:!1})},Zn=()=>{br(),le()},yi=()=>{Kn()},Kn=()=>{w||(t.addEventListener("pointerenter",pe),t.addEventListener("pointermove",pe),t.addEventListener("pointerleave",Ge))},br=()=>{w||(t.removeEventListener("pointerenter",pe),t.removeEventListener("pointermove",pe),t.removeEventListener("pointerleave",Ge))};return Kn(),u.on("tooltip:show",ye),u.on("tooltip:hide",mn),u.on("tooltip:disable",Zn),u.on("tooltip:enable",yi),()=>{br(),u.off("tooltip:show",ye),u.off("tooltip:hide",mn),u.off("tooltip:disable",Zn),u.off("tooltip:enable",yi),M?Io({root:t,single:y,emitter:u,nativeEvent:!1}):le()}}function NJ(t,{elements:e,scale:n,render:r,groupName:i,sort:a,filter:o,emitter:s,wait:c=50,leading:l=!0,trailing:u=!1,groupKey:f=M=>M,single:d=!0,position:h,enterable:p,datum:v,view:g,mount:y,bounding:m,theme:b,shared:x=!1,body:_=!0,disableNative:O=!1,preserve:w=!1,css:S={}}){const M=e(t),E=Ln(M,f),P=Gs(I=>{const{target:z}=I,W=LJ(z);if(!W){Io({root:t,single:d,emitter:s,event:I});return}const U=f(W),$=E.get(U);if(!$)return;const K=$.length===1&&!x?PJ($[0]):$k($,n,i,void 0,b);if(a&&K.items.sort((it,et)=>a(it)-a(et)),o&&(K.items=K.items.filter(o)),qk(K)){Io({root:t,single:d,emitter:s,event:I});return}const{offsetX:ct,offsetY:gt}=I;_&&Gk({root:t,data:K,x:ct,y:gt,render:r,event:I,single:d,position:h,enterable:p,mount:y,bounding:m,css:S}),s.emit("tooltip:show",Object.assign(Object.assign({},I),{nativeEvent:!0,data:{data:jS(W,g)}}))},c,{leading:l,trailing:u}),C=I=>{Io({root:t,single:d,emitter:s,event:I})},A=()=>{O||(t.addEventListener("pointermove",P),t.addEventListener("pointerleave",C))},T=()=>{O||(t.removeEventListener("pointermove",P),t.removeEventListener("pointerleave",C))},k=({nativeEvent:I,data:z})=>{if(I)return;const W=ny(M,z.data,v);if(!W)return;const U=W.getBBox(),{x:$,y:K,width:ct,height:gt}=U;P({target:W,offsetX:$+ct/2,offsetY:K+gt/2})},N=({nativeEvent:I}={})=>{I||Io({root:t,single:d,emitter:s,nativeEvent:!1})},F=()=>{T(),Om({root:t,single:d})},R=()=>{A()};return s.on("tooltip:show",k),s.on("tooltip:hide",N),s.on("tooltip:enable",R),s.on("tooltip:disable",F),A(),()=>{T(),s.off("tooltip:show",k),s.off("tooltip:hide",N),w?Io({root:t,single:d,emitter:s,nativeEvent:!1}):Om({root:t,single:d})}}function Kk(t){const{shared:e,crosshairs:n,series:r,name:i,item:a=()=>({}),facet:o=!1}=t,s=Xu(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=Xk(p,"seriesTooltip"),m=Xk(p,"crosshairs"),b=wa(f),x=wm(r,y);if(x&&CJ(p)&&!o)return Zk(b,Object.assign(Object.assign({},s),{theme:g,elements:Po,scale:h,coordinate:v,crosshairs:wm(n,m),item:a,emitter:u}));if(x&&o){const _=l.filter(P=>P!==c&&P.options.parentKey===c.options.key),O=PS(c,l),w=_[0].view.scale,S=b.getBounds(),M=S.min[0],E=S.min[1];return Object.assign(w,{facet:!0}),Zk(b.parentNode.parentNode,Object.assign(Object.assign({},s),{theme:g,elements:()=>O,scale:w,coordinate:v,crosshairs:wm(n,m),item:a,startX:M,startY:E,emitter:u}))}return NJ(b,Object.assign(Object.assign({},s),{datum:Ls(d),elements:Po,scale:h,coordinate:v,groupKey:e?ey(d):void 0,item:a,emitter:u,view:d,theme:g,shared:e}))}}Kk.props={reapplyWhenUpdate:!0};var lp=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 Qk="legend-category",jJ="legend-continuous",RJ="items-item",IJ="legend-category-item-marker",DJ="legend-category-item-label";function Jk(t){return t.getElementsByClassName(IJ)[0]}function tC(t){return t.getElementsByClassName(DJ)[0]}function eC(t){return t.getElementsByClassName(RJ)}function Sm(t){return t.getElementsByClassName(Qk)}function nC(t){return t.getElementsByClassName(jJ)}function FJ(t,e){[...Sm(t),...nC(t)].forEach(r=>{e(r,i=>i)})}function Mm(t){let e=t.parentNode;for(;e&&!e.__data__;)e=e.parentNode;return e.__data__}function jgt(t){let e=t;for(;e&&!e.attr("class").startsWith("legend");)e=e.children[0];return e.attributes}function BJ(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:Pt(d,"marker")},p={unselected:Pt(d,"label")},{setState:v,removeState:g}=Va(h,void 0),{setState:y,removeState:m}=Va(p,void 0),b=Array.from(e(t));let x=b.map(i);const _=()=>{for(const S of b){const M=i(S),E=n(S),P=r(S);x.includes(M)?(g(E,"unselected"),m(P,"unselected")):(v(E,"unselected"),y(P,"unselected"))}};for(const S of b){const M=()=>{Ao(t,"pointer")},E=()=>{C$(t)},P=C=>lp(this,void 0,void 0,function*(){const A=i(S),T=x.indexOf(A);T===-1?x.push(A):x.splice(T,1),x.length===0&&x.push(...b.map(i)),yield a(x),_();const{nativeEvent:k=!0}=C;k&&(x.length===b.length?o.emit("legend:reset",{nativeEvent:k}):o.emit("legend:filter",Object.assign(Object.assign({},C),{nativeEvent:k,data:{channel:s,values:x}})))});S.addEventListener("click",P),S.addEventListener("pointerenter",M),S.addEventListener("pointerout",E),l.set(S,P),u.set(S,M),f.set(S,E)}const O=S=>lp(this,void 0,void 0,function*(){const{nativeEvent:M}=S;if(M)return;const{data:E}=S,{channel:P,values:C}=E;P===s&&(x=C,yield a(x),_())}),w=S=>lp(this,void 0,void 0,function*(){const{nativeEvent:M}=S;M||(x=b.map(i),yield a(x),_())});return o.on("legend:filter",O),o.on("legend:reset",w),()=>{for(const S of b)S.removeEventListener("click",l.get(S)),S.removeEventListener("pointerenter",u.get(S)),S.removeEventListener("pointerout",f.get(S)),o.off("legend:filter",O),o.off("legend:reset",w)}}function zJ(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 rC(t,{legend:e,channel:n,value:r,ordinal:i,channels:a,allChannels:o,facet:s=!1}){return lp(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 at({},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 GJ(t,e){for(const n of t)rC(n,Object.assign(Object.assign({},e),{facet:!0}))}function WJ(){return(t,e,n)=>{const{container:r}=t,i=e.filter(f=>f!==t),a=i.length>0,o=f=>Mm(f).scales.map(d=>d.name),s=[...Sm(r),...nC(r)],c=s.flatMap(o),l=a?Gs(GJ,50,{trailing:!0}):Gs(rC,50,{trailing:!0}),u=s.map(f=>{const{name:d,domain:h}=Mm(f).scales[0],p=o(f),v={legend:f,channel:d,channels:p,allChannels:c};return f.className===Qk?BJ(r,{legends:eC,marker:Jk,label:tC,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}):zJ(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 YJ(){return(t,e,n)=>{const{container:r,view:i,options:a}=t,o=Sm(r),s=Po(r),c=h=>Mm(h).scales[0].name,l=h=>{const{scale:{[h]:p}}=i;return p},u=$c(a,["active","inactive"]),f=Eu(s,Ls(i)),d=[];for(const h of o){const p=z=>{const{data:W}=h.attributes,{__data__:U}=z,{index:$}=U;return W[$].label},v=c(h),g=eC(h),y=l(v),m=Ln(s,z=>y.invert(z.__data__[v])),{state:b={}}=h.attributes,{inactive:x={}}=b,{setState:_,removeState:O}=Va(u,f),w={inactive:Pt(x,"marker")},S={inactive:Pt(x,"label")},{setState:M,removeState:E}=Va(w),{setState:P,removeState:C}=Va(S),A=z=>{for(const W of g){const U=Jk(W),$=tC(W);W===z||z===null?(E(U,"inactive"),C($,"inactive")):(M(U,"inactive"),P($,"inactive"))}},T=(z,W)=>{const U=p(W),$=new Set(m.get(U));for(const ct of s)$.has(ct)?_(ct,"active"):_(ct,"inactive");A(W);const{nativeEvent:K=!0}=z;K&&n.emit("legend:highlight",Object.assign(Object.assign({},z),{nativeEvent:K,data:{channel:v,value:U}}))},k=new Map;for(const z of g){const W=U=>{T(U,z)};z.addEventListener("pointerover",W),k.set(z,W)}const N=z=>{for(const U of s)O(U,"inactive","active");A(null);const{nativeEvent:W=!0}=z;W&&n.emit("legend:unhighlight",{nativeEvent:W})},F=z=>{const{nativeEvent:W,data:U}=z;if(W)return;const{channel:$,value:K}=U;if($!==v)return;const ct=g.find(gt=>p(gt)===K);ct&&T({nativeEvent:!1},ct)},R=z=>{const{nativeEvent:W}=z;W||N({nativeEvent:!1})};h.addEventListener("pointerleave",N),n.on("legend:highlight",F),n.on("legend:unhighlight",R);const I=()=>{h.removeEventListener(N),n.off("legend:highlight",F),n.off("legend:unhighlight",R);for(const[z,W]of k)z.removeEventListener(W)};d.push(I)}return()=>d.forEach(h=>h())}}var Hi=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);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 HJ(t,e){const[n,r,i,a]=t,[o,s,c,l]=e;return!(o>i||c<n||s>a||l<r)}function $J(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 UJ(t){const{width:e,height:n}=t.getBBox();return[0,0,e,n]}function qa(t,e){for(const[n,r]of Object.entries(e))t.style(n,r)}const iC=zc(t=>{const e=t.attributes,{x:n,y:r,width:i,height:a,class:o,renders:s={},handleSize:c=10,document:l}=e,u=Hi(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=(K,ct,gt)=>{K.handle||(K.handle=gt.createElement("rect"),K.append(K.handle));const{handle:it}=K;return it.attr(ct),it},h=Pt(og(u,"handleNW","handleNE"),"handleN"),{render:p=d}=h,v=Hi(h,["render"]),g=Pt(u,"handleE"),{render:y=d}=g,m=Hi(g,["render"]),b=Pt(og(u,"handleSE","handleSW"),"handleS"),{render:x=d}=b,_=Hi(b,["render"]),O=Pt(u,"handleW"),{render:w=d}=O,S=Hi(O,["render"]),M=Pt(u,"handleNW"),{render:E=d}=M,P=Hi(M,["render"]),C=Pt(u,"handleNE"),{render:A=d}=C,T=Hi(C,["render"]),k=Pt(u,"handleSE"),{render:N=d}=k,F=Hi(k,["render"]),R=Pt(u,"handleSW"),{render:I=d}=R,z=Hi(R,["render"]),W=(K,ct)=>{const{id:gt}=K,it=ct(K,K.attributes,l);it.id=gt,it.style.draggable=!0},U=K=>()=>{const ct=zc(gt=>W(gt,K));return new ct({})},$=Kt(t).attr("className",o).style("transform",`translate(${n}, ${r})`).style("draggable",!0);$.maybeAppend("selection","rect").style("draggable",!0).style("fill","transparent").call(qa,Object.assign(Object.assign({width:i,height:a},og(u,"handle")),{transform:void 0})),$.maybeAppend("handle-n",U(p)).style("x",f).style("y",-f).style("width",i-c).style("height",c).style("fill","transparent").call(qa,v),$.maybeAppend("handle-e",U(y)).style("x",i-f).style("y",f).style("width",c).style("height",a-c).style("fill","transparent").call(qa,m),$.maybeAppend("handle-s",U(x)).style("x",f).style("y",a-f).style("width",i-c).style("height",c).style("fill","transparent").call(qa,_),$.maybeAppend("handle-w",U(w)).style("x",-f).style("y",f).style("width",c).style("height",a-c).style("fill","transparent").call(qa,S),$.maybeAppend("handle-nw",U(E)).style("x",-f).style("y",-f).style("width",c).style("height",c).style("fill","transparent").call(qa,P),$.maybeAppend("handle-ne",U(A)).style("x",i-f).style("y",-f).style("width",c).style("height",c).style("fill","transparent").call(qa,T),$.maybeAppend("handle-se",U(N)).style("x",i-f).style("y",a-f).style("width",c).style("height",c).style("fill","transparent").call(qa,F),$.maybeAppend("handle-sw",U(I)).style("x",-f).style("y",a-f).style("width",c).style("height",c).style("fill","transparent").call(qa,z)});function Em(t,e){var{brushed:n=()=>{},brushended:r=()=>{},brushcreated:i=()=>{},brushstarted:a=()=>{},brushupdated:o=()=>{},extent:s=UJ(t),brushRegion:c=(it,et,_t,xt,Nt)=>[it,et,_t,xt],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=Hi(e,["brushed","brushended","brushcreated","brushstarted","brushupdated","extent","brushRegion","reverse","fill","fillOpacity","stroke","selectedHandles"]);let v=null,g=null,y=null,m=null,b=null,x=!1;const[_,O,w,S]=s;Ao(t,"crosshair"),t.style.draggable=!0;const M=(it,et,_t)=>{if(a(_t),m&&m.remove(),b&&b.remove(),v=[it,et],l)return E();P()},E=()=>{b=new Zr({style:Object.assign(Object.assign({},p),{fill:u,fillOpacity:f,stroke:d,pointerEvents:"none"})}),m=new iC({style:{x:0,y:0,width:0,height:0,draggable:!0,document:t.ownerDocument},className:"mask"}),t.appendChild(b),t.appendChild(m)},P=()=>{m=new iC({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)},C=(it=!0)=>{m&&m.remove(),b&&b.remove(),v=null,g=null,y=null,x=!1,m=null,b=null,r(it)},A=(it,et,_t=!0)=>{const[xt,Nt,Gt,Qt]=$J(it[0],it[1],et[0],et[1],s),[Jt,pe,Ge,le]=c(xt,Nt,Gt,Qt,s);return l?k(Jt,pe,Ge,le):T(Jt,pe,Ge,le),n(Jt,pe,Ge,le,_t),[Jt,pe,Ge,le]},T=(it,et,_t,xt)=>{m.style.x=it,m.style.y=et,m.style.width=_t-it,m.style.height=xt-et},k=(it,et,_t,xt)=>{b.style.d=`
|
|
M${_},${O}L${w},${O}L${w},${S}L${_},${S}Z
|
|
M${it},${et}L${it},${xt}L${_t},${xt}L${_t},${et}Z
|
|
`,m.style.x=it,m.style.y=et,m.style.width=_t-it,m.style.height=xt-et},N=it=>{const et=(pe,Ge,le,ye,mn)=>pe+Ge<ye?ye-Ge:pe+le>mn?mn-le:pe,_t=it[0]-y[0],xt=it[1]-y[1],Nt=et(_t,v[0],g[0],_,w),Gt=et(xt,v[1],g[1],O,S),Qt=[v[0]+Nt,v[1]+Gt],Jt=[g[0]+Nt,g[1]+Gt];A(Qt,Jt)},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"}},R=it=>z(it)||I(it),I=it=>{const{id:et}=it;return h.indexOf(et)===-1?!1:new Set(Object.keys(F)).has(et)},z=it=>it===m.getElementById("selection"),W=it=>{const{target:et}=it,[_t,xt]=ty(t,it);if(!m||!R(et)){M(_t,xt,it),x=!0;return}R(et)&&(y=[_t,xt])},U=it=>{const{target:et}=it,_t=ty(t,it);if(!v)return;if(!y)return A(v,_t);if(z(et))return N(_t);const[xt,Nt]=[_t[0]-y[0],_t[1]-y[1]],{id:Gt}=et;if(F[Gt]){const[Qt,Jt,pe,Ge]=F[Gt].vector;return A([v[0]+xt*Qt,v[1]+Nt*Jt],[g[0]+xt*pe,g[1]+Nt*Ge])}},$=it=>{if(y){y=null;const{x:Gt,y:Qt,width:Jt,height:pe}=m.style;v=[Gt,Qt],g=[Gt+Jt,Qt+pe],o(Gt,Qt,Gt+Jt,Qt+pe,it);return}g=ty(t,it);const[et,_t,xt,Nt]=A(v,g);x=!1,i(et,_t,xt,Nt,it)},K=it=>{const{target:et}=it;m&&!R(et)&&C()},ct=it=>{const{target:et}=it;!m||!R(et)||x?Ao(t,"crosshair"):z(et)?Ao(t,"move"):I(et)&&Ao(t,F[et.id].cursor)},gt=()=>{Ao(t,"default")};return t.addEventListener("dragstart",W),t.addEventListener("drag",U),t.addEventListener("dragend",$),t.addEventListener("click",K),t.addEventListener("pointermove",ct),t.addEventListener("pointerleave",gt),{mask:m,move(it,et,_t,xt,Nt=!0){m||M(it,et,{}),v=[it,et],g=[_t,xt],A([it,et],[_t,xt],Nt)},remove(it=!0){m&&C(it)},destroy(){m&&C(!1),Ao(t,"default"),t.removeEventListener("dragstart",W),t.removeEventListener("drag",U),t.removeEventListener("dragend",$),t.removeEventListener("click",K),t.removeEventListener("pointermove",ct),t.removeEventListener("pointerleave",gt)}}}function Pm(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 VJ(t,e,n){return Pm(t,e,n).map(r=>wa(r.container))}function XJ(t,e,n){return Pm(t,e,n).map(r=>r.options)}function aC(t,e){var{elements:n,selectedHandles:r,siblings:i=U=>[],datum:a,brushRegion:o,extent:s,reverse:c,scale:l,coordinate:u,series:f=!1,key:d=U=>U,bboxOf:h=U=>{const{x:$,y:K,width:ct,height:gt}=U.style;return{x:$,y:K,width:ct,height:gt}},state:p={},emitter:v}=e,g=Hi(e,["elements","selectedHandles","siblings","datum","brushRegion","extent","reverse","scale","coordinate","series","key","bboxOf","state","emitter"]);const y=n(t),m=i(t),b=m.flatMap(n),x=Eu(y,a),_=Pt(g,"mask"),{setState:O,removeState:w}=Va(p,x),S=new Map,{width:M,height:E,x:P=0,y:C=0}=h(t),A=s||[0,0,M,E],T=()=>{for(const U of[...y,...b])w(U,"active","inactive")},k=(U,$,K,ct)=>{var gt;for(const et of m)(gt=et.brush)===null||gt===void 0||gt.remove();const it=new Set;for(const et of y){const{min:_t,max:xt}=et.getLocalBounds(),[Nt,Gt]=_t,[Qt,Jt]=xt;HJ([Nt,Gt,Qt,Jt],[U,$,K,ct])?(O(et,"active"),it.add(d(et))):O(et,"inactive")}for(const et of b)it.has(d(et))?O(et,"active"):O(et,"inactive")},N=()=>{for(const U of y)w(U,"inactive");for(const U of S.values())U.remove();S.clear()},F=(U,$,K,ct)=>{const gt=et=>{const _t=et.cloneNode();return _t.__data__=et.__data__,et.parentNode.appendChild(_t),S.set(et,_t),_t},it=new bs({style:{x:U+P,y:$+C,width:K-U,height:ct-$}});t.appendChild(it);for(const et of y){const _t=S.get(et)||gt(et);_t.style.clipPath=it,O(et,"inactive"),O(_t,"active")}},R=Em(t,Object.assign(Object.assign({},_),{extent:A,brushRegion:o,reverse:c,selectedHandles:r,brushended:U=>{const $=f?N:T;U&&v.emit("brush:remove",{nativeEvent:!0}),$()},brushed:(U,$,K,ct,gt)=>{const it=gh(U,$,K,ct,l,u);gt&&v.emit("brush:highlight",{nativeEvent:!0,data:{selection:it}}),(f?F:k)(U,$,K,ct)},brushcreated:(U,$,K,ct,gt)=>{const it=gh(U,$,K,ct,l,u);v.emit("brush:end",Object.assign(Object.assign({},gt),{nativeEvent:!0,data:{selection:it}}))},brushupdated:(U,$,K,ct,gt)=>{const it=gh(U,$,K,ct,l,u);v.emit("brush:end",Object.assign(Object.assign({},gt),{nativeEvent:!0,data:{selection:it}}))},brushstarted:U=>{v.emit("brush:start",U)}})),I=({nativeEvent:U,data:$})=>{if(U)return;const{selection:K}=$,[ct,gt,it,et]=y$(K,l,u);R.move(ct,gt,it,et,!1)};v.on("brush:highlight",I);const z=({nativeEvent:U}={})=>{U||R.remove(!1)};v.on("brush:remove",z);const W=R.destroy.bind(R);return R.destroy=()=>{v.off("brush:highlight",I),v.off("brush:remove",z),W()},R}function Am(t){var{facet:e,brushKey:n}=t,r=Hi(t,["facet","brushKey"]);return(i,a,o)=>{const{container:s,view:c,options:l}=i,u=wa(s),f={maskFill:"#777",maskFillOpacity:"0.3",maskStroke:"#fff",reverse:!1},d=["active",["inactive",{opacity:.5}]],{scale:h,coordinate:p}=c;if(e){const g=u.getBounds(),y=g.min[0],m=g.min[1],b=g.max[0],x=g.max[1];return aC(u.parentNode.parentNode,Object.assign(Object.assign({elements:()=>PS(i,a),datum:Ls(Qg(i,a).map(_=>_.view)),brushRegion:(_,O,w,S)=>[_,O,w,S],extent:[y,m,b,x],state:$c(Qg(i,a).map(_=>_.options),d),emitter:o,scale:h,coordinate:p,selectedHandles:void 0},f),r))}const v=aC(u,Object.assign(Object.assign({elements:Po,key:g=>g.__data__.key,siblings:()=>VJ(i,a,n),datum:Ls([c,...Pm(i,a,n).map(g=>g.view)]),brushRegion:(g,y,m,b)=>[g,y,m,b],extent:void 0,state:$c([l,...XJ(i,a,n)],d),emitter:o,scale:h,coordinate:p,selectedHandles:void 0},f),r));return u.brush=v,()=>v.destroy()}}function Tm(t,e,n,r,i){const[,a,,o]=i;return[t,a,n,o]}function qJ(t){return Am(Object.assign(Object.assign({},t),{brushRegion:Tm,selectedHandles:["handle-e","handle-w"]}))}function km(t,e,n,r,i){const[a,,o]=i;return[a,e,o,r]}function ZJ(t){return Am(Object.assign(Object.assign({},t),{brushRegion:km,selectedHandles:["handle-n","handle-s"]}))}var Cm=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);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 KJ="axis",QJ="axis-line",JJ="axis-main-group",oC="axis-hot-area";function ttt(t){return t.getElementsByClassName(KJ)}function sC(t){return t.getElementsByClassName(QJ)[0]}function ett(t){return t.getElementsByClassName(JJ)[0]}function cC(t){return ett(t).getLocalBounds()}function ntt(t,e){var{cross:n,offsetX:r,offsetY:i}=e,a=Cm(e,["cross","offsetX","offsetY"]);const o=cC(t),s=sC(t),[c]=s.getLocalBounds().min,[l,u]=o.min,[f,d]=o.max,h=(f-l)*2;return{brushRegion:km,hotZone:new bs({className:oC,style:Object.assign({width:n?h/2:h,transform:`translate(${(n?l:c-h/2).toFixed(2)}, ${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 rtt(t,e){var{offsetY:n,offsetX:r,cross:i=!1}=e,a=Cm(e,["offsetY","offsetX","cross"]);const o=cC(t),s=sC(t),[,c]=s.getLocalBounds().min,[l,u]=o.min,[f,d]=o.max,h=d-u;return{brushRegion:Tm,hotZone:new bs({className:oC,style:Object.assign({width:f-l,height:i?h:h*2,transform:`translate(${l}, ${i?u:c-h})`},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 itt(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=Cm(e,["axes","elements","points","horizontal","datum","offsetY","offsetX","reverse","state","emitter","coordinate"]);const p=r(t),v=n(t),g=Eu(p,o),{setState:y,removeState:m}=Va(u,g),b=new Map,x=Pt(h,"mask"),_=I=>Array.from(b.values()).every(([z,W,U,$])=>I.some(([K,ct])=>K>=z&&K<=U&&ct>=W&&ct<=$)),O=v.map(I=>I.attributes.scale),w=I=>I.length>2?[I[0],I[I.length-1]]:I,S=new Map,M=()=>{S.clear();for(let I=0;I<v.length;I++){const z=O[I],{domain:W}=z.getOptions();S.set(I,w(W))}};M();const E=(I,z)=>{const W=[];for(const $ of p){const K=i($);_(K)?(y($,"active"),W.push($)):y($,"inactive")}if(S.set(I,C(W,I)),!z)return;const U=()=>{if(!A)return Array.from(S.values());const $=[];for(const[K,ct]of S){const gt=O[K],{name:it}=gt.getOptions();it==="x"?$[0]=ct:$[1]=ct}return $};f.emit("brushAxis:highlight",{nativeEvent:!0,data:{selection:U()}})},P=I=>{for(const z of p)m(z,"active","inactive");M(),I&&f.emit("brushAxis:remove",{nativeEvent:!0})},C=(I,z)=>{const W=O[z],{name:U}=W.getOptions(),$=I.map(K=>{const ct=K.__data__;return W.invert(ct[U])});return w(Eo(W,$))},A=v.some(a)&&v.some(I=>!a(I)),T=[];for(let I=0;I<v.length;I++){const z=v[I],W=a(z)?rtt:ntt,{hotZone:U,brushRegion:$,extent:K}=W(z,{offsetY:s,offsetX:c,cross:A,zIndex:999,fill:"transparent"});z.parentNode.appendChild(U);const ct=Em(U,Object.assign(Object.assign({},x),{reverse:l,brushRegion:$,brushended(gt){b.delete(z),Array.from(b.entries()).length===0?P(gt):E(I,gt)},brushed(gt,it,et,_t,xt){b.set(z,K(gt,it,et,_t)),E(I,xt)}}));T.push(ct)}const k=(I={})=>{const{nativeEvent:z}=I;z||T.forEach(W=>W.remove(!1))},N=(I,z,W)=>{const[U,$]=I,K=it=>it.getStep?it.getStep():0,ct=F(U,z,W),gt=F($,z,W)+K(z);return a(W)?[ct,-1/0,gt,1/0]:[-1/0,ct,1/0,gt]},F=(I,z,W)=>{const{height:U,width:$}=d.getOptions(),K=z.clone();return a(W)?K.update({range:[0,$]}):K.update({range:[U,0]}),K.map(I)},R=I=>{const{nativeEvent:z}=I;if(z)return;const{selection:W}=I.data;for(let U=0;U<T.length;U++){const $=W[U],K=T[U],ct=v[U];if($){const gt=O[U];K.move(...N($,gt,ct),!1)}else K.remove(!1)}};return f.on("brushAxis:remove",k),f.on("brushAxis:highlight",R),()=>{T.forEach(I=>I.destroy()),f.off("brushAxis:remove",k),f.off("brushAxis:highlight",R)}}function att(t){return(e,n,r)=>{const{container:i,view:a,options:o}=e,s=wa(i),{x:c,y:l}=s.getBBox(),{coordinate:u}=a;return itt(i,Object.assign({elements:Po,axes:ttt,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:Ls(a),state:$c(o,["active",["inactive",{opacity:.5}]]),coordinate:u,emitter:r},t))}}var ott=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())})},lC=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);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 stt(t=300){let e=null;return n=>{const{timeStamp:r}=n;return e!==null&&r-e<t?(e=r,!0):(e=r,!1)}}function ctt(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=lC(e,["filter","reset","brushRegion","extent","reverse","emitter","scale","coordinate","selection","series"]);const h=Pt(d,"mask"),{width:p,height:v}=t.getBBox(),g=a||[0,0,p,v],y=stt(),m=Em(t,Object.assign(Object.assign({},h),{extent:g,brushRegion:i,reverse:o,brushcreated:b}));t.addEventListener("click",x);function b(O,w,S,M,E){E.nativeEvent=!0,n(u(O,w,S,M),E),m.remove()}function x(O){y(O)&&(O.nativeEvent=!0,r(O))}const _=({nativeEvent:O,data:w})=>{if(O)return;const{selection:S}=w;n(S,{nativeEvent:!1})};return s.on("brush:filter",_),()=>{m.destroy(),s.off("brush:filter",_),t.removeEventListener("click",x)}}function Lm(t){var{hideX:e=!0,hideY:n=!0}=t,r=lC(t,["hideX","hideY"]);return(i,a,o)=>{const{container:s,view:c,options:l,update:u,setState:f}=i,d=wa(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 ctt(d,Object.assign(Object.assign({brushRegion:(b,x,_,O)=>[b,x,_,O],selection:(b,x,_,O)=>{const{scale:w,coordinate:S}=g;return gh(b,x,_,O,w,S)},filter:(b,x)=>ott(this,void 0,void 0,function*(){if(v)return;v=!0;const[_,O]=b;f("brushFilter",S=>{const{marks:M}=S,E=M.map(P=>at({axis:Object.assign(Object.assign({},e&&{x:{transform:[{type:"hide"}]}}),n&&{y:{transform:[{type:"hide"}]}})},P,{scale:{x:{domain:_,nice:!1},y:{domain:O,nice:!1}}}));return Object.assign(Object.assign({},l),{marks:E,clip:!0})}),o.emit("brush:filter",Object.assign(Object.assign({},x),{data:{selection:[_,O]}})),g=(yield u()).view,v=!1,p=!0}),reset:b=>{if(v||!p)return;const{scale:x}=c,{x:_,y:O}=x,w=_.getOptions().domain,S=O.getOptions().domain;o.emit("brush:filter",Object.assign(Object.assign({},b),{data:{selection:[w,S]}})),p=!1,g=c,f("brushFilter"),u()},extent:void 0,emitter:o,scale:y,coordinate:m},h),r))}}function ltt(t){return Lm(Object.assign(Object.assign({hideX:!0},t),{brushRegion:Tm}))}function utt(t){return Lm(Object.assign(Object.assign({hideY:!0},t),{brushRegion:km}))}var ftt=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 dtt="slider";function htt(t,e,n,r=!1,i="x",a="y"){const{marks:o}=t,s=o.map(c=>{var l,u;return at({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 ptt(t,e,n){const[r,i]=t,a=n?c=>1-c:c=>c,o=Yc(e,a(r),!0),s=Yc(e,a(i),!1);return Eo(e,[o,s])}function up(t){return[t[0],t[t.length-1]]}function uC({initDomain:t={},className:e=dtt,prefix:n="slider",setValue:r=(l,u)=>l.setValues(u),hasState:i=!1,wait:a=50,leading:o=!0,trailing:s=!1,getInitValues:c=l=>{var u;const f=(u=l==null?void 0:l.attributes)===null||u===void 0?void 0:u.values;if(f[0]!==0||f[1]!==1)return f}}){return(l,u,f)=>{const{container:d,view:h,update:p,setState:v}=l,g=d.getElementsByClassName(e);if(!g.length)return()=>{};let y=!1;const{scale:m,coordinate:b,layout:x}=h,{paddingLeft:_,paddingTop:O,paddingBottom:w,paddingRight:S}=x,{x:M,y:E}=m,P=Mn(b),C=N=>{const F=N==="vertical"?"y":"x",R=N==="vertical"?"x":"y";return P?[R,F]:[F,R]},A=new Map,T=new Set,k={x:t.x||M.getOptions().domain,y:t.y||E.getOptions().domain};for(const N of g){const{orientation:F}=N.attributes,[R,I]=C(F),z=`${n}${mo(R)}:filter`,W=R==="x",{ratio:U}=M.getOptions(),{ratio:$}=E.getOptions(),K=et=>{if(et.data){const{selection:Qt}=et.data,[Jt=up(k.x),pe=up(k.y)]=Qt;return W?[Eo(M,Jt,U),Eo(E,pe,$)]:[Eo(E,pe,$),Eo(M,Jt,U)]}const{value:_t}=et.detail,xt=m[R],Nt=ptt(_t,xt,P&&F==="horizontal"),Gt=k[I];return[Nt,Gt]},ct=Gs(et=>ftt(this,void 0,void 0,function*(){const{initValue:_t=!1}=et;if(y&&!_t)return;y=!0;const{nativeEvent:xt=!0}=et,[Nt,Gt]=K(et);if(k[R]=Nt,k[I]=Gt,xt){const Qt=W?Nt:Gt,Jt=W?Gt:Nt;f.emit(z,Object.assign(Object.assign({},et),{nativeEvent:xt,data:{selection:[up(Qt),up(Jt)]}}))}v(N,Qt=>Object.assign(Object.assign({},htt(Qt,{[R]:{domain:Nt,nice:!1}},n,i,R,I)),{paddingLeft:_,paddingTop:O,paddingBottom:w,paddingRight:S})),yield p(),y=!1}),a,{leading:o,trailing:s}),gt=et=>{const{nativeEvent:_t}=et;if(_t)return;const{data:xt}=et,{selection:Nt}=xt,[Gt,Qt]=Nt;N.dispatchEvent(new sn("valuechange",{data:xt,nativeEvent:!1}));const Jt=W?yh(Gt,M):yh(Qt,E);r(N,Jt)};f.on(z,gt),N.addEventListener("valuechange",ct),A.set(N,ct),T.add([z,gt]);const it=c(N);it&&N.dispatchEvent(new sn("valuechange",{detail:{value:it},nativeEvent:!1,initValue:!0}))}return p(),()=>{for(const[N,F]of A)N.removeEventListener("valuechange",F);for(const[N,F]of T)f.off(N,F)}}}const fC="g2-scrollbar";function vtt(t={}){return(e,n,r)=>{const{view:i,container:a}=e;if(!a.getElementsByClassName(fC).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}),uC(Object.assign(Object.assign({},t),{initDomain:u,className:fC,prefix:"scrollbar",hasState:!0,setValue:(d,h)=>d.setValue(h[0]),getInitValues:d=>{const h=d.slider.attributes.values;if(h[0]!==0)return h}}))(e,n,r)}}var gtt=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);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 ytt(t,e,n){return`<${t} style="${Object.entries(n).map(([r,i])=>`${HH(r)}:${i}`).join(";")}">${e}</${t}>`}const mtt={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 dC(t){return t.nodeName!=="text"?!1:!!t.isOverflowing()}function hC(t){var{offsetX:e=8,offsetY:n=8}=t,r=gtt(t,["offsetX","offsetY"]);return i=>{const{container:a}=i,[o,s]=a.getBounds().min,c=Pt(r,"tip"),l=new Set,u=d=>{const{target:h}=d;if(!dC(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 Od({className:"poptip",style:{innerHTML:ytt("div",m,Object.assign(Object.assign({},mtt),c)),x:g,y}});a.appendChild(b),h.tip=b,l.add(b)},f=d=>{const{target:h}=d;if(!dC(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())}}}hC.props={reapplyWhenUpdate:!0};function btt(t,e){var n=My(e),r=n.length;if(se(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 xtt=btt;function _tt(t,e){if(!sr(t))return null;var n;if(Kr(e)&&(n=e),Ba(e)&&(n=function(i){return xtt(i,e)}),n){for(var r=0;r<t.length;r+=1)if(n(t[r]))return t[r]}return null}var il=_tt;function fp(t){return t==null?null:pC(t)}function pC(t){if(typeof t!="function")throw new Error;return t}var Ott={depth:-1},vC={},Nm={};function wtt(t){return t.id}function Stt(t){return t.parentId}function jm(){var t=wtt,e=Stt,n;function r(i){var a=Array.from(i),o=t,s=e,c,l,u,f,d,h,p,v,g=new Map;if(n!=null){var y=a.map(function(S,M){return Mtt(n(S,M,i))}),m=y.map(gC),b=new Set(y).add(""),x=_y(m),_;try{for(x.s();!(_=x.n()).done;){var O=_.value;b.has(O)||(b.add(O),y.push(O),m.push(gC(O)),a.push(Nm))}}catch(S){x.e(S)}finally{x.f()}o=function(M,E){return y[E]},s=function(M,E){return m[E]}}for(u=0,c=a.length;u<c;++u)l=a[u],h=a[u]=new Kc(l),(p=o(l,u,i))!=null&&(p+="")&&(v=h.id=p,g.set(v,g.has(v)?vC: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===vC)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===Nm&&f.children.length===1;)f=f.children[0],--c;for(var w=a.length-1;w>=0&&(h=a[w],h.data===Nm);--w)h.data=null}if(f.parent=Ott,f.eachBefore(function(S){S.depth=S.parent.depth+1,--c}).eachBefore(fE),f.parent=null,c>0)throw new Error("cycle");return f}return r.id=function(i){return arguments.length?(t=fp(i),r):t},r.parentId=function(i){return arguments.length?(e=fp(i),r):e},r.path=function(i){return arguments.length?(n=fp(i),r):n},r}function Mtt(t){t="".concat(t);var e=t.length;return Rm(t,e-1)&&!Rm(t,e-2)&&(t=t.slice(0,-1)),t[0]==="/"?t:"/".concat(t)}function gC(t){var e=t.length;if(e<2)return"";for(;--e>1&&!Rm(t,e););return t.slice(0,e)}function Rm(t,e){if(t[e]==="/"){for(var n=0;e>0&&t[--e]==="\\";)++n;if(!(n&1))return!0}return!1}function Ett(t,e,n,r,i){var a=t.children,o,s=a.length,c,l=new Array(s+1);for(l[0]=c=o=0;o<s;++o)l[o+1]=c+=a[o].value;u(0,s,t.value,e,n,r,i);function u(f,d,h,p,v,g,y){if(f>=d-1){var m=a[f];m.x0=p,m.y0=v,m.x1=g,m.y1=y;return}for(var b=l[f],x=h/2+b,_=f+1,O=d-1;_<O;){var w=_+O>>>1;l[w]<x?_=w+1:O=w}x-l[_-1]<l[_]-x&&f+1<_&&--_;var S=l[_]-b,M=h-S;if(g-p>y-v){var E=h?(p*M+g*S)/h:g;u(f,_,S,p,v,E,y),u(_,d,M,E,v,g,y)}else{var P=h?(v*M+y*S)/h:y;u(f,_,S,p,v,g,P),u(_,d,M,p,P,g,y)}}}function dp(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 Ptt(t,e,n,r,i){(t.depth&1?dp:ku)(t,e,n,r,i)}var yC=(1+Math.sqrt(5))/2;function mC(t,e,n,r,i,a){for(var o=[],s=e.children,c,l,u=0,f=0,d=s.length,h,p,v=e.value,g,y,m,b,x,_,O;u<d;){h=i-n,p=a-r;do g=s[f++].value;while(!g&&f<d);for(y=m=g,_=Math.max(p/h,h/p)/(v*t),O=g*g*_,x=Math.max(m/O,O/y);f<d;++f){if(g+=l=s[f].value,l<y&&(y=l),l>m&&(m=l),O=g*g*_,b=Math.max(m/O,O/y),b>x){g-=l;break}x=b}o.push(c={value:g,dice:h<p,children:s.slice(u,f)}),c.dice?ku(c,n,r,i,v?r+=p*g/v:a):dp(c,n,r,v?n+=h*g/v:i,a),v-=g,u=f}return o}var bC=function t(e){function n(r,i,a,o,s){mC(e,r,i,a,o,s)}return n.ratio=function(r){return t((r=+r)>1?r:1)},n}(yC),Att=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?ku(l,i,a,o,v?a+=(s-a)*l.value/v:s):dp(l,i,a,v?i+=(o-i)*l.value/v:o,s),v-=l.value}else r._squarify=c=mC(e,r,i,a,o,s),c.ratio=e}return n.ratio=function(r){return t((r=+r)>1?r:1)},n}(yC);function Ws(){return 0}function al(t){return function(){return t}}function Ttt(){var t=bC,e=!1,n=1,r=1,i=[0],a=Ws,o=Ws,s=Ws,c=Ws,l=Ws;function u(d){return d.x0=d.y0=0,d.x1=n,d.y1=r,d.eachBefore(f),i=[0],e&&d.eachBefore(cE),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=pC(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:al(+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:al(+d),u):o},u.paddingRight=function(d){return arguments.length?(s=typeof d=="function"?d:al(+d),u):s},u.paddingBottom=function(d){return arguments.length?(c=typeof d=="function"?d:al(+d),u):c},u.paddingLeft=function(d){return arguments.length?(l=typeof d=="function"?d:al(+d),u):l},u}function ktt(t,e){return Array.isArray(t)?typeof e=="function"?jm().path(e)(t):jm()(t):Zc(t)}function xC(t,e=[t.data.name]){t.id=t.id||t.data.name,t.path=e,t.children&&t.children.forEach(n=>{n.id=`${t.id}/${n.data.name}`,n.path=[...e,n.data.name],xC(n,n.path)})}function _C(t){const e=Re(t,["data","name"]);e.replaceAll&&(t.path=e.replaceAll(".","/").split("/")),t.children&&t.children.forEach(n=>{_C(n)})}function Ctt(t,e){const n={treemapBinary:Ett,treemapDice:ku,treemapSlice:dp,treemapSliceDice:Ptt,treemapSquarify:bC,treemapResquarify:Att},r=t==="treemapSquarify"?n[t].ratio(e):n[t];if(!r)throw new TypeError("Invalid tile method!");return r}function OC(t,e,n){const{value:r}=n,i=Ctt(e.tile,e.ratio),a=ktt(t,e.path);sr(t)?_C(a):xC(a),r?a.sum(c=>e.ignoreParentValue&&c.children?0:Aa(r)(c)).sort(e.sort):a.count(),Ttt().tile(i).size(e.size).round(e.round).paddingInner(e.paddingInner).paddingOuter(e.paddingOuter).paddingTop(e.paddingTop).paddingRight(e.paddingRight).paddingBottom(e.paddingBottom).paddingLeft(e.paddingLeft)(a);const o=a.descendants().map(c=>Object.assign(c,{id:c.id.replace(/^\//,""),x:[c.x0,c.x1],y:[c.y0,c.y1]}));return[o.filter(typeof e.layer=="function"?e.layer:c=>c.height===e.layer),o]}var Ltt=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())})},Ntt=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function jtt(t){return Kt(t).select(`.${Ll}`).node()}const Rtt={breadCrumbFill:"rgba(0, 0, 0, 0.85)",breadCrumbFontSize:12,breadCrumbY:12,activeFill:"rgba(0, 0, 0, 0.5)"};function Itt(t={}){const{originData:e=[],layout:n}=t,r=Ntt(t,["originData","layout"]),i=at({},Rtt,r),a=Pt(i,"breadCrumb"),o=Pt(i,"active");return s=>{const{update:c,setState:l,container:u,options:f}=s,d=jtt(u),h=f.marks[0],{state:p}=h,v=new dr;d.appendChild(v);const g=(x,_)=>Ltt(this,void 0,void 0,function*(){if(v.removeChildren(),_){let O="",w=a.y,S=0;const M=[],E=d.getBBox().width,P=x.map((C,A)=>{O=`${O}${C}/`,M.push(C);const T=new fi({name:O.replace(/\/$/,""),style:Object.assign(Object.assign({text:C,x:S,path:[...M],depth:A},a),{y:w})});v.appendChild(T),S+=T.getBBox().width;const k=new fi({style:Object.assign(Object.assign({x:S,text:" / "},a),{y:w})});return v.appendChild(k),S+=k.getBBox().width,S>E&&(w=v.getBBox().height+a.y,S=0,T.attr({x:S,y:w}),S+=T.getBBox().width,k.attr({x:S,y:w}),S+=k.getBBox().width),A===gu(x)-1&&k.remove(),T});P.forEach((C,A)=>{if(A===gu(P)-1)return;const T=Object.assign({},C.attributes);C.attr("cursor","pointer"),C.addEventListener("mouseenter",()=>{C.attr(o)}),C.addEventListener("mouseleave",()=>{C.attr(T)}),C.addEventListener("click",()=>{g(Re(C,["style","path"]),Re(C,["style","depth"]))})})}FJ(u,l),l("treemapDrillDown",O=>{const{marks:w}=O,S=x.join("/"),M=w.map(E=>{if(E.type!=="rect")return E;let P=e;if(_){const A=e.filter(R=>{const I=Re(R,["id"]);return I&&(I.match(`${S}/`)||S.match(I))}).map(R=>({value:R.height===0?Re(R,["value"]):void 0,name:Re(R,["id"])})),{paddingLeft:T,paddingBottom:k,paddingRight:N}=n,F=Object.assign(Object.assign({},n),{paddingTop:(n.paddingTop||v.getBBox().height+10)/(_+1),paddingLeft:T/(_+1),paddingBottom:k/(_+1),paddingRight:N/(_+1),path:R=>R.name,layer:R=>R.depth===_+1});P=OC(A,F,{value:"value"})[0]}else P=e.filter(A=>A.depth===1);const C=[];return P.forEach(({path:A})=>{C.push(Wu(A))}),at({},E,{data:P,scale:{color:{domain:C}}})});return Object.assign(Object.assign({},O),{marks:M})}),yield c(void 0,["legendFilter"])}),y=x=>{const _=x.target;if(Re(_,["markType"])!=="rect")return;const O=Re(_,["__data__","key"]),w=il(e,S=>S.id===O);Re(w,"height")&&g(Re(w,"path"),Re(w,"depth"))};d.addEventListener("click",y);const m=My(Object.assign(Object.assign({},p.active),p.inactive)),b=()=>{NS(d).forEach(_=>{const O=Re(_,["style","cursor"]),w=il(e,S=>S.id===Re(_,["__data__","key"]));if(O!=="pointer"&&(w!=null&&w.height)){_.style.cursor="pointer";const S=xy(_.attributes,m);_.addEventListener("mouseenter",()=>{_.attr(p.active)}),_.addEventListener("mouseleave",()=>{_.attr(at(S,p.inactive))})}})};return b(),d.addEventListener("mousemove",b),()=>{v.remove(),d.removeEventListener("click",y),d.removeEventListener("mousemove",b)}}}var Im=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())})},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};const Ftt={pointR:6,pointStrokeWidth:1,pointStroke:"#888",pointActiveStroke:"#f5f5f5",pathStroke:"#888",pathLineDash:[3,4],labelFontSize:12,labelFill:"#888",labelStroke:"#fff",labelLineWidth:1,labelY:-6,labelX:2},Dm="movePoint",wC=t=>{const e=t.target,{markType:n}=e;n==="line"&&(e.attr("_lineWidth",e.attr("lineWidth")||1),e.attr("lineWidth",e.attr("_lineWidth")+3)),n==="interval"&&(e.attr("_opacity",e.attr("opacity")||1),e.attr("opacity",.7*e.attr("_opacity")))},SC=t=>{const e=t.target,{markType:n}=e;n==="line"&&e.attr("lineWidth",e.attr("_lineWidth")),n==="interval"&&e.attr("opacity",e.attr("_opacity"))},Btt=(t,e,n)=>e.map(r=>["x","color"].reduce((a,o)=>{const s=n[o];return s&&r[s]!==t[s]?!1:a},!0)?Object.assign(Object.assign({},r),t):r),ztt=t=>{const e=Re(t,["__data__","y"]),r=Re(t,["__data__","y1"])-e,{__data__:{data:i,encode:a,transform:o},childNodes:s}=t.parentNode,c=il(o,({type:f})=>f==="normalizeY"),l=Re(a,["y","field"]),u=i[s.indexOf(t)][l];return(f,d=!1)=>c||d?f/(1-f)/(r/(1-r))*u:f},Gtt=(t,e)=>{const n=Re(t,["__data__","seriesItems",e,"0","value"]),r=Re(t,["__data__","seriesIndex",e]),{__data__:{data:i,encode:a,transform:o}}=t.parentNode,s=il(o,({type:u})=>u==="normalizeY"),c=Re(a,["y","field"]),l=i[r][c];return u=>s?n===1?u:u/(1-u)/(n/(1-n))*l:u},MC=(t,e,n)=>{t.forEach((r,i)=>{r.attr("stroke",e[1]===i?n.activeStroke:n.stroke)})},EC=(t,e,n,r)=>{const i=new Zr({style:n}),a=new fi({style:r});return e.appendChild(a),t.appendChild(i),[i,a]},PC=(t,e)=>{if(!Re(t,["options","range","indexOf"]))return;const r=t.options.range.indexOf(e);return t.sortedDomain[r]},Fm=(t,e,n)=>{const r=Sh(t,e),a=Sh(t,n)/r,o=t[0]+(e[0]-t[0])*a,s=t[1]+(e[1]-t[1])*a;return[o,s]};function Wtt(t={}){const{selection:e=[],precision:n=2}=t,r=Dtt(t,["selection","precision"]),i=Object.assign(Object.assign({},Ftt),r||{}),a=Pt(i,"path"),o=Pt(i,"label"),s=Pt(i,"point");return(c,l,u)=>{const{update:f,setState:d,container:h,view:p,options:{marks:v,coordinate:g}}=c,y=wa(h);let m=NS(y),b,x=e;const{transform:_=[],type:O}=g,w=!!il(_,({type:R})=>R==="transpose"),S=O==="polar",M=O==="theta",E=!!il(m,({markType:R})=>R==="area");E&&(m=m.filter(({markType:R})=>R==="area"));const P=new dr({style:{zIndex:2}});y.appendChild(P);const C=()=>{u.emit("element-point:select",{nativeEvent:!0,data:{selection:x}})},A=(R,I)=>{u.emit("element-point:moved",{nativeEvent:!0,data:{changeData:R,data:I}})},T=R=>{const I=R.target;x=[I.parentNode.childNodes.indexOf(I)],C(),N(I)},k=R=>{const{data:{selection:I},nativeEvent:z}=R;if(z)return;x=I;const W=Re(m,[x==null?void 0:x[0]]);W&&N(W)},N=R=>{const{attributes:I,markType:z,__data__:W}=R,{stroke:U}=I,{points:$,seriesTitle:K,color:ct,title:gt,seriesX:it,y1:et}=W;if(w&&z!=="interval")return;const{scale:_t,coordinate:xt}=(b==null?void 0:b.view)||p,{color:Nt,y:Gt,x:Qt}=_t,Jt=xt.getCenter();P.removeChildren();let pe;const Ge=(le,ye,mn,Zn)=>Im(this,void 0,void 0,function*(){return d("elementPointMove",yi=>{var Kn;const br=(((Kn=b==null?void 0:b.options)===null||Kn===void 0?void 0:Kn.marks)||v).map(ie=>{if(!Zn.includes(ie.type))return ie;const{data:me,encode:fe}=ie,Fe=Object.keys(fe).reduce((Pe,hn)=>{const jn=fe[hn];return hn==="x"&&(Pe[jn]=le),hn==="y"&&(Pe[jn]=ye),hn==="color"&&(Pe[jn]=mn),Pe},{}),Ne=Btt(Fe,me,fe);return A(Fe,Ne),at({},ie,{data:Ne,animate:!1})});return Object.assign(Object.assign({},yi),{marks:br})}),yield f("elementPointMove")});if(["line","area"].includes(z))$.forEach((le,ye)=>{const mn=Qt.invert(it[ye]);if(!mn)return;const Zn=new ms({name:Dm,style:Object.assign({cx:le[0],cy:le[1],fill:U},s)}),yi=Gtt(R,ye);Zn.addEventListener("mousedown",Kn=>{const br=xt.output([it[ye],0]),ie=K==null?void 0:K.length;h.attr("cursor","move"),x[1]!==ye&&(x[1]=ye,C()),MC(P.childNodes,x,s);const[me,fe]=EC(P,Zn,a,o),ne=Ne=>{const Pe=le[1]+Ne.clientY-pe[1];if(E)if(S){const hn=le[0]+Ne.clientX-pe[0],[jn,Hr]=Fm(Jt,br,[hn,Pe]),[,to]=xt.output([1,Gt.output(0)]),[,Xs]=xt.invert([jn,to-($[ye+ie][1]-Hr)]),u0=(ye+1)%ie,f0=(ye-1+ie)%ie,qs=Pu([$[f0],[jn,Hr],K[u0]&&$[u0]]);fe.attr("text",yi(Gt.invert(Xs)).toFixed(n)),me.attr("d",qs),Zn.attr("cx",jn),Zn.attr("cy",Hr)}else{const[,hn]=xt.output([1,Gt.output(0)]),[,jn]=xt.invert([le[0],hn-($[ye+ie][1]-Pe)]),Hr=Pu([$[ye-1],[le[0],Pe],K[ye+1]&&$[ye+1]]);fe.attr("text",yi(Gt.invert(jn)).toFixed(n)),me.attr("d",Hr),Zn.attr("cy",Pe)}else{const[,hn]=xt.invert([le[0],Pe]),jn=Pu([$[ye-1],[le[0],Pe],$[ye+1]]);fe.attr("text",Gt.invert(hn).toFixed(n)),me.attr("d",jn),Zn.attr("cy",Pe)}};pe=[Kn.clientX,Kn.clientY],window.addEventListener("mousemove",ne);const Fe=()=>Im(this,void 0,void 0,function*(){if(h.attr("cursor","default"),window.removeEventListener("mousemove",ne),h.removeEventListener("mouseup",Fe),ln(fe.attr("text")))return;const Ne=Number(fe.attr("text")),Pe=PC(Nt,ct);b=yield Ge(mn,Ne,Pe,["line","area"]),fe.remove(),me.remove(),N(R)});h.addEventListener("mouseup",Fe)}),P.appendChild(Zn)}),MC(P.childNodes,x,s);else if(z==="interval"){let le=[($[0][0]+$[1][0])/2,$[0][1]];w?le=[$[0][0],($[0][1]+$[1][1])/2]:M&&(le=$[0]);const ye=ztt(R),mn=new ms({name:Dm,style:Object.assign(Object.assign({cx:le[0],cy:le[1],fill:U},s),{stroke:s.activeStroke})});mn.addEventListener("mousedown",Zn=>{h.attr("cursor","move");const yi=PC(Nt,ct),[Kn,br]=EC(P,mn,a,o),ie=fe=>{if(w){const ne=le[0]+fe.clientX-pe[0],[Fe]=xt.output([Gt.output(0),Gt.output(0)]),[,Ne]=xt.invert([Fe+(ne-$[2][0]),le[1]]),Pe=Pu([[ne,$[0][1]],[ne,$[1][1]],$[2],$[3]],!0);br.attr("text",ye(Gt.invert(Ne)).toFixed(n)),Kn.attr("d",Pe),mn.attr("cx",ne)}else if(M){const ne=le[1]+fe.clientY-pe[1],Fe=le[0]+fe.clientX-pe[0],[Ne,Pe]=Fm(Jt,[Fe,ne],le),[hn,jn]=Fm(Jt,[Fe,ne],$[1]),Hr=xt.invert([Ne,Pe])[1],to=et-Hr;if(to<0)return;const Xs=L$(Jt,[[Ne,Pe],[hn,jn],$[2],$[3]],to>.5?1:0);br.attr("text",ye(to,!0).toFixed(n)),Kn.attr("d",Xs),mn.attr("cx",Ne),mn.attr("cy",Pe)}else{const ne=le[1]+fe.clientY-pe[1],[,Fe]=xt.output([1,Gt.output(0)]),[,Ne]=xt.invert([le[0],Fe-($[2][1]-ne)]),Pe=Pu([[$[0][0],ne],[$[1][0],ne],$[2],$[3]],!0);br.attr("text",ye(Gt.invert(Ne)).toFixed(n)),Kn.attr("d",Pe),mn.attr("cy",ne)}};pe=[Zn.clientX,Zn.clientY],window.addEventListener("mousemove",ie);const me=()=>Im(this,void 0,void 0,function*(){if(h.attr("cursor","default"),h.removeEventListener("mouseup",me),window.removeEventListener("mousemove",ie),ln(br.attr("text")))return;const fe=Number(br.attr("text"));b=yield Ge(gt,fe,yi,[z]),br.remove(),Kn.remove(),N(R)});h.addEventListener("mouseup",me)}),P.appendChild(mn)}};m.forEach((R,I)=>{x[0]===I&&N(R),R.addEventListener("click",T),R.addEventListener("mouseenter",wC),R.addEventListener("mouseleave",SC)});const F=R=>{const I=R==null?void 0:R.target;(!I||I.name!==Dm&&!m.includes(I))&&(x=[],C(),P.removeChildren())};return u.on("element-point:select",k),u.on("element-point:unselect",F),h.addEventListener("mousedown",F),()=>{P.remove(),u.off("element-point:select",k),u.off("element-point:unselect",F),h.removeEventListener("mousedown",F),m.forEach(R=>{R.removeEventListener("click",T),R.removeEventListener("mouseenter",wC),R.removeEventListener("mouseleave",SC)})}}}var Ytt=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);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 AC=()=>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=Ytt(s,["data","x","y","width","height"]);return Object.assign(Object.assign({},h),{data:Dg(c,o),x:l!=null?l:n,y:u!=null?u:r,width:f!=null?f:i,height:d!=null?d:a})})};AC.props={};var Htt=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const TC=()=>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=Htt(g,["data"]),b=Dg(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};TC.props={};class qu{constructor(e){this.$value=e}static of(e){return new qu(e)}call(e,...n){return this.$value=e(this.$value,...n),this}value(){return this.$value}}var $tt=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);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 Utt=Dc(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=Ln(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"))}}}),Bm=Dc(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")?[Ha(p)]:[Array.from(new Set(p)),"ordinal"]},c=typeof i=="string"?i:"",[l,u]=s();return{encode:{color:i},scale:{color:at({},a,{domain:l,type:u})},legend:{color:at({title:c},o)}}}),zm=Dc(()=>({animate:{enterType:"fadeIn"}})),Gm=Fc(()=>({frame:!1,encode:{shape:"hollow"},style:{lineWidth:0}})),Wm=Fc(()=>({type:"cell"})),kC=Fc(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}))})()}}]}}}),CC=Fc((t,e=Vtt,n=Xtt,r=qtt,i={})=>{const{data:a,encode:o,children:s,scale:c,x:l=0,y:u=0,shareData:f=!1,key:d}=t,{value:h}=a,{x:p,y:v}=o,{color:g}=c,{domain:y}=g;return{children:(b,x,_)=>{const{x:O,y:w}=x,{paddingLeft:S,paddingTop:M,marginLeft:E,marginTop:P}=_,{domain:C}=O.getOptions(),{domain:A}=w.getOptions(),T=Os(b),k=b.map(e),N=b.map(({x:U,y:$})=>[O.invert(U),w.invert($)]),R=N.map(([U,$])=>K=>{const{[p]:ct,[v]:gt}=K;return(p!==void 0?ct===U:!0)&&(v!==void 0?gt===$:!0)}).map(U=>h.filter(U)),I=f?Ke(R,U=>U.length):void 0,z=N.map(([U,$])=>({columnField:p,columnIndex:C.indexOf(U),columnValue:U,columnValuesLength:C.length,rowField:v,rowIndex:A.indexOf($),rowValue:$,rowValuesLength:A.length})),W=z.map(U=>Array.isArray(s)?s:[s(U)].flat(1));return T.flatMap(U=>{const[$,K,ct,gt]=k[U],it=z[U],et=R[U];return W[U].map(xt=>{var Nt,Gt,{scale:Qt,key:Jt,facet:pe=!0,axis:Ge={},legend:le={}}=xt,ye=$tt(xt,["scale","key","facet","axis","legend"]);const mn=((Nt=Qt==null?void 0:Qt.y)===null||Nt===void 0?void 0:Nt.guide)||Ge.y,Zn=((Gt=Qt==null?void 0:Qt.x)===null||Gt===void 0?void 0:Gt.guide)||Ge.x,yi={x:{tickCount:p?5:void 0},y:{tickCount:v?5:void 0}},Kn=pe?et:et.length===0?[]:h,br={color:{domain:y}},ie={x:LC(Zn,n)(it,Kn),y:LC(mn,r)(it,Kn)};return Object.assign(Object.assign({key:`${Jt}-${U}`,data:Kn,margin:0,x:$+S+l+E,y:K+M+u+P,parentKey:d,width:ct,height:gt,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,frame:!!Kn.length,dataDomain:I,scale:at(yi,Qt,br),axis:at({},Ge,ie),legend:!1},ye),i)})})}}});function Vtt(t){const{points:e}=t;return Bg(e)}function hp(t,e){return e.length?at({title:!1,tick:null,label:null},t):at({title:!1,tick:null,label:null,grid:null},t)}function Xtt(t){return(e,n)=>{const{rowIndex:r,rowValuesLength:i,columnIndex:a,columnValuesLength:o}=e;if(r!==i-1)return hp(t,n);const s=a!==o-1?!1:void 0,c=n.length?void 0:null;return at({title:s,grid:c},t)}}function qtt(t){return(e,n)=>{const{rowIndex:r,columnIndex:i}=e;if(i!==0)return hp(t,n);const a=r!==0?!1:void 0,o=n.length?void 0:null;return at({title:a,grid:o},t)}}function LC(t,e){return typeof t=="function"?t:t===null||t===!1?()=>null:e(t)}const NC=()=>t=>[qu.of(t).call(Wm).call(Bm).call(zm).call(Utt).call(Gm).call(kC).call(CC).value()];NC.props={};var Ym=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const Ztt=Dc(t=>({scale:{x:{guide:null,paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}})),Ktt=Fc(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=Os(s),b=s.map(({points:w})=>Bg(w)),x=s.map(({x:w,y:S})=>[u.invert(w),f.invert(S)]),_=x.map(([w,S])=>({columnField:w,columnIndex:g.indexOf(w),columnValue:w,columnValuesLength:g.length,rowField:S,rowIndex:y.indexOf(S),rowValue:S,rowValuesLength:y.length})),O=_.map(w=>Array.isArray(n)?n:[n(w)].flat(1));return m.flatMap(w=>{const[S,M,E,P]=b[w],[C,A]=x[w],T=_[w];return O[w].map(N=>{var F,R;const{scale:I,key:z,encode:W,axis:U,interaction:$}=N,K=Ym(N,["scale","key","encode","axis","interaction"]),ct=(F=I==null?void 0:I.y)===null||F===void 0?void 0:F.guide,gt=(R=I==null?void 0:I.x)===null||R===void 0?void 0:R.guide,it={x:{facet:!1},y:{facet:!1}},et={x:Jtt(gt)(T,e),y:tet(ct)(T,e)},_t={x:{tickCount:5},y:{tickCount:5}};return Object.assign({data:e,parentKey:a,key:`${z}-${w}`,x:S+d+r+p,y:M+h+i+v,width:E,height:P,margin:0,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,frame:!0,scale:at(it,I),axis:at(_t,U,et),legend:!1,encode:at({},W,{x:C,y:A}),interaction:at({},$,{legendFilter:!1})},K)})})}}}),Qtt=Fc(t=>{const{encode:e}=t,n=Ym(t,["encode"]),{position:r=[],x:i=r,y:a=[...r].reverse()}=e,o=Ym(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 Jtt(t){return typeof t=="function"?t:t===null?()=>null:(e,n)=>{const{rowIndex:r,rowValuesLength:i}=e;if(r!==i-1)return hp(t,n)}}function tet(t){return typeof t=="function"?t:t===null?()=>null:(e,n)=>{const{columnIndex:r}=e;if(r!==0)return hp(t,n)}}const eet=()=>t=>[qu.of(t).call(Wm).call(Bm).call(Ktt).call(Qtt).call(zm).call(Gm).call(Ztt).value()];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 ret=Dc(t=>({scale:{x:{guide:{type:"axisArc"},paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}})),iet=Dc(t=>({coordinate:{type:"polar"}})),aet=t=>{const{encode:e}=t,n=net(t,["encode"]),{position:r}=e;return Object.assign(Object.assign({},n),{encode:{x:r}})};function jC(t){return e=>null}function oet(t){const{points:e}=t,[n,r,i,a]=e,o=Nn(n,a),s=Gn(n,a),c=Gn(r,i),l=nS(s,c),u=1/Math.sin(l/2),f=o/(1+u),d=f*Math.sqrt(2),[h,p]=i,g=Bc(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 set=()=>t=>[qu.of(t).call(Wm).call(aet).call(Bm).call(iet).call(kC).call(CC,oet,jC,jC,{frame:!1}).call(zm).call(Gm).call(ret).value()];function cet(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 uet(t,e,n){const r=[t];for(;r.length;){const i=r.pop();i.animate=at({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 RC=()=>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=>uet(l,n,a));return function*(){let l=0,u;for(;r==="infinite"||l<r;){const[f,d]=cet(i,l,o);for(let h=f;h<d;h+=1){const p=Math.abs(h);u!==p&&(yield c[p]),u=p}l++}}};RC.props={};function Do(t,e,n){const{encode:r}=n;if(t===null)return[e];const i=fet(t).map(o=>{var s;return[o,(s=Le(r,o))===null||s===void 0?void 0:s[0]]}).filter(([,o])=>fn(o)),a=o=>i.map(([,s])=>s[o]).join("-");return Array.from(Ln(e,a).values())}function IC(t){return Array.isArray(t)?pet(t):typeof t=="function"?het(t):t==="series"?det:t==="value"?vet:t==="sum"?get:t==="maxIndex"?yet:()=>null}function DC(t,e){for(const n of t)n.sort(e)}function FC(t,e){return(e==null?void 0:e.domain)||Array.from(new Set(t))}function fet(t){return Array.isArray(t)?t:[t]}function det(t,e,n){return Zu(r=>n[r])}function het(t){return(e,n,r)=>Zu(i=>t(e[i]))}function pet(t){return(e,n,r)=>(i,a)=>t.reduce((o,s)=>o!==0?o:Wn(e[i][s],e[a][s]),0)}function vet(t,e,n){return Zu(r=>e[r])}function get(t,e,n){const r=Os(t),i=Array.from(Ln(r,o=>n[+o]).entries()),a=new Map(i.map(([o,s])=>[o,s.reduce((c,l)=>c+ +e[l])]));return Zu(o=>a.get(n[o]))}function yet(t,e,n){const r=Os(t),i=Array.from(Ln(r,o=>n[+o]).entries()),a=new Map(i.map(([o,s])=>[o,Gc(s,c=>e[c])]));return Zu(o=>a.get(n[o]))}function Zu(t){return(e,n)=>Wn(t(e),t(n))}const BC=(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]=Le(u,"y"),[p,v]=Le(u,"y1"),[g]=o?Lu(u,"series","color"):Le(u,"color"),y=Do(e,s,c),b=IC(n)(l,d,g);b&&DC(y,b);const x=new Array(s.length),_=new Array(s.length),O=new Array(s.length),w=[],S=[];for(const A of y){r&&A.reverse();const T=p?+p[A[0]]:0,k=[],N=[];for(const $ of A){const K=O[$]=+d[$]-T;K<0?N.push($):K>=0&&k.push($)}const F=k.length>0?k:N,R=N.length>0?N:k;let I=k.length-1,z=0;for(;I>0&&d[F[I]]===0;)I--;for(;z<R.length-1&&d[R[z]]===0;)z++;w.push(F[I]),S.push(R[z]);let W=T;for(const $ of N.reverse()){const K=O[$];W=x[$]=(_[$]=W)+K}let U=T;for(const $ of k){const K=O[$];K>0?U=x[$]=(_[$]=U)+K:x[$]=_[$]=U}}const M=new Set(w),E=new Set(S),P=i==="y"?x:_,C=a==="y"?x:_;return[s,at({},c,{encode:{y0:Bh(d,h),y:yn(P,h),y1:yn(C,v)},style:Object.assign({first:(A,T)=>M.has(T),last:(A,T)=>E.has(T)},f)})]}};BC.props={};function zC(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 met(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 GC(t,e){const n=met(t,e);return n&&Math.sqrt(n)}function bet(t,e,n){const r=zC(t),i=GC(t);return r&&i?Math.ceil((n-e)*Math.cbrt(r)/(3.49*i)):1}var WC=Array.prototype,xet=WC.slice,Rgt=WC.map;function Hm(t){return()=>t}const _et=Math.sqrt(50),Oet=Math.sqrt(10),wet=Math.sqrt(2);function pp(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/Math.pow(10,i),o=a>=_et?10:a>=Oet?5:a>=wet?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?pp(t,e,n*2):[s,c,l]}function Met(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?pp(e,t,n):pp(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 Ku(t,e,n){return e=+e,t=+t,n=+n,pp(t,e,n)[2]}function Igt(t,e,n){e=+e,t=+t,n=+n;const r=e<t,i=r?Ku(e,t,n):Ku(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}function Eet(t,e,n){let r;for(;;){const i=Ku(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 Pet(t){return Math.max(1,Math.ceil(Math.log(zC(t))/Math.LN2)+1)}function Aet(){var t=eu,e=Ha,n=Pet;function r(i){Array.isArray(i)||(i=Array.from(i));var a,o=i.length,s,c,l=new Array(o);for(a=0;a<o;++a)l[a]=t(i[a],a,i);var u=e(l),f=u[0],d=u[1],h=n(l,f,d);if(!Array.isArray(h)){const b=d,x=+h;if(e===Ha&&([f,d]=Eet(f,d,x)),h=Met(f,d,x),h[0]<=f&&(c=Ku(f,d,x)),h[h.length-1]>=d)if(b>=d&&e===Ha){const _=Ku(f,d,x);isFinite(_)&&(_>0?d=(Math.floor(d/_)+1)*_:_<0&&(d=(Math.ceil(d*-_)+1)/-_))}else h.pop()}for(var p=h.length,v=0,g=p;h[v]<=f;)++v;for(;h[g-1]>d;)--g;(v||g<p)&&(h=h.slice(v,g),p=g-v);var y=new Array(p+1),m;for(a=0;a<=p;++a)m=y[a]=[],m.x0=a>0?h[a-1]:f,m.x1=a<p?h[a]:d;if(isFinite(c)){if(c>0)for(a=0;a<o;++a)(s=l[a])!=null&&f<=s&&s<=d&&y[Math.min(p,Math.floor((s-f)/c))].push(i[a]);else if(c<0){for(a=0;a<o;++a)if((s=l[a])!=null&&f<=s&&s<=d){const b=Math.floor((f-s)*c);y[Math.min(p,b+(h[b]<=s))].push(i[a])}}}else for(a=0;a<o;++a)(s=l[a])!=null&&f<=s&&s<=d&&y[v$(h,s,0,p)].push(i[a]);return y}return r.value=function(i){return arguments.length?(t=typeof i=="function"?i:Hm(i),r):t},r.domain=function(i){return arguments.length?(e=typeof i=="function"?i:Hm([i[0],i[1]]),r):e},r.thresholds=function(i){return arguments.length?(n=typeof i=="function"?i:Hm(Array.isArray(i)?xet.call(i):i),r):n},r}function $m(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?_u:_S(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));$m(t,e,h,p,i)}const a=t[e];let o=n,s=r;for(Qu(t,n,e),i(t[r],a)>0&&Qu(t,n,r);o<s;){for(Qu(t,o,s),++o,--s;i(t[o],a)<0;)++o;for(;i(t[s],a)>0;)--s}i(t[n],a)===0?Qu(t,n,s):(++s,Qu(t,s,r)),s<=e&&(n=s+1),e<=s&&(r=s-1)}return t}function Qu(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function Tet(t,e=Wn){let n,r=!1;if(e.length===1){let i;for(const a of t){const o=e(a);(r?Wn(o,i)>0:Wn(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 vp(t,e,n){if(t=Float64Array.from(f$(t,n)),!(!(r=t.length)||isNaN(e=+e))){if(e<=0||r<2)return Oi(t);if(e>=1)return Ke(t);var r,i=(r-1)*e,a=Math.floor(i),o=Ke($m(t,a).subarray(0,a+1)),s=Oi(t.subarray(a+1));return o+(s-o)*(i-a)}}function Dgt(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 ket(t,e,n=Xg){if(!isNaN(e=+e)){if(r=Float64Array.from(t,(s,c)=>Xg(n(t[c],c,t))),e<=0)return sp(r);if(e>=1)return Gc(r);var r,i=Uint32Array.from(t,(s,c)=>c),a=r.length-1,o=Math.floor(a*e);return $m(i,o,0,a,(s,c)=>_u(r[s],r[c])),o=Tet(i.subarray(0,o+1),s=>r[s]),o>=0?o:-1}}function Um(t,e){return vp(t,.5,e)}function Cet(t,e){return ket(t,.5,e)}var Let=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);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 Fo(t){return e=>e===null?t:`${t} of ${e}`}function Net(t){if(typeof t=="function")return[t,null];const n={mean:jet,max:Iet,count:Fet,first:zet,last:Get,sum:Bet,min:Det,median:Ret}[t];if(!n)throw new Error(`Unknown reducer: ${t}.`);return n()}function jet(){const t=(n,r)=>Vu(n,i=>+r[i]),e=Fo("mean");return[t,e]}function Ret(){const t=(n,r)=>Um(n,i=>+r[i]),e=Fo("median");return[t,e]}function Iet(){const t=(n,r)=>Ke(n,i=>+r[i]),e=Fo("max");return[t,e]}function Det(){const t=(n,r)=>Oi(n,i=>+r[i]),e=Fo("min");return[t,e]}function Fet(){const t=(n,r)=>n.length,e=Fo("count");return[t,e]}function Bet(){const t=(n,r)=>Di(n,i=>+r[i]),e=Fo("sum");return[t,e]}function zet(){const t=(n,r)=>r[n[0]],e=Fo("first");return[t,e]}function Get(){const t=(n,r)=>r[n[n.length-1]],e=Fo("last");return[t,e]}const Vm=(t={})=>{const{groupBy:e}=t,n=Let(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]=Le(o,v);return g},l=Object.entries(n).map(([h,p])=>{const[v,g]=Net(p),[y,m]=Le(o,h),b=c(m,p),x=s.map(_=>v(_,y!=null?y:a));return[h,Object.assign(Object.assign({},bZ(x,(g==null?void 0:g(b))||b)),{aggregate:!0})]}),u=Object.keys(o).map(h=>{const[p,v]=Le(o,h),g=s.map(y=>p[y[0]]);return[h,yn(g,v)]}),f=s.map(h=>a[h[0]]);return[Os(s),at({},i,{data:f,encode:Object.fromEntries([...u,...l])})]}};Vm.props={};var Wet=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);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 YC="thresholds";function Yet(t){const[e,n]=Ha(t);return Math.min(200,bet(t,e,n))}const Xm=(t={})=>{const{groupChannels:e=["color"],binChannels:n=["x","y"]}=t,r=Wet(t,["groupChannels","binChannels"]),i={},a=(o,s)=>{const{encode:c}=s,l=n.map(p=>{const[v]=Le(c,p);return v}),u=Pt(r,YC),f=o.filter(p=>l.every(v=>fn(v[p]))),d=[...e.map(p=>{const[v]=Le(c,p);return v}).filter(fn).map(p=>v=>p[v]),...n.map((p,v)=>{const g=l[v],y=u[p]||Yet(g),m=Aet().thresholds(y).value(x=>+g[x])(f),b=new Map(m.flatMap(x=>{const{x0:_,x1:O}=x,w=`${_},${O}`;return x.map(S=>[S,w])}));return i[p]=b,x=>b.get(x)})],h=p=>d.map(v=>v(p)).join("-");return Array.from(Ln(f,h).values())};return Vm(Object.assign(Object.assign(Object.assign({},Object.fromEntries(Object.entries(r).filter(([o])=>!o.startsWith(YC)))),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}))};Xm.props={};const HC=(t={})=>{const{thresholds:e}=t;return Xm(Object.assign(Object.assign({},t),{thresholdsX:e,groupChannels:["color"],binChannels:["x"]}))};HC.props={};var Het=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const $C=(t={})=>{const{groupBy:e="x",reverse:n=!1,orderBy:r,padding:i}=t,a=Het(t,["groupBy","reverse","orderBy","padding"]);return(o,s)=>{const{data:c,encode:l,scale:u}=s,{series:f}=u,[d]=Le(l,"y"),[h]=Lu(l,"series","color"),p=FC(h,f),v=Do(e,o,s),y=IC(r)(c,d,h);y&&DC(v,y);const m=new Array(o.length);for(const b of v){n&&b.reverse();for(let x=0;x<b.length;x++)m[b[x]]=p[x]}return[o,at({},s,{scale:{series:{domain:p,paddingInner:i}},encode:{series:yn(m)}})]}};$C.props={};function gp(t,e,n){if(t===null)return[-.5,.5];const r=FC(t,e),a=new No({domain:r,range:[0,1],padding:n}).getBandWidth();return[-a/2,a/2]}function yp(t,e,n){return e*(1-t)+n*t}const UC=(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]=Le(s,"x"),[d]=Le(s,"y"),h=gp(f,l,n),p=gp(d,u,r),v=a.map(()=>yp(i(),...p)),g=a.map(()=>yp(i(),...h));return[a,at({scale:{x:{padding:.5},y:{padding:.5}}},o,{encode:{dy:yn(v),dx:yn(g)}})]}};UC.props={};const VC=(t={})=>{const{padding:e=0,random:n=Math.random}=t;return(r,i)=>{const{encode:a,scale:o}=i,{x:s}=o,[c]=Le(a,"x"),l=gp(c,s,e),u=r.map(()=>yp(n(),...l));return[r,at({scale:{x:{padding:.5}}},i,{encode:{dx:yn(u)}})]}};VC.props={};const XC=(t={})=>{const{padding:e=0,random:n=Math.random}=t;return(r,i)=>{const{encode:a,scale:o}=i,{y:s}=o,[c]=Le(a,"y"),l=gp(c,s,e),u=r.map(()=>yp(n(),...l));return[r,at({scale:{y:{padding:.5}}},i,{encode:{dy:yn(u)}})]}};XC.props={};var $et=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);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 qC=(t={})=>{const{groupBy:e="x"}=t;return(n,r)=>{const{encode:i}=r,{x:a}=i,o=$et(i,["x"]),s=Object.entries(o).filter(([d])=>d.startsWith("y")).map(([d])=>[d,Le(i,d)[0]]),c=s.map(([d])=>[d,new Array(n.length)]),l=Do(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]=Ha(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,at({},r,{encode:Object.fromEntries(c.map(([d,h])=>[d,yn(h,Le(i,d)[1])]))})]}};qC.props={};const ZC=(t={})=>{const{groupBy:e="x",series:n=!0}=t;return(r,i)=>{const{encode:a}=i,[o]=Le(a,"y"),[s,c]=Le(a,"y1"),[l]=n?Lu(a,"series","color"):Le(a,"color"),u=Do(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,at({},i,{encode:{y1:yn(f,c)}})]}};ZC.props={};const KC=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,Le(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(Ln(m,x=>g[x]).values());y.push(...b)}f=y}if(r){const[g]=Le(c,r);g&&f.sort((y,m)=>n(y,g)-n(m,g)),i&&f.reverse()}const d=(a||3e3)/f.length,[h]=a?[Co(o,d)]:Lu(c,"enterDuration",Co(o,d)),[p]=Lu(c,"enterDelay",Co(o,0)),v=new Array(o.length);for(let g=0,y=0;g<f.length;g++){const m=f[g],b=Ke(m,x=>+h[x]);for(const x of m)v[x]=+p[x]+y;y+=b}return[o,at({},s,{encode:{enterDuration:zh(h),enterDelay:zh(v)}})]}};KC.props={};var Uet=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);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 Vet(t){return typeof t=="function"?t:{min:(n,r)=>Oi(n,i=>r[+i]),max:(n,r)=>Ke(n,i=>r[+i]),first:(n,r)=>r[n[0]],last:(n,r)=>r[n[n.length-1]],mean:(n,r)=>Vu(n,i=>r[+i]),median:(n,r)=>Um(n,i=>r[+i]),sum:(n,r)=>Di(n,i=>r[+i]),deviation:(n,r)=>GC(n,i=>r[+i])}[t]||Ke}const QC=(t={})=>{const{groupBy:e="x",basis:n="max"}=t;return(r,i)=>{const{encode:a,tooltip:o}=i,{x:s}=a,c=Uet(a,["x"]),l=Object.entries(c).filter(([v])=>v.startsWith("y")).map(([v])=>[v,Le(a,v)[0]]),[,u]=l.find(([v])=>v==="y"),f=l.map(([v])=>[v,new Array(r.length)]),d=Do(e,r,i),h=Vet(n);for(const v of d){const g=h(v,u);for(const y of v)for(let m=0;m<l.length;m++){const[,b]=l[m],[,x]=f[m];x[y]=+b[y]/g}}const p=za(o)||(o==null?void 0:o.items)&&(o==null?void 0:o.items.length)!==0;return[r,at({},i,Object.assign({encode:Object.fromEntries(f.map(([v,g])=>[v,yn(g,Le(a,v)[1])]))},!p&&a.y0&&{tooltip:{items:[{channel:"y0"}]}}))]}};QC.props={};function JC(t,e){return[t[0]]}function Xet(t,e){const n=t.length-1;return[t[n]]}function qet(t,e){const n=Gc(t,r=>e[r]);return[t[n]]}function Zet(t,e){const n=sp(t,r=>e[r]);return[t[n]]}function Ket(t){return typeof t=="function"?t:{first:JC,last:Xet,max:qet,min:Zet}[t]||JC}const mp=(t={})=>{const{groupBy:e="series",channel:n,selector:r}=t;return(i,a)=>{const{encode:o}=a,s=Do(e,i,a),[c]=Le(o,n),l=Ket(r);return[s.flatMap(u=>l(u,c)),a]}};mp.props={};var Qet=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);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 t3=(t={})=>{const{selector:e}=t,n=Qet(t,["selector"]);return mp(Object.assign({channel:"x",selector:e},n))};t3.props={};var Jet=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);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 e3=(t={})=>{const{selector:e}=t,n=Jet(t,["selector"]);return mp(Object.assign({channel:"y",selector:e},n))};e3.props={};var tnt=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);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 Ju=(t={})=>{const{channels:e=["x","y"]}=t,n=tnt(t,["channels"]),r=(i,a)=>Do(e,i,a);return Vm(Object.assign(Object.assign({},n),{groupBy:r}))};Ju.props={};const n3=(t={})=>Ju(Object.assign(Object.assign({},t),{channels:["x","color","series"]}));n3.props={};const r3=(t={})=>Ju(Object.assign(Object.assign({},t),{channels:["y","color","series"]}));r3.props={};const i3=(t={})=>Ju(Object.assign(Object.assign({},t),{channels:["color"]}));i3.props={};function ent(t,e,n){return(e.length!==2?Ua(eg(t,e,n),([r,i],[a,o])=>Wn(i,o)||Wn(r,a)):Ua(Ln(t,n),([r,i],[a,o])=>e(i,o)||Wn(r,a))).map(([r])=>r)}var a3=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);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 nnt(t,e,n){const{by:r=t,reducer:i="max"}=e,[a]=Le(n,r);if(typeof i=="function")return o=>i(o,a);if(i==="max")return o=>Ke(o,s=>+a[s]);if(i==="min")return o=>Oi(o,s=>+a[s]);if(i==="sum")return o=>Di(o,s=>+a[s]);if(i==="median")return o=>Um(o,s=>+a[s]);if(i==="mean")return o=>Vu(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 rnt(t,e,n){const{reverse:r,channel:i}=n,{encode:a}=e,[o]=Le(a,i),s=Ua(t,c=>o[c]);return r&&s.reverse(),[s,e]}function int(t,e,n){if(!Array.isArray(n))return t;const r=new Set(n);return t.filter(i=>r.has(e[i]))}function ant(t,e,n){var r;const{reverse:i,slice:a,channel:o}=n,s=a3(n,["reverse","slice","channel"]),{encode:c,scale:l={}}=e,u=(r=l[o])===null||r===void 0?void 0:r.domain,[f]=Le(c,o),d=nnt(o,s,c),h=int(t,f,u),p=ent(h,d,y=>f[y]);i&&p.reverse();const v=typeof a=="number"?[0,a]:a,g=a?p.slice(...v):p;return[t,at(e,{scale:{[o]:{domain:g}}})]}const bp=(t={})=>{const{reverse:e=!1,slice:n,channel:r,ordinal:i=!0}=t,a=a3(t,["reverse","slice","channel","ordinal"]);return(o,s)=>i?ant(o,s,Object.assign({reverse:e,slice:n,channel:r},a)):rnt(o,s,Object.assign({reverse:e,slice:n,channel:r},a))};bp.props={};const o3=(t={})=>bp(Object.assign(Object.assign({},t),{channel:"x"}));o3.props={};const s3=(t={})=>bp(Object.assign(Object.assign({},t),{channel:"y"}));s3.props={};const c3=(t={})=>bp(Object.assign(Object.assign({},t),{channel:"color"}));c3.props={};function ont(t,e){return typeof e=="string"?t.map(n=>n[e]):t.map(e)}function snt(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 l3=(t={})=>{const{field:e,channel:n="y",reducer:r="sum"}=t;return(i,a)=>{const{data:o,encode:s}=a,[c]=Le(s,"x"),l=e?ont(o,e):Le(s,n)[0],u=snt(r,l),f=ng(i,u,d=>c[d]).map(d=>d[1]);return[i,at({},a,{scale:{x:{flex:f}}})]}};l3.props={};function cnt(t){const{padding:e=0,direction:n="col"}=t;return(r,i,a)=>{const o=r.length;if(o===0)return[];const{innerWidth:s,innerHeight:c}=a,l=c/s;let u=Math.ceil(Math.sqrt(i/l)),f=s/u,d=Math.ceil(i/u),h=d*f;for(;h>c;)u=u+1,f=s/u,d=Math.ceil(i/u),h=d*f;const p=c-d*f,v=d<=1?0:p/(d-1),[g,y]=d<=1?[(s-o*f)/(o-1),(c-f)/2]:[0,0];return r.map((m,b)=>{const[x,_,O,w]=Bg(m),S=n==="col"?b%u:Math.floor(b/d),M=n==="col"?Math.floor(b/u):b%d,E=S*f,P=(d-M-1)*f+p,C=(f-e)/O,A=(f-e)/w,T=E-x+g*S+1/2*e,k=P-_-v*M-y+1/2*e;return`translate(${T}, ${k}) scale(${C}, ${A})`})}}const u3=t=>(e,n)=>[e,at({},n,{modifier:cnt(t),axis:!1})];u3.props={};function lnt(t,e,n,r){const i=t.length;if(r>=i||r===0)return t;const a=h=>e[t[h]]*1,o=h=>n[t[h]]*1,s=[],c=(i-2)/(r-2);let l=0,u,f,d;s.push(l);for(let h=0;h<r-2;h++){let p=0,v=0,g=Math.floor((h+1)*c)+1,y=Math.floor((h+2)*c)+1;y=Math.min(y,i);const m=y-g;for(;g<y;g++)p+=a(g),v+=o(g);p/=m,v/=m;let b=Math.floor((h+0)*c)+1;const x=Math.floor((h+1)*c)+1,_=[a(l),o(l)];for(u=f=-1;b<x;b++)f=Math.abs((_[0]-p)*(a(b)-_[1])-(_[0]-o(b))*(v-_[0]))*.5,f>u&&(u=f,d=b);s.push(d),l=d}return s.push(i-1),s.map(h=>t[h])}function unt(t){if(typeof t=="function")return t;if(t==="lttb")return lnt;const e={first:r=>[r[0]],last:r=>[r[r.length-1]],min:(r,i,a)=>[r[sp(r,o=>a[o])]],max:(r,i,a)=>[r[Gc(r,o=>a[o])]],median:(r,i,a)=>[r[Cet(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 fnt(r,s).flatMap(l=>n(l,i,a))}}function fnt(t,e){const n=t.length,r=[];let i=0;for(;i<n;)r.push(t.slice(i,i+=e));return r}const f3=(t={})=>{const{strategy:e="median",thresholds:n=2e3,groupBy:r=["series","color"]}=t,i=unt(e);return(a,o)=>{const{encode:s}=o,c=Do(r,a,o),[l]=Le(s,"x"),[u]=Le(s,"y");return[c.flatMap(f=>i(f,l,u,n)),o]}};f3.props={};function dnt(t){return typeof t=="object"?[t.value,t.ordinal]:[t,!0]}const d3=(t={})=>(e,n)=>{const{encode:r,data:i}=n,a=Object.entries(t).map(([u,f])=>{const[d]=Le(r,u);if(!d)return null;const[h,p=!0]=dnt(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(fn);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,at({},n,{encode:Object.fromEntries(l),data:s.map(u=>i[u])})]};d3.props={};var h3={},qm={},Zm=34,tf=10,Km=13;function p3(t){return new Function("d","return {"+t.map(function(e,n){return JSON.stringify(e)+": d["+n+'] || ""'}).join(",")+"}")}function hnt(t,e){var n=p3(t);return function(r,i){return e(n(r),i,t)}}function v3(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 vi(t,e){var n=t+"",r=n.length;return r<e?new Array(e-r+1).join(0)+n:n}function pnt(t){return t<0?"-"+vi(-t,6):t>9999?"+"+vi(t,6):vi(t,4)}function vnt(t){var e=t.getUTCHours(),n=t.getUTCMinutes(),r=t.getUTCSeconds(),i=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":pnt(t.getUTCFullYear(),4)+"-"+vi(t.getUTCMonth()+1,2)+"-"+vi(t.getUTCDate(),2)+(i?"T"+vi(e,2)+":"+vi(n,2)+":"+vi(r,2)+"."+vi(i,3)+"Z":r?"T"+vi(e,2)+":"+vi(n,2)+":"+vi(r,2)+"Z":n||e?"T"+vi(e,2)+":"+vi(n,2)+"Z":"")}function gnt(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?hnt(g,d):p3(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)===tf&&--p,f.charCodeAt(p-1)===Km&&--p;function x(){if(m)return qm;if(b)return b=!1,h3;var O,w=v,S;if(f.charCodeAt(w)===Zm){for(;v++<p&&f.charCodeAt(v)!==Zm||f.charCodeAt(++v)===Zm;);return(O=v)>=p?m=!0:(S=f.charCodeAt(v++))===tf?b=!0:S===Km&&(b=!0,f.charCodeAt(v)===tf&&++v),f.slice(w+1,O-1).replace(/""/g,'"')}for(;v<p;){if((S=f.charCodeAt(O=v++))===tf)b=!0;else if(S===Km)b=!0,f.charCodeAt(v)===tf&&++v;else if(S!==n)continue;return f.slice(w,O)}return m=!0,f.slice(w,p)}for(;(y=x())!==qm;){for(var _=[];y!==h3&&y!==qm;)_.push(y),y=x();d&&(_=d(_,g++))==null||h.push(_)}return h}function a(f,d){return f.map(function(h){return d.map(function(p){return u(h[p])}).join(t)})}function o(f,d){return d==null&&(d=v3(f)),[d.map(u).join(t)].concat(a(f,d)).join(`
|
|
`)}function s(f,d){return d==null&&(d=v3(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?vnt(f):e.test(f+="")?'"'+f.replace(/"/g,'""')+'"':f}return{parse:r,parseRows:i,format:o,formatBody:s,formatRows:c,formatRow:l,formatValue:u}}function ynt(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})?)?$/))mnt&&i[4]&&!i[7]&&(n=n.replace(/-/g,"/").replace(/T/," ")),n=new Date(n);else continue;t[e]=n}return t}const mnt=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours();var bnt=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 g3=t=>{const{value:e,format:n=e.split(".").pop(),delimiter:r=",",autoType:i=!0}=t;return()=>bnt(void 0,void 0,void 0,function*(){const a=yield fetch(e);if(n==="csv"){const o=yield a.text();return gnt(r).parse(o,i?ynt:_s)}else if(n==="json")return yield a.json();throw new Error(`Unknown format: ${n}.`)})};g3.props={};const y3=t=>{const{value:e}=t;return()=>e};y3.props={};function xnt(t,e){return t.map(n=>{if(Array.isArray(n)){const[r,i=e]=n;return[r,i]}return[n,e]})}const m3=t=>{const{fields:e=[]}=t,n=xnt(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)}};m3.props={};function Fgt(t){return t!=null&&!Number.isNaN(t)}const b3=t=>{const{callback:e}=t;return n=>Array.isArray(n)?[...n].sort(e):n};b3.props={};function _nt(t){return t!=null&&!Number.isNaN(t)}const x3=t=>{const{callback:e=_nt}=t;return n=>n.filter(e)};x3.props={};function Ont(t,e=[]){return e.reduce((n,r)=>(r in t&&(n[r]=t[r]),n),{})}const _3=t=>{const{fields:e}=t;return n=>n.map(r=>Ont(r,e))};_3.props={};function wnt(t){return Object.keys(t).length===0}const O3=t=>e=>{if(!t||wnt(t))return e;const n=r=>Object.entries(r).reduce((i,[a,o])=>(i[t[a]||a]=o,i),{});return e.map(n)};O3.props={};function Snt(t){return!t||Object.keys(t).length===0}const w3=t=>{const{fields:e,key:n="key",value:r="value"}=t;return i=>Snt(e)?i:i.flatMap(a=>e.map(o=>Object.assign(Object.assign({},a),{[n]:o,[r]:a[o]})))};w3.props={};const S3=t=>{const{start:e,end:n}=t;return r=>r.slice(e,n)};S3.props={};const M3=t=>{const{callback:e=_s}=t;return n=>e(n)};M3.props={};const E3=t=>{const{callback:e=_s}=t;return n=>Array.isArray(n)?n.map(e):n};E3.props={};function P3(t){return typeof t=="string"?e=>e[t]:t}const A3=t=>{const{join:e,on:n,select:r=[],as:i=r,unknown:a=NaN}=t,[o,s]=n,c=P3(s),l=P3(o),u=eg(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),{}))})};A3.props={};var Mnt=tt(53843),Ent=tt.n(Mnt);function Bgt(t){return t!=null&&!Number.isNaN(t)}const T3=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(Ln(u,d=>n.map(h=>d[h]).join("-")).values()).map(d=>{const h=Ent().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})})};T3.props={};const k3=()=>t=>(console.log("G2 data section:",t),t);k3.props={};var Pnt=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 Ant(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 Pnt(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})}}}const Qm=Math.PI/180,ef=64,xp=2048;function Tnt(t){return t.text}function knt(){return"serif"}function C3(){return"normal"}function Cnt(t){return t.value}function Lnt(){return~~(Math.random()*2)*90}function Nnt(){return 1}function jnt(){}function Rnt(t,e,n,r){if(e.sprite)return;const i=t.context,a=t.ratio;i.clearRect(0,0,(ef<<5)/a,xp/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*Qm),v=Math.cos(e.rotate*Qm),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>=ef<<5&&(o=0,s+=c,c=0),s+h>=xp)break;i.translate((o+(d>>1))/a,(s+(h>>1))/a),e.rotate&&i.rotate(e.rotate*Qm),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,(ef<<5)/a,xp/a).data,f=[];for(;--r>=0;){if(e=n[r],!e.hasText)continue;const d=e.width,h=d>>5;let p=e.y1-e.y0;for(let y=0;y<p*h;y++)f[y]=0;if(o=e.xoff,o==null)return;s=e.yoff;let v=0,g=-1;for(let y=0;y<p;y++){for(let m=0;m<d;m++){const b=h*y+(m>>5),x=u[(s+y)*(ef<<5)+(o+m)<<2]?1<<31-m%32:0;f[b]|=x,v|=x}v?g=y:(e.y0++,p--,y--,s++)}e.y1=e.y0+g,e.sprite=f.slice(0,(e.y1-e.y0)*h)}}function Int(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 Dnt(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 Fnt(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 L3(t){const e=t[0]/t[1];return function(n){return[e*(n*=.1)*Math.cos(n),n*Math.sin(n)]}}function Bnt(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 N3(t){const e=[];let n=-1;for(;++n<t;)e[n]=0;return e}function znt(){return document.createElement("canvas")}function Bo(t){return typeof t=="function"?t:function(){return t}}const Gnt={archimedean:L3,rectangular:Bnt};function Wnt(){let t=[256,256],e=Tnt,n=knt,r=Cnt,i=C3,a=Lnt,o=Nnt,s=L3,c=Math.random,l=jnt,u=[],f=null,d=1/0;const h=C3,p=znt,v={};v.start=function(){const[m,b]=t,x=g(p()),_=v.board?v.board:N3((t[0]>>5)*t[1]),O=u.length,w=[],S=u.map(function(C,A,T){return C.text=e.call(this,C,A,T),C.font=n.call(this,C,A,T),C.style=h.call(this,C,A,T),C.weight=i.call(this,C,A,T),C.rotate=a.call(this,C,A,T),C.size=~~r.call(this,C,A,T),C.padding=o.call(this,C,A,T),C}).sort(function(C,A){return A.size-C.size});let M=-1,E=v.board?[{x:0,y:0},{x:m,y:b}]:void 0;f&&clearInterval(f),f=setInterval(P,0),P();function P(){const C=Date.now();for(;Date.now()-C<d&&++M<O;){const A=S[M];A.x=m*(c()+.5)>>1,A.y=b*(c()+.5)>>1,Rnt(x,A,S,M),A.hasText&&y(_,A,E)&&(l.call(null,"word",{cloud:v,word:A}),w.push(A),E?v.hasImage||Dnt(E,A):E=[{x:A.x+A.x0,y:A.y+A.y0},{x:A.x+A.x1,y:A.y+A.y1}],A.x-=t[0]>>1,A.y-=t[1]>>1)}v._tags=w,v._bounds=E,M>=O&&(v.stop(),l.call(null,"end",{cloud:v,words:w,bounds:E}))}return v},v.stop=function(){return f&&(clearInterval(f),f=null),v};function g(m){m.width=m.height=1;const b=Math.sqrt(m.getContext("2d").getImageData(0,0,1,1).data.length>>2);m.width=(ef<<5)/b,m.height=xp/b;const x=m.getContext("2d");return x.fillStyle=x.strokeStyle="red",x.textAlign="center",x.textBaseline="middle",{context:x,ratio:b}}function y(m,b,x){const _=b.x,O=b.y,w=Math.sqrt(t[0]*t[0]+t[1]*t[1]),S=s(t),M=c()<.5?1:-1;let E,P=-M,C,A;for(;(E=S(P+=M))&&(C=~~E[0],A=~~E[1],!(Math.min(Math.abs(C),Math.abs(A))>=w));)if(b.x=_+C,b.y=O+A,!(b.x+b.x0<0||b.y+b.y0<0||b.x+b.x1>t[0]||b.y+b.y1>t[1])&&(!x||!Int(b,m,t[0]))&&(!x||Fnt(b,x))){const T=b.sprite,k=b.width>>5,N=t[0]>>5,F=b.x-(k<<4),R=F&127,I=32-R,z=b.y1-b.y0;let W,U=(b.y+b.y0)*N+(F>>5);for(let $=0;$<z;$++){W=0;for(let K=0;K<=k;K++)m[U+K]|=W<<I|(K<k?(W=T[$*k+K])>>>R:0);U+=N}return delete b.sprite,!0}return!1}return v.createMask=m=>{const b=document.createElement("canvas"),[x,_]=t;if(!x||!_)return;const O=x>>5,w=N3((x>>5)*_);b.width=x,b.height=_;const S=b.getContext("2d");S.drawImage(m,0,0,m.width,m.height,0,0,x,_);const M=S.getImageData(0,0,x,_).data;for(let E=0;E<_;E++)for(let P=0;P<x;P++){const C=O*E+(P>>5),A=E*x+P<<2,k=M[A]>=250&&M[A+1]>=250&&M[A+2]>=250?1<<31-P%32:0;w[C]|=k}v.board=w,v.hasImage=!0},v.timeInterval=function(m){d=m==null?1/0:m},v.words=function(m){u=m},v.size=function(m=[]){t=[+m[0],+m[1]]},v.text=function(m){e=Bo(m)},v.font=function(m){n=Bo(m)},v.fontWeight=function(m){i=Bo(m)},v.rotate=function(m){a=Bo(m)},v.spiral=function(m){s=Gnt[m]||m},v.fontSize=function(m){r=Bo(m)},v.padding=function(m){o=Bo(m)},v.random=function(m){c=Bo(m)},v.on=function(m){l=Bo(m)},v}var Ynt=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())})},Hnt=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const $nt={fontSize:[20,60],font:"Impact",padding:2,rotate:function(){return(~~(Math.random()*6)-3)*30}};function Unt(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 Vnt(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 j3=t=>e=>Ynt(void 0,void 0,void 0,function*(){const n=Object.assign({},$nt,t),r=Wnt();yield Ant(r,n).set("fontSize",y=>{const m=e.map(b=>b.value);return Vnt(y,[Oi(m),Ke(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",Unt,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,font:x}=y,_=Hnt(y,["x","y","font"]);return Object.assign(Object.assign({},_),{x:m+a/2,y:b+o/2,fontFamily:x})}),[{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});j3.props={};function Jm(t){const{min:e,max:n}=t;return[[e[0],e[1]],[n[0],n[1]]]}function R3(t,e){const[n,r]=t,[i,a]=e;return n>=i[0]&&n<=a[0]&&r>=i[1]&&r<=a[1]}function Xnt(t,e){const[n,r]=t;return!(R3(n,e)&&R3(r,e))}function qnt(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 Znt=t=>{const{priority:e}=t;return n=>{const r=[];return e&&n.sort(e),n.forEach(i=>{Oh(i);const a=i.getLocalBounds();r.some(s=>qnt(Jm(a),Jm(s.getLocalBounds())))?Kg(i):r.push(i)}),n}};function Knt([t,e],[n,r]){return r>t&&e>n}function _p(){const t=new Map;return[r=>t.get(r),(r,i)=>t.set(r,i)]}function Qnt(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 Jnt=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]=_p(),[c,l]=_p(),[u,f]=_p(),[d,h]=_p();for(const p of i){const{min:v,max:g}=Qnt(p),[y,m]=v,[b,x]=g;s(p,m),l(p,m),f(p,x-m),h(p,[y,b])}for(let p=0;p<e;p++){i.sort((g,y)=>Wn(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])&&!Knt(d(y),d(b));)m+=1;if(b){const x=c(y),_=u(y),O=c(b),w=O-(x+_);if(w<r){const S=(r-w)/2;v=Math.max(v,S),l(y,x-S),l(b,O+S)}}}if(v<n)break}for(const p of i)p.style.y+=c(p)-o(p);return i}},trt=()=>t=>(t.forEach(e=>{Oh(e);const n=e.attr("bounds"),r=e.getLocalBounds();Xnt(Jm(r),n)&&Kg(e)}),t);function ert(t){return typeof t=="object"?t:Ia(t)}function t1(t){let e=t/255;return e=e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4),e}function I3(t,e,n){return .2126*t1(t)+.7152*t1(e)+.0722*t1(n)}function D3(t,e){const{r:n,g:r,b:i}=t,{r:a,g:o,b:s}=e,c=I3(n,r,i),l=I3(a,o,s);return(Math.max(c,l)+.05)/(Math.min(c,l)+.05)}function nrt(t,e){const n=Gc(e,r=>D3(t,ert(r)));return e[n]}const rrt=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;D3(o,a)<e&&i.attr("fill",nrt(a,n))}),r)},irt=(t,e)=>{const[[n,r],[i,a]]=e,[[o,s],[c,l]]=t;let u=0,f=0;return o<n?u=n-o:c>i&&(u=i-c),s<r?f=r-s:l>a&&(f=a-l),[u,f]},art=()=>(t,{canvas:e})=>{const{width:n,height:r}=e.getConfig();return t.forEach(i=>{Oh(i);const{max:a,min:o}=i.getRenderBounds(),[s,c]=a,[l,u]=o,f=irt([[l,u],[s,c]],[[0,0],[n,r]]);i.style.x+=f[0],i.style.y+=f[1]}),t};function ort(){return{"data.fetch":g3,"data.inline":y3,"data.sortBy":m3,"data.sort":b3,"data.filter":x3,"data.pick":_3,"data.rename":O3,"data.fold":w3,"data.slice":S3,"data.custom":M3,"data.map":E3,"data.join":A3,"data.kde":T3,"data.log":k3,"data.wordCloud":j3,"transform.stackY":BC,"transform.binX":HC,"transform.bin":Xm,"transform.dodgeX":$C,"transform.jitter":UC,"transform.jitterX":VC,"transform.jitterY":XC,"transform.symmetryY":qC,"transform.diffY":ZC,"transform.stackEnter":KC,"transform.normalizeY":QC,"transform.select":mp,"transform.selectX":t3,"transform.selectY":e3,"transform.groupX":n3,"transform.groupY":r3,"transform.groupColor":i3,"transform.group":Ju,"transform.sortX":o3,"transform.sortY":s3,"transform.sortColor":c3,"transform.flexX":l3,"transform.pack":u3,"transform.sample":f3,"transform.filter":d3,"coordinate.cartesian":vE,"coordinate.polar":nu,"coordinate.transpose":Ey,"coordinate.theta":gE,"coordinate.parallel":Py,"coordinate.fisheye":yE,"coordinate.radial":ug,"coordinate.radar":mE,"encode.constant":bE,"encode.field":xE,"encode.transform":_E,"encode.column":OE,"mark.interval":kE,"mark.rect":LE,"mark.line":iP,"mark.point":XP,"mark.text":tA,"mark.cell":nA,"mark.area":uA,"mark.link":Qy,"mark.image":SA,"mark.polygon":TA,"mark.box":NA,"mark.vector":RA,"mark.lineX":BA,"mark.lineY":WA,"mark.connector":UA,"mark.range":qA,"mark.rangeX":QA,"mark.rangeY":eT,"mark.path":oT,"mark.shape":lT,"mark.density":dT,"mark.heatmap":gT,"mark.wordCloud":nm,"palette.category10":yT,"palette.category20":mT,"scale.linear":bT,"scale.ordinal":wT,"scale.band":ET,"scale.identity":PT,"scale.point":AT,"scale.time":ZT,"scale.log":QT,"scale.pow":JT,"scale.sqrt":tk,"scale.threshold":ek,"scale.quantile":nk,"scale.quantize":rk,"scale.sequential":ik,"scale.constant":ak,"theme.classic":ok,"theme.classicDark":ck,"theme.academy":lk,"theme.light":dm,"theme.dark":sk,"component.axisX":uk,"component.axisY":fk,"component.legendCategory":pm,"component.legendContinuous":So,"component.legends":hk,"component.title":vk,"component.sliderX":bk,"component.sliderY":xk,"component.scrollbarX":_k,"component.scrollbarY":Ok,"animation.scaleInX":mm,"animation.scaleOutX":ZQ,"animation.scaleInY":wk,"animation.scaleOutY":KQ,"animation.waveIn":Sk,"animation.fadeIn":Mk,"animation.fadeOut":Ek,"animation.zoomIn":QQ,"animation.zoomOut":JQ,"animation.pathIn":Pk,"animation.morphing":Ck,"animation.growInX":Lk,"animation.growInY":Nk,"interaction.elementHighlight":ap,"interaction.elementHighlightByX":jk,"interaction.elementHighlightByColor":Rk,"interaction.elementSelect":op,"interaction.elementSelectByX":Ik,"interaction.elementSelectByColor":Dk,"interaction.fisheye":vJ,"interaction.chartIndex":Fk,"interaction.tooltip":Kk,"interaction.legendFilter":WJ,"interaction.legendHighlight":YJ,"interaction.brushHighlight":Am,"interaction.brushXHighlight":qJ,"interaction.brushYHighlight":ZJ,"interaction.brushAxisHighlight":att,"interaction.brushFilter":Lm,"interaction.brushXFilter":ltt,"interaction.brushYFilter":utt,"interaction.sliderFilter":uC,"interaction.scrollbarFilter":vtt,"interaction.poptip":hC,"interaction.treemapDrillDown":Itt,"interaction.elementPointMove":Wtt,"composition.spaceLayer":AC,"composition.spaceFlex":TC,"composition.facetRect":NC,"composition.repeatMatrix":eet,"composition.facetCircle":set,"composition.timingKeyframe":RC,"labelTransform.overlapHide":Znt,"labelTransform.overlapDodgeY":Jnt,"labelTransform.overflowHide":trt,"labelTransform.contrastReverse":rrt,"labelTransform.exceedAdjust":art}}var nf=t=>t;function Op(t,e){t&&B3.hasOwnProperty(t.type)&&B3[t.type](t,e)}var F3={Feature:function(t,e){Op(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)Op(n[r].geometry,e)}},B3={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){e1(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)e1(n[r],e,0)},Polygon:function(t,e){z3(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)z3(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)Op(n[r],e)}};function e1(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 z3(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)e1(t[n],e,1);e.polygonEnd()}function ol(t,e){t&&F3.hasOwnProperty(t.type)?F3[t.type](t,e):Op(t,e)}class Za{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 zgt(t,e){const n=new Za;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 Ggt(t,e){const n=new Za;let r=-1;return Float64Array.from(t,e===void 0?i=>n.add(+i||0):i=>n.add(+e(i,++r,t)||0))}var oe=1e-6,G3=1e-12,Te=Math.PI,qn=Te/2,W3=Te/4,Si=Te*2,Yr=180/Te,Yn=Te/180,$e=Math.abs,sl=Math.atan,Ka=Math.atan2,Me=Math.cos,wp=Math.ceil,Y3=Math.exp,Wgt=Math.floor,Ygt=Math.hypot,Sp=Math.log,n1=Math.pow,ge=Math.sin,$i=Math.sign||function(t){return t>0?1:t<0?-1:0},gi=Math.sqrt,r1=Math.tan;function H3(t){return t>1?0:t<-1?Te:Math.acos(t)}function Ui(t){return t>1?qn:t<-1?-qn:Math.asin(t)}function Hgt(t){return(t=ge(t/2))*t}function Vi(){}var i1=new Za,a1=new Za,$3,U3,o1,s1,zo={point:Vi,lineStart:Vi,lineEnd:Vi,polygonStart:function(){zo.lineStart=srt,zo.lineEnd=lrt},polygonEnd:function(){zo.lineStart=zo.lineEnd=zo.point=Vi,i1.add($e(a1)),a1=new Za},result:function(){var t=i1/2;return i1=new Za,t}};function srt(){zo.point=crt}function crt(t,e){zo.point=V3,$3=o1=t,U3=s1=e}function V3(t,e){a1.add(s1*t-o1*e),o1=t,s1=e}function lrt(){V3($3,U3)}var X3=zo,cl=1/0,Mp=cl,rf=-cl,Ep=rf,urt={point:frt,lineStart:Vi,lineEnd:Vi,polygonStart:Vi,polygonEnd:Vi,result:function(){var t=[[cl,Mp],[rf,Ep]];return rf=Ep=-(Mp=cl=1/0),t}};function frt(t,e){t<cl&&(cl=t),t>rf&&(rf=t),e<Mp&&(Mp=e),e>Ep&&(Ep=e)}var Pp=urt,c1=0,l1=0,af=0,Ap=0,Tp=0,ll=0,u1=0,f1=0,of=0,q3,Z3,Ta,ka,ia={point:Ys,lineStart:K3,lineEnd:Q3,polygonStart:function(){ia.lineStart=prt,ia.lineEnd=vrt},polygonEnd:function(){ia.point=Ys,ia.lineStart=K3,ia.lineEnd=Q3},result:function(){var t=of?[u1/of,f1/of]:ll?[Ap/ll,Tp/ll]:af?[c1/af,l1/af]:[NaN,NaN];return c1=l1=af=Ap=Tp=ll=u1=f1=of=0,t}};function Ys(t,e){c1+=t,l1+=e,++af}function K3(){ia.point=drt}function drt(t,e){ia.point=hrt,Ys(Ta=t,ka=e)}function hrt(t,e){var n=t-Ta,r=e-ka,i=gi(n*n+r*r);Ap+=i*(Ta+t)/2,Tp+=i*(ka+e)/2,ll+=i,Ys(Ta=t,ka=e)}function Q3(){ia.point=Ys}function prt(){ia.point=grt}function vrt(){J3(q3,Z3)}function grt(t,e){ia.point=J3,Ys(q3=Ta=t,Z3=ka=e)}function J3(t,e){var n=t-Ta,r=e-ka,i=gi(n*n+r*r);Ap+=i*(Ta+t)/2,Tp+=i*(ka+e)/2,ll+=i,i=ka*t-Ta*e,u1+=i*(Ta+t),f1+=i*(ka+e),of+=i*3,Ys(Ta=t,ka=e)}var t5=ia;function e5(t){this._context=t}e5.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,Si);break}}},result:Vi};var d1=new Za,h1,n5,r5,sf,cf,kp={point:Vi,lineStart:function(){kp.point=yrt},lineEnd:function(){h1&&i5(n5,r5),kp.point=Vi},polygonStart:function(){h1=!0},polygonEnd:function(){h1=null},result:function(){var t=+d1;return d1=new Za,t}};function yrt(t,e){kp.point=i5,n5=sf=t,r5=cf=e}function i5(t,e){sf-=t,cf-=e,d1.add(gi(sf*sf+cf*cf)),sf=t,cf=e}var a5=kp;let o5,Cp,s5,c5;class l5{constructor(e){this._append=e==null?u5:mrt(e),this._radius=4.5,this._=""}pointRadius(e){return this._radius=+e,this}polygonStart(){this._line=0}polygonEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){this._line===0&&(this._+="Z"),this._point=NaN}point(e,n){switch(this._point){case 0:{this._append`M${e},${n}`,this._point=1;break}case 1:{this._append`L${e},${n}`;break}default:{if(this._append`M${e},${n}`,this._radius!==s5||this._append!==Cp){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`,s5=r,Cp=this._append,c5=this._,this._=i}this._+=c5;break}}}result(){const e=this._;return this._="",e.length?e:null}}function u5(t){let e=1;this._+=t[0];for(const n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function mrt(t){const e=Math.floor(t);if(!(e>=0))throw new RangeError(`invalid digits: ${t}`);if(e>15)return u5;if(e!==o5){const n=ir(10,e);o5=e,Cp=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 Cp}function f5(t,e){let n=3,r=4.5,i,a;function o(s){return s&&(typeof r=="function"&&a.pointRadius(+r.apply(this,arguments)),ol(s,i(a))),a.result()}return o.area=function(s){return ol(s,i(X3)),X3.result()},o.measure=function(s){return ol(s,i(a5)),a5.result()},o.bounds=function(s){return ol(s,i(Pp)),Pp.result()},o.centroid=function(s){return ol(s,i(t5)),t5.result()},o.projection=function(s){return arguments.length?(i=s==null?(t=null,nf):(t=s).stream,o):t},o.context=function(s){return arguments.length?(a=s==null?(e=null,new l5(n)):new e5(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 l5(n)),o},o.projection(t).digits(n).context(e)}function ul(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 d5(t,e,n){var r=ul(t,e-oe,n).concat(e);return function(i){return r.map(function(a){return[i,a]})}}function h5(t,e,n){var r=ul(t,e-oe,n).concat(e);return function(i){return r.map(function(a){return[a,i]})}}function brt(){var t,e,n,r,i,a,o,s,c=10,l=c,u=90,f=360,d,h,p,v,g=2.5;function y(){return{type:"MultiLineString",coordinates:m()}}function m(){return ul(wp(r/u)*u,n,u).map(p).concat(ul(wp(s/f)*f,o,f).map(v)).concat(ul(wp(e/c)*c,t,c).filter(function(b){return $e(b%u)>oe}).map(d)).concat(ul(wp(a/l)*l,i,l).filter(function(b){return $e(b%f)>oe}).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=d5(a,i,90),h=h5(e,t,g),p=d5(s,o,90),v=h5(r,n,g),y):g},y.extentMajor([[-180,-90+oe],[180,90-oe]]).extentMinor([[-180,-80-oe],[180,80+oe]])}function xrt(){return brt()()}function p5(){var t=[],e;return{point:function(n,r,i){e.push([n,r,i])},lineStart:function(){t.push(e=[])},lineEnd:Vi,rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))},result:function(){var n=t;return t=[],e=null,n}}}function Lp(t,e){return $e(t[0]-e[0])<oe&&$e(t[1]-e[1])<oe}function Np(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 v5(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(Lp(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*oe}a.push(m=new Np(g,p,null,!0)),o.push(m.o=new Np(g,null,m,!1)),a.push(m=new Np(y,p,null,!1)),o.push(m.o=new Np(y,null,m,!0))}}),!!a.length){for(o.sort(e),g5(a),g5(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 g5(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 p1(t){return[Ka(t[1],t[0]),Ui(t[2])]}function fl(t){var e=t[0],n=t[1],r=Me(n);return[r*Me(e),r*ge(e),ge(n)]}function jp(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function Rp(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 v1(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function Ip(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function g1(t){var e=gi(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function y1(t){return $e(t[0])<=Te?t[0]:$i(t[0])*(($e(t[0])+Te)%Si-Te)}function _rt(t,e){var n=y1(e),r=e[1],i=ge(r),a=[ge(n),-Me(n),0],o=0,s=0,c=new Za;i===1?r=qn+oe:i===-1&&(r=-qn-oe);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=y1(h),v=h[1]/2+W3,g=ge(v),y=Me(v),m=0;m<d;++m,p=x,g=O,y=w,h=b){var b=f[m],x=y1(b),_=b[1]/2+W3,O=ge(_),w=Me(_),S=x-p,M=S>=0?1:-1,E=M*S,P=E>Te,C=g*O;if(c.add(Ka(C*M*ge(E),y*w+C*Me(E))),o+=P?S+M*Si:S,P^p>=n^x>=n){var A=Rp(fl(h),fl(b));g1(A);var T=Rp(a,A);g1(T);var k=(P^S>=0?-1:1)*Ui(T[2]);(r>k||r===k&&(A[0]||A[1]))&&(s+=P^S>=0?1:-1)}}return(o<-oe||o<oe&&c<-G3)^s&1}function*Ort(t){for(const e of t)yield*e}function y5(t){return Array.from(Ort(t))}function m5(t,e,n,r){return function(i){var a=e(i),o=p5(),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=y5(u);var x=_rt(l,r);u.length?(c||(i.polygonStart(),c=!0),v5(u,Srt,x,n,i)):x&&(c||(i.polygonStart(),c=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),c&&(i.polygonEnd(),c=!1),u=l=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function h(x,_){t(x,_)&&i.point(x,_)}function p(x,_){a.point(x,_)}function v(){d.point=p,a.lineStart()}function g(){d.point=h,a.lineEnd()}function y(x,_){f.push([x,_]),s.point(x,_)}function m(){s.lineStart(),f=[]}function b(){y(f[0][0],f[0][1]),s.lineEnd();var x=s.clean(),_=o.result(),O,w=_.length,S,M,E;if(f.pop(),l.push(f),f=null,!!w){if(x&1){if(M=_[0],(S=M.length-1)>0){for(c||(i.polygonStart(),c=!0),i.lineStart(),O=0;O<S;++O)i.point((E=M[O])[0],E[1]);i.lineEnd()}return}w>1&&x&2&&_.push(_.pop().concat(_.shift())),u.push(_.filter(wrt))}}return d}}function wrt(t){return t.length>1}function Srt(t,e){return((t=t.x)[0]<0?t[1]-qn-oe:qn-t[1])-((e=e.x)[0]<0?e[1]-qn-oe:qn-e[1])}var b5=m5(function(){return!0},Mrt,Prt,[-Te,-qn]);function Mrt(t){var e=NaN,n=NaN,r=NaN,i;return{lineStart:function(){t.lineStart(),i=1},point:function(a,o){var s=a>0?Te:-Te,c=$e(a-e);$e(c-Te)<oe?(t.point(e,n=(n+o)/2>0?qn:-qn),t.point(r,n),t.lineEnd(),t.lineStart(),t.point(s,n),t.point(a,n),i=0):r!==s&&c>=Te&&($e(e-r)<oe&&(e-=r*oe),$e(a-s)<oe&&(a-=s*oe),n=Ert(e,n,a,o),t.point(r,n),t.lineEnd(),t.lineStart(),t.point(s,n),i=0),t.point(e=a,n=o),r=s},lineEnd:function(){t.lineEnd(),e=n=NaN},clean:function(){return 2-i}}}function Ert(t,e,n,r){var i,a,o=ge(t-n);return $e(o)>oe?sl((ge(e)*(a=Me(r))*ge(n)-ge(r)*(i=Me(e))*ge(t))/(i*a*o)):(e+r)/2}function Prt(t,e,n,r){var i;if(t==null)i=n*qn,r.point(-Te,i),r.point(0,i),r.point(Te,i),r.point(Te,0),r.point(Te,-i),r.point(0,-i),r.point(-Te,-i),r.point(-Te,0),r.point(-Te,i);else if($e(t[0]-e[0])>oe){var a=t[0]<e[0]?Te:-Te;i=n*a/2,r.point(-a,i),r.point(0,i),r.point(a,i)}else r.point(e[0],e[1])}function x5(t,e,n,r,i,a){if(n){var o=Me(e),s=ge(e),c=r*n;i==null?(i=e+r*Si,a=e-c/2):(i=_5(o,i),a=_5(o,a),(r>0?i<a:i>a)&&(i+=r*Si));for(var l,u=i;r>0?u>a:u<a;u-=c)l=p1([o,-s*Me(u),-s*ge(u)]),t.point(l[0],l[1])}}function _5(t,e){e=fl(e),e[0]-=t,g1(e);var n=H3(-e[1]);return((-e[2]<0?-n:n)+Si-oe)%Si}function $gt(){var t=constant([0,0]),e=constant(90),n=constant(2),r,i,a={point:o};function o(c,l){r.push(c=i(c,l)),c[0]*=degrees,c[1]*=degrees}function s(){var c=t.apply(this,arguments),l=e.apply(this,arguments)*radians,u=n.apply(this,arguments)*radians;return r=[],i=rotateRadians(-c[0]*radians,-c[1]*radians,0).invert,x5(a,l,u,1),c={type:"Polygon",coordinates:[r]},r=i=null,c}return s.center=function(c){return arguments.length?(t=typeof c=="function"?c:constant([+c[0],+c[1]]),s):t},s.radius=function(c){return arguments.length?(e=typeof c=="function"?c:constant(+c),s):e},s.precision=function(c){return arguments.length?(n=typeof c=="function"?c:constant(+c),s):n},s}function Art(t){var e=Me(t),n=2*Yn,r=e>0,i=$e(e)>oe;function a(u,f,d,h){x5(h,t,n,d,u,f)}function o(u,f){return Me(u)*Me(f)>e}function s(u){var f,d,h,p,v;return{lineStart:function(){p=h=!1,v=1},point:function(g,y){var m=[g,y],b,x=o(g,y),_=r?x?0:l(g,y):x?l(g+(g<0?Te:-Te),y):0;if(!f&&(p=h=x)&&u.lineStart(),x!==h&&(b=c(f,m),(!b||Lp(f,b)||Lp(m,b))&&(m[2]=1)),x!==h)v=0,x?(u.lineStart(),b=c(m,f),u.point(b[0],b[1])):(b=c(f,m),u.point(b[0],b[1],2),u.lineEnd()),f=b;else if(i&&f&&r^x){var O;!(_&d)&&(O=c(m,f,!0))&&(v=0,r?(u.lineStart(),u.point(O[0][0],O[0][1]),u.point(O[1][0],O[1][1]),u.lineEnd()):(u.point(O[1][0],O[1][1]),u.lineEnd(),u.lineStart(),u.point(O[0][0],O[0][1],3)))}x&&(!f||!Lp(f,m))&&u.point(m[0],m[1]),f=m,h=x,d=_},lineEnd:function(){h&&u.lineEnd(),f=null},clean:function(){return v|(p&&h)<<1}}}function c(u,f,d){var h=fl(u),p=fl(f),v=[1,0,0],g=Rp(h,p),y=jp(g,g),m=g[0],b=y-m*m;if(!b)return!d&&u;var x=e*y/b,_=-e*m/b,O=Rp(v,g),w=Ip(v,x),S=Ip(g,_);v1(w,S);var M=O,E=jp(w,M),P=jp(M,M),C=E*E-P*(jp(w,w)-1);if(!(C<0)){var A=gi(C),T=Ip(M,(-E-A)/P);if(v1(T,w),T=p1(T),!d)return T;var k=u[0],N=f[0],F=u[1],R=f[1],I;N<k&&(I=k,k=N,N=I);var z=N-k,W=$e(z-Te)<oe,U=W||z<oe;if(!W&&R<F&&(I=F,F=R,R=I),U?W?F+R>0^T[1]<($e(T[0]-k)<oe?F:R):F<=T[1]&&T[1]<=R:z>Te^(k<=T[0]&&T[0]<=N)){var $=Ip(M,(-E+A)/P);return v1($,w),[T,p1($)]}}}function l(u,f){var d=r?t:Te-t,h=0;return u<-d?h|=1:u>d&&(h|=2),f<-d?h|=4:f>d&&(h|=8),h}return m5(o,s,a,r?[0,-t]:[-Te,t-Te])}function Trt(t,e,n,r,i,a){var o=t[0],s=t[1],c=e[0],l=e[1],u=0,f=1,d=c-o,h=l-s,p;if(p=n-o,!(!d&&p>0)){if(p/=d,d<0){if(p<u)return;p<f&&(f=p)}else if(d>0){if(p>f)return;p>u&&(u=p)}if(p=i-o,!(!d&&p<0)){if(p/=d,d<0){if(p>f)return;p>u&&(u=p)}else if(d>0){if(p<u)return;p<f&&(f=p)}if(p=r-s,!(!h&&p>0)){if(p/=h,h<0){if(p<u)return;p<f&&(f=p)}else if(h>0){if(p>f)return;p>u&&(u=p)}if(p=a-s,!(!h&&p<0)){if(p/=h,h<0){if(p>f)return;p>u&&(u=p)}else if(h>0){if(p<u)return;p<f&&(f=p)}return u>0&&(t[0]=o+u*d,t[1]=s+u*h),f<1&&(e[0]=o+f*d,e[1]=s+f*h),!0}}}}}var lf=1e9,Dp=-lf;function O5(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 $e(l[0]-t)<oe?u>0?0:3:$e(l[0]-n)<oe?u>0?2:1:$e(l[1]-e)<oe?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=p5(),d,h,p,v,g,y,m,b,x,_,O,w={point:S,lineStart:C,lineEnd:A,polygonStart:E,polygonEnd:P};function S(k,N){i(k,N)&&u.point(k,N)}function M(){for(var k=0,N=0,F=h.length;N<F;++N)for(var R=h[N],I=1,z=R.length,W=R[0],U,$,K=W[0],ct=W[1];I<z;++I)U=K,$=ct,W=R[I],K=W[0],ct=W[1],$<=r?ct>r&&(K-U)*(r-$)>(ct-$)*(t-U)&&++k:ct<=r&&(K-U)*(r-$)<(ct-$)*(t-U)&&--k;return k}function E(){u=f,d=[],h=[],O=!0}function P(){var k=M(),N=O&&k,F=(d=y5(d)).length;(N||F)&&(l.polygonStart(),N&&(l.lineStart(),a(null,null,1,l),l.lineEnd()),F&&v5(d,s,k,a,l),l.polygonEnd()),u=l,d=h=p=null}function C(){w.point=T,h&&h.push(p=[]),_=!0,x=!1,m=b=NaN}function A(){d&&(T(v,g),y&&x&&f.rejoin(),d.push(f.result())),w.point=S,x&&u.lineEnd()}function T(k,N){var F=i(k,N);if(h&&p.push([k,N]),_)v=k,g=N,y=F,_=!1,F&&(u.lineStart(),u.point(k,N));else if(F&&x)u.point(k,N);else{var R=[m=Math.max(Dp,Math.min(lf,m)),b=Math.max(Dp,Math.min(lf,b))],I=[k=Math.max(Dp,Math.min(lf,k)),N=Math.max(Dp,Math.min(lf,N))];Trt(R,I,t,e,n,r)?(x||(u.lineStart(),u.point(R[0],R[1])),u.point(I[0],I[1]),F||u.lineEnd(),O=!1):F&&(u.lineStart(),u.point(k,N),O=!1)}m=k,b=N,x=F}return w}}function m1(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 b1(t,e){return $e(t)>Te&&(t-=Math.round(t/Si)*Si),[t,e]}b1.invert=b1;function w5(t,e,n){return(t%=Si)?e||n?m1(M5(t),E5(e,n)):M5(t):e||n?E5(e,n):b1}function S5(t){return function(e,n){return e+=t,$e(e)>Te&&(e-=Math.round(e/Si)*Si),[e,n]}}function M5(t){var e=S5(t);return e.invert=S5(-t),e}function E5(t,e){var n=Me(t),r=ge(t),i=Me(e),a=ge(e);function o(s,c){var l=Me(c),u=Me(s)*l,f=ge(s)*l,d=ge(c),h=d*n+u*r;return[Ka(f*i-h*a,u*n-d*r),Ui(h*i+f*a)]}return o.invert=function(s,c){var l=Me(c),u=Me(s)*l,f=ge(s)*l,d=ge(c),h=d*i-f*a;return[Ka(f*i+d*a,u*n+h*r),Ui(h*n-u*r)]},o}function krt(t){t=w5(t[0]*Yn,t[1]*Yn,t.length>2?t[2]*Yn:0);function e(n){return n=t(n[0]*Yn,n[1]*Yn),n[0]*=Yr,n[1]*=Yr,n}return e.invert=function(n){return n=t.invert(n[0]*Yn,n[1]*Yn),n[0]*=Yr,n[1]*=Yr,n},e}function Ugt(t){return{stream:uf(t)}}function uf(t){return function(e){var n=new x1;for(var r in t)n[r]=t[r];return n.stream=e,n}}function x1(){}x1.prototype={constructor:x1,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 _1(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),r!=null&&t.clipExtent(null),ol(n,t.stream(Pp)),e(Pp.result()),r!=null&&t.clipExtent(r),t}function Fp(t,e,n){return _1(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 O1(t,e,n){return Fp(t,[[0,0],e],n)}function w1(t,e,n){return _1(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 S1(t,e,n){return _1(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 P5=16,Crt=Me(30*Yn);function A5(t,e){return+e?Nrt(t,e):Lrt(t)}function Lrt(t){return uf({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}function Nrt(t,e){function n(r,i,a,o,s,c,l,u,f,d,h,p,v,g){var y=l-r,m=u-i,b=y*y+m*m;if(b>4*e&&v--){var x=o+d,_=s+h,O=c+p,w=gi(x*x+_*_+O*O),S=Ui(O/=w),M=$e($e(O)-1)<oe||$e(a-f)<oe?(a+f)/2:Ka(_,x),E=t(M,S),P=E[0],C=E[1],A=P-r,T=C-i,k=m*A-y*T;(k*k/b>e||$e((y*A+m*T)/b-.5)>.3||o*d+s*h+c*p<Crt)&&(n(r,i,a,o,s,c,P,C,M,x/=w,_/=w,O,v,g),g.point(P,C),n(P,C,M,x,_,O,l,u,f,d,h,p,v,g))}}return function(r){var i,a,o,s,c,l,u,f,d,h,p,v,g={point:y,lineStart:m,lineEnd:x,polygonStart:function(){r.polygonStart(),g.lineStart=_},polygonEnd:function(){r.polygonEnd(),g.lineStart=m}};function y(S,M){S=t(S,M),r.point(S[0],S[1])}function m(){f=NaN,g.point=b,r.lineStart()}function b(S,M){var E=fl([S,M]),P=t(S,M);n(f,d,u,h,p,v,f=P[0],d=P[1],u=S,h=E[0],p=E[1],v=E[2],P5,r),r.point(f,d)}function x(){g.point=y,r.lineEnd()}function _(){m(),g.point=O,g.lineEnd=w}function O(S,M){b(i=S,M),a=f,o=d,s=h,c=p,l=v,g.point=b}function w(){n(f,d,u,h,p,v,a,o,i,s,c,l,P5,r),g.lineEnd=x,x()}return g}}var jrt=uf({point:function(t,e){this.stream.point(t*Yn,e*Yn)}});function Rrt(t){return uf({point:function(e,n){var r=t(e,n);return this.stream.point(r[0],r[1])}})}function Irt(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 T5(t,e,n,r,i,a){if(!a)return Irt(t,e,n,r,i);var o=Me(a),s=ge(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 Ca(t){return M1(function(){return t})()}function M1(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=b5,g=null,y,m,b,x=nf,_=.5,O,w,S,M,E;function P(k){return S(k[0]*Yn,k[1]*Yn)}function C(k){return k=S.invert(k[0],k[1]),k&&[k[0]*Yr,k[1]*Yr]}P.stream=function(k){return M&&E===k?M:M=jrt(Rrt(u)(v(O(x(E=k)))))},P.preclip=function(k){return arguments.length?(v=k,p=void 0,T()):v},P.postclip=function(k){return arguments.length?(x=k,g=y=m=b=null,T()):x},P.clipAngle=function(k){return arguments.length?(v=+k?Art(p=k*Yn):(p=null,b5),T()):p*Yr},P.clipExtent=function(k){return arguments.length?(x=k==null?(g=y=m=b=null,nf):O5(g=+k[0][0],y=+k[0][1],m=+k[1][0],b=+k[1][1]),T()):g==null?null:[[g,y],[m,b]]},P.scale=function(k){return arguments.length?(n=+k,A()):n},P.translate=function(k){return arguments.length?(r=+k[0],i=+k[1],A()):[r,i]},P.center=function(k){return arguments.length?(a=k[0]%360*Yn,o=k[1]%360*Yn,A()):[a*Yr,o*Yr]},P.rotate=function(k){return arguments.length?(s=k[0]%360*Yn,c=k[1]%360*Yn,l=k.length>2?k[2]%360*Yn:0,A()):[s*Yr,c*Yr,l*Yr]},P.angle=function(k){return arguments.length?(f=k%360*Yn,A()):f*Yr},P.reflectX=function(k){return arguments.length?(d=k?-1:1,A()):d<0},P.reflectY=function(k){return arguments.length?(h=k?-1:1,A()):h<0},P.precision=function(k){return arguments.length?(O=A5(w,_=k*k),T()):gi(_)},P.fitExtent=function(k,N){return Fp(P,k,N)},P.fitSize=function(k,N){return O1(P,k,N)},P.fitWidth=function(k,N){return w1(P,k,N)},P.fitHeight=function(k,N){return S1(P,k,N)};function A(){var k=T5(n,0,0,d,h,f).apply(null,e(a,o)),N=T5(n,r-k[0],i-k[1],d,h,f);return u=w5(s,c,l),w=m1(e,N),S=m1(u,w),O=A5(w,_),T()}function T(){return M=E=null,P}return function(){return e=t.apply(this,arguments),P.invert=e.invert&&C,A()}}function E1(t){var e=0,n=Te/3,r=M1(t),i=r(e,n);return i.parallels=function(a){return arguments.length?r(e=a[0]*Yn,n=a[1]*Yn):[e*Yr,n*Yr]},i}function Drt(t){var e=Me(t);function n(r,i){return[r*e,ge(i)/e]}return n.invert=function(r,i){return[r/e,Ui(i*e)]},n}function k5(t,e){var n=ge(t),r=(n+ge(e))/2;if($e(r)<oe)return Drt(t);var i=1+n*(2*r-n),a=gi(i)/r;function o(s,c){var l=gi(i-2*r*ge(c))/r;return[l*ge(s*=r),a-l*Me(s)]}return o.invert=function(s,c){var l=a-c,u=Ka(s,$e(l))*$i(l);return l*r<0&&(u-=Te*$i(s)*$i(l)),[u/r,Ui((i-(s*s+l*l)*r*r)/(2*r))]},o}function Bp(){return E1(k5).scale(155.424).center([0,33.6442])}function C5(){return Bp().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function Frt(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 Brt(){var t,e,n=C5(),r,i=Bp().rotate([154,0]).center([-2,58.5]).parallels([55,65]),a,o=Bp().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=Frt([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+oe,v+.12*h+oe],[p-.214*h-oe,v+.234*h-oe]]).stream(l),s=o.translate([p-.205*h,v+.212*h]).clipExtent([[p-.214*h+oe,v+.166*h+oe],[p-.115*h-oe,v+.234*h-oe]]).stream(l),f()},u.fitExtent=function(d,h){return Fp(u,d,h)},u.fitSize=function(d,h){return O1(u,d,h)},u.fitWidth=function(d,h){return w1(u,d,h)},u.fitHeight=function(d,h){return S1(u,d,h)};function f(){return t=e=null,u}return u.scale(1070)}function L5(t){return function(e,n){var r=Me(e),i=Me(n),a=t(r*i);return a===1/0?[2,0]:[a*i*ge(e),a*ge(n)]}}function ff(t){return function(e,n){var r=gi(e*e+n*n),i=t(r),a=ge(i),o=Me(i);return[Ka(e*a,r*o),Ui(r&&n*a/r)]}}var P1=L5(function(t){return gi(2/(1+t))});P1.invert=ff(function(t){return 2*Ui(t/2)});function zrt(){return Ca(P1).scale(124.75).clipAngle(180-.001)}var A1=L5(function(t){return(t=H3(t))&&t/ge(t)});A1.invert=ff(function(t){return t});function Grt(){return Ca(A1).scale(79.4188).clipAngle(180-.001)}function df(t,e){return[t,Sp(r1((qn+e)/2))]}df.invert=function(t,e){return[t,2*sl(Y3(e))-qn]};function Wrt(){return N5(df).scale(961/Si)}function N5(t){var e=Ca(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=Te*r(),d=e(krt(e.rotate()).invert([0,0]));return a(o==null?[[d[0]-f,d[1]-f],[d[0]+f,d[1]+f]]:t===df?[[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 zp(t){return r1((qn+t)/2)}function j5(t,e){var n=Me(t),r=t===e?ge(t):Sp(n/Me(e))/Sp(zp(e)/zp(t)),i=n*n1(zp(t),r)/r;if(!r)return df;function a(o,s){i>0?s<-qn+oe&&(s=-qn+oe):s>qn-oe&&(s=qn-oe);var c=i/n1(zp(s),r);return[c*ge(r*o),i-c*Me(r*o)]}return a.invert=function(o,s){var c=i-s,l=$i(r)*gi(o*o+c*c),u=Ka(o,$e(c))*$i(c);return c*r<0&&(u-=Te*$i(o)*$i(c)),[u/r,2*sl(n1(i/l,1/r))-qn]},a}function Yrt(){return E1(j5).scale(109.5).parallels([30,30])}function hf(t,e){return[t,e]}hf.invert=hf;function Hrt(){return Ca(hf).scale(152.63)}function R5(t,e){var n=Me(t),r=t===e?ge(t):(n-Me(e))/(e-t),i=n/r+t;if($e(r)<oe)return hf;function a(o,s){var c=i-s,l=r*o;return[c*ge(l),i-c*Me(l)]}return a.invert=function(o,s){var c=i-s,l=Ka(o,$e(c))*$i(c);return c*r<0&&(l-=Te*$i(o)*$i(c)),[l/r,i-$i(r)*gi(o*o+c*c)]},a}function $rt(){return E1(R5).scale(131.154).center([0,13.9389])}var pf=1.340264,vf=-.081106,gf=893e-6,yf=.003796,Gp=gi(3)/2,Urt=12;function T1(t,e){var n=Ui(Gp*ge(e)),r=n*n,i=r*r*r;return[t*Me(n)/(Gp*(pf+3*vf*r+i*(7*gf+9*yf*r))),n*(pf+vf*r+i*(gf+yf*r))]}T1.invert=function(t,e){for(var n=e,r=n*n,i=r*r*r,a=0,o,s,c;a<Urt&&(s=n*(pf+vf*r+i*(gf+yf*r))-e,c=pf+3*vf*r+i*(7*gf+9*yf*r),n-=o=s/c,r=n*n,i=r*r*r,!($e(o)<G3));++a);return[Gp*t*(pf+3*vf*r+i*(7*gf+9*yf*r))/Me(n),Ui(ge(n)/Gp)]};function Vrt(){return Ca(T1).scale(177.158)}function k1(t,e){var n=Me(e),r=Me(t)*n;return[n*ge(t)/r,ge(e)/r]}k1.invert=ff(sl);function Xrt(){return Ca(k1).scale(144.049).clipAngle(60)}function qrt(){var t=1,e=0,n=0,r=1,i=1,a=0,o,s,c=null,l,u,f,d=1,h=1,p=uf({point:function(x,_){var O=b([x,_]);this.stream.point(O[0],O[1])}}),v=nf,g,y;function m(){return d=t*r,h=t*i,g=y=null,b}function b(x){var _=x[0]*d,O=x[1]*h;if(a){var w=O*o-_*s;_=_*o+O*s,O=w}return[_+e,O+n]}return b.invert=function(x){var _=x[0]-e,O=x[1]-n;if(a){var w=O*o+_*s;_=_*o-O*s,O=w}return[_/d,O/h]},b.stream=function(x){return g&&y===x?g:g=p(v(y=x))},b.postclip=function(x){return arguments.length?(v=x,c=l=u=f=null,m()):v},b.clipExtent=function(x){return arguments.length?(v=x==null?(c=l=u=f=null,nf):O5(c=+x[0][0],l=+x[0][1],u=+x[1][0],f=+x[1][1]),m()):c==null?null:[[c,l],[u,f]]},b.scale=function(x){return arguments.length?(t=+x,m()):t},b.translate=function(x){return arguments.length?(e=+x[0],n=+x[1],m()):[e,n]},b.angle=function(x){return arguments.length?(a=x%360*Yn,s=ge(a),o=Me(a),m()):a*Yr},b.reflectX=function(x){return arguments.length?(r=x?-1:1,m()):r<0},b.reflectY=function(x){return arguments.length?(i=x?-1:1,m()):i<0},b.fitExtent=function(x,_){return Fp(b,x,_)},b.fitSize=function(x,_){return O1(b,x,_)},b.fitWidth=function(x,_){return w1(b,x,_)},b.fitHeight=function(x,_){return S1(b,x,_)},b}function C1(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)))]}C1.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($e(i)>oe&&--r>0);return[t/(.8707+(a=n*n)*(-.131979+a*(-.013791+a*a*a*(.003971-.001529*a)))),n]};function Zrt(){return Ca(C1).scale(175.295)}function L1(t,e){return[Me(e)*ge(t),ge(e)]}L1.invert=ff(Ui);function Krt(){return Ca(L1).scale(249.5).clipAngle(90+oe)}function N1(t,e){var n=Me(e),r=1+Me(t)*n;return[n*ge(t)/r,ge(e)/r]}N1.invert=ff(function(t){return 2*sl(t)});function Qrt(){return Ca(N1).scale(250).clipAngle(142)}function j1(t,e){return[Sp(r1((qn+e)/2)),-t]}j1.invert=function(t,e){return[-e,2*sl(Y3(t))-qn]};function Jrt(){var t=N5(j1),e=t.center,n=t.rotate;return t.center=function(r){return arguments.length?e([-r[1],r[0]]):(r=e(),[r[1],-r[0]])},t.rotate=function(r){return arguments.length?n([r[0],r[1],r.length>2?r[2]+90:90]):(r=n(),[r[0],r[1],r[2]-90])},n([0,0,90]).scale(159.155)}var tit=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function eit(t){if(typeof t=="function")return t;const e=`geo${mo(t)}`,n=xe[e];if(!n)throw new Error(`Unknown coordinate: ${t}`);return n}function nit(t){return{type:"FeatureCollection",features:t.flatMap(e=>rit(e).features)}}function rit(t){const e={Point:"geometry",MultiPoint:"geometry",LineString:"geometry",MultiLineString:"geometry",Polygon:"geometry",MultiPolygon:"geometry",GeometryCollection:"geometry",Feature:"feature",FeatureCollection:"featureCollection"};if(!t||!t.type)return null;const n=e[t.type];if(!n)return null;if(n==="geometry")return{type:"FeatureCollection",features:[{type:"Feature",properties:{},geometry:t}]};if(n==="feature")return{type:"FeatureCollection",features:[t]};if(n==="featureCollection")return t}function iit(t,e){var n;for(const[r,i]of Object.entries(e))(n=t[r])===null||n===void 0||n.call(t,i)}function ait(t,e,n,r){const i=()=>{const s=e.filter(I5);return s.find(l=>l.sphere)?{type:"Sphere"}:nit(s.filter(l=>!l.sphere).flatMap(l=>l.data.value))},{outline:a=i()}=r,{size:o="fitExtent"}=r;if(o==="fitExtent")return oit(t,a,n);if(o==="fitWidth")return sit(t,a,n)}function oit(t,e,n){const{x:r,y:i,width:a,height:o}=n;t.fitExtent([[r,i],[a,o]],e)}function sit(t,e,n){const{width:r,height:i}=n,[[a,o],[s,c]]=f5(t.fitWidth(r,e)).bounds(e),l=Math.ceil(c-o),u=Math.min(Math.ceil(s-a),l),f=t.scale()*(u-1)/u,[d,h]=t.translate(),p=h+(i-l)/2;t.scale(f).translate([d,p]).precision(.2)}function cit(t){const{data:e}=t;if(Array.isArray(e))return Object.assign(Object.assign({},t),{data:{value:e}});const{type:n}=e;return n==="graticule10"?Object.assign(Object.assign({},t),{data:{value:[xrt()]}}):n==="sphere"?Object.assign(Object.assign({},t),{sphere:!0,data:{value:[{type:"Sphere"}]}}):t}function I5(t){return t.type==="geoPath"}const D5=()=>t=>{const{children:e,coordinate:n={}}=t;if(!Array.isArray(e))return[];const{type:r="equalEarth"}=n,i=tit(n,["type"]),a=eit(r),o=e.map(cit);let s;function c(){return[["custom",(f,d,h,p)=>{const v=a();ait(v,o,{x:f,y:d,width:h,height:p},i),iit(v,i),s=f5(v);const y=new Br({domain:[f,f+h]}),m=new Br({domain:[d,d+p]}),b=_=>{const O=v(_);if(!O)return[null,null];const[w,S]=O;return[y.map(w),m.map(S)]},x=_=>{if(!_)return null;const[O,w]=_,S=[y.invert(O),m.invert(w)];return v.invert(S)};return{transform:_=>b(_),untransform:_=>x(_)}}]]}function l(f){const{style:d,tooltip:h={}}=f;return Object.assign(Object.assign({},f),{type:"path",tooltip:jh(h,{title:"id",items:[{channel:"color"}]}),style:Object.assign(Object.assign({},d),{d:p=>s(p)||[]})})}const u=f=>I5(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)})]};D5.props={};var lit=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const F5=()=>t=>{const{type:e,data:n,scale:r,encode:i,style:a,animate:o,key:s,state:c}=t,l=lit(t,["type","data","scale","encode","style","animate","key","state"]);return[Object.assign(Object.assign({type:"geoView"},l),{children:[{type:"geoPath",key:`${s}-0`,data:{value:n},scale:r,encode:i,style:a,animate:o,state:c}]})]};F5.props={};function uit(){return{"composition.geoView":D5,"composition.geoPath":F5}}function fit(t){const e=+this._x.call(null,t),n=+this._y.call(null,t);return B5(this.cover(e,n),e,n,t)}function B5(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var i,a=t._root,o={data:r},s=t._x0,c=t._y0,l=t._x1,u=t._y1,f,d,h,p,v,g,y,m;if(!a)return t._root=o,t;for(;a.length;)if((v=e>=(f=(s+l)/2))?s=f:l=f,(g=n>=(d=(c+u)/2))?c=d:u=d,i=a,!(a=a[y=g<<1|v]))return i[y]=o,t;if(h=+t._x.call(null,a.data),p=+t._y.call(null,a.data),e===h&&n===p)return o.next=a,i?i[y]=o:t._root=o,t;do i=i?i[y]=new Array(4):t._root=new Array(4),(v=e>=(f=(s+l)/2))?s=f:l=f,(g=n>=(d=(c+u)/2))?c=d:u=d;while((y=g<<1|v)===(m=(p>=d)<<1|h>=f));return i[m]=a,i[y]=o,t}function dit(t){var e,n,r=t.length,i,a,o=new Array(r),s=new Array(r),c=1/0,l=1/0,u=-1/0,f=-1/0;for(n=0;n<r;++n)isNaN(i=+this._x.call(null,e=t[n]))||isNaN(a=+this._y.call(null,e))||(o[n]=i,s[n]=a,i<c&&(c=i),i>u&&(u=i),a<l&&(l=a),a>f&&(f=a));if(c>u||l>f)return this;for(this.cover(c,l).cover(u,f),n=0;n<r;++n)B5(this,o[n],s[n],t[n]);return this}function hit(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,r=this._y0,i=this._x1,a=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,a=(r=Math.floor(e))+1;else{for(var o=i-n||1,s=this._root,c,l;n>t||t>=i||r>e||e>=a;)switch(l=(e<r)<<1|t<n,c=new Array(4),c[l]=s,s=c,o*=2,l){case 0:i=n+o,a=r+o;break;case 1:n=i-o,a=r+o;break;case 2:i=n+o,r=a-o;break;case 3:n=i-o,r=a-o;break}this._root&&this._root.length&&(this._root=s)}return this._x0=n,this._y0=r,this._x1=i,this._y1=a,this}function pit(){var t=[];return this.visit(function(e){if(!e.length)do t.push(e.data);while(e=e.next)}),t}function vit(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function Jr(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function git(t,e,n){var r,i=this._x0,a=this._y0,o,s,c,l,u=this._x1,f=this._y1,d=[],h=this._root,p,v;for(h&&d.push(new Jr(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 Jr(h[3],g,y,c,l),new Jr(h[2],o,y,g,l),new Jr(h[1],g,s,c,y),new Jr(h[0],o,s,g,y)),(v=(e>=y)<<1|t>=g)&&(p=d[d.length-1],d[d.length-1]=d[d.length-1-v],d[d.length-1-v]=p)}else{var m=t-+this._x.call(null,h.data),b=e-+this._y.call(null,h.data),x=m*m+b*b;if(x<n){var _=Math.sqrt(n=x);i=t-_,a=e-_,u=t+_,f=e+_,r=h.data}}return r}function yit(t){if(isNaN(u=+this._x.call(null,t))||isNaN(f=+this._y.call(null,t)))return this;var e,n=this._root,r,i,a,o=this._x0,s=this._y0,c=this._x1,l=this._y1,u,f,d,h,p,v,g,y;if(!n)return this;if(n.length)for(;;){if((p=u>=(d=(o+c)/2))?o=d:c=d,(v=f>=(h=(s+l)/2))?s=h:l=h,e=n,!(n=n[g=v<<1|p]))return this;if(!n.length)break;(e[g+1&3]||e[g+2&3]||e[g+3&3])&&(r=e,y=g)}for(;n.data!==t;)if(i=n,!(n=n.next))return this;return(a=n.next)&&delete n.next,i?(a?i.next=a:delete i.next,this):e?(a?e[g]=a:delete e[g],(n=e[0]||e[1]||e[2]||e[3])&&n===(e[3]||e[2]||e[1]||e[0])&&!n.length&&(r?r[y]=n:this._root=n),this):(this._root=a,this)}function mit(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this}function bit(){return this._root}function xit(){var t=0;return this.visit(function(e){if(!e.length)do++t;while(e=e.next)}),t}function _it(t){var e=[],n,r=this._root,i,a,o,s,c;for(r&&e.push(new Jr(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 Jr(i,l,u,s,c)),(i=r[2])&&e.push(new Jr(i,a,u,l,c)),(i=r[1])&&e.push(new Jr(i,l,o,s,u)),(i=r[0])&&e.push(new Jr(i,a,o,l,u))}return this}function Oit(t){var e=[],n=[],r;for(this._root&&e.push(new Jr(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 Jr(a,o,s,u,f)),(a=i[1])&&e.push(new Jr(a,u,s,c,f)),(a=i[2])&&e.push(new Jr(a,o,f,u,l)),(a=i[3])&&e.push(new Jr(a,u,f,c,l))}n.push(r)}for(;r=n.pop();)t(r.node,r.x0,r.y0,r.x1,r.y1);return this}function wit(t){return t[0]}function Sit(t){return arguments.length?(this._x=t,this):this._x}function Mit(t){return t[1]}function Eit(t){return arguments.length?(this._y=t,this):this._y}function z5(t,e,n){var r=new R1(e==null?wit:e,n==null?Mit:n,NaN,NaN,NaN,NaN);return t==null?r:r.addAll(t)}function R1(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 G5(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var ti=z5.prototype=R1.prototype;ti.copy=function(){var t=new R1(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=G5(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]=G5(r));return t},ti.add=fit,ti.addAll=dit,ti.cover=hit,ti.data=pit,ti.extent=vit,ti.find=git,ti.remove=yit,ti.removeAll=mit,ti.root=bit,ti.size=xit,ti.visit=_it,ti.visitAfter=Oit,ti.x=Sit,ti.y=Eit;function Mi(t){return function(){return t}}function dl(t){return(t()-.5)*1e-6}var Pit={value:function(){}};function W5(){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 Wp(n)}function Wp(t){this._=t}function Ait(t,e){return t.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Wp.prototype=W5.prototype={constructor:Wp,on:function(e,n){var r=this._,i=Ait(e+"",r),a,o=-1,s=i.length;if(arguments.length<2){for(;++o<s;)if((a=(e=i[o]).type)&&(a=Tit(r[a],e.name)))return a;return}if(n!=null&&typeof n!="function")throw new Error("invalid callback: "+n);for(;++o<s;)if(a=(e=i[o]).type)r[a]=Y5(r[a],e.name,n);else if(n==null)for(a in r)r[a]=Y5(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 Wp(e)},call:function(e,n){if((a=arguments.length-2)>0)for(var r=new Array(a),i=0,a,o;i<a;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=this._[e],i=0,a=o.length;i<a;++i)o[i].value.apply(n,r)},apply:function(e,n,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],a=0,o=i.length;a<o;++a)i[a].value.apply(n,r)}};function Tit(t,e){for(var n=0,r=t.length,i;n<r;++n)if((i=t[n]).name===e)return i.value}function Y5(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=Pit,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var kit=W5,hl=0,mf=0,bf=0,H5=1e3,Yp,xf,Hp=0,Hs=0,$p=0,_f=typeof performance=="object"&&performance.now?performance:Date,$5=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function U5(){return Hs||($5(Cit),Hs=_f.now()+$p)}function Cit(){Hs=0}function I1(){this._call=this._time=this._next=null}I1.prototype=V5.prototype={constructor:I1,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?U5():+n)+(e==null?0:+e),!this._next&&xf!==this&&(xf?xf._next=this:Yp=this,xf=this),this._call=t,this._time=n,D1()},stop:function(){this._call&&(this._call=null,this._time=1/0,D1())}};function V5(t,e,n){var r=new I1;return r.restart(t,e,n),r}function Lit(){U5(),++hl;for(var t=Yp,e;t;)(e=Hs-t._time)>=0&&t._call.call(void 0,e),t=t._next;--hl}function X5(){Hs=(Hp=_f.now())+$p,hl=mf=0;try{Lit()}finally{hl=0,jit(),Hs=0}}function Nit(){var t=_f.now(),e=t-Hp;e>H5&&($p-=e,Hp=t)}function jit(){for(var t,e=Yp,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:Yp=n);xf=t,D1(r)}function D1(t){if(!hl){mf&&(mf=clearTimeout(mf));var e=t-Hs;e>24?(t<1/0&&(mf=setTimeout(X5,t-_f.now()-$p)),bf&&(bf=clearInterval(bf))):(bf||(Hp=_f.now(),bf=setInterval(Nit,H5)),hl=1,$5(X5))}}const Rit=1664525,Iit=1013904223,q5=4294967296;function Dit(){let t=1;return()=>(t=(Rit*t+Iit)%q5)/q5}function Fit(t){return t.x}function Bit(t){return t.y}var zit=10,Git=Math.PI*(3-Math.sqrt(5));function Wit(t){var e,n=1,r=.001,i=1-Math.pow(r,1/300),a=0,o=.6,s=new Map,c=V5(f),l=kit("tick","end"),u=Dit();t==null&&(t=[]);function f(){d(),l.call("tick",e),n<r&&(c.stop(),l.call("end",e))}function d(v){var g,y=t.length,m;v===void 0&&(v=1);for(var b=0;b<v;++b)for(n+=(a-n)*i,s.forEach(function(x){x(n)}),g=0;g<y;++g)m=t[g],m.fx==null?m.x+=m.vx*=o:(m.x=m.fx,m.vx=0),m.fy==null?m.y+=m.vy*=o:(m.y=m.fy,m.vy=0);return e}function h(){for(var v=0,g=t.length,y;v<g;++v){if(y=t[v],y.index=v,y.fx!=null&&(y.x=y.fx),y.fy!=null&&(y.y=y.fy),isNaN(y.x)||isNaN(y.y)){var m=zit*Math.sqrt(.5+v),b=v*Git;y.x=m*Math.cos(b),y.y=m*Math.sin(b)}(isNaN(y.vx)||isNaN(y.vy))&&(y.vx=y.vy=0)}}function p(v){return v.initialize&&v.initialize(t,u),v}return h(),e={tick:d,restart:function(){return c.restart(f),e},stop:function(){return c.stop(),e},nodes:function(v){return arguments.length?(t=v,h(),s.forEach(p),e):t},alpha:function(v){return arguments.length?(n=+v,e):n},alphaMin:function(v){return arguments.length?(r=+v,e):r},alphaDecay:function(v){return arguments.length?(i=+v,e):+i},alphaTarget:function(v){return arguments.length?(a=+v,e):a},velocityDecay:function(v){return arguments.length?(o=1-v,e):1-o},randomSource:function(v){return arguments.length?(u=v,s.forEach(p),e):u},force:function(v,g){return arguments.length>1?(g==null?s.delete(v):s.set(v,p(g)),e):s.get(v)},find:function(v,g,y){var m=0,b=t.length,x,_,O,w,S;for(y==null?y=1/0:y*=y,m=0;m<b;++m)w=t[m],x=v-w.x,_=g-w.y,O=x*x+_*_,O<y&&(S=w,y=O);return S},on:function(v,g){return arguments.length>1?(l.on(v,g),e):l.on(v)}}}function Yit(){var t,e,n,r,i=Mi(-30),a,o=1,s=1/0,c=.81;function l(h){var p,v=t.length,g=z5(t,Fit,Bit).visitAfter(f);for(r=h,p=0;p<v;++p)e=t[p],g.visit(d)}function u(){if(t){var h,p=t.length,v;for(a=new Array(p),h=0;h<p;++h)v=t[h],a[v.index]=+i(v,h,t)}}function f(h){var p=0,v,g,y=0,m,b,x;if(h.length){for(m=b=x=0;x<4;++x)(v=h[x])&&(g=Math.abs(v.value))&&(p+=v.value,y+=g,m+=g*v.x,b+=g*v.y);h.x=m/y,h.y=b/y}else{v=h,v.x=v.data.x,v.y=v.data.y;do p+=a[v.data.index];while(v=v.next)}h.value=p}function d(h,p,v,g){if(!h.value)return!0;var y=h.x-e.x,m=h.y-e.y,b=g-p,x=y*y+m*m;if(b*b/c<x)return x<s&&(y===0&&(y=dl(n),x+=y*y),m===0&&(m=dl(n),x+=m*m),x<o&&(x=Math.sqrt(o*x)),e.vx+=y*h.value*r/x,e.vy+=m*h.value*r/x),!0;if(h.length||x>=s)return;(h.data!==e||h.next)&&(y===0&&(y=dl(n),x+=y*y),m===0&&(m=dl(n),x+=m*m),x<o&&(x=Math.sqrt(o*x)));do h.data!==e&&(b=a[h.data.index]*r/x,e.vx+=y*b,e.vy+=m*b);while(h=h.next)}return l.initialize=function(h,p){t=h,n=p,u()},l.strength=function(h){return arguments.length?(i=typeof h=="function"?h:Mi(+h),u(),l):i},l.distanceMin=function(h){return arguments.length?(o=h*h,l):Math.sqrt(o)},l.distanceMax=function(h){return arguments.length?(s=h*h,l):Math.sqrt(s)},l.theta=function(h){return arguments.length?(c=h*h,l):Math.sqrt(c)},l}function Hit(t){return t.index}function Z5(t,e){var n=t.get(e);if(!n)throw new Error("node not found: "+e);return n}function $it(t){var e=Hit,n=f,r,i=Mi(30),a,o,s,c,l,u=1;t==null&&(t=[]);function f(g){return 1/Math.min(s[g.source.index],s[g.target.index])}function d(g){for(var y=0,m=t.length;y<u;++y)for(var b=0,x,_,O,w,S,M,E;b<m;++b)x=t[b],_=x.source,O=x.target,w=O.x+O.vx-_.x-_.vx||dl(l),S=O.y+O.vy-_.y-_.vy||dl(l),M=Math.sqrt(w*w+S*S),M=(M-a[b])/M*g*r[b],w*=M,S*=M,O.vx-=w*(E=c[b]),O.vy-=S*E,_.vx+=w*(E=1-E),_.vy+=S*E}function h(){if(o){var g,y=o.length,m=t.length,b=new Map(o.map((_,O)=>[e(_,O,o),_])),x;for(g=0,s=new Array(y);g<m;++g)x=t[g],x.index=g,typeof x.source!="object"&&(x.source=Z5(b,x.source)),typeof x.target!="object"&&(x.target=Z5(b,x.target)),s[x.source.index]=(s[x.source.index]||0)+1,s[x.target.index]=(s[x.target.index]||0)+1;for(g=0,c=new Array(m);g<m;++g)x=t[g],c[g]=s[x.source.index]/(s[x.source.index]+s[x.target.index]);r=new Array(m),p(),a=new Array(m),v()}}function p(){if(o)for(var g=0,y=t.length;g<y;++g)r[g]=+n(t[g],g,t)}function v(){if(o)for(var g=0,y=t.length;g<y;++g)a[g]=+i(t[g],g,t)}return d.initialize=function(g,y){o=g,l=y,h()},d.links=function(g){return arguments.length?(t=g,h(),d):t},d.id=function(g){return arguments.length?(e=g,d):e},d.iterations=function(g){return arguments.length?(u=+g,d):u},d.strength=function(g){return arguments.length?(n=typeof g=="function"?g:Mi(+g),p(),d):n},d.distance=function(g){return arguments.length?(i=typeof g=="function"?g:Mi(+g),v(),d):i},d}function Uit(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 Vit(t){var e=Mi(.1),n,r,i;typeof t!="function"&&(t=Mi(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:Mi(+s),o(),a):e},a.x=function(s){return arguments.length?(t=typeof s=="function"?s:Mi(+s),o(),a):t},a}function Xit(t){var e=Mi(.1),n,r,i;typeof t!="function"&&(t=Mi(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:Mi(+s),o(),a):e},a.y=function(s){return arguments.length?(t=typeof s=="function"?s:Mi(+s),o(),a):t},a}var qit=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const Zit={joint:!0},Kit={type:"link",axis:!1,legend:!1,encode:{x:[t=>t.source.x,t=>t.target.x],y:[t=>t.source.y,t=>t.target.y]},style:{stroke:"#999",strokeOpacity:.6}},Qit={type:"point",axis:!1,legend:!1,encode:{x:"x",y:"y",size:5,color:"group",shape:"point"},style:{stroke:"#fff"}},Jit={text:""};function tat(t,e,n){const{nodes:r,links:i}=t,{joint:a,nodeStrength:o,linkStrength:s}=e,{nodeKey:c=p=>p.id,linkKey:l=p=>p.id}=n,u=Yit(),f=$it(i).id(Aa(l));typeof o=="function"&&u.strength(o),typeof s=="function"&&f.strength(s);const d=Wit(r).force("link",f).force("charge",u);a?d.force("center",Uit()):d.force("x",Vit()).force("y",Xit()),d.stop();const h=Math.ceil(Math.log(d.alphaMin())/Math.log(1-d.alphaDecay()));for(let p=0;p<h;p++)d.tick();return{nodesData:r,linksData:i}}const K5=t=>{const{data:e,encode:n={},scale:r,style:i={},layout:a={},nodeLabels:o=[],linkLabels:s=[],animate:c={},tooltip:l={}}=t,{nodeKey:u=O=>O.id,linkKey:f=O=>O.id}=n,d=qit(n,["nodeKey","linkKey"]),h=Object.assign({nodeKey:u,linkKey:f},d),p=Pt(h,"node"),v=Pt(h,"link"),{links:g,nodes:y}=Ny(e,h),{nodesData:m,linksData:b}=tat({links:g,nodes:y},at({},Zit,a),h),x=Ma(l,"link",{items:[O=>({name:"source",value:Aa(f)(O.source)}),O=>({name:"target",value:Aa(f)(O.target)})]}),_=Ma(l,"node",{items:[O=>({name:"key",value:Aa(u)(O)})]},!0);return[at({},Kit,{data:b,encode:v,labels:s,style:Pt(i,"link"),tooltip:x,animate:Ea(c,"link")}),at({},Qit,{data:m,encode:Object.assign({},p),scale:r,style:Pt(i,"node"),tooltip:_,labels:[Object.assign(Object.assign({},Jit),Pt(i,"label")),...o],animate:Ea(c,"link")})]};K5.props={};function eat(t,e){return t.parent===e.parent?1:2}function F1(t){var e=t.children;return e?e[0]:t.t}function B1(t){var e=t.children;return e?e[e.length-1]:t.t}function nat(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}function rat(t){for(var e=0,n=0,r=t.children,i=r.length,a;--i>=0;)a=r[i],a.z+=e,a.m+=e,e+=a.s+(n+=a.c)}function iat(t,e,n){return t.a.parent===e.parent?t.a:n}function Up(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}Up.prototype=Object.create(Kc.prototype);function aat(t){for(var e=new Up(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 Up(a[o],o)),i.parent=n;return(e.parent=new Up(null,0)).children=[e],e}function oat(){var t=eat,e=1,n=1,r=null;function i(l){var u=aat(l);if(u.eachAfter(a),u.parent.m=-u.z,u.eachBefore(o),r)l.eachBefore(c);else{var f=l,d=l,h=l;l.eachBefore(function(m){m.x<f.x&&(f=m),m.x>d.x&&(d=m),m.depth>h.depth&&(h=m)});var p=f===d?1:t(f,d)/2,v=p-f.x,g=e/(d.x+p+v),y=n/(h.depth||1);l.eachBefore(function(m){m.x=(m.x+v)*g,m.y=m.depth*y})}return l}function a(l){var u=l.children,f=l.parent.children,d=l.i?f[l.i-1]:null;if(u){rat(l);var h=(u[0].z+u[u.length-1].z)/2;d?(l.z=d.z+t(l._,d._),l.m=l.z-h):l.z=h}else d&&(l.z=d.z+t(l._,d._));l.parent.A=s(l,d,l.parent.A||f[0])}function o(l){l._.x=l.z+l.parent.m,l.m+=l.parent.m}function s(l,u,f){if(u){for(var d=l,h=l,p=u,v=d.parent.children[0],g=d.m,y=h.m,m=p.m,b=v.m,x;p=B1(p),d=F1(d),p&&d;)v=F1(v),h=B1(h),h.a=l,x=p.z+m-d.z-g+t(p._,d._),x>0&&(nat(iat(p,l,f),l,x),g+=x,y+=x),m+=p.m,g+=d.m,b+=v.m,y+=h.m;p&&!B1(h)&&(h.t=p,h.m+=m-y),d&&!F1(v)&&(v.t=d,v.m+=g-b,f=l)}return f}function c(l){l.x*=e,l.y=l.depth*n}return i.separation=function(l){return arguments.length?(t=l,i):t},i.size=function(l){return arguments.length?(r=!1,e=+l[0],n=+l[1],i):r?null:[e,n]},i.nodeSize=function(l){return arguments.length?(r=!0,e=+l[0],n=+l[1],i):r?[e,n]:null},i}function sat(t,e){return t.parent===e.parent?1:2}function cat(t){return t.reduce(lat,0)/t.length}function lat(t,e){return t+e.x}function uat(t){return 1+t.reduce(fat,0)}function fat(t,e){return Math.max(t,e.y)}function dat(t){for(var e;e=t.children;)t=e[0];return t}function hat(t){for(var e;e=t.children;)t=e[e.length-1];return t}function pat(){var t=sat,e=1,n=1,r=!1;function i(a){var o,s=0;a.eachAfter(function(d){var h=d.children;h?(d.x=cat(h),d.y=uat(h)):(d.x=o?s+=t(d,o):0,d.y=0,o=d)});var c=dat(a),l=hat(a),u=c.x-t(c,l)/2,f=l.x+t(l,c)/2;return a.eachAfter(r?function(d){d.x=(d.x-a.x)*e,d.y=(a.y-d.y)*n}:function(d){d.x=(d.x-u)/(f-u)*e,d.y=(1-(a.y?d.y/a.y:1))*n})}return i.separation=function(a){return arguments.length?(t=a,i):t},i.size=function(a){return arguments.length?(r=!1,e=+a[0],n=+a[1],i):r?null:[e,n]},i.nodeSize=function(a){return arguments.length?(r=!0,e=+a[0],n=+a[1],i):r?[e,n]:null},i}const Q5=t=>e=>n=>{const{field:r="value",nodeSize:i,separation:a,sortBy:o,as:s=["x","y"]}=e,[c,l]=s,u=Zc(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}},J5=t=>Q5(pat)(t);J5.props={};const tL=t=>Q5(oat)(t);tL.props={};const vat={sortBy:(t,e)=>e.value-t.value},gat={axis:!1,legend:!1,type:"point",encode:{x:"x",y:"y",size:2,shape:"point"}},yat={type:"link",encode:{x:"x",y:"y",shape:"smooth"}},mat={text:"",fontSize:10},eL=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}=tL(Object.assign(Object.assign(Object.assign({},vat),a),{field:u}))(e),h=Ma(l,"node",{title:"name",items:["value"]},!0),p=Ma(l,"link",{title:"",items:[v=>({name:"source",value:v.source.name}),v=>({name:"target",value:v.target.name})]});return[at({},yat,{data:d,encode:Pt(n,"link"),scale:Pt(r,"link"),labels:s,style:Object.assign({stroke:"#999"},Pt(i,"link")),tooltip:p,animate:Ea(c,"link")}),at({},gat,{data:f,scale:Pt(r,"node"),encode:Pt(n,"node"),labels:[Object.assign(Object.assign({},mat),Pt(i,"label")),...o],style:Object.assign({},Pt(i,"node")),tooltip:h,animate:Ea(c,"node")})]};eL.props={};var bat=1664525,xat=1013904223,nL=4294967296;function _at(){var t=1;return function(){return(t=(bat*t+xat)%nL)/nL}}var Oat=tt(52677);function wat(t){return Oat(t)==="object"&&"length"in t?t:Array.from(t)}function Sat(t,e){for(var n=t.length,r,i;n;)i=e()*n--|0,r=t[n],t[n]=t[i],t[i]=r;return t}function Vgt(t){return rL(t,lcg())}function rL(t,e){for(var n=0,r=(t=Sat(Array.from(t),e)).length,i=[],a,o;n<r;)a=t[n],o&&iL(o,a)?++n:(o=Eat(i=Mat(i,a)),n=0);return o}function Mat(t,e){var n,r;if(z1(e,t))return[e];for(n=0;n<t.length;++n)if(Vp(e,t[n])&&z1(Of(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(Vp(Of(t[n],t[r]),e)&&Vp(Of(t[n],e),t[r])&&Vp(Of(t[r],e),t[n])&&z1(aL(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}function Vp(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 iL(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 z1(t,e){for(var n=0;n<e.length;++n)if(!iL(t,e[n]))return!1;return!0}function Eat(t){switch(t.length){case 1:return Pat(t[0]);case 2:return Of(t[0],t[1]);case 3:return aL(t[0],t[1],t[2])}}function Pat(t){return{x:t.x,y:t.y,r:t.r}}function Of(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 aL(t,e,n){var r=t.x,i=t.y,a=t.r,o=e.x,s=e.y,c=e.r,l=n.x,u=n.y,f=n.r,d=r-o,h=r-l,p=i-s,v=i-u,g=c-a,y=f-a,m=r*r+i*i-a*a,b=m-o*o-s*s+c*c,x=m-l*l-u*u+f*f,_=h*p-d*v,O=(p*x-v*b)/(_*2)-r,w=(v*g-p*y)/_,S=(h*b-d*x)/(_*2)-i,M=(d*y-h*g)/_,E=w*w+M*M-1,P=2*(a+O*w+S*M),C=O*O+S*S-a*a,A=-(Math.abs(E)>1e-6?(P+Math.sqrt(P*P-4*E*C))/(2*E):C/P);return{x:r+O+w*A,y:i+S+M*A,r:A}}function oL(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 sL(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 cL(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 Xp(t){this._=t,this.next=null,this.previous=null}function lL(t,e){if(!(a=(t=wat(t)).length))return 0;var n,r,i,a,o,s,c,l,u,f,d;if(n=t[0],n.x=0,n.y=0,!(a>1))return n.r;if(r=t[1],n.x=-r.r,r.x=n.r,r.y=0,!(a>2))return n.r+r.r;oL(r,n,i=t[2]),n=new Xp(n),r=new Xp(r),i=new Xp(i),n.next=i.previous=r,r.next=n.previous=i,i.next=r.previous=n;t:for(c=3;c<a;++c){oL(n._,r._,i=t[c]),i=new Xp(i),l=r.next,u=n.previous,f=r._.r,d=n._.r;do if(f<=d){if(sL(l._,i._)){r=l,n.next=r,r.previous=n,--c;continue t}f+=l._.r,l=l.next}else{if(sL(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=cL(n);(i=i.next)!==r;)(s=cL(i))<o&&(n=i,o=s);r=n.next}for(n=[r._],i=r;(i=i.next)!==r;)n.push(i._);for(i=rL(n,e),c=0;c<a;++c)n=t[c],n.x-=i.x,n.y-=i.y;return i.r}function Xgt(t){return lL(t,lcg()),t}function Aat(t){return Math.sqrt(t.value)}function Tat(){var t=null,e=1,n=1,r=Ws;function i(a){var o=_at();return a.x=e/2,a.y=n/2,t?a.eachBefore(uL(t)).eachAfter(G1(r,.5,o)).eachBefore(fL(1)):a.eachBefore(uL(Aat)).eachAfter(G1(Ws,1,o)).eachAfter(G1(r,a.r/Math.min(e,n),o)).eachBefore(fL(Math.min(e,n)/(2*a.r))),a}return i.radius=function(a){return arguments.length?(t=fp(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:al(+a),i):r},i}function uL(t){return function(e){e.children||(e.r=Math.max(0,+t(e)||0))}}function G1(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=lL(i,n),s)for(a=0;a<o;++a)i[a].r-=s;r.r=c+s}}}function fL(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 kat=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);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 Cat=(t,e)=>({size:[t,e],padding:0,sort:(n,r)=>r.value-n.value}),Lat=(t,e,n)=>({type:"point",axis:!1,legend:!1,scale:{x:{domain:[0,t]},y:{domain:[0,e]},size:{type:"identity"}},encode:{x:"x",y:"y",size:"r",shape:"point"},style:{fill:n.color?void 0:r=>r.height===0?"#ddd":"#fff",stroke:n.color?void 0:r=>r.height===0?"":"#000"}}),Nat={text:"",position:"inside",textOverflow:"clip",wordWrap:!0,maxLines:1,wordWrapWidth:t=>t.r*2},jat={title:t=>t.data.name,items:[{field:"value"}]},Rat=(t,e,n)=>{const{value:r}=n,i=sr(t)?jm().path(e.path)(t):Zc(t);return r?i.sum(a=>Aa(r)(a)).sort(e.sort):i.count(),Tat().size(e.size).padding(e.padding)(i),i.descendants()},dL=(t,e)=>{const{width:n,height:r}=e,{data:i,encode:a={},scale:o={},style:s={},layout:c={},labels:l=[],tooltip:u={}}=t,f=kat(t,["data","encode","scale","style","layout","labels","tooltip"]),d=Lat(n,r,a),h=Rat(i,at({},Cat(n,r),c),at({},d.encode,a)),p=Pt(s,"label");return at({},d,Object.assign(Object.assign({data:h,encode:a,scale:o,style:s,labels:[Object.assign(Object.assign({},Nat),p),...l]},f),{tooltip:jh(u,jat),axis:!1}))};dL.props={};function Iat(t){return t.target.depth}function Dat(t){return t.depth}function Fat(t,e){return e-1-t.height}function qp(t,e){return t.sourceLinks.length?t.depth:e-1}function Bat(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?Oi(t.sourceLinks,Iat)-1:0}function Zp(t){return function(){return t}}function hL(t,e){return Kp(t.source,e.source)||t.index-e.index}function pL(t,e){return Kp(t.target,e.target)||t.index-e.index}function Kp(t,e){return t.y0-e.y0}function W1(t){return t.value}function zat(t){return t.index}function Gat(t){return t.nodes}function Wat(t){return t.links}function vL(t,e){const n=t.get(e);if(!n)throw new Error("missing: "+e);return n}function gL({nodes:t}){for(const e of t){let n=e.y0,r=n;for(const i of e.sourceLinks)i.y0=n+i.width/2,n+=i.width;for(const i of e.targetLinks)i.y1=r+i.width/2,r+=i.width}}function Yat(){let t=0,e=0,n=1,r=1,i=24,a=8,o,s=zat,c=qp,l,u,f,d=Gat,h=Wat,p=6;function v(N){const F={nodes:d(N),links:h(N)};return g(F),y(F),m(F),b(F),O(F),gL(F),F}v.update=function(N){return gL(N),N},v.nodeId=function(N){return arguments.length?(s=typeof N=="function"?N:Zp(N),v):s},v.nodeAlign=function(N){return arguments.length?(c=typeof N=="function"?N:Zp(N),v):c},v.nodeDepth=function(N){return arguments.length?(l=N,v):l},v.nodeSort=function(N){return arguments.length?(u=N,v):u},v.nodeWidth=function(N){return arguments.length?(i=+N,v):i},v.nodePadding=function(N){return arguments.length?(a=o=+N,v):a},v.nodes=function(N){return arguments.length?(d=typeof N=="function"?N:Zp(N),v):d},v.links=function(N){return arguments.length?(h=typeof N=="function"?N:Zp(N),v):h},v.linkSort=function(N){return arguments.length?(f=N,v):f},v.size=function(N){return arguments.length?(t=e=0,n=+N[0],r=+N[1],v):[n-t,r-e]},v.extent=function(N){return arguments.length?(t=+N[0][0],n=+N[1][0],e=+N[0][1],r=+N[1][1],v):[[t,e],[n,r]]},v.iterations=function(N){return arguments.length?(p=+N,v):p};function g({nodes:N,links:F}){N.forEach((I,z)=>{I.index=z,I.sourceLinks=[],I.targetLinks=[]});const R=new Map(N.map(I=>[s(I),I]));if(F.forEach((I,z)=>{I.index=z;let{source:W,target:U}=I;typeof W!="object"&&(W=I.source=vL(R,W)),typeof U!="object"&&(U=I.target=vL(R,U)),W.sourceLinks.push(I),U.targetLinks.push(I)}),f!=null)for(const{sourceLinks:I,targetLinks:z}of N)I.sort(f),z.sort(f)}function y({nodes:N}){for(const F of N)F.value=F.fixedValue===void 0?Math.max(Di(F.sourceLinks,W1),Di(F.targetLinks,W1)):F.fixedValue}function m({nodes:N}){const F=N.length;let R=new Set(N),I=new Set,z=0;for(;R.size;){if(R.forEach(W=>{W.depth=z;for(const{target:U}of W.sourceLinks)I.add(U)}),++z>F)throw new Error("circular link");R=I,I=new Set}if(l){const W=Math.max(Ke(N,$=>$.depth)+1,0);let U;for(let $=0;$<N.length;$++)U=N[$],U.depth=l.call(null,U,W)}}function b({nodes:N}){const F=N.length;let R=new Set(N),I=new Set,z=0;for(;R.size;){if(R.forEach(W=>{W.height=z;for(const{source:U}of W.targetLinks)I.add(U)}),++z>F)throw new Error("circular link");R=I,I=new Set}}function x({nodes:N}){const F=Math.max(Ke(N,z=>z.depth)+1,0),R=(n-t-i)/(F-1),I=new Array(F).fill(0).map(()=>[]);for(const z of N){const W=Math.max(0,Math.min(F-1,Math.floor(c.call(null,z,F))));z.layer=W,z.x0=t+W*R,z.x1=z.x0+i,I[W]?I[W].push(z):I[W]=[z]}if(u)for(const z of I)z.sort(u);return I}function _(N){const F=Oi(N,R=>(r-e-(R.length-1)*o)/Di(R,W1));for(const R of N){let I=e;for(const z of R){z.y0=I,z.y1=I+z.value*F,I=z.y1+o;for(const W of z.sourceLinks)W.width=W.value*F}I=(r-I+o)/(R.length+1);for(let z=0;z<R.length;++z){const W=R[z];W.y0+=I*(z+1),W.y1+=I*(z+1)}A(R)}}function O(N){const F=x(N);o=Math.min(a,(r-e)/(Ke(F,R=>R.length)-1)),_(F);for(let R=0;R<p;++R){const I=Math.pow(.99,R),z=Math.max(1-I,(R+1)/p);S(F,I,z),w(F,I,z)}}function w(N,F,R){for(let I=1,z=N.length;I<z;++I){const W=N[I];for(const U of W){let $=0,K=0;for(const{source:gt,value:it}of U.targetLinks){const et=it*(U.layer-gt.layer);$+=T(gt,U)*et,K+=et}if(!(K>0))continue;const ct=($/K-U.y0)*F;U.y0+=ct,U.y1+=ct,C(U)}u===void 0&&W.sort(Kp),W.length&&M(W,R)}}function S(N,F,R){for(let I=N.length,z=I-2;z>=0;--z){const W=N[z];for(const U of W){let $=0,K=0;for(const{target:gt,value:it}of U.sourceLinks){const et=it*(gt.layer-U.layer);$+=k(U,gt)*et,K+=et}if(!(K>0))continue;const ct=($/K-U.y0)*F;U.y0+=ct,U.y1+=ct,C(U)}u===void 0&&W.sort(Kp),W.length&&M(W,R)}}function M(N,F){const R=N.length>>1,I=N[R];P(N,I.y0-o,R-1,F),E(N,I.y1+o,R+1,F),P(N,r,N.length-1,F),E(N,e,0,F)}function E(N,F,R,I){for(;R<N.length;++R){const z=N[R],W=(F-z.y0)*I;W>1e-6&&(z.y0+=W,z.y1+=W),F=z.y1+o}}function P(N,F,R,I){for(;R>=0;--R){const z=N[R],W=(z.y1-F)*I;W>1e-6&&(z.y0-=W,z.y1-=W),F=z.y0-o}}function C({sourceLinks:N,targetLinks:F}){if(f===void 0){for(const{source:{sourceLinks:R}}of F)R.sort(pL);for(const{target:{targetLinks:R}}of N)R.sort(hL)}}function A(N){if(f===void 0)for(const{sourceLinks:F,targetLinks:R}of N)F.sort(pL),R.sort(hL)}function T(N,F){let R=N.y0-(N.sourceLinks.length-1)*o/2;for(const{target:I,width:z}of N.sourceLinks){if(I===F)break;R+=z+o}for(const{source:I,width:z}of F.targetLinks){if(I===N)break;R-=z}return R}function k(N,F){let R=F.y0-(F.targetLinks.length-1)*o/2;for(const{source:I,width:z}of F.targetLinks){if(I===N)break;R+=z+o}for(const{target:I,width:z}of N.sourceLinks){if(I===F)break;R-=z}return R}return v}const Hat={nodeAlign:"justify",nodeWidth:.008,nodePadding:.03,nodes:t=>t.nodes,links:t=>t.links,nodeSort:void 0,linkSort:void 0,iterations:6},$at={left:Dat,right:Fat,center:Bat,justify:qp};function Uat(t){const e=typeof t;return e==="string"?$at[t]||qp:e==="function"?t:qp}const yL=t=>e=>{const{nodeId:n,nodeSort:r,nodeAlign:i,nodeWidth:a,nodePadding:o,nodeDepth:s,nodes:c,links:l,linkSort:u,iterations:f}=Object.assign({},Hat,t),d=Yat().nodeSort(r).linkSort(u).links(l).nodes(c).nodeWidth(a).nodePadding(o).nodeDepth(s).nodeAlign(Uat(i)).iterations(f).extent([[0,0],[1,1]]);typeof n=="function"&&d.nodeId(n);const h=d(e),{nodes:p,links:v}=h,g=p.map(m=>{const{x0:b,x1:x,y0:_,y1:O}=m;return Object.assign(Object.assign({},m),{x:[b,x,x,b],y:[_,_,O,O]})}),y=v.map(m=>{const{source:b,target:x}=m,_=b.x1,O=x.x0,w=m.width/2;return Object.assign(Object.assign({},m),{x:[_,_,O,O],y:[m.y0+w,m.y0-w,m.y1+w,m.y1-w]})});return{nodes:g,links:y}};yL.props={};var Vat=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const Xat={nodeId:t=>t.key,nodeWidth:.02,nodePadding:.02},qat={type:"polygon",axis:!1,legend:!1,encode:{shape:"polygon",x:"x",y:"y"},scale:{x:{type:"identity"},y:{type:"identity"}},style:{stroke:"#000"}},Zat={type:"polygon",axis:!1,legend:!1,encode:{shape:"ribbon",x:"x",y:"y"},style:{fillOpacity:.5,stroke:void 0}},Kat={textAlign:t=>t.x[0]<.5?"start":"end",position:t=>t.x[0]<.5?"right":"left",fontSize:10},mL=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}=Ny(e,n),d=Pt(n,"node"),h=Pt(n,"link"),{key:p=M=>M.key,color:v=p}=d,{links:g,nodes:y}=yL(Object.assign(Object.assign(Object.assign({},Xat),{nodeId:Aa(p)}),a))({links:u,nodes:f}),m=Pt(i,"label"),{text:b=p,spacing:x=5}=m,_=Vat(m,["text","spacing"]),O=Aa(p),w=Ma(l,"node",{title:O,items:[{field:"value"}]},!0),S=Ma(l,"link",{title:"",items:[M=>({name:"source",value:O(M.source)}),M=>({name:"target",value:O(M.target)})]});return[at({},qat,{data:y,encode:Object.assign(Object.assign({},d),{color:v}),scale:r,style:Pt(i,"node"),labels:[Object.assign(Object.assign(Object.assign({},Kat),{text:b,dx:M=>M.x[0]<.5?x:-x}),_),...o],tooltip:w,animate:Ea(c,"node"),axis:!1}),at({},Zat,{data:g,encode:h,labels:s,style:Object.assign({fill:h.color?void 0:"#aaa",lineWidth:0},Pt(i,"link")),tooltip:S,animate:Ea(c,"link")})]};mL.props={};function Qat(t,e){return e.value-t.value}function Jat(t,e){return e.frequency-t.frequency}function tot(t,e){return`${t.id}`.localeCompare(`${e.id}`)}function eot(t,e){return`${t.name}`.localeCompare(`${e.name}`)}const not={y:0,thickness:.05,weight:!1,marginRatio:.1,id:t=>t.id,source:t=>t.source,target:t=>t.target,sourceWeight:t=>t.value||1,targetWeight:t=>t.value||1,sortBy:null};function rot(t){const{y:e,thickness:n,weight:r,marginRatio:i,id:a,source:o,target:s,sourceWeight:c,targetWeight:l,sortBy:u}=Object.assign(Object.assign({},not),t);function f(g){const y=g.nodes.map(b=>Object.assign({},b)),m=g.edges.map(b=>Object.assign({},b));return d(y,m),h(y,m),p(y,m),v(y,m),{nodes:y,edges:m}}function d(g,y){y.forEach(x=>{x.source=o(x),x.target=s(x),x.sourceWeight=c(x),x.targetWeight=l(x)});const m=Ln(y,x=>x.source),b=Ln(y,x=>x.target);return g.forEach(x=>{x.id=a(x);const _=m.has(x.id)?m.get(x.id):[],O=b.has(x.id)?b.get(x.id):[];x.frequency=_.length+O.length,x.value=Di(_,w=>w.sourceWeight)+Di(O,w=>w.targetWeight)}),{nodes:g,edges:y}}function h(g,y){const m=typeof u=="function"?u:zt[u];m&&g.sort(m)}function p(g,y){const m=g.length;if(!m)throw Pc("Invalid nodes: it's empty!");if(!r){const _=1/m;return g.forEach((O,w)=>{O.x=(w+.5)*_,O.y=e}),{nodes:g,edges:y}}const b=i/(2*m),x=g.reduce((_,O)=>_+=O.value,0);return g.reduce((_,O)=>{O.weight=O.value/x,O.width=O.weight*(1-i),O.height=n;const w=b+_,S=w+O.width,M=e-n/2,E=M+n;return O.x=[w,S,S,w],O.y=[M,M,E,E],_+O.width+2*b},0),{nodes:g,edges:y}}function v(g,y){const m=new Map(g.map(_=>[_.id,_]));if(!r)return y.forEach(_=>{const O=o(_),w=s(_),S=m.get(O),M=m.get(w);S&&M&&(_.x=[S.x,M.x],_.y=[S.y,M.y])}),{nodes:g,edges:y};y.forEach(_=>{_.x=[0,0,0,0],_.y=[e,e,e,e]});const b=Ln(y,_=>_.source),x=Ln(y,_=>_.target);g.forEach(_=>{const{edges:O,width:w,x:S,y:M,value:E,id:P}=_,C=b.get(P)||[],A=x.get(P)||[];let T=0;C.map(k=>{const N=k.sourceWeight/E*w;k.x[0]=S[0]+T,k.x[1]=S[0]+T+N,T+=N}),A.forEach(k=>{const N=k.targetWeight/E*w;k.x[3]=S[0]+T,k.x[2]=S[0]+T+N,T+=N})})}return f}const Y1=t=>e=>rot(t)(e);Y1.props={};var bL=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);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 H1={y:0,thickness:.05,marginRatio:.1,id:t=>t.key,source:t=>t.source,target:t=>t.target,sourceWeight:t=>t.value||1,targetWeight:t=>t.value||1,sortBy:null},iot={type:"polygon",axis:!1,legend:!1,encode:{shape:"polygon",x:"x",y:"y"},scale:{x:{type:"identity"},y:{type:"identity"}},style:{opacity:1,fillOpacity:1,lineWidth:1}},aot={type:"polygon",axis:!1,legend:!1,encode:{shape:"ribbon",x:"x",y:"y"},style:{opacity:.5,lineWidth:1}},oot={position:"outside",fontSize:10},xL=(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}=Ny(n,r),h=Pt(r,"node"),p=Pt(r,"link"),{key:v=k=>k.key,color:g=v}=h,{linkEncodeColor:y=k=>k.source}=p,{nodeWidthRatio:m=H1.thickness,nodePaddingRatio:b=H1.marginRatio}=o,x=bL(o,["nodeWidthRatio","nodePaddingRatio"]),{nodes:_,edges:O}=Y1(Object.assign(Object.assign(Object.assign(Object.assign({},H1),{id:Aa(v),thickness:m,marginRatio:b}),x),{weight:!0}))({nodes:f,edges:d}),w=Pt(a,"label"),{text:S=v}=w,M=bL(w,["text"]),E=Ma(u,"node",{title:"",items:[k=>({name:k.key,value:k.value})]},!0),P=Ma(u,"link",{title:"",items:[k=>({name:`${k.source} -> ${k.target}`,value:k.value})]}),{height:C,width:A}=e,T=Math.min(C,A);return[at({},aot,{data:O,encode:Object.assign(Object.assign({},p),{color:y}),labels:c,style:Object.assign({fill:y?void 0:"#aaa"},Pt(a,"link")),tooltip:P,animate:Ea(l,"link")}),at({},iot,{data:_,encode:Object.assign(Object.assign({},h),{color:g}),scale:i,style:Pt(a,"node"),coordinate:{type:"polar",outerRadius:(T-20)/T,startAngle:-Math.PI*2,endAngle:0},labels:[Object.assign(Object.assign(Object.assign({},oot),{text:S}),M),...s],tooltip:E,animate:Ea(l,"node"),axis:!1})]};xL.props={};var sot=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const cot=(t,e)=>({tile:"treemapSquarify",ratio:.5*(1+Math.sqrt(5)),size:[t,e],round:!1,ignoreParentValue:!0,padding:0,paddingInner:0,paddingOuter:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,sort:(n,r)=>r.value-n.value,layer:0}),lot=(t,e)=>({type:"rect",axis:!1,encode:{x:"x",y:"y",key:"id",color:n=>n.path[1]},scale:{x:{domain:[0,t],range:[0,1]},y:{domain:[0,e],range:[0,1]}},style:{stroke:"#fff"},state:{active:{opacity:.6},inactive:{opacity:1}}}),uot={fontSize:10,text:t=>Wu(t.path),position:"inside",fill:"#000",textOverflow:"clip",wordWrap:!0,maxLines:1,wordWrapWidth:t=>t.x1-t.x0},fot={title:t=>{var e,n;return(n=(e=t.path)===null||e===void 0?void 0:e.join)===null||n===void 0?void 0:n.call(e,".")},items:[{field:"value"}]},dot={title:t=>Wu(t.path),items:[{field:"value"}]},_L=(t,e)=>{const{width:n,height:r,options:i}=e,{data:a,encode:o={},scale:s,style:c={},layout:l={},labels:u=[],tooltip:f={}}=t,d=sot(t,["data","encode","scale","style","layout","labels","tooltip"]),h=Re(i,["interaction","treemapDrillDown"]),p=at({},cot(n,r),l,{layer:h?m=>m.depth===1:l.layer}),[v,g]=OC(a,p,o),y=Pt(c,"label");return at({},lot(n,r),Object.assign(Object.assign({data:v,scale:s,style:c,labels:[Object.assign(Object.assign({},uot),y),...u]},d),{encode:o,tooltip:jh(f,fot),axis:!1}),h?{interaction:Object.assign(Object.assign({},d.interaction),{treemapDrillDown:h?Object.assign(Object.assign({},h),{originData:g,layout:p}):void 0}),encode:Object.assign({color:m=>Wu(m.path)},o),tooltip:jh(f,dot)}:{})};_L.props={};function hot(){return{"data.arc":Y1,"data.cluster":J5,"mark.forceGraph":K5,"mark.tree":eL,"mark.pack":dL,"mark.sankey":mL,"mark.chord":xL,"mark.treemap":_L}}var OL=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function pot(t,e){return Oi(t,n=>e[n])}function vot(t,e){return Ke(t,n=>e[n])}function wL(t,e){const n=$1(t,e)*2.5-U1(t,e)*1.5;return Oi(t,r=>e[r]>=n?e[r]:NaN)}function $1(t,e){return vp(t,.25,n=>e[n])}function got(t,e){return vp(t,.5,n=>e[n])}function U1(t,e){return vp(t,.75,n=>e[n])}function SL(t,e){const n=U1(t,e)*2.5-$1(t,e)*1.5;return Ke(t,r=>e[r]<=n?e[r]:NaN)}function yot(){return(t,e)=>{const{encode:n}=e,{y:r,x:i}=n,{value:a}=r,{value:o}=i;return[Array.from(Ln(t,l=>o[+l]).values()).flatMap(l=>{const u=wL(l,a),f=SL(l,a);return l.filter(d=>a[d]<u||a[d]>f)}),e]}}const ML=t=>{const{data:e,encode:n,style:r={},tooltip:i={},transform:a,animate:o}=t,s=OL(t,["data","encode","style","tooltip","transform","animate"]),{point:c=!0}=r,l=OL(r,["point"]),{y:u}=n,f={y:u,y1:u,y2:u,y3:u,y4:u},d={y1:$1,y2:got,y3:U1},h=Ma(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=Ma(i,"point",{title:{channel:"x"},items:[{name:"outlier",channel:"y"}]});if(!c)return Object.assign({type:"box",data:e,transform:[Object.assign(Object.assign({type:"groupX",y:pot},d),{y4:vot})],encode:Object.assign(Object.assign({},n),f),style:l,tooltip:h},s);const v=Pt(l,"box"),g=Pt(l,"point");return[Object.assign({type:"box",data:e,transform:[Object.assign(Object.assign({type:"groupX",y:wL},d),{y4:SL})],encode:Object.assign(Object.assign({},n),f),style:v,tooltip:h,animate:Ea(o,"box")},s),{type:"point",data:e,transform:[{type:yot}],encode:n,style:Object.assign({},g),tooltip:p,animate:Ea(o,"point")}]};ML.props={};const EL=(t,e)=>Math.sqrt(Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2))/2,mot=(t,e)=>{if(!e)return;const{coordinate:n}=e;if(!(n!=null&&n.getCenter))return;const r=n.getCenter();return(i,a,o)=>{const{document:s}=e.canvas,{color:c,index:l}=a,u=s.createElement("g",{}),f=EL(i[0],i[1]),d=EL(i[0],r)*2,h=s.createElement("path",{style:Object.assign(Object.assign(Object.assign({d:[["M",...i[0]],["A",f,f,0,1,0,...i[1]],["A",d+f*2,d+f*2,0,0,0,...i[2]],["A",f,f,0,1,l===0?0:1,...i[3]],["A",d,d,0,0,1,...i[0]],["Z"]]},o),As(t,["shape","last","first"])),{fill:c||o.color})});return u.appendChild(h),u}};var Qp=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};const bot=(t,e)=>{const{shape:n,radius:r}=t,i=Qp(t,["shape","radius"]),a=Pt(i,"pointer"),o=Pt(i,"pin"),{shape:s}=a,c=Qp(a,["shape"]),{shape:l}=o,u=Qp(o,["shape"]),{coordinate:f,theme:d}=e;return(h,p)=>{const v=h.map(T=>f.invert(T)),[g,y,m]=yG(f,"polar"),b=f.clone(),{color:x}=p,_=ug({startAngle:g,endAngle:y,innerRadius:m,outerRadius:r});_.push(["cartesian"]),b.update({transformations:_});const O=v.map(T=>b.map(T)),[w,S]=Gg(O),[M,E]=f.getCenter(),P=Object.assign(Object.assign({x1:w,y1:S,x2:M,y2:E,stroke:x},c),i),C=Object.assign(Object.assign({cx:M,cy:E,stroke:x},u),i),A=Kt(new dr);return za(s)||(typeof s=="function"?A.append(()=>s(O,p,b,d)):A.append("line").call(Bt,P).node()),za(l)||(typeof l=="function"?A.append(()=>l(O,p,b,d)):A.append("circle").call(Bt,C).node()),A.node()}},PL={coordinate:{type:"radial",innerRadius:.9,outerRadius:1,startAngle:-11/10*Math.PI,endAngle:1/10*Math.PI},axis:{x:!1},legend:!1,tooltip:!1,encode:{x:"x",y:"y",color:"color"},scale:{color:{range:["#30BF78","#D0D0D0"]}}},xot={style:{shape:bot,lineWidth:4,pointerLineCap:"round",pinR:10,pinFill:"#fff",radius:.6}},_ot={type:"text",style:{x:"50%",y:"60%",textAlign:"center",textBaseline:"middle",fontSize:20,fontWeight:800,fill:"#888"}};function Oot(t){if(vn(t)){const e=Math.max(0,Math.min(t,1));return{percent:e,target:e,total:1}}return t}function wot(t,e){const{name:n="score",target:r,total:i,percent:a,thresholds:o=[]}=Oot(t),s=a||r,c=a?1:i,l=Object.assign({y:{domain:[0,c]}},e);return o.length?{targetData:[{x:n,y:s,color:"target"}],totalData:o.map((u,f)=>({x:n,y:f>=1?u-o[f-1]:u,color:f})),target:s,total:c,scale:l}:{targetData:[{x:n,y:s,color:"target"}],totalData:[{x:n,y:s,color:"target"},{x:n,y:c-s,color:"total"}],target:s,total:c,scale:l}}function Sot(t,{target:e,total:n}){const{content:r}=t;return r?r(e,n):e.toString()}const AL=t=>{const{data:e={},scale:n={},style:r={},animate:i={},transform:a=[]}=t,o=Qp(t,["data","scale","style","animate","transform"]),{targetData:s,totalData:c,target:l,total:u,scale:f}=wot(e,n),d=Pt(r,"text"),h=Kz(r,["pointer","pin"]),p=Pt(r,"arc"),v=p.shape;return[at({},PL,Object.assign({type:"interval",transform:[{type:"stackY"}],data:c,scale:f,style:v==="round"?Object.assign(Object.assign({},p),{shape:mot}):p,animate:typeof i=="object"?Pt(i,"arc"):i},o)),at({},PL,xot,Object.assign({type:"point",data:s,scale:f,style:h,animate:typeof i=="object"?Pt(i,"indicator"):i},o)),at({},_ot,{style:Object.assign({text:Sot(d,{target:l,total:u})},d),animate:typeof i=="object"?Pt(i,"text"):i})]};AL.props={};const TL=5e3;function kL(t,e,n){return t+(e-t)*n}function Mot(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 Eot(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=Mot(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 Pot(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=Eot(s,o+s*n,c,0,s/40,t,e),y=u.createElement("path",{style:{d:g,fill:f,opacity:kL(.2,.9,v)*Number(h||d)}});a.appendChild(y);try{if(l===!1)return;const m=[{transform:"translate(0, 0)"},{transform:`translate(${c*2}, 0)`}];y.animate(m,{duration:kL(.5*TL,TL,v)*2,iterations:1/0})}catch(m){console.warn("off-screen group animate error!")}}}function Aot(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 Tot(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 kot(t,e,n){return`
|
|
M ${t} ${e-n}
|
|
L ${t+n} ${e}
|
|
L ${t} ${e+n}
|
|
L ${t-n} ${e}
|
|
Z
|
|
`}function Cot(t,e,n){return`
|
|
M ${t} ${e-n}
|
|
L ${t+n} ${e+n}
|
|
L ${t-n} ${e+n}
|
|
Z
|
|
`}function Lot(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 CL={pin:Lot,rect:Tot,circle:Aot,diamond:kot,triangle:Cot};var LL=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);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 Not=(t="circle")=>CL[t]||CL.circle,NL=(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=LL(i,["background","outline","wave"]),{border:f=2,distance:d=0}=c,h=LL(c,["border","distance"]),{length:p=192,count:v=3}=l;return(g,y,m)=>{const{document:b}=e.canvas,{color:x,fillOpacity:_}=m,O=Object.assign(Object.assign({fill:x},m),u),w=b.createElement("g",{}),[S,M]=n.getCenter(),E=n.getSize(),P=Math.min(...E)/2,A=(Kr(a)?a:Not(a))(S,M,P,...E);if(Object.keys(s).length){const N=b.createElement("path",{style:Object.assign({d:A,fill:"#fff"},s)});w.appendChild(N)}if(o>0){const N=b.createElement("path",{style:{d:A}});w.appendChild(N),w.style.clipPath=N,Pot(S,M,1-o,v,O,w,N.getBBox().y,P*2,p,!0,b)}const T=b.createElement("path",{style:{d:A,fill:"transparent",lineWidth:f+2*d,stroke:"#fff"}}),k=b.createElement("path",{style:Object.assign(Object.assign(Object.assign({d:A,stroke:x,strokeOpacity:_,lineWidth:f},O),h),{fill:"transparent"})});return w.appendChild(T),w.appendChild(k),w}};NL.props={};var jot=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);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 Rot={axis:{x:!1,y:!1},legend:!1,tooltip:!1,encode:{x:"type",y:"percent"},scale:{y:{domain:[0,1]}},style:{shape:NL},animate:{enter:{type:"fadeIn"}}},Iot={type:"text",style:{x:"50%",y:"50%",textAlign:"center",textBaseline:"middle",fontSize:20,fontWeight:800,fill:"#888"},animate:{enter:{type:"fadeIn"}}},jL=t=>{const{data:e={},style:n={},animate:r}=t,i=jot(t,["data","style","animate"]),a=Math.max(0,vn(e)?e:e==null?void 0:e.percent),o=[{percent:a,type:"liquid"}],s=Object.assign(Object.assign({},Pt(n,"text")),Pt(n,"content")),c=Pt(n,"outline"),l=Pt(n,"wave"),u=Pt(n,"background");return[at({},Rot,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)),at({},Iot,{style:Object.assign({text:`${Ud(a*100)} %`},s),animate:r})]};jL.props={};var Qa=tt(69916);const RL=1e-10;function IL(t,e){const n=Fot(t),r=n.filter(function(c){return Dot(c,t)});let i=0,a=0,o;const s=[];if(r.length>1){const c=Bot(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=wf(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+=V1(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(wf(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-RL,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 Dot(t,e){for(let n=0;n<e.length;++n)if(wf(t,e[n])>e[n].radius+RL)return!1;return!0}function Fot(t){const e=[];for(let n=0;n<t.length;++n)for(let r=n+1;r<t.length;++r){const i=FL(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 V1(t,e){return t*t*Math.acos(1-e/t)-(t-e)*Math.sqrt(e*(2*t-e))}function wf(t,e){return Math.sqrt((t.x-e.x)*(t.x-e.x)+(t.y-e.y)*(t.y-e.y))}function DL(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 V1(t,r)+V1(e,i)}function FL(t,e){const n=wf(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 Bot(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 zot(t,e){e=e||{},e.maxIterations=e.maxIterations||500;const n=e.initialLayout||Hot,r=e.lossFunction||q1;t=Got(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,Qa.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 BL=1e-10;function X1(t,e,n){return Math.min(t,e)*Math.min(t,e)*Math.PI<=n+BL?Math.abs(t-e):(0,Qa.bisect)(function(r){return DL(t,e,r)-n},0,t+e)}function Got(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 Wot(t,e,n){const r=(0,Qa.zerosM)(e.length,e.length),i=(0,Qa.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=X1(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 Yot(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 Hot(t,e){let n=Uot(t,e);const r=e.lossFunction||q1;if(t.length>=8){const i=$ot(t,e),a=r(i,t),o=r(n,t);a+1e-8<o&&(n=i)}return n}function $ot(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=Wot(t,r,i);let s=o.distances;const c=o.constraints,l=(0,Qa.norm2)(s.map(Qa.norm2))/s.length;s=s.map(function(v){return v.map(function(g){return g/l})});const u=function(v,g){return Yot(v,g,s,c)};let f,d;for(a=0;a<n;++a){const v=(0,Qa.zeros)(s.length*2).map(Math.random);d=(0,Qa.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,Qa.scale)(e.history[a].x,l);return p}function Uot(t,e){const n=e&&e.lossFunction?e.lossFunction:q1,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+BL>=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=X1(a.radius,m.radius,h[y].size);p.push({x:m.x+b,y:m.y}),p.push({x:m.x-b,y:m.y}),p.push({y:m.y+b,x:m.x}),p.push({y:m.y-b,x:m.x});for(let x=y+1;x<h.length;++x){const _=r[h[x].set],O=X1(a.radius,_.radius,h[x].size),w=FL({x:m.x,y:m.y,radius:b},{x:_.x,y:_.y,radius:O});for(let S=0;S<w.length;++S)p.push(w[S])}}let v=1e50,g=p[0];for(let y=0;y<p.length;++y){r[d].x=p[y].x,r[d].y=p[y].y;const m=n(r,t);m<v&&(v=m,g=p[y])}u(g,d)}return r}function q1(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=DL(c.radius,l.radius,wf(c,l))}else o=IL(r(a.sets));const s=a.hasOwnProperty("weight")?a.weight:1;n+=s*(o-a.size)*(o-a.size)}return n}function Vot(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 Xot(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 Z1(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 qgt(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=Xot(r);for(i=0;i<o.length;++i){Vot(o[i],e,n);const d=Z1(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=Z1(r);const f={};for(i=0;i<r.length;++i)f[r[i].setid]=r[i];return f}function qot(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=Z1(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 Zot(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 Kot(t){const e={};IL(t,e);const n=e.arcs;if(n.length===0)return"M 0 0";if(n.length==1){const r=n[0].circle;return Zot(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 zL=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=zot(c);let u;return c.map(f=>{const d=f[e],h=({width:p,height:v})=>{u=u||qot(l,p,v,i);const g=d.map(m=>u[m]);let y=Kot(g);return/[zZ]$/.test(y)||(y+=" Z"),y};return Object.assign(Object.assign({},f),{[o]:h})})}};zL.props={};function Qot(){return{"data.venn":zL,"mark.boxplot":ML,"mark.gauge":AL,"mark.wordCloud":nm,"mark.liquid":jL}}function Jot(){return Object.assign(Object.assign(Object.assign(Object.assign({},uit()),hot()),Qot()),ort())}var Jp=function(){return Jp=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},Jp.apply(this,arguments)},tst=Nq(Lq,Jp(Jp({},Jot()),yZ())),est="[object Boolean]";function nst(t){return t===!0||t===!1||ii(t)&&_r(t)==est}var K1=nst,Sf=function(){return Sf=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},Sf.apply(this,arguments)},rst=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n},ist=["renderer"],GL=["width","height","autoFit","theme","inset","insetLeft","insetRight","insetTop","insetBottom","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","margin","marginTop","marginRight","marginBottom","marginLeft","depth","title","clip","children","type","data","direction"],Q1="__transform__",ast="__skipDelCustomKeys__",$s=function(t,e){return K1(e)?{type:t,available:e}:Sf({type:t},e)},J1={xField:"encode.x",yField:"encode.y",colorField:"encode.color",angleField:"encode.y",keyField:"encode.key",sizeField:"encode.size",shapeField:"encode.shape",seriesField:"encode.series",positionField:"encode.position",textField:"encode.text",valueField:"encode.value",binField:"encode.x",srcField:"encode.src",linkColorField:"encode.linkColor",fontSizeField:"encode.fontSize",radius:"coordinate.outerRadius",innerRadius:"coordinate.innerRadius",startAngle:"coordinate.startAngle",endAngle:"coordinate.endAngle",focusX:"coordinate.focusX",focusY:"coordinate.focusY",distortionX:"coordinate.distortionX",distortionY:"coordinate.distortionY",visual:"coordinate.visual",stack:{target:"transform",value:function(t){return $s("stackY",t)}},normalize:{target:"transform",value:function(t){return $s("normalizeY",t)}},percent:{target:"transform",value:function(t){return $s("normalizeY",t)}},group:{target:"transform",value:function(t){return $s("dodgeX",t)}},sort:{target:"transform",value:function(t){return $s("sortX",t)}},symmetry:{target:"transform",value:function(t){return $s("symmetryY",t)}},diff:{target:"transform",value:function(t){return $s("diffY",t)}},meta:{target:"scale",value:function(t){return t}},label:{target:"labels",value:function(t){return t}},shape:"style.shape",connectNulls:{target:"style",value:function(t){return K1(t)?{connect:t}:t}}},tb=["xField","yField","seriesField","colorField","keyField","positionField","meta","tooltip","animate","stack","normalize","percent","group","sort","symmetry","diff"],t0=[{key:"annotations",extend_keys:[]},{key:"line",type:"line",extend_keys:tb},{key:"point",type:"point",extend_keys:tb},{key:"area",type:"area",extend_keys:tb}],ost=[{key:"transform",callback:function(t,e,n){var r;t[e]=t[e]||[];var i=n.available,a=i===void 0?!0:i,o=rst(n,["available"]);if(a)t[e].push(Sf((r={},r[Q1]=!0,r),o));else{var s=t[e].indexOf(function(c){return c.type===n.type});s!==-1&&t[e].splice(s,1)}}},{key:"labels",callback:function(t,e,n){var r;if(!n||Xt(n)){t[e]=n||[];return}n.text||(n.text=t.yField),t[e]=t[e]||[],t[e].push(Sf((r={},r[Q1]=!0,r),n))}}],eb=[{key:"conversionTag",shape:"ConversionTag"},{key:"axisText",shape:"BidirectionalBarAxisText"}],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)}}(),e0=function(){return e0=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},e0.apply(this,arguments)},cst=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n},lst=function(t){sst(e,t);function e(n){n===void 0&&(n={});var r=n.style,i=cst(n,["style"]);return t.call(this,e0({style:e0({fill:"#eee"},r)},i))||this}return e}(Ql),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)}}(),n0=function(){return n0=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},n0.apply(this,arguments)},fst=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n},WL=function(t){ust(e,t);function e(n){n===void 0&&(n={});var r=n.style,i=fst(n,["style"]);return t.call(this,n0({style:n0({text:"",fontSize:12,textBaseline:"middle",textAlign:"center",fill:"#000",fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",lineWidth:1},r)},i))||this}return e}(fi);function dst(t,e,n){(n!==void 0&&!xn(t[e],n)||n===void 0&&!(e in t))&&Bf(t,e,n)}var nb=dst;function hst(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 pst=hst,vst=pst(),YL=vst;function gst(t){return ii(t)&&ao(t)}var yst=gst,mst="[object Object]",bst=Function.prototype,xst=Object.prototype,HL=bst.toString,_st=xst.hasOwnProperty,Ost=HL.call(Object);function wst(t){if(!ii(t)||_r(t)!=mst)return!1;var e=C0(t);if(e===null)return!0;var n=_st.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&HL.call(n)==Ost}var rb=wst;function Sst(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}var ib=Sst;function Mst(t){return ts(t,kl(t))}var Est=Mst;function Pst(t,e,n,r,i,a,o){var s=ib(t,n),c=ib(e,n),l=o.get(c);if(l){nb(t,n,l);return}var u=a?a(s,c,n+"",t,e,o):void 0,f=u===void 0;if(f){var d=Xt(c),h=!d&&El(c),p=!d&&!h&&M0(c);u=c,d||h||p?Xt(s)?u=s:yst(s)?u=k0(s):h?(f=!1,u=tx(c,!0)):p?(f=!1,u=ax(c,!0)):u=[]:rb(c)||Ml(c)?(u=s,Ml(s)?u=Est(s):(!bn(s)||Yt(s))&&(u=sx(c))):f=!1}f&&(o.set(c,u),i(u,c,r,a,o),o.delete(c)),nb(t,n,u)}var Ast=Pst;function $L(t,e,n,r,i){t!==e&&YL(e,function(a,o){if(i||(i=new rc),bn(a))Ast(t,e,o,n,$L,r,i);else{var s=r?r(ib(t,o),a,o+"",t,e,i):void 0;s===void 0&&(s=a),nb(t,o,s)}},kl)}var Tst=$L;function kst(t){return t}var ab=kst;function Cst(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 Lst=Cst,UL=Math.max;function Nst(t,e,n){return e=UL(e===void 0?t.length-1:e,0),function(){for(var r=arguments,i=-1,a=UL(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),Lst(t,this,s)}}var VL=Nst;function jst(t){return function(){return t}}var Rst=jst,Ist=Ff?function(t,e){return Ff(t,"toString",{configurable:!0,enumerable:!1,value:Rst(e),writable:!0})}:ab,Dst=Ist,Fst=800,Bst=16,zst=Date.now;function Gst(t){var e=0,n=0;return function(){var r=zst(),i=Bst-(r-n);if(n=r,i>0){if(++e>=Fst)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var Wst=Gst,Yst=Wst(Dst),XL=Yst;function Hst(t,e){return XL(VL(t,e,ab),t+"")}var $st=Hst;function Ust(t,e,n){if(!bn(n))return!1;var r=typeof e;return(r=="number"?ao(n)&&Rf(e,n.length):r=="string"&&e in n)?xn(n[e],t):!1}var Vst=Ust;function Xst(t){return $st(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&&Vst(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 qL=Xst,qst=qL(function(t,e,n,r){Tst(t,e,n,r)}),Zst=qst,ZL=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))},Kst=function(t,e){if(Xt(e))return e},Go=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Zst.apply(void 0,ZL(ZL([],t,!1),[Kst],!1))},Qst=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)}}(),KL=function(t){Qst(e,t);function e(n,r,i){var a=t.call(this,{style:Go(i,r)})||this;return a.chart=n,a}return e.prototype.connectedCallback=function(){this.render(this.attributes,this),this.bindEvents(this.attributes,this)},e.prototype.disconnectedCallback=function(){},e.prototype.attributeChangedCallback=function(n){},e.prototype.update=function(n,r){var i;return this.attr(Go({},this.attributes,n||{})),(i=this.render)===null||i===void 0?void 0:i.call(this,this.attributes,this,r)},e.prototype.clear=function(){this.removeChildren()},e.prototype.getElementsLayout=function(){var n=this.chart.getContext().canvas,r=n.document.getElementsByClassName("element"),i=[];return r.forEach(function(a){var o=a.getBBox(),s=o.x,c=o.y,l=o.width,u=o.height,f=a.__data__;i.push({bbox:o,x:s,y:c,width:l,height:u,key:f.key,data:f})}),i},e.prototype.bindEvents=function(n,r){},e}(_d),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)}}(),r0=function(){return r0=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},r0.apply(this,arguments)},tct=function(t){Jst(e,t);function e(n,r){return t.call(this,n,r,{type:e.tag})||this}return e.prototype.getConversionTagLayout=function(){var n=this.direction==="vertical",r=this.getElementsLayout(),i=r[0],a=i.x,o=i.y,s=i.height,c=i.width,l=i.data,u=["items",0,"value"],f=pn(l,u),d=n?r[1].y-o-s:r[1].x-a-c,h=[],p=this.attributes,v=p.size,g=v===void 0?40:v,y=p.arrowSize,m=y===void 0?20:y,b=p.spacing,x=b===void 0?4:b;return r.forEach(function(_,O){if(O>0){var w=_.x,S=_.y,M=_.height,E=_.width,P=_.data,C=_.key,A=pn(P,u),T=g/2;if(n){var k=w+E/2,N=S;h.push({points:[[k+T,N-d+x],[k+T,N-m-x],[k,N-x],[k-T,N-m-x],[k-T,N-d+x]],center:[k,N-d/2-x],width:d,value:[f,A],key:C})}else{var k=w,N=S+M/2;h.push({points:[[w-d+x,N-T],[w-m-x,N-T],[k-x,N],[w-m-x,N+T],[w-d+x,N+T]],center:[k-d/2-x,N],width:d,value:[f,A],key:C})}f=A}}),h},e.prototype.render=function(){this.setDirection(),this.drawConversionTag()},e.prototype.setDirection=function(){var n=this.chart.getCoordinate(),r=pn(n,"options.transformations"),i="horizontal";r.forEach(function(a){a.includes("transpose")&&(i="vertical")}),this.direction=i},e.prototype.drawConversionTag=function(){var n=this,r=this.getConversionTagLayout(),i=this.attributes,a=i.style,o=i.text,s=o.style,c=o.formatter;r.forEach(function(l){var u=l.points,f=l.center,d=l.value,h=l.key,p=d[0],v=d[1],g=f[0],y=f[1],m=new lst({style:r0({points:u,fill:"#eee"},a),id:"polygon-".concat(h)}),b=new WL({style:r0({x:g,y,text:Yt(c)?c(p,v):(v/p*100).toFixed(2)+"%"},s),id:"text-".concat(h)});n.appendChild(m),n.appendChild(b)})},e.prototype.update=function(){var n=this,r=this.getConversionTagLayout();r.forEach(function(i){var a=i.points,o=i.center,s=i.key,c=o[0],l=o[1],u=n.getElementById("polygon-".concat(s)),f=n.getElementById("text-".concat(s));u.setAttribute("points",a),f.setAttribute("x",c),f.setAttribute("y",l)})},e.tag="ConversionTag",e}(KL),ect=1,nct=2;function rct(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 rc;if(r)var d=r(l,u,c,t,e,f);if(!(d===void 0?T0(u,l,ect|nct,r,f):d))return!1}}return!0}var ict=rct;function act(t){return t===t&&!bn(t)}var QL=act;function oct(t){for(var e=Qo(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,QL(i)]}return e}var sct=oct;function cct(t,e){return function(n){return n==null?!1:n[t]===e&&(e!==void 0||t in Object(n))}}var JL=cct;function lct(t){var e=sct(t);return e.length==1&&e[0][2]?JL(e[0][0],e[0][1]):function(n){return n===t||ict(n,t,e)}}var uct=lct;function fct(t,e){return t!=null&&e in Object(t)}var dct=fct;function hct(t,e,n){e=oc(e,t);for(var r=-1,i=e.length,a=!1;++r<i;){var o=sc(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&&O0(i)&&Rf(o,i)&&(Xt(t)||Ml(t)))}var pct=hct;function vct(t,e){return t!=null&&pct(t,e,dct)}var tN=vct,gct=1,yct=2;function mct(t,e){return j0(t)&&QL(e)?JL(sc(t),e):function(n){var r=pn(n,t);return r===void 0&&r===e?tN(n,t):T0(e,r,gct|yct)}}var bct=mct;function xct(t){return function(e){return e==null?void 0:e[t]}}var _ct=xct;function Oct(t){return function(e){return Yf(e,t)}}var wct=Oct;function Sct(t){return j0(t)?_ct(sc(t)):wct(t)}var Mct=Sct;function Ect(t){return typeof t=="function"?t:t==null?ab:typeof t=="object"?Xt(t)?bct(t[0],t[1]):uct(t):Mct(t)}var ob=Ect;function Pct(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 Act=Pct;function Tct(t){return t!==t}var kct=Tct;function Cct(t,e,n){for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}var Lct=Cct;function Nct(t,e,n){return e===e?Lct(t,e,n):Act(t,kct,n)}var eN=Nct;function jct(t,e){var n=t==null?0:t.length;return!!n&&eN(t,e,0)>-1}var Rct=jct;function Ict(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 Dct=Ict;function Fct(){}var nN=Fct,Bct=1/0,zct=ac&&1/m0(new ac([,-0]))[1]==Bct?function(t){return new ac(t)}:nN,Gct=zct,Wct=200;function Yct(t,e,n){var r=-1,i=Rct,a=t.length,o=!0,s=[],c=s;if(n)o=!1,i=Dct;else if(a>=Wct){var l=e?null:Gct(t);if(l)return m0(l);o=!1,i=Mb,c=new Sb}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 Hct=Yct;function $ct(t,e){return t&&t.length?Hct(t,ob(e,2)):[]}var sb=$ct;function Uct(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 Vct=Uct;function Xct(t,e){return t&&YL(t,e,Qo)}var qct=Xct;function Zct(t,e){return function(n,r){if(n==null)return n;if(!ao(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 Kct=Zct,Qct=Kct(qct),rN=Qct;function Jct(t,e,n,r){return rN(t,function(i,a,o){e(r,i,n(i),o)}),r}var tlt=Jct;function elt(t,e){return function(n,r){var i=Xt(n)?Vct:tlt,a=e?e():{};return i(n,t,ob(r,2),a)}}var nlt=elt,rlt=Object.prototype,ilt=rlt.hasOwnProperty,alt=nlt(function(t,e,n){ilt.call(t,n)?t[n].push(e):Bf(t,n,[e])}),iN=alt,cb=32,aN=16,oN=48,olt=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)}}(),Mf=function(){return Mf=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},Mf.apply(this,arguments)},slt=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n},clt=function(t){olt(e,t);function e(n,r){return t.call(this,n,r,{type:e.tag})||this}return e.prototype.render=function(){this.drawText()},e.prototype.getBidirectionalBarAxisTextLayout=function(){var n=this.attributes.layout,r=n==="vertical",i=this.getElementsLayout(),a=r?sb(i,"x"):sb(i,"y"),o=["title"],s=[],c=this.chart.getContext().views,l=pn(c,[0,"layout"]),u=l.width,f=l.height;return a.forEach(function(d){var h=d.x,p=d.y,v=d.height,g=d.width,y=d.data,m=d.key,b=pn(y,o);r?s.push({x:h+g/2,y:f,text:b,key:m}):s.push({x:u,y:p+v/2,text:b,key:m})}),sb(s,"text").length!==s.length&&(s=Object.values(iN(s,"text")).map(function(d){var h,p=d.reduce(function(v,g){return v+(r?g.x:g.y)},0);return Mf(Mf({},d[0]),(h={},h[r?"x":"y"]=p/d.length,h))})),s},e.prototype.transformLabelStyle=function(n){var r={},i=/^label[A-Z]/;return Object.keys(n).forEach(function(a){i.test(a)&&(r[a.replace("label","").replace(/^[A-Z]/,function(o){return o.toLowerCase()})]=n[a])}),r},e.prototype.drawText=function(){var n=this,r=this.getBidirectionalBarAxisTextLayout(),i=this.attributes,a=i.layout,o=i.labelFormatter,s=slt(i,["layout","labelFormatter"]);r.forEach(function(c){var l=c.x,u=c.y,f=c.text,d=c.key,h=new WL({style:Mf({x:l,y:u,text:Yt(o)?o(f):f,wordWrap:!0,wordWrapWidth:a==="horizontal"?cb*2:120,maxLines:2,textOverflow:"ellipsis"},n.transformLabelStyle(s)),id:"text-".concat(d)});n.appendChild(h)})},e.prototype.update=function(){var n=this,r=this.getBidirectionalBarAxisTextLayout();r.forEach(function(i){var a=i.x,o=i.y,s=i.key,c=n.getElementById("text-".concat(s));c.setAttribute("x",a),c.setAttribute("y",o)})},e.tag="BidirectionalBarAxisText",e}(KL),llt={ConversionTag:tct,BidirectionalBarAxisText:clt},ult=function(){function t(e,n){this.container=new Map,this.chart=e,this.config=n,this.init()}return t.prototype.init=function(){var e=this;eb.forEach(function(n){var r,i=n.key,a=n.shape,o=e.config[i];if(o){var s=new llt[a](e.chart,o),c=e.chart.getContext().canvas;c.appendChild(s),e.container.set(i,s)}else(r=e.container.get(i))===null||r===void 0||r.clear()})},t.prototype.update=function(){var e=this;this.container.size&&eb.forEach(function(n){var r=n.key,i=e.container.get(r);i==null||i.update()})},t}();function flt(t,e,n,r){if(!bn(t))return t;e=oc(e,t);for(var i=-1,a=e.length,o=a-1,s=t;s!=null&&++i<a;){var c=sc(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=bn(u)?u:Rf(e[i+1])?[]:{})}zf(s,c,l),s=s[c]}return t}var sN=flt;function dlt(t,e,n){for(var r=-1,i=e.length,a={};++r<i;){var o=e[r],s=Yf(t,o);n(s,o)&&sN(a,oc(o,t),s)}return a}var hlt=dlt;function plt(t,e){return hlt(t,e,function(n,r){return tN(t,r)})}var vlt=plt,cN=Jn?Jn.isConcatSpreadable:void 0;function glt(t){return Xt(t)||Ml(t)||!!(cN&&t&&t[cN])}var ylt=glt;function lN(t,e,n,r,i){var a=-1,o=t.length;for(n||(n=ylt),i||(i=[]);++a<o;){var s=t[a];e>0&&n(s)?e>1?lN(s,e-1,n,r,i):x0(i,s):r||(i[i.length]=s)}return i}var mlt=lN;function blt(t){var e=t==null?0:t.length;return e?mlt(t,1):[]}var xlt=blt;function _lt(t){return XL(VL(t,void 0,xlt),t+"")}var lb=_lt,Olt=lb(function(t,e){return t==null?{}:vlt(t,e)}),uN=Olt,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)}}(),pl=function(){return pl=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},pl.apply(this,arguments)},fN="data-chart-source-type",ze=function(t){wlt(e,t);function e(n,r){var i=t.call(this)||this;return i.container=typeof n=="string"?document.getElementById(n):n,i.options=i.mergeOption(r),i.createG2(),i.bindEvents(),i}return e.prototype.getChartOptions=function(){return pl(pl({},uN(this.options,ist)),{container:this.container})},e.prototype.getSpecOptions=function(){return this.type==="base"||this[ast]?pl(pl({},this.options),this.getChartOptions()):this.options},e.prototype.createG2=function(){if(!this.container)throw Error("The container is not initialized!");this.chart=new tst(this.getChartOptions()),this.container.setAttribute(fN,"Ant Design Charts")},e.prototype.bindEvents=function(){var n=this;this.chart&&this.chart.on("*",function(r){r!=null&&r.type&&n.emit(r.type,r)})},e.prototype.getBaseOptions=function(){return{type:"view",autoFit:!0}},e.prototype.getDefaultOptions=function(){},e.prototype.render=function(){var n=this;this.type!=="base"&&this.execAdaptor(),this.chart.options(this.getSpecOptions()),this.chart.render().then(function(){n.annotation=new ult(n.chart,n.options)}),this.bindSizeSensor()},e.prototype.update=function(n){this.options=this.mergeOption(n)},e.prototype.mergeOption=function(n){return Go({},this.getBaseOptions(),this.getDefaultOptions(),n)},e.prototype.changeData=function(n){this.chart.changeData(n)},e.prototype.changeSize=function(n,r){this.chart.changeSize(n,r)},e.prototype.destroy=function(){this.chart.destroy(),this.off(),this.container.removeAttribute(fN)},e.prototype.execAdaptor=function(){var n=this.getSchemaAdaptor();n({chart:this.chart,options:this.options})},e.prototype.triggerResize=function(){this.chart.forceFit()},e.prototype.bindSizeSensor=function(){var n=this,r=this.options.autoFit,i=r===void 0?!0:r;i&&this.chart.on(Ze.AFTER_CHANGE_SIZE,function(){n.annotation.update()})},e}(B0),Slt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Mlt=function(t){Slt(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type="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}(ze);function Elt(){}var ub=Elt;function i0(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=void 0}i0.prototype=N0(ub.prototype),i0.prototype.constructor=i0;var Ef=i0,Plt=Al&&new Al,dN=Plt,Alt=dN?function(t){return dN.get(t)}:nN,hN=Alt,Tlt={},pN=Tlt,klt=Object.prototype,Clt=klt.hasOwnProperty;function Llt(t){for(var e=t.name+"",n=pN[e],r=Clt.call(pN,e)?n.length:0;r--;){var i=n[r],a=i.func;if(a==null||a==t)return i.name}return e}var a0=Llt,Nlt=4294967295;function o0(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Nlt,this.__views__=[]}o0.prototype=N0(ub.prototype),o0.prototype.constructor=o0;var fb=o0;function jlt(t){if(t instanceof fb)return t.clone();var e=new Ef(t.__wrapped__,t.__chain__);return e.__actions__=k0(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var Rlt=jlt,Ilt=Object.prototype,Dlt=Ilt.hasOwnProperty;function s0(t){if(ii(t)&&!Xt(t)&&!(t instanceof fb)){if(t instanceof Ef)return t;if(Dlt.call(t,"__wrapped__"))return Rlt(t)}return new Ef(t)}s0.prototype=ub.prototype,s0.prototype.constructor=s0;var Flt=s0;function Blt(t){var e=a0(t),n=Flt[e];if(typeof n!="function"||!(e in fb.prototype))return!1;if(t===n)return!0;var r=hN(n);return!!r&&t===r[0]}var vN=Blt,zlt="Expected a function",Glt=8,Wlt=32,Ylt=128,Hlt=256;function $lt(t){return lb(function(e){var n=e.length,r=n,i=Ef.prototype.thru;for(t&&e.reverse();r--;){var a=e[r];if(typeof a!="function")throw new TypeError(zlt);if(i&&!o&&a0(a)=="wrapper")var o=new Ef([],!0)}for(r=o?r:n;++r<n;){a=e[r];var s=a0(a),c=s=="wrapper"?hN(a):void 0;c&&vN(c[0])&&c[1]==(Ylt|Glt|Wlt|Hlt)&&!c[4].length&&c[9]==1?o=o[a0(c[0])].apply(o,c[3]):o=a.length==1&&vN(a)?o[s]():o.thru(a)}return function(){var l=arguments,u=l[0];if(o&&l.length==1&&Xt(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 Ult=$lt,Vlt=Ult(),Ue=Vlt,Xlt=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){Xt(i[a])&&a!=="data"&&(i[a]=i[a].filter(function(o){return!o[Q1]}))})}),e};function qlt(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}var Zlt=qlt;function Klt(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 Qlt=Klt;function Jlt(t,e){return e.length<2?t:Yf(t,Qlt(e,0,-1))}var tut=Jlt;function eut(t,e){return e=oc(e,t),t=tut(t,e),t==null||delete t[sc(Zlt(e))]}var nut=eut;function rut(t){return rb(t)?void 0:t}var iut=rut,aut=1,out=2,sut=4,cut=lb(function(t,e){var n={};if(t==null)return n;var r=!1;e=Wf(e,function(a){return a=oc(a,t),r||(r=a.length>1),a}),ts(t,nx(t),n),r&&(n=hx(n,aut|out|sut,iut));for(var i=e.length;i--;)nut(n,e[i]);return n}),db=cut;function lut(t){return t===void 0}var uut=lut;function fut(t,e,n){return t==null?t:sN(t,e,n)}var qt=fut,gN=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))},dut=function(t){var e=t.children,n=e===void 0?[]:e,r=Object.keys(J1).concat(t0.map(function(i){return i.key}));return r.forEach(function(i){delete t[i]}),n.forEach(function(i){Object.keys(i).forEach(function(a){r.includes(a)&&delete i[a]})}),Object.keys(t).forEach(function(i){gN(gN([],GL,!0),eb.map(function(a){return a.key}),!0).includes(i)||delete t[i]}),t},Qe=function(t){var e=Xlt(t),n=e.children,r=n===void 0?[]:n,i=db(e,[].concat(GL,t0.map(function(l){return l.key}))),a=function(l){var u;return(u=ost.find(function(f){return f.key===l}))===null||u===void 0?void 0:u.callback},o=function(l,u,f){var d=a(u);d?d(l,u,f):l[u]=Go({},l[u],f)},s=function(l){Object.keys(l).forEach(function(u){if(l[u]){var f=t0.find(function(p){return p.key===u});if(f){var d=f.type,h=f.extend_keys;d?r.push(c(Go({},uN(l,h),{type:d},l[u]))):Xt(l[u])&&l[u].forEach(function(p){r.push(c(p))})}}})},c=function(l){return s(l),Object.keys(J1).forEach(function(u){var f=J1[u];if(!uut(l[u]))if(bn(f)){var d=f.value,h=f.target,p=d(l[u]);o(l,h,p)}else qt(l,f,l[u])}),l};return r.forEach(function(l){var u=Go({},i,l);c(Go(l,u))}),s(e),dut(e),t},hb=function(){return hb=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},hb.apply(this,arguments)};function hut(t){var e=t.options,n=e.stack,r=e.tooltip,i=e.xField;if(!n)return t;var a=t0.map(function(s){return s.type}).filter(function(s){return!!s}),o=!1;return a.forEach(function(s){e[s]&&(o=!0,qt(e,[s,"stack"],hb({y1:"y"},typeof n=="object"?n:{})))}),o&&!K1(r)&&!r&&qt(e,"tooltip",{title:i,items:[{channel:"y"}]}),t}function Hn(t){return Ue(hut)(t)}function put(t){return Ue(Hn,Qe)(t)}var vut=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)}}(),gut=function(t){vut(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 put},e}(ze),vl=function(){return vl=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},vl.apply(this,arguments)};function yN(t){var e=function(n){var r=n.options;pn(r,"children.length")>1&&qt(r,"children",[{type:"interval"}]);var i=r.scale,a=r.markBackground,o=r.data,s=r.children,c=r.yField,l=pn(i,"y.domain",[]);if(a&&l.length&&Xt(o)){var u="domainMax",f=o.map(function(d){var h;return vl(vl({originData:vl({},d)},db(d,c)),(h={},h[u]=l[l.length-1],h))});s.unshift(vl({type:"interval",data:f,yField:u,tooltip:!1,style:{fill:"#eee"},label:!1},a))}return n};return Ue(e,Hn,Qe)(t)}var yut=function(){var t=function(e,n){return function(r){var i=e.fill,a=i===void 0?"#2888FF":i,o=e.stroke,s=e.fillOpacity,c=s===void 0?1:s,l=e.strokeOpacity,u=l===void 0?.2:l,f=e.pitch,d=f===void 0?8:f,h=r[0],p=r[1],v=r[2],g=r[3],y=(p[1]-h[1])/2,m=n.document,b=m.createElement("g",{}),x=m.createElement("polygon",{style:{points:[h,[h[0]-d,h[1]+y],[v[0]-d,h[1]+y],g],fill:a,fillOpacity:c,stroke:o,strokeOpacity:u,inset:30}}),_=m.createElement("polygon",{style:{points:[[h[0]-d,h[1]+y],p,v,[v[0]-d,h[1]+y]],fill:a,fillOpacity:c,stroke:o,strokeOpacity:u}}),O=m.createElement("polygon",{style:{points:[h,[h[0]-d,h[1]+y],p,[h[0]+d,h[1]+y]],fill:a,fillOpacity:c-.2}});return b.appendChild(x),b.appendChild(_),b.appendChild(O),b}};wx("shape.interval.bar25D",t)},mut=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();yut();var but=function(t){mut(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 yN},e}(ze),xut=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}};wx("shape.interval.column25D",t)},_ut=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)}}();xut();var Out=function(t){_ut(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 yN},e}(ze);function wut(t){var e=function(r){var i=r.options,a=i.children,o=a===void 0?[]:a,s=i.legend;return s&&o.forEach(function(c){if(!pn(c,"colorField")){var l=pn(c,"yField");qt(c,"colorField",function(){return l})}}),r},n=function(r){var i=r.options,a=i.annotations,o=a===void 0?[]:a,s=i.children,c=s===void 0?[]:s,l=i.scale,u=!1;return pn(l,"y.key")||c.forEach(function(f,d){if(!pn(f,"scale.y.key")){var h="child".concat(d,"Scale");qt(f,"scale.y.key",h);var p=f.annotations,v=p===void 0?[]:p;v.length>0&&(qt(f,"scale.y.independent",!1),v.forEach(function(g){qt(g,"scale.y.key",h)})),!u&&o.length>0&&pn(f,"scale.y.independent")===void 0&&(u=!0,qt(f,"scale.y.independent",!1),o.forEach(function(g){qt(g,"scale.y.key",h)}))}}),r};return Ue(e,n,Hn,Qe)(t)}var Sut=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)}}(),mN=function(t){Sut(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 wut},e}(ze);function Mut(t){var e=function(a){var o=a.options,s=o.xField,c=o.colorField;return c||qt(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?qt(o,"transform",[]):qt(o,"transform",[{type:"symmetryY"}])),!f&&u&&qt(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(iN(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&&(qt(o,"type","spaceFlex"),qt(o,"ratio",[1,1]),qt(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||qt(o,"tooltip",{title:!1,items:[function(u){return{name:u[c],value:u[l]}}]}),a};return Ue(e,n,r,i,Hn,Qe)(t)}var Eut=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)}}(),Put=function(t){Eut(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 Mut},e}(ze);function Aut(t){return Ue(Hn,Qe)(t)}var Tut=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)}}(),kut=function(t){Tut(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 Aut},e}(ze);function Pf(t){switch(typeof t){case"function":return t;case"string":return function(e){return pn(e,[t])};default:return function(){return t}}}var Wo=function(){return Wo=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},Wo.apply(this,arguments)};function Cut(t){var e=function(n){var r=n.options,i=r.angleField,a=r.data,o=r.label,s=r.tooltip,c=r.colorField,l=Pf(c);if(Xt(a)){var u=a.reduce(function(d,h){return d+h[i]},0);if(u===0){var f=a.map(function(d){var h;return Wo(Wo({},d),(h={},h[i]=1,h))});qt(r,"data",f),o&&qt(r,"label",Wo(Wo({},o),{formatter:function(){return 0}})),s!==!1&&qt(r,"tooltip",Wo(Wo({},s),{items:[function(d,h,p){return{name:l(d,h,p),value:0}}]}))}}return n};return Ue(e,Qe)(t)}var Lut=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)}}(),Nut=function(t){Lut(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 Cut},e}(ze);function jut(t){return Ue(Hn,Qe)(t)}var Rut=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)}}(),Iut=function(t){Rut(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 jut},e}(ze);function Dut(t){var e=function(n){return qt(n,"options.coordinate",{type:pn(n,"options.coordinateType","polar")}),n};return Ue(e,Qe)(t)}var Fut=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)}}(),But=function(t){Fut(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 Dut},e}(ze);function zut(t,e){var n=-1,r=ao(t)?Array(t.length):[];return rN(t,function(i,a,o){r[++n]=e(i,a,o)}),r}var Gut=zut;function Wut(t,e){var n=Xt(t)?Wf:Gut;return n(t,ob(e,3))}var gl=Wut,Ja=function(){return Ja=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},Ja.apply(this,arguments)},Yut="__stock-range__",Hut="trend",$ut="up",Uut="down";function Vut(t){var e=function(r){var i=r.options,a=i.data,o=i.yField;return r.options.data=gl(a,function(s){var c=s&&Ja({},s);if(Array.isArray(o)&&c){var l=o[0],u=o[1],f=o[2],d=o[3];c[Hut]=c[l]<=c[u]?$ut:Uut,c[Yut]=[c[l],c[u],c[f],c[d]]}return c}),r},n=function(r){var i=r.options,a=i.xField,o=i.yField,s=i.fallingFill,c=i.risingFill,l=o[0],u=o[1],f=o[2],d=o[3],h=Pf(a);return r.options.children=gl(r.options.children,function(p,v){var g=v===0;return Ja(Ja({},p),{tooltip:{title:function(y,m,b){var x=h(y,m,b);return x instanceof Date?x.toLocaleString():x},items:[{field:f},{field:d},{field:l},{field:u}]},encode:Ja(Ja({},p.encode||{}),{y:g?[f,d]:[l,u],color:function(y){return Math.sign(y[u]-y[l])}}),style:Ja(Ja({},p.style||{}),{lineWidth:g?1:10})})}),delete i.yField,r.options.legend={color:!1},s&&qt(r,"options.scale.color.range[0]",s),c&&qt(r,"options.scale.color.range[2]",c),r};return Ue(e,n,Qe)(t)}var Xut=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)}}(),qut=["#26a69a","#999999","#ef5350"],Zut=function(t){Xut(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:qut},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 Vut},e}(ze);function Kut(t){return Ue(Hn,Qe)(t)}var Qut=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Jut=function(t){Qut(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type="TinyLine",n}return e.getDefaultOptions=function(){return{type:"view",children:[{type:"line",axis:!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 Kut},e}(ze);function tft(t){return Ue(Hn,Qe)(t)}var eft=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),nft=function(t){eft(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type="TinyArea",n}return e.getDefaultOptions=function(){return{type:"view",animate:{enter:{type:"growInX",duration:500}},children:[{type:"area",axis:!1}],padding:0,margin:0,tooltip:!1}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return tft},e}(ze);function rft(t){return Ue(Hn,Qe)(t)}var ift=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),aft=function(t){ift(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type="TinyColumn",n}return e.getDefaultOptions=function(){return{type:"view",children:[{type:"interval",axis:!1}],padding:0,margin:0,tooltip:!1}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return rft},e}(ze),pb=function(){return pb=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},pb.apply(this,arguments)};function oft(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,pb({},s)),n};return Ue(e,Hn,Qe)(t)}var sft=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),cft=function(t){sft(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type="TinyProgress",n}return e.getDefaultOptions=function(){return{type:"view",data:[],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 oft},e}(ze),vb=function(){return vb=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},vb.apply(this,arguments)};function lft(t){var e=function(r){var i=r.options,a=i.radius,o=a===void 0?.8:a;return qt(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,vb({},c)),r};return Ue(e,n,Hn,Qe)(t)}var uft=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),fft=function(t){uft(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type="TinyRing",n}return e.getDefaultOptions=function(){return{type:"view",data:[],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 lft},e}(ze);function dft(t){return Ue(Qe)(t)}var hft=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)}}(),pft=function(t){hft(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 dft},e}(ze),gb="__start__",yl="__end__",yb="__waterfall_value__",mb=function(){return mb=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},mb.apply(this,arguments)},vft=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 gft(t){var e=function(r){var i=r.options,a=i.data,o=a===void 0?[]:a,s=i.yField;return o.length&&(o.reduce(function(c,l,u){var f,d=Pf(s),h=d(l,u,o);if(u===0||l.isTotal)l[gb]=0,l[yl]=h,l[yb]=h;else{var p=(f=c[yl])!==null&&f!==void 0?f:d(c,u,o);l[gb]=p,l[yl]=p+h,l[yb]=c[yl]}return l},[]),Object.assign(i,{yField:[gb,yl]})),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=vft([],o,!0);return u.reduce(function(f,d,h){return h>0&&(d.x1=f[s],d.x2=d[s],d.y1=f[yl]),d},[]),u.shift(),c.push({type:"link",xField:["x1","x2"],yField:"y1",zIndex:-1,data:u,style:mb({stroke:"#697474"},l),label:!1,tooltip:!1}),r};return Ue(e,n,Hn,Qe)(t)}var yft=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),mft=function(t){yft(e,t);function e(){var n=t!==null&&t.apply(this,arguments)||this;return n.type="waterfall",n}return e.getDefaultOptions=function(){return{type:"view",legend:null,tooltip:{field:yb,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 gft},e}(ze),bft="[object Number]";function xft(t){return typeof t=="number"||ii(t)&&_r(t)==bft}var ml=xft,_ft=Object.prototype,Oft=_ft.hasOwnProperty,wft=qL(function(t,e){if(If(e)||ao(e)){ts(e,Qo(e),t);return}for(var n in e)Oft.call(e,n)&&zf(t,n,e[n])}),bN=wft,Sft=/\s/;function Mft(t){for(var e=t.length;e--&&Sft.test(t.charAt(e)););return e}var Eft=Mft,Pft=/^\s+/;function Aft(t){return t&&t.slice(0,Eft(t)+1).replace(Pft,"")}var Tft=Aft,xN=0/0,kft=/^[-+]0x[0-9a-f]+$/i,Cft=/^0b[01]+$/i,Lft=/^0o[0-7]+$/i,Nft=parseInt;function jft(t){if(typeof t=="number")return t;if(Cl(t))return xN;if(bn(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=bn(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=Tft(t);var n=Cft.test(t);return n||Lft.test(t)?Nft(t.slice(2),n?2:8):kft.test(t)?xN:+t}var _N=jft,ON=1/0,Rft=17976931348623157e292;function Ift(t){if(!t)return t===0?t:0;if(t=_N(t),t===ON||t===-ON){var e=t<0?-1:1;return e*Rft}return t===t?t:0}var Dft=Ift;function Fft(t){var e=Dft(t),n=e%1;return e===e?n?e-n:e:0}var wN=Fft,Bft=$n.isFinite,zft=Math.min;function Gft(t){var e=Math[t];return function(n,r){if(n=_N(n),r=r==null?0:zft(wN(r),292),r&&Bft(n)){var i=(D0(n)+"e").split("e"),a=e(i[0]+"e"+(+i[1]+r));return i=(D0(a)+"e").split("e"),+(i[0]+"e"+(+i[1]-r))}return e(n)}}var Wft=Gft,Yft=Wft("ceil"),Hft=Yft,$ft=0/0;function Uft(t){return typeof t=="number"?t:Cl(t)?$ft:+t}var SN=Uft;function Vft(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=I0(n),r=I0(r)):(n=SN(n),r=SN(r)),i=t(n,r)}return i}}var Xft=Vft,qft=Xft(function(t,e){return t/e},1),Zft=qft;function Kft(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=pn(s,"[0].transform[0]",{});return ml(o)?(bN(u,{thresholds:Hft(Zft(i.length,o)),y:l}),n):(ml(a)&&bN(u,{thresholds:a,y:l}),n)};return Ue(e,Hn,Qe)(t)}var Qft=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)}}(),Jft=function(t){Qft(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 Kft},e}(ze);function tdt(t){var e=function(r){var i=r.options,a=i.tooltip,o=a===void 0?{}:a,s=i.colorField,c=i.sizeField;return o&&!o.field&&(o.field=s||c),r},n=function(r){var i=r.options,a=i.mark,o=i.children;return a&&(o[0].type=a),r};return Ue(e,n,Hn,Qe)(t)}var edt=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)}}(),ndt=function(t){edt(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 tdt},e}(ze);function rdt(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 Ue(e,Hn,Qe)(t)}var idt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),adt=function(t){idt(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 rdt},e}(ze);function odt(t){var e=function(n){var r=n.options,i=r.data,a=[{type:"custom",callback:function(s){return{links:s}}}];if(Xt(i))i.length>0?qt(r,"data",{value:i,transform:a}):delete r.children;else if(pn(i,"type")==="fetch"&&pn(i,"value")){var o=pn(i,"transform");Xt(o)?qt(i,"transform",o.concat(a)):qt(i,"transform",a)}return n};return Ue(e,Hn,Qe)(t)}var sdt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),cdt=function(t){sdt(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 odt},e}(ze);function ldt(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 udt(t){ldt(t);var e=t.options.layout,n=e===void 0?"horizontal":e;return t.options.children.forEach(function(r){var i;!((i=r==null?void 0:r.coordinate)===null||i===void 0)&&i.transform&&(r.coordinate.transform=n!=="horizontal"?void 0:[{type:"transpose"}])}),t}function fdt(t){return t==null}var ddt=fdt,hdt="[object String]";function pdt(t){return typeof t=="string"||!Xt(t)&&ii(t)&&_r(t)==hdt}var MN=pdt;function vdt(t,e){return Wf(e,function(n){return t[n]})}var gdt=vdt;function ydt(t){return t==null?[]:gdt(t,Qo(t))}var mdt=ydt,bdt=Math.max;function xdt(t,e,n,r){t=ao(t)?t:mdt(t),n=n&&!r?wN(n):0;var i=t.length;return n<0&&(n=bdt(i+n,0)),MN(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&eN(t,e,n)>-1}var _dt=xdt,aa=function(){return aa=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},aa.apply(this,arguments)},c0=["#f0efff","#5B8FF9","#3D76DD"];function bb(t,e,n,r){r===void 0&&(r=!0);var i=0,a=!1,o=gl(t,function(s){var c,l,u=pn(s,[e]);if(ddt(u))return[];if(MN(u)){var f=Number(u);return isNaN(f)?[]:(c={},c[n]=s[n],c[e]=f,c)}return Xt(u)?(a=!0,i=Math.max(i,u.length),gl(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 aa({index:0},s)}),i]:[o,i]}function xb(t,e){return new Array(t).fill("").map(function(n,r){return Xt(e)?e[r%e.length]:e})}function Odt(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=bb(g,c,p),m=y[0],b=y[1],x=bb(g,u,p,!1),_=x[0],O=x[1],w=bb(g,d,p,!1),S=w[0],M=w[1],E=pn(o,[c],c0[0]),P=pn(o,[u],c0[1]),C=pn(o,[d],c0[2]),A=[xb(b,E),xb(O,P),xb(M,C)].flat();return i.options.children=gl(i.options.children,function(T,k){var N=[m,_,S][k],F=[c,u,d][k];return aa(aa({},T),{data:N,encode:aa(aa({},T.encode||{}),{x:p,y:F,color:function(R){var I=R.index,z=ml(I)?"".concat(F,"_").concat(I):F;return v?pn(v,[F,I],z):z}}),style:aa(aa({},T.style||{}),{zIndex:function(R){return-R[F]}}),labels:k!==0?gl(T.labels,function(R){return aa(aa({},R),{text:F})}):void 0})}),i.options.scale.color.range=A,i.options.legend.color.itemMarker=function(T){return v&&_dt(v==null?void 0:v[d],T)||(T==null?void 0:T.replace(/\_\d$/,""))===d?"line":"square"},i},n=function(i){var a=i.options.layout,o=a===void 0?"horizontal":a;return o!=="horizontal"&&qt(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 Go(d[p],h)}),i};return Ue(e,n,r,udt,Qe)(t)}var wdt=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)}}(),Sdt=function(t){wdt(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:c0}},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 Odt},e}(ze);function Mdt(t){var e=function(n){var r=n.options.data;return n.options.data={value:r},n};return Ue(e,Hn,Qe)(t)}var Edt=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)}}(),Pdt=function(t){Edt(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 Mdt},e}(ze);function Adt(t){var e=function(n){var r=n.options.percent;return ml(r)&&qt(n,"options.data",r),n};return Ue(e,Hn,Qe)(t)}var Tdt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),kdt=function(t){Tdt(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 Adt},e}(ze);function Cdt(t){return Ue(Hn,Qe)(t)}var Ldt=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)}}(),Ndt=function(t){Ldt(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 Cdt},e}(ze);function jdt(t){var e=function(n){var r=n.options,i=r.data;return i&&qt(r,"data",{value:i}),n};return Ue(e,Hn,Qe)(t)}var Rdt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Idt=function(t){Rdt(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 jdt},e}(ze),Us=function(){return Us=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},Us.apply(this,arguments)};function Ddt(t){var e=function(i){var a=i.options,o=a.startAngle,s=a.maxAngle,c=a.coordinate,l=ml(o)?o/(2*Math.PI)*360:-90,u=ml(s)?(Number(s)+l)/180*Math.PI:Math.PI;return qt(i,["options","coordinate"],Us(Us({},c),{endAngle:u,startAngle:o!=null?o:-Math.PI/2})),i},n=function(i){var a=i.options,o=a.tooltip,s=a.xField,c=a.yField,l=Pf(s),u=Pf(c);return o||qt(a,"tooltip",{title:!1,items:[function(f,d,h){return{name:l(f,d,h),value:u(f,d,h)}}]}),i},r=function(i){var a=i.options,o=a.markBackground,s=a.children,c=a.scale,l=a.coordinate,u=a.xField,f=pn(c,"y.domain",[]);return o&&s.unshift(Us({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:Us(Us({},l),{startAngle:-Math.PI/2,endAngle:1.5*Math.PI}),animate:!1},o)),i};return Ue(e,n,r,Hn,Qe)(t)}var Fdt=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)}}(),Bdt=function(t){Fdt(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 Ddt},e}(ze);function zdt(t){return Ue(Qe)(t)}var Gdt=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)}}(),Wdt=function(t){Gdt(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 zdt},e}(ze),l0=function(){return l0=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},l0.apply(this,arguments)};function Ydt(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 l0(l0({},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 qt(r,"children",c),r.violinType==="polar"&&qt(r,"coordinate",{type:"polar"}),qt(r,"violinType",void 0),n};return Ue(e,Hn,Qe)(t)}var Hdt=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)}}(),$dt=function(t){Hdt(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 Ydt},e}(ze),Af=function(){return Af=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},Af.apply(this,arguments)},Udt=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 Vdt(t){var e=function(a){var o=a.options,s=o.yField,c=o.children;return c.forEach(function(l,u){qt(l,"yField",s[u])}),a},n=function(a){var o=a.options,s=o.yField,c=o.children,l=o.data;if(rb(l))return a;var u=Xt(pn(l,[0]))?l:[l,l];return c.forEach(function(f,d){qt(f,"data",Udt([],u[d].map(function(h){return Af({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||qt(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?oN:u,d=o.paddingLeft,h=d===void 0?oN:d,p=o.axis;qt(o,"axisText",Af(Af({},(p==null?void 0:p.x)||{}),{layout:c}));var v=s[0],g=s[1];if(c==="vertical")qt(o,"direction","col"),qt(o,"paddingLeft",h),qt(o,"coordinate.transform",l.filter(function(_){return _.type!=="transpose"})),qt(v,"paddingBottom",aN),qt(g,"paddingTop",aN),qt(g,"axis",{x:{position:"top"}}),qt(g,"scale",{y:{range:[0,1]}});else{qt(o,"paddingBottom",f),qt(v,"scale",{y:{range:[0,1]}});var y=v.paddingRight,m=y===void 0?cb:y,b=g.paddingLeft,x=b===void 0?cb:b;qt(v,"paddingRight",m),qt(v,"axis",{x:{position:"right"}}),qt(g,"paddingLeft",x)}return a};return Ue(e,n,r,i,Hn,Qe)(t)}var Xdt=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)}}(),qdt=function(t){Xdt(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 Vdt},e}(ze),Vs;(function(t){t.color="key",t.d="path"})(Vs||(Vs={}));function Zdt(t){var e=function(n){var r=n.options,i=r.data,a=r.setsField,o=r.sizeField;return Xt(i)&&(qt(r,"data",{type:"inline",value:i,transform:[{type:"venn",sets:a,size:o,as:[Vs.color,Vs.d]}]}),qt(r,"colorField",a),qt(r,["children","0","encode","d"],Vs.d)),qt(n,"options",db(r,["sizeField","setsField"])),n};return Ue(e,Qe)(t)}var Kdt=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)}}(),Qdt=function(t){Kdt(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:Vs.color,d:Vs.d}}},e.prototype.getDefaultOptions=function(){return e.getDefaultOptions()},e.prototype.getSchemaAdaptor=function(){return Zdt},e}(ze);function Jdt(t){var e=function(n){return n};return Ue(e,Qe)(t)}var tht=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)}}(),eht=function(t){tht(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 Jdt},e}(ze),nht={Base:Mlt,Line:kut,Column:Out,Pie:Nut,Area:gut,Bar:but,DualAxes:mN,Funnel:Put,Scatter:Iut,Radar:But,Rose:pft,Stock:Zut,TinyLine:Jut,TinyArea:nft,TinyColumn:aft,TinyProgress:cft,TinyRing:fft,Waterfall:mft,Histogram:Jft,Heatmap:ndt,Box:adt,Sankey:cdt,Bullet:Sdt,Gauge:Pdt,Liquid:kdt,WordCloud:Ndt,Treemap:Idt,RadialBar:Bdt,CirclePacking:Wdt,Violin:$dt,BidirectionalBar:qdt,Venn:Qdt,Mix:mN,Sunburst:eht},_b=function(){return _b=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},_b.apply(this,arguments)},EN=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n},rht=(0,mt.forwardRef)(function(t,e){var n=t.chartType,r=n===void 0?"Base":n,i=EN(t,["chartType"]),a=i.containerStyle,o=a===void 0?{height:"inherit"}:a,s=i.containerAttributes,c=s===void 0?{}:s,l=i.className,u=i.loading,f=i.loadingTemplate,d=i.errorTemplate,h=EN(i,["containerStyle","containerAttributes","className","loading","loadingTemplate","errorTemplate"]),p=yD(nht[r],h),v=p.chart,g=p.container;return(0,mt.useImperativeHandle)(e,function(){return v.current}),mt.createElement(Qn,{errorTemplate:d},u&&mt.createElement(Tr,{loadingTemplate:f}),mt.createElement("div",_b({className:l,style:o,ref:g},c)))}),Ob=function(){return Ob=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},Ob.apply(this,arguments)},iht=(0,mt.forwardRef)(function(t,e){return mt.createElement(rht,Ob({},t,{chartType:"Column",ref:e}))}),aht=iht},39615:function(je,Dn,tt){"use strict";tt.d(Dn,{Z:function(){return Ho}});var Et=tt(4942),lt=tt(1413),te=tt(91),xe=tt(28459),zt=tt(93967),mt=tt.n(zt),bt=tt(67294),At=tt(29676),Q=tt(44962),jt=tt(98082),St=function(ft){return(0,Et.Z)({},ft.componentCls,{display:"flex",flexDirection:"column",justifyContent:"flex-end",marginBlock:ft.marginLG,marginInline:0,color:ft.colorText,fontWeight:"500",fontSize:"20px",lineHeight:"38px"})};function kt(ee){return(0,jt.Xj)("ProCardOperation",function(ft){var ve=(0,lt.Z)((0,lt.Z)({},ft),{},{componentCls:".".concat(ee)});return[St(ve)]})}var pt=tt(85893),ut=function(ft){var ve=ft.className,Yt=ft.style,Ae=Yt===void 0?{}:Yt,Tn=ft.children,Xt=(0,bt.useContext)(xe.ZP.ConfigContext),he=Xt.getPrefixCls,Ye=he("pro-card-operation"),Rn=kt(Ye),xn=Rn.wrapSSR,Ce=Rn.hashId,ue=mt()(Ye,ve,Ce);return xn((0,pt.jsx)("div",{className:ue,style:Ae,children:Tn}))},ot=ut,rt=tt(87462),ht=tt(36688),Wt=tt(5627),ae=function(ft,ve){return bt.createElement(Wt.Z,(0,rt.Z)({},ft,{ref:ve,icon:ht.Z}))},We=bt.forwardRef(ae),ke=We,Ie=tt(83062),Ve=tt(40411),we=tt(57838),Je=tt(96159),Xe=tt(64217),Zt=tt(53124),Vt=tt(99559),xr=ee=>{const{value:ft,formatter:ve,precision:Yt,decimalSeparator:Ae,groupSeparator:Tn="",prefixCls:Xt}=ee;let he;if(typeof ve=="function")he=ve(ft);else{const Ye=String(ft),Rn=Ye.match(/^(-?)(\d*)(\.(\d+))?$/);if(!Rn||Ye==="-")he=Ye;else{const xn=Rn[1];let Ce=Rn[2]||"0",ue=Rn[4]||"";Ce=Ce.replace(/\B(?=(\d{3})+(?!\d))/g,Tn),typeof Yt=="number"&&(ue=ue.padEnd(Yt,"0").slice(0,Yt>0?Yt:0)),ue&&(ue=`${Ae}${ue}`),he=[bt.createElement("span",{key:"int",className:`${Xt}-content-value-int`},xn,Ce),ue&&bt.createElement("span",{key:"decimal",className:`${Xt}-content-value-decimal`},ue)]}}return bt.createElement("span",{className:`${Xt}-content-value`},he)},Tr=tt(14747),hr=tt(91945),Qn=tt(45503);const pr=ee=>{const{componentCls:ft,marginXXS:ve,padding:Yt,colorTextDescription:Ae,titleFontSize:Tn,colorTextHeading:Xt,contentFontSize:he,fontFamily:Ye}=ee;return{[`${ft}`]:Object.assign(Object.assign({},(0,Tr.Wf)(ee)),{[`${ft}-title`]:{marginBottom:ve,color:Ae,fontSize:Tn},[`${ft}-skeleton`]:{paddingTop:Yt},[`${ft}-content`]:{color:Xt,fontSize:he,fontFamily:Ye,[`${ft}-content-value`]:{display:"inline-block",direction:"ltr"},[`${ft}-content-prefix, ${ft}-content-suffix`]:{display:"inline-block"},[`${ft}-content-prefix`]:{marginInlineEnd:ve},[`${ft}-content-suffix`]:{marginInlineStart:ve}}})}},ei=ee=>{const{fontSizeHeading3:ft,fontSize:ve}=ee;return{titleFontSize:ve,contentFontSize:ft}};var mi=(0,hr.I$)("Statistic",ee=>{const ft=(0,Qn.TS)(ee,{});return[pr(ft)]},ei),Ei=function(ee,ft){var ve={};for(var Yt in ee)Object.prototype.hasOwnProperty.call(ee,Yt)&&ft.indexOf(Yt)<0&&(ve[Yt]=ee[Yt]);if(ee!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ae=0,Yt=Object.getOwnPropertySymbols(ee);Ae<Yt.length;Ae++)ft.indexOf(Yt[Ae])<0&&Object.prototype.propertyIsEnumerable.call(ee,Yt[Ae])&&(ve[Yt[Ae]]=ee[Yt[Ae]]);return ve},vr=ee=>{const{prefixCls:ft,className:ve,rootClassName:Yt,style:Ae,valueStyle:Tn,value:Xt=0,title:he,valueRender:Ye,prefix:Rn,suffix:xn,loading:Ce=!1,formatter:ue,precision:kr,decimalSeparator:Cr=".",groupSeparator:oa=",",onMouseEnter:Ti,onMouseLeave:or}=ee,ki=Ei(ee,["prefixCls","className","rootClassName","style","valueStyle","value","title","valueRender","prefix","suffix","loading","formatter","precision","decimalSeparator","groupSeparator","onMouseEnter","onMouseLeave"]),{getPrefixCls:sa,direction:Or,statistic:ni}=bt.useContext(Zt.E_),$r=sa("statistic",ft),[Ci,ca,$o]=mi($r),no=bt.createElement(xr,{decimalSeparator:Cr,groupSeparator:oa,prefixCls:$r,formatter:ue,precision:kr,value:Xt}),ro=mt()($r,{[`${$r}-rtl`]:Or==="rtl"},ni==null?void 0:ni.className,ve,Yt,ca,$o),la=(0,Xe.Z)(ki,{aria:!0,data:!0});return Ci(bt.createElement("div",Object.assign({},la,{className:ro,style:Object.assign(Object.assign({},ni==null?void 0:ni.style),Ae),onMouseEnter:Ti,onMouseLeave:or}),he&&bt.createElement("div",{className:`${$r}-title`},he),bt.createElement(Vt.Z,{paragraph:!1,loading:Ce,className:`${$r}-skeleton`},bt.createElement("div",{style:Tn,className:`${$r}-content`},Rn&&bt.createElement("span",{className:`${$r}-content-prefix`},Rn),Ye?Ye(no):no,xn&&bt.createElement("span",{className:`${$r}-content-suffix`},xn)))))};const Jn=[["Y",1e3*60*60*24*365],["M",1e3*60*60*24*30],["D",1e3*60*60*24],["H",1e3*60*60],["m",1e3*60],["s",1e3],["S",1]];function lr(ee,ft){let ve=ee;const Yt=/\[[^\]]*]/g,Ae=(ft.match(Yt)||[]).map(Ye=>Ye.slice(1,-1)),Tn=ft.replace(Yt,"[]"),Xt=Jn.reduce((Ye,Rn)=>{let[xn,Ce]=Rn;if(Ye.includes(xn)){const ue=Math.floor(ve/Ce);return ve-=ue*Ce,Ye.replace(new RegExp(`${xn}+`,"g"),kr=>{const Cr=kr.length;return ue.toString().padStart(Cr,"0")})}return Ye},Tn);let he=0;return Xt.replace(Yt,()=>{const Ye=Ae[he];return he+=1,Ye})}function tn(ee,ft){const{format:ve=""}=ft,Yt=new Date(ee).getTime(),Ae=Date.now(),Tn=Math.max(Yt-Ae,0);return lr(Tn,ve)}var Pi=function(ee,ft){var ve={};for(var Yt in ee)Object.prototype.hasOwnProperty.call(ee,Yt)&&ft.indexOf(Yt)<0&&(ve[Yt]=ee[Yt]);if(ee!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ae=0,Yt=Object.getOwnPropertySymbols(ee);Ae<Yt.length;Ae++)ft.indexOf(Yt[Ae])<0&&Object.prototype.propertyIsEnumerable.call(ee,Yt[Ae])&&(ve[Yt[Ae]]=ee[Yt[Ae]]);return ve};const Ai=1e3/30;function bl(ee){return new Date(ee).getTime()}const Yo=ee=>{const{value:ft,format:ve="HH:mm:ss",onChange:Yt,onFinish:Ae}=ee,Tn=Pi(ee,["value","format","onChange","onFinish"]),Xt=(0,we.Z)(),he=bt.useRef(null),Ye=()=>{Ae==null||Ae(),he.current&&(clearInterval(he.current),he.current=null)},Rn=()=>{const ue=bl(ft);ue>=Date.now()&&(he.current=setInterval(()=>{Xt(),Yt==null||Yt(ue-Date.now()),ue<Date.now()&&Ye()},Ai))};bt.useEffect(()=>(Rn(),()=>{he.current&&(clearInterval(he.current),he.current=null)}),[ft]);const xn=(ue,kr)=>tn(ue,Object.assign(Object.assign({},kr),{format:ve})),Ce=ue=>(0,Je.Tm)(ue,{title:void 0});return bt.createElement(vr,Object.assign({},Tn,{value:ft,valueRender:Ce,formatter:xn}))};var Zs=bt.memo(Yo);vr.Countdown=Zs;var Xi=vr,xl=function(ft){return(0,Et.Z)({},ft.componentCls,(0,Et.Z)((0,Et.Z)((0,Et.Z)((0,Et.Z)((0,Et.Z)({display:"flex",fontSize:ft.fontSize,"& + &":{marginBlockStart:4},"&-tip":{marginInlineStart:4},"&-wrapper":(0,Et.Z)({display:"flex",width:"100%"},"".concat(ft.componentCls,"-status"),{width:"14px"}),"&-icon":{marginInlineEnd:16},"&-trend-icon":{width:0,height:0,borderInlineEnd:"3.5px solid transparent",borderBlockEnd:"9px solid #000",borderInlineStart:"3.5px solid transparent","&-up":{transform:"rotate(0deg)"},"&-down":{transform:"rotate(180deg)"}},"&-content":(0,Et.Z)({width:"100%"},"".concat(ft.antCls,"-statistic-content"),{"&-value-int":{fontSize:ft.fontSizeHeading3}}),"&-description":{width:"100%"}},"".concat(ft.antCls,"-statistic-title"),{color:ft.colorText}),"&-trend-up",(0,Et.Z)({},"".concat(ft.antCls,"-statistic-content"),(0,Et.Z)({color:"#f5222d"},"".concat(ft.componentCls,"-trend-icon"),{borderBlockEndColor:"#f5222d"}))),"&-trend-down",(0,Et.Z)({},"".concat(ft.antCls,"-statistic-content"),(0,Et.Z)({color:"#389e0d"},"".concat(ft.componentCls,"-trend-icon"),{borderBlockEndColor:"#52c41a"}))),"& &-layout-horizontal",(0,Et.Z)((0,Et.Z)((0,Et.Z)({display:"flex",justifyContent:"space-between"},"".concat(ft.antCls,"-statistic-title"),{marginBlockEnd:0}),"".concat(ft.antCls,"-statistic-content-value"),{fontWeight:500}),"".concat(ft.antCls,"-statistic-title,").concat(ft.antCls,"-statistic-content,").concat(ft.antCls,"-statistic-content-suffix,").concat(ft.antCls,"-statistic-content-prefix,").concat(ft.antCls,"-statistic-content-value-decimal"),{fontSize:ft.fontSize})),"& &-layout-inline",(0,Et.Z)((0,Et.Z)((0,Et.Z)({display:"inline-flex",color:ft.colorTextSecondary},"".concat(ft.antCls,"-statistic-title"),{marginInlineEnd:"6px",marginBlockEnd:0}),"".concat(ft.antCls,"-statistic-content"),{color:ft.colorTextSecondary}),"".concat(ft.antCls,"-statistic-title,").concat(ft.antCls,"-statistic-content,").concat(ft.antCls,"-statistic-content-suffix,").concat(ft.antCls,"-statistic-content-prefix,").concat(ft.antCls,"-statistic-content-value-decimal"),{fontSize:ft.fontSizeSM})))};function _l(ee){return(0,jt.Xj)("Statistic",function(ft){var ve=(0,lt.Z)((0,lt.Z)({},ft),{},{componentCls:".".concat(ee)});return[xl(ve)]})}var Ks=["className","layout","style","description","children","title","tip","status","trend","prefix","icon"],Ol=function(ft){var ve=ft.className,Yt=ft.layout,Ae=Yt===void 0?"inline":Yt,Tn=ft.style,Xt=ft.description,he=ft.children,Ye=ft.title,Rn=ft.tip,xn=ft.status,Ce=ft.trend,ue=ft.prefix,kr=ft.icon,Cr=(0,te.Z)(ft,Ks),oa=(0,bt.useContext)(xe.ZP.ConfigContext),Ti=oa.getPrefixCls,or=Ti("pro-card-statistic"),ki=_l(or),sa=ki.wrapSSR,Or=ki.hashId,ni=mt()(or,ve,Or),$r=mt()("".concat(or,"-status"),Or),Ci=mt()("".concat(or,"-icon"),Or),ca=mt()("".concat(or,"-wrapper"),Or),$o=mt()("".concat(or,"-content"),Or),no=mt()(Or,(0,Et.Z)((0,Et.Z)({},"".concat(or,"-layout-").concat(Ae),Ae),"".concat(or,"-trend-").concat(Ce),Ce)),ro=Rn&&(0,pt.jsx)(Ie.Z,{title:Rn,children:(0,pt.jsx)(ke,{className:"".concat(or,"-tip ").concat(Or).trim()})}),la=mt()("".concat(or,"-trend-icon"),Or,(0,Et.Z)({},"".concat(or,"-trend-icon-").concat(Ce),Ce)),Uo=Ce&&(0,pt.jsx)("div",{className:la}),wl=xn&&(0,pt.jsx)("div",{className:$r,children:(0,pt.jsx)(Ve.Z,{status:xn,text:null})}),Sl=kr&&(0,pt.jsx)("div",{className:Ci,children:kr});return sa((0,pt.jsxs)("div",{className:ni,style:Tn,children:[Sl,(0,pt.jsxs)("div",{className:ca,children:[wl,(0,pt.jsxs)("div",{className:$o,children:[(0,pt.jsx)(Xi,(0,lt.Z)({title:(Ye||ro)&&(0,pt.jsxs)(pt.Fragment,{children:[Ye,ro]}),prefix:(Uo||ue)&&(0,pt.jsxs)(pt.Fragment,{children:[Uo,ue]}),className:no},Cr)),Xt&&(0,pt.jsx)("div",{className:"".concat(or,"-description ").concat(Or).trim(),children:Xt})]})]})]}))},eo=Ol,Qs=function(ft){return(0,Et.Z)({},ft.componentCls,{"&-chart":{display:"flex",flexDirection:"column",marginBlockStart:8,marginBlockEnd:8,"&-left":{marginBlockStart:0,marginInlineEnd:"16px"},"&-right":{marginBlockStart:0,marginInlineStart:"16px"}},"&-content":{display:"flex",flexDirection:"column","&-horizontal":(0,Et.Z)({flexDirection:"row"},"".concat(ft.componentCls,"-chart"),{alignItems:"center",alignSelf:"flex-start"})},"&-footer":{marginBlockStart:8,paddingBlockStart:"16px",borderBlockStart:"rgba(0, 0, 0, 0.08) solid ".concat(ft.colorBorder)}})};function _r(ee){return(0,jt.Xj)("StatisticCard",function(ft){var ve=(0,lt.Z)((0,lt.Z)({},ft),{},{componentCls:".".concat(ee)});return[Qs(ve)]})}var Js=["children","statistic","className","chart","chartPlacement","footer"],bn=function(ft){var ve=ft.children,Yt=ft.statistic,Ae=ft.className,Tn=ft.chart,Xt=ft.chartPlacement,he=ft.footer,Ye=(0,te.Z)(ft,Js),Rn=(0,bt.useContext)(xe.ZP.ConfigContext),xn=Rn.getPrefixCls,Ce=xn("pro-statistic-card"),ue=_r(Ce),kr=ue.wrapSSR,Cr=ue.hashId,oa=mt()(Ce,Ae,Cr),Ti=Yt&&(0,pt.jsx)(eo,(0,lt.Z)({layout:"vertical"},Yt)),or=mt()("".concat(Ce,"-chart"),Cr,(0,Et.Z)((0,Et.Z)({},"".concat(Ce,"-chart-left"),Xt==="left"&&Tn&&Yt),"".concat(Ce,"-chart-right"),Xt==="right"&&Tn&&Yt)),ki=Tn&&(0,pt.jsx)("div",{className:or,children:Tn}),sa=mt()("".concat(Ce,"-content "),Cr,(0,Et.Z)({},"".concat(Ce,"-content-horizontal"),Xt==="left"||Xt==="right")),Or=(ki||Ti)&&(Xt==="left"?(0,pt.jsxs)("div",{className:sa,children:[ki,Ti]}):(0,pt.jsxs)("div",{className:sa,children:[Ti,ki]})),ni=he&&(0,pt.jsx)("div",{className:"".concat(Ce,"-footer ").concat(Cr).trim(),children:he});return kr((0,pt.jsxs)(At.Z,(0,lt.Z)((0,lt.Z)({className:oa},Ye),{},{children:[Or,ve,ni]})))},tc=function(ft){return(0,pt.jsx)(bn,(0,lt.Z)({bodyStyle:{padding:0}},ft))};bn.Statistic=eo,bn.Divider=Q.Z,bn.Operation=ot,bn.isProCard=!0,bn.Group=tc;var Ho=bn},34540:function(je,Dn,tt){"use strict";var Et=tt(1413),lt=tt(91),te=tt(86190),xe=tt(67294),zt=tt(66758),mt=tt(59141),bt=tt(85893),At=["fieldProps","proFieldProps"],Q="dateRange",jt=xe.forwardRef(function(St,kt){var pt=St.fieldProps,ut=St.proFieldProps,ot=(0,lt.Z)(St,At),rt=(0,xe.useContext)(zt.Z);return(0,bt.jsx)(mt.Z,(0,Et.Z)({ref:kt,fieldProps:(0,Et.Z)({getPopupContainer:rt.getPopupContainer},pt),valueType:Q,proFieldProps:ut,filedConfig:{valueType:Q,customLightMode:!0,lightFilterLabelFormatter:function(Wt){return(0,te.c)(Wt,(pt==null?void 0:pt.format)||"YYYY-MM-DD")}}},ot))});Dn.Z=jt},64317:function(je,Dn,tt){"use strict";var Et=tt(1413),lt=tt(91),te=tt(22270),xe=tt(67294),zt=tt(66758),mt=tt(59141),bt=tt(85893),At=["fieldProps","children","params","proFieldProps","mode","valueEnum","request","showSearch","options"],Q=["fieldProps","children","params","proFieldProps","mode","valueEnum","request","options"],jt=function(rt,ht){var Wt=rt.fieldProps,ae=rt.children,We=rt.params,ke=rt.proFieldProps,Ie=rt.mode,Ve=rt.valueEnum,we=rt.request,Je=rt.showSearch,Xe=rt.options,Zt=(0,lt.Z)(rt,At),Vt=(0,xe.useContext)(zt.Z);return(0,bt.jsx)(mt.Z,(0,Et.Z)((0,Et.Z)({valueEnum:(0,te.h)(Ve),request:we,params:We,valueType:"select",filedConfig:{customLightMode:!0},fieldProps:(0,Et.Z)({options:Xe,mode:Ie,showSearch:Je,getPopupContainer:Vt.getPopupContainer},Wt),ref:ht,proFieldProps:ke},Zt),{},{children:ae}))},St=xe.forwardRef(function(ot,rt){var ht=ot.fieldProps,Wt=ot.children,ae=ot.params,We=ot.proFieldProps,ke=ot.mode,Ie=ot.valueEnum,Ve=ot.request,we=ot.options,Je=(0,lt.Z)(ot,Q),Xe=(0,Et.Z)({options:we,mode:ke||"multiple",labelInValue:!0,showSearch:!0,suffixIcon:null,autoClearSearchValue:!0,optionLabelProp:"label"},ht),Zt=(0,xe.useContext)(zt.Z);return(0,bt.jsx)(mt.Z,(0,Et.Z)((0,Et.Z)({valueEnum:(0,te.h)(Ie),request:Ve,params:ae,valueType:"select",filedConfig:{customLightMode:!0},fieldProps:(0,Et.Z)({getPopupContainer:Zt.getPopupContainer},Xe),ref:rt,proFieldProps:We},Je),{},{children:Wt}))}),kt=xe.forwardRef(jt),pt=St,ut=kt;ut.SearchSelect=pt,ut.displayName="ProFormComponent",Dn.Z=ut},17816:function(je,Dn){(function(tt,Et){Et(Dn)})(this,function(tt){"use strict";function Et(L){var j=typeof Symbol=="function"&&Symbol.iterator,B=j&&L[j],G=0;if(B)return B.call(L);if(L&&typeof L.length=="number")return{next:function(){return{value:(L=L&&G>=L.length?void 0:L)&&L[G++],done:!L}}};throw new TypeError(j?"Object is not iterable.":"Symbol.iterator is not defined.")}function lt(L,j){var B=typeof Symbol=="function"&&L[Symbol.iterator];if(!B)return L;var G,V,X=B.call(L),Y=[];try{for(;(j===void 0||0<j--)&&!(G=X.next()).done;)Y.push(G.value)}catch(H){V={error:H}}finally{try{G&&!G.done&&(B=X.return)&&B.call(X)}finally{if(V)throw V.error}}return Y}function te(L,j,B){if(B||arguments.length===2)for(var G,V=0,X=j.length;V<X;V++)!G&&V in j||((G=G||Array.prototype.slice.call(j,0,V))[V]=j[V]);return L.concat(G||Array.prototype.slice.call(j))}function xe(L){return mt(L,"Function")}var zt={}.toString,mt=function(L,j){return zt.call(L)==="[object "+j+"]"},bt=function(L){return Array.isArray?Array.isArray(L):mt(L,"Array")},At=function(L){if(typeof(j=L)!="object"||j===null||!mt(L,"Object"))return!1;var j;if(Object.getPrototypeOf(L)===null)return!0;for(var B=L;Object.getPrototypeOf(B)!==null;)B=Object.getPrototypeOf(B);return Object.getPrototypeOf(L)===B},Q=function(L){return mt(L,"Number")},jt=Object.values?function(L){return Object.values(L)}:function(L){var j,B=[],G=L,V=function(q,Z){xe(L)&&Z==="prototype"||B.push(q)};if(G){if(bt(G))for(var X=0,Y=G.length;X<Y&&V(G[X],X)!==!1;X++);else if(j=typeof G,G!==null&&j=="object"||j=="function"){for(var H in G)if(G.hasOwnProperty(H)&&V(G[H],H)===!1)break}}return B},St=5;function kt(L){for(var j=[],B=1;B<arguments.length;B++)j[B-1]=arguments[B];for(var G=0;G<j.length;G+=1)(function V(X,Y,H,q){for(var Z in H=H||0,q=q||St,Y){var Ot;Y.hasOwnProperty(Z)&&((Ot=Y[Z])!==null&&At(Ot)?(At(X[Z])||(X[Z]={}),H<q?V(X[Z],Ot,H+1,q):X[Z]=Y[Z]):bt(Ot)?(X[Z]=[],X[Z]=X[Z].concat(Ot)):Ot!==void 0&&(X[Z]=Ot))}})(L,j[G]);return L}function pt(L){return L}(function(L,j){var B;if(xe(L))return(B=function(){for(var G=[],V=0;V<arguments.length;V++)G[V]=arguments[V];var X,Y=j?j.apply(this,G):G[0],H=B.cache;return H.has(Y)?H.get(Y):(X=L.apply(this,G),H.set(Y,X),X)}).cache=new Map;throw new TypeError("Expected a function")})(function(L,Y){var B=(Y=Y===void 0?{}:Y).fontSize,G=Y.fontFamily,V=Y.fontWeight,X=Y.fontStyle,Y=Y.fontVariant;return(ut=ut||document.createElement("canvas").getContext("2d")).font=[X,Y,V,B+"px",G].join(" "),ut.measureText(mt(L,"String")?L:"").width},function(L,j){return function(){for(var B=0,G=0,V=arguments.length;G<V;G++)B+=arguments[G].length;for(var X=Array(B),Y=0,G=0;G<V;G++)for(var H=arguments[G],q=0,Z=H.length;q<Z;q++,Y++)X[Y]=H[q];return X}([L],jt(j=j===void 0?{}:j)).join("")});var ut,ot=typeof Float32Array!="undefined"?Float32Array:Array;function rt(){var L=new ot(9);return ot!=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,j=arguments.length;j--;)L+=arguments[j]*arguments[j];return Math.sqrt(L)});var ht=function(L,wt,Lt){var G=wt[0],V=wt[1],X=wt[2],Y=wt[3],H=wt[4],q=wt[5],Z=wt[6],Ot=wt[7],wt=wt[8],Ft=Lt[0],yt=Lt[1],Rt=Lt[2],Ct=Lt[3],vt=Lt[4],$t=Lt[5],Dt=Lt[6],Ut=Lt[7],Lt=Lt[8];return L[0]=Ft*G+yt*Y+Rt*Z,L[1]=Ft*V+yt*H+Rt*Ot,L[2]=Ft*X+yt*q+Rt*wt,L[3]=Ct*G+vt*Y+$t*Z,L[4]=Ct*V+vt*H+$t*Ot,L[5]=Ct*X+vt*q+$t*wt,L[6]=Dt*G+Ut*Y+Lt*Z,L[7]=Dt*V+Ut*H+Lt*Ot,L[8]=Dt*X+Ut*q+Lt*wt,L};function Wt(){var L=new ot(16);return ot!=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 ae=function(L,Dt,B){var G=Dt[0],V=Dt[1],X=Dt[2],Y=Dt[3],H=Dt[4],q=Dt[5],Z=Dt[6],Ot=Dt[7],wt=Dt[8],Ft=Dt[9],yt=Dt[10],Rt=Dt[11],Ct=Dt[12],vt=Dt[13],$t=Dt[14],Dt=Dt[15],Ut=B[0],Lt=B[1],Ht=B[2],_e=B[3];return L[0]=Ut*G+Lt*H+Ht*wt+_e*Ct,L[1]=Ut*V+Lt*q+Ht*Ft+_e*vt,L[2]=Ut*X+Lt*Z+Ht*yt+_e*$t,L[3]=Ut*Y+Lt*Ot+Ht*Rt+_e*Dt,Ut=B[4],Lt=B[5],Ht=B[6],_e=B[7],L[4]=Ut*G+Lt*H+Ht*wt+_e*Ct,L[5]=Ut*V+Lt*q+Ht*Ft+_e*vt,L[6]=Ut*X+Lt*Z+Ht*yt+_e*$t,L[7]=Ut*Y+Lt*Ot+Ht*Rt+_e*Dt,Ut=B[8],Lt=B[9],Ht=B[10],_e=B[11],L[8]=Ut*G+Lt*H+Ht*wt+_e*Ct,L[9]=Ut*V+Lt*q+Ht*Ft+_e*vt,L[10]=Ut*X+Lt*Z+Ht*yt+_e*$t,L[11]=Ut*Y+Lt*Ot+Ht*Rt+_e*Dt,Ut=B[12],Lt=B[13],Ht=B[14],_e=B[15],L[12]=Ut*G+Lt*H+Ht*wt+_e*Ct,L[13]=Ut*V+Lt*q+Ht*Ft+_e*vt,L[14]=Ut*X+Lt*Z+Ht*yt+_e*$t,L[15]=Ut*Y+Lt*Ot+Ht*Rt+_e*Dt,L};function We(L){for(var j=[],B=1;B<arguments.length;B++)j[B-1]=arguments[B];return L?j.reduce(function(G,V){return function(X){return V(G(X))}},L):pt}function ke(L){return L instanceof Float32Array||L instanceof Array}function Ie(L,j,B){for(;L<j;)L+=2*Math.PI;for(;B<L;)L-=2*Math.PI;return L}ue=new ot(3),ot!=Float32Array&&(ue[0]=0,ue[1]=0,ue[2]=0),ue=new ot(4),ot!=Float32Array&&(ue[0]=0,ue[1]=0,ue[2]=0,ue[3]=0);function Ve(Y,j,B,G,V){var X=(Y=lt(Y,2))[0],Y=Y[1],H=rt();return X=[X,Y],(Y=H)[0]=1,Y[1]=0,Y[2]=0,Y[3]=0,Y[4]=1,Y[5]=0,Y[6]=X[0],Y[7]=X[1],Y[8]=1,Y}function we(L,...j){return j.reduce((B,G)=>V=>B(G(V)),L)}function Je(L,j){return j-L?B=>(B-L)/(j-L):B=>.5}const Xe=Math.sqrt(50),Zt=Math.sqrt(10),Vt=Math.sqrt(2);function ar(L,j,B){return j=(j-L)/Math.max(0,B),L=Math.floor(Math.log(j)/Math.LN10),B=j/ir(10,L),0<=L?(B>=Xe?10:B>=Zt?5:B>=Vt?2:1)*ir(10,L):-ir(10,-L)/(B>=Xe?10:B>=Zt?5:B>=Vt?2:1)}const xr=(L,j,B=5)=>{L=[L,j];let G=0,V=L.length-1,X=L[G],Y=L[V],H;return Y<X&&([X,Y]=[Y,X],[G,V]=[V,G]),0<(H=ar(X,Y,B))?(X=Math.floor(X/H)*H,Y=Math.ceil(Y/H)*H,H=ar(X,Y,B)):H<0&&(X=Math.ceil(X*H)/H,Y=Math.floor(Y*H)/H,H=ar(X,Y,B)),0<H?(L[G]=Math.floor(X/H)*H,L[V]=Math.ceil(Y/H)*H):H<0&&(L[G]=Math.ceil(X*H)/H,L[V]=Math.floor(Y*H)/H),L};function Tr(L){return L!=null&&!Number.isNaN(L)}function hr(L,j){return B=>{B.prototype.rescale=function(){this.initRange(),this.nice();var[G]=this.chooseTransforms();this.composeOutput(G,this.chooseClamp(G))},B.prototype.initRange=function(){var G=this.options.interpolator;this.options.range=L(G)},B.prototype.composeOutput=function(G,V){var X,{domain:H,interpolator:Y,round:q}=this.getOptions(),H=j(H.map(G)),q=q?(X=Y,Z=>(Z=X(Z),Q(Z)?Math.round(Z):Z)):Y;this.output=we(q,H,V,G)},B.prototype.invert=void 0}}var Qn,ue={exports:{}},Ce={exports:{}},pr=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"))},ei=Array.prototype.concat,mi=Array.prototype.slice,Ei=Ce.exports=function(L){for(var j=[],B=0,G=L.length;B<G;B++){var V=L[B];pr(V)?j=ei.call(j,mi.call(V)):j.push(V)}return j},$n=(Ei.wrap=function(L){return function(){return L(Ei(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]}),vr=Ce.exports,Jn=Object.hasOwnProperty,lr=Object.create(null);for(Qn in $n)Jn.call($n,Qn)&&(lr[$n[Qn]]=Qn);var tn=ue.exports={to:{},get:{}};function Pi(L,j,B){return Math.min(Math.max(j,L),B)}function Ai(L){return L=Math.round(L).toString(16).toUpperCase(),L.length<2?"0"+L:L}tn.get=function(L){var j,B;switch(L.substring(0,3).toLowerCase()){case"hsl":j=tn.get.hsl(L),B="hsl";break;case"hwb":j=tn.get.hwb(L),B="hwb";break;default:j=tn.get.rgb(L),B="rgb"}return j?{model:B,value:j}:null},tn.get.rgb=function(L){if(!L)return null;var j,B,G,V=[0,0,0,1];if(j=L.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(G=j[2],j=j[1],B=0;B<3;B++){var X=2*B;V[B]=parseInt(j.slice(X,2+X),16)}G&&(V[3]=parseInt(G,16)/255)}else if(j=L.match(/^#([a-f0-9]{3,4})$/i)){for(G=(j=j[1])[3],B=0;B<3;B++)V[B]=parseInt(j[B]+j[B],16);G&&(V[3]=parseInt(G+G,16)/255)}else{if(j=L.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/))for(B=0;B<3;B++)V[B]=parseInt(j[B+1],0);else{if(!(j=L.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)))return(j=L.match(/^(\w+)$/))?j[1]==="transparent"?[0,0,0,0]:Jn.call($n,j[1])?((V=$n[j[1]])[3]=1,V):null:null;for(B=0;B<3;B++)V[B]=Math.round(2.55*parseFloat(j[B+1]))}j[4]&&(j[5]?V[3]=.01*parseFloat(j[4]):V[3]=parseFloat(j[4]))}for(B=0;B<3;B++)V[B]=Pi(V[B],0,255);return V[3]=Pi(V[3],0,1),V},tn.get.hsl=function(L){var j;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*)?\)$/))?(j=parseFloat(L[4]),[(parseFloat(L[1])%360+360)%360,Pi(parseFloat(L[2]),0,100),Pi(parseFloat(L[3]),0,100),Pi(isNaN(j)?1:j,0,1)]):null},tn.get.hwb=function(L){var j;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*)?\)$/))?(j=parseFloat(L[4]),[(parseFloat(L[1])%360+360)%360,Pi(parseFloat(L[2]),0,100),Pi(parseFloat(L[3]),0,100),Pi(isNaN(j)?1:j,0,1)]):null},tn.to.hex=function(){var L=vr(arguments);return"#"+Ai(L[0])+Ai(L[1])+Ai(L[2])+(L[3]<1?Ai(Math.round(255*L[3])):"")},tn.to.rgb=function(){var L=vr(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]+")"},tn.to.rgb.percent=function(){var L=vr(arguments),j=Math.round(L[0]/255*100),B=Math.round(L[1]/255*100),G=Math.round(L[2]/255*100);return L.length<4||L[3]===1?"rgb("+j+"%, "+B+"%, "+G+"%)":"rgba("+j+"%, "+B+"%, "+G+"%, "+L[3]+")"},tn.to.hsl=function(){var L=vr(arguments);return L.length<4||L[3]===1?"hsl("+L[0]+", "+L[1]+"%, "+L[2]+"%)":"hsla("+L[0]+", "+L[1]+"%, "+L[2]+"%, "+L[3]+")"},tn.to.hwb=function(){var L=vr(arguments),j="";return 4<=L.length&&L[3]!==1&&(j=", "+L[3]),"hwb("+L[0]+", "+L[1]+"%, "+L[2]+"%"+j+")"},tn.to.keyword=function(L){return lr[L.slice(0,3)]};var bl=ue.exports;function Yo(L,j,B){let G=B;return G<0&&(G+=1),1<G&&--G,G<1/6?L+6*(j-L)*G:G<.5?j:G<2/3?L+(j-L)*(2/3-G)*6:L}function Zs(V){var j,B,G,V=bl.get(V);return V?({model:V,value:j}=V,V==="rgb"?j:V==="hsl"?(j=(V=j)[0]/360,B=V[1]/100,G=V[2]/100,V=V[3],B==0?[255*G,255*G,255*G,V]:[255*Yo(B=2*G-(G=G<.5?G*(1+B):G+B-G*B),G,j+1/3),255*Yo(B,G,j),255*Yo(B,G,j-1/3),V]):null):null}const Xi=(L,j)=>B=>L*(1-B)+j*B,xl=(L,j)=>{if(typeof L=="number"&&typeof j=="number")return Xi(L,j);if(typeof L!="string"||typeof j!="string")return()=>L;{var B=L,G=j;const V=Zs(B),X=Zs(G);return V===null||X===null?V?()=>B:()=>G:Y=>{var H=new Array(4);for(let Rt=0;Rt<4;Rt+=1){var q=V[Rt],Z=X[Rt];H[Rt]=q*(1-Y)+Z*Y}var[Ot,wt,Ft,yt]=H;return`rgba(${Math.round(Ot)}, ${Math.round(wt)}, ${Math.round(Ft)}, ${yt})`}}},_l=(L,j)=>{const B=Xi(L,j);return G=>Math.round(B(G))};function Ks({map:L,initKey:j},B){return j=j(B),L.has(j)?L.get(j):B}function Ol(L){return typeof L=="object"?L.valueOf():L}class eo extends Map{constructor(j){if(super(),this.map=new Map,this.initKey=Ol,j!==null)for(var[B,G]of j)this.set(B,G)}get(j){return super.get(Ks({map:this.map,initKey:this.initKey},j))}has(j){return super.has(Ks({map:this.map,initKey:this.initKey},j))}set(j,B){return super.set(([{map:j,initKey:G},V]=[{map:this.map,initKey:this.initKey},j],G=G(V),j.has(G)?j.get(G):(j.set(G,V),V)),B);var G,V}delete(j){return super.delete(([{map:j,initKey:B},G]=[{map:this.map,initKey:this.initKey},j],B=B(G),j.has(B)&&(G=j.get(B),j.delete(B)),G));var B,G}}class Qs{constructor(j){this.options=kt({},this.getDefaultOptions()),this.update(j)}getOptions(){return this.options}update(j={}){this.options=kt({},this.options,j),this.rescale(j)}rescale(j){}}const _r=Symbol("defaultUnknown");function Js(L,j,B){for(let G=0;G<j.length;G+=1)L.has(j[G])||L.set(B(j[G]),G)}function bn(j){var{value:j,from:B,to:G,mapper:V,notFoundReturn:X}=j;let Y=V.get(j);if(Y===void 0){if(X!==_r)return X;Y=B.push(j)-1,V.set(j,Y)}return G[Y%G.length]}function tc(L){return L instanceof Date?j=>""+j:typeof L=="object"?j=>JSON.stringify(j):j=>j}class Ho extends Qs{getDefaultOptions(){return{domain:[],range:[],unknown:_r}}constructor(j){super(j)}map(j){return this.domainIndexMap.size===0&&Js(this.domainIndexMap,this.getDomain(),this.domainKey),bn({value:this.domainKey(j),mapper:this.domainIndexMap,from:this.getDomain(),to:this.getRange(),notFoundReturn:this.options.unknown})}invert(j){return this.rangeIndexMap.size===0&&Js(this.rangeIndexMap,this.getRange(),this.rangeKey),bn({value:this.rangeKey(j),mapper:this.rangeIndexMap,from:this.getRange(),to:this.getDomain(),notFoundReturn:this.options.unknown})}rescale(j){var[B]=this.options.domain,[G]=this.options.range;this.domainKey=tc(B),this.rangeKey=tc(G),this.rangeIndexMap?(j&&!j.range||this.rangeIndexMap.clear(),j&&!j.domain&&!j.compare||(this.domainIndexMap.clear(),this.sortedDomain=void 0)):(this.rangeIndexMap=new Map,this.domainIndexMap=new Map)}clone(){return new Ho(this.options)}getRange(){return this.options.range}getDomain(){var j,B;return this.sortedDomain||({domain:j,compare:B}=this.options,this.sortedDomain=B?[...j].sort(B):j),this.sortedDomain}}function ee(vt){const{domain:j,range:B,paddingOuter:G,paddingInner:V,flex:X,round:Y,align:H}=vt;var q=j.length,yt=0<(yt=(vt=q)-(Z=X).length)?[...Z,...new Array(yt).fill(1)]:yt<0?Z.slice(0,vt):Z,[vt,Z]=B,Z=Z-vt,Ct=Z/(2/q*G+1-1/q*V);const Ot=Ct*V/q;Ct-=q*Ot;const wt=function(Lt){const Ht=Math.min(...Lt);return Lt.map(_e=>_e/Ht)}(yt),Ft=Ct/wt.reduce((Lt,Ht)=>Lt+Ht);var yt=new eo(j.map((Lt,Ht)=>(Ht=wt[Ht]*Ft,[Lt,Y?Math.floor(Ht):Ht]))),Rt=new eo(j.map((Lt,Ht)=>(Ht=wt[Ht]*Ft+Ot,[Lt,Y?Math.floor(Ht):Ht]))),Ct=Array.from(Rt.values()).reduce((Lt,Ht)=>Lt+Ht),vt=vt+(Z-(Ct-Ct/q*V))*H;let $t=Y?Math.round(vt):vt;var Dt=new Array(q);for(let Lt=0;Lt<q;Lt+=1){Dt[Lt]=(Ut=$t,Math.round(1e12*Ut)/1e12);var Ut=j[Lt];$t+=Rt.get(Ut)}return{valueBandWidth:yt,valueStep:Rt,adjustedRange:Dt}}class ft extends Ho{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,paddingInner:0,paddingOuter:0,padding:0,unknown:_r,flex:[]}}constructor(j){super(j)}clone(){return new ft(this.options)}getStep(j){return this.valueStep===void 0?1:typeof this.valueStep=="number"?this.valueStep:j===void 0?Array.from(this.valueStep.values())[0]:this.valueStep.get(j)}getBandWidth(j){return this.valueBandWidth===void 0?1:typeof this.valueBandWidth=="number"?this.valueBandWidth:j===void 0?Array.from(this.valueBandWidth.values())[0]:this.valueBandWidth.get(j)}getRange(){return this.adjustedRange}getPaddingInner(){var{padding:j,paddingInner:B}=this.options;return 0<j?j:B}getPaddingOuter(){var{padding:j,paddingOuter:B}=this.options;return 0<j?j:B}rescale(){super.rescale();var{align:G,domain:j,range:V,round:X,flex:B}=this.options,{adjustedRange:G,valueBandWidth:V,valueStep:X}=function(Z){var H=Z.domain;if((H=H.length)===0)return{valueBandWidth:void 0,valueStep:void 0,adjustedRange:[]};if(!((q=Z.flex)==null||!q.length))return ee(Z);var{range:q,paddingOuter:Z,paddingInner:Ot,round:wt,align:Ft}=Z;let yt,Rt,Ct=q[0];return q=q[1]-Ct,yt=q/Math.max(1,2*Z+(H-Ot)),wt&&(yt=Math.floor(yt)),Ct+=(q-yt*(H-Ot))*Ft,Rt=yt*(1-Ot),wt&&(Ct=Math.round(Ct),Rt=Math.round(Rt)),Z=new Array(H).fill(0).map((vt,$t)=>Ct+$t*yt),{valueStep:yt,valueBandWidth:Rt,adjustedRange:Z}}({align:G,range:V,round:X,flex:B,paddingInner:this.getPaddingInner(),paddingOuter:this.getPaddingOuter(),domain:j});this.valueStep=X,this.valueBandWidth=V,this.adjustedRange=G}}const ve=(L,j,B)=>{let G,V,X=L,Y=j;if(X===Y&&0<B)return[X];let H=ar(X,Y,B);if(H===0||!Number.isFinite(H))return[];if(0<H){X=Math.ceil(X/H),Y=Math.floor(Y/H),V=new Array(G=Math.ceil(Y-X+1));for(let q=0;q<G;q+=1)V[q]=(X+q)*H}else{H=-H,X=Math.ceil(X*H),Y=Math.floor(Y*H),V=new Array(G=Math.ceil(Y-X+1));for(let q=0;q<G;q+=1)V[q]=(X+q)/H}return V},Yt=(G,X,B)=>{var[G,V]=G,[X,Y]=X;let H,q;return we(q=G<V?(H=Je(G,V),B(X,Y)):(H=Je(V,G),B(Y,X)),H)},Ae=(L,j,B)=>{const G=Math.min(L.length,j.length)-1,V=new Array(G),X=new Array(G);var Y=L[0]>L[G],H=Y?[...L].reverse():L,q=Y?[...j].reverse():j;for(let Z=0;Z<G;Z+=1)V[Z]=Je(H[Z],H[Z+1]),X[Z]=B(q[Z],q[Z+1]);return Z=>{var Ot=function(Ft,yt,Rt,Ct,vt){let $t=Rt||0,Dt=Ct||Ft.length;for(var Ut=vt||(Ht=>Ht);$t<Dt;){var Lt=Math.floor(($t+Dt)/2);Ut(Ft[Lt])>yt?Dt=Lt:$t=Lt+1}return $t}(L,Z,1,G)-1,wt=V[Ot];return we(X[Ot],wt)(Z)}},Tn=(L,j,B,G)=>(2<Math.min(L.length,j.length)?Ae:Yt)(L,j,G?_l:B);class Xt extends Qs{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:Xi,tickCount:5}}map(j){return Tr(j)?this.output(j):this.options.unknown}invert(j){return Tr(j)?this.input(j):this.options.unknown}nice(){var j,B,G,V;this.options.nice&&([j,B,G,...V]=this.getTickMethodOptions(),this.options.domain=this.chooseNice()(j,B,G,...V))}getTicks(){var j=this.options.tickMethod,[B,G,V,...X]=this.getTickMethodOptions();return j(B,G,V,...X)}getTickMethodOptions(){var{domain:j,tickCount:B}=this.options;return[j[0],j[j.length-1],B]}chooseNice(){return xr}rescale(){this.nice();var[j,B]=this.chooseTransforms();this.composeOutput(j,this.chooseClamp(j)),this.composeInput(j,B,this.chooseClamp(B))}chooseClamp(G){var{clamp:B,range:V}=this.options,G=this.options.domain.map(G),V=Math.min(G.length,V.length);if(B){B=G[0],G=G[V-1];const X=G<B?G:B,Y=G<B?B:G;return H=>Math.min(Math.max(X,H),Y)}return pt}composeOutput(j,B){var{domain:Y,range:G,round:V,interpolate:X}=this.options,Y=Tn(Y.map(j),G,X,V);this.output=we(Y,B,j)}composeInput(j,B,G){var{domain:V,range:X}=this.options,X=Tn(X,V.map(j),Xi);this.input=we(B,G,X)}}class he extends Xt{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:xl,tickMethod:ve,tickCount:5}}chooseTransforms(){return[pt,pt]}clone(){return new he(this.options)}}class Ye extends ft{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,padding:0,unknown:_r,paddingInner:1,paddingOuter:0}}constructor(j){super(j)}getPaddingInner(){return 1}clone(){return new Ye(this.options)}update(j){super.update(j)}getPaddingOuter(){return this.options.padding}}function Rn(L,j){for(var B=[],G=0,V=L.length;G<V;G++)B.push(L[G].substr(0,j));return B}var xn,Ce=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],ue=["January","February","March","April","May","June","July","August","September","October","November","December"],kr=Rn(ue,3);(function(L){for(var j=[],B=1;B<arguments.length;B++)j[B-1]=arguments[B];for(var G=0,V=j;G<V.length;G++){var X,Y=V[G];for(X in Y)L[X]=Y[X]}})({},{dayNamesShort:Rn(Ce,3),dayNames:Ce,monthNamesShort:kr,monthNames:ue,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 Cr;let oa=xn=class extends he{getDefaultOptions(){return{domain:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:pt,tickMethod:ve,tickCount:5}}constructor(L){super(L)}clone(){return new xn(this.options)}};oa=xn=function(L,j,B,G){var V,X=arguments.length,Y=X<3?j:G===null?G=Object.getOwnPropertyDescriptor(j,B):G;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Y=Reflect.decorate(L,j,B,G);else for(var H=L.length-1;0<=H;H--)(V=L[H])&&(Y=(X<3?V(Y):3<X?V(j,B,Y):V(j,B))||Y);return 3<X&&Y&&Object.defineProperty(j,B,Y),Y}([hr(function(L){return[L(0),L(1)]},j=>{var[j,B]=j;return we(Xi(0,1),Je(j,B))})],oa);let Ti=Cr=class extends he{getDefaultOptions(){return{domain:[0,.5,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:pt,tickMethod:ve,tickCount:5}}constructor(L){super(L)}clone(){return new Cr(this.options)}};Ti=Cr=function(L,j,B,G){var V,X=arguments.length,Y=X<3?j:G===null?G=Object.getOwnPropertyDescriptor(j,B):G;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Y=Reflect.decorate(L,j,B,G);else for(var H=L.length-1;0<=H;H--)(V=L[H])&&(Y=(X<3?V(Y):3<X?V(j,B,Y):V(j,B))||Y);return 3<X&&Y&&Object.defineProperty(j,B,Y),Y}([hr(function(L){return[L(0),L(.5),L(1)]},L=>{const[j,B,G]=L,V=we(Xi(0,.5),Je(j,B)),X=we(Xi(.5,1),Je(B,G));return Y=>(j>G?Y<B?X:V:Y<B?V:X)(Y)})],Ti);function or(L,j,B,G,V){var X=new he({range:[j,j+G]}),Y=new he({range:[B,B+V]});return{transform:function(Z){var Z=lt(Z,2),q=Z[0],Z=Z[1];return[X.map(q),Y.map(Z)]},untransform:function(Z){var Z=lt(Z,2),q=Z[0],Z=Z[1];return[X.invert(q),Y.invert(Z)]}}}function ki(L,j,B,G,V){return(0,lt(L,1)[0])(j,B,G,V)}function sa(L,j,B,G,V){return lt(L,1)[0]}function Or(q,j,B,G,V){var X=(q=lt(q,4))[0],Y=q[1],H=q[2],q=q[3],Z=new he({range:[H,q]}),Ot=new he({range:[X,Y]}),wt=1<(H=V/G)?1:H,Ft=1<H?1/H:1;return{transform:function(Ct){var Ct=lt(Ct,2),Rt=Ct[0],Ct=Ct[1],Rt=Ot.map(Rt),Ct=Z.map(Ct);return[.5*(Ct*Math.cos(Rt)*wt)+.5,.5*(Ct*Math.sin(Rt)*Ft)+.5]},untransform:function(vt){var vt=lt(vt,2),Rt=vt[0],vt=vt[1],Rt=2*(Rt-.5)/wt,vt=2*(vt-.5)/Ft,Ct=Math.sqrt(Math.pow(Rt,2)+Math.pow(vt,2)),vt=Ie(Math.atan2(vt,Rt),X,Y);return[Ot.invert(vt),Z.invert(Ct)]}}}function ni(L,j,B,G,V){return{transform:function(Y){var Y=lt(Y,2),H=Y[0];return[Y[1],H]},untransform:function(Y){var Y=lt(Y,2),H=Y[0];return[Y[1],H]}}}function $r(L){for(var j=[],B=1;B<arguments.length;B++)j[B-1]=arguments[B];return la.apply(void 0,te([[-1,-1]],lt(j),!1))}function Ci(L){for(var j=[],B=1;B<arguments.length;B++)j[B-1]=arguments[B];return la.apply(void 0,te([[-1,1]],lt(j),!1))}function ca(L){for(var j=[],B=1;B<arguments.length;B++)j[B-1]=arguments[B];return la.apply(void 0,te([[1,-1]],lt(j),!1))}function $o(Y,j,B,G,V){var X,Y=lt(Y,1)[0],H=rt();return H=H,Y=Y,X=Math.sin(Y),Y=Math.cos(Y),H[0]=Y,H[1]=X,H[2]=0,H[3]=-X,H[4]=Y,H[5]=0,H[6]=0,H[7]=0,H[8]=1,H}function no(L,j,B,G,V){var X=(L=lt(L,4))[0],Y=L[1],H=L[2],q=(L[3]-H)/(+Y/(2*Math.PI)+1),Z=q/(2*Math.PI),Ot=new he({range:[H,H+.99*q]}),wt=new he({range:[X,Y]}),Ft=1<(L=V/G)?1:L,yt=1<L?1/L:1;return{transform:function(vt){var vt=lt(vt,2),Ct=vt[0],vt=vt[1],Ct=wt.map(Ct),vt=Ot.map(vt);return[.5*(Math.cos(Ct)*(Z*Ct+vt)*Ft)+.5,.5*(Math.sin(Ct)*(Z*Ct+vt)*yt)+.5]},untransform:function(vt){var vt=lt(vt,2),$t=vt[0],vt=vt[1],$t=2*($t-.5)/Ft,vt=2*(vt-.5)/yt,Ct=Math.sqrt(Math.pow($t,2)+Math.pow(vt,2)),vt=Ie(Math.atan2(vt,$t)+Math.floor(Ct/q)*Math.PI*2,X,Y),$t=Ct-Z*vt;return[wt.invert(vt),Ot.invert($t)]}}}function ro(q,j,B,G,V){var X=(q=lt(q,4))[0],Y=q[1],H=q[2],q=q[3],Z=new he({range:[H,q]});return{transform:function(Ot){for(var wt=[],Ft=Ot.length,yt=new Ye({domain:new Array(Ft).fill(0).map(function($t,Dt){return Dt}),range:[X,Y]}),Rt=0;Rt<Ft;Rt++){var vt=Ot[Rt],Ct=yt.map(Rt),vt=Z.map(vt);wt.push(Ct,vt)}return wt},untransform:function(Ot){for(var wt=[],Ft=0;Ft<Ot.length;Ft+=2){var yt=Ot[Ft+1];wt.push(Z.invert(yt))}return wt}}}var la=function(Y,j,B,G,V){var Y=lt(Y,2),X=Y[0],Y=Y[1],H=rt();return X=[X,Y],(Y=H)[0]=X[0],Y[1]=0,Y[2]=0,Y[3]=0,Y[4]=X[1],Y[5]=0,Y[6]=0,Y[7]=0,Y[8]=1,Y};function Uo(L){return 1/Math.tan(L)}function wl(L,j,B,G,V){var X=Uo(lt(L,1)[0]);return{transform:function(q){var q=lt(q,2),H=q[0],q=q[1];return[H+q*X,q]},untransform:function(q){var q=lt(q,2),H=q[0],q=q[1];return[H-q*X,q]}}}function Sl(L,j,B,G,V){var X=Uo(lt(L,1)[0]);return{transform:function(H){var H=lt(H,2),q=H[0];return[q,H[1]+q*X]},untransform:function(H){var H=lt(H,2),q=H[0];return[q,H[1]-q*X]}}}function Vo(L,j,B,H,Y){var X=L<j,Y=(X?j-H:Y-j)||Y-H,H=X?-1:1;return H*Y*(B+1)/(B+Y/((L-j)*H))+j}function Xo(L,j,B,G,Y){var X=L<j,Y=(X?j-G:Y-j)||Y-G;return Y/(Y*(B+1)/(L-j)-B*(X?-1:1))+j}function io(L,j,B){return B?new he({range:[0,1],domain:[0,j]}).map(L):L}function kf(H,j,B,G,V){var X=(H=lt(H,3))[0],Y=H[1],H=H[2],q=io(X,G,H!==void 0&&H);return{transform:function(wt){var wt=lt(wt,2),Ot=wt[0],wt=wt[1];return[Vo(Ot,q,Y,0,1),wt]},untransform:function(wt){var wt=lt(wt,2),Ot=wt[0],wt=wt[1];return[Xo(Ot,q,Y,0,1),wt]}}}function d0(H,j,B,G,V){var X=(H=lt(H,3))[0],Y=H[1],H=H[2],q=io(X,V,H!==void 0&&H);return{transform:function(Z){return Z=lt(Z,2),[Z[0],Vo(Z[1],q,Y,0,1)]},untransform:function(Z){return Z=lt(Z,2),[Z[0],Xo(Z[1],q,Y,0,1)]}}}function h0(Z,j,B,G,V){var X=(Z=lt(Z,5))[0],Y=Z[1],H=Z[2],q=Z[3],Z=Z[4],Ot=io(X,G,Z=Z!==void 0&&Z),wt=io(Y,V,Z);return{transform:function(Rt){var Rt=lt(Rt,2),yt=Rt[0],Rt=Rt[1];return[Vo(yt,Ot,H,0,1),Vo(Rt,wt,q,0,1)]},untransform:function(Rt){var Rt=lt(Rt,2),yt=Rt[0],Rt=Rt[1];return[Xo(yt,Ot,H,0,1),Xo(Rt,wt,q,0,1)]}}}function p0(Z,j,B,G,V){var X=(Z=lt(Z,5))[0],Y=Z[1],H=Z[2],q=Z[3],Z=(Z=Z[4])!==void 0&&Z,Ot=new he({range:[0,G]}),wt=new he({range:[0,V]}),Ft=Z?X:Ot.map(X),yt=Z?Y:wt.map(Y);return{transform:function(vt){var vt=lt(vt,2),Ct=vt[0],vt=vt[1],$t=Ot.map(Ct)-Ft,Dt=wt.map(vt)-yt,Ut=Math.sqrt($t*$t+Dt*Dt);return H<Ut?[Ct,vt]:(Ct=Vo(Ut,0,q,0,H),vt=Math.atan2(Dt,$t),Ut=Ft+Ct*Math.cos(vt),Dt=yt+Ct*Math.sin(vt),[Ot.invert(Ut),wt.invert(Dt)])},untransform:function(vt){var vt=lt(vt,2),Ct=vt[0],vt=vt[1],$t=Ot.map(Ct)-Ft,Dt=wt.map(vt)-yt,Ut=Math.sqrt($t*$t+Dt*Dt);return H<Ut?[Ct,vt]:(Ct=Xo(Ut,0,q,0,H),vt=Math.atan2(Dt,$t),Ut=Ft+Ct*Math.cos(vt),Dt=yt+Ct*Math.sin(vt),[Ot.invert(Ut),wt.invert(Dt)])}}}function v0(L,j,B,G,V,X,Y){var H=new he({range:[j,j+V]}),q=new he({range:[B,B+X]}),Z=new he({range:[G,G+Y]});return{transform:function(yt){var yt=lt(yt,3),wt=yt[0],Ft=yt[1],yt=yt[2];return[H.map(wt),q.map(Ft),Z.map(yt)]},untransform:function(yt){var yt=lt(yt,3),wt=yt[0],Ft=yt[1],yt=yt[2];return[H.invert(wt),q.invert(Ft),Z.invert(yt)]}}}function g0(Ot,j,B,G,V,X,Y){var H,q=(Ot=lt(Ot,3))[0],Z=Ot[1],Ot=Ot[2];return H=Wt(),q=[q,Z,Ot],H[0]=1,H[1]=0,H[2]=0,H[3]=0,H[4]=0,H[5]=1,H[6]=0,H[7]=0,H[8]=0,H[9]=0,H[10]=1,H[11]=0,H[12]=q[0],H[13]=q[1],H[14]=q[2],H[15]=1,H}function La(L,j,B,G,V,X,Y){return{transform:function(q){var q=lt(q,3),Z=q[0];return[q[1],Z,q[2]]},untransform:function(q){var q=lt(q,3),Z=q[0];return[q[1],Z,q[2]]}}}function y0(Ot,j,B,G,V,X,Y){var H,q=(Ot=lt(Ot,3))[0],Z=Ot[1],Ot=Ot[2];return H=Wt(),q=[q,Z,Ot],H[0]=q[0],H[1]=0,H[2]=0,H[3]=0,H[4]=0,H[5]=q[1],H[6]=0,H[7]=0,H[8]=0,H[9]=0,H[10]=q[2],H[11]=0,H[12]=0,H[13]=0,H[14]=0,H[15]=1,H}Lr.prototype.update=function(L){this.options=kt({},this.options,L),this.recoordinate()},Lr.prototype.clone=function(){return new Lr(this.options)},Lr.prototype.getOptions=function(){return this.options},Lr.prototype.clear=function(){this.update({transformations:[]})},Lr.prototype.getSize=function(){var L=this.options;return[L.width,L.height]},Lr.prototype.getCenter=function(){var L=this.options,j=L.x,B=L.y;return[(2*j+L.width)/2,(2*B+L.height)/2]},Lr.prototype.transform=function(){for(var L=[],j=0;j<arguments.length;j++)L[j]=arguments[j];var B=this.options.transformations;return this.update({transformations:te(te([],lt(B),!1),[te([],lt(L),!1)],!1)}),this},Lr.prototype.map=function(L){return this.output(L)},Lr.prototype.invert=function(L){return this.input(L)},Lr.prototype.recoordinate=function(){this.output=this.compose(),this.input=this.compose(!0)},Lr.prototype.compose=function(L){function j(Lt,Ht){var _e;H.push((Ht=Ht===void 0?!0:Ht)?(_e=Lt,function(Ur){for(var ri=[],wr=0;wr<Ur.length-1;wr+=2){var Vr=[Ur[wr],Ur[wr+1]],Vr=_e(Vr);ri.push.apply(ri,te([],lt(Vr),!1))}return ri}):Lt)}var B,G,V=(L=L===void 0?!1:L)?te([],lt(this.options.transformations),!1).reverse():this.options.transformations,X=L?function(Lt){return Lt.untransform}:function(Lt){return Lt.transform},Y=[],H=[];try{for(var q=Et(V),Z=q.next();!Z.done;Z=q.next()){var Ot,wt,Ft,yt,Rt,Ct,vt=lt(Z.value),$t=vt[0],Dt=vt.slice(1),Ut=this.transformers[$t];Ut&&(wt=(Ot=this.options).x,Ft=Ot.y,yt=Ot.width,Rt=Ot.height,ke(Ct=Ut(te([],lt(Dt),!1),wt,Ft,yt,Rt))?Y.push(Ct):(Y.length&&(j(this.createMatrixTransform(Y,L)),Y.splice(0,Y.length)),j(X(Ct)||pt,$t!=="parallel")))}}catch(Lt){B={error:Lt}}finally{try{Z&&!Z.done&&(G=q.return)&&G.call(q)}finally{if(B)throw B.error}}return Y.length&&j(this.createMatrixTransform(Y,L)),We.apply(void 0,te([],lt(H),!1))},Lr.prototype.createMatrixTransform=function(L,j){var B,G,V,X,Y,H,q,Z,Ot,wt,Ft,yt,Rt=rt();return j&&L.reverse(),L.forEach(function(Ct){return ht(Rt,Rt,Ct)}),j&&(j=L=Rt,(yt=new ot(9))[0]=j[0],yt[1]=j[1],yt[2]=j[2],yt[3]=j[3],yt[4]=j[4],yt[5]=j[5],yt[6]=j[6],yt[7]=j[7],yt[8]=j[8],yt=(j=yt)[0],B=j[1],G=j[2],V=j[3],X=j[4],Y=j[5],H=j[6],q=j[7],Z=(j=j[8])*X-Y*q,Ft=yt*Z+B*(Ot=-j*V+Y*H)+G*(wt=q*V-X*H))&&(L[0]=Z*(Ft=1/Ft),L[1]=(-j*B+G*q)*Ft,L[2]=(Y*B-G*X)*Ft,L[3]=Ot*Ft,L[4]=(j*yt-G*H)*Ft,L[5]=(-Y*yt+G*V)*Ft,L[6]=wt*Ft,L[7]=(-q*yt+B*H)*Ft,L[8]=(X*yt-B*V)*Ft),function(Ht){var vt,$t,Dt,Ut,Lt,Ht=[Ht[0],Ht[1],1];return Dt=Rt,Ut=($t=vt=Ht)[0],Lt=$t[1],$t=$t[2],vt[0]=Ut*Dt[0]+Lt*Dt[3]+$t*Dt[6],vt[1]=Ut*Dt[1]+Lt*Dt[4]+$t*Dt[7],vt[2]=Ut*Dt[2]+Lt*Dt[5]+$t*Dt[8],[Ht[0],Ht[1]]}},Ce=Lr;function Lr(L){this.options={x:0,y:0,width:300,height:150,transformations:[]},this.transformers={cartesian:or,translate:Ve,custom:ki,matrix:sa,polar:Or,transpose:ni,scale:la,"shear.x":wl,"shear.y":Sl,reflect:$r,"reflect.x":Ci,"reflect.y":ca,rotate:$o,helix:no,parallel:ro,fisheye:h0,"fisheye.x":kf,"fisheye.y":d0,"fisheye.circular":p0},this.update(L)}Nr.prototype.update=function(L){this.options=kt({},this.options,L),this.recoordinate()},Nr.prototype.clone=function(){return new Nr(this.options)},Nr.prototype.getOptions=function(){return this.options},Nr.prototype.clear=function(){this.update({transformations:[]})},Nr.prototype.getSize=function(){var L=this.options;return[L.width,L.height,L.depth]},Nr.prototype.getCenter=function(){var L=this.options,j=L.x,B=L.y,G=L.z;return[(2*j+L.width)/2,(2*B+L.height)/2,(2*G+L.depth)/2]},Nr.prototype.transform=function(){for(var L=[],j=0;j<arguments.length;j++)L[j]=arguments[j];var B=this.options.transformations;return this.update({transformations:te(te([],lt(B),!1),[te([],lt(L),!1)],!1)}),this},Nr.prototype.map=function(L){return this.output(L)},Nr.prototype.invert=function(L){return this.input(L)},Nr.prototype.recoordinate=function(){this.output=this.compose(),this.input=this.compose(!0)},Nr.prototype.compose=function(L){function j(_e,Ur){var ri;H.push((Ur=Ur===void 0?!0:Ur)?(ri=_e,function(wr){for(var Vr=[],bi=0;bi<wr.length-1;bi+=3){var In=[wr[bi],wr[bi+1],wr[bi+2]],In=ri(In);Vr.push.apply(Vr,te([],lt(In),!1))}return Vr}):_e)}var B,G,V=(L=L===void 0?!1:L)?te([],lt(this.options.transformations),!1).reverse():this.options.transformations,X=L?function(_e){return _e.untransform}:function(_e){return _e.transform},Y=[],H=[];try{for(var q=Et(V),Z=q.next();!Z.done;Z=q.next()){var Ot,wt,Ft,yt,Rt,Ct,vt,$t,Dt=lt(Z.value),Ut=Dt[0],Lt=Dt.slice(1),Ht=this.transformers[Ut];Ht&&(wt=(Ot=this.options).x,Ft=Ot.y,yt=Ot.z,Rt=Ot.width,Ct=Ot.height,vt=Ot.depth,ke($t=Ht(te([],lt(Lt),!1),wt,Ft,yt,Rt,Ct,vt))?Y.push($t):(Y.length&&(j(this.createMatrixTransform(Y,L)),Y.splice(0,Y.length)),j(X($t)||pt,!0)))}}catch(_e){B={error:_e}}finally{try{Z&&!Z.done&&(G=q.return)&&G.call(q)}finally{if(B)throw B.error}}return Y.length&&j(this.createMatrixTransform(Y,L)),We.apply(void 0,te([],lt(H),!1))},Nr.prototype.createMatrixTransform=function(L,j){var B,G,V,X,Y,H,q,Z,Ot,wt,Ft,yt,Rt,Ct,vt,$t,Dt,Ut,Lt,Ht,_e,Ur,ri,wr,Vr,bi,In,_n,qi=Wt();return j&&L.reverse(),L.forEach(function(Cf){return ae(qi,qi,Cf)}),j&&(j=L=qi,(_n=new ot(16))[0]=j[0],_n[1]=j[1],_n[2]=j[2],_n[3]=j[3],_n[4]=j[4],_n[5]=j[5],_n[6]=j[6],_n[7]=j[7],_n[8]=j[8],_n[9]=j[9],_n[10]=j[10],_n[11]=j[11],_n[12]=j[12],_n[13]=j[13],_n[14]=j[14],_n[15]=j[15],_n=(j=_n)[0],B=j[1],G=j[2],V=j[3],X=j[4],Y=j[5],H=j[6],q=j[7],Z=j[8],Ot=j[9],wt=j[10],Ft=j[11],yt=j[12],Rt=j[13],Ct=j[14],j=j[15],In=(vt=_n*Y-B*X)*(bi=wt*j-Ft*Ct)-($t=_n*H-G*X)*(Vr=Ot*j-Ft*Rt)+(Dt=_n*q-V*X)*(wr=Ot*Ct-wt*Rt)+(Ut=B*H-G*Y)*(ri=Z*j-Ft*yt)-(Lt=B*q-V*Y)*(Ur=Z*Ct-wt*yt)+(Ht=G*q-V*H)*(_e=Z*Rt-Ot*yt))&&(L[0]=(Y*bi-H*Vr+q*wr)*(In=1/In),L[1]=(G*Vr-B*bi-V*wr)*In,L[2]=(Rt*Ht-Ct*Lt+j*Ut)*In,L[3]=(wt*Lt-Ot*Ht-Ft*Ut)*In,L[4]=(H*ri-X*bi-q*Ur)*In,L[5]=(_n*bi-G*ri+V*Ur)*In,L[6]=(Ct*Dt-yt*Ht-j*$t)*In,L[7]=(Z*Ht-wt*Dt+Ft*$t)*In,L[8]=(X*Vr-Y*ri+q*_e)*In,L[9]=(B*ri-_n*Vr-V*_e)*In,L[10]=(yt*Lt-Rt*Dt+j*vt)*In,L[11]=(Ot*Dt-Z*Lt-Ft*vt)*In,L[12]=(Y*Ur-X*wr-H*_e)*In,L[13]=(_n*wr-B*Ur+G*_e)*In,L[14]=(Rt*$t-yt*Ut-Ct*vt)*In,L[15]=(Z*Ut-Ot*$t+wt*vt)*In),function(fa){var qo,Zi,ur,Zo,Ko,ua,fa=[fa[0],fa[1],fa[2],1];return ur=qi,Zo=(Zi=qo=fa)[0],Ko=Zi[1],ua=Zi[2],Zi=Zi[3],qo[0]=ur[0]*Zo+ur[4]*Ko+ur[8]*ua+ur[12]*Zi,qo[1]=ur[1]*Zo+ur[5]*Ko+ur[9]*ua+ur[13]*Zi,qo[2]=ur[2]*Zo+ur[6]*Ko+ur[10]*ua+ur[14]*Zi,qo[3]=ur[3]*Zo+ur[7]*Ko+ur[11]*ua+ur[15]*Zi,[fa[0],fa[1],fa[2]]}},kr=Nr;function Nr(L){this.options={x:0,y:0,z:0,width:300,height:150,depth:150,transformations:[]},this.transformers={cartesian3D:v0,translate3D:g0,scale3D:y0,transpose3D:La},this.update(L)}tt.Coordinate=Ce,tt.Coordinate3D=kr,Object.defineProperty(tt,"__esModule",{value:!0})})},8874:function(je){"use strict";je.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},19818:function(je,Dn,tt){var Et=tt(8874),lt=tt(86851),te=Object.hasOwnProperty,xe=Object.create(null);for(var zt in Et)te.call(Et,zt)&&(xe[Et[zt]]=zt);var mt=je.exports={to:{},get:{}};mt.get=function(Q){var jt=Q.substring(0,3).toLowerCase(),St,kt;switch(jt){case"hsl":St=mt.get.hsl(Q),kt="hsl";break;case"hwb":St=mt.get.hwb(Q),kt="hwb";break;default:St=mt.get.rgb(Q),kt="rgb";break}return St?{model:kt,value:St}:null},mt.get.rgb=function(Q){if(!Q)return null;var jt=/^#([a-f0-9]{3,4})$/i,St=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,kt=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,pt=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,ut=/^(\w+)$/,ot=[0,0,0,1],rt,ht,Wt;if(rt=Q.match(St)){for(Wt=rt[2],rt=rt[1],ht=0;ht<3;ht++){var ae=ht*2;ot[ht]=parseInt(rt.slice(ae,ae+2),16)}Wt&&(ot[3]=parseInt(Wt,16)/255)}else if(rt=Q.match(jt)){for(rt=rt[1],Wt=rt[3],ht=0;ht<3;ht++)ot[ht]=parseInt(rt[ht]+rt[ht],16);Wt&&(ot[3]=parseInt(Wt+Wt,16)/255)}else if(rt=Q.match(kt)){for(ht=0;ht<3;ht++)ot[ht]=parseInt(rt[ht+1],0);rt[4]&&(rt[5]?ot[3]=parseFloat(rt[4])*.01:ot[3]=parseFloat(rt[4]))}else if(rt=Q.match(pt)){for(ht=0;ht<3;ht++)ot[ht]=Math.round(parseFloat(rt[ht+1])*2.55);rt[4]&&(rt[5]?ot[3]=parseFloat(rt[4])*.01:ot[3]=parseFloat(rt[4]))}else return(rt=Q.match(ut))?rt[1]==="transparent"?[0,0,0,0]:te.call(Et,rt[1])?(ot=Et[rt[1]],ot[3]=1,ot):null:null;for(ht=0;ht<3;ht++)ot[ht]=bt(ot[ht],0,255);return ot[3]=bt(ot[3],0,1),ot},mt.get.hsl=function(Q){if(!Q)return null;var jt=/^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*)?\)$/,St=Q.match(jt);if(St){var kt=parseFloat(St[4]),pt=(parseFloat(St[1])%360+360)%360,ut=bt(parseFloat(St[2]),0,100),ot=bt(parseFloat(St[3]),0,100),rt=bt(isNaN(kt)?1:kt,0,1);return[pt,ut,ot,rt]}return null},mt.get.hwb=function(Q){if(!Q)return null;var jt=/^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*)?\)$/,St=Q.match(jt);if(St){var kt=parseFloat(St[4]),pt=(parseFloat(St[1])%360+360)%360,ut=bt(parseFloat(St[2]),0,100),ot=bt(parseFloat(St[3]),0,100),rt=bt(isNaN(kt)?1:kt,0,1);return[pt,ut,ot,rt]}return null},mt.to.hex=function(){var Q=lt(arguments);return"#"+At(Q[0])+At(Q[1])+At(Q[2])+(Q[3]<1?At(Math.round(Q[3]*255)):"")},mt.to.rgb=function(){var Q=lt(arguments);return Q.length<4||Q[3]===1?"rgb("+Math.round(Q[0])+", "+Math.round(Q[1])+", "+Math.round(Q[2])+")":"rgba("+Math.round(Q[0])+", "+Math.round(Q[1])+", "+Math.round(Q[2])+", "+Q[3]+")"},mt.to.rgb.percent=function(){var Q=lt(arguments),jt=Math.round(Q[0]/255*100),St=Math.round(Q[1]/255*100),kt=Math.round(Q[2]/255*100);return Q.length<4||Q[3]===1?"rgb("+jt+"%, "+St+"%, "+kt+"%)":"rgba("+jt+"%, "+St+"%, "+kt+"%, "+Q[3]+")"},mt.to.hsl=function(){var Q=lt(arguments);return Q.length<4||Q[3]===1?"hsl("+Q[0]+", "+Q[1]+"%, "+Q[2]+"%)":"hsla("+Q[0]+", "+Q[1]+"%, "+Q[2]+"%, "+Q[3]+")"},mt.to.hwb=function(){var Q=lt(arguments),jt="";return Q.length>=4&&Q[3]!==1&&(jt=", "+Q[3]),"hwb("+Q[0]+", "+Q[1]+"%, "+Q[2]+"%"+jt+")"},mt.to.keyword=function(Q){return xe[Q.slice(0,3)]};function bt(Q,jt,St){return Math.min(Math.max(jt,Q),St)}function At(Q){var jt=Math.round(Q).toString(16).toUpperCase();return jt.length<2?"0"+jt:jt}},26729:function(je){"use strict";var Dn=Object.prototype.hasOwnProperty,tt="~";function Et(){}Object.create&&(Et.prototype=Object.create(null),new Et().__proto__||(tt=!1));function lt(mt,bt,At){this.fn=mt,this.context=bt,this.once=At||!1}function te(mt,bt,At,Q,jt){if(typeof At!="function")throw new TypeError("The listener must be a function");var St=new lt(At,Q||mt,jt),kt=tt?tt+bt:bt;return mt._events[kt]?mt._events[kt].fn?mt._events[kt]=[mt._events[kt],St]:mt._events[kt].push(St):(mt._events[kt]=St,mt._eventsCount++),mt}function xe(mt,bt){--mt._eventsCount===0?mt._events=new Et:delete mt._events[bt]}function zt(){this._events=new Et,this._eventsCount=0}zt.prototype.eventNames=function(){var bt=[],At,Q;if(this._eventsCount===0)return bt;for(Q in At=this._events)Dn.call(At,Q)&&bt.push(tt?Q.slice(1):Q);return Object.getOwnPropertySymbols?bt.concat(Object.getOwnPropertySymbols(At)):bt},zt.prototype.listeners=function(bt){var At=tt?tt+bt:bt,Q=this._events[At];if(!Q)return[];if(Q.fn)return[Q.fn];for(var jt=0,St=Q.length,kt=new Array(St);jt<St;jt++)kt[jt]=Q[jt].fn;return kt},zt.prototype.listenerCount=function(bt){var At=tt?tt+bt:bt,Q=this._events[At];return Q?Q.fn?1:Q.length:0},zt.prototype.emit=function(bt,At,Q,jt,St,kt){var pt=tt?tt+bt:bt;if(!this._events[pt])return!1;var ut=this._events[pt],ot=arguments.length,rt,ht;if(ut.fn){switch(ut.once&&this.removeListener(bt,ut.fn,void 0,!0),ot){case 1:return ut.fn.call(ut.context),!0;case 2:return ut.fn.call(ut.context,At),!0;case 3:return ut.fn.call(ut.context,At,Q),!0;case 4:return ut.fn.call(ut.context,At,Q,jt),!0;case 5:return ut.fn.call(ut.context,At,Q,jt,St),!0;case 6:return ut.fn.call(ut.context,At,Q,jt,St,kt),!0}for(ht=1,rt=new Array(ot-1);ht<ot;ht++)rt[ht-1]=arguments[ht];ut.fn.apply(ut.context,rt)}else{var Wt=ut.length,ae;for(ht=0;ht<Wt;ht++)switch(ut[ht].once&&this.removeListener(bt,ut[ht].fn,void 0,!0),ot){case 1:ut[ht].fn.call(ut[ht].context);break;case 2:ut[ht].fn.call(ut[ht].context,At);break;case 3:ut[ht].fn.call(ut[ht].context,At,Q);break;case 4:ut[ht].fn.call(ut[ht].context,At,Q,jt);break;default:if(!rt)for(ae=1,rt=new Array(ot-1);ae<ot;ae++)rt[ae-1]=arguments[ae];ut[ht].fn.apply(ut[ht].context,rt)}}return!0},zt.prototype.on=function(bt,At,Q){return te(this,bt,At,Q,!1)},zt.prototype.once=function(bt,At,Q){return te(this,bt,At,Q,!0)},zt.prototype.removeListener=function(bt,At,Q,jt){var St=tt?tt+bt:bt;if(!this._events[St])return this;if(!At)return xe(this,St),this;var kt=this._events[St];if(kt.fn)kt.fn===At&&(!jt||kt.once)&&(!Q||kt.context===Q)&&xe(this,St);else{for(var pt=0,ut=[],ot=kt.length;pt<ot;pt++)(kt[pt].fn!==At||jt&&!kt[pt].once||Q&&kt[pt].context!==Q)&&ut.push(kt[pt]);ut.length?this._events[St]=ut.length===1?ut[0]:ut:xe(this,St)}return this},zt.prototype.removeAllListeners=function(bt){var At;return bt?(At=tt?tt+bt:bt,this._events[At]&&xe(this,At)):(this._events=new Et,this._eventsCount=0),this},zt.prototype.off=zt.prototype.removeListener,zt.prototype.addListener=zt.prototype.on,zt.prefixed=tt,zt.EventEmitter=zt,je.exports=zt},69916:function(je,Dn){(function(tt,Et){Et(Dn)})(this,function(tt){"use strict";function Et(pt,ut,ot,rt){rt=rt||{};var ht=rt.maxIterations||100,Wt=rt.tolerance||1e-10,ae=pt(ut),We=pt(ot),ke=ot-ut;if(ae*We>0)throw"Initial bisect points must have opposite signs";if(ae===0)return ut;if(We===0)return ot;for(var Ie=0;Ie<ht;++Ie){ke/=2;var Ve=ut+ke,we=pt(Ve);if(we*ae>=0&&(ut=Ve),Math.abs(ke)<Wt||we===0)return Ve}return ut+ke}function lt(pt){for(var ut=new Array(pt),ot=0;ot<pt;++ot)ut[ot]=0;return ut}function te(pt,ut){return lt(pt).map(function(){return lt(ut)})}function xe(pt,ut){for(var ot=0,rt=0;rt<pt.length;++rt)ot+=pt[rt]*ut[rt];return ot}function zt(pt){return Math.sqrt(xe(pt,pt))}function mt(pt,ut,ot){for(var rt=0;rt<ut.length;++rt)pt[rt]=ut[rt]*ot}function bt(pt,ut,ot,rt,ht){for(var Wt=0;Wt<pt.length;++Wt)pt[Wt]=ut*ot[Wt]+rt*ht[Wt]}function At(pt,ut,ot){ot=ot||{};var rt=ot.maxIterations||ut.length*200,ht=ot.nonZeroDelta||1.05,Wt=ot.zeroDelta||.001,ae=ot.minErrorDelta||1e-6,We=ot.minErrorDelta||1e-5,ke=ot.rho!==void 0?ot.rho:1,Ie=ot.chi!==void 0?ot.chi:2,Ve=ot.psi!==void 0?ot.psi:-.5,we=ot.sigma!==void 0?ot.sigma:.5,Je,Xe=ut.length,Zt=new Array(Xe+1);Zt[0]=ut,Zt[0].fx=pt(ut),Zt[0].id=0;for(var Vt=0;Vt<Xe;++Vt){var ar=ut.slice();ar[Vt]=ar[Vt]?ar[Vt]*ht:Wt,Zt[Vt+1]=ar,Zt[Vt+1].fx=pt(ar),Zt[Vt+1].id=Vt+1}function xr(lr){for(var tn=0;tn<lr.length;tn++)Zt[Xe][tn]=lr[tn];Zt[Xe].fx=lr.fx}for(var Tr=function(lr,tn){return lr.fx-tn.fx},hr=ut.slice(),Qn=ut.slice(),pr=ut.slice(),ei=ut.slice(),mi=0;mi<rt;++mi){if(Zt.sort(Tr),ot.history){var Ei=Zt.map(function(lr){var tn=lr.slice();return tn.fx=lr.fx,tn.id=lr.id,tn});Ei.sort(function(lr,tn){return lr.id-tn.id}),ot.history.push({x:Zt[0].slice(),fx:Zt[0].fx,simplex:Ei})}for(Je=0,Vt=0;Vt<Xe;++Vt)Je=Math.max(Je,Math.abs(Zt[0][Vt]-Zt[1][Vt]));if(Math.abs(Zt[0].fx-Zt[Xe].fx)<ae&&Je<We)break;for(Vt=0;Vt<Xe;++Vt){hr[Vt]=0;for(var $n=0;$n<Xe;++$n)hr[Vt]+=Zt[$n][Vt];hr[Vt]/=Xe}var vr=Zt[Xe];if(bt(Qn,1+ke,hr,-ke,vr),Qn.fx=pt(Qn),Qn.fx<Zt[0].fx)bt(ei,1+Ie,hr,-Ie,vr),ei.fx=pt(ei),ei.fx<Qn.fx?xr(ei):xr(Qn);else if(Qn.fx>=Zt[Xe-1].fx){var Jn=!1;if(Qn.fx>vr.fx?(bt(pr,1+Ve,hr,-Ve,vr),pr.fx=pt(pr),pr.fx<vr.fx?xr(pr):Jn=!0):(bt(pr,1-Ve*ke,hr,Ve*ke,vr),pr.fx=pt(pr),pr.fx<Qn.fx?xr(pr):Jn=!0),Jn){if(we>=1)break;for(Vt=1;Vt<Zt.length;++Vt)bt(Zt[Vt],1-we,Zt[0],we,Zt[Vt]),Zt[Vt].fx=pt(Zt[Vt])}}else xr(Qn)}return Zt.sort(Tr),{fx:Zt[0].fx,x:Zt[0]}}function Q(pt,ut,ot,rt,ht,Wt,ae){var We=ot.fx,ke=xe(ot.fxprime,ut),Ie=We,Ve=We,we=ke,Je=0;ht=ht||1,Wt=Wt||1e-6,ae=ae||.1;function Xe(Vt,ar,xr){for(var Tr=0;Tr<16;++Tr)if(ht=(Vt+ar)/2,bt(rt.x,1,ot.x,ht,ut),Ie=rt.fx=pt(rt.x,rt.fxprime),we=xe(rt.fxprime,ut),Ie>We+Wt*ht*ke||Ie>=xr)ar=ht;else{if(Math.abs(we)<=-ae*ke)return ht;we*(ar-Vt)>=0&&(ar=Vt),Vt=ht,xr=Ie}return 0}for(var Zt=0;Zt<10;++Zt){if(bt(rt.x,1,ot.x,ht,ut),Ie=rt.fx=pt(rt.x,rt.fxprime),we=xe(rt.fxprime,ut),Ie>We+Wt*ht*ke||Zt&&Ie>=Ve)return Xe(Je,ht,Ve);if(Math.abs(we)<=-ae*ke)return ht;if(we>=0)return Xe(ht,Je,Ie);Ve=Ie,Je=ht,ht*=2}return ht}function jt(pt,ut,ot){var rt={x:ut.slice(),fx:0,fxprime:ut.slice()},ht={x:ut.slice(),fx:0,fxprime:ut.slice()},Wt=ut.slice(),ae,We,ke=1,Ie;ot=ot||{},Ie=ot.maxIterations||ut.length*20,rt.fx=pt(rt.x,rt.fxprime),ae=rt.fxprime.slice(),mt(ae,rt.fxprime,-1);for(var Ve=0;Ve<Ie;++Ve){if(ke=Q(pt,ae,rt,ht,ke),ot.history&&ot.history.push({x:rt.x.slice(),fx:rt.fx,fxprime:rt.fxprime.slice(),alpha:ke}),!ke)mt(ae,rt.fxprime,-1);else{bt(Wt,1,ht.fxprime,-1,rt.fxprime);var we=xe(rt.fxprime,rt.fxprime),Je=Math.max(0,xe(Wt,ht.fxprime)/we);bt(ae,Je,ae,-1,ht.fxprime),We=rt,rt=ht,ht=We}if(zt(rt.fxprime)<=1e-5)break}return ot.history&&ot.history.push({x:rt.x.slice(),fx:rt.fx,fxprime:rt.fxprime.slice(),alpha:ke}),rt}function St(pt,ut,ot){ot=ot||{};for(var rt=ot.maxIterations||ut.length*100,ht=ot.learnRate||.001,Wt={x:ut.slice(),fx:0,fxprime:ut.slice()},ae=0;ae<rt&&(Wt.fx=pt(Wt.x,Wt.fxprime),ot.history&&ot.history.push({x:Wt.x.slice(),fx:Wt.fx,fxprime:Wt.fxprime.slice()}),bt(Wt.x,1,Wt.x,-ht,Wt.fxprime),!(zt(Wt.fxprime)<=1e-5));++ae);return Wt}function kt(pt,ut,ot){ot=ot||{};var rt={x:ut.slice(),fx:0,fxprime:ut.slice()},ht={x:ut.slice(),fx:0,fxprime:ut.slice()},Wt=ot.maxIterations||ut.length*100,ae=ot.learnRate||1,We=ut.slice(),ke=ot.c1||.001,Ie=ot.c2||.1,Ve,we=[];if(ot.history){var Je=pt;pt=function(Zt,Vt){return we.push(Zt.slice()),Je(Zt,Vt)}}rt.fx=pt(rt.x,rt.fxprime);for(var Xe=0;Xe<Wt&&(mt(We,rt.fxprime,-1),ae=Q(pt,We,rt,ht,ae,ke,Ie),ot.history&&(ot.history.push({x:rt.x.slice(),fx:rt.fx,fxprime:rt.fxprime.slice(),functionCalls:we,learnRate:ae,alpha:ae}),we=[]),Ve=rt,rt=ht,ht=Ve,!(ae===0||zt(rt.fxprime)<1e-5));++Xe);return rt}tt.bisect=Et,tt.nelderMead=At,tt.conjugateGradient=jt,tt.gradientDescent=St,tt.gradientDescentLineSearch=kt,tt.zeros=lt,tt.zerosM=te,tt.norm2=zt,tt.weightedSum=bt,tt.scale=mt})},73807:function(je){"use strict";var Dn=je.exports;je.exports.isNumber=function(tt){return typeof tt=="number"},je.exports.findMin=function(tt){if(tt.length===0)return 1/0;for(var Et=tt[0],lt=1;lt<tt.length;lt++)Et=Math.min(Et,tt[lt]);return Et},je.exports.findMax=function(tt){if(tt.length===0)return-1/0;for(var Et=tt[0],lt=1;lt<tt.length;lt++)Et=Math.max(Et,tt[lt]);return Et},je.exports.findMinMulti=function(tt){for(var Et=Dn.findMin(tt[0]),lt=1;lt<tt.length;lt++)Et=Math.min(Et,Dn.findMin(tt[lt]));return Et},je.exports.findMaxMulti=function(tt){for(var Et=Dn.findMax(tt[0]),lt=1;lt<tt.length;lt++)Et=Math.max(Et,Dn.findMax(tt[lt]));return Et},je.exports.inside=function(tt,Et,lt){return tt<=lt&<<=Et}},53843:function(je,Dn,tt){"use strict";var Et=50,lt=2,te=Math.log(2),xe=je.exports,zt=tt(73807);function mt(At){return 1-Math.abs(At)}je.exports.getUnifiedMinMax=function(At,Q){return xe.getUnifiedMinMaxMulti([At],Q)},je.exports.getUnifiedMinMaxMulti=function(At,Q){Q=Q||{};var jt=!1,St=!1,kt=zt.isNumber(Q.width)?Q.width:lt,pt=zt.isNumber(Q.size)?Q.size:Et,ut=zt.isNumber(Q.min)?Q.min:(jt=!0,zt.findMinMulti(At)),ot=zt.isNumber(Q.max)?Q.max:(St=!0,zt.findMaxMulti(At)),rt=ot-ut,ht=rt/(pt-1);return jt&&(ut=ut-2*kt*ht),St&&(ot=ot+2*kt*ht),{min:ut,max:ot}},je.exports.create=function(At,Q){if(Q=Q||{},!At||At.length===0)return[];var jt=zt.isNumber(Q.size)?Q.size:Et,St=zt.isNumber(Q.width)?Q.width:lt,kt=xe.getUnifiedMinMax(At,{size:jt,width:St,min:Q.min,max:Q.max}),pt=kt.min,ut=kt.max,ot=ut-pt,rt=ot/(jt-1);if(ot===0)return[{x:pt,y:1}];for(var ht=[],Wt=0;Wt<jt;Wt++)ht.push({x:pt+Wt*rt,y:0});var ae=function(Zt){return Math.floor((Zt-pt)/rt)},We=bt(mt,St),ke=We[St],Ie=We[St-1]-We[St-2],Ve=0;At.forEach(function(Zt){var Vt=ae(Zt);if(!(Vt+St<0||Vt-St>=ht.length)){var ar=Math.max(Vt-St,0),xr=Vt,Tr=Math.min(Vt+St,ht.length-1),hr=ar-(Vt-St),Qn=Vt+St-Tr,pr=We[-St-1+hr]||0,ei=We[-St-1+Qn]||0,mi=ke/(ke-pr-ei);hr>0&&(Ve+=mi*(hr-1)*Ie);var Ei=Math.max(0,Vt-St+1);zt.inside(0,ht.length-1,Ei)&&(ht[Ei].y+=mi*1*Ie),zt.inside(0,ht.length-1,xr+1)&&(ht[xr+1].y-=mi*2*Ie),zt.inside(0,ht.length-1,Tr+1)&&(ht[Tr+1].y+=mi*1*Ie)}});var we=Ve,Je=0,Xe=0;return ht.forEach(function(Zt){Je+=Zt.y,we+=Je,Zt.y=we,Xe+=we}),Xe>0&&ht.forEach(function(Zt){Zt.y/=Xe}),ht};function bt(At,Q){for(var jt={},St=0,kt=-Q;kt<=Q;kt++)St+=At(kt/Q),jt[kt]=St;return jt}je.exports.getExpectedValueFromPdf=function(At){if(!(!At||At.length===0)){var Q=0;return At.forEach(function(jt){Q+=jt.x*jt.y}),Q}},je.exports.getXWithLeftTailArea=function(At,Q){if(!(!At||At.length===0)){for(var jt=0,St=0,kt=0;kt<At.length&&(St=kt,jt+=At[kt].y,!(jt>=Q));kt++);return At[St].x}},je.exports.getPerplexity=function(At){if(!(!At||At.length===0)){var Q=0;return At.forEach(function(jt){var St=Math.log(jt.y);isFinite(St)&&(Q+=jt.y*St)}),Q=-Q/te,Math.pow(2,Q)}}},86851:function(je,Dn,tt){"use strict";var Et=tt(89594),lt=Array.prototype.concat,te=Array.prototype.slice,xe=je.exports=function(mt){for(var bt=[],At=0,Q=mt.length;At<Q;At++){var jt=mt[At];Et(jt)?bt=lt.call(bt,te.call(jt)):bt.push(jt)}return bt};xe.wrap=function(zt){return function(){return zt(xe(arguments))}}},89594:function(je){je.exports=function(tt){return!tt||typeof tt=="string"?!1:tt instanceof Array||Array.isArray(tt)||tt.length>=0&&(tt.splice instanceof Function||Object.getOwnPropertyDescriptor(tt,tt.length-1)&&tt.constructor.name!=="String")}},64599:function(je,Dn,tt){var Et=tt(96263);function lt(te,xe){var zt=typeof Symbol!="undefined"&&te[Symbol.iterator]||te["@@iterator"];if(!zt){if(Array.isArray(te)||(zt=Et(te))||xe&&te&&typeof te.length=="number"){zt&&(te=zt);var mt=0,bt=function(){};return{s:bt,n:function(){return mt>=te.length?{done:!0}:{done:!1,value:te[mt++]}},e:function(kt){throw kt},f:bt}}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 At=!0,Q=!1,jt;return{s:function(){zt=zt.call(te)},n:function(){var kt=zt.next();return At=kt.done,kt},e:function(kt){Q=!0,jt=kt},f:function(){try{!At&&zt.return!=null&&zt.return()}finally{if(Q)throw jt}}}}je.exports=lt,je.exports.__esModule=!0,je.exports.default=je.exports}}]);
|
|
}());
|